diff --git a/.gitignore b/.gitignore index b79afe1..2fa21e5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ test/.tmp* .test .tmp .DS_store -Notes \ No newline at end of file +Notes +lcov.info \ No newline at end of file diff --git a/bibtex-tidy.js b/bibtex-tidy.js index fb775cb..732a8b3 100644 --- a/bibtex-tidy.js +++ b/bibtex-tidy.js @@ -29,7 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru // src/index.ts var src_exports = {}; __export(src_exports, { - getEntries: () => getEntries2, + getEntries: () => getEntries, tidy: () => tidy }); module.exports = __toCommonJS(src_exports); @@ -228,2378 +228,7 @@ function flattenLaTeX(block) { } __name(flattenLaTeX, "flattenLaTeX"); -// src/unicode.ts -var specialCharacters = /* @__PURE__ */ new Map([ - ["0023", "\\#"], - ["0024", "\\$"], - ["0025", "\\%"], - ["0026", "\\&"], - ["0027", "'"], - ["0040", "\\@"], - ["002a", "\\textasteriskcentered"], - ["005f", "\\_"], - ["007c", "\\vert{}"], - ["00a0", "~"], - ["00a1", "\\textexclamdown{}"], - ["00a2", "\\textcent{}"], - ["00a3", "\\textsterling{}"], - ["00a4", "\\textcurrency{}"], - ["00a5", "\\textyen{}"], - ["00a6", "\\textbrokenbar{}"], - ["00a7", "\\textsection{}"], - ["00a8", "\\textasciidieresis{}"], - ["00a9", "\\textcopyright{}"], - ["00aa", "\\textordfeminine{}"], - ["00ab", "\\guillemotleft{}"], - ["00ac", "\\lnot{}"], - ["00ad", "\\-"], - ["00ae", "\\textregistered{}"], - ["00af", "\\textasciimacron{}"], - ["00b0", "\\textdegree{}"], - ["00b1", "\\pm{}"], - ["00b2", "\\ensuremath{^2}"], - ["00b3", "\\ensuremath{^3}"], - ["00b4", "\\textasciiacute{}"], - ["00b5", "\\mathrm{\\mu}"], - ["00b6", "\\textparagraph{}"], - ["00b7", "\\cdot{}"], - ["00b8", "\\c{}"], - ["00b9", "\\ensuremath{^1}"], - ["00ba", "\\textordmasculine{}"], - ["00bb", "\\guillemotright{}"], - ["00bc", "\\textonequarter{}"], - ["00bd", "\\textonehalf{}"], - ["00be", "\\textthreequarters{}"], - ["00bf", "\\textquestiondown{}"], - ["00c0", "\\`{A}"], - ["00c1", "\\'{A}"], - ["00c2", "\\^{A}"], - ["00c3", "\\~{A}"], - ["00c4", '\\"{A}'], - ["00c5", "\\AA{}"], - ["00c6", "\\AE{}"], - ["00c7", "\\c{C}"], - ["00c8", "\\`{E}"], - ["00c9", "\\'{E}"], - ["00ca", "\\^{E}"], - ["00cb", '\\"{E}'], - ["00cc", "\\`{I}"], - ["00cd", "\\'{I}"], - ["00ce", "\\^{I}"], - ["00cf", '\\"{I}'], - ["00d0", "\\DH{}"], - ["00d1", "\\~{N}"], - ["00d2", "\\`{O}"], - ["00d3", "\\'{O}"], - ["00d4", "\\^{O}"], - ["00d5", "\\~{O}"], - ["00d6", '\\"{O}'], - ["00d7", "\\texttimes{}"], - ["00d8", "\\O{}"], - ["00d9", "\\`{U}"], - ["00da", "\\'{U}"], - ["00db", "\\^{U}"], - ["00dc", '\\"{U}'], - ["00dd", "\\'{Y}"], - ["00de", "\\TH{}"], - ["00df", "\\ss{}"], - ["00e0", "\\`{a}"], - ["00e1", "\\'{a}"], - ["00e2", "\\^{a}"], - ["00e3", "\\~{a}"], - ["00e4", '\\"{a}'], - ["00e5", "\\aa{}"], - ["00e6", "\\ae{}"], - ["00e7", "\\c{c}"], - ["00e8", "\\`{e}"], - ["00e9", "\\'{e}"], - ["00ea", "\\^{e}"], - ["00eb", '\\"{e}'], - ["00ec", "\\`{\\i}"], - ["00ed", "\\'{\\i}"], - ["00ee", "\\^{\\i}"], - ["00ef", '\\"{\\i}'], - ["00f0", "\\dh{}"], - ["00f1", "\\~{n}"], - ["00f2", "\\`{o}"], - ["00f3", "\\'{o}"], - ["00f4", "\\^{o}"], - ["00f5", "\\~{o}"], - ["00f6", '\\"{o}'], - ["00f7", "\\div{}"], - ["00f8", "\\o{}"], - ["00f9", "\\`{u}"], - ["00fa", "\\'{u}"], - ["00fb", "\\^{u}"], - ["00fc", '\\"{u}'], - ["00fd", "\\'{y}"], - ["00fe", "\\th{}"], - ["00ff", '\\"{y}'], - ["0100", "\\={A}"], - ["0101", "\\={a}"], - ["0102", "\\u{A}"], - ["0103", "\\u{a}"], - ["0104", "\\k{A}"], - ["0105", "\\k{a}"], - ["0106", "\\'{C}"], - ["0107", "\\'{c}"], - ["0108", "\\^{C}"], - ["0109", "\\^{c}"], - ["010a", "\\.{C}"], - ["010b", "\\.{c}"], - ["010c", "\\v{C}"], - ["010d", "\\v{c}"], - ["010e", "\\v{D}"], - ["010f", "\\v{d}"], - ["0110", "\\DJ{}"], - ["0111", "\\dj{}"], - ["0112", "\\={E}"], - ["0113", "\\={e}"], - ["0114", "\\u{E}"], - ["0115", "\\u{e}"], - ["0116", "\\.{E}"], - ["0117", "\\.{e}"], - ["0118", "\\k{E}"], - ["0119", "\\k{e}"], - ["011a", "\\v{E}"], - ["011b", "\\v{e}"], - ["011c", "\\^{G}"], - ["011d", "\\^{g}"], - ["011e", "\\u{G}"], - ["011f", "\\u{g}"], - ["0120", "\\.{G}"], - ["0121", "\\.{g}"], - ["0122", "\\c{G}"], - ["0123", "\\c{g}"], - ["0124", "\\^{H}"], - ["0125", "\\^{h}"], - ["0126", "{\\fontencoding{LELA}\\selectfont\\char40}"], - ["0127", "\\Elzxh{}"], - ["0128", "\\~{I}"], - ["0129", "\\~{\\i}"], - ["012a", "\\={I}"], - ["012b", "\\={\\i}"], - ["012c", "\\u{I}"], - ["012d", "\\u{\\i}"], - ["012e", "\\k{I}"], - ["012f", "\\k{i}"], - ["0130", "\\.{I}"], - ["0131", "\\i{}"], - ["0132", "IJ"], - ["0133", "ij"], - ["0134", "\\^{J}"], - ["0135", "\\^{\\j}"], - ["0136", "\\c{K}"], - ["0137", "\\c{k}"], - ["0138", "{\\fontencoding{LELA}\\selectfont\\char91}"], - ["0139", "\\'{L}"], - ["013a", "\\'{l}"], - ["013b", "\\c{L}"], - ["013c", "\\c{l}"], - ["013d", "\\v{L}"], - ["013e", "\\v{l}"], - ["013f", "{\\fontencoding{LELA}\\selectfont\\char201}"], - ["0140", "{\\fontencoding{LELA}\\selectfont\\char202}"], - ["0141", "\\L{}"], - ["0142", "\\l{}"], - ["0143", "\\'{N}"], - ["0144", "\\'{n}"], - ["0145", "\\c{N}"], - ["0146", "\\c{n}"], - ["0147", "\\v{N}"], - ["0148", "\\v{n}"], - ["0149", "'n"], - ["014a", "\\NG{}"], - ["014b", "\\ng{}"], - ["014c", "\\={O}"], - ["014d", "\\={o}"], - ["014e", "\\u{O}"], - ["014f", "\\u{o}"], - ["0150", "\\H{O}"], - ["0151", "\\H{o}"], - ["0152", "\\OE{}"], - ["0153", "\\oe{}"], - ["0154", "\\'{R}"], - ["0155", "\\'{r}"], - ["0156", "\\c{R}"], - ["0157", "\\c{r}"], - ["0158", "\\v{R}"], - ["0159", "\\v{r}"], - ["015a", "\\'{S}"], - ["015b", "\\'{s}"], - ["015c", "\\^{S}"], - ["015d", "\\^{s}"], - ["015e", "\\c{S}"], - ["015f", "\\c{s}"], - ["0160", "\\v{S}"], - ["0161", "\\v{s}"], - ["0162", "\\c{T}"], - ["0163", "\\c{t}"], - ["0164", "\\v{T}"], - ["0165", "\\v{t}"], - ["0166", "{\\fontencoding{LELA}\\selectfont\\char47}"], - ["0167", "{\\fontencoding{LELA}\\selectfont\\char63}"], - ["0168", "\\~{U}"], - ["0169", "\\~{u}"], - ["016a", "\\={U}"], - ["016b", "\\={u}"], - ["016c", "\\u{U}"], - ["016d", "\\u{u}"], - ["016e", "\\r{U}"], - ["016f", "\\r{u}"], - ["0170", "\\H{U}"], - ["0171", "\\H{u}"], - ["0172", "\\k{U}"], - ["0173", "\\k{u}"], - ["0174", "\\^{W}"], - ["0175", "\\^{w}"], - ["0176", "\\^{Y}"], - ["0177", "\\^{y}"], - ["0178", '\\"{Y}'], - ["0179", "\\'{Z}"], - ["017a", "\\'{z}"], - ["017b", "\\.{Z}"], - ["017c", "\\.{z}"], - ["017d", "\\v{Z}"], - ["017e", "\\v{z}"], - ["0195", "\\texthvlig{}"], - ["019e", "\\textnrleg{}"], - ["01aa", "\\eth{}"], - ["01ba", "{\\fontencoding{LELA}\\selectfont\\char195}"], - ["01c2", "\\textdoublepipe{}"], - ["01f5", "\\'{g}"], - ["0250", "\\Elztrna{}"], - ["0252", "\\Elztrnsa{}"], - ["0254", "\\Elzopeno{}"], - ["0256", "\\Elzrtld{}"], - ["0258", "{\\fontencoding{LEIP}\\selectfont\\char61}"], - ["0259", "\\Elzschwa{}"], - ["025b", "\\varepsilon{}"], - ["0263", "\\Elzpgamma{}"], - ["0264", "\\Elzpbgam{}"], - ["0265", "\\Elztrnh{}"], - ["026c", "\\Elzbtdl{}"], - ["026d", "\\Elzrtll{}"], - ["026f", "\\Elztrnm{}"], - ["0270", "\\Elztrnmlr{}"], - ["0271", "\\Elzltlmr{}"], - ["0272", "\\Elzltln{}"], - ["0273", "\\Elzrtln{}"], - ["0277", "\\Elzclomeg{}"], - ["0278", "\\textphi{}"], - ["0279", "\\Elztrnr{}"], - ["027a", "\\Elztrnrl{}"], - ["027b", "\\Elzrttrnr{}"], - ["027c", "\\Elzrl{}"], - ["027d", "\\Elzrtlr{}"], - ["027e", "\\Elzfhr{}"], - ["027f", "{\\fontencoding{LEIP}\\selectfont\\char202}"], - ["0282", "\\Elzrtls{}"], - ["0283", "\\Elzesh{}"], - ["0287", "\\Elztrnt{}"], - ["0288", "\\Elzrtlt{}"], - ["028a", "\\Elzpupsil{}"], - ["028b", "\\Elzpscrv{}"], - ["028c", "\\Elzinvv{}"], - ["028d", "\\Elzinvw{}"], - ["028e", "\\Elztrny{}"], - ["0290", "\\Elzrtlz{}"], - ["0292", "\\Elzyogh{}"], - ["0294", "\\Elzglst{}"], - ["0295", "\\Elzreglst{}"], - ["0296", "\\Elzinglst{}"], - ["029e", "\\textturnk{}"], - ["02a4", "\\Elzdyogh{}"], - ["02a7", "\\Elztesh{}"], - ["02c7", "\\textasciicaron{}"], - ["02c8", "\\Elzverts{}"], - ["02cc", "\\Elzverti{}"], - ["02d0", "\\Elzlmrk{}"], - ["02d1", "\\Elzhlmrk{}"], - ["02d2", "\\Elzsbrhr{}"], - ["02d3", "\\Elzsblhr{}"], - ["02d4", "\\Elzrais{}"], - ["02d5", "\\Elzlow{}"], - ["02d8", "\\textasciibreve{}"], - ["02d9", "\\textperiodcentered{}"], - ["02da", "\\r{}"], - ["02db", "\\k{}"], - ["02dc", "\\texttildelow{}"], - ["02dd", "\\H{}"], - ["02e5", "\\tone{55}"], - ["02e6", "\\tone{44}"], - ["02e7", "\\tone{33}"], - ["02e8", "\\tone{22}"], - ["02e9", "\\tone{11}"], - ["0300", "\\`"], - ["0301", "\\'"], - ["0302", "\\^"], - ["0303", "\\~"], - ["0304", "\\="], - ["0306", "\\u"], - ["0307", "\\."], - ["0308", '\\"'], - ["030a", "\\r"], - ["030b", "\\H"], - ["030c", "\\v"], - ["030f", "\\cyrchar\\C"], - ["0311", "{\\fontencoding{LECO}\\selectfont\\char177}"], - ["0318", "{\\fontencoding{LECO}\\selectfont\\char184}"], - ["0319", "{\\fontencoding{LECO}\\selectfont\\char185}"], - ["0321", "\\Elzpalh{}"], - ["0322", "\\Elzrh{}"], - ["0327", "\\c"], - ["0328", "\\k"], - ["032a", "\\Elzsbbrg{}"], - ["032b", "{\\fontencoding{LECO}\\selectfont\\char203}"], - ["032f", "{\\fontencoding{LECO}\\selectfont\\char207}"], - ["0335", "\\Elzxl{}"], - ["0336", "\\Elzbar{}"], - ["0337", "{\\fontencoding{LECO}\\selectfont\\char215}"], - ["0338", "{\\fontencoding{LECO}\\selectfont\\char216}"], - ["033a", "{\\fontencoding{LECO}\\selectfont\\char218}"], - ["033b", "{\\fontencoding{LECO}\\selectfont\\char219}"], - ["033c", "{\\fontencoding{LECO}\\selectfont\\char220}"], - ["033d", "{\\fontencoding{LECO}\\selectfont\\char221}"], - ["0361", "{\\fontencoding{LECO}\\selectfont\\char225}"], - ["0386", "\\'{A}"], - ["0388", "\\'{E}"], - ["0389", "\\'{H}"], - ["038a", "\\'{}{I}"], - ["038c", "\\'{}O"], - ["038e", "\\mathrm{'Y}"], - ["038f", "\\mathrm{'\\Omega}"], - ["0390", "\\acute{\\ddot{\\iota}}"], - ["0391", "\\ensuremath{\\Alpha}"], - ["0392", "\\ensuremath{\\Beta}"], - ["0393", "\\ensuremath{\\Gamma}"], - ["0394", "\\ensuremath{\\Delta}"], - ["0395", "\\ensuremath{\\Epsilon}"], - ["0396", "\\ensuremath{\\Zeta}"], - ["0397", "\\ensuremath{\\Eta}"], - ["0398", "\\ensuremath{\\Theta}"], - ["0399", "\\ensuremath{\\Iota}"], - ["039a", "\\ensuremath{\\Kappa}"], - ["039b", "\\ensuremath{\\Lambda}"], - ["039e", "\\ensuremath{\\Xi}"], - ["03a0", "\\ensuremath{\\Pi}"], - ["03a1", "\\ensuremath{\\Rho}"], - ["03a3", "\\ensuremath{\\Sigma}"], - ["03a4", "\\ensuremath{\\Tau}"], - ["03a5", "\\ensuremath{\\Upsilon}"], - ["03a6", "\\ensuremath{\\Phi}"], - ["03a7", "\\ensuremath{\\Chi}"], - ["03a8", "\\ensuremath{\\Psi}"], - ["03a9", "\\ensuremath{\\Omega}"], - ["03aa", "\\mathrm{\\ddot{I}}"], - ["03ab", "\\mathrm{\\ddot{Y}}"], - ["03ac", "\\'{$\\alpha$}"], - ["03ad", "\\acute{\\epsilon}"], - ["03ae", "\\acute{\\eta}"], - ["03af", "\\acute{\\iota}"], - ["03b0", "\\acute{\\ddot{\\upsilon}}"], - ["03b1", "\\ensuremath{\\alpha}"], - ["03b2", "\\ensuremath{\\beta}"], - ["03b3", "\\ensuremath{\\gamma}"], - ["03b4", "\\ensuremath{\\delta}"], - ["03b5", "\\ensuremath{\\epsilon}"], - ["03b6", "\\ensuremath{\\zeta}"], - ["03b7", "\\ensuremath{\\eta}"], - ["03b8", "\\texttheta{}"], - ["03b9", "\\ensuremath{\\iota}"], - ["03ba", "\\ensuremath{\\kappa}"], - ["03bb", "\\ensuremath{\\lambda}"], - ["03bc", "\\ensuremath{\\mu}"], - ["03bd", "\\ensuremath{\\nu}"], - ["03be", "\\ensuremath{\\xi}"], - ["03c0", "\\ensuremath{\\pi}"], - ["03c1", "\\ensuremath{\\rho}"], - ["03c2", "\\ensuremath{\\varsigma}"], - ["03c3", "\\ensuremath{\\sigma}"], - ["03c4", "\\ensuremath{\\tau}"], - ["03c5", "\\ensuremath{\\upsilon}"], - ["03c6", "\\ensuremath{\\varphi}"], - ["03c7", "\\ensuremath{\\chi}"], - ["03c8", "\\ensuremath{\\psi}"], - ["03c9", "\\ensuremath{\\omega}"], - ["03ca", "\\ensuremath{\\ddot{\\iota}}"], - ["03cb", "\\ensuremath{\\ddot{\\upsilon}}"], - ["03cc", "\\'{o}"], - ["03cd", "\\acute{\\upsilon}"], - ["03ce", "\\acute{\\omega}"], - ["03d0", "\\Pisymbol{ppi022}{87}"], - ["03d1", "\\textvartheta{}"], - ["03d2", "\\ensuremath{\\Upsilon}"], - ["03d5", "\\ensuremath{\\phi}"], - ["03d6", "\\ensuremath{\\varpi}"], - ["03da", "\\Stigma{}"], - ["03dc", "\\Digamma{}"], - ["03dd", "\\digamma{}"], - ["03de", "\\Koppa{}"], - ["03e0", "\\Sampi{}"], - ["03f0", "\\varkappa{}"], - ["03f1", "\\varrho{}"], - ["03f4", "\\textTheta{}"], - ["03f6", "\\backepsilon{}"], - ["0401", "\\cyrchar\\CYRYO{}"], - ["0402", "\\cyrchar\\CYRDJE{}"], - ["0403", "\\cyrchar{\\'\\CYRG}"], - ["0404", "\\cyrchar\\CYRIE{}"], - ["0405", "\\cyrchar\\CYRDZE{}"], - ["0406", "\\cyrchar\\CYRII{}"], - ["0407", "\\cyrchar\\CYRYI{}"], - ["0408", "\\cyrchar\\CYRJE{}"], - ["0409", "\\cyrchar\\CYRLJE{}"], - ["040a", "\\cyrchar\\CYRNJE{}"], - ["040b", "\\cyrchar\\CYRTSHE{}"], - ["040c", "\\cyrchar{\\'\\CYRK}"], - ["040e", "\\cyrchar\\CYRUSHRT{}"], - ["040f", "\\cyrchar\\CYRDZHE{}"], - ["0410", "\\cyrchar\\CYRA{}"], - ["0411", "\\cyrchar\\CYRB{}"], - ["0412", "\\cyrchar\\CYRV{}"], - ["0413", "\\cyrchar\\CYRG{}"], - ["0414", "\\cyrchar\\CYRD{}"], - ["0415", "\\cyrchar\\CYRE{}"], - ["0416", "\\cyrchar\\CYRZH{}"], - ["0417", "\\cyrchar\\CYRZ{}"], - ["0418", "\\cyrchar\\CYRI{}"], - ["0419", "\\cyrchar\\CYRISHRT{}"], - ["041a", "\\cyrchar\\CYRK{}"], - ["041b", "\\cyrchar\\CYRL{}"], - ["041c", "\\cyrchar\\CYRM{}"], - ["041d", "\\cyrchar\\CYRN{}"], - ["041e", "\\cyrchar\\CYRO{}"], - ["041f", "\\cyrchar\\CYRP{}"], - ["0420", "\\cyrchar\\CYRR{}"], - ["0421", "\\cyrchar\\CYRS{}"], - ["0422", "\\cyrchar\\CYRT{}"], - ["0423", "\\cyrchar\\CYRU{}"], - ["0424", "\\cyrchar\\CYRF{}"], - ["0425", "\\cyrchar\\CYRH{}"], - ["0426", "\\cyrchar\\CYRC{}"], - ["0427", "\\cyrchar\\CYRCH{}"], - ["0428", "\\cyrchar\\CYRSH{}"], - ["0429", "\\cyrchar\\CYRSHCH{}"], - ["042a", "\\cyrchar\\CYRHRDSN{}"], - ["042b", "\\cyrchar\\CYRERY{}"], - ["042c", "\\cyrchar\\CYRSFTSN{}"], - ["042d", "\\cyrchar\\CYREREV{}"], - ["042e", "\\cyrchar\\CYRYU{}"], - ["042f", "\\cyrchar\\CYRYA{}"], - ["0430", "\\cyrchar\\cyra{}"], - ["0431", "\\cyrchar\\cyrb{}"], - ["0432", "\\cyrchar\\cyrv{}"], - ["0433", "\\cyrchar\\cyrg{}"], - ["0434", "\\cyrchar\\cyrd{}"], - ["0435", "\\cyrchar\\cyre{}"], - ["0436", "\\cyrchar\\cyrzh{}"], - ["0437", "\\cyrchar\\cyrz{}"], - ["0438", "\\cyrchar\\cyri{}"], - ["0439", "\\cyrchar\\cyrishrt{}"], - ["043a", "\\cyrchar\\cyrk{}"], - ["043b", "\\cyrchar\\cyrl{}"], - ["043c", "\\cyrchar\\cyrm{}"], - ["043d", "\\cyrchar\\cyrn{}"], - ["043e", "\\cyrchar\\cyro{}"], - ["043f", "\\cyrchar\\cyrp{}"], - ["0440", "\\cyrchar\\cyrr{}"], - ["0441", "\\cyrchar\\cyrs{}"], - ["0442", "\\cyrchar\\cyrt{}"], - ["0443", "\\cyrchar\\cyru{}"], - ["0444", "\\cyrchar\\cyrf{}"], - ["0445", "\\cyrchar\\cyrh{}"], - ["0446", "\\cyrchar\\cyrc{}"], - ["0447", "\\cyrchar\\cyrch{}"], - ["0448", "\\cyrchar\\cyrsh{}"], - ["0449", "\\cyrchar\\cyrshch{}"], - ["044a", "\\cyrchar\\cyrhrdsn{}"], - ["044b", "\\cyrchar\\cyrery{}"], - ["044c", "\\cyrchar\\cyrsftsn{}"], - ["044d", "\\cyrchar\\cyrerev{}"], - ["044e", "\\cyrchar\\cyryu{}"], - ["044f", "\\cyrchar\\cyrya{}"], - ["0451", "\\cyrchar\\cyryo{}"], - ["0452", "\\cyrchar\\cyrdje{}"], - ["0453", "\\cyrchar{\\'\\cyrg}"], - ["0454", "\\cyrchar\\cyrie{}"], - ["0455", "\\cyrchar\\cyrdze{}"], - ["0456", "\\cyrchar\\cyrii{}"], - ["0457", "\\cyrchar\\cyryi{}"], - ["0458", "\\cyrchar\\cyrje{}"], - ["0459", "\\cyrchar\\cyrlje{}"], - ["045a", "\\cyrchar\\cyrnje{}"], - ["045b", "\\cyrchar\\cyrtshe{}"], - ["045c", "\\cyrchar{\\'\\cyrk}"], - ["045e", "\\cyrchar\\cyrushrt{}"], - ["045f", "\\cyrchar\\cyrdzhe{}"], - ["0460", "\\cyrchar\\CYROMEGA{}"], - ["0461", "\\cyrchar\\cyromega{}"], - ["0462", "\\cyrchar\\CYRYAT{}"], - ["0464", "\\cyrchar\\CYRIOTE{}"], - ["0465", "\\cyrchar\\cyriote{}"], - ["0466", "\\cyrchar\\CYRLYUS{}"], - ["0467", "\\cyrchar\\cyrlyus{}"], - ["0468", "\\cyrchar\\CYRIOTLYUS{}"], - ["0469", "\\cyrchar\\cyriotlyus{}"], - ["046a", "\\cyrchar\\CYRBYUS{}"], - ["046c", "\\cyrchar\\CYRIOTBYUS{}"], - ["046d", "\\cyrchar\\cyriotbyus{}"], - ["046e", "\\cyrchar\\CYRKSI{}"], - ["046f", "\\cyrchar\\cyrksi{}"], - ["0470", "\\cyrchar\\CYRPSI{}"], - ["0471", "\\cyrchar\\cyrpsi{}"], - ["0472", "\\cyrchar\\CYRFITA{}"], - ["0474", "\\cyrchar\\CYRIZH{}"], - ["0478", "\\cyrchar\\CYRUK{}"], - ["0479", "\\cyrchar\\cyruk{}"], - ["047a", "\\cyrchar\\CYROMEGARND{}"], - ["047b", "\\cyrchar\\cyromegarnd{}"], - ["047c", "\\cyrchar\\CYROMEGATITLO{}"], - ["047d", "\\cyrchar\\cyromegatitlo{}"], - ["047e", "\\cyrchar\\CYROT{}"], - ["047f", "\\cyrchar\\cyrot{}"], - ["0480", "\\cyrchar\\CYRKOPPA{}"], - ["0481", "\\cyrchar\\cyrkoppa{}"], - ["0482", "\\cyrchar\\cyrthousands{}"], - ["0488", "\\cyrchar\\cyrhundredthousands{}"], - ["0489", "\\cyrchar\\cyrmillions{}"], - ["048c", "\\cyrchar\\CYRSEMISFTSN{}"], - ["048d", "\\cyrchar\\cyrsemisftsn{}"], - ["048e", "\\cyrchar\\CYRRTICK{}"], - ["048f", "\\cyrchar\\cyrrtick{}"], - ["0490", "\\cyrchar\\CYRGUP{}"], - ["0491", "\\cyrchar\\cyrgup{}"], - ["0492", "\\cyrchar\\CYRGHCRS{}"], - ["0493", "\\cyrchar\\cyrghcrs{}"], - ["0494", "\\cyrchar\\CYRGHK{}"], - ["0495", "\\cyrchar\\cyrghk{}"], - ["0496", "\\cyrchar\\CYRZHDSC{}"], - ["0497", "\\cyrchar\\cyrzhdsc{}"], - ["0498", "\\cyrchar\\CYRZDSC{}"], - ["0499", "\\cyrchar\\cyrzdsc{}"], - ["049a", "\\cyrchar\\CYRKDSC{}"], - ["049b", "\\cyrchar\\cyrkdsc{}"], - ["049c", "\\cyrchar\\CYRKVCRS{}"], - ["049d", "\\cyrchar\\cyrkvcrs{}"], - ["049e", "\\cyrchar\\CYRKHCRS{}"], - ["049f", "\\cyrchar\\cyrkhcrs{}"], - ["04a0", "\\cyrchar\\CYRKBEAK{}"], - ["04a1", "\\cyrchar\\cyrkbeak{}"], - ["04a2", "\\cyrchar\\CYRNDSC{}"], - ["04a3", "\\cyrchar\\cyrndsc{}"], - ["04a4", "\\cyrchar\\CYRNG{}"], - ["04a5", "\\cyrchar\\cyrng{}"], - ["04a6", "\\cyrchar\\CYRPHK{}"], - ["04a7", "\\cyrchar\\cyrphk{}"], - ["04a8", "\\cyrchar\\CYRABHHA{}"], - ["04a9", "\\cyrchar\\cyrabhha{}"], - ["04aa", "\\cyrchar\\CYRSDSC{}"], - ["04ab", "\\cyrchar\\cyrsdsc{}"], - ["04ac", "\\cyrchar\\CYRTDSC{}"], - ["04ad", "\\cyrchar\\cyrtdsc{}"], - ["04ae", "\\cyrchar\\CYRY{}"], - ["04af", "\\cyrchar\\cyry{}"], - ["04b0", "\\cyrchar\\CYRYHCRS{}"], - ["04b1", "\\cyrchar\\cyryhcrs{}"], - ["04b2", "\\cyrchar\\CYRHDSC{}"], - ["04b3", "\\cyrchar\\cyrhdsc{}"], - ["04b4", "\\cyrchar\\CYRTETSE{}"], - ["04b5", "\\cyrchar\\cyrtetse{}"], - ["04b6", "\\cyrchar\\CYRCHRDSC{}"], - ["04b7", "\\cyrchar\\cyrchrdsc{}"], - ["04b8", "\\cyrchar\\CYRCHVCRS{}"], - ["04b9", "\\cyrchar\\cyrchvcrs{}"], - ["04ba", "\\cyrchar\\CYRSHHA{}"], - ["04bb", "\\cyrchar\\cyrshha{}"], - ["04bc", "\\cyrchar\\CYRABHCH{}"], - ["04bd", "\\cyrchar\\cyrabhch{}"], - ["04be", "\\cyrchar\\CYRABHCHDSC{}"], - ["04bf", "\\cyrchar\\cyrabhchdsc{}"], - ["04c0", "\\cyrchar\\CYRpalochka{}"], - ["04c3", "\\cyrchar\\CYRKHK{}"], - ["04c4", "\\cyrchar\\cyrkhk{}"], - ["04c7", "\\cyrchar\\CYRNHK{}"], - ["04c8", "\\cyrchar\\cyrnhk{}"], - ["04cb", "\\cyrchar\\CYRCHLDSC{}"], - ["04cc", "\\cyrchar\\cyrchldsc{}"], - ["04d4", "\\cyrchar\\CYRAE{}"], - ["04d5", "\\cyrchar\\cyrae{}"], - ["04d8", "\\cyrchar\\CYRSCHWA{}"], - ["04d9", "\\cyrchar\\cyrschwa{}"], - ["04e0", "\\cyrchar\\CYRABHDZE{}"], - ["04e1", "\\cyrchar\\cyrabhdze{}"], - ["04e8", "\\cyrchar\\CYROTLD{}"], - ["04e9", "\\cyrchar\\cyrotld{}"], - ["2002", "\\hspace{0.6em}"], - ["2003", "\\hspace{1em}"], - ["2004", "\\hspace{0.33em}"], - ["2005", "\\hspace{0.25em}"], - ["2006", "\\hspace{0.166em}"], - ["2007", "\\hphantom{0}"], - ["2008", "\\hphantom{,}"], - ["2009", "\\hspace{0.167em}"], - ["200a", "\\mkern1mu{}"], - ["2010", "-"], - ["2014", "--"], - ["2015", "\\rule{1em}{1pt}"], - ["2016", "\\Vert{}"], - ["2018", "`"], - ["2019", "'"], - ["201b", "\\Elzreapos{}"], - ["201c", "``"], - ["201d", "''"], - ["201e", ",,"], - ["2020", "\\textdagger{}"], - ["2021", "\\textdaggerdbl{}"], - ["2022", "\\textbullet{}"], - ["2025", ".."], - ["2026", "\\ldots{}"], - ["2030", "\\textperthousand{}"], - ["2031", "\\textpertenthousand{}"], - ["2032", "\\ensuremath{'}"], - ["2033", "\\ensuremath{''}"], - ["2034", "\\ensuremath{'''}"], - ["2035", "\\backprime{}"], - ["2039", "\\guilsinglleft{}"], - ["203a", "\\guilsinglright{}"], - ["2057", "''''"], - ["205f", "\\mkern4mu{}"], - ["2060", "\\nolinebreak{}"], - ["20a7", "\\ensuremath{\\Elzpes}"], - ["20ac", "\\mbox{\\texteuro}{}"], - ["20db", "\\dddot{}"], - ["20dc", "\\ddddot{}"], - ["2102", "\\mathbb{C}"], - ["210a", "\\mathscr{g}"], - ["210b", "\\mathscr{H}"], - ["210c", "\\mathfrak{H}"], - ["210d", "\\mathbb{H}"], - ["210f", "\\hslash{}"], - ["2110", "\\mathscr{I}"], - ["2111", "\\mathfrak{I}"], - ["2112", "\\mathscr{L}"], - ["2113", "\\mathscr{l}"], - ["2115", "\\mathbb{N}"], - ["2116", "\\cyrchar\\textnumero{}"], - ["2118", "\\wp{}"], - ["2119", "\\mathbb{P}"], - ["211a", "\\mathbb{Q}"], - ["211b", "\\mathscr{R}"], - ["211c", "\\mathfrak{R}"], - ["211d", "\\mathbb{R}"], - ["211e", "\\Elzxrat{}"], - ["2122", "\\texttrademark{}"], - ["2124", "\\mathbb{Z}"], - ["2126", "\\Omega{}"], - ["2127", "\\mho{}"], - ["2128", "\\mathfrak{Z}"], - ["2129", "\\ElsevierGlyph{2129}"], - ["212b", "\\AA{}"], - ["212c", "\\mathscr{B}"], - ["212d", "\\mathfrak{C}"], - ["212f", "\\mathscr{e}"], - ["2130", "\\mathscr{E}"], - ["2131", "\\mathscr{F}"], - ["2133", "\\mathscr{M}"], - ["2134", "\\mathscr{o}"], - ["2135", "\\aleph{}"], - ["2136", "\\beth{}"], - ["2137", "\\gimel{}"], - ["2138", "\\daleth{}"], - ["2153", "\\textfrac{1}{3}"], - ["2154", "\\textfrac{2}{3}"], - ["2155", "\\textfrac{1}{5}"], - ["2156", "\\textfrac{2}{5}"], - ["2157", "\\textfrac{3}{5}"], - ["2158", "\\textfrac{4}{5}"], - ["2159", "\\textfrac{1}{6}"], - ["215a", "\\textfrac{5}{6}"], - ["215b", "\\textfrac{1}{8}"], - ["215c", "\\textfrac{3}{8}"], - ["215d", "\\textfrac{5}{8}"], - ["215e", "\\textfrac{7}{8}"], - ["2190", "\\leftarrow{}"], - ["2191", "\\uparrow{}"], - ["2192", "\\rightarrow{}"], - ["2193", "\\downarrow{}"], - ["2194", "\\leftrightarrow{}"], - ["2195", "\\updownarrow{}"], - ["2196", "\\nwarrow{}"], - ["2197", "\\nearrow{}"], - ["2198", "\\searrow{}"], - ["2199", "\\swarrow{}"], - ["219a", "\\nleftarrow{}"], - ["219b", "\\nrightarrow{}"], - ["219c", "\\arrowwaveright{}"], - ["219d", "\\arrowwaveright{}"], - ["219e", "\\twoheadleftarrow{}"], - ["21a0", "\\twoheadrightarrow{}"], - ["21a2", "\\leftarrowtail{}"], - ["21a3", "\\rightarrowtail{}"], - ["21a6", "\\mapsto{}"], - ["21a9", "\\hookleftarrow{}"], - ["21aa", "\\hookrightarrow{}"], - ["21ab", "\\looparrowleft{}"], - ["21ac", "\\looparrowright{}"], - ["21ad", "\\leftrightsquigarrow{}"], - ["21ae", "\\nleftrightarrow{}"], - ["21b0", "\\Lsh{}"], - ["21b1", "\\Rsh{}"], - ["21b3", "\\ElsevierGlyph{21B3}"], - ["21b6", "\\curvearrowleft{}"], - ["21b7", "\\curvearrowright{}"], - ["21ba", "\\circlearrowleft{}"], - ["21bb", "\\circlearrowright{}"], - ["21bc", "\\leftharpoonup{}"], - ["21bd", "\\leftharpoondown{}"], - ["21be", "\\upharpoonright{}"], - ["21bf", "\\upharpoonleft{}"], - ["21c0", "\\rightharpoonup{}"], - ["21c1", "\\rightharpoondown{}"], - ["21c2", "\\downharpoonright{}"], - ["21c3", "\\downharpoonleft{}"], - ["21c4", "\\rightleftarrows{}"], - ["21c5", "\\dblarrowupdown{}"], - ["21c6", "\\leftrightarrows{}"], - ["21c7", "\\leftleftarrows{}"], - ["21c8", "\\upuparrows{}"], - ["21c9", "\\rightrightarrows{}"], - ["21ca", "\\downdownarrows{}"], - ["21cb", "\\leftrightharpoons{}"], - ["21cc", "\\rightleftharpoons{}"], - ["21cd", "\\nLeftarrow{}"], - ["21ce", "\\nLeftrightarrow{}"], - ["21cf", "\\nRightarrow{}"], - ["21d0", "\\Leftarrow{}"], - ["21d1", "\\Uparrow{}"], - ["21d2", "\\Rightarrow{}"], - ["21d3", "\\Downarrow{}"], - ["21d4", "\\Leftrightarrow{}"], - ["21d5", "\\Updownarrow{}"], - ["21da", "\\Lleftarrow{}"], - ["21db", "\\Rrightarrow{}"], - ["21dd", "\\rightsquigarrow{}"], - ["21f5", "\\DownArrowUpArrow{}"], - ["2200", "\\forall{}"], - ["2201", "\\complement{}"], - ["2202", "\\partial{}"], - ["2203", "\\exists{}"], - ["2204", "\\nexists{}"], - ["2205", "\\varnothing{}"], - ["2207", "\\nabla{}"], - ["2208", "\\in{}"], - ["2209", "\\not\\in{}"], - ["220b", "\\ni{}"], - ["220c", "\\not\\ni{}"], - ["220f", "\\prod{}"], - ["2210", "\\coprod{}"], - ["2211", "\\sum{}"], - ["2212", "-"], - ["2213", "\\mp{}"], - ["2214", "\\dotplus{}"], - ["2216", "\\setminus{}"], - ["2217", "{\\_\\ast}"], - ["2218", "\\circ{}"], - ["2219", "\\bullet{}"], - ["221a", "\\surd{}"], - ["221d", "\\propto{}"], - ["221e", "\\infty{}"], - ["221f", "\\rightangle{}"], - ["2220", "\\angle{}"], - ["2221", "\\measuredangle{}"], - ["2222", "\\sphericalangle{}"], - ["2223", "\\mid{}"], - ["2224", "\\nmid{}"], - ["2225", "\\parallel{}"], - ["2226", "\\nparallel{}"], - ["2227", "\\wedge{}"], - ["2228", "\\vee{}"], - ["2229", "\\cap{}"], - ["222a", "\\cup{}"], - ["222b", "\\int{}"], - ["222c", "\\int\\!\\int{}"], - ["222d", "\\int\\!\\int\\!\\int{}"], - ["222e", "\\oint{}"], - ["222f", "\\surfintegral{}"], - ["2230", "\\volintegral{}"], - ["2231", "\\clwintegral{}"], - ["2232", "\\ElsevierGlyph{2232}"], - ["2233", "\\ElsevierGlyph{2233}"], - ["2234", "\\therefore{}"], - ["2235", "\\because{}"], - ["2237", "\\Colon{}"], - ["2238", "\\ElsevierGlyph{2238}"], - ["223a", "\\mathbin{{:}\\!\\!{-}\\!\\!{:}}"], - ["223b", "\\homothetic{}"], - ["223c", "\\sim{}"], - ["223d", "\\backsim{}"], - ["223e", "\\lazysinv{}"], - ["2240", "\\wr{}"], - ["2241", "\\not\\sim{}"], - ["2242", "\\ElsevierGlyph{2242}"], - ["2243", "\\simeq{}"], - ["2244", "\\not\\simeq{}"], - ["2245", "\\cong{}"], - ["2246", "\\approxnotequal{}"], - ["2247", "\\not\\cong{}"], - ["2248", "\\approx{}"], - ["2249", "\\not\\approx{}"], - ["224a", "\\approxeq{}"], - ["224b", "\\tildetrpl{}"], - ["224c", "\\allequal{}"], - ["224d", "\\asymp{}"], - ["224e", "\\Bumpeq{}"], - ["224f", "\\bumpeq{}"], - ["2250", "\\doteq{}"], - ["2251", "\\doteqdot{}"], - ["2252", "\\fallingdotseq{}"], - ["2253", "\\risingdotseq{}"], - ["2254", ":="], - ["2255", "=:"], - ["2256", "\\eqcirc{}"], - ["2257", "\\circeq{}"], - ["2259", "\\estimates{}"], - ["225a", "\\ElsevierGlyph{225A}"], - ["225b", "\\starequal{}"], - ["225c", "\\triangleq{}"], - ["225f", "\\ElsevierGlyph{225F}"], - ["2260", "\\not ="], - ["2261", "\\equiv{}"], - ["2262", "\\not\\equiv{}"], - ["2264", "\\leq{}"], - ["2265", "\\geq{}"], - ["2266", "\\leqq{}"], - ["2267", "\\geqq{}"], - ["2268", "\\lneqq{}"], - ["2269", "\\gneqq{}"], - ["226a", "\\ll{}"], - ["226b", "\\gg{}"], - ["226c", "\\between{}"], - ["226d", "\\not\\kern-0.3em\\times{}"], - ["226e", "\\not<"], - ["226f", "\\not>"], - ["2270", "\\not\\leq{}"], - ["2271", "\\not\\geq{}"], - ["2272", "\\lessequivlnt{}"], - ["2273", "\\greaterequivlnt{}"], - ["2274", "\\ElsevierGlyph{2274}"], - ["2275", "\\ElsevierGlyph{2275}"], - ["2276", "\\lessgtr{}"], - ["2277", "\\gtrless{}"], - ["2278", "\\notlessgreater{}"], - ["2279", "\\notgreaterless{}"], - ["227a", "\\prec{}"], - ["227b", "\\succ{}"], - ["227c", "\\preccurlyeq{}"], - ["227d", "\\succcurlyeq{}"], - ["227e", "\\precapprox{}"], - ["227f", "\\succapprox{}"], - ["2280", "\\not\\prec{}"], - ["2281", "\\not\\succ{}"], - ["2282", "\\subset{}"], - ["2283", "\\supset{}"], - ["2284", "\\not\\subset{}"], - ["2285", "\\not\\supset{}"], - ["2286", "\\subseteq{}"], - ["2287", "\\supseteq{}"], - ["2288", "\\not\\subseteq{}"], - ["2289", "\\not\\supseteq{}"], - ["228a", "\\subsetneq{}"], - ["228b", "\\supsetneq{}"], - ["228e", "\\uplus{}"], - ["228f", "\\sqsubset{}"], - ["2290", "\\sqsupset{}"], - ["2291", "\\sqsubseteq{}"], - ["2292", "\\sqsupseteq{}"], - ["2293", "\\sqcap{}"], - ["2294", "\\sqcup{}"], - ["2295", "\\oplus{}"], - ["2296", "\\ominus{}"], - ["2297", "\\otimes{}"], - ["2298", "\\oslash{}"], - ["2299", "\\odot{}"], - ["229a", "\\circledcirc{}"], - ["229b", "\\circledast{}"], - ["229d", "\\circleddash{}"], - ["229e", "\\boxplus{}"], - ["229f", "\\boxminus{}"], - ["22a0", "\\boxtimes{}"], - ["22a1", "\\boxdot{}"], - ["22a2", "\\vdash{}"], - ["22a3", "\\dashv{}"], - ["22a4", "\\top{}"], - ["22a5", "\\perp{}"], - ["22a7", "\\truestate{}"], - ["22a8", "\\forcesextra{}"], - ["22a9", "\\Vdash{}"], - ["22aa", "\\Vvdash{}"], - ["22ab", "\\VDash{}"], - ["22ac", "\\nvdash{}"], - ["22ad", "\\nvDash{}"], - ["22ae", "\\nVdash{}"], - ["22af", "\\nVDash{}"], - ["22b2", "\\vartriangleleft{}"], - ["22b3", "\\vartriangleright{}"], - ["22b4", "\\trianglelefteq{}"], - ["22b5", "\\trianglerighteq{}"], - ["22b6", "\\original{}"], - ["22b7", "\\image{}"], - ["22b8", "\\multimap{}"], - ["22b9", "\\hermitconjmatrix{}"], - ["22ba", "\\intercal{}"], - ["22bb", "\\veebar{}"], - ["22be", "\\rightanglearc{}"], - ["22c0", "\\ElsevierGlyph{22C0}"], - ["22c1", "\\ElsevierGlyph{22C1}"], - ["22c2", "\\bigcap{}"], - ["22c3", "\\bigcup{}"], - ["22c4", "\\diamond{}"], - ["22c5", "\\cdot{}"], - ["22c6", "\\star{}"], - ["22c7", "\\divideontimes{}"], - ["22c8", "\\bowtie{}"], - ["22c9", "\\ltimes{}"], - ["22ca", "\\rtimes{}"], - ["22cb", "\\leftthreetimes{}"], - ["22cc", "\\rightthreetimes{}"], - ["22cd", "\\backsimeq{}"], - ["22ce", "\\curlyvee{}"], - ["22cf", "\\curlywedge{}"], - ["22d0", "\\Subset{}"], - ["22d1", "\\Supset{}"], - ["22d2", "\\Cap{}"], - ["22d3", "\\Cup{}"], - ["22d4", "\\pitchfork{}"], - ["22d6", "\\lessdot{}"], - ["22d7", "\\gtrdot{}"], - ["22d8", "\\verymuchless{}"], - ["22d9", "\\verymuchgreater{}"], - ["22da", "\\lesseqgtr{}"], - ["22db", "\\gtreqless{}"], - ["22de", "\\curlyeqprec{}"], - ["22df", "\\curlyeqsucc{}"], - ["22e2", "\\not\\sqsubseteq{}"], - ["22e3", "\\not\\sqsupseteq{}"], - ["22e5", "\\Elzsqspne{}"], - ["22e6", "\\lnsim{}"], - ["22e7", "\\gnsim{}"], - ["22e8", "\\precedesnotsimilar{}"], - ["22e9", "\\succnsim{}"], - ["22ea", "\\ntriangleleft{}"], - ["22eb", "\\ntriangleright{}"], - ["22ec", "\\ntrianglelefteq{}"], - ["22ed", "\\ntrianglerighteq{}"], - ["22ee", "\\vdots{}"], - ["22ef", "\\cdots{}"], - ["22f0", "\\upslopeellipsis{}"], - ["22f1", "\\downslopeellipsis{}"], - ["2305", "\\barwedge{}"], - ["2306", "\\perspcorrespond{}"], - ["2308", "\\lceil{}"], - ["2309", "\\rceil{}"], - ["230a", "\\lfloor{}"], - ["230b", "\\rfloor{}"], - ["2315", "\\recorder{}"], - ["2316", '\\mathchar"2208'], - ["231c", "\\ulcorner{}"], - ["231d", "\\urcorner{}"], - ["231e", "\\llcorner{}"], - ["231f", "\\lrcorner{}"], - ["2322", "\\frown{}"], - ["2323", "\\smile{}"], - ["2329", "\\langle{}"], - ["232a", "\\rangle{}"], - ["233d", "\\ElsevierGlyph{E838}"], - ["23a3", "\\Elzdlcorn{}"], - ["23b0", "\\lmoustache{}"], - ["23b1", "\\rmoustache{}"], - ["2423", "\\textvisiblespace{}"], - ["2460", "\\ding{172}"], - ["2461", "\\ding{173}"], - ["2462", "\\ding{174}"], - ["2463", "\\ding{175}"], - ["2464", "\\ding{176}"], - ["2465", "\\ding{177}"], - ["2466", "\\ding{178}"], - ["2467", "\\ding{179}"], - ["2468", "\\ding{180}"], - ["2469", "\\ding{181}"], - ["24c8", "\\circledS{}"], - ["2506", "\\Elzdshfnc{}"], - ["2519", "\\Elzsqfnw{}"], - ["2571", "\\diagup{}"], - ["25a0", "\\ding{110}"], - ["25a1", "\\square{}"], - ["25aa", "\\blacksquare{}"], - ["25ad", "\\fbox{~~}"], - ["25af", "\\Elzvrecto{}"], - ["25b1", "\\ElsevierGlyph{E381}"], - ["25b2", "\\ding{115}"], - ["25b3", "\\bigtriangleup{}"], - ["25b4", "\\blacktriangle{}"], - ["25b5", "\\vartriangle{}"], - ["25b8", "\\blacktriangleright{}"], - ["25b9", "\\triangleright{}"], - ["25bc", "\\ding{116}"], - ["25bd", "\\bigtriangledown{}"], - ["25be", "\\blacktriangledown{}"], - ["25bf", "\\triangledown{}"], - ["25c2", "\\blacktriangleleft{}"], - ["25c3", "\\triangleleft{}"], - ["25c6", "\\ding{117}"], - ["25ca", "\\lozenge{}"], - ["25cb", "\\bigcirc{}"], - ["25cf", "\\ding{108}"], - ["25d0", "\\Elzcirfl{}"], - ["25d1", "\\Elzcirfr{}"], - ["25d2", "\\Elzcirfb{}"], - ["25d7", "\\ding{119}"], - ["25d8", "\\Elzrvbull{}"], - ["25e7", "\\Elzsqfl{}"], - ["25e8", "\\Elzsqfr{}"], - ["25ea", "\\Elzsqfse{}"], - ["25ef", "\\bigcirc{}"], - ["2605", "\\ding{72}"], - ["2606", "\\ding{73}"], - ["260e", "\\ding{37}"], - ["261b", "\\ding{42}"], - ["261e", "\\ding{43}"], - ["263e", "\\rightmoon{}"], - ["263f", "\\mercury{}"], - ["2640", "\\venus{}"], - ["2642", "\\male{}"], - ["2643", "\\jupiter{}"], - ["2644", "\\saturn{}"], - ["2645", "\\uranus{}"], - ["2646", "\\neptune{}"], - ["2647", "\\pluto{}"], - ["2648", "\\aries{}"], - ["2649", "\\taurus{}"], - ["264a", "\\gemini{}"], - ["264b", "\\cancer{}"], - ["264c", "\\leo{}"], - ["264d", "\\virgo{}"], - ["264e", "\\libra{}"], - ["264f", "\\scorpio{}"], - ["2650", "\\sagittarius{}"], - ["2651", "\\capricornus{}"], - ["2652", "\\aquarius{}"], - ["2653", "\\pisces{}"], - ["2660", "\\ding{171}"], - ["2662", "\\diamond{}"], - ["2663", "\\ding{168}"], - ["2665", "\\ding{170}"], - ["2666", "\\ding{169}"], - ["2669", "\\quarternote{}"], - ["266a", "\\eighthnote{}"], - ["266d", "\\flat{}"], - ["266e", "\\natural{}"], - ["266f", "\\sharp{}"], - ["2701", "\\ding{33}"], - ["2702", "\\ding{34}"], - ["2703", "\\ding{35}"], - ["2704", "\\ding{36}"], - ["2706", "\\ding{38}"], - ["2707", "\\ding{39}"], - ["2708", "\\ding{40}"], - ["2709", "\\ding{41}"], - ["270c", "\\ding{44}"], - ["270d", "\\ding{45}"], - ["270e", "\\ding{46}"], - ["270f", "\\ding{47}"], - ["2710", "\\ding{48}"], - ["2711", "\\ding{49}"], - ["2712", "\\ding{50}"], - ["2713", "\\ding{51}"], - ["2714", "\\ding{52}"], - ["2715", "\\ding{53}"], - ["2716", "\\ding{54}"], - ["2717", "\\ding{55}"], - ["2718", "\\ding{56}"], - ["2719", "\\ding{57}"], - ["271a", "\\ding{58}"], - ["271b", "\\ding{59}"], - ["271c", "\\ding{60}"], - ["271d", "\\ding{61}"], - ["271e", "\\ding{62}"], - ["271f", "\\ding{63}"], - ["2720", "\\ding{64}"], - ["2721", "\\ding{65}"], - ["2722", "\\ding{66}"], - ["2723", "\\ding{67}"], - ["2724", "\\ding{68}"], - ["2725", "\\ding{69}"], - ["2726", "\\ding{70}"], - ["2727", "\\ding{71}"], - ["2729", "\\ding{73}"], - ["272a", "\\ding{74}"], - ["272b", "\\ding{75}"], - ["272c", "\\ding{76}"], - ["272d", "\\ding{77}"], - ["272e", "\\ding{78}"], - ["272f", "\\ding{79}"], - ["2730", "\\ding{80}"], - ["2731", "\\ding{81}"], - ["2732", "\\ding{82}"], - ["2733", "\\ding{83}"], - ["2734", "\\ding{84}"], - ["2735", "\\ding{85}"], - ["2736", "\\ding{86}"], - ["2737", "\\ding{87}"], - ["2738", "\\ding{88}"], - ["2739", "\\ding{89}"], - ["273a", "\\ding{90}"], - ["273b", "\\ding{91}"], - ["273c", "\\ding{92}"], - ["273d", "\\ding{93}"], - ["273e", "\\ding{94}"], - ["273f", "\\ding{95}"], - ["2740", "\\ding{96}"], - ["2741", "\\ding{97}"], - ["2742", "\\ding{98}"], - ["2743", "\\ding{99}"], - ["2744", "\\ding{100}"], - ["2745", "\\ding{101}"], - ["2746", "\\ding{102}"], - ["2747", "\\ding{103}"], - ["2748", "\\ding{104}"], - ["2749", "\\ding{105}"], - ["274a", "\\ding{106}"], - ["274b", "\\ding{107}"], - ["274d", "\\ding{109}"], - ["274f", "\\ding{111}"], - ["2750", "\\ding{112}"], - ["2751", "\\ding{113}"], - ["2752", "\\ding{114}"], - ["2756", "\\ding{118}"], - ["2758", "\\ding{120}"], - ["2759", "\\ding{121}"], - ["275a", "\\ding{122}"], - ["275b", "\\ding{123}"], - ["275c", "\\ding{124}"], - ["275d", "\\ding{125}"], - ["275e", "\\ding{126}"], - ["2761", "\\ding{161}"], - ["2762", "\\ding{162}"], - ["2763", "\\ding{163}"], - ["2764", "\\ding{164}"], - ["2765", "\\ding{165}"], - ["2766", "\\ding{166}"], - ["2767", "\\ding{167}"], - ["2776", "\\ding{182}"], - ["2777", "\\ding{183}"], - ["2778", "\\ding{184}"], - ["2779", "\\ding{185}"], - ["277a", "\\ding{186}"], - ["277b", "\\ding{187}"], - ["277c", "\\ding{188}"], - ["277d", "\\ding{189}"], - ["277e", "\\ding{190}"], - ["277f", "\\ding{191}"], - ["2780", "\\ding{192}"], - ["2781", "\\ding{193}"], - ["2782", "\\ding{194}"], - ["2783", "\\ding{195}"], - ["2784", "\\ding{196}"], - ["2785", "\\ding{197}"], - ["2786", "\\ding{198}"], - ["2787", "\\ding{199}"], - ["2788", "\\ding{200}"], - ["2789", "\\ding{201}"], - ["278a", "\\ding{202}"], - ["278b", "\\ding{203}"], - ["278c", "\\ding{204}"], - ["278d", "\\ding{205}"], - ["278e", "\\ding{206}"], - ["278f", "\\ding{207}"], - ["2790", "\\ding{208}"], - ["2791", "\\ding{209}"], - ["2792", "\\ding{210}"], - ["2793", "\\ding{211}"], - ["2794", "\\ding{212}"], - ["2798", "\\ding{216}"], - ["2799", "\\ding{217}"], - ["279a", "\\ding{218}"], - ["279b", "\\ding{219}"], - ["279c", "\\ding{220}"], - ["279d", "\\ding{221}"], - ["279e", "\\ding{222}"], - ["279f", "\\ding{223}"], - ["27a0", "\\ding{224}"], - ["27a1", "\\ding{225}"], - ["27a2", "\\ding{226}"], - ["27a3", "\\ding{227}"], - ["27a4", "\\ding{228}"], - ["27a5", "\\ding{229}"], - ["27a6", "\\ding{230}"], - ["27a7", "\\ding{231}"], - ["27a8", "\\ding{232}"], - ["27a9", "\\ding{233}"], - ["27aa", "\\ding{234}"], - ["27ab", "\\ding{235}"], - ["27ac", "\\ding{236}"], - ["27ad", "\\ding{237}"], - ["27ae", "\\ding{238}"], - ["27af", "\\ding{239}"], - ["27b1", "\\ding{241}"], - ["27b2", "\\ding{242}"], - ["27b3", "\\ding{243}"], - ["27b4", "\\ding{244}"], - ["27b5", "\\ding{245}"], - ["27b6", "\\ding{246}"], - ["27b7", "\\ding{247}"], - ["27b8", "\\ding{248}"], - ["27b9", "\\ding{249}"], - ["27ba", "\\ding{250}"], - ["27bb", "\\ding{251}"], - ["27bc", "\\ding{252}"], - ["27bd", "\\ding{253}"], - ["27be", "\\ding{254}"], - ["27f5", "\\longleftarrow{}"], - ["27f6", "\\longrightarrow{}"], - ["27f7", "\\longleftrightarrow{}"], - ["27f8", "\\Longleftarrow{}"], - ["27f9", "\\Longrightarrow{}"], - ["27fa", "\\Longleftrightarrow{}"], - ["27fc", "\\longmapsto{}"], - ["27ff", "\\sim\\joinrel\\leadsto"], - ["2905", "\\ElsevierGlyph{E212}"], - ["2912", "\\UpArrowBar{}"], - ["2913", "\\DownArrowBar{}"], - ["2923", "\\ElsevierGlyph{E20C}"], - ["2924", "\\ElsevierGlyph{E20D}"], - ["2925", "\\ElsevierGlyph{E20B}"], - ["2926", "\\ElsevierGlyph{E20A}"], - ["2927", "\\ElsevierGlyph{E211}"], - ["2928", "\\ElsevierGlyph{E20E}"], - ["2929", "\\ElsevierGlyph{E20F}"], - ["292a", "\\ElsevierGlyph{E210}"], - ["2933", "\\ElsevierGlyph{E21C}"], - ["2936", "\\ElsevierGlyph{E21A}"], - ["2937", "\\ElsevierGlyph{E219}"], - ["2940", "\\Elolarr{}"], - ["2941", "\\Elorarr{}"], - ["2942", "\\ElzRlarr{}"], - ["2944", "\\ElzrLarr{}"], - ["2947", "\\Elzrarrx{}"], - ["294e", "\\LeftRightVector{}"], - ["294f", "\\RightUpDownVector{}"], - ["2950", "\\DownLeftRightVector{}"], - ["2951", "\\LeftUpDownVector{}"], - ["2952", "\\LeftVectorBar{}"], - ["2953", "\\RightVectorBar{}"], - ["2954", "\\RightUpVectorBar{}"], - ["2955", "\\RightDownVectorBar{}"], - ["2956", "\\DownLeftVectorBar{}"], - ["2957", "\\DownRightVectorBar{}"], - ["2958", "\\LeftUpVectorBar{}"], - ["2959", "\\LeftDownVectorBar{}"], - ["295a", "\\LeftTeeVector{}"], - ["295b", "\\RightTeeVector{}"], - ["295c", "\\RightUpTeeVector{}"], - ["295d", "\\RightDownTeeVector{}"], - ["295e", "\\DownLeftTeeVector{}"], - ["295f", "\\DownRightTeeVector{}"], - ["2960", "\\LeftUpTeeVector{}"], - ["2961", "\\LeftDownTeeVector{}"], - ["296e", "\\UpEquilibrium{}"], - ["296f", "\\ReverseUpEquilibrium{}"], - ["2970", "\\RoundImplies{}"], - ["297c", "\\ElsevierGlyph{E214}"], - ["297d", "\\ElsevierGlyph{E215}"], - ["2980", "\\Elztfnc{}"], - ["2985", "\\ElsevierGlyph{3018}"], - ["2986", "\\Elroang{}"], - ["2993", "<\\kern-0.58em("], - ["2994", "\\ElsevierGlyph{E291}"], - ["2999", "\\Elzddfnc{}"], - ["299c", "\\Angle{}"], - ["29a0", "\\Elzlpargt{}"], - ["29b5", "\\ElsevierGlyph{E260}"], - ["29b6", "\\ElsevierGlyph{E61B}"], - ["29ca", "\\ElzLap{}"], - ["29cb", "\\Elzdefas{}"], - ["29cf", "\\LeftTriangleBar{}"], - ["29d0", "\\RightTriangleBar{}"], - ["29dc", "\\ElsevierGlyph{E372}"], - ["29eb", "\\blacklozenge{}"], - ["29f4", "\\RuleDelayed{}"], - ["2a04", "\\Elxuplus{}"], - ["2a05", "\\ElzThr{}"], - ["2a06", "\\Elxsqcup{}"], - ["2a07", "\\ElzInf{}"], - ["2a08", "\\ElzSup{}"], - ["2a0d", "\\ElzCint{}"], - ["2a0f", "\\clockoint{}"], - ["2a10", "\\ElsevierGlyph{E395}"], - ["2a16", "\\sqrint{}"], - ["2a25", "\\ElsevierGlyph{E25A}"], - ["2a2a", "\\ElsevierGlyph{E25B}"], - ["2a2d", "\\ElsevierGlyph{E25C}"], - ["2a2e", "\\ElsevierGlyph{E25D}"], - ["2a2f", "\\ElzTimes{}"], - ["2a34", "\\ElsevierGlyph{E25E}"], - ["2a35", "\\ElsevierGlyph{E25E}"], - ["2a3c", "\\ElsevierGlyph{E259}"], - ["2a3f", "\\amalg{}"], - ["2a53", "\\ElzAnd{}"], - ["2a54", "\\ElzOr{}"], - ["2a55", "\\ElsevierGlyph{E36E}"], - ["2a56", "\\ElOr{}"], - ["2a5e", "\\perspcorrespond{}"], - ["2a5f", "\\Elzminhat{}"], - ["2a63", "\\ElsevierGlyph{225A}"], - ["2a6e", "\\stackrel{*}{=}"], - ["2a75", "\\Equal{}"], - ["2a7d", "\\leqslant{}"], - ["2a7e", "\\geqslant{}"], - ["2a85", "\\lessapprox{}"], - ["2a86", "\\gtrapprox{}"], - ["2a87", "\\lneq{}"], - ["2a88", "\\gneq{}"], - ["2a89", "\\lnapprox{}"], - ["2a8a", "\\gnapprox{}"], - ["2a8b", "\\lesseqqgtr{}"], - ["2a8c", "\\gtreqqless{}"], - ["2a95", "\\eqslantless{}"], - ["2a96", "\\eqslantgtr{}"], - ["2a9d", "\\Pisymbol{ppi020}{117}"], - ["2a9e", "\\Pisymbol{ppi020}{105}"], - ["2aa1", "\\NestedLessLess{}"], - ["2aa2", "\\NestedGreaterGreater{}"], - ["2aaf", "\\preceq{}"], - ["2ab0", "\\succeq{}"], - ["2ab5", "\\precneqq{}"], - ["2ab6", "\\succneqq{}"], - ["2ab7", "\\precapprox{}"], - ["2ab8", "\\succapprox{}"], - ["2ab9", "\\precnapprox{}"], - ["2aba", "\\succnapprox{}"], - ["2ac5", "\\subseteqq{}"], - ["2ac6", "\\supseteqq{}"], - ["2acb", "\\subsetneqq{}"], - ["2acc", "\\supsetneqq{}"], - ["2aeb", "\\ElsevierGlyph{E30D}"], - ["2af6", "\\Elztdcol{}"], - ["2afd", "{{/}\\!\\!{/}}"], - ["300a", "\\ElsevierGlyph{300A}"], - ["300b", "\\ElsevierGlyph{300B}"], - ["3018", "\\ElsevierGlyph{3018}"], - ["3019", "\\ElsevierGlyph{3019}"], - ["301a", "\\openbracketleft{}"], - ["301b", "\\openbracketright{}"], - ["fb00", "ff"], - ["fb01", "fi"], - ["fb02", "fl"], - ["fb03", "ffi"], - ["fb04", "ffl"], - ["d400", "\\mathbf{A}"], - ["d401", "\\mathbf{B}"], - ["d402", "\\mathbf{C}"], - ["d403", "\\mathbf{D}"], - ["d404", "\\mathbf{E}"], - ["d405", "\\mathbf{F}"], - ["d406", "\\mathbf{G}"], - ["d407", "\\mathbf{H}"], - ["d408", "\\mathbf{I}"], - ["d409", "\\mathbf{J}"], - ["d40a", "\\mathbf{K}"], - ["d40b", "\\mathbf{L}"], - ["d40c", "\\mathbf{M}"], - ["d40d", "\\mathbf{N}"], - ["d40e", "\\mathbf{O}"], - ["d40f", "\\mathbf{P}"], - ["d410", "\\mathbf{Q}"], - ["d411", "\\mathbf{R}"], - ["d412", "\\mathbf{S}"], - ["d413", "\\mathbf{T}"], - ["d414", "\\mathbf{U}"], - ["d415", "\\mathbf{V}"], - ["d416", "\\mathbf{W}"], - ["d417", "\\mathbf{X}"], - ["d418", "\\mathbf{Y}"], - ["d419", "\\mathbf{Z}"], - ["d41a", "\\mathbf{a}"], - ["d41b", "\\mathbf{b}"], - ["d41c", "\\mathbf{c}"], - ["d41d", "\\mathbf{d}"], - ["d41e", "\\mathbf{e}"], - ["d41f", "\\mathbf{f}"], - ["d420", "\\mathbf{g}"], - ["d421", "\\mathbf{h}"], - ["d422", "\\mathbf{i}"], - ["d423", "\\mathbf{j}"], - ["d424", "\\mathbf{k}"], - ["d425", "\\mathbf{l}"], - ["d426", "\\mathbf{m}"], - ["d427", "\\mathbf{n}"], - ["d428", "\\mathbf{o}"], - ["d429", "\\mathbf{p}"], - ["d42a", "\\mathbf{q}"], - ["d42b", "\\mathbf{r}"], - ["d42c", "\\mathbf{s}"], - ["d42d", "\\mathbf{t}"], - ["d42e", "\\mathbf{u}"], - ["d42f", "\\mathbf{v}"], - ["d430", "\\mathbf{w}"], - ["d431", "\\mathbf{x}"], - ["d432", "\\mathbf{y}"], - ["d433", "\\mathbf{z}"], - ["d434", "\\mathsl{A}"], - ["d435", "\\mathsl{B}"], - ["d436", "\\mathsl{C}"], - ["d437", "\\mathsl{D}"], - ["d438", "\\mathsl{E}"], - ["d439", "\\mathsl{F}"], - ["d43a", "\\mathsl{G}"], - ["d43b", "\\mathsl{H}"], - ["d43c", "\\mathsl{I}"], - ["d43d", "\\mathsl{J}"], - ["d43e", "\\mathsl{K}"], - ["d43f", "\\mathsl{L}"], - ["d440", "\\mathsl{M}"], - ["d441", "\\mathsl{N}"], - ["d442", "\\mathsl{O}"], - ["d443", "\\mathsl{P}"], - ["d444", "\\mathsl{Q}"], - ["d445", "\\mathsl{R}"], - ["d446", "\\mathsl{S}"], - ["d447", "\\mathsl{T}"], - ["d448", "\\mathsl{U}"], - ["d449", "\\mathsl{V}"], - ["d44a", "\\mathsl{W}"], - ["d44b", "\\mathsl{X}"], - ["d44c", "\\mathsl{Y}"], - ["d44d", "\\mathsl{Z}"], - ["d44e", "\\mathsl{a}"], - ["d44f", "\\mathsl{b}"], - ["d450", "\\mathsl{c}"], - ["d451", "\\mathsl{d}"], - ["d452", "\\mathsl{e}"], - ["d453", "\\mathsl{f}"], - ["d454", "\\mathsl{g}"], - ["d456", "\\mathsl{i}"], - ["d457", "\\mathsl{j}"], - ["d458", "\\mathsl{k}"], - ["d459", "\\mathsl{l}"], - ["d45a", "\\mathsl{m}"], - ["d45b", "\\mathsl{n}"], - ["d45c", "\\mathsl{o}"], - ["d45d", "\\mathsl{p}"], - ["d45e", "\\mathsl{q}"], - ["d45f", "\\mathsl{r}"], - ["d460", "\\mathsl{s}"], - ["d461", "\\mathsl{t}"], - ["d462", "\\mathsl{u}"], - ["d463", "\\mathsl{v}"], - ["d464", "\\mathsl{w}"], - ["d465", "\\mathsl{x}"], - ["d466", "\\mathsl{y}"], - ["d467", "\\mathsl{z}"], - ["d468", "\\mathbit{A}"], - ["d469", "\\mathbit{B}"], - ["d46a", "\\mathbit{C}"], - ["d46b", "\\mathbit{D}"], - ["d46c", "\\mathbit{E}"], - ["d46d", "\\mathbit{F}"], - ["d46e", "\\mathbit{G}"], - ["d46f", "\\mathbit{H}"], - ["d470", "\\mathbit{I}"], - ["d471", "\\mathbit{J}"], - ["d472", "\\mathbit{K}"], - ["d473", "\\mathbit{L}"], - ["d474", "\\mathbit{M}"], - ["d475", "\\mathbit{N}"], - ["d476", "\\mathbit{O}"], - ["d477", "\\mathbit{P}"], - ["d478", "\\mathbit{Q}"], - ["d479", "\\mathbit{R}"], - ["d47a", "\\mathbit{S}"], - ["d47b", "\\mathbit{T}"], - ["d47c", "\\mathbit{U}"], - ["d47d", "\\mathbit{V}"], - ["d47e", "\\mathbit{W}"], - ["d47f", "\\mathbit{X}"], - ["d480", "\\mathbit{Y}"], - ["d481", "\\mathbit{Z}"], - ["d482", "\\mathbit{a}"], - ["d483", "\\mathbit{b}"], - ["d484", "\\mathbit{c}"], - ["d485", "\\mathbit{d}"], - ["d486", "\\mathbit{e}"], - ["d487", "\\mathbit{f}"], - ["d488", "\\mathbit{g}"], - ["d489", "\\mathbit{h}"], - ["d48a", "\\mathbit{i}"], - ["d48b", "\\mathbit{j}"], - ["d48c", "\\mathbit{k}"], - ["d48d", "\\mathbit{l}"], - ["d48e", "\\mathbit{m}"], - ["d48f", "\\mathbit{n}"], - ["d490", "\\mathbit{o}"], - ["d491", "\\mathbit{p}"], - ["d492", "\\mathbit{q}"], - ["d493", "\\mathbit{r}"], - ["d494", "\\mathbit{s}"], - ["d495", "\\mathbit{t}"], - ["d496", "\\mathbit{u}"], - ["d497", "\\mathbit{v}"], - ["d498", "\\mathbit{w}"], - ["d499", "\\mathbit{x}"], - ["d49a", "\\mathbit{y}"], - ["d49b", "\\mathbit{z}"], - ["d49c", "\\mathscr{A}"], - ["d49e", "\\mathscr{C}"], - ["d49f", "\\mathscr{D}"], - ["d4a2", "\\mathscr{G}"], - ["d4a5", "\\mathscr{J}"], - ["d4a6", "\\mathscr{K}"], - ["d4a9", "\\mathscr{N}"], - ["d4aa", "\\mathscr{O}"], - ["d4ab", "\\mathscr{P}"], - ["d4ac", "\\mathscr{Q}"], - ["d4ae", "\\mathscr{S}"], - ["d4af", "\\mathscr{T}"], - ["d4b0", "\\mathscr{U}"], - ["d4b1", "\\mathscr{V}"], - ["d4b2", "\\mathscr{W}"], - ["d4b3", "\\mathscr{X}"], - ["d4b4", "\\mathscr{Y}"], - ["d4b5", "\\mathscr{Z}"], - ["d4b6", "\\mathscr{a}"], - ["d4b7", "\\mathscr{b}"], - ["d4b8", "\\mathscr{c}"], - ["d4b9", "\\mathscr{d}"], - ["d4bb", "\\mathscr{f}"], - ["d4bd", "\\mathscr{h}"], - ["d4be", "\\mathscr{i}"], - ["d4bf", "\\mathscr{j}"], - ["d4c0", "\\mathscr{k}"], - ["d4c1", "\\mathscr{l}"], - ["d4c2", "\\mathscr{m}"], - ["d4c3", "\\mathscr{n}"], - ["d4c5", "\\mathscr{p}"], - ["d4c6", "\\mathscr{q}"], - ["d4c7", "\\mathscr{r}"], - ["d4c8", "\\mathscr{s}"], - ["d4c9", "\\mathscr{t}"], - ["d4ca", "\\mathscr{u}"], - ["d4cb", "\\mathscr{v}"], - ["d4cc", "\\mathscr{w}"], - ["d4cd", "\\mathscr{x}"], - ["d4ce", "\\mathscr{y}"], - ["d4cf", "\\mathscr{z}"], - ["d4d0", "\\mathmit{A}"], - ["d4d1", "\\mathmit{B}"], - ["d4d2", "\\mathmit{C}"], - ["d4d3", "\\mathmit{D}"], - ["d4d4", "\\mathmit{E}"], - ["d4d5", "\\mathmit{F}"], - ["d4d6", "\\mathmit{G}"], - ["d4d7", "\\mathmit{H}"], - ["d4d8", "\\mathmit{I}"], - ["d4d9", "\\mathmit{J}"], - ["d4da", "\\mathmit{K}"], - ["d4db", "\\mathmit{L}"], - ["d4dc", "\\mathmit{M}"], - ["d4dd", "\\mathmit{N}"], - ["d4de", "\\mathmit{O}"], - ["d4df", "\\mathmit{P}"], - ["d4e0", "\\mathmit{Q}"], - ["d4e1", "\\mathmit{R}"], - ["d4e2", "\\mathmit{S}"], - ["d4e3", "\\mathmit{T}"], - ["d4e4", "\\mathmit{U}"], - ["d4e5", "\\mathmit{V}"], - ["d4e6", "\\mathmit{W}"], - ["d4e7", "\\mathmit{X}"], - ["d4e8", "\\mathmit{Y}"], - ["d4e9", "\\mathmit{Z}"], - ["d4ea", "\\mathmit{a}"], - ["d4eb", "\\mathmit{b}"], - ["d4ec", "\\mathmit{c}"], - ["d4ed", "\\mathmit{d}"], - ["d4ee", "\\mathmit{e}"], - ["d4ef", "\\mathmit{f}"], - ["d4f0", "\\mathmit{g}"], - ["d4f1", "\\mathmit{h}"], - ["d4f2", "\\mathmit{i}"], - ["d4f3", "\\mathmit{j}"], - ["d4f4", "\\mathmit{k}"], - ["d4f5", "\\mathmit{l}"], - ["d4f6", "\\mathmit{m}"], - ["d4f7", "\\mathmit{n}"], - ["d4f8", "\\mathmit{o}"], - ["d4f9", "\\mathmit{p}"], - ["d4fa", "\\mathmit{q}"], - ["d4fb", "\\mathmit{r}"], - ["d4fc", "\\mathmit{s}"], - ["d4fd", "\\mathmit{t}"], - ["d4fe", "\\mathmit{u}"], - ["d4ff", "\\mathmit{v}"], - ["d500", "\\mathmit{w}"], - ["d501", "\\mathmit{x}"], - ["d502", "\\mathmit{y}"], - ["d503", "\\mathmit{z}"], - ["d504", "\\mathfrak{A}"], - ["d505", "\\mathfrak{B}"], - ["d507", "\\mathfrak{D}"], - ["d508", "\\mathfrak{E}"], - ["d509", "\\mathfrak{F}"], - ["d50a", "\\mathfrak{G}"], - ["d50d", "\\mathfrak{J}"], - ["d50e", "\\mathfrak{K}"], - ["d50f", "\\mathfrak{L}"], - ["d510", "\\mathfrak{M}"], - ["d511", "\\mathfrak{N}"], - ["d512", "\\mathfrak{O}"], - ["d513", "\\mathfrak{P}"], - ["d514", "\\mathfrak{Q}"], - ["d516", "\\mathfrak{S}"], - ["d517", "\\mathfrak{T}"], - ["d518", "\\mathfrak{U}"], - ["d519", "\\mathfrak{V}"], - ["d51a", "\\mathfrak{W}"], - ["d51b", "\\mathfrak{X}"], - ["d51c", "\\mathfrak{Y}"], - ["d51e", "\\mathfrak{a}"], - ["d51f", "\\mathfrak{b}"], - ["d520", "\\mathfrak{c}"], - ["d521", "\\mathfrak{d}"], - ["d522", "\\mathfrak{e}"], - ["d523", "\\mathfrak{f}"], - ["d524", "\\mathfrak{g}"], - ["d525", "\\mathfrak{h}"], - ["d526", "\\mathfrak{i}"], - ["d527", "\\mathfrak{j}"], - ["d528", "\\mathfrak{k}"], - ["d529", "\\mathfrak{l}"], - ["d52a", "\\mathfrak{m}"], - ["d52b", "\\mathfrak{n}"], - ["d52c", "\\mathfrak{o}"], - ["d52d", "\\mathfrak{p}"], - ["d52e", "\\mathfrak{q}"], - ["d52f", "\\mathfrak{r}"], - ["d530", "\\mathfrak{s}"], - ["d531", "\\mathfrak{t}"], - ["d532", "\\mathfrak{u}"], - ["d533", "\\mathfrak{v}"], - ["d534", "\\mathfrak{w}"], - ["d535", "\\mathfrak{x}"], - ["d536", "\\mathfrak{y}"], - ["d537", "\\mathfrak{z}"], - ["d538", "\\mathbb{A}"], - ["d539", "\\mathbb{B}"], - ["d53b", "\\mathbb{D}"], - ["d53c", "\\mathbb{E}"], - ["d53d", "\\mathbb{F}"], - ["d53e", "\\mathbb{G}"], - ["d540", "\\mathbb{I}"], - ["d541", "\\mathbb{J}"], - ["d542", "\\mathbb{K}"], - ["d543", "\\mathbb{L}"], - ["d544", "\\mathbb{M}"], - ["d546", "\\mathbb{O}"], - ["d54a", "\\mathbb{S}"], - ["d54b", "\\mathbb{T}"], - ["d54c", "\\mathbb{U}"], - ["d54d", "\\mathbb{V}"], - ["d54e", "\\mathbb{W}"], - ["d54f", "\\mathbb{X}"], - ["d550", "\\mathbb{Y}"], - ["d552", "\\mathbb{a}"], - ["d553", "\\mathbb{b}"], - ["d554", "\\mathbb{c}"], - ["d555", "\\mathbb{d}"], - ["d556", "\\mathbb{e}"], - ["d557", "\\mathbb{f}"], - ["d558", "\\mathbb{g}"], - ["d559", "\\mathbb{h}"], - ["d55a", "\\mathbb{i}"], - ["d55b", "\\mathbb{j}"], - ["d55c", "\\mathbb{k}"], - ["d55d", "\\mathbb{l}"], - ["d55e", "\\mathbb{m}"], - ["d55f", "\\mathbb{n}"], - ["d560", "\\mathbb{o}"], - ["d561", "\\mathbb{p}"], - ["d562", "\\mathbb{q}"], - ["d563", "\\mathbb{r}"], - ["d564", "\\mathbb{s}"], - ["d565", "\\mathbb{t}"], - ["d566", "\\mathbb{u}"], - ["d567", "\\mathbb{v}"], - ["d568", "\\mathbb{w}"], - ["d569", "\\mathbb{x}"], - ["d56a", "\\mathbb{y}"], - ["d56b", "\\mathbb{z}"], - ["d56c", "\\mathslbb{A}"], - ["d56d", "\\mathslbb{B}"], - ["d56e", "\\mathslbb{C}"], - ["d56f", "\\mathslbb{D}"], - ["d570", "\\mathslbb{E}"], - ["d571", "\\mathslbb{F}"], - ["d572", "\\mathslbb{G}"], - ["d573", "\\mathslbb{H}"], - ["d574", "\\mathslbb{I}"], - ["d575", "\\mathslbb{J}"], - ["d576", "\\mathslbb{K}"], - ["d577", "\\mathslbb{L}"], - ["d578", "\\mathslbb{M}"], - ["d579", "\\mathslbb{N}"], - ["d57a", "\\mathslbb{O}"], - ["d57b", "\\mathslbb{P}"], - ["d57c", "\\mathslbb{Q}"], - ["d57d", "\\mathslbb{R}"], - ["d57e", "\\mathslbb{S}"], - ["d57f", "\\mathslbb{T}"], - ["d580", "\\mathslbb{U}"], - ["d581", "\\mathslbb{V}"], - ["d582", "\\mathslbb{W}"], - ["d583", "\\mathslbb{X}"], - ["d584", "\\mathslbb{Y}"], - ["d585", "\\mathslbb{Z}"], - ["d586", "\\mathslbb{a}"], - ["d587", "\\mathslbb{b}"], - ["d588", "\\mathslbb{c}"], - ["d589", "\\mathslbb{d}"], - ["d58a", "\\mathslbb{e}"], - ["d58b", "\\mathslbb{f}"], - ["d58c", "\\mathslbb{g}"], - ["d58d", "\\mathslbb{h}"], - ["d58e", "\\mathslbb{i}"], - ["d58f", "\\mathslbb{j}"], - ["d590", "\\mathslbb{k}"], - ["d591", "\\mathslbb{l}"], - ["d592", "\\mathslbb{m}"], - ["d593", "\\mathslbb{n}"], - ["d594", "\\mathslbb{o}"], - ["d595", "\\mathslbb{p}"], - ["d596", "\\mathslbb{q}"], - ["d597", "\\mathslbb{r}"], - ["d598", "\\mathslbb{s}"], - ["d599", "\\mathslbb{t}"], - ["d59a", "\\mathslbb{u}"], - ["d59b", "\\mathslbb{v}"], - ["d59c", "\\mathslbb{w}"], - ["d59d", "\\mathslbb{x}"], - ["d59e", "\\mathslbb{y}"], - ["d59f", "\\mathslbb{z}"], - ["d5a0", "\\mathsf{A}"], - ["d5a1", "\\mathsf{B}"], - ["d5a2", "\\mathsf{C}"], - ["d5a3", "\\mathsf{D}"], - ["d5a4", "\\mathsf{E}"], - ["d5a5", "\\mathsf{F}"], - ["d5a6", "\\mathsf{G}"], - ["d5a7", "\\mathsf{H}"], - ["d5a8", "\\mathsf{I}"], - ["d5a9", "\\mathsf{J}"], - ["d5aa", "\\mathsf{K}"], - ["d5ab", "\\mathsf{L}"], - ["d5ac", "\\mathsf{M}"], - ["d5ad", "\\mathsf{N}"], - ["d5ae", "\\mathsf{O}"], - ["d5af", "\\mathsf{P}"], - ["d5b0", "\\mathsf{Q}"], - ["d5b1", "\\mathsf{R}"], - ["d5b2", "\\mathsf{S}"], - ["d5b3", "\\mathsf{T}"], - ["d5b4", "\\mathsf{U}"], - ["d5b5", "\\mathsf{V}"], - ["d5b6", "\\mathsf{W}"], - ["d5b7", "\\mathsf{X}"], - ["d5b8", "\\mathsf{Y}"], - ["d5b9", "\\mathsf{Z}"], - ["d5ba", "\\mathsf{a}"], - ["d5bb", "\\mathsf{b}"], - ["d5bc", "\\mathsf{c}"], - ["d5bd", "\\mathsf{d}"], - ["d5be", "\\mathsf{e}"], - ["d5bf", "\\mathsf{f}"], - ["d5c0", "\\mathsf{g}"], - ["d5c1", "\\mathsf{h}"], - ["d5c2", "\\mathsf{i}"], - ["d5c3", "\\mathsf{j}"], - ["d5c4", "\\mathsf{k}"], - ["d5c5", "\\mathsf{l}"], - ["d5c6", "\\mathsf{m}"], - ["d5c7", "\\mathsf{n}"], - ["d5c8", "\\mathsf{o}"], - ["d5c9", "\\mathsf{p}"], - ["d5ca", "\\mathsf{q}"], - ["d5cb", "\\mathsf{r}"], - ["d5cc", "\\mathsf{s}"], - ["d5cd", "\\mathsf{t}"], - ["d5ce", "\\mathsf{u}"], - ["d5cf", "\\mathsf{v}"], - ["d5d0", "\\mathsf{w}"], - ["d5d1", "\\mathsf{x}"], - ["d5d2", "\\mathsf{y}"], - ["d5d3", "\\mathsf{z}"], - ["d5d4", "\\mathsfbf{A}"], - ["d5d5", "\\mathsfbf{B}"], - ["d5d6", "\\mathsfbf{C}"], - ["d5d7", "\\mathsfbf{D}"], - ["d5d8", "\\mathsfbf{E}"], - ["d5d9", "\\mathsfbf{F}"], - ["d5da", "\\mathsfbf{G}"], - ["d5db", "\\mathsfbf{H}"], - ["d5dc", "\\mathsfbf{I}"], - ["d5dd", "\\mathsfbf{J}"], - ["d5de", "\\mathsfbf{K}"], - ["d5df", "\\mathsfbf{L}"], - ["d5e0", "\\mathsfbf{M}"], - ["d5e1", "\\mathsfbf{N}"], - ["d5e2", "\\mathsfbf{O}"], - ["d5e3", "\\mathsfbf{P}"], - ["d5e4", "\\mathsfbf{Q}"], - ["d5e5", "\\mathsfbf{R}"], - ["d5e6", "\\mathsfbf{S}"], - ["d5e7", "\\mathsfbf{T}"], - ["d5e8", "\\mathsfbf{U}"], - ["d5e9", "\\mathsfbf{V}"], - ["d5ea", "\\mathsfbf{W}"], - ["d5eb", "\\mathsfbf{X}"], - ["d5ec", "\\mathsfbf{Y}"], - ["d5ed", "\\mathsfbf{Z}"], - ["d5ee", "\\mathsfbf{a}"], - ["d5ef", "\\mathsfbf{b}"], - ["d5f0", "\\mathsfbf{c}"], - ["d5f1", "\\mathsfbf{d}"], - ["d5f2", "\\mathsfbf{e}"], - ["d5f3", "\\mathsfbf{f}"], - ["d5f4", "\\mathsfbf{g}"], - ["d5f5", "\\mathsfbf{h}"], - ["d5f6", "\\mathsfbf{i}"], - ["d5f7", "\\mathsfbf{j}"], - ["d5f8", "\\mathsfbf{k}"], - ["d5f9", "\\mathsfbf{l}"], - ["d5fa", "\\mathsfbf{m}"], - ["d5fb", "\\mathsfbf{n}"], - ["d5fc", "\\mathsfbf{o}"], - ["d5fd", "\\mathsfbf{p}"], - ["d5fe", "\\mathsfbf{q}"], - ["d5ff", "\\mathsfbf{r}"], - ["d600", "\\mathsfbf{s}"], - ["d601", "\\mathsfbf{t}"], - ["d602", "\\mathsfbf{u}"], - ["d603", "\\mathsfbf{v}"], - ["d604", "\\mathsfbf{w}"], - ["d605", "\\mathsfbf{x}"], - ["d606", "\\mathsfbf{y}"], - ["d607", "\\mathsfbf{z}"], - ["d608", "\\mathsfsl{A}"], - ["d609", "\\mathsfsl{B}"], - ["d60a", "\\mathsfsl{C}"], - ["d60b", "\\mathsfsl{D}"], - ["d60c", "\\mathsfsl{E}"], - ["d60d", "\\mathsfsl{F}"], - ["d60e", "\\mathsfsl{G}"], - ["d60f", "\\mathsfsl{H}"], - ["d610", "\\mathsfsl{I}"], - ["d611", "\\mathsfsl{J}"], - ["d612", "\\mathsfsl{K}"], - ["d613", "\\mathsfsl{L}"], - ["d614", "\\mathsfsl{M}"], - ["d615", "\\mathsfsl{N}"], - ["d616", "\\mathsfsl{O}"], - ["d617", "\\mathsfsl{P}"], - ["d618", "\\mathsfsl{Q}"], - ["d619", "\\mathsfsl{R}"], - ["d61a", "\\mathsfsl{S}"], - ["d61b", "\\mathsfsl{T}"], - ["d61c", "\\mathsfsl{U}"], - ["d61d", "\\mathsfsl{V}"], - ["d61e", "\\mathsfsl{W}"], - ["d61f", "\\mathsfsl{X}"], - ["d620", "\\mathsfsl{Y}"], - ["d621", "\\mathsfsl{Z}"], - ["d622", "\\mathsfsl{a}"], - ["d623", "\\mathsfsl{b}"], - ["d624", "\\mathsfsl{c}"], - ["d625", "\\mathsfsl{d}"], - ["d626", "\\mathsfsl{e}"], - ["d627", "\\mathsfsl{f}"], - ["d628", "\\mathsfsl{g}"], - ["d629", "\\mathsfsl{h}"], - ["d62a", "\\mathsfsl{i}"], - ["d62b", "\\mathsfsl{j}"], - ["d62c", "\\mathsfsl{k}"], - ["d62d", "\\mathsfsl{l}"], - ["d62e", "\\mathsfsl{m}"], - ["d62f", "\\mathsfsl{n}"], - ["d630", "\\mathsfsl{o}"], - ["d631", "\\mathsfsl{p}"], - ["d632", "\\mathsfsl{q}"], - ["d633", "\\mathsfsl{r}"], - ["d634", "\\mathsfsl{s}"], - ["d635", "\\mathsfsl{t}"], - ["d636", "\\mathsfsl{u}"], - ["d637", "\\mathsfsl{v}"], - ["d638", "\\mathsfsl{w}"], - ["d639", "\\mathsfsl{x}"], - ["d63a", "\\mathsfsl{y}"], - ["d63b", "\\mathsfsl{z}"], - ["d63c", "\\mathsfbfsl{A}"], - ["d63d", "\\mathsfbfsl{B}"], - ["d63e", "\\mathsfbfsl{C}"], - ["d63f", "\\mathsfbfsl{D}"], - ["d640", "\\mathsfbfsl{E}"], - ["d641", "\\mathsfbfsl{F}"], - ["d642", "\\mathsfbfsl{G}"], - ["d643", "\\mathsfbfsl{H}"], - ["d644", "\\mathsfbfsl{I}"], - ["d645", "\\mathsfbfsl{J}"], - ["d646", "\\mathsfbfsl{K}"], - ["d647", "\\mathsfbfsl{L}"], - ["d648", "\\mathsfbfsl{M}"], - ["d649", "\\mathsfbfsl{N}"], - ["d64a", "\\mathsfbfsl{O}"], - ["d64b", "\\mathsfbfsl{P}"], - ["d64c", "\\mathsfbfsl{Q}"], - ["d64d", "\\mathsfbfsl{R}"], - ["d64e", "\\mathsfbfsl{S}"], - ["d64f", "\\mathsfbfsl{T}"], - ["d650", "\\mathsfbfsl{U}"], - ["d651", "\\mathsfbfsl{V}"], - ["d652", "\\mathsfbfsl{W}"], - ["d653", "\\mathsfbfsl{X}"], - ["d654", "\\mathsfbfsl{Y}"], - ["d655", "\\mathsfbfsl{Z}"], - ["d656", "\\mathsfbfsl{a}"], - ["d657", "\\mathsfbfsl{b}"], - ["d658", "\\mathsfbfsl{c}"], - ["d659", "\\mathsfbfsl{d}"], - ["d65a", "\\mathsfbfsl{e}"], - ["d65b", "\\mathsfbfsl{f}"], - ["d65c", "\\mathsfbfsl{g}"], - ["d65d", "\\mathsfbfsl{h}"], - ["d65e", "\\mathsfbfsl{i}"], - ["d65f", "\\mathsfbfsl{j}"], - ["d660", "\\mathsfbfsl{k}"], - ["d661", "\\mathsfbfsl{l}"], - ["d662", "\\mathsfbfsl{m}"], - ["d663", "\\mathsfbfsl{n}"], - ["d664", "\\mathsfbfsl{o}"], - ["d665", "\\mathsfbfsl{p}"], - ["d666", "\\mathsfbfsl{q}"], - ["d667", "\\mathsfbfsl{r}"], - ["d668", "\\mathsfbfsl{s}"], - ["d669", "\\mathsfbfsl{t}"], - ["d66a", "\\mathsfbfsl{u}"], - ["d66b", "\\mathsfbfsl{v}"], - ["d66c", "\\mathsfbfsl{w}"], - ["d66d", "\\mathsfbfsl{x}"], - ["d66e", "\\mathsfbfsl{y}"], - ["d66f", "\\mathsfbfsl{z}"], - ["d670", "\\mathtt{A}"], - ["d671", "\\mathtt{B}"], - ["d672", "\\mathtt{C}"], - ["d673", "\\mathtt{D}"], - ["d674", "\\mathtt{E}"], - ["d675", "\\mathtt{F}"], - ["d676", "\\mathtt{G}"], - ["d677", "\\mathtt{H}"], - ["d678", "\\mathtt{I}"], - ["d679", "\\mathtt{J}"], - ["d67a", "\\mathtt{K}"], - ["d67b", "\\mathtt{L}"], - ["d67c", "\\mathtt{M}"], - ["d67d", "\\mathtt{N}"], - ["d67e", "\\mathtt{O}"], - ["d67f", "\\mathtt{P}"], - ["d680", "\\mathtt{Q}"], - ["d681", "\\mathtt{R}"], - ["d682", "\\mathtt{S}"], - ["d683", "\\mathtt{T}"], - ["d684", "\\mathtt{U}"], - ["d685", "\\mathtt{V}"], - ["d686", "\\mathtt{W}"], - ["d687", "\\mathtt{X}"], - ["d688", "\\mathtt{Y}"], - ["d689", "\\mathtt{Z}"], - ["d68a", "\\mathtt{a}"], - ["d68b", "\\mathtt{b}"], - ["d68c", "\\mathtt{c}"], - ["d68d", "\\mathtt{d}"], - ["d68e", "\\mathtt{e}"], - ["d68f", "\\mathtt{f}"], - ["d690", "\\mathtt{g}"], - ["d691", "\\mathtt{h}"], - ["d692", "\\mathtt{i}"], - ["d693", "\\mathtt{j}"], - ["d694", "\\mathtt{k}"], - ["d695", "\\mathtt{l}"], - ["d696", "\\mathtt{m}"], - ["d697", "\\mathtt{n}"], - ["d698", "\\mathtt{o}"], - ["d699", "\\mathtt{p}"], - ["d69a", "\\mathtt{q}"], - ["d69b", "\\mathtt{r}"], - ["d69c", "\\mathtt{s}"], - ["d69d", "\\mathtt{t}"], - ["d69e", "\\mathtt{u}"], - ["d69f", "\\mathtt{v}"], - ["d6a0", "\\mathtt{w}"], - ["d6a1", "\\mathtt{x}"], - ["d6a2", "\\mathtt{y}"], - ["d6a3", "\\mathtt{z}"], - ["d6a8", "\\mathbf{\\Alpha}"], - ["d6a9", "\\mathbf{\\Beta}"], - ["d6aa", "\\mathbf{\\Gamma}"], - ["d6ab", "\\mathbf{\\Delta}"], - ["d6ac", "\\mathbf{\\Epsilon}"], - ["d6ad", "\\mathbf{\\Zeta}"], - ["d6ae", "\\mathbf{\\Eta}"], - ["d6af", "\\mathbf{\\Theta}"], - ["d6b0", "\\mathbf{\\Iota}"], - ["d6b1", "\\mathbf{\\Kappa}"], - ["d6b2", "\\mathbf{\\Lambda}"], - ["d6b5", "\\mathbf{\\Xi}"], - ["d6b7", "\\mathbf{\\Pi}"], - ["d6b8", "\\mathbf{\\Rho}"], - ["d6b9", "\\mathbf{\\vartheta}"], - ["d6ba", "\\mathbf{\\Sigma}"], - ["d6bb", "\\mathbf{\\Tau}"], - ["d6bc", "\\mathbf{\\Upsilon}"], - ["d6bd", "\\mathbf{\\Phi}"], - ["d6be", "\\mathbf{\\Chi}"], - ["d6bf", "\\mathbf{\\Psi}"], - ["d6c0", "\\mathbf{\\Omega}"], - ["d6c1", "\\mathbf{\\nabla}"], - ["d6c2", "\\mathbf{\\Alpha}"], - ["d6c3", "\\mathbf{\\Beta}"], - ["d6c4", "\\mathbf{\\Gamma}"], - ["d6c5", "\\mathbf{\\Delta}"], - ["d6c6", "\\mathbf{\\Epsilon}"], - ["d6c7", "\\mathbf{\\Zeta}"], - ["d6c8", "\\mathbf{\\Eta}"], - ["d6c9", "\\mathbf{\\theta}"], - ["d6ca", "\\mathbf{\\Iota}"], - ["d6cb", "\\mathbf{\\Kappa}"], - ["d6cc", "\\mathbf{\\Lambda}"], - ["d6cf", "\\mathbf{\\Xi}"], - ["d6d1", "\\mathbf{\\Pi}"], - ["d6d2", "\\mathbf{\\Rho}"], - ["d6d3", "\\mathbf{\\varsigma}"], - ["d6d4", "\\mathbf{\\Sigma}"], - ["d6d5", "\\mathbf{\\Tau}"], - ["d6d6", "\\mathbf{\\Upsilon}"], - ["d6d7", "\\mathbf{\\Phi}"], - ["d6d8", "\\mathbf{\\Chi}"], - ["d6d9", "\\mathbf{\\Psi}"], - ["d6da", "\\mathbf{\\Omega}"], - ["d6db", "\\partial{}"], - ["d6dc", "\\in"], - ["d6dd", "\\mathbf{\\vartheta}"], - ["d6de", "\\mathbf{\\varkappa}"], - ["d6df", "\\mathbf{\\phi}"], - ["d6e0", "\\mathbf{\\varrho}"], - ["d6e1", "\\mathbf{\\varpi}"], - ["d6e2", "\\mathsl{\\Alpha}"], - ["d6e3", "\\mathsl{\\Beta}"], - ["d6e4", "\\mathsl{\\Gamma}"], - ["d6e5", "\\mathsl{\\Delta}"], - ["d6e6", "\\mathsl{\\Epsilon}"], - ["d6e7", "\\mathsl{\\Zeta}"], - ["d6e8", "\\mathsl{\\Eta}"], - ["d6e9", "\\mathsl{\\Theta}"], - ["d6ea", "\\mathsl{\\Iota}"], - ["d6eb", "\\mathsl{\\Kappa}"], - ["d6ec", "\\mathsl{\\Lambda}"], - ["d6ef", "\\mathsl{\\Xi}"], - ["d6f1", "\\mathsl{\\Pi}"], - ["d6f2", "\\mathsl{\\Rho}"], - ["d6f3", "\\mathsl{\\vartheta}"], - ["d6f4", "\\mathsl{\\Sigma}"], - ["d6f5", "\\mathsl{\\Tau}"], - ["d6f6", "\\mathsl{\\Upsilon}"], - ["d6f7", "\\mathsl{\\Phi}"], - ["d6f8", "\\mathsl{\\Chi}"], - ["d6f9", "\\mathsl{\\Psi}"], - ["d6fa", "\\mathsl{\\Omega}"], - ["d6fb", "\\mathsl{\\nabla}"], - ["d6fc", "\\mathsl{\\Alpha}"], - ["d6fd", "\\mathsl{\\Beta}"], - ["d6fe", "\\mathsl{\\Gamma}"], - ["d6ff", "\\mathsl{\\Delta}"], - ["d700", "\\mathsl{\\Epsilon}"], - ["d701", "\\mathsl{\\Zeta}"], - ["d702", "\\mathsl{\\Eta}"], - ["d703", "\\mathsl{\\Theta}"], - ["d704", "\\mathsl{\\Iota}"], - ["d705", "\\mathsl{\\Kappa}"], - ["d706", "\\mathsl{\\Lambda}"], - ["d709", "\\mathsl{\\Xi}"], - ["d70b", "\\mathsl{\\Pi}"], - ["d70c", "\\mathsl{\\Rho}"], - ["d70d", "\\mathsl{\\varsigma}"], - ["d70e", "\\mathsl{\\Sigma}"], - ["d70f", "\\mathsl{\\Tau}"], - ["d710", "\\mathsl{\\Upsilon}"], - ["d711", "\\mathsl{\\Phi}"], - ["d712", "\\mathsl{\\Chi}"], - ["d713", "\\mathsl{\\Psi}"], - ["d714", "\\mathsl{\\Omega}"], - ["d715", "\\partial{}"], - ["d716", "\\in"], - ["d717", "\\mathsl{\\vartheta}"], - ["d718", "\\mathsl{\\varkappa}"], - ["d719", "\\mathsl{\\phi}"], - ["d71a", "\\mathsl{\\varrho}"], - ["d71b", "\\mathsl{\\varpi}"], - ["d71c", "\\mathbit{\\Alpha}"], - ["d71d", "\\mathbit{\\Beta}"], - ["d71e", "\\mathbit{\\Gamma}"], - ["d71f", "\\mathbit{\\Delta}"], - ["d720", "\\mathbit{\\Epsilon}"], - ["d721", "\\mathbit{\\Zeta}"], - ["d722", "\\mathbit{\\Eta}"], - ["d723", "\\mathbit{\\Theta}"], - ["d724", "\\mathbit{\\Iota}"], - ["d725", "\\mathbit{\\Kappa}"], - ["d726", "\\mathbit{\\Lambda}"], - ["d729", "\\mathbit{\\Xi}"], - ["d72b", "\\mathbit{\\Pi}"], - ["d72c", "\\mathbit{\\Rho}"], - ["d72d", "\\mathbit{O}"], - ["d72e", "\\mathbit{\\Sigma}"], - ["d72f", "\\mathbit{\\Tau}"], - ["d730", "\\mathbit{\\Upsilon}"], - ["d731", "\\mathbit{\\Phi}"], - ["d732", "\\mathbit{\\Chi}"], - ["d733", "\\mathbit{\\Psi}"], - ["d734", "\\mathbit{\\Omega}"], - ["d735", "\\mathbit{\\nabla}"], - ["d736", "\\mathbit{\\Alpha}"], - ["d737", "\\mathbit{\\Beta}"], - ["d738", "\\mathbit{\\Gamma}"], - ["d739", "\\mathbit{\\Delta}"], - ["d73a", "\\mathbit{\\Epsilon}"], - ["d73b", "\\mathbit{\\Zeta}"], - ["d73c", "\\mathbit{\\Eta}"], - ["d73d", "\\mathbit{\\Theta}"], - ["d73e", "\\mathbit{\\Iota}"], - ["d73f", "\\mathbit{\\Kappa}"], - ["d740", "\\mathbit{\\Lambda}"], - ["d743", "\\mathbit{\\Xi}"], - ["d745", "\\mathbit{\\Pi}"], - ["d746", "\\mathbit{\\Rho}"], - ["d747", "\\mathbit{\\varsigma}"], - ["d748", "\\mathbit{\\Sigma}"], - ["d749", "\\mathbit{\\Tau}"], - ["d74a", "\\mathbit{\\Upsilon}"], - ["d74b", "\\mathbit{\\Phi}"], - ["d74c", "\\mathbit{\\Chi}"], - ["d74d", "\\mathbit{\\Psi}"], - ["d74e", "\\mathbit{\\Omega}"], - ["d74f", "\\partial{}"], - ["d750", "\\in"], - ["d751", "\\mathbit{\\vartheta}"], - ["d752", "\\mathbit{\\varkappa}"], - ["d753", "\\mathbit{\\phi}"], - ["d754", "\\mathbit{\\varrho}"], - ["d755", "\\mathbit{\\varpi}"], - ["d756", "\\mathsfbf{\\Alpha}"], - ["d757", "\\mathsfbf{\\Beta}"], - ["d758", "\\mathsfbf{\\Gamma}"], - ["d759", "\\mathsfbf{\\Delta}"], - ["d75a", "\\mathsfbf{\\Epsilon}"], - ["d75b", "\\mathsfbf{\\Zeta}"], - ["d75c", "\\mathsfbf{\\Eta}"], - ["d75d", "\\mathsfbf{\\Theta}"], - ["d75e", "\\mathsfbf{\\Iota}"], - ["d75f", "\\mathsfbf{\\Kappa}"], - ["d760", "\\mathsfbf{\\Lambda}"], - ["d763", "\\mathsfbf{\\Xi}"], - ["d765", "\\mathsfbf{\\Pi}"], - ["d766", "\\mathsfbf{\\Rho}"], - ["d767", "\\mathsfbf{\\vartheta}"], - ["d768", "\\mathsfbf{\\Sigma}"], - ["d769", "\\mathsfbf{\\Tau}"], - ["d76a", "\\mathsfbf{\\Upsilon}"], - ["d76b", "\\mathsfbf{\\Phi}"], - ["d76c", "\\mathsfbf{\\Chi}"], - ["d76d", "\\mathsfbf{\\Psi}"], - ["d76e", "\\mathsfbf{\\Omega}"], - ["d76f", "\\mathsfbf{\\nabla}"], - ["d770", "\\mathsfbf{\\Alpha}"], - ["d771", "\\mathsfbf{\\Beta}"], - ["d772", "\\mathsfbf{\\Gamma}"], - ["d773", "\\mathsfbf{\\Delta}"], - ["d774", "\\mathsfbf{\\Epsilon}"], - ["d775", "\\mathsfbf{\\Zeta}"], - ["d776", "\\mathsfbf{\\Eta}"], - ["d777", "\\mathsfbf{\\Theta}"], - ["d778", "\\mathsfbf{\\Iota}"], - ["d779", "\\mathsfbf{\\Kappa}"], - ["d77a", "\\mathsfbf{\\Lambda}"], - ["d77d", "\\mathsfbf{\\Xi}"], - ["d77f", "\\mathsfbf{\\Pi}"], - ["d780", "\\mathsfbf{\\Rho}"], - ["d781", "\\mathsfbf{\\varsigma}"], - ["d782", "\\mathsfbf{\\Sigma}"], - ["d783", "\\mathsfbf{\\Tau}"], - ["d784", "\\mathsfbf{\\Upsilon}"], - ["d785", "\\mathsfbf{\\Phi}"], - ["d786", "\\mathsfbf{\\Chi}"], - ["d787", "\\mathsfbf{\\Psi}"], - ["d788", "\\mathsfbf{\\Omega}"], - ["d789", "\\partial{}"], - ["d78a", "\\in"], - ["d78b", "\\mathsfbf{\\vartheta}"], - ["d78c", "\\mathsfbf{\\varkappa}"], - ["d78d", "\\mathsfbf{\\phi}"], - ["d78e", "\\mathsfbf{\\varrho}"], - ["d78f", "\\mathsfbf{\\varpi}"], - ["d790", "\\mathsfbfsl{\\Alpha}"], - ["d791", "\\mathsfbfsl{\\Beta}"], - ["d792", "\\mathsfbfsl{\\Gamma}"], - ["d793", "\\mathsfbfsl{\\Delta}"], - ["d794", "\\mathsfbfsl{\\Epsilon}"], - ["d795", "\\mathsfbfsl{\\Zeta}"], - ["d796", "\\mathsfbfsl{\\Eta}"], - ["d797", "\\mathsfbfsl{\\vartheta}"], - ["d798", "\\mathsfbfsl{\\Iota}"], - ["d799", "\\mathsfbfsl{\\Kappa}"], - ["d79a", "\\mathsfbfsl{\\Lambda}"], - ["d79d", "\\mathsfbfsl{\\Xi}"], - ["d79f", "\\mathsfbfsl{\\Pi}"], - ["d7a0", "\\mathsfbfsl{\\Rho}"], - ["d7a1", "\\mathsfbfsl{\\vartheta}"], - ["d7a2", "\\mathsfbfsl{\\Sigma}"], - ["d7a3", "\\mathsfbfsl{\\Tau}"], - ["d7a4", "\\mathsfbfsl{\\Upsilon}"], - ["d7a5", "\\mathsfbfsl{\\Phi}"], - ["d7a6", "\\mathsfbfsl{\\Chi}"], - ["d7a7", "\\mathsfbfsl{\\Psi}"], - ["d7a8", "\\mathsfbfsl{\\Omega}"], - ["d7a9", "\\mathsfbfsl{\\nabla}"], - ["d7aa", "\\mathsfbfsl{\\Alpha}"], - ["d7ab", "\\mathsfbfsl{\\Beta}"], - ["d7ac", "\\mathsfbfsl{\\Gamma}"], - ["d7ad", "\\mathsfbfsl{\\Delta}"], - ["d7ae", "\\mathsfbfsl{\\Epsilon}"], - ["d7af", "\\mathsfbfsl{\\Zeta}"], - ["d7b0", "\\mathsfbfsl{\\Eta}"], - ["d7b1", "\\mathsfbfsl{\\vartheta}"], - ["d7b2", "\\mathsfbfsl{\\Iota}"], - ["d7b3", "\\mathsfbfsl{\\Kappa}"], - ["d7b4", "\\mathsfbfsl{\\Lambda}"], - ["d7b7", "\\mathsfbfsl{\\Xi}"], - ["d7b9", "\\mathsfbfsl{\\Pi}"], - ["d7ba", "\\mathsfbfsl{\\Rho}"], - ["d7bb", "\\mathsfbfsl{\\varsigma}"], - ["d7bc", "\\mathsfbfsl{\\Sigma}"], - ["d7bd", "\\mathsfbfsl{\\Tau}"], - ["d7be", "\\mathsfbfsl{\\Upsilon}"], - ["d7bf", "\\mathsfbfsl{\\Phi}"], - ["d7c0", "\\mathsfbfsl{\\Chi}"], - ["d7c1", "\\mathsfbfsl{\\Psi}"], - ["d7c2", "\\mathsfbfsl{\\Omega}"], - ["d7c3", "\\partial{}"], - ["d7c4", "\\in"], - ["d7c5", "\\mathsfbfsl{\\vartheta}"], - ["d7c6", "\\mathsfbfsl{\\varkappa}"], - ["d7c7", "\\mathsfbfsl{\\phi}"], - ["d7c8", "\\mathsfbfsl{\\varrho}"], - ["d7c9", "\\mathsfbfsl{\\varpi}"], - ["d7ce", "\\mathbf{0}"], - ["d7cf", "\\mathbf{1}"], - ["d7d0", "\\mathbf{2}"], - ["d7d1", "\\mathbf{3}"], - ["d7d2", "\\mathbf{4}"], - ["d7d3", "\\mathbf{5}"], - ["d7d4", "\\mathbf{6}"], - ["d7d5", "\\mathbf{7}"], - ["d7d6", "\\mathbf{8}"], - ["d7d7", "\\mathbf{9}"], - ["d7d8", "\\mathbb{0}"], - ["d7d9", "\\mathbb{1}"], - ["d7da", "\\mathbb{2}"], - ["d7db", "\\mathbb{3}"], - ["d7dc", "\\mathbb{4}"], - ["d7dd", "\\mathbb{5}"], - ["d7de", "\\mathbb{6}"], - ["d7df", "\\mathbb{7}"], - ["d7e0", "\\mathbb{8}"], - ["d7e1", "\\mathbb{9}"], - ["d7e2", "\\mathsf{0}"], - ["d7e3", "\\mathsf{1}"], - ["d7e4", "\\mathsf{2}"], - ["d7e5", "\\mathsf{3}"], - ["d7e6", "\\mathsf{4}"], - ["d7e7", "\\mathsf{5}"], - ["d7e8", "\\mathsf{6}"], - ["d7e9", "\\mathsf{7}"], - ["d7ea", "\\mathsf{8}"], - ["d7eb", "\\mathsf{9}"], - ["d7ec", "\\mathsfbf{0}"], - ["d7ed", "\\mathsfbf{1}"], - ["d7ee", "\\mathsfbf{2}"], - ["d7ef", "\\mathsfbf{3}"], - ["d7f0", "\\mathsfbf{4}"], - ["d7f1", "\\mathsfbf{5}"], - ["d7f2", "\\mathsfbf{6}"], - ["d7f3", "\\mathsfbf{7}"], - ["d7f4", "\\mathsfbf{8}"], - ["d7f5", "\\mathsfbf{9}"], - ["d7f6", "\\mathtt{0}"], - ["d7f7", "\\mathtt{1}"], - ["d7f8", "\\mathtt{2}"], - ["d7f9", "\\mathtt{3}"], - ["d7fa", "\\mathtt{4}"], - ["d7fb", "\\mathtt{5}"], - ["d7fc", "\\mathtt{6}"], - ["d7fd", "\\mathtt{7}"], - ["d7fe", "\\mathtt{8}"], - ["d7ff", "\\mathtt{9}"] -]); - // src/utils.ts -function escapeSpecialCharacters(str) { - let result = str; - const mathExpressions = []; - result = result.replace(/\$[^$]+\$/g, (match) => { - mathExpressions.push(match); - return `MATH.EXP.${mathExpressions.length - 1}`; - }); - let newstr = ""; - let escapeMode = false; - for (let i = 0; i < result.length; i++) { - if (escapeMode) { - escapeMode = false; - newstr += result[i]; - continue; - } - if (result[i] === "\\") { - escapeMode = true; - newstr += result[i]; - continue; - } - const c = result.charCodeAt(i).toString(16).padStart(4, "0"); - newstr += specialCharacters.get(c) ?? result[i]; - } - return newstr.replace( - /MATH\.EXP\.(\d+)/g, - (_, i) => mathExpressions[Number(i)] ?? "" - ); -} -__name(escapeSpecialCharacters, "escapeSpecialCharacters"); -function titleCase(str) { - return str.replace(/(\w)(\S*)/g, (_, first, rest) => { - const word = first + rest; - if (isRomanNumeral(word)) return word; - return first.toLocaleUpperCase() + rest.toLocaleLowerCase(); - }); -} -__name(titleCase, "titleCase"); -function isRomanNumeral(str) { - return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(str); -} -__name(isRomanNumeral, "isRomanNumeral"); function alphaNum(str) { return str.replace(/[^0-9A-Za-z]/g, "").toLocaleLowerCase(); } @@ -2633,46 +262,12 @@ function doubleEnclose(str) { return alreadyDoubleEnclosed ? result : `{${result}}`; } __name(doubleEnclose, "doubleEnclose"); -function removeEnclosingBraces(str) { - return str.replace(/^\{([^{}]*)\}$/g, "$1"); -} -__name(removeEnclosingBraces, "removeEnclosingBraces"); -function escapeURL(str) { - return str.replace(/\\?_/g, "\\%5F"); -} -__name(escapeURL, "escapeURL"); -function limitAuthors(str, maxAuthors) { - const authors = str.split(" and "); - if (authors.length > maxAuthors) { - return [...authors.slice(0, maxAuthors), "others"].join(" and "); - } - return str; -} -__name(limitAuthors, "limitAuthors"); -function formatPageRange(str) { - let result = str; - for (let i = 0; i < 4; i++) { - result = result.replace(/(\d)\s*-\s*(\d)/g, "$1--$2"); - } - return result; -} -__name(formatPageRange, "formatPageRange"); function isEntryNode(node) { return node.type !== "text" && node.block?.type === "entry"; } __name(isEntryNode, "isEntryNode"); // src/format.ts -var VERBATIM_FIELDS = [ - "url", - "doi", - "eprint", - "file", - "verba", - "verbb", - "verbc", - "pdf" -]; function formatBibtex(ast, options, replacementKeys) { const { omit, tab, space } = options; const indent = tab ? " " : " ".repeat(space); @@ -2757,41 +352,17 @@ function formatComment(comment, { stripComments, tidyComments }) { } __name(formatComment, "formatComment"); function formatValue(field, options) { - const { - curly, - numeric, - align, - stripEnclosingBraces, - dropAllCaps, - escape: enableEscape, - encodeUrls, - wrap, - maxAuthors, - tab, - space, - enclosingBraces, - removeBraces, - months: abbreviateMonths - } = options; + const { curly, numeric, align, wrap, tab, space, enclosingBraces } = options; const nameLowerCase = field.name.toLocaleLowerCase(); const indent = tab ? " " : " ".repeat(space); const enclosingBracesFields = new Set( (enclosingBraces ?? []).map((field2) => field2.toLocaleLowerCase()) ); - const removeBracesFields = new Set( - (removeBraces ?? []).map((field2) => field2.toLocaleLowerCase()) - ); return field.value.concat.map(({ type, value }) => { const isNumeric = value.match(/^[1-9][0-9]*$/); if (isNumeric && curly) { type = "braced"; } - if (abbreviateMonths && nameLowerCase === "month") { - const abbreviation = MONTH_CONVERSIONS[value.toLowerCase()]; - if (abbreviation) { - return abbreviation; - } - } if (type === "literal" || numeric && isNumeric) { return value; } @@ -2801,27 +372,6 @@ function formatValue(field, options) { return dig3; } value = unwrapText(value); - if (stripEnclosingBraces) { - value = removeEnclosingBraces(value); - } - if (dropAllCaps && !value.match(/[a-z]/)) { - value = titleCase(value); - } - if (nameLowerCase === "url" && encodeUrls) { - value = escapeURL(value); - } - if (!VERBATIM_FIELDS.includes(nameLowerCase) && enableEscape) { - value = escapeSpecialCharacters(value); - } - if (nameLowerCase === "pages") { - value = formatPageRange(value); - } - if (nameLowerCase === "author" && maxAuthors) { - value = limitAuthors(value, maxAuthors); - } - if (removeBracesFields.has(nameLowerCase)) { - value = stringifyLaTeX(flattenLaTeX(parseLaTeX(value))); - } if (enclosingBracesFields.has(nameLowerCase) && (type === "braced" || curly)) { value = doubleEnclose(value); } @@ -3428,6 +978,10 @@ var Cache = class { } return value; } + invalidateEntryValue(entry, field) { + this.valueLookup.get(entry)?.delete(field.toLocaleLowerCase()); + this.renderValueLookup.get(entry)?.delete(field.toLocaleLowerCase()); + } lookupField(entry, fieldLc) { let fieldNode = this.fieldLookup.get(entry)?.get(fieldLc); if (fieldNode === void 0) { @@ -4103,12 +1657,17 @@ var LiteralNode = class { this.parent = parent; this.value = value; this.type = "literal"; - parent.concat.push(this); } static { __name(this, "LiteralNode"); } }; +function createLiteralNode(parent, value) { + const node = new LiteralNode(parent, value); + parent.concat.push(node); + return node; +} +__name(createLiteralNode, "createLiteralNode"); var BracedNode = class { constructor(parent) { this.parent = parent; @@ -4116,12 +1675,17 @@ var BracedNode = class { this.value = ""; /** Used to count opening and closing braces */ this.depth = 0; - parent.concat.push(this); } static { __name(this, "BracedNode"); } }; +function createBracedNode(parent) { + const node = new BracedNode(parent); + parent.concat.push(node); + return node; +} +__name(createBracedNode, "createBracedNode"); var QuotedNode = class { constructor(parent) { this.parent = parent; @@ -4129,13 +1693,18 @@ var QuotedNode = class { this.value = ""; /** Used to count opening and closing braces */ this.depth = 0; - parent.concat.push(this); } static { __name(this, "QuotedNode"); } }; -function generateAST(input) { +function createQuotedNode(parent) { + const node = new QuotedNode(parent); + parent.concat.push(node); + return node; +} +__name(createQuotedNode, "createQuotedNode"); +function parseBibTeX(input) { const rootNode = new RootNode(); let node = rootNode; let line = 1; @@ -4259,140 +1828,2591 @@ function generateAST(input) { node.key = (node.key ?? "") + char; } break; - } - case "field": { - if (char === "}" || char === ")") { - node.name = node.name.trim(); - node = node.parent.parent.parent; - } else if (char === "=") { - node.name = node.name.trim(); - node = node.value; - } else if (char === ",") { - node.name = node.name.trim(); - node = new FieldNode(node.parent); - } else if (!isValidFieldName(char)) { - throw new BibTeXSyntaxError(input, node, i, line, column); - } else if (!node.name) { - if (!isWhitespace(char)) { - node.parent.fields.push(node); - node.name = char; - } else { + } + case "field": { + if (char === "}" || char === ")") { + node.name = node.name.trim(); + node = node.parent.parent.parent; + } else if (char === "=") { + node.name = node.name.trim(); + node = node.value; + } else if (char === ",") { + node.name = node.name.trim(); + node = new FieldNode(node.parent); + } else if (!isValidFieldName(char)) { + throw new BibTeXSyntaxError(input, node, i, line, column); + } else if (!node.name) { + if (!isWhitespace(char)) { + node.parent.fields.push(node); + node.name = char; + } else { + } + } else { + node.name += char; + } + break; + } + case "concat": { + if (isWhitespace(char)) { + break; + } + if (node.canConsumeValue) { + if (/[#=,}()[\]]/.test(char)) { + throw new BibTeXSyntaxError(input, node, i, line, column); + } + node.canConsumeValue = false; + if (char === "{") { + node = createBracedNode(node); + } else if (char === '"') { + node = createQuotedNode(node); + } else { + node = createLiteralNode(node, char); + } + } else { + if (char === ",") { + node = new FieldNode(node.parent.parent); + } else if (char === "}" || char === ")") { + node = node.parent.parent.parent.parent; + } else if (char === "#") { + node.canConsumeValue = true; + } else { + throw new BibTeXSyntaxError(input, node, i, line, column); + } + } + break; + } + case "literal": + if (isWhitespace(char)) { + node = node.parent; + } else if (char === ",") { + node = new FieldNode(node.parent.parent.parent); + } else if (char === "}") { + node = node.parent.parent.parent.parent.parent; + } else if (char === "#") { + node = node.parent; + node.canConsumeValue = true; + } else { + node.value += char; + } + break; + // Values may be enclosed in curly braces. Curly braces may be used within + // the value but they must be balanced. + case "braced": + if (char === "}" && node.depth === 0) { + node = node.parent; + break; + } + if (char === "{") { + node.depth++; + } else if (char === "}") { + node.depth--; + } + node.value += char; + break; + // Values may be enclosed in double quotes. Curly braces may be used + // within quoted values but they must be balanced. + // + // To escape a double quote, surround it with braces `{"}`. + // https://web.archive.org/web/20210422110817/https://maverick.inria.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html + case "quoted": + if (char === '"' && node.depth === 0) { + node = node.parent; + break; + } + if (char === "{") { + node.depth++; + } else if (char === "}") { + node.depth--; + if (node.depth < 0) { + throw new BibTeXSyntaxError(input, node, i, line, column); } - } else { - node.name += char; } + node.value += char; break; + } + } + return rootNode; +} +__name(parseBibTeX, "parseBibTeX"); +function isWhitespace(string) { + return /^[ \t\n\r]*$/.test(string); +} +__name(isWhitespace, "isWhitespace"); +function isValidKeyCharacter(char) { + return !/[#%{}~$,]/.test(char); +} +__name(isValidKeyCharacter, "isValidKeyCharacter"); +function isValidFieldName(char) { + return !/[=,{}()[\]]/.test(char); +} +__name(isValidFieldName, "isValidFieldName"); +var BibTeXSyntaxError = class extends Error { + constructor(input, node, pos, line, column, hint) { + super( + `Line ${line}:${column}: Syntax Error in ${node.type} (${hint}) +${input.slice(Math.max(0, pos - 20), pos)}>>${input[pos]}<<${input.slice(pos + 1, pos + 20)}` + ); + this.node = node; + this.line = line; + this.column = column; + this.hint = hint; + this.name = "Syntax Error"; + this.char = input[pos] ?? ""; + } + static { + __name(this, "BibTeXSyntaxError"); + } +}; + +// src/modifiers/abbreviateMonthsModifier.ts +var abbreviateMonthsModifier = { + condition: /* @__PURE__ */ __name((fieldName, options) => Boolean(options.months && fieldName === "month"), "condition"), + modifyNode: /* @__PURE__ */ __name((node) => { + const concatNode = node.value; + for (let i = 0; i < concatNode.concat.length; i++) { + const child = concatNode.concat[i]; + const abbreviation = MONTH_CONVERSIONS[child.value.toLowerCase()]; + if (abbreviation) { + concatNode.concat[i] = new LiteralNode(concatNode, abbreviation); + } + } + }, "modifyNode") +}; + +// src/modifiers/dropAllCapsModifier.ts +var dropAllCapsModifier = { + condition: /* @__PURE__ */ __name((fieldName, options, entry, cache) => Boolean( + options.dropAllCaps && !cache.lookupRenderedEntryValue(entry, fieldName).match(/[a-z]/) + ), "condition"), + modifyRenderedValue: /* @__PURE__ */ __name((str) => { + return str.replace(/(\w)(\S*)/g, (_, first, rest) => { + const word = first + rest; + if (isRomanNumeral(word)) return word; + return first.toLocaleUpperCase() + rest.toLocaleLowerCase(); + }); + }, "modifyRenderedValue") +}; +function isRomanNumeral(str) { + return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(str); +} +__name(isRomanNumeral, "isRomanNumeral"); + +// src/modifiers/encodeUrlsModifier.ts +var encodeUrlsModifier = { + condition: /* @__PURE__ */ __name((fieldName, options) => Boolean(fieldName === "url" && options.encodeUrls), "condition"), + modifyRenderedValue: /* @__PURE__ */ __name((str) => str.replace(/\\?_/g, "\\%5F"), "modifyRenderedValue") +}; + +// src/unicode.ts +var specialCharacters = /* @__PURE__ */ new Map([ + ["0023", "\\#"], + ["0024", "\\$"], + ["0025", "\\%"], + ["0026", "\\&"], + ["0027", "'"], + ["0040", "\\@"], + ["002a", "\\textasteriskcentered"], + ["005f", "\\_"], + ["007c", "\\vert{}"], + ["00a0", "~"], + ["00a1", "\\textexclamdown{}"], + ["00a2", "\\textcent{}"], + ["00a3", "\\textsterling{}"], + ["00a4", "\\textcurrency{}"], + ["00a5", "\\textyen{}"], + ["00a6", "\\textbrokenbar{}"], + ["00a7", "\\textsection{}"], + ["00a8", "\\textasciidieresis{}"], + ["00a9", "\\textcopyright{}"], + ["00aa", "\\textordfeminine{}"], + ["00ab", "\\guillemotleft{}"], + ["00ac", "\\lnot{}"], + ["00ad", "\\-"], + ["00ae", "\\textregistered{}"], + ["00af", "\\textasciimacron{}"], + ["00b0", "\\textdegree{}"], + ["00b1", "\\pm{}"], + ["00b2", "\\ensuremath{^2}"], + ["00b3", "\\ensuremath{^3}"], + ["00b4", "\\textasciiacute{}"], + ["00b5", "\\mathrm{\\mu}"], + ["00b6", "\\textparagraph{}"], + ["00b7", "\\cdot{}"], + ["00b8", "\\c{}"], + ["00b9", "\\ensuremath{^1}"], + ["00ba", "\\textordmasculine{}"], + ["00bb", "\\guillemotright{}"], + ["00bc", "\\textonequarter{}"], + ["00bd", "\\textonehalf{}"], + ["00be", "\\textthreequarters{}"], + ["00bf", "\\textquestiondown{}"], + ["00c0", "\\`{A}"], + ["00c1", "\\'{A}"], + ["00c2", "\\^{A}"], + ["00c3", "\\~{A}"], + ["00c4", '\\"{A}'], + ["00c5", "\\AA{}"], + ["00c6", "\\AE{}"], + ["00c7", "\\c{C}"], + ["00c8", "\\`{E}"], + ["00c9", "\\'{E}"], + ["00ca", "\\^{E}"], + ["00cb", '\\"{E}'], + ["00cc", "\\`{I}"], + ["00cd", "\\'{I}"], + ["00ce", "\\^{I}"], + ["00cf", '\\"{I}'], + ["00d0", "\\DH{}"], + ["00d1", "\\~{N}"], + ["00d2", "\\`{O}"], + ["00d3", "\\'{O}"], + ["00d4", "\\^{O}"], + ["00d5", "\\~{O}"], + ["00d6", '\\"{O}'], + ["00d7", "\\texttimes{}"], + ["00d8", "\\O{}"], + ["00d9", "\\`{U}"], + ["00da", "\\'{U}"], + ["00db", "\\^{U}"], + ["00dc", '\\"{U}'], + ["00dd", "\\'{Y}"], + ["00de", "\\TH{}"], + ["00df", "\\ss{}"], + ["00e0", "\\`{a}"], + ["00e1", "\\'{a}"], + ["00e2", "\\^{a}"], + ["00e3", "\\~{a}"], + ["00e4", '\\"{a}'], + ["00e5", "\\aa{}"], + ["00e6", "\\ae{}"], + ["00e7", "\\c{c}"], + ["00e8", "\\`{e}"], + ["00e9", "\\'{e}"], + ["00ea", "\\^{e}"], + ["00eb", '\\"{e}'], + ["00ec", "\\`{\\i}"], + ["00ed", "\\'{\\i}"], + ["00ee", "\\^{\\i}"], + ["00ef", '\\"{\\i}'], + ["00f0", "\\dh{}"], + ["00f1", "\\~{n}"], + ["00f2", "\\`{o}"], + ["00f3", "\\'{o}"], + ["00f4", "\\^{o}"], + ["00f5", "\\~{o}"], + ["00f6", '\\"{o}'], + ["00f7", "\\div{}"], + ["00f8", "\\o{}"], + ["00f9", "\\`{u}"], + ["00fa", "\\'{u}"], + ["00fb", "\\^{u}"], + ["00fc", '\\"{u}'], + ["00fd", "\\'{y}"], + ["00fe", "\\th{}"], + ["00ff", '\\"{y}'], + ["0100", "\\={A}"], + ["0101", "\\={a}"], + ["0102", "\\u{A}"], + ["0103", "\\u{a}"], + ["0104", "\\k{A}"], + ["0105", "\\k{a}"], + ["0106", "\\'{C}"], + ["0107", "\\'{c}"], + ["0108", "\\^{C}"], + ["0109", "\\^{c}"], + ["010a", "\\.{C}"], + ["010b", "\\.{c}"], + ["010c", "\\v{C}"], + ["010d", "\\v{c}"], + ["010e", "\\v{D}"], + ["010f", "\\v{d}"], + ["0110", "\\DJ{}"], + ["0111", "\\dj{}"], + ["0112", "\\={E}"], + ["0113", "\\={e}"], + ["0114", "\\u{E}"], + ["0115", "\\u{e}"], + ["0116", "\\.{E}"], + ["0117", "\\.{e}"], + ["0118", "\\k{E}"], + ["0119", "\\k{e}"], + ["011a", "\\v{E}"], + ["011b", "\\v{e}"], + ["011c", "\\^{G}"], + ["011d", "\\^{g}"], + ["011e", "\\u{G}"], + ["011f", "\\u{g}"], + ["0120", "\\.{G}"], + ["0121", "\\.{g}"], + ["0122", "\\c{G}"], + ["0123", "\\c{g}"], + ["0124", "\\^{H}"], + ["0125", "\\^{h}"], + ["0126", "{\\fontencoding{LELA}\\selectfont\\char40}"], + ["0127", "\\Elzxh{}"], + ["0128", "\\~{I}"], + ["0129", "\\~{\\i}"], + ["012a", "\\={I}"], + ["012b", "\\={\\i}"], + ["012c", "\\u{I}"], + ["012d", "\\u{\\i}"], + ["012e", "\\k{I}"], + ["012f", "\\k{i}"], + ["0130", "\\.{I}"], + ["0131", "\\i{}"], + ["0132", "IJ"], + ["0133", "ij"], + ["0134", "\\^{J}"], + ["0135", "\\^{\\j}"], + ["0136", "\\c{K}"], + ["0137", "\\c{k}"], + ["0138", "{\\fontencoding{LELA}\\selectfont\\char91}"], + ["0139", "\\'{L}"], + ["013a", "\\'{l}"], + ["013b", "\\c{L}"], + ["013c", "\\c{l}"], + ["013d", "\\v{L}"], + ["013e", "\\v{l}"], + ["013f", "{\\fontencoding{LELA}\\selectfont\\char201}"], + ["0140", "{\\fontencoding{LELA}\\selectfont\\char202}"], + ["0141", "\\L{}"], + ["0142", "\\l{}"], + ["0143", "\\'{N}"], + ["0144", "\\'{n}"], + ["0145", "\\c{N}"], + ["0146", "\\c{n}"], + ["0147", "\\v{N}"], + ["0148", "\\v{n}"], + ["0149", "'n"], + ["014a", "\\NG{}"], + ["014b", "\\ng{}"], + ["014c", "\\={O}"], + ["014d", "\\={o}"], + ["014e", "\\u{O}"], + ["014f", "\\u{o}"], + ["0150", "\\H{O}"], + ["0151", "\\H{o}"], + ["0152", "\\OE{}"], + ["0153", "\\oe{}"], + ["0154", "\\'{R}"], + ["0155", "\\'{r}"], + ["0156", "\\c{R}"], + ["0157", "\\c{r}"], + ["0158", "\\v{R}"], + ["0159", "\\v{r}"], + ["015a", "\\'{S}"], + ["015b", "\\'{s}"], + ["015c", "\\^{S}"], + ["015d", "\\^{s}"], + ["015e", "\\c{S}"], + ["015f", "\\c{s}"], + ["0160", "\\v{S}"], + ["0161", "\\v{s}"], + ["0162", "\\c{T}"], + ["0163", "\\c{t}"], + ["0164", "\\v{T}"], + ["0165", "\\v{t}"], + ["0166", "{\\fontencoding{LELA}\\selectfont\\char47}"], + ["0167", "{\\fontencoding{LELA}\\selectfont\\char63}"], + ["0168", "\\~{U}"], + ["0169", "\\~{u}"], + ["016a", "\\={U}"], + ["016b", "\\={u}"], + ["016c", "\\u{U}"], + ["016d", "\\u{u}"], + ["016e", "\\r{U}"], + ["016f", "\\r{u}"], + ["0170", "\\H{U}"], + ["0171", "\\H{u}"], + ["0172", "\\k{U}"], + ["0173", "\\k{u}"], + ["0174", "\\^{W}"], + ["0175", "\\^{w}"], + ["0176", "\\^{Y}"], + ["0177", "\\^{y}"], + ["0178", '\\"{Y}'], + ["0179", "\\'{Z}"], + ["017a", "\\'{z}"], + ["017b", "\\.{Z}"], + ["017c", "\\.{z}"], + ["017d", "\\v{Z}"], + ["017e", "\\v{z}"], + ["0195", "\\texthvlig{}"], + ["019e", "\\textnrleg{}"], + ["01aa", "\\eth{}"], + ["01ba", "{\\fontencoding{LELA}\\selectfont\\char195}"], + ["01c2", "\\textdoublepipe{}"], + ["01f5", "\\'{g}"], + ["0250", "\\Elztrna{}"], + ["0252", "\\Elztrnsa{}"], + ["0254", "\\Elzopeno{}"], + ["0256", "\\Elzrtld{}"], + ["0258", "{\\fontencoding{LEIP}\\selectfont\\char61}"], + ["0259", "\\Elzschwa{}"], + ["025b", "\\varepsilon{}"], + ["0263", "\\Elzpgamma{}"], + ["0264", "\\Elzpbgam{}"], + ["0265", "\\Elztrnh{}"], + ["026c", "\\Elzbtdl{}"], + ["026d", "\\Elzrtll{}"], + ["026f", "\\Elztrnm{}"], + ["0270", "\\Elztrnmlr{}"], + ["0271", "\\Elzltlmr{}"], + ["0272", "\\Elzltln{}"], + ["0273", "\\Elzrtln{}"], + ["0277", "\\Elzclomeg{}"], + ["0278", "\\textphi{}"], + ["0279", "\\Elztrnr{}"], + ["027a", "\\Elztrnrl{}"], + ["027b", "\\Elzrttrnr{}"], + ["027c", "\\Elzrl{}"], + ["027d", "\\Elzrtlr{}"], + ["027e", "\\Elzfhr{}"], + ["027f", "{\\fontencoding{LEIP}\\selectfont\\char202}"], + ["0282", "\\Elzrtls{}"], + ["0283", "\\Elzesh{}"], + ["0287", "\\Elztrnt{}"], + ["0288", "\\Elzrtlt{}"], + ["028a", "\\Elzpupsil{}"], + ["028b", "\\Elzpscrv{}"], + ["028c", "\\Elzinvv{}"], + ["028d", "\\Elzinvw{}"], + ["028e", "\\Elztrny{}"], + ["0290", "\\Elzrtlz{}"], + ["0292", "\\Elzyogh{}"], + ["0294", "\\Elzglst{}"], + ["0295", "\\Elzreglst{}"], + ["0296", "\\Elzinglst{}"], + ["029e", "\\textturnk{}"], + ["02a4", "\\Elzdyogh{}"], + ["02a7", "\\Elztesh{}"], + ["02c7", "\\textasciicaron{}"], + ["02c8", "\\Elzverts{}"], + ["02cc", "\\Elzverti{}"], + ["02d0", "\\Elzlmrk{}"], + ["02d1", "\\Elzhlmrk{}"], + ["02d2", "\\Elzsbrhr{}"], + ["02d3", "\\Elzsblhr{}"], + ["02d4", "\\Elzrais{}"], + ["02d5", "\\Elzlow{}"], + ["02d8", "\\textasciibreve{}"], + ["02d9", "\\textperiodcentered{}"], + ["02da", "\\r{}"], + ["02db", "\\k{}"], + ["02dc", "\\texttildelow{}"], + ["02dd", "\\H{}"], + ["02e5", "\\tone{55}"], + ["02e6", "\\tone{44}"], + ["02e7", "\\tone{33}"], + ["02e8", "\\tone{22}"], + ["02e9", "\\tone{11}"], + ["0300", "\\`"], + ["0301", "\\'"], + ["0302", "\\^"], + ["0303", "\\~"], + ["0304", "\\="], + ["0306", "\\u"], + ["0307", "\\."], + ["0308", '\\"'], + ["030a", "\\r"], + ["030b", "\\H"], + ["030c", "\\v"], + ["030f", "\\cyrchar\\C"], + ["0311", "{\\fontencoding{LECO}\\selectfont\\char177}"], + ["0318", "{\\fontencoding{LECO}\\selectfont\\char184}"], + ["0319", "{\\fontencoding{LECO}\\selectfont\\char185}"], + ["0321", "\\Elzpalh{}"], + ["0322", "\\Elzrh{}"], + ["0327", "\\c"], + ["0328", "\\k"], + ["032a", "\\Elzsbbrg{}"], + ["032b", "{\\fontencoding{LECO}\\selectfont\\char203}"], + ["032f", "{\\fontencoding{LECO}\\selectfont\\char207}"], + ["0335", "\\Elzxl{}"], + ["0336", "\\Elzbar{}"], + ["0337", "{\\fontencoding{LECO}\\selectfont\\char215}"], + ["0338", "{\\fontencoding{LECO}\\selectfont\\char216}"], + ["033a", "{\\fontencoding{LECO}\\selectfont\\char218}"], + ["033b", "{\\fontencoding{LECO}\\selectfont\\char219}"], + ["033c", "{\\fontencoding{LECO}\\selectfont\\char220}"], + ["033d", "{\\fontencoding{LECO}\\selectfont\\char221}"], + ["0361", "{\\fontencoding{LECO}\\selectfont\\char225}"], + ["0386", "\\'{A}"], + ["0388", "\\'{E}"], + ["0389", "\\'{H}"], + ["038a", "\\'{}{I}"], + ["038c", "\\'{}O"], + ["038e", "\\mathrm{'Y}"], + ["038f", "\\mathrm{'\\Omega}"], + ["0390", "\\acute{\\ddot{\\iota}}"], + ["0391", "\\ensuremath{\\Alpha}"], + ["0392", "\\ensuremath{\\Beta}"], + ["0393", "\\ensuremath{\\Gamma}"], + ["0394", "\\ensuremath{\\Delta}"], + ["0395", "\\ensuremath{\\Epsilon}"], + ["0396", "\\ensuremath{\\Zeta}"], + ["0397", "\\ensuremath{\\Eta}"], + ["0398", "\\ensuremath{\\Theta}"], + ["0399", "\\ensuremath{\\Iota}"], + ["039a", "\\ensuremath{\\Kappa}"], + ["039b", "\\ensuremath{\\Lambda}"], + ["039e", "\\ensuremath{\\Xi}"], + ["03a0", "\\ensuremath{\\Pi}"], + ["03a1", "\\ensuremath{\\Rho}"], + ["03a3", "\\ensuremath{\\Sigma}"], + ["03a4", "\\ensuremath{\\Tau}"], + ["03a5", "\\ensuremath{\\Upsilon}"], + ["03a6", "\\ensuremath{\\Phi}"], + ["03a7", "\\ensuremath{\\Chi}"], + ["03a8", "\\ensuremath{\\Psi}"], + ["03a9", "\\ensuremath{\\Omega}"], + ["03aa", "\\mathrm{\\ddot{I}}"], + ["03ab", "\\mathrm{\\ddot{Y}}"], + ["03ac", "\\'{$\\alpha$}"], + ["03ad", "\\acute{\\epsilon}"], + ["03ae", "\\acute{\\eta}"], + ["03af", "\\acute{\\iota}"], + ["03b0", "\\acute{\\ddot{\\upsilon}}"], + ["03b1", "\\ensuremath{\\alpha}"], + ["03b2", "\\ensuremath{\\beta}"], + ["03b3", "\\ensuremath{\\gamma}"], + ["03b4", "\\ensuremath{\\delta}"], + ["03b5", "\\ensuremath{\\epsilon}"], + ["03b6", "\\ensuremath{\\zeta}"], + ["03b7", "\\ensuremath{\\eta}"], + ["03b8", "\\texttheta{}"], + ["03b9", "\\ensuremath{\\iota}"], + ["03ba", "\\ensuremath{\\kappa}"], + ["03bb", "\\ensuremath{\\lambda}"], + ["03bc", "\\ensuremath{\\mu}"], + ["03bd", "\\ensuremath{\\nu}"], + ["03be", "\\ensuremath{\\xi}"], + ["03c0", "\\ensuremath{\\pi}"], + ["03c1", "\\ensuremath{\\rho}"], + ["03c2", "\\ensuremath{\\varsigma}"], + ["03c3", "\\ensuremath{\\sigma}"], + ["03c4", "\\ensuremath{\\tau}"], + ["03c5", "\\ensuremath{\\upsilon}"], + ["03c6", "\\ensuremath{\\varphi}"], + ["03c7", "\\ensuremath{\\chi}"], + ["03c8", "\\ensuremath{\\psi}"], + ["03c9", "\\ensuremath{\\omega}"], + ["03ca", "\\ensuremath{\\ddot{\\iota}}"], + ["03cb", "\\ensuremath{\\ddot{\\upsilon}}"], + ["03cc", "\\'{o}"], + ["03cd", "\\acute{\\upsilon}"], + ["03ce", "\\acute{\\omega}"], + ["03d0", "\\Pisymbol{ppi022}{87}"], + ["03d1", "\\textvartheta{}"], + ["03d2", "\\ensuremath{\\Upsilon}"], + ["03d5", "\\ensuremath{\\phi}"], + ["03d6", "\\ensuremath{\\varpi}"], + ["03da", "\\Stigma{}"], + ["03dc", "\\Digamma{}"], + ["03dd", "\\digamma{}"], + ["03de", "\\Koppa{}"], + ["03e0", "\\Sampi{}"], + ["03f0", "\\varkappa{}"], + ["03f1", "\\varrho{}"], + ["03f4", "\\textTheta{}"], + ["03f6", "\\backepsilon{}"], + ["0401", "\\cyrchar\\CYRYO{}"], + ["0402", "\\cyrchar\\CYRDJE{}"], + ["0403", "\\cyrchar{\\'\\CYRG}"], + ["0404", "\\cyrchar\\CYRIE{}"], + ["0405", "\\cyrchar\\CYRDZE{}"], + ["0406", "\\cyrchar\\CYRII{}"], + ["0407", "\\cyrchar\\CYRYI{}"], + ["0408", "\\cyrchar\\CYRJE{}"], + ["0409", "\\cyrchar\\CYRLJE{}"], + ["040a", "\\cyrchar\\CYRNJE{}"], + ["040b", "\\cyrchar\\CYRTSHE{}"], + ["040c", "\\cyrchar{\\'\\CYRK}"], + ["040e", "\\cyrchar\\CYRUSHRT{}"], + ["040f", "\\cyrchar\\CYRDZHE{}"], + ["0410", "\\cyrchar\\CYRA{}"], + ["0411", "\\cyrchar\\CYRB{}"], + ["0412", "\\cyrchar\\CYRV{}"], + ["0413", "\\cyrchar\\CYRG{}"], + ["0414", "\\cyrchar\\CYRD{}"], + ["0415", "\\cyrchar\\CYRE{}"], + ["0416", "\\cyrchar\\CYRZH{}"], + ["0417", "\\cyrchar\\CYRZ{}"], + ["0418", "\\cyrchar\\CYRI{}"], + ["0419", "\\cyrchar\\CYRISHRT{}"], + ["041a", "\\cyrchar\\CYRK{}"], + ["041b", "\\cyrchar\\CYRL{}"], + ["041c", "\\cyrchar\\CYRM{}"], + ["041d", "\\cyrchar\\CYRN{}"], + ["041e", "\\cyrchar\\CYRO{}"], + ["041f", "\\cyrchar\\CYRP{}"], + ["0420", "\\cyrchar\\CYRR{}"], + ["0421", "\\cyrchar\\CYRS{}"], + ["0422", "\\cyrchar\\CYRT{}"], + ["0423", "\\cyrchar\\CYRU{}"], + ["0424", "\\cyrchar\\CYRF{}"], + ["0425", "\\cyrchar\\CYRH{}"], + ["0426", "\\cyrchar\\CYRC{}"], + ["0427", "\\cyrchar\\CYRCH{}"], + ["0428", "\\cyrchar\\CYRSH{}"], + ["0429", "\\cyrchar\\CYRSHCH{}"], + ["042a", "\\cyrchar\\CYRHRDSN{}"], + ["042b", "\\cyrchar\\CYRERY{}"], + ["042c", "\\cyrchar\\CYRSFTSN{}"], + ["042d", "\\cyrchar\\CYREREV{}"], + ["042e", "\\cyrchar\\CYRYU{}"], + ["042f", "\\cyrchar\\CYRYA{}"], + ["0430", "\\cyrchar\\cyra{}"], + ["0431", "\\cyrchar\\cyrb{}"], + ["0432", "\\cyrchar\\cyrv{}"], + ["0433", "\\cyrchar\\cyrg{}"], + ["0434", "\\cyrchar\\cyrd{}"], + ["0435", "\\cyrchar\\cyre{}"], + ["0436", "\\cyrchar\\cyrzh{}"], + ["0437", "\\cyrchar\\cyrz{}"], + ["0438", "\\cyrchar\\cyri{}"], + ["0439", "\\cyrchar\\cyrishrt{}"], + ["043a", "\\cyrchar\\cyrk{}"], + ["043b", "\\cyrchar\\cyrl{}"], + ["043c", "\\cyrchar\\cyrm{}"], + ["043d", "\\cyrchar\\cyrn{}"], + ["043e", "\\cyrchar\\cyro{}"], + ["043f", "\\cyrchar\\cyrp{}"], + ["0440", "\\cyrchar\\cyrr{}"], + ["0441", "\\cyrchar\\cyrs{}"], + ["0442", "\\cyrchar\\cyrt{}"], + ["0443", "\\cyrchar\\cyru{}"], + ["0444", "\\cyrchar\\cyrf{}"], + ["0445", "\\cyrchar\\cyrh{}"], + ["0446", "\\cyrchar\\cyrc{}"], + ["0447", "\\cyrchar\\cyrch{}"], + ["0448", "\\cyrchar\\cyrsh{}"], + ["0449", "\\cyrchar\\cyrshch{}"], + ["044a", "\\cyrchar\\cyrhrdsn{}"], + ["044b", "\\cyrchar\\cyrery{}"], + ["044c", "\\cyrchar\\cyrsftsn{}"], + ["044d", "\\cyrchar\\cyrerev{}"], + ["044e", "\\cyrchar\\cyryu{}"], + ["044f", "\\cyrchar\\cyrya{}"], + ["0451", "\\cyrchar\\cyryo{}"], + ["0452", "\\cyrchar\\cyrdje{}"], + ["0453", "\\cyrchar{\\'\\cyrg}"], + ["0454", "\\cyrchar\\cyrie{}"], + ["0455", "\\cyrchar\\cyrdze{}"], + ["0456", "\\cyrchar\\cyrii{}"], + ["0457", "\\cyrchar\\cyryi{}"], + ["0458", "\\cyrchar\\cyrje{}"], + ["0459", "\\cyrchar\\cyrlje{}"], + ["045a", "\\cyrchar\\cyrnje{}"], + ["045b", "\\cyrchar\\cyrtshe{}"], + ["045c", "\\cyrchar{\\'\\cyrk}"], + ["045e", "\\cyrchar\\cyrushrt{}"], + ["045f", "\\cyrchar\\cyrdzhe{}"], + ["0460", "\\cyrchar\\CYROMEGA{}"], + ["0461", "\\cyrchar\\cyromega{}"], + ["0462", "\\cyrchar\\CYRYAT{}"], + ["0464", "\\cyrchar\\CYRIOTE{}"], + ["0465", "\\cyrchar\\cyriote{}"], + ["0466", "\\cyrchar\\CYRLYUS{}"], + ["0467", "\\cyrchar\\cyrlyus{}"], + ["0468", "\\cyrchar\\CYRIOTLYUS{}"], + ["0469", "\\cyrchar\\cyriotlyus{}"], + ["046a", "\\cyrchar\\CYRBYUS{}"], + ["046c", "\\cyrchar\\CYRIOTBYUS{}"], + ["046d", "\\cyrchar\\cyriotbyus{}"], + ["046e", "\\cyrchar\\CYRKSI{}"], + ["046f", "\\cyrchar\\cyrksi{}"], + ["0470", "\\cyrchar\\CYRPSI{}"], + ["0471", "\\cyrchar\\cyrpsi{}"], + ["0472", "\\cyrchar\\CYRFITA{}"], + ["0474", "\\cyrchar\\CYRIZH{}"], + ["0478", "\\cyrchar\\CYRUK{}"], + ["0479", "\\cyrchar\\cyruk{}"], + ["047a", "\\cyrchar\\CYROMEGARND{}"], + ["047b", "\\cyrchar\\cyromegarnd{}"], + ["047c", "\\cyrchar\\CYROMEGATITLO{}"], + ["047d", "\\cyrchar\\cyromegatitlo{}"], + ["047e", "\\cyrchar\\CYROT{}"], + ["047f", "\\cyrchar\\cyrot{}"], + ["0480", "\\cyrchar\\CYRKOPPA{}"], + ["0481", "\\cyrchar\\cyrkoppa{}"], + ["0482", "\\cyrchar\\cyrthousands{}"], + ["0488", "\\cyrchar\\cyrhundredthousands{}"], + ["0489", "\\cyrchar\\cyrmillions{}"], + ["048c", "\\cyrchar\\CYRSEMISFTSN{}"], + ["048d", "\\cyrchar\\cyrsemisftsn{}"], + ["048e", "\\cyrchar\\CYRRTICK{}"], + ["048f", "\\cyrchar\\cyrrtick{}"], + ["0490", "\\cyrchar\\CYRGUP{}"], + ["0491", "\\cyrchar\\cyrgup{}"], + ["0492", "\\cyrchar\\CYRGHCRS{}"], + ["0493", "\\cyrchar\\cyrghcrs{}"], + ["0494", "\\cyrchar\\CYRGHK{}"], + ["0495", "\\cyrchar\\cyrghk{}"], + ["0496", "\\cyrchar\\CYRZHDSC{}"], + ["0497", "\\cyrchar\\cyrzhdsc{}"], + ["0498", "\\cyrchar\\CYRZDSC{}"], + ["0499", "\\cyrchar\\cyrzdsc{}"], + ["049a", "\\cyrchar\\CYRKDSC{}"], + ["049b", "\\cyrchar\\cyrkdsc{}"], + ["049c", "\\cyrchar\\CYRKVCRS{}"], + ["049d", "\\cyrchar\\cyrkvcrs{}"], + ["049e", "\\cyrchar\\CYRKHCRS{}"], + ["049f", "\\cyrchar\\cyrkhcrs{}"], + ["04a0", "\\cyrchar\\CYRKBEAK{}"], + ["04a1", "\\cyrchar\\cyrkbeak{}"], + ["04a2", "\\cyrchar\\CYRNDSC{}"], + ["04a3", "\\cyrchar\\cyrndsc{}"], + ["04a4", "\\cyrchar\\CYRNG{}"], + ["04a5", "\\cyrchar\\cyrng{}"], + ["04a6", "\\cyrchar\\CYRPHK{}"], + ["04a7", "\\cyrchar\\cyrphk{}"], + ["04a8", "\\cyrchar\\CYRABHHA{}"], + ["04a9", "\\cyrchar\\cyrabhha{}"], + ["04aa", "\\cyrchar\\CYRSDSC{}"], + ["04ab", "\\cyrchar\\cyrsdsc{}"], + ["04ac", "\\cyrchar\\CYRTDSC{}"], + ["04ad", "\\cyrchar\\cyrtdsc{}"], + ["04ae", "\\cyrchar\\CYRY{}"], + ["04af", "\\cyrchar\\cyry{}"], + ["04b0", "\\cyrchar\\CYRYHCRS{}"], + ["04b1", "\\cyrchar\\cyryhcrs{}"], + ["04b2", "\\cyrchar\\CYRHDSC{}"], + ["04b3", "\\cyrchar\\cyrhdsc{}"], + ["04b4", "\\cyrchar\\CYRTETSE{}"], + ["04b5", "\\cyrchar\\cyrtetse{}"], + ["04b6", "\\cyrchar\\CYRCHRDSC{}"], + ["04b7", "\\cyrchar\\cyrchrdsc{}"], + ["04b8", "\\cyrchar\\CYRCHVCRS{}"], + ["04b9", "\\cyrchar\\cyrchvcrs{}"], + ["04ba", "\\cyrchar\\CYRSHHA{}"], + ["04bb", "\\cyrchar\\cyrshha{}"], + ["04bc", "\\cyrchar\\CYRABHCH{}"], + ["04bd", "\\cyrchar\\cyrabhch{}"], + ["04be", "\\cyrchar\\CYRABHCHDSC{}"], + ["04bf", "\\cyrchar\\cyrabhchdsc{}"], + ["04c0", "\\cyrchar\\CYRpalochka{}"], + ["04c3", "\\cyrchar\\CYRKHK{}"], + ["04c4", "\\cyrchar\\cyrkhk{}"], + ["04c7", "\\cyrchar\\CYRNHK{}"], + ["04c8", "\\cyrchar\\cyrnhk{}"], + ["04cb", "\\cyrchar\\CYRCHLDSC{}"], + ["04cc", "\\cyrchar\\cyrchldsc{}"], + ["04d4", "\\cyrchar\\CYRAE{}"], + ["04d5", "\\cyrchar\\cyrae{}"], + ["04d8", "\\cyrchar\\CYRSCHWA{}"], + ["04d9", "\\cyrchar\\cyrschwa{}"], + ["04e0", "\\cyrchar\\CYRABHDZE{}"], + ["04e1", "\\cyrchar\\cyrabhdze{}"], + ["04e8", "\\cyrchar\\CYROTLD{}"], + ["04e9", "\\cyrchar\\cyrotld{}"], + ["2002", "\\hspace{0.6em}"], + ["2003", "\\hspace{1em}"], + ["2004", "\\hspace{0.33em}"], + ["2005", "\\hspace{0.25em}"], + ["2006", "\\hspace{0.166em}"], + ["2007", "\\hphantom{0}"], + ["2008", "\\hphantom{,}"], + ["2009", "\\hspace{0.167em}"], + ["200a", "\\mkern1mu{}"], + ["2010", "-"], + ["2014", "--"], + ["2015", "\\rule{1em}{1pt}"], + ["2016", "\\Vert{}"], + ["2018", "`"], + ["2019", "'"], + ["201b", "\\Elzreapos{}"], + ["201c", "``"], + ["201d", "''"], + ["201e", ",,"], + ["2020", "\\textdagger{}"], + ["2021", "\\textdaggerdbl{}"], + ["2022", "\\textbullet{}"], + ["2025", ".."], + ["2026", "\\ldots{}"], + ["2030", "\\textperthousand{}"], + ["2031", "\\textpertenthousand{}"], + ["2032", "\\ensuremath{'}"], + ["2033", "\\ensuremath{''}"], + ["2034", "\\ensuremath{'''}"], + ["2035", "\\backprime{}"], + ["2039", "\\guilsinglleft{}"], + ["203a", "\\guilsinglright{}"], + ["2057", "''''"], + ["205f", "\\mkern4mu{}"], + ["2060", "\\nolinebreak{}"], + ["20a7", "\\ensuremath{\\Elzpes}"], + ["20ac", "\\mbox{\\texteuro}{}"], + ["20db", "\\dddot{}"], + ["20dc", "\\ddddot{}"], + ["2102", "\\mathbb{C}"], + ["210a", "\\mathscr{g}"], + ["210b", "\\mathscr{H}"], + ["210c", "\\mathfrak{H}"], + ["210d", "\\mathbb{H}"], + ["210f", "\\hslash{}"], + ["2110", "\\mathscr{I}"], + ["2111", "\\mathfrak{I}"], + ["2112", "\\mathscr{L}"], + ["2113", "\\mathscr{l}"], + ["2115", "\\mathbb{N}"], + ["2116", "\\cyrchar\\textnumero{}"], + ["2118", "\\wp{}"], + ["2119", "\\mathbb{P}"], + ["211a", "\\mathbb{Q}"], + ["211b", "\\mathscr{R}"], + ["211c", "\\mathfrak{R}"], + ["211d", "\\mathbb{R}"], + ["211e", "\\Elzxrat{}"], + ["2122", "\\texttrademark{}"], + ["2124", "\\mathbb{Z}"], + ["2126", "\\Omega{}"], + ["2127", "\\mho{}"], + ["2128", "\\mathfrak{Z}"], + ["2129", "\\ElsevierGlyph{2129}"], + ["212b", "\\AA{}"], + ["212c", "\\mathscr{B}"], + ["212d", "\\mathfrak{C}"], + ["212f", "\\mathscr{e}"], + ["2130", "\\mathscr{E}"], + ["2131", "\\mathscr{F}"], + ["2133", "\\mathscr{M}"], + ["2134", "\\mathscr{o}"], + ["2135", "\\aleph{}"], + ["2136", "\\beth{}"], + ["2137", "\\gimel{}"], + ["2138", "\\daleth{}"], + ["2153", "\\textfrac{1}{3}"], + ["2154", "\\textfrac{2}{3}"], + ["2155", "\\textfrac{1}{5}"], + ["2156", "\\textfrac{2}{5}"], + ["2157", "\\textfrac{3}{5}"], + ["2158", "\\textfrac{4}{5}"], + ["2159", "\\textfrac{1}{6}"], + ["215a", "\\textfrac{5}{6}"], + ["215b", "\\textfrac{1}{8}"], + ["215c", "\\textfrac{3}{8}"], + ["215d", "\\textfrac{5}{8}"], + ["215e", "\\textfrac{7}{8}"], + ["2190", "\\leftarrow{}"], + ["2191", "\\uparrow{}"], + ["2192", "\\rightarrow{}"], + ["2193", "\\downarrow{}"], + ["2194", "\\leftrightarrow{}"], + ["2195", "\\updownarrow{}"], + ["2196", "\\nwarrow{}"], + ["2197", "\\nearrow{}"], + ["2198", "\\searrow{}"], + ["2199", "\\swarrow{}"], + ["219a", "\\nleftarrow{}"], + ["219b", "\\nrightarrow{}"], + ["219c", "\\arrowwaveright{}"], + ["219d", "\\arrowwaveright{}"], + ["219e", "\\twoheadleftarrow{}"], + ["21a0", "\\twoheadrightarrow{}"], + ["21a2", "\\leftarrowtail{}"], + ["21a3", "\\rightarrowtail{}"], + ["21a6", "\\mapsto{}"], + ["21a9", "\\hookleftarrow{}"], + ["21aa", "\\hookrightarrow{}"], + ["21ab", "\\looparrowleft{}"], + ["21ac", "\\looparrowright{}"], + ["21ad", "\\leftrightsquigarrow{}"], + ["21ae", "\\nleftrightarrow{}"], + ["21b0", "\\Lsh{}"], + ["21b1", "\\Rsh{}"], + ["21b3", "\\ElsevierGlyph{21B3}"], + ["21b6", "\\curvearrowleft{}"], + ["21b7", "\\curvearrowright{}"], + ["21ba", "\\circlearrowleft{}"], + ["21bb", "\\circlearrowright{}"], + ["21bc", "\\leftharpoonup{}"], + ["21bd", "\\leftharpoondown{}"], + ["21be", "\\upharpoonright{}"], + ["21bf", "\\upharpoonleft{}"], + ["21c0", "\\rightharpoonup{}"], + ["21c1", "\\rightharpoondown{}"], + ["21c2", "\\downharpoonright{}"], + ["21c3", "\\downharpoonleft{}"], + ["21c4", "\\rightleftarrows{}"], + ["21c5", "\\dblarrowupdown{}"], + ["21c6", "\\leftrightarrows{}"], + ["21c7", "\\leftleftarrows{}"], + ["21c8", "\\upuparrows{}"], + ["21c9", "\\rightrightarrows{}"], + ["21ca", "\\downdownarrows{}"], + ["21cb", "\\leftrightharpoons{}"], + ["21cc", "\\rightleftharpoons{}"], + ["21cd", "\\nLeftarrow{}"], + ["21ce", "\\nLeftrightarrow{}"], + ["21cf", "\\nRightarrow{}"], + ["21d0", "\\Leftarrow{}"], + ["21d1", "\\Uparrow{}"], + ["21d2", "\\Rightarrow{}"], + ["21d3", "\\Downarrow{}"], + ["21d4", "\\Leftrightarrow{}"], + ["21d5", "\\Updownarrow{}"], + ["21da", "\\Lleftarrow{}"], + ["21db", "\\Rrightarrow{}"], + ["21dd", "\\rightsquigarrow{}"], + ["21f5", "\\DownArrowUpArrow{}"], + ["2200", "\\forall{}"], + ["2201", "\\complement{}"], + ["2202", "\\partial{}"], + ["2203", "\\exists{}"], + ["2204", "\\nexists{}"], + ["2205", "\\varnothing{}"], + ["2207", "\\nabla{}"], + ["2208", "\\in{}"], + ["2209", "\\not\\in{}"], + ["220b", "\\ni{}"], + ["220c", "\\not\\ni{}"], + ["220f", "\\prod{}"], + ["2210", "\\coprod{}"], + ["2211", "\\sum{}"], + ["2212", "-"], + ["2213", "\\mp{}"], + ["2214", "\\dotplus{}"], + ["2216", "\\setminus{}"], + ["2217", "{\\_\\ast}"], + ["2218", "\\circ{}"], + ["2219", "\\bullet{}"], + ["221a", "\\surd{}"], + ["221d", "\\propto{}"], + ["221e", "\\infty{}"], + ["221f", "\\rightangle{}"], + ["2220", "\\angle{}"], + ["2221", "\\measuredangle{}"], + ["2222", "\\sphericalangle{}"], + ["2223", "\\mid{}"], + ["2224", "\\nmid{}"], + ["2225", "\\parallel{}"], + ["2226", "\\nparallel{}"], + ["2227", "\\wedge{}"], + ["2228", "\\vee{}"], + ["2229", "\\cap{}"], + ["222a", "\\cup{}"], + ["222b", "\\int{}"], + ["222c", "\\int\\!\\int{}"], + ["222d", "\\int\\!\\int\\!\\int{}"], + ["222e", "\\oint{}"], + ["222f", "\\surfintegral{}"], + ["2230", "\\volintegral{}"], + ["2231", "\\clwintegral{}"], + ["2232", "\\ElsevierGlyph{2232}"], + ["2233", "\\ElsevierGlyph{2233}"], + ["2234", "\\therefore{}"], + ["2235", "\\because{}"], + ["2237", "\\Colon{}"], + ["2238", "\\ElsevierGlyph{2238}"], + ["223a", "\\mathbin{{:}\\!\\!{-}\\!\\!{:}}"], + ["223b", "\\homothetic{}"], + ["223c", "\\sim{}"], + ["223d", "\\backsim{}"], + ["223e", "\\lazysinv{}"], + ["2240", "\\wr{}"], + ["2241", "\\not\\sim{}"], + ["2242", "\\ElsevierGlyph{2242}"], + ["2243", "\\simeq{}"], + ["2244", "\\not\\simeq{}"], + ["2245", "\\cong{}"], + ["2246", "\\approxnotequal{}"], + ["2247", "\\not\\cong{}"], + ["2248", "\\approx{}"], + ["2249", "\\not\\approx{}"], + ["224a", "\\approxeq{}"], + ["224b", "\\tildetrpl{}"], + ["224c", "\\allequal{}"], + ["224d", "\\asymp{}"], + ["224e", "\\Bumpeq{}"], + ["224f", "\\bumpeq{}"], + ["2250", "\\doteq{}"], + ["2251", "\\doteqdot{}"], + ["2252", "\\fallingdotseq{}"], + ["2253", "\\risingdotseq{}"], + ["2254", ":="], + ["2255", "=:"], + ["2256", "\\eqcirc{}"], + ["2257", "\\circeq{}"], + ["2259", "\\estimates{}"], + ["225a", "\\ElsevierGlyph{225A}"], + ["225b", "\\starequal{}"], + ["225c", "\\triangleq{}"], + ["225f", "\\ElsevierGlyph{225F}"], + ["2260", "\\not ="], + ["2261", "\\equiv{}"], + ["2262", "\\not\\equiv{}"], + ["2264", "\\leq{}"], + ["2265", "\\geq{}"], + ["2266", "\\leqq{}"], + ["2267", "\\geqq{}"], + ["2268", "\\lneqq{}"], + ["2269", "\\gneqq{}"], + ["226a", "\\ll{}"], + ["226b", "\\gg{}"], + ["226c", "\\between{}"], + ["226d", "\\not\\kern-0.3em\\times{}"], + ["226e", "\\not<"], + ["226f", "\\not>"], + ["2270", "\\not\\leq{}"], + ["2271", "\\not\\geq{}"], + ["2272", "\\lessequivlnt{}"], + ["2273", "\\greaterequivlnt{}"], + ["2274", "\\ElsevierGlyph{2274}"], + ["2275", "\\ElsevierGlyph{2275}"], + ["2276", "\\lessgtr{}"], + ["2277", "\\gtrless{}"], + ["2278", "\\notlessgreater{}"], + ["2279", "\\notgreaterless{}"], + ["227a", "\\prec{}"], + ["227b", "\\succ{}"], + ["227c", "\\preccurlyeq{}"], + ["227d", "\\succcurlyeq{}"], + ["227e", "\\precapprox{}"], + ["227f", "\\succapprox{}"], + ["2280", "\\not\\prec{}"], + ["2281", "\\not\\succ{}"], + ["2282", "\\subset{}"], + ["2283", "\\supset{}"], + ["2284", "\\not\\subset{}"], + ["2285", "\\not\\supset{}"], + ["2286", "\\subseteq{}"], + ["2287", "\\supseteq{}"], + ["2288", "\\not\\subseteq{}"], + ["2289", "\\not\\supseteq{}"], + ["228a", "\\subsetneq{}"], + ["228b", "\\supsetneq{}"], + ["228e", "\\uplus{}"], + ["228f", "\\sqsubset{}"], + ["2290", "\\sqsupset{}"], + ["2291", "\\sqsubseteq{}"], + ["2292", "\\sqsupseteq{}"], + ["2293", "\\sqcap{}"], + ["2294", "\\sqcup{}"], + ["2295", "\\oplus{}"], + ["2296", "\\ominus{}"], + ["2297", "\\otimes{}"], + ["2298", "\\oslash{}"], + ["2299", "\\odot{}"], + ["229a", "\\circledcirc{}"], + ["229b", "\\circledast{}"], + ["229d", "\\circleddash{}"], + ["229e", "\\boxplus{}"], + ["229f", "\\boxminus{}"], + ["22a0", "\\boxtimes{}"], + ["22a1", "\\boxdot{}"], + ["22a2", "\\vdash{}"], + ["22a3", "\\dashv{}"], + ["22a4", "\\top{}"], + ["22a5", "\\perp{}"], + ["22a7", "\\truestate{}"], + ["22a8", "\\forcesextra{}"], + ["22a9", "\\Vdash{}"], + ["22aa", "\\Vvdash{}"], + ["22ab", "\\VDash{}"], + ["22ac", "\\nvdash{}"], + ["22ad", "\\nvDash{}"], + ["22ae", "\\nVdash{}"], + ["22af", "\\nVDash{}"], + ["22b2", "\\vartriangleleft{}"], + ["22b3", "\\vartriangleright{}"], + ["22b4", "\\trianglelefteq{}"], + ["22b5", "\\trianglerighteq{}"], + ["22b6", "\\original{}"], + ["22b7", "\\image{}"], + ["22b8", "\\multimap{}"], + ["22b9", "\\hermitconjmatrix{}"], + ["22ba", "\\intercal{}"], + ["22bb", "\\veebar{}"], + ["22be", "\\rightanglearc{}"], + ["22c0", "\\ElsevierGlyph{22C0}"], + ["22c1", "\\ElsevierGlyph{22C1}"], + ["22c2", "\\bigcap{}"], + ["22c3", "\\bigcup{}"], + ["22c4", "\\diamond{}"], + ["22c5", "\\cdot{}"], + ["22c6", "\\star{}"], + ["22c7", "\\divideontimes{}"], + ["22c8", "\\bowtie{}"], + ["22c9", "\\ltimes{}"], + ["22ca", "\\rtimes{}"], + ["22cb", "\\leftthreetimes{}"], + ["22cc", "\\rightthreetimes{}"], + ["22cd", "\\backsimeq{}"], + ["22ce", "\\curlyvee{}"], + ["22cf", "\\curlywedge{}"], + ["22d0", "\\Subset{}"], + ["22d1", "\\Supset{}"], + ["22d2", "\\Cap{}"], + ["22d3", "\\Cup{}"], + ["22d4", "\\pitchfork{}"], + ["22d6", "\\lessdot{}"], + ["22d7", "\\gtrdot{}"], + ["22d8", "\\verymuchless{}"], + ["22d9", "\\verymuchgreater{}"], + ["22da", "\\lesseqgtr{}"], + ["22db", "\\gtreqless{}"], + ["22de", "\\curlyeqprec{}"], + ["22df", "\\curlyeqsucc{}"], + ["22e2", "\\not\\sqsubseteq{}"], + ["22e3", "\\not\\sqsupseteq{}"], + ["22e5", "\\Elzsqspne{}"], + ["22e6", "\\lnsim{}"], + ["22e7", "\\gnsim{}"], + ["22e8", "\\precedesnotsimilar{}"], + ["22e9", "\\succnsim{}"], + ["22ea", "\\ntriangleleft{}"], + ["22eb", "\\ntriangleright{}"], + ["22ec", "\\ntrianglelefteq{}"], + ["22ed", "\\ntrianglerighteq{}"], + ["22ee", "\\vdots{}"], + ["22ef", "\\cdots{}"], + ["22f0", "\\upslopeellipsis{}"], + ["22f1", "\\downslopeellipsis{}"], + ["2305", "\\barwedge{}"], + ["2306", "\\perspcorrespond{}"], + ["2308", "\\lceil{}"], + ["2309", "\\rceil{}"], + ["230a", "\\lfloor{}"], + ["230b", "\\rfloor{}"], + ["2315", "\\recorder{}"], + ["2316", '\\mathchar"2208'], + ["231c", "\\ulcorner{}"], + ["231d", "\\urcorner{}"], + ["231e", "\\llcorner{}"], + ["231f", "\\lrcorner{}"], + ["2322", "\\frown{}"], + ["2323", "\\smile{}"], + ["2329", "\\langle{}"], + ["232a", "\\rangle{}"], + ["233d", "\\ElsevierGlyph{E838}"], + ["23a3", "\\Elzdlcorn{}"], + ["23b0", "\\lmoustache{}"], + ["23b1", "\\rmoustache{}"], + ["2423", "\\textvisiblespace{}"], + ["2460", "\\ding{172}"], + ["2461", "\\ding{173}"], + ["2462", "\\ding{174}"], + ["2463", "\\ding{175}"], + ["2464", "\\ding{176}"], + ["2465", "\\ding{177}"], + ["2466", "\\ding{178}"], + ["2467", "\\ding{179}"], + ["2468", "\\ding{180}"], + ["2469", "\\ding{181}"], + ["24c8", "\\circledS{}"], + ["2506", "\\Elzdshfnc{}"], + ["2519", "\\Elzsqfnw{}"], + ["2571", "\\diagup{}"], + ["25a0", "\\ding{110}"], + ["25a1", "\\square{}"], + ["25aa", "\\blacksquare{}"], + ["25ad", "\\fbox{~~}"], + ["25af", "\\Elzvrecto{}"], + ["25b1", "\\ElsevierGlyph{E381}"], + ["25b2", "\\ding{115}"], + ["25b3", "\\bigtriangleup{}"], + ["25b4", "\\blacktriangle{}"], + ["25b5", "\\vartriangle{}"], + ["25b8", "\\blacktriangleright{}"], + ["25b9", "\\triangleright{}"], + ["25bc", "\\ding{116}"], + ["25bd", "\\bigtriangledown{}"], + ["25be", "\\blacktriangledown{}"], + ["25bf", "\\triangledown{}"], + ["25c2", "\\blacktriangleleft{}"], + ["25c3", "\\triangleleft{}"], + ["25c6", "\\ding{117}"], + ["25ca", "\\lozenge{}"], + ["25cb", "\\bigcirc{}"], + ["25cf", "\\ding{108}"], + ["25d0", "\\Elzcirfl{}"], + ["25d1", "\\Elzcirfr{}"], + ["25d2", "\\Elzcirfb{}"], + ["25d7", "\\ding{119}"], + ["25d8", "\\Elzrvbull{}"], + ["25e7", "\\Elzsqfl{}"], + ["25e8", "\\Elzsqfr{}"], + ["25ea", "\\Elzsqfse{}"], + ["25ef", "\\bigcirc{}"], + ["2605", "\\ding{72}"], + ["2606", "\\ding{73}"], + ["260e", "\\ding{37}"], + ["261b", "\\ding{42}"], + ["261e", "\\ding{43}"], + ["263e", "\\rightmoon{}"], + ["263f", "\\mercury{}"], + ["2640", "\\venus{}"], + ["2642", "\\male{}"], + ["2643", "\\jupiter{}"], + ["2644", "\\saturn{}"], + ["2645", "\\uranus{}"], + ["2646", "\\neptune{}"], + ["2647", "\\pluto{}"], + ["2648", "\\aries{}"], + ["2649", "\\taurus{}"], + ["264a", "\\gemini{}"], + ["264b", "\\cancer{}"], + ["264c", "\\leo{}"], + ["264d", "\\virgo{}"], + ["264e", "\\libra{}"], + ["264f", "\\scorpio{}"], + ["2650", "\\sagittarius{}"], + ["2651", "\\capricornus{}"], + ["2652", "\\aquarius{}"], + ["2653", "\\pisces{}"], + ["2660", "\\ding{171}"], + ["2662", "\\diamond{}"], + ["2663", "\\ding{168}"], + ["2665", "\\ding{170}"], + ["2666", "\\ding{169}"], + ["2669", "\\quarternote{}"], + ["266a", "\\eighthnote{}"], + ["266d", "\\flat{}"], + ["266e", "\\natural{}"], + ["266f", "\\sharp{}"], + ["2701", "\\ding{33}"], + ["2702", "\\ding{34}"], + ["2703", "\\ding{35}"], + ["2704", "\\ding{36}"], + ["2706", "\\ding{38}"], + ["2707", "\\ding{39}"], + ["2708", "\\ding{40}"], + ["2709", "\\ding{41}"], + ["270c", "\\ding{44}"], + ["270d", "\\ding{45}"], + ["270e", "\\ding{46}"], + ["270f", "\\ding{47}"], + ["2710", "\\ding{48}"], + ["2711", "\\ding{49}"], + ["2712", "\\ding{50}"], + ["2713", "\\ding{51}"], + ["2714", "\\ding{52}"], + ["2715", "\\ding{53}"], + ["2716", "\\ding{54}"], + ["2717", "\\ding{55}"], + ["2718", "\\ding{56}"], + ["2719", "\\ding{57}"], + ["271a", "\\ding{58}"], + ["271b", "\\ding{59}"], + ["271c", "\\ding{60}"], + ["271d", "\\ding{61}"], + ["271e", "\\ding{62}"], + ["271f", "\\ding{63}"], + ["2720", "\\ding{64}"], + ["2721", "\\ding{65}"], + ["2722", "\\ding{66}"], + ["2723", "\\ding{67}"], + ["2724", "\\ding{68}"], + ["2725", "\\ding{69}"], + ["2726", "\\ding{70}"], + ["2727", "\\ding{71}"], + ["2729", "\\ding{73}"], + ["272a", "\\ding{74}"], + ["272b", "\\ding{75}"], + ["272c", "\\ding{76}"], + ["272d", "\\ding{77}"], + ["272e", "\\ding{78}"], + ["272f", "\\ding{79}"], + ["2730", "\\ding{80}"], + ["2731", "\\ding{81}"], + ["2732", "\\ding{82}"], + ["2733", "\\ding{83}"], + ["2734", "\\ding{84}"], + ["2735", "\\ding{85}"], + ["2736", "\\ding{86}"], + ["2737", "\\ding{87}"], + ["2738", "\\ding{88}"], + ["2739", "\\ding{89}"], + ["273a", "\\ding{90}"], + ["273b", "\\ding{91}"], + ["273c", "\\ding{92}"], + ["273d", "\\ding{93}"], + ["273e", "\\ding{94}"], + ["273f", "\\ding{95}"], + ["2740", "\\ding{96}"], + ["2741", "\\ding{97}"], + ["2742", "\\ding{98}"], + ["2743", "\\ding{99}"], + ["2744", "\\ding{100}"], + ["2745", "\\ding{101}"], + ["2746", "\\ding{102}"], + ["2747", "\\ding{103}"], + ["2748", "\\ding{104}"], + ["2749", "\\ding{105}"], + ["274a", "\\ding{106}"], + ["274b", "\\ding{107}"], + ["274d", "\\ding{109}"], + ["274f", "\\ding{111}"], + ["2750", "\\ding{112}"], + ["2751", "\\ding{113}"], + ["2752", "\\ding{114}"], + ["2756", "\\ding{118}"], + ["2758", "\\ding{120}"], + ["2759", "\\ding{121}"], + ["275a", "\\ding{122}"], + ["275b", "\\ding{123}"], + ["275c", "\\ding{124}"], + ["275d", "\\ding{125}"], + ["275e", "\\ding{126}"], + ["2761", "\\ding{161}"], + ["2762", "\\ding{162}"], + ["2763", "\\ding{163}"], + ["2764", "\\ding{164}"], + ["2765", "\\ding{165}"], + ["2766", "\\ding{166}"], + ["2767", "\\ding{167}"], + ["2776", "\\ding{182}"], + ["2777", "\\ding{183}"], + ["2778", "\\ding{184}"], + ["2779", "\\ding{185}"], + ["277a", "\\ding{186}"], + ["277b", "\\ding{187}"], + ["277c", "\\ding{188}"], + ["277d", "\\ding{189}"], + ["277e", "\\ding{190}"], + ["277f", "\\ding{191}"], + ["2780", "\\ding{192}"], + ["2781", "\\ding{193}"], + ["2782", "\\ding{194}"], + ["2783", "\\ding{195}"], + ["2784", "\\ding{196}"], + ["2785", "\\ding{197}"], + ["2786", "\\ding{198}"], + ["2787", "\\ding{199}"], + ["2788", "\\ding{200}"], + ["2789", "\\ding{201}"], + ["278a", "\\ding{202}"], + ["278b", "\\ding{203}"], + ["278c", "\\ding{204}"], + ["278d", "\\ding{205}"], + ["278e", "\\ding{206}"], + ["278f", "\\ding{207}"], + ["2790", "\\ding{208}"], + ["2791", "\\ding{209}"], + ["2792", "\\ding{210}"], + ["2793", "\\ding{211}"], + ["2794", "\\ding{212}"], + ["2798", "\\ding{216}"], + ["2799", "\\ding{217}"], + ["279a", "\\ding{218}"], + ["279b", "\\ding{219}"], + ["279c", "\\ding{220}"], + ["279d", "\\ding{221}"], + ["279e", "\\ding{222}"], + ["279f", "\\ding{223}"], + ["27a0", "\\ding{224}"], + ["27a1", "\\ding{225}"], + ["27a2", "\\ding{226}"], + ["27a3", "\\ding{227}"], + ["27a4", "\\ding{228}"], + ["27a5", "\\ding{229}"], + ["27a6", "\\ding{230}"], + ["27a7", "\\ding{231}"], + ["27a8", "\\ding{232}"], + ["27a9", "\\ding{233}"], + ["27aa", "\\ding{234}"], + ["27ab", "\\ding{235}"], + ["27ac", "\\ding{236}"], + ["27ad", "\\ding{237}"], + ["27ae", "\\ding{238}"], + ["27af", "\\ding{239}"], + ["27b1", "\\ding{241}"], + ["27b2", "\\ding{242}"], + ["27b3", "\\ding{243}"], + ["27b4", "\\ding{244}"], + ["27b5", "\\ding{245}"], + ["27b6", "\\ding{246}"], + ["27b7", "\\ding{247}"], + ["27b8", "\\ding{248}"], + ["27b9", "\\ding{249}"], + ["27ba", "\\ding{250}"], + ["27bb", "\\ding{251}"], + ["27bc", "\\ding{252}"], + ["27bd", "\\ding{253}"], + ["27be", "\\ding{254}"], + ["27f5", "\\longleftarrow{}"], + ["27f6", "\\longrightarrow{}"], + ["27f7", "\\longleftrightarrow{}"], + ["27f8", "\\Longleftarrow{}"], + ["27f9", "\\Longrightarrow{}"], + ["27fa", "\\Longleftrightarrow{}"], + ["27fc", "\\longmapsto{}"], + ["27ff", "\\sim\\joinrel\\leadsto"], + ["2905", "\\ElsevierGlyph{E212}"], + ["2912", "\\UpArrowBar{}"], + ["2913", "\\DownArrowBar{}"], + ["2923", "\\ElsevierGlyph{E20C}"], + ["2924", "\\ElsevierGlyph{E20D}"], + ["2925", "\\ElsevierGlyph{E20B}"], + ["2926", "\\ElsevierGlyph{E20A}"], + ["2927", "\\ElsevierGlyph{E211}"], + ["2928", "\\ElsevierGlyph{E20E}"], + ["2929", "\\ElsevierGlyph{E20F}"], + ["292a", "\\ElsevierGlyph{E210}"], + ["2933", "\\ElsevierGlyph{E21C}"], + ["2936", "\\ElsevierGlyph{E21A}"], + ["2937", "\\ElsevierGlyph{E219}"], + ["2940", "\\Elolarr{}"], + ["2941", "\\Elorarr{}"], + ["2942", "\\ElzRlarr{}"], + ["2944", "\\ElzrLarr{}"], + ["2947", "\\Elzrarrx{}"], + ["294e", "\\LeftRightVector{}"], + ["294f", "\\RightUpDownVector{}"], + ["2950", "\\DownLeftRightVector{}"], + ["2951", "\\LeftUpDownVector{}"], + ["2952", "\\LeftVectorBar{}"], + ["2953", "\\RightVectorBar{}"], + ["2954", "\\RightUpVectorBar{}"], + ["2955", "\\RightDownVectorBar{}"], + ["2956", "\\DownLeftVectorBar{}"], + ["2957", "\\DownRightVectorBar{}"], + ["2958", "\\LeftUpVectorBar{}"], + ["2959", "\\LeftDownVectorBar{}"], + ["295a", "\\LeftTeeVector{}"], + ["295b", "\\RightTeeVector{}"], + ["295c", "\\RightUpTeeVector{}"], + ["295d", "\\RightDownTeeVector{}"], + ["295e", "\\DownLeftTeeVector{}"], + ["295f", "\\DownRightTeeVector{}"], + ["2960", "\\LeftUpTeeVector{}"], + ["2961", "\\LeftDownTeeVector{}"], + ["296e", "\\UpEquilibrium{}"], + ["296f", "\\ReverseUpEquilibrium{}"], + ["2970", "\\RoundImplies{}"], + ["297c", "\\ElsevierGlyph{E214}"], + ["297d", "\\ElsevierGlyph{E215}"], + ["2980", "\\Elztfnc{}"], + ["2985", "\\ElsevierGlyph{3018}"], + ["2986", "\\Elroang{}"], + ["2993", "<\\kern-0.58em("], + ["2994", "\\ElsevierGlyph{E291}"], + ["2999", "\\Elzddfnc{}"], + ["299c", "\\Angle{}"], + ["29a0", "\\Elzlpargt{}"], + ["29b5", "\\ElsevierGlyph{E260}"], + ["29b6", "\\ElsevierGlyph{E61B}"], + ["29ca", "\\ElzLap{}"], + ["29cb", "\\Elzdefas{}"], + ["29cf", "\\LeftTriangleBar{}"], + ["29d0", "\\RightTriangleBar{}"], + ["29dc", "\\ElsevierGlyph{E372}"], + ["29eb", "\\blacklozenge{}"], + ["29f4", "\\RuleDelayed{}"], + ["2a04", "\\Elxuplus{}"], + ["2a05", "\\ElzThr{}"], + ["2a06", "\\Elxsqcup{}"], + ["2a07", "\\ElzInf{}"], + ["2a08", "\\ElzSup{}"], + ["2a0d", "\\ElzCint{}"], + ["2a0f", "\\clockoint{}"], + ["2a10", "\\ElsevierGlyph{E395}"], + ["2a16", "\\sqrint{}"], + ["2a25", "\\ElsevierGlyph{E25A}"], + ["2a2a", "\\ElsevierGlyph{E25B}"], + ["2a2d", "\\ElsevierGlyph{E25C}"], + ["2a2e", "\\ElsevierGlyph{E25D}"], + ["2a2f", "\\ElzTimes{}"], + ["2a34", "\\ElsevierGlyph{E25E}"], + ["2a35", "\\ElsevierGlyph{E25E}"], + ["2a3c", "\\ElsevierGlyph{E259}"], + ["2a3f", "\\amalg{}"], + ["2a53", "\\ElzAnd{}"], + ["2a54", "\\ElzOr{}"], + ["2a55", "\\ElsevierGlyph{E36E}"], + ["2a56", "\\ElOr{}"], + ["2a5e", "\\perspcorrespond{}"], + ["2a5f", "\\Elzminhat{}"], + ["2a63", "\\ElsevierGlyph{225A}"], + ["2a6e", "\\stackrel{*}{=}"], + ["2a75", "\\Equal{}"], + ["2a7d", "\\leqslant{}"], + ["2a7e", "\\geqslant{}"], + ["2a85", "\\lessapprox{}"], + ["2a86", "\\gtrapprox{}"], + ["2a87", "\\lneq{}"], + ["2a88", "\\gneq{}"], + ["2a89", "\\lnapprox{}"], + ["2a8a", "\\gnapprox{}"], + ["2a8b", "\\lesseqqgtr{}"], + ["2a8c", "\\gtreqqless{}"], + ["2a95", "\\eqslantless{}"], + ["2a96", "\\eqslantgtr{}"], + ["2a9d", "\\Pisymbol{ppi020}{117}"], + ["2a9e", "\\Pisymbol{ppi020}{105}"], + ["2aa1", "\\NestedLessLess{}"], + ["2aa2", "\\NestedGreaterGreater{}"], + ["2aaf", "\\preceq{}"], + ["2ab0", "\\succeq{}"], + ["2ab5", "\\precneqq{}"], + ["2ab6", "\\succneqq{}"], + ["2ab7", "\\precapprox{}"], + ["2ab8", "\\succapprox{}"], + ["2ab9", "\\precnapprox{}"], + ["2aba", "\\succnapprox{}"], + ["2ac5", "\\subseteqq{}"], + ["2ac6", "\\supseteqq{}"], + ["2acb", "\\subsetneqq{}"], + ["2acc", "\\supsetneqq{}"], + ["2aeb", "\\ElsevierGlyph{E30D}"], + ["2af6", "\\Elztdcol{}"], + ["2afd", "{{/}\\!\\!{/}}"], + ["300a", "\\ElsevierGlyph{300A}"], + ["300b", "\\ElsevierGlyph{300B}"], + ["3018", "\\ElsevierGlyph{3018}"], + ["3019", "\\ElsevierGlyph{3019}"], + ["301a", "\\openbracketleft{}"], + ["301b", "\\openbracketright{}"], + ["fb00", "ff"], + ["fb01", "fi"], + ["fb02", "fl"], + ["fb03", "ffi"], + ["fb04", "ffl"], + ["d400", "\\mathbf{A}"], + ["d401", "\\mathbf{B}"], + ["d402", "\\mathbf{C}"], + ["d403", "\\mathbf{D}"], + ["d404", "\\mathbf{E}"], + ["d405", "\\mathbf{F}"], + ["d406", "\\mathbf{G}"], + ["d407", "\\mathbf{H}"], + ["d408", "\\mathbf{I}"], + ["d409", "\\mathbf{J}"], + ["d40a", "\\mathbf{K}"], + ["d40b", "\\mathbf{L}"], + ["d40c", "\\mathbf{M}"], + ["d40d", "\\mathbf{N}"], + ["d40e", "\\mathbf{O}"], + ["d40f", "\\mathbf{P}"], + ["d410", "\\mathbf{Q}"], + ["d411", "\\mathbf{R}"], + ["d412", "\\mathbf{S}"], + ["d413", "\\mathbf{T}"], + ["d414", "\\mathbf{U}"], + ["d415", "\\mathbf{V}"], + ["d416", "\\mathbf{W}"], + ["d417", "\\mathbf{X}"], + ["d418", "\\mathbf{Y}"], + ["d419", "\\mathbf{Z}"], + ["d41a", "\\mathbf{a}"], + ["d41b", "\\mathbf{b}"], + ["d41c", "\\mathbf{c}"], + ["d41d", "\\mathbf{d}"], + ["d41e", "\\mathbf{e}"], + ["d41f", "\\mathbf{f}"], + ["d420", "\\mathbf{g}"], + ["d421", "\\mathbf{h}"], + ["d422", "\\mathbf{i}"], + ["d423", "\\mathbf{j}"], + ["d424", "\\mathbf{k}"], + ["d425", "\\mathbf{l}"], + ["d426", "\\mathbf{m}"], + ["d427", "\\mathbf{n}"], + ["d428", "\\mathbf{o}"], + ["d429", "\\mathbf{p}"], + ["d42a", "\\mathbf{q}"], + ["d42b", "\\mathbf{r}"], + ["d42c", "\\mathbf{s}"], + ["d42d", "\\mathbf{t}"], + ["d42e", "\\mathbf{u}"], + ["d42f", "\\mathbf{v}"], + ["d430", "\\mathbf{w}"], + ["d431", "\\mathbf{x}"], + ["d432", "\\mathbf{y}"], + ["d433", "\\mathbf{z}"], + ["d434", "\\mathsl{A}"], + ["d435", "\\mathsl{B}"], + ["d436", "\\mathsl{C}"], + ["d437", "\\mathsl{D}"], + ["d438", "\\mathsl{E}"], + ["d439", "\\mathsl{F}"], + ["d43a", "\\mathsl{G}"], + ["d43b", "\\mathsl{H}"], + ["d43c", "\\mathsl{I}"], + ["d43d", "\\mathsl{J}"], + ["d43e", "\\mathsl{K}"], + ["d43f", "\\mathsl{L}"], + ["d440", "\\mathsl{M}"], + ["d441", "\\mathsl{N}"], + ["d442", "\\mathsl{O}"], + ["d443", "\\mathsl{P}"], + ["d444", "\\mathsl{Q}"], + ["d445", "\\mathsl{R}"], + ["d446", "\\mathsl{S}"], + ["d447", "\\mathsl{T}"], + ["d448", "\\mathsl{U}"], + ["d449", "\\mathsl{V}"], + ["d44a", "\\mathsl{W}"], + ["d44b", "\\mathsl{X}"], + ["d44c", "\\mathsl{Y}"], + ["d44d", "\\mathsl{Z}"], + ["d44e", "\\mathsl{a}"], + ["d44f", "\\mathsl{b}"], + ["d450", "\\mathsl{c}"], + ["d451", "\\mathsl{d}"], + ["d452", "\\mathsl{e}"], + ["d453", "\\mathsl{f}"], + ["d454", "\\mathsl{g}"], + ["d456", "\\mathsl{i}"], + ["d457", "\\mathsl{j}"], + ["d458", "\\mathsl{k}"], + ["d459", "\\mathsl{l}"], + ["d45a", "\\mathsl{m}"], + ["d45b", "\\mathsl{n}"], + ["d45c", "\\mathsl{o}"], + ["d45d", "\\mathsl{p}"], + ["d45e", "\\mathsl{q}"], + ["d45f", "\\mathsl{r}"], + ["d460", "\\mathsl{s}"], + ["d461", "\\mathsl{t}"], + ["d462", "\\mathsl{u}"], + ["d463", "\\mathsl{v}"], + ["d464", "\\mathsl{w}"], + ["d465", "\\mathsl{x}"], + ["d466", "\\mathsl{y}"], + ["d467", "\\mathsl{z}"], + ["d468", "\\mathbit{A}"], + ["d469", "\\mathbit{B}"], + ["d46a", "\\mathbit{C}"], + ["d46b", "\\mathbit{D}"], + ["d46c", "\\mathbit{E}"], + ["d46d", "\\mathbit{F}"], + ["d46e", "\\mathbit{G}"], + ["d46f", "\\mathbit{H}"], + ["d470", "\\mathbit{I}"], + ["d471", "\\mathbit{J}"], + ["d472", "\\mathbit{K}"], + ["d473", "\\mathbit{L}"], + ["d474", "\\mathbit{M}"], + ["d475", "\\mathbit{N}"], + ["d476", "\\mathbit{O}"], + ["d477", "\\mathbit{P}"], + ["d478", "\\mathbit{Q}"], + ["d479", "\\mathbit{R}"], + ["d47a", "\\mathbit{S}"], + ["d47b", "\\mathbit{T}"], + ["d47c", "\\mathbit{U}"], + ["d47d", "\\mathbit{V}"], + ["d47e", "\\mathbit{W}"], + ["d47f", "\\mathbit{X}"], + ["d480", "\\mathbit{Y}"], + ["d481", "\\mathbit{Z}"], + ["d482", "\\mathbit{a}"], + ["d483", "\\mathbit{b}"], + ["d484", "\\mathbit{c}"], + ["d485", "\\mathbit{d}"], + ["d486", "\\mathbit{e}"], + ["d487", "\\mathbit{f}"], + ["d488", "\\mathbit{g}"], + ["d489", "\\mathbit{h}"], + ["d48a", "\\mathbit{i}"], + ["d48b", "\\mathbit{j}"], + ["d48c", "\\mathbit{k}"], + ["d48d", "\\mathbit{l}"], + ["d48e", "\\mathbit{m}"], + ["d48f", "\\mathbit{n}"], + ["d490", "\\mathbit{o}"], + ["d491", "\\mathbit{p}"], + ["d492", "\\mathbit{q}"], + ["d493", "\\mathbit{r}"], + ["d494", "\\mathbit{s}"], + ["d495", "\\mathbit{t}"], + ["d496", "\\mathbit{u}"], + ["d497", "\\mathbit{v}"], + ["d498", "\\mathbit{w}"], + ["d499", "\\mathbit{x}"], + ["d49a", "\\mathbit{y}"], + ["d49b", "\\mathbit{z}"], + ["d49c", "\\mathscr{A}"], + ["d49e", "\\mathscr{C}"], + ["d49f", "\\mathscr{D}"], + ["d4a2", "\\mathscr{G}"], + ["d4a5", "\\mathscr{J}"], + ["d4a6", "\\mathscr{K}"], + ["d4a9", "\\mathscr{N}"], + ["d4aa", "\\mathscr{O}"], + ["d4ab", "\\mathscr{P}"], + ["d4ac", "\\mathscr{Q}"], + ["d4ae", "\\mathscr{S}"], + ["d4af", "\\mathscr{T}"], + ["d4b0", "\\mathscr{U}"], + ["d4b1", "\\mathscr{V}"], + ["d4b2", "\\mathscr{W}"], + ["d4b3", "\\mathscr{X}"], + ["d4b4", "\\mathscr{Y}"], + ["d4b5", "\\mathscr{Z}"], + ["d4b6", "\\mathscr{a}"], + ["d4b7", "\\mathscr{b}"], + ["d4b8", "\\mathscr{c}"], + ["d4b9", "\\mathscr{d}"], + ["d4bb", "\\mathscr{f}"], + ["d4bd", "\\mathscr{h}"], + ["d4be", "\\mathscr{i}"], + ["d4bf", "\\mathscr{j}"], + ["d4c0", "\\mathscr{k}"], + ["d4c1", "\\mathscr{l}"], + ["d4c2", "\\mathscr{m}"], + ["d4c3", "\\mathscr{n}"], + ["d4c5", "\\mathscr{p}"], + ["d4c6", "\\mathscr{q}"], + ["d4c7", "\\mathscr{r}"], + ["d4c8", "\\mathscr{s}"], + ["d4c9", "\\mathscr{t}"], + ["d4ca", "\\mathscr{u}"], + ["d4cb", "\\mathscr{v}"], + ["d4cc", "\\mathscr{w}"], + ["d4cd", "\\mathscr{x}"], + ["d4ce", "\\mathscr{y}"], + ["d4cf", "\\mathscr{z}"], + ["d4d0", "\\mathmit{A}"], + ["d4d1", "\\mathmit{B}"], + ["d4d2", "\\mathmit{C}"], + ["d4d3", "\\mathmit{D}"], + ["d4d4", "\\mathmit{E}"], + ["d4d5", "\\mathmit{F}"], + ["d4d6", "\\mathmit{G}"], + ["d4d7", "\\mathmit{H}"], + ["d4d8", "\\mathmit{I}"], + ["d4d9", "\\mathmit{J}"], + ["d4da", "\\mathmit{K}"], + ["d4db", "\\mathmit{L}"], + ["d4dc", "\\mathmit{M}"], + ["d4dd", "\\mathmit{N}"], + ["d4de", "\\mathmit{O}"], + ["d4df", "\\mathmit{P}"], + ["d4e0", "\\mathmit{Q}"], + ["d4e1", "\\mathmit{R}"], + ["d4e2", "\\mathmit{S}"], + ["d4e3", "\\mathmit{T}"], + ["d4e4", "\\mathmit{U}"], + ["d4e5", "\\mathmit{V}"], + ["d4e6", "\\mathmit{W}"], + ["d4e7", "\\mathmit{X}"], + ["d4e8", "\\mathmit{Y}"], + ["d4e9", "\\mathmit{Z}"], + ["d4ea", "\\mathmit{a}"], + ["d4eb", "\\mathmit{b}"], + ["d4ec", "\\mathmit{c}"], + ["d4ed", "\\mathmit{d}"], + ["d4ee", "\\mathmit{e}"], + ["d4ef", "\\mathmit{f}"], + ["d4f0", "\\mathmit{g}"], + ["d4f1", "\\mathmit{h}"], + ["d4f2", "\\mathmit{i}"], + ["d4f3", "\\mathmit{j}"], + ["d4f4", "\\mathmit{k}"], + ["d4f5", "\\mathmit{l}"], + ["d4f6", "\\mathmit{m}"], + ["d4f7", "\\mathmit{n}"], + ["d4f8", "\\mathmit{o}"], + ["d4f9", "\\mathmit{p}"], + ["d4fa", "\\mathmit{q}"], + ["d4fb", "\\mathmit{r}"], + ["d4fc", "\\mathmit{s}"], + ["d4fd", "\\mathmit{t}"], + ["d4fe", "\\mathmit{u}"], + ["d4ff", "\\mathmit{v}"], + ["d500", "\\mathmit{w}"], + ["d501", "\\mathmit{x}"], + ["d502", "\\mathmit{y}"], + ["d503", "\\mathmit{z}"], + ["d504", "\\mathfrak{A}"], + ["d505", "\\mathfrak{B}"], + ["d507", "\\mathfrak{D}"], + ["d508", "\\mathfrak{E}"], + ["d509", "\\mathfrak{F}"], + ["d50a", "\\mathfrak{G}"], + ["d50d", "\\mathfrak{J}"], + ["d50e", "\\mathfrak{K}"], + ["d50f", "\\mathfrak{L}"], + ["d510", "\\mathfrak{M}"], + ["d511", "\\mathfrak{N}"], + ["d512", "\\mathfrak{O}"], + ["d513", "\\mathfrak{P}"], + ["d514", "\\mathfrak{Q}"], + ["d516", "\\mathfrak{S}"], + ["d517", "\\mathfrak{T}"], + ["d518", "\\mathfrak{U}"], + ["d519", "\\mathfrak{V}"], + ["d51a", "\\mathfrak{W}"], + ["d51b", "\\mathfrak{X}"], + ["d51c", "\\mathfrak{Y}"], + ["d51e", "\\mathfrak{a}"], + ["d51f", "\\mathfrak{b}"], + ["d520", "\\mathfrak{c}"], + ["d521", "\\mathfrak{d}"], + ["d522", "\\mathfrak{e}"], + ["d523", "\\mathfrak{f}"], + ["d524", "\\mathfrak{g}"], + ["d525", "\\mathfrak{h}"], + ["d526", "\\mathfrak{i}"], + ["d527", "\\mathfrak{j}"], + ["d528", "\\mathfrak{k}"], + ["d529", "\\mathfrak{l}"], + ["d52a", "\\mathfrak{m}"], + ["d52b", "\\mathfrak{n}"], + ["d52c", "\\mathfrak{o}"], + ["d52d", "\\mathfrak{p}"], + ["d52e", "\\mathfrak{q}"], + ["d52f", "\\mathfrak{r}"], + ["d530", "\\mathfrak{s}"], + ["d531", "\\mathfrak{t}"], + ["d532", "\\mathfrak{u}"], + ["d533", "\\mathfrak{v}"], + ["d534", "\\mathfrak{w}"], + ["d535", "\\mathfrak{x}"], + ["d536", "\\mathfrak{y}"], + ["d537", "\\mathfrak{z}"], + ["d538", "\\mathbb{A}"], + ["d539", "\\mathbb{B}"], + ["d53b", "\\mathbb{D}"], + ["d53c", "\\mathbb{E}"], + ["d53d", "\\mathbb{F}"], + ["d53e", "\\mathbb{G}"], + ["d540", "\\mathbb{I}"], + ["d541", "\\mathbb{J}"], + ["d542", "\\mathbb{K}"], + ["d543", "\\mathbb{L}"], + ["d544", "\\mathbb{M}"], + ["d546", "\\mathbb{O}"], + ["d54a", "\\mathbb{S}"], + ["d54b", "\\mathbb{T}"], + ["d54c", "\\mathbb{U}"], + ["d54d", "\\mathbb{V}"], + ["d54e", "\\mathbb{W}"], + ["d54f", "\\mathbb{X}"], + ["d550", "\\mathbb{Y}"], + ["d552", "\\mathbb{a}"], + ["d553", "\\mathbb{b}"], + ["d554", "\\mathbb{c}"], + ["d555", "\\mathbb{d}"], + ["d556", "\\mathbb{e}"], + ["d557", "\\mathbb{f}"], + ["d558", "\\mathbb{g}"], + ["d559", "\\mathbb{h}"], + ["d55a", "\\mathbb{i}"], + ["d55b", "\\mathbb{j}"], + ["d55c", "\\mathbb{k}"], + ["d55d", "\\mathbb{l}"], + ["d55e", "\\mathbb{m}"], + ["d55f", "\\mathbb{n}"], + ["d560", "\\mathbb{o}"], + ["d561", "\\mathbb{p}"], + ["d562", "\\mathbb{q}"], + ["d563", "\\mathbb{r}"], + ["d564", "\\mathbb{s}"], + ["d565", "\\mathbb{t}"], + ["d566", "\\mathbb{u}"], + ["d567", "\\mathbb{v}"], + ["d568", "\\mathbb{w}"], + ["d569", "\\mathbb{x}"], + ["d56a", "\\mathbb{y}"], + ["d56b", "\\mathbb{z}"], + ["d56c", "\\mathslbb{A}"], + ["d56d", "\\mathslbb{B}"], + ["d56e", "\\mathslbb{C}"], + ["d56f", "\\mathslbb{D}"], + ["d570", "\\mathslbb{E}"], + ["d571", "\\mathslbb{F}"], + ["d572", "\\mathslbb{G}"], + ["d573", "\\mathslbb{H}"], + ["d574", "\\mathslbb{I}"], + ["d575", "\\mathslbb{J}"], + ["d576", "\\mathslbb{K}"], + ["d577", "\\mathslbb{L}"], + ["d578", "\\mathslbb{M}"], + ["d579", "\\mathslbb{N}"], + ["d57a", "\\mathslbb{O}"], + ["d57b", "\\mathslbb{P}"], + ["d57c", "\\mathslbb{Q}"], + ["d57d", "\\mathslbb{R}"], + ["d57e", "\\mathslbb{S}"], + ["d57f", "\\mathslbb{T}"], + ["d580", "\\mathslbb{U}"], + ["d581", "\\mathslbb{V}"], + ["d582", "\\mathslbb{W}"], + ["d583", "\\mathslbb{X}"], + ["d584", "\\mathslbb{Y}"], + ["d585", "\\mathslbb{Z}"], + ["d586", "\\mathslbb{a}"], + ["d587", "\\mathslbb{b}"], + ["d588", "\\mathslbb{c}"], + ["d589", "\\mathslbb{d}"], + ["d58a", "\\mathslbb{e}"], + ["d58b", "\\mathslbb{f}"], + ["d58c", "\\mathslbb{g}"], + ["d58d", "\\mathslbb{h}"], + ["d58e", "\\mathslbb{i}"], + ["d58f", "\\mathslbb{j}"], + ["d590", "\\mathslbb{k}"], + ["d591", "\\mathslbb{l}"], + ["d592", "\\mathslbb{m}"], + ["d593", "\\mathslbb{n}"], + ["d594", "\\mathslbb{o}"], + ["d595", "\\mathslbb{p}"], + ["d596", "\\mathslbb{q}"], + ["d597", "\\mathslbb{r}"], + ["d598", "\\mathslbb{s}"], + ["d599", "\\mathslbb{t}"], + ["d59a", "\\mathslbb{u}"], + ["d59b", "\\mathslbb{v}"], + ["d59c", "\\mathslbb{w}"], + ["d59d", "\\mathslbb{x}"], + ["d59e", "\\mathslbb{y}"], + ["d59f", "\\mathslbb{z}"], + ["d5a0", "\\mathsf{A}"], + ["d5a1", "\\mathsf{B}"], + ["d5a2", "\\mathsf{C}"], + ["d5a3", "\\mathsf{D}"], + ["d5a4", "\\mathsf{E}"], + ["d5a5", "\\mathsf{F}"], + ["d5a6", "\\mathsf{G}"], + ["d5a7", "\\mathsf{H}"], + ["d5a8", "\\mathsf{I}"], + ["d5a9", "\\mathsf{J}"], + ["d5aa", "\\mathsf{K}"], + ["d5ab", "\\mathsf{L}"], + ["d5ac", "\\mathsf{M}"], + ["d5ad", "\\mathsf{N}"], + ["d5ae", "\\mathsf{O}"], + ["d5af", "\\mathsf{P}"], + ["d5b0", "\\mathsf{Q}"], + ["d5b1", "\\mathsf{R}"], + ["d5b2", "\\mathsf{S}"], + ["d5b3", "\\mathsf{T}"], + ["d5b4", "\\mathsf{U}"], + ["d5b5", "\\mathsf{V}"], + ["d5b6", "\\mathsf{W}"], + ["d5b7", "\\mathsf{X}"], + ["d5b8", "\\mathsf{Y}"], + ["d5b9", "\\mathsf{Z}"], + ["d5ba", "\\mathsf{a}"], + ["d5bb", "\\mathsf{b}"], + ["d5bc", "\\mathsf{c}"], + ["d5bd", "\\mathsf{d}"], + ["d5be", "\\mathsf{e}"], + ["d5bf", "\\mathsf{f}"], + ["d5c0", "\\mathsf{g}"], + ["d5c1", "\\mathsf{h}"], + ["d5c2", "\\mathsf{i}"], + ["d5c3", "\\mathsf{j}"], + ["d5c4", "\\mathsf{k}"], + ["d5c5", "\\mathsf{l}"], + ["d5c6", "\\mathsf{m}"], + ["d5c7", "\\mathsf{n}"], + ["d5c8", "\\mathsf{o}"], + ["d5c9", "\\mathsf{p}"], + ["d5ca", "\\mathsf{q}"], + ["d5cb", "\\mathsf{r}"], + ["d5cc", "\\mathsf{s}"], + ["d5cd", "\\mathsf{t}"], + ["d5ce", "\\mathsf{u}"], + ["d5cf", "\\mathsf{v}"], + ["d5d0", "\\mathsf{w}"], + ["d5d1", "\\mathsf{x}"], + ["d5d2", "\\mathsf{y}"], + ["d5d3", "\\mathsf{z}"], + ["d5d4", "\\mathsfbf{A}"], + ["d5d5", "\\mathsfbf{B}"], + ["d5d6", "\\mathsfbf{C}"], + ["d5d7", "\\mathsfbf{D}"], + ["d5d8", "\\mathsfbf{E}"], + ["d5d9", "\\mathsfbf{F}"], + ["d5da", "\\mathsfbf{G}"], + ["d5db", "\\mathsfbf{H}"], + ["d5dc", "\\mathsfbf{I}"], + ["d5dd", "\\mathsfbf{J}"], + ["d5de", "\\mathsfbf{K}"], + ["d5df", "\\mathsfbf{L}"], + ["d5e0", "\\mathsfbf{M}"], + ["d5e1", "\\mathsfbf{N}"], + ["d5e2", "\\mathsfbf{O}"], + ["d5e3", "\\mathsfbf{P}"], + ["d5e4", "\\mathsfbf{Q}"], + ["d5e5", "\\mathsfbf{R}"], + ["d5e6", "\\mathsfbf{S}"], + ["d5e7", "\\mathsfbf{T}"], + ["d5e8", "\\mathsfbf{U}"], + ["d5e9", "\\mathsfbf{V}"], + ["d5ea", "\\mathsfbf{W}"], + ["d5eb", "\\mathsfbf{X}"], + ["d5ec", "\\mathsfbf{Y}"], + ["d5ed", "\\mathsfbf{Z}"], + ["d5ee", "\\mathsfbf{a}"], + ["d5ef", "\\mathsfbf{b}"], + ["d5f0", "\\mathsfbf{c}"], + ["d5f1", "\\mathsfbf{d}"], + ["d5f2", "\\mathsfbf{e}"], + ["d5f3", "\\mathsfbf{f}"], + ["d5f4", "\\mathsfbf{g}"], + ["d5f5", "\\mathsfbf{h}"], + ["d5f6", "\\mathsfbf{i}"], + ["d5f7", "\\mathsfbf{j}"], + ["d5f8", "\\mathsfbf{k}"], + ["d5f9", "\\mathsfbf{l}"], + ["d5fa", "\\mathsfbf{m}"], + ["d5fb", "\\mathsfbf{n}"], + ["d5fc", "\\mathsfbf{o}"], + ["d5fd", "\\mathsfbf{p}"], + ["d5fe", "\\mathsfbf{q}"], + ["d5ff", "\\mathsfbf{r}"], + ["d600", "\\mathsfbf{s}"], + ["d601", "\\mathsfbf{t}"], + ["d602", "\\mathsfbf{u}"], + ["d603", "\\mathsfbf{v}"], + ["d604", "\\mathsfbf{w}"], + ["d605", "\\mathsfbf{x}"], + ["d606", "\\mathsfbf{y}"], + ["d607", "\\mathsfbf{z}"], + ["d608", "\\mathsfsl{A}"], + ["d609", "\\mathsfsl{B}"], + ["d60a", "\\mathsfsl{C}"], + ["d60b", "\\mathsfsl{D}"], + ["d60c", "\\mathsfsl{E}"], + ["d60d", "\\mathsfsl{F}"], + ["d60e", "\\mathsfsl{G}"], + ["d60f", "\\mathsfsl{H}"], + ["d610", "\\mathsfsl{I}"], + ["d611", "\\mathsfsl{J}"], + ["d612", "\\mathsfsl{K}"], + ["d613", "\\mathsfsl{L}"], + ["d614", "\\mathsfsl{M}"], + ["d615", "\\mathsfsl{N}"], + ["d616", "\\mathsfsl{O}"], + ["d617", "\\mathsfsl{P}"], + ["d618", "\\mathsfsl{Q}"], + ["d619", "\\mathsfsl{R}"], + ["d61a", "\\mathsfsl{S}"], + ["d61b", "\\mathsfsl{T}"], + ["d61c", "\\mathsfsl{U}"], + ["d61d", "\\mathsfsl{V}"], + ["d61e", "\\mathsfsl{W}"], + ["d61f", "\\mathsfsl{X}"], + ["d620", "\\mathsfsl{Y}"], + ["d621", "\\mathsfsl{Z}"], + ["d622", "\\mathsfsl{a}"], + ["d623", "\\mathsfsl{b}"], + ["d624", "\\mathsfsl{c}"], + ["d625", "\\mathsfsl{d}"], + ["d626", "\\mathsfsl{e}"], + ["d627", "\\mathsfsl{f}"], + ["d628", "\\mathsfsl{g}"], + ["d629", "\\mathsfsl{h}"], + ["d62a", "\\mathsfsl{i}"], + ["d62b", "\\mathsfsl{j}"], + ["d62c", "\\mathsfsl{k}"], + ["d62d", "\\mathsfsl{l}"], + ["d62e", "\\mathsfsl{m}"], + ["d62f", "\\mathsfsl{n}"], + ["d630", "\\mathsfsl{o}"], + ["d631", "\\mathsfsl{p}"], + ["d632", "\\mathsfsl{q}"], + ["d633", "\\mathsfsl{r}"], + ["d634", "\\mathsfsl{s}"], + ["d635", "\\mathsfsl{t}"], + ["d636", "\\mathsfsl{u}"], + ["d637", "\\mathsfsl{v}"], + ["d638", "\\mathsfsl{w}"], + ["d639", "\\mathsfsl{x}"], + ["d63a", "\\mathsfsl{y}"], + ["d63b", "\\mathsfsl{z}"], + ["d63c", "\\mathsfbfsl{A}"], + ["d63d", "\\mathsfbfsl{B}"], + ["d63e", "\\mathsfbfsl{C}"], + ["d63f", "\\mathsfbfsl{D}"], + ["d640", "\\mathsfbfsl{E}"], + ["d641", "\\mathsfbfsl{F}"], + ["d642", "\\mathsfbfsl{G}"], + ["d643", "\\mathsfbfsl{H}"], + ["d644", "\\mathsfbfsl{I}"], + ["d645", "\\mathsfbfsl{J}"], + ["d646", "\\mathsfbfsl{K}"], + ["d647", "\\mathsfbfsl{L}"], + ["d648", "\\mathsfbfsl{M}"], + ["d649", "\\mathsfbfsl{N}"], + ["d64a", "\\mathsfbfsl{O}"], + ["d64b", "\\mathsfbfsl{P}"], + ["d64c", "\\mathsfbfsl{Q}"], + ["d64d", "\\mathsfbfsl{R}"], + ["d64e", "\\mathsfbfsl{S}"], + ["d64f", "\\mathsfbfsl{T}"], + ["d650", "\\mathsfbfsl{U}"], + ["d651", "\\mathsfbfsl{V}"], + ["d652", "\\mathsfbfsl{W}"], + ["d653", "\\mathsfbfsl{X}"], + ["d654", "\\mathsfbfsl{Y}"], + ["d655", "\\mathsfbfsl{Z}"], + ["d656", "\\mathsfbfsl{a}"], + ["d657", "\\mathsfbfsl{b}"], + ["d658", "\\mathsfbfsl{c}"], + ["d659", "\\mathsfbfsl{d}"], + ["d65a", "\\mathsfbfsl{e}"], + ["d65b", "\\mathsfbfsl{f}"], + ["d65c", "\\mathsfbfsl{g}"], + ["d65d", "\\mathsfbfsl{h}"], + ["d65e", "\\mathsfbfsl{i}"], + ["d65f", "\\mathsfbfsl{j}"], + ["d660", "\\mathsfbfsl{k}"], + ["d661", "\\mathsfbfsl{l}"], + ["d662", "\\mathsfbfsl{m}"], + ["d663", "\\mathsfbfsl{n}"], + ["d664", "\\mathsfbfsl{o}"], + ["d665", "\\mathsfbfsl{p}"], + ["d666", "\\mathsfbfsl{q}"], + ["d667", "\\mathsfbfsl{r}"], + ["d668", "\\mathsfbfsl{s}"], + ["d669", "\\mathsfbfsl{t}"], + ["d66a", "\\mathsfbfsl{u}"], + ["d66b", "\\mathsfbfsl{v}"], + ["d66c", "\\mathsfbfsl{w}"], + ["d66d", "\\mathsfbfsl{x}"], + ["d66e", "\\mathsfbfsl{y}"], + ["d66f", "\\mathsfbfsl{z}"], + ["d670", "\\mathtt{A}"], + ["d671", "\\mathtt{B}"], + ["d672", "\\mathtt{C}"], + ["d673", "\\mathtt{D}"], + ["d674", "\\mathtt{E}"], + ["d675", "\\mathtt{F}"], + ["d676", "\\mathtt{G}"], + ["d677", "\\mathtt{H}"], + ["d678", "\\mathtt{I}"], + ["d679", "\\mathtt{J}"], + ["d67a", "\\mathtt{K}"], + ["d67b", "\\mathtt{L}"], + ["d67c", "\\mathtt{M}"], + ["d67d", "\\mathtt{N}"], + ["d67e", "\\mathtt{O}"], + ["d67f", "\\mathtt{P}"], + ["d680", "\\mathtt{Q}"], + ["d681", "\\mathtt{R}"], + ["d682", "\\mathtt{S}"], + ["d683", "\\mathtt{T}"], + ["d684", "\\mathtt{U}"], + ["d685", "\\mathtt{V}"], + ["d686", "\\mathtt{W}"], + ["d687", "\\mathtt{X}"], + ["d688", "\\mathtt{Y}"], + ["d689", "\\mathtt{Z}"], + ["d68a", "\\mathtt{a}"], + ["d68b", "\\mathtt{b}"], + ["d68c", "\\mathtt{c}"], + ["d68d", "\\mathtt{d}"], + ["d68e", "\\mathtt{e}"], + ["d68f", "\\mathtt{f}"], + ["d690", "\\mathtt{g}"], + ["d691", "\\mathtt{h}"], + ["d692", "\\mathtt{i}"], + ["d693", "\\mathtt{j}"], + ["d694", "\\mathtt{k}"], + ["d695", "\\mathtt{l}"], + ["d696", "\\mathtt{m}"], + ["d697", "\\mathtt{n}"], + ["d698", "\\mathtt{o}"], + ["d699", "\\mathtt{p}"], + ["d69a", "\\mathtt{q}"], + ["d69b", "\\mathtt{r}"], + ["d69c", "\\mathtt{s}"], + ["d69d", "\\mathtt{t}"], + ["d69e", "\\mathtt{u}"], + ["d69f", "\\mathtt{v}"], + ["d6a0", "\\mathtt{w}"], + ["d6a1", "\\mathtt{x}"], + ["d6a2", "\\mathtt{y}"], + ["d6a3", "\\mathtt{z}"], + ["d6a8", "\\mathbf{\\Alpha}"], + ["d6a9", "\\mathbf{\\Beta}"], + ["d6aa", "\\mathbf{\\Gamma}"], + ["d6ab", "\\mathbf{\\Delta}"], + ["d6ac", "\\mathbf{\\Epsilon}"], + ["d6ad", "\\mathbf{\\Zeta}"], + ["d6ae", "\\mathbf{\\Eta}"], + ["d6af", "\\mathbf{\\Theta}"], + ["d6b0", "\\mathbf{\\Iota}"], + ["d6b1", "\\mathbf{\\Kappa}"], + ["d6b2", "\\mathbf{\\Lambda}"], + ["d6b5", "\\mathbf{\\Xi}"], + ["d6b7", "\\mathbf{\\Pi}"], + ["d6b8", "\\mathbf{\\Rho}"], + ["d6b9", "\\mathbf{\\vartheta}"], + ["d6ba", "\\mathbf{\\Sigma}"], + ["d6bb", "\\mathbf{\\Tau}"], + ["d6bc", "\\mathbf{\\Upsilon}"], + ["d6bd", "\\mathbf{\\Phi}"], + ["d6be", "\\mathbf{\\Chi}"], + ["d6bf", "\\mathbf{\\Psi}"], + ["d6c0", "\\mathbf{\\Omega}"], + ["d6c1", "\\mathbf{\\nabla}"], + ["d6c2", "\\mathbf{\\Alpha}"], + ["d6c3", "\\mathbf{\\Beta}"], + ["d6c4", "\\mathbf{\\Gamma}"], + ["d6c5", "\\mathbf{\\Delta}"], + ["d6c6", "\\mathbf{\\Epsilon}"], + ["d6c7", "\\mathbf{\\Zeta}"], + ["d6c8", "\\mathbf{\\Eta}"], + ["d6c9", "\\mathbf{\\theta}"], + ["d6ca", "\\mathbf{\\Iota}"], + ["d6cb", "\\mathbf{\\Kappa}"], + ["d6cc", "\\mathbf{\\Lambda}"], + ["d6cf", "\\mathbf{\\Xi}"], + ["d6d1", "\\mathbf{\\Pi}"], + ["d6d2", "\\mathbf{\\Rho}"], + ["d6d3", "\\mathbf{\\varsigma}"], + ["d6d4", "\\mathbf{\\Sigma}"], + ["d6d5", "\\mathbf{\\Tau}"], + ["d6d6", "\\mathbf{\\Upsilon}"], + ["d6d7", "\\mathbf{\\Phi}"], + ["d6d8", "\\mathbf{\\Chi}"], + ["d6d9", "\\mathbf{\\Psi}"], + ["d6da", "\\mathbf{\\Omega}"], + ["d6db", "\\partial{}"], + ["d6dc", "\\in"], + ["d6dd", "\\mathbf{\\vartheta}"], + ["d6de", "\\mathbf{\\varkappa}"], + ["d6df", "\\mathbf{\\phi}"], + ["d6e0", "\\mathbf{\\varrho}"], + ["d6e1", "\\mathbf{\\varpi}"], + ["d6e2", "\\mathsl{\\Alpha}"], + ["d6e3", "\\mathsl{\\Beta}"], + ["d6e4", "\\mathsl{\\Gamma}"], + ["d6e5", "\\mathsl{\\Delta}"], + ["d6e6", "\\mathsl{\\Epsilon}"], + ["d6e7", "\\mathsl{\\Zeta}"], + ["d6e8", "\\mathsl{\\Eta}"], + ["d6e9", "\\mathsl{\\Theta}"], + ["d6ea", "\\mathsl{\\Iota}"], + ["d6eb", "\\mathsl{\\Kappa}"], + ["d6ec", "\\mathsl{\\Lambda}"], + ["d6ef", "\\mathsl{\\Xi}"], + ["d6f1", "\\mathsl{\\Pi}"], + ["d6f2", "\\mathsl{\\Rho}"], + ["d6f3", "\\mathsl{\\vartheta}"], + ["d6f4", "\\mathsl{\\Sigma}"], + ["d6f5", "\\mathsl{\\Tau}"], + ["d6f6", "\\mathsl{\\Upsilon}"], + ["d6f7", "\\mathsl{\\Phi}"], + ["d6f8", "\\mathsl{\\Chi}"], + ["d6f9", "\\mathsl{\\Psi}"], + ["d6fa", "\\mathsl{\\Omega}"], + ["d6fb", "\\mathsl{\\nabla}"], + ["d6fc", "\\mathsl{\\Alpha}"], + ["d6fd", "\\mathsl{\\Beta}"], + ["d6fe", "\\mathsl{\\Gamma}"], + ["d6ff", "\\mathsl{\\Delta}"], + ["d700", "\\mathsl{\\Epsilon}"], + ["d701", "\\mathsl{\\Zeta}"], + ["d702", "\\mathsl{\\Eta}"], + ["d703", "\\mathsl{\\Theta}"], + ["d704", "\\mathsl{\\Iota}"], + ["d705", "\\mathsl{\\Kappa}"], + ["d706", "\\mathsl{\\Lambda}"], + ["d709", "\\mathsl{\\Xi}"], + ["d70b", "\\mathsl{\\Pi}"], + ["d70c", "\\mathsl{\\Rho}"], + ["d70d", "\\mathsl{\\varsigma}"], + ["d70e", "\\mathsl{\\Sigma}"], + ["d70f", "\\mathsl{\\Tau}"], + ["d710", "\\mathsl{\\Upsilon}"], + ["d711", "\\mathsl{\\Phi}"], + ["d712", "\\mathsl{\\Chi}"], + ["d713", "\\mathsl{\\Psi}"], + ["d714", "\\mathsl{\\Omega}"], + ["d715", "\\partial{}"], + ["d716", "\\in"], + ["d717", "\\mathsl{\\vartheta}"], + ["d718", "\\mathsl{\\varkappa}"], + ["d719", "\\mathsl{\\phi}"], + ["d71a", "\\mathsl{\\varrho}"], + ["d71b", "\\mathsl{\\varpi}"], + ["d71c", "\\mathbit{\\Alpha}"], + ["d71d", "\\mathbit{\\Beta}"], + ["d71e", "\\mathbit{\\Gamma}"], + ["d71f", "\\mathbit{\\Delta}"], + ["d720", "\\mathbit{\\Epsilon}"], + ["d721", "\\mathbit{\\Zeta}"], + ["d722", "\\mathbit{\\Eta}"], + ["d723", "\\mathbit{\\Theta}"], + ["d724", "\\mathbit{\\Iota}"], + ["d725", "\\mathbit{\\Kappa}"], + ["d726", "\\mathbit{\\Lambda}"], + ["d729", "\\mathbit{\\Xi}"], + ["d72b", "\\mathbit{\\Pi}"], + ["d72c", "\\mathbit{\\Rho}"], + ["d72d", "\\mathbit{O}"], + ["d72e", "\\mathbit{\\Sigma}"], + ["d72f", "\\mathbit{\\Tau}"], + ["d730", "\\mathbit{\\Upsilon}"], + ["d731", "\\mathbit{\\Phi}"], + ["d732", "\\mathbit{\\Chi}"], + ["d733", "\\mathbit{\\Psi}"], + ["d734", "\\mathbit{\\Omega}"], + ["d735", "\\mathbit{\\nabla}"], + ["d736", "\\mathbit{\\Alpha}"], + ["d737", "\\mathbit{\\Beta}"], + ["d738", "\\mathbit{\\Gamma}"], + ["d739", "\\mathbit{\\Delta}"], + ["d73a", "\\mathbit{\\Epsilon}"], + ["d73b", "\\mathbit{\\Zeta}"], + ["d73c", "\\mathbit{\\Eta}"], + ["d73d", "\\mathbit{\\Theta}"], + ["d73e", "\\mathbit{\\Iota}"], + ["d73f", "\\mathbit{\\Kappa}"], + ["d740", "\\mathbit{\\Lambda}"], + ["d743", "\\mathbit{\\Xi}"], + ["d745", "\\mathbit{\\Pi}"], + ["d746", "\\mathbit{\\Rho}"], + ["d747", "\\mathbit{\\varsigma}"], + ["d748", "\\mathbit{\\Sigma}"], + ["d749", "\\mathbit{\\Tau}"], + ["d74a", "\\mathbit{\\Upsilon}"], + ["d74b", "\\mathbit{\\Phi}"], + ["d74c", "\\mathbit{\\Chi}"], + ["d74d", "\\mathbit{\\Psi}"], + ["d74e", "\\mathbit{\\Omega}"], + ["d74f", "\\partial{}"], + ["d750", "\\in"], + ["d751", "\\mathbit{\\vartheta}"], + ["d752", "\\mathbit{\\varkappa}"], + ["d753", "\\mathbit{\\phi}"], + ["d754", "\\mathbit{\\varrho}"], + ["d755", "\\mathbit{\\varpi}"], + ["d756", "\\mathsfbf{\\Alpha}"], + ["d757", "\\mathsfbf{\\Beta}"], + ["d758", "\\mathsfbf{\\Gamma}"], + ["d759", "\\mathsfbf{\\Delta}"], + ["d75a", "\\mathsfbf{\\Epsilon}"], + ["d75b", "\\mathsfbf{\\Zeta}"], + ["d75c", "\\mathsfbf{\\Eta}"], + ["d75d", "\\mathsfbf{\\Theta}"], + ["d75e", "\\mathsfbf{\\Iota}"], + ["d75f", "\\mathsfbf{\\Kappa}"], + ["d760", "\\mathsfbf{\\Lambda}"], + ["d763", "\\mathsfbf{\\Xi}"], + ["d765", "\\mathsfbf{\\Pi}"], + ["d766", "\\mathsfbf{\\Rho}"], + ["d767", "\\mathsfbf{\\vartheta}"], + ["d768", "\\mathsfbf{\\Sigma}"], + ["d769", "\\mathsfbf{\\Tau}"], + ["d76a", "\\mathsfbf{\\Upsilon}"], + ["d76b", "\\mathsfbf{\\Phi}"], + ["d76c", "\\mathsfbf{\\Chi}"], + ["d76d", "\\mathsfbf{\\Psi}"], + ["d76e", "\\mathsfbf{\\Omega}"], + ["d76f", "\\mathsfbf{\\nabla}"], + ["d770", "\\mathsfbf{\\Alpha}"], + ["d771", "\\mathsfbf{\\Beta}"], + ["d772", "\\mathsfbf{\\Gamma}"], + ["d773", "\\mathsfbf{\\Delta}"], + ["d774", "\\mathsfbf{\\Epsilon}"], + ["d775", "\\mathsfbf{\\Zeta}"], + ["d776", "\\mathsfbf{\\Eta}"], + ["d777", "\\mathsfbf{\\Theta}"], + ["d778", "\\mathsfbf{\\Iota}"], + ["d779", "\\mathsfbf{\\Kappa}"], + ["d77a", "\\mathsfbf{\\Lambda}"], + ["d77d", "\\mathsfbf{\\Xi}"], + ["d77f", "\\mathsfbf{\\Pi}"], + ["d780", "\\mathsfbf{\\Rho}"], + ["d781", "\\mathsfbf{\\varsigma}"], + ["d782", "\\mathsfbf{\\Sigma}"], + ["d783", "\\mathsfbf{\\Tau}"], + ["d784", "\\mathsfbf{\\Upsilon}"], + ["d785", "\\mathsfbf{\\Phi}"], + ["d786", "\\mathsfbf{\\Chi}"], + ["d787", "\\mathsfbf{\\Psi}"], + ["d788", "\\mathsfbf{\\Omega}"], + ["d789", "\\partial{}"], + ["d78a", "\\in"], + ["d78b", "\\mathsfbf{\\vartheta}"], + ["d78c", "\\mathsfbf{\\varkappa}"], + ["d78d", "\\mathsfbf{\\phi}"], + ["d78e", "\\mathsfbf{\\varrho}"], + ["d78f", "\\mathsfbf{\\varpi}"], + ["d790", "\\mathsfbfsl{\\Alpha}"], + ["d791", "\\mathsfbfsl{\\Beta}"], + ["d792", "\\mathsfbfsl{\\Gamma}"], + ["d793", "\\mathsfbfsl{\\Delta}"], + ["d794", "\\mathsfbfsl{\\Epsilon}"], + ["d795", "\\mathsfbfsl{\\Zeta}"], + ["d796", "\\mathsfbfsl{\\Eta}"], + ["d797", "\\mathsfbfsl{\\vartheta}"], + ["d798", "\\mathsfbfsl{\\Iota}"], + ["d799", "\\mathsfbfsl{\\Kappa}"], + ["d79a", "\\mathsfbfsl{\\Lambda}"], + ["d79d", "\\mathsfbfsl{\\Xi}"], + ["d79f", "\\mathsfbfsl{\\Pi}"], + ["d7a0", "\\mathsfbfsl{\\Rho}"], + ["d7a1", "\\mathsfbfsl{\\vartheta}"], + ["d7a2", "\\mathsfbfsl{\\Sigma}"], + ["d7a3", "\\mathsfbfsl{\\Tau}"], + ["d7a4", "\\mathsfbfsl{\\Upsilon}"], + ["d7a5", "\\mathsfbfsl{\\Phi}"], + ["d7a6", "\\mathsfbfsl{\\Chi}"], + ["d7a7", "\\mathsfbfsl{\\Psi}"], + ["d7a8", "\\mathsfbfsl{\\Omega}"], + ["d7a9", "\\mathsfbfsl{\\nabla}"], + ["d7aa", "\\mathsfbfsl{\\Alpha}"], + ["d7ab", "\\mathsfbfsl{\\Beta}"], + ["d7ac", "\\mathsfbfsl{\\Gamma}"], + ["d7ad", "\\mathsfbfsl{\\Delta}"], + ["d7ae", "\\mathsfbfsl{\\Epsilon}"], + ["d7af", "\\mathsfbfsl{\\Zeta}"], + ["d7b0", "\\mathsfbfsl{\\Eta}"], + ["d7b1", "\\mathsfbfsl{\\vartheta}"], + ["d7b2", "\\mathsfbfsl{\\Iota}"], + ["d7b3", "\\mathsfbfsl{\\Kappa}"], + ["d7b4", "\\mathsfbfsl{\\Lambda}"], + ["d7b7", "\\mathsfbfsl{\\Xi}"], + ["d7b9", "\\mathsfbfsl{\\Pi}"], + ["d7ba", "\\mathsfbfsl{\\Rho}"], + ["d7bb", "\\mathsfbfsl{\\varsigma}"], + ["d7bc", "\\mathsfbfsl{\\Sigma}"], + ["d7bd", "\\mathsfbfsl{\\Tau}"], + ["d7be", "\\mathsfbfsl{\\Upsilon}"], + ["d7bf", "\\mathsfbfsl{\\Phi}"], + ["d7c0", "\\mathsfbfsl{\\Chi}"], + ["d7c1", "\\mathsfbfsl{\\Psi}"], + ["d7c2", "\\mathsfbfsl{\\Omega}"], + ["d7c3", "\\partial{}"], + ["d7c4", "\\in"], + ["d7c5", "\\mathsfbfsl{\\vartheta}"], + ["d7c6", "\\mathsfbfsl{\\varkappa}"], + ["d7c7", "\\mathsfbfsl{\\phi}"], + ["d7c8", "\\mathsfbfsl{\\varrho}"], + ["d7c9", "\\mathsfbfsl{\\varpi}"], + ["d7ce", "\\mathbf{0}"], + ["d7cf", "\\mathbf{1}"], + ["d7d0", "\\mathbf{2}"], + ["d7d1", "\\mathbf{3}"], + ["d7d2", "\\mathbf{4}"], + ["d7d3", "\\mathbf{5}"], + ["d7d4", "\\mathbf{6}"], + ["d7d5", "\\mathbf{7}"], + ["d7d6", "\\mathbf{8}"], + ["d7d7", "\\mathbf{9}"], + ["d7d8", "\\mathbb{0}"], + ["d7d9", "\\mathbb{1}"], + ["d7da", "\\mathbb{2}"], + ["d7db", "\\mathbb{3}"], + ["d7dc", "\\mathbb{4}"], + ["d7dd", "\\mathbb{5}"], + ["d7de", "\\mathbb{6}"], + ["d7df", "\\mathbb{7}"], + ["d7e0", "\\mathbb{8}"], + ["d7e1", "\\mathbb{9}"], + ["d7e2", "\\mathsf{0}"], + ["d7e3", "\\mathsf{1}"], + ["d7e4", "\\mathsf{2}"], + ["d7e5", "\\mathsf{3}"], + ["d7e6", "\\mathsf{4}"], + ["d7e7", "\\mathsf{5}"], + ["d7e8", "\\mathsf{6}"], + ["d7e9", "\\mathsf{7}"], + ["d7ea", "\\mathsf{8}"], + ["d7eb", "\\mathsf{9}"], + ["d7ec", "\\mathsfbf{0}"], + ["d7ed", "\\mathsfbf{1}"], + ["d7ee", "\\mathsfbf{2}"], + ["d7ef", "\\mathsfbf{3}"], + ["d7f0", "\\mathsfbf{4}"], + ["d7f1", "\\mathsfbf{5}"], + ["d7f2", "\\mathsfbf{6}"], + ["d7f3", "\\mathsfbf{7}"], + ["d7f4", "\\mathsfbf{8}"], + ["d7f5", "\\mathsfbf{9}"], + ["d7f6", "\\mathtt{0}"], + ["d7f7", "\\mathtt{1}"], + ["d7f8", "\\mathtt{2}"], + ["d7f9", "\\mathtt{3}"], + ["d7fa", "\\mathtt{4}"], + ["d7fb", "\\mathtt{5}"], + ["d7fc", "\\mathtt{6}"], + ["d7fd", "\\mathtt{7}"], + ["d7fe", "\\mathtt{8}"], + ["d7ff", "\\mathtt{9}"] +]); + +// src/modifiers/escapeCharactersModifier.ts +var VERBATIM_FIELDS = [ + "url", + "doi", + "eprint", + "file", + "verba", + "verbb", + "verbc", + "pdf" +]; +var escapeCharactersModifier = { + condition: /* @__PURE__ */ __name((fieldName, options) => Boolean(options.escape && !VERBATIM_FIELDS.includes(fieldName)), "condition"), + modifyRenderedValue: /* @__PURE__ */ __name((str) => { + let result = str; + const mathExpressions = []; + result = result.replace(/\$[^$]+\$/g, (match) => { + mathExpressions.push(match); + return `MATH.EXP.${mathExpressions.length - 1}`; + }); + let newstr = ""; + let escapeMode = false; + for (let i = 0; i < result.length; i++) { + if (escapeMode) { + escapeMode = false; + newstr += result[i]; + continue; } - case "concat": { - if (isWhitespace(char)) { - break; - } - if (node.canConsumeValue) { - if (/[#=,}()[\]]/.test(char)) { - throw new BibTeXSyntaxError(input, node, i, line, column); - } - node.canConsumeValue = false; - if (char === "{") { - node = new BracedNode(node); - } else if (char === '"') { - node = new QuotedNode(node); - } else { - node = new LiteralNode(node, char); - } - } else { - if (char === ",") { - node = new FieldNode(node.parent.parent); - } else if (char === "}" || char === ")") { - node = node.parent.parent.parent.parent; - } else if (char === "#") { - node.canConsumeValue = true; - } else { - throw new BibTeXSyntaxError(input, node, i, line, column); - } - } - break; + if (result[i] === "\\") { + escapeMode = true; + newstr += result[i]; + continue; } - case "literal": - if (isWhitespace(char)) { - node = node.parent; - } else if (char === ",") { - node = new FieldNode(node.parent.parent.parent); - } else if (char === "}") { - node = node.parent.parent.parent.parent.parent; - } else if (char === "#") { - node = node.parent; - node.canConsumeValue = true; - } else { - node.value += char; - } - break; - // Values may be enclosed in curly braces. Curly braces may be used within - // the value but they must be balanced. - case "braced": - if (char === "}" && node.depth === 0) { - node = node.parent; - break; - } - if (char === "{") { - node.depth++; - } else if (char === "}") { - node.depth--; - } - node.value += char; - break; - // Values may be enclosed in double quotes. Curly braces may be used - // within quoted values but they must be balanced. - // - // To escape a double quote, surround it with braces `{"}`. - // https://web.archive.org/web/20210422110817/https://maverick.inria.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html - case "quoted": - if (char === '"' && node.depth === 0) { - node = node.parent; - break; - } - if (char === "{") { - node.depth++; - } else if (char === "}") { - node.depth--; - if (node.depth < 0) { - throw new BibTeXSyntaxError(input, node, i, line, column); - } - } - node.value += char; - break; + const c = result.charCodeAt(i).toString(16).padStart(4, "0"); + newstr += specialCharacters.get(c) ?? result[i]; } - } - return rootNode; -} -__name(generateAST, "generateAST"); -function isWhitespace(string) { - return /^[ \t\n\r]*$/.test(string); -} -__name(isWhitespace, "isWhitespace"); -function isValidKeyCharacter(char) { - return !/[#%{}~$,]/.test(char); -} -__name(isValidKeyCharacter, "isValidKeyCharacter"); -function isValidFieldName(char) { - return !/[=,{}()[\]]/.test(char); -} -__name(isValidFieldName, "isValidFieldName"); -var BibTeXSyntaxError = class extends Error { - constructor(input, node, pos, line, column, hint) { - super( - `Line ${line}:${column}: Syntax Error in ${node.type} (${hint}) -${input.slice(Math.max(0, pos - 20), pos)}>>${input[pos]}<<${input.slice(pos + 1, pos + 20)}` + return newstr.replace( + /MATH\.EXP\.(\d+)/g, + (_, i) => mathExpressions[Number(i)] ?? "" ); - this.node = node; - this.line = line; - this.column = column; - this.hint = hint; - this.name = "Syntax Error"; - this.char = input[pos] ?? ""; - } - static { - __name(this, "BibTeXSyntaxError"); - } + }, "modifyRenderedValue") +}; + +// src/modifiers/formatPageRangeModifier.ts +var formatPageRangeModifier = { + condition: /* @__PURE__ */ __name((fieldName) => fieldName === "pages", "condition"), + modifyRenderedValue: /* @__PURE__ */ __name((str) => { + let result = str; + for (let i = 0; i < 4; i++) { + result = result.replace(/(\d)\s*-\s*(\d)/g, "$1--$2"); + } + return result; + }, "modifyRenderedValue") +}; + +// src/modifiers/limitAuthorsModifier.ts +var limitAuthorsModifier = { + condition: /* @__PURE__ */ __name((fieldName, options) => fieldName === "author" && options.maxAuthors ? options.maxAuthors : false, "condition"), + modifyRenderedValue: /* @__PURE__ */ __name((str, maxAuthors) => { + const authors = str.split(" and "); + if (authors.length > maxAuthors) { + return [...authors.slice(0, maxAuthors), "others"].join(" and "); + } + return str; + }, "modifyRenderedValue") +}; + +// src/modifiers/removeBracesModifier.ts +var removeBracesModifier = { + condition: /* @__PURE__ */ __name((fieldName, options) => Boolean( + options.removeBraces?.some((f) => f.toLocaleLowerCase() === fieldName) + ), "condition"), + // TODO: memoize + modifyRenderedValue: /* @__PURE__ */ __name((str) => stringifyLaTeX(flattenLaTeX(parseLaTeX(str))), "modifyRenderedValue") +}; + +// src/modifiers/stripEnclosingBracesModifier.ts +var stripEnclosingBracesModifier = { + condition: /* @__PURE__ */ __name((_, options) => Boolean(options.stripEnclosingBraces), "condition"), + modifyRenderedValue: /* @__PURE__ */ __name((str) => str.replace(/^\{([^{}]*)\}$/g, "$1"), "modifyRenderedValue") }; // src/sort.ts @@ -4483,13 +4503,51 @@ __name(sortEntryFields, "sortEntryFields"); function tidy(input, options_ = {}) { const options = normalizeOptions(options_); const inputFixed = convertCRLF(input); - const ast = generateAST(inputFixed); - const entries = getEntries2(ast); - const warnings = getEntries2(ast).filter((entry) => !entry.key).map((entry) => ({ + const ast = parseBibTeX(inputFixed); + const entries = getEntries(ast); + const warnings = entries.filter((entry) => !entry.key).map((entry) => ({ code: "MISSING_KEY", message: `${entry.parent.command} entry does not have a citation key.` })); const cache = new Cache(options); + const valueModifiers = [ + encodeUrlsModifier, + limitAuthorsModifier, + escapeCharactersModifier, + dropAllCapsModifier, + formatPageRangeModifier, + abbreviateMonthsModifier, + stripEnclosingBracesModifier, + removeBracesModifier + ]; + for (const entry of entries) { + for (const field of entry.fields) { + for (const modifier of valueModifiers) { + const params = modifier.condition( + field.name.toLocaleLowerCase(), + options, + entry, + cache + ); + if (!params) continue; + if (modifier.modifyNode) { + modifier.modifyNode(field, params); + cache.invalidateEntryValue(entry, field.name); + } + for (const node of field.value.concat) { + if (node.type === "braced" || node.type === "quoted") { + if (modifier.modifyRenderedValue) { + const newValue = modifier.modifyRenderedValue(node.value, params); + if (newValue !== node.value) { + node.value = newValue; + cache.invalidateEntryValue(entry, field.name); + } + } + } + } + } + } + } const duplicates = checkForDuplicates( entries, cache, @@ -4507,10 +4565,10 @@ function tidy(input, options_ = {}) { return { bibtex, warnings, count: entries.length }; } __name(tidy, "tidy"); -function getEntries2(ast) { +function getEntries(ast) { return ast.children.filter(isEntryNode).map((node) => node.block); } -__name(getEntries2, "getEntries"); +__name(getEntries, "getEntries"); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { getEntries, diff --git a/bin/bibtex-tidy b/bin/bibtex-tidy index 87b22cd..601ad70 100755 --- a/bin/bibtex-tidy +++ b/bin/bibtex-tidy @@ -405,2379 +405,7 @@ function flattenLaTeX(block) { return newBlock; } -// src/unicode.ts -var specialCharacters = /* @__PURE__ */ new Map([ - ["0023", "\\#"], - ["0024", "\\$"], - ["0025", "\\%"], - ["0026", "\\&"], - ["0027", "'"], - ["0040", "\\@"], - ["002a", "\\textasteriskcentered"], - ["005f", "\\_"], - ["007c", "\\vert{}"], - ["00a0", "~"], - ["00a1", "\\textexclamdown{}"], - ["00a2", "\\textcent{}"], - ["00a3", "\\textsterling{}"], - ["00a4", "\\textcurrency{}"], - ["00a5", "\\textyen{}"], - ["00a6", "\\textbrokenbar{}"], - ["00a7", "\\textsection{}"], - ["00a8", "\\textasciidieresis{}"], - ["00a9", "\\textcopyright{}"], - ["00aa", "\\textordfeminine{}"], - ["00ab", "\\guillemotleft{}"], - ["00ac", "\\lnot{}"], - ["00ad", "\\-"], - ["00ae", "\\textregistered{}"], - ["00af", "\\textasciimacron{}"], - ["00b0", "\\textdegree{}"], - ["00b1", "\\pm{}"], - ["00b2", "\\ensuremath{^2}"], - ["00b3", "\\ensuremath{^3}"], - ["00b4", "\\textasciiacute{}"], - ["00b5", "\\mathrm{\\mu}"], - ["00b6", "\\textparagraph{}"], - ["00b7", "\\cdot{}"], - ["00b8", "\\c{}"], - ["00b9", "\\ensuremath{^1}"], - ["00ba", "\\textordmasculine{}"], - ["00bb", "\\guillemotright{}"], - ["00bc", "\\textonequarter{}"], - ["00bd", "\\textonehalf{}"], - ["00be", "\\textthreequarters{}"], - ["00bf", "\\textquestiondown{}"], - ["00c0", "\\`{A}"], - ["00c1", "\\'{A}"], - ["00c2", "\\^{A}"], - ["00c3", "\\~{A}"], - ["00c4", '\\"{A}'], - ["00c5", "\\AA{}"], - ["00c6", "\\AE{}"], - ["00c7", "\\c{C}"], - ["00c8", "\\`{E}"], - ["00c9", "\\'{E}"], - ["00ca", "\\^{E}"], - ["00cb", '\\"{E}'], - ["00cc", "\\`{I}"], - ["00cd", "\\'{I}"], - ["00ce", "\\^{I}"], - ["00cf", '\\"{I}'], - ["00d0", "\\DH{}"], - ["00d1", "\\~{N}"], - ["00d2", "\\`{O}"], - ["00d3", "\\'{O}"], - ["00d4", "\\^{O}"], - ["00d5", "\\~{O}"], - ["00d6", '\\"{O}'], - ["00d7", "\\texttimes{}"], - ["00d8", "\\O{}"], - ["00d9", "\\`{U}"], - ["00da", "\\'{U}"], - ["00db", "\\^{U}"], - ["00dc", '\\"{U}'], - ["00dd", "\\'{Y}"], - ["00de", "\\TH{}"], - ["00df", "\\ss{}"], - ["00e0", "\\`{a}"], - ["00e1", "\\'{a}"], - ["00e2", "\\^{a}"], - ["00e3", "\\~{a}"], - ["00e4", '\\"{a}'], - ["00e5", "\\aa{}"], - ["00e6", "\\ae{}"], - ["00e7", "\\c{c}"], - ["00e8", "\\`{e}"], - ["00e9", "\\'{e}"], - ["00ea", "\\^{e}"], - ["00eb", '\\"{e}'], - ["00ec", "\\`{\\i}"], - ["00ed", "\\'{\\i}"], - ["00ee", "\\^{\\i}"], - ["00ef", '\\"{\\i}'], - ["00f0", "\\dh{}"], - ["00f1", "\\~{n}"], - ["00f2", "\\`{o}"], - ["00f3", "\\'{o}"], - ["00f4", "\\^{o}"], - ["00f5", "\\~{o}"], - ["00f6", '\\"{o}'], - ["00f7", "\\div{}"], - ["00f8", "\\o{}"], - ["00f9", "\\`{u}"], - ["00fa", "\\'{u}"], - ["00fb", "\\^{u}"], - ["00fc", '\\"{u}'], - ["00fd", "\\'{y}"], - ["00fe", "\\th{}"], - ["00ff", '\\"{y}'], - ["0100", "\\={A}"], - ["0101", "\\={a}"], - ["0102", "\\u{A}"], - ["0103", "\\u{a}"], - ["0104", "\\k{A}"], - ["0105", "\\k{a}"], - ["0106", "\\'{C}"], - ["0107", "\\'{c}"], - ["0108", "\\^{C}"], - ["0109", "\\^{c}"], - ["010a", "\\.{C}"], - ["010b", "\\.{c}"], - ["010c", "\\v{C}"], - ["010d", "\\v{c}"], - ["010e", "\\v{D}"], - ["010f", "\\v{d}"], - ["0110", "\\DJ{}"], - ["0111", "\\dj{}"], - ["0112", "\\={E}"], - ["0113", "\\={e}"], - ["0114", "\\u{E}"], - ["0115", "\\u{e}"], - ["0116", "\\.{E}"], - ["0117", "\\.{e}"], - ["0118", "\\k{E}"], - ["0119", "\\k{e}"], - ["011a", "\\v{E}"], - ["011b", "\\v{e}"], - ["011c", "\\^{G}"], - ["011d", "\\^{g}"], - ["011e", "\\u{G}"], - ["011f", "\\u{g}"], - ["0120", "\\.{G}"], - ["0121", "\\.{g}"], - ["0122", "\\c{G}"], - ["0123", "\\c{g}"], - ["0124", "\\^{H}"], - ["0125", "\\^{h}"], - ["0126", "{\\fontencoding{LELA}\\selectfont\\char40}"], - ["0127", "\\Elzxh{}"], - ["0128", "\\~{I}"], - ["0129", "\\~{\\i}"], - ["012a", "\\={I}"], - ["012b", "\\={\\i}"], - ["012c", "\\u{I}"], - ["012d", "\\u{\\i}"], - ["012e", "\\k{I}"], - ["012f", "\\k{i}"], - ["0130", "\\.{I}"], - ["0131", "\\i{}"], - ["0132", "IJ"], - ["0133", "ij"], - ["0134", "\\^{J}"], - ["0135", "\\^{\\j}"], - ["0136", "\\c{K}"], - ["0137", "\\c{k}"], - ["0138", "{\\fontencoding{LELA}\\selectfont\\char91}"], - ["0139", "\\'{L}"], - ["013a", "\\'{l}"], - ["013b", "\\c{L}"], - ["013c", "\\c{l}"], - ["013d", "\\v{L}"], - ["013e", "\\v{l}"], - ["013f", "{\\fontencoding{LELA}\\selectfont\\char201}"], - ["0140", "{\\fontencoding{LELA}\\selectfont\\char202}"], - ["0141", "\\L{}"], - ["0142", "\\l{}"], - ["0143", "\\'{N}"], - ["0144", "\\'{n}"], - ["0145", "\\c{N}"], - ["0146", "\\c{n}"], - ["0147", "\\v{N}"], - ["0148", "\\v{n}"], - ["0149", "'n"], - ["014a", "\\NG{}"], - ["014b", "\\ng{}"], - ["014c", "\\={O}"], - ["014d", "\\={o}"], - ["014e", "\\u{O}"], - ["014f", "\\u{o}"], - ["0150", "\\H{O}"], - ["0151", "\\H{o}"], - ["0152", "\\OE{}"], - ["0153", "\\oe{}"], - ["0154", "\\'{R}"], - ["0155", "\\'{r}"], - ["0156", "\\c{R}"], - ["0157", "\\c{r}"], - ["0158", "\\v{R}"], - ["0159", "\\v{r}"], - ["015a", "\\'{S}"], - ["015b", "\\'{s}"], - ["015c", "\\^{S}"], - ["015d", "\\^{s}"], - ["015e", "\\c{S}"], - ["015f", "\\c{s}"], - ["0160", "\\v{S}"], - ["0161", "\\v{s}"], - ["0162", "\\c{T}"], - ["0163", "\\c{t}"], - ["0164", "\\v{T}"], - ["0165", "\\v{t}"], - ["0166", "{\\fontencoding{LELA}\\selectfont\\char47}"], - ["0167", "{\\fontencoding{LELA}\\selectfont\\char63}"], - ["0168", "\\~{U}"], - ["0169", "\\~{u}"], - ["016a", "\\={U}"], - ["016b", "\\={u}"], - ["016c", "\\u{U}"], - ["016d", "\\u{u}"], - ["016e", "\\r{U}"], - ["016f", "\\r{u}"], - ["0170", "\\H{U}"], - ["0171", "\\H{u}"], - ["0172", "\\k{U}"], - ["0173", "\\k{u}"], - ["0174", "\\^{W}"], - ["0175", "\\^{w}"], - ["0176", "\\^{Y}"], - ["0177", "\\^{y}"], - ["0178", '\\"{Y}'], - ["0179", "\\'{Z}"], - ["017a", "\\'{z}"], - ["017b", "\\.{Z}"], - ["017c", "\\.{z}"], - ["017d", "\\v{Z}"], - ["017e", "\\v{z}"], - ["0195", "\\texthvlig{}"], - ["019e", "\\textnrleg{}"], - ["01aa", "\\eth{}"], - ["01ba", "{\\fontencoding{LELA}\\selectfont\\char195}"], - ["01c2", "\\textdoublepipe{}"], - ["01f5", "\\'{g}"], - ["0250", "\\Elztrna{}"], - ["0252", "\\Elztrnsa{}"], - ["0254", "\\Elzopeno{}"], - ["0256", "\\Elzrtld{}"], - ["0258", "{\\fontencoding{LEIP}\\selectfont\\char61}"], - ["0259", "\\Elzschwa{}"], - ["025b", "\\varepsilon{}"], - ["0263", "\\Elzpgamma{}"], - ["0264", "\\Elzpbgam{}"], - ["0265", "\\Elztrnh{}"], - ["026c", "\\Elzbtdl{}"], - ["026d", "\\Elzrtll{}"], - ["026f", "\\Elztrnm{}"], - ["0270", "\\Elztrnmlr{}"], - ["0271", "\\Elzltlmr{}"], - ["0272", "\\Elzltln{}"], - ["0273", "\\Elzrtln{}"], - ["0277", "\\Elzclomeg{}"], - ["0278", "\\textphi{}"], - ["0279", "\\Elztrnr{}"], - ["027a", "\\Elztrnrl{}"], - ["027b", "\\Elzrttrnr{}"], - ["027c", "\\Elzrl{}"], - ["027d", "\\Elzrtlr{}"], - ["027e", "\\Elzfhr{}"], - ["027f", "{\\fontencoding{LEIP}\\selectfont\\char202}"], - ["0282", "\\Elzrtls{}"], - ["0283", "\\Elzesh{}"], - ["0287", "\\Elztrnt{}"], - ["0288", "\\Elzrtlt{}"], - ["028a", "\\Elzpupsil{}"], - ["028b", "\\Elzpscrv{}"], - ["028c", "\\Elzinvv{}"], - ["028d", "\\Elzinvw{}"], - ["028e", "\\Elztrny{}"], - ["0290", "\\Elzrtlz{}"], - ["0292", "\\Elzyogh{}"], - ["0294", "\\Elzglst{}"], - ["0295", "\\Elzreglst{}"], - ["0296", "\\Elzinglst{}"], - ["029e", "\\textturnk{}"], - ["02a4", "\\Elzdyogh{}"], - ["02a7", "\\Elztesh{}"], - ["02c7", "\\textasciicaron{}"], - ["02c8", "\\Elzverts{}"], - ["02cc", "\\Elzverti{}"], - ["02d0", "\\Elzlmrk{}"], - ["02d1", "\\Elzhlmrk{}"], - ["02d2", "\\Elzsbrhr{}"], - ["02d3", "\\Elzsblhr{}"], - ["02d4", "\\Elzrais{}"], - ["02d5", "\\Elzlow{}"], - ["02d8", "\\textasciibreve{}"], - ["02d9", "\\textperiodcentered{}"], - ["02da", "\\r{}"], - ["02db", "\\k{}"], - ["02dc", "\\texttildelow{}"], - ["02dd", "\\H{}"], - ["02e5", "\\tone{55}"], - ["02e6", "\\tone{44}"], - ["02e7", "\\tone{33}"], - ["02e8", "\\tone{22}"], - ["02e9", "\\tone{11}"], - ["0300", "\\`"], - ["0301", "\\'"], - ["0302", "\\^"], - ["0303", "\\~"], - ["0304", "\\="], - ["0306", "\\u"], - ["0307", "\\."], - ["0308", '\\"'], - ["030a", "\\r"], - ["030b", "\\H"], - ["030c", "\\v"], - ["030f", "\\cyrchar\\C"], - ["0311", "{\\fontencoding{LECO}\\selectfont\\char177}"], - ["0318", "{\\fontencoding{LECO}\\selectfont\\char184}"], - ["0319", "{\\fontencoding{LECO}\\selectfont\\char185}"], - ["0321", "\\Elzpalh{}"], - ["0322", "\\Elzrh{}"], - ["0327", "\\c"], - ["0328", "\\k"], - ["032a", "\\Elzsbbrg{}"], - ["032b", "{\\fontencoding{LECO}\\selectfont\\char203}"], - ["032f", "{\\fontencoding{LECO}\\selectfont\\char207}"], - ["0335", "\\Elzxl{}"], - ["0336", "\\Elzbar{}"], - ["0337", "{\\fontencoding{LECO}\\selectfont\\char215}"], - ["0338", "{\\fontencoding{LECO}\\selectfont\\char216}"], - ["033a", "{\\fontencoding{LECO}\\selectfont\\char218}"], - ["033b", "{\\fontencoding{LECO}\\selectfont\\char219}"], - ["033c", "{\\fontencoding{LECO}\\selectfont\\char220}"], - ["033d", "{\\fontencoding{LECO}\\selectfont\\char221}"], - ["0361", "{\\fontencoding{LECO}\\selectfont\\char225}"], - ["0386", "\\'{A}"], - ["0388", "\\'{E}"], - ["0389", "\\'{H}"], - ["038a", "\\'{}{I}"], - ["038c", "\\'{}O"], - ["038e", "\\mathrm{'Y}"], - ["038f", "\\mathrm{'\\Omega}"], - ["0390", "\\acute{\\ddot{\\iota}}"], - ["0391", "\\ensuremath{\\Alpha}"], - ["0392", "\\ensuremath{\\Beta}"], - ["0393", "\\ensuremath{\\Gamma}"], - ["0394", "\\ensuremath{\\Delta}"], - ["0395", "\\ensuremath{\\Epsilon}"], - ["0396", "\\ensuremath{\\Zeta}"], - ["0397", "\\ensuremath{\\Eta}"], - ["0398", "\\ensuremath{\\Theta}"], - ["0399", "\\ensuremath{\\Iota}"], - ["039a", "\\ensuremath{\\Kappa}"], - ["039b", "\\ensuremath{\\Lambda}"], - ["039e", "\\ensuremath{\\Xi}"], - ["03a0", "\\ensuremath{\\Pi}"], - ["03a1", "\\ensuremath{\\Rho}"], - ["03a3", "\\ensuremath{\\Sigma}"], - ["03a4", "\\ensuremath{\\Tau}"], - ["03a5", "\\ensuremath{\\Upsilon}"], - ["03a6", "\\ensuremath{\\Phi}"], - ["03a7", "\\ensuremath{\\Chi}"], - ["03a8", "\\ensuremath{\\Psi}"], - ["03a9", "\\ensuremath{\\Omega}"], - ["03aa", "\\mathrm{\\ddot{I}}"], - ["03ab", "\\mathrm{\\ddot{Y}}"], - ["03ac", "\\'{$\\alpha$}"], - ["03ad", "\\acute{\\epsilon}"], - ["03ae", "\\acute{\\eta}"], - ["03af", "\\acute{\\iota}"], - ["03b0", "\\acute{\\ddot{\\upsilon}}"], - ["03b1", "\\ensuremath{\\alpha}"], - ["03b2", "\\ensuremath{\\beta}"], - ["03b3", "\\ensuremath{\\gamma}"], - ["03b4", "\\ensuremath{\\delta}"], - ["03b5", "\\ensuremath{\\epsilon}"], - ["03b6", "\\ensuremath{\\zeta}"], - ["03b7", "\\ensuremath{\\eta}"], - ["03b8", "\\texttheta{}"], - ["03b9", "\\ensuremath{\\iota}"], - ["03ba", "\\ensuremath{\\kappa}"], - ["03bb", "\\ensuremath{\\lambda}"], - ["03bc", "\\ensuremath{\\mu}"], - ["03bd", "\\ensuremath{\\nu}"], - ["03be", "\\ensuremath{\\xi}"], - ["03c0", "\\ensuremath{\\pi}"], - ["03c1", "\\ensuremath{\\rho}"], - ["03c2", "\\ensuremath{\\varsigma}"], - ["03c3", "\\ensuremath{\\sigma}"], - ["03c4", "\\ensuremath{\\tau}"], - ["03c5", "\\ensuremath{\\upsilon}"], - ["03c6", "\\ensuremath{\\varphi}"], - ["03c7", "\\ensuremath{\\chi}"], - ["03c8", "\\ensuremath{\\psi}"], - ["03c9", "\\ensuremath{\\omega}"], - ["03ca", "\\ensuremath{\\ddot{\\iota}}"], - ["03cb", "\\ensuremath{\\ddot{\\upsilon}}"], - ["03cc", "\\'{o}"], - ["03cd", "\\acute{\\upsilon}"], - ["03ce", "\\acute{\\omega}"], - ["03d0", "\\Pisymbol{ppi022}{87}"], - ["03d1", "\\textvartheta{}"], - ["03d2", "\\ensuremath{\\Upsilon}"], - ["03d5", "\\ensuremath{\\phi}"], - ["03d6", "\\ensuremath{\\varpi}"], - ["03da", "\\Stigma{}"], - ["03dc", "\\Digamma{}"], - ["03dd", "\\digamma{}"], - ["03de", "\\Koppa{}"], - ["03e0", "\\Sampi{}"], - ["03f0", "\\varkappa{}"], - ["03f1", "\\varrho{}"], - ["03f4", "\\textTheta{}"], - ["03f6", "\\backepsilon{}"], - ["0401", "\\cyrchar\\CYRYO{}"], - ["0402", "\\cyrchar\\CYRDJE{}"], - ["0403", "\\cyrchar{\\'\\CYRG}"], - ["0404", "\\cyrchar\\CYRIE{}"], - ["0405", "\\cyrchar\\CYRDZE{}"], - ["0406", "\\cyrchar\\CYRII{}"], - ["0407", "\\cyrchar\\CYRYI{}"], - ["0408", "\\cyrchar\\CYRJE{}"], - ["0409", "\\cyrchar\\CYRLJE{}"], - ["040a", "\\cyrchar\\CYRNJE{}"], - ["040b", "\\cyrchar\\CYRTSHE{}"], - ["040c", "\\cyrchar{\\'\\CYRK}"], - ["040e", "\\cyrchar\\CYRUSHRT{}"], - ["040f", "\\cyrchar\\CYRDZHE{}"], - ["0410", "\\cyrchar\\CYRA{}"], - ["0411", "\\cyrchar\\CYRB{}"], - ["0412", "\\cyrchar\\CYRV{}"], - ["0413", "\\cyrchar\\CYRG{}"], - ["0414", "\\cyrchar\\CYRD{}"], - ["0415", "\\cyrchar\\CYRE{}"], - ["0416", "\\cyrchar\\CYRZH{}"], - ["0417", "\\cyrchar\\CYRZ{}"], - ["0418", "\\cyrchar\\CYRI{}"], - ["0419", "\\cyrchar\\CYRISHRT{}"], - ["041a", "\\cyrchar\\CYRK{}"], - ["041b", "\\cyrchar\\CYRL{}"], - ["041c", "\\cyrchar\\CYRM{}"], - ["041d", "\\cyrchar\\CYRN{}"], - ["041e", "\\cyrchar\\CYRO{}"], - ["041f", "\\cyrchar\\CYRP{}"], - ["0420", "\\cyrchar\\CYRR{}"], - ["0421", "\\cyrchar\\CYRS{}"], - ["0422", "\\cyrchar\\CYRT{}"], - ["0423", "\\cyrchar\\CYRU{}"], - ["0424", "\\cyrchar\\CYRF{}"], - ["0425", "\\cyrchar\\CYRH{}"], - ["0426", "\\cyrchar\\CYRC{}"], - ["0427", "\\cyrchar\\CYRCH{}"], - ["0428", "\\cyrchar\\CYRSH{}"], - ["0429", "\\cyrchar\\CYRSHCH{}"], - ["042a", "\\cyrchar\\CYRHRDSN{}"], - ["042b", "\\cyrchar\\CYRERY{}"], - ["042c", "\\cyrchar\\CYRSFTSN{}"], - ["042d", "\\cyrchar\\CYREREV{}"], - ["042e", "\\cyrchar\\CYRYU{}"], - ["042f", "\\cyrchar\\CYRYA{}"], - ["0430", "\\cyrchar\\cyra{}"], - ["0431", "\\cyrchar\\cyrb{}"], - ["0432", "\\cyrchar\\cyrv{}"], - ["0433", "\\cyrchar\\cyrg{}"], - ["0434", "\\cyrchar\\cyrd{}"], - ["0435", "\\cyrchar\\cyre{}"], - ["0436", "\\cyrchar\\cyrzh{}"], - ["0437", "\\cyrchar\\cyrz{}"], - ["0438", "\\cyrchar\\cyri{}"], - ["0439", "\\cyrchar\\cyrishrt{}"], - ["043a", "\\cyrchar\\cyrk{}"], - ["043b", "\\cyrchar\\cyrl{}"], - ["043c", "\\cyrchar\\cyrm{}"], - ["043d", "\\cyrchar\\cyrn{}"], - ["043e", "\\cyrchar\\cyro{}"], - ["043f", "\\cyrchar\\cyrp{}"], - ["0440", "\\cyrchar\\cyrr{}"], - ["0441", "\\cyrchar\\cyrs{}"], - ["0442", "\\cyrchar\\cyrt{}"], - ["0443", "\\cyrchar\\cyru{}"], - ["0444", "\\cyrchar\\cyrf{}"], - ["0445", "\\cyrchar\\cyrh{}"], - ["0446", "\\cyrchar\\cyrc{}"], - ["0447", "\\cyrchar\\cyrch{}"], - ["0448", "\\cyrchar\\cyrsh{}"], - ["0449", "\\cyrchar\\cyrshch{}"], - ["044a", "\\cyrchar\\cyrhrdsn{}"], - ["044b", "\\cyrchar\\cyrery{}"], - ["044c", "\\cyrchar\\cyrsftsn{}"], - ["044d", "\\cyrchar\\cyrerev{}"], - ["044e", "\\cyrchar\\cyryu{}"], - ["044f", "\\cyrchar\\cyrya{}"], - ["0451", "\\cyrchar\\cyryo{}"], - ["0452", "\\cyrchar\\cyrdje{}"], - ["0453", "\\cyrchar{\\'\\cyrg}"], - ["0454", "\\cyrchar\\cyrie{}"], - ["0455", "\\cyrchar\\cyrdze{}"], - ["0456", "\\cyrchar\\cyrii{}"], - ["0457", "\\cyrchar\\cyryi{}"], - ["0458", "\\cyrchar\\cyrje{}"], - ["0459", "\\cyrchar\\cyrlje{}"], - ["045a", "\\cyrchar\\cyrnje{}"], - ["045b", "\\cyrchar\\cyrtshe{}"], - ["045c", "\\cyrchar{\\'\\cyrk}"], - ["045e", "\\cyrchar\\cyrushrt{}"], - ["045f", "\\cyrchar\\cyrdzhe{}"], - ["0460", "\\cyrchar\\CYROMEGA{}"], - ["0461", "\\cyrchar\\cyromega{}"], - ["0462", "\\cyrchar\\CYRYAT{}"], - ["0464", "\\cyrchar\\CYRIOTE{}"], - ["0465", "\\cyrchar\\cyriote{}"], - ["0466", "\\cyrchar\\CYRLYUS{}"], - ["0467", "\\cyrchar\\cyrlyus{}"], - ["0468", "\\cyrchar\\CYRIOTLYUS{}"], - ["0469", "\\cyrchar\\cyriotlyus{}"], - ["046a", "\\cyrchar\\CYRBYUS{}"], - ["046c", "\\cyrchar\\CYRIOTBYUS{}"], - ["046d", "\\cyrchar\\cyriotbyus{}"], - ["046e", "\\cyrchar\\CYRKSI{}"], - ["046f", "\\cyrchar\\cyrksi{}"], - ["0470", "\\cyrchar\\CYRPSI{}"], - ["0471", "\\cyrchar\\cyrpsi{}"], - ["0472", "\\cyrchar\\CYRFITA{}"], - ["0474", "\\cyrchar\\CYRIZH{}"], - ["0478", "\\cyrchar\\CYRUK{}"], - ["0479", "\\cyrchar\\cyruk{}"], - ["047a", "\\cyrchar\\CYROMEGARND{}"], - ["047b", "\\cyrchar\\cyromegarnd{}"], - ["047c", "\\cyrchar\\CYROMEGATITLO{}"], - ["047d", "\\cyrchar\\cyromegatitlo{}"], - ["047e", "\\cyrchar\\CYROT{}"], - ["047f", "\\cyrchar\\cyrot{}"], - ["0480", "\\cyrchar\\CYRKOPPA{}"], - ["0481", "\\cyrchar\\cyrkoppa{}"], - ["0482", "\\cyrchar\\cyrthousands{}"], - ["0488", "\\cyrchar\\cyrhundredthousands{}"], - ["0489", "\\cyrchar\\cyrmillions{}"], - ["048c", "\\cyrchar\\CYRSEMISFTSN{}"], - ["048d", "\\cyrchar\\cyrsemisftsn{}"], - ["048e", "\\cyrchar\\CYRRTICK{}"], - ["048f", "\\cyrchar\\cyrrtick{}"], - ["0490", "\\cyrchar\\CYRGUP{}"], - ["0491", "\\cyrchar\\cyrgup{}"], - ["0492", "\\cyrchar\\CYRGHCRS{}"], - ["0493", "\\cyrchar\\cyrghcrs{}"], - ["0494", "\\cyrchar\\CYRGHK{}"], - ["0495", "\\cyrchar\\cyrghk{}"], - ["0496", "\\cyrchar\\CYRZHDSC{}"], - ["0497", "\\cyrchar\\cyrzhdsc{}"], - ["0498", "\\cyrchar\\CYRZDSC{}"], - ["0499", "\\cyrchar\\cyrzdsc{}"], - ["049a", "\\cyrchar\\CYRKDSC{}"], - ["049b", "\\cyrchar\\cyrkdsc{}"], - ["049c", "\\cyrchar\\CYRKVCRS{}"], - ["049d", "\\cyrchar\\cyrkvcrs{}"], - ["049e", "\\cyrchar\\CYRKHCRS{}"], - ["049f", "\\cyrchar\\cyrkhcrs{}"], - ["04a0", "\\cyrchar\\CYRKBEAK{}"], - ["04a1", "\\cyrchar\\cyrkbeak{}"], - ["04a2", "\\cyrchar\\CYRNDSC{}"], - ["04a3", "\\cyrchar\\cyrndsc{}"], - ["04a4", "\\cyrchar\\CYRNG{}"], - ["04a5", "\\cyrchar\\cyrng{}"], - ["04a6", "\\cyrchar\\CYRPHK{}"], - ["04a7", "\\cyrchar\\cyrphk{}"], - ["04a8", "\\cyrchar\\CYRABHHA{}"], - ["04a9", "\\cyrchar\\cyrabhha{}"], - ["04aa", "\\cyrchar\\CYRSDSC{}"], - ["04ab", "\\cyrchar\\cyrsdsc{}"], - ["04ac", "\\cyrchar\\CYRTDSC{}"], - ["04ad", "\\cyrchar\\cyrtdsc{}"], - ["04ae", "\\cyrchar\\CYRY{}"], - ["04af", "\\cyrchar\\cyry{}"], - ["04b0", "\\cyrchar\\CYRYHCRS{}"], - ["04b1", "\\cyrchar\\cyryhcrs{}"], - ["04b2", "\\cyrchar\\CYRHDSC{}"], - ["04b3", "\\cyrchar\\cyrhdsc{}"], - ["04b4", "\\cyrchar\\CYRTETSE{}"], - ["04b5", "\\cyrchar\\cyrtetse{}"], - ["04b6", "\\cyrchar\\CYRCHRDSC{}"], - ["04b7", "\\cyrchar\\cyrchrdsc{}"], - ["04b8", "\\cyrchar\\CYRCHVCRS{}"], - ["04b9", "\\cyrchar\\cyrchvcrs{}"], - ["04ba", "\\cyrchar\\CYRSHHA{}"], - ["04bb", "\\cyrchar\\cyrshha{}"], - ["04bc", "\\cyrchar\\CYRABHCH{}"], - ["04bd", "\\cyrchar\\cyrabhch{}"], - ["04be", "\\cyrchar\\CYRABHCHDSC{}"], - ["04bf", "\\cyrchar\\cyrabhchdsc{}"], - ["04c0", "\\cyrchar\\CYRpalochka{}"], - ["04c3", "\\cyrchar\\CYRKHK{}"], - ["04c4", "\\cyrchar\\cyrkhk{}"], - ["04c7", "\\cyrchar\\CYRNHK{}"], - ["04c8", "\\cyrchar\\cyrnhk{}"], - ["04cb", "\\cyrchar\\CYRCHLDSC{}"], - ["04cc", "\\cyrchar\\cyrchldsc{}"], - ["04d4", "\\cyrchar\\CYRAE{}"], - ["04d5", "\\cyrchar\\cyrae{}"], - ["04d8", "\\cyrchar\\CYRSCHWA{}"], - ["04d9", "\\cyrchar\\cyrschwa{}"], - ["04e0", "\\cyrchar\\CYRABHDZE{}"], - ["04e1", "\\cyrchar\\cyrabhdze{}"], - ["04e8", "\\cyrchar\\CYROTLD{}"], - ["04e9", "\\cyrchar\\cyrotld{}"], - ["2002", "\\hspace{0.6em}"], - ["2003", "\\hspace{1em}"], - ["2004", "\\hspace{0.33em}"], - ["2005", "\\hspace{0.25em}"], - ["2006", "\\hspace{0.166em}"], - ["2007", "\\hphantom{0}"], - ["2008", "\\hphantom{,}"], - ["2009", "\\hspace{0.167em}"], - ["200a", "\\mkern1mu{}"], - ["2010", "-"], - ["2014", "--"], - ["2015", "\\rule{1em}{1pt}"], - ["2016", "\\Vert{}"], - ["2018", "`"], - ["2019", "'"], - ["201b", "\\Elzreapos{}"], - ["201c", "``"], - ["201d", "''"], - ["201e", ",,"], - ["2020", "\\textdagger{}"], - ["2021", "\\textdaggerdbl{}"], - ["2022", "\\textbullet{}"], - ["2025", ".."], - ["2026", "\\ldots{}"], - ["2030", "\\textperthousand{}"], - ["2031", "\\textpertenthousand{}"], - ["2032", "\\ensuremath{'}"], - ["2033", "\\ensuremath{''}"], - ["2034", "\\ensuremath{'''}"], - ["2035", "\\backprime{}"], - ["2039", "\\guilsinglleft{}"], - ["203a", "\\guilsinglright{}"], - ["2057", "''''"], - ["205f", "\\mkern4mu{}"], - ["2060", "\\nolinebreak{}"], - ["20a7", "\\ensuremath{\\Elzpes}"], - ["20ac", "\\mbox{\\texteuro}{}"], - ["20db", "\\dddot{}"], - ["20dc", "\\ddddot{}"], - ["2102", "\\mathbb{C}"], - ["210a", "\\mathscr{g}"], - ["210b", "\\mathscr{H}"], - ["210c", "\\mathfrak{H}"], - ["210d", "\\mathbb{H}"], - ["210f", "\\hslash{}"], - ["2110", "\\mathscr{I}"], - ["2111", "\\mathfrak{I}"], - ["2112", "\\mathscr{L}"], - ["2113", "\\mathscr{l}"], - ["2115", "\\mathbb{N}"], - ["2116", "\\cyrchar\\textnumero{}"], - ["2118", "\\wp{}"], - ["2119", "\\mathbb{P}"], - ["211a", "\\mathbb{Q}"], - ["211b", "\\mathscr{R}"], - ["211c", "\\mathfrak{R}"], - ["211d", "\\mathbb{R}"], - ["211e", "\\Elzxrat{}"], - ["2122", "\\texttrademark{}"], - ["2124", "\\mathbb{Z}"], - ["2126", "\\Omega{}"], - ["2127", "\\mho{}"], - ["2128", "\\mathfrak{Z}"], - ["2129", "\\ElsevierGlyph{2129}"], - ["212b", "\\AA{}"], - ["212c", "\\mathscr{B}"], - ["212d", "\\mathfrak{C}"], - ["212f", "\\mathscr{e}"], - ["2130", "\\mathscr{E}"], - ["2131", "\\mathscr{F}"], - ["2133", "\\mathscr{M}"], - ["2134", "\\mathscr{o}"], - ["2135", "\\aleph{}"], - ["2136", "\\beth{}"], - ["2137", "\\gimel{}"], - ["2138", "\\daleth{}"], - ["2153", "\\textfrac{1}{3}"], - ["2154", "\\textfrac{2}{3}"], - ["2155", "\\textfrac{1}{5}"], - ["2156", "\\textfrac{2}{5}"], - ["2157", "\\textfrac{3}{5}"], - ["2158", "\\textfrac{4}{5}"], - ["2159", "\\textfrac{1}{6}"], - ["215a", "\\textfrac{5}{6}"], - ["215b", "\\textfrac{1}{8}"], - ["215c", "\\textfrac{3}{8}"], - ["215d", "\\textfrac{5}{8}"], - ["215e", "\\textfrac{7}{8}"], - ["2190", "\\leftarrow{}"], - ["2191", "\\uparrow{}"], - ["2192", "\\rightarrow{}"], - ["2193", "\\downarrow{}"], - ["2194", "\\leftrightarrow{}"], - ["2195", "\\updownarrow{}"], - ["2196", "\\nwarrow{}"], - ["2197", "\\nearrow{}"], - ["2198", "\\searrow{}"], - ["2199", "\\swarrow{}"], - ["219a", "\\nleftarrow{}"], - ["219b", "\\nrightarrow{}"], - ["219c", "\\arrowwaveright{}"], - ["219d", "\\arrowwaveright{}"], - ["219e", "\\twoheadleftarrow{}"], - ["21a0", "\\twoheadrightarrow{}"], - ["21a2", "\\leftarrowtail{}"], - ["21a3", "\\rightarrowtail{}"], - ["21a6", "\\mapsto{}"], - ["21a9", "\\hookleftarrow{}"], - ["21aa", "\\hookrightarrow{}"], - ["21ab", "\\looparrowleft{}"], - ["21ac", "\\looparrowright{}"], - ["21ad", "\\leftrightsquigarrow{}"], - ["21ae", "\\nleftrightarrow{}"], - ["21b0", "\\Lsh{}"], - ["21b1", "\\Rsh{}"], - ["21b3", "\\ElsevierGlyph{21B3}"], - ["21b6", "\\curvearrowleft{}"], - ["21b7", "\\curvearrowright{}"], - ["21ba", "\\circlearrowleft{}"], - ["21bb", "\\circlearrowright{}"], - ["21bc", "\\leftharpoonup{}"], - ["21bd", "\\leftharpoondown{}"], - ["21be", "\\upharpoonright{}"], - ["21bf", "\\upharpoonleft{}"], - ["21c0", "\\rightharpoonup{}"], - ["21c1", "\\rightharpoondown{}"], - ["21c2", "\\downharpoonright{}"], - ["21c3", "\\downharpoonleft{}"], - ["21c4", "\\rightleftarrows{}"], - ["21c5", "\\dblarrowupdown{}"], - ["21c6", "\\leftrightarrows{}"], - ["21c7", "\\leftleftarrows{}"], - ["21c8", "\\upuparrows{}"], - ["21c9", "\\rightrightarrows{}"], - ["21ca", "\\downdownarrows{}"], - ["21cb", "\\leftrightharpoons{}"], - ["21cc", "\\rightleftharpoons{}"], - ["21cd", "\\nLeftarrow{}"], - ["21ce", "\\nLeftrightarrow{}"], - ["21cf", "\\nRightarrow{}"], - ["21d0", "\\Leftarrow{}"], - ["21d1", "\\Uparrow{}"], - ["21d2", "\\Rightarrow{}"], - ["21d3", "\\Downarrow{}"], - ["21d4", "\\Leftrightarrow{}"], - ["21d5", "\\Updownarrow{}"], - ["21da", "\\Lleftarrow{}"], - ["21db", "\\Rrightarrow{}"], - ["21dd", "\\rightsquigarrow{}"], - ["21f5", "\\DownArrowUpArrow{}"], - ["2200", "\\forall{}"], - ["2201", "\\complement{}"], - ["2202", "\\partial{}"], - ["2203", "\\exists{}"], - ["2204", "\\nexists{}"], - ["2205", "\\varnothing{}"], - ["2207", "\\nabla{}"], - ["2208", "\\in{}"], - ["2209", "\\not\\in{}"], - ["220b", "\\ni{}"], - ["220c", "\\not\\ni{}"], - ["220f", "\\prod{}"], - ["2210", "\\coprod{}"], - ["2211", "\\sum{}"], - ["2212", "-"], - ["2213", "\\mp{}"], - ["2214", "\\dotplus{}"], - ["2216", "\\setminus{}"], - ["2217", "{\\_\\ast}"], - ["2218", "\\circ{}"], - ["2219", "\\bullet{}"], - ["221a", "\\surd{}"], - ["221d", "\\propto{}"], - ["221e", "\\infty{}"], - ["221f", "\\rightangle{}"], - ["2220", "\\angle{}"], - ["2221", "\\measuredangle{}"], - ["2222", "\\sphericalangle{}"], - ["2223", "\\mid{}"], - ["2224", "\\nmid{}"], - ["2225", "\\parallel{}"], - ["2226", "\\nparallel{}"], - ["2227", "\\wedge{}"], - ["2228", "\\vee{}"], - ["2229", "\\cap{}"], - ["222a", "\\cup{}"], - ["222b", "\\int{}"], - ["222c", "\\int\\!\\int{}"], - ["222d", "\\int\\!\\int\\!\\int{}"], - ["222e", "\\oint{}"], - ["222f", "\\surfintegral{}"], - ["2230", "\\volintegral{}"], - ["2231", "\\clwintegral{}"], - ["2232", "\\ElsevierGlyph{2232}"], - ["2233", "\\ElsevierGlyph{2233}"], - ["2234", "\\therefore{}"], - ["2235", "\\because{}"], - ["2237", "\\Colon{}"], - ["2238", "\\ElsevierGlyph{2238}"], - ["223a", "\\mathbin{{:}\\!\\!{-}\\!\\!{:}}"], - ["223b", "\\homothetic{}"], - ["223c", "\\sim{}"], - ["223d", "\\backsim{}"], - ["223e", "\\lazysinv{}"], - ["2240", "\\wr{}"], - ["2241", "\\not\\sim{}"], - ["2242", "\\ElsevierGlyph{2242}"], - ["2243", "\\simeq{}"], - ["2244", "\\not\\simeq{}"], - ["2245", "\\cong{}"], - ["2246", "\\approxnotequal{}"], - ["2247", "\\not\\cong{}"], - ["2248", "\\approx{}"], - ["2249", "\\not\\approx{}"], - ["224a", "\\approxeq{}"], - ["224b", "\\tildetrpl{}"], - ["224c", "\\allequal{}"], - ["224d", "\\asymp{}"], - ["224e", "\\Bumpeq{}"], - ["224f", "\\bumpeq{}"], - ["2250", "\\doteq{}"], - ["2251", "\\doteqdot{}"], - ["2252", "\\fallingdotseq{}"], - ["2253", "\\risingdotseq{}"], - ["2254", ":="], - ["2255", "=:"], - ["2256", "\\eqcirc{}"], - ["2257", "\\circeq{}"], - ["2259", "\\estimates{}"], - ["225a", "\\ElsevierGlyph{225A}"], - ["225b", "\\starequal{}"], - ["225c", "\\triangleq{}"], - ["225f", "\\ElsevierGlyph{225F}"], - ["2260", "\\not ="], - ["2261", "\\equiv{}"], - ["2262", "\\not\\equiv{}"], - ["2264", "\\leq{}"], - ["2265", "\\geq{}"], - ["2266", "\\leqq{}"], - ["2267", "\\geqq{}"], - ["2268", "\\lneqq{}"], - ["2269", "\\gneqq{}"], - ["226a", "\\ll{}"], - ["226b", "\\gg{}"], - ["226c", "\\between{}"], - ["226d", "\\not\\kern-0.3em\\times{}"], - ["226e", "\\not<"], - ["226f", "\\not>"], - ["2270", "\\not\\leq{}"], - ["2271", "\\not\\geq{}"], - ["2272", "\\lessequivlnt{}"], - ["2273", "\\greaterequivlnt{}"], - ["2274", "\\ElsevierGlyph{2274}"], - ["2275", "\\ElsevierGlyph{2275}"], - ["2276", "\\lessgtr{}"], - ["2277", "\\gtrless{}"], - ["2278", "\\notlessgreater{}"], - ["2279", "\\notgreaterless{}"], - ["227a", "\\prec{}"], - ["227b", "\\succ{}"], - ["227c", "\\preccurlyeq{}"], - ["227d", "\\succcurlyeq{}"], - ["227e", "\\precapprox{}"], - ["227f", "\\succapprox{}"], - ["2280", "\\not\\prec{}"], - ["2281", "\\not\\succ{}"], - ["2282", "\\subset{}"], - ["2283", "\\supset{}"], - ["2284", "\\not\\subset{}"], - ["2285", "\\not\\supset{}"], - ["2286", "\\subseteq{}"], - ["2287", "\\supseteq{}"], - ["2288", "\\not\\subseteq{}"], - ["2289", "\\not\\supseteq{}"], - ["228a", "\\subsetneq{}"], - ["228b", "\\supsetneq{}"], - ["228e", "\\uplus{}"], - ["228f", "\\sqsubset{}"], - ["2290", "\\sqsupset{}"], - ["2291", "\\sqsubseteq{}"], - ["2292", "\\sqsupseteq{}"], - ["2293", "\\sqcap{}"], - ["2294", "\\sqcup{}"], - ["2295", "\\oplus{}"], - ["2296", "\\ominus{}"], - ["2297", "\\otimes{}"], - ["2298", "\\oslash{}"], - ["2299", "\\odot{}"], - ["229a", "\\circledcirc{}"], - ["229b", "\\circledast{}"], - ["229d", "\\circleddash{}"], - ["229e", "\\boxplus{}"], - ["229f", "\\boxminus{}"], - ["22a0", "\\boxtimes{}"], - ["22a1", "\\boxdot{}"], - ["22a2", "\\vdash{}"], - ["22a3", "\\dashv{}"], - ["22a4", "\\top{}"], - ["22a5", "\\perp{}"], - ["22a7", "\\truestate{}"], - ["22a8", "\\forcesextra{}"], - ["22a9", "\\Vdash{}"], - ["22aa", "\\Vvdash{}"], - ["22ab", "\\VDash{}"], - ["22ac", "\\nvdash{}"], - ["22ad", "\\nvDash{}"], - ["22ae", "\\nVdash{}"], - ["22af", "\\nVDash{}"], - ["22b2", "\\vartriangleleft{}"], - ["22b3", "\\vartriangleright{}"], - ["22b4", "\\trianglelefteq{}"], - ["22b5", "\\trianglerighteq{}"], - ["22b6", "\\original{}"], - ["22b7", "\\image{}"], - ["22b8", "\\multimap{}"], - ["22b9", "\\hermitconjmatrix{}"], - ["22ba", "\\intercal{}"], - ["22bb", "\\veebar{}"], - ["22be", "\\rightanglearc{}"], - ["22c0", "\\ElsevierGlyph{22C0}"], - ["22c1", "\\ElsevierGlyph{22C1}"], - ["22c2", "\\bigcap{}"], - ["22c3", "\\bigcup{}"], - ["22c4", "\\diamond{}"], - ["22c5", "\\cdot{}"], - ["22c6", "\\star{}"], - ["22c7", "\\divideontimes{}"], - ["22c8", "\\bowtie{}"], - ["22c9", "\\ltimes{}"], - ["22ca", "\\rtimes{}"], - ["22cb", "\\leftthreetimes{}"], - ["22cc", "\\rightthreetimes{}"], - ["22cd", "\\backsimeq{}"], - ["22ce", "\\curlyvee{}"], - ["22cf", "\\curlywedge{}"], - ["22d0", "\\Subset{}"], - ["22d1", "\\Supset{}"], - ["22d2", "\\Cap{}"], - ["22d3", "\\Cup{}"], - ["22d4", "\\pitchfork{}"], - ["22d6", "\\lessdot{}"], - ["22d7", "\\gtrdot{}"], - ["22d8", "\\verymuchless{}"], - ["22d9", "\\verymuchgreater{}"], - ["22da", "\\lesseqgtr{}"], - ["22db", "\\gtreqless{}"], - ["22de", "\\curlyeqprec{}"], - ["22df", "\\curlyeqsucc{}"], - ["22e2", "\\not\\sqsubseteq{}"], - ["22e3", "\\not\\sqsupseteq{}"], - ["22e5", "\\Elzsqspne{}"], - ["22e6", "\\lnsim{}"], - ["22e7", "\\gnsim{}"], - ["22e8", "\\precedesnotsimilar{}"], - ["22e9", "\\succnsim{}"], - ["22ea", "\\ntriangleleft{}"], - ["22eb", "\\ntriangleright{}"], - ["22ec", "\\ntrianglelefteq{}"], - ["22ed", "\\ntrianglerighteq{}"], - ["22ee", "\\vdots{}"], - ["22ef", "\\cdots{}"], - ["22f0", "\\upslopeellipsis{}"], - ["22f1", "\\downslopeellipsis{}"], - ["2305", "\\barwedge{}"], - ["2306", "\\perspcorrespond{}"], - ["2308", "\\lceil{}"], - ["2309", "\\rceil{}"], - ["230a", "\\lfloor{}"], - ["230b", "\\rfloor{}"], - ["2315", "\\recorder{}"], - ["2316", '\\mathchar"2208'], - ["231c", "\\ulcorner{}"], - ["231d", "\\urcorner{}"], - ["231e", "\\llcorner{}"], - ["231f", "\\lrcorner{}"], - ["2322", "\\frown{}"], - ["2323", "\\smile{}"], - ["2329", "\\langle{}"], - ["232a", "\\rangle{}"], - ["233d", "\\ElsevierGlyph{E838}"], - ["23a3", "\\Elzdlcorn{}"], - ["23b0", "\\lmoustache{}"], - ["23b1", "\\rmoustache{}"], - ["2423", "\\textvisiblespace{}"], - ["2460", "\\ding{172}"], - ["2461", "\\ding{173}"], - ["2462", "\\ding{174}"], - ["2463", "\\ding{175}"], - ["2464", "\\ding{176}"], - ["2465", "\\ding{177}"], - ["2466", "\\ding{178}"], - ["2467", "\\ding{179}"], - ["2468", "\\ding{180}"], - ["2469", "\\ding{181}"], - ["24c8", "\\circledS{}"], - ["2506", "\\Elzdshfnc{}"], - ["2519", "\\Elzsqfnw{}"], - ["2571", "\\diagup{}"], - ["25a0", "\\ding{110}"], - ["25a1", "\\square{}"], - ["25aa", "\\blacksquare{}"], - ["25ad", "\\fbox{~~}"], - ["25af", "\\Elzvrecto{}"], - ["25b1", "\\ElsevierGlyph{E381}"], - ["25b2", "\\ding{115}"], - ["25b3", "\\bigtriangleup{}"], - ["25b4", "\\blacktriangle{}"], - ["25b5", "\\vartriangle{}"], - ["25b8", "\\blacktriangleright{}"], - ["25b9", "\\triangleright{}"], - ["25bc", "\\ding{116}"], - ["25bd", "\\bigtriangledown{}"], - ["25be", "\\blacktriangledown{}"], - ["25bf", "\\triangledown{}"], - ["25c2", "\\blacktriangleleft{}"], - ["25c3", "\\triangleleft{}"], - ["25c6", "\\ding{117}"], - ["25ca", "\\lozenge{}"], - ["25cb", "\\bigcirc{}"], - ["25cf", "\\ding{108}"], - ["25d0", "\\Elzcirfl{}"], - ["25d1", "\\Elzcirfr{}"], - ["25d2", "\\Elzcirfb{}"], - ["25d7", "\\ding{119}"], - ["25d8", "\\Elzrvbull{}"], - ["25e7", "\\Elzsqfl{}"], - ["25e8", "\\Elzsqfr{}"], - ["25ea", "\\Elzsqfse{}"], - ["25ef", "\\bigcirc{}"], - ["2605", "\\ding{72}"], - ["2606", "\\ding{73}"], - ["260e", "\\ding{37}"], - ["261b", "\\ding{42}"], - ["261e", "\\ding{43}"], - ["263e", "\\rightmoon{}"], - ["263f", "\\mercury{}"], - ["2640", "\\venus{}"], - ["2642", "\\male{}"], - ["2643", "\\jupiter{}"], - ["2644", "\\saturn{}"], - ["2645", "\\uranus{}"], - ["2646", "\\neptune{}"], - ["2647", "\\pluto{}"], - ["2648", "\\aries{}"], - ["2649", "\\taurus{}"], - ["264a", "\\gemini{}"], - ["264b", "\\cancer{}"], - ["264c", "\\leo{}"], - ["264d", "\\virgo{}"], - ["264e", "\\libra{}"], - ["264f", "\\scorpio{}"], - ["2650", "\\sagittarius{}"], - ["2651", "\\capricornus{}"], - ["2652", "\\aquarius{}"], - ["2653", "\\pisces{}"], - ["2660", "\\ding{171}"], - ["2662", "\\diamond{}"], - ["2663", "\\ding{168}"], - ["2665", "\\ding{170}"], - ["2666", "\\ding{169}"], - ["2669", "\\quarternote{}"], - ["266a", "\\eighthnote{}"], - ["266d", "\\flat{}"], - ["266e", "\\natural{}"], - ["266f", "\\sharp{}"], - ["2701", "\\ding{33}"], - ["2702", "\\ding{34}"], - ["2703", "\\ding{35}"], - ["2704", "\\ding{36}"], - ["2706", "\\ding{38}"], - ["2707", "\\ding{39}"], - ["2708", "\\ding{40}"], - ["2709", "\\ding{41}"], - ["270c", "\\ding{44}"], - ["270d", "\\ding{45}"], - ["270e", "\\ding{46}"], - ["270f", "\\ding{47}"], - ["2710", "\\ding{48}"], - ["2711", "\\ding{49}"], - ["2712", "\\ding{50}"], - ["2713", "\\ding{51}"], - ["2714", "\\ding{52}"], - ["2715", "\\ding{53}"], - ["2716", "\\ding{54}"], - ["2717", "\\ding{55}"], - ["2718", "\\ding{56}"], - ["2719", "\\ding{57}"], - ["271a", "\\ding{58}"], - ["271b", "\\ding{59}"], - ["271c", "\\ding{60}"], - ["271d", "\\ding{61}"], - ["271e", "\\ding{62}"], - ["271f", "\\ding{63}"], - ["2720", "\\ding{64}"], - ["2721", "\\ding{65}"], - ["2722", "\\ding{66}"], - ["2723", "\\ding{67}"], - ["2724", "\\ding{68}"], - ["2725", "\\ding{69}"], - ["2726", "\\ding{70}"], - ["2727", "\\ding{71}"], - ["2729", "\\ding{73}"], - ["272a", "\\ding{74}"], - ["272b", "\\ding{75}"], - ["272c", "\\ding{76}"], - ["272d", "\\ding{77}"], - ["272e", "\\ding{78}"], - ["272f", "\\ding{79}"], - ["2730", "\\ding{80}"], - ["2731", "\\ding{81}"], - ["2732", "\\ding{82}"], - ["2733", "\\ding{83}"], - ["2734", "\\ding{84}"], - ["2735", "\\ding{85}"], - ["2736", "\\ding{86}"], - ["2737", "\\ding{87}"], - ["2738", "\\ding{88}"], - ["2739", "\\ding{89}"], - ["273a", "\\ding{90}"], - ["273b", "\\ding{91}"], - ["273c", "\\ding{92}"], - ["273d", "\\ding{93}"], - ["273e", "\\ding{94}"], - ["273f", "\\ding{95}"], - ["2740", "\\ding{96}"], - ["2741", "\\ding{97}"], - ["2742", "\\ding{98}"], - ["2743", "\\ding{99}"], - ["2744", "\\ding{100}"], - ["2745", "\\ding{101}"], - ["2746", "\\ding{102}"], - ["2747", "\\ding{103}"], - ["2748", "\\ding{104}"], - ["2749", "\\ding{105}"], - ["274a", "\\ding{106}"], - ["274b", "\\ding{107}"], - ["274d", "\\ding{109}"], - ["274f", "\\ding{111}"], - ["2750", "\\ding{112}"], - ["2751", "\\ding{113}"], - ["2752", "\\ding{114}"], - ["2756", "\\ding{118}"], - ["2758", "\\ding{120}"], - ["2759", "\\ding{121}"], - ["275a", "\\ding{122}"], - ["275b", "\\ding{123}"], - ["275c", "\\ding{124}"], - ["275d", "\\ding{125}"], - ["275e", "\\ding{126}"], - ["2761", "\\ding{161}"], - ["2762", "\\ding{162}"], - ["2763", "\\ding{163}"], - ["2764", "\\ding{164}"], - ["2765", "\\ding{165}"], - ["2766", "\\ding{166}"], - ["2767", "\\ding{167}"], - ["2776", "\\ding{182}"], - ["2777", "\\ding{183}"], - ["2778", "\\ding{184}"], - ["2779", "\\ding{185}"], - ["277a", "\\ding{186}"], - ["277b", "\\ding{187}"], - ["277c", "\\ding{188}"], - ["277d", "\\ding{189}"], - ["277e", "\\ding{190}"], - ["277f", "\\ding{191}"], - ["2780", "\\ding{192}"], - ["2781", "\\ding{193}"], - ["2782", "\\ding{194}"], - ["2783", "\\ding{195}"], - ["2784", "\\ding{196}"], - ["2785", "\\ding{197}"], - ["2786", "\\ding{198}"], - ["2787", "\\ding{199}"], - ["2788", "\\ding{200}"], - ["2789", "\\ding{201}"], - ["278a", "\\ding{202}"], - ["278b", "\\ding{203}"], - ["278c", "\\ding{204}"], - ["278d", "\\ding{205}"], - ["278e", "\\ding{206}"], - ["278f", "\\ding{207}"], - ["2790", "\\ding{208}"], - ["2791", "\\ding{209}"], - ["2792", "\\ding{210}"], - ["2793", "\\ding{211}"], - ["2794", "\\ding{212}"], - ["2798", "\\ding{216}"], - ["2799", "\\ding{217}"], - ["279a", "\\ding{218}"], - ["279b", "\\ding{219}"], - ["279c", "\\ding{220}"], - ["279d", "\\ding{221}"], - ["279e", "\\ding{222}"], - ["279f", "\\ding{223}"], - ["27a0", "\\ding{224}"], - ["27a1", "\\ding{225}"], - ["27a2", "\\ding{226}"], - ["27a3", "\\ding{227}"], - ["27a4", "\\ding{228}"], - ["27a5", "\\ding{229}"], - ["27a6", "\\ding{230}"], - ["27a7", "\\ding{231}"], - ["27a8", "\\ding{232}"], - ["27a9", "\\ding{233}"], - ["27aa", "\\ding{234}"], - ["27ab", "\\ding{235}"], - ["27ac", "\\ding{236}"], - ["27ad", "\\ding{237}"], - ["27ae", "\\ding{238}"], - ["27af", "\\ding{239}"], - ["27b1", "\\ding{241}"], - ["27b2", "\\ding{242}"], - ["27b3", "\\ding{243}"], - ["27b4", "\\ding{244}"], - ["27b5", "\\ding{245}"], - ["27b6", "\\ding{246}"], - ["27b7", "\\ding{247}"], - ["27b8", "\\ding{248}"], - ["27b9", "\\ding{249}"], - ["27ba", "\\ding{250}"], - ["27bb", "\\ding{251}"], - ["27bc", "\\ding{252}"], - ["27bd", "\\ding{253}"], - ["27be", "\\ding{254}"], - ["27f5", "\\longleftarrow{}"], - ["27f6", "\\longrightarrow{}"], - ["27f7", "\\longleftrightarrow{}"], - ["27f8", "\\Longleftarrow{}"], - ["27f9", "\\Longrightarrow{}"], - ["27fa", "\\Longleftrightarrow{}"], - ["27fc", "\\longmapsto{}"], - ["27ff", "\\sim\\joinrel\\leadsto"], - ["2905", "\\ElsevierGlyph{E212}"], - ["2912", "\\UpArrowBar{}"], - ["2913", "\\DownArrowBar{}"], - ["2923", "\\ElsevierGlyph{E20C}"], - ["2924", "\\ElsevierGlyph{E20D}"], - ["2925", "\\ElsevierGlyph{E20B}"], - ["2926", "\\ElsevierGlyph{E20A}"], - ["2927", "\\ElsevierGlyph{E211}"], - ["2928", "\\ElsevierGlyph{E20E}"], - ["2929", "\\ElsevierGlyph{E20F}"], - ["292a", "\\ElsevierGlyph{E210}"], - ["2933", "\\ElsevierGlyph{E21C}"], - ["2936", "\\ElsevierGlyph{E21A}"], - ["2937", "\\ElsevierGlyph{E219}"], - ["2940", "\\Elolarr{}"], - ["2941", "\\Elorarr{}"], - ["2942", "\\ElzRlarr{}"], - ["2944", "\\ElzrLarr{}"], - ["2947", "\\Elzrarrx{}"], - ["294e", "\\LeftRightVector{}"], - ["294f", "\\RightUpDownVector{}"], - ["2950", "\\DownLeftRightVector{}"], - ["2951", "\\LeftUpDownVector{}"], - ["2952", "\\LeftVectorBar{}"], - ["2953", "\\RightVectorBar{}"], - ["2954", "\\RightUpVectorBar{}"], - ["2955", "\\RightDownVectorBar{}"], - ["2956", "\\DownLeftVectorBar{}"], - ["2957", "\\DownRightVectorBar{}"], - ["2958", "\\LeftUpVectorBar{}"], - ["2959", "\\LeftDownVectorBar{}"], - ["295a", "\\LeftTeeVector{}"], - ["295b", "\\RightTeeVector{}"], - ["295c", "\\RightUpTeeVector{}"], - ["295d", "\\RightDownTeeVector{}"], - ["295e", "\\DownLeftTeeVector{}"], - ["295f", "\\DownRightTeeVector{}"], - ["2960", "\\LeftUpTeeVector{}"], - ["2961", "\\LeftDownTeeVector{}"], - ["296e", "\\UpEquilibrium{}"], - ["296f", "\\ReverseUpEquilibrium{}"], - ["2970", "\\RoundImplies{}"], - ["297c", "\\ElsevierGlyph{E214}"], - ["297d", "\\ElsevierGlyph{E215}"], - ["2980", "\\Elztfnc{}"], - ["2985", "\\ElsevierGlyph{3018}"], - ["2986", "\\Elroang{}"], - ["2993", "<\\kern-0.58em("], - ["2994", "\\ElsevierGlyph{E291}"], - ["2999", "\\Elzddfnc{}"], - ["299c", "\\Angle{}"], - ["29a0", "\\Elzlpargt{}"], - ["29b5", "\\ElsevierGlyph{E260}"], - ["29b6", "\\ElsevierGlyph{E61B}"], - ["29ca", "\\ElzLap{}"], - ["29cb", "\\Elzdefas{}"], - ["29cf", "\\LeftTriangleBar{}"], - ["29d0", "\\RightTriangleBar{}"], - ["29dc", "\\ElsevierGlyph{E372}"], - ["29eb", "\\blacklozenge{}"], - ["29f4", "\\RuleDelayed{}"], - ["2a04", "\\Elxuplus{}"], - ["2a05", "\\ElzThr{}"], - ["2a06", "\\Elxsqcup{}"], - ["2a07", "\\ElzInf{}"], - ["2a08", "\\ElzSup{}"], - ["2a0d", "\\ElzCint{}"], - ["2a0f", "\\clockoint{}"], - ["2a10", "\\ElsevierGlyph{E395}"], - ["2a16", "\\sqrint{}"], - ["2a25", "\\ElsevierGlyph{E25A}"], - ["2a2a", "\\ElsevierGlyph{E25B}"], - ["2a2d", "\\ElsevierGlyph{E25C}"], - ["2a2e", "\\ElsevierGlyph{E25D}"], - ["2a2f", "\\ElzTimes{}"], - ["2a34", "\\ElsevierGlyph{E25E}"], - ["2a35", "\\ElsevierGlyph{E25E}"], - ["2a3c", "\\ElsevierGlyph{E259}"], - ["2a3f", "\\amalg{}"], - ["2a53", "\\ElzAnd{}"], - ["2a54", "\\ElzOr{}"], - ["2a55", "\\ElsevierGlyph{E36E}"], - ["2a56", "\\ElOr{}"], - ["2a5e", "\\perspcorrespond{}"], - ["2a5f", "\\Elzminhat{}"], - ["2a63", "\\ElsevierGlyph{225A}"], - ["2a6e", "\\stackrel{*}{=}"], - ["2a75", "\\Equal{}"], - ["2a7d", "\\leqslant{}"], - ["2a7e", "\\geqslant{}"], - ["2a85", "\\lessapprox{}"], - ["2a86", "\\gtrapprox{}"], - ["2a87", "\\lneq{}"], - ["2a88", "\\gneq{}"], - ["2a89", "\\lnapprox{}"], - ["2a8a", "\\gnapprox{}"], - ["2a8b", "\\lesseqqgtr{}"], - ["2a8c", "\\gtreqqless{}"], - ["2a95", "\\eqslantless{}"], - ["2a96", "\\eqslantgtr{}"], - ["2a9d", "\\Pisymbol{ppi020}{117}"], - ["2a9e", "\\Pisymbol{ppi020}{105}"], - ["2aa1", "\\NestedLessLess{}"], - ["2aa2", "\\NestedGreaterGreater{}"], - ["2aaf", "\\preceq{}"], - ["2ab0", "\\succeq{}"], - ["2ab5", "\\precneqq{}"], - ["2ab6", "\\succneqq{}"], - ["2ab7", "\\precapprox{}"], - ["2ab8", "\\succapprox{}"], - ["2ab9", "\\precnapprox{}"], - ["2aba", "\\succnapprox{}"], - ["2ac5", "\\subseteqq{}"], - ["2ac6", "\\supseteqq{}"], - ["2acb", "\\subsetneqq{}"], - ["2acc", "\\supsetneqq{}"], - ["2aeb", "\\ElsevierGlyph{E30D}"], - ["2af6", "\\Elztdcol{}"], - ["2afd", "{{/}\\!\\!{/}}"], - ["300a", "\\ElsevierGlyph{300A}"], - ["300b", "\\ElsevierGlyph{300B}"], - ["3018", "\\ElsevierGlyph{3018}"], - ["3019", "\\ElsevierGlyph{3019}"], - ["301a", "\\openbracketleft{}"], - ["301b", "\\openbracketright{}"], - ["fb00", "ff"], - ["fb01", "fi"], - ["fb02", "fl"], - ["fb03", "ffi"], - ["fb04", "ffl"], - ["d400", "\\mathbf{A}"], - ["d401", "\\mathbf{B}"], - ["d402", "\\mathbf{C}"], - ["d403", "\\mathbf{D}"], - ["d404", "\\mathbf{E}"], - ["d405", "\\mathbf{F}"], - ["d406", "\\mathbf{G}"], - ["d407", "\\mathbf{H}"], - ["d408", "\\mathbf{I}"], - ["d409", "\\mathbf{J}"], - ["d40a", "\\mathbf{K}"], - ["d40b", "\\mathbf{L}"], - ["d40c", "\\mathbf{M}"], - ["d40d", "\\mathbf{N}"], - ["d40e", "\\mathbf{O}"], - ["d40f", "\\mathbf{P}"], - ["d410", "\\mathbf{Q}"], - ["d411", "\\mathbf{R}"], - ["d412", "\\mathbf{S}"], - ["d413", "\\mathbf{T}"], - ["d414", "\\mathbf{U}"], - ["d415", "\\mathbf{V}"], - ["d416", "\\mathbf{W}"], - ["d417", "\\mathbf{X}"], - ["d418", "\\mathbf{Y}"], - ["d419", "\\mathbf{Z}"], - ["d41a", "\\mathbf{a}"], - ["d41b", "\\mathbf{b}"], - ["d41c", "\\mathbf{c}"], - ["d41d", "\\mathbf{d}"], - ["d41e", "\\mathbf{e}"], - ["d41f", "\\mathbf{f}"], - ["d420", "\\mathbf{g}"], - ["d421", "\\mathbf{h}"], - ["d422", "\\mathbf{i}"], - ["d423", "\\mathbf{j}"], - ["d424", "\\mathbf{k}"], - ["d425", "\\mathbf{l}"], - ["d426", "\\mathbf{m}"], - ["d427", "\\mathbf{n}"], - ["d428", "\\mathbf{o}"], - ["d429", "\\mathbf{p}"], - ["d42a", "\\mathbf{q}"], - ["d42b", "\\mathbf{r}"], - ["d42c", "\\mathbf{s}"], - ["d42d", "\\mathbf{t}"], - ["d42e", "\\mathbf{u}"], - ["d42f", "\\mathbf{v}"], - ["d430", "\\mathbf{w}"], - ["d431", "\\mathbf{x}"], - ["d432", "\\mathbf{y}"], - ["d433", "\\mathbf{z}"], - ["d434", "\\mathsl{A}"], - ["d435", "\\mathsl{B}"], - ["d436", "\\mathsl{C}"], - ["d437", "\\mathsl{D}"], - ["d438", "\\mathsl{E}"], - ["d439", "\\mathsl{F}"], - ["d43a", "\\mathsl{G}"], - ["d43b", "\\mathsl{H}"], - ["d43c", "\\mathsl{I}"], - ["d43d", "\\mathsl{J}"], - ["d43e", "\\mathsl{K}"], - ["d43f", "\\mathsl{L}"], - ["d440", "\\mathsl{M}"], - ["d441", "\\mathsl{N}"], - ["d442", "\\mathsl{O}"], - ["d443", "\\mathsl{P}"], - ["d444", "\\mathsl{Q}"], - ["d445", "\\mathsl{R}"], - ["d446", "\\mathsl{S}"], - ["d447", "\\mathsl{T}"], - ["d448", "\\mathsl{U}"], - ["d449", "\\mathsl{V}"], - ["d44a", "\\mathsl{W}"], - ["d44b", "\\mathsl{X}"], - ["d44c", "\\mathsl{Y}"], - ["d44d", "\\mathsl{Z}"], - ["d44e", "\\mathsl{a}"], - ["d44f", "\\mathsl{b}"], - ["d450", "\\mathsl{c}"], - ["d451", "\\mathsl{d}"], - ["d452", "\\mathsl{e}"], - ["d453", "\\mathsl{f}"], - ["d454", "\\mathsl{g}"], - ["d456", "\\mathsl{i}"], - ["d457", "\\mathsl{j}"], - ["d458", "\\mathsl{k}"], - ["d459", "\\mathsl{l}"], - ["d45a", "\\mathsl{m}"], - ["d45b", "\\mathsl{n}"], - ["d45c", "\\mathsl{o}"], - ["d45d", "\\mathsl{p}"], - ["d45e", "\\mathsl{q}"], - ["d45f", "\\mathsl{r}"], - ["d460", "\\mathsl{s}"], - ["d461", "\\mathsl{t}"], - ["d462", "\\mathsl{u}"], - ["d463", "\\mathsl{v}"], - ["d464", "\\mathsl{w}"], - ["d465", "\\mathsl{x}"], - ["d466", "\\mathsl{y}"], - ["d467", "\\mathsl{z}"], - ["d468", "\\mathbit{A}"], - ["d469", "\\mathbit{B}"], - ["d46a", "\\mathbit{C}"], - ["d46b", "\\mathbit{D}"], - ["d46c", "\\mathbit{E}"], - ["d46d", "\\mathbit{F}"], - ["d46e", "\\mathbit{G}"], - ["d46f", "\\mathbit{H}"], - ["d470", "\\mathbit{I}"], - ["d471", "\\mathbit{J}"], - ["d472", "\\mathbit{K}"], - ["d473", "\\mathbit{L}"], - ["d474", "\\mathbit{M}"], - ["d475", "\\mathbit{N}"], - ["d476", "\\mathbit{O}"], - ["d477", "\\mathbit{P}"], - ["d478", "\\mathbit{Q}"], - ["d479", "\\mathbit{R}"], - ["d47a", "\\mathbit{S}"], - ["d47b", "\\mathbit{T}"], - ["d47c", "\\mathbit{U}"], - ["d47d", "\\mathbit{V}"], - ["d47e", "\\mathbit{W}"], - ["d47f", "\\mathbit{X}"], - ["d480", "\\mathbit{Y}"], - ["d481", "\\mathbit{Z}"], - ["d482", "\\mathbit{a}"], - ["d483", "\\mathbit{b}"], - ["d484", "\\mathbit{c}"], - ["d485", "\\mathbit{d}"], - ["d486", "\\mathbit{e}"], - ["d487", "\\mathbit{f}"], - ["d488", "\\mathbit{g}"], - ["d489", "\\mathbit{h}"], - ["d48a", "\\mathbit{i}"], - ["d48b", "\\mathbit{j}"], - ["d48c", "\\mathbit{k}"], - ["d48d", "\\mathbit{l}"], - ["d48e", "\\mathbit{m}"], - ["d48f", "\\mathbit{n}"], - ["d490", "\\mathbit{o}"], - ["d491", "\\mathbit{p}"], - ["d492", "\\mathbit{q}"], - ["d493", "\\mathbit{r}"], - ["d494", "\\mathbit{s}"], - ["d495", "\\mathbit{t}"], - ["d496", "\\mathbit{u}"], - ["d497", "\\mathbit{v}"], - ["d498", "\\mathbit{w}"], - ["d499", "\\mathbit{x}"], - ["d49a", "\\mathbit{y}"], - ["d49b", "\\mathbit{z}"], - ["d49c", "\\mathscr{A}"], - ["d49e", "\\mathscr{C}"], - ["d49f", "\\mathscr{D}"], - ["d4a2", "\\mathscr{G}"], - ["d4a5", "\\mathscr{J}"], - ["d4a6", "\\mathscr{K}"], - ["d4a9", "\\mathscr{N}"], - ["d4aa", "\\mathscr{O}"], - ["d4ab", "\\mathscr{P}"], - ["d4ac", "\\mathscr{Q}"], - ["d4ae", "\\mathscr{S}"], - ["d4af", "\\mathscr{T}"], - ["d4b0", "\\mathscr{U}"], - ["d4b1", "\\mathscr{V}"], - ["d4b2", "\\mathscr{W}"], - ["d4b3", "\\mathscr{X}"], - ["d4b4", "\\mathscr{Y}"], - ["d4b5", "\\mathscr{Z}"], - ["d4b6", "\\mathscr{a}"], - ["d4b7", "\\mathscr{b}"], - ["d4b8", "\\mathscr{c}"], - ["d4b9", "\\mathscr{d}"], - ["d4bb", "\\mathscr{f}"], - ["d4bd", "\\mathscr{h}"], - ["d4be", "\\mathscr{i}"], - ["d4bf", "\\mathscr{j}"], - ["d4c0", "\\mathscr{k}"], - ["d4c1", "\\mathscr{l}"], - ["d4c2", "\\mathscr{m}"], - ["d4c3", "\\mathscr{n}"], - ["d4c5", "\\mathscr{p}"], - ["d4c6", "\\mathscr{q}"], - ["d4c7", "\\mathscr{r}"], - ["d4c8", "\\mathscr{s}"], - ["d4c9", "\\mathscr{t}"], - ["d4ca", "\\mathscr{u}"], - ["d4cb", "\\mathscr{v}"], - ["d4cc", "\\mathscr{w}"], - ["d4cd", "\\mathscr{x}"], - ["d4ce", "\\mathscr{y}"], - ["d4cf", "\\mathscr{z}"], - ["d4d0", "\\mathmit{A}"], - ["d4d1", "\\mathmit{B}"], - ["d4d2", "\\mathmit{C}"], - ["d4d3", "\\mathmit{D}"], - ["d4d4", "\\mathmit{E}"], - ["d4d5", "\\mathmit{F}"], - ["d4d6", "\\mathmit{G}"], - ["d4d7", "\\mathmit{H}"], - ["d4d8", "\\mathmit{I}"], - ["d4d9", "\\mathmit{J}"], - ["d4da", "\\mathmit{K}"], - ["d4db", "\\mathmit{L}"], - ["d4dc", "\\mathmit{M}"], - ["d4dd", "\\mathmit{N}"], - ["d4de", "\\mathmit{O}"], - ["d4df", "\\mathmit{P}"], - ["d4e0", "\\mathmit{Q}"], - ["d4e1", "\\mathmit{R}"], - ["d4e2", "\\mathmit{S}"], - ["d4e3", "\\mathmit{T}"], - ["d4e4", "\\mathmit{U}"], - ["d4e5", "\\mathmit{V}"], - ["d4e6", "\\mathmit{W}"], - ["d4e7", "\\mathmit{X}"], - ["d4e8", "\\mathmit{Y}"], - ["d4e9", "\\mathmit{Z}"], - ["d4ea", "\\mathmit{a}"], - ["d4eb", "\\mathmit{b}"], - ["d4ec", "\\mathmit{c}"], - ["d4ed", "\\mathmit{d}"], - ["d4ee", "\\mathmit{e}"], - ["d4ef", "\\mathmit{f}"], - ["d4f0", "\\mathmit{g}"], - ["d4f1", "\\mathmit{h}"], - ["d4f2", "\\mathmit{i}"], - ["d4f3", "\\mathmit{j}"], - ["d4f4", "\\mathmit{k}"], - ["d4f5", "\\mathmit{l}"], - ["d4f6", "\\mathmit{m}"], - ["d4f7", "\\mathmit{n}"], - ["d4f8", "\\mathmit{o}"], - ["d4f9", "\\mathmit{p}"], - ["d4fa", "\\mathmit{q}"], - ["d4fb", "\\mathmit{r}"], - ["d4fc", "\\mathmit{s}"], - ["d4fd", "\\mathmit{t}"], - ["d4fe", "\\mathmit{u}"], - ["d4ff", "\\mathmit{v}"], - ["d500", "\\mathmit{w}"], - ["d501", "\\mathmit{x}"], - ["d502", "\\mathmit{y}"], - ["d503", "\\mathmit{z}"], - ["d504", "\\mathfrak{A}"], - ["d505", "\\mathfrak{B}"], - ["d507", "\\mathfrak{D}"], - ["d508", "\\mathfrak{E}"], - ["d509", "\\mathfrak{F}"], - ["d50a", "\\mathfrak{G}"], - ["d50d", "\\mathfrak{J}"], - ["d50e", "\\mathfrak{K}"], - ["d50f", "\\mathfrak{L}"], - ["d510", "\\mathfrak{M}"], - ["d511", "\\mathfrak{N}"], - ["d512", "\\mathfrak{O}"], - ["d513", "\\mathfrak{P}"], - ["d514", "\\mathfrak{Q}"], - ["d516", "\\mathfrak{S}"], - ["d517", "\\mathfrak{T}"], - ["d518", "\\mathfrak{U}"], - ["d519", "\\mathfrak{V}"], - ["d51a", "\\mathfrak{W}"], - ["d51b", "\\mathfrak{X}"], - ["d51c", "\\mathfrak{Y}"], - ["d51e", "\\mathfrak{a}"], - ["d51f", "\\mathfrak{b}"], - ["d520", "\\mathfrak{c}"], - ["d521", "\\mathfrak{d}"], - ["d522", "\\mathfrak{e}"], - ["d523", "\\mathfrak{f}"], - ["d524", "\\mathfrak{g}"], - ["d525", "\\mathfrak{h}"], - ["d526", "\\mathfrak{i}"], - ["d527", "\\mathfrak{j}"], - ["d528", "\\mathfrak{k}"], - ["d529", "\\mathfrak{l}"], - ["d52a", "\\mathfrak{m}"], - ["d52b", "\\mathfrak{n}"], - ["d52c", "\\mathfrak{o}"], - ["d52d", "\\mathfrak{p}"], - ["d52e", "\\mathfrak{q}"], - ["d52f", "\\mathfrak{r}"], - ["d530", "\\mathfrak{s}"], - ["d531", "\\mathfrak{t}"], - ["d532", "\\mathfrak{u}"], - ["d533", "\\mathfrak{v}"], - ["d534", "\\mathfrak{w}"], - ["d535", "\\mathfrak{x}"], - ["d536", "\\mathfrak{y}"], - ["d537", "\\mathfrak{z}"], - ["d538", "\\mathbb{A}"], - ["d539", "\\mathbb{B}"], - ["d53b", "\\mathbb{D}"], - ["d53c", "\\mathbb{E}"], - ["d53d", "\\mathbb{F}"], - ["d53e", "\\mathbb{G}"], - ["d540", "\\mathbb{I}"], - ["d541", "\\mathbb{J}"], - ["d542", "\\mathbb{K}"], - ["d543", "\\mathbb{L}"], - ["d544", "\\mathbb{M}"], - ["d546", "\\mathbb{O}"], - ["d54a", "\\mathbb{S}"], - ["d54b", "\\mathbb{T}"], - ["d54c", "\\mathbb{U}"], - ["d54d", "\\mathbb{V}"], - ["d54e", "\\mathbb{W}"], - ["d54f", "\\mathbb{X}"], - ["d550", "\\mathbb{Y}"], - ["d552", "\\mathbb{a}"], - ["d553", "\\mathbb{b}"], - ["d554", "\\mathbb{c}"], - ["d555", "\\mathbb{d}"], - ["d556", "\\mathbb{e}"], - ["d557", "\\mathbb{f}"], - ["d558", "\\mathbb{g}"], - ["d559", "\\mathbb{h}"], - ["d55a", "\\mathbb{i}"], - ["d55b", "\\mathbb{j}"], - ["d55c", "\\mathbb{k}"], - ["d55d", "\\mathbb{l}"], - ["d55e", "\\mathbb{m}"], - ["d55f", "\\mathbb{n}"], - ["d560", "\\mathbb{o}"], - ["d561", "\\mathbb{p}"], - ["d562", "\\mathbb{q}"], - ["d563", "\\mathbb{r}"], - ["d564", "\\mathbb{s}"], - ["d565", "\\mathbb{t}"], - ["d566", "\\mathbb{u}"], - ["d567", "\\mathbb{v}"], - ["d568", "\\mathbb{w}"], - ["d569", "\\mathbb{x}"], - ["d56a", "\\mathbb{y}"], - ["d56b", "\\mathbb{z}"], - ["d56c", "\\mathslbb{A}"], - ["d56d", "\\mathslbb{B}"], - ["d56e", "\\mathslbb{C}"], - ["d56f", "\\mathslbb{D}"], - ["d570", "\\mathslbb{E}"], - ["d571", "\\mathslbb{F}"], - ["d572", "\\mathslbb{G}"], - ["d573", "\\mathslbb{H}"], - ["d574", "\\mathslbb{I}"], - ["d575", "\\mathslbb{J}"], - ["d576", "\\mathslbb{K}"], - ["d577", "\\mathslbb{L}"], - ["d578", "\\mathslbb{M}"], - ["d579", "\\mathslbb{N}"], - ["d57a", "\\mathslbb{O}"], - ["d57b", "\\mathslbb{P}"], - ["d57c", "\\mathslbb{Q}"], - ["d57d", "\\mathslbb{R}"], - ["d57e", "\\mathslbb{S}"], - ["d57f", "\\mathslbb{T}"], - ["d580", "\\mathslbb{U}"], - ["d581", "\\mathslbb{V}"], - ["d582", "\\mathslbb{W}"], - ["d583", "\\mathslbb{X}"], - ["d584", "\\mathslbb{Y}"], - ["d585", "\\mathslbb{Z}"], - ["d586", "\\mathslbb{a}"], - ["d587", "\\mathslbb{b}"], - ["d588", "\\mathslbb{c}"], - ["d589", "\\mathslbb{d}"], - ["d58a", "\\mathslbb{e}"], - ["d58b", "\\mathslbb{f}"], - ["d58c", "\\mathslbb{g}"], - ["d58d", "\\mathslbb{h}"], - ["d58e", "\\mathslbb{i}"], - ["d58f", "\\mathslbb{j}"], - ["d590", "\\mathslbb{k}"], - ["d591", "\\mathslbb{l}"], - ["d592", "\\mathslbb{m}"], - ["d593", "\\mathslbb{n}"], - ["d594", "\\mathslbb{o}"], - ["d595", "\\mathslbb{p}"], - ["d596", "\\mathslbb{q}"], - ["d597", "\\mathslbb{r}"], - ["d598", "\\mathslbb{s}"], - ["d599", "\\mathslbb{t}"], - ["d59a", "\\mathslbb{u}"], - ["d59b", "\\mathslbb{v}"], - ["d59c", "\\mathslbb{w}"], - ["d59d", "\\mathslbb{x}"], - ["d59e", "\\mathslbb{y}"], - ["d59f", "\\mathslbb{z}"], - ["d5a0", "\\mathsf{A}"], - ["d5a1", "\\mathsf{B}"], - ["d5a2", "\\mathsf{C}"], - ["d5a3", "\\mathsf{D}"], - ["d5a4", "\\mathsf{E}"], - ["d5a5", "\\mathsf{F}"], - ["d5a6", "\\mathsf{G}"], - ["d5a7", "\\mathsf{H}"], - ["d5a8", "\\mathsf{I}"], - ["d5a9", "\\mathsf{J}"], - ["d5aa", "\\mathsf{K}"], - ["d5ab", "\\mathsf{L}"], - ["d5ac", "\\mathsf{M}"], - ["d5ad", "\\mathsf{N}"], - ["d5ae", "\\mathsf{O}"], - ["d5af", "\\mathsf{P}"], - ["d5b0", "\\mathsf{Q}"], - ["d5b1", "\\mathsf{R}"], - ["d5b2", "\\mathsf{S}"], - ["d5b3", "\\mathsf{T}"], - ["d5b4", "\\mathsf{U}"], - ["d5b5", "\\mathsf{V}"], - ["d5b6", "\\mathsf{W}"], - ["d5b7", "\\mathsf{X}"], - ["d5b8", "\\mathsf{Y}"], - ["d5b9", "\\mathsf{Z}"], - ["d5ba", "\\mathsf{a}"], - ["d5bb", "\\mathsf{b}"], - ["d5bc", "\\mathsf{c}"], - ["d5bd", "\\mathsf{d}"], - ["d5be", "\\mathsf{e}"], - ["d5bf", "\\mathsf{f}"], - ["d5c0", "\\mathsf{g}"], - ["d5c1", "\\mathsf{h}"], - ["d5c2", "\\mathsf{i}"], - ["d5c3", "\\mathsf{j}"], - ["d5c4", "\\mathsf{k}"], - ["d5c5", "\\mathsf{l}"], - ["d5c6", "\\mathsf{m}"], - ["d5c7", "\\mathsf{n}"], - ["d5c8", "\\mathsf{o}"], - ["d5c9", "\\mathsf{p}"], - ["d5ca", "\\mathsf{q}"], - ["d5cb", "\\mathsf{r}"], - ["d5cc", "\\mathsf{s}"], - ["d5cd", "\\mathsf{t}"], - ["d5ce", "\\mathsf{u}"], - ["d5cf", "\\mathsf{v}"], - ["d5d0", "\\mathsf{w}"], - ["d5d1", "\\mathsf{x}"], - ["d5d2", "\\mathsf{y}"], - ["d5d3", "\\mathsf{z}"], - ["d5d4", "\\mathsfbf{A}"], - ["d5d5", "\\mathsfbf{B}"], - ["d5d6", "\\mathsfbf{C}"], - ["d5d7", "\\mathsfbf{D}"], - ["d5d8", "\\mathsfbf{E}"], - ["d5d9", "\\mathsfbf{F}"], - ["d5da", "\\mathsfbf{G}"], - ["d5db", "\\mathsfbf{H}"], - ["d5dc", "\\mathsfbf{I}"], - ["d5dd", "\\mathsfbf{J}"], - ["d5de", "\\mathsfbf{K}"], - ["d5df", "\\mathsfbf{L}"], - ["d5e0", "\\mathsfbf{M}"], - ["d5e1", "\\mathsfbf{N}"], - ["d5e2", "\\mathsfbf{O}"], - ["d5e3", "\\mathsfbf{P}"], - ["d5e4", "\\mathsfbf{Q}"], - ["d5e5", "\\mathsfbf{R}"], - ["d5e6", "\\mathsfbf{S}"], - ["d5e7", "\\mathsfbf{T}"], - ["d5e8", "\\mathsfbf{U}"], - ["d5e9", "\\mathsfbf{V}"], - ["d5ea", "\\mathsfbf{W}"], - ["d5eb", "\\mathsfbf{X}"], - ["d5ec", "\\mathsfbf{Y}"], - ["d5ed", "\\mathsfbf{Z}"], - ["d5ee", "\\mathsfbf{a}"], - ["d5ef", "\\mathsfbf{b}"], - ["d5f0", "\\mathsfbf{c}"], - ["d5f1", "\\mathsfbf{d}"], - ["d5f2", "\\mathsfbf{e}"], - ["d5f3", "\\mathsfbf{f}"], - ["d5f4", "\\mathsfbf{g}"], - ["d5f5", "\\mathsfbf{h}"], - ["d5f6", "\\mathsfbf{i}"], - ["d5f7", "\\mathsfbf{j}"], - ["d5f8", "\\mathsfbf{k}"], - ["d5f9", "\\mathsfbf{l}"], - ["d5fa", "\\mathsfbf{m}"], - ["d5fb", "\\mathsfbf{n}"], - ["d5fc", "\\mathsfbf{o}"], - ["d5fd", "\\mathsfbf{p}"], - ["d5fe", "\\mathsfbf{q}"], - ["d5ff", "\\mathsfbf{r}"], - ["d600", "\\mathsfbf{s}"], - ["d601", "\\mathsfbf{t}"], - ["d602", "\\mathsfbf{u}"], - ["d603", "\\mathsfbf{v}"], - ["d604", "\\mathsfbf{w}"], - ["d605", "\\mathsfbf{x}"], - ["d606", "\\mathsfbf{y}"], - ["d607", "\\mathsfbf{z}"], - ["d608", "\\mathsfsl{A}"], - ["d609", "\\mathsfsl{B}"], - ["d60a", "\\mathsfsl{C}"], - ["d60b", "\\mathsfsl{D}"], - ["d60c", "\\mathsfsl{E}"], - ["d60d", "\\mathsfsl{F}"], - ["d60e", "\\mathsfsl{G}"], - ["d60f", "\\mathsfsl{H}"], - ["d610", "\\mathsfsl{I}"], - ["d611", "\\mathsfsl{J}"], - ["d612", "\\mathsfsl{K}"], - ["d613", "\\mathsfsl{L}"], - ["d614", "\\mathsfsl{M}"], - ["d615", "\\mathsfsl{N}"], - ["d616", "\\mathsfsl{O}"], - ["d617", "\\mathsfsl{P}"], - ["d618", "\\mathsfsl{Q}"], - ["d619", "\\mathsfsl{R}"], - ["d61a", "\\mathsfsl{S}"], - ["d61b", "\\mathsfsl{T}"], - ["d61c", "\\mathsfsl{U}"], - ["d61d", "\\mathsfsl{V}"], - ["d61e", "\\mathsfsl{W}"], - ["d61f", "\\mathsfsl{X}"], - ["d620", "\\mathsfsl{Y}"], - ["d621", "\\mathsfsl{Z}"], - ["d622", "\\mathsfsl{a}"], - ["d623", "\\mathsfsl{b}"], - ["d624", "\\mathsfsl{c}"], - ["d625", "\\mathsfsl{d}"], - ["d626", "\\mathsfsl{e}"], - ["d627", "\\mathsfsl{f}"], - ["d628", "\\mathsfsl{g}"], - ["d629", "\\mathsfsl{h}"], - ["d62a", "\\mathsfsl{i}"], - ["d62b", "\\mathsfsl{j}"], - ["d62c", "\\mathsfsl{k}"], - ["d62d", "\\mathsfsl{l}"], - ["d62e", "\\mathsfsl{m}"], - ["d62f", "\\mathsfsl{n}"], - ["d630", "\\mathsfsl{o}"], - ["d631", "\\mathsfsl{p}"], - ["d632", "\\mathsfsl{q}"], - ["d633", "\\mathsfsl{r}"], - ["d634", "\\mathsfsl{s}"], - ["d635", "\\mathsfsl{t}"], - ["d636", "\\mathsfsl{u}"], - ["d637", "\\mathsfsl{v}"], - ["d638", "\\mathsfsl{w}"], - ["d639", "\\mathsfsl{x}"], - ["d63a", "\\mathsfsl{y}"], - ["d63b", "\\mathsfsl{z}"], - ["d63c", "\\mathsfbfsl{A}"], - ["d63d", "\\mathsfbfsl{B}"], - ["d63e", "\\mathsfbfsl{C}"], - ["d63f", "\\mathsfbfsl{D}"], - ["d640", "\\mathsfbfsl{E}"], - ["d641", "\\mathsfbfsl{F}"], - ["d642", "\\mathsfbfsl{G}"], - ["d643", "\\mathsfbfsl{H}"], - ["d644", "\\mathsfbfsl{I}"], - ["d645", "\\mathsfbfsl{J}"], - ["d646", "\\mathsfbfsl{K}"], - ["d647", "\\mathsfbfsl{L}"], - ["d648", "\\mathsfbfsl{M}"], - ["d649", "\\mathsfbfsl{N}"], - ["d64a", "\\mathsfbfsl{O}"], - ["d64b", "\\mathsfbfsl{P}"], - ["d64c", "\\mathsfbfsl{Q}"], - ["d64d", "\\mathsfbfsl{R}"], - ["d64e", "\\mathsfbfsl{S}"], - ["d64f", "\\mathsfbfsl{T}"], - ["d650", "\\mathsfbfsl{U}"], - ["d651", "\\mathsfbfsl{V}"], - ["d652", "\\mathsfbfsl{W}"], - ["d653", "\\mathsfbfsl{X}"], - ["d654", "\\mathsfbfsl{Y}"], - ["d655", "\\mathsfbfsl{Z}"], - ["d656", "\\mathsfbfsl{a}"], - ["d657", "\\mathsfbfsl{b}"], - ["d658", "\\mathsfbfsl{c}"], - ["d659", "\\mathsfbfsl{d}"], - ["d65a", "\\mathsfbfsl{e}"], - ["d65b", "\\mathsfbfsl{f}"], - ["d65c", "\\mathsfbfsl{g}"], - ["d65d", "\\mathsfbfsl{h}"], - ["d65e", "\\mathsfbfsl{i}"], - ["d65f", "\\mathsfbfsl{j}"], - ["d660", "\\mathsfbfsl{k}"], - ["d661", "\\mathsfbfsl{l}"], - ["d662", "\\mathsfbfsl{m}"], - ["d663", "\\mathsfbfsl{n}"], - ["d664", "\\mathsfbfsl{o}"], - ["d665", "\\mathsfbfsl{p}"], - ["d666", "\\mathsfbfsl{q}"], - ["d667", "\\mathsfbfsl{r}"], - ["d668", "\\mathsfbfsl{s}"], - ["d669", "\\mathsfbfsl{t}"], - ["d66a", "\\mathsfbfsl{u}"], - ["d66b", "\\mathsfbfsl{v}"], - ["d66c", "\\mathsfbfsl{w}"], - ["d66d", "\\mathsfbfsl{x}"], - ["d66e", "\\mathsfbfsl{y}"], - ["d66f", "\\mathsfbfsl{z}"], - ["d670", "\\mathtt{A}"], - ["d671", "\\mathtt{B}"], - ["d672", "\\mathtt{C}"], - ["d673", "\\mathtt{D}"], - ["d674", "\\mathtt{E}"], - ["d675", "\\mathtt{F}"], - ["d676", "\\mathtt{G}"], - ["d677", "\\mathtt{H}"], - ["d678", "\\mathtt{I}"], - ["d679", "\\mathtt{J}"], - ["d67a", "\\mathtt{K}"], - ["d67b", "\\mathtt{L}"], - ["d67c", "\\mathtt{M}"], - ["d67d", "\\mathtt{N}"], - ["d67e", "\\mathtt{O}"], - ["d67f", "\\mathtt{P}"], - ["d680", "\\mathtt{Q}"], - ["d681", "\\mathtt{R}"], - ["d682", "\\mathtt{S}"], - ["d683", "\\mathtt{T}"], - ["d684", "\\mathtt{U}"], - ["d685", "\\mathtt{V}"], - ["d686", "\\mathtt{W}"], - ["d687", "\\mathtt{X}"], - ["d688", "\\mathtt{Y}"], - ["d689", "\\mathtt{Z}"], - ["d68a", "\\mathtt{a}"], - ["d68b", "\\mathtt{b}"], - ["d68c", "\\mathtt{c}"], - ["d68d", "\\mathtt{d}"], - ["d68e", "\\mathtt{e}"], - ["d68f", "\\mathtt{f}"], - ["d690", "\\mathtt{g}"], - ["d691", "\\mathtt{h}"], - ["d692", "\\mathtt{i}"], - ["d693", "\\mathtt{j}"], - ["d694", "\\mathtt{k}"], - ["d695", "\\mathtt{l}"], - ["d696", "\\mathtt{m}"], - ["d697", "\\mathtt{n}"], - ["d698", "\\mathtt{o}"], - ["d699", "\\mathtt{p}"], - ["d69a", "\\mathtt{q}"], - ["d69b", "\\mathtt{r}"], - ["d69c", "\\mathtt{s}"], - ["d69d", "\\mathtt{t}"], - ["d69e", "\\mathtt{u}"], - ["d69f", "\\mathtt{v}"], - ["d6a0", "\\mathtt{w}"], - ["d6a1", "\\mathtt{x}"], - ["d6a2", "\\mathtt{y}"], - ["d6a3", "\\mathtt{z}"], - ["d6a8", "\\mathbf{\\Alpha}"], - ["d6a9", "\\mathbf{\\Beta}"], - ["d6aa", "\\mathbf{\\Gamma}"], - ["d6ab", "\\mathbf{\\Delta}"], - ["d6ac", "\\mathbf{\\Epsilon}"], - ["d6ad", "\\mathbf{\\Zeta}"], - ["d6ae", "\\mathbf{\\Eta}"], - ["d6af", "\\mathbf{\\Theta}"], - ["d6b0", "\\mathbf{\\Iota}"], - ["d6b1", "\\mathbf{\\Kappa}"], - ["d6b2", "\\mathbf{\\Lambda}"], - ["d6b5", "\\mathbf{\\Xi}"], - ["d6b7", "\\mathbf{\\Pi}"], - ["d6b8", "\\mathbf{\\Rho}"], - ["d6b9", "\\mathbf{\\vartheta}"], - ["d6ba", "\\mathbf{\\Sigma}"], - ["d6bb", "\\mathbf{\\Tau}"], - ["d6bc", "\\mathbf{\\Upsilon}"], - ["d6bd", "\\mathbf{\\Phi}"], - ["d6be", "\\mathbf{\\Chi}"], - ["d6bf", "\\mathbf{\\Psi}"], - ["d6c0", "\\mathbf{\\Omega}"], - ["d6c1", "\\mathbf{\\nabla}"], - ["d6c2", "\\mathbf{\\Alpha}"], - ["d6c3", "\\mathbf{\\Beta}"], - ["d6c4", "\\mathbf{\\Gamma}"], - ["d6c5", "\\mathbf{\\Delta}"], - ["d6c6", "\\mathbf{\\Epsilon}"], - ["d6c7", "\\mathbf{\\Zeta}"], - ["d6c8", "\\mathbf{\\Eta}"], - ["d6c9", "\\mathbf{\\theta}"], - ["d6ca", "\\mathbf{\\Iota}"], - ["d6cb", "\\mathbf{\\Kappa}"], - ["d6cc", "\\mathbf{\\Lambda}"], - ["d6cf", "\\mathbf{\\Xi}"], - ["d6d1", "\\mathbf{\\Pi}"], - ["d6d2", "\\mathbf{\\Rho}"], - ["d6d3", "\\mathbf{\\varsigma}"], - ["d6d4", "\\mathbf{\\Sigma}"], - ["d6d5", "\\mathbf{\\Tau}"], - ["d6d6", "\\mathbf{\\Upsilon}"], - ["d6d7", "\\mathbf{\\Phi}"], - ["d6d8", "\\mathbf{\\Chi}"], - ["d6d9", "\\mathbf{\\Psi}"], - ["d6da", "\\mathbf{\\Omega}"], - ["d6db", "\\partial{}"], - ["d6dc", "\\in"], - ["d6dd", "\\mathbf{\\vartheta}"], - ["d6de", "\\mathbf{\\varkappa}"], - ["d6df", "\\mathbf{\\phi}"], - ["d6e0", "\\mathbf{\\varrho}"], - ["d6e1", "\\mathbf{\\varpi}"], - ["d6e2", "\\mathsl{\\Alpha}"], - ["d6e3", "\\mathsl{\\Beta}"], - ["d6e4", "\\mathsl{\\Gamma}"], - ["d6e5", "\\mathsl{\\Delta}"], - ["d6e6", "\\mathsl{\\Epsilon}"], - ["d6e7", "\\mathsl{\\Zeta}"], - ["d6e8", "\\mathsl{\\Eta}"], - ["d6e9", "\\mathsl{\\Theta}"], - ["d6ea", "\\mathsl{\\Iota}"], - ["d6eb", "\\mathsl{\\Kappa}"], - ["d6ec", "\\mathsl{\\Lambda}"], - ["d6ef", "\\mathsl{\\Xi}"], - ["d6f1", "\\mathsl{\\Pi}"], - ["d6f2", "\\mathsl{\\Rho}"], - ["d6f3", "\\mathsl{\\vartheta}"], - ["d6f4", "\\mathsl{\\Sigma}"], - ["d6f5", "\\mathsl{\\Tau}"], - ["d6f6", "\\mathsl{\\Upsilon}"], - ["d6f7", "\\mathsl{\\Phi}"], - ["d6f8", "\\mathsl{\\Chi}"], - ["d6f9", "\\mathsl{\\Psi}"], - ["d6fa", "\\mathsl{\\Omega}"], - ["d6fb", "\\mathsl{\\nabla}"], - ["d6fc", "\\mathsl{\\Alpha}"], - ["d6fd", "\\mathsl{\\Beta}"], - ["d6fe", "\\mathsl{\\Gamma}"], - ["d6ff", "\\mathsl{\\Delta}"], - ["d700", "\\mathsl{\\Epsilon}"], - ["d701", "\\mathsl{\\Zeta}"], - ["d702", "\\mathsl{\\Eta}"], - ["d703", "\\mathsl{\\Theta}"], - ["d704", "\\mathsl{\\Iota}"], - ["d705", "\\mathsl{\\Kappa}"], - ["d706", "\\mathsl{\\Lambda}"], - ["d709", "\\mathsl{\\Xi}"], - ["d70b", "\\mathsl{\\Pi}"], - ["d70c", "\\mathsl{\\Rho}"], - ["d70d", "\\mathsl{\\varsigma}"], - ["d70e", "\\mathsl{\\Sigma}"], - ["d70f", "\\mathsl{\\Tau}"], - ["d710", "\\mathsl{\\Upsilon}"], - ["d711", "\\mathsl{\\Phi}"], - ["d712", "\\mathsl{\\Chi}"], - ["d713", "\\mathsl{\\Psi}"], - ["d714", "\\mathsl{\\Omega}"], - ["d715", "\\partial{}"], - ["d716", "\\in"], - ["d717", "\\mathsl{\\vartheta}"], - ["d718", "\\mathsl{\\varkappa}"], - ["d719", "\\mathsl{\\phi}"], - ["d71a", "\\mathsl{\\varrho}"], - ["d71b", "\\mathsl{\\varpi}"], - ["d71c", "\\mathbit{\\Alpha}"], - ["d71d", "\\mathbit{\\Beta}"], - ["d71e", "\\mathbit{\\Gamma}"], - ["d71f", "\\mathbit{\\Delta}"], - ["d720", "\\mathbit{\\Epsilon}"], - ["d721", "\\mathbit{\\Zeta}"], - ["d722", "\\mathbit{\\Eta}"], - ["d723", "\\mathbit{\\Theta}"], - ["d724", "\\mathbit{\\Iota}"], - ["d725", "\\mathbit{\\Kappa}"], - ["d726", "\\mathbit{\\Lambda}"], - ["d729", "\\mathbit{\\Xi}"], - ["d72b", "\\mathbit{\\Pi}"], - ["d72c", "\\mathbit{\\Rho}"], - ["d72d", "\\mathbit{O}"], - ["d72e", "\\mathbit{\\Sigma}"], - ["d72f", "\\mathbit{\\Tau}"], - ["d730", "\\mathbit{\\Upsilon}"], - ["d731", "\\mathbit{\\Phi}"], - ["d732", "\\mathbit{\\Chi}"], - ["d733", "\\mathbit{\\Psi}"], - ["d734", "\\mathbit{\\Omega}"], - ["d735", "\\mathbit{\\nabla}"], - ["d736", "\\mathbit{\\Alpha}"], - ["d737", "\\mathbit{\\Beta}"], - ["d738", "\\mathbit{\\Gamma}"], - ["d739", "\\mathbit{\\Delta}"], - ["d73a", "\\mathbit{\\Epsilon}"], - ["d73b", "\\mathbit{\\Zeta}"], - ["d73c", "\\mathbit{\\Eta}"], - ["d73d", "\\mathbit{\\Theta}"], - ["d73e", "\\mathbit{\\Iota}"], - ["d73f", "\\mathbit{\\Kappa}"], - ["d740", "\\mathbit{\\Lambda}"], - ["d743", "\\mathbit{\\Xi}"], - ["d745", "\\mathbit{\\Pi}"], - ["d746", "\\mathbit{\\Rho}"], - ["d747", "\\mathbit{\\varsigma}"], - ["d748", "\\mathbit{\\Sigma}"], - ["d749", "\\mathbit{\\Tau}"], - ["d74a", "\\mathbit{\\Upsilon}"], - ["d74b", "\\mathbit{\\Phi}"], - ["d74c", "\\mathbit{\\Chi}"], - ["d74d", "\\mathbit{\\Psi}"], - ["d74e", "\\mathbit{\\Omega}"], - ["d74f", "\\partial{}"], - ["d750", "\\in"], - ["d751", "\\mathbit{\\vartheta}"], - ["d752", "\\mathbit{\\varkappa}"], - ["d753", "\\mathbit{\\phi}"], - ["d754", "\\mathbit{\\varrho}"], - ["d755", "\\mathbit{\\varpi}"], - ["d756", "\\mathsfbf{\\Alpha}"], - ["d757", "\\mathsfbf{\\Beta}"], - ["d758", "\\mathsfbf{\\Gamma}"], - ["d759", "\\mathsfbf{\\Delta}"], - ["d75a", "\\mathsfbf{\\Epsilon}"], - ["d75b", "\\mathsfbf{\\Zeta}"], - ["d75c", "\\mathsfbf{\\Eta}"], - ["d75d", "\\mathsfbf{\\Theta}"], - ["d75e", "\\mathsfbf{\\Iota}"], - ["d75f", "\\mathsfbf{\\Kappa}"], - ["d760", "\\mathsfbf{\\Lambda}"], - ["d763", "\\mathsfbf{\\Xi}"], - ["d765", "\\mathsfbf{\\Pi}"], - ["d766", "\\mathsfbf{\\Rho}"], - ["d767", "\\mathsfbf{\\vartheta}"], - ["d768", "\\mathsfbf{\\Sigma}"], - ["d769", "\\mathsfbf{\\Tau}"], - ["d76a", "\\mathsfbf{\\Upsilon}"], - ["d76b", "\\mathsfbf{\\Phi}"], - ["d76c", "\\mathsfbf{\\Chi}"], - ["d76d", "\\mathsfbf{\\Psi}"], - ["d76e", "\\mathsfbf{\\Omega}"], - ["d76f", "\\mathsfbf{\\nabla}"], - ["d770", "\\mathsfbf{\\Alpha}"], - ["d771", "\\mathsfbf{\\Beta}"], - ["d772", "\\mathsfbf{\\Gamma}"], - ["d773", "\\mathsfbf{\\Delta}"], - ["d774", "\\mathsfbf{\\Epsilon}"], - ["d775", "\\mathsfbf{\\Zeta}"], - ["d776", "\\mathsfbf{\\Eta}"], - ["d777", "\\mathsfbf{\\Theta}"], - ["d778", "\\mathsfbf{\\Iota}"], - ["d779", "\\mathsfbf{\\Kappa}"], - ["d77a", "\\mathsfbf{\\Lambda}"], - ["d77d", "\\mathsfbf{\\Xi}"], - ["d77f", "\\mathsfbf{\\Pi}"], - ["d780", "\\mathsfbf{\\Rho}"], - ["d781", "\\mathsfbf{\\varsigma}"], - ["d782", "\\mathsfbf{\\Sigma}"], - ["d783", "\\mathsfbf{\\Tau}"], - ["d784", "\\mathsfbf{\\Upsilon}"], - ["d785", "\\mathsfbf{\\Phi}"], - ["d786", "\\mathsfbf{\\Chi}"], - ["d787", "\\mathsfbf{\\Psi}"], - ["d788", "\\mathsfbf{\\Omega}"], - ["d789", "\\partial{}"], - ["d78a", "\\in"], - ["d78b", "\\mathsfbf{\\vartheta}"], - ["d78c", "\\mathsfbf{\\varkappa}"], - ["d78d", "\\mathsfbf{\\phi}"], - ["d78e", "\\mathsfbf{\\varrho}"], - ["d78f", "\\mathsfbf{\\varpi}"], - ["d790", "\\mathsfbfsl{\\Alpha}"], - ["d791", "\\mathsfbfsl{\\Beta}"], - ["d792", "\\mathsfbfsl{\\Gamma}"], - ["d793", "\\mathsfbfsl{\\Delta}"], - ["d794", "\\mathsfbfsl{\\Epsilon}"], - ["d795", "\\mathsfbfsl{\\Zeta}"], - ["d796", "\\mathsfbfsl{\\Eta}"], - ["d797", "\\mathsfbfsl{\\vartheta}"], - ["d798", "\\mathsfbfsl{\\Iota}"], - ["d799", "\\mathsfbfsl{\\Kappa}"], - ["d79a", "\\mathsfbfsl{\\Lambda}"], - ["d79d", "\\mathsfbfsl{\\Xi}"], - ["d79f", "\\mathsfbfsl{\\Pi}"], - ["d7a0", "\\mathsfbfsl{\\Rho}"], - ["d7a1", "\\mathsfbfsl{\\vartheta}"], - ["d7a2", "\\mathsfbfsl{\\Sigma}"], - ["d7a3", "\\mathsfbfsl{\\Tau}"], - ["d7a4", "\\mathsfbfsl{\\Upsilon}"], - ["d7a5", "\\mathsfbfsl{\\Phi}"], - ["d7a6", "\\mathsfbfsl{\\Chi}"], - ["d7a7", "\\mathsfbfsl{\\Psi}"], - ["d7a8", "\\mathsfbfsl{\\Omega}"], - ["d7a9", "\\mathsfbfsl{\\nabla}"], - ["d7aa", "\\mathsfbfsl{\\Alpha}"], - ["d7ab", "\\mathsfbfsl{\\Beta}"], - ["d7ac", "\\mathsfbfsl{\\Gamma}"], - ["d7ad", "\\mathsfbfsl{\\Delta}"], - ["d7ae", "\\mathsfbfsl{\\Epsilon}"], - ["d7af", "\\mathsfbfsl{\\Zeta}"], - ["d7b0", "\\mathsfbfsl{\\Eta}"], - ["d7b1", "\\mathsfbfsl{\\vartheta}"], - ["d7b2", "\\mathsfbfsl{\\Iota}"], - ["d7b3", "\\mathsfbfsl{\\Kappa}"], - ["d7b4", "\\mathsfbfsl{\\Lambda}"], - ["d7b7", "\\mathsfbfsl{\\Xi}"], - ["d7b9", "\\mathsfbfsl{\\Pi}"], - ["d7ba", "\\mathsfbfsl{\\Rho}"], - ["d7bb", "\\mathsfbfsl{\\varsigma}"], - ["d7bc", "\\mathsfbfsl{\\Sigma}"], - ["d7bd", "\\mathsfbfsl{\\Tau}"], - ["d7be", "\\mathsfbfsl{\\Upsilon}"], - ["d7bf", "\\mathsfbfsl{\\Phi}"], - ["d7c0", "\\mathsfbfsl{\\Chi}"], - ["d7c1", "\\mathsfbfsl{\\Psi}"], - ["d7c2", "\\mathsfbfsl{\\Omega}"], - ["d7c3", "\\partial{}"], - ["d7c4", "\\in"], - ["d7c5", "\\mathsfbfsl{\\vartheta}"], - ["d7c6", "\\mathsfbfsl{\\varkappa}"], - ["d7c7", "\\mathsfbfsl{\\phi}"], - ["d7c8", "\\mathsfbfsl{\\varrho}"], - ["d7c9", "\\mathsfbfsl{\\varpi}"], - ["d7ce", "\\mathbf{0}"], - ["d7cf", "\\mathbf{1}"], - ["d7d0", "\\mathbf{2}"], - ["d7d1", "\\mathbf{3}"], - ["d7d2", "\\mathbf{4}"], - ["d7d3", "\\mathbf{5}"], - ["d7d4", "\\mathbf{6}"], - ["d7d5", "\\mathbf{7}"], - ["d7d6", "\\mathbf{8}"], - ["d7d7", "\\mathbf{9}"], - ["d7d8", "\\mathbb{0}"], - ["d7d9", "\\mathbb{1}"], - ["d7da", "\\mathbb{2}"], - ["d7db", "\\mathbb{3}"], - ["d7dc", "\\mathbb{4}"], - ["d7dd", "\\mathbb{5}"], - ["d7de", "\\mathbb{6}"], - ["d7df", "\\mathbb{7}"], - ["d7e0", "\\mathbb{8}"], - ["d7e1", "\\mathbb{9}"], - ["d7e2", "\\mathsf{0}"], - ["d7e3", "\\mathsf{1}"], - ["d7e4", "\\mathsf{2}"], - ["d7e5", "\\mathsf{3}"], - ["d7e6", "\\mathsf{4}"], - ["d7e7", "\\mathsf{5}"], - ["d7e8", "\\mathsf{6}"], - ["d7e9", "\\mathsf{7}"], - ["d7ea", "\\mathsf{8}"], - ["d7eb", "\\mathsf{9}"], - ["d7ec", "\\mathsfbf{0}"], - ["d7ed", "\\mathsfbf{1}"], - ["d7ee", "\\mathsfbf{2}"], - ["d7ef", "\\mathsfbf{3}"], - ["d7f0", "\\mathsfbf{4}"], - ["d7f1", "\\mathsfbf{5}"], - ["d7f2", "\\mathsfbf{6}"], - ["d7f3", "\\mathsfbf{7}"], - ["d7f4", "\\mathsfbf{8}"], - ["d7f5", "\\mathsfbf{9}"], - ["d7f6", "\\mathtt{0}"], - ["d7f7", "\\mathtt{1}"], - ["d7f8", "\\mathtt{2}"], - ["d7f9", "\\mathtt{3}"], - ["d7fa", "\\mathtt{4}"], - ["d7fb", "\\mathtt{5}"], - ["d7fc", "\\mathtt{6}"], - ["d7fd", "\\mathtt{7}"], - ["d7fe", "\\mathtt{8}"], - ["d7ff", "\\mathtt{9}"] -]); - // src/utils.ts -function escapeSpecialCharacters(str) { - var _a; - let result = str; - const mathExpressions = []; - result = result.replace(/\$[^$]+\$/g, (match) => { - mathExpressions.push(match); - return `MATH.EXP.${mathExpressions.length - 1}`; - }); - let newstr = ""; - let escapeMode = false; - for (let i = 0; i < result.length; i++) { - if (escapeMode) { - escapeMode = false; - newstr += result[i]; - continue; - } - if (result[i] === "\\") { - escapeMode = true; - newstr += result[i]; - continue; - } - const c = result.charCodeAt(i).toString(16).padStart(4, "0"); - newstr += (_a = specialCharacters.get(c)) != null ? _a : result[i]; - } - return newstr.replace( - /MATH\.EXP\.(\d+)/g, - (_, i) => { - var _a2; - return (_a2 = mathExpressions[Number(i)]) != null ? _a2 : ""; - } - ); -} -function titleCase(str) { - return str.replace(/(\w)(\S*)/g, (_, first, rest) => { - const word = first + rest; - if (isRomanNumeral(word)) return word; - return first.toLocaleUpperCase() + rest.toLocaleLowerCase(); - }); -} -function isRomanNumeral(str) { - return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(str); -} function alphaNum(str) { return str.replace(/[^0-9A-Za-z]/g, "").toLocaleLowerCase(); } @@ -2807,42 +435,12 @@ function doubleEnclose(str) { const result = stringifyLaTeX(latex); return alreadyDoubleEnclosed ? result : `{${result}}`; } -function removeEnclosingBraces(str) { - return str.replace(/^\{([^{}]*)\}$/g, "$1"); -} -function escapeURL(str) { - return str.replace(/\\?_/g, "\\%5F"); -} -function limitAuthors(str, maxAuthors) { - const authors = str.split(" and "); - if (authors.length > maxAuthors) { - return [...authors.slice(0, maxAuthors), "others"].join(" and "); - } - return str; -} -function formatPageRange(str) { - let result = str; - for (let i = 0; i < 4; i++) { - result = result.replace(/(\d)\s*-\s*(\d)/g, "$1--$2"); - } - return result; -} function isEntryNode(node) { var _a; return node.type !== "text" && ((_a = node.block) == null ? void 0 : _a.type) === "entry"; } // src/format.ts -var VERBATIM_FIELDS = [ - "url", - "doi", - "eprint", - "file", - "verba", - "verbb", - "verbc", - "pdf" -]; function formatBibtex(ast, options, replacementKeys) { const { omit, tab, space } = options; const indent = tab ? " " : " ".repeat(space); @@ -2923,41 +521,17 @@ function formatComment(comment, { stripComments, tidyComments }) { return comment.replace(/^[ \t]*\n|[ \t]*$/g, ""); } function formatValue(field, options) { - const { - curly, - numeric, - align, - stripEnclosingBraces, - dropAllCaps, - escape: enableEscape, - encodeUrls, - wrap, - maxAuthors, - tab, - space, - enclosingBraces, - removeBraces, - months: abbreviateMonths - } = options; + const { curly, numeric, align, wrap, tab, space, enclosingBraces } = options; const nameLowerCase = field.name.toLocaleLowerCase(); const indent = tab ? " " : " ".repeat(space); const enclosingBracesFields = new Set( (enclosingBraces != null ? enclosingBraces : []).map((field2) => field2.toLocaleLowerCase()) ); - const removeBracesFields = new Set( - (removeBraces != null ? removeBraces : []).map((field2) => field2.toLocaleLowerCase()) - ); return field.value.concat.map(({ type, value }) => { const isNumeric = value.match(/^[1-9][0-9]*$/); if (isNumeric && curly) { type = "braced"; } - if (abbreviateMonths && nameLowerCase === "month") { - const abbreviation = MONTH_CONVERSIONS[value.toLowerCase()]; - if (abbreviation) { - return abbreviation; - } - } if (type === "literal" || numeric && isNumeric) { return value; } @@ -2967,27 +541,6 @@ function formatValue(field, options) { return dig3; } value = unwrapText(value); - if (stripEnclosingBraces) { - value = removeEnclosingBraces(value); - } - if (dropAllCaps && !value.match(/[a-z]/)) { - value = titleCase(value); - } - if (nameLowerCase === "url" && encodeUrls) { - value = escapeURL(value); - } - if (!VERBATIM_FIELDS.includes(nameLowerCase) && enableEscape) { - value = escapeSpecialCharacters(value); - } - if (nameLowerCase === "pages") { - value = formatPageRange(value); - } - if (nameLowerCase === "author" && maxAuthors) { - value = limitAuthors(value, maxAuthors); - } - if (removeBracesFields.has(nameLowerCase)) { - value = stringifyLaTeX(flattenLaTeX(parseLaTeX(value))); - } if (enclosingBracesFields.has(nameLowerCase) && (type === "braced" || curly)) { value = doubleEnclose(value); } @@ -3590,6 +1143,11 @@ var Cache = class { } return value; } + invalidateEntryValue(entry, field) { + var _a, _b; + (_a = this.valueLookup.get(entry)) == null ? void 0 : _a.delete(field.toLocaleLowerCase()); + (_b = this.renderValueLookup.get(entry)) == null ? void 0 : _b.delete(field.toLocaleLowerCase()); + } lookupField(entry, fieldLc) { var _a; let fieldNode = (_a = this.fieldLookup.get(entry)) == null ? void 0 : _a.get(fieldLc); @@ -4227,9 +1785,13 @@ var LiteralNode = class { this.parent = parent; this.value = value; this.type = "literal"; - parent.concat.push(this); } }; +function createLiteralNode(parent, value) { + const node = new LiteralNode(parent, value); + parent.concat.push(node); + return node; +} var BracedNode = class { constructor(parent) { this.parent = parent; @@ -4237,9 +1799,13 @@ var BracedNode = class { this.value = ""; /** Used to count opening and closing braces */ this.depth = 0; - parent.concat.push(this); } }; +function createBracedNode(parent) { + const node = new BracedNode(parent); + parent.concat.push(node); + return node; +} var QuotedNode = class { constructor(parent) { this.parent = parent; @@ -4247,10 +1813,14 @@ var QuotedNode = class { this.value = ""; /** Used to count opening and closing braces */ this.depth = 0; - parent.concat.push(this); } }; -function generateAST(input) { +function createQuotedNode(parent) { + const node = new QuotedNode(parent); + parent.concat.push(node); + return node; +} +function parseBibTeX(input) { var _a, _b, _c; const rootNode = new RootNode(); let node = rootNode; @@ -4344,165 +1914,2622 @@ function generateAST(input) { } else { node.keyEnded = true; } - } else if (char === ",") { - node = new FieldNode(node); - } else if (node.wrapType === "{" && char === "}" || node.wrapType === "(" && char === ")") { - node = node.parent.parent; - } else if (char === "=" && node.key && isValidFieldName(node.key)) { - const field = new FieldNode(node, node.key); - node.fields.push(field); - node.key = void 0; - node = field.value; - } else if (node.keyEnded) { - throw new BibTeXSyntaxError( - input, - node, - i, - line, - column, - "The entry key cannot contain whitespace" - ); - } else if (!isValidKeyCharacter(char)) { - throw new BibTeXSyntaxError( - input, - node, - i, - line, - column, - `The entry key cannot contain the character (${char})` - ); - } else { - node.key = ((_c = node.key) != null ? _c : "") + char; + } else if (char === ",") { + node = new FieldNode(node); + } else if (node.wrapType === "{" && char === "}" || node.wrapType === "(" && char === ")") { + node = node.parent.parent; + } else if (char === "=" && node.key && isValidFieldName(node.key)) { + const field = new FieldNode(node, node.key); + node.fields.push(field); + node.key = void 0; + node = field.value; + } else if (node.keyEnded) { + throw new BibTeXSyntaxError( + input, + node, + i, + line, + column, + "The entry key cannot contain whitespace" + ); + } else if (!isValidKeyCharacter(char)) { + throw new BibTeXSyntaxError( + input, + node, + i, + line, + column, + `The entry key cannot contain the character (${char})` + ); + } else { + node.key = ((_c = node.key) != null ? _c : "") + char; + } + break; + } + case "field": { + if (char === "}" || char === ")") { + node.name = node.name.trim(); + node = node.parent.parent.parent; + } else if (char === "=") { + node.name = node.name.trim(); + node = node.value; + } else if (char === ",") { + node.name = node.name.trim(); + node = new FieldNode(node.parent); + } else if (!isValidFieldName(char)) { + throw new BibTeXSyntaxError(input, node, i, line, column); + } else if (!node.name) { + if (!isWhitespace(char)) { + node.parent.fields.push(node); + node.name = char; + } else { + } + } else { + node.name += char; + } + break; + } + case "concat": { + if (isWhitespace(char)) { + break; + } + if (node.canConsumeValue) { + if (/[#=,}()[\]]/.test(char)) { + throw new BibTeXSyntaxError(input, node, i, line, column); + } + node.canConsumeValue = false; + if (char === "{") { + node = createBracedNode(node); + } else if (char === '"') { + node = createQuotedNode(node); + } else { + node = createLiteralNode(node, char); + } + } else { + if (char === ",") { + node = new FieldNode(node.parent.parent); + } else if (char === "}" || char === ")") { + node = node.parent.parent.parent.parent; + } else if (char === "#") { + node.canConsumeValue = true; + } else { + throw new BibTeXSyntaxError(input, node, i, line, column); + } + } + break; + } + case "literal": + if (isWhitespace(char)) { + node = node.parent; + } else if (char === ",") { + node = new FieldNode(node.parent.parent.parent); + } else if (char === "}") { + node = node.parent.parent.parent.parent.parent; + } else if (char === "#") { + node = node.parent; + node.canConsumeValue = true; + } else { + node.value += char; + } + break; + // Values may be enclosed in curly braces. Curly braces may be used within + // the value but they must be balanced. + case "braced": + if (char === "}" && node.depth === 0) { + node = node.parent; + break; + } + if (char === "{") { + node.depth++; + } else if (char === "}") { + node.depth--; + } + node.value += char; + break; + // Values may be enclosed in double quotes. Curly braces may be used + // within quoted values but they must be balanced. + // + // To escape a double quote, surround it with braces `{"}`. + // https://web.archive.org/web/20210422110817/https://maverick.inria.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html + case "quoted": + if (char === '"' && node.depth === 0) { + node = node.parent; + break; + } + if (char === "{") { + node.depth++; + } else if (char === "}") { + node.depth--; + if (node.depth < 0) { + throw new BibTeXSyntaxError(input, node, i, line, column); + } } + node.value += char; break; + } + } + return rootNode; +} +function isWhitespace(string) { + return /^[ \t\n\r]*$/.test(string); +} +function isValidKeyCharacter(char) { + return !/[#%{}~$,]/.test(char); +} +function isValidFieldName(char) { + return !/[=,{}()[\]]/.test(char); +} +var BibTeXSyntaxError = class extends Error { + constructor(input, node, pos, line, column, hint) { + var _a; + super( + `Line ${line}:${column}: Syntax Error in ${node.type} (${hint}) +${input.slice(Math.max(0, pos - 20), pos)}>>${input[pos]}<<${input.slice(pos + 1, pos + 20)}` + ); + this.node = node; + this.line = line; + this.column = column; + this.hint = hint; + this.name = "Syntax Error"; + this.char = (_a = input[pos]) != null ? _a : ""; + } +}; + +// src/modifiers/abbreviateMonthsModifier.ts +var abbreviateMonthsModifier = { + condition: (fieldName, options) => Boolean(options.months && fieldName === "month"), + modifyNode: (node) => { + const concatNode = node.value; + for (let i = 0; i < concatNode.concat.length; i++) { + const child = concatNode.concat[i]; + const abbreviation = MONTH_CONVERSIONS[child.value.toLowerCase()]; + if (abbreviation) { + concatNode.concat[i] = new LiteralNode(concatNode, abbreviation); + } + } + } +}; + +// src/modifiers/dropAllCapsModifier.ts +var dropAllCapsModifier = { + condition: (fieldName, options, entry, cache) => Boolean( + options.dropAllCaps && !cache.lookupRenderedEntryValue(entry, fieldName).match(/[a-z]/) + ), + modifyRenderedValue: (str) => { + return str.replace(/(\w)(\S*)/g, (_, first, rest) => { + const word = first + rest; + if (isRomanNumeral(word)) return word; + return first.toLocaleUpperCase() + rest.toLocaleLowerCase(); + }); + } +}; +function isRomanNumeral(str) { + return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(str); +} + +// src/modifiers/encodeUrlsModifier.ts +var encodeUrlsModifier = { + condition: (fieldName, options) => Boolean(fieldName === "url" && options.encodeUrls), + modifyRenderedValue: (str) => str.replace(/\\?_/g, "\\%5F") +}; + +// src/unicode.ts +var specialCharacters = /* @__PURE__ */ new Map([ + ["0023", "\\#"], + ["0024", "\\$"], + ["0025", "\\%"], + ["0026", "\\&"], + ["0027", "'"], + ["0040", "\\@"], + ["002a", "\\textasteriskcentered"], + ["005f", "\\_"], + ["007c", "\\vert{}"], + ["00a0", "~"], + ["00a1", "\\textexclamdown{}"], + ["00a2", "\\textcent{}"], + ["00a3", "\\textsterling{}"], + ["00a4", "\\textcurrency{}"], + ["00a5", "\\textyen{}"], + ["00a6", "\\textbrokenbar{}"], + ["00a7", "\\textsection{}"], + ["00a8", "\\textasciidieresis{}"], + ["00a9", "\\textcopyright{}"], + ["00aa", "\\textordfeminine{}"], + ["00ab", "\\guillemotleft{}"], + ["00ac", "\\lnot{}"], + ["00ad", "\\-"], + ["00ae", "\\textregistered{}"], + ["00af", "\\textasciimacron{}"], + ["00b0", "\\textdegree{}"], + ["00b1", "\\pm{}"], + ["00b2", "\\ensuremath{^2}"], + ["00b3", "\\ensuremath{^3}"], + ["00b4", "\\textasciiacute{}"], + ["00b5", "\\mathrm{\\mu}"], + ["00b6", "\\textparagraph{}"], + ["00b7", "\\cdot{}"], + ["00b8", "\\c{}"], + ["00b9", "\\ensuremath{^1}"], + ["00ba", "\\textordmasculine{}"], + ["00bb", "\\guillemotright{}"], + ["00bc", "\\textonequarter{}"], + ["00bd", "\\textonehalf{}"], + ["00be", "\\textthreequarters{}"], + ["00bf", "\\textquestiondown{}"], + ["00c0", "\\`{A}"], + ["00c1", "\\'{A}"], + ["00c2", "\\^{A}"], + ["00c3", "\\~{A}"], + ["00c4", '\\"{A}'], + ["00c5", "\\AA{}"], + ["00c6", "\\AE{}"], + ["00c7", "\\c{C}"], + ["00c8", "\\`{E}"], + ["00c9", "\\'{E}"], + ["00ca", "\\^{E}"], + ["00cb", '\\"{E}'], + ["00cc", "\\`{I}"], + ["00cd", "\\'{I}"], + ["00ce", "\\^{I}"], + ["00cf", '\\"{I}'], + ["00d0", "\\DH{}"], + ["00d1", "\\~{N}"], + ["00d2", "\\`{O}"], + ["00d3", "\\'{O}"], + ["00d4", "\\^{O}"], + ["00d5", "\\~{O}"], + ["00d6", '\\"{O}'], + ["00d7", "\\texttimes{}"], + ["00d8", "\\O{}"], + ["00d9", "\\`{U}"], + ["00da", "\\'{U}"], + ["00db", "\\^{U}"], + ["00dc", '\\"{U}'], + ["00dd", "\\'{Y}"], + ["00de", "\\TH{}"], + ["00df", "\\ss{}"], + ["00e0", "\\`{a}"], + ["00e1", "\\'{a}"], + ["00e2", "\\^{a}"], + ["00e3", "\\~{a}"], + ["00e4", '\\"{a}'], + ["00e5", "\\aa{}"], + ["00e6", "\\ae{}"], + ["00e7", "\\c{c}"], + ["00e8", "\\`{e}"], + ["00e9", "\\'{e}"], + ["00ea", "\\^{e}"], + ["00eb", '\\"{e}'], + ["00ec", "\\`{\\i}"], + ["00ed", "\\'{\\i}"], + ["00ee", "\\^{\\i}"], + ["00ef", '\\"{\\i}'], + ["00f0", "\\dh{}"], + ["00f1", "\\~{n}"], + ["00f2", "\\`{o}"], + ["00f3", "\\'{o}"], + ["00f4", "\\^{o}"], + ["00f5", "\\~{o}"], + ["00f6", '\\"{o}'], + ["00f7", "\\div{}"], + ["00f8", "\\o{}"], + ["00f9", "\\`{u}"], + ["00fa", "\\'{u}"], + ["00fb", "\\^{u}"], + ["00fc", '\\"{u}'], + ["00fd", "\\'{y}"], + ["00fe", "\\th{}"], + ["00ff", '\\"{y}'], + ["0100", "\\={A}"], + ["0101", "\\={a}"], + ["0102", "\\u{A}"], + ["0103", "\\u{a}"], + ["0104", "\\k{A}"], + ["0105", "\\k{a}"], + ["0106", "\\'{C}"], + ["0107", "\\'{c}"], + ["0108", "\\^{C}"], + ["0109", "\\^{c}"], + ["010a", "\\.{C}"], + ["010b", "\\.{c}"], + ["010c", "\\v{C}"], + ["010d", "\\v{c}"], + ["010e", "\\v{D}"], + ["010f", "\\v{d}"], + ["0110", "\\DJ{}"], + ["0111", "\\dj{}"], + ["0112", "\\={E}"], + ["0113", "\\={e}"], + ["0114", "\\u{E}"], + ["0115", "\\u{e}"], + ["0116", "\\.{E}"], + ["0117", "\\.{e}"], + ["0118", "\\k{E}"], + ["0119", "\\k{e}"], + ["011a", "\\v{E}"], + ["011b", "\\v{e}"], + ["011c", "\\^{G}"], + ["011d", "\\^{g}"], + ["011e", "\\u{G}"], + ["011f", "\\u{g}"], + ["0120", "\\.{G}"], + ["0121", "\\.{g}"], + ["0122", "\\c{G}"], + ["0123", "\\c{g}"], + ["0124", "\\^{H}"], + ["0125", "\\^{h}"], + ["0126", "{\\fontencoding{LELA}\\selectfont\\char40}"], + ["0127", "\\Elzxh{}"], + ["0128", "\\~{I}"], + ["0129", "\\~{\\i}"], + ["012a", "\\={I}"], + ["012b", "\\={\\i}"], + ["012c", "\\u{I}"], + ["012d", "\\u{\\i}"], + ["012e", "\\k{I}"], + ["012f", "\\k{i}"], + ["0130", "\\.{I}"], + ["0131", "\\i{}"], + ["0132", "IJ"], + ["0133", "ij"], + ["0134", "\\^{J}"], + ["0135", "\\^{\\j}"], + ["0136", "\\c{K}"], + ["0137", "\\c{k}"], + ["0138", "{\\fontencoding{LELA}\\selectfont\\char91}"], + ["0139", "\\'{L}"], + ["013a", "\\'{l}"], + ["013b", "\\c{L}"], + ["013c", "\\c{l}"], + ["013d", "\\v{L}"], + ["013e", "\\v{l}"], + ["013f", "{\\fontencoding{LELA}\\selectfont\\char201}"], + ["0140", "{\\fontencoding{LELA}\\selectfont\\char202}"], + ["0141", "\\L{}"], + ["0142", "\\l{}"], + ["0143", "\\'{N}"], + ["0144", "\\'{n}"], + ["0145", "\\c{N}"], + ["0146", "\\c{n}"], + ["0147", "\\v{N}"], + ["0148", "\\v{n}"], + ["0149", "'n"], + ["014a", "\\NG{}"], + ["014b", "\\ng{}"], + ["014c", "\\={O}"], + ["014d", "\\={o}"], + ["014e", "\\u{O}"], + ["014f", "\\u{o}"], + ["0150", "\\H{O}"], + ["0151", "\\H{o}"], + ["0152", "\\OE{}"], + ["0153", "\\oe{}"], + ["0154", "\\'{R}"], + ["0155", "\\'{r}"], + ["0156", "\\c{R}"], + ["0157", "\\c{r}"], + ["0158", "\\v{R}"], + ["0159", "\\v{r}"], + ["015a", "\\'{S}"], + ["015b", "\\'{s}"], + ["015c", "\\^{S}"], + ["015d", "\\^{s}"], + ["015e", "\\c{S}"], + ["015f", "\\c{s}"], + ["0160", "\\v{S}"], + ["0161", "\\v{s}"], + ["0162", "\\c{T}"], + ["0163", "\\c{t}"], + ["0164", "\\v{T}"], + ["0165", "\\v{t}"], + ["0166", "{\\fontencoding{LELA}\\selectfont\\char47}"], + ["0167", "{\\fontencoding{LELA}\\selectfont\\char63}"], + ["0168", "\\~{U}"], + ["0169", "\\~{u}"], + ["016a", "\\={U}"], + ["016b", "\\={u}"], + ["016c", "\\u{U}"], + ["016d", "\\u{u}"], + ["016e", "\\r{U}"], + ["016f", "\\r{u}"], + ["0170", "\\H{U}"], + ["0171", "\\H{u}"], + ["0172", "\\k{U}"], + ["0173", "\\k{u}"], + ["0174", "\\^{W}"], + ["0175", "\\^{w}"], + ["0176", "\\^{Y}"], + ["0177", "\\^{y}"], + ["0178", '\\"{Y}'], + ["0179", "\\'{Z}"], + ["017a", "\\'{z}"], + ["017b", "\\.{Z}"], + ["017c", "\\.{z}"], + ["017d", "\\v{Z}"], + ["017e", "\\v{z}"], + ["0195", "\\texthvlig{}"], + ["019e", "\\textnrleg{}"], + ["01aa", "\\eth{}"], + ["01ba", "{\\fontencoding{LELA}\\selectfont\\char195}"], + ["01c2", "\\textdoublepipe{}"], + ["01f5", "\\'{g}"], + ["0250", "\\Elztrna{}"], + ["0252", "\\Elztrnsa{}"], + ["0254", "\\Elzopeno{}"], + ["0256", "\\Elzrtld{}"], + ["0258", "{\\fontencoding{LEIP}\\selectfont\\char61}"], + ["0259", "\\Elzschwa{}"], + ["025b", "\\varepsilon{}"], + ["0263", "\\Elzpgamma{}"], + ["0264", "\\Elzpbgam{}"], + ["0265", "\\Elztrnh{}"], + ["026c", "\\Elzbtdl{}"], + ["026d", "\\Elzrtll{}"], + ["026f", "\\Elztrnm{}"], + ["0270", "\\Elztrnmlr{}"], + ["0271", "\\Elzltlmr{}"], + ["0272", "\\Elzltln{}"], + ["0273", "\\Elzrtln{}"], + ["0277", "\\Elzclomeg{}"], + ["0278", "\\textphi{}"], + ["0279", "\\Elztrnr{}"], + ["027a", "\\Elztrnrl{}"], + ["027b", "\\Elzrttrnr{}"], + ["027c", "\\Elzrl{}"], + ["027d", "\\Elzrtlr{}"], + ["027e", "\\Elzfhr{}"], + ["027f", "{\\fontencoding{LEIP}\\selectfont\\char202}"], + ["0282", "\\Elzrtls{}"], + ["0283", "\\Elzesh{}"], + ["0287", "\\Elztrnt{}"], + ["0288", "\\Elzrtlt{}"], + ["028a", "\\Elzpupsil{}"], + ["028b", "\\Elzpscrv{}"], + ["028c", "\\Elzinvv{}"], + ["028d", "\\Elzinvw{}"], + ["028e", "\\Elztrny{}"], + ["0290", "\\Elzrtlz{}"], + ["0292", "\\Elzyogh{}"], + ["0294", "\\Elzglst{}"], + ["0295", "\\Elzreglst{}"], + ["0296", "\\Elzinglst{}"], + ["029e", "\\textturnk{}"], + ["02a4", "\\Elzdyogh{}"], + ["02a7", "\\Elztesh{}"], + ["02c7", "\\textasciicaron{}"], + ["02c8", "\\Elzverts{}"], + ["02cc", "\\Elzverti{}"], + ["02d0", "\\Elzlmrk{}"], + ["02d1", "\\Elzhlmrk{}"], + ["02d2", "\\Elzsbrhr{}"], + ["02d3", "\\Elzsblhr{}"], + ["02d4", "\\Elzrais{}"], + ["02d5", "\\Elzlow{}"], + ["02d8", "\\textasciibreve{}"], + ["02d9", "\\textperiodcentered{}"], + ["02da", "\\r{}"], + ["02db", "\\k{}"], + ["02dc", "\\texttildelow{}"], + ["02dd", "\\H{}"], + ["02e5", "\\tone{55}"], + ["02e6", "\\tone{44}"], + ["02e7", "\\tone{33}"], + ["02e8", "\\tone{22}"], + ["02e9", "\\tone{11}"], + ["0300", "\\`"], + ["0301", "\\'"], + ["0302", "\\^"], + ["0303", "\\~"], + ["0304", "\\="], + ["0306", "\\u"], + ["0307", "\\."], + ["0308", '\\"'], + ["030a", "\\r"], + ["030b", "\\H"], + ["030c", "\\v"], + ["030f", "\\cyrchar\\C"], + ["0311", "{\\fontencoding{LECO}\\selectfont\\char177}"], + ["0318", "{\\fontencoding{LECO}\\selectfont\\char184}"], + ["0319", "{\\fontencoding{LECO}\\selectfont\\char185}"], + ["0321", "\\Elzpalh{}"], + ["0322", "\\Elzrh{}"], + ["0327", "\\c"], + ["0328", "\\k"], + ["032a", "\\Elzsbbrg{}"], + ["032b", "{\\fontencoding{LECO}\\selectfont\\char203}"], + ["032f", "{\\fontencoding{LECO}\\selectfont\\char207}"], + ["0335", "\\Elzxl{}"], + ["0336", "\\Elzbar{}"], + ["0337", "{\\fontencoding{LECO}\\selectfont\\char215}"], + ["0338", "{\\fontencoding{LECO}\\selectfont\\char216}"], + ["033a", "{\\fontencoding{LECO}\\selectfont\\char218}"], + ["033b", "{\\fontencoding{LECO}\\selectfont\\char219}"], + ["033c", "{\\fontencoding{LECO}\\selectfont\\char220}"], + ["033d", "{\\fontencoding{LECO}\\selectfont\\char221}"], + ["0361", "{\\fontencoding{LECO}\\selectfont\\char225}"], + ["0386", "\\'{A}"], + ["0388", "\\'{E}"], + ["0389", "\\'{H}"], + ["038a", "\\'{}{I}"], + ["038c", "\\'{}O"], + ["038e", "\\mathrm{'Y}"], + ["038f", "\\mathrm{'\\Omega}"], + ["0390", "\\acute{\\ddot{\\iota}}"], + ["0391", "\\ensuremath{\\Alpha}"], + ["0392", "\\ensuremath{\\Beta}"], + ["0393", "\\ensuremath{\\Gamma}"], + ["0394", "\\ensuremath{\\Delta}"], + ["0395", "\\ensuremath{\\Epsilon}"], + ["0396", "\\ensuremath{\\Zeta}"], + ["0397", "\\ensuremath{\\Eta}"], + ["0398", "\\ensuremath{\\Theta}"], + ["0399", "\\ensuremath{\\Iota}"], + ["039a", "\\ensuremath{\\Kappa}"], + ["039b", "\\ensuremath{\\Lambda}"], + ["039e", "\\ensuremath{\\Xi}"], + ["03a0", "\\ensuremath{\\Pi}"], + ["03a1", "\\ensuremath{\\Rho}"], + ["03a3", "\\ensuremath{\\Sigma}"], + ["03a4", "\\ensuremath{\\Tau}"], + ["03a5", "\\ensuremath{\\Upsilon}"], + ["03a6", "\\ensuremath{\\Phi}"], + ["03a7", "\\ensuremath{\\Chi}"], + ["03a8", "\\ensuremath{\\Psi}"], + ["03a9", "\\ensuremath{\\Omega}"], + ["03aa", "\\mathrm{\\ddot{I}}"], + ["03ab", "\\mathrm{\\ddot{Y}}"], + ["03ac", "\\'{$\\alpha$}"], + ["03ad", "\\acute{\\epsilon}"], + ["03ae", "\\acute{\\eta}"], + ["03af", "\\acute{\\iota}"], + ["03b0", "\\acute{\\ddot{\\upsilon}}"], + ["03b1", "\\ensuremath{\\alpha}"], + ["03b2", "\\ensuremath{\\beta}"], + ["03b3", "\\ensuremath{\\gamma}"], + ["03b4", "\\ensuremath{\\delta}"], + ["03b5", "\\ensuremath{\\epsilon}"], + ["03b6", "\\ensuremath{\\zeta}"], + ["03b7", "\\ensuremath{\\eta}"], + ["03b8", "\\texttheta{}"], + ["03b9", "\\ensuremath{\\iota}"], + ["03ba", "\\ensuremath{\\kappa}"], + ["03bb", "\\ensuremath{\\lambda}"], + ["03bc", "\\ensuremath{\\mu}"], + ["03bd", "\\ensuremath{\\nu}"], + ["03be", "\\ensuremath{\\xi}"], + ["03c0", "\\ensuremath{\\pi}"], + ["03c1", "\\ensuremath{\\rho}"], + ["03c2", "\\ensuremath{\\varsigma}"], + ["03c3", "\\ensuremath{\\sigma}"], + ["03c4", "\\ensuremath{\\tau}"], + ["03c5", "\\ensuremath{\\upsilon}"], + ["03c6", "\\ensuremath{\\varphi}"], + ["03c7", "\\ensuremath{\\chi}"], + ["03c8", "\\ensuremath{\\psi}"], + ["03c9", "\\ensuremath{\\omega}"], + ["03ca", "\\ensuremath{\\ddot{\\iota}}"], + ["03cb", "\\ensuremath{\\ddot{\\upsilon}}"], + ["03cc", "\\'{o}"], + ["03cd", "\\acute{\\upsilon}"], + ["03ce", "\\acute{\\omega}"], + ["03d0", "\\Pisymbol{ppi022}{87}"], + ["03d1", "\\textvartheta{}"], + ["03d2", "\\ensuremath{\\Upsilon}"], + ["03d5", "\\ensuremath{\\phi}"], + ["03d6", "\\ensuremath{\\varpi}"], + ["03da", "\\Stigma{}"], + ["03dc", "\\Digamma{}"], + ["03dd", "\\digamma{}"], + ["03de", "\\Koppa{}"], + ["03e0", "\\Sampi{}"], + ["03f0", "\\varkappa{}"], + ["03f1", "\\varrho{}"], + ["03f4", "\\textTheta{}"], + ["03f6", "\\backepsilon{}"], + ["0401", "\\cyrchar\\CYRYO{}"], + ["0402", "\\cyrchar\\CYRDJE{}"], + ["0403", "\\cyrchar{\\'\\CYRG}"], + ["0404", "\\cyrchar\\CYRIE{}"], + ["0405", "\\cyrchar\\CYRDZE{}"], + ["0406", "\\cyrchar\\CYRII{}"], + ["0407", "\\cyrchar\\CYRYI{}"], + ["0408", "\\cyrchar\\CYRJE{}"], + ["0409", "\\cyrchar\\CYRLJE{}"], + ["040a", "\\cyrchar\\CYRNJE{}"], + ["040b", "\\cyrchar\\CYRTSHE{}"], + ["040c", "\\cyrchar{\\'\\CYRK}"], + ["040e", "\\cyrchar\\CYRUSHRT{}"], + ["040f", "\\cyrchar\\CYRDZHE{}"], + ["0410", "\\cyrchar\\CYRA{}"], + ["0411", "\\cyrchar\\CYRB{}"], + ["0412", "\\cyrchar\\CYRV{}"], + ["0413", "\\cyrchar\\CYRG{}"], + ["0414", "\\cyrchar\\CYRD{}"], + ["0415", "\\cyrchar\\CYRE{}"], + ["0416", "\\cyrchar\\CYRZH{}"], + ["0417", "\\cyrchar\\CYRZ{}"], + ["0418", "\\cyrchar\\CYRI{}"], + ["0419", "\\cyrchar\\CYRISHRT{}"], + ["041a", "\\cyrchar\\CYRK{}"], + ["041b", "\\cyrchar\\CYRL{}"], + ["041c", "\\cyrchar\\CYRM{}"], + ["041d", "\\cyrchar\\CYRN{}"], + ["041e", "\\cyrchar\\CYRO{}"], + ["041f", "\\cyrchar\\CYRP{}"], + ["0420", "\\cyrchar\\CYRR{}"], + ["0421", "\\cyrchar\\CYRS{}"], + ["0422", "\\cyrchar\\CYRT{}"], + ["0423", "\\cyrchar\\CYRU{}"], + ["0424", "\\cyrchar\\CYRF{}"], + ["0425", "\\cyrchar\\CYRH{}"], + ["0426", "\\cyrchar\\CYRC{}"], + ["0427", "\\cyrchar\\CYRCH{}"], + ["0428", "\\cyrchar\\CYRSH{}"], + ["0429", "\\cyrchar\\CYRSHCH{}"], + ["042a", "\\cyrchar\\CYRHRDSN{}"], + ["042b", "\\cyrchar\\CYRERY{}"], + ["042c", "\\cyrchar\\CYRSFTSN{}"], + ["042d", "\\cyrchar\\CYREREV{}"], + ["042e", "\\cyrchar\\CYRYU{}"], + ["042f", "\\cyrchar\\CYRYA{}"], + ["0430", "\\cyrchar\\cyra{}"], + ["0431", "\\cyrchar\\cyrb{}"], + ["0432", "\\cyrchar\\cyrv{}"], + ["0433", "\\cyrchar\\cyrg{}"], + ["0434", "\\cyrchar\\cyrd{}"], + ["0435", "\\cyrchar\\cyre{}"], + ["0436", "\\cyrchar\\cyrzh{}"], + ["0437", "\\cyrchar\\cyrz{}"], + ["0438", "\\cyrchar\\cyri{}"], + ["0439", "\\cyrchar\\cyrishrt{}"], + ["043a", "\\cyrchar\\cyrk{}"], + ["043b", "\\cyrchar\\cyrl{}"], + ["043c", "\\cyrchar\\cyrm{}"], + ["043d", "\\cyrchar\\cyrn{}"], + ["043e", "\\cyrchar\\cyro{}"], + ["043f", "\\cyrchar\\cyrp{}"], + ["0440", "\\cyrchar\\cyrr{}"], + ["0441", "\\cyrchar\\cyrs{}"], + ["0442", "\\cyrchar\\cyrt{}"], + ["0443", "\\cyrchar\\cyru{}"], + ["0444", "\\cyrchar\\cyrf{}"], + ["0445", "\\cyrchar\\cyrh{}"], + ["0446", "\\cyrchar\\cyrc{}"], + ["0447", "\\cyrchar\\cyrch{}"], + ["0448", "\\cyrchar\\cyrsh{}"], + ["0449", "\\cyrchar\\cyrshch{}"], + ["044a", "\\cyrchar\\cyrhrdsn{}"], + ["044b", "\\cyrchar\\cyrery{}"], + ["044c", "\\cyrchar\\cyrsftsn{}"], + ["044d", "\\cyrchar\\cyrerev{}"], + ["044e", "\\cyrchar\\cyryu{}"], + ["044f", "\\cyrchar\\cyrya{}"], + ["0451", "\\cyrchar\\cyryo{}"], + ["0452", "\\cyrchar\\cyrdje{}"], + ["0453", "\\cyrchar{\\'\\cyrg}"], + ["0454", "\\cyrchar\\cyrie{}"], + ["0455", "\\cyrchar\\cyrdze{}"], + ["0456", "\\cyrchar\\cyrii{}"], + ["0457", "\\cyrchar\\cyryi{}"], + ["0458", "\\cyrchar\\cyrje{}"], + ["0459", "\\cyrchar\\cyrlje{}"], + ["045a", "\\cyrchar\\cyrnje{}"], + ["045b", "\\cyrchar\\cyrtshe{}"], + ["045c", "\\cyrchar{\\'\\cyrk}"], + ["045e", "\\cyrchar\\cyrushrt{}"], + ["045f", "\\cyrchar\\cyrdzhe{}"], + ["0460", "\\cyrchar\\CYROMEGA{}"], + ["0461", "\\cyrchar\\cyromega{}"], + ["0462", "\\cyrchar\\CYRYAT{}"], + ["0464", "\\cyrchar\\CYRIOTE{}"], + ["0465", "\\cyrchar\\cyriote{}"], + ["0466", "\\cyrchar\\CYRLYUS{}"], + ["0467", "\\cyrchar\\cyrlyus{}"], + ["0468", "\\cyrchar\\CYRIOTLYUS{}"], + ["0469", "\\cyrchar\\cyriotlyus{}"], + ["046a", "\\cyrchar\\CYRBYUS{}"], + ["046c", "\\cyrchar\\CYRIOTBYUS{}"], + ["046d", "\\cyrchar\\cyriotbyus{}"], + ["046e", "\\cyrchar\\CYRKSI{}"], + ["046f", "\\cyrchar\\cyrksi{}"], + ["0470", "\\cyrchar\\CYRPSI{}"], + ["0471", "\\cyrchar\\cyrpsi{}"], + ["0472", "\\cyrchar\\CYRFITA{}"], + ["0474", "\\cyrchar\\CYRIZH{}"], + ["0478", "\\cyrchar\\CYRUK{}"], + ["0479", "\\cyrchar\\cyruk{}"], + ["047a", "\\cyrchar\\CYROMEGARND{}"], + ["047b", "\\cyrchar\\cyromegarnd{}"], + ["047c", "\\cyrchar\\CYROMEGATITLO{}"], + ["047d", "\\cyrchar\\cyromegatitlo{}"], + ["047e", "\\cyrchar\\CYROT{}"], + ["047f", "\\cyrchar\\cyrot{}"], + ["0480", "\\cyrchar\\CYRKOPPA{}"], + ["0481", "\\cyrchar\\cyrkoppa{}"], + ["0482", "\\cyrchar\\cyrthousands{}"], + ["0488", "\\cyrchar\\cyrhundredthousands{}"], + ["0489", "\\cyrchar\\cyrmillions{}"], + ["048c", "\\cyrchar\\CYRSEMISFTSN{}"], + ["048d", "\\cyrchar\\cyrsemisftsn{}"], + ["048e", "\\cyrchar\\CYRRTICK{}"], + ["048f", "\\cyrchar\\cyrrtick{}"], + ["0490", "\\cyrchar\\CYRGUP{}"], + ["0491", "\\cyrchar\\cyrgup{}"], + ["0492", "\\cyrchar\\CYRGHCRS{}"], + ["0493", "\\cyrchar\\cyrghcrs{}"], + ["0494", "\\cyrchar\\CYRGHK{}"], + ["0495", "\\cyrchar\\cyrghk{}"], + ["0496", "\\cyrchar\\CYRZHDSC{}"], + ["0497", "\\cyrchar\\cyrzhdsc{}"], + ["0498", "\\cyrchar\\CYRZDSC{}"], + ["0499", "\\cyrchar\\cyrzdsc{}"], + ["049a", "\\cyrchar\\CYRKDSC{}"], + ["049b", "\\cyrchar\\cyrkdsc{}"], + ["049c", "\\cyrchar\\CYRKVCRS{}"], + ["049d", "\\cyrchar\\cyrkvcrs{}"], + ["049e", "\\cyrchar\\CYRKHCRS{}"], + ["049f", "\\cyrchar\\cyrkhcrs{}"], + ["04a0", "\\cyrchar\\CYRKBEAK{}"], + ["04a1", "\\cyrchar\\cyrkbeak{}"], + ["04a2", "\\cyrchar\\CYRNDSC{}"], + ["04a3", "\\cyrchar\\cyrndsc{}"], + ["04a4", "\\cyrchar\\CYRNG{}"], + ["04a5", "\\cyrchar\\cyrng{}"], + ["04a6", "\\cyrchar\\CYRPHK{}"], + ["04a7", "\\cyrchar\\cyrphk{}"], + ["04a8", "\\cyrchar\\CYRABHHA{}"], + ["04a9", "\\cyrchar\\cyrabhha{}"], + ["04aa", "\\cyrchar\\CYRSDSC{}"], + ["04ab", "\\cyrchar\\cyrsdsc{}"], + ["04ac", "\\cyrchar\\CYRTDSC{}"], + ["04ad", "\\cyrchar\\cyrtdsc{}"], + ["04ae", "\\cyrchar\\CYRY{}"], + ["04af", "\\cyrchar\\cyry{}"], + ["04b0", "\\cyrchar\\CYRYHCRS{}"], + ["04b1", "\\cyrchar\\cyryhcrs{}"], + ["04b2", "\\cyrchar\\CYRHDSC{}"], + ["04b3", "\\cyrchar\\cyrhdsc{}"], + ["04b4", "\\cyrchar\\CYRTETSE{}"], + ["04b5", "\\cyrchar\\cyrtetse{}"], + ["04b6", "\\cyrchar\\CYRCHRDSC{}"], + ["04b7", "\\cyrchar\\cyrchrdsc{}"], + ["04b8", "\\cyrchar\\CYRCHVCRS{}"], + ["04b9", "\\cyrchar\\cyrchvcrs{}"], + ["04ba", "\\cyrchar\\CYRSHHA{}"], + ["04bb", "\\cyrchar\\cyrshha{}"], + ["04bc", "\\cyrchar\\CYRABHCH{}"], + ["04bd", "\\cyrchar\\cyrabhch{}"], + ["04be", "\\cyrchar\\CYRABHCHDSC{}"], + ["04bf", "\\cyrchar\\cyrabhchdsc{}"], + ["04c0", "\\cyrchar\\CYRpalochka{}"], + ["04c3", "\\cyrchar\\CYRKHK{}"], + ["04c4", "\\cyrchar\\cyrkhk{}"], + ["04c7", "\\cyrchar\\CYRNHK{}"], + ["04c8", "\\cyrchar\\cyrnhk{}"], + ["04cb", "\\cyrchar\\CYRCHLDSC{}"], + ["04cc", "\\cyrchar\\cyrchldsc{}"], + ["04d4", "\\cyrchar\\CYRAE{}"], + ["04d5", "\\cyrchar\\cyrae{}"], + ["04d8", "\\cyrchar\\CYRSCHWA{}"], + ["04d9", "\\cyrchar\\cyrschwa{}"], + ["04e0", "\\cyrchar\\CYRABHDZE{}"], + ["04e1", "\\cyrchar\\cyrabhdze{}"], + ["04e8", "\\cyrchar\\CYROTLD{}"], + ["04e9", "\\cyrchar\\cyrotld{}"], + ["2002", "\\hspace{0.6em}"], + ["2003", "\\hspace{1em}"], + ["2004", "\\hspace{0.33em}"], + ["2005", "\\hspace{0.25em}"], + ["2006", "\\hspace{0.166em}"], + ["2007", "\\hphantom{0}"], + ["2008", "\\hphantom{,}"], + ["2009", "\\hspace{0.167em}"], + ["200a", "\\mkern1mu{}"], + ["2010", "-"], + ["2014", "--"], + ["2015", "\\rule{1em}{1pt}"], + ["2016", "\\Vert{}"], + ["2018", "`"], + ["2019", "'"], + ["201b", "\\Elzreapos{}"], + ["201c", "``"], + ["201d", "''"], + ["201e", ",,"], + ["2020", "\\textdagger{}"], + ["2021", "\\textdaggerdbl{}"], + ["2022", "\\textbullet{}"], + ["2025", ".."], + ["2026", "\\ldots{}"], + ["2030", "\\textperthousand{}"], + ["2031", "\\textpertenthousand{}"], + ["2032", "\\ensuremath{'}"], + ["2033", "\\ensuremath{''}"], + ["2034", "\\ensuremath{'''}"], + ["2035", "\\backprime{}"], + ["2039", "\\guilsinglleft{}"], + ["203a", "\\guilsinglright{}"], + ["2057", "''''"], + ["205f", "\\mkern4mu{}"], + ["2060", "\\nolinebreak{}"], + ["20a7", "\\ensuremath{\\Elzpes}"], + ["20ac", "\\mbox{\\texteuro}{}"], + ["20db", "\\dddot{}"], + ["20dc", "\\ddddot{}"], + ["2102", "\\mathbb{C}"], + ["210a", "\\mathscr{g}"], + ["210b", "\\mathscr{H}"], + ["210c", "\\mathfrak{H}"], + ["210d", "\\mathbb{H}"], + ["210f", "\\hslash{}"], + ["2110", "\\mathscr{I}"], + ["2111", "\\mathfrak{I}"], + ["2112", "\\mathscr{L}"], + ["2113", "\\mathscr{l}"], + ["2115", "\\mathbb{N}"], + ["2116", "\\cyrchar\\textnumero{}"], + ["2118", "\\wp{}"], + ["2119", "\\mathbb{P}"], + ["211a", "\\mathbb{Q}"], + ["211b", "\\mathscr{R}"], + ["211c", "\\mathfrak{R}"], + ["211d", "\\mathbb{R}"], + ["211e", "\\Elzxrat{}"], + ["2122", "\\texttrademark{}"], + ["2124", "\\mathbb{Z}"], + ["2126", "\\Omega{}"], + ["2127", "\\mho{}"], + ["2128", "\\mathfrak{Z}"], + ["2129", "\\ElsevierGlyph{2129}"], + ["212b", "\\AA{}"], + ["212c", "\\mathscr{B}"], + ["212d", "\\mathfrak{C}"], + ["212f", "\\mathscr{e}"], + ["2130", "\\mathscr{E}"], + ["2131", "\\mathscr{F}"], + ["2133", "\\mathscr{M}"], + ["2134", "\\mathscr{o}"], + ["2135", "\\aleph{}"], + ["2136", "\\beth{}"], + ["2137", "\\gimel{}"], + ["2138", "\\daleth{}"], + ["2153", "\\textfrac{1}{3}"], + ["2154", "\\textfrac{2}{3}"], + ["2155", "\\textfrac{1}{5}"], + ["2156", "\\textfrac{2}{5}"], + ["2157", "\\textfrac{3}{5}"], + ["2158", "\\textfrac{4}{5}"], + ["2159", "\\textfrac{1}{6}"], + ["215a", "\\textfrac{5}{6}"], + ["215b", "\\textfrac{1}{8}"], + ["215c", "\\textfrac{3}{8}"], + ["215d", "\\textfrac{5}{8}"], + ["215e", "\\textfrac{7}{8}"], + ["2190", "\\leftarrow{}"], + ["2191", "\\uparrow{}"], + ["2192", "\\rightarrow{}"], + ["2193", "\\downarrow{}"], + ["2194", "\\leftrightarrow{}"], + ["2195", "\\updownarrow{}"], + ["2196", "\\nwarrow{}"], + ["2197", "\\nearrow{}"], + ["2198", "\\searrow{}"], + ["2199", "\\swarrow{}"], + ["219a", "\\nleftarrow{}"], + ["219b", "\\nrightarrow{}"], + ["219c", "\\arrowwaveright{}"], + ["219d", "\\arrowwaveright{}"], + ["219e", "\\twoheadleftarrow{}"], + ["21a0", "\\twoheadrightarrow{}"], + ["21a2", "\\leftarrowtail{}"], + ["21a3", "\\rightarrowtail{}"], + ["21a6", "\\mapsto{}"], + ["21a9", "\\hookleftarrow{}"], + ["21aa", "\\hookrightarrow{}"], + ["21ab", "\\looparrowleft{}"], + ["21ac", "\\looparrowright{}"], + ["21ad", "\\leftrightsquigarrow{}"], + ["21ae", "\\nleftrightarrow{}"], + ["21b0", "\\Lsh{}"], + ["21b1", "\\Rsh{}"], + ["21b3", "\\ElsevierGlyph{21B3}"], + ["21b6", "\\curvearrowleft{}"], + ["21b7", "\\curvearrowright{}"], + ["21ba", "\\circlearrowleft{}"], + ["21bb", "\\circlearrowright{}"], + ["21bc", "\\leftharpoonup{}"], + ["21bd", "\\leftharpoondown{}"], + ["21be", "\\upharpoonright{}"], + ["21bf", "\\upharpoonleft{}"], + ["21c0", "\\rightharpoonup{}"], + ["21c1", "\\rightharpoondown{}"], + ["21c2", "\\downharpoonright{}"], + ["21c3", "\\downharpoonleft{}"], + ["21c4", "\\rightleftarrows{}"], + ["21c5", "\\dblarrowupdown{}"], + ["21c6", "\\leftrightarrows{}"], + ["21c7", "\\leftleftarrows{}"], + ["21c8", "\\upuparrows{}"], + ["21c9", "\\rightrightarrows{}"], + ["21ca", "\\downdownarrows{}"], + ["21cb", "\\leftrightharpoons{}"], + ["21cc", "\\rightleftharpoons{}"], + ["21cd", "\\nLeftarrow{}"], + ["21ce", "\\nLeftrightarrow{}"], + ["21cf", "\\nRightarrow{}"], + ["21d0", "\\Leftarrow{}"], + ["21d1", "\\Uparrow{}"], + ["21d2", "\\Rightarrow{}"], + ["21d3", "\\Downarrow{}"], + ["21d4", "\\Leftrightarrow{}"], + ["21d5", "\\Updownarrow{}"], + ["21da", "\\Lleftarrow{}"], + ["21db", "\\Rrightarrow{}"], + ["21dd", "\\rightsquigarrow{}"], + ["21f5", "\\DownArrowUpArrow{}"], + ["2200", "\\forall{}"], + ["2201", "\\complement{}"], + ["2202", "\\partial{}"], + ["2203", "\\exists{}"], + ["2204", "\\nexists{}"], + ["2205", "\\varnothing{}"], + ["2207", "\\nabla{}"], + ["2208", "\\in{}"], + ["2209", "\\not\\in{}"], + ["220b", "\\ni{}"], + ["220c", "\\not\\ni{}"], + ["220f", "\\prod{}"], + ["2210", "\\coprod{}"], + ["2211", "\\sum{}"], + ["2212", "-"], + ["2213", "\\mp{}"], + ["2214", "\\dotplus{}"], + ["2216", "\\setminus{}"], + ["2217", "{\\_\\ast}"], + ["2218", "\\circ{}"], + ["2219", "\\bullet{}"], + ["221a", "\\surd{}"], + ["221d", "\\propto{}"], + ["221e", "\\infty{}"], + ["221f", "\\rightangle{}"], + ["2220", "\\angle{}"], + ["2221", "\\measuredangle{}"], + ["2222", "\\sphericalangle{}"], + ["2223", "\\mid{}"], + ["2224", "\\nmid{}"], + ["2225", "\\parallel{}"], + ["2226", "\\nparallel{}"], + ["2227", "\\wedge{}"], + ["2228", "\\vee{}"], + ["2229", "\\cap{}"], + ["222a", "\\cup{}"], + ["222b", "\\int{}"], + ["222c", "\\int\\!\\int{}"], + ["222d", "\\int\\!\\int\\!\\int{}"], + ["222e", "\\oint{}"], + ["222f", "\\surfintegral{}"], + ["2230", "\\volintegral{}"], + ["2231", "\\clwintegral{}"], + ["2232", "\\ElsevierGlyph{2232}"], + ["2233", "\\ElsevierGlyph{2233}"], + ["2234", "\\therefore{}"], + ["2235", "\\because{}"], + ["2237", "\\Colon{}"], + ["2238", "\\ElsevierGlyph{2238}"], + ["223a", "\\mathbin{{:}\\!\\!{-}\\!\\!{:}}"], + ["223b", "\\homothetic{}"], + ["223c", "\\sim{}"], + ["223d", "\\backsim{}"], + ["223e", "\\lazysinv{}"], + ["2240", "\\wr{}"], + ["2241", "\\not\\sim{}"], + ["2242", "\\ElsevierGlyph{2242}"], + ["2243", "\\simeq{}"], + ["2244", "\\not\\simeq{}"], + ["2245", "\\cong{}"], + ["2246", "\\approxnotequal{}"], + ["2247", "\\not\\cong{}"], + ["2248", "\\approx{}"], + ["2249", "\\not\\approx{}"], + ["224a", "\\approxeq{}"], + ["224b", "\\tildetrpl{}"], + ["224c", "\\allequal{}"], + ["224d", "\\asymp{}"], + ["224e", "\\Bumpeq{}"], + ["224f", "\\bumpeq{}"], + ["2250", "\\doteq{}"], + ["2251", "\\doteqdot{}"], + ["2252", "\\fallingdotseq{}"], + ["2253", "\\risingdotseq{}"], + ["2254", ":="], + ["2255", "=:"], + ["2256", "\\eqcirc{}"], + ["2257", "\\circeq{}"], + ["2259", "\\estimates{}"], + ["225a", "\\ElsevierGlyph{225A}"], + ["225b", "\\starequal{}"], + ["225c", "\\triangleq{}"], + ["225f", "\\ElsevierGlyph{225F}"], + ["2260", "\\not ="], + ["2261", "\\equiv{}"], + ["2262", "\\not\\equiv{}"], + ["2264", "\\leq{}"], + ["2265", "\\geq{}"], + ["2266", "\\leqq{}"], + ["2267", "\\geqq{}"], + ["2268", "\\lneqq{}"], + ["2269", "\\gneqq{}"], + ["226a", "\\ll{}"], + ["226b", "\\gg{}"], + ["226c", "\\between{}"], + ["226d", "\\not\\kern-0.3em\\times{}"], + ["226e", "\\not<"], + ["226f", "\\not>"], + ["2270", "\\not\\leq{}"], + ["2271", "\\not\\geq{}"], + ["2272", "\\lessequivlnt{}"], + ["2273", "\\greaterequivlnt{}"], + ["2274", "\\ElsevierGlyph{2274}"], + ["2275", "\\ElsevierGlyph{2275}"], + ["2276", "\\lessgtr{}"], + ["2277", "\\gtrless{}"], + ["2278", "\\notlessgreater{}"], + ["2279", "\\notgreaterless{}"], + ["227a", "\\prec{}"], + ["227b", "\\succ{}"], + ["227c", "\\preccurlyeq{}"], + ["227d", "\\succcurlyeq{}"], + ["227e", "\\precapprox{}"], + ["227f", "\\succapprox{}"], + ["2280", "\\not\\prec{}"], + ["2281", "\\not\\succ{}"], + ["2282", "\\subset{}"], + ["2283", "\\supset{}"], + ["2284", "\\not\\subset{}"], + ["2285", "\\not\\supset{}"], + ["2286", "\\subseteq{}"], + ["2287", "\\supseteq{}"], + ["2288", "\\not\\subseteq{}"], + ["2289", "\\not\\supseteq{}"], + ["228a", "\\subsetneq{}"], + ["228b", "\\supsetneq{}"], + ["228e", "\\uplus{}"], + ["228f", "\\sqsubset{}"], + ["2290", "\\sqsupset{}"], + ["2291", "\\sqsubseteq{}"], + ["2292", "\\sqsupseteq{}"], + ["2293", "\\sqcap{}"], + ["2294", "\\sqcup{}"], + ["2295", "\\oplus{}"], + ["2296", "\\ominus{}"], + ["2297", "\\otimes{}"], + ["2298", "\\oslash{}"], + ["2299", "\\odot{}"], + ["229a", "\\circledcirc{}"], + ["229b", "\\circledast{}"], + ["229d", "\\circleddash{}"], + ["229e", "\\boxplus{}"], + ["229f", "\\boxminus{}"], + ["22a0", "\\boxtimes{}"], + ["22a1", "\\boxdot{}"], + ["22a2", "\\vdash{}"], + ["22a3", "\\dashv{}"], + ["22a4", "\\top{}"], + ["22a5", "\\perp{}"], + ["22a7", "\\truestate{}"], + ["22a8", "\\forcesextra{}"], + ["22a9", "\\Vdash{}"], + ["22aa", "\\Vvdash{}"], + ["22ab", "\\VDash{}"], + ["22ac", "\\nvdash{}"], + ["22ad", "\\nvDash{}"], + ["22ae", "\\nVdash{}"], + ["22af", "\\nVDash{}"], + ["22b2", "\\vartriangleleft{}"], + ["22b3", "\\vartriangleright{}"], + ["22b4", "\\trianglelefteq{}"], + ["22b5", "\\trianglerighteq{}"], + ["22b6", "\\original{}"], + ["22b7", "\\image{}"], + ["22b8", "\\multimap{}"], + ["22b9", "\\hermitconjmatrix{}"], + ["22ba", "\\intercal{}"], + ["22bb", "\\veebar{}"], + ["22be", "\\rightanglearc{}"], + ["22c0", "\\ElsevierGlyph{22C0}"], + ["22c1", "\\ElsevierGlyph{22C1}"], + ["22c2", "\\bigcap{}"], + ["22c3", "\\bigcup{}"], + ["22c4", "\\diamond{}"], + ["22c5", "\\cdot{}"], + ["22c6", "\\star{}"], + ["22c7", "\\divideontimes{}"], + ["22c8", "\\bowtie{}"], + ["22c9", "\\ltimes{}"], + ["22ca", "\\rtimes{}"], + ["22cb", "\\leftthreetimes{}"], + ["22cc", "\\rightthreetimes{}"], + ["22cd", "\\backsimeq{}"], + ["22ce", "\\curlyvee{}"], + ["22cf", "\\curlywedge{}"], + ["22d0", "\\Subset{}"], + ["22d1", "\\Supset{}"], + ["22d2", "\\Cap{}"], + ["22d3", "\\Cup{}"], + ["22d4", "\\pitchfork{}"], + ["22d6", "\\lessdot{}"], + ["22d7", "\\gtrdot{}"], + ["22d8", "\\verymuchless{}"], + ["22d9", "\\verymuchgreater{}"], + ["22da", "\\lesseqgtr{}"], + ["22db", "\\gtreqless{}"], + ["22de", "\\curlyeqprec{}"], + ["22df", "\\curlyeqsucc{}"], + ["22e2", "\\not\\sqsubseteq{}"], + ["22e3", "\\not\\sqsupseteq{}"], + ["22e5", "\\Elzsqspne{}"], + ["22e6", "\\lnsim{}"], + ["22e7", "\\gnsim{}"], + ["22e8", "\\precedesnotsimilar{}"], + ["22e9", "\\succnsim{}"], + ["22ea", "\\ntriangleleft{}"], + ["22eb", "\\ntriangleright{}"], + ["22ec", "\\ntrianglelefteq{}"], + ["22ed", "\\ntrianglerighteq{}"], + ["22ee", "\\vdots{}"], + ["22ef", "\\cdots{}"], + ["22f0", "\\upslopeellipsis{}"], + ["22f1", "\\downslopeellipsis{}"], + ["2305", "\\barwedge{}"], + ["2306", "\\perspcorrespond{}"], + ["2308", "\\lceil{}"], + ["2309", "\\rceil{}"], + ["230a", "\\lfloor{}"], + ["230b", "\\rfloor{}"], + ["2315", "\\recorder{}"], + ["2316", '\\mathchar"2208'], + ["231c", "\\ulcorner{}"], + ["231d", "\\urcorner{}"], + ["231e", "\\llcorner{}"], + ["231f", "\\lrcorner{}"], + ["2322", "\\frown{}"], + ["2323", "\\smile{}"], + ["2329", "\\langle{}"], + ["232a", "\\rangle{}"], + ["233d", "\\ElsevierGlyph{E838}"], + ["23a3", "\\Elzdlcorn{}"], + ["23b0", "\\lmoustache{}"], + ["23b1", "\\rmoustache{}"], + ["2423", "\\textvisiblespace{}"], + ["2460", "\\ding{172}"], + ["2461", "\\ding{173}"], + ["2462", "\\ding{174}"], + ["2463", "\\ding{175}"], + ["2464", "\\ding{176}"], + ["2465", "\\ding{177}"], + ["2466", "\\ding{178}"], + ["2467", "\\ding{179}"], + ["2468", "\\ding{180}"], + ["2469", "\\ding{181}"], + ["24c8", "\\circledS{}"], + ["2506", "\\Elzdshfnc{}"], + ["2519", "\\Elzsqfnw{}"], + ["2571", "\\diagup{}"], + ["25a0", "\\ding{110}"], + ["25a1", "\\square{}"], + ["25aa", "\\blacksquare{}"], + ["25ad", "\\fbox{~~}"], + ["25af", "\\Elzvrecto{}"], + ["25b1", "\\ElsevierGlyph{E381}"], + ["25b2", "\\ding{115}"], + ["25b3", "\\bigtriangleup{}"], + ["25b4", "\\blacktriangle{}"], + ["25b5", "\\vartriangle{}"], + ["25b8", "\\blacktriangleright{}"], + ["25b9", "\\triangleright{}"], + ["25bc", "\\ding{116}"], + ["25bd", "\\bigtriangledown{}"], + ["25be", "\\blacktriangledown{}"], + ["25bf", "\\triangledown{}"], + ["25c2", "\\blacktriangleleft{}"], + ["25c3", "\\triangleleft{}"], + ["25c6", "\\ding{117}"], + ["25ca", "\\lozenge{}"], + ["25cb", "\\bigcirc{}"], + ["25cf", "\\ding{108}"], + ["25d0", "\\Elzcirfl{}"], + ["25d1", "\\Elzcirfr{}"], + ["25d2", "\\Elzcirfb{}"], + ["25d7", "\\ding{119}"], + ["25d8", "\\Elzrvbull{}"], + ["25e7", "\\Elzsqfl{}"], + ["25e8", "\\Elzsqfr{}"], + ["25ea", "\\Elzsqfse{}"], + ["25ef", "\\bigcirc{}"], + ["2605", "\\ding{72}"], + ["2606", "\\ding{73}"], + ["260e", "\\ding{37}"], + ["261b", "\\ding{42}"], + ["261e", "\\ding{43}"], + ["263e", "\\rightmoon{}"], + ["263f", "\\mercury{}"], + ["2640", "\\venus{}"], + ["2642", "\\male{}"], + ["2643", "\\jupiter{}"], + ["2644", "\\saturn{}"], + ["2645", "\\uranus{}"], + ["2646", "\\neptune{}"], + ["2647", "\\pluto{}"], + ["2648", "\\aries{}"], + ["2649", "\\taurus{}"], + ["264a", "\\gemini{}"], + ["264b", "\\cancer{}"], + ["264c", "\\leo{}"], + ["264d", "\\virgo{}"], + ["264e", "\\libra{}"], + ["264f", "\\scorpio{}"], + ["2650", "\\sagittarius{}"], + ["2651", "\\capricornus{}"], + ["2652", "\\aquarius{}"], + ["2653", "\\pisces{}"], + ["2660", "\\ding{171}"], + ["2662", "\\diamond{}"], + ["2663", "\\ding{168}"], + ["2665", "\\ding{170}"], + ["2666", "\\ding{169}"], + ["2669", "\\quarternote{}"], + ["266a", "\\eighthnote{}"], + ["266d", "\\flat{}"], + ["266e", "\\natural{}"], + ["266f", "\\sharp{}"], + ["2701", "\\ding{33}"], + ["2702", "\\ding{34}"], + ["2703", "\\ding{35}"], + ["2704", "\\ding{36}"], + ["2706", "\\ding{38}"], + ["2707", "\\ding{39}"], + ["2708", "\\ding{40}"], + ["2709", "\\ding{41}"], + ["270c", "\\ding{44}"], + ["270d", "\\ding{45}"], + ["270e", "\\ding{46}"], + ["270f", "\\ding{47}"], + ["2710", "\\ding{48}"], + ["2711", "\\ding{49}"], + ["2712", "\\ding{50}"], + ["2713", "\\ding{51}"], + ["2714", "\\ding{52}"], + ["2715", "\\ding{53}"], + ["2716", "\\ding{54}"], + ["2717", "\\ding{55}"], + ["2718", "\\ding{56}"], + ["2719", "\\ding{57}"], + ["271a", "\\ding{58}"], + ["271b", "\\ding{59}"], + ["271c", "\\ding{60}"], + ["271d", "\\ding{61}"], + ["271e", "\\ding{62}"], + ["271f", "\\ding{63}"], + ["2720", "\\ding{64}"], + ["2721", "\\ding{65}"], + ["2722", "\\ding{66}"], + ["2723", "\\ding{67}"], + ["2724", "\\ding{68}"], + ["2725", "\\ding{69}"], + ["2726", "\\ding{70}"], + ["2727", "\\ding{71}"], + ["2729", "\\ding{73}"], + ["272a", "\\ding{74}"], + ["272b", "\\ding{75}"], + ["272c", "\\ding{76}"], + ["272d", "\\ding{77}"], + ["272e", "\\ding{78}"], + ["272f", "\\ding{79}"], + ["2730", "\\ding{80}"], + ["2731", "\\ding{81}"], + ["2732", "\\ding{82}"], + ["2733", "\\ding{83}"], + ["2734", "\\ding{84}"], + ["2735", "\\ding{85}"], + ["2736", "\\ding{86}"], + ["2737", "\\ding{87}"], + ["2738", "\\ding{88}"], + ["2739", "\\ding{89}"], + ["273a", "\\ding{90}"], + ["273b", "\\ding{91}"], + ["273c", "\\ding{92}"], + ["273d", "\\ding{93}"], + ["273e", "\\ding{94}"], + ["273f", "\\ding{95}"], + ["2740", "\\ding{96}"], + ["2741", "\\ding{97}"], + ["2742", "\\ding{98}"], + ["2743", "\\ding{99}"], + ["2744", "\\ding{100}"], + ["2745", "\\ding{101}"], + ["2746", "\\ding{102}"], + ["2747", "\\ding{103}"], + ["2748", "\\ding{104}"], + ["2749", "\\ding{105}"], + ["274a", "\\ding{106}"], + ["274b", "\\ding{107}"], + ["274d", "\\ding{109}"], + ["274f", "\\ding{111}"], + ["2750", "\\ding{112}"], + ["2751", "\\ding{113}"], + ["2752", "\\ding{114}"], + ["2756", "\\ding{118}"], + ["2758", "\\ding{120}"], + ["2759", "\\ding{121}"], + ["275a", "\\ding{122}"], + ["275b", "\\ding{123}"], + ["275c", "\\ding{124}"], + ["275d", "\\ding{125}"], + ["275e", "\\ding{126}"], + ["2761", "\\ding{161}"], + ["2762", "\\ding{162}"], + ["2763", "\\ding{163}"], + ["2764", "\\ding{164}"], + ["2765", "\\ding{165}"], + ["2766", "\\ding{166}"], + ["2767", "\\ding{167}"], + ["2776", "\\ding{182}"], + ["2777", "\\ding{183}"], + ["2778", "\\ding{184}"], + ["2779", "\\ding{185}"], + ["277a", "\\ding{186}"], + ["277b", "\\ding{187}"], + ["277c", "\\ding{188}"], + ["277d", "\\ding{189}"], + ["277e", "\\ding{190}"], + ["277f", "\\ding{191}"], + ["2780", "\\ding{192}"], + ["2781", "\\ding{193}"], + ["2782", "\\ding{194}"], + ["2783", "\\ding{195}"], + ["2784", "\\ding{196}"], + ["2785", "\\ding{197}"], + ["2786", "\\ding{198}"], + ["2787", "\\ding{199}"], + ["2788", "\\ding{200}"], + ["2789", "\\ding{201}"], + ["278a", "\\ding{202}"], + ["278b", "\\ding{203}"], + ["278c", "\\ding{204}"], + ["278d", "\\ding{205}"], + ["278e", "\\ding{206}"], + ["278f", "\\ding{207}"], + ["2790", "\\ding{208}"], + ["2791", "\\ding{209}"], + ["2792", "\\ding{210}"], + ["2793", "\\ding{211}"], + ["2794", "\\ding{212}"], + ["2798", "\\ding{216}"], + ["2799", "\\ding{217}"], + ["279a", "\\ding{218}"], + ["279b", "\\ding{219}"], + ["279c", "\\ding{220}"], + ["279d", "\\ding{221}"], + ["279e", "\\ding{222}"], + ["279f", "\\ding{223}"], + ["27a0", "\\ding{224}"], + ["27a1", "\\ding{225}"], + ["27a2", "\\ding{226}"], + ["27a3", "\\ding{227}"], + ["27a4", "\\ding{228}"], + ["27a5", "\\ding{229}"], + ["27a6", "\\ding{230}"], + ["27a7", "\\ding{231}"], + ["27a8", "\\ding{232}"], + ["27a9", "\\ding{233}"], + ["27aa", "\\ding{234}"], + ["27ab", "\\ding{235}"], + ["27ac", "\\ding{236}"], + ["27ad", "\\ding{237}"], + ["27ae", "\\ding{238}"], + ["27af", "\\ding{239}"], + ["27b1", "\\ding{241}"], + ["27b2", "\\ding{242}"], + ["27b3", "\\ding{243}"], + ["27b4", "\\ding{244}"], + ["27b5", "\\ding{245}"], + ["27b6", "\\ding{246}"], + ["27b7", "\\ding{247}"], + ["27b8", "\\ding{248}"], + ["27b9", "\\ding{249}"], + ["27ba", "\\ding{250}"], + ["27bb", "\\ding{251}"], + ["27bc", "\\ding{252}"], + ["27bd", "\\ding{253}"], + ["27be", "\\ding{254}"], + ["27f5", "\\longleftarrow{}"], + ["27f6", "\\longrightarrow{}"], + ["27f7", "\\longleftrightarrow{}"], + ["27f8", "\\Longleftarrow{}"], + ["27f9", "\\Longrightarrow{}"], + ["27fa", "\\Longleftrightarrow{}"], + ["27fc", "\\longmapsto{}"], + ["27ff", "\\sim\\joinrel\\leadsto"], + ["2905", "\\ElsevierGlyph{E212}"], + ["2912", "\\UpArrowBar{}"], + ["2913", "\\DownArrowBar{}"], + ["2923", "\\ElsevierGlyph{E20C}"], + ["2924", "\\ElsevierGlyph{E20D}"], + ["2925", "\\ElsevierGlyph{E20B}"], + ["2926", "\\ElsevierGlyph{E20A}"], + ["2927", "\\ElsevierGlyph{E211}"], + ["2928", "\\ElsevierGlyph{E20E}"], + ["2929", "\\ElsevierGlyph{E20F}"], + ["292a", "\\ElsevierGlyph{E210}"], + ["2933", "\\ElsevierGlyph{E21C}"], + ["2936", "\\ElsevierGlyph{E21A}"], + ["2937", "\\ElsevierGlyph{E219}"], + ["2940", "\\Elolarr{}"], + ["2941", "\\Elorarr{}"], + ["2942", "\\ElzRlarr{}"], + ["2944", "\\ElzrLarr{}"], + ["2947", "\\Elzrarrx{}"], + ["294e", "\\LeftRightVector{}"], + ["294f", "\\RightUpDownVector{}"], + ["2950", "\\DownLeftRightVector{}"], + ["2951", "\\LeftUpDownVector{}"], + ["2952", "\\LeftVectorBar{}"], + ["2953", "\\RightVectorBar{}"], + ["2954", "\\RightUpVectorBar{}"], + ["2955", "\\RightDownVectorBar{}"], + ["2956", "\\DownLeftVectorBar{}"], + ["2957", "\\DownRightVectorBar{}"], + ["2958", "\\LeftUpVectorBar{}"], + ["2959", "\\LeftDownVectorBar{}"], + ["295a", "\\LeftTeeVector{}"], + ["295b", "\\RightTeeVector{}"], + ["295c", "\\RightUpTeeVector{}"], + ["295d", "\\RightDownTeeVector{}"], + ["295e", "\\DownLeftTeeVector{}"], + ["295f", "\\DownRightTeeVector{}"], + ["2960", "\\LeftUpTeeVector{}"], + ["2961", "\\LeftDownTeeVector{}"], + ["296e", "\\UpEquilibrium{}"], + ["296f", "\\ReverseUpEquilibrium{}"], + ["2970", "\\RoundImplies{}"], + ["297c", "\\ElsevierGlyph{E214}"], + ["297d", "\\ElsevierGlyph{E215}"], + ["2980", "\\Elztfnc{}"], + ["2985", "\\ElsevierGlyph{3018}"], + ["2986", "\\Elroang{}"], + ["2993", "<\\kern-0.58em("], + ["2994", "\\ElsevierGlyph{E291}"], + ["2999", "\\Elzddfnc{}"], + ["299c", "\\Angle{}"], + ["29a0", "\\Elzlpargt{}"], + ["29b5", "\\ElsevierGlyph{E260}"], + ["29b6", "\\ElsevierGlyph{E61B}"], + ["29ca", "\\ElzLap{}"], + ["29cb", "\\Elzdefas{}"], + ["29cf", "\\LeftTriangleBar{}"], + ["29d0", "\\RightTriangleBar{}"], + ["29dc", "\\ElsevierGlyph{E372}"], + ["29eb", "\\blacklozenge{}"], + ["29f4", "\\RuleDelayed{}"], + ["2a04", "\\Elxuplus{}"], + ["2a05", "\\ElzThr{}"], + ["2a06", "\\Elxsqcup{}"], + ["2a07", "\\ElzInf{}"], + ["2a08", "\\ElzSup{}"], + ["2a0d", "\\ElzCint{}"], + ["2a0f", "\\clockoint{}"], + ["2a10", "\\ElsevierGlyph{E395}"], + ["2a16", "\\sqrint{}"], + ["2a25", "\\ElsevierGlyph{E25A}"], + ["2a2a", "\\ElsevierGlyph{E25B}"], + ["2a2d", "\\ElsevierGlyph{E25C}"], + ["2a2e", "\\ElsevierGlyph{E25D}"], + ["2a2f", "\\ElzTimes{}"], + ["2a34", "\\ElsevierGlyph{E25E}"], + ["2a35", "\\ElsevierGlyph{E25E}"], + ["2a3c", "\\ElsevierGlyph{E259}"], + ["2a3f", "\\amalg{}"], + ["2a53", "\\ElzAnd{}"], + ["2a54", "\\ElzOr{}"], + ["2a55", "\\ElsevierGlyph{E36E}"], + ["2a56", "\\ElOr{}"], + ["2a5e", "\\perspcorrespond{}"], + ["2a5f", "\\Elzminhat{}"], + ["2a63", "\\ElsevierGlyph{225A}"], + ["2a6e", "\\stackrel{*}{=}"], + ["2a75", "\\Equal{}"], + ["2a7d", "\\leqslant{}"], + ["2a7e", "\\geqslant{}"], + ["2a85", "\\lessapprox{}"], + ["2a86", "\\gtrapprox{}"], + ["2a87", "\\lneq{}"], + ["2a88", "\\gneq{}"], + ["2a89", "\\lnapprox{}"], + ["2a8a", "\\gnapprox{}"], + ["2a8b", "\\lesseqqgtr{}"], + ["2a8c", "\\gtreqqless{}"], + ["2a95", "\\eqslantless{}"], + ["2a96", "\\eqslantgtr{}"], + ["2a9d", "\\Pisymbol{ppi020}{117}"], + ["2a9e", "\\Pisymbol{ppi020}{105}"], + ["2aa1", "\\NestedLessLess{}"], + ["2aa2", "\\NestedGreaterGreater{}"], + ["2aaf", "\\preceq{}"], + ["2ab0", "\\succeq{}"], + ["2ab5", "\\precneqq{}"], + ["2ab6", "\\succneqq{}"], + ["2ab7", "\\precapprox{}"], + ["2ab8", "\\succapprox{}"], + ["2ab9", "\\precnapprox{}"], + ["2aba", "\\succnapprox{}"], + ["2ac5", "\\subseteqq{}"], + ["2ac6", "\\supseteqq{}"], + ["2acb", "\\subsetneqq{}"], + ["2acc", "\\supsetneqq{}"], + ["2aeb", "\\ElsevierGlyph{E30D}"], + ["2af6", "\\Elztdcol{}"], + ["2afd", "{{/}\\!\\!{/}}"], + ["300a", "\\ElsevierGlyph{300A}"], + ["300b", "\\ElsevierGlyph{300B}"], + ["3018", "\\ElsevierGlyph{3018}"], + ["3019", "\\ElsevierGlyph{3019}"], + ["301a", "\\openbracketleft{}"], + ["301b", "\\openbracketright{}"], + ["fb00", "ff"], + ["fb01", "fi"], + ["fb02", "fl"], + ["fb03", "ffi"], + ["fb04", "ffl"], + ["d400", "\\mathbf{A}"], + ["d401", "\\mathbf{B}"], + ["d402", "\\mathbf{C}"], + ["d403", "\\mathbf{D}"], + ["d404", "\\mathbf{E}"], + ["d405", "\\mathbf{F}"], + ["d406", "\\mathbf{G}"], + ["d407", "\\mathbf{H}"], + ["d408", "\\mathbf{I}"], + ["d409", "\\mathbf{J}"], + ["d40a", "\\mathbf{K}"], + ["d40b", "\\mathbf{L}"], + ["d40c", "\\mathbf{M}"], + ["d40d", "\\mathbf{N}"], + ["d40e", "\\mathbf{O}"], + ["d40f", "\\mathbf{P}"], + ["d410", "\\mathbf{Q}"], + ["d411", "\\mathbf{R}"], + ["d412", "\\mathbf{S}"], + ["d413", "\\mathbf{T}"], + ["d414", "\\mathbf{U}"], + ["d415", "\\mathbf{V}"], + ["d416", "\\mathbf{W}"], + ["d417", "\\mathbf{X}"], + ["d418", "\\mathbf{Y}"], + ["d419", "\\mathbf{Z}"], + ["d41a", "\\mathbf{a}"], + ["d41b", "\\mathbf{b}"], + ["d41c", "\\mathbf{c}"], + ["d41d", "\\mathbf{d}"], + ["d41e", "\\mathbf{e}"], + ["d41f", "\\mathbf{f}"], + ["d420", "\\mathbf{g}"], + ["d421", "\\mathbf{h}"], + ["d422", "\\mathbf{i}"], + ["d423", "\\mathbf{j}"], + ["d424", "\\mathbf{k}"], + ["d425", "\\mathbf{l}"], + ["d426", "\\mathbf{m}"], + ["d427", "\\mathbf{n}"], + ["d428", "\\mathbf{o}"], + ["d429", "\\mathbf{p}"], + ["d42a", "\\mathbf{q}"], + ["d42b", "\\mathbf{r}"], + ["d42c", "\\mathbf{s}"], + ["d42d", "\\mathbf{t}"], + ["d42e", "\\mathbf{u}"], + ["d42f", "\\mathbf{v}"], + ["d430", "\\mathbf{w}"], + ["d431", "\\mathbf{x}"], + ["d432", "\\mathbf{y}"], + ["d433", "\\mathbf{z}"], + ["d434", "\\mathsl{A}"], + ["d435", "\\mathsl{B}"], + ["d436", "\\mathsl{C}"], + ["d437", "\\mathsl{D}"], + ["d438", "\\mathsl{E}"], + ["d439", "\\mathsl{F}"], + ["d43a", "\\mathsl{G}"], + ["d43b", "\\mathsl{H}"], + ["d43c", "\\mathsl{I}"], + ["d43d", "\\mathsl{J}"], + ["d43e", "\\mathsl{K}"], + ["d43f", "\\mathsl{L}"], + ["d440", "\\mathsl{M}"], + ["d441", "\\mathsl{N}"], + ["d442", "\\mathsl{O}"], + ["d443", "\\mathsl{P}"], + ["d444", "\\mathsl{Q}"], + ["d445", "\\mathsl{R}"], + ["d446", "\\mathsl{S}"], + ["d447", "\\mathsl{T}"], + ["d448", "\\mathsl{U}"], + ["d449", "\\mathsl{V}"], + ["d44a", "\\mathsl{W}"], + ["d44b", "\\mathsl{X}"], + ["d44c", "\\mathsl{Y}"], + ["d44d", "\\mathsl{Z}"], + ["d44e", "\\mathsl{a}"], + ["d44f", "\\mathsl{b}"], + ["d450", "\\mathsl{c}"], + ["d451", "\\mathsl{d}"], + ["d452", "\\mathsl{e}"], + ["d453", "\\mathsl{f}"], + ["d454", "\\mathsl{g}"], + ["d456", "\\mathsl{i}"], + ["d457", "\\mathsl{j}"], + ["d458", "\\mathsl{k}"], + ["d459", "\\mathsl{l}"], + ["d45a", "\\mathsl{m}"], + ["d45b", "\\mathsl{n}"], + ["d45c", "\\mathsl{o}"], + ["d45d", "\\mathsl{p}"], + ["d45e", "\\mathsl{q}"], + ["d45f", "\\mathsl{r}"], + ["d460", "\\mathsl{s}"], + ["d461", "\\mathsl{t}"], + ["d462", "\\mathsl{u}"], + ["d463", "\\mathsl{v}"], + ["d464", "\\mathsl{w}"], + ["d465", "\\mathsl{x}"], + ["d466", "\\mathsl{y}"], + ["d467", "\\mathsl{z}"], + ["d468", "\\mathbit{A}"], + ["d469", "\\mathbit{B}"], + ["d46a", "\\mathbit{C}"], + ["d46b", "\\mathbit{D}"], + ["d46c", "\\mathbit{E}"], + ["d46d", "\\mathbit{F}"], + ["d46e", "\\mathbit{G}"], + ["d46f", "\\mathbit{H}"], + ["d470", "\\mathbit{I}"], + ["d471", "\\mathbit{J}"], + ["d472", "\\mathbit{K}"], + ["d473", "\\mathbit{L}"], + ["d474", "\\mathbit{M}"], + ["d475", "\\mathbit{N}"], + ["d476", "\\mathbit{O}"], + ["d477", "\\mathbit{P}"], + ["d478", "\\mathbit{Q}"], + ["d479", "\\mathbit{R}"], + ["d47a", "\\mathbit{S}"], + ["d47b", "\\mathbit{T}"], + ["d47c", "\\mathbit{U}"], + ["d47d", "\\mathbit{V}"], + ["d47e", "\\mathbit{W}"], + ["d47f", "\\mathbit{X}"], + ["d480", "\\mathbit{Y}"], + ["d481", "\\mathbit{Z}"], + ["d482", "\\mathbit{a}"], + ["d483", "\\mathbit{b}"], + ["d484", "\\mathbit{c}"], + ["d485", "\\mathbit{d}"], + ["d486", "\\mathbit{e}"], + ["d487", "\\mathbit{f}"], + ["d488", "\\mathbit{g}"], + ["d489", "\\mathbit{h}"], + ["d48a", "\\mathbit{i}"], + ["d48b", "\\mathbit{j}"], + ["d48c", "\\mathbit{k}"], + ["d48d", "\\mathbit{l}"], + ["d48e", "\\mathbit{m}"], + ["d48f", "\\mathbit{n}"], + ["d490", "\\mathbit{o}"], + ["d491", "\\mathbit{p}"], + ["d492", "\\mathbit{q}"], + ["d493", "\\mathbit{r}"], + ["d494", "\\mathbit{s}"], + ["d495", "\\mathbit{t}"], + ["d496", "\\mathbit{u}"], + ["d497", "\\mathbit{v}"], + ["d498", "\\mathbit{w}"], + ["d499", "\\mathbit{x}"], + ["d49a", "\\mathbit{y}"], + ["d49b", "\\mathbit{z}"], + ["d49c", "\\mathscr{A}"], + ["d49e", "\\mathscr{C}"], + ["d49f", "\\mathscr{D}"], + ["d4a2", "\\mathscr{G}"], + ["d4a5", "\\mathscr{J}"], + ["d4a6", "\\mathscr{K}"], + ["d4a9", "\\mathscr{N}"], + ["d4aa", "\\mathscr{O}"], + ["d4ab", "\\mathscr{P}"], + ["d4ac", "\\mathscr{Q}"], + ["d4ae", "\\mathscr{S}"], + ["d4af", "\\mathscr{T}"], + ["d4b0", "\\mathscr{U}"], + ["d4b1", "\\mathscr{V}"], + ["d4b2", "\\mathscr{W}"], + ["d4b3", "\\mathscr{X}"], + ["d4b4", "\\mathscr{Y}"], + ["d4b5", "\\mathscr{Z}"], + ["d4b6", "\\mathscr{a}"], + ["d4b7", "\\mathscr{b}"], + ["d4b8", "\\mathscr{c}"], + ["d4b9", "\\mathscr{d}"], + ["d4bb", "\\mathscr{f}"], + ["d4bd", "\\mathscr{h}"], + ["d4be", "\\mathscr{i}"], + ["d4bf", "\\mathscr{j}"], + ["d4c0", "\\mathscr{k}"], + ["d4c1", "\\mathscr{l}"], + ["d4c2", "\\mathscr{m}"], + ["d4c3", "\\mathscr{n}"], + ["d4c5", "\\mathscr{p}"], + ["d4c6", "\\mathscr{q}"], + ["d4c7", "\\mathscr{r}"], + ["d4c8", "\\mathscr{s}"], + ["d4c9", "\\mathscr{t}"], + ["d4ca", "\\mathscr{u}"], + ["d4cb", "\\mathscr{v}"], + ["d4cc", "\\mathscr{w}"], + ["d4cd", "\\mathscr{x}"], + ["d4ce", "\\mathscr{y}"], + ["d4cf", "\\mathscr{z}"], + ["d4d0", "\\mathmit{A}"], + ["d4d1", "\\mathmit{B}"], + ["d4d2", "\\mathmit{C}"], + ["d4d3", "\\mathmit{D}"], + ["d4d4", "\\mathmit{E}"], + ["d4d5", "\\mathmit{F}"], + ["d4d6", "\\mathmit{G}"], + ["d4d7", "\\mathmit{H}"], + ["d4d8", "\\mathmit{I}"], + ["d4d9", "\\mathmit{J}"], + ["d4da", "\\mathmit{K}"], + ["d4db", "\\mathmit{L}"], + ["d4dc", "\\mathmit{M}"], + ["d4dd", "\\mathmit{N}"], + ["d4de", "\\mathmit{O}"], + ["d4df", "\\mathmit{P}"], + ["d4e0", "\\mathmit{Q}"], + ["d4e1", "\\mathmit{R}"], + ["d4e2", "\\mathmit{S}"], + ["d4e3", "\\mathmit{T}"], + ["d4e4", "\\mathmit{U}"], + ["d4e5", "\\mathmit{V}"], + ["d4e6", "\\mathmit{W}"], + ["d4e7", "\\mathmit{X}"], + ["d4e8", "\\mathmit{Y}"], + ["d4e9", "\\mathmit{Z}"], + ["d4ea", "\\mathmit{a}"], + ["d4eb", "\\mathmit{b}"], + ["d4ec", "\\mathmit{c}"], + ["d4ed", "\\mathmit{d}"], + ["d4ee", "\\mathmit{e}"], + ["d4ef", "\\mathmit{f}"], + ["d4f0", "\\mathmit{g}"], + ["d4f1", "\\mathmit{h}"], + ["d4f2", "\\mathmit{i}"], + ["d4f3", "\\mathmit{j}"], + ["d4f4", "\\mathmit{k}"], + ["d4f5", "\\mathmit{l}"], + ["d4f6", "\\mathmit{m}"], + ["d4f7", "\\mathmit{n}"], + ["d4f8", "\\mathmit{o}"], + ["d4f9", "\\mathmit{p}"], + ["d4fa", "\\mathmit{q}"], + ["d4fb", "\\mathmit{r}"], + ["d4fc", "\\mathmit{s}"], + ["d4fd", "\\mathmit{t}"], + ["d4fe", "\\mathmit{u}"], + ["d4ff", "\\mathmit{v}"], + ["d500", "\\mathmit{w}"], + ["d501", "\\mathmit{x}"], + ["d502", "\\mathmit{y}"], + ["d503", "\\mathmit{z}"], + ["d504", "\\mathfrak{A}"], + ["d505", "\\mathfrak{B}"], + ["d507", "\\mathfrak{D}"], + ["d508", "\\mathfrak{E}"], + ["d509", "\\mathfrak{F}"], + ["d50a", "\\mathfrak{G}"], + ["d50d", "\\mathfrak{J}"], + ["d50e", "\\mathfrak{K}"], + ["d50f", "\\mathfrak{L}"], + ["d510", "\\mathfrak{M}"], + ["d511", "\\mathfrak{N}"], + ["d512", "\\mathfrak{O}"], + ["d513", "\\mathfrak{P}"], + ["d514", "\\mathfrak{Q}"], + ["d516", "\\mathfrak{S}"], + ["d517", "\\mathfrak{T}"], + ["d518", "\\mathfrak{U}"], + ["d519", "\\mathfrak{V}"], + ["d51a", "\\mathfrak{W}"], + ["d51b", "\\mathfrak{X}"], + ["d51c", "\\mathfrak{Y}"], + ["d51e", "\\mathfrak{a}"], + ["d51f", "\\mathfrak{b}"], + ["d520", "\\mathfrak{c}"], + ["d521", "\\mathfrak{d}"], + ["d522", "\\mathfrak{e}"], + ["d523", "\\mathfrak{f}"], + ["d524", "\\mathfrak{g}"], + ["d525", "\\mathfrak{h}"], + ["d526", "\\mathfrak{i}"], + ["d527", "\\mathfrak{j}"], + ["d528", "\\mathfrak{k}"], + ["d529", "\\mathfrak{l}"], + ["d52a", "\\mathfrak{m}"], + ["d52b", "\\mathfrak{n}"], + ["d52c", "\\mathfrak{o}"], + ["d52d", "\\mathfrak{p}"], + ["d52e", "\\mathfrak{q}"], + ["d52f", "\\mathfrak{r}"], + ["d530", "\\mathfrak{s}"], + ["d531", "\\mathfrak{t}"], + ["d532", "\\mathfrak{u}"], + ["d533", "\\mathfrak{v}"], + ["d534", "\\mathfrak{w}"], + ["d535", "\\mathfrak{x}"], + ["d536", "\\mathfrak{y}"], + ["d537", "\\mathfrak{z}"], + ["d538", "\\mathbb{A}"], + ["d539", "\\mathbb{B}"], + ["d53b", "\\mathbb{D}"], + ["d53c", "\\mathbb{E}"], + ["d53d", "\\mathbb{F}"], + ["d53e", "\\mathbb{G}"], + ["d540", "\\mathbb{I}"], + ["d541", "\\mathbb{J}"], + ["d542", "\\mathbb{K}"], + ["d543", "\\mathbb{L}"], + ["d544", "\\mathbb{M}"], + ["d546", "\\mathbb{O}"], + ["d54a", "\\mathbb{S}"], + ["d54b", "\\mathbb{T}"], + ["d54c", "\\mathbb{U}"], + ["d54d", "\\mathbb{V}"], + ["d54e", "\\mathbb{W}"], + ["d54f", "\\mathbb{X}"], + ["d550", "\\mathbb{Y}"], + ["d552", "\\mathbb{a}"], + ["d553", "\\mathbb{b}"], + ["d554", "\\mathbb{c}"], + ["d555", "\\mathbb{d}"], + ["d556", "\\mathbb{e}"], + ["d557", "\\mathbb{f}"], + ["d558", "\\mathbb{g}"], + ["d559", "\\mathbb{h}"], + ["d55a", "\\mathbb{i}"], + ["d55b", "\\mathbb{j}"], + ["d55c", "\\mathbb{k}"], + ["d55d", "\\mathbb{l}"], + ["d55e", "\\mathbb{m}"], + ["d55f", "\\mathbb{n}"], + ["d560", "\\mathbb{o}"], + ["d561", "\\mathbb{p}"], + ["d562", "\\mathbb{q}"], + ["d563", "\\mathbb{r}"], + ["d564", "\\mathbb{s}"], + ["d565", "\\mathbb{t}"], + ["d566", "\\mathbb{u}"], + ["d567", "\\mathbb{v}"], + ["d568", "\\mathbb{w}"], + ["d569", "\\mathbb{x}"], + ["d56a", "\\mathbb{y}"], + ["d56b", "\\mathbb{z}"], + ["d56c", "\\mathslbb{A}"], + ["d56d", "\\mathslbb{B}"], + ["d56e", "\\mathslbb{C}"], + ["d56f", "\\mathslbb{D}"], + ["d570", "\\mathslbb{E}"], + ["d571", "\\mathslbb{F}"], + ["d572", "\\mathslbb{G}"], + ["d573", "\\mathslbb{H}"], + ["d574", "\\mathslbb{I}"], + ["d575", "\\mathslbb{J}"], + ["d576", "\\mathslbb{K}"], + ["d577", "\\mathslbb{L}"], + ["d578", "\\mathslbb{M}"], + ["d579", "\\mathslbb{N}"], + ["d57a", "\\mathslbb{O}"], + ["d57b", "\\mathslbb{P}"], + ["d57c", "\\mathslbb{Q}"], + ["d57d", "\\mathslbb{R}"], + ["d57e", "\\mathslbb{S}"], + ["d57f", "\\mathslbb{T}"], + ["d580", "\\mathslbb{U}"], + ["d581", "\\mathslbb{V}"], + ["d582", "\\mathslbb{W}"], + ["d583", "\\mathslbb{X}"], + ["d584", "\\mathslbb{Y}"], + ["d585", "\\mathslbb{Z}"], + ["d586", "\\mathslbb{a}"], + ["d587", "\\mathslbb{b}"], + ["d588", "\\mathslbb{c}"], + ["d589", "\\mathslbb{d}"], + ["d58a", "\\mathslbb{e}"], + ["d58b", "\\mathslbb{f}"], + ["d58c", "\\mathslbb{g}"], + ["d58d", "\\mathslbb{h}"], + ["d58e", "\\mathslbb{i}"], + ["d58f", "\\mathslbb{j}"], + ["d590", "\\mathslbb{k}"], + ["d591", "\\mathslbb{l}"], + ["d592", "\\mathslbb{m}"], + ["d593", "\\mathslbb{n}"], + ["d594", "\\mathslbb{o}"], + ["d595", "\\mathslbb{p}"], + ["d596", "\\mathslbb{q}"], + ["d597", "\\mathslbb{r}"], + ["d598", "\\mathslbb{s}"], + ["d599", "\\mathslbb{t}"], + ["d59a", "\\mathslbb{u}"], + ["d59b", "\\mathslbb{v}"], + ["d59c", "\\mathslbb{w}"], + ["d59d", "\\mathslbb{x}"], + ["d59e", "\\mathslbb{y}"], + ["d59f", "\\mathslbb{z}"], + ["d5a0", "\\mathsf{A}"], + ["d5a1", "\\mathsf{B}"], + ["d5a2", "\\mathsf{C}"], + ["d5a3", "\\mathsf{D}"], + ["d5a4", "\\mathsf{E}"], + ["d5a5", "\\mathsf{F}"], + ["d5a6", "\\mathsf{G}"], + ["d5a7", "\\mathsf{H}"], + ["d5a8", "\\mathsf{I}"], + ["d5a9", "\\mathsf{J}"], + ["d5aa", "\\mathsf{K}"], + ["d5ab", "\\mathsf{L}"], + ["d5ac", "\\mathsf{M}"], + ["d5ad", "\\mathsf{N}"], + ["d5ae", "\\mathsf{O}"], + ["d5af", "\\mathsf{P}"], + ["d5b0", "\\mathsf{Q}"], + ["d5b1", "\\mathsf{R}"], + ["d5b2", "\\mathsf{S}"], + ["d5b3", "\\mathsf{T}"], + ["d5b4", "\\mathsf{U}"], + ["d5b5", "\\mathsf{V}"], + ["d5b6", "\\mathsf{W}"], + ["d5b7", "\\mathsf{X}"], + ["d5b8", "\\mathsf{Y}"], + ["d5b9", "\\mathsf{Z}"], + ["d5ba", "\\mathsf{a}"], + ["d5bb", "\\mathsf{b}"], + ["d5bc", "\\mathsf{c}"], + ["d5bd", "\\mathsf{d}"], + ["d5be", "\\mathsf{e}"], + ["d5bf", "\\mathsf{f}"], + ["d5c0", "\\mathsf{g}"], + ["d5c1", "\\mathsf{h}"], + ["d5c2", "\\mathsf{i}"], + ["d5c3", "\\mathsf{j}"], + ["d5c4", "\\mathsf{k}"], + ["d5c5", "\\mathsf{l}"], + ["d5c6", "\\mathsf{m}"], + ["d5c7", "\\mathsf{n}"], + ["d5c8", "\\mathsf{o}"], + ["d5c9", "\\mathsf{p}"], + ["d5ca", "\\mathsf{q}"], + ["d5cb", "\\mathsf{r}"], + ["d5cc", "\\mathsf{s}"], + ["d5cd", "\\mathsf{t}"], + ["d5ce", "\\mathsf{u}"], + ["d5cf", "\\mathsf{v}"], + ["d5d0", "\\mathsf{w}"], + ["d5d1", "\\mathsf{x}"], + ["d5d2", "\\mathsf{y}"], + ["d5d3", "\\mathsf{z}"], + ["d5d4", "\\mathsfbf{A}"], + ["d5d5", "\\mathsfbf{B}"], + ["d5d6", "\\mathsfbf{C}"], + ["d5d7", "\\mathsfbf{D}"], + ["d5d8", "\\mathsfbf{E}"], + ["d5d9", "\\mathsfbf{F}"], + ["d5da", "\\mathsfbf{G}"], + ["d5db", "\\mathsfbf{H}"], + ["d5dc", "\\mathsfbf{I}"], + ["d5dd", "\\mathsfbf{J}"], + ["d5de", "\\mathsfbf{K}"], + ["d5df", "\\mathsfbf{L}"], + ["d5e0", "\\mathsfbf{M}"], + ["d5e1", "\\mathsfbf{N}"], + ["d5e2", "\\mathsfbf{O}"], + ["d5e3", "\\mathsfbf{P}"], + ["d5e4", "\\mathsfbf{Q}"], + ["d5e5", "\\mathsfbf{R}"], + ["d5e6", "\\mathsfbf{S}"], + ["d5e7", "\\mathsfbf{T}"], + ["d5e8", "\\mathsfbf{U}"], + ["d5e9", "\\mathsfbf{V}"], + ["d5ea", "\\mathsfbf{W}"], + ["d5eb", "\\mathsfbf{X}"], + ["d5ec", "\\mathsfbf{Y}"], + ["d5ed", "\\mathsfbf{Z}"], + ["d5ee", "\\mathsfbf{a}"], + ["d5ef", "\\mathsfbf{b}"], + ["d5f0", "\\mathsfbf{c}"], + ["d5f1", "\\mathsfbf{d}"], + ["d5f2", "\\mathsfbf{e}"], + ["d5f3", "\\mathsfbf{f}"], + ["d5f4", "\\mathsfbf{g}"], + ["d5f5", "\\mathsfbf{h}"], + ["d5f6", "\\mathsfbf{i}"], + ["d5f7", "\\mathsfbf{j}"], + ["d5f8", "\\mathsfbf{k}"], + ["d5f9", "\\mathsfbf{l}"], + ["d5fa", "\\mathsfbf{m}"], + ["d5fb", "\\mathsfbf{n}"], + ["d5fc", "\\mathsfbf{o}"], + ["d5fd", "\\mathsfbf{p}"], + ["d5fe", "\\mathsfbf{q}"], + ["d5ff", "\\mathsfbf{r}"], + ["d600", "\\mathsfbf{s}"], + ["d601", "\\mathsfbf{t}"], + ["d602", "\\mathsfbf{u}"], + ["d603", "\\mathsfbf{v}"], + ["d604", "\\mathsfbf{w}"], + ["d605", "\\mathsfbf{x}"], + ["d606", "\\mathsfbf{y}"], + ["d607", "\\mathsfbf{z}"], + ["d608", "\\mathsfsl{A}"], + ["d609", "\\mathsfsl{B}"], + ["d60a", "\\mathsfsl{C}"], + ["d60b", "\\mathsfsl{D}"], + ["d60c", "\\mathsfsl{E}"], + ["d60d", "\\mathsfsl{F}"], + ["d60e", "\\mathsfsl{G}"], + ["d60f", "\\mathsfsl{H}"], + ["d610", "\\mathsfsl{I}"], + ["d611", "\\mathsfsl{J}"], + ["d612", "\\mathsfsl{K}"], + ["d613", "\\mathsfsl{L}"], + ["d614", "\\mathsfsl{M}"], + ["d615", "\\mathsfsl{N}"], + ["d616", "\\mathsfsl{O}"], + ["d617", "\\mathsfsl{P}"], + ["d618", "\\mathsfsl{Q}"], + ["d619", "\\mathsfsl{R}"], + ["d61a", "\\mathsfsl{S}"], + ["d61b", "\\mathsfsl{T}"], + ["d61c", "\\mathsfsl{U}"], + ["d61d", "\\mathsfsl{V}"], + ["d61e", "\\mathsfsl{W}"], + ["d61f", "\\mathsfsl{X}"], + ["d620", "\\mathsfsl{Y}"], + ["d621", "\\mathsfsl{Z}"], + ["d622", "\\mathsfsl{a}"], + ["d623", "\\mathsfsl{b}"], + ["d624", "\\mathsfsl{c}"], + ["d625", "\\mathsfsl{d}"], + ["d626", "\\mathsfsl{e}"], + ["d627", "\\mathsfsl{f}"], + ["d628", "\\mathsfsl{g}"], + ["d629", "\\mathsfsl{h}"], + ["d62a", "\\mathsfsl{i}"], + ["d62b", "\\mathsfsl{j}"], + ["d62c", "\\mathsfsl{k}"], + ["d62d", "\\mathsfsl{l}"], + ["d62e", "\\mathsfsl{m}"], + ["d62f", "\\mathsfsl{n}"], + ["d630", "\\mathsfsl{o}"], + ["d631", "\\mathsfsl{p}"], + ["d632", "\\mathsfsl{q}"], + ["d633", "\\mathsfsl{r}"], + ["d634", "\\mathsfsl{s}"], + ["d635", "\\mathsfsl{t}"], + ["d636", "\\mathsfsl{u}"], + ["d637", "\\mathsfsl{v}"], + ["d638", "\\mathsfsl{w}"], + ["d639", "\\mathsfsl{x}"], + ["d63a", "\\mathsfsl{y}"], + ["d63b", "\\mathsfsl{z}"], + ["d63c", "\\mathsfbfsl{A}"], + ["d63d", "\\mathsfbfsl{B}"], + ["d63e", "\\mathsfbfsl{C}"], + ["d63f", "\\mathsfbfsl{D}"], + ["d640", "\\mathsfbfsl{E}"], + ["d641", "\\mathsfbfsl{F}"], + ["d642", "\\mathsfbfsl{G}"], + ["d643", "\\mathsfbfsl{H}"], + ["d644", "\\mathsfbfsl{I}"], + ["d645", "\\mathsfbfsl{J}"], + ["d646", "\\mathsfbfsl{K}"], + ["d647", "\\mathsfbfsl{L}"], + ["d648", "\\mathsfbfsl{M}"], + ["d649", "\\mathsfbfsl{N}"], + ["d64a", "\\mathsfbfsl{O}"], + ["d64b", "\\mathsfbfsl{P}"], + ["d64c", "\\mathsfbfsl{Q}"], + ["d64d", "\\mathsfbfsl{R}"], + ["d64e", "\\mathsfbfsl{S}"], + ["d64f", "\\mathsfbfsl{T}"], + ["d650", "\\mathsfbfsl{U}"], + ["d651", "\\mathsfbfsl{V}"], + ["d652", "\\mathsfbfsl{W}"], + ["d653", "\\mathsfbfsl{X}"], + ["d654", "\\mathsfbfsl{Y}"], + ["d655", "\\mathsfbfsl{Z}"], + ["d656", "\\mathsfbfsl{a}"], + ["d657", "\\mathsfbfsl{b}"], + ["d658", "\\mathsfbfsl{c}"], + ["d659", "\\mathsfbfsl{d}"], + ["d65a", "\\mathsfbfsl{e}"], + ["d65b", "\\mathsfbfsl{f}"], + ["d65c", "\\mathsfbfsl{g}"], + ["d65d", "\\mathsfbfsl{h}"], + ["d65e", "\\mathsfbfsl{i}"], + ["d65f", "\\mathsfbfsl{j}"], + ["d660", "\\mathsfbfsl{k}"], + ["d661", "\\mathsfbfsl{l}"], + ["d662", "\\mathsfbfsl{m}"], + ["d663", "\\mathsfbfsl{n}"], + ["d664", "\\mathsfbfsl{o}"], + ["d665", "\\mathsfbfsl{p}"], + ["d666", "\\mathsfbfsl{q}"], + ["d667", "\\mathsfbfsl{r}"], + ["d668", "\\mathsfbfsl{s}"], + ["d669", "\\mathsfbfsl{t}"], + ["d66a", "\\mathsfbfsl{u}"], + ["d66b", "\\mathsfbfsl{v}"], + ["d66c", "\\mathsfbfsl{w}"], + ["d66d", "\\mathsfbfsl{x}"], + ["d66e", "\\mathsfbfsl{y}"], + ["d66f", "\\mathsfbfsl{z}"], + ["d670", "\\mathtt{A}"], + ["d671", "\\mathtt{B}"], + ["d672", "\\mathtt{C}"], + ["d673", "\\mathtt{D}"], + ["d674", "\\mathtt{E}"], + ["d675", "\\mathtt{F}"], + ["d676", "\\mathtt{G}"], + ["d677", "\\mathtt{H}"], + ["d678", "\\mathtt{I}"], + ["d679", "\\mathtt{J}"], + ["d67a", "\\mathtt{K}"], + ["d67b", "\\mathtt{L}"], + ["d67c", "\\mathtt{M}"], + ["d67d", "\\mathtt{N}"], + ["d67e", "\\mathtt{O}"], + ["d67f", "\\mathtt{P}"], + ["d680", "\\mathtt{Q}"], + ["d681", "\\mathtt{R}"], + ["d682", "\\mathtt{S}"], + ["d683", "\\mathtt{T}"], + ["d684", "\\mathtt{U}"], + ["d685", "\\mathtt{V}"], + ["d686", "\\mathtt{W}"], + ["d687", "\\mathtt{X}"], + ["d688", "\\mathtt{Y}"], + ["d689", "\\mathtt{Z}"], + ["d68a", "\\mathtt{a}"], + ["d68b", "\\mathtt{b}"], + ["d68c", "\\mathtt{c}"], + ["d68d", "\\mathtt{d}"], + ["d68e", "\\mathtt{e}"], + ["d68f", "\\mathtt{f}"], + ["d690", "\\mathtt{g}"], + ["d691", "\\mathtt{h}"], + ["d692", "\\mathtt{i}"], + ["d693", "\\mathtt{j}"], + ["d694", "\\mathtt{k}"], + ["d695", "\\mathtt{l}"], + ["d696", "\\mathtt{m}"], + ["d697", "\\mathtt{n}"], + ["d698", "\\mathtt{o}"], + ["d699", "\\mathtt{p}"], + ["d69a", "\\mathtt{q}"], + ["d69b", "\\mathtt{r}"], + ["d69c", "\\mathtt{s}"], + ["d69d", "\\mathtt{t}"], + ["d69e", "\\mathtt{u}"], + ["d69f", "\\mathtt{v}"], + ["d6a0", "\\mathtt{w}"], + ["d6a1", "\\mathtt{x}"], + ["d6a2", "\\mathtt{y}"], + ["d6a3", "\\mathtt{z}"], + ["d6a8", "\\mathbf{\\Alpha}"], + ["d6a9", "\\mathbf{\\Beta}"], + ["d6aa", "\\mathbf{\\Gamma}"], + ["d6ab", "\\mathbf{\\Delta}"], + ["d6ac", "\\mathbf{\\Epsilon}"], + ["d6ad", "\\mathbf{\\Zeta}"], + ["d6ae", "\\mathbf{\\Eta}"], + ["d6af", "\\mathbf{\\Theta}"], + ["d6b0", "\\mathbf{\\Iota}"], + ["d6b1", "\\mathbf{\\Kappa}"], + ["d6b2", "\\mathbf{\\Lambda}"], + ["d6b5", "\\mathbf{\\Xi}"], + ["d6b7", "\\mathbf{\\Pi}"], + ["d6b8", "\\mathbf{\\Rho}"], + ["d6b9", "\\mathbf{\\vartheta}"], + ["d6ba", "\\mathbf{\\Sigma}"], + ["d6bb", "\\mathbf{\\Tau}"], + ["d6bc", "\\mathbf{\\Upsilon}"], + ["d6bd", "\\mathbf{\\Phi}"], + ["d6be", "\\mathbf{\\Chi}"], + ["d6bf", "\\mathbf{\\Psi}"], + ["d6c0", "\\mathbf{\\Omega}"], + ["d6c1", "\\mathbf{\\nabla}"], + ["d6c2", "\\mathbf{\\Alpha}"], + ["d6c3", "\\mathbf{\\Beta}"], + ["d6c4", "\\mathbf{\\Gamma}"], + ["d6c5", "\\mathbf{\\Delta}"], + ["d6c6", "\\mathbf{\\Epsilon}"], + ["d6c7", "\\mathbf{\\Zeta}"], + ["d6c8", "\\mathbf{\\Eta}"], + ["d6c9", "\\mathbf{\\theta}"], + ["d6ca", "\\mathbf{\\Iota}"], + ["d6cb", "\\mathbf{\\Kappa}"], + ["d6cc", "\\mathbf{\\Lambda}"], + ["d6cf", "\\mathbf{\\Xi}"], + ["d6d1", "\\mathbf{\\Pi}"], + ["d6d2", "\\mathbf{\\Rho}"], + ["d6d3", "\\mathbf{\\varsigma}"], + ["d6d4", "\\mathbf{\\Sigma}"], + ["d6d5", "\\mathbf{\\Tau}"], + ["d6d6", "\\mathbf{\\Upsilon}"], + ["d6d7", "\\mathbf{\\Phi}"], + ["d6d8", "\\mathbf{\\Chi}"], + ["d6d9", "\\mathbf{\\Psi}"], + ["d6da", "\\mathbf{\\Omega}"], + ["d6db", "\\partial{}"], + ["d6dc", "\\in"], + ["d6dd", "\\mathbf{\\vartheta}"], + ["d6de", "\\mathbf{\\varkappa}"], + ["d6df", "\\mathbf{\\phi}"], + ["d6e0", "\\mathbf{\\varrho}"], + ["d6e1", "\\mathbf{\\varpi}"], + ["d6e2", "\\mathsl{\\Alpha}"], + ["d6e3", "\\mathsl{\\Beta}"], + ["d6e4", "\\mathsl{\\Gamma}"], + ["d6e5", "\\mathsl{\\Delta}"], + ["d6e6", "\\mathsl{\\Epsilon}"], + ["d6e7", "\\mathsl{\\Zeta}"], + ["d6e8", "\\mathsl{\\Eta}"], + ["d6e9", "\\mathsl{\\Theta}"], + ["d6ea", "\\mathsl{\\Iota}"], + ["d6eb", "\\mathsl{\\Kappa}"], + ["d6ec", "\\mathsl{\\Lambda}"], + ["d6ef", "\\mathsl{\\Xi}"], + ["d6f1", "\\mathsl{\\Pi}"], + ["d6f2", "\\mathsl{\\Rho}"], + ["d6f3", "\\mathsl{\\vartheta}"], + ["d6f4", "\\mathsl{\\Sigma}"], + ["d6f5", "\\mathsl{\\Tau}"], + ["d6f6", "\\mathsl{\\Upsilon}"], + ["d6f7", "\\mathsl{\\Phi}"], + ["d6f8", "\\mathsl{\\Chi}"], + ["d6f9", "\\mathsl{\\Psi}"], + ["d6fa", "\\mathsl{\\Omega}"], + ["d6fb", "\\mathsl{\\nabla}"], + ["d6fc", "\\mathsl{\\Alpha}"], + ["d6fd", "\\mathsl{\\Beta}"], + ["d6fe", "\\mathsl{\\Gamma}"], + ["d6ff", "\\mathsl{\\Delta}"], + ["d700", "\\mathsl{\\Epsilon}"], + ["d701", "\\mathsl{\\Zeta}"], + ["d702", "\\mathsl{\\Eta}"], + ["d703", "\\mathsl{\\Theta}"], + ["d704", "\\mathsl{\\Iota}"], + ["d705", "\\mathsl{\\Kappa}"], + ["d706", "\\mathsl{\\Lambda}"], + ["d709", "\\mathsl{\\Xi}"], + ["d70b", "\\mathsl{\\Pi}"], + ["d70c", "\\mathsl{\\Rho}"], + ["d70d", "\\mathsl{\\varsigma}"], + ["d70e", "\\mathsl{\\Sigma}"], + ["d70f", "\\mathsl{\\Tau}"], + ["d710", "\\mathsl{\\Upsilon}"], + ["d711", "\\mathsl{\\Phi}"], + ["d712", "\\mathsl{\\Chi}"], + ["d713", "\\mathsl{\\Psi}"], + ["d714", "\\mathsl{\\Omega}"], + ["d715", "\\partial{}"], + ["d716", "\\in"], + ["d717", "\\mathsl{\\vartheta}"], + ["d718", "\\mathsl{\\varkappa}"], + ["d719", "\\mathsl{\\phi}"], + ["d71a", "\\mathsl{\\varrho}"], + ["d71b", "\\mathsl{\\varpi}"], + ["d71c", "\\mathbit{\\Alpha}"], + ["d71d", "\\mathbit{\\Beta}"], + ["d71e", "\\mathbit{\\Gamma}"], + ["d71f", "\\mathbit{\\Delta}"], + ["d720", "\\mathbit{\\Epsilon}"], + ["d721", "\\mathbit{\\Zeta}"], + ["d722", "\\mathbit{\\Eta}"], + ["d723", "\\mathbit{\\Theta}"], + ["d724", "\\mathbit{\\Iota}"], + ["d725", "\\mathbit{\\Kappa}"], + ["d726", "\\mathbit{\\Lambda}"], + ["d729", "\\mathbit{\\Xi}"], + ["d72b", "\\mathbit{\\Pi}"], + ["d72c", "\\mathbit{\\Rho}"], + ["d72d", "\\mathbit{O}"], + ["d72e", "\\mathbit{\\Sigma}"], + ["d72f", "\\mathbit{\\Tau}"], + ["d730", "\\mathbit{\\Upsilon}"], + ["d731", "\\mathbit{\\Phi}"], + ["d732", "\\mathbit{\\Chi}"], + ["d733", "\\mathbit{\\Psi}"], + ["d734", "\\mathbit{\\Omega}"], + ["d735", "\\mathbit{\\nabla}"], + ["d736", "\\mathbit{\\Alpha}"], + ["d737", "\\mathbit{\\Beta}"], + ["d738", "\\mathbit{\\Gamma}"], + ["d739", "\\mathbit{\\Delta}"], + ["d73a", "\\mathbit{\\Epsilon}"], + ["d73b", "\\mathbit{\\Zeta}"], + ["d73c", "\\mathbit{\\Eta}"], + ["d73d", "\\mathbit{\\Theta}"], + ["d73e", "\\mathbit{\\Iota}"], + ["d73f", "\\mathbit{\\Kappa}"], + ["d740", "\\mathbit{\\Lambda}"], + ["d743", "\\mathbit{\\Xi}"], + ["d745", "\\mathbit{\\Pi}"], + ["d746", "\\mathbit{\\Rho}"], + ["d747", "\\mathbit{\\varsigma}"], + ["d748", "\\mathbit{\\Sigma}"], + ["d749", "\\mathbit{\\Tau}"], + ["d74a", "\\mathbit{\\Upsilon}"], + ["d74b", "\\mathbit{\\Phi}"], + ["d74c", "\\mathbit{\\Chi}"], + ["d74d", "\\mathbit{\\Psi}"], + ["d74e", "\\mathbit{\\Omega}"], + ["d74f", "\\partial{}"], + ["d750", "\\in"], + ["d751", "\\mathbit{\\vartheta}"], + ["d752", "\\mathbit{\\varkappa}"], + ["d753", "\\mathbit{\\phi}"], + ["d754", "\\mathbit{\\varrho}"], + ["d755", "\\mathbit{\\varpi}"], + ["d756", "\\mathsfbf{\\Alpha}"], + ["d757", "\\mathsfbf{\\Beta}"], + ["d758", "\\mathsfbf{\\Gamma}"], + ["d759", "\\mathsfbf{\\Delta}"], + ["d75a", "\\mathsfbf{\\Epsilon}"], + ["d75b", "\\mathsfbf{\\Zeta}"], + ["d75c", "\\mathsfbf{\\Eta}"], + ["d75d", "\\mathsfbf{\\Theta}"], + ["d75e", "\\mathsfbf{\\Iota}"], + ["d75f", "\\mathsfbf{\\Kappa}"], + ["d760", "\\mathsfbf{\\Lambda}"], + ["d763", "\\mathsfbf{\\Xi}"], + ["d765", "\\mathsfbf{\\Pi}"], + ["d766", "\\mathsfbf{\\Rho}"], + ["d767", "\\mathsfbf{\\vartheta}"], + ["d768", "\\mathsfbf{\\Sigma}"], + ["d769", "\\mathsfbf{\\Tau}"], + ["d76a", "\\mathsfbf{\\Upsilon}"], + ["d76b", "\\mathsfbf{\\Phi}"], + ["d76c", "\\mathsfbf{\\Chi}"], + ["d76d", "\\mathsfbf{\\Psi}"], + ["d76e", "\\mathsfbf{\\Omega}"], + ["d76f", "\\mathsfbf{\\nabla}"], + ["d770", "\\mathsfbf{\\Alpha}"], + ["d771", "\\mathsfbf{\\Beta}"], + ["d772", "\\mathsfbf{\\Gamma}"], + ["d773", "\\mathsfbf{\\Delta}"], + ["d774", "\\mathsfbf{\\Epsilon}"], + ["d775", "\\mathsfbf{\\Zeta}"], + ["d776", "\\mathsfbf{\\Eta}"], + ["d777", "\\mathsfbf{\\Theta}"], + ["d778", "\\mathsfbf{\\Iota}"], + ["d779", "\\mathsfbf{\\Kappa}"], + ["d77a", "\\mathsfbf{\\Lambda}"], + ["d77d", "\\mathsfbf{\\Xi}"], + ["d77f", "\\mathsfbf{\\Pi}"], + ["d780", "\\mathsfbf{\\Rho}"], + ["d781", "\\mathsfbf{\\varsigma}"], + ["d782", "\\mathsfbf{\\Sigma}"], + ["d783", "\\mathsfbf{\\Tau}"], + ["d784", "\\mathsfbf{\\Upsilon}"], + ["d785", "\\mathsfbf{\\Phi}"], + ["d786", "\\mathsfbf{\\Chi}"], + ["d787", "\\mathsfbf{\\Psi}"], + ["d788", "\\mathsfbf{\\Omega}"], + ["d789", "\\partial{}"], + ["d78a", "\\in"], + ["d78b", "\\mathsfbf{\\vartheta}"], + ["d78c", "\\mathsfbf{\\varkappa}"], + ["d78d", "\\mathsfbf{\\phi}"], + ["d78e", "\\mathsfbf{\\varrho}"], + ["d78f", "\\mathsfbf{\\varpi}"], + ["d790", "\\mathsfbfsl{\\Alpha}"], + ["d791", "\\mathsfbfsl{\\Beta}"], + ["d792", "\\mathsfbfsl{\\Gamma}"], + ["d793", "\\mathsfbfsl{\\Delta}"], + ["d794", "\\mathsfbfsl{\\Epsilon}"], + ["d795", "\\mathsfbfsl{\\Zeta}"], + ["d796", "\\mathsfbfsl{\\Eta}"], + ["d797", "\\mathsfbfsl{\\vartheta}"], + ["d798", "\\mathsfbfsl{\\Iota}"], + ["d799", "\\mathsfbfsl{\\Kappa}"], + ["d79a", "\\mathsfbfsl{\\Lambda}"], + ["d79d", "\\mathsfbfsl{\\Xi}"], + ["d79f", "\\mathsfbfsl{\\Pi}"], + ["d7a0", "\\mathsfbfsl{\\Rho}"], + ["d7a1", "\\mathsfbfsl{\\vartheta}"], + ["d7a2", "\\mathsfbfsl{\\Sigma}"], + ["d7a3", "\\mathsfbfsl{\\Tau}"], + ["d7a4", "\\mathsfbfsl{\\Upsilon}"], + ["d7a5", "\\mathsfbfsl{\\Phi}"], + ["d7a6", "\\mathsfbfsl{\\Chi}"], + ["d7a7", "\\mathsfbfsl{\\Psi}"], + ["d7a8", "\\mathsfbfsl{\\Omega}"], + ["d7a9", "\\mathsfbfsl{\\nabla}"], + ["d7aa", "\\mathsfbfsl{\\Alpha}"], + ["d7ab", "\\mathsfbfsl{\\Beta}"], + ["d7ac", "\\mathsfbfsl{\\Gamma}"], + ["d7ad", "\\mathsfbfsl{\\Delta}"], + ["d7ae", "\\mathsfbfsl{\\Epsilon}"], + ["d7af", "\\mathsfbfsl{\\Zeta}"], + ["d7b0", "\\mathsfbfsl{\\Eta}"], + ["d7b1", "\\mathsfbfsl{\\vartheta}"], + ["d7b2", "\\mathsfbfsl{\\Iota}"], + ["d7b3", "\\mathsfbfsl{\\Kappa}"], + ["d7b4", "\\mathsfbfsl{\\Lambda}"], + ["d7b7", "\\mathsfbfsl{\\Xi}"], + ["d7b9", "\\mathsfbfsl{\\Pi}"], + ["d7ba", "\\mathsfbfsl{\\Rho}"], + ["d7bb", "\\mathsfbfsl{\\varsigma}"], + ["d7bc", "\\mathsfbfsl{\\Sigma}"], + ["d7bd", "\\mathsfbfsl{\\Tau}"], + ["d7be", "\\mathsfbfsl{\\Upsilon}"], + ["d7bf", "\\mathsfbfsl{\\Phi}"], + ["d7c0", "\\mathsfbfsl{\\Chi}"], + ["d7c1", "\\mathsfbfsl{\\Psi}"], + ["d7c2", "\\mathsfbfsl{\\Omega}"], + ["d7c3", "\\partial{}"], + ["d7c4", "\\in"], + ["d7c5", "\\mathsfbfsl{\\vartheta}"], + ["d7c6", "\\mathsfbfsl{\\varkappa}"], + ["d7c7", "\\mathsfbfsl{\\phi}"], + ["d7c8", "\\mathsfbfsl{\\varrho}"], + ["d7c9", "\\mathsfbfsl{\\varpi}"], + ["d7ce", "\\mathbf{0}"], + ["d7cf", "\\mathbf{1}"], + ["d7d0", "\\mathbf{2}"], + ["d7d1", "\\mathbf{3}"], + ["d7d2", "\\mathbf{4}"], + ["d7d3", "\\mathbf{5}"], + ["d7d4", "\\mathbf{6}"], + ["d7d5", "\\mathbf{7}"], + ["d7d6", "\\mathbf{8}"], + ["d7d7", "\\mathbf{9}"], + ["d7d8", "\\mathbb{0}"], + ["d7d9", "\\mathbb{1}"], + ["d7da", "\\mathbb{2}"], + ["d7db", "\\mathbb{3}"], + ["d7dc", "\\mathbb{4}"], + ["d7dd", "\\mathbb{5}"], + ["d7de", "\\mathbb{6}"], + ["d7df", "\\mathbb{7}"], + ["d7e0", "\\mathbb{8}"], + ["d7e1", "\\mathbb{9}"], + ["d7e2", "\\mathsf{0}"], + ["d7e3", "\\mathsf{1}"], + ["d7e4", "\\mathsf{2}"], + ["d7e5", "\\mathsf{3}"], + ["d7e6", "\\mathsf{4}"], + ["d7e7", "\\mathsf{5}"], + ["d7e8", "\\mathsf{6}"], + ["d7e9", "\\mathsf{7}"], + ["d7ea", "\\mathsf{8}"], + ["d7eb", "\\mathsf{9}"], + ["d7ec", "\\mathsfbf{0}"], + ["d7ed", "\\mathsfbf{1}"], + ["d7ee", "\\mathsfbf{2}"], + ["d7ef", "\\mathsfbf{3}"], + ["d7f0", "\\mathsfbf{4}"], + ["d7f1", "\\mathsfbf{5}"], + ["d7f2", "\\mathsfbf{6}"], + ["d7f3", "\\mathsfbf{7}"], + ["d7f4", "\\mathsfbf{8}"], + ["d7f5", "\\mathsfbf{9}"], + ["d7f6", "\\mathtt{0}"], + ["d7f7", "\\mathtt{1}"], + ["d7f8", "\\mathtt{2}"], + ["d7f9", "\\mathtt{3}"], + ["d7fa", "\\mathtt{4}"], + ["d7fb", "\\mathtt{5}"], + ["d7fc", "\\mathtt{6}"], + ["d7fd", "\\mathtt{7}"], + ["d7fe", "\\mathtt{8}"], + ["d7ff", "\\mathtt{9}"] +]); + +// src/modifiers/escapeCharactersModifier.ts +var VERBATIM_FIELDS = [ + "url", + "doi", + "eprint", + "file", + "verba", + "verbb", + "verbc", + "pdf" +]; +var escapeCharactersModifier = { + condition: (fieldName, options) => Boolean(options.escape && !VERBATIM_FIELDS.includes(fieldName)), + modifyRenderedValue: (str) => { + var _a; + let result = str; + const mathExpressions = []; + result = result.replace(/\$[^$]+\$/g, (match) => { + mathExpressions.push(match); + return `MATH.EXP.${mathExpressions.length - 1}`; + }); + let newstr = ""; + let escapeMode = false; + for (let i = 0; i < result.length; i++) { + if (escapeMode) { + escapeMode = false; + newstr += result[i]; + continue; } - case "field": { - if (char === "}" || char === ")") { - node.name = node.name.trim(); - node = node.parent.parent.parent; - } else if (char === "=") { - node.name = node.name.trim(); - node = node.value; - } else if (char === ",") { - node.name = node.name.trim(); - node = new FieldNode(node.parent); - } else if (!isValidFieldName(char)) { - throw new BibTeXSyntaxError(input, node, i, line, column); - } else if (!node.name) { - if (!isWhitespace(char)) { - node.parent.fields.push(node); - node.name = char; - } else { - } - } else { - node.name += char; - } - break; + if (result[i] === "\\") { + escapeMode = true; + newstr += result[i]; + continue; } - case "concat": { - if (isWhitespace(char)) { - break; - } - if (node.canConsumeValue) { - if (/[#=,}()[\]]/.test(char)) { - throw new BibTeXSyntaxError(input, node, i, line, column); - } - node.canConsumeValue = false; - if (char === "{") { - node = new BracedNode(node); - } else if (char === '"') { - node = new QuotedNode(node); - } else { - node = new LiteralNode(node, char); - } - } else { - if (char === ",") { - node = new FieldNode(node.parent.parent); - } else if (char === "}" || char === ")") { - node = node.parent.parent.parent.parent; - } else if (char === "#") { - node.canConsumeValue = true; - } else { - throw new BibTeXSyntaxError(input, node, i, line, column); - } - } - break; + const c = result.charCodeAt(i).toString(16).padStart(4, "0"); + newstr += (_a = specialCharacters.get(c)) != null ? _a : result[i]; + } + return newstr.replace( + /MATH\.EXP\.(\d+)/g, + (_, i) => { + var _a2; + return (_a2 = mathExpressions[Number(i)]) != null ? _a2 : ""; } - case "literal": - if (isWhitespace(char)) { - node = node.parent; - } else if (char === ",") { - node = new FieldNode(node.parent.parent.parent); - } else if (char === "}") { - node = node.parent.parent.parent.parent.parent; - } else if (char === "#") { - node = node.parent; - node.canConsumeValue = true; - } else { - node.value += char; - } - break; - // Values may be enclosed in curly braces. Curly braces may be used within - // the value but they must be balanced. - case "braced": - if (char === "}" && node.depth === 0) { - node = node.parent; - break; - } - if (char === "{") { - node.depth++; - } else if (char === "}") { - node.depth--; - } - node.value += char; - break; - // Values may be enclosed in double quotes. Curly braces may be used - // within quoted values but they must be balanced. - // - // To escape a double quote, surround it with braces `{"}`. - // https://web.archive.org/web/20210422110817/https://maverick.inria.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html - case "quoted": - if (char === '"' && node.depth === 0) { - node = node.parent; - break; - } - if (char === "{") { - node.depth++; - } else if (char === "}") { - node.depth--; - if (node.depth < 0) { - throw new BibTeXSyntaxError(input, node, i, line, column); - } - } - node.value += char; - break; + ); + } +}; + +// src/modifiers/formatPageRangeModifier.ts +var formatPageRangeModifier = { + condition: (fieldName) => fieldName === "pages", + modifyRenderedValue: (str) => { + let result = str; + for (let i = 0; i < 4; i++) { + result = result.replace(/(\d)\s*-\s*(\d)/g, "$1--$2"); } + return result; } - return rootNode; -} -function isWhitespace(string) { - return /^[ \t\n\r]*$/.test(string); -} -function isValidKeyCharacter(char) { - return !/[#%{}~$,]/.test(char); -} -function isValidFieldName(char) { - return !/[=,{}()[\]]/.test(char); -} -var BibTeXSyntaxError = class extends Error { - constructor(input, node, pos, line, column, hint) { +}; + +// src/modifiers/limitAuthorsModifier.ts +var limitAuthorsModifier = { + condition: (fieldName, options) => fieldName === "author" && options.maxAuthors ? options.maxAuthors : false, + modifyRenderedValue: (str, maxAuthors) => { + const authors = str.split(" and "); + if (authors.length > maxAuthors) { + return [...authors.slice(0, maxAuthors), "others"].join(" and "); + } + return str; + } +}; + +// src/modifiers/removeBracesModifier.ts +var removeBracesModifier = { + condition: (fieldName, options) => { var _a; - super( - `Line ${line}:${column}: Syntax Error in ${node.type} (${hint}) -${input.slice(Math.max(0, pos - 20), pos)}>>${input[pos]}<<${input.slice(pos + 1, pos + 20)}` + return Boolean( + (_a = options.removeBraces) == null ? void 0 : _a.some((f) => f.toLocaleLowerCase() === fieldName) ); - this.node = node; - this.line = line; - this.column = column; - this.hint = hint; - this.name = "Syntax Error"; - this.char = (_a = input[pos]) != null ? _a : ""; - } + }, + // TODO: memoize + modifyRenderedValue: (str) => stringifyLaTeX(flattenLaTeX(parseLaTeX(str))) +}; + +// src/modifiers/stripEnclosingBracesModifier.ts +var stripEnclosingBracesModifier = { + condition: (_, options) => Boolean(options.stripEnclosingBraces), + modifyRenderedValue: (str) => str.replace(/^\{([^{}]*)\}$/g, "$1") }; // src/sort.ts @@ -4592,13 +4619,51 @@ function sortEntryFields(entries, fieldOrder) { function tidy(input, options_ = {}) { const options = normalizeOptions(options_); const inputFixed = convertCRLF(input); - const ast = generateAST(inputFixed); - const entries = getEntries2(ast); - const warnings = getEntries2(ast).filter((entry) => !entry.key).map((entry) => ({ + const ast = parseBibTeX(inputFixed); + const entries = getEntries(ast); + const warnings = entries.filter((entry) => !entry.key).map((entry) => ({ code: "MISSING_KEY", message: `${entry.parent.command} entry does not have a citation key.` })); const cache = new Cache(options); + const valueModifiers = [ + encodeUrlsModifier, + limitAuthorsModifier, + escapeCharactersModifier, + dropAllCapsModifier, + formatPageRangeModifier, + abbreviateMonthsModifier, + stripEnclosingBracesModifier, + removeBracesModifier + ]; + for (const entry of entries) { + for (const field of entry.fields) { + for (const modifier of valueModifiers) { + const params = modifier.condition( + field.name.toLocaleLowerCase(), + options, + entry, + cache + ); + if (!params) continue; + if (modifier.modifyNode) { + modifier.modifyNode(field, params); + cache.invalidateEntryValue(entry, field.name); + } + for (const node of field.value.concat) { + if (node.type === "braced" || node.type === "quoted") { + if (modifier.modifyRenderedValue) { + const newValue = modifier.modifyRenderedValue(node.value, params); + if (newValue !== node.value) { + node.value = newValue; + cache.invalidateEntryValue(entry, field.name); + } + } + } + } + } + } + } const duplicates = checkForDuplicates( entries, cache, @@ -4615,11 +4680,11 @@ function tidy(input, options_ = {}) { const bibtex = formatBibtex(ast, options, newKeys); return { bibtex, warnings, count: entries.length }; } -function getEntries2(ast) { +function getEntries(ast) { return ast.children.filter(isEntryNode).map((node) => node.block); } -// src/cli/argsParser.ts +// src/parsers/argsParser.ts var OPTIONS_WITH_SORTED_VALUES = [ "--sort", "--sort-fields", diff --git a/docs/bundle.js b/docs/bundle.js index 12cf878..d241c44 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -6,4 +6,4 @@ * using `npm run build`. Edit files in './src' then rebuild. **/ -"use strict";(()=>{var yk=Object.create;var ma=Object.defineProperty;var xk=Object.getOwnPropertyDescriptor;var vk=Object.getOwnPropertyNames;var kk=Object.getPrototypeOf,Sk=Object.prototype.hasOwnProperty;var h=(r,e)=>ma(r,"name",{value:e,configurable:!0});var Q=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var wk=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of vk(e))!Sk.call(r,n)&&n!==t&&ma(r,n,{get:()=>e[n],enumerable:!(i=xk(e,n))||i.enumerable});return r};var Bs=(r,e,t)=>(t=r!=null?yk(kk(r)):{},wk(e||!r||!r.__esModule?ma(t,"default",{value:r,enumerable:!0}):t,r));var Ge=Q((ga,Jp)=>{"use strict";var nn=h(function(r){return r&&r.Math===Math&&r},"check");Jp.exports=nn(typeof globalThis=="object"&&globalThis)||nn(typeof window=="object"&&window)||nn(typeof self=="object"&&self)||nn(typeof global=="object"&&global)||nn(typeof ga=="object"&&ga)||function(){return this}()||Function("return this")()});var Xe=Q((vT,Gp)=>{"use strict";Gp.exports=function(r){try{return!!r()}catch(e){return!0}}});var Ke=Q((kT,Xp)=>{"use strict";var Fk=Xe();Xp.exports=!Fk(function(){return Object.defineProperty({},1,{get:h(function(){return 7},"get")})[1]!==7})});var Es=Q((wT,Kp)=>{"use strict";var Qk=Xe();Kp.exports=!Qk(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var Xt=Q((FT,Zp)=>{"use strict";var Bk=Es(),Cs=Function.prototype.call;Zp.exports=Bk?Cs.bind(Cs):function(){return Cs.apply(Cs,arguments)}});var rm=Q(im=>{"use strict";var em={}.propertyIsEnumerable,tm=Object.getOwnPropertyDescriptor,Ek=tm&&!em.call({1:2},1);im.f=Ek?h(function(e){var t=tm(this,e);return!!t&&t.enumerable},"propertyIsEnumerable"):em});var sr=Q((ET,nm)=>{"use strict";nm.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var Ne=Q((CT,lm)=>{"use strict";var sm=Es(),om=Function.prototype,ba=om.call,Ck=sm&&om.bind.bind(ba,ba);lm.exports=sm?Ck:function(r){return function(){return ba.apply(r,arguments)}}});var sn=Q((UT,hm)=>{"use strict";var am=Ne(),Uk=am({}.toString),Lk=am("".slice);hm.exports=function(r){return Lk(Uk(r),8,-1)}});var fm=Q((LT,cm)=>{"use strict";var Ok=Ne(),_k=Xe(),Tk=sn(),ya=Object,Dk=Ok("".split);cm.exports=_k(function(){return!ya("z").propertyIsEnumerable(0)})?function(r){return Tk(r)==="String"?Dk(r,""):ya(r)}:ya});var Us=Q((OT,um)=>{"use strict";um.exports=function(r){return r==null}});var on=Q((_T,dm)=>{"use strict";var Nk=Us(),Rk=TypeError;dm.exports=function(r){if(Nk(r))throw new Rk("Can't call method on "+r);return r}});var or=Q((TT,pm)=>{"use strict";var Ak=fm(),Mk=on();pm.exports=function(r){return Ak(Mk(r))}});var Re=Q((DT,mm)=>{"use strict";var xa=typeof document=="object"&&document.all;mm.exports=typeof xa>"u"&&xa!==void 0?function(r){return typeof r=="function"||r===xa}:function(r){return typeof r=="function"}});var Ft=Q((NT,gm)=>{"use strict";var Pk=Re();gm.exports=function(r){return typeof r=="object"?r!==null:Pk(r)}});var lr=Q((RT,bm)=>{"use strict";var va=Ge(),Ik=Re(),$k=h(function(r){return Ik(r)?r:void 0},"aFunction");bm.exports=function(r,e){return arguments.length<2?$k(va[r]):va[r]&&va[r][e]}});var Ls=Q((MT,ym)=>{"use strict";var qk=Ne();ym.exports=qk({}.isPrototypeOf)});var Sm=Q((PT,km)=>{"use strict";var Vk=Ge(),xm=Vk.navigator,vm=xm&&xm.userAgent;km.exports=vm?String(vm):""});var Um=Q((IT,Cm)=>{"use strict";var Em=Ge(),ka=Sm(),wm=Em.process,Fm=Em.Deno,Qm=wm&&wm.versions||Fm&&Fm.version,Bm=Qm&&Qm.v8,Qt,Os;Bm&&(Qt=Bm.split("."),Os=Qt[0]>0&&Qt[0]<4?1:+(Qt[0]+Qt[1]));!Os&&ka&&(Qt=ka.match(/Edge\/(\d+)/),(!Qt||Qt[1]>=74)&&(Qt=ka.match(/Chrome\/(\d+)/),Qt&&(Os=+Qt[1])));Cm.exports=Os});var Sa=Q(($T,Om)=>{"use strict";var Lm=Um(),zk=Xe(),Wk=Ge(),jk=Wk.String;Om.exports=!!Object.getOwnPropertySymbols&&!zk(function(){var r=Symbol("symbol detection");return!jk(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Lm&&Lm<41})});var wa=Q((qT,_m)=>{"use strict";var Hk=Sa();_m.exports=Hk&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Fa=Q((VT,Tm)=>{"use strict";var Yk=lr(),Jk=Re(),Gk=Ls(),Xk=wa(),Kk=Object;Tm.exports=Xk?function(r){return typeof r=="symbol"}:function(r){var e=Yk("Symbol");return Jk(e)&&Gk(e.prototype,Kk(r))}});var _s=Q((zT,Dm)=>{"use strict";var Zk=String;Dm.exports=function(r){try{return Zk(r)}catch(e){return"Object"}}});var ar=Q((WT,Nm)=>{"use strict";var eS=Re(),tS=_s(),iS=TypeError;Nm.exports=function(r){if(eS(r))return r;throw new iS(tS(r)+" is not a function")}});var Ts=Q((jT,Rm)=>{"use strict";var rS=ar(),nS=Us();Rm.exports=function(r,e){var t=r[e];return nS(t)?void 0:rS(t)}});var Mm=Q((HT,Am)=>{"use strict";var Qa=Xt(),Ba=Re(),Ea=Ft(),sS=TypeError;Am.exports=function(r,e){var t,i;if(e==="string"&&Ba(t=r.toString)&&!Ea(i=Qa(t,r))||Ba(t=r.valueOf)&&!Ea(i=Qa(t,r))||e!=="string"&&Ba(t=r.toString)&&!Ea(i=Qa(t,r)))return i;throw new sS("Can't convert object to primitive value")}});var hr=Q((YT,Pm)=>{"use strict";Pm.exports=!1});var Ds=Q((JT,$m)=>{"use strict";var Im=Ge(),oS=Object.defineProperty;$m.exports=function(r,e){try{oS(Im,r,{value:e,configurable:!0,writable:!0})}catch(t){Im[r]=e}return e}});var Ns=Q((GT,zm)=>{"use strict";var lS=hr(),aS=Ge(),hS=Ds(),qm="__core-js_shared__",Vm=zm.exports=aS[qm]||hS(qm,{});(Vm.versions||(Vm.versions=[])).push({version:"3.38.1",mode:lS?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})});var Ca=Q((XT,jm)=>{"use strict";var Wm=Ns();jm.exports=function(r,e){return Wm[r]||(Wm[r]=e||{})}});var Rs=Q((KT,Hm)=>{"use strict";var cS=on(),fS=Object;Hm.exports=function(r){return fS(cS(r))}});var Bt=Q((ZT,Ym)=>{"use strict";var uS=Ne(),dS=Rs(),pS=uS({}.hasOwnProperty);Ym.exports=Object.hasOwn||h(function(e,t){return pS(dS(e),t)},"hasOwn")});var Ua=Q((tD,Jm)=>{"use strict";var mS=Ne(),gS=0,bS=Math.random(),yS=mS(1 .toString);Jm.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+yS(++gS+bS,36)}});var st=Q((iD,Xm)=>{"use strict";var xS=Ge(),vS=Ca(),Gm=Bt(),kS=Ua(),SS=Sa(),wS=wa(),cr=xS.Symbol,La=vS("wks"),FS=wS?cr.for||cr:cr&&cr.withoutSetter||kS;Xm.exports=function(r){return Gm(La,r)||(La[r]=SS&&Gm(cr,r)?cr[r]:FS("Symbol."+r)),La[r]}});var tg=Q((rD,eg)=>{"use strict";var QS=Xt(),Km=Ft(),Zm=Fa(),BS=Ts(),ES=Mm(),CS=st(),US=TypeError,LS=CS("toPrimitive");eg.exports=function(r,e){if(!Km(r)||Zm(r))return r;var t=BS(r,LS),i;if(t){if(e===void 0&&(e="default"),i=QS(t,r,e),!Km(i)||Zm(i))return i;throw new US("Can't convert object to primitive value")}return e===void 0&&(e="number"),ES(r,e)}});var Oa=Q((nD,ig)=>{"use strict";var OS=tg(),_S=Fa();ig.exports=function(r){var e=OS(r,"string");return _S(e)?e:e+""}});var Ta=Q((sD,ng)=>{"use strict";var TS=Ge(),rg=Ft(),_a=TS.document,DS=rg(_a)&&rg(_a.createElement);ng.exports=function(r){return DS?_a.createElement(r):{}}});var Da=Q((oD,sg)=>{"use strict";var NS=Ke(),RS=Xe(),AS=Ta();sg.exports=!NS&&!RS(function(){return Object.defineProperty(AS("div"),"a",{get:h(function(){return 7},"get")}).a!==7})});var Na=Q(lg=>{"use strict";var MS=Ke(),PS=Xt(),IS=rm(),$S=sr(),qS=or(),VS=Oa(),zS=Bt(),WS=Da(),og=Object.getOwnPropertyDescriptor;lg.f=MS?og:h(function(e,t){if(e=qS(e),t=VS(t),WS)try{return og(e,t)}catch(i){}if(zS(e,t))return $S(!PS(IS.f,e,t),e[t])},"getOwnPropertyDescriptor")});var Ra=Q((cD,ag)=>{"use strict";var jS=Ke(),HS=Xe();ag.exports=jS&&HS(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Kt=Q((fD,hg)=>{"use strict";var YS=Ft(),JS=String,GS=TypeError;hg.exports=function(r){if(YS(r))return r;throw new GS(JS(r)+" is not an object")}});var Rt=Q(fg=>{"use strict";var XS=Ke(),KS=Da(),ZS=Ra(),As=Kt(),cg=Oa(),ew=TypeError,Aa=Object.defineProperty,tw=Object.getOwnPropertyDescriptor,Ma="enumerable",Pa="configurable",Ia="writable";fg.f=XS?ZS?h(function(e,t,i){if(As(e),t=cg(t),As(i),typeof e=="function"&&t==="prototype"&&"value"in i&&Ia in i&&!i[Ia]){var n=tw(e,t);n&&n[Ia]&&(e[t]=i.value,i={configurable:Pa in i?i[Pa]:n[Pa],enumerable:Ma in i?i[Ma]:n[Ma],writable:!1})}return Aa(e,t,i)},"defineProperty"):Aa:h(function(e,t,i){if(As(e),t=cg(t),As(i),KS)try{return Aa(e,t,i)}catch(n){}if("get"in i||"set"in i)throw new ew("Accessors not supported");return"value"in i&&(e[t]=i.value),e},"defineProperty")});var Ms=Q((pD,ug)=>{"use strict";var iw=Ke(),rw=Rt(),nw=sr();ug.exports=iw?function(r,e,t){return rw.f(r,e,nw(1,t))}:function(r,e,t){return r[e]=t,r}});var Ps=Q((mD,pg)=>{"use strict";var $a=Ke(),sw=Bt(),dg=Function.prototype,ow=$a&&Object.getOwnPropertyDescriptor,qa=sw(dg,"name"),lw=qa&&h(function(){},"something").name==="something",aw=qa&&(!$a||$a&&ow(dg,"name").configurable);pg.exports={EXISTS:qa,PROPER:lw,CONFIGURABLE:aw}});var za=Q((bD,mg)=>{"use strict";var hw=Ne(),cw=Re(),Va=Ns(),fw=hw(Function.toString);cw(Va.inspectSource)||(Va.inspectSource=function(r){return fw(r)});mg.exports=Va.inspectSource});var yg=Q((yD,bg)=>{"use strict";var uw=Ge(),dw=Re(),gg=uw.WeakMap;bg.exports=dw(gg)&&/native code/.test(String(gg))});var Is=Q((xD,vg)=>{"use strict";var pw=Ca(),mw=Ua(),xg=pw("keys");vg.exports=function(r){return xg[r]||(xg[r]=mw(r))}});var $s=Q((vD,kg)=>{"use strict";kg.exports={}});var zs=Q((kD,Fg)=>{"use strict";var gw=yg(),wg=Ge(),bw=Ft(),yw=Ms(),Wa=Bt(),ja=Ns(),xw=Is(),vw=$s(),Sg="Object already initialized",Ha=wg.TypeError,kw=wg.WeakMap,qs,ln,Vs,Sw=h(function(r){return Vs(r)?ln(r):qs(r,{})},"enforce"),ww=h(function(r){return function(e){var t;if(!bw(e)||(t=ln(e)).type!==r)throw new Ha("Incompatible receiver, "+r+" required");return t}},"getterFor");gw||ja.state?(Et=ja.state||(ja.state=new kw),Et.get=Et.get,Et.has=Et.has,Et.set=Et.set,qs=h(function(r,e){if(Et.has(r))throw new Ha(Sg);return e.facade=r,Et.set(r,e),e},"set"),ln=h(function(r){return Et.get(r)||{}},"get"),Vs=h(function(r){return Et.has(r)},"has")):(Ui=xw("state"),vw[Ui]=!0,qs=h(function(r,e){if(Wa(r,Ui))throw new Ha(Sg);return e.facade=r,yw(r,Ui,e),e},"set"),ln=h(function(r){return Wa(r,Ui)?r[Ui]:{}},"get"),Vs=h(function(r){return Wa(r,Ui)},"has"));var Et,Ui;Fg.exports={set:qs,get:ln,has:Vs,enforce:Sw,getterFor:ww}});var Ga=Q((wD,Eg)=>{"use strict";var Ja=Ne(),Fw=Xe(),Qw=Re(),Ws=Bt(),Ya=Ke(),Bw=Ps().CONFIGURABLE,Ew=za(),Bg=zs(),Cw=Bg.enforce,Uw=Bg.get,Qg=String,js=Object.defineProperty,Lw=Ja("".slice),Ow=Ja("".replace),_w=Ja([].join),Tw=Ya&&!Fw(function(){return js(function(){},"length",{value:8}).length!==8}),Dw=String(String).split("String"),Nw=Eg.exports=function(r,e,t){Lw(Qg(e),0,7)==="Symbol("&&(e="["+Ow(Qg(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Ws(r,"name")||Bw&&r.name!==e)&&(Ya?js(r,"name",{value:e,configurable:!0}):r.name=e),Tw&&t&&Ws(t,"arity")&&r.length!==t.arity&&js(r,"length",{value:t.arity});try{t&&Ws(t,"constructor")&&t.constructor?Ya&&js(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(n){}var i=Cw(r);return Ws(i,"source")||(i.source=_w(Dw,typeof e=="string"?e:"")),r};Function.prototype.toString=Nw(h(function(){return Qw(this)&&Uw(this).source||Ew(this)},"toString"),"toString")});var fr=Q((QD,Cg)=>{"use strict";var Rw=Re(),Aw=Rt(),Mw=Ga(),Pw=Ds();Cg.exports=function(r,e,t,i){i||(i={});var n=i.enumerable,s=i.name!==void 0?i.name:e;if(Rw(t)&&Mw(t,s,i),i.global)n?r[e]=t:Pw(e,t);else{try{i.unsafe?r[e]&&(n=!0):delete r[e]}catch(o){}n?r[e]=t:Aw.f(r,e,{value:t,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return r}});var Lg=Q((BD,Ug)=>{"use strict";var Iw=Math.ceil,$w=Math.floor;Ug.exports=Math.trunc||h(function(e){var t=+e;return(t>0?$w:Iw)(t)},"trunc")});var Xa=Q((CD,Og)=>{"use strict";var qw=Lg();Og.exports=function(r){var e=+r;return e!==e||e===0?0:qw(e)}});var Ka=Q((UD,_g)=>{"use strict";var Vw=Xa(),zw=Math.max,Ww=Math.min;_g.exports=function(r,e){var t=Vw(r);return t<0?zw(t+e,0):Ww(t,e)}});var Dg=Q((LD,Tg)=>{"use strict";var jw=Xa(),Hw=Math.min;Tg.exports=function(r){var e=jw(r);return e>0?Hw(e,9007199254740991):0}});var an=Q((OD,Ng)=>{"use strict";var Yw=Dg();Ng.exports=function(r){return Yw(r.length)}});var Mg=Q((_D,Ag)=>{"use strict";var Jw=or(),Gw=Ka(),Xw=an(),Rg=h(function(r){return function(e,t,i){var n=Jw(e),s=Xw(n);if(s===0)return!r&&-1;var o=Gw(i,s),l;if(r&&t!==t){for(;s>o;)if(l=n[o++],l!==l)return!0}else for(;s>o;o++)if((r||o in n)&&n[o]===t)return r||o||0;return!r&&-1}},"createMethod");Ag.exports={includes:Rg(!0),indexOf:Rg(!1)}});var eh=Q((DD,Ig)=>{"use strict";var Kw=Ne(),Za=Bt(),Zw=or(),eF=Mg().indexOf,tF=$s(),Pg=Kw([].push);Ig.exports=function(r,e){var t=Zw(r),i=0,n=[],s;for(s in t)!Za(tF,s)&&Za(t,s)&&Pg(n,s);for(;e.length>i;)Za(t,s=e[i++])&&(~eF(n,s)||Pg(n,s));return n}});var Hs=Q((ND,$g)=>{"use strict";$g.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Vg=Q(qg=>{"use strict";var iF=eh(),rF=Hs(),nF=rF.concat("length","prototype");qg.f=Object.getOwnPropertyNames||h(function(e){return iF(e,nF)},"getOwnPropertyNames")});var Wg=Q(zg=>{"use strict";zg.f=Object.getOwnPropertySymbols});var Hg=Q((PD,jg)=>{"use strict";var sF=lr(),oF=Ne(),lF=Vg(),aF=Wg(),hF=Kt(),cF=oF([].concat);jg.exports=sF("Reflect","ownKeys")||h(function(e){var t=lF.f(hF(e)),i=aF.f;return i?cF(t,i(e)):t},"ownKeys")});var Gg=Q(($D,Jg)=>{"use strict";var Yg=Bt(),fF=Hg(),uF=Na(),dF=Rt();Jg.exports=function(r,e,t){for(var i=fF(e),n=dF.f,s=uF.f,o=0;o{"use strict";var pF=Xe(),mF=Re(),gF=/#|\.prototype\./,hn=h(function(r,e){var t=yF[bF(r)];return t===vF?!0:t===xF?!1:mF(e)?pF(e):!!e},"isForced"),bF=hn.normalize=function(r){return String(r).replace(gF,".").toLowerCase()},yF=hn.data={},xF=hn.NATIVE="N",vF=hn.POLYFILL="P";Xg.exports=hn});var hi=Q((zD,Zg)=>{"use strict";var Ys=Ge(),kF=Na().f,SF=Ms(),wF=fr(),FF=Ds(),QF=Gg(),BF=Kg();Zg.exports=function(r,e){var t=r.target,i=r.global,n=r.stat,s,o,l,a,c,f;if(i?o=Ys:n?o=Ys[t]||FF(t,{}):o=Ys[t]&&Ys[t].prototype,o)for(l in e){if(c=e[l],r.dontCallGetSet?(f=kF(o,l),a=f&&f.value):a=o[l],s=BF(i?l:t+(n?".":"#")+l,r.forced),!s&&a!==void 0){if(typeof c==typeof a)continue;QF(c,a)}(r.sham||a&&a.sham)&&SF(c,"sham",!0),wF(o,l,c,r)}}});var th=Q((WD,e0)=>{"use strict";var EF=sn();e0.exports=Array.isArray||h(function(e){return EF(e)==="Array"},"isArray")});var i0=Q((HD,t0)=>{"use strict";var CF=TypeError,UF=9007199254740991;t0.exports=function(r){if(r>UF)throw CF("Maximum allowed index exceeded");return r}});var n0=Q((YD,r0)=>{"use strict";var LF=sn(),OF=Ne();r0.exports=function(r){if(LF(r)==="Function")return OF(r)}});var Js=Q((JD,o0)=>{"use strict";var s0=n0(),_F=ar(),TF=Es(),DF=s0(s0.bind);o0.exports=function(r,e){return _F(r),e===void 0?r:TF?DF(r,e):function(){return r.apply(e,arguments)}}});var h0=Q((GD,a0)=>{"use strict";var NF=th(),RF=an(),AF=i0(),MF=Js(),l0=h(function(r,e,t,i,n,s,o,l){for(var a=n,c=0,f=o?MF(o,l):!1,u,d;c0&&NF(u)?(d=RF(u),a=l0(r,e,u,d,a,s-1)-1):(AF(a+1),r[a]=u),a++),c++;return a},"flattenIntoArray");a0.exports=l0});var u0=Q((KD,f0)=>{"use strict";var PF=st(),IF=PF("toStringTag"),c0={};c0[IF]="z";f0.exports=String(c0)==="[object z]"});var cn=Q((ZD,d0)=>{"use strict";var $F=u0(),qF=Re(),Gs=sn(),VF=st(),zF=VF("toStringTag"),WF=Object,jF=Gs(function(){return arguments}())==="Arguments",HF=h(function(r,e){try{return r[e]}catch(t){}},"tryGet");d0.exports=$F?Gs:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=HF(e=WF(r),zF))=="string"?t:jF?Gs(e):(i=Gs(e))==="Object"&&qF(e.callee)?"Arguments":i}});var x0=Q((t4,y0)=>{"use strict";var YF=Ne(),JF=Xe(),p0=Re(),GF=cn(),XF=lr(),KF=za(),m0=h(function(){},"noop"),g0=XF("Reflect","construct"),ih=/^\s*(?:class|function)\b/,ZF=YF(ih.exec),eQ=!ih.test(m0),fn=h(function(e){if(!p0(e))return!1;try{return g0(m0,[],e),!0}catch(t){return!1}},"isConstructor"),b0=h(function(e){if(!p0(e))return!1;switch(GF(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return eQ||!!ZF(ih,KF(e))}catch(t){return!0}},"isConstructor");b0.sham=!0;y0.exports=!g0||JF(function(){var r;return fn(fn.call)||!fn(Object)||!fn(function(){r=!0})||r})?b0:fn});var w0=Q((r4,S0)=>{"use strict";var v0=th(),tQ=x0(),iQ=Ft(),rQ=st(),nQ=rQ("species"),k0=Array;S0.exports=function(r){var e;return v0(r)&&(e=r.constructor,tQ(e)&&(e===k0||v0(e.prototype))?e=void 0:iQ(e)&&(e=e[nQ],e===null&&(e=void 0))),e===void 0?k0:e}});var Q0=Q((n4,F0)=>{"use strict";var sQ=w0();F0.exports=function(r,e){return new(sQ(r))(e===0?0:e)}});var B0=Q(()=>{"use strict";var oQ=hi(),lQ=h0(),aQ=ar(),hQ=Rs(),cQ=an(),fQ=Q0();oQ({target:"Array",proto:!0},{flatMap:h(function(e){var t=hQ(this),i=cQ(t),n;return aQ(e),n=fQ(t,0),n.length=lQ(n,t,t,i,0,1,e,arguments.length>1?arguments[1]:void 0),n},"flatMap")})});var ur=Q((a4,E0)=>{"use strict";E0.exports={}});var U0=Q((h4,C0)=>{"use strict";var uQ=st(),dQ=ur(),pQ=uQ("iterator"),mQ=Array.prototype;C0.exports=function(r){return r!==void 0&&(dQ.Array===r||mQ[pQ]===r)}});var Xs=Q((c4,O0)=>{"use strict";var gQ=cn(),L0=Ts(),bQ=Us(),yQ=ur(),xQ=st(),vQ=xQ("iterator");O0.exports=function(r){if(!bQ(r))return L0(r,vQ)||L0(r,"@@iterator")||yQ[gQ(r)]}});var rh=Q((f4,_0)=>{"use strict";var kQ=Xt(),SQ=ar(),wQ=Kt(),FQ=_s(),QQ=Xs(),BQ=TypeError;_0.exports=function(r,e){var t=arguments.length<2?QQ(r):e;if(SQ(t))return wQ(kQ(t,r));throw new BQ(FQ(r)+" is not iterable")}});var N0=Q((u4,D0)=>{"use strict";var EQ=Xt(),T0=Kt(),CQ=Ts();D0.exports=function(r,e,t){var i,n;T0(r);try{if(i=CQ(r,"return"),!i){if(e==="throw")throw t;return t}i=EQ(i,r)}catch(s){n=!0,i=s}if(e==="throw")throw t;if(n)throw i;return T0(i),t}});var I0=Q((d4,P0)=>{"use strict";var UQ=Js(),LQ=Xt(),OQ=Kt(),_Q=_s(),TQ=U0(),DQ=an(),R0=Ls(),NQ=rh(),RQ=Xs(),A0=N0(),AQ=TypeError,Ks=h(function(r,e){this.stopped=r,this.result=e},"Result"),M0=Ks.prototype;P0.exports=function(r,e,t){var i=t&&t.that,n=!!(t&&t.AS_ENTRIES),s=!!(t&&t.IS_RECORD),o=!!(t&&t.IS_ITERATOR),l=!!(t&&t.INTERRUPTED),a=UQ(e,i),c,f,u,d,p,m,y,g=h(function(x){return c&&A0(c,"normal",x),new Ks(!0,x)},"stop"),b=h(function(x){return n?(OQ(x),l?a(x[0],x[1],g):a(x[0],x[1])):l?a(x,g):a(x)},"callFn");if(s)c=r.iterator;else if(o)c=r;else{if(f=RQ(r),!f)throw new AQ(_Q(r)+" is not iterable");if(TQ(f)){for(u=0,d=DQ(r);d>u;u++)if(p=b(r[u]),p&&R0(M0,p))return p;return new Ks(!1)}c=NQ(r,f)}for(m=s?r.next:c.next;!(y=LQ(m,c)).done;){try{p=b(y.value)}catch(x){A0(c,"throw",x)}if(typeof p=="object"&&p&&R0(M0,p))return p}return new Ks(!1)}});var q0=Q((m4,$0)=>{"use strict";var MQ=Ke(),PQ=Rt(),IQ=sr();$0.exports=function(r,e,t){MQ?PQ.f(r,e,IQ(0,t)):r[e]=t}});var V0=Q(()=>{"use strict";var $Q=hi(),qQ=I0(),VQ=q0();$Q({target:"Object",stat:!0},{fromEntries:h(function(e){var t={};return qQ(e,function(i,n){VQ(t,i,n)},{AS_ENTRIES:!0}),t},"fromEntries")})});var nh=Q((x4,z0)=>{"use strict";var zQ=cn(),WQ=String;z0.exports=function(r){if(zQ(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return WQ(r)}});var sh=Q((v4,W0)=>{"use strict";W0.exports=" \n\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"});var Y0=Q((k4,H0)=>{"use strict";var jQ=Ne(),HQ=on(),YQ=nh(),lh=sh(),j0=jQ("".replace),JQ=RegExp("^["+lh+"]+"),GQ=RegExp("(^|[^"+lh+"])["+lh+"]+$"),oh=h(function(r){return function(e){var t=YQ(HQ(e));return r&1&&(t=j0(t,JQ,"")),r&2&&(t=j0(t,GQ,"$1")),t}},"createMethod");H0.exports={start:oh(1),end:oh(2),trim:oh(3)}});var K0=Q((w4,X0)=>{"use strict";var XQ=Ps().PROPER,KQ=Xe(),J0=sh(),G0="\u200B\x85\u180E";X0.exports=function(r){return KQ(function(){return!!J0[r]()||G0[r]()!==G0||XQ&&J0[r].name!==r})}});var ah=Q((F4,Z0)=>{"use strict";var ZQ=Y0().end,eB=K0();Z0.exports=eB("trimEnd")?h(function(){return ZQ(this)},"trimEnd"):"".trimEnd});var tb=Q(()=>{"use strict";var tB=hi(),eb=ah();tB({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==eb},{trimRight:eb})});var rb=Q(()=>{"use strict";tb();var iB=hi(),ib=ah();iB({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==ib},{trimEnd:ib})});var sb=Q((L4,nb)=>{"use strict";var rB=eh(),nB=Hs();nb.exports=Object.keys||h(function(e){return rB(e,nB)},"keys")});var lb=Q(ob=>{"use strict";var sB=Ke(),oB=Ra(),lB=Rt(),aB=Kt(),hB=or(),cB=sb();ob.f=sB&&!oB?Object.defineProperties:h(function(e,t){aB(e);for(var i=hB(t),n=cB(t),s=n.length,o=0,l;s>o;)lB.f(e,l=n[o++],i[l]);return e},"defineProperties")});var hb=Q((D4,ab)=>{"use strict";var fB=lr();ab.exports=fB("document","documentElement")});var un=Q((N4,gb)=>{"use strict";var uB=Kt(),dB=lb(),cb=Hs(),pB=$s(),mB=hb(),gB=Ta(),bB=Is(),fb=">",ub="<",ch="prototype",fh="script",pb=bB("IE_PROTO"),hh=h(function(){},"EmptyConstructor"),mb=h(function(r){return ub+fh+fb+r+ub+"/"+fh+fb},"scriptTag"),db=h(function(r){r.write(mb("")),r.close();var e=r.parentWindow.Object;return r=null,e},"NullProtoObjectViaActiveX"),yB=h(function(){var r=gB("iframe"),e="java"+fh+":",t;return r.style.display="none",mB.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(mb("document.F=Object")),t.close(),t.F},"NullProtoObjectViaIFrame"),Zs,eo=h(function(){try{Zs=new ActiveXObject("htmlfile")}catch(e){}eo=typeof document<"u"?document.domain&&Zs?db(Zs):yB():db(Zs);for(var r=cb.length;r--;)delete eo[ch][cb[r]];return eo()},"NullProtoObject");pB[pb]=!0;gb.exports=Object.create||h(function(e,t){var i;return e!==null?(hh[ch]=uB(e),i=new hh,hh[ch]=null,i[pb]=e):i=eo(),t===void 0?i:dB.f(i,t)},"create")});var yb=Q((A4,bb)=>{"use strict";var xB=st(),vB=un(),kB=Rt().f,uh=xB("unscopables"),dh=Array.prototype;dh[uh]===void 0&&kB(dh,uh,{configurable:!0,value:vB(null)});bb.exports=function(r){dh[uh][r]=!0}});var vb=Q((M4,xb)=>{"use strict";var SB=Xe();xb.exports=!SB(function(){function r(){}return h(r,"F"),r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var mh=Q((I4,Sb)=>{"use strict";var wB=Bt(),FB=Re(),QB=Rs(),BB=Is(),EB=vb(),kb=BB("IE_PROTO"),ph=Object,CB=ph.prototype;Sb.exports=EB?ph.getPrototypeOf:function(r){var e=QB(r);if(wB(e,kb))return e[kb];var t=e.constructor;return FB(t)&&e instanceof t?t.prototype:e instanceof ph?CB:null}});var xh=Q(($4,Qb)=>{"use strict";var UB=Xe(),LB=Re(),OB=Ft(),_B=un(),wb=mh(),TB=fr(),DB=st(),NB=hr(),yh=DB("iterator"),Fb=!1,Zt,gh,bh;[].keys&&(bh=[].keys(),"next"in bh?(gh=wb(wb(bh)),gh!==Object.prototype&&(Zt=gh)):Fb=!0);var RB=!OB(Zt)||UB(function(){var r={};return Zt[yh].call(r)!==r});RB?Zt={}:NB&&(Zt=_B(Zt));LB(Zt[yh])||TB(Zt,yh,function(){return this});Qb.exports={IteratorPrototype:Zt,BUGGY_SAFARI_ITERATORS:Fb}});var to=Q((q4,Eb)=>{"use strict";var AB=Rt().f,MB=Bt(),PB=st(),Bb=PB("toStringTag");Eb.exports=function(r,e,t){r&&!t&&(r=r.prototype),r&&!MB(r,Bb)&&AB(r,Bb,{configurable:!0,value:e})}});var vh=Q((V4,Cb)=>{"use strict";var IB=xh().IteratorPrototype,$B=un(),qB=sr(),VB=to(),zB=ur(),WB=h(function(){return this},"returnThis");Cb.exports=function(r,e,t,i){var n=e+" Iterator";return r.prototype=$B(IB,{next:qB(+!i,t)}),VB(r,n,!1,!0),zB[n]=WB,r}});var Lb=Q((W4,Ub)=>{"use strict";var jB=Ne(),HB=ar();Ub.exports=function(r,e,t){try{return jB(HB(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var _b=Q((j4,Ob)=>{"use strict";var YB=Ft();Ob.exports=function(r){return YB(r)||r===null}});var Db=Q((H4,Tb)=>{"use strict";var JB=_b(),GB=String,XB=TypeError;Tb.exports=function(r){if(JB(r))return r;throw new XB("Can't set "+GB(r)+" as a prototype")}});var Rb=Q((Y4,Nb)=>{"use strict";var KB=Lb(),ZB=Ft(),eE=on(),tE=Db();Nb.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=KB(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return h(function(n,s){return eE(n),tE(s),ZB(n)&&(r?t(n,s):n.__proto__=s),n},"setPrototypeOf")}():void 0)});var Hb=Q((G4,jb)=>{"use strict";var iE=hi(),rE=Xt(),io=hr(),zb=Ps(),nE=Re(),sE=vh(),Ab=mh(),Mb=Rb(),oE=to(),lE=Ms(),kh=fr(),aE=st(),Pb=ur(),Wb=xh(),hE=zb.PROPER,cE=zb.CONFIGURABLE,Ib=Wb.IteratorPrototype,ro=Wb.BUGGY_SAFARI_ITERATORS,dn=aE("iterator"),$b="keys",pn="values",qb="entries",Vb=h(function(){return this},"returnThis");jb.exports=function(r,e,t,i,n,s,o){sE(t,e,i);var l=h(function(b){if(b===n&&d)return d;if(!ro&&b&&b in f)return f[b];switch(b){case $b:return h(function(){return new t(this,b)},"keys");case pn:return h(function(){return new t(this,b)},"values");case qb:return h(function(){return new t(this,b)},"entries")}return function(){return new t(this)}},"getIterationMethod"),a=e+" Iterator",c=!1,f=r.prototype,u=f[dn]||f["@@iterator"]||n&&f[n],d=!ro&&u||l(n),p=e==="Array"&&f.entries||u,m,y,g;if(p&&(m=Ab(p.call(new r)),m!==Object.prototype&&m.next&&(!io&&Ab(m)!==Ib&&(Mb?Mb(m,Ib):nE(m[dn])||kh(m,dn,Vb)),oE(m,a,!0,!0),io&&(Pb[a]=Vb))),hE&&n===pn&&u&&u.name!==pn&&(!io&&cE?lE(f,"name",pn):(c=!0,d=h(function(){return rE(u,this)},"values"))),n)if(y={values:l(pn),keys:s?d:l($b),entries:l(qb)},o)for(g in y)(ro||c||!(g in f))&&kh(f,g,y[g]);else iE({target:e,proto:!0,forced:ro||c},y);return(!io||o)&&f[dn]!==d&&kh(f,dn,d,{name:n}),Pb[e]=d,y}});var Sh=Q((K4,Yb)=>{"use strict";Yb.exports=function(r,e){return{value:r,done:e}}});var ey=Q((Z4,Zb)=>{"use strict";var fE=or(),wh=yb(),Jb=ur(),Xb=zs(),uE=Rt().f,dE=Hb(),no=Sh(),pE=hr(),mE=Ke(),Kb="Array Iterator",gE=Xb.set,bE=Xb.getterFor(Kb);Zb.exports=dE(Array,"Array",function(r,e){gE(this,{type:Kb,target:fE(r),index:0,kind:e})},function(){var r=bE(this),e=r.target,t=r.index++;if(!e||t>=e.length)return r.target=null,no(void 0,!0);switch(r.kind){case"keys":return no(t,!1);case"values":return no(e[t],!1)}return no([t,e[t]],!1)},"values");var Gb=Jb.Arguments=Jb.Array;wh("keys");wh("values");wh("entries");if(!pE&&mE&&Gb.name!=="values")try{uE(Gb,"name",{value:"values"})}catch(r){}});var ry=Q(()=>{"use strict";var yE=hi(),xE=Ne(),vE=Ka(),kE=RangeError,ty=String.fromCharCode,iy=String.fromCodePoint,SE=xE([].join),wE=!!iy&&iy.length!==1;yE({target:"String",stat:!0,arity:1,forced:wE},{fromCodePoint:h(function(e){for(var t=[],i=arguments.length,n=0,s;i>n;){if(s=+arguments[n++],vE(s,1114111)!==s)throw new kE(s+" is not a valid code point");t[n]=s<65536?ty(s):ty(((s-=65536)>>10)+55296,s%1024+56320)}return SE(t,"")},"fromCodePoint")})});var oy=Q((rN,sy)=>{"use strict";var ny=Ge(),FE=Ke(),QE=Object.getOwnPropertyDescriptor;sy.exports=function(r){if(!FE)return ny[r];var e=QE(ny,r);return e&&e.value}});var hy=Q((nN,ay)=>{"use strict";var BE=Xe(),EE=st(),CE=Ke(),ly=hr(),UE=EE("iterator");ay.exports=!BE(function(){var r=new URL("b?a=1&b=2&c=3","https://a"),e=r.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),i="";return r.pathname="c%20d",e.forEach(function(n,s){e.delete("b"),i+=s+n}),t.delete("a",2),t.delete("b",void 0),ly&&(!r.toJSON||!t.has("a",1)||t.has("a",2)||!t.has("a",void 0)||t.has("b"))||!e.size&&(ly||!CE)||!e.sort||r.href!=="https://a/c%20d?a=1&c=3"||e.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!e[UE]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||i!=="a1c3"||new URL("https://x",void 0).host!=="x"})});var uy=Q((sN,fy)=>{"use strict";var cy=Ga(),LE=Rt();fy.exports=function(r,e,t){return t.get&&cy(t.get,e,{getter:!0}),t.set&&cy(t.set,e,{setter:!0}),LE.f(r,e,t)}});var py=Q((oN,dy)=>{"use strict";var OE=fr();dy.exports=function(r,e,t){for(var i in e)OE(r,i,e[i],t);return r}});var gy=Q((lN,my)=>{"use strict";var _E=Ls(),TE=TypeError;my.exports=function(r,e){if(_E(e,r))return r;throw new TE("Incorrect invocation")}});var yy=Q((aN,by)=>{"use strict";var DE=TypeError;by.exports=function(r,e){if(r{"use strict";var NE=Ne();xy.exports=NE([].slice)});var wy=Q((cN,Sy)=>{"use strict";var ky=vy(),RE=Math.floor,Fh=h(function(r,e){var t=r.length;if(t<8)for(var i=1,n,s;i0;)r[s]=r[--s];s!==i++&&(r[s]=n)}else for(var o=RE(t/2),l=Fh(ky(r,0,o),e),a=Fh(ky(r,o),e),c=l.length,f=a.length,u=0,d=0;u{"use strict";ey();ry();var Lh=hi(),Ry=Ge(),Oh=oy(),AE=lr(),so=Xt(),Ct=Ne(),mn=Ke(),Ay=hy(),My=fr(),ME=uy(),PE=py(),IE=to(),$E=vh(),_h=zs(),Py=gy(),Qh=Re(),qE=Bt(),VE=Js(),zE=cn(),WE=Kt(),Iy=Ft(),$e=nh(),jE=un(),Fy=sr(),Qy=rh(),HE=Xs(),oo=Sh(),dr=yy(),YE=st(),JE=wy(),GE=YE("iterator"),mr="URLSearchParams",$y=mr+"Iterator",qy=_h.set,ut=_h.getterFor(mr),XE=_h.getterFor($y),By=Oh("fetch"),ho=Oh("Request"),gn=Oh("Headers"),Bh=ho&&ho.prototype,Ey=gn&&gn.prototype,KE=Ry.TypeError,ZE=Ry.encodeURIComponent,eC=String.fromCharCode,tC=AE("String","fromCodePoint"),iC=parseInt,ao=Ct("".charAt),Cy=Ct([].join),ci=Ct([].push),Vy=Ct("".replace),rC=Ct([].shift),Uy=Ct([].splice),Ly=Ct("".split),zy=Ct("".slice),nC=Ct(/./.exec),sC=/\+/g,Eh="\uFFFD",oC=/^[0-9a-f]+$/i,Oy=h(function(r,e){var t=zy(r,e,e+2);return nC(oC,t)?iC(t,16):NaN},"parseHexOctet"),lC=h(function(r){for(var e=0,t=128;t>0&&r&t;t>>=1)e++;return e},"getLeadingOnes"),aC=h(function(r){var e=null;switch(r.length){case 1:e=r[0];break;case 2:e=(r[0]&31)<<6|r[1]&63;break;case 3:e=(r[0]&15)<<12|(r[1]&63)<<6|r[2]&63;break;case 4:e=(r[0]&7)<<18|(r[1]&63)<<12|(r[2]&63)<<6|r[3]&63;break}return e>1114111?null:e},"utf8Decode"),_y=h(function(r){r=Vy(r,sC," ");for(var e=r.length,t="",i=0;ie){t+="%",i++;continue}var s=Oy(r,i+1);if(s!==s){t+=n,i++;continue}i+=2;var o=lC(s);if(o===0)n=eC(s);else{if(o===1||o>4){t+=Eh,i++;continue}for(var l=[s],a=1;ae||ao(r,i)!=="%"));){var c=Oy(r,i+1);if(c!==c){i+=3;break}if(c>191||c<128)break;ci(l,c),i+=2,a++}if(l.length!==o){t+=Eh;continue}var f=aC(l);f===null?t+=Eh:n=tC(f)}}t+=n,i++}return t},"decode"),hC=/[!'()~]|%20/g,cC={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},fC=h(function(r){return cC[r]},"replacer"),Ty=h(function(r){return Vy(ZE(r),hC,fC)},"serialize"),Ch=$E(h(function(e,t){qy(this,{type:$y,target:ut(e).entries,index:0,kind:t})},"Iterator"),mr,h(function(){var e=XE(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,oo(void 0,!0);var n=t[i];switch(e.kind){case"keys":return oo(n.key,!1);case"values":return oo(n.value,!1)}return oo([n.key,n.value],!1)},"next"),!0),Wy=h(function(r){this.entries=[],this.url=null,r!==void 0&&(Iy(r)?this.parseObject(r):this.parseQuery(typeof r=="string"?ao(r,0)==="?"?zy(r,1):r:$e(r)))},"URLSearchParamsState");Wy.prototype={type:mr,bindURL:h(function(r){this.url=r,this.update()},"bindURL"),parseObject:h(function(r){var e=this.entries,t=HE(r),i,n,s,o,l,a,c;if(t)for(i=Qy(r,t),n=i.next;!(s=so(n,i)).done;){if(o=Qy(WE(s.value)),l=o.next,(a=so(l,o)).done||(c=so(l,o)).done||!so(l,o).done)throw new KE("Expected sequence with length 2");ci(e,{key:$e(a.value),value:$e(c.value)})}else for(var f in r)qE(r,f)&&ci(e,{key:f,value:$e(r[f])})},"parseObject"),parseQuery:h(function(r){if(r)for(var e=this.entries,t=Ly(r,"&"),i=0,n,s;i0?arguments[0]:void 0,t=qy(this,new Wy(e));mn||(this.size=t.entries.length)},"URLSearchParams"),pr=co.prototype;PE(pr,{append:h(function(e,t){var i=ut(this);dr(arguments.length,2),ci(i.entries,{key:$e(e),value:$e(t)}),mn||this.length++,i.updateURL()},"append"),delete:h(function(r){for(var e=ut(this),t=dr(arguments.length,1),i=e.entries,n=$e(r),s=t<2?void 0:arguments[1],o=s===void 0?s:$e(s),l=0;li.key?1:-1}),e.updateURL()},"sort"),forEach:h(function(e){for(var t=ut(this).entries,i=VE(e,arguments.length>1?arguments[1]:void 0),n=0,s;n1?Uh(arguments[1]):{})},"fetch")}),Qh(ho)&&(lo=h(function(e){return Py(this,Bh),new ho(e,arguments.length>1?Uh(arguments[1]):{})},"Request"),Bh.constructor=lo,lo.prototype=Bh,Lh({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:lo})));var Dy,Ny,Uh,lo;jy.exports={URLSearchParams:co,getState:ut}});var Yy=Q(()=>{"use strict";Hy()});var A3=Bs(B0()),M3=Bs(V0()),P3=Bs(rb()),I3=Bs(Yy());function Ce(){}h(Ce,"noop");function uC(r,e){for(let t in e)r[t]=e[t];return r}h(uC,"assign");function Mh(r){return r()}h(Mh,"run");function Jy(){return Object.create(null)}h(Jy,"blank_object");function At(r){r.forEach(Mh)}h(At,"run_all");function uo(r){return typeof r=="function"}h(uo,"is_function");function oe(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}h(oe,"safe_not_equal");function Gy(r){return Object.keys(r).length===0}h(Gy,"is_empty");function fi(r,e,t,i){if(r){let n=Xy(r,e,t,i);return r[0](n)}}h(fi,"create_slot");function Xy(r,e,t,i){return r[1]&&i?uC(t.ctx.slice(),r[1](i(e))):t.ctx}h(Xy,"get_slot_context");function ui(r,e,t,i){if(r[2]&&i){let n=r[2](i(t));if(e.dirty===void 0)return n;if(typeof n=="object"){let s=[],o=Math.max(e.dirty.length,n.length);for(let l=0;l32){let e=[],t=r.ctx.length/32;for(let i=0;i{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var i;for(let n of t)po.entries.set(n.target,n),(i=this._listeners.get(n.target))===null||i===void 0||i(n)})}};h(po,"ResizeObserverSingleton");var Dh=po;Dh.entries="WeakMap"in Zy?new WeakMap:void 0;var e1=!1;function dC(){e1=!0}h(dC,"start_hydrating");function pC(){e1=!1}h(pC,"end_hydrating");function q(r,e){r.appendChild(e)}h(q,"append");function k(r,e,t){r.insertBefore(e,t||null)}h(k,"insert");function v(r){r.parentNode&&r.parentNode.removeChild(r)}h(v,"detach");function xn(r,e){for(let t=0;tr.removeEventListener(e,t,i)}h(ve,"listen");function F(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}h(F,"attr");function t1(r){let e;return{p(...t){e=t,e.forEach(i=>r.push(i))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}h(t1,"init_binding_group");function Ut(r){return r===""?null:+r}h(Ut,"to_number");function mC(r){return Array.from(r.childNodes)}h(mC,"children");function qe(r,e){e=""+e,r.data!==e&&(r.data=e)}h(qe,"set_data");function ke(r,e){r.value=e==null?"":e}h(ke,"set_input_value");function vr(r,e,t){r.classList[t?"add":"remove"](e)}h(vr,"toggle_class");function gC(r,e,{bubbles:t=!1,cancelable:i=!1}={}){let n=document.createEvent("CustomEvent");return n.initCustomEvent(r,t,i,e),n}h(gC,"custom_event");var yn;function bn(r){yn=r}h(bn,"set_current_component");function i1(){if(!yn)throw new Error("Function called outside component initialization");return yn}h(i1,"get_current_component");function Ph(r){i1().$$.on_mount.push(r)}h(Ph,"onMount");function Oi(){let r=i1();return(e,t,{cancelable:i=!1}={})=>{let n=r.$$.callbacks[e];if(n){let s=gC(e,t,{cancelable:i});return n.slice().forEach(o=>{o.call(r,s)}),!s.defaultPrevented}return!0}}h(Oi,"createEventDispatcher");var br=[];var J=[],yr=[],Nh=[],bC=Promise.resolve(),Rh=!1;function yC(){Rh||(Rh=!0,bC.then(r1))}h(yC,"schedule_update");function Ah(r){yr.push(r)}h(Ah,"add_render_callback");function X(r){Nh.push(r)}h(X,"add_flush_callback");var Th=new Set,gr=0;function r1(){if(gr!==0)return;let r=yn;do{try{for(;grr.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),yr=e}h(vC,"flush_render_callbacks");var fo=new Set,Li;function ti(){Li={r:0,c:[],p:Li}}h(ti,"group_outros");function ii(){Li.r||At(Li.c),Li=Li.p}h(ii,"check_outros");function C(r,e){r&&r.i&&(fo.delete(r),r.i(e))}h(C,"transition_in");function U(r,e,t,i){if(r&&r.o){if(fo.has(r))return;fo.add(r),Li.c.push(()=>{fo.delete(r),i&&(t&&r.d(1),i())}),r.o(e)}else i&&i()}h(U,"transition_out");var kC=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],gN=new Set([...kC]);var bN=new RegExp("[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]","u");function K(r,e,t){let i=r.$$.props[e];i!==void 0&&(r.$$.bound[i]=t,t(r.$$.ctx[i]))}h(K,"bind");function M(r){r&&r.c()}h(M,"create_component");function A(r,e,t,i){let{fragment:n,after_update:s}=r.$$;n&&n.m(e,t),i||Ah(()=>{let o=r.$$.on_mount.map(Mh).filter(uo);r.$$.on_destroy?r.$$.on_destroy.push(...o):At(o),r.$$.on_mount=[]}),s.forEach(Ah)}h(A,"mount_component");function R(r,e){let t=r.$$;t.fragment!==null&&(vC(t.after_update),At(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}h(R,"destroy_component");function SC(r,e){r.$$.dirty[0]===-1&&(br.push(r),yC(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<{let m=p.length?p[0]:d;return c.ctx&&n(c.ctx[u],c.ctx[u]=m)&&(!c.skip_bound&&c.bound[u]&&c.bound[u](m),f&&SC(r,u)),d}):[],c.update(),f=!0,At(c.before_update),c.fragment=i?i(c.ctx):!1,e.target){if(e.hydrate){dC();let u=mC(e.target);c.fragment&&c.fragment.l(u),u.forEach(v)}else c.fragment&&c.fragment.c();e.intro&&C(r.$$.fragment),A(r,e.target,e.anchor,e.customElement),pC(),r1()}bn(a)}h(le,"init");var wC,xr;typeof HTMLElement=="function"&&(wC=(xr=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(Mh).filter(uo);for(let t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(e,t,i){this[e]=i}disconnectedCallback(){At(this.$$.on_disconnect)}$destroy(){R(this,1),this.$destroy=Ce}$on(e,t){if(!uo(t))return Ce;let i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}$set(e){this.$$set&&!Gy(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}},h(xr,"SvelteElement"),xr));var Ih=class Ih{$destroy(){R(this,1),this.$destroy=Ce}$on(e,t){if(!uo(t))return Ce;let i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}$set(e){this.$$set&&!Gy(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};h(Ih,"SvelteComponent");var se=Ih;var $h=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],n1=new Set($h),s1={1:"jan",2:"feb",3:"mar",4:"apr",5:"may",6:"jun",7:"jul",8:"aug",9:"sep",10:"oct",11:"nov",12:"dec",jan:"jan",feb:"feb",mar:"mar",apr:"apr",may:"may",jun:"jun",jul:"jul",aug:"aug",sep:"sep",oct:"oct",nov:"nov",dec:"dec",january:"jan",february:"feb",march:"mar",april:"apr",june:"jun",july:"jul",august:"aug",september:"sep",october:"oct",november:"nov",december:"dec"};var go=class go{constructor(e,t,i=[]){this.kind=e;this.parent=t;this.children=i;this.type="block";t instanceof go?t.children.push(this):t instanceof mo&&t.args.push(this)}renderAsText(){return this.children.map(e=>e.renderAsText()).join("")}};h(go,"BlockNode");var _i=go,Wh=class Wh{constructor(e,t=""){this.parent=e;this.text=t;this.type="text";e.children.push(this)}renderAsText(){return this.text.replace(/"/g,"")}};h(Wh,"TextNode");var qh=Wh,jh=class jh{constructor(e,t="",i=[]){this.parent=e;this.command=t;this.args=i;this.type="command";e.children.push(this)}renderAsText(){return this.args.map(e=>e.renderAsText()).join("")}};h(jh,"CommandNode");var mo=jh;function kr(r){let e=new _i("root"),t=e;for(let i=0;i0?(t=t.parent,i--):t.command+=n}}return e}h(kr,"parseLaTeX");function bo(r){return Vh(r)}h(bo,"stringifyLaTeX");function Vh(r){let e=r.children.map(t=>{switch(t.type){case"block":return Vh(t);case"command":return FC(t);case"text":return t.text}}).join("");switch(r.kind){case"root":return e;case"curly":return"{".concat(e,"}");case"square":return"[".concat(e,"]")}}h(Vh,"stringifyBlock");function FC(r){return"\\".concat(r.command).concat(r.args.map(Vh).join(""))}h(FC,"stringifyCommand");function zh(r){let e=new _i(r.kind);for(let t of r.children)if(t.type==="block"&&t.kind==="curly"&&t.children.every(i=>i.type!=="command")){let i=zh(t);e.children.push(...i.children)}else e.children.push(t);return e}h(zh,"flattenLaTeX");var o1=new Map([["0023","\\#"],["0024","\\$"],["0025","\\%"],["0026","\\&"],["0027","'"],["0040","\\@"],["002a","\\textasteriskcentered"],["005f","\\_"],["007c","\\vert{}"],["00a0","~"],["00a1","\\textexclamdown{}"],["00a2","\\textcent{}"],["00a3","\\textsterling{}"],["00a4","\\textcurrency{}"],["00a5","\\textyen{}"],["00a6","\\textbrokenbar{}"],["00a7","\\textsection{}"],["00a8","\\textasciidieresis{}"],["00a9","\\textcopyright{}"],["00aa","\\textordfeminine{}"],["00ab","\\guillemotleft{}"],["00ac","\\lnot{}"],["00ad","\\-"],["00ae","\\textregistered{}"],["00af","\\textasciimacron{}"],["00b0","\\textdegree{}"],["00b1","\\pm{}"],["00b2","\\ensuremath{^2}"],["00b3","\\ensuremath{^3}"],["00b4","\\textasciiacute{}"],["00b5","\\mathrm{\\mu}"],["00b6","\\textparagraph{}"],["00b7","\\cdot{}"],["00b8","\\c{}"],["00b9","\\ensuremath{^1}"],["00ba","\\textordmasculine{}"],["00bb","\\guillemotright{}"],["00bc","\\textonequarter{}"],["00bd","\\textonehalf{}"],["00be","\\textthreequarters{}"],["00bf","\\textquestiondown{}"],["00c0","\\`{A}"],["00c1","\\'{A}"],["00c2","\\^{A}"],["00c3","\\~{A}"],["00c4",'\\"{A}'],["00c5","\\AA{}"],["00c6","\\AE{}"],["00c7","\\c{C}"],["00c8","\\`{E}"],["00c9","\\'{E}"],["00ca","\\^{E}"],["00cb",'\\"{E}'],["00cc","\\`{I}"],["00cd","\\'{I}"],["00ce","\\^{I}"],["00cf",'\\"{I}'],["00d0","\\DH{}"],["00d1","\\~{N}"],["00d2","\\`{O}"],["00d3","\\'{O}"],["00d4","\\^{O}"],["00d5","\\~{O}"],["00d6",'\\"{O}'],["00d7","\\texttimes{}"],["00d8","\\O{}"],["00d9","\\`{U}"],["00da","\\'{U}"],["00db","\\^{U}"],["00dc",'\\"{U}'],["00dd","\\'{Y}"],["00de","\\TH{}"],["00df","\\ss{}"],["00e0","\\`{a}"],["00e1","\\'{a}"],["00e2","\\^{a}"],["00e3","\\~{a}"],["00e4",'\\"{a}'],["00e5","\\aa{}"],["00e6","\\ae{}"],["00e7","\\c{c}"],["00e8","\\`{e}"],["00e9","\\'{e}"],["00ea","\\^{e}"],["00eb",'\\"{e}'],["00ec","\\`{\\i}"],["00ed","\\'{\\i}"],["00ee","\\^{\\i}"],["00ef",'\\"{\\i}'],["00f0","\\dh{}"],["00f1","\\~{n}"],["00f2","\\`{o}"],["00f3","\\'{o}"],["00f4","\\^{o}"],["00f5","\\~{o}"],["00f6",'\\"{o}'],["00f7","\\div{}"],["00f8","\\o{}"],["00f9","\\`{u}"],["00fa","\\'{u}"],["00fb","\\^{u}"],["00fc",'\\"{u}'],["00fd","\\'{y}"],["00fe","\\th{}"],["00ff",'\\"{y}'],["0100","\\={A}"],["0101","\\={a}"],["0102","\\u{A}"],["0103","\\u{a}"],["0104","\\k{A}"],["0105","\\k{a}"],["0106","\\'{C}"],["0107","\\'{c}"],["0108","\\^{C}"],["0109","\\^{c}"],["010a","\\.{C}"],["010b","\\.{c}"],["010c","\\v{C}"],["010d","\\v{c}"],["010e","\\v{D}"],["010f","\\v{d}"],["0110","\\DJ{}"],["0111","\\dj{}"],["0112","\\={E}"],["0113","\\={e}"],["0114","\\u{E}"],["0115","\\u{e}"],["0116","\\.{E}"],["0117","\\.{e}"],["0118","\\k{E}"],["0119","\\k{e}"],["011a","\\v{E}"],["011b","\\v{e}"],["011c","\\^{G}"],["011d","\\^{g}"],["011e","\\u{G}"],["011f","\\u{g}"],["0120","\\.{G}"],["0121","\\.{g}"],["0122","\\c{G}"],["0123","\\c{g}"],["0124","\\^{H}"],["0125","\\^{h}"],["0126","{\\fontencoding{LELA}\\selectfont\\char40}"],["0127","\\Elzxh{}"],["0128","\\~{I}"],["0129","\\~{\\i}"],["012a","\\={I}"],["012b","\\={\\i}"],["012c","\\u{I}"],["012d","\\u{\\i}"],["012e","\\k{I}"],["012f","\\k{i}"],["0130","\\.{I}"],["0131","\\i{}"],["0132","IJ"],["0133","ij"],["0134","\\^{J}"],["0135","\\^{\\j}"],["0136","\\c{K}"],["0137","\\c{k}"],["0138","{\\fontencoding{LELA}\\selectfont\\char91}"],["0139","\\'{L}"],["013a","\\'{l}"],["013b","\\c{L}"],["013c","\\c{l}"],["013d","\\v{L}"],["013e","\\v{l}"],["013f","{\\fontencoding{LELA}\\selectfont\\char201}"],["0140","{\\fontencoding{LELA}\\selectfont\\char202}"],["0141","\\L{}"],["0142","\\l{}"],["0143","\\'{N}"],["0144","\\'{n}"],["0145","\\c{N}"],["0146","\\c{n}"],["0147","\\v{N}"],["0148","\\v{n}"],["0149","'n"],["014a","\\NG{}"],["014b","\\ng{}"],["014c","\\={O}"],["014d","\\={o}"],["014e","\\u{O}"],["014f","\\u{o}"],["0150","\\H{O}"],["0151","\\H{o}"],["0152","\\OE{}"],["0153","\\oe{}"],["0154","\\'{R}"],["0155","\\'{r}"],["0156","\\c{R}"],["0157","\\c{r}"],["0158","\\v{R}"],["0159","\\v{r}"],["015a","\\'{S}"],["015b","\\'{s}"],["015c","\\^{S}"],["015d","\\^{s}"],["015e","\\c{S}"],["015f","\\c{s}"],["0160","\\v{S}"],["0161","\\v{s}"],["0162","\\c{T}"],["0163","\\c{t}"],["0164","\\v{T}"],["0165","\\v{t}"],["0166","{\\fontencoding{LELA}\\selectfont\\char47}"],["0167","{\\fontencoding{LELA}\\selectfont\\char63}"],["0168","\\~{U}"],["0169","\\~{u}"],["016a","\\={U}"],["016b","\\={u}"],["016c","\\u{U}"],["016d","\\u{u}"],["016e","\\r{U}"],["016f","\\r{u}"],["0170","\\H{U}"],["0171","\\H{u}"],["0172","\\k{U}"],["0173","\\k{u}"],["0174","\\^{W}"],["0175","\\^{w}"],["0176","\\^{Y}"],["0177","\\^{y}"],["0178",'\\"{Y}'],["0179","\\'{Z}"],["017a","\\'{z}"],["017b","\\.{Z}"],["017c","\\.{z}"],["017d","\\v{Z}"],["017e","\\v{z}"],["0195","\\texthvlig{}"],["019e","\\textnrleg{}"],["01aa","\\eth{}"],["01ba","{\\fontencoding{LELA}\\selectfont\\char195}"],["01c2","\\textdoublepipe{}"],["01f5","\\'{g}"],["0250","\\Elztrna{}"],["0252","\\Elztrnsa{}"],["0254","\\Elzopeno{}"],["0256","\\Elzrtld{}"],["0258","{\\fontencoding{LEIP}\\selectfont\\char61}"],["0259","\\Elzschwa{}"],["025b","\\varepsilon{}"],["0263","\\Elzpgamma{}"],["0264","\\Elzpbgam{}"],["0265","\\Elztrnh{}"],["026c","\\Elzbtdl{}"],["026d","\\Elzrtll{}"],["026f","\\Elztrnm{}"],["0270","\\Elztrnmlr{}"],["0271","\\Elzltlmr{}"],["0272","\\Elzltln{}"],["0273","\\Elzrtln{}"],["0277","\\Elzclomeg{}"],["0278","\\textphi{}"],["0279","\\Elztrnr{}"],["027a","\\Elztrnrl{}"],["027b","\\Elzrttrnr{}"],["027c","\\Elzrl{}"],["027d","\\Elzrtlr{}"],["027e","\\Elzfhr{}"],["027f","{\\fontencoding{LEIP}\\selectfont\\char202}"],["0282","\\Elzrtls{}"],["0283","\\Elzesh{}"],["0287","\\Elztrnt{}"],["0288","\\Elzrtlt{}"],["028a","\\Elzpupsil{}"],["028b","\\Elzpscrv{}"],["028c","\\Elzinvv{}"],["028d","\\Elzinvw{}"],["028e","\\Elztrny{}"],["0290","\\Elzrtlz{}"],["0292","\\Elzyogh{}"],["0294","\\Elzglst{}"],["0295","\\Elzreglst{}"],["0296","\\Elzinglst{}"],["029e","\\textturnk{}"],["02a4","\\Elzdyogh{}"],["02a7","\\Elztesh{}"],["02c7","\\textasciicaron{}"],["02c8","\\Elzverts{}"],["02cc","\\Elzverti{}"],["02d0","\\Elzlmrk{}"],["02d1","\\Elzhlmrk{}"],["02d2","\\Elzsbrhr{}"],["02d3","\\Elzsblhr{}"],["02d4","\\Elzrais{}"],["02d5","\\Elzlow{}"],["02d8","\\textasciibreve{}"],["02d9","\\textperiodcentered{}"],["02da","\\r{}"],["02db","\\k{}"],["02dc","\\texttildelow{}"],["02dd","\\H{}"],["02e5","\\tone{55}"],["02e6","\\tone{44}"],["02e7","\\tone{33}"],["02e8","\\tone{22}"],["02e9","\\tone{11}"],["0300","\\`"],["0301","\\'"],["0302","\\^"],["0303","\\~"],["0304","\\="],["0306","\\u"],["0307","\\."],["0308",'\\"'],["030a","\\r"],["030b","\\H"],["030c","\\v"],["030f","\\cyrchar\\C"],["0311","{\\fontencoding{LECO}\\selectfont\\char177}"],["0318","{\\fontencoding{LECO}\\selectfont\\char184}"],["0319","{\\fontencoding{LECO}\\selectfont\\char185}"],["0321","\\Elzpalh{}"],["0322","\\Elzrh{}"],["0327","\\c"],["0328","\\k"],["032a","\\Elzsbbrg{}"],["032b","{\\fontencoding{LECO}\\selectfont\\char203}"],["032f","{\\fontencoding{LECO}\\selectfont\\char207}"],["0335","\\Elzxl{}"],["0336","\\Elzbar{}"],["0337","{\\fontencoding{LECO}\\selectfont\\char215}"],["0338","{\\fontencoding{LECO}\\selectfont\\char216}"],["033a","{\\fontencoding{LECO}\\selectfont\\char218}"],["033b","{\\fontencoding{LECO}\\selectfont\\char219}"],["033c","{\\fontencoding{LECO}\\selectfont\\char220}"],["033d","{\\fontencoding{LECO}\\selectfont\\char221}"],["0361","{\\fontencoding{LECO}\\selectfont\\char225}"],["0386","\\'{A}"],["0388","\\'{E}"],["0389","\\'{H}"],["038a","\\'{}{I}"],["038c","\\'{}O"],["038e","\\mathrm{'Y}"],["038f","\\mathrm{'\\Omega}"],["0390","\\acute{\\ddot{\\iota}}"],["0391","\\ensuremath{\\Alpha}"],["0392","\\ensuremath{\\Beta}"],["0393","\\ensuremath{\\Gamma}"],["0394","\\ensuremath{\\Delta}"],["0395","\\ensuremath{\\Epsilon}"],["0396","\\ensuremath{\\Zeta}"],["0397","\\ensuremath{\\Eta}"],["0398","\\ensuremath{\\Theta}"],["0399","\\ensuremath{\\Iota}"],["039a","\\ensuremath{\\Kappa}"],["039b","\\ensuremath{\\Lambda}"],["039e","\\ensuremath{\\Xi}"],["03a0","\\ensuremath{\\Pi}"],["03a1","\\ensuremath{\\Rho}"],["03a3","\\ensuremath{\\Sigma}"],["03a4","\\ensuremath{\\Tau}"],["03a5","\\ensuremath{\\Upsilon}"],["03a6","\\ensuremath{\\Phi}"],["03a7","\\ensuremath{\\Chi}"],["03a8","\\ensuremath{\\Psi}"],["03a9","\\ensuremath{\\Omega}"],["03aa","\\mathrm{\\ddot{I}}"],["03ab","\\mathrm{\\ddot{Y}}"],["03ac","\\'{$\\alpha$}"],["03ad","\\acute{\\epsilon}"],["03ae","\\acute{\\eta}"],["03af","\\acute{\\iota}"],["03b0","\\acute{\\ddot{\\upsilon}}"],["03b1","\\ensuremath{\\alpha}"],["03b2","\\ensuremath{\\beta}"],["03b3","\\ensuremath{\\gamma}"],["03b4","\\ensuremath{\\delta}"],["03b5","\\ensuremath{\\epsilon}"],["03b6","\\ensuremath{\\zeta}"],["03b7","\\ensuremath{\\eta}"],["03b8","\\texttheta{}"],["03b9","\\ensuremath{\\iota}"],["03ba","\\ensuremath{\\kappa}"],["03bb","\\ensuremath{\\lambda}"],["03bc","\\ensuremath{\\mu}"],["03bd","\\ensuremath{\\nu}"],["03be","\\ensuremath{\\xi}"],["03c0","\\ensuremath{\\pi}"],["03c1","\\ensuremath{\\rho}"],["03c2","\\ensuremath{\\varsigma}"],["03c3","\\ensuremath{\\sigma}"],["03c4","\\ensuremath{\\tau}"],["03c5","\\ensuremath{\\upsilon}"],["03c6","\\ensuremath{\\varphi}"],["03c7","\\ensuremath{\\chi}"],["03c8","\\ensuremath{\\psi}"],["03c9","\\ensuremath{\\omega}"],["03ca","\\ensuremath{\\ddot{\\iota}}"],["03cb","\\ensuremath{\\ddot{\\upsilon}}"],["03cc","\\'{o}"],["03cd","\\acute{\\upsilon}"],["03ce","\\acute{\\omega}"],["03d0","\\Pisymbol{ppi022}{87}"],["03d1","\\textvartheta{}"],["03d2","\\ensuremath{\\Upsilon}"],["03d5","\\ensuremath{\\phi}"],["03d6","\\ensuremath{\\varpi}"],["03da","\\Stigma{}"],["03dc","\\Digamma{}"],["03dd","\\digamma{}"],["03de","\\Koppa{}"],["03e0","\\Sampi{}"],["03f0","\\varkappa{}"],["03f1","\\varrho{}"],["03f4","\\textTheta{}"],["03f6","\\backepsilon{}"],["0401","\\cyrchar\\CYRYO{}"],["0402","\\cyrchar\\CYRDJE{}"],["0403","\\cyrchar{\\'\\CYRG}"],["0404","\\cyrchar\\CYRIE{}"],["0405","\\cyrchar\\CYRDZE{}"],["0406","\\cyrchar\\CYRII{}"],["0407","\\cyrchar\\CYRYI{}"],["0408","\\cyrchar\\CYRJE{}"],["0409","\\cyrchar\\CYRLJE{}"],["040a","\\cyrchar\\CYRNJE{}"],["040b","\\cyrchar\\CYRTSHE{}"],["040c","\\cyrchar{\\'\\CYRK}"],["040e","\\cyrchar\\CYRUSHRT{}"],["040f","\\cyrchar\\CYRDZHE{}"],["0410","\\cyrchar\\CYRA{}"],["0411","\\cyrchar\\CYRB{}"],["0412","\\cyrchar\\CYRV{}"],["0413","\\cyrchar\\CYRG{}"],["0414","\\cyrchar\\CYRD{}"],["0415","\\cyrchar\\CYRE{}"],["0416","\\cyrchar\\CYRZH{}"],["0417","\\cyrchar\\CYRZ{}"],["0418","\\cyrchar\\CYRI{}"],["0419","\\cyrchar\\CYRISHRT{}"],["041a","\\cyrchar\\CYRK{}"],["041b","\\cyrchar\\CYRL{}"],["041c","\\cyrchar\\CYRM{}"],["041d","\\cyrchar\\CYRN{}"],["041e","\\cyrchar\\CYRO{}"],["041f","\\cyrchar\\CYRP{}"],["0420","\\cyrchar\\CYRR{}"],["0421","\\cyrchar\\CYRS{}"],["0422","\\cyrchar\\CYRT{}"],["0423","\\cyrchar\\CYRU{}"],["0424","\\cyrchar\\CYRF{}"],["0425","\\cyrchar\\CYRH{}"],["0426","\\cyrchar\\CYRC{}"],["0427","\\cyrchar\\CYRCH{}"],["0428","\\cyrchar\\CYRSH{}"],["0429","\\cyrchar\\CYRSHCH{}"],["042a","\\cyrchar\\CYRHRDSN{}"],["042b","\\cyrchar\\CYRERY{}"],["042c","\\cyrchar\\CYRSFTSN{}"],["042d","\\cyrchar\\CYREREV{}"],["042e","\\cyrchar\\CYRYU{}"],["042f","\\cyrchar\\CYRYA{}"],["0430","\\cyrchar\\cyra{}"],["0431","\\cyrchar\\cyrb{}"],["0432","\\cyrchar\\cyrv{}"],["0433","\\cyrchar\\cyrg{}"],["0434","\\cyrchar\\cyrd{}"],["0435","\\cyrchar\\cyre{}"],["0436","\\cyrchar\\cyrzh{}"],["0437","\\cyrchar\\cyrz{}"],["0438","\\cyrchar\\cyri{}"],["0439","\\cyrchar\\cyrishrt{}"],["043a","\\cyrchar\\cyrk{}"],["043b","\\cyrchar\\cyrl{}"],["043c","\\cyrchar\\cyrm{}"],["043d","\\cyrchar\\cyrn{}"],["043e","\\cyrchar\\cyro{}"],["043f","\\cyrchar\\cyrp{}"],["0440","\\cyrchar\\cyrr{}"],["0441","\\cyrchar\\cyrs{}"],["0442","\\cyrchar\\cyrt{}"],["0443","\\cyrchar\\cyru{}"],["0444","\\cyrchar\\cyrf{}"],["0445","\\cyrchar\\cyrh{}"],["0446","\\cyrchar\\cyrc{}"],["0447","\\cyrchar\\cyrch{}"],["0448","\\cyrchar\\cyrsh{}"],["0449","\\cyrchar\\cyrshch{}"],["044a","\\cyrchar\\cyrhrdsn{}"],["044b","\\cyrchar\\cyrery{}"],["044c","\\cyrchar\\cyrsftsn{}"],["044d","\\cyrchar\\cyrerev{}"],["044e","\\cyrchar\\cyryu{}"],["044f","\\cyrchar\\cyrya{}"],["0451","\\cyrchar\\cyryo{}"],["0452","\\cyrchar\\cyrdje{}"],["0453","\\cyrchar{\\'\\cyrg}"],["0454","\\cyrchar\\cyrie{}"],["0455","\\cyrchar\\cyrdze{}"],["0456","\\cyrchar\\cyrii{}"],["0457","\\cyrchar\\cyryi{}"],["0458","\\cyrchar\\cyrje{}"],["0459","\\cyrchar\\cyrlje{}"],["045a","\\cyrchar\\cyrnje{}"],["045b","\\cyrchar\\cyrtshe{}"],["045c","\\cyrchar{\\'\\cyrk}"],["045e","\\cyrchar\\cyrushrt{}"],["045f","\\cyrchar\\cyrdzhe{}"],["0460","\\cyrchar\\CYROMEGA{}"],["0461","\\cyrchar\\cyromega{}"],["0462","\\cyrchar\\CYRYAT{}"],["0464","\\cyrchar\\CYRIOTE{}"],["0465","\\cyrchar\\cyriote{}"],["0466","\\cyrchar\\CYRLYUS{}"],["0467","\\cyrchar\\cyrlyus{}"],["0468","\\cyrchar\\CYRIOTLYUS{}"],["0469","\\cyrchar\\cyriotlyus{}"],["046a","\\cyrchar\\CYRBYUS{}"],["046c","\\cyrchar\\CYRIOTBYUS{}"],["046d","\\cyrchar\\cyriotbyus{}"],["046e","\\cyrchar\\CYRKSI{}"],["046f","\\cyrchar\\cyrksi{}"],["0470","\\cyrchar\\CYRPSI{}"],["0471","\\cyrchar\\cyrpsi{}"],["0472","\\cyrchar\\CYRFITA{}"],["0474","\\cyrchar\\CYRIZH{}"],["0478","\\cyrchar\\CYRUK{}"],["0479","\\cyrchar\\cyruk{}"],["047a","\\cyrchar\\CYROMEGARND{}"],["047b","\\cyrchar\\cyromegarnd{}"],["047c","\\cyrchar\\CYROMEGATITLO{}"],["047d","\\cyrchar\\cyromegatitlo{}"],["047e","\\cyrchar\\CYROT{}"],["047f","\\cyrchar\\cyrot{}"],["0480","\\cyrchar\\CYRKOPPA{}"],["0481","\\cyrchar\\cyrkoppa{}"],["0482","\\cyrchar\\cyrthousands{}"],["0488","\\cyrchar\\cyrhundredthousands{}"],["0489","\\cyrchar\\cyrmillions{}"],["048c","\\cyrchar\\CYRSEMISFTSN{}"],["048d","\\cyrchar\\cyrsemisftsn{}"],["048e","\\cyrchar\\CYRRTICK{}"],["048f","\\cyrchar\\cyrrtick{}"],["0490","\\cyrchar\\CYRGUP{}"],["0491","\\cyrchar\\cyrgup{}"],["0492","\\cyrchar\\CYRGHCRS{}"],["0493","\\cyrchar\\cyrghcrs{}"],["0494","\\cyrchar\\CYRGHK{}"],["0495","\\cyrchar\\cyrghk{}"],["0496","\\cyrchar\\CYRZHDSC{}"],["0497","\\cyrchar\\cyrzhdsc{}"],["0498","\\cyrchar\\CYRZDSC{}"],["0499","\\cyrchar\\cyrzdsc{}"],["049a","\\cyrchar\\CYRKDSC{}"],["049b","\\cyrchar\\cyrkdsc{}"],["049c","\\cyrchar\\CYRKVCRS{}"],["049d","\\cyrchar\\cyrkvcrs{}"],["049e","\\cyrchar\\CYRKHCRS{}"],["049f","\\cyrchar\\cyrkhcrs{}"],["04a0","\\cyrchar\\CYRKBEAK{}"],["04a1","\\cyrchar\\cyrkbeak{}"],["04a2","\\cyrchar\\CYRNDSC{}"],["04a3","\\cyrchar\\cyrndsc{}"],["04a4","\\cyrchar\\CYRNG{}"],["04a5","\\cyrchar\\cyrng{}"],["04a6","\\cyrchar\\CYRPHK{}"],["04a7","\\cyrchar\\cyrphk{}"],["04a8","\\cyrchar\\CYRABHHA{}"],["04a9","\\cyrchar\\cyrabhha{}"],["04aa","\\cyrchar\\CYRSDSC{}"],["04ab","\\cyrchar\\cyrsdsc{}"],["04ac","\\cyrchar\\CYRTDSC{}"],["04ad","\\cyrchar\\cyrtdsc{}"],["04ae","\\cyrchar\\CYRY{}"],["04af","\\cyrchar\\cyry{}"],["04b0","\\cyrchar\\CYRYHCRS{}"],["04b1","\\cyrchar\\cyryhcrs{}"],["04b2","\\cyrchar\\CYRHDSC{}"],["04b3","\\cyrchar\\cyrhdsc{}"],["04b4","\\cyrchar\\CYRTETSE{}"],["04b5","\\cyrchar\\cyrtetse{}"],["04b6","\\cyrchar\\CYRCHRDSC{}"],["04b7","\\cyrchar\\cyrchrdsc{}"],["04b8","\\cyrchar\\CYRCHVCRS{}"],["04b9","\\cyrchar\\cyrchvcrs{}"],["04ba","\\cyrchar\\CYRSHHA{}"],["04bb","\\cyrchar\\cyrshha{}"],["04bc","\\cyrchar\\CYRABHCH{}"],["04bd","\\cyrchar\\cyrabhch{}"],["04be","\\cyrchar\\CYRABHCHDSC{}"],["04bf","\\cyrchar\\cyrabhchdsc{}"],["04c0","\\cyrchar\\CYRpalochka{}"],["04c3","\\cyrchar\\CYRKHK{}"],["04c4","\\cyrchar\\cyrkhk{}"],["04c7","\\cyrchar\\CYRNHK{}"],["04c8","\\cyrchar\\cyrnhk{}"],["04cb","\\cyrchar\\CYRCHLDSC{}"],["04cc","\\cyrchar\\cyrchldsc{}"],["04d4","\\cyrchar\\CYRAE{}"],["04d5","\\cyrchar\\cyrae{}"],["04d8","\\cyrchar\\CYRSCHWA{}"],["04d9","\\cyrchar\\cyrschwa{}"],["04e0","\\cyrchar\\CYRABHDZE{}"],["04e1","\\cyrchar\\cyrabhdze{}"],["04e8","\\cyrchar\\CYROTLD{}"],["04e9","\\cyrchar\\cyrotld{}"],["2002","\\hspace{0.6em}"],["2003","\\hspace{1em}"],["2004","\\hspace{0.33em}"],["2005","\\hspace{0.25em}"],["2006","\\hspace{0.166em}"],["2007","\\hphantom{0}"],["2008","\\hphantom{,}"],["2009","\\hspace{0.167em}"],["200a","\\mkern1mu{}"],["2010","-"],["2014","--"],["2015","\\rule{1em}{1pt}"],["2016","\\Vert{}"],["2018","`"],["2019","'"],["201b","\\Elzreapos{}"],["201c","``"],["201d","''"],["201e",",,"],["2020","\\textdagger{}"],["2021","\\textdaggerdbl{}"],["2022","\\textbullet{}"],["2025",".."],["2026","\\ldots{}"],["2030","\\textperthousand{}"],["2031","\\textpertenthousand{}"],["2032","\\ensuremath{'}"],["2033","\\ensuremath{''}"],["2034","\\ensuremath{'''}"],["2035","\\backprime{}"],["2039","\\guilsinglleft{}"],["203a","\\guilsinglright{}"],["2057","''''"],["205f","\\mkern4mu{}"],["2060","\\nolinebreak{}"],["20a7","\\ensuremath{\\Elzpes}"],["20ac","\\mbox{\\texteuro}{}"],["20db","\\dddot{}"],["20dc","\\ddddot{}"],["2102","\\mathbb{C}"],["210a","\\mathscr{g}"],["210b","\\mathscr{H}"],["210c","\\mathfrak{H}"],["210d","\\mathbb{H}"],["210f","\\hslash{}"],["2110","\\mathscr{I}"],["2111","\\mathfrak{I}"],["2112","\\mathscr{L}"],["2113","\\mathscr{l}"],["2115","\\mathbb{N}"],["2116","\\cyrchar\\textnumero{}"],["2118","\\wp{}"],["2119","\\mathbb{P}"],["211a","\\mathbb{Q}"],["211b","\\mathscr{R}"],["211c","\\mathfrak{R}"],["211d","\\mathbb{R}"],["211e","\\Elzxrat{}"],["2122","\\texttrademark{}"],["2124","\\mathbb{Z}"],["2126","\\Omega{}"],["2127","\\mho{}"],["2128","\\mathfrak{Z}"],["2129","\\ElsevierGlyph{2129}"],["212b","\\AA{}"],["212c","\\mathscr{B}"],["212d","\\mathfrak{C}"],["212f","\\mathscr{e}"],["2130","\\mathscr{E}"],["2131","\\mathscr{F}"],["2133","\\mathscr{M}"],["2134","\\mathscr{o}"],["2135","\\aleph{}"],["2136","\\beth{}"],["2137","\\gimel{}"],["2138","\\daleth{}"],["2153","\\textfrac{1}{3}"],["2154","\\textfrac{2}{3}"],["2155","\\textfrac{1}{5}"],["2156","\\textfrac{2}{5}"],["2157","\\textfrac{3}{5}"],["2158","\\textfrac{4}{5}"],["2159","\\textfrac{1}{6}"],["215a","\\textfrac{5}{6}"],["215b","\\textfrac{1}{8}"],["215c","\\textfrac{3}{8}"],["215d","\\textfrac{5}{8}"],["215e","\\textfrac{7}{8}"],["2190","\\leftarrow{}"],["2191","\\uparrow{}"],["2192","\\rightarrow{}"],["2193","\\downarrow{}"],["2194","\\leftrightarrow{}"],["2195","\\updownarrow{}"],["2196","\\nwarrow{}"],["2197","\\nearrow{}"],["2198","\\searrow{}"],["2199","\\swarrow{}"],["219a","\\nleftarrow{}"],["219b","\\nrightarrow{}"],["219c","\\arrowwaveright{}"],["219d","\\arrowwaveright{}"],["219e","\\twoheadleftarrow{}"],["21a0","\\twoheadrightarrow{}"],["21a2","\\leftarrowtail{}"],["21a3","\\rightarrowtail{}"],["21a6","\\mapsto{}"],["21a9","\\hookleftarrow{}"],["21aa","\\hookrightarrow{}"],["21ab","\\looparrowleft{}"],["21ac","\\looparrowright{}"],["21ad","\\leftrightsquigarrow{}"],["21ae","\\nleftrightarrow{}"],["21b0","\\Lsh{}"],["21b1","\\Rsh{}"],["21b3","\\ElsevierGlyph{21B3}"],["21b6","\\curvearrowleft{}"],["21b7","\\curvearrowright{}"],["21ba","\\circlearrowleft{}"],["21bb","\\circlearrowright{}"],["21bc","\\leftharpoonup{}"],["21bd","\\leftharpoondown{}"],["21be","\\upharpoonright{}"],["21bf","\\upharpoonleft{}"],["21c0","\\rightharpoonup{}"],["21c1","\\rightharpoondown{}"],["21c2","\\downharpoonright{}"],["21c3","\\downharpoonleft{}"],["21c4","\\rightleftarrows{}"],["21c5","\\dblarrowupdown{}"],["21c6","\\leftrightarrows{}"],["21c7","\\leftleftarrows{}"],["21c8","\\upuparrows{}"],["21c9","\\rightrightarrows{}"],["21ca","\\downdownarrows{}"],["21cb","\\leftrightharpoons{}"],["21cc","\\rightleftharpoons{}"],["21cd","\\nLeftarrow{}"],["21ce","\\nLeftrightarrow{}"],["21cf","\\nRightarrow{}"],["21d0","\\Leftarrow{}"],["21d1","\\Uparrow{}"],["21d2","\\Rightarrow{}"],["21d3","\\Downarrow{}"],["21d4","\\Leftrightarrow{}"],["21d5","\\Updownarrow{}"],["21da","\\Lleftarrow{}"],["21db","\\Rrightarrow{}"],["21dd","\\rightsquigarrow{}"],["21f5","\\DownArrowUpArrow{}"],["2200","\\forall{}"],["2201","\\complement{}"],["2202","\\partial{}"],["2203","\\exists{}"],["2204","\\nexists{}"],["2205","\\varnothing{}"],["2207","\\nabla{}"],["2208","\\in{}"],["2209","\\not\\in{}"],["220b","\\ni{}"],["220c","\\not\\ni{}"],["220f","\\prod{}"],["2210","\\coprod{}"],["2211","\\sum{}"],["2212","-"],["2213","\\mp{}"],["2214","\\dotplus{}"],["2216","\\setminus{}"],["2217","{\\_\\ast}"],["2218","\\circ{}"],["2219","\\bullet{}"],["221a","\\surd{}"],["221d","\\propto{}"],["221e","\\infty{}"],["221f","\\rightangle{}"],["2220","\\angle{}"],["2221","\\measuredangle{}"],["2222","\\sphericalangle{}"],["2223","\\mid{}"],["2224","\\nmid{}"],["2225","\\parallel{}"],["2226","\\nparallel{}"],["2227","\\wedge{}"],["2228","\\vee{}"],["2229","\\cap{}"],["222a","\\cup{}"],["222b","\\int{}"],["222c","\\int\\!\\int{}"],["222d","\\int\\!\\int\\!\\int{}"],["222e","\\oint{}"],["222f","\\surfintegral{}"],["2230","\\volintegral{}"],["2231","\\clwintegral{}"],["2232","\\ElsevierGlyph{2232}"],["2233","\\ElsevierGlyph{2233}"],["2234","\\therefore{}"],["2235","\\because{}"],["2237","\\Colon{}"],["2238","\\ElsevierGlyph{2238}"],["223a","\\mathbin{{:}\\!\\!{-}\\!\\!{:}}"],["223b","\\homothetic{}"],["223c","\\sim{}"],["223d","\\backsim{}"],["223e","\\lazysinv{}"],["2240","\\wr{}"],["2241","\\not\\sim{}"],["2242","\\ElsevierGlyph{2242}"],["2243","\\simeq{}"],["2244","\\not\\simeq{}"],["2245","\\cong{}"],["2246","\\approxnotequal{}"],["2247","\\not\\cong{}"],["2248","\\approx{}"],["2249","\\not\\approx{}"],["224a","\\approxeq{}"],["224b","\\tildetrpl{}"],["224c","\\allequal{}"],["224d","\\asymp{}"],["224e","\\Bumpeq{}"],["224f","\\bumpeq{}"],["2250","\\doteq{}"],["2251","\\doteqdot{}"],["2252","\\fallingdotseq{}"],["2253","\\risingdotseq{}"],["2254",":="],["2255","=:"],["2256","\\eqcirc{}"],["2257","\\circeq{}"],["2259","\\estimates{}"],["225a","\\ElsevierGlyph{225A}"],["225b","\\starequal{}"],["225c","\\triangleq{}"],["225f","\\ElsevierGlyph{225F}"],["2260","\\not ="],["2261","\\equiv{}"],["2262","\\not\\equiv{}"],["2264","\\leq{}"],["2265","\\geq{}"],["2266","\\leqq{}"],["2267","\\geqq{}"],["2268","\\lneqq{}"],["2269","\\gneqq{}"],["226a","\\ll{}"],["226b","\\gg{}"],["226c","\\between{}"],["226d","\\not\\kern-0.3em\\times{}"],["226e","\\not<"],["226f","\\not>"],["2270","\\not\\leq{}"],["2271","\\not\\geq{}"],["2272","\\lessequivlnt{}"],["2273","\\greaterequivlnt{}"],["2274","\\ElsevierGlyph{2274}"],["2275","\\ElsevierGlyph{2275}"],["2276","\\lessgtr{}"],["2277","\\gtrless{}"],["2278","\\notlessgreater{}"],["2279","\\notgreaterless{}"],["227a","\\prec{}"],["227b","\\succ{}"],["227c","\\preccurlyeq{}"],["227d","\\succcurlyeq{}"],["227e","\\precapprox{}"],["227f","\\succapprox{}"],["2280","\\not\\prec{}"],["2281","\\not\\succ{}"],["2282","\\subset{}"],["2283","\\supset{}"],["2284","\\not\\subset{}"],["2285","\\not\\supset{}"],["2286","\\subseteq{}"],["2287","\\supseteq{}"],["2288","\\not\\subseteq{}"],["2289","\\not\\supseteq{}"],["228a","\\subsetneq{}"],["228b","\\supsetneq{}"],["228e","\\uplus{}"],["228f","\\sqsubset{}"],["2290","\\sqsupset{}"],["2291","\\sqsubseteq{}"],["2292","\\sqsupseteq{}"],["2293","\\sqcap{}"],["2294","\\sqcup{}"],["2295","\\oplus{}"],["2296","\\ominus{}"],["2297","\\otimes{}"],["2298","\\oslash{}"],["2299","\\odot{}"],["229a","\\circledcirc{}"],["229b","\\circledast{}"],["229d","\\circleddash{}"],["229e","\\boxplus{}"],["229f","\\boxminus{}"],["22a0","\\boxtimes{}"],["22a1","\\boxdot{}"],["22a2","\\vdash{}"],["22a3","\\dashv{}"],["22a4","\\top{}"],["22a5","\\perp{}"],["22a7","\\truestate{}"],["22a8","\\forcesextra{}"],["22a9","\\Vdash{}"],["22aa","\\Vvdash{}"],["22ab","\\VDash{}"],["22ac","\\nvdash{}"],["22ad","\\nvDash{}"],["22ae","\\nVdash{}"],["22af","\\nVDash{}"],["22b2","\\vartriangleleft{}"],["22b3","\\vartriangleright{}"],["22b4","\\trianglelefteq{}"],["22b5","\\trianglerighteq{}"],["22b6","\\original{}"],["22b7","\\image{}"],["22b8","\\multimap{}"],["22b9","\\hermitconjmatrix{}"],["22ba","\\intercal{}"],["22bb","\\veebar{}"],["22be","\\rightanglearc{}"],["22c0","\\ElsevierGlyph{22C0}"],["22c1","\\ElsevierGlyph{22C1}"],["22c2","\\bigcap{}"],["22c3","\\bigcup{}"],["22c4","\\diamond{}"],["22c5","\\cdot{}"],["22c6","\\star{}"],["22c7","\\divideontimes{}"],["22c8","\\bowtie{}"],["22c9","\\ltimes{}"],["22ca","\\rtimes{}"],["22cb","\\leftthreetimes{}"],["22cc","\\rightthreetimes{}"],["22cd","\\backsimeq{}"],["22ce","\\curlyvee{}"],["22cf","\\curlywedge{}"],["22d0","\\Subset{}"],["22d1","\\Supset{}"],["22d2","\\Cap{}"],["22d3","\\Cup{}"],["22d4","\\pitchfork{}"],["22d6","\\lessdot{}"],["22d7","\\gtrdot{}"],["22d8","\\verymuchless{}"],["22d9","\\verymuchgreater{}"],["22da","\\lesseqgtr{}"],["22db","\\gtreqless{}"],["22de","\\curlyeqprec{}"],["22df","\\curlyeqsucc{}"],["22e2","\\not\\sqsubseteq{}"],["22e3","\\not\\sqsupseteq{}"],["22e5","\\Elzsqspne{}"],["22e6","\\lnsim{}"],["22e7","\\gnsim{}"],["22e8","\\precedesnotsimilar{}"],["22e9","\\succnsim{}"],["22ea","\\ntriangleleft{}"],["22eb","\\ntriangleright{}"],["22ec","\\ntrianglelefteq{}"],["22ed","\\ntrianglerighteq{}"],["22ee","\\vdots{}"],["22ef","\\cdots{}"],["22f0","\\upslopeellipsis{}"],["22f1","\\downslopeellipsis{}"],["2305","\\barwedge{}"],["2306","\\perspcorrespond{}"],["2308","\\lceil{}"],["2309","\\rceil{}"],["230a","\\lfloor{}"],["230b","\\rfloor{}"],["2315","\\recorder{}"],["2316",'\\mathchar"2208'],["231c","\\ulcorner{}"],["231d","\\urcorner{}"],["231e","\\llcorner{}"],["231f","\\lrcorner{}"],["2322","\\frown{}"],["2323","\\smile{}"],["2329","\\langle{}"],["232a","\\rangle{}"],["233d","\\ElsevierGlyph{E838}"],["23a3","\\Elzdlcorn{}"],["23b0","\\lmoustache{}"],["23b1","\\rmoustache{}"],["2423","\\textvisiblespace{}"],["2460","\\ding{172}"],["2461","\\ding{173}"],["2462","\\ding{174}"],["2463","\\ding{175}"],["2464","\\ding{176}"],["2465","\\ding{177}"],["2466","\\ding{178}"],["2467","\\ding{179}"],["2468","\\ding{180}"],["2469","\\ding{181}"],["24c8","\\circledS{}"],["2506","\\Elzdshfnc{}"],["2519","\\Elzsqfnw{}"],["2571","\\diagup{}"],["25a0","\\ding{110}"],["25a1","\\square{}"],["25aa","\\blacksquare{}"],["25ad","\\fbox{~~}"],["25af","\\Elzvrecto{}"],["25b1","\\ElsevierGlyph{E381}"],["25b2","\\ding{115}"],["25b3","\\bigtriangleup{}"],["25b4","\\blacktriangle{}"],["25b5","\\vartriangle{}"],["25b8","\\blacktriangleright{}"],["25b9","\\triangleright{}"],["25bc","\\ding{116}"],["25bd","\\bigtriangledown{}"],["25be","\\blacktriangledown{}"],["25bf","\\triangledown{}"],["25c2","\\blacktriangleleft{}"],["25c3","\\triangleleft{}"],["25c6","\\ding{117}"],["25ca","\\lozenge{}"],["25cb","\\bigcirc{}"],["25cf","\\ding{108}"],["25d0","\\Elzcirfl{}"],["25d1","\\Elzcirfr{}"],["25d2","\\Elzcirfb{}"],["25d7","\\ding{119}"],["25d8","\\Elzrvbull{}"],["25e7","\\Elzsqfl{}"],["25e8","\\Elzsqfr{}"],["25ea","\\Elzsqfse{}"],["25ef","\\bigcirc{}"],["2605","\\ding{72}"],["2606","\\ding{73}"],["260e","\\ding{37}"],["261b","\\ding{42}"],["261e","\\ding{43}"],["263e","\\rightmoon{}"],["263f","\\mercury{}"],["2640","\\venus{}"],["2642","\\male{}"],["2643","\\jupiter{}"],["2644","\\saturn{}"],["2645","\\uranus{}"],["2646","\\neptune{}"],["2647","\\pluto{}"],["2648","\\aries{}"],["2649","\\taurus{}"],["264a","\\gemini{}"],["264b","\\cancer{}"],["264c","\\leo{}"],["264d","\\virgo{}"],["264e","\\libra{}"],["264f","\\scorpio{}"],["2650","\\sagittarius{}"],["2651","\\capricornus{}"],["2652","\\aquarius{}"],["2653","\\pisces{}"],["2660","\\ding{171}"],["2662","\\diamond{}"],["2663","\\ding{168}"],["2665","\\ding{170}"],["2666","\\ding{169}"],["2669","\\quarternote{}"],["266a","\\eighthnote{}"],["266d","\\flat{}"],["266e","\\natural{}"],["266f","\\sharp{}"],["2701","\\ding{33}"],["2702","\\ding{34}"],["2703","\\ding{35}"],["2704","\\ding{36}"],["2706","\\ding{38}"],["2707","\\ding{39}"],["2708","\\ding{40}"],["2709","\\ding{41}"],["270c","\\ding{44}"],["270d","\\ding{45}"],["270e","\\ding{46}"],["270f","\\ding{47}"],["2710","\\ding{48}"],["2711","\\ding{49}"],["2712","\\ding{50}"],["2713","\\ding{51}"],["2714","\\ding{52}"],["2715","\\ding{53}"],["2716","\\ding{54}"],["2717","\\ding{55}"],["2718","\\ding{56}"],["2719","\\ding{57}"],["271a","\\ding{58}"],["271b","\\ding{59}"],["271c","\\ding{60}"],["271d","\\ding{61}"],["271e","\\ding{62}"],["271f","\\ding{63}"],["2720","\\ding{64}"],["2721","\\ding{65}"],["2722","\\ding{66}"],["2723","\\ding{67}"],["2724","\\ding{68}"],["2725","\\ding{69}"],["2726","\\ding{70}"],["2727","\\ding{71}"],["2729","\\ding{73}"],["272a","\\ding{74}"],["272b","\\ding{75}"],["272c","\\ding{76}"],["272d","\\ding{77}"],["272e","\\ding{78}"],["272f","\\ding{79}"],["2730","\\ding{80}"],["2731","\\ding{81}"],["2732","\\ding{82}"],["2733","\\ding{83}"],["2734","\\ding{84}"],["2735","\\ding{85}"],["2736","\\ding{86}"],["2737","\\ding{87}"],["2738","\\ding{88}"],["2739","\\ding{89}"],["273a","\\ding{90}"],["273b","\\ding{91}"],["273c","\\ding{92}"],["273d","\\ding{93}"],["273e","\\ding{94}"],["273f","\\ding{95}"],["2740","\\ding{96}"],["2741","\\ding{97}"],["2742","\\ding{98}"],["2743","\\ding{99}"],["2744","\\ding{100}"],["2745","\\ding{101}"],["2746","\\ding{102}"],["2747","\\ding{103}"],["2748","\\ding{104}"],["2749","\\ding{105}"],["274a","\\ding{106}"],["274b","\\ding{107}"],["274d","\\ding{109}"],["274f","\\ding{111}"],["2750","\\ding{112}"],["2751","\\ding{113}"],["2752","\\ding{114}"],["2756","\\ding{118}"],["2758","\\ding{120}"],["2759","\\ding{121}"],["275a","\\ding{122}"],["275b","\\ding{123}"],["275c","\\ding{124}"],["275d","\\ding{125}"],["275e","\\ding{126}"],["2761","\\ding{161}"],["2762","\\ding{162}"],["2763","\\ding{163}"],["2764","\\ding{164}"],["2765","\\ding{165}"],["2766","\\ding{166}"],["2767","\\ding{167}"],["2776","\\ding{182}"],["2777","\\ding{183}"],["2778","\\ding{184}"],["2779","\\ding{185}"],["277a","\\ding{186}"],["277b","\\ding{187}"],["277c","\\ding{188}"],["277d","\\ding{189}"],["277e","\\ding{190}"],["277f","\\ding{191}"],["2780","\\ding{192}"],["2781","\\ding{193}"],["2782","\\ding{194}"],["2783","\\ding{195}"],["2784","\\ding{196}"],["2785","\\ding{197}"],["2786","\\ding{198}"],["2787","\\ding{199}"],["2788","\\ding{200}"],["2789","\\ding{201}"],["278a","\\ding{202}"],["278b","\\ding{203}"],["278c","\\ding{204}"],["278d","\\ding{205}"],["278e","\\ding{206}"],["278f","\\ding{207}"],["2790","\\ding{208}"],["2791","\\ding{209}"],["2792","\\ding{210}"],["2793","\\ding{211}"],["2794","\\ding{212}"],["2798","\\ding{216}"],["2799","\\ding{217}"],["279a","\\ding{218}"],["279b","\\ding{219}"],["279c","\\ding{220}"],["279d","\\ding{221}"],["279e","\\ding{222}"],["279f","\\ding{223}"],["27a0","\\ding{224}"],["27a1","\\ding{225}"],["27a2","\\ding{226}"],["27a3","\\ding{227}"],["27a4","\\ding{228}"],["27a5","\\ding{229}"],["27a6","\\ding{230}"],["27a7","\\ding{231}"],["27a8","\\ding{232}"],["27a9","\\ding{233}"],["27aa","\\ding{234}"],["27ab","\\ding{235}"],["27ac","\\ding{236}"],["27ad","\\ding{237}"],["27ae","\\ding{238}"],["27af","\\ding{239}"],["27b1","\\ding{241}"],["27b2","\\ding{242}"],["27b3","\\ding{243}"],["27b4","\\ding{244}"],["27b5","\\ding{245}"],["27b6","\\ding{246}"],["27b7","\\ding{247}"],["27b8","\\ding{248}"],["27b9","\\ding{249}"],["27ba","\\ding{250}"],["27bb","\\ding{251}"],["27bc","\\ding{252}"],["27bd","\\ding{253}"],["27be","\\ding{254}"],["27f5","\\longleftarrow{}"],["27f6","\\longrightarrow{}"],["27f7","\\longleftrightarrow{}"],["27f8","\\Longleftarrow{}"],["27f9","\\Longrightarrow{}"],["27fa","\\Longleftrightarrow{}"],["27fc","\\longmapsto{}"],["27ff","\\sim\\joinrel\\leadsto"],["2905","\\ElsevierGlyph{E212}"],["2912","\\UpArrowBar{}"],["2913","\\DownArrowBar{}"],["2923","\\ElsevierGlyph{E20C}"],["2924","\\ElsevierGlyph{E20D}"],["2925","\\ElsevierGlyph{E20B}"],["2926","\\ElsevierGlyph{E20A}"],["2927","\\ElsevierGlyph{E211}"],["2928","\\ElsevierGlyph{E20E}"],["2929","\\ElsevierGlyph{E20F}"],["292a","\\ElsevierGlyph{E210}"],["2933","\\ElsevierGlyph{E21C}"],["2936","\\ElsevierGlyph{E21A}"],["2937","\\ElsevierGlyph{E219}"],["2940","\\Elolarr{}"],["2941","\\Elorarr{}"],["2942","\\ElzRlarr{}"],["2944","\\ElzrLarr{}"],["2947","\\Elzrarrx{}"],["294e","\\LeftRightVector{}"],["294f","\\RightUpDownVector{}"],["2950","\\DownLeftRightVector{}"],["2951","\\LeftUpDownVector{}"],["2952","\\LeftVectorBar{}"],["2953","\\RightVectorBar{}"],["2954","\\RightUpVectorBar{}"],["2955","\\RightDownVectorBar{}"],["2956","\\DownLeftVectorBar{}"],["2957","\\DownRightVectorBar{}"],["2958","\\LeftUpVectorBar{}"],["2959","\\LeftDownVectorBar{}"],["295a","\\LeftTeeVector{}"],["295b","\\RightTeeVector{}"],["295c","\\RightUpTeeVector{}"],["295d","\\RightDownTeeVector{}"],["295e","\\DownLeftTeeVector{}"],["295f","\\DownRightTeeVector{}"],["2960","\\LeftUpTeeVector{}"],["2961","\\LeftDownTeeVector{}"],["296e","\\UpEquilibrium{}"],["296f","\\ReverseUpEquilibrium{}"],["2970","\\RoundImplies{}"],["297c","\\ElsevierGlyph{E214}"],["297d","\\ElsevierGlyph{E215}"],["2980","\\Elztfnc{}"],["2985","\\ElsevierGlyph{3018}"],["2986","\\Elroang{}"],["2993","<\\kern-0.58em("],["2994","\\ElsevierGlyph{E291}"],["2999","\\Elzddfnc{}"],["299c","\\Angle{}"],["29a0","\\Elzlpargt{}"],["29b5","\\ElsevierGlyph{E260}"],["29b6","\\ElsevierGlyph{E61B}"],["29ca","\\ElzLap{}"],["29cb","\\Elzdefas{}"],["29cf","\\LeftTriangleBar{}"],["29d0","\\RightTriangleBar{}"],["29dc","\\ElsevierGlyph{E372}"],["29eb","\\blacklozenge{}"],["29f4","\\RuleDelayed{}"],["2a04","\\Elxuplus{}"],["2a05","\\ElzThr{}"],["2a06","\\Elxsqcup{}"],["2a07","\\ElzInf{}"],["2a08","\\ElzSup{}"],["2a0d","\\ElzCint{}"],["2a0f","\\clockoint{}"],["2a10","\\ElsevierGlyph{E395}"],["2a16","\\sqrint{}"],["2a25","\\ElsevierGlyph{E25A}"],["2a2a","\\ElsevierGlyph{E25B}"],["2a2d","\\ElsevierGlyph{E25C}"],["2a2e","\\ElsevierGlyph{E25D}"],["2a2f","\\ElzTimes{}"],["2a34","\\ElsevierGlyph{E25E}"],["2a35","\\ElsevierGlyph{E25E}"],["2a3c","\\ElsevierGlyph{E259}"],["2a3f","\\amalg{}"],["2a53","\\ElzAnd{}"],["2a54","\\ElzOr{}"],["2a55","\\ElsevierGlyph{E36E}"],["2a56","\\ElOr{}"],["2a5e","\\perspcorrespond{}"],["2a5f","\\Elzminhat{}"],["2a63","\\ElsevierGlyph{225A}"],["2a6e","\\stackrel{*}{=}"],["2a75","\\Equal{}"],["2a7d","\\leqslant{}"],["2a7e","\\geqslant{}"],["2a85","\\lessapprox{}"],["2a86","\\gtrapprox{}"],["2a87","\\lneq{}"],["2a88","\\gneq{}"],["2a89","\\lnapprox{}"],["2a8a","\\gnapprox{}"],["2a8b","\\lesseqqgtr{}"],["2a8c","\\gtreqqless{}"],["2a95","\\eqslantless{}"],["2a96","\\eqslantgtr{}"],["2a9d","\\Pisymbol{ppi020}{117}"],["2a9e","\\Pisymbol{ppi020}{105}"],["2aa1","\\NestedLessLess{}"],["2aa2","\\NestedGreaterGreater{}"],["2aaf","\\preceq{}"],["2ab0","\\succeq{}"],["2ab5","\\precneqq{}"],["2ab6","\\succneqq{}"],["2ab7","\\precapprox{}"],["2ab8","\\succapprox{}"],["2ab9","\\precnapprox{}"],["2aba","\\succnapprox{}"],["2ac5","\\subseteqq{}"],["2ac6","\\supseteqq{}"],["2acb","\\subsetneqq{}"],["2acc","\\supsetneqq{}"],["2aeb","\\ElsevierGlyph{E30D}"],["2af6","\\Elztdcol{}"],["2afd","{{/}\\!\\!{/}}"],["300a","\\ElsevierGlyph{300A}"],["300b","\\ElsevierGlyph{300B}"],["3018","\\ElsevierGlyph{3018}"],["3019","\\ElsevierGlyph{3019}"],["301a","\\openbracketleft{}"],["301b","\\openbracketright{}"],["fb00","ff"],["fb01","fi"],["fb02","fl"],["fb03","ffi"],["fb04","ffl"],["d400","\\mathbf{A}"],["d401","\\mathbf{B}"],["d402","\\mathbf{C}"],["d403","\\mathbf{D}"],["d404","\\mathbf{E}"],["d405","\\mathbf{F}"],["d406","\\mathbf{G}"],["d407","\\mathbf{H}"],["d408","\\mathbf{I}"],["d409","\\mathbf{J}"],["d40a","\\mathbf{K}"],["d40b","\\mathbf{L}"],["d40c","\\mathbf{M}"],["d40d","\\mathbf{N}"],["d40e","\\mathbf{O}"],["d40f","\\mathbf{P}"],["d410","\\mathbf{Q}"],["d411","\\mathbf{R}"],["d412","\\mathbf{S}"],["d413","\\mathbf{T}"],["d414","\\mathbf{U}"],["d415","\\mathbf{V}"],["d416","\\mathbf{W}"],["d417","\\mathbf{X}"],["d418","\\mathbf{Y}"],["d419","\\mathbf{Z}"],["d41a","\\mathbf{a}"],["d41b","\\mathbf{b}"],["d41c","\\mathbf{c}"],["d41d","\\mathbf{d}"],["d41e","\\mathbf{e}"],["d41f","\\mathbf{f}"],["d420","\\mathbf{g}"],["d421","\\mathbf{h}"],["d422","\\mathbf{i}"],["d423","\\mathbf{j}"],["d424","\\mathbf{k}"],["d425","\\mathbf{l}"],["d426","\\mathbf{m}"],["d427","\\mathbf{n}"],["d428","\\mathbf{o}"],["d429","\\mathbf{p}"],["d42a","\\mathbf{q}"],["d42b","\\mathbf{r}"],["d42c","\\mathbf{s}"],["d42d","\\mathbf{t}"],["d42e","\\mathbf{u}"],["d42f","\\mathbf{v}"],["d430","\\mathbf{w}"],["d431","\\mathbf{x}"],["d432","\\mathbf{y}"],["d433","\\mathbf{z}"],["d434","\\mathsl{A}"],["d435","\\mathsl{B}"],["d436","\\mathsl{C}"],["d437","\\mathsl{D}"],["d438","\\mathsl{E}"],["d439","\\mathsl{F}"],["d43a","\\mathsl{G}"],["d43b","\\mathsl{H}"],["d43c","\\mathsl{I}"],["d43d","\\mathsl{J}"],["d43e","\\mathsl{K}"],["d43f","\\mathsl{L}"],["d440","\\mathsl{M}"],["d441","\\mathsl{N}"],["d442","\\mathsl{O}"],["d443","\\mathsl{P}"],["d444","\\mathsl{Q}"],["d445","\\mathsl{R}"],["d446","\\mathsl{S}"],["d447","\\mathsl{T}"],["d448","\\mathsl{U}"],["d449","\\mathsl{V}"],["d44a","\\mathsl{W}"],["d44b","\\mathsl{X}"],["d44c","\\mathsl{Y}"],["d44d","\\mathsl{Z}"],["d44e","\\mathsl{a}"],["d44f","\\mathsl{b}"],["d450","\\mathsl{c}"],["d451","\\mathsl{d}"],["d452","\\mathsl{e}"],["d453","\\mathsl{f}"],["d454","\\mathsl{g}"],["d456","\\mathsl{i}"],["d457","\\mathsl{j}"],["d458","\\mathsl{k}"],["d459","\\mathsl{l}"],["d45a","\\mathsl{m}"],["d45b","\\mathsl{n}"],["d45c","\\mathsl{o}"],["d45d","\\mathsl{p}"],["d45e","\\mathsl{q}"],["d45f","\\mathsl{r}"],["d460","\\mathsl{s}"],["d461","\\mathsl{t}"],["d462","\\mathsl{u}"],["d463","\\mathsl{v}"],["d464","\\mathsl{w}"],["d465","\\mathsl{x}"],["d466","\\mathsl{y}"],["d467","\\mathsl{z}"],["d468","\\mathbit{A}"],["d469","\\mathbit{B}"],["d46a","\\mathbit{C}"],["d46b","\\mathbit{D}"],["d46c","\\mathbit{E}"],["d46d","\\mathbit{F}"],["d46e","\\mathbit{G}"],["d46f","\\mathbit{H}"],["d470","\\mathbit{I}"],["d471","\\mathbit{J}"],["d472","\\mathbit{K}"],["d473","\\mathbit{L}"],["d474","\\mathbit{M}"],["d475","\\mathbit{N}"],["d476","\\mathbit{O}"],["d477","\\mathbit{P}"],["d478","\\mathbit{Q}"],["d479","\\mathbit{R}"],["d47a","\\mathbit{S}"],["d47b","\\mathbit{T}"],["d47c","\\mathbit{U}"],["d47d","\\mathbit{V}"],["d47e","\\mathbit{W}"],["d47f","\\mathbit{X}"],["d480","\\mathbit{Y}"],["d481","\\mathbit{Z}"],["d482","\\mathbit{a}"],["d483","\\mathbit{b}"],["d484","\\mathbit{c}"],["d485","\\mathbit{d}"],["d486","\\mathbit{e}"],["d487","\\mathbit{f}"],["d488","\\mathbit{g}"],["d489","\\mathbit{h}"],["d48a","\\mathbit{i}"],["d48b","\\mathbit{j}"],["d48c","\\mathbit{k}"],["d48d","\\mathbit{l}"],["d48e","\\mathbit{m}"],["d48f","\\mathbit{n}"],["d490","\\mathbit{o}"],["d491","\\mathbit{p}"],["d492","\\mathbit{q}"],["d493","\\mathbit{r}"],["d494","\\mathbit{s}"],["d495","\\mathbit{t}"],["d496","\\mathbit{u}"],["d497","\\mathbit{v}"],["d498","\\mathbit{w}"],["d499","\\mathbit{x}"],["d49a","\\mathbit{y}"],["d49b","\\mathbit{z}"],["d49c","\\mathscr{A}"],["d49e","\\mathscr{C}"],["d49f","\\mathscr{D}"],["d4a2","\\mathscr{G}"],["d4a5","\\mathscr{J}"],["d4a6","\\mathscr{K}"],["d4a9","\\mathscr{N}"],["d4aa","\\mathscr{O}"],["d4ab","\\mathscr{P}"],["d4ac","\\mathscr{Q}"],["d4ae","\\mathscr{S}"],["d4af","\\mathscr{T}"],["d4b0","\\mathscr{U}"],["d4b1","\\mathscr{V}"],["d4b2","\\mathscr{W}"],["d4b3","\\mathscr{X}"],["d4b4","\\mathscr{Y}"],["d4b5","\\mathscr{Z}"],["d4b6","\\mathscr{a}"],["d4b7","\\mathscr{b}"],["d4b8","\\mathscr{c}"],["d4b9","\\mathscr{d}"],["d4bb","\\mathscr{f}"],["d4bd","\\mathscr{h}"],["d4be","\\mathscr{i}"],["d4bf","\\mathscr{j}"],["d4c0","\\mathscr{k}"],["d4c1","\\mathscr{l}"],["d4c2","\\mathscr{m}"],["d4c3","\\mathscr{n}"],["d4c5","\\mathscr{p}"],["d4c6","\\mathscr{q}"],["d4c7","\\mathscr{r}"],["d4c8","\\mathscr{s}"],["d4c9","\\mathscr{t}"],["d4ca","\\mathscr{u}"],["d4cb","\\mathscr{v}"],["d4cc","\\mathscr{w}"],["d4cd","\\mathscr{x}"],["d4ce","\\mathscr{y}"],["d4cf","\\mathscr{z}"],["d4d0","\\mathmit{A}"],["d4d1","\\mathmit{B}"],["d4d2","\\mathmit{C}"],["d4d3","\\mathmit{D}"],["d4d4","\\mathmit{E}"],["d4d5","\\mathmit{F}"],["d4d6","\\mathmit{G}"],["d4d7","\\mathmit{H}"],["d4d8","\\mathmit{I}"],["d4d9","\\mathmit{J}"],["d4da","\\mathmit{K}"],["d4db","\\mathmit{L}"],["d4dc","\\mathmit{M}"],["d4dd","\\mathmit{N}"],["d4de","\\mathmit{O}"],["d4df","\\mathmit{P}"],["d4e0","\\mathmit{Q}"],["d4e1","\\mathmit{R}"],["d4e2","\\mathmit{S}"],["d4e3","\\mathmit{T}"],["d4e4","\\mathmit{U}"],["d4e5","\\mathmit{V}"],["d4e6","\\mathmit{W}"],["d4e7","\\mathmit{X}"],["d4e8","\\mathmit{Y}"],["d4e9","\\mathmit{Z}"],["d4ea","\\mathmit{a}"],["d4eb","\\mathmit{b}"],["d4ec","\\mathmit{c}"],["d4ed","\\mathmit{d}"],["d4ee","\\mathmit{e}"],["d4ef","\\mathmit{f}"],["d4f0","\\mathmit{g}"],["d4f1","\\mathmit{h}"],["d4f2","\\mathmit{i}"],["d4f3","\\mathmit{j}"],["d4f4","\\mathmit{k}"],["d4f5","\\mathmit{l}"],["d4f6","\\mathmit{m}"],["d4f7","\\mathmit{n}"],["d4f8","\\mathmit{o}"],["d4f9","\\mathmit{p}"],["d4fa","\\mathmit{q}"],["d4fb","\\mathmit{r}"],["d4fc","\\mathmit{s}"],["d4fd","\\mathmit{t}"],["d4fe","\\mathmit{u}"],["d4ff","\\mathmit{v}"],["d500","\\mathmit{w}"],["d501","\\mathmit{x}"],["d502","\\mathmit{y}"],["d503","\\mathmit{z}"],["d504","\\mathfrak{A}"],["d505","\\mathfrak{B}"],["d507","\\mathfrak{D}"],["d508","\\mathfrak{E}"],["d509","\\mathfrak{F}"],["d50a","\\mathfrak{G}"],["d50d","\\mathfrak{J}"],["d50e","\\mathfrak{K}"],["d50f","\\mathfrak{L}"],["d510","\\mathfrak{M}"],["d511","\\mathfrak{N}"],["d512","\\mathfrak{O}"],["d513","\\mathfrak{P}"],["d514","\\mathfrak{Q}"],["d516","\\mathfrak{S}"],["d517","\\mathfrak{T}"],["d518","\\mathfrak{U}"],["d519","\\mathfrak{V}"],["d51a","\\mathfrak{W}"],["d51b","\\mathfrak{X}"],["d51c","\\mathfrak{Y}"],["d51e","\\mathfrak{a}"],["d51f","\\mathfrak{b}"],["d520","\\mathfrak{c}"],["d521","\\mathfrak{d}"],["d522","\\mathfrak{e}"],["d523","\\mathfrak{f}"],["d524","\\mathfrak{g}"],["d525","\\mathfrak{h}"],["d526","\\mathfrak{i}"],["d527","\\mathfrak{j}"],["d528","\\mathfrak{k}"],["d529","\\mathfrak{l}"],["d52a","\\mathfrak{m}"],["d52b","\\mathfrak{n}"],["d52c","\\mathfrak{o}"],["d52d","\\mathfrak{p}"],["d52e","\\mathfrak{q}"],["d52f","\\mathfrak{r}"],["d530","\\mathfrak{s}"],["d531","\\mathfrak{t}"],["d532","\\mathfrak{u}"],["d533","\\mathfrak{v}"],["d534","\\mathfrak{w}"],["d535","\\mathfrak{x}"],["d536","\\mathfrak{y}"],["d537","\\mathfrak{z}"],["d538","\\mathbb{A}"],["d539","\\mathbb{B}"],["d53b","\\mathbb{D}"],["d53c","\\mathbb{E}"],["d53d","\\mathbb{F}"],["d53e","\\mathbb{G}"],["d540","\\mathbb{I}"],["d541","\\mathbb{J}"],["d542","\\mathbb{K}"],["d543","\\mathbb{L}"],["d544","\\mathbb{M}"],["d546","\\mathbb{O}"],["d54a","\\mathbb{S}"],["d54b","\\mathbb{T}"],["d54c","\\mathbb{U}"],["d54d","\\mathbb{V}"],["d54e","\\mathbb{W}"],["d54f","\\mathbb{X}"],["d550","\\mathbb{Y}"],["d552","\\mathbb{a}"],["d553","\\mathbb{b}"],["d554","\\mathbb{c}"],["d555","\\mathbb{d}"],["d556","\\mathbb{e}"],["d557","\\mathbb{f}"],["d558","\\mathbb{g}"],["d559","\\mathbb{h}"],["d55a","\\mathbb{i}"],["d55b","\\mathbb{j}"],["d55c","\\mathbb{k}"],["d55d","\\mathbb{l}"],["d55e","\\mathbb{m}"],["d55f","\\mathbb{n}"],["d560","\\mathbb{o}"],["d561","\\mathbb{p}"],["d562","\\mathbb{q}"],["d563","\\mathbb{r}"],["d564","\\mathbb{s}"],["d565","\\mathbb{t}"],["d566","\\mathbb{u}"],["d567","\\mathbb{v}"],["d568","\\mathbb{w}"],["d569","\\mathbb{x}"],["d56a","\\mathbb{y}"],["d56b","\\mathbb{z}"],["d56c","\\mathslbb{A}"],["d56d","\\mathslbb{B}"],["d56e","\\mathslbb{C}"],["d56f","\\mathslbb{D}"],["d570","\\mathslbb{E}"],["d571","\\mathslbb{F}"],["d572","\\mathslbb{G}"],["d573","\\mathslbb{H}"],["d574","\\mathslbb{I}"],["d575","\\mathslbb{J}"],["d576","\\mathslbb{K}"],["d577","\\mathslbb{L}"],["d578","\\mathslbb{M}"],["d579","\\mathslbb{N}"],["d57a","\\mathslbb{O}"],["d57b","\\mathslbb{P}"],["d57c","\\mathslbb{Q}"],["d57d","\\mathslbb{R}"],["d57e","\\mathslbb{S}"],["d57f","\\mathslbb{T}"],["d580","\\mathslbb{U}"],["d581","\\mathslbb{V}"],["d582","\\mathslbb{W}"],["d583","\\mathslbb{X}"],["d584","\\mathslbb{Y}"],["d585","\\mathslbb{Z}"],["d586","\\mathslbb{a}"],["d587","\\mathslbb{b}"],["d588","\\mathslbb{c}"],["d589","\\mathslbb{d}"],["d58a","\\mathslbb{e}"],["d58b","\\mathslbb{f}"],["d58c","\\mathslbb{g}"],["d58d","\\mathslbb{h}"],["d58e","\\mathslbb{i}"],["d58f","\\mathslbb{j}"],["d590","\\mathslbb{k}"],["d591","\\mathslbb{l}"],["d592","\\mathslbb{m}"],["d593","\\mathslbb{n}"],["d594","\\mathslbb{o}"],["d595","\\mathslbb{p}"],["d596","\\mathslbb{q}"],["d597","\\mathslbb{r}"],["d598","\\mathslbb{s}"],["d599","\\mathslbb{t}"],["d59a","\\mathslbb{u}"],["d59b","\\mathslbb{v}"],["d59c","\\mathslbb{w}"],["d59d","\\mathslbb{x}"],["d59e","\\mathslbb{y}"],["d59f","\\mathslbb{z}"],["d5a0","\\mathsf{A}"],["d5a1","\\mathsf{B}"],["d5a2","\\mathsf{C}"],["d5a3","\\mathsf{D}"],["d5a4","\\mathsf{E}"],["d5a5","\\mathsf{F}"],["d5a6","\\mathsf{G}"],["d5a7","\\mathsf{H}"],["d5a8","\\mathsf{I}"],["d5a9","\\mathsf{J}"],["d5aa","\\mathsf{K}"],["d5ab","\\mathsf{L}"],["d5ac","\\mathsf{M}"],["d5ad","\\mathsf{N}"],["d5ae","\\mathsf{O}"],["d5af","\\mathsf{P}"],["d5b0","\\mathsf{Q}"],["d5b1","\\mathsf{R}"],["d5b2","\\mathsf{S}"],["d5b3","\\mathsf{T}"],["d5b4","\\mathsf{U}"],["d5b5","\\mathsf{V}"],["d5b6","\\mathsf{W}"],["d5b7","\\mathsf{X}"],["d5b8","\\mathsf{Y}"],["d5b9","\\mathsf{Z}"],["d5ba","\\mathsf{a}"],["d5bb","\\mathsf{b}"],["d5bc","\\mathsf{c}"],["d5bd","\\mathsf{d}"],["d5be","\\mathsf{e}"],["d5bf","\\mathsf{f}"],["d5c0","\\mathsf{g}"],["d5c1","\\mathsf{h}"],["d5c2","\\mathsf{i}"],["d5c3","\\mathsf{j}"],["d5c4","\\mathsf{k}"],["d5c5","\\mathsf{l}"],["d5c6","\\mathsf{m}"],["d5c7","\\mathsf{n}"],["d5c8","\\mathsf{o}"],["d5c9","\\mathsf{p}"],["d5ca","\\mathsf{q}"],["d5cb","\\mathsf{r}"],["d5cc","\\mathsf{s}"],["d5cd","\\mathsf{t}"],["d5ce","\\mathsf{u}"],["d5cf","\\mathsf{v}"],["d5d0","\\mathsf{w}"],["d5d1","\\mathsf{x}"],["d5d2","\\mathsf{y}"],["d5d3","\\mathsf{z}"],["d5d4","\\mathsfbf{A}"],["d5d5","\\mathsfbf{B}"],["d5d6","\\mathsfbf{C}"],["d5d7","\\mathsfbf{D}"],["d5d8","\\mathsfbf{E}"],["d5d9","\\mathsfbf{F}"],["d5da","\\mathsfbf{G}"],["d5db","\\mathsfbf{H}"],["d5dc","\\mathsfbf{I}"],["d5dd","\\mathsfbf{J}"],["d5de","\\mathsfbf{K}"],["d5df","\\mathsfbf{L}"],["d5e0","\\mathsfbf{M}"],["d5e1","\\mathsfbf{N}"],["d5e2","\\mathsfbf{O}"],["d5e3","\\mathsfbf{P}"],["d5e4","\\mathsfbf{Q}"],["d5e5","\\mathsfbf{R}"],["d5e6","\\mathsfbf{S}"],["d5e7","\\mathsfbf{T}"],["d5e8","\\mathsfbf{U}"],["d5e9","\\mathsfbf{V}"],["d5ea","\\mathsfbf{W}"],["d5eb","\\mathsfbf{X}"],["d5ec","\\mathsfbf{Y}"],["d5ed","\\mathsfbf{Z}"],["d5ee","\\mathsfbf{a}"],["d5ef","\\mathsfbf{b}"],["d5f0","\\mathsfbf{c}"],["d5f1","\\mathsfbf{d}"],["d5f2","\\mathsfbf{e}"],["d5f3","\\mathsfbf{f}"],["d5f4","\\mathsfbf{g}"],["d5f5","\\mathsfbf{h}"],["d5f6","\\mathsfbf{i}"],["d5f7","\\mathsfbf{j}"],["d5f8","\\mathsfbf{k}"],["d5f9","\\mathsfbf{l}"],["d5fa","\\mathsfbf{m}"],["d5fb","\\mathsfbf{n}"],["d5fc","\\mathsfbf{o}"],["d5fd","\\mathsfbf{p}"],["d5fe","\\mathsfbf{q}"],["d5ff","\\mathsfbf{r}"],["d600","\\mathsfbf{s}"],["d601","\\mathsfbf{t}"],["d602","\\mathsfbf{u}"],["d603","\\mathsfbf{v}"],["d604","\\mathsfbf{w}"],["d605","\\mathsfbf{x}"],["d606","\\mathsfbf{y}"],["d607","\\mathsfbf{z}"],["d608","\\mathsfsl{A}"],["d609","\\mathsfsl{B}"],["d60a","\\mathsfsl{C}"],["d60b","\\mathsfsl{D}"],["d60c","\\mathsfsl{E}"],["d60d","\\mathsfsl{F}"],["d60e","\\mathsfsl{G}"],["d60f","\\mathsfsl{H}"],["d610","\\mathsfsl{I}"],["d611","\\mathsfsl{J}"],["d612","\\mathsfsl{K}"],["d613","\\mathsfsl{L}"],["d614","\\mathsfsl{M}"],["d615","\\mathsfsl{N}"],["d616","\\mathsfsl{O}"],["d617","\\mathsfsl{P}"],["d618","\\mathsfsl{Q}"],["d619","\\mathsfsl{R}"],["d61a","\\mathsfsl{S}"],["d61b","\\mathsfsl{T}"],["d61c","\\mathsfsl{U}"],["d61d","\\mathsfsl{V}"],["d61e","\\mathsfsl{W}"],["d61f","\\mathsfsl{X}"],["d620","\\mathsfsl{Y}"],["d621","\\mathsfsl{Z}"],["d622","\\mathsfsl{a}"],["d623","\\mathsfsl{b}"],["d624","\\mathsfsl{c}"],["d625","\\mathsfsl{d}"],["d626","\\mathsfsl{e}"],["d627","\\mathsfsl{f}"],["d628","\\mathsfsl{g}"],["d629","\\mathsfsl{h}"],["d62a","\\mathsfsl{i}"],["d62b","\\mathsfsl{j}"],["d62c","\\mathsfsl{k}"],["d62d","\\mathsfsl{l}"],["d62e","\\mathsfsl{m}"],["d62f","\\mathsfsl{n}"],["d630","\\mathsfsl{o}"],["d631","\\mathsfsl{p}"],["d632","\\mathsfsl{q}"],["d633","\\mathsfsl{r}"],["d634","\\mathsfsl{s}"],["d635","\\mathsfsl{t}"],["d636","\\mathsfsl{u}"],["d637","\\mathsfsl{v}"],["d638","\\mathsfsl{w}"],["d639","\\mathsfsl{x}"],["d63a","\\mathsfsl{y}"],["d63b","\\mathsfsl{z}"],["d63c","\\mathsfbfsl{A}"],["d63d","\\mathsfbfsl{B}"],["d63e","\\mathsfbfsl{C}"],["d63f","\\mathsfbfsl{D}"],["d640","\\mathsfbfsl{E}"],["d641","\\mathsfbfsl{F}"],["d642","\\mathsfbfsl{G}"],["d643","\\mathsfbfsl{H}"],["d644","\\mathsfbfsl{I}"],["d645","\\mathsfbfsl{J}"],["d646","\\mathsfbfsl{K}"],["d647","\\mathsfbfsl{L}"],["d648","\\mathsfbfsl{M}"],["d649","\\mathsfbfsl{N}"],["d64a","\\mathsfbfsl{O}"],["d64b","\\mathsfbfsl{P}"],["d64c","\\mathsfbfsl{Q}"],["d64d","\\mathsfbfsl{R}"],["d64e","\\mathsfbfsl{S}"],["d64f","\\mathsfbfsl{T}"],["d650","\\mathsfbfsl{U}"],["d651","\\mathsfbfsl{V}"],["d652","\\mathsfbfsl{W}"],["d653","\\mathsfbfsl{X}"],["d654","\\mathsfbfsl{Y}"],["d655","\\mathsfbfsl{Z}"],["d656","\\mathsfbfsl{a}"],["d657","\\mathsfbfsl{b}"],["d658","\\mathsfbfsl{c}"],["d659","\\mathsfbfsl{d}"],["d65a","\\mathsfbfsl{e}"],["d65b","\\mathsfbfsl{f}"],["d65c","\\mathsfbfsl{g}"],["d65d","\\mathsfbfsl{h}"],["d65e","\\mathsfbfsl{i}"],["d65f","\\mathsfbfsl{j}"],["d660","\\mathsfbfsl{k}"],["d661","\\mathsfbfsl{l}"],["d662","\\mathsfbfsl{m}"],["d663","\\mathsfbfsl{n}"],["d664","\\mathsfbfsl{o}"],["d665","\\mathsfbfsl{p}"],["d666","\\mathsfbfsl{q}"],["d667","\\mathsfbfsl{r}"],["d668","\\mathsfbfsl{s}"],["d669","\\mathsfbfsl{t}"],["d66a","\\mathsfbfsl{u}"],["d66b","\\mathsfbfsl{v}"],["d66c","\\mathsfbfsl{w}"],["d66d","\\mathsfbfsl{x}"],["d66e","\\mathsfbfsl{y}"],["d66f","\\mathsfbfsl{z}"],["d670","\\mathtt{A}"],["d671","\\mathtt{B}"],["d672","\\mathtt{C}"],["d673","\\mathtt{D}"],["d674","\\mathtt{E}"],["d675","\\mathtt{F}"],["d676","\\mathtt{G}"],["d677","\\mathtt{H}"],["d678","\\mathtt{I}"],["d679","\\mathtt{J}"],["d67a","\\mathtt{K}"],["d67b","\\mathtt{L}"],["d67c","\\mathtt{M}"],["d67d","\\mathtt{N}"],["d67e","\\mathtt{O}"],["d67f","\\mathtt{P}"],["d680","\\mathtt{Q}"],["d681","\\mathtt{R}"],["d682","\\mathtt{S}"],["d683","\\mathtt{T}"],["d684","\\mathtt{U}"],["d685","\\mathtt{V}"],["d686","\\mathtt{W}"],["d687","\\mathtt{X}"],["d688","\\mathtt{Y}"],["d689","\\mathtt{Z}"],["d68a","\\mathtt{a}"],["d68b","\\mathtt{b}"],["d68c","\\mathtt{c}"],["d68d","\\mathtt{d}"],["d68e","\\mathtt{e}"],["d68f","\\mathtt{f}"],["d690","\\mathtt{g}"],["d691","\\mathtt{h}"],["d692","\\mathtt{i}"],["d693","\\mathtt{j}"],["d694","\\mathtt{k}"],["d695","\\mathtt{l}"],["d696","\\mathtt{m}"],["d697","\\mathtt{n}"],["d698","\\mathtt{o}"],["d699","\\mathtt{p}"],["d69a","\\mathtt{q}"],["d69b","\\mathtt{r}"],["d69c","\\mathtt{s}"],["d69d","\\mathtt{t}"],["d69e","\\mathtt{u}"],["d69f","\\mathtt{v}"],["d6a0","\\mathtt{w}"],["d6a1","\\mathtt{x}"],["d6a2","\\mathtt{y}"],["d6a3","\\mathtt{z}"],["d6a8","\\mathbf{\\Alpha}"],["d6a9","\\mathbf{\\Beta}"],["d6aa","\\mathbf{\\Gamma}"],["d6ab","\\mathbf{\\Delta}"],["d6ac","\\mathbf{\\Epsilon}"],["d6ad","\\mathbf{\\Zeta}"],["d6ae","\\mathbf{\\Eta}"],["d6af","\\mathbf{\\Theta}"],["d6b0","\\mathbf{\\Iota}"],["d6b1","\\mathbf{\\Kappa}"],["d6b2","\\mathbf{\\Lambda}"],["d6b5","\\mathbf{\\Xi}"],["d6b7","\\mathbf{\\Pi}"],["d6b8","\\mathbf{\\Rho}"],["d6b9","\\mathbf{\\vartheta}"],["d6ba","\\mathbf{\\Sigma}"],["d6bb","\\mathbf{\\Tau}"],["d6bc","\\mathbf{\\Upsilon}"],["d6bd","\\mathbf{\\Phi}"],["d6be","\\mathbf{\\Chi}"],["d6bf","\\mathbf{\\Psi}"],["d6c0","\\mathbf{\\Omega}"],["d6c1","\\mathbf{\\nabla}"],["d6c2","\\mathbf{\\Alpha}"],["d6c3","\\mathbf{\\Beta}"],["d6c4","\\mathbf{\\Gamma}"],["d6c5","\\mathbf{\\Delta}"],["d6c6","\\mathbf{\\Epsilon}"],["d6c7","\\mathbf{\\Zeta}"],["d6c8","\\mathbf{\\Eta}"],["d6c9","\\mathbf{\\theta}"],["d6ca","\\mathbf{\\Iota}"],["d6cb","\\mathbf{\\Kappa}"],["d6cc","\\mathbf{\\Lambda}"],["d6cf","\\mathbf{\\Xi}"],["d6d1","\\mathbf{\\Pi}"],["d6d2","\\mathbf{\\Rho}"],["d6d3","\\mathbf{\\varsigma}"],["d6d4","\\mathbf{\\Sigma}"],["d6d5","\\mathbf{\\Tau}"],["d6d6","\\mathbf{\\Upsilon}"],["d6d7","\\mathbf{\\Phi}"],["d6d8","\\mathbf{\\Chi}"],["d6d9","\\mathbf{\\Psi}"],["d6da","\\mathbf{\\Omega}"],["d6db","\\partial{}"],["d6dc","\\in"],["d6dd","\\mathbf{\\vartheta}"],["d6de","\\mathbf{\\varkappa}"],["d6df","\\mathbf{\\phi}"],["d6e0","\\mathbf{\\varrho}"],["d6e1","\\mathbf{\\varpi}"],["d6e2","\\mathsl{\\Alpha}"],["d6e3","\\mathsl{\\Beta}"],["d6e4","\\mathsl{\\Gamma}"],["d6e5","\\mathsl{\\Delta}"],["d6e6","\\mathsl{\\Epsilon}"],["d6e7","\\mathsl{\\Zeta}"],["d6e8","\\mathsl{\\Eta}"],["d6e9","\\mathsl{\\Theta}"],["d6ea","\\mathsl{\\Iota}"],["d6eb","\\mathsl{\\Kappa}"],["d6ec","\\mathsl{\\Lambda}"],["d6ef","\\mathsl{\\Xi}"],["d6f1","\\mathsl{\\Pi}"],["d6f2","\\mathsl{\\Rho}"],["d6f3","\\mathsl{\\vartheta}"],["d6f4","\\mathsl{\\Sigma}"],["d6f5","\\mathsl{\\Tau}"],["d6f6","\\mathsl{\\Upsilon}"],["d6f7","\\mathsl{\\Phi}"],["d6f8","\\mathsl{\\Chi}"],["d6f9","\\mathsl{\\Psi}"],["d6fa","\\mathsl{\\Omega}"],["d6fb","\\mathsl{\\nabla}"],["d6fc","\\mathsl{\\Alpha}"],["d6fd","\\mathsl{\\Beta}"],["d6fe","\\mathsl{\\Gamma}"],["d6ff","\\mathsl{\\Delta}"],["d700","\\mathsl{\\Epsilon}"],["d701","\\mathsl{\\Zeta}"],["d702","\\mathsl{\\Eta}"],["d703","\\mathsl{\\Theta}"],["d704","\\mathsl{\\Iota}"],["d705","\\mathsl{\\Kappa}"],["d706","\\mathsl{\\Lambda}"],["d709","\\mathsl{\\Xi}"],["d70b","\\mathsl{\\Pi}"],["d70c","\\mathsl{\\Rho}"],["d70d","\\mathsl{\\varsigma}"],["d70e","\\mathsl{\\Sigma}"],["d70f","\\mathsl{\\Tau}"],["d710","\\mathsl{\\Upsilon}"],["d711","\\mathsl{\\Phi}"],["d712","\\mathsl{\\Chi}"],["d713","\\mathsl{\\Psi}"],["d714","\\mathsl{\\Omega}"],["d715","\\partial{}"],["d716","\\in"],["d717","\\mathsl{\\vartheta}"],["d718","\\mathsl{\\varkappa}"],["d719","\\mathsl{\\phi}"],["d71a","\\mathsl{\\varrho}"],["d71b","\\mathsl{\\varpi}"],["d71c","\\mathbit{\\Alpha}"],["d71d","\\mathbit{\\Beta}"],["d71e","\\mathbit{\\Gamma}"],["d71f","\\mathbit{\\Delta}"],["d720","\\mathbit{\\Epsilon}"],["d721","\\mathbit{\\Zeta}"],["d722","\\mathbit{\\Eta}"],["d723","\\mathbit{\\Theta}"],["d724","\\mathbit{\\Iota}"],["d725","\\mathbit{\\Kappa}"],["d726","\\mathbit{\\Lambda}"],["d729","\\mathbit{\\Xi}"],["d72b","\\mathbit{\\Pi}"],["d72c","\\mathbit{\\Rho}"],["d72d","\\mathbit{O}"],["d72e","\\mathbit{\\Sigma}"],["d72f","\\mathbit{\\Tau}"],["d730","\\mathbit{\\Upsilon}"],["d731","\\mathbit{\\Phi}"],["d732","\\mathbit{\\Chi}"],["d733","\\mathbit{\\Psi}"],["d734","\\mathbit{\\Omega}"],["d735","\\mathbit{\\nabla}"],["d736","\\mathbit{\\Alpha}"],["d737","\\mathbit{\\Beta}"],["d738","\\mathbit{\\Gamma}"],["d739","\\mathbit{\\Delta}"],["d73a","\\mathbit{\\Epsilon}"],["d73b","\\mathbit{\\Zeta}"],["d73c","\\mathbit{\\Eta}"],["d73d","\\mathbit{\\Theta}"],["d73e","\\mathbit{\\Iota}"],["d73f","\\mathbit{\\Kappa}"],["d740","\\mathbit{\\Lambda}"],["d743","\\mathbit{\\Xi}"],["d745","\\mathbit{\\Pi}"],["d746","\\mathbit{\\Rho}"],["d747","\\mathbit{\\varsigma}"],["d748","\\mathbit{\\Sigma}"],["d749","\\mathbit{\\Tau}"],["d74a","\\mathbit{\\Upsilon}"],["d74b","\\mathbit{\\Phi}"],["d74c","\\mathbit{\\Chi}"],["d74d","\\mathbit{\\Psi}"],["d74e","\\mathbit{\\Omega}"],["d74f","\\partial{}"],["d750","\\in"],["d751","\\mathbit{\\vartheta}"],["d752","\\mathbit{\\varkappa}"],["d753","\\mathbit{\\phi}"],["d754","\\mathbit{\\varrho}"],["d755","\\mathbit{\\varpi}"],["d756","\\mathsfbf{\\Alpha}"],["d757","\\mathsfbf{\\Beta}"],["d758","\\mathsfbf{\\Gamma}"],["d759","\\mathsfbf{\\Delta}"],["d75a","\\mathsfbf{\\Epsilon}"],["d75b","\\mathsfbf{\\Zeta}"],["d75c","\\mathsfbf{\\Eta}"],["d75d","\\mathsfbf{\\Theta}"],["d75e","\\mathsfbf{\\Iota}"],["d75f","\\mathsfbf{\\Kappa}"],["d760","\\mathsfbf{\\Lambda}"],["d763","\\mathsfbf{\\Xi}"],["d765","\\mathsfbf{\\Pi}"],["d766","\\mathsfbf{\\Rho}"],["d767","\\mathsfbf{\\vartheta}"],["d768","\\mathsfbf{\\Sigma}"],["d769","\\mathsfbf{\\Tau}"],["d76a","\\mathsfbf{\\Upsilon}"],["d76b","\\mathsfbf{\\Phi}"],["d76c","\\mathsfbf{\\Chi}"],["d76d","\\mathsfbf{\\Psi}"],["d76e","\\mathsfbf{\\Omega}"],["d76f","\\mathsfbf{\\nabla}"],["d770","\\mathsfbf{\\Alpha}"],["d771","\\mathsfbf{\\Beta}"],["d772","\\mathsfbf{\\Gamma}"],["d773","\\mathsfbf{\\Delta}"],["d774","\\mathsfbf{\\Epsilon}"],["d775","\\mathsfbf{\\Zeta}"],["d776","\\mathsfbf{\\Eta}"],["d777","\\mathsfbf{\\Theta}"],["d778","\\mathsfbf{\\Iota}"],["d779","\\mathsfbf{\\Kappa}"],["d77a","\\mathsfbf{\\Lambda}"],["d77d","\\mathsfbf{\\Xi}"],["d77f","\\mathsfbf{\\Pi}"],["d780","\\mathsfbf{\\Rho}"],["d781","\\mathsfbf{\\varsigma}"],["d782","\\mathsfbf{\\Sigma}"],["d783","\\mathsfbf{\\Tau}"],["d784","\\mathsfbf{\\Upsilon}"],["d785","\\mathsfbf{\\Phi}"],["d786","\\mathsfbf{\\Chi}"],["d787","\\mathsfbf{\\Psi}"],["d788","\\mathsfbf{\\Omega}"],["d789","\\partial{}"],["d78a","\\in"],["d78b","\\mathsfbf{\\vartheta}"],["d78c","\\mathsfbf{\\varkappa}"],["d78d","\\mathsfbf{\\phi}"],["d78e","\\mathsfbf{\\varrho}"],["d78f","\\mathsfbf{\\varpi}"],["d790","\\mathsfbfsl{\\Alpha}"],["d791","\\mathsfbfsl{\\Beta}"],["d792","\\mathsfbfsl{\\Gamma}"],["d793","\\mathsfbfsl{\\Delta}"],["d794","\\mathsfbfsl{\\Epsilon}"],["d795","\\mathsfbfsl{\\Zeta}"],["d796","\\mathsfbfsl{\\Eta}"],["d797","\\mathsfbfsl{\\vartheta}"],["d798","\\mathsfbfsl{\\Iota}"],["d799","\\mathsfbfsl{\\Kappa}"],["d79a","\\mathsfbfsl{\\Lambda}"],["d79d","\\mathsfbfsl{\\Xi}"],["d79f","\\mathsfbfsl{\\Pi}"],["d7a0","\\mathsfbfsl{\\Rho}"],["d7a1","\\mathsfbfsl{\\vartheta}"],["d7a2","\\mathsfbfsl{\\Sigma}"],["d7a3","\\mathsfbfsl{\\Tau}"],["d7a4","\\mathsfbfsl{\\Upsilon}"],["d7a5","\\mathsfbfsl{\\Phi}"],["d7a6","\\mathsfbfsl{\\Chi}"],["d7a7","\\mathsfbfsl{\\Psi}"],["d7a8","\\mathsfbfsl{\\Omega}"],["d7a9","\\mathsfbfsl{\\nabla}"],["d7aa","\\mathsfbfsl{\\Alpha}"],["d7ab","\\mathsfbfsl{\\Beta}"],["d7ac","\\mathsfbfsl{\\Gamma}"],["d7ad","\\mathsfbfsl{\\Delta}"],["d7ae","\\mathsfbfsl{\\Epsilon}"],["d7af","\\mathsfbfsl{\\Zeta}"],["d7b0","\\mathsfbfsl{\\Eta}"],["d7b1","\\mathsfbfsl{\\vartheta}"],["d7b2","\\mathsfbfsl{\\Iota}"],["d7b3","\\mathsfbfsl{\\Kappa}"],["d7b4","\\mathsfbfsl{\\Lambda}"],["d7b7","\\mathsfbfsl{\\Xi}"],["d7b9","\\mathsfbfsl{\\Pi}"],["d7ba","\\mathsfbfsl{\\Rho}"],["d7bb","\\mathsfbfsl{\\varsigma}"],["d7bc","\\mathsfbfsl{\\Sigma}"],["d7bd","\\mathsfbfsl{\\Tau}"],["d7be","\\mathsfbfsl{\\Upsilon}"],["d7bf","\\mathsfbfsl{\\Phi}"],["d7c0","\\mathsfbfsl{\\Chi}"],["d7c1","\\mathsfbfsl{\\Psi}"],["d7c2","\\mathsfbfsl{\\Omega}"],["d7c3","\\partial{}"],["d7c4","\\in"],["d7c5","\\mathsfbfsl{\\vartheta}"],["d7c6","\\mathsfbfsl{\\varkappa}"],["d7c7","\\mathsfbfsl{\\phi}"],["d7c8","\\mathsfbfsl{\\varrho}"],["d7c9","\\mathsfbfsl{\\varpi}"],["d7ce","\\mathbf{0}"],["d7cf","\\mathbf{1}"],["d7d0","\\mathbf{2}"],["d7d1","\\mathbf{3}"],["d7d2","\\mathbf{4}"],["d7d3","\\mathbf{5}"],["d7d4","\\mathbf{6}"],["d7d5","\\mathbf{7}"],["d7d6","\\mathbf{8}"],["d7d7","\\mathbf{9}"],["d7d8","\\mathbb{0}"],["d7d9","\\mathbb{1}"],["d7da","\\mathbb{2}"],["d7db","\\mathbb{3}"],["d7dc","\\mathbb{4}"],["d7dd","\\mathbb{5}"],["d7de","\\mathbb{6}"],["d7df","\\mathbb{7}"],["d7e0","\\mathbb{8}"],["d7e1","\\mathbb{9}"],["d7e2","\\mathsf{0}"],["d7e3","\\mathsf{1}"],["d7e4","\\mathsf{2}"],["d7e5","\\mathsf{3}"],["d7e6","\\mathsf{4}"],["d7e7","\\mathsf{5}"],["d7e8","\\mathsf{6}"],["d7e9","\\mathsf{7}"],["d7ea","\\mathsf{8}"],["d7eb","\\mathsf{9}"],["d7ec","\\mathsfbf{0}"],["d7ed","\\mathsfbf{1}"],["d7ee","\\mathsfbf{2}"],["d7ef","\\mathsfbf{3}"],["d7f0","\\mathsfbf{4}"],["d7f1","\\mathsfbf{5}"],["d7f2","\\mathsfbf{6}"],["d7f3","\\mathsfbf{7}"],["d7f4","\\mathsfbf{8}"],["d7f5","\\mathsfbf{9}"],["d7f6","\\mathtt{0}"],["d7f7","\\mathtt{1}"],["d7f8","\\mathtt{2}"],["d7f9","\\mathtt{3}"],["d7fa","\\mathtt{4}"],["d7fb","\\mathtt{5}"],["d7fc","\\mathtt{6}"],["d7fd","\\mathtt{7}"],["d7fe","\\mathtt{8}"],["d7ff","\\mathtt{9}"]]);function l1(r){var s;let e=r,t=[];e=e.replace(/\$[^$]+\$/g,o=>(t.push(o),"MATH.EXP.".concat(t.length-1)));let i="",n=!1;for(let o=0;o{var a;return(a=t[Number(l)])!=null?a:""})}h(l1,"escapeSpecialCharacters");function a1(r){return r.replace(/(\w)(\S*)/g,(e,t,i)=>{let n=t+i;return QC(n)?n:t.toLocaleUpperCase()+i.toLocaleLowerCase()})}h(a1,"titleCase");function QC(r){return/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(r)}h(QC,"isRomanNumeral");function Sr(r){return r.replace(/[^0-9A-Za-z]/g,"").toLocaleLowerCase()}h(Sr,"alphaNum");function h1(r){return r.replace(/\r\n?/g,"\n")}h(h1,"convertCRLF");function c1(r,e){let t=r.split(" "),i=[],n="";for(let[s,o]of t.entries())n.length+o.length+1>e&&s>0&&(i.push(n.trim()),n=""),n+="".concat(o," ");return[...i,n.trim()]}h(c1,"wrapText");function f1(r){return r.replace(/\s*\n\s*\n\s*/g,"<>").replace(/\s*\n\s*/g," ").replace(/<>/g,"\n\n")}h(f1,"unwrapText");function Hh(r){var n,s,o,l;let e=kr(r),t=e.children.length===1&&((n=e.children[0])==null?void 0:n.type)==="block"&&((s=e.children[0])==null?void 0:s.kind)==="curly"&&e.children[0].children.length===1&&((o=e.children[0].children[0])==null?void 0:o.type)==="block"&&((l=e.children[0].children[0])==null?void 0:l.kind)==="curly",i=bo(e);return t?i:"{".concat(i,"}")}h(Hh,"doubleEnclose");function u1(r){return r.replace(/^\{([^{}]*)\}$/g,"$1")}h(u1,"removeEnclosingBraces");function d1(r){return r.replace(/\\?_/g,"\\%5F")}h(d1,"escapeURL");function p1(r,e){let t=r.split(" and ");return t.length>e?[...t.slice(0,e),"others"].join(" and "):r}h(p1,"limitAuthors");function m1(r){let e=r;for(let t=0;t<4;t++)e=e.replace(/(\d)\s*-\s*(\d)/g,"$1--$2");return e}h(m1,"formatPageRange");function Yh(r){var e;return r.type!=="text"&&((e=r.block)==null?void 0:e.type)==="entry"}h(Yh,"isEntryNode");var BC=["url","doi","eprint","file","verba","verbb","verbc","pdf"];function b1(r,e,t){let{omit:i,tab:n,space:s}=e,o=n?" ":" ".repeat(s),l=new Set(i),a=r.children.map(c=>EC(c,e,o,l,t)).join("").trimEnd();return a.endsWith("\n")||(a+="\n"),a}h(b1,"formatBibtex");function EC(r,e,t,i,n){if(r.type==="text")return g1(r.text,e);if(!r.block)throw new Error("FATAL!");switch(r.block.type){case"preamble":case"string":return"".concat(r.block.raw,"\n").concat(e.blankLines?"\n":"");case"comment":return g1(r.block.raw,e);case"entry":return CC(r.command,r.block,e,t,i,n==null?void 0:n.get(r.block))+(e.blankLines?"\n":"")}}h(EC,"formatNode");function CC(r,e,t,i,n,s){let{align:o,trailingCommas:l,removeDuplicateFields:a,removeEmptyFields:c,lowercase:f}=t,u="",d=f?r.toLocaleLowerCase():r;u+="@".concat(d,"{");let p=s!=null?s:e.key;p&&(u+="".concat(p,","));let m=new Set;for(let[y,g]of e.fields.entries()){let b=g.name.toLocaleLowerCase(),x=f?b:g.name;if(g.name!==""&&!n.has(b)&&!(a&&m.has(b))){if(m.add(b),g.value.concat.length===0){if(c)continue;u+="\n".concat(i).concat(x)}else{let w=Jh(g,t);if(c&&(w==="{}"||w==='""'))continue;u+="\n".concat(i).concat(x.trim().padEnd(o-1)," = ").concat(w)}(yE.toLocaleLowerCase())),w=new Set((m!=null?m:[]).map(E=>E.toLocaleLowerCase()));return r.value.concat.map(({type:E,value:S})=>{let T=S.match(/^[1-9][0-9]*$/);if(T&&t&&(E="braced"),y&&g==="month"){let j=s1[S.toLowerCase()];if(j)return j}if(E==="literal"||i&&T)return S;let L=S.slice(0,3).toLowerCase(),z=g==="month"&&n1.has(L);if(!t&&i&&z)return L;if(S=f1(S),s&&(S=u1(S)),o&&!S.match(/[a-z]/)&&(S=a1(S)),g==="url"&&a&&(S=d1(S)),!BC.includes(g)&&l&&(S=l1(S)),g==="pages"&&(S=m1(S)),g==="author"&&f&&(S=p1(S,f)),w.has(g)&&(S=bo(zh(kr(S)))),x.has(g)&&(E==="braced"||t)&&(S=Hh(S)),E==="braced"&&r.value.concat.length===1&&(S=S.trim()),E==="braced"||t){let j="".concat(b).concat(n,"{").concat(S,"}").length,G=S.includes("\n\n");if(c&&j>c||G){let N=S.split("\n\n"),H=b.repeat(2);if(c){let te=c;N=N.map(P=>c1(P,te-H.length).join("\n".concat(H)))}S="\n".concat(H).concat(N.join("\n\n".concat(H)),"\n").concat(b)}return Hh(S)}return'"'.concat(S,'"')}).join(" # ")}h(Jh,"formatValue");var y1=["doi","citation","abstract"];var yo=["title","shorttitle","author","year","month","day","journal","booktitle","location","on","publisher","address","series","volume","number","pages","doi","isbn","issn","url","urldate","copyright","category","note","metadata"],Gh=["key"],x1="[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]",wr=[{key:"help",cli:{"--help":!0,"-h":!0},title:"Help",description:["Show help"],type:"boolean"},{key:"v2",cli:{"--v2":!0},title:"Enable planned v2 CLI changes",description:["Input files will no longer be modified by default. Instead, you will need to specify `--modify`/`-m` option to overwrite the file, or `--output`/`-o` to output to a different file."],type:"string",defaultValue:void 0},{key:"outputPath",cli:{"--output":h(r=>r[0],"--output"),"-o":h(r=>r[0],"-o")},title:"Output path",description:["Write output to specified path. When omitted (and -m/--modify is not used), the result will be printed to stdout."],type:"string",defaultValue:void 0},{key:"modify",cli:{"--modify":!0,"-m":!0,"--no-modify":!1},title:"Modify input files",description:["Overwrite the original input files with the tidied result. This is enabled by default but will be disabled by default in v2. For v1, use --no-modify to output to stdout instead of overwriting the input files."],type:"boolean",defaultValue:!0},{key:"omit",cli:{"--omit":h(r=>(r.length===0&&(console.error("Expected a omit list"),process.exit(1)),r),"--omit")},toCLI:h(r=>Array.isArray(r)&&r.length>0?"--omit=".concat(r.join(",")):void 0,"toCLI"),title:"Remove fields",description:["Remove specified fields from bibliography entries."],examples:["--omit=id,name"],type:"string[]",defaultValue:[]},{key:"curly",cli:{"--curly":!0,"--no-curly":!1},toCLI:h(r=>r?"--curly":void 0,"toCLI"),title:"Enclose values in braces",description:['Enclose all property values in braces. Quoted values will be converted to braces. For example, "Journal of Tea" will become {Journal of Tea}.'],type:"boolean",defaultValue:!1},{key:"numeric",cli:{"--numeric":!0,"--no-numeric":!1},toCLI:h(r=>r?"--numeric":void 0,"toCLI"),title:"Use numeric values where possible",description:["Strip quotes and braces from numeric/month values. For example, {1998} will become 1998."],type:"boolean",defaultValue:!1},{key:"months",cli:{"--months":!0},toCLI:h(r=>r?"--months":void 0,"toCLI"),title:"Abbreviate months",description:["Convert all months to three letter abbreviations (jan, feb, etc)."],type:"boolean",defaultValue:!1},{key:"space",cli:{"--space":h(r=>r.length>0?Number(r[0]):!0,"--space")},toCLI:h((r,e)=>{if(!e.tab){if(typeof r=="number"&&r!==2)return"--space=".concat(r);if(r&&r!==2)return"--space"}},"toCLI"),title:"Indent with spaces",description:["Indent all fields with the specified number of spaces. Ignored if tab is set."],examples:["--space=2 (default)","--space=4"],type:"boolean | number",convertBoolean:{true:2,false:void 0},defaultValue:2},{key:"tab",cli:{"--tab":!0,"--no-tab":!1},toCLI:h(r=>r?"--tab":void 0,"toCLI"),title:"Indent with tabs",description:["Indent all fields with a tab."],type:"boolean",defaultValue:!1},{key:"align",cli:{"--align":h(r=>Number(r[0]),"--align"),"--no-align":!1},toCLI:h(r=>{if(r===!1||r===1||r===0)return"--no-align";if(typeof r=="number"&&r!==14)return"--align=".concat(r)},"toCLI"),title:"Align values",description:["Insert whitespace between fields and values so that values are visually aligned."],examples:["--align=14 (default)"],type:"boolean | number",convertBoolean:{true:14,false:1},defaultValue:14},{key:"blankLines",cli:{"--blank-lines":!0,"--no-blank-lines":!1},toCLI:h(r=>r?"--blank-lines":void 0,"toCLI"),title:"Insert blank lines",description:["Insert an empty line between each entry."],type:"boolean"},{key:"sort",cli:{"--sort":h(r=>r.length>0?r:!0,"--sort"),"--no-sort":!1},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return"--sort=".concat(r.join(","));if(r===!0)return"--sort"},"toCLI"),title:"Sort bibliography entries",description:["Sort entries by the specified field names (citation key is used if no fields are specified). For descending order, prefix the field with a dash (-).","Multiple fields may be specified to sort everything by first field, then by the second field whenever the first field for entries are equal, etc.","The following additional fields are also permitted: key (entry citation key), type (sorts by the type of entry, e.g. article), and special (ensures that @string, @preamble, @set, and @xdata entries are first). "],examples:["--sort (sort by citation key)","--sort=-year,name (sort year descending then name ascending)","--sort=name,year"],type:"boolean | string[]",convertBoolean:{true:Gh,false:void 0}},{key:"duplicates",cli:{"--duplicates":h(r=>{if(r.length===0)return!0;for(let e of r)e!=="doi"&&e!=="key"&&e!=="abstract"&&e!=="citation"&&(console.error('Invalid key for merge option: "'.concat(e,'"')),process.exit(1));return r},"--duplicates")},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return"--duplicates=".concat(r.join(","));if(r===!0)return"--duplicates"},"toCLI"),title:"Check for duplicates",description:["Warn if duplicates are found, which are entries where DOI, abstract, or author and title are the same."],examples:["--duplicates doi (same DOIs)","--duplicates key (same IDs)","--duplicates abstract (similar abstracts)","--duplicates citation (similar author and titles)","--duplicates doi, key (identical DOI or keys)","--duplicates (same DOI, key, abstract, or citation)"],type:"boolean | ('doi' | 'key' | 'abstract' | 'citation')[]",convertBoolean:{true:y1,false:void 0},defaultValue:h(r=>r.merge?y1:void 0,"defaultValue")},{key:"merge",cli:{"--merge":h(r=>r.length===0?!0:(r[0]!=="first"&&r[0]!=="last"&&r[0]!=="combine"&&r[0]!=="overwrite"&&(console.error('Invalid merge strategy: "'.concat(r[0],'"')),process.exit(1)),r[0]),"--merge"),"--no-merge":!1},toCLI:h(r=>{if(typeof r=="string")return"--merge=".concat(r);if(r)return"--merge"},"toCLI"),title:"Merge duplicate entries",description:["Merge duplicates entries. Use the duplicates option to determine how duplicates are identified. There are different ways to merge:","- first: only keep the original entry","- last: only keep the last found duplicate","- combine: keep original entry and merge in fields of duplicates if they do not already exist","- overwrite: keep original entry and merge in fields of duplicates, overwriting existing fields if they exist"],type:"boolean | 'first' | 'last' | 'combine' | 'overwrite'",convertBoolean:{true:"combine",false:void 0}},{key:"stripEnclosingBraces",cli:{"--strip-enclosing-braces":!0},toCLI:h(r=>r?"--strip-enclosing-braces":void 0,"toCLI"),title:"Strip double-braced values",description:["Where an entire value is enclosed in double braces, remove the extra braces. For example, {{Journal of Tea}} will become {Journal of Tea}."],type:"boolean",defaultValue:!1},{key:"dropAllCaps",cli:{"--drop-all-caps":!0},toCLI:h(r=>r?"--drop-all-caps":void 0,"toCLI"),title:"Drop all caps",description:["Where values are all caps, make them title case. For example, {JOURNAL OF TEA} will become {Journal of Tea}. Roman numerals will be left unchanged."],type:"boolean",defaultValue:!1},{key:"escape",cli:{"--escape":!0,"--no-escape":!1},toCLI:h(r=>r===!1?"--no-escape":void 0,"toCLI"),title:"Escape special characters",description:["Escape special characters, such as umlaut. This ensures correct typesetting with latex. Enabled by default."],type:"boolean",defaultValue:!0},{key:"sortFields",cli:{"--sort-fields":h(r=>r.length>0?r:!0,"--sort-fields")},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return JSON.stringify(r)===JSON.stringify(yo)?"--sort-fields":"--sort-fields=".concat(r.join(","));if(r===!0)return"--sort-fields"},"toCLI"),title:"Sort fields",description:["Sort the fields within entries.","If no fields are specified fields will be sorted by: title, shorttitle, author, year, month, day, journal, booktitle, location, on, publisher, address, series, volume, number, pages, doi, isbn, issn, url, urldate, copyright, category, note, metadata"],examples:["--sort-fields=name,author"],type:"boolean | string[]",convertBoolean:{true:yo,false:void 0},defaultValue:void 0},{key:"sortProperties",cli:{"--sort-properties":h(r=>r.length>0?r:!0,"--sort-properties")},title:"Sort properties",description:["Alias of sort fields (legacy)"],type:"boolean | string[]",deprecated:!0},{key:"stripComments",cli:{"--strip-comments":!0,"--no-strip-comments":!1},toCLI:h(r=>r?"--strip-comments":void 0,"toCLI"),title:"Remove comments",description:["Remove all comments from the bibtex source."],type:"boolean",defaultValue:!1},{key:"trailingCommas",cli:{"--trailing-commas":!0,"--no-trailing-commas":!0},toCLI:h(r=>r?"--trailing-commas":void 0,"toCLI"),title:"Trailing commas",description:["End the last key value pair in each entry with a comma."],type:"boolean",defaultValue:!1},{key:"encodeUrls",cli:{"--encode-urls":!0,"--no-encode-urls":!0},toCLI:h(r=>r?"--encode-urls":void 0,"toCLI"),title:"Encode URLs",description:["Replace invalid URL characters with percent encoded values."],type:"boolean",defaultValue:!1},{key:"tidyComments",cli:{"--tidy-comments":!0,"--no-tidy-comments":!1},toCLI:h(r=>r===!1?"--no-tidy-comments":void 0,"toCLI"),title:"Tidy comments",description:["Remove whitespace surrounding comments."],type:"boolean",defaultValue:!0},{key:"removeEmptyFields",cli:{"--remove-empty-fields":!0,"--no-remove-empty-fields":!1},toCLI:h(r=>r?"--remove-empty-fields":void 0,"toCLI"),title:"Remove empty fields",description:["Remove any fields that have empty values."],type:"boolean",defaultValue:!1},{key:"removeDuplicateFields",cli:{"--remove-dupe-fields":!0,"--no-remove-dupe-fields":!1},toCLI:h(r=>r===!1?"--no-remove-dupe-fields":void 0,"toCLI"),title:"Remove duplicate fields",description:["Only allow one of each field in each entry. Enabled by default."],type:"boolean",defaultValue:!0},{key:"generateKeys",cli:{"--generate-keys":h(r=>r.length>0?r:!0,"--generate-keys")},toCLI:h(r=>{if(r===!0||r===x1)return"--generate-keys";if(typeof r=="string")return'--generate-keys="'.concat(r.replace(/"/g,'\\"'),'"')},"toCLI"),title:"Generate citation keys [Experimental]",description:["For all entries replace the key with a new key of the form . A JabRef citation pattern can be provided. This is an experimental option that may change without warning."],type:"boolean | string",convertBoolean:{true:x1,false:void 0},defaultValue:void 0},{key:"maxAuthors",cli:{"--max-authors":h(r=>Number(r[0]),"--max-authors")},toCLI:h(r=>r?"--max-authors=".concat(r):void 0,"toCLI"),title:"Maximum authors",description:['Truncate authors if above a given number into "and others".'],type:"number"},{key:"lowercase",cli:{"--no-lowercase":!1},toCLI:h(r=>r===!1?"--no-lowercase":void 0,"toCLI"),title:"Lowercase fields",description:["Lowercase field names and entry type. Enabled by default."],type:"boolean",defaultValue:!0},{key:"enclosingBraces",cli:{"--enclosing-braces":h(r=>r.length>0?r:!0,"--enclosing-braces")},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return"--enclosing-braces=".concat(r.join(","));if(r===!0)return"--enclosing-braces"},"toCLI"),title:"Enclose values in double braces",description:["Enclose the given fields in double braces, such that case is preserved during BibTeX compilation."],examples:["--enclosing-braces=title,journal (output title and journal fields will be of the form {{This is a title}})","--enclosing-braces (equivalent to ---enclosing-braces=title)"],type:"boolean | string[]",convertBoolean:{true:["title"],false:void 0}},{key:"removeBraces",cli:{"--remove-braces":h(r=>r.length>0?r:!0,"--remove-braces")},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return"--remove-braces=".concat(r.join(","));if(r===!0)return"--remove-braces"},"toCLI"),title:"Remove braces",description:["Remove any curly braces within the value, unless they are part of a command."],examples:["--remove-braces=title,journal","--remove-braces (equivalent to ---remove-braces=title)"],type:"boolean | string[]",convertBoolean:{true:["title"],false:void 0}},{key:"wrap",cli:{"--wrap":h(r=>r.length>0?Number(r[0]):!0,"--wrap"),"--no-wrap":!1},toCLI:h(r=>r?"--wrap=".concat(r):void 0,"toCLI"),title:"Wrap values",description:["Wrap long values at the given column"],examples:["--wrap (80 by default)","--wrap=82"],type:"boolean | number",convertBoolean:{true:80,false:void 0}},{key:"version",cli:{"--version":!0,"-v":!0},title:"Version",description:["Show bibtex-tidy version."],type:"boolean"},{key:"quiet",cli:{"--quiet":!0},title:"Quiet",description:["Suppress logs on stdout."],type:"boolean"},{key:"backup",cli:{"--backup":!0,"--no-backup":!1},title:"Backup",description:["Make a backup <filename>.original. Enabled by default (unless --modify is explicitly provided or outputting to a different file/stdio). Deprecated but provided for backward compatibility."],type:"boolean",defaultValue:!0,deprecated:!0}];function Ti(r){return Object.fromEntries(wr.map(e=>{let t=e.key,i=r[t];return e.convertBoolean&&typeof i=="boolean"?[t,i?e.convertBoolean.true:e.convertBoolean.false]:typeof i>"u"&&e.defaultValue!==void 0?typeof e.defaultValue=="function"?[t,e.defaultValue(r)]:[t,e.defaultValue]:[t,i]}))}h(Ti,"normalizeOptions");var Xh=class Xh{constructor(e=Ti({})){this.tidyOptions=e;this.valueLookup=new Map;this.fieldLookup=new Map;this.renderValueLookup=new Map}lookupEntryValue(e,t){var s,o;let i=t.toLocaleLowerCase(),n=(s=this.valueLookup.get(e))==null?void 0:s.get(t);if(n===void 0){let l=this.lookupField(e,i);l?n=(o=Jh(l,this.tidyOptions))!=null?o:"":n="",this.valueLookup.set(e,new Map([[i,n]]))}return n}lookupField(e,t){var n;let i=(n=this.fieldLookup.get(e))==null?void 0:n.get(t);return i===void 0&&(i=e.fields.find(s=>s.name.toLocaleLowerCase()===t)),i}lookupRenderedEntryValue(e,t){var s;let i=t.toLocaleLowerCase(),n=(s=this.renderValueLookup.get(e))==null?void 0:s.get(t);if(n===void 0){let o=this.lookupEntryValue(e,i);n=kr(o).renderAsText(),this.renderValueLookup.set(e,new Map([[i,n]]))}return n}lookupRenderedEntryValues(e){let t=new Map;for(let i of e.fields)t.set(i.name,this.lookupRenderedEntryValue(e,i.name));return t}};h(Xh,"Cache");var xo=Xh;function Di(r){return r.split(/\s+and\s+/i).map(LC)}h(Di,"parseNameList");function UC(r){let e=r.filter(n=>n.type==="name"),t=r.filter(n=>n.type==="prefix"),i=r.filter(n=>n.type==="comma");if(r.length===0)return"Empty";if(r.length===1&&Ze(r)==="others")return"Others";if(r.length===e.length&&r.length===1)return"LastName";if(r.length===e.length)return"FirstName LastNames";if(t.length>0&&i.length===0)return"FirstNames Prefixes LastNames";if(i.length===1)return"LastNames, FirstNames Prefixes";if(i.length===2)return"LastNames, Suffixes, FirstNames Prefixes";throw new Error("Invalid name syntax: ".concat(r.map(n=>n.type).join(" ")))}h(UC,"detectNameSyntax");function LC(r){let e=OC(r);switch(UC(e)){case"Empty":return{first:"",last:"",pre:"",suf:""};case"Others":return{first:"",last:"others",pre:"",suf:""};case"LastName":return{first:"",last:Ze(e),pre:"",suf:""};case"FirstName LastNames":{let[t,i]=vo(e,["name","name"]);return{first:Ze(t),last:Ze(i),pre:"",suf:""}}case"FirstNames Prefixes LastNames":{let[t,i,n]=vo(e,["name","prefix","name"]);return{first:Ze(t),pre:Ze(i),last:Ze(n),suf:""}}case"LastNames, FirstNames Prefixes":{let[t,i,n]=vo(e,["name","comma","prefix"]);return{last:Ze(t),first:Ze(i),pre:Ze(n),suf:""}}case"LastNames, Suffixes, FirstNames Prefixes":{let[t,i,n,s]=vo(e,["name","comma","comma","prefix"]);return{last:Ze(t),suf:Ze(i),first:Ze(n),pre:Ze(s)}}}}h(LC,"parseName");function OC(r){let e=[],t="";function i(){t&&e.push({type:_C(t)?"prefix":"name",value:t})}h(i,"flushToken");for(let n of r)n===","?(i(),e.push({type:"comma"}),t=""):/\s/.test(n)?(i(),t=""):t+=n;return i(),e}h(OC,"tokeniseName");function Ze(r){return r.filter(e=>e.type!=="comma").map(e=>e.value).join(" ")}h(Ze,"nameStr");function _C(r){return/^[a-z]/.test(r)}h(_C,"isPrefixToken");function vo(r,e){var n;let t=e.map(()=>[]),i=-1;for(let s of r)e[i+1]===s.type&&i++,(n=t[i])==null||n.push(s);return t}h(vo,"partition");function v1(r,e,t,i){var u,d;let n=new Map;if(t)for(let p of t)n.set(p,!!i);n.has("key")||n.set("key",!1);let s=new Set,o=[],l=new Map,a=new Map,c=new Map,f=new Map;for(let p of r)for(let[m,y]of n){let g,b;switch(m){case"key":{if(!p.key)continue;let x=p.key.toLocaleLowerCase();g=l.get(x),g?b="The citation key ".concat(p.key," has already been used."):l.set(x,p);break}case"doi":{let x=Sr(e.lookupEntryValue(p,"doi"));if(!x)continue;g=a.get(x),g?b="Entry ".concat(p.key," has an identical DOI to entry ").concat(g.key,"."):a.set(x,p);break}case"citation":{let x=e.lookupEntryValue(p,"title"),w=e.lookupEntryValue(p,"author"),E=e.lookupEntryValue(p,"number");if(!x||!w)continue;let S=[Sr((d=(u=Di(w)[0])==null?void 0:u.last)!=null?d:w),Sr(x),Sr(E!=null?E:"0")].join(":");g=c.get(S),g?b="Entry ".concat(p.key," has similar content to entry ").concat(g.key,"."):c.set(S,p);break}case"abstract":{let w=Sr(e.lookupEntryValue(p,"abstract")).slice(0,100);if(!w)continue;g=f.get(w),g?b="Entry ".concat(p.key," has a similar abstract to entry ").concat(g.key,"."):f.set(w,p);break}}g&&y&&(s.add(p),TC(i,g,p)),b&&o.push({code:"DUPLICATE_ENTRY",rule:m,message:"Duplicate ".concat(y?"removed":"detected",". ").concat(b)})}return{entries:s,warnings:o}}h(v1,"checkForDuplicates");function TC(r,e,t){if(r)switch(r){case"last":e.key=t.key,e.fields=t.fields;break;case"combine":case"overwrite":for(let i of t.fields){let n=e.fields.find(s=>s.name.toLocaleLowerCase()===i.name.toLocaleLowerCase());n?r==="overwrite"&&(n.value=i.value):e.fields.push(i)}break;case"first":return}}h(TC,"mergeEntries");function k1(r){let e=[],t=r.matchAll(/\[[^:\]]+(?::[^:\]]+)*\]/g),i=0;for(let n of t){if(n.index===void 0)break;n.index!==i&&e.push(r.slice(i,n.index));let[s,...o]=n[0].slice(1,-1).split(":");if(!s)throw new Error("Token parse error");let l,a=s.replace(/[0-9]+/g,c=>(l=Number(c),"N"));e.push({marker:a,parameter:l,modifiers:o}),i=n.index+n[0].length}return i<r.length&&e.push(r.slice(i)),e}h(k1,"parseEntryKeyTemplate");var DC={auth:{description:"Last name of first authors",callback:h(r=>{var i,n;let t=(n=Di((i=r.get("author"))!=null?i:"")[0])==null?void 0:n.last;return t?[t]:[]},"callback")},authEtAl:{description:"If 1 or 2 authors, both authors, otherwise first author and EtAl",callback:h(r=>{var t;let e=Di((t=r.get("author"))!=null?t:"");return[...e.slice(0,2).map(i=>i.last),...e.length>2?["Et","Al"]:[]]},"callback")},authors:{description:"Last name all authors",callback:h(r=>{var t;return Di((t=r.get("author"))!=null?t:"").map(i=>i.last)},"callback")},authorsN:{description:"Last name N authors, with EtAl if more",callback:h((r,e=0)=>{var i;let t=Di((i=r.get("author"))!=null?i:"");return[...t.slice(0,e).map(n=>n.last),...t.length>e?["Et","Al"]:[]]},"callback")},veryshorttitle:{description:"First non-function word of the title",callback:h(r=>w1(ko(r)).slice(0,1),"callback")},shorttitle:{description:"First three non-function words of the title",callback:h(r=>w1(ko(r)).slice(0,3),"callback")},title:{description:"Full title, capitalized",callback:h(r=>Q1(wo(ko(r))),"callback")},fulltitle:{description:"Full title, verbatim",callback:h(r=>wo(ko(r)),"callback")},year:{description:"Year",callback:h(r=>{var t;let e=(t=r.get("year"))==null?void 0:t.replace(/[^0-9]/g,"");return e?[e]:[]},"callback")},duplicateLetter:{description:"If the multiple entries end up with the same key, then insert a letter a-z. By default this will be inserted at the end.",callback:h((r,e,t)=>[t?NC(t):""],"callback")},duplicateNumber:{description:"If the multiple entries end up with the same key, then insert a number.",callback:h((r,e,t)=>[t?String(t):""],"callback")}};function NC(r){return String.fromCharCode(96+r)}h(NC,"numToLetter");var RC={required:{description:"If data is missing, revert to existing key",callback:h(r=>{if(r.length===0)throw new So;return r},"callback")},lower:{description:"Convert to lowercase",callback:h(r=>r.map(e=>e.toLocaleLowerCase()),"callback")},upper:{description:"Convert to uppercase",callback:h(r=>r.map(e=>e.toLocaleUpperCase()),"callback")},capitalize:{description:"Capitalize first letter of each word",callback:Q1}},Kh=class Kh extends Error{};h(Kh,"MissingRequiredData");var So=Kh;function F1(r,e,t){var l;let i=t;!t.includes("[duplicateLetter]")&&!t.includes("[duplicateNumber]")&&(i="".concat(t,"[duplicateLetter]"));let n=k1(i),s=new Map;for(let a of r){let c=e.lookupRenderedEntryValues(a),f=S1(c,n);if(!f)continue;let u=(l=s.get(f))!=null?l:[];u.push(a),s.set(f,u)}let o=new Map;for(let[a,c]of s){let f=c.length>1;for(let u=0;u<c.length;u++){let d=c[u];if(!d)continue;let p=e.lookupRenderedEntryValues(d),m=f?S1(p,n,u+1):a;m&&o.set(d,m)}}return o}h(F1,"generateKeys");function S1(r,e,t){try{let i=e.map(n=>{if(typeof n=="string")return n;let{marker:s,parameter:o,modifiers:l}=n,a=DC[s],c;if(a)c=a.callback(r,o,t);else if(s===s.toLocaleUpperCase()){let f=r.get(s.toLocaleLowerCase());c=f?wo(f):[]}else throw new Error("Invalid citation key token ".concat(s));for(let f of l){let u=RC[f];if(u)c=u.callback(c);else throw new Error("Invalid modifier ".concat(f))}return c.join("")}).join("");return i=MC(i),i===""?void 0:i}catch(i){if(i instanceof So)return;throw i}}h(S1,"generateKey");var AC=new Set(["a","about","above","across","against","along","among","an","and","around","at","before","behind","below","beneath","beside","between","beyond","but","by","down","during","except","for","for","from","in","inside","into","like","near","nor","of","off","on","onto","or","since","so","the","through","to","toward","under","until","up","upon","with","within","without","yet"]);function w1(r){return wo(r).filter(e=>!AC.has(e.toLocaleLowerCase()))}h(w1,"nonFunctionWords");function wo(r){return r.split(/[\s.,:;]+/).filter(e=>e.length>0)}h(wo,"words");function Q1(r){return r.map(e=>e.slice(0,1).toLocaleUpperCase()+e.slice(1).toLocaleLowerCase())}h(Q1,"capitalize");function ko(r){var e,t;return(t=(e=r.get("title"))!=null?e:r.get("booktitle"))!=null?t:""}h(ko,"title");function MC(r){return r.replace(/[{},\s\\#%~()"'=.,:;[\]_]+/g,"")}h(MC,"removeUnsafeEntryKeyChars");var ac=class ac{constructor(e=[]){this.children=e;this.type="root"}};h(ac,"RootNode");var Zh=ac,hc=class hc{constructor(e,t){this.parent=e;this.text=t;this.type="text";e.children.push(this)}};h(hc,"TextNode");var Fr=hc,cc=class cc{constructor(e){this.parent=e;this.type="block";this.command="";e.children.push(this)}};h(cc,"BlockNode");var Qo=cc,fc=class fc{constructor(e,t,i,n){this.parent=e;this.raw=t;this.braces=i;this.parens=n;this.type="comment";e.block=this}};h(fc,"CommentNode");var ec=fc,uc=class uc{constructor(e,t,i,n){this.parent=e;this.raw=t;this.braces=i;this.parens=n;this.type="preamble";e.block=this}};h(uc,"PreambleNode");var tc=uc,dc=class dc{constructor(e,t,i,n){this.parent=e;this.raw=t;this.braces=i;this.parens=n;this.type="string";e.block=this}};h(dc,"StringNode");var ic=dc,pc=class pc{constructor(e,t){this.parent=e;this.wrapType=t;this.type="entry";e.block=this,this.fields=[]}};h(pc,"EntryNode");var rc=pc,mc=class mc{constructor(e,t=""){this.parent=e;this.name=t;this.type="field";this.value=new nc(this)}};h(mc,"FieldNode");var Ni=mc,gc=class gc{constructor(e){this.parent=e;this.type="concat";this.canConsumeValue=!0;this.concat=[]}};h(gc,"ConcatNode");var nc=gc,bc=class bc{constructor(e,t){this.parent=e;this.value=t;this.type="literal";e.concat.push(this)}};h(bc,"LiteralNode");var sc=bc,yc=class yc{constructor(e){this.parent=e;this.type="braced";this.value="";this.depth=0;e.concat.push(this)}};h(yc,"BracedNode");var oc=yc,xc=class xc{constructor(e){this.parent=e;this.type="quoted";this.value="";this.depth=0;e.concat.push(this)}};h(xc,"QuotedNode");var lc=xc;function E1(r){var s,o,l;let e=new Zh,t=e,i=1,n=0;for(let a=0;a<r.length;a++){let c=(s=r[a])!=null?s:"",f=(o=r[a-1])!=null?o:"";switch(c==="\n"&&(i++,n=0),n++,t.type){case"root":{t=c==="@"?new Qo(t):new Fr(t,c);break}case"text":{c==="@"&&/[\s\r\n}]/.test(f)?t=new Qo(t.parent):t.text+=c;break}case"block":{if(c==="@"){let u=t.parent.children[t.parent.children.length-2];(u==null?void 0:u.type)==="text"?u.text+="@".concat(t.command):(t.parent.children.pop(),new Fr(t.parent,"@".concat(t.command)),t.parent.children.push(t)),t.command=""}else if(c==="{"||c==="("){let u=t.command.trim();if(u===""||/\s/.test(u))t.parent.children.pop(),t=new Fr(t.parent,"@".concat(t.command).concat(c));else{t.command=u;let d=t.command.toLowerCase(),[p,m]=c==="{"?[1,0]:[0,1],y="@".concat(d).concat(c);switch(d){case"string":t=new ic(t,y,p,m);break;case"preamble":t=new tc(t,y,p,m);break;case"comment":t=new ec(t,y,p,m);break;default:t=new rc(t,c);break}}}else c.match(/[=#,})[\]]/)?(t.parent.children.pop(),t=new Fr(t.parent,"@".concat(t.command).concat(c))):t.command+=c;break}case"comment":case"string":case"preamble":c==="{"?t.braces++:c==="}"?t.braces--:c==="("?t.parens++:c===")"&&t.parens--,t.raw+=c,t.braces===0&&t.parens===0&&(t=t.parent.parent);break;case"entry":{if(Fo(c))t.key&&(t.keyEnded=!0);else if(c===",")t=new Ni(t);else if(t.wrapType==="{"&&c==="}"||t.wrapType==="("&&c===")")t=t.parent.parent;else if(c==="="&&t.key&&B1(t.key)){let u=new Ni(t,t.key);t.fields.push(u),t.key=void 0,t=u.value}else{if(t.keyEnded)throw new dt(r,t,a,i,n,"The entry key cannot contain whitespace");if(PC(c))t.key=((l=t.key)!=null?l:"")+c;else throw new dt(r,t,a,i,n,"The entry key cannot contain the character (".concat(c,")"))}break}case"field":{if(c==="}"||c===")")t.name=t.name.trim(),t=t.parent.parent.parent;else if(c==="=")t.name=t.name.trim(),t=t.value;else if(c===",")t.name=t.name.trim(),t=new Ni(t.parent);else if(B1(c))t.name?t.name+=c:Fo(c)||(t.parent.fields.push(t),t.name=c);else throw new dt(r,t,a,i,n);break}case"concat":{if(Fo(c))break;if(t.canConsumeValue){if(/[#=,}()[\]]/.test(c))throw new dt(r,t,a,i,n);t.canConsumeValue=!1,c==="{"?t=new oc(t):c==='"'?t=new lc(t):t=new sc(t,c)}else if(c===",")t=new Ni(t.parent.parent);else if(c==="}"||c===")")t=t.parent.parent.parent.parent;else if(c==="#")t.canConsumeValue=!0;else throw new dt(r,t,a,i,n);break}case"literal":Fo(c)?t=t.parent:c===","?t=new Ni(t.parent.parent.parent):c==="}"?t=t.parent.parent.parent.parent.parent:c==="#"?(t=t.parent,t.canConsumeValue=!0):t.value+=c;break;case"braced":if(c==="}"&&t.depth===0){t=t.parent;break}c==="{"?t.depth++:c==="}"&&t.depth--,t.value+=c;break;case"quoted":if(c==='"'&&t.depth===0){t=t.parent;break}if(c==="{")t.depth++;else if(c==="}"&&(t.depth--,t.depth<0))throw new dt(r,t,a,i,n);t.value+=c;break}}return e}h(E1,"generateAST");function Fo(r){return/^[ \t\n\r]*$/.test(r)}h(Fo,"isWhitespace");function PC(r){return!/[#%{}~$,]/.test(r)}h(PC,"isValidKeyCharacter");function B1(r){return!/[=,{}()[\]]/.test(r)}h(B1,"isValidFieldName");var vc=class vc extends Error{constructor(t,i,n,s,o,l){var a;super("Line ".concat(s,":").concat(o,": Syntax Error in ").concat(i.type," (").concat(l,")\n").concat(t.slice(Math.max(0,n-20),n),">>").concat(t[n],"<<").concat(t.slice(n+1,n+20)));this.node=i;this.line=s;this.column=o;this.hint=l;this.name="Syntax Error",this.char=(a=t[n])!=null?a:""}};h(vc,"BibTeXSyntaxError");var dt=vc;function C1(r,e,t){var s,o,l,a,c;let i=new Map,n=[];for(let f of r.children){if(f.type==="text"||((s=f.block)==null?void 0:s.type)!=="entry"&&!t.includes("special")){n.push(f);continue}let u=new Map;for(let d of t){d.startsWith("-")&&(d=d.slice(1));let p;switch(d){case"key":if(((o=f.block)==null?void 0:o.type)!=="entry")continue;p=(l=f.block.key)!=null?l:"";break;case"type":p=f.command;break;case"month":{if(((a=f.block)==null?void 0:a.type)!=="entry")continue;let m=e.lookupEntryValue(f.block,d),y=m?$h.indexOf(m):-1;p=y>-1?y:"";break}case"special":p=$C(f)?0:1;break;default:if(((c=f.block)==null?void 0:c.type)!=="entry")continue;p=e.lookupEntryValue(f.block,d)}u.set(d,typeof p=="string"?p.toLowerCase():p)}for(i.set(f,u);n.length>0;){let d=n.pop();if(!d)break;i.set(d,u)}}for(let f of[...t].reverse()){let u=f.startsWith("-"),d=u?f.slice(1):f;r.children.sort((p,m)=>{var b,x,w,E;let y=(x=(b=i.get(p))==null?void 0:b.get(d))!=null?x:"\uFFF0",g=(E=(w=i.get(m))==null?void 0:w.get(d))!=null?E:"\uFFF0";return typeof y=="number"&&(y=String(y).padStart(50,"0")),typeof g=="number"&&(g=String(g).padStart(50,"0")),(u?g:y).localeCompare(u?y:g)})}}h(C1,"sortEntries");var IC=new Set(["string","preamble","set","xdata"]);function $C(r){return IC.has(r.command.toLowerCase())}h($C,"isBibLaTeXSpecialEntry");function U1(r,e){for(let t of r)t.fields.sort((i,n)=>{let s=e.indexOf(i.name.toLocaleLowerCase()),o=e.indexOf(n.name.toLocaleLowerCase());return s===-1&&o===-1?0:s===-1?1:o===-1?-1:o<s?1:o>s?-1:0})}h(U1,"sortEntryFields");function Sc(r,e={}){let t=Ti(e),i=h1(r),n=E1(i),s=kc(n),o=kc(n).filter(u=>!u.key).map(u=>({code:"MISSING_KEY",message:"".concat(u.parent.command," entry does not have a citation key.")})),l=new xo(t),a=v1(s,l,t.duplicates,t.merge);o.push(...a.warnings),n.children=n.children.filter(u=>!Yh(u)||!a.entries.has(u.block)),t.sort&&C1(n,l,t.sort),t.sortFields&&U1(s,t.sortFields);let c=t.generateKeys?F1(s,l,t.generateKeys):void 0;return{bibtex:b1(n,t,c),warnings:o,count:s.length}}h(Sc,"tidy");function kc(r){return r.children.filter(Yh).map(e=>e.block)}h(kc,"getEntries");var Ro=class Ro{lineAt(e){if(e<0||e>this.length)throw new RangeError("Invalid position ".concat(e," in document of length ").concat(this.length));return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError("Invalid line number ".concat(e," in ").concat(this.lines,"-line document"));return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Or(this,e,t);let n=[];return this.decompose(0,e,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(t,this.length,n,1),Er.from(n,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Or(this,e,t);let i=[];return this.decompose(e,t,i,0),Er.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),n=new Pi(this),s=new Pi(e);for(let o=t,l=t;;){if(n.next(o),s.next(o),o=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(l+=n.value.length,n.done||l>=i)return!0}}iter(e=1){return new Pi(this,e)}iterRange(e,t=this.length){return new Uo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let n=this.line(e).from;i=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Lo(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ro.empty:e.length<=32?new lt(e):Er.from(lt.split(e,[]))}};h(Ro,"Text");var de=Ro,pt=class pt extends de{constructor(e,t=qC(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,n){for(let s=0;;s++){let o=this.text[s],l=n+o.length;if((t?i:l)>=e)return new Fc(n,l,i,o);n=l+1,i++}}decompose(e,t,i,n){let s=e<=0&&t>=this.length?this:new pt(L1(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(n&1){let o=i.pop(),l=Co(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new pt(l,o.length+s.length));else{let a=l.length>>1;i.push(new pt(l.slice(0,a)),new pt(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof pt))return super.replace(e,t,i);[e,t]=Or(this,e,t);let n=Co(this.text,Co(i.text,L1(this.text,0,e)),t),s=this.length+i.length-(t-e);return n.length<=32?new pt(n,s):Er.from(pt.split(n,[]),s)}sliceString(e,t=this.length,i="\n"){[e,t]=Or(this,e,t);let n="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(n+=i),e<a&&t>s&&(n+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],n=-1;for(let s of e)i.push(s),n+=s.length+1,i.length==32&&(t.push(new pt(i,n)),i=[],n=-1);return n>-1&&t.push(new pt(i,n)),t}};h(pt,"TextLeaf");var lt=pt,mi=class mi extends de{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,n){for(let s=0;;s++){let o=this.children[s],l=n+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,n);n=l+1,i=a+1}}decompose(e,t,i,n){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let c=n&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!c?i.push(l):l.decompose(e-o,t-o,i,c)}o=a+1}}replace(e,t,i){if([e,t]=Or(this,e,t),i.lines<this.lines)for(let n=0,s=0;n<this.children.length;n++){let o=this.children[n],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,i),c=this.lines-o.lines+a.lines;if(a.lines<c>>4&&a.lines>c>>6){let f=this.children.slice();return f[n]=a,new mi(f,this.length-(t-e)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i="\n"){[e,t]=Or(this,e,t);let n="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(n+=i),e<a&&t>o&&(n+=l.sliceString(e-o,t-o,i)),o=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof mi))return 0;let i=0,[n,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,s+=t){if(n==o||s==l)return i;let a=this.children[n],c=e.children[s];if(a!=c)return i+a.scanIdentical(c,t);i+=a.length+1}}static from(e,t=e.reduce((i,n)=>i+n.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let m of e)m.flatten(p);return new lt(p,t)}let n=Math.max(32,i>>5),s=n<<1,o=n>>1,l=[],a=0,c=-1,f=[];function u(p){let m;if(p.lines>s&&p instanceof mi)for(let y of p.children)u(y);else p.lines>o&&(a>o||!a)?(d(),l.push(p)):p instanceof lt&&a&&(m=f[f.length-1])instanceof lt&&p.lines+m.lines<=32?(a+=p.lines,c+=p.length+1,f[f.length-1]=new lt(m.text.concat(p.text),m.length+1+p.length)):(a+p.lines>n&&d(),a+=p.lines,c+=p.length+1,f.push(p))}h(u,"add");function d(){a!=0&&(l.push(f.length==1?f[0]:mi.from(f,c)),c=-1,a=f.length=0)}h(d,"flush");for(let p of e)u(p);return d(),l.length==1?l[0]:new mi(l,t)}};h(mi,"TextNode");var Er=mi;de.empty=new lt([""],0);function qC(r){let e=-1;for(let t of r)e+=t.length+1;return e}h(qC,"textLength");function Co(r,e,t=0,i=1e9){for(let n=0,s=0,o=!0;s<r.length&&n<=i;s++){let l=r[s],a=n+l.length;a>=t&&(a>i&&(l=l.slice(0,i-n)),n<t&&(l=l.slice(t-n)),o?(e[e.length-1]+=l,o=!1):e.push(l)),n=a+1}return e}h(Co,"appendText");function L1(r,e,t){return Co(r,[""],e,t)}h(L1,"sliceText");var Pc=class Pc{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof lt?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],s=this.offsets[i],o=s>>1,l=n instanceof lt?n.text.length:n.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value="\n",this;e--}else if(n instanceof lt){let a=n.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=n.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof lt?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}};h(Pc,"RawTextCursor");var Pi=Pc,Ic=class Ic{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Pi(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=i?n:t<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}};h(Ic,"PartialTextCursor");var Uo=Ic,$c=class $c{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}};h($c,"LineCursor");var Lo=$c;typeof Symbol<"u"&&(de.prototype[Symbol.iterator]=function(){return this.iter()},Pi.prototype[Symbol.iterator]=Uo.prototype[Symbol.iterator]=Lo.prototype[Symbol.iterator]=function(){return this});var qc=class qc{constructor(e,t,i,n){this.from=e,this.to=t,this.number=i,this.text=n}get length(){return this.to-this.from}};h(qc,"Line");var Fc=qc;function Or(r,e,t){return e=Math.max(0,Math.min(r.length,e)),[e,Math.max(e,Math.min(r.length,t))]}h(Or,"clip");var Cr="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(r=>r?parseInt(r,36):1);for(let r=1;r<Cr.length;r++)Cr[r]+=Cr[r-1];function VC(r){for(let e=1;e<Cr.length;e+=2)if(Cr[e]>r)return Cr[e-1]<=r;return!1}h(VC,"isExtendingChar");function O1(r){return r>=127462&&r<=127487}h(O1,"isRegionalIndicator");var _1=8205;function mt(r,e,t=!0,i=!0){return(t?M1:zC)(r,e,i)}h(mt,"findClusterBreak");function M1(r,e,t){if(e==r.length)return e;e&&P1(r.charCodeAt(e))&&I1(r.charCodeAt(e-1))&&e--;let i=kn(r,e);for(e+=Oo(i);e<r.length;){let n=kn(r,e);if(i==_1||n==_1||t&&VC(n))e+=Oo(n),i=n;else if(O1(n)){let s=0,o=e-2;for(;o>=0&&O1(kn(r,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}h(M1,"nextClusterBreak");function zC(r,e,t){for(;e>0;){let i=M1(r,e-2,t);if(i<e)return i;e--}return 0}h(zC,"prevClusterBreak");function P1(r){return r>=56320&&r<57344}h(P1,"surrogateLow");function I1(r){return r>=55296&&r<56320}h(I1,"surrogateHigh");function kn(r,e){let t=r.charCodeAt(e);if(!I1(t)||e+1==r.length)return t;let i=r.charCodeAt(e+1);return P1(i)?(t-55296<<10)+(i-56320)+65536:t}h(kn,"codePointAt");function Oo(r){return r<65536?1:2}h(Oo,"codePointSize");var Qc=/\r\n?|\n/,ze=function(r){return r[r.Simple=0]="Simple",r[r.TrackDel=1]="TrackDel",r[r.TrackBefore=2]="TrackBefore",r[r.TrackAfter=3]="TrackAfter",r}(ze||(ze={})),Br=class Br{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,n=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(i,n,s),n+=s):n+=o,i+=s}}iterChangedRanges(e,t=!1){Bc(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];n<0?e.push(i,n):e.push(n,i)}return new Br(e)}composeDesc(e){return this.empty?e:e.empty?this:$1(this,e)}mapDesc(e,t=!1){return e.empty?this:Ec(this,e,t)}mapPos(e,t=-1,i=ze.Simple){let n=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],c=n+l;if(a<0){if(c>e)return s+(e-n);s+=l}else{if(i!=ze.Simple&&c>=e&&(i==ze.TrackDel&&n<e&&c>e||i==ze.TrackBefore&&n<e||i==ze.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!l)return e==n||t<0?s:s+a;s+=a}n=c}if(e>n)throw new RangeError("Position ".concat(e," is out of range for changeset of length ").concat(n));return s}touchesRange(e,t=e){for(let i=0,n=0;i<this.sections.length&&n<=t;){let s=this.sections[i++],o=this.sections[i++],l=n+s;if(o>=0&&n<=t&&l>=e)return n<e&&l>t?"cover":!0;n=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];e+=(e?" ":"")+i+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Br(e)}static create(e){return new Br(e)}};h(Br,"ChangeDesc");var ri=Br,Pt=class Pt extends ri{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Bc(this,(t,i,n,s,o)=>e=e.replace(n,n+(i-t),o),!1),e}mapDesc(e,t=!1){return Ec(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let n=0,s=0;n<t.length;n+=2){let o=t[n],l=t[n+1];if(l>=0){t[n]=l,t[n+1]=o;let a=n>>1;for(;i.length<a;)i.push(de.empty);i.push(o?e.slice(s,s+o):de.empty)}s+=o}return new Pt(t,i)}compose(e){return this.empty?e:e.empty?this:$1(this,e,!0)}map(e,t=!1){return e.empty?this:Ec(this,e,t,!0)}iterChanges(e,t=!1){Bc(this,e,t)}get desc(){return ri.create(this.sections)}filter(e){let t=[],i=[],n=[],s=new Ii(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let f=Math.min(s.len,a-l);Me(n,f,-1);let u=s.ins==-1?-1:s.off==0?s.ins:0;Me(t,f,u),u>0&&gi(i,t,s.text),s.forward(f),l+=f}let c=e[o++];for(;l<c;){if(s.done)break e;let f=Math.min(s.len,c-l);Me(t,f,-1),Me(n,f,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(f),l+=f}}return{changes:new Pt(t,i),filtered:ri.create(n)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],n=this.sections[t+1];n<0?e.push(i):n==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let n=[],s=[],o=0,l=null;function a(f=!1){if(!f&&!n.length)return;o<t&&Me(n,t-o,-1);let u=new Pt(n,s);l=l?l.compose(u.map(l)):u,n=[],s=[],o=0}h(a,"flush");function c(f){if(Array.isArray(f))for(let u of f)c(u);else if(f instanceof Pt){if(f.length!=t)throw new RangeError("Mismatched change set length (got ".concat(f.length,", expected ").concat(t,")"));a(),l=l?l.compose(f.map(l)):f}else{let{from:u,to:d=u,insert:p}=f;if(u>d||u<0||d>t)throw new RangeError("Invalid change range ".concat(u," to ").concat(d," (in doc of length ").concat(t,")"));let m=p?typeof p=="string"?de.of(p.split(i||Qc)):p:de.empty,y=m.length;if(u==d&&y==0)return;u<o&&a(),u>o&&Me(n,u-o,-1),Me(n,d-u,y),gi(s,n,m),o=d}}return h(c,"process"),c(e),a(!l),l}static empty(e){return new Pt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let n=0;n<e.length;n++){let s=e[n];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length<n;)i.push(de.empty);i[n]=de.of(s.slice(1)),t.push(s[0],i[n].length)}}}return new Pt(t,i)}static createSet(e,t){return new Pt(e,t)}};h(Pt,"ChangeSet");var We=Pt;function Me(r,e,t,i=!1){if(e==0&&t<=0)return;let n=r.length-2;n>=0&&t<=0&&t==r[n+1]?r[n]+=e:e==0&&r[n]==0?r[n+1]+=t:i?(r[n]+=e,r[n+1]+=t):r.push(e,t)}h(Me,"addSection");function gi(r,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<r.length)r[r.length-1]=r[r.length-1].append(t);else{for(;r.length<i;)r.push(de.empty);r.push(t)}}h(gi,"addInsert");function Bc(r,e,t){let i=r.inserted;for(let n=0,s=0,o=0;o<r.sections.length;){let l=r.sections[o++],a=r.sections[o++];if(a<0)n+=l,s+=l;else{let c=n,f=s,u=de.empty;for(;c+=l,f+=a,a&&i&&(u=u.append(i[o-2>>1])),!(t||o==r.sections.length||r.sections[o+1]<0);)l=r.sections[o++],a=r.sections[o++];e(n,c,s,f,u),n=c,s=f}}}h(Bc,"iterChanges");function Ec(r,e,t,i=!1){let n=[],s=i?[]:null,o=new Ii(r),l=new Ii(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let c=Math.min(o.len,l.len);Me(n,c,-1),o.forward(c),l.forward(c)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let c=l.len;for(Me(n,l.ins,-1);c;){let f=Math.min(o.len,c);o.ins>=0&&a<o.i&&o.len<=f&&(Me(n,0,o.ins),s&&gi(s,n,o.text),a=o.i),o.forward(f),c-=f}l.next()}else if(o.ins>=0){let c=0,f=o.len;for(;f;)if(l.ins==-1){let u=Math.min(f,l.len);c+=u,f-=u,l.forward(u)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;Me(n,c,a<o.i?o.ins:0),s&&a<o.i&&gi(s,n,o.text),a=o.i,o.forward(o.len-f)}else{if(o.done&&l.done)return s?We.createSet(n,s):ri.create(n);throw new Error("Mismatched change set lengths")}}h(Ec,"mapSet");function $1(r,e,t=!1){let i=[],n=t?[]:null,s=new Ii(r),o=new Ii(e);for(let l=!1;;){if(s.done&&o.done)return n?We.createSet(i,n):ri.create(i);if(s.ins==0)Me(i,s.len,0,l),s.next();else if(o.len==0&&!o.done)Me(i,0,o.ins,l),n&&gi(n,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),c=i.length;if(s.ins==-1){let f=o.ins==-1?-1:o.off?0:o.ins;Me(i,a,f,l),n&&f&&gi(n,i,o.text)}else o.ins==-1?(Me(i,s.off?0:s.len,a,l),n&&gi(n,i,s.textBit(a))):(Me(i,s.off?0:s.len,o.off?0:o.ins,l),n&&!o.off&&gi(n,i,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>c),s.forward2(a),o.forward(a)}}}}h($1,"composeSets");var Vc=class Vc{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?de.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?de.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}};h(Vc,"SectionIter");var Ii=Vc,wn=class wn{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,n;return this.empty?i=n=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new wn(i,n,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Z.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Z.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Z.range(e.anchor,e.head)}static create(e,t,i){return new wn(e,t,i)}};h(wn,"SelectionRange");var Qr=wn,Ve=class Ve{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Ve.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Ve([this.main],0)}addRange(e,t=!0){return Ve.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,Ve.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ve(e.ranges.map(t=>Qr.fromJSON(t)),e.main)}static single(e,t=e){return new Ve([Ve.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;n<e.length;n++){let s=e[n];if(s.empty?s.from<=i:s.from<i)return Ve.normalized(e.slice(),t);i=s.to}return new Ve(e,t)}static cursor(e,t=0,i,n){return Qr.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(n!=null?n:16777215)<<6)}static range(e,t,i,n){let s=(i!=null?i:16777215)<<6|(n==null?7:Math.min(6,n));return t<e?Qr.create(t,e,48|s):Qr.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((n,s)=>n.from-s.from),t=e.indexOf(i);for(let n=1;n<e.length;n++){let s=e[n],o=e[n-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);n<=t&&t--,e.splice(--n,2,s.anchor>s.head?Ve.range(a,l):Ve.range(l,a))}}return new Ve(e,t)}};h(Ve,"EditorSelection");var Z=Ve;function q1(r,e){for(let t of r.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}h(q1,"checkSelection");var Ac=0,Ao=class Ao{constructor(e,t,i,n,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=n,this.id=Ac++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Ao(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Mc),!!e.static,e.enables)}of(e){return new Ur([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ur(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ur(e,this,2,t)}from(e,t){return t||(t=h(i=>i,"get")),this.compute([e],i=>t(i.field(e)))}};h(Ao,"Facet");var W=Ao;function Mc(r,e){return r==e||r.length==e.length&&r.every((t,i)=>t===e[i])}h(Mc,"sameArray");var zc=class zc{constructor(e,t,i,n){this.dependencies=e,this.facet=t,this.type=i,this.value=n,this.id=Ac++}dynamicSlot(e){var t;let i=this.value,n=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,c=!1,f=[];for(let u of this.dependencies)u=="doc"?a=!0:u=="selection"?c=!0:((t=e[u.id])!==null&&t!==void 0?t:1)&1||f.push(e[u.id]);return{create(u){return u.values[o]=i(u),1},update(u,d){if(a&&d.docChanged||c&&(d.docChanged||d.selection)||Cc(u,f)){let p=i(u);if(l?!T1(p,u.values[o],n):!n(p,u.values[o]))return u.values[o]=p,1}return 0},reconfigure:h((u,d)=>{let p,m=d.config.address[s];if(m!=null){let y=Do(d,m);if(this.dependencies.every(g=>g instanceof W?d.facet(g)===u.facet(g):g instanceof Pe?d.field(g,!1)==u.field(g,!1):!0)||(l?T1(p=i(u),y,n):n(p=i(u),y)))return u.values[o]=y,0}else p=i(u);return u.values[o]=p,1},"reconfigure")}}};h(zc,"FacetProvider");var Ur=zc;function T1(r,e,t){if(r.length!=e.length)return!1;for(let i=0;i<r.length;i++)if(!t(r[i],e[i]))return!1;return!0}h(T1,"compareArray");function Cc(r,e){let t=!1;for(let i of e)Sn(r,i)&1&&(t=!0);return t}h(Cc,"ensureAll");function WC(r,e,t){let i=t.map(a=>r[a.id]),n=t.map(a=>a.type),s=i.filter(a=>!(a&1)),o=r[e.id]>>1;function l(a){let c=[];for(let f=0;f<i.length;f++){let u=Do(a,i[f]);if(n[f]==2)for(let d of u)c.push(d);else c.push(u)}return e.combine(c)}return h(l,"get"),{create(a){for(let c of i)Sn(a,c);return a.values[o]=l(a),1},update(a,c){if(!Cc(a,s))return 0;let f=l(a);return e.compare(f,a.values[o])?0:(a.values[o]=f,1)},reconfigure(a,c){let f=Cc(a,i),u=c.config.facets[e.id],d=c.facet(e);if(u&&!f&&Mc(t,u))return a.values[o]=d,0;let p=l(a);return e.compare(p,d)?(a.values[o]=d,0):(a.values[o]=p,1)}}}h(WC,"dynamicFacetSlot");var D1=W.define({static:!0}),Mo=class Mo{constructor(e,t,i,n,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=n,this.spec=s,this.provides=void 0}static define(e){let t=new Mo(Ac++,e.create,e.update,e.compare||((i,n)=>i===n),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(D1).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:h(i=>(i.values[t]=this.create(i),1),"create"),update:h((i,n)=>{let s=i.values[t],o=this.updateF(s,n);return this.compareF(s,o)?0:(i.values[t]=o,1)},"update"),reconfigure:h((i,n)=>n.config.address[this.id]!=null?(i.values[t]=n.field(this),0):(i.values[t]=this.create(i),1),"reconfigure")}}init(e){return[this,D1.of({field:this,create:e})]}get extension(){return this}};h(Mo,"StateField");var Pe=Mo,Ri={lowest:4,low:3,default:2,high:1,highest:0};function vn(r){return e=>new _o(e,r)}h(vn,"prec");var Tr={highest:vn(Ri.highest),high:vn(Ri.high),default:vn(Ri.default),low:vn(Ri.low),lowest:vn(Ri.lowest)},Wc=class Wc{constructor(e,t){this.inner=e,this.prec=t}};h(Wc,"PrecExtension");var _o=Wc,Po=class Po{of(e){return new Fn(this,e)}reconfigure(e){return Po.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}};h(Po,"Compartment");var _r=Po,jc=class jc{constructor(e,t){this.compartment=e,this.inner=t}};h(jc,"CompartmentInstance");var Fn=jc,Io=class Io{constructor(e,t,i,n,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let n=[],s=Object.create(null),o=new Map;for(let d of jC(e,t,o))d instanceof Pe?n.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let l=Object.create(null),a=[],c=[];for(let d of n)l[d.id]=c.length<<1,c.push(p=>d.slot(p));let f=i==null?void 0:i.config.facets;for(let d in s){let p=s[d],m=p[0].facet,y=f&&f[d]||[];if(p.every(g=>g.type==0))if(l[m.id]=a.length<<1|1,Mc(y,p))a.push(i.facet(m));else{let g=m.combine(p.map(b=>b.value));a.push(i&&m.compare(g,i.facet(m))?i.facet(m):g)}else{for(let g of p)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=c.length<<1,c.push(b=>g.dynamicSlot(b)));l[m.id]=c.length<<1,c.push(g=>WC(g,m,p))}}let u=c.map(d=>d(l));return new Io(e,o,u,l,a,s)}};h(Io,"Configuration");var To=Io;function jC(r,e,t){let i=[[],[],[],[],[]],n=new Map;function s(o,l){let a=n.get(o);if(a!=null){if(a<=l)return;let c=i[a].indexOf(o);c>-1&&i[a].splice(c,1),o instanceof Fn&&t.delete(o.compartment)}if(n.set(o,l),Array.isArray(o))for(let c of o)s(c,l);else if(o instanceof Fn){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;t.set(o.compartment,c),s(c,l)}else if(o instanceof _o)s(o.inner,o.prec);else if(o instanceof Pe)i[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof Ur)i[l].push(o),o.facet.extensions&&s(o.facet.extensions,Ri.default);else{let c=o.extension;if(!c)throw new Error("Unrecognized extension value in extension set (".concat(o,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));s(c,l)}}return h(s,"inner"),s(r,Ri.default),i.reduce((o,l)=>o.concat(l))}h(jC,"flatten");function Sn(r,e){if(e&1)return 2;let t=e>>1,i=r.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;r.status[t]=4;let n=r.computeSlot(r,r.config.dynamicSlots[t]);return r.status[t]=2|n}h(Sn,"ensureAddr");function Do(r,e){return e&1?r.config.staticValues[e>>1]:r.values[e>>1]}h(Do,"getAddr");var V1=W.define(),Uc=W.define({combine:h(r=>r.some(e=>e),"combine"),static:!0}),z1=W.define({combine:h(r=>r.length?r[0]:void 0,"combine"),static:!0}),W1=W.define(),j1=W.define(),H1=W.define(),Y1=W.define({combine:h(r=>r.length?r[0]:!1,"combine")}),Hc=class Hc{constructor(e,t){this.type=e,this.value=t}static define(){return new Lc}};h(Hc,"Annotation");var gt=Hc,Yc=class Yc{of(e){return new gt(this,e)}};h(Yc,"AnnotationType");var Lc=Yc,Jc=class Jc{constructor(e){this.map=e}of(e){return new pe(this,e)}};h(Jc,"StateEffectType");var Oc=Jc,$o=class $o{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new $o(this.type,t)}is(e){return this.type==e}static define(e={}){return new Oc(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let n of e){let s=n.map(t);s&&i.push(s)}return i}};h($o,"StateEffect");var pe=$o;pe.reconfigure=pe.define();pe.appendConfig=pe.define();var Mi=class Mi{constructor(e,t,i,n,s,o){this.startState=e,this.changes=t,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&q1(i,t.newLength),s.some(l=>l.type==Mi.time)||(this.annotations=s.concat(Mi.time.of(Date.now())))}static create(e,t,i,n,s,o){return new Mi(e,t,i,n,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Mi.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}};h(Mi,"Transaction");var Te=Mi;Te.time=gt.define();Te.userEvent=gt.define();Te.addToHistory=gt.define();Te.remote=gt.define();function HC(r,e){let t=[];for(let i=0,n=0;;){let s,o;if(i<r.length&&(n==e.length||e[n]>=r[i]))s=r[i++],o=r[i++];else if(n<e.length)s=e[n++],o=e[n++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}h(HC,"joinRanges");function J1(r,e,t){var i;let n,s,o;return t?(n=e.changes,s=We.empty(e.changes.length),o=r.changes.compose(e.changes)):(n=e.changes.map(r.changes),s=r.changes.mapDesc(e.changes,!0),o=r.changes.compose(n)),{changes:o,selection:e.selection?e.selection.map(s):(i=r.selection)===null||i===void 0?void 0:i.map(n),effects:pe.mapEffects(r.effects,n).concat(pe.mapEffects(e.effects,s)),annotations:r.annotations.length?r.annotations.concat(e.annotations):e.annotations,scrollIntoView:r.scrollIntoView||e.scrollIntoView}}h(J1,"mergeTransaction");function _c(r,e,t){let i=e.selection,n=Lr(e.annotations);return e.userEvent&&(n=n.concat(Te.userEvent.of(e.userEvent))),{changes:e.changes instanceof We?e.changes:We.of(e.changes||[],t,r.facet(z1)),selection:i&&(i instanceof Z?i:Z.single(i.anchor,i.head)),effects:Lr(e.effects),annotations:n,scrollIntoView:!!e.scrollIntoView}}h(_c,"resolveTransactionInner");function G1(r,e,t){let i=_c(r,e.length?e[0]:{},r.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;i=J1(i,_c(r,e[s],o?i.changes.newLength:r.doc.length),o)}let n=Te.create(r,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return JC(t?YC(n):n)}h(G1,"resolveTransaction");function YC(r){let e=r.startState,t=!0;for(let n of e.facet(W1)){let s=n(r);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:HC(t,s))}if(t!==!0){let n,s;if(t===!1)s=r.changes.invertedDesc,n=We.empty(e.doc.length);else{let o=r.changes.filter(t);n=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}r=Te.create(e,n,r.selection&&r.selection.map(s),pe.mapEffects(r.effects,s),r.annotations,r.scrollIntoView)}let i=e.facet(j1);for(let n=i.length-1;n>=0;n--){let s=i[n](r);s instanceof Te?r=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Te?r=s[0]:r=G1(e,Lr(s),!1)}return r}h(YC,"filterTransaction");function JC(r){let e=r.startState,t=e.facet(H1),i=r;for(let n=t.length-1;n>=0;n--){let s=t[n](r);s&&Object.keys(s).length&&(i=J1(i,_c(e,s,r.changes.newLength),!0))}return i==r?r:Te.create(e,r.changes,r.selection,i.effects,i.annotations,i.scrollIntoView)}h(JC,"extendTransaction");var GC=[];function Lr(r){return r==null?GC:Array.isArray(r)?r:[r]}h(Lr,"asArray");var Ot=function(r){return r[r.Word=0]="Word",r[r.Space=1]="Space",r[r.Other=2]="Other",r}(Ot||(Ot={})),XC=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Tc;try{Tc=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(r){}function KC(r){if(Tc)return Tc.test(r);for(let e=0;e<r.length;e++){let t=r[e];if(/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||XC.test(t)))return!0}return!1}h(KC,"hasWordChar");function ZC(r){return e=>{if(!/\S/.test(e))return Ot.Space;if(KC(e))return Ot.Word;for(let t=0;t<r.length;t++)if(e.indexOf(r[t])>-1)return Ot.Word;return Ot.Other}}h(ZC,"makeCategorizer");var ot=class ot{constructor(e,t,i,n,s,o){this.config=e,this.doc=t,this.selection=i,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Sn(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return Sn(this,i),Do(this,i)}update(...e){return G1(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:n}=t;for(let l of e.effects)l.is(_r.reconfigure)?(t&&(n=new Map,t.compartments.forEach((a,c)=>n.set(c,a)),t=null),n.set(l.value.compartment,l.value.extension)):l.is(pe.reconfigure)?(t=null,i=l.value):l.is(pe.appendConfig)&&(t=null,i=Lr(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=To.resolve(i,n,this),s=new ot(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,c)=>c.reconfigure(a,this),null).values);let o=e.startState.facet(Uc)?e.newSelection:e.newSelection.asSingle();new ot(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Z.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),n=this.changes(i.changes),s=[i.range],o=Lr(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),c=this.changes(a.changes),f=c.map(n);for(let d=0;d<l;d++)s[d]=s[d].map(f);let u=n.mapDesc(c,!0);s.push(a.range.map(u)),n=n.compose(f),o=pe.mapEffects(o,f).concat(pe.mapEffects(Lr(a.effects),u))}return{changes:n,selection:Z.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof We?e:We.of(e,this.doc.length,this.facet(ot.lineSeparator))}toText(e){return de.of(e.split(this.facet(ot.lineSeparator)||Qc))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Sn(this,t),Do(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let n=e[i];n instanceof Pe&&this.config.address[n.id]!=null&&(t[i]=n.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let n=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],l=e[s];n.push(o.init(a=>o.spec.fromJSON(l,a)))}}return ot.create({doc:e.doc,selection:Z.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=To.resolve(e.extensions||[],new Map),i=e.doc instanceof de?e.doc:de.of((e.doc||"").split(t.staticFacet(ot.lineSeparator)||Qc)),n=e.selection?e.selection instanceof Z?e.selection:Z.single(e.selection.anchor,e.selection.head):Z.single(0);return q1(n,i.length),t.staticFacet(Uc)||(n=n.asSingle()),new ot(t,i,n,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(ot.tabSize)}get lineBreak(){return this.facet(ot.lineSeparator)||"\n"}get readOnly(){return this.facet(Y1)}phrase(e,...t){for(let i of this.facet(ot.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,n)=>{if(n=="$")return"$";let s=+(n||1);return!s||s>t.length?i:t[s-1]})),e}languageDataAt(e,t,i=-1){let n=[];for(let s of this.facet(V1))for(let o of s(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&n.push(o[e]);return n}charCategorizer(e){return ZC(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:n}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=mt(t,o,!1);if(s(t.slice(a,o))!=Ot.Word)break;o=a}for(;l<n;){let a=mt(t,l);if(s(t.slice(l,a))!=Ot.Word)break;l=a}return o==l?null:Z.range(o+i,l+i)}};h(ot,"EditorState");var Be=ot;Be.allowMultipleSelections=Uc;Be.tabSize=W.define({combine:h(r=>r.length?r[0]:4,"combine")});Be.lineSeparator=z1;Be.readOnly=Y1;Be.phrases=W.define({compare(r,e){let t=Object.keys(r),i=Object.keys(e);return t.length==i.length&&t.every(n=>r[n]==e[n])}});Be.languageData=V1;Be.changeFilter=W1;Be.transactionFilter=j1;Be.transactionExtender=H1;_r.reconfigure=pe.define();function si(r,e,t={}){let i={};for(let n of r)for(let s of Object.keys(n)){let o=n[s],l=i[s];if(l===void 0)i[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,s))i[s]=t[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let n in e)i[n]===void 0&&(i[n]=e[n]);return i}h(si,"combineConfig");var Gc=class Gc{eq(e){return this==e}range(e,t=e){return Qn.create(e,t,this)}};h(Gc,"RangeValue");var ni=Gc;ni.prototype.startSide=ni.prototype.endSide=0;ni.prototype.point=!1;ni.prototype.mapMode=ze.TrackDel;var qo=class qo{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new qo(e,t,i)}};h(qo,"Range");var Qn=qo;function Dc(r,e){return r.from-e.from||r.value.startSide-e.value.startSide}h(Dc,"cmpRange");var Vo=class Vo{constructor(e,t,i,n){this.from=e,this.to=t,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,n=0){let s=i?this.to:this.from;for(let o=n,l=s.length;;){if(o==l)return o;let a=o+l>>1,c=s[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return c>=0?o:l;c>=0?l=a:o=a+1}}between(e,t,i,n){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,s);s<o;s++)if(n(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let i=[],n=[],s=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let c=this.value[a],f=this.from[a]+e,u=this.to[a]+e,d,p;if(f==u){let m=t.mapPos(f,c.startSide,c.mapMode);if(m==null||(d=p=m,c.startSide!=c.endSide&&(p=t.mapPos(f,c.endSide),p<d)))continue}else if(d=t.mapPos(f,c.startSide),p=t.mapPos(u,c.endSide),d>p||d==p&&c.startSide>0&&c.endSide<=0)continue;(p-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(l=Math.max(l,p-d)),i.push(c),n.push(d-o),s.push(p-o))}return{mapped:i.length?new Vo(n,s,i,l):null,pos:o}}};h(Vo,"Chunk");var Nc=Vo,Lt=class Lt{constructor(e,t,i,n){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=n}static create(e,t,i,n){return new Lt(e,t,i,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Dc)),this.isEmpty)return t.length?Lt.of(t):this;let l=new No(this,null,-1).goto(0),a=0,c=[],f=new $i;for(;l.value||a<t.length;)if(a<t.length&&(l.from-t[a].from||l.startSide-t[a].value.startSide)>=0){let u=t[a++];f.addInner(u.from,u.to,u.value)||c.push(u)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(l.chunkIndex)<t[a].from)&&(!o||n>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||n>l.to||s<l.from||o(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||c.push(Qn.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!c.length?Lt.empty:this.nextLayer.update({add:c,filter:o,filterFrom:n,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],n=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],c=e.touchesRange(l,l+a.length);if(c===!1)n=Math.max(n,a.maxPoint),t.push(a),i.push(e.mapPos(l));else if(c===!0){let{mapped:f,pos:u}=a.map(l,e);f&&(n=Math.max(n,f.maxPoint),t.push(f),i.push(u))}}let s=this.nextLayer.map(e);return t.length==0?s:new Lt(i,t,s||Lt.empty,n)}between(e,t,i){if(!this.isEmpty){for(let n=0;n<this.chunk.length;n++){let s=this.chunkPos[n],o=this.chunk[n];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Bn.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Bn.from(e).goto(t)}static compare(e,t,i,n,s=-1){let o=e.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),l=t.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),a=N1(o,l,i),c=new Ai(o,a,s),f=new Ai(l,a,s);i.iterGaps((u,d,p)=>R1(c,u,f,d,p,n)),i.empty&&i.length==0&&R1(c,0,f,0,0,n)}static eq(e,t,i=0,n){n==null&&(n=999999999);let s=e.filter(f=>!f.isEmpty&&t.indexOf(f)<0),o=t.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=N1(s,o),a=new Ai(s,l,0).goto(i),c=new Ai(o,l,0).goto(i);for(;;){if(a.to!=c.to||!Rc(a.active,c.active)||a.point&&(!c.point||!a.point.eq(c.point)))return!1;if(a.to>n)return!0;a.next(),c.next()}}static spans(e,t,i,n,s=-1){let o=new Ai(e,null,s).goto(t),l=t,a=o.openStart;for(;;){let c=Math.min(o.to,i);if(o.point){let f=o.activeForPoint(o.to),u=o.pointFrom<t?f.length+1:o.point.startSide<0?f.length:Math.min(f.length,a);n.point(l,c,o.point,f,u,o.pointRank),a=Math.min(o.openEnd(c),f.length)}else c>l&&(n.span(l,c,o.active,a),a=o.openEnd(c));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new $i;for(let n of e instanceof Qn?[e]:t?eU(e):e)i.add(n.from,n.to,n.value);return i.finish()}static join(e){if(!e.length)return Lt.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let n=e[i];n!=Lt.empty;n=n.nextLayer)t=new Lt(n.chunkPos,n.chunk,t,Math.max(n.maxPoint,t.maxPoint));return t}};h(Lt,"RangeSet");var be=Lt;be.empty=new be([],[],null,-1);function eU(r){if(r.length>1)for(let e=r[0],t=1;t<r.length;t++){let i=r[t];if(Dc(e,i)>0)return r.slice().sort(Dc);e=i}return r}h(eU,"lazySort");be.empty.nextLayer=be.empty;var zo=class zo{finishChunk(e){this.chunks.push(new Nc(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new zo)).add(e,t,i)}addInner(e,t,i){let n=e-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return n<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(be.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=be.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};h(zo,"RangeSetBuilder");var $i=zo;function N1(r,e,t){let i=new Map;for(let s of r)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&i.set(s.chunk[o],s.chunkPos[o]);let n=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=i.get(s.chunk[o]);l!=null&&(t?t.mapPos(l):l)==s.chunkPos[o]&&!(t!=null&&t.touchesRange(l,l+s.chunk[o].length))&&n.add(s.chunk[o])}return n}h(N1,"findSharedChunks");var Xc=class Xc{constructor(e,t,i,n=0){this.layer=e,this.skip=t,this.minPoint=i,this.rank=n}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,i){for(;this.chunkIndex<this.layer.chunk.length;){let n=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(n)||this.layer.chunkEnd(this.chunkIndex)<e||n.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let n=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!i||this.rangeIndex<n)&&this.setRangeIndex(n)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],i=e+t.from[this.rangeIndex];if(this.from=i,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}};h(Xc,"LayerCursor");var No=Xc,Wo=class Wo{constructor(e){this.heap=e}static from(e,t=null,i=-1){let n=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=i&&n.push(new No(o,t,i,s));return n.length==1?n[0]:new Wo(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)wc(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)wc(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),wc(this.heap,0)}}};h(Wo,"HeapCursor");var Bn=Wo;function wc(r,e){for(let t=r[e];;){let i=(e<<1)+1;if(i>=r.length)break;let n=r[i];if(i+1<r.length&&n.compare(r[i+1])>=0&&(n=r[i+1],i++),t.compare(n)<0)break;r[i]=t,r[e]=n,e=i}}h(wc,"heapBubble");var Kc=class Kc{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Bn.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Bo(this.active,e),Bo(this.activeTo,e),Bo(this.activeRank,e),this.minActive=A1(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:n,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||n-this.activeTo[t])>0;)t++;Eo(this.active,t,i),Eo(this.activeTo,t,n),Eo(this.activeRank,t,s),e&&Eo(e,t,this.cursor.from),this.minActive=A1(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&Bo(i,n)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let n=i.length-1;n>=0&&i[n]<e;n--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}};h(Kc,"SpanCursor");var Ai=Kc;function R1(r,e,t,i,n,s){r.goto(e),t.goto(i);let o=i+n,l=i,a=i-e;for(;;){let c=r.to+a-t.to||r.endSide-t.endSide,f=c<0?r.to+a:t.to,u=Math.min(f,o);if(r.point||t.point?r.point&&t.point&&(r.point==t.point||r.point.eq(t.point))&&Rc(r.activeForPoint(r.to),t.activeForPoint(t.to))||s.comparePoint(l,u,r.point,t.point):u>l&&!Rc(r.active,t.active)&&s.compareRange(l,u,r.active,t.active),f>o)break;l=f,c<=0&&r.next(),c>=0&&t.next()}}h(R1,"compare");function Rc(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!=e[t]&&!r[t].eq(e[t]))return!1;return!0}h(Rc,"sameValues");function Bo(r,e){for(let t=e,i=r.length-1;t<i;t++)r[t]=r[t+1];r.pop()}h(Bo,"remove");function Eo(r,e,t){for(let i=r.length-1;i>=e;i--)r[i+1]=r[i];r[e]=t}h(Eo,"insert");function A1(r,e){let t=-1,i=1e9;for(let n=0;n<e.length;n++)(e[n]-i||r[n].endSide-r[t].endSide)<0&&(t=n,i=e[n]);return t}h(A1,"findMinIndex");function jo(r,e,t=r.length){let i=0;for(let n=0;n<t;)r.charCodeAt(n)==9?(i+=e-i%e,n++):(i++,n=mt(r,n));return i}h(jo,"countColumn");function X1(r,e,t,i){for(let n=0,s=0;;){if(s>=e)return n;if(n==r.length)break;s+=r.charCodeAt(n)==9?t-s%t:1,n=mt(r,n)}return i===!0?-1:r.length}h(X1,"findColumn");var Zc="\u037C",K1=typeof Symbol>"u"?"__"+Zc:Symbol.for(Zc),ef=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Z1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},rf=class rf{constructor(e,t){this.rules=[];let{finish:i}=t||{};function n(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}h(n,"splitSelector");function s(o,l,a,c){let f=[],u=/^@(\w+)\b/.exec(o[0]),d=u&&u[1]=="keyframes";if(u&&l==null)return a.push(o[0]+";");for(let p in l){let m=l[p];if(/&/.test(p))s(p.split(/,\s*/).map(y=>o.map(g=>y.replace(/&/,g))).reduce((y,g)=>y.concat(g)),m,a);else if(m&&typeof m=="object"){if(!u)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(n(p),m,f,d)}else m!=null&&f.push(p.replace(/_.*/,"").replace(/[A-Z]/g,y=>"-"+y.toLowerCase())+": "+m+";")}(f.length||d)&&a.push((i&&!u&&!c?o.map(i):o).join(", ")+" {"+f.join(" ")+"}")}h(s,"render");for(let o in e)s(n(o),e[o],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Z1[K1]||1;return Z1[K1]=e+1,Zc+e.toString(36)}static mount(e,t,i){let n=e[ef],s=i&&i.nonce;n?s&&n.setNonce(s):n=new tf(e,s),n.mount(Array.isArray(t)?t:[t],e)}};h(rf,"StyleModule");var bt=rf,ex=new Map,nf=class nf{constructor(e,t){let i=e.ownerDocument||e,n=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let s=ex.get(i);if(s)return e[ef]=s;this.sheet=new n.CSSStyleSheet,ex.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[ef]=this}mount(e,t){let i=this.sheet,n=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],a=this.modules.indexOf(l);if(a<s&&a>-1&&(this.modules.splice(a,1),s--,a=-1),a==-1){if(this.modules.splice(s++,0,l),i)for(let c=0;c<l.rules.length;c++)i.insertRule(l.rules[c],n++)}else{for(;s<a;)n+=this.modules[s++].rules.length;n+=l.rules.length,s++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let a=0;a<this.modules.length;a++)o+=this.modules[a].getRules()+"\n";this.styleTag.textContent=o;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}};h(nf,"StyleSet");var tf=nf;var oi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Dr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},tU=typeof navigator<"u"&&/Mac/.test(navigator.platform),iU=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Oe=0;Oe<10;Oe++)oi[48+Oe]=oi[96+Oe]=String(Oe);var Oe;for(Oe=1;Oe<=24;Oe++)oi[Oe+111]="F"+Oe;var Oe;for(Oe=65;Oe<=90;Oe++)oi[Oe]=String.fromCharCode(Oe+32),Dr[Oe]=String.fromCharCode(Oe);var Oe;for(Ho in oi)Dr.hasOwnProperty(Ho)||(Dr[Ho]=oi[Ho]);var Ho;function tx(r){var e=tU&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||iU&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?Dr:oi)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}h(tx,"keyName");function Yn(r){let e;return r.nodeType==11?e=r.getSelection?r:r.ownerDocument:e=r,e.getSelection()}h(Yn,"getSelection");function ff(r,e){return e?r==e||r.contains(e.nodeType!=1?e.parentNode:e):!1}h(ff,"contains");function rU(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}h(rU,"deepActiveElement");function rl(r,e){if(!e.anchorNode)return!1;try{return ff(r,e.anchorNode)}catch(t){return!1}}h(rl,"hasSelection");function Jn(r){return r.nodeType==3?ji(r,0,r.nodeValue.length).getClientRects():r.nodeType==1?r.getClientRects():[]}h(Jn,"clientRectsFor");function Tn(r,e,t,i){return t?ix(r,e,t,i,-1)||ix(r,e,t,i,1):!1}h(Tn,"isEquivalentPosition");function Wi(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e}h(Wi,"domIndex");function hl(r){return r.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(r.nodeName)}h(hl,"isBlockElement");function ix(r,e,t,i,n){for(;;){if(r==t&&e==i)return!0;if(e==(n<0?0:li(r))){if(r.nodeName=="DIV")return!1;let s=r.parentNode;if(!s||s.nodeType!=1)return!1;e=Wi(r)+(n<0?0:1),r=s}else if(r.nodeType==1){if(r=r.childNodes[e+(n<0?-1:0)],r.nodeType==1&&r.contentEditable=="false")return!1;e=n<0?li(r):0}else return!1}}h(ix,"scanFor");function li(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}h(li,"maxOffset");function Rl(r,e){let t=e?r.left:r.right;return{left:t,right:t,top:r.top,bottom:r.bottom}}h(Rl,"flattenRect");function nU(r){let e=r.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:r.innerWidth,top:0,bottom:r.innerHeight}}h(nU,"windowRect");function Ix(r,e){let t=e.width/r.offsetWidth,i=e.height/r.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-r.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-r.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}h(Ix,"getScale");function sU(r,e,t,i,n,s,o,l){let a=r.ownerDocument,c=a.defaultView||window;for(let f=r,u=!1;f&&!u;)if(f.nodeType==1){let d,p=f==a.body,m=1,y=1;if(p)d=nU(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(u=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let x=f.getBoundingClientRect();({scaleX:m,scaleY:y}=Ix(f,x)),d={left:x.left,right:x.left+f.clientWidth*m,top:x.top,bottom:x.top+f.clientHeight*y}}let g=0,b=0;if(n=="nearest")e.top<d.top?(b=-(d.top-e.top+o),t>0&&e.bottom>d.bottom+b&&(b=e.bottom-d.bottom+b+o)):e.bottom>d.bottom&&(b=e.bottom-d.bottom+o,t<0&&e.top-b<d.top&&(b=-(d.top+b-e.top+o)));else{let x=e.bottom-e.top,w=d.bottom-d.top;b=(n=="center"&&x<=w?e.top+x/2-w/2:n=="start"||n=="center"&&t<0?e.top-o:e.bottom-w+o)-d.top}if(i=="nearest"?e.left<d.left?(g=-(d.left-e.left+s),t>0&&e.right>d.right+g&&(g=e.right-d.right+g+s)):e.right>d.right&&(g=e.right-d.right+s,t<0&&e.left<d.left+g&&(g=-(d.left+g-e.left+s))):g=(i=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:i=="start"==l?e.left-s:e.right-(d.right-d.left)+s)-d.left,g||b)if(p)c.scrollBy(g,b);else{let x=0,w=0;if(b){let E=f.scrollTop;f.scrollTop+=b/y,w=(f.scrollTop-E)*y}if(g){let E=f.scrollLeft;f.scrollLeft+=g/m,x=(f.scrollLeft-E)*m}e={left:e.left-x,top:e.top-w,right:e.right-x,bottom:e.bottom-w},x&&Math.abs(x-g)<1&&(i="nearest"),w&&Math.abs(w-b)<1&&(n="nearest")}if(p)break;f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}h(sU,"scrollRectIntoView");function oU(r){let e=r.ownerDocument,t,i;for(let n=r.parentNode;n&&!(n==e.body||t&&i);)if(n.nodeType==1)!i&&n.scrollHeight>n.clientHeight&&(i=n),!t&&n.scrollWidth>n.clientWidth&&(t=n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;return{x:t,y:i}}h(oU,"scrollableParents");var nu=class nu{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?li(t):0),i,Math.min(e.focusOffset,i?li(i):0))}set(e,t,i,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=n}};h(nu,"DOMSelectionState");var uf=nu,Nr=null;function $x(r){if(r.setActive)return r.setActive();if(Nr)return r.focus(Nr);let e=[];for(let t=r;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(r.focus(Nr==null?{get preventScroll(){return Nr={preventScroll:!0},!0}}:void 0),!Nr){Nr=!1;for(let t=0;t<e.length;){let i=e[t++],n=e[t++],s=e[t++];i.scrollTop!=n&&(i.scrollTop=n),i.scrollLeft!=s&&(i.scrollLeft=s)}}}h($x,"focusPreventScroll");var rx;function ji(r,e,t=e){let i=rx||(rx=document.createRange());return i.setEnd(r,t),i.setStart(r,e),i}h(ji,"textRange");function qr(r,e,t,i){let n={key:e,code:e,keyCode:t,which:t,cancelable:!0};i&&({altKey:n.altKey,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,metaKey:n.metaKey}=i);let s=new KeyboardEvent("keydown",n);s.synthetic=!0,r.dispatchEvent(s);let o=new KeyboardEvent("keyup",n);return o.synthetic=!0,r.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}h(qr,"dispatchKey");function lU(r){for(;r;){if(r&&(r.nodeType==9||r.nodeType==11&&r.host))return r;r=r.assignedSlot||r.parentNode}return null}h(lU,"getRoot");function qx(r){for(;r.attributes.length;)r.removeAttributeNode(r.attributes[0])}h(qx,"clearAttributes");function aU(r,e){let t=e.focusNode,i=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=i)return!1;for(i=Math.min(i,li(t));;)if(i){if(t.nodeType!=1)return!1;let n=t.childNodes[i-1];n.contentEditable=="false"?i--:(t=n,i=li(t))}else{if(t==r)return!0;i=Wi(t),t=t.parentNode}}h(aU,"atElementStart");function Vx(r){return r.scrollTop>Math.max(1,r.scrollHeight-r.clientHeight-4)}h(Vx,"isScrolledToBottom");function zx(r,e){for(let t=r,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=li(t)}else if(t.parentNode&&!hl(t))i=Wi(t),t=t.parentNode;else return null}}h(zx,"textNodeBefore");function Wx(r,e){for(let t=r,i=e;;){if(t.nodeType==3&&i<t.nodeValue.length)return{node:t,offset:i};if(t.nodeType==1&&i<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[i],i=0}else if(t.parentNode&&!hl(t))i=Wi(t)+1,t=t.parentNode;else return null}}h(Wx,"textNodeAfter");var Pn=class Pn{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new Pn(e.parentNode,Wi(e),t)}static after(e,t){return new Pn(e.parentNode,Wi(e)+1,t)}};h(Pn,"DOMPos");var je=Pn,Jf=[],In=class In{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let i of this.children){if(i==e)return t;t+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let i=this.dom,n=null,s;for(let o of this.children){if(o.flags&7){if(!o.dom&&(s=n?n.nextSibling:i.firstChild)){let l=In.get(s);(!l||!l.parent&&l.canReuseDOM(o))&&o.reuseDOM(s)}o.sync(e,t),o.flags&=-8}if(s=n?n.nextSibling:i.firstChild,t&&!t.written&&t.node==i&&s!=o.dom&&(t.written=!0),o.dom.parentNode==i)for(;s&&s!=o.dom;)s=nx(s);else i.insertBefore(o.dom,s);n=o.dom}for(s=n?n.nextSibling:i.firstChild,s&&t&&t.node==i&&(t.written=!0);s;)s=nx(s)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,t),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let i;if(e==this.dom)i=this.dom.childNodes[t];else{let n=li(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;n==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?n=-1:n=1),e=s}n<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!In.get(i);)i=i.nextSibling;if(!i)return this.length;for(let n=0,s=0;;n++){let o=this.children[n];if(o.dom==i)return s;s+=o.length+o.breakAfter}}domBoundsAround(e,t,i=0){let n=-1,s=-1,o=-1,l=-1;for(let a=0,c=i,f=i;a<this.children.length;a++){let u=this.children[a],d=c+u.length;if(c<e&&d>t)return u.domBoundsAround(e,t,c);if(d>=e&&n==-1&&(n=a,s=c),c>t&&u.dom.parentNode==this.dom){o=a,l=f;break}f=d,c=d+u.breakAfter}return{from:s,to:l<0?i+this.length:l,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Jf){this.markDirty();for(let n=e;n<t;n++){let s=this.children[n];s.parent==this&&i.indexOf(s)<0&&s.destroy()}this.children.splice(e,t-e,...i);for(let n=0;n<i.length;n++)i[n].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new cl(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,i,n,s,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}};h(In,"ContentView");var ye=In;ye.prototype.breakAfter=0;function nx(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}h(nx,"rm$1");var su=class su{constructor(e,t,i){this.children=e,this.pos=t,this.i=i,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}};h(su,"ChildCursor");var cl=su;function jx(r,e,t,i,n,s,o,l,a){let{children:c}=r,f=c.length?c[e]:null,u=s.length?s[s.length-1]:null,d=u?u.breakAfter:o;if(!(e==i&&f&&!o&&!d&&s.length<2&&f.merge(t,n,s.length?u:null,t==0,l,a))){if(i<c.length){let p=c[i];p&&(n<p.length||p.breakAfter&&(u!=null&&u.breakAfter))?(e==i&&(p=p.split(n),n=0),!d&&u&&p.merge(0,n,u,!0,0,a)?s[s.length-1]=p:((n||p.children.length&&!p.children[0].length)&&p.merge(0,n,null,!1,0,a),s.push(p))):p!=null&&p.breakAfter&&(u?u.breakAfter=1:o=1),i++}for(f&&(f.breakAfter=o,t>0&&(!o&&s.length&&f.merge(t,f.length,s[0],!1,l,0)?f.breakAfter=s.shift().breakAfter:(t<f.length||f.children.length&&f.children[f.children.length-1].length==0)&&f.merge(t,f.length,null,!1,l,0),e++));e<i&&s.length;)if(c[i-1].become(s[s.length-1]))i--,s.pop(),a=s.length?0:l;else if(c[e].become(s[0]))e++,s.shift(),l=s.length?0:a;else break;!s.length&&e&&i<c.length&&!c[e-1].breakAfter&&c[i].merge(0,0,c[e-1],!1,l,a)&&e--,(e<i||s.length)&&r.replaceChildren(e,i,s)}}h(jx,"replaceRange");function Hx(r,e,t,i,n,s){let o=r.childCursor(),{i:l,off:a}=o.findPos(t,1),{i:c,off:f}=o.findPos(e,-1),u=e-t;for(let d of i)u+=d.length;r.length+=u,jx(r,c,f,l,a,i,0,n,s)}h(Hx,"mergeChildrenInto");var et=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},df=typeof document<"u"?document:{documentElement:{style:{}}},pf=/Edge\/(\d+)/.exec(et.userAgent),Yx=/MSIE \d/.test(et.userAgent),mf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(et.userAgent),Al=!!(Yx||mf||pf),sx=!Al&&/gecko\/(\d+)/i.test(et.userAgent),sf=!Al&&/Chrome\/(\d+)/.exec(et.userAgent),ox="webkitFontSmoothing"in df.documentElement.style,Jx=!Al&&/Apple Computer/.test(et.vendor),lx=Jx&&(/Mobile\/\w+/.test(et.userAgent)||et.maxTouchPoints>2),V={mac:lx||/Mac/.test(et.platform),windows:/Win/.test(et.platform),linux:/Linux|X11/.test(et.platform),ie:Al,ie_version:Yx?df.documentMode||6:mf?+mf[1]:pf?+pf[1]:0,gecko:sx,gecko_version:sx?+(/Firefox\/(\d+)/.exec(et.userAgent)||[0,0])[1]:0,chrome:!!sf,chrome_version:sf?+sf[1]:0,ios:lx,android:/Android\b/.test(et.userAgent),webkit:ox,safari:Jx,webkit_version:ox?+(/\bAppleWebKit\/(\d+)/.exec(et.userAgent)||[0,0])[1]:0,tabSize:df.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"},hU=256,$n=class $n extends ye{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof $n)||this.length-(t-e)+i.length>hU||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new $n(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new je(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return cU(this.dom,e,t)}};h($n,"TextView");var zt=$n,qn=class qn extends ye{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let n of t)n.setParent(this)}setAttrs(e){if(qx(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,n,s,o){return i&&(!(i instanceof qn&&i.mark.eq(this.mark))||e&&s<=0||t<this.length&&o<=0)?!1:(Hx(this,e,t,i?i.children.slice():[],s-1,o-1),this.markDirty(),!0)}split(e){let t=[],i=0,n=-1,s=0;for(let l of this.children){let a=i+l.length;a>e&&t.push(i<e?l.split(e-i):l),n<0&&i>=e&&(n=s),i=a,s++}let o=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new qn(this.mark,t,o)}domAtPos(e){return Gx(this,e)}coordsAt(e,t){return Kx(this,e,t)}};h(qn,"MarkView");var vi=qn;function cU(r,e,t){let i=r.nodeValue.length;e>i&&(e=i);let n=e,s=e,o=0;e==0&&t<0||e==i&&t>=0?V.chrome||V.gecko||(e?(n--,o=1):s<i&&(s++,o=-1)):t<0?n--:s<i&&s++;let l=ji(r,n,s).getClientRects();if(!l.length)return null;let a=l[(o?o<0:t>=0)?0:l.length-1];return V.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,c=>c.width)||a),o?Rl(a,o<0):a||null}h(cU,"textCoords");var qi=class qi extends ye{static create(e,t,i){return new qi(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=qi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,n,s,o){return i&&(!(i instanceof qi)||!this.widget.compare(i.widget)||e>0&&s<=0||t<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}become(e){return e instanceof qi&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return de.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,i=t&&t.state.doc,n=this.posAtStart;return i?i.slice(n,n+this.length):de.empty}domAtPos(e){return(this.length?e==0:this.side>0)?je.before(this.dom):je.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?n.length-1:0;s=n[l],!(e>0?l==0:l==n.length-1||s.top<s.bottom);l+=o?-1:1);return Rl(s,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}};h(qi,"WidgetView");var Gn=qi,Vn=class Vn extends ye{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Vn&&e.side==this.side}split(){return new Vn(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?je.before(this.dom):je.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return de.empty}get isHidden(){return!0}};h(Vn,"WidgetBufferView");var Xn=Vn;zt.prototype.children=Gn.prototype.children=Xn.prototype.children=Jf;function Gx(r,e){let t=r.dom,{children:i}=r,n=0;for(let s=0;n<i.length;n++){let o=i[n],l=s+o.length;if(!(l==s&&o.getSide()<=0)){if(e>s&&e<l&&o.dom.parentNode==t)return o.domAtPos(e-s);if(e<=s)break;s=l}}for(let s=n;s>0;s--){let o=i[s-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let s=n;s<i.length;s++){let o=i[s];if(o.dom.parentNode==t)return o.domAtPos(0)}return new je(t,0)}h(Gx,"inlineDOMAtPos");function Xx(r,e,t){let i,{children:n}=r;t>0&&e instanceof vi&&n.length&&(i=n[n.length-1])instanceof vi&&i.mark.eq(e.mark)?Xx(i,e.children[0],t-1):(n.push(e),e.setParent(r)),r.length+=e.length}h(Xx,"joinInlineInto");function Kx(r,e,t){let i=null,n=-1,s=null,o=-1;function l(c,f){for(let u=0,d=0;u<c.children.length&&d<=f;u++){let p=c.children[u],m=d+p.length;m>=f&&(p.children.length?l(p,f-d):(!s||s.isHidden&&t>0)&&(m>f||d==m&&p.getSide()>0)?(s=p,o=f-d):(d<f||d==m&&p.getSide()<0&&!p.isHidden)&&(i=p,n=f-d)),d=m}}h(l,"scan"),l(r,e);let a=(t<0?i:s)||i||s;return a?a.coordsAt(Math.max(0,a==i?n:o),t):fU(r)}h(Kx,"coordsInChildren");function fU(r){let e=r.dom.lastChild;if(!e)return r.dom.getBoundingClientRect();let t=Jn(e);return t[t.length-1]||null}h(fU,"fallbackRect");function gf(r,e){for(let t in r)t=="class"&&e.class?e.class+=" "+r.class:t=="style"&&e.style?e.style+=";"+r.style:e[t]=r[t];return e}h(gf,"combineAttrs");var ax=Object.create(null);function fl(r,e,t){if(r==e)return!0;r||(r=ax),e||(e=ax);let i=Object.keys(r),n=Object.keys(e);if(i.length-(t&&i.indexOf(t)>-1?1:0)!=n.length-(t&&n.indexOf(t)>-1?1:0))return!1;for(let s of i)if(s!=t&&(n.indexOf(s)==-1||r[s]!==e[s]))return!1;return!0}h(fl,"attrsEq");function bf(r,e,t){let i=!1;if(e)for(let n in e)t&&n in t||(i=!0,n=="style"?r.style.cssText="":r.removeAttribute(n));if(t)for(let n in t)e&&e[n]==t[n]||(i=!0,n=="style"?r.style.cssText=t[n]:r.setAttribute(n,t[n]));return i}h(bf,"updateAttrs");function uU(r){let e=Object.create(null);for(let t=0;t<r.attributes.length;t++){let i=r.attributes[t];e[i.name]=i.value}return e}h(uU,"getAttrs");var ou=class ou{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}};h(ou,"WidgetType");var ki=ou,He=function(r){return r[r.Text=0]="Text",r[r.WidgetBefore=1]="WidgetBefore",r[r.WidgetAfter=2]="WidgetAfter",r[r.WidgetRange=3]="WidgetRange",r}(He||(He={})),lu=class lu extends ni{constructor(e,t,i,n){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(e){return new Kn(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return t+=i&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Si(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,n;if(e.isBlockGap)i=-5e8,n=4e8;else{let{start:s,end:o}=Zx(e,t);i=(s?t?-3e8:-1:5e8)-1,n=(o?t?2e8:1:-6e8)+1}return new Si(e,i,n,t,e.widget||null,!0)}static line(e){return new Zn(e)}static set(e,t=!1){return be.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};h(lu,"Decoration");var ce=lu;ce.none=be.empty;var Ql=class Ql extends ce{constructor(e){let{start:t,end:i}=Zx(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof Ql&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&fl(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}};h(Ql,"MarkDecoration");var Kn=Ql;Kn.prototype.point=!1;var Bl=class Bl extends ce{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Bl&&this.spec.class==e.spec.class&&fl(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}};h(Bl,"LineDecoration");var Zn=Bl;Zn.prototype.mapMode=ze.TrackBefore;Zn.prototype.point=!0;var El=class El extends ce{constructor(e,t,i,n,s,o){super(t,i,s,e),this.block=n,this.isReplace=o,this.mapMode=n?t<=0?ze.TrackBefore:ze.TrackAfter:ze.TrackDel}get type(){return this.startSide!=this.endSide?He.WidgetRange:this.startSide<=0?He.WidgetBefore:He.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof El&&dU(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}};h(El,"PointDecoration");var Si=El;Si.prototype.point=!0;function Zx(r,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=r;return t==null&&(t=r.inclusive),i==null&&(i=r.inclusive),{start:t!=null?t:e,end:i!=null?i:e}}h(Zx,"getInclusive");function dU(r,e){return r==e||!!(r&&e&&r.compare(e))}h(dU,"widgetsEq");function yf(r,e,t,i=0){let n=t.length-1;n>=0&&t[n]+i>=r?t[n]=Math.max(t[n],e):t.push(r,e)}h(yf,"addRange");var Vi=class Vi extends ye{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,n,s,o){if(i){if(!(i instanceof Vi))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),Hx(this,e,t,i?i.children.slice():[],s,o),!0}split(e){let t=new Vi;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:n}=this.childPos(e);n&&(t.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let s=i;s<this.children.length;s++)t.append(this.children[s],0);for(;i>0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){fl(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Xx(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=gf(t,this.attrs||{})),i&&(this.attrs=gf({class:i},this.attrs||{}))}domAtPos(e){return Gx(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(qx(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(bf(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(;n&&ye.get(n)instanceof vi;)n=n.lastChild;if(!n||!this.length||n.nodeName!="BR"&&((i=ye.get(n))===null||i===void 0?void 0:i.isEditable)==!1&&(!V.ios||!this.children.some(s=>s instanceof zt))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof zt)||/[^ -~]/.test(i.text))return null;let n=Jn(i.dom);if(n.length!=1)return null;e+=n[0].width,t=n[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=Kx(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:n}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-n.lineHeight)<2&&n.textHeight<s){let o=(s-n.textHeight)/2;return{top:i.top+o,bottom:i.bottom-o,left:i.left,right:i.left}}}return i}become(e){return e instanceof Vi&&this.children.length==0&&e.children.length==0&&fl(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let i=0,n=0;i<e.children.length;i++){let s=e.children[i],o=n+s.length;if(o>=t){if(s instanceof Vi)return s;if(o>t)break}n=o+s.breakAfter}return null}};h(Vi,"LineView");var Ae=Vi,Pr=class Pr extends ye{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,n,s,o){return i&&(!(i instanceof Pr)||!this.widget.compare(i.widget)||e>0&&s<=0||t<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?je.before(this.dom):je.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let i=new Pr(this.widget,t,this.deco);return i.breakAfter=this.breakAfter,i}get children(){return Jf}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):de.empty}domBoundsAround(){return null}become(e){return e instanceof Pr&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);return i||(this.widget instanceof es?null:Rl(this.dom.getBoundingClientRect(),this.length?e==0:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:i}=this.deco;return t==i?!1:e<0?t<0:i>0}};h(Pr,"BlockWidgetView");var zi=Pr,au=class au extends ki{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};h(au,"BlockGapWidget");var es=au,Cl=class Cl{constructor(e,t,i,n){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof zi&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ae),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Yo(new Xn(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof zi)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let n=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Yo(new zt(this.text.slice(this.textOff,this.textOff+n)),t),i),this.atCursorPos=!0,this.textOff+=n,e-=n,i=0}}span(e,t,i,n){this.buildText(t-e,i,n),this.pos=t,this.openStart<0&&(this.openStart=n)}point(e,t,i,n,s,o){if(this.disallowBlockEffectsFor[o]&&i instanceof Si){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof Si)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new zi(i.widget||wi.block,l,i));else{let a=Gn.create(i.widget||wi.inline,l,l?0:i.startSide),c=this.atCursorPos&&!a.isEditable&&s<=n.length&&(e<t||i.startSide>0),f=!a.isEditable&&(e<t||s>n.length||i.startSide<=0),u=this.getLine();this.pendingBuffer==2&&!c&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(n),c&&(u.append(Yo(new Xn(1),n),s),s=n.length+Math.max(0,s-n.length)),u.append(Yo(a,n),s),this.atCursorPos=f,this.pendingBuffer=f?e<t||s>n.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,i,n,s){let o=new Cl(e,t,i,s);return o.openEnd=be.spans(n,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}};h(Cl,"ContentBuilder");var Dn=Cl;function Yo(r,e){for(let t of e)r=new vi(t,[r],r.length);return r}h(Yo,"wrapMarks");var hu=class hu extends ki{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};h(hu,"NullWidget");var wi=hu;wi.inline=new wi("span");wi.block=new wi("div");var we=function(r){return r[r.LTR=0]="LTR",r[r.RTL=1]="RTL",r}(we||(we={})),Hi=we.LTR,Gf=we.RTL;function e2(r){let e=[];for(let t=0;t<r.length;t++)e.push(1<<+r[t]);return e}h(e2,"dec");var pU=e2("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),mU=e2("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),xf=Object.create(null),It=[];for(let r of["()","[]","{}"]){let e=r.charCodeAt(0),t=r.charCodeAt(1);xf[e]=t,xf[t]=-e}function t2(r){return r<=247?pU[r]:1424<=r&&r<=1524?2:1536<=r&&r<=1785?mU[r-1536]:1774<=r&&r<=2220?4:8192<=r&&r<=8204?256:64336<=r&&r<=65023?4:1}h(t2,"charType");var gU=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,cu=class cu{get dir(){return this.level%2?Gf:Hi}constructor(e,t,i){this.from=e,this.to=t,this.level=i}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,i,n){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=t&&l.to>=t){if(l.level==i)return o;(s<0||(n!=0?n<0?l.from<t:l.to>t:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}};h(cu,"BidiSpan");var qt=cu;function i2(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++){let i=r[t],n=e[t];if(i.from!=n.from||i.to!=n.to||i.direction!=n.direction||!i2(i.inner,n.inner))return!1}return!0}h(i2,"isolatesEq");var ge=[];function bU(r,e,t,i,n){for(let s=0;s<=i.length;s++){let o=s?i[s-1].to:e,l=s<i.length?i[s].from:t,a=s?256:n;for(let c=o,f=a,u=a;c<l;c++){let d=t2(r.charCodeAt(c));d==512?d=f:d==8&&u==4&&(d=16),ge[c]=d==4?2:d,d&7&&(u=d),f=d}for(let c=o,f=a,u=a;c<l;c++){let d=ge[c];if(d==128)c<l-1&&f==ge[c+1]&&f&24?d=ge[c]=f:ge[c]=256;else if(d==64){let p=c+1;for(;p<l&&ge[p]==64;)p++;let m=c&&f==8||p<t&&ge[p]==8?u==1?1:8:256;for(let y=c;y<p;y++)ge[y]=m;c=p-1}else d==8&&u==1&&(ge[c]=1);f=d,d&7&&(u=d)}}}h(bU,"computeCharTypes");function yU(r,e,t,i,n){let s=n==1?2:1;for(let o=0,l=0,a=0;o<=i.length;o++){let c=o?i[o-1].to:e,f=o<i.length?i[o].from:t;for(let u=c,d,p,m;u<f;u++)if(p=xf[d=r.charCodeAt(u)])if(p<0){for(let y=l-3;y>=0;y-=3)if(It[y+1]==-p){let g=It[y+2],b=g&2?n:g&4?g&1?s:n:0;b&&(ge[u]=ge[It[y]]=b),l=y;break}}else{if(It.length==189)break;It[l++]=u,It[l++]=d,It[l++]=a}else if((m=ge[u])==2||m==1){let y=m==n;a=y?0:1;for(let g=l-3;g>=0;g-=3){let b=It[g+2];if(b&2)break;if(y)It[g+2]|=2;else{if(b&4)break;It[g+2]|=4}}}}}h(yU,"processBracketPairs");function xU(r,e,t,i){for(let n=0,s=i;n<=t.length;n++){let o=n?t[n-1].to:r,l=n<t.length?t[n].from:e;for(let a=o;a<l;){let c=ge[a];if(c==256){let f=a+1;for(;;)if(f==l){if(n==t.length)break;f=t[n++].to,l=n<t.length?t[n].from:e}else if(ge[f]==256)f++;else break;let u=s==1,d=(f<e?ge[f]:i)==1,p=u==d?u?1:2:i;for(let m=f,y=n,g=y?t[y-1].to:r;m>a;)m==g&&(m=t[--y].from,g=y?t[y-1].to:r),ge[--m]=p;a=f}else s=c,a++}}}h(xU,"processNeutrals");function vf(r,e,t,i,n,s,o){let l=i%2?2:1;if(i%2==n%2)for(let a=e,c=0;a<t;){let f=!0,u=!1;if(c==s.length||a<s[c].from){let y=ge[a];y!=l&&(f=!1,u=y==16)}let d=!f&&l==1?[]:null,p=f?i:i+1,m=a;e:for(;;)if(c<s.length&&m==s[c].from){if(u)break e;let y=s[c];if(!f)for(let g=y.to,b=c+1;;){if(g==t)break e;if(b<s.length&&s[b].from==g)g=s[b++].to;else{if(ge[g]==l)break e;break}}if(c++,d)d.push(y);else{y.from>a&&o.push(new qt(a,y.from,p));let g=y.direction==Hi!=!(p%2);kf(r,g?i+1:i,n,y.inner,y.from,y.to,o),a=y.to}m=y.to}else{if(m==t||(f?ge[m]!=l:ge[m]==l))break;m++}d?vf(r,a,m,i+1,n,d,o):a<m&&o.push(new qt(a,m,p)),a=m}else for(let a=t,c=s.length;a>e;){let f=!0,u=!1;if(!c||a>s[c-1].to){let y=ge[a-1];y!=l&&(f=!1,u=y==16)}let d=!f&&l==1?[]:null,p=f?i:i+1,m=a;e:for(;;)if(c&&m==s[c-1].to){if(u)break e;let y=s[--c];if(!f)for(let g=y.from,b=c;;){if(g==e)break e;if(b&&s[b-1].to==g)g=s[--b].from;else{if(ge[g-1]==l)break e;break}}if(d)d.push(y);else{y.to<a&&o.push(new qt(y.to,a,p));let g=y.direction==Hi!=!(p%2);kf(r,g?i+1:i,n,y.inner,y.from,y.to,o),a=y.from}m=y.from}else{if(m==e||(f?ge[m-1]!=l:ge[m-1]==l))break;m--}d?vf(r,m,a,i+1,n,d,o):m<a&&o.push(new qt(m,a,p)),a=m}}h(vf,"emitSpans");function kf(r,e,t,i,n,s,o){let l=e%2?2:1;bU(r,n,s,i,l),yU(r,n,s,i,l),xU(n,s,i,l),vf(r,n,s,e,t,i,o)}h(kf,"computeSectionOrder");function vU(r,e,t){if(!r)return[new qt(0,0,e==Gf?1:0)];if(e==Hi&&!t.length&&!gU.test(r))return r2(r.length);if(t.length)for(;r.length>ge.length;)ge[ge.length]=256;let i=[],n=e==Hi?0:1;return kf(r,n,n,t,0,r.length,i),i}h(vU,"computeOrder");function r2(r){return[new qt(0,r,0)]}h(r2,"trivialOrder");var n2="";function kU(r,e,t,i,n){var s;let o=i.head-r.from,l=qt.find(e,o,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),a=e[l],c=a.side(n,t);if(o==c){let d=l+=n?1:-1;if(d<0||d>=e.length)return null;a=e[l=d],o=a.side(!n,t),c=a.side(n,t)}let f=mt(r.text,o,a.forward(n,t));(f<a.from||f>a.to)&&(f=c),n2=r.text.slice(Math.min(o,f),Math.max(o,f));let u=l==(n?e.length-1:0)?null:e[l+(n?1:-1)];return u&&f==c&&u.level+(n?0:1)<a.level?Z.cursor(u.side(!n,t)+r.from,u.forward(n,t)?1:-1,u.level):Z.cursor(f+r.from,a.forward(n,t)?-1:1,a.level)}h(kU,"moveVisually");function SU(r,e,t){for(let i=e;i<t;i++){let n=t2(r.charCodeAt(i));if(n==1)return Hi;if(n==2||n==4)return Gf}return Hi}h(SU,"autoDirection");var s2=W.define(),o2=W.define(),l2=W.define(),a2=W.define(),Sf=W.define(),h2=W.define(),c2=W.define(),Xf=W.define(),Kf=W.define(),f2=W.define({combine:h(r=>r.some(e=>e),"combine")}),u2=W.define({combine:h(r=>r.some(e=>e),"combine")}),d2=W.define(),zn=class zn{constructor(e,t="nearest",i="nearest",n=5,s=5,o=!1){this.range=e,this.y=t,this.x=i,this.yMargin=n,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new zn(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new zn(Z.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}};h(zn,"ScrollTarget");var Nn=zn,Jo=pe.define({map:h((r,e)=>r.map(e),"map")}),p2=pe.define();function tt(r,e,t){let i=r.facet(a2);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}h(tt,"logException");var bi=W.define({combine:h(r=>r.length?r[0]:!0,"combine")}),wU=0,Cn=W.define(),Wn=class Wn{constructor(e,t,i,n,s){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=n,this.extension=s(this)}static define(e,t){let{eventHandlers:i,eventObservers:n,provide:s,decorations:o}=t||{};return new Wn(wU++,e,i,n,l=>{let a=[Cn.of(l)];return o&&a.push(ts.of(c=>{let f=c.plugin(l);return f?o(f):ce.none})),s&&a.push(s(l)),a})}static fromClass(e,t){return Wn.define(i=>new e(i),t)}};h(Wn,"ViewPlugin");var Ye=Wn,fu=class fu{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(tt(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(n){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){tt(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){tt(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}};h(fu,"PluginInstance");var Rn=fu,m2=W.define(),Zf=W.define(),ts=W.define(),g2=W.define(),eu=W.define(),b2=W.define();function hx(r,e){let t=r.state.facet(b2);if(!t.length)return t;let i=t.map(s=>s instanceof Function?s(r):s),n=[];return be.spans(i,e.from,e.to,{point(){},span(s,o,l,a){let c=s-e.from,f=o-e.from,u=n;for(let d=l.length-1;d>=0;d--,a--){let p=l[d].spec.bidiIsolate,m;if(p==null&&(p=SU(e.text,c,f)),a>0&&u.length&&(m=u[u.length-1]).to==c&&m.direction==p)m.to=f,u=m.inner;else{let y={from:c,to:f,direction:p,inner:[]};u.push(y),u=y.inner}}}}),n}h(hx,"getIsolatedRanges");var y2=W.define();function x2(r){let e=0,t=0,i=0,n=0;for(let s of r.state.facet(y2)){let o=s(r);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(n=Math.max(n,o.bottom)))}return{left:e,right:t,top:i,bottom:n}}h(x2,"getScrollMargins");var Un=W.define(),Ir=class Ir{constructor(e,t,i,n){this.fromA=e,this.toA=t,this.fromB=i,this.toB=n}join(e){return new Ir(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>i.toA)){if(n.toA<i.fromA)break;i=i.join(n),e.splice(t-1,1)}}return e.splice(t,0,i),e}static extendWithRanges(e,t){if(t.length==0)return e;let i=[];for(let n=0,s=0,o=0,l=0;;n++){let a=n==e.length?null:e[n],c=o-l,f=a?a.fromB:1e9;for(;s<t.length&&t[s]<f;){let u=t[s],d=t[s+1],p=Math.max(l,u),m=Math.min(f,d);if(p<=m&&new Ir(p+c,m+c,p,m).addToSet(i),d>f)break;s+=2}if(!a)return i;new Ir(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}};h(Ir,"ChangedRange");var Vt=Ir,Ul=class Ul{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=We.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let n=[];this.changes.iterChangedRanges((s,o,l,a)=>n.push(new Vt(s,o,l,a))),this.changedRanges=n}static create(e,t,i){return new Ul(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}};h(Ul,"ViewUpdate");var ul=Ul,uu=class uu extends ye{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ce.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Ae],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Vt(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:f})=>f<this.minWidthFrom||c>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?n=this.domChanged.newSel.head:!LU(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let s=n>-1?QU(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:f}=this.hasComposition;i=new Vt(c,f,e.changes.mapPos(c,-1),e.changes.mapPos(f,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(V.ie||V.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=CU(o,l,e.changes);return i=Vt.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:n}=this.view;n.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=V.chrome||V.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||n.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof zi&&o.widget instanceof es&&s.push(o.dom);n.updateGaps(s)}updateChildren(e,t,i){let n=i?i.range.addToSet(e.slice()):e,s=this.childCursor(t);for(let o=n.length-1;;o--){let l=o>=0?n[o]:null;if(!l)break;let{fromA:a,toA:c,fromB:f,toB:u}=l,d,p,m,y;if(i&&i.range.fromB<u&&i.range.toB>f){let E=Dn.build(this.view.state.doc,f,i.range.fromB,this.decorations,this.dynamicDecorationMap),S=Dn.build(this.view.state.doc,i.range.toB,u,this.decorations,this.dynamicDecorationMap);p=E.breakAtStart,m=E.openStart,y=S.openEnd;let T=this.compositionView(i);S.breakAtStart?T.breakAfter=1:S.content.length&&T.merge(T.length,T.length,S.content[0],!1,S.openStart,0)&&(T.breakAfter=S.content[0].breakAfter,S.content.shift()),E.content.length&&T.merge(0,0,E.content[E.content.length-1],!0,0,E.openEnd)&&E.content.pop(),d=E.content.concat(T).concat(S.content)}else({content:d,breakAtStart:p,openStart:m,openEnd:y}=Dn.build(this.view.state.doc,f,u,this.decorations,this.dynamicDecorationMap));let{i:g,off:b}=s.findPos(c,1),{i:x,off:w}=s.findPos(a,-1);jx(this,x,w,g,b,d,p,m,y)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(p2)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new zt(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new vi(n,[t],t.length);let i=new Ae;return i.append(t,0),i}fixCompositionDOM(e){let t=h((s,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=ye.get(s);l&&l!=o&&(l.dom=null),o.setDOM(s)},"fix"),i=this.childPos(e.range.fromB,1),n=this.children[i.i];t(e.line,n);for(let s=e.marks.length-1;s>=-1;s--)i=n.childPos(i.off,1),n=n.children[i.i],t(s>=0?e.marks[s].node:e.text,n)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,n=i==this.dom,s=!n&&rl(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(n||t||s))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),c=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(V.gecko&&l.empty&&!this.hasComposition&&FU(a)){let u=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(u,a.node.childNodes[a.offset]||null)),a=c=new je(u,0),o=!0}let f=this.view.observer.selectionRange;(o||!f.focusNode||(!Tn(a.node,a.offset,f.anchorNode,f.anchorOffset)||!Tn(c.node,c.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{V.android&&V.chrome&&this.dom.contains(f.focusNode)&&UU(f.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let u=Yn(this.view.root);if(u)if(l.empty){if(V.gecko){let d=BU(a.node,a.offset);if(d&&d!=3){let p=(d==1?zx:Wx)(a.node,a.offset);p&&(a=new je(p.node,p.offset))}}u.collapse(a.node,a.offset),l.bidiLevel!=null&&u.caretBidiLevel!==void 0&&(u.caretBidiLevel=l.bidiLevel)}else if(u.extend){u.collapse(a.node,a.offset);try{u.extend(c.node,c.offset)}catch(d){}}else{let d=document.createRange();l.anchor>l.head&&([a,c]=[c,a]),d.setEnd(c.node,c.offset),d.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(d)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,c)),this.impreciseAnchor=a.precise?null:new je(f.anchorNode,f.anchorOffset),this.impreciseHead=c.precise?null:new je(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Tn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=Yn(e.root),{anchorNode:n,anchorOffset:s}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=Ae.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!a||!c||a.bottom>c.top)return;let f=this.domAtPos(t.head+t.assoc);i.collapse(f.node,f.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&i.collapse(n,s)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let n=e.offset;!i&&n<t.childNodes.length;n++){let s=ye.get(t.childNodes[n]);s instanceof Ae&&(i=s.domAtPos(0))}for(let n=e.offset-1;!i&&n>=0;n--){let s=ye.get(t.childNodes[n]);s instanceof Ae&&(i=s.domAtPos(s.length))}return i?new je(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=ye.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let n=this.children[t];if(i<n.length||n instanceof Ae)break;t++,i=0}return this.children[t].domAtPos(i)}coordsAt(e,t){let i=null,n=0;for(let s=this.length,o=this.children.length-1;o>=0;o--){let l=this.children[o],a=s-l.breakAfter,c=a-l.length;if(a<e)break;if(c<=e&&(c<e||l.covers(-1))&&(a>e||l.covers(1))&&(!i||l instanceof Ae&&!(i instanceof Ae&&t>=0)))i=l,n=c;else if(i&&c==e&&a==e&&l instanceof zi&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(i=null)}s=c}return i?i.coordsAt(e-n,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),n=this.children[t];if(!(n instanceof Ae))return null;for(;n.children.length;){let{i:l,off:a}=n.childPos(i,1);for(;;l++){if(l==n.children.length)return null;if((n=n.children[l]).length)break}i=a}if(!(n instanceof zt))return null;let s=mt(n.text,i);if(s==i)return null;let o=ji(n.dom,i,s).getClientRects();for(let l=0;l<o.length;l++){let a=o[l];if(l==o.length-1||a.top<a.bottom&&a.left<a.right)return a}return null}measureVisibleLineHeights(e){let t=[],{from:i,to:n}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==we.LTR;for(let c=0,f=0;f<this.children.length;f++){let u=this.children[f],d=c+u.length;if(d>n)break;if(c>=i){let p=u.dom.getBoundingClientRect();if(t.push(p.height),o){let m=u.dom.lastChild,y=m?Jn(m):[];if(y.length){let g=y[y.length-1],b=a?g.right-p.left:p.right-g.left;b>l&&(l=b,this.minWidth=s,this.minWidthFrom=c,this.minWidthTo=d)}}}c=d+u.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?we.RTL:we.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ae){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,n;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Jn(e.firstChild)[0];t=e.getBoundingClientRect().height,i=s?s.width/27:7,n=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new cl(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,n=0;;n++){let s=n==t.viewports.length?null:t.viewports[n],o=s?s.from-1:this.length;if(o>i){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(ce.replace({widget:new es(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return ce.set(e)}updateDeco(){let e=1,t=this.view.state.facet(ts).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,n=this.view.state.facet(g2).map((s,o)=>{let l=typeof s=="function";return l&&(i=!0),l?s(this.view):s});for(n.length&&(this.dynamicDecorationMap[e++]=i,t.push(be.join(n))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(d2))try{if(c(this.view,e.range,e))return!0}catch(f){tt(this.view.state,f,"scroll handler")}let{range:t}=e,i=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),n;if(!i)return;!t.empty&&(n=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,n.left),top:Math.min(i.top,n.top),right:Math.max(i.right,n.right),bottom:Math.max(i.bottom,n.bottom)});let s=x2(this.view),o={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;sU(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==we.LTR)}};h(uu,"DocView");var dl=uu;function FU(r){return r.node.nodeType==1&&r.node.firstChild&&(r.offset==0||r.node.childNodes[r.offset-1].contentEditable=="false")&&(r.offset==r.node.childNodes.length||r.node.childNodes[r.offset].contentEditable=="false")}h(FU,"betweenUneditable");function v2(r,e){let t=r.observer.selectionRange;if(!t.focusNode)return null;let i=zx(t.focusNode,t.focusOffset),n=Wx(t.focusNode,t.focusOffset),s=i||n;if(n&&i&&n.node!=i.node){let l=ye.get(n.node);if(!l||l instanceof zt&&l.text!=n.node.nodeValue)s=n;else if(r.docView.lastCompositionAfterCursor){let a=ye.get(i.node);!a||a instanceof zt&&a.text!=i.node.nodeValue||(s=n)}}if(r.docView.lastCompositionAfterCursor=s!=i,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}h(v2,"findCompositionNode");function QU(r,e,t){let i=v2(r,t);if(!i)return null;let{node:n,from:s,to:o}=i,l=n.nodeValue;if(/[\n\r]/.test(l)||r.state.doc.sliceString(i.from,i.to)!=l)return null;let a=e.invertedDesc,c=new Vt(a.mapPos(s),a.mapPos(o),s,o),f=[];for(let u=n.parentNode;;u=u.parentNode){let d=ye.get(u);if(d instanceof vi)f.push({node:u,deco:d.mark});else{if(d instanceof Ae||u.nodeName=="DIV"&&u.parentNode==r.contentDOM)return{range:c,text:n,marks:f,line:u};if(u!=r.contentDOM)f.push({node:u,deco:new Kn({inclusive:!0,attributes:uU(u),tagName:u.tagName.toLowerCase()})});else return null}}}h(QU,"findCompositionRange");function BU(r,e){return r.nodeType!=1?0:(e&&r.childNodes[e-1].contentEditable=="false"?1:0)|(e<r.childNodes.length&&r.childNodes[e].contentEditable=="false"?2:0)}h(BU,"nextToUneditable");var Vr,EU=(Vr=class{constructor(){this.changes=[]}compareRange(e,t){yf(e,t,this.changes)}comparePoint(e,t){yf(e,t,this.changes)}},h(Vr,"DecorationComparator"),Vr);function CU(r,e,t){let i=new EU;return be.compare(r,e,t,i),i.changes}h(CU,"findChangedDeco");function UU(r,e){for(let t=r;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}h(UU,"inUneditable");function LU(r,e){let t=!1;return e&&r.iterChangedRanges((i,n)=>{i<e.to&&n>e.from&&(t=!0)}),t}h(LU,"touchesComposition");function OU(r,e,t=1){let i=r.charCategorizer(e),n=r.doc.lineAt(e),s=e-n.from;if(n.length==0)return Z.cursor(e);s==0?t=1:s==n.length&&(t=-1);let o=s,l=s;t<0?o=mt(n.text,s,!1):l=mt(n.text,s);let a=i(n.text.slice(o,l));for(;o>0;){let c=mt(n.text,o,!1);if(i(n.text.slice(c,o))!=a)break;o=c}for(;l<n.length;){let c=mt(n.text,l);if(i(n.text.slice(l,c))!=a)break;l=c}return Z.range(o+n.from,l+n.from)}h(OU,"groupAt");function _U(r,e){return e.left>r?e.left-r:Math.max(0,r-e.right)}h(_U,"getdx");function TU(r,e){return e.top>r?e.top-r:Math.max(0,r-e.bottom)}h(TU,"getdy");function of(r,e){return r.top<e.bottom-1&&r.bottom>e.top+1}h(of,"yOverlap");function cx(r,e){return e<r.top?{top:e,left:r.left,right:r.right,bottom:r.bottom}:r}h(cx,"upTop");function fx(r,e){return e>r.bottom?{top:r.top,left:r.left,right:r.right,bottom:e}:r}h(fx,"upBot");function wf(r,e,t){let i,n,s,o,l=!1,a,c,f,u;for(let m=r.firstChild;m;m=m.nextSibling){let y=Jn(m);for(let g=0;g<y.length;g++){let b=y[g];n&&of(n,b)&&(b=cx(fx(b,n.bottom),n.top));let x=_U(e,b),w=TU(t,b);if(x==0&&w==0)return m.nodeType==3?ux(m,e,t):wf(m,e,t);if(!i||o>w||o==w&&s>x){i=m,n=b,s=x,o=w;let E=w?t<b.top?-1:1:x?e<b.left?-1:1:0;l=!E||(E>0?g<y.length-1:g>0)}x==0?t>b.bottom&&(!f||f.bottom<b.bottom)?(a=m,f=b):t<b.top&&(!u||u.top>b.top)&&(c=m,u=b):f&&of(f,b)?f=fx(f,b.bottom):u&&of(u,b)&&(u=cx(u,b.top))}}if(f&&f.bottom>=t?(i=a,n=f):u&&u.top<=t&&(i=c,n=u),!i)return{node:r,offset:0};let d=Math.max(n.left,Math.min(n.right,e));if(i.nodeType==3)return ux(i,d,t);if(l&&i.contentEditable!="false")return wf(i,d,t);let p=Array.prototype.indexOf.call(r.childNodes,i)+(e>=(n.left+n.right)/2?1:0);return{node:r,offset:p}}h(wf,"domPosAtCoords");function ux(r,e,t){let i=r.nodeValue.length,n=-1,s=1e9,o=0;for(let l=0;l<i;l++){let a=ji(r,l,l+1).getClientRects();for(let c=0;c<a.length;c++){let f=a[c];if(f.top==f.bottom)continue;o||(o=e-f.left);let u=(f.top>t?f.top-t:t-f.bottom)-1;if(f.left-1<=e&&f.right+1>=e&&u<s){let d=e>=(f.left+f.right)/2,p=d;if((V.chrome||V.gecko)&&ji(r,l).getBoundingClientRect().left==f.right&&(p=!d),u<=0)return{node:r,offset:l+(p?1:0)};n=l+(p?1:0),s=u}}}return{node:r,offset:n>-1?n:o>0?r.nodeValue.length:0}}h(ux,"domPosInText");function k2(r,e,t,i=-1){var n,s;let o=r.contentDOM.getBoundingClientRect(),l=o.top+r.viewState.paddingTop,a,{docHeight:c}=r.viewState,{x:f,y:u}=e,d=u-l;if(d<0)return 0;if(d>c)return r.state.doc.length;for(let E=r.viewState.heightOracle.textHeight/2,S=!1;a=r.elementAtHeight(d),a.type!=He.Text;)for(;d=i>0?a.bottom+E:a.top-E,!(d>=0&&d<=c);){if(S)return t?null:0;S=!0,i=-i}u=l+d;let p=a.from;if(p<r.viewport.from)return r.viewport.from==0?0:t?null:dx(r,o,a,f,u);if(p>r.viewport.to)return r.viewport.to==r.state.doc.length?r.state.doc.length:t?null:dx(r,o,a,f,u);let m=r.dom.ownerDocument,y=r.root.elementFromPoint?r.root:m,g=y.elementFromPoint(f,u);g&&!r.contentDOM.contains(g)&&(g=null),g||(f=Math.max(o.left+1,Math.min(o.right-1,f)),g=y.elementFromPoint(f,u),g&&!r.contentDOM.contains(g)&&(g=null));let b,x=-1;if(g&&((n=r.docView.nearest(g))===null||n===void 0?void 0:n.isEditable)!=!1){if(m.caretPositionFromPoint){let E=m.caretPositionFromPoint(f,u);E&&({offsetNode:b,offset:x}=E)}else if(m.caretRangeFromPoint){let E=m.caretRangeFromPoint(f,u);E&&({startContainer:b,startOffset:x}=E,(!r.contentDOM.contains(b)||V.safari&&DU(b,x,f)||V.chrome&&NU(b,x,f))&&(b=void 0))}}if(!b||!r.docView.dom.contains(b)){let E=Ae.find(r.docView,p);if(!E)return d>a.top+a.height/2?a.to:a.from;({node:b,offset:x}=wf(E.dom,f,u))}let w=r.docView.nearest(b);if(!w)return null;if(w.isWidget&&((s=w.dom)===null||s===void 0?void 0:s.nodeType)==1){let E=w.dom.getBoundingClientRect();return e.y<E.top||e.y<=E.bottom&&e.x<=(E.left+E.right)/2?w.posAtStart:w.posAtEnd}else return w.localPosFromDOM(b,x)+w.posAtStart}h(k2,"posAtCoords");function dx(r,e,t,i,n){let s=Math.round((i-e.left)*r.defaultCharacterWidth);if(r.lineWrapping&&t.height>r.defaultLineHeight*1.5){let l=r.viewState.heightOracle.textHeight,a=Math.floor((n-t.top-(r.defaultLineHeight-l)*.5)/l);s+=a*r.viewState.heightOracle.lineLength}let o=r.state.sliceDoc(t.from,t.to);return t.from+X1(o,s,r.state.tabSize)}h(dx,"posAtCoordsImprecise");function DU(r,e,t){let i;if(r.nodeType!=3||e!=(i=r.nodeValue.length))return!1;for(let n=r.nextSibling;n;n=n.nextSibling)if(n.nodeType!=1||n.nodeName!="BR")return!1;return ji(r,i-1,i).getBoundingClientRect().left>t}h(DU,"isSuspiciousSafariCaretResult");function NU(r,e,t){if(e!=0)return!1;for(let n=r;;){let s=n.parentNode;if(!s||s.nodeType!=1||s.firstChild!=n)return!1;if(s.classList.contains("cm-line"))break;n=s}let i=r.nodeType==1?r.getBoundingClientRect():ji(r,0,Math.max(r.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}h(NU,"isSuspiciousChromeCaretResult");function Ff(r,e){let t=r.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==He.Text))return i}return t}h(Ff,"blockAt");function RU(r,e,t,i){let n=Ff(r,e.head),s=!i||n.type!=He.Text||!(r.lineWrapping||n.widgetLineBreaks)?null:r.coordsAtPos(e.assoc<0&&e.head>n.from?e.head-1:e.head);if(s){let o=r.dom.getBoundingClientRect(),l=r.textDirectionAt(n.from),a=r.posAtCoords({x:t==(l==we.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(a!=null)return Z.cursor(a,t?-1:1)}return Z.cursor(t?n.to:n.from,t?-1:1)}h(RU,"moveToLineBoundary");function px(r,e,t,i){let n=r.state.doc.lineAt(e.head),s=r.bidiSpans(n),o=r.textDirectionAt(n.from);for(let l=e,a=null;;){let c=kU(n,s,o,l,t),f=n2;if(!c){if(n.number==(t?r.state.doc.lines:1))return l;f="\n",n=r.state.doc.line(n.number+(t?1:-1)),s=r.bidiSpans(n),c=r.visualLineSide(n,!t)}if(a){if(!a(f))return l}else{if(!i)return c;a=i(f)}l=c}}h(px,"moveByChar");function AU(r,e,t){let i=r.state.charCategorizer(e),n=i(t);return s=>{let o=i(s);return n==Ot.Space&&(n=o),n==o}}h(AU,"byGroup");function MU(r,e,t,i){let n=e.head,s=t?1:-1;if(n==(t?r.state.doc.length:0))return Z.cursor(n,e.assoc);let o=e.goalColumn,l,a=r.contentDOM.getBoundingClientRect(),c=r.coordsAtPos(n,e.assoc||-1),f=r.documentTop;if(c)o==null&&(o=c.left-a.left),l=s<0?c.top:c.bottom;else{let p=r.viewState.lineBlockAt(n);o==null&&(o=Math.min(a.right-a.left,r.defaultCharacterWidth*(n-p.from))),l=(s<0?p.top:p.bottom)+f}let u=a.left+o,d=i!=null?i:r.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let m=l+(d+p)*s,y=k2(r,{x:u,y:m},!1,s);if(m<a.top||m>a.bottom||(s<0?y<n:y>n)){let g=r.docView.coordsForChar(y),b=!g||m<g.top?-1:1;return Z.cursor(y,b,void 0,o)}}}h(MU,"moveVertically");function nl(r,e,t){for(;;){let i=0;for(let n of r)n.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let a=i||t||(e-s<o-e?-1:1);e=a<0?s:o,i=a}});if(!i)return e}}h(nl,"skipAtomicRanges");function lf(r,e,t){let i=nl(r.state.facet(eu).map(n=>n(r)),t.from,e.head>t.from?-1:1);return i==t.from?t:Z.cursor(i,i<t.from?1:-1)}h(lf,"skipAtoms");var Ln="\uFFFF",du=class du{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Be.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Ln}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let n=e;;){this.findPointBefore(i,n);let s=this.text.length;this.readNode(n);let o=n.nextSibling;if(o==t)break;let l=ye.get(n),a=ye.get(o);(l&&a?l.breakAfter:(l?l.breakAfter:hl(n))||hl(o)&&(n.nodeName!="BR"||n.cmIgnore)&&this.text.length>s)&&this.lineBreak(),n=o}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=n.exec(t))&&(s=l.index,o=l[0].length),this.append(t.slice(i,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=s+o}}readNode(e){if(e.cmIgnore)return;let t=ye.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let n=i.iter();!n.next().done;)n.lineBreak?this.lineBreak():this.append(n.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(PU(e,i.node,i.offset)?t:0))}};h(du,"DOMReader");var Qf=du;function PU(r,e,t){for(;;){if(!e||t<li(e))return!1;if(e==r)return!0;t=Wi(e)+1,e=e.parentNode}}h(PU,"isAtEnd");var pu=class pu{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}};h(pu,"DOMPoint");var pl=pu,mu=class mu{constructor(e,t,i,n){this.typeOver=n,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=s||o?[]:qU(e),a=new Qf(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=VU(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!ff(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),c=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!ff(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),f=e.viewport;if((V.ios||V.chrome)&&e.state.selection.main.empty&&a!=c&&(f.from>0||f.to<e.state.doc.length)){let u=Math.min(a,c),d=Math.max(a,c),p=f.from-u,m=f.to-d;(p==0||p==1||u==0)&&(m==0||m==-1||d==e.state.doc.length)&&(a=0,c=e.state.doc.length)}this.newSel=Z.single(c,a)}}};h(mu,"DOMChange");var Bf=mu;function S2(r,e){let t,{newSel:i}=e,n=r.state.selection.main,s=r.inputState.lastKeyTime>Date.now()-100?r.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=n.from,c=null;(s===8||V.android&&e.text.length<l-o)&&(a=n.to,c="end");let f=$U(r.state.doc.sliceString(o,l,Ln),e.text,a-o,c);f&&(V.chrome&&s==13&&f.toB==f.from+2&&e.text.slice(f.from,f.toB)==Ln+Ln&&f.toB--,t={from:o+f.from,to:o+f.toA,insert:de.of(e.text.slice(f.from,f.toB).split(Ln))})}else i&&(!r.hasFocus&&r.state.facet(bi)||i.main.eq(n))&&(i=null);if(!t&&!i)return!1;if(!t&&e.typeOver&&!n.empty&&i&&i.main.empty?t={from:n.from,to:n.to,insert:r.state.doc.slice(n.from,n.to)}:t&&t.from>=n.from&&t.to<=n.to&&(t.from!=n.from||t.to!=n.to)&&n.to-n.from-(t.to-t.from)<=4?t={from:n.from,to:n.to,insert:r.state.doc.slice(n.from,t.from).append(t.insert).append(r.state.doc.slice(t.to,n.to))}:(V.mac||V.android)&&t&&t.from==t.to&&t.from==n.head-1&&/^\. ?$/.test(t.insert.toString())&&r.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=Z.single(i.main.anchor-1,i.main.head-1)),t={from:n.from,to:n.to,insert:de.of([" "])}):V.chrome&&t&&t.from==t.to&&t.from==n.head&&t.insert.toString()=="\n "&&r.lineWrapping&&(i&&(i=Z.single(i.main.anchor-1,i.main.head-1)),t={from:n.from,to:n.to,insert:de.of([" "])}),t)return tu(r,t,i,s);if(i&&!i.main.eq(n)){let o=!1,l="select";return r.inputState.lastSelectionTime>Date.now()-50&&(r.inputState.lastSelectionOrigin=="select"&&(o=!0),l=r.inputState.lastSelectionOrigin),r.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}h(S2,"applyDOMChange");function tu(r,e,t,i=-1){if(V.ios&&r.inputState.flushIOSKey(e))return!0;let n=r.state.selection.main;if(V.android&&(e.to==n.to&&(e.from==n.from||e.from==n.from-1&&r.state.sliceDoc(e.from,n.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&qr(r.contentDOM,"Enter",13)||(e.from==n.from-1&&e.to==n.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>n.head)&&qr(r.contentDOM,"Backspace",8)||e.from==n.from&&e.to==n.to+1&&e.insert.length==0&&qr(r.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();r.inputState.composing>=0&&r.inputState.composing++;let o,l=h(()=>o||(o=IU(r,e,t)),"defaultInsert");return r.state.facet(h2).some(a=>a(r,e.from,e.to,s,l))||r.dispatch(l()),!0}h(tu,"applyDOMChangeInner");function IU(r,e,t){let i,n=r.state,s=n.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&r.inputState.composing<0){let l=s.from<e.from?n.sliceDoc(s.from,e.from):"",a=s.to>e.to?n.sliceDoc(e.to,s.to):"";i=n.replaceSelection(r.state.toText(l+e.insert.sliceString(0,void 0,r.state.lineBreak)+a))}else{let l=n.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(n.selection.ranges.length>1&&r.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let c=r.state.sliceDoc(e.from,e.to),f,u=t&&v2(r,t.main.head);if(u){let m=e.insert.length-(e.to-e.from);f={from:u.from,to:u.to-m}}else f=r.state.doc.lineAt(s.head);let d=s.to-e.to,p=s.to-s.from;i=n.changeByRange(m=>{if(m.from==s.from&&m.to==s.to)return{changes:l,range:a||m.map(l)};let y=m.to-d,g=y-c.length;if(m.to-m.from!=p||r.state.sliceDoc(g,y)!=c||m.to>=f.from&&m.from<=f.to)return{range:m};let b=n.changes({from:g,to:y,insert:e.insert}),x=m.to-s.to;return{changes:b,range:a?Z.range(Math.max(0,a.anchor+x),Math.max(0,a.head+x)):m.map(b)}})}else i={changes:l,selection:a&&n.selection.replaceRange(a)}}let o="input.type";return(r.composing||r.inputState.compositionPendingChange&&r.inputState.compositionEndedAt>Date.now()-50)&&(r.inputState.compositionPendingChange=!1,o+=".compose",r.inputState.compositionFirstChange&&(o+=".start",r.inputState.compositionFirstChange=!1)),n.update(i,{userEvent:o,scrollIntoView:!0})}h(IU,"applyDefaultInsert");function $U(r,e,t,i){let n=Math.min(r.length,e.length),s=0;for(;s<n&&r.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==n&&r.length==e.length)return null;let o=r.length,l=e.length;for(;o>0&&l>0&&r.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,s-Math.min(o,l));t-=o+a-s}if(o<s&&r.length<e.length){let a=t<=s&&t>=o?s-t:0;s-=a,l=s+(l-o),o=s}else if(l<s){let a=t<=s&&t>=l?s-t:0;s-=a,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}h($U,"findDiff");function qU(r){let e=[];if(r.root.activeElement!=r.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:n,focusOffset:s}=r.observer.selectionRange;return t&&(e.push(new pl(t,i)),(n!=t||s!=i)&&e.push(new pl(n,s))),e}h(qU,"selectionPoints");function VU(r,e){if(r.length==0)return null;let t=r[0].pos,i=r.length==2?r[1].pos:t;return t>-1&&i>-1?Z.single(t+e,i+e):null}h(VU,"selectionFromPoints");var gu=class gu{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,V.safari&&e.contentDOM.addEventListener("input",()=>null),V.gecko&&nL(e.contentDOM.ownerDocument)}handleEvent(e){!GU(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let i=this.handlers[e];if(i){for(let n of i.observers)n(this.view,t);for(let n of i.handlers){if(t.defaultPrevented)break;if(n(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=zU(e),i=this.handlers,n=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,l=i[s];l&&o!=!l.handlers.length&&(n.removeEventListener(s,this.handleEvent),l=null),l||n.addEventListener(s,this.handleEvent,{passive:o})}for(let s in i)s!="scroll"&&!t[s]&&n.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&F2.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),V.android&&V.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return V.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=w2.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||WU.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,qr(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:V.safari&&!V.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};h(gu,"InputState");var Ef=gu;function mx(r,e){return(t,i)=>{try{return e.call(r,i,t)}catch(n){tt(t.state,n)}}}h(mx,"bindHandler");function zU(r){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}h(t,"record");for(let i of r){let n=i.spec;if(n&&n.domEventHandlers)for(let s in n.domEventHandlers){let o=n.domEventHandlers[s];o&&t(s).handlers.push(mx(i.value,o))}if(n&&n.domEventObservers)for(let s in n.domEventObservers){let o=n.domEventObservers[s];o&&t(s).observers.push(mx(i.value,o))}}for(let i in _t)t(i).handlers.push(_t[i]);for(let i in xt)t(i).observers.push(xt[i]);return e}h(zU,"computeHandlers");var w2=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],WU="dthko",F2=[16,17,18,20,91,92,224,225],Go=6;function Xo(r){return Math.max(0,r)*.7+8}h(Xo,"dragScrollSpeed");function jU(r,e){return Math.max(Math.abs(r.clientX-e.clientX),Math.abs(r.clientY-e.clientY))}h(jU,"dist");var bu=class bu{constructor(e,t,i,n){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=oU(e.contentDOM),this.atoms=e.state.facet(eu).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Be.allowMultipleSelections)&&HU(e,t),this.dragging=JU(e,t)&&E2(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&jU(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,i=0,n=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:n,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=x2(this.view);e.clientX-a.left<=n+Go?t=-Xo(n-e.clientX):e.clientX+a.right>=o-Go&&(t=Xo(e.clientX-o)),e.clientY-a.top<=s+Go?i=-Xo(s-e.clientY):e.clientY+a.bottom>=l-Go&&(i=Xo(e.clientY-l)),this.setScrollSpeed(t,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;i<e.ranges.length;i++){let n=e.ranges[i],s=null;if(n.empty){let o=nl(this.atoms,n.from,0);o!=n.from&&(s=Z.cursor(o,-1))}else{let o=nl(this.atoms,n.from,-1),l=nl(this.atoms,n.to,1);(o!=n.from||l!=n.to)&&(s=Z.range(n.from==n.anchor?o:l,n.from==n.head?o:l))}s&&(t||(t=e.ranges.slice()),t[i]=s)}return t?Z.create(t,e.mainIndex):e}select(e){let{view:t}=this,i=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};h(bu,"MouseSelection");var Cf=bu;function HU(r,e){let t=r.state.facet(s2);return t.length?t[0](e):V.mac?e.metaKey:e.ctrlKey}h(HU,"addsSelectionRange");function YU(r,e){let t=r.state.facet(o2);return t.length?t[0](e):V.mac?!e.altKey:!e.ctrlKey}h(YU,"dragMovesSelection");function JU(r,e){let{main:t}=r.state.selection;if(t.empty)return!1;let i=Yn(r.root);if(!i||i.rangeCount==0)return!0;let n=i.getRangeAt(0).getClientRects();for(let s=0;s<n.length;s++){let o=n[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}h(JU,"isInPrimarySelection");function GU(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=r.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=ye.get(t))&&i.ignoreEvent(e))return!1;return!0}h(GU,"eventBelongsToEditor");var _t=Object.create(null),xt=Object.create(null),Q2=V.ie&&V.ie_version<15||V.ios&&V.webkit_version<604;function XU(r){let e=r.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{r.focus(),t.remove(),B2(r,t.value)},50)}h(XU,"capturePaste");function Ml(r,e,t){for(let i of r.facet(e))t=i(t,r);return t}h(Ml,"textFilter");function B2(r,e){e=Ml(r.state,Xf,e);let{state:t}=r,i,n=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(Uf!=null&&t.selection.ranges.every(a=>a.empty)&&Uf==s.toString()){let a=-1;i=t.changeByRange(c=>{let f=t.doc.lineAt(c.from);if(f.from==a)return{range:c};a=f.from;let u=t.toText((o?s.line(n++).text:e)+t.lineBreak);return{changes:{from:f.from,insert:u},range:Z.cursor(c.from+u.length)}})}else o?i=t.changeByRange(a=>{let c=s.line(n++);return{changes:{from:a.from,to:a.to,insert:c.text},range:Z.cursor(a.from+c.length)}}):i=t.replaceSelection(s);r.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}h(B2,"doPaste");xt.scroll=r=>{r.inputState.lastScrollTop=r.scrollDOM.scrollTop,r.inputState.lastScrollLeft=r.scrollDOM.scrollLeft};_t.keydown=(r,e)=>(r.inputState.setSelectionOrigin("select"),e.keyCode==27&&r.inputState.tabFocusMode!=0&&(r.inputState.tabFocusMode=Date.now()+2e3),!1);xt.touchstart=(r,e)=>{r.inputState.lastTouchTime=Date.now(),r.inputState.setSelectionOrigin("select.pointer")};xt.touchmove=r=>{r.inputState.setSelectionOrigin("select.pointer")};_t.mousedown=(r,e)=>{if(r.observer.flush(),r.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of r.state.facet(l2))if(t=i(r,e),t)break;if(!t&&e.button==0&&(t=eL(r,e)),t){let i=!r.hasFocus;r.inputState.startMouseSelection(new Cf(r,e,t,i)),i&&r.observer.ignore(()=>{$x(r.contentDOM);let s=r.root.activeElement;s&&!s.contains(r.contentDOM)&&s.blur()});let n=r.inputState.mouseSelection;if(n)return n.start(e),n.dragging===!1}return!1};function gx(r,e,t,i){if(i==1)return Z.cursor(e,t);if(i==2)return OU(r.state,e,t);{let n=Ae.find(r.docView,e),s=r.state.doc.lineAt(n?n.posAtEnd:e),o=n?n.posAtStart:s.from,l=n?n.posAtEnd:s.to;return l<r.state.doc.length&&l==s.to&&l++,Z.range(o,l)}}h(gx,"rangeForClick");var bx=h((r,e,t)=>e>=t.top&&e<=t.bottom&&r>=t.left&&r<=t.right,"inside");function KU(r,e,t,i){let n=Ae.find(r.docView,e);if(!n)return 1;let s=e-n.posAtStart;if(s==0)return 1;if(s==n.length)return-1;let o=n.coordsAt(s,-1);if(o&&bx(t,i,o))return-1;let l=n.coordsAt(s,1);return l&&bx(t,i,l)?1:o&&o.bottom>=i?-1:1}h(KU,"findPositionSide");function yx(r,e){let t=r.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:KU(r,t,e.clientX,e.clientY)}}h(yx,"queryPos");var ZU=V.ie&&V.ie_version<=11,xx=null,vx=0,kx=0;function E2(r){if(!ZU)return r.detail;let e=xx,t=kx;return xx=r,kx=Date.now(),vx=!e||t>Date.now()-400&&Math.abs(e.clientX-r.clientX)<2&&Math.abs(e.clientY-r.clientY)<2?(vx+1)%3:1}h(E2,"getClickType");function eL(r,e){let t=yx(r,e),i=E2(e),n=r.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),n=n.map(s.changes))},get(s,o,l){let a=yx(r,s),c,f=gx(r,a.pos,a.bias,i);if(t.pos!=a.pos&&!o){let u=gx(r,t.pos,t.bias,i),d=Math.min(u.from,f.from),p=Math.max(u.to,f.to);f=d<f.from?Z.range(d,p):Z.range(p,d)}return o?n.replaceRange(n.main.extend(f.from,f.to)):l&&i==1&&n.ranges.length>1&&(c=tL(n,a.pos))?c:l?n.addRange(f):Z.create([f])}}}h(eL,"basicMouseSelection");function tL(r,e){for(let t=0;t<r.ranges.length;t++){let{from:i,to:n}=r.ranges[t];if(i<=e&&n>=e)return Z.create(r.ranges.slice(0,t).concat(r.ranges.slice(t+1)),r.mainIndex==t?0:r.mainIndex-(r.mainIndex>t?1:0))}return null}h(tL,"removeRangeAround");_t.dragstart=(r,e)=>{let{selection:{main:t}}=r.state;if(e.target.draggable){let n=r.docView.nearest(e.target);if(n&&n.isWidget){let s=n.posAtStart,o=s+n.length;(s>=t.to||o<=t.from)&&(t=Z.range(s,o))}}let{inputState:i}=r;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Ml(r.state,Kf,r.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};_t.dragend=r=>(r.inputState.draggedContent=null,!1);function Sx(r,e,t,i){if(t=Ml(r.state,Xf,t),!t)return;let n=r.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=r.inputState,o=i&&s&&YU(r,e)?{from:s.from,to:s.to}:null,l={from:n,insert:t},a=r.state.changes(o?[o,l]:l);r.focus(),r.dispatch({changes:a,selection:{anchor:a.mapPos(n,-1),head:a.mapPos(n,1)},userEvent:o?"move.drop":"input.drop"}),r.inputState.draggedContent=null}h(Sx,"dropText");_t.drop=(r,e)=>{if(!e.dataTransfer)return!1;if(r.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),n=0,s=h(()=>{++n==t.length&&Sx(r,e,i.filter(o=>o!=null).join(r.state.lineBreak),!1)},"finishFile");for(let o=0;o<t.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),s()},l.readAsText(t[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Sx(r,e,i,!0),!0}return!1};_t.paste=(r,e)=>{if(r.state.readOnly)return!0;r.observer.flush();let t=Q2?null:e.clipboardData;return t?(B2(r,t.getData("text/plain")||t.getData("text/uri-list")),!0):(XU(r),!1)};function iL(r,e){let t=r.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),r.focus()},50)}h(iL,"captureCopy");function rL(r){let e=[],t=[],i=!1;for(let n of r.selection.ranges)n.empty||(e.push(r.sliceDoc(n.from,n.to)),t.push(n));if(!e.length){let n=-1;for(let{from:s}of r.selection.ranges){let o=r.doc.lineAt(s);o.number>n&&(e.push(o.text),t.push({from:o.from,to:Math.min(r.doc.length,o.to+1)})),n=o.number}i=!0}return{text:Ml(r,Kf,e.join(r.lineBreak)),ranges:t,linewise:i}}h(rL,"copiedRange");var Uf=null;_t.copy=_t.cut=(r,e)=>{let{text:t,ranges:i,linewise:n}=rL(r.state);if(!t&&!n)return!1;Uf=n?t:null,e.type=="cut"&&!r.state.readOnly&&r.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=Q2?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(iL(r,t),!1)};var C2=gt.define();function U2(r,e){let t=[];for(let i of r.facet(c2)){let n=i(r,e);n&&t.push(n)}return t?r.update({effects:t,annotations:C2.of(!0)}):null}h(U2,"focusChangeTransaction");function L2(r){setTimeout(()=>{let e=r.hasFocus;if(e!=r.inputState.notifiedFocused){let t=U2(r.state,e);t?r.dispatch(t):r.update([])}},10)}h(L2,"updateForFocusChange");xt.focus=r=>{r.inputState.lastFocusTime=Date.now(),!r.scrollDOM.scrollTop&&(r.inputState.lastScrollTop||r.inputState.lastScrollLeft)&&(r.scrollDOM.scrollTop=r.inputState.lastScrollTop,r.scrollDOM.scrollLeft=r.inputState.lastScrollLeft),L2(r)};xt.blur=r=>{r.observer.clearSelectionRange(),L2(r)};xt.compositionstart=xt.compositionupdate=r=>{r.observer.editContext||(r.inputState.compositionFirstChange==null&&(r.inputState.compositionFirstChange=!0),r.inputState.composing<0&&(r.inputState.composing=0))};xt.compositionend=r=>{r.observer.editContext||(r.inputState.composing=-1,r.inputState.compositionEndedAt=Date.now(),r.inputState.compositionPendingKey=!0,r.inputState.compositionPendingChange=r.observer.pendingRecords().length>0,r.inputState.compositionFirstChange=null,V.chrome&&V.android?r.observer.flushSoon():r.inputState.compositionPendingChange?Promise.resolve().then(()=>r.observer.flush()):setTimeout(()=>{r.inputState.composing<0&&r.docView.hasComposition&&r.update([])},50))};xt.contextmenu=r=>{r.inputState.lastContextMenu=Date.now()};_t.beforeinput=(r,e)=>{var t,i;if(e.inputType=="insertReplacementText"&&r.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],a=r.posAtDOM(l.startContainer,l.startOffset),c=r.posAtDOM(l.endContainer,l.endOffset);return tu(r,{from:a,to:c,insert:r.state.toText(s)},null),!0}}let n;if(V.chrome&&V.android&&(n=w2.find(s=>s.inputType==e.inputType))&&(r.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&r.hasFocus&&(r.contentDOM.blur(),r.focus())},100)}return V.ios&&e.inputType=="deleteContentForward"&&r.observer.flushSoon(),V.safari&&e.inputType=="insertText"&&r.inputState.composing>=0&&setTimeout(()=>xt.compositionend(r,e),20),!1};var wx=new Set;function nL(r){wx.has(r)||(wx.add(r),r.addEventListener("copy",()=>{}),r.addEventListener("cut",()=>{}))}h(nL,"firefoxCopyCutHack");var Fx=["pre-wrap","normal","pre-line","break-spaces"],zr=!1;function Qx(){zr=!1}h(Qx,"clearHeightChangeFlag");var yu=class yu{constructor(e){this.lineWrapping=e,this.doc=de.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Fx.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i<e.length;i++){let n=e[i];n<0?i++:this.heightSamples[Math.floor(n*10)]||(t=!0,this.heightSamples[Math.floor(n*10)]=!0)}return t}refresh(e,t,i,n,s,o){let l=Fx.indexOf(e)>-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=n,this.lineLength=s,a){this.heightSamples={};for(let c=0;c<o.length;c++){let f=o[c];f<0?c++:this.heightSamples[Math.floor(f*10)]=!0}}return a}};h(yu,"HeightOracle");var Lf=yu,xu=class xu{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}};h(xu,"MeasuredHeights");var Of=xu,Ll=class Ll{constructor(e,t,i,n,s){this.from=e,this.length=t,this.top=i,this.height=n,this._content=s}get type(){return typeof this._content=="number"?He.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Si?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Ll(this.from,this.length+e.length,this.top,this.height+e.height,t)}};h(Ll,"BlockInfo");var $t=Ll,Se=function(r){return r[r.ByPos=0]="ByPos",r[r.ByHeight=1]="ByHeight",r[r.ByPosNoHeight=2]="ByPosNoHeight",r}(Se||(Se={})),sl=.001,$r=class $r{constructor(e,t,i=2){this.length=e,this.height=t,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>sl&&(zr=!0),this.height=e)}replace(e,t,i){return $r.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,n){let s=this,o=i.doc;for(let l=n.length-1;l>=0;l--){let{fromA:a,toA:c,fromB:f,toB:u}=n[l],d=s.lineAt(a,Se.ByPosNoHeight,i.setDoc(t),0,0),p=d.to>=c?d:s.lineAt(c,Se.ByPosNoHeight,i,0,0);for(u+=p.to-c,c=p.to;l>0&&d.from<=n[l-1].toA;)a=n[l-1].fromA,f=n[l-1].fromB,l--,a<d.from&&(d=s.lineAt(a,Se.ByPosNoHeight,i,0,0));f+=d.from-a,a=d.from;let m=Tf.build(i.setDoc(o),e,f,u);s=ml(s,s.replace(a,c,m))}return s.updateHeight(i,0)}static empty(){return new yt(0,0)}static of(e){if(e.length==1)return e[0];let t=0,i=e.length,n=0,s=0;for(;;)if(t==i)if(n>s*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,n-=l.size}else if(s>n*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,s-=l.size}else break;else if(n<s){let l=e[t++];l&&(n+=l.size)}else{let l=e[--i];l&&(s+=l.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,i++),new _f($r.of(e.slice(0,t)),o,$r.of(e.slice(i)))}};h($r,"HeightMap");var ht=$r;function ml(r,e){return r==e?r:(r.constructor!=e.constructor&&(zr=!0),e)}h(ml,"replace");ht.prototype.size=1;var vu=class vu extends ht{constructor(e,t,i){super(e,t),this.deco=i}blockAt(e,t,i,n){return new $t(n,this.length,i,this.height,this.deco||0)}lineAt(e,t,i,n,s){return this.blockAt(0,i,n,s)}forEachLine(e,t,i,n,s,o){e<=s+this.length&&t>=s&&o(this.blockAt(0,i,n,s))}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more&&this.setHeight(n.heights[n.index++]),this.outdated=!1,this}toString(){return"block(".concat(this.length,")")}};h(vu,"HeightMapBlock");var gl=vu,jn=class jn extends gl{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,n){return new $t(n,this.length,i,this.height,this.breaks)}replace(e,t,i){let n=i[0];return i.length==1&&(n instanceof jn||n instanceof xi&&n.flags&4)&&Math.abs(this.length-n.length)<10?(n instanceof xi?n=new jn(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):ht.of(i)}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more?this.setHeight(n.heights[n.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}};h(jn,"HeightMapText");var yt=jn,at=class at extends ht{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,n=e.doc.lineAt(t+this.length).number,s=n-i+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*s);o=a/s,this.length>s+1&&(l=(this.height-a)/(this.length-s-1))}else o=this.height/s;return{firstLine:i,lastLine:n,perLine:o,perChar:l}}blockAt(e,t,i,n){let{firstLine:s,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,n);if(t.lineWrapping){let c=n+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),f=t.doc.lineAt(c),u=l+f.length*a,d=Math.max(i,e-u/2);return new $t(f.from,f.length,d,u,0)}else{let c=Math.max(0,Math.min(o-s,Math.floor((e-i)/l))),{from:f,length:u}=t.doc.line(s+c);return new $t(f,u,i+l*c,l,0)}}lineAt(e,t,i,n,s){if(t==Se.ByHeight)return this.blockAt(e,i,n,s);if(t==Se.ByPosNoHeight){let{from:p,to:m}=i.doc.lineAt(e);return new $t(p,m-p,0,0,0)}let{firstLine:o,perLine:l,perChar:a}=this.heightMetrics(i,s),c=i.doc.lineAt(e),f=l+c.length*a,u=c.number-o,d=n+l*u+a*(c.from-s-u);return new $t(c.from,c.length,Math.max(n,Math.min(d,n+this.height-f)),f,0)}forEachLine(e,t,i,n,s,o){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:l,perLine:a,perChar:c}=this.heightMetrics(i,s);for(let f=e,u=n;f<=t;){let d=i.doc.lineAt(f);if(f==e){let m=d.number-l;u+=a*m+c*(e-s-m)}let p=a+c*d.length;o(new $t(d.from,d.length,u,p,0)),u+=p,f=d.to+1}}replace(e,t,i){let n=this.length-t;if(n>0){let s=i[i.length-1];s instanceof at?i[i.length-1]=new at(s.length+n):i.push(null,new at(n-1))}if(e>0){let s=i[0];s instanceof at?i[0]=new at(e+s.length):i.unshift(new at(e-1),null)}return ht.of(i)}decomposeLeft(e,t){t.push(new at(e-1),null)}decomposeRight(e,t){t.push(null,new at(this.length-e-1))}updateHeight(e,t=0,i=!1,n){let s=t+this.length;if(n&&n.from<=t+this.length&&n.more){let o=[],l=Math.max(t,n.from),a=-1;for(n.from>t&&o.push(new at(n.from-t-1).updateHeight(e,t));l<=s&&n.more;){let f=e.doc.lineAt(l).length;o.length&&o.push(null);let u=n.heights[n.index++];a==-1?a=u:Math.abs(u-a)>=sl&&(a=-2);let d=new yt(f,u);d.outdated=!1,o.push(d),l+=f+1}l<=s&&o.push(null,new at(s-l).updateHeight(e,l));let c=ht.of(o);return(a<0||Math.abs(c.height-this.height)>=sl||Math.abs(a-this.heightMetrics(e,t).perLine)>=sl)&&(zr=!0),ml(this,c)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return"gap(".concat(this.length,")")}};h(at,"HeightMapGap");var xi=at,ku=class ku extends ht{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,n){let s=i+this.left.height;return e<s?this.left.blockAt(e,t,i,n):this.right.blockAt(e,t,s,n+this.left.length+this.break)}lineAt(e,t,i,n,s){let o=n+this.left.height,l=s+this.left.length+this.break,a=t==Se.ByHeight?e<o:e<l,c=a?this.left.lineAt(e,t,i,n,s):this.right.lineAt(e,t,i,o,l);if(this.break||(a?c.to<l:c.from>l))return c;let f=t==Se.ByPosNoHeight?Se.ByPosNoHeight:Se.ByPos;return a?c.join(this.right.lineAt(l,f,i,o,l)):this.left.lineAt(l,f,i,n,s).join(c)}forEachLine(e,t,i,n,s,o){let l=n+this.left.height,a=s+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,i,n,s,o),t>=a&&this.right.forEachLine(e,t,i,l,a,o);else{let c=this.lineAt(a,Se.ByPos,i,n,s);e<c.from&&this.left.forEachLine(e,c.from-1,i,n,s,o),c.to>=e&&c.from<=t&&o(c),t>c.to&&this.right.forEachLine(c.to+1,t,i,l,a,o)}}replace(e,t,i){let n=this.left.length+this.break;if(t<n)return this.balanced(this.left.replace(e,t,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,i));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of i)s.push(l);if(e>0&&Bx(s,o-1),t<this.length){let l=s.length;this.decomposeRight(t,s),Bx(s,l)}return ht.of(s)}decomposeLeft(e,t){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(i++,e>=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,n=i+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e<i&&this.left.decomposeRight(e,t),this.break&&e<n&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ht.of(this.break?[e,null,t]:[e,t]):(this.left=ml(this.left,e),this.right=ml(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,n){let{left:s,right:o}=this,l=t+s.length+this.break,a=null;return n&&n.from<=t+s.length&&n.more?a=s=s.updateHeight(e,t,i,n):s.updateHeight(e,t,i),n&&n.from<=l+o.length&&n.more?a=o=o.updateHeight(e,l,i,n):o.updateHeight(e,l,i),a?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};h(ku,"HeightMapBranch");var _f=ku;function Bx(r,e){let t,i;r[e]==null&&(t=r[e-1])instanceof xi&&(i=r[e+1])instanceof xi&&r.splice(e-1,3,new xi(t.length+1+i.length))}h(Bx,"mergeGaps");var sL=5,Ol=class Ol{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof yt?n.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new yt(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e<t||i.heightRelevant){let n=i.widget?i.widget.estimatedHeight:0,s=i.widget?i.widget.lineBreaks:0;n<0&&(n=this.oracle.lineHeight);let o=t-e;i.block?this.addBlock(new gl(o,n,i)):(o||s||n>=sL)&&this.addLineDeco(n,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new yt(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new xi(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof yt)return e;let t=new yt(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let n=this.ensureLine();n.length+=i,n.collapsed+=i,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof yt)&&!this.isCovered?this.nodes.push(new yt(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let n of this.nodes)n instanceof yt&&n.updateHeight(this.oracle,i),i+=n?n.length:1;return this.nodes}static build(e,t,i,n){let s=new Ol(i,e);return be.spans(t,i,n,s,0),s.finish(i)}};h(Ol,"NodeBuilder");var Tf=Ol;function oL(r,e,t){let i=new Df;return be.compare(r,e,t,i,0),i.changes}h(oL,"heightRelevantDecoChanges");var Su=class Su{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,i,n){(e<t||i&&i.heightRelevant||n&&n.heightRelevant)&&yf(e,t,this.changes,5)}};h(Su,"DecorationComparator");var Df=Su;function lL(r,e){let t=r.getBoundingClientRect(),i=r.ownerDocument,n=i.defaultView||window,s=Math.max(0,t.left),o=Math.min(n.innerWidth,t.right),l=Math.max(0,t.top),a=Math.min(n.innerHeight,t.bottom);for(let c=r.parentNode;c&&c!=i.body;)if(c.nodeType==1){let f=c,u=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&u.overflow!="visible"){let d=f.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),l=Math.max(l,d.top),a=Math.min(c==r.parentNode?n.innerHeight:a,d.bottom)}c=u.position=="absolute"||u.position=="fixed"?f.offsetParent:f.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}h(lL,"visiblePixelRange");function aL(r,e){let t=r.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}h(aL,"fullPixelRange");var wu=class wu{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++){let n=e[i],s=t[i];if(n.from!=s.from||n.to!=s.to||n.size!=s.size)return!1}return!0}draw(e,t){return ce.replace({widget:new Nf(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}};h(wu,"LineGap");var An=wu,Fu=class Fu extends ki{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}};h(Fu,"LineGapWidget");var Nf=Fu,Qu=class Qu{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Ex,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=we.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(Zf).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new Lf(t),this.stateDeco=e.facet(ts).filter(i=>typeof i!="function"),this.heightMap=ht.empty().applyChanges(this.stateDeco,de.empty,this.heightOracle.setDoc(e.doc),[new Vt(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ce.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let n=i?t.head:t.anchor;if(!e.some(({from:s,to:o})=>n>=s&&n<=o)){let{from:s,to:o}=this.lineBlockAt(n);e.push(new Rr(s,o))}}return this.viewports=e.sort((i,n)=>i.from-n.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Ex:new Rf(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(On(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ts).filter(f=>typeof f!="function");let n=e.changedRanges,s=Vt.extendWithRanges(n,oL(i,this.stateDeco,e?e.changes:We.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Qx(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||zr)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<a.from||t.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let c=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(u2)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),n=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?we.RTL:we.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let c=0,f=0;if(l.width&&l.height){let{scaleX:E,scaleY:S}=Ix(t,l);(E>.005&&Math.abs(this.scaleX-E)>.005||S>.005&&Math.abs(this.scaleY-S)>.005)&&(this.scaleX=E,this.scaleY=S,c|=8,o=a=!0)}let u=(parseInt(i.paddingTop)||0)*this.scaleY,d=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(n.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=Vx(e.scrollDOM);let m=(this.printing?aL:lL)(t,this.paddingTop),y=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let x=l.width;if((this.contentDOMWidth!=x||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),a){let E=e.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(E)&&(o=!0),o||n.lineWrapping&&Math.abs(x-this.contentDOMWidth)>n.charWidth){let{lineHeight:S,charWidth:T,textHeight:L}=e.docView.measureTextSize();o=S>0&&n.refresh(s,S,T,L,x/T,E),o&&(e.docView.minWidth=0,c|=8)}y>0&&g>0?f=Math.max(y,g):y<0&&g<0&&(f=Math.min(y,g)),Qx();for(let S of this.viewports){let T=S.from==this.viewport.from?E:e.docView.measureVisibleLineHeights(S);this.heightMap=(o?ht.empty().applyChanges(this.stateDeco,de.empty,this.heightOracle,[new Vt(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(n,0,o,new Of(S.from,T))}zr&&(c|=2)}let w=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),c|=this.updateForViewport()),(c&2||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new Rr(n.lineAt(o-i*1e3,Se.ByHeight,s,0,0).from,n.lineAt(l+(1-i)*1e3,Se.ByHeight,s,0,0).to);if(t){let{head:c}=t.range;if(c<a.from||c>a.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),u=n.lineAt(c,Se.ByPos,s,0,0),d;t.y=="center"?d=(u.top+u.bottom)/2-f/2:t.y=="start"||t.y=="nearest"&&c<a.from?d=u.top:d=u.bottom-f,a=new Rr(n.lineAt(d-1e3/2,Se.ByHeight,s,0,0).from,n.lineAt(d+f+1e3/2,Se.ByHeight,s,0,0).to)}}return a}mapViewport(e,t){let i=t.mapPos(e.from,-1),n=t.mapPos(e.to,1);return new Rr(this.heightMap.lineAt(i,Se.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(n,Se.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},i=0){if(!this.inView)return!0;let{top:n}=this.heightMap.lineAt(e,Se.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,Se.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||n<=o-Math.max(10,Math.min(-i,250)))&&(t==this.state.doc.length||s>=l+Math.max(10,Math.min(i,250)))&&n>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let i=[];for(let n of e)t.touchesRange(n.from,n.to)||i.push(new An(t.mapPos(n.from),t.mapPos(n.to),n.size));return i}ensureLineGaps(e,t){let i=this.heightOracle.lineWrapping,n=i?1e4:2e3,s=n>>1,o=n<<1;if(this.defaultTextDirection!=we.LTR&&!i)return[];let l=[],a=h((f,u,d,p)=>{if(u-f<s)return;let m=this.state.selection.main,y=[m.from];m.empty||y.push(m.to);for(let b of y)if(b>f&&b<u){a(f,b-10,d,p),a(b+10,u,d,p);return}let g=cL(e,b=>b.from>=d.from&&b.to<=d.to&&Math.abs(b.from-f)<s&&Math.abs(b.to-u)<s&&!y.some(x=>b.from<x&&b.to>x));if(!g){if(u<d.to&&t&&i&&t.visibleRanges.some(b=>b.from<=u&&b.to>=u)){let b=t.moveToLineBoundary(Z.cursor(u),!1,!0).head;b>f&&(u=b)}g=new An(f,u,this.gapSize(d,f,u,p))}l.push(g)},"addGap"),c=h(f=>{if(f.length<o||f.type!=He.Text)return;let u=hL(f.from,f.to,this.stateDeco);if(u.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,p,m;if(i){let y=n/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,b;if(d!=null){let x=Zo(u,d),w=((this.visibleBottom-this.visibleTop)/2+y)/f.height;g=x-w,b=x+w}else g=(this.visibleTop-f.top-y)/f.height,b=(this.visibleBottom-f.top+y)/f.height;p=Ko(u,g),m=Ko(u,b)}else{let y=u.total*this.heightOracle.charWidth,g=n*this.heightOracle.charWidth,b,x;if(d!=null){let w=Zo(u,d),E=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/y;b=w-E,x=w+E}else b=(this.pixelViewport.left-g)/y,x=(this.pixelViewport.right+g)/y;p=Ko(u,b),m=Ko(u,x)}p>f.from&&a(f.from,p,f,u),m<f.to&&a(m,f.to,f,u)},"checkLine");for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(c):c(f);return l}gapSize(e,t,i,n){let s=Zo(n,i)-Zo(n,t);return this.heightOracle.lineWrapping?e.height*s:n.total*this.heightOracle.charWidth*s}updateLineGaps(e){An.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ce.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];be.spans(e,this.viewport.from,this.viewport.to,{span(n,s){t.push({from:n,to:s})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((n,s)=>n.from!=t[s].from||n.to!=t[s].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||On(this.heightMap.lineAt(e,Se.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||On(this.heightMap.lineAt(this.scaler.fromDOM(e),Se.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return On(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}};h(Qu,"ViewState");var bl=Qu,Bu=class Bu{constructor(e,t){this.from=e,this.to=t}};h(Bu,"Viewport");var Rr=Bu;function hL(r,e,t){let i=[],n=r,s=0;return be.spans(t,r,e,{span(){},point(o,l){o>n&&(i.push({from:n,to:o}),s+=o-n),n=l}},20),n<e&&(i.push({from:n,to:e}),s+=e-n),{total:s,ranges:i}}h(hL,"lineStructure");function Ko({total:r,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let i=Math.floor(r*t);for(let n=0;;n++){let{from:s,to:o}=e[n],l=o-s;if(i<=l)return s+i;i-=l}}h(Ko,"findPosition");function Zo(r,e){let t=0;for(let{from:i,to:n}of r.ranges){if(e<=n){t+=e-i;break}t+=n-i}return t/r.total}h(Zo,"findFraction");function cL(r,e){for(let t of r)if(e(t))return t}h(cL,"find");var Ex={toDOM(r){return r},fromDOM(r){return r},scale:1,eq(r){return r==this}},_l=class _l{constructor(e,t,i){let n=0,s=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let c=t.lineAt(l,Se.ByPos,e,0,0).top,f=t.lineAt(a,Se.ByPos,e,0,0).bottom;return n+=f-c,{from:l,to:a,top:c,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-n)/(t.height-n);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,i=0,n=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return n+(e-i)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);i=s.bottom,n=s.domBottom}}fromDOM(e){for(let t=0,i=0,n=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return i+(e-n)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);i=s.bottom,n=s.domBottom}}eq(e){return e instanceof _l?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,i)=>t.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}};h(_l,"BigScaler");var Rf=_l;function On(r,e){if(e.scale==1)return r;let t=e.toDOM(r.top),i=e.toDOM(r.bottom);return new $t(r.from,r.length,t,i-t,Array.isArray(r._content)?r._content.map(n=>On(n,e)):r._content)}h(On,"scaleBlock");var el=W.define({combine:h(r=>r.join(" "),"combine")}),Af=W.define({combine:h(r=>r.indexOf(!0)>-1,"combine")}),Mf=bt.newName(),O2=bt.newName(),_2=bt.newName(),T2={"&light":"."+O2,"&dark":"."+_2};function Pf(r,e,t){return new bt(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,n=>{if(n=="&")return r;if(!t||!t[n])throw new RangeError("Unsupported selector: ".concat(n));return t[n]}):r+" "+i}})}h(Pf,"buildTheme");var fL=Pf("."+Mf,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},T2),uL={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},af=V.ie&&V.ie_version<=11,Eu=class Eu{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new uf,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(V.ie&&V.ie_version<=11||V.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(V.chrome&&V.chrome_version<126)&&(this.editContext=new $f(e),e.state.facet(bi)&&(e.contentDOM.editContext=this.editContext.editContext)),af&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(bi)?i.root.activeElement!=this.dom:!rl(i.dom,n))return;let s=n.anchorNode&&i.docView.nearest(n.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(V.ie&&V.ie_version<=11||V.android&&V.chrome)&&!i.state.selection.main.empty&&n.focusNode&&Tn(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Yn(e.root);if(!t)return!1;let i=V.safari&&e.root.nodeType==11&&rU(this.dom.ownerDocument)==this.dom&&dL(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let n=rl(this.dom,i);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&aU(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let i=this.dom;i;)if(i.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=t)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,uL),af&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),af&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var i;if(!this.delayedAndroidKey){let n=h(()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&qr(this.dom,s.key,s.keyCode))},"flush");this.flushingAndroidKey=this.view.win.requestAnimationFrame(n)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,n=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(n=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:n}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),n=this.selectionChanged&&rl(this.dom,this.selectionRange);if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Bf(this.view,e,t,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,n=S2(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),n}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=Cx(t,e.previousSibling||e.target.previousSibling,-1),n=Cx(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(bi)!=e.state.facet(bi)&&(e.view.contentDOM.editContext=e.state.facet(bi)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};h(Eu,"DOMObserver");var If=Eu;function Cx(r,e,t){for(;e;){let i=ye.get(e);if(i&&i.parent==r)return i;let n=e.parentNode;e=n!=r.dom?n:t>0?e.nextSibling:e.previousSibling}return null}h(Cx,"findChild");function Ux(r,e){let t=e.startContainer,i=e.startOffset,n=e.endContainer,s=e.endOffset,o=r.docView.domAtPos(r.state.selection.main.anchor);return Tn(o.node,o.offset,n,s)&&([t,i,n,s]=[n,s,t,i]),{anchorNode:t,anchorOffset:i,focusNode:n,focusOffset:s}}h(Ux,"buildSelectionRangeFromRange");function dL(r,e){if(e.getComposedRanges){let n=e.getComposedRanges(r.root)[0];if(n)return Ux(r,n)}let t=null;function i(n){n.preventDefault(),n.stopImmediatePropagation(),t=n.getTargetRanges()[0]}return h(i,"read"),r.contentDOM.addEventListener("beforeinput",i,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",i,!0),t?Ux(r,t):null}h(dL,"safariSelectionRangeHack");var Cu=class Cu{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let{anchor:n}=e.state.selection.main,s={from:this.toEditorPos(i.updateRangeStart),to:this.toEditorPos(i.updateRangeEnd),insert:de.of(i.text.split("\n"))};s.from==this.from&&n<this.from?s.from=n:s.to==this.to&&n>this.to&&(s.to=n),!(s.from==s.to&&!s.insert.length)&&(this.pendingContextChange=s,e.state.readOnly||tu(e,s,Z.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=i=>{let n=[],s=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o<l;o++){let a=e.coordsForChar(o);s=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||s||new DOMRect,n.push(s)}t.updateCharacterBounds(i.rangeStart,n)},this.handlers.textformatupdate=i=>{let n=[];for(let s of i.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(o!="None"&&l!="None"){let a="text-decoration: underline ".concat(o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":"").concat(l=="Thin"?1:2,"px");n.push(ce.mark({attributes:{style:a}}).range(this.toEditorPos(s.rangeStart),this.toEditorPos(s.rangeEnd)))}}e.dispatch({effects:p2.of(ce.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:h(i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let n=Yn(i.root);n&&n.rangeCount&&this.editContext.updateSelectionBounds(n.getRangeAt(0).getBoundingClientRect())},"read")}}applyEdits(e){let t=0,i=!1,n=this.pendingContextChange;return e.changes.iterChanges((s,o,l,a,c)=>{if(i)return;let f=c.length-(o-s);if(n&&o>=n.to)if(n.from==s&&n.to==o&&n.insert.eq(c)){n=this.pendingContextChange=null,t+=f,this.to+=f;return}else n=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=f,this.to+=f;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=f}t+=f}),n&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),n=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=n)&&this.editContext.updateSelection(i,n)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}};h(Cu,"EditContextManager");var $f=Cu,Hn=class Hn{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(n=>n.forEach(s=>i(s,this)))||(n=>this.update(n)),this.dispatch=this.dispatch.bind(this),this._root=e.root||lU(e.parent)||document,this.viewState=new bl(e.state||Be.create(e)),e.scrollTo&&e.scrollTo.is(Jo)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Cn).map(n=>new Rn(n));for(let n of this.plugins)n.update(this);this.observer=new If(this),this.inputState=new Ef(this),this.inputState.ensureHandlers(this.plugins),this.docView=new dl(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Te?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,n,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,a=null;e.some(d=>d.annotation(C2))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=U2(s,o),a||(l=1));let c=this.observer.delayedAndroidKey,f=null;if(c?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(f=null)):this.observer.clear(),s.facet(Be.phrases)!=this.state.facet(Be.phrases))return this.setState(s);n=ul.create(this,s,e),n.flags|=l;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(u&&(u=u.map(d.changes)),d.scrollIntoView){let{main:p}=d.state.selection;u=new Nn(p.empty?p:Z.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of d.effects)p.is(Jo)&&(u=p.value.clip(this.state))}this.viewState.update(n,u),this.bidiCache=yl.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),t=this.docView.update(n),this.state.facet(Un)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(n.startState.facet(el)!=n.state.facet(el)&&(this.viewState.mustMeasureContent=!0),(t||i||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!n.empty)for(let d of this.state.facet(Sf))try{d(n)}catch(p){tt(this.state,p,"update listener")}(a||f)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),f&&!S2(this,f)&&c.force&&qr(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new bl(e),this.plugins=e.facet(Cn).map(i=>new Rn(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new dl(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Cn),i=e.state.facet(Cn);if(t!=i){let n=[];for(let s of i){let o=t.indexOf(s);if(o<0)n.push(new Rn(s));else{let l=this.plugins[o];l.mustUpdate=e,n.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let n of this.plugins)n.mustUpdate=e;for(let n=0;n<this.plugins.length;n++)this.plugins[n].update(this);t!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(i){tt(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,n=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(Vx(i))s=-1,o=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(n);s=p.from,o=p.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];a&4||([this.measureRequests,c]=[c,this.measureRequests]);let f=c.map(p=>{try{return p.read(this)}catch(m){return tt(this.state,m),Lx}}),u=ul.create(this,this.state,[]),d=!1;u.flags|=a,t?t.flags|=a:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u),d&&this.docViewUpdate());for(let p=0;p<c.length;p++)if(f[p]!=Lx)try{let m=c[p];m.write&&m.write(f[p],this)}catch(m){tt(this.state,m)}if(d&&this.docView.updateSelection(!0),!u.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let m=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(m>1||m<-1){n=n+m,i.scrollTop=n/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(Sf))l(t)}get themeClasses(){return Mf+" "+(this.state.facet(Af)?_2:O2)+" "+this.state.facet(el)}updateAttrs(){let e=Ox(this,m2,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(bi)?"true":"false",class:"cm-content",style:"".concat(V.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Ox(this,Zf,t);let i=this.observer.ignore(()=>{let n=bf(this.contentDOM,this.contentAttrs,t),s=bf(this.dom,this.editorAttrs,e);return n||s});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let n of i.effects)if(n.is(Hn.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=n.value}}mountStyles(){this.styleModules=this.state.facet(Un);let e=this.state.facet(Hn.cspNonce);bt.mount(this.root,this.styleModules.concat(fL).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(i=>i.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return lf(this,e,px(this,e,t,i))}moveByGroup(e,t){return lf(this,e,px(this,e,t,i=>AU(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),n=this.textDirectionAt(e.from),s=i[t?i.length-1:0];return Z.cursor(s.side(t,n)+e.from,s.forward(!t,n)?1:-1)}moveToLineBoundary(e,t,i=!0){return RU(this,e,t,i)}moveVertically(e,t,i){return lf(this,e,MU(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),k2(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let n=this.state.doc.lineAt(e),s=this.bidiSpans(n),o=s[qt.find(s,e-n.from,-1,t)];return Rl(i,o.dir==we.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(f2)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>pL)return r2(e.length);let t=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||i2(s.isolates,i=hx(this,e))))return s.order;i||(i=hx(this,e));let n=vU(e.text,t,i);return this.bidiCache.push(new yl(e.from,e.to,t,i,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||V.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{$x(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Jo.of(new Nn(typeof e=="number"?Z.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Jo.of(new Nn(Z.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ye.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ye.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=bt.newName(),n=[el.of(i),Un.of(Pf(".".concat(i),e))];return t&&t.dark&&n.push(Af.of(!0)),n}static baseTheme(e){return Tr.lowest(Un.of(Pf("."+Mf,e,T2)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),n=i&&ye.get(i)||ye.get(e);return((t=n==null?void 0:n.rootView)===null||t===void 0?void 0:t.view)||null}};h(Hn,"EditorView");var ie=Hn;ie.styleModule=Un;ie.inputHandler=h2;ie.clipboardInputFilter=Xf;ie.clipboardOutputFilter=Kf;ie.scrollHandler=d2;ie.focusChangeEffect=c2;ie.perLineTextDirection=f2;ie.exceptionSink=a2;ie.updateListener=Sf;ie.editable=bi;ie.mouseSelectionStyle=l2;ie.dragMovesSelection=o2;ie.clickAddsSelectionRange=s2;ie.decorations=ts;ie.outerDecorations=g2;ie.atomicRanges=eu;ie.bidiIsolatedRanges=b2;ie.scrollMargins=y2;ie.darkTheme=Af;ie.cspNonce=W.define({combine:h(r=>r.length?r[0]:"","combine")});ie.contentAttributes=Zf;ie.editorAttributes=m2;ie.lineWrapping=ie.contentAttributes.of({class:"cm-lineWrapping"});ie.announce=pe.define();var pL=4096,Lx={},Tl=class Tl{constructor(e,t,i,n,s,o){this.from=e,this.to=t,this.dir=i,this.isolates=n,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let i=[],n=e.length?e[e.length-1].dir:we.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==n&&!t.touchesRange(o.from,o.to)&&i.push(new Tl(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return i}};h(Tl,"CachedOrder");var yl=Tl;function Ox(r,e,t){for(let i=r.state.facet(e),n=i.length-1;n>=0;n--){let s=i[n],o=typeof s=="function"?s(r):s;o&&gf(o,t)}return t}h(Ox,"attrsFromFacet");var mL=V.mac?"mac":V.windows?"win":V.linux?"linux":"key";function gL(r,e){let t=r.split(/-(?!$)/),i=t[t.length-1];i=="Space"&&(i=" ");let n,s,o,l;for(let a=0;a<t.length-1;++a){let c=t[a];if(/^(cmd|meta|m)$/i.test(c))l=!0;else if(/^a(lt)?$/i.test(c))n=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return n&&(i="Alt-"+i),s&&(i="Ctrl-"+i),l&&(i="Meta-"+i),o&&(i="Shift-"+i),i}h(gL,"normalizeKeyName");function tl(r,e,t){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t!==!1&&e.shiftKey&&(r="Shift-"+r),r}h(tl,"modifiers");var bL=Tr.default(ie.domEventHandlers({keydown(r,e){return kL(yL(e.state),r,e,"editor")}})),iu=W.define({enables:bL}),_x=new WeakMap;function yL(r){let e=r.facet(iu),t=_x.get(e);return t||_x.set(e,t=vL(e.reduce((i,n)=>i.concat(n),[]))),t}h(yL,"getKeymap");var yi=null,xL=4e3;function vL(r,e=mL){let t=Object.create(null),i=Object.create(null),n=h((o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},"checkPrefix"),s=h((o,l,a,c,f)=>{var u,d;let p=t[o]||(t[o]=Object.create(null)),m=l.split(/ (?!$)/).map(b=>gL(b,e));for(let b=1;b<m.length;b++){let x=m.slice(0,b).join(" ");n(x,!0),p[x]||(p[x]={preventDefault:!0,stopPropagation:!1,run:[w=>{let E=yi={view:w,prefix:x,scope:o};return setTimeout(()=>{yi==E&&(yi=null)},xL),!0}]})}let y=m.join(" ");n(y,!1);let g=p[y]||(p[y]={preventDefault:!1,stopPropagation:!1,run:((d=(u=p._any)===null||u===void 0?void 0:u.run)===null||d===void 0?void 0:d.slice())||[]});a&&g.run.push(a),c&&(g.preventDefault=!0),f&&(g.stopPropagation=!0)},"add");for(let o of r){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of l){let f=t[c]||(t[c]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:u}=o;for(let d in f)f[d].run.push(p=>u(p,qf))}let a=o[e]||o.key;if(a)for(let c of l)s(c,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return t}h(vL,"buildKeymap");var qf=null;function kL(r,e,t,i){qf=e;let n=tx(e),s=kn(n,0),o=Oo(s)==n.length&&n!=" ",l="",a=!1,c=!1,f=!1;yi&&yi.view==t&&yi.scope==i&&(l=yi.prefix+" ",F2.indexOf(e.keyCode)<0&&(c=!0,yi=null));let u=new Set,d=h(g=>{if(g){for(let b of g.run)if(!u.has(b)&&(u.add(b),b(t)))return g.stopPropagation&&(f=!0),!0;g.preventDefault&&(g.stopPropagation&&(f=!0),c=!0)}return!1},"runFor"),p=r[i],m,y;return p&&(d(p[l+tl(n,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(V.windows&&e.ctrlKey&&e.altKey)&&(m=oi[e.keyCode])&&m!=n?(d(p[l+tl(m,e,!0)])||e.shiftKey&&(y=Dr[e.keyCode])!=n&&y!=m&&d(p[l+tl(y,e,!1)]))&&(a=!0):o&&e.shiftKey&&d(p[l+tl(n,e,!0)])&&(a=!0),!a&&d(p._any)&&(a=!0)),c&&(a=!0),a&&f&&e.stopPropagation(),qf=null,a}h(kL,"runHandlers");var Dl=class Dl{constructor(e,t,i,n,s){this.className=e,this.left=t,this.top=i,this.width=n,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let n=e.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let s=D2(e);return[new Dl(t,n.left-s.left,n.top-s.top,null,n.bottom-n.top)]}else return SL(e,t,i)}};h(Dl,"RectangleMarker");var is=Dl;function D2(r){let e=r.scrollDOM.getBoundingClientRect();return{left:(r.textDirection==we.LTR?e.left:e.right-r.scrollDOM.clientWidth*r.scaleX)-r.scrollDOM.scrollLeft*r.scaleX,top:e.top-r.scrollDOM.scrollTop*r.scaleY}}h(D2,"getBase");function Tx(r,e,t,i){let n=r.coordsAtPos(e,t*2);if(!n)return i;let s=r.dom.getBoundingClientRect(),o=(n.top+n.bottom)/2,l=r.posAtCoords({x:s.left+1,y:o}),a=r.posAtCoords({x:s.right-1,y:o});return l==null||a==null?i:{from:Math.max(i.from,Math.min(l,a)),to:Math.min(i.to,Math.max(l,a))}}h(Tx,"wrappedLine");function SL(r,e,t){if(t.to<=r.viewport.from||t.from>=r.viewport.to)return[];let i=Math.max(t.from,r.viewport.from),n=Math.min(t.to,r.viewport.to),s=r.textDirection==we.LTR,o=r.contentDOM,l=o.getBoundingClientRect(),a=D2(r),c=o.querySelector(".cm-line"),f=c&&window.getComputedStyle(c),u=l.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),d=l.right-(f?parseInt(f.paddingRight):0),p=Ff(r,i),m=Ff(r,n),y=p.type==He.Text?p:null,g=m.type==He.Text?m:null;if(y&&(r.lineWrapping||p.widgetLineBreaks)&&(y=Tx(r,i,1,y)),g&&(r.lineWrapping||m.widgetLineBreaks)&&(g=Tx(r,n,-1,g)),y&&g&&y.from==g.from&&y.to==g.to)return x(w(t.from,t.to,y));{let S=y?w(t.from,null,y):E(p,!1),T=g?w(null,t.to,g):E(m,!0),L=[];return(y||p).to<(g||m).from-(y&&g?1:0)||p.widgetLineBreaks>1&&S.bottom+r.defaultLineHeight/2<T.top?L.push(b(u,S.bottom,d,T.top)):S.bottom<T.top&&r.elementAtHeight((S.bottom+T.top)/2).type==He.Text&&(S.bottom=T.top=(S.bottom+T.top)/2),x(S).concat(L).concat(x(T))}function b(S,T,L,z){return new is(e,S-a.left,T-a.top-.01,L-S,z-T+.01)}h(b,"piece");function x({top:S,bottom:T,horizontal:L}){let z=[];for(let j=0;j<L.length;j+=2)z.push(b(L[j],S,L[j+1],T));return z}h(x,"pieces");function w(S,T,L){let z=1e9,j=-1e9,G=[];function N(P,O,ee,fe,Fe){let Qe=r.coordsAtPos(P,P==L.to?-2:2),he=r.coordsAtPos(ee,ee==L.from?2:-2);!Qe||!he||(z=Math.min(Qe.top,he.top,z),j=Math.max(Qe.bottom,he.bottom,j),Fe==we.LTR?G.push(s&&O?u:Qe.left,s&&fe?d:he.right):G.push(!s&&fe?u:he.left,!s&&O?d:Qe.right))}h(N,"addSpan");let H=S!=null?S:L.from,te=T!=null?T:L.to;for(let P of r.visibleRanges)if(P.to>H&&P.from<te)for(let O=Math.max(P.from,H),ee=Math.min(P.to,te);;){let fe=r.state.doc.lineAt(O);for(let Fe of r.bidiSpans(fe)){let Qe=Fe.from+fe.from,he=Fe.to+fe.from;if(Qe>=ee)break;he>O&&N(Math.max(Qe,O),S==null&&Qe<=H,Math.min(he,ee),T==null&&he>=te,Fe.dir)}if(O=fe.to+1,O>=ee)break}return G.length==0&&N(H,S==null,te,T==null,r.textDirection),{top:z,bottom:j,horizontal:G}}h(w,"drawForLine");function E(S,T){let L=l.top+(T?S.top:S.bottom);return{top:L,bottom:L,horizontal:[]}}h(E,"drawForWidget")}h(SL,"rectanglesForRange");function wL(r,e){return r.constructor==e.constructor&&r.eq(e)}h(wL,"sameMarker");var Uu=class Uu{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(ol)!=e.state.facet(ol)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(ol);for(;t<i.length&&i[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform="scale(".concat(1/e,", ").concat(1/t,")"))}draw(e){if(e.length!=this.drawn.length||e.some((t,i)=>!wL(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let n of e)n.update&&t&&n.constructor&&this.drawn[i].constructor&&n.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(n.draw(),t);for(;t;){let n=t.nextSibling;t.remove(),t=n}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}};h(Uu,"LayerView");var Vf=Uu,ol=W.define();function N2(r){return[Ye.define(e=>new Vf(e,r)),ol.of(r)]}h(N2,"layer");var R2=!V.ios,rs=W.define({combine(r){return si(r,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:h((e,t)=>Math.min(e,t),"cursorBlinkRate"),drawRangeCursor:h((e,t)=>e||t,"drawRangeCursor")})}});function A2(r={}){return[rs.of(r),FL,QL,BL,u2.of(!0)]}h(A2,"drawSelection");function M2(r){return r.startState.facet(rs)!=r.state.facet(rs)}h(M2,"configChanged");var FL=N2({above:!0,markers(r){let{state:e}=r,t=e.facet(rs),i=[];for(let n of e.selection.ranges){let s=n==e.selection.main;if(n.empty?!s||R2:t.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=n.empty?n:Z.cursor(n.head,n.head>n.anchor?-1:1);for(let a of is.forRange(r,o,l))i.push(a)}}return i},update(r,e){r.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=M2(r);return t&&Dx(r.state,e),r.docChanged||r.selectionSet||t},mount(r,e){Dx(e.state,r)},class:"cm-cursorLayer"});function Dx(r,e){e.style.animationDuration=r.facet(rs).cursorBlinkRate+"ms"}h(Dx,"setBlinkRate");var QL=N2({above:!1,markers(r){return r.state.selection.ranges.map(e=>e.empty?[]:is.forRange(r,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(r,e){return r.docChanged||r.selectionSet||r.viewportChanged||M2(r)},class:"cm-selectionLayer"}),zf={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};R2&&(zf[".cm-line"].caretColor=zf[".cm-content"].caretColor="transparent !important");var BL=Tr.highest(ie.theme(zf)),P2=pe.define({map(r,e){return r==null?null:e.mapPos(r)}}),_n=Pe.define({create(){return null},update(r,e){return r!=null&&(r=e.changes.mapPos(r)),e.effects.reduce((t,i)=>i.is(P2)?i.value:t,r)}}),EL=Ye.fromClass(class{constructor(r){this.view=r,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(r){var e;let t=r.state.field(_n);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(r.startState.field(_n)!=t||r.docChanged||r.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:r}=this,e=r.state.field(_n),t=e!=null&&r.coordsAtPos(e);if(!t)return null;let i=r.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+r.scrollDOM.scrollLeft*r.scaleX,top:t.top-i.top+r.scrollDOM.scrollTop*r.scaleY,height:t.bottom-t.top}}drawCursor(r){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;r?(this.cursor.style.left=r.left/e+"px",this.cursor.style.top=r.top/t+"px",this.cursor.style.height=r.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(r){this.view.state.field(_n)!=r&&this.view.dispatch({effects:P2.of(r)})}},{eventObservers:{dragover(r){this.setDropPos(this.view.posAtCoords({x:r.clientX,y:r.clientY}))},dragleave(r){(r.target==this.view.contentDOM||!this.view.contentDOM.contains(r.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function I2(){return[_n,EL]}h(I2,"dropCursor");var UR=/x/.unicode!=null?"gu":"g";var En="-10000px",Lu=class Lu{constructor(e,t,i,n){this.facet=t,this.createTooltipView=i,this.removeTooltipView=n,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=i(o,s))}update(e,t){var i;let n=e.state.facet(this.facet),s=n.filter(a=>a);if(n===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=t?[]:null;for(let a=0;a<s.length;a++){let c=s[a],f=-1;if(c){for(let u=0;u<this.tooltips.length;u++){let d=this.tooltips[u];d&&d.create==c.create&&(f=u)}if(f<0)o[a]=this.createTooltipView(c,a?o[a-1]:null),l&&(l[a]=!!c.above);else{let u=o[a]=this.tooltipViews[f];l&&(l[a]=t[f]),u.update&&u.update(e)}}}for(let a of this.tooltipViews)o.indexOf(a)<0&&(this.removeTooltipView(a),(i=a.destroy)===null||i===void 0||i.call(a));return t&&(l.forEach((a,c)=>t[c]=a),t.length=l.length),this.input=n,this.tooltips=s,this.tooltipViews=o,!0}};h(Lu,"TooltipViewManager");var xl=Lu;function CL(r){let{win:e}=r;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}h(CL,"windowSpace");var hf=W.define({combine:h(r=>{var e,t,i;return{position:V.ios?"absolute":((e=r.find(n=>n.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=r.find(n=>n.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=r.find(n=>n.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||CL}},"combine")}),Nx=new WeakMap,$2=Ye.fromClass(class{constructor(r){this.view=r,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=r.state.facet(hf);this.position=e.position,this.parent=e.parent,this.classes=r.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new xl(r,ru,(t,i)=>this.createTooltip(t,i),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),r.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let r of this.manager.tooltipViews)this.intersectionObserver.observe(r.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(r){r.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(r,this.above);e&&this.observeIntersection();let t=e||r.geometryChanged,i=r.state.facet(hf);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let n of this.manager.tooltipViews)n.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let n of this.manager.tooltipViews)this.container.appendChild(n.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(r,e){let t=r.create(this.view),i=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),r.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",t.dom.appendChild(n)}return t.dom.style.position=this.position,t.dom.style.top=En,t.dom.style.left="0px",this.container.insertBefore(t.dom,i),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var r,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(r=i.destroy)===null||r===void 0||r.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let r=this.view.dom.getBoundingClientRect(),e=1,t=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:n}=this.manager.tooltipViews[0];if(V.gecko)i=n.offsetParent!=this.container.ownerDocument.body;else if(n.style.top==En&&n.style.left=="0px"){let s=n.getBoundingClientRect();i=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(i||this.position=="absolute")if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:r,parent:this.parent?this.container.getBoundingClientRect():r,pos:this.manager.tooltips.map((n,s)=>{let o=this.manager.tooltipViews[s];return o.getCoords?o.getCoords(n.pos):this.view.coordsAtPos(n.pos)}),size:this.manager.tooltipViews.map(({dom:n})=>n.getBoundingClientRect()),space:this.view.state.facet(hf).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(r){var e;if(r.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:i,scaleX:n,scaleY:s}=r,o=[];for(let l=0;l<this.manager.tooltips.length;l++){let a=this.manager.tooltips[l],c=this.manager.tooltipViews[l],{dom:f}=c,u=r.pos[l],d=r.size[l];if(!u||u.bottom<=Math.max(t.top,i.top)||u.top>=Math.min(t.bottom,i.bottom)||u.right<Math.max(t.left,i.left)-.1||u.left>Math.min(t.right,i.right)+.1){f.style.top=En;continue}let p=a.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,y=d.right-d.left,g=(e=Nx.get(c))!==null&&e!==void 0?e:d.bottom-d.top,b=c.offset||LL,x=this.view.textDirection==we.LTR,w=d.width>i.right-i.left?x?i.left:i.right-d.width:x?Math.max(i.left,Math.min(u.left-(p?14:0)+b.x,i.right-y)):Math.min(Math.max(i.left,u.left-y+(p?14:0)-b.x),i.right-y),E=this.above[l];!a.strictSide&&(E?u.top-(d.bottom-d.top)-b.y<i.top:u.bottom+(d.bottom-d.top)+b.y>i.bottom)&&E==i.bottom-u.bottom>u.top-i.top&&(E=this.above[l]=!E);let S=(E?u.top-i.top:i.bottom-u.bottom)-m;if(S<g&&c.resize!==!1){if(S<this.view.defaultLineHeight){f.style.top=En;continue}Nx.set(c,g),f.style.height=(g=S)/s+"px"}else f.style.height&&(f.style.height="");let T=E?u.top-g-m-b.y:u.bottom+m+b.y,L=w+y;if(c.overlap!==!0)for(let z of o)z.left<L&&z.right>w&&z.top<T+g&&z.bottom>T&&(T=E?z.top-g-2-m:z.bottom+m+2);if(this.position=="absolute"?(f.style.top=(T-r.parent.top)/s+"px",f.style.left=(w-r.parent.left)/n+"px"):(f.style.top=T/s+"px",f.style.left=w/n+"px"),p){let z=u.left+(x?b.x:-b.x)-(w+14-7);p.style.left=z/n+"px"}c.overlap!==!0&&o.push({left:w,top:T,right:L,bottom:T+g}),f.classList.toggle("cm-tooltip-above",E),f.classList.toggle("cm-tooltip-below",!E),c.positioned&&c.positioned(r.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let r of this.manager.tooltipViews)r.dom.style.top=En}},{eventObservers:{scroll(){this.maybeMeasure()}}}),UL=ie.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"".concat(7*2,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),LL={x:0,y:0},ru=W.define({enables:[$2,UL]}),vl=W.define({combine:h(r=>r.reduce((e,t)=>e.concat(t),[]),"combine")}),Nl=class Nl{static create(e){return new Nl(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new xl(e,vl,(t,i)=>this.createHostedView(t,i),t=>t.dom.remove())}createHostedView(e,t){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let n=i[e];if(n!==void 0){if(t===void 0)t=n;else if(t!==n)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}};h(Nl,"HoverTooltipHost");var kl=Nl,OL=ru.compute([vl],r=>{let e=r.facet(vl);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var i;return(i=t.end)!==null&&i!==void 0?i:t.pos})),create:kl.create,above:e[0].above,arrow:e.some(t=>t.arrow)}}),Ou=class Ou{constructor(e,t,i,n,s){this.view=e,this.source=t,this.field=i,this.setHover=n,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,i=e.docView.nearest(t.target);if(!i)return;let n,s=1;if(i instanceof Gn)n=i.posAtStart;else{if(n=e.posAtCoords(t),n==null)return;let l=e.coordsAtPos(n);if(!l||t.y<l.top||t.y>l.bottom||t.x<l.left-e.defaultCharacterWidth||t.x>l.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(n)).find(f=>f.from<=n&&f.to>=n),c=a&&a.dir==we.RTL?-1:1;s=t.x<l.left?-c:c}let o=this.source(e,n,s);if(o!=null&&o.then){let l=this.pending={pos:n};o.then(a=>{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>tt(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin($2),t=e?e.manager.tooltips.findIndex(i=>i.create==kl.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:n,tooltip:s}=this;if(n.length&&s&&!_L(s.dom,e)||this.pending){let{pos:o}=n[0]||this.pending,l=(i=(t=n[0])===null||t===void 0?void 0:t.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!TL(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=h(i=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})},"watch");e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}};h(Ou,"HoverPlugin");var Wf=Ou,il=4;function _L(r,e){let{left:t,right:i,top:n,bottom:s}=r.getBoundingClientRect(),o;if(o=r.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();n=Math.min(l.top,n),s=Math.max(l.bottom,s)}return e.clientX>=t-il&&e.clientX<=i+il&&e.clientY>=n-il&&e.clientY<=s+il}h(_L,"isInTooltip");function TL(r,e,t,i,n,s){let o=r.scrollDOM.getBoundingClientRect(),l=r.documentTop+r.documentPadding.top+r.contentHeight;if(o.left>i||o.right<i||o.top>n||Math.min(o.bottom,l)<n)return!1;let a=r.posAtCoords({x:i,y:n},!1);return a>=e&&a<=t}h(TL,"isOverRange");function q2(r,e={}){let t=pe.define(),i=Pe.define({create(){return[]},update(n,s){if(n.length&&(e.hideOnChange&&(s.docChanged||s.selection)?n=[]:e.hideOn&&(n=n.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let l of n){let a=s.changes.mapPos(l.pos,-1,ze.TrackDel);if(a!=null){let c=Object.assign(Object.create(null),l);c.pos=a,c.end!=null&&(c.end=s.changes.mapPos(c.end)),o.push(c)}}n=o}for(let o of s.effects)o.is(t)&&(n=o.value),o.is(DL)&&(n=[]);return n},provide:h(n=>vl.from(n),"provide")});return{active:i,extension:[i,Ye.define(n=>new Wf(n,r,i,t,e.hoverTime||300)),OL]}}h(q2,"hoverTooltip");var DL=pe.define();var Rx=W.define({combine(r){let e,t;for(let i of r)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});var NL=Ye.fromClass(class{constructor(r){this.input=r.state.facet(Sl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(r));let e=r.state.facet(Rx);this.top=new Ar(r,!0,e.topContainer),this.bottom=new Ar(r,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(r){let e=r.state.facet(Rx);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ar(r.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ar(r.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=r.state.facet(Sl);if(t!=this.input){let i=t.filter(a=>a),n=[],s=[],o=[],l=[];for(let a of i){let c=this.specs.indexOf(a),f;c<0?(f=a(r.view),l.push(f)):(f=this.panels[c],f.update&&f.update(r)),n.push(f),(f.top?s:o).push(f)}this.specs=i,this.panels=n,this.top.sync(s),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(r)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:h(r=>ie.scrollMargins.of(e=>{let t=e.plugin(r);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}}),"provide")}),_u=class _u{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Ax(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Ax(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}};h(_u,"PanelGroup");var Ar=_u;function Ax(r){let e=r.nextSibling;return r.remove(),e}h(Ax,"rm");var Sl=W.define({enables:NL}),Tu=class Tu extends ni{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};h(Tu,"GutterMarker");var vt=Tu;vt.prototype.elementClass="";vt.prototype.toDOM=void 0;vt.prototype.mapMode=ze.TrackBefore;vt.prototype.startSide=vt.prototype.endSide=-1;vt.prototype.point=!0;var ll=W.define(),RL=W.define();var al=W.define();var jf=W.define({combine:h(r=>r.some(e=>e),"combine")});function AL(r){let e=[ML];return r&&r.fixed===!1&&e.push(jf.of(!0)),e}h(AL,"gutters");var ML=Ye.fromClass(class{constructor(r){this.view=r,this.prevViewport=r.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=r.state.facet(al).map(e=>new wl(r,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!r.state.facet(jf),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),r.scrollDOM.insertBefore(this.dom,r.contentDOM)}update(r){if(this.updateGutters(r)){let e=this.prevViewport,t=r.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}r.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(jf)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=r.view.viewport}syncGutters(r){let e=this.dom.nextSibling;r&&this.dom.remove();let t=be.iter(this.view.state.facet(ll),this.view.viewport.from),i=[],n=this.gutters.map(s=>new Yf(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let o=!0;for(let l of s.type)if(l.type==He.Text&&o){Hf(t,i,l.from);for(let a of n)a.line(this.view,l,i);o=!1}else if(l.widget)for(let a of n)a.widget(this.view,l)}else if(s.type==He.Text){Hf(t,i,s.from);for(let o of n)o.line(this.view,s,i)}else if(s.widget)for(let o of n)o.widget(this.view,s);for(let s of n)s.finish();r&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(r){let e=r.startState.facet(al),t=r.state.facet(al),i=r.docChanged||r.heightChanged||r.viewportChanged||!be.eq(r.startState.facet(ll),r.state.facet(ll),r.view.viewport.from,r.view.viewport.to);if(e==t)for(let n of this.gutters)n.update(r)&&(i=!0);else{i=!0;let n=[];for(let s of t){let o=e.indexOf(s);o<0?n.push(new wl(this.view,s)):(this.gutters[o].update(r),n.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),n.indexOf(s)<0&&s.destroy();for(let s of n)this.dom.appendChild(s.dom);this.gutters=n}return i}destroy(){for(let r of this.gutters)r.destroy();this.dom.remove()}},{provide:h(r=>ie.scrollMargins.of(e=>{let t=e.plugin(r);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==we.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}}),"provide")});function Mx(r){return Array.isArray(r)?r:[r]}h(Mx,"asArray");function Hf(r,e,t){for(;r.value&&r.from<=t;)r.from==t&&e.push(r.value),r.next()}h(Hf,"advanceCursor");var Du=class Du{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=be.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:n}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==n.elements.length){let l=new Fl(e,o,s,i);n.elements.push(l),n.dom.appendChild(l.dom)}else n.elements[this.i].update(e,o,s,i);this.height=t.bottom,this.i++}line(e,t,i){let n=[];Hf(this.cursor,n,t.from),i.length&&(n=n.concat(i));let s=this.gutter.config.lineMarker(e,t,n);s&&n.unshift(s);let o=this.gutter;n.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,n)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t),n=i?[i]:null;for(let s of e.state.facet(RL)){let o=s(e,t.widget,t);o&&(n||(n=[])).push(o)}n&&this.addElement(e,t,n)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}};h(Du,"UpdateContext");var Yf=Du,Nu=class Nu{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,n=>{let s=n.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let a=s.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=n.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[i](e,l,n)&&n.preventDefault()});this.markers=Mx(t.markers(e)),t.initialSpacer&&(this.spacer=new Fl(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Mx(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let n=this.config.updateSpacer(this.spacer.markers[0],e);n!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[n])}let i=e.view.viewport;return!be.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}};h(Nu,"SingleGutterView");var wl=Nu,Ru=class Ru{constructor(e,t,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,n)}update(e,t,i,n){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),PL(this.markers,n)||this.setMarkers(e,n)}setMarkers(e,t){let i="cm-gutterElement",n=this.dom.firstChild;for(let s=0,o=0;;){let l=o,a=s<t.length?t[s++]:null,c=!1;if(a){let f=a.elementClass;f&&(i+=" "+f);for(let u=o;u<this.markers.length;u++)if(this.markers[u].compare(a)){l=u,c=!0;break}}else l=this.markers.length;for(;o<l;){let f=this.markers[o++];if(f.toDOM){f.destroy(n);let u=n.nextSibling;n.remove(),n=u}}if(!a)break;a.toDOM&&(c?n=n.nextSibling:this.dom.insertBefore(a.toDOM(e),n)),c&&o++}this.dom.className=i,this.markers=t}destroy(){this.setMarkers(null,[])}};h(Ru,"GutterElement");var Fl=Ru;function PL(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].compare(e[t]))return!1;return!0}h(PL,"sameMarkers");var IL=W.define(),$L=W.define(),Mr=W.define({combine(r){return si(r,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let i=Object.assign({},e);for(let n in t){let s=i[n],o=t[n];i[n]=s?(l,a,c)=>s(l,a,c)||o(l,a,c):o}return i}})}}),Au=class Au extends vt{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};h(Au,"NumberMarker");var Mn=Au;function cf(r,e){return r.state.facet(Mr).formatNumber(e,r.state)}h(cf,"formatNumber");var qL=al.compute([Mr],r=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(IL)},lineMarker(e,t,i){return i.some(n=>n.toDOM)?null:new Mn(cf(e,e.state.doc.lineAt(t.from).number))},widgetMarker:h((e,t,i)=>{for(let n of e.state.facet($L)){let s=n(e,t,i);if(s)return s}return null},"widgetMarker"),lineMarkerChange:h(e=>e.startState.facet(Mr)!=e.state.facet(Mr),"lineMarkerChange"),initialSpacer(e){return new Mn(cf(e,Px(e.state.doc.lines)))},updateSpacer(e,t){let i=cf(t.view,Px(t.view.state.doc.lines));return i==e.number?e:new Mn(i)},domEventHandlers:r.facet(Mr).domEventHandlers}));function V2(r={}){return[Mr.of(r),AL(),qL]}h(V2,"lineNumbers");function Px(r){let e=9;for(;e<r;)e=e*10+9;return e}h(Px,"maxLineNumber");var VL=new class extends vt{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},zL=ll.compute(["selection"],r=>{let e=[],t=-1;for(let i of r.selection.ranges){let n=r.doc.lineAt(i.head).from;n>t&&(t=n,e.push(VL.range(n)))}return be.of(e)});function z2(){return zL}h(z2,"highlightActiveLineGutter");var WL=0,Wu=class Wu{constructor(e,t){this.from=e,this.to=t}};h(Wu,"Range");var ns=Wu,ju=class ju{constructor(e={}){this.id=WL++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ie.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}};h(ju,"NodeProp");var ae=ju;ae.closedBy=new ae({deserialize:h(r=>r.split(" "),"deserialize")});ae.openedBy=new ae({deserialize:h(r=>r.split(" "),"deserialize")});ae.group=new ae({deserialize:h(r=>r.split(" "),"deserialize")});ae.isolate=new ae({deserialize:h(r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"},"deserialize")});ae.contextHash=new ae({perNode:!0});ae.lookAhead=new ae({perNode:!0});ae.mounted=new ae({perNode:!0});var Hu=class Hu{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[ae.mounted.id]}};h(Hu,"MountedTree");var jr=Hu,jL=Object.create(null),ql=class ql{constructor(e,t,i,n=0){this.name=e,this.props=t,this.id=i,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):jL,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),n=new ql(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(n)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return n}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(ae.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let n of i.split(" "))t[n]=e[i];return i=>{for(let n=i.prop(ae.group),s=-1;s<(n?n.length:0);s++){let o=t[s<0?i.name:n[s]];if(o)return o}}}};h(ql,"NodeType");var Ie=ql;Ie.none=new Ie("",Object.create(null),0,8);var Vl=class Vl{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let n=null;for(let s of e){let o=s(i);o&&(n||(n=Object.assign({},i.props)),n[o[0].id]=o[1])}t.push(n?new Ie(i.name,n,i.id,i.flags):i)}return new Vl(t)}};h(Vl,"NodeSet");var ls=Vl,Pl=new WeakMap,W2=new WeakMap,_e;(function(r){r[r.ExcludeBuffers=1]="ExcludeBuffers",r[r.IncludeAnonymous=2]="IncludeAnonymous",r[r.IgnoreMounts=4]="IgnoreMounts",r[r.IgnoreOverlays=8]="IgnoreOverlays"})(_e||(_e={}));var ss=class ss{constructor(e,t,i,n,s){if(this.type=e,this.children=t,this.positions=i,this.length=n,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=jr.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let n=i.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new cs(this.topNode,e)}cursorAt(e,t=0,i=0){let n=Pl.get(this)||this.topNode,s=new cs(n);return s.moveTo(e,t),Pl.set(this,s._tree),s}get topNode(){return new Wt(this,0,0,null)}resolve(e,t=0){let i=as(Pl.get(this)||this.topNode,e,t,!1);return Pl.set(this,i),i}resolveInner(e,t=0){let i=as(W2.get(this)||this.topNode,e,t,!0);return W2.set(this,i),i}resolveStack(e,t=0){return HL(this,e,t)}iterate(e){let{enter:t,leave:i,from:n=0,to:s=this.length}=e,o=e.mode||0,l=(o&_e.IncludeAnonymous)>0;for(let a=this.cursor(o|_e.IncludeAnonymous);;){let c=!1;if(a.from<=s&&a.to>=n&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;c=!0}for(;c&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:zu(Ie.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,n)=>new ss(this.type,t,i,n,this.propValues),e.makeTree||((t,i,n)=>new ss(Ie.none,t,i,n)))}static build(e){return YL(e)}};h(ss,"Tree");var Le=ss;Le.empty=new Le(Ie.none,[],[],0);var zl=class zl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new zl(this.buffer,this.index)}};h(zl,"FlatBufferCursor");var Mu=zl,Wl=class Wl{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Ie.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],n=this.set.types[t],s=n.name;if(/\W/.test(s)&&!n.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,n,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(Y2(s,n,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let n=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=n[l++],s[a++]=n[l++]-i;let c=s[a++]=n[l++]-i;s[a++]=n[l++]-e,o=Math.max(o,c)}return new Wl(s,o,this.set)}};h(Wl,"TreeBuffer");var Fi=Wl;function Y2(r,e,t,i){switch(r){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}h(Y2,"checkSide");function as(r,e,t,i){for(var n;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to<e);){let o=!i&&r instanceof Wt&&r.index<0?null:r.parent;if(!o)return r;r=o}let s=i?0:_e.IgnoreOverlays;if(i)for(let o=r,l=o.parent;l;o=l,l=o.parent)o instanceof Wt&&o.index<0&&((n=l.enter(e,t,s))===null||n===void 0?void 0:n.from)!=o.from&&(r=l);for(;;){let o=r.enter(e,t,s);if(!o)return r;r=o}}h(as,"resolveNode");var Yu=class Yu{cursor(e=0){return new cs(this,e)}getChild(e,t=null,i=null){let n=j2(this,e,t,i);return n.length?n[0]:null}getChildren(e,t=null,i=null){return j2(this,e,t,i)}resolve(e,t=0){return as(this,e,t,!1)}resolveInner(e,t=0){return as(this,e,t,!0)}matchContext(e){return Pu(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let n=t.lastChild;if(!n||n.to!=t.to)break;n.type.isError&&n.from==n.to?(i=t,t=n.prevSibling):t=n}return i}get node(){return this}get next(){return this.parent}};h(Yu,"BaseNode");var $l=Yu,Wr=class Wr extends $l{constructor(e,t,i,n){super(),this._tree=e,this.from=t,this.index=i,this._parent=n}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,n,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,c=t>0?l.length:-1;e!=c;e+=t){let f=l[e],u=a[e]+o.from;if(Y2(n,i,u,u+f.length)){if(f instanceof Fi){if(s&_e.ExcludeBuffers)continue;let d=f.findChild(0,f.buffer.length,t,i-u,n);if(d>-1)return new hs(new Iu(o,f,e,u),null,d)}else if(s&_e.IncludeAnonymous||!f.type.isAnonymous||Vu(f)){let d;if(!(s&_e.IgnoreMounts)&&(d=jr.get(f))&&!d.overlay)return new Wr(d.tree,u,e,o);let p=new Wr(f,u,e,o);return s&_e.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?f.children.length-1:0,t,i,n)}}}if(s&_e.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let n;if(!(i&_e.IgnoreOverlays)&&(n=jr.get(this._tree))&&n.overlay){let s=e-this.from;for(let{from:o,to:l}of n.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new Wr(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};h(Wr,"TreeNode");var Wt=Wr;function j2(r,e,t,i){let n=r.cursor(),s=[];if(!n.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=n.type.is(t),!n.nextSibling())return s}for(;;){if(i!=null&&n.type.is(i))return s;if(n.type.is(e)&&s.push(n.node),!n.nextSibling())return i==null?s:[]}}h(j2,"getChildren");function Pu(r,e,t=e.length-1){for(let i=r.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}h(Pu,"matchNodeContext");var Ju=class Ju{constructor(e,t,i,n){this.parent=e,this.buffer=t,this.index=i,this.start=n}};h(Ju,"BufferContext");var Iu=Ju,Yi=class Yi extends $l{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new Yi(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&_e.ExcludeBuffers)return null;let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new Yi(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Yi(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Yi(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let o=i.buffer[this.index+1];e.push(i.slice(n,s,o)),t.push(0)}return new Le(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};h(Yi,"BufferNode");var hs=Yi;function J2(r){if(!r.length)return null;let e=0,t=r[0];for(let s=1;s<r.length;s++){let o=r[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof Wt&&t.index<0?null:t.parent,n=r.slice();return i?n[e]=i:n.splice(e,1),new $u(n,t)}h(J2,"iterStack");var Gu=class Gu{constructor(e,t){this.heads=e,this.node=t}get next(){return J2(this.heads)}};h(Gu,"StackIterator");var $u=Gu;function HL(r,e,t){let i=r.resolveInner(e,t),n=null;for(let s=i instanceof Wt?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(n||(n=[i])).push(o.resolve(e,t)),s=o}else{let o=jr.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new Wt(o.tree,o.overlay[0].from+s.from,-1,s);(n||(n=[i])).push(as(l,e,t,!1))}}return n?J2(n):i}h(HL,"stackIterator");var Xu=class Xu{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Wt)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=i+n.buffer[e+1],this.to=i+n.buffer[e+2],!0}yield(e){return e?e instanceof Wt?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&_e.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&_e.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&_e.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let n=i<0?0:this.stack[i]+4;if(this.index!=n)return this.yieldBuf(t.findChild(n,this.index,-1,0,4))}else{let n=t.buffer[this.index+3];if(n<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(n)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:n}=this;if(n){if(e>0){if(this.index<n.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(n.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=n)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&_e.IncludeAnonymous||l instanceof Fi||!l.type.isAnonymous||Vu(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let n=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==n){if(n==this.index)return o;t=o,i=s+1;break e}n=this.stack[--s]}for(let n=i;n<this.stack.length;n++)t=new hs(this.buffer,t,this.stack[n]);return this.bufferNode=new hs(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let n=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(n=!0)}for(;n&&t&&t(this),n=this.type.isAnonymous,!this.nextSibling();){if(!i)return;this.parent(),i--,n=!0}}}matchContext(e){if(!this.buffer)return Pu(this.node,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let n=e.length-1,s=this.stack.length-1;n>=0;s--){if(s<0)return Pu(this.node,e,n);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[n]&&e[n]!=o.name)return!1;n--}}return!0}};h(Xu,"TreeCursor");var cs=Xu;function Vu(r){return r.children.some(e=>e instanceof Fi||!e.type.isAnonymous||Vu(e))}h(Vu,"hasChild");function YL(r){var e;let{buffer:t,nodeSet:i,maxBufferLength:n=1024,reused:s=[],minRepeatType:o=i.types.length}=r,l=Array.isArray(t)?new Mu(t,t.length):t,a=i.types,c=0,f=0;function u(S,T,L,z,j,G){let{id:N,start:H,end:te,size:P}=l,O=f;for(;P<0;)if(l.next(),P==-1){let he=s[N];L.push(he),z.push(H-S);return}else if(P==-3){c=N;return}else if(P==-4){f=N;return}else throw new RangeError("Unrecognized record size: ".concat(P));let ee=a[N],fe,Fe,Qe=H-S;if(te-H<=n&&(Fe=g(l.pos-T,j))){let he=new Uint16Array(Fe.size-Fe.skip),xe=l.pos-Fe.size,Ue=he.length;for(;l.pos>xe;)Ue=b(Fe.start,he,Ue);fe=new Fi(he,te-Fe.start,i),Qe=Fe.start-S}else{let he=l.pos-P;l.next();let xe=[],Ue=[],Je=N>=o?N:-1,nt=0,wt=te;for(;l.pos>he;)Je>=0&&l.id==Je&&l.size>=0?(l.end<=wt-n&&(m(xe,Ue,H,nt,l.end,wt,Je,O),nt=xe.length,wt=l.end),l.next()):G>2500?d(H,he,xe,Ue):u(H,he,xe,Ue,Je,G+1);if(Je>=0&&nt>0&&nt<xe.length&&m(xe,Ue,H,nt,H,wt,Je,O),xe.reverse(),Ue.reverse(),Je>-1&&nt>0){let Gt=p(ee);fe=zu(ee,xe,Ue,0,xe.length,0,te-H,Gt,Gt)}else fe=y(ee,xe,Ue,te-H,O-te)}L.push(fe),z.push(Qe)}h(u,"takeNode");function d(S,T,L,z){let j=[],G=0,N=-1;for(;l.pos>T;){let{id:H,start:te,end:P,size:O}=l;if(O>4)l.next();else{if(N>-1&&te<N)break;N<0&&(N=P-n),j.push(H,te,P),G++,l.next()}}if(G){let H=new Uint16Array(G*4),te=j[j.length-2];for(let P=j.length-3,O=0;P>=0;P-=3)H[O++]=j[P],H[O++]=j[P+1]-te,H[O++]=j[P+2]-te,H[O++]=O;L.push(new Fi(H,j[2]-te,i)),z.push(te-S)}}h(d,"takeFlatNode");function p(S){return(T,L,z)=>{let j=0,G=T.length-1,N,H;if(G>=0&&(N=T[G])instanceof Le){if(!G&&N.type==S&&N.length==z)return N;(H=N.prop(ae.lookAhead))&&(j=L[G]+N.length+H)}return y(S,T,L,z,j)}}h(p,"makeBalanced");function m(S,T,L,z,j,G,N,H){let te=[],P=[];for(;S.length>z;)te.push(S.pop()),P.push(T.pop()+L-j);S.push(y(i.types[N],te,P,G-j,H-G)),T.push(j-L)}h(m,"makeRepeatLeaf");function y(S,T,L,z,j=0,G){if(c){let N=[ae.contextHash,c];G=G?[N].concat(G):[N]}if(j>25){let N=[ae.lookAhead,j];G=G?[N].concat(G):[N]}return new Le(S,T,L,z,G)}h(y,"makeTree");function g(S,T){let L=l.fork(),z=0,j=0,G=0,N=L.end-n,H={size:0,start:0,skip:0};e:for(let te=L.pos-S;L.pos>te;){let P=L.size;if(L.id==T&&P>=0){H.size=z,H.start=j,H.skip=G,G+=4,z+=4,L.next();continue}let O=L.pos-P;if(P<0||O<te||L.start<N)break;let ee=L.id>=o?4:0,fe=L.start;for(L.next();L.pos>O;){if(L.size<0)if(L.size==-3)ee+=4;else break e;else L.id>=o&&(ee+=4);L.next()}j=fe,z+=P,G+=ee}return(T<0||z==S)&&(H.size=z,H.start=j,H.skip=G),H.size>4?H:void 0}h(g,"findBufferSize");function b(S,T,L){let{id:z,start:j,end:G,size:N}=l;if(l.next(),N>=0&&z<o){let H=L;if(N>4){let te=l.pos-(N-4);for(;l.pos>te;)L=b(S,T,L)}T[--L]=H,T[--L]=G-S,T[--L]=j-S,T[--L]=z}else N==-3?c=z:N==-4&&(f=z);return L}h(b,"copyToBuffer");let x=[],w=[];for(;l.pos>0;)u(r.start||0,r.bufferStart||0,x,w,-1,0);let E=(e=r.length)!==null&&e!==void 0?e:x.length?w[0]+x[0].length:0;return new Le(a[r.topID],x.reverse(),w.reverse(),E)}h(YL,"buildTree");var H2=new WeakMap;function Il(r,e){if(!r.isAnonymous||e instanceof Fi||e.type!=r)return 1;let t=H2.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=r||!(i instanceof Le)){t=1;break}t+=Il(r,i)}H2.set(e,t)}return t}h(Il,"nodeSize");function zu(r,e,t,i,n,s,o,l,a){let c=0;for(let m=i;m<n;m++)c+=Il(r,e[m]);let f=Math.ceil(c*1.5/8),u=[],d=[];function p(m,y,g,b,x){for(let w=g;w<b;){let E=w,S=y[w],T=Il(r,m[w]);for(w++;w<b;w++){let L=Il(r,m[w]);if(T+L>=f)break;T+=L}if(w==E+1){if(T>f){let L=m[E];p(L.children,L.positions,0,L.children.length,y[E]+x);continue}u.push(m[E])}else{let L=y[w-1]+m[w-1].length-S;u.push(zu(r,m,y,E,w,S,L,null,a))}d.push(S+x-s)}}return h(p,"divide"),p(e,t,i,n,0),(l||a)(u,d,o)}h(zu,"balanceRange");var os=class os{constructor(e,t,i,n,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=n,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let n=[new os(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&n.push(s);return n}static applyChanges(e,t,i=128){if(!t.length)return e;let n=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,c=0;;l++){let f=l<t.length?t[l]:null,u=f?f.fromA:1e9;if(u-a>=i)for(;o&&o.from<u;){let d=o;if(a>=d.from||u<=d.to||c){let p=Math.max(d.from,a)-c,m=Math.min(d.to,u)-c;d=p>=m?null:new os(p,m,d.tree,d.offset+c,l>0,!!f)}if(d&&n.push(d),o.to>u)break;o=s<e.length?e[s++]:null}if(!f)break;a=f.toA,c=f.toA-f.toB}return n}};h(os,"TreeFragment");var Ji=os,Ku=class Ku{startParse(e,t,i){return typeof e=="string"&&(e=new qu(e)),i=i?i.length?i.map(n=>new ns(n.from,n.to)):[new ns(0,0)]:[new ns(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let n=this.startParse(e,t,i);for(;;){let s=n.advance();if(s)return s}}};h(Ku,"Parser");var Hr=Ku,Zu=class Zu{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};h(Zu,"StringInput");var qu=Zu;var AR=new ae({perNode:!0});var JL=0,us=class us{constructor(e,t,i,n){this.name=e,this.set=t,this.base=i,this.modified=n,this.id=JL++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e="".concat(t.name,"(").concat(e,")"));return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof us&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let n=new us(i,[],null,[]);if(n.set.push(n),t)for(let s of t.set)n.set.push(s);return n}static defineModifier(e){let t=new Jl(e);return i=>i.modified.indexOf(t)>-1?i:Jl.get(i.base||i,i.modified.concat(t).sort((n,s)=>n.id-s.id))}};h(us,"Tag");var Tt=us,GL=0,Gl=class Gl{constructor(e){this.name=e,this.instances=[],this.id=GL++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&XL(t,l.modified));if(i)return i;let n=[],s=new Tt(e.name,n,e,t);for(let l of t)l.instances.push(s);let o=KL(t);for(let l of e.set)if(!l.modified.length)for(let a of o)n.push(Gl.get(l,a));return s}};h(Gl,"Modifier");var Jl=Gl;function XL(r,e){return r.length==e.length&&r.every((t,i)=>t==e[i])}h(XL,"sameArray");function KL(r){let e=[[]];for(let t=0;t<r.length;t++)for(let i=0,n=e.length;i<n;i++)e.push(e[i].concat(r[t]));return e.sort((t,i)=>i.length-t.length)}h(KL,"powerSet");function Xl(r){let e=Object.create(null);for(let t in r){let i=r[t];Array.isArray(i)||(i=[i]);for(let n of t.split(" "))if(n){let s=[],o=2,l=n;for(let u=0;;){if(l=="..."&&u>0&&u+3==n.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!d)throw new RangeError("Invalid path: "+n);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),u+=d[0].length,u==n.length)break;let p=n[u++];if(u==n.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+n);l=n.slice(u)}let a=s.length-1,c=s[a];if(!c)throw new RangeError("Invalid path: "+n);let f=new Yr(i,o,a>0?s.slice(0,a):null);e[c]=f.sort(e[c])}}return K2.add(e)}h(Xl,"styleTags");var K2=new ae,nd=class nd{constructor(e,t,i,n){this.tags=e,this.mode=t,this.context=i,this.next=n}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};h(nd,"Rule");var Yr=nd;Yr.empty=new Yr([],2,null);function rd(r,e){let t=Object.create(null);for(let s of r)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:i,all:n=null}=e||{};return{style:h(s=>{let o=n;for(let l of s)for(let a of l.set){let c=t[a.id];if(c){o=o?o+" "+c:c;break}}return o},"style"),scope:i}}h(rd,"tagHighlighter");function ZL(r,e){let t=null;for(let i of r){let n=i.style(e);n&&(t=t?t+" "+n:n)}return t}h(ZL,"highlightTags");function Z2(r,e,t,i=0,n=r.length){let s=new td(i,Array.isArray(e)?e:[e],t);s.highlightRange(r.cursor(),i,n,"",s.highlighters),s.flush(n)}h(Z2,"highlightTree");var sd=class sd{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,n,s){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(o)));let c=n,f=eO(e)||Yr.empty,u=ZL(s,f.tags);if(u&&(c&&(c+=" "),c+=u,f.mode==1&&(n+=(n?" ":"")+u)),this.startSpan(Math.max(t,l),c),f.opaque)return;let d=e.tree&&e.tree.prop(ae.mounted);if(d&&d.overlay){let p=e.node.enter(d.overlay[0].from+l,1),m=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),y=e.firstChild();for(let g=0,b=l;;g++){let x=g<d.overlay.length?d.overlay[g]:null,w=x?x.from+l:a,E=Math.max(t,b),S=Math.min(i,w);if(E<S&&y)for(;e.from<S&&(this.highlightRange(e,E,S,n,s),this.startSpan(Math.min(S,e.to),c),!(e.to>=w||!e.nextSibling())););if(!x||w>i)break;b=x.to+l,b>t&&(this.highlightRange(p.cursor(),Math.max(t,x.from+l),Math.min(i,b),"",m),this.startSpan(Math.min(i,b),c))}y&&e.parent()}else if(e.firstChild()){d&&(n="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,n,s),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}};h(sd,"HighlightBuilder");var td=sd;function eO(r){let e=r.type.prop(K2);for(;e&&e.context&&!r.matchContext(e.context);)e=e.next;return e||null}h(eO,"getStyleTags");var I=Tt.define,jl=I(),Qi=I(),G2=I(Qi),X2=I(Qi),Bi=I(),Hl=I(Bi),ed=I(Bi),Yt=I(),Gi=I(Yt),jt=I(),Ht=I(),id=I(),fs=I(id),Yl=I(),_={comment:jl,lineComment:I(jl),blockComment:I(jl),docComment:I(jl),name:Qi,variableName:I(Qi),typeName:G2,tagName:I(G2),propertyName:X2,attributeName:I(X2),className:I(Qi),labelName:I(Qi),namespace:I(Qi),macroName:I(Qi),literal:Bi,string:Hl,docString:I(Hl),character:I(Hl),attributeValue:I(Hl),number:ed,integer:I(ed),float:I(ed),bool:I(Bi),regexp:I(Bi),escape:I(Bi),color:I(Bi),url:I(Bi),keyword:jt,self:I(jt),null:I(jt),atom:I(jt),unit:I(jt),modifier:I(jt),operatorKeyword:I(jt),controlKeyword:I(jt),definitionKeyword:I(jt),moduleKeyword:I(jt),operator:Ht,derefOperator:I(Ht),arithmeticOperator:I(Ht),logicOperator:I(Ht),bitwiseOperator:I(Ht),compareOperator:I(Ht),updateOperator:I(Ht),definitionOperator:I(Ht),typeOperator:I(Ht),controlOperator:I(Ht),punctuation:id,separator:I(id),bracket:fs,angleBracket:I(fs),squareBracket:I(fs),paren:I(fs),brace:I(fs),content:Yt,heading:Gi,heading1:I(Gi),heading2:I(Gi),heading3:I(Gi),heading4:I(Gi),heading5:I(Gi),heading6:I(Gi),contentSeparator:I(Yt),list:I(Yt),quote:I(Yt),emphasis:I(Yt),strong:I(Yt),link:I(Yt),monospace:I(Yt),strikethrough:I(Yt),inserted:I(),deleted:I(),changed:I(),invalid:I(),meta:Yl,documentMeta:I(Yl),annotation:I(Yl),processingInstruction:I(Yl),definition:Tt.defineModifier("definition"),constant:Tt.defineModifier("constant"),function:Tt.defineModifier("function"),standard:Tt.defineModifier("standard"),local:Tt.defineModifier("local"),special:Tt.defineModifier("special")};for(let r in _){let e=_[r];e instanceof Tt&&(e.name=r)}var $R=rd([{tag:_.link,class:"tok-link"},{tag:_.heading,class:"tok-heading"},{tag:_.emphasis,class:"tok-emphasis"},{tag:_.strong,class:"tok-strong"},{tag:_.keyword,class:"tok-keyword"},{tag:_.atom,class:"tok-atom"},{tag:_.bool,class:"tok-bool"},{tag:_.url,class:"tok-url"},{tag:_.labelName,class:"tok-labelName"},{tag:_.inserted,class:"tok-inserted"},{tag:_.deleted,class:"tok-deleted"},{tag:_.literal,class:"tok-literal"},{tag:_.string,class:"tok-string"},{tag:_.number,class:"tok-number"},{tag:[_.regexp,_.escape,_.special(_.string)],class:"tok-string2"},{tag:_.variableName,class:"tok-variableName"},{tag:_.local(_.variableName),class:"tok-variableName tok-local"},{tag:_.definition(_.variableName),class:"tok-variableName tok-definition"},{tag:_.special(_.variableName),class:"tok-variableName2"},{tag:_.definition(_.propertyName),class:"tok-propertyName tok-definition"},{tag:_.typeName,class:"tok-typeName"},{tag:_.namespace,class:"tok-namespace"},{tag:_.className,class:"tok-className"},{tag:_.macroName,class:"tok-macroName"},{tag:_.propertyName,class:"tok-propertyName"},{tag:_.operator,class:"tok-operator"},{tag:_.comment,class:"tok-comment"},{tag:_.meta,class:"tok-meta"},{tag:_.invalid,class:"tok-invalid"},{tag:_.punctuation,class:"tok-punctuation"}]);var od,Jr=new ae;function iO(r){return W.define({combine:r?e=>e.concat(r):void 0})}h(iO,"defineLanguageFacet");var rO=new ae,gd=class gd{constructor(e,t,i=[],n=""){this.data=e,this.name=n,Be.prototype.hasOwnProperty("tree")||Object.defineProperty(Be.prototype,"tree",{get(){return Xi(this)}}),this.parser=t,this.extension=[Xr.of(this),Be.languageData.of((s,o,l)=>{let a=ev(s,o,l),c=a.type.prop(Jr);if(!c)return[];let f=s.facet(c),u=a.type.prop(rO);if(u){let d=a.resolve(o-a.from,l);for(let p of u)if(p.test(d,s)){let m=s.facet(p.facet);return p.type=="replace"?m:m.concat(f)}}return f})].concat(i)}isActiveAt(e,t,i=-1){return ev(e,t,i).type.prop(Jr)==this.data}findRegions(e){let t=e.facet(Xr);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],n=h((s,o)=>{if(s.prop(Jr)==this.data){i.push({from:o,to:o+s.length});return}let l=s.prop(ae.mounted);if(l){if(l.tree.prop(Jr)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+s.length});return}else if(l.overlay){let a=i.length;if(n(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;a<s.children.length;a++){let c=s.children[a];c instanceof Le&&n(c,s.positions[a]+o)}},"explore");return n(Xi(e),0),i}get allowsNesting(){return!0}};h(gd,"Language");var ct=gd;ct.setState=pe.define();function ev(r,e,t){let i=r.facet(Xr),n=Xi(r).topNode;if(!i||i.allowsNesting)for(let s=n;s;s=s.enter(e,t,_e.ExcludeBuffers))s.type.isTop&&(n=s);return n}h(ev,"topNodeAt");var ms=class ms extends ct{constructor(e,t,i){super(e,t,[],i),this.parser=t}static define(e){let t=iO(e.languageData);return new ms(t,e.parser.configure({props:[Jr.add(i=>i.isTop?t:void 0)]}),e.name)}configure(e,t){return new ms(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};h(ms,"LRLanguage");var Kl=ms;function Xi(r){let e=r.field(ct.state,!1);return e?e.tree:Le.empty}h(Xi,"syntaxTree");var bd=class bd{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e<i||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}};h(bd,"DocInput");var cd=bd,ds=null,gs=class gs{constructor(e,t,i=[],n,s,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new gs(e,t,[],Le.empty,0,i,[],null)}startParse(){return this.parser.startParse(new cd(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Le.empty&&this.isDone(t!=null?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let n=Date.now()+e;e=h(()=>Date.now()>n,"until")}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n)if(this.fragments=this.withoutTempSkipped(Ji.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t!=null?t:this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Ji.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ds;ds=this;try{return e()}finally{ds=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=tv(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:n,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((c,f,u,d)=>a.push({fromA:c,toA:f,fromB:u,toB:d})),i=Ji.applyChanges(i,a),n=Le.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let c of this.skipped){let f=e.mapPos(c.from,1),u=e.mapPos(c.to,-1);f<u&&l.push({from:f,to:u})}}}return new gs(this.parser,t,i,n,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:n,to:s}=this.skipped[i];n<e.to&&s>e.from&&(this.fragments=tv(this.fragments,n,s),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Hr{createParse(t,i,n){let s=n[0].from,o=n[n.length-1].to;return{parsedPos:s,advance(){let a=ds;if(a){for(let c of n)a.tempSkipped.push(c);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new Le(Ie.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return ds}};h(gs,"ParseContext");var fd=gs;function tv(r,e,t){return Ji.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}h(tv,"cutFragments");var bs=class bs{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new bs(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=fd.create(e.facet(Xr).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new bs(i)}};h(bs,"LanguageState");var ys=bs;ct.state=Pe.define({create:ys.init,update(r,e){for(let t of e.effects)if(t.is(ct.setState))return t.value;return e.startState.facet(Xr)!=e.state.facet(Xr)?ys.init(e.state):r.apply(e)}});var sv=h(r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)},"requestIdle");typeof requestIdleCallback<"u"&&(sv=h(r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)},"requestIdle"));var ld=typeof navigator<"u"&&(!((od=navigator.scheduling)===null||od===void 0)&&od.isInputPending)?()=>navigator.scheduling.isInputPending():null,Gr,nO=Ye.fromClass((Gr=class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(ct.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(ct.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=sv(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:n}}=this.view,s=i.field(ct.state);if(s.tree==s.context.tree&&s.context.isDone(n+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!ld?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<n&&i.doc.length>n+1e3,a=s.context.work(()=>ld&&ld()||Date.now()>o,n+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ct.setState.of(new ys(s.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>tt(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},h(Gr,"ParseWorker"),Gr),{eventHandlers:{focus(){this.scheduleWork()}}}),Xr=W.define({combine(r){return r.length?r[0]:null},enables:h(r=>[ct.state,nO,ie.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})],"enables")}),yd=class yd{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}};h(yd,"LanguageSupport");var Zl=yd;var ta=W.define({combine:h(r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e},"combine")});function ov(r){let e=r.facet(ta);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}h(ov,"getIndentUnit");function lv(r,e){let t="",i=r.tabSize,n=r.facet(ta)[0];if(n==" "){for(;e>=i;)t+=" ",e-=i;n=" "}for(let s=0;s<e;s++)t+=n;return t}h(lv,"indentString");var ea=class ea{constructor(e,t){this.specs=e;let i;function n(l){let a=bt.newName();return(i||(i=Object.create(null)))["."+a]=l,a}h(n,"def");let s=typeof t.all=="string"?t.all:t.all?n(t.all):void 0,o=t.scope;this.scope=o instanceof ct?l=>l.prop(Jr)==o.data:o?l=>l==o:void 0,this.style=rd(e.map(l=>({tag:l.tag,class:l.class||n(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=i?new bt(i):null,this.themeType=t.themeType}static define(e,t){return new ea(e,t||{})}};h(ea,"HighlightStyle");var Kr=ea,ud=W.define(),av=W.define({combine(r){return r.length?[r[0]]:null}});function ad(r){let e=r.facet(ud);return e.length?e:r.facet(av)}h(ad,"getHighlighters");function hv(r,e){let t=[sO],i;return r instanceof Kr&&(r.module&&t.push(ie.styleModule.of(r.module)),i=r.themeType),e!=null&&e.fallback?t.push(av.of(r)):i?t.push(ud.computeN([ie.darkTheme],n=>n.facet(ie.darkTheme)==(i=="dark")?[r]:[])):t.push(ud.of(r)),t}h(hv,"syntaxHighlighting");var xd=class xd{constructor(e){this.markCache=Object.create(null),this.tree=Xi(e.state),this.decorations=this.buildDeco(e,ad(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Xi(e.state),i=ad(e.state),n=i!=ad(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!n&&t.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return ce.none;let i=new $i;for(let{from:n,to:s}of e.visibleRanges)Z2(this.tree,t,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=ce.mark({class:a})))},n,s);return i.finish()}};h(xd,"TreeHighlighter");var dd=xd,sO=Tr.high(Ye.fromClass(dd,{decorations:h(r=>r.decorations,"decorations")})),JR=Kr.define([{tag:_.meta,color:"#404740"},{tag:_.link,textDecoration:"underline"},{tag:_.heading,textDecoration:"underline",fontWeight:"bold"},{tag:_.emphasis,fontStyle:"italic"},{tag:_.strong,fontWeight:"bold"},{tag:_.strikethrough,textDecoration:"line-through"},{tag:_.keyword,color:"#708"},{tag:[_.atom,_.bool,_.url,_.contentSeparator,_.labelName],color:"#219"},{tag:[_.literal,_.inserted],color:"#164"},{tag:[_.string,_.deleted],color:"#a11"},{tag:[_.regexp,_.escape,_.special(_.string)],color:"#e40"},{tag:_.definition(_.variableName),color:"#00f"},{tag:_.local(_.variableName),color:"#30a"},{tag:[_.typeName,_.namespace],color:"#085"},{tag:_.className,color:"#167"},{tag:[_.special(_.variableName),_.macroName],color:"#256"},{tag:_.definition(_.propertyName),color:"#00c"},{tag:_.comment,color:"#940"},{tag:_.invalid,color:"#f00"}]),oO=ie.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),cv=1e4,fv="()[]{}",uv=W.define({combine(r){return si(r,{afterCursor:!0,brackets:fv,maxScanDistance:cv,renderMatch:hO})}}),lO=ce.mark({class:"cm-matchingBracket"}),aO=ce.mark({class:"cm-nonmatchingBracket"});function hO(r){let e=[],t=r.matched?lO:aO;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}h(hO,"defaultRenderMatch");var cO=Pe.define({create(){return ce.none},update(r,e){if(!e.docChanged&&!e.selection)return r;let t=[],i=e.state.facet(uv);for(let n of e.state.selection.ranges){if(!n.empty)continue;let s=ps(e.state,n.head,-1,i)||n.head>0&&ps(e.state,n.head-1,1,i)||i.afterCursor&&(ps(e.state,n.head,1,i)||n.head<e.state.doc.length&&ps(e.state,n.head+1,-1,i));s&&(t=t.concat(i.renderMatch(s,e.state)))}return ce.set(t,!0)},provide:h(r=>ie.decorations.from(r),"provide")}),fO=[cO,oO];function dv(r={}){return[uv.of(r),fO]}h(dv,"bracketMatching");var uO=new ae;function pd(r,e,t){let i=r.prop(e<0?ae.openedBy:ae.closedBy);if(i)return i;if(r.name.length==1){let n=t.indexOf(r.name);if(n>-1&&n%2==(e<0?1:0))return[t[n+e]]}return null}h(pd,"matchingNodes");function md(r){let e=r.type.prop(uO);return e?e(r.node):r}h(md,"findHandle");function ps(r,e,t,i={}){let n=i.maxScanDistance||cv,s=i.brackets||fv,o=Xi(r),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let c=pd(a.type,t,s);if(c&&a.from<a.to){let f=md(a);if(f&&(t>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return dO(r,e,t,a,f,c,s)}}return pO(r,e,t,o,l.type,n,s)}h(ps,"matchBrackets");function dO(r,e,t,i,n,s,o){let l=i.parent,a={from:n.from,to:n.to},c=0,f=l==null?void 0:l.cursor();if(f&&(t<0?f.childBefore(i.from):f.childAfter(i.to)))do if(t<0?f.to<=i.from:f.from>=i.to){if(c==0&&s.indexOf(f.type.name)>-1&&f.from<f.to){let u=md(f);return{start:a,end:u?{from:u.from,to:u.to}:void 0,matched:!0}}else if(pd(f.type,t,o))c++;else if(pd(f.type,-t,o)){if(c==0){let u=md(f);return{start:a,end:u&&u.from<u.to?{from:u.from,to:u.to}:void 0,matched:!1}}c--}}while(t<0?f.prevSibling():f.nextSibling());return{start:a,matched:!1}}h(dO,"matchMarkedBrackets");function pO(r,e,t,i,n,s,o){let l=t<0?r.sliceDoc(e-1,e):r.sliceDoc(e,e+1),a=o.indexOf(l);if(a<0||a%2==0!=t>0)return null;let c={from:t<0?e-1:e,to:t>0?e+1:e},f=r.doc.iterRange(e,t>0?r.doc.length:0),u=0;for(let d=0;!f.next().done&&d<=s;){let p=f.value;t<0&&(d+=p.length);let m=e+d*t;for(let y=t>0?0:p.length-1,g=t>0?p.length:-1;y!=g;y+=t){let b=o.indexOf(p[y]);if(!(b<0||i.resolveInner(m+y,1).type!=n))if(b%2==0==t>0)u++;else{if(u==1)return{start:c,end:{from:m+y,to:m+y+1},matched:b>>1==a>>1};u--}}t>0&&(d+=p.length)}return f.done?{start:c,matched:!1}:null}h(pO,"matchPlainBrackets");var mO=Object.create(null),iv=[Ie.none];var rv=[],nv=Object.create(null),gO=Object.create(null);for(let[r,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])gO[r]=bO(mO,e);function hd(r,e){rv.indexOf(r)>-1||(rv.push(r),console.warn(e))}h(hd,"warnForPart");function bO(r,e){let t=[];for(let l of e.split(" ")){let a=[];for(let c of l.split(".")){let f=r[c]||_[c];f?typeof f=="function"?a.length?a=a.map(f):hd(c,"Modifier ".concat(c," used at start of tag")):a.length?hd(c,"Tag ".concat(c," used as modifier")):a=Array.isArray(f)?f:[f]:hd(c,"Unknown highlighting tag ".concat(c))}for(let c of a)t.push(c)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),n=i+" "+t.map(l=>l.id),s=nv[n];if(s)return s.id;let o=nv[n]=Ie.define({id:iv.length,name:i,props:[Xl({[i]:t})]});return iv.push(o),o.id}h(bO,"createTokenType");var GR={rtl:ce.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:we.RTL}),ltr:ce.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:we.LTR}),auto:ce.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var kd=gt.define(),yO=gt.define(),xO=W.define(),pv=W.define({combine(r){return si(r,{minDepth:100,newGroupDelay:500,joinToEvent:h((e,t)=>t,"joinToEvent")},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:h((e,t)=>(i,n)=>e(i,n)||t(i,n),"joinToEvent")})}}),mv=Pe.define({create(){return er.empty},update(r,e){let t=e.state.facet(pv),i=e.annotation(kd);if(i){let a=Dt.fromTransaction(e,i.selection),c=i.side,f=c==0?r.undone:r.done;return a?f=ia(f,f.length,t.minDepth,a):f=xv(f,e.startState.selection),new er(c==0?i.rest:f,c==0?f:i.rest)}let n=e.annotation(yO);if((n=="full"||n=="before")&&(r=r.isolate()),e.annotation(Te.addToHistory)===!1)return e.changes.empty?r:r.addMapping(e.changes.desc);let s=Dt.fromTransaction(e),o=e.annotation(Te.time),l=e.annotation(Te.userEvent);return s?r=r.addChanges(s,o,l,t,e):e.selection&&(r=r.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(n=="full"||n=="after")&&(r=r.isolate()),r},toJSON(r){return{done:r.done.map(e=>e.toJSON()),undone:r.undone.map(e=>e.toJSON())}},fromJSON(r){return new er(r.done.map(Dt.fromJSON),r.undone.map(Dt.fromJSON))}});function gv(r={}){return[mv,pv.of(r),ie.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?bv:e.inputType=="historyRedo"?Sd:null;return i?(e.preventDefault(),i(t)):!1}})]}h(gv,"history");function ra(r,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let n=t.field(mv,!1);if(!n)return!1;let s=n.pop(r,t,e);return s?(i(s),!0):!1}}h(ra,"cmd");var bv=ra(0,!1),Sd=ra(1,!1),vO=ra(0,!0),kO=ra(1,!0);var Ki=class Ki{constructor(e,t,i,n,s){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(e){return new Ki(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(n=>n.toJSON())}}static fromJSON(e){return new Ki(e.changes&&We.fromJSON(e.changes),[],e.mapped&&ri.fromJSON(e.mapped),e.startSelection&&Z.fromJSON(e.startSelection),e.selectionsAfter.map(Z.fromJSON))}static fromTransaction(e,t){let i=kt;for(let n of e.startState.facet(xO)){let s=n(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new Ki(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,kt)}static selection(e){return new Ki(void 0,kt,void 0,void 0,e)}};h(Ki,"HistEvent");var Dt=Ki;function ia(r,e,t,i){let n=e+1>t+20?e-t-1:0,s=r.slice(n,e);return s.push(i),s}h(ia,"updateBranch");function SO(r,e){let t=[],i=!1;return r.iterChangedRanges((n,s)=>t.push(n,s)),e.iterChangedRanges((n,s,o,l)=>{for(let a=0;a<t.length;){let c=t[a++],f=t[a++];l>=c&&o<=f&&(i=!0)}}),i}h(SO,"isAdjacent");function wO(r,e){return r.ranges.length==e.ranges.length&&r.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}h(wO,"eqSelectionShape");function yv(r,e){return r.length?e.length?r.concat(e):r:e}h(yv,"conc");var kt=[],FO=200;function xv(r,e){if(r.length){let t=r[r.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-FO));return i.length&&i[i.length-1].eq(e)?r:(i.push(e),ia(r,r.length-1,1e9,t.setSelAfter(i)))}else return[Dt.selection([e])]}h(xv,"addSelection");function QO(r){let e=r[r.length-1],t=r.slice();return t[r.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}h(QO,"popSelection");function vd(r,e){if(!r.length)return r;let t=r.length,i=kt;for(;t;){let n=BO(r[t-1],e,i);if(n.changes&&!n.changes.empty||n.effects.length){let s=r.slice(0,t);return s[t-1]=n,s}else e=n.mapped,t--,i=n.selectionsAfter}return i.length?[Dt.selection(i)]:kt}h(vd,"addMappingToBranch");function BO(r,e,t){let i=yv(r.selectionsAfter.length?r.selectionsAfter.map(l=>l.map(e)):kt,t);if(!r.changes)return Dt.selection(i);let n=r.changes.map(e),s=e.mapDesc(r.changes,!0),o=r.mapped?r.mapped.composeDesc(s):s;return new Dt(n,pe.mapEffects(r.effects,e),o,r.startSelection.map(s),i)}h(BO,"mapEvent");var EO=/^(input\.type|delete)($|\.)/,Zi=class Zi{constructor(e,t,i=0,n=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new Zi(this.done,this.undone):this}addChanges(e,t,i,n,s){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||EO.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime<n.newGroupDelay&&n.joinToEvent(s,SO(l.changes,e.changes))||i=="input.type.compose")?o=ia(o,o.length-1,n.minDepth,new Dt(e.changes.compose(l.changes),yv(pe.mapEffects(e.effects,l.changes),l.effects),l.mapped,l.startSelection,kt)):o=ia(o,o.length,n.minDepth,e),new Zi(o,kt,t,i)}addSelection(e,t,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:kt;return s.length>0&&t-this.prevTime<n&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&wO(s[s.length-1],e)?this:new Zi(xv(this.done,e),this.undone,t,i)}addMapping(e){return new Zi(vd(this.done,e),vd(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,i){let n=e==0?this.done:this.undone;if(n.length==0)return null;let s=n[n.length-1],o=s.selectionsAfter[0]||t.selection;if(i&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:kd.of({side:e,rest:QO(n),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let l=n.length==1?kt:n.slice(0,n.length-1);return s.mapped&&(l=vd(l,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:kd.of({side:e,rest:l,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}};h(Zi,"HistoryState");var er=Zi;er.empty=new er(kt,kt);var vv=[{key:"Mod-z",run:bv,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Sd,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Sd,preventDefault:!0},{key:"Mod-u",run:vO,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:kO,preventDefault:!0}];var oA=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function kv(r,e){let t=-1;return r.changeByRange(i=>{let n=[];for(let o=i.from;o<=i.to;){let l=r.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,n,i),t=l.number),o=l.to+1}let s=r.changes(n);return{changes:n,range:Z.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}h(kv,"changeBySelectedLine");var CO=h(({state:r,dispatch:e})=>r.readOnly?!1:(e(r.update(kv(r,(t,i)=>{i.push({from:t.from,insert:r.facet(ta)})}),{userEvent:"input.indent"})),!0),"indentMore"),UO=h(({state:r,dispatch:e})=>r.readOnly?!1:(e(r.update(kv(r,(t,i)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let s=jo(n,r.tabSize),o=0,l=lv(r,Math.max(0,s-ov(r)));for(;o<n.length&&o<l.length&&n.charCodeAt(o)==l.charCodeAt(o);)o++;i.push({from:t.from+o,to:t.from+n.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),"indentLess");var Sv={key:"Tab",run:CO,shift:UO};function St(){var r=arguments[0];typeof r=="string"&&(r=document.createElement(r));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i];typeof n=="string"?r.setAttribute(i,n):n!=null&&(r[i]=n)}e++}for(;e<arguments.length;e++)wv(r,arguments[e]);return r}h(St,"crelt");function wv(r,e){if(typeof e=="string")r.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)r.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)wv(r,e[t]);else throw new RangeError("Unsupported child node: "+e)}h(wv,"add");var Bd=class Bd{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}};h(Bd,"SelectedDiagnostic");var wd=Bd,la=class la{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let n=e,s=i.facet(Jt).markerFilter;s&&(n=s(n,i));let o=ce.set(n.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?ce.widget({widget:new Fd(l),diagnostic:l}).range(l.from):ce.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new la(o,t,Zr(o))}};h(la,"LintState");var tr=la;function Zr(r,e=null,t=0){let i=null;return r.between(t,1e9,(n,s,{spec:o})=>{if(!(e&&o.diagnostic!=e))return i=new wd(n,s,o.diagnostic),!1}),i}h(Zr,"findDiagnostic");function LO(r,e){let t=e.pos,i=e.end||t,n=r.state.facet(Jt).hideOn(r,t,i);if(n!=null)return n;let s=r.startState.doc.lineAt(e.pos);return!!(r.effects.some(o=>o.is(Qd))||r.changes.touchesRange(s.from,Math.max(s.to,i)))}h(LO,"hideTooltip");function OO(r,e){return r.field(Nt,!1)?e:e.concat(pe.appendConfig.of(Lv))}h(OO,"maybeEnableLint");function _O(r,e){return{effects:OO(r,[Qd.of(e)])}}h(_O,"setDiagnostics");var Qd=pe.define(),Qv=pe.define(),Bv=pe.define(),Nt=Pe.define({create(){return new tr(ce.none,null,null)},update(r,e){if(e.docChanged&&r.diagnostics.size){let t=r.diagnostics.map(e.changes),i=null,n=r.panel;if(r.selected){let s=e.changes.mapPos(r.selected.from,1);i=Zr(t,r.selected.diagnostic,s)||Zr(t,null,s)}!t.size&&n&&e.state.facet(Jt).autoPanel&&(n=null),r=new tr(t,n,i)}for(let t of e.effects)if(t.is(Qd)){let i=e.state.facet(Jt).autoPanel?t.value.length?oa.open:null:r.panel;r=tr.init(t.value,i,e.state)}else t.is(Qv)?r=new tr(r.diagnostics,t.value?oa.open:null,r.selected):t.is(Bv)&&(r=new tr(r.diagnostics,r.panel,t.value));return r},provide:h(r=>[Sl.from(r,e=>e.panel),ie.decorations.from(r,e=>e.diagnostics)],"provide")});var TO=ce.mark({class:"cm-lintRange cm-lintRange-active"});function DO(r,e,t){let{diagnostics:i}=r.state.field(Nt),n=[],s=2e8,o=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(a,c,{spec:f})=>{e>=a&&e<=c&&(a==c||(e>a||t>0)&&(e<c||t<0))&&(n.push(f.diagnostic),s=Math.min(a,s),o=Math.max(c,o))});let l=r.state.facet(Jt).tooltipFilter;return l&&(n=l(n,r.state)),n.length?{pos:s,end:o,above:r.state.doc.lineAt(s).to<o,create(){return{dom:NO(r,n)}}}:null}h(DO,"lintTooltip");function NO(r,e){return St("ul",{class:"cm-tooltip-lint"},e.map(t=>Uv(r,t,!1)))}h(NO,"diagnosticsTooltip");var Fv=h(r=>{let e=r.state.field(Nt,!1);return!e||!e.panel?!1:(r.dispatch({effects:Qv.of(!1)}),!0)},"closeLintPanel");var RO=Ye.fromClass(class{constructor(r){this.view=r,this.timeout=-1,this.set=!0;let{delay:e}=r.state.facet(Jt);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let r=Date.now();if(r<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-r);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(Jt);t.length&&Promise.all(t.map(i=>Promise.resolve(i(this.view)))).then(i=>{let n=i.reduce((s,o)=>s.concat(o));this.view.state.doc==e.doc&&this.view.dispatch(_O(this.view.state,n))},i=>{tt(this.view.state,i)})}}update(r){let e=r.state.facet(Jt);(r.docChanged||e!=r.startState.facet(Jt)||e.needsRefresh&&e.needsRefresh(r))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),Jt=W.define({combine(r){return Object.assign({sources:r.map(e=>e.source).filter(e=>e!=null)},si(r.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:h(()=>null,"hideOn")},{needsRefresh:h((e,t)=>e?t?i=>e(i)||t(i):e:t,"needsRefresh")}))}});function Ev(r,e={}){return[Jt.of({source:r,config:e}),RO,Lv]}h(Ev,"linter");function Cv(r){let e=[];if(r)e:for(let{name:t}of r){for(let i=0;i<t.length;i++){let n=t[i];if(/[a-zA-Z]/.test(n)&&!e.some(s=>s.toLowerCase()==n.toLowerCase())){e.push(n);continue e}}e.push("")}return e}h(Cv,"assignKeys");function Uv(r,e,t){var i;let n=t?Cv(e.actions):[];return St("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},St("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(r):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,o)=>{let l=!1,a=h(d=>{if(d.preventDefault(),l)return;l=!0;let p=Zr(r.state.field(Nt).diagnostics,e);p&&s.apply(r,p.from,p.to)},"click"),{name:c}=s,f=n[o]?c.indexOf(n[o]):-1,u=f<0?c:[c.slice(0,f),St("u",c.slice(f,f+1)),c.slice(f+1)];return St("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":" Action: ".concat(c).concat(f<0?"":' (access key "'.concat(n[o],')"'),".")},u)}),e.source&&St("div",{class:"cm-diagnosticSource"},e.source))}h(Uv,"renderDiagnostic");var Ed=class Ed extends ki{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return St("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}};h(Ed,"DiagnosticWidget");var Fd=Ed,Cd=class Cd{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Uv(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}};h(Cd,"PanelItem");var sa=Cd,aa=class aa{constructor(e){this.view=e,this.items=[];let t=h(n=>{if(n.keyCode==27)Fv(this.view),this.view.focus();else if(n.keyCode==38||n.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(n.keyCode==40||n.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(n.keyCode==36)this.moveSelection(0);else if(n.keyCode==35)this.moveSelection(this.items.length-1);else if(n.keyCode==13)this.view.focus();else if(n.keyCode>=65&&n.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=Cv(s.actions);for(let l=0;l<o.length;l++)if(o[l].toUpperCase().charCodeAt(0)==n.keyCode){let a=Zr(this.view.state.field(Nt).diagnostics,s);a&&s.actions[l].apply(e,a.from,a.to)}}else return;n.preventDefault()},"onkeydown"),i=h(n=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(n.target)&&this.moveSelection(s)},"onclick");this.list=St("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:i}),this.dom=St("div",{class:"cm-panel-lint"},this.list,St("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:h(()=>Fv(this.view),"onclick")},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(Nt).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Nt),i=0,n=!1,s=null;for(e.between(0,this.view.state.doc.length,(o,l,{spec:a})=>{let c=-1,f;for(let u=i;u<this.items.length;u++)if(this.items[u].diagnostic==a.diagnostic){c=u;break}c<0?(f=new sa(this.view,a.diagnostic),this.items.splice(i,0,f),n=!0):(f=this.items[c],c>i&&(this.items.splice(i,c-i),n=!0)),t&&f.diagnostic==t.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),s=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),i++});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)n=!0,this.items.pop();this.items.length==0&&(this.items.push(new sa(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),n=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:h(()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),"read"),write:h(({sel:o,panel:l})=>{let a=l.height/this.list.offsetHeight;o.top<l.top?this.list.scrollTop-=(l.top-o.top)/a:o.bottom>l.bottom&&(this.list.scrollTop+=(o.bottom-l.bottom)/a)},"write")})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}h(t,"rm");for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Nt),i=Zr(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Bv.of(i)})}static open(e){return new aa(e)}};h(aa,"LintPanel");var oa=aa;function AO(r,e='viewBox="0 0 40 40"'){return'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" '.concat(e,">").concat(encodeURIComponent(r),"</svg>')")}h(AO,"svg");function na(r){return AO('<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="'.concat(r,'" fill="none" stroke-width=".7"/>'),'width="6" height="3"')}h(na,"underline");var MO=ie.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:na("#d11")},".cm-lintRange-warning":{backgroundImage:na("orange")},".cm-lintRange-info":{backgroundImage:na("#999")},".cm-lintRange-hint":{backgroundImage:na("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});var Lv=[Nt,ie.decorations.compute([Nt],r=>{let{selected:e,panel:t}=r.field(Nt);return!e||!t||e.from==e.to?ce.none:ce.set([TO.range(e.from,e.to)])}),q2(DO,{hideOn:LO}),MO];function PO(r){let e,t,i;return{c(){e=D("button"),e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" class="svelte-1ha11jr"><path d="M704 896H64V320h640v192h64V192c0-35-29-64-64-64H512C512 57 455 0 384 0S256 57 256 128H64c-35 0-64 29-64 64v704c0 35 29 64 64 64h640c35 0 64-29 64-64V768h-64v128zM192 192h64s64-29 64-64 29-64 64-64 64 29 64 64 32 64 64 64h64s64 29 64 64H128c0-39 28-64 64-64zm-64 512h128v-64H128v64zm448-128V448L320 640l256 192V704h320V576H576zM128 832h192v-64H128v64zm320-448H128v64h320v-64zM256 512H128v64h128v-64z"></path></svg>',F(e,"class","btn svelte-1ha11jr"),F(e,"id","copy"),F(e,"title","Copy bibtex"),vr(e,"copied",r[0])},m(n,s){k(n,e,s),t||(i=ve(e,"click",r[1]),t=!0)},p(n,[s]){s&1&&vr(e,"copied",n[0])},i:Ce,o:Ce,d(n){n&&v(e),t=!1,i()}}}h(PO,"create_fragment");function IO(r,e,t){let i,n=!1,{bibtex:s}=e,o=h(()=>{navigator.clipboard.writeText(s).then(()=>{t(0,n=!0),clearInterval(i),i=setTimeout(()=>{t(0,n=!1)},3e3)}).catch(()=>{alert("Failed to copy")})},"handleCopy");return r.$$set=l=>{"bibtex"in l&&t(2,s=l.bibtex)},[n,o,s]}h(IO,"instance");var Ld=class Ld extends se{constructor(e){super(),le(this,e,IO,PO,oe,{bibtex:2})}};h(Ld,"CopyButton");var Ud=Ld,Ov=Ud;var vs=class vs{constructor(e,t,i,n,s,o,l,a,c,f=0,u){this.p=e,this.stack=t,this.state=i,this.reducePos=n,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=c,this.lookAhead=f,this.parent=u}toString(){return"[".concat(this.stack.filter((e,t)=>t%3==0).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}static start(e,t,i=0){let n=e.parser.context;return new vs(e,[],t,i,i,0,[],0,n?new ha(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,n=e&65535,{parser:s}=this.p,o=s.dynamicPrecedence(n);if(o&&(this.score+=o),i==0){this.pushState(s.getGoto(this.state,n,!0),this.reducePos),n<s.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,4,!0),this.reduceContext(n,this.reducePos);return}let l=this.stack.length-(i-1)*3-(e&262144?6:0),a=l?this.stack[l-2]:this.p.ranges[0].from,c=this.reducePos-a;c>=2e3&&!(!((t=this.p.parser.nodeSet.types[n])===null||t===void 0)&&t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=c));let f=l?this.stack[l-1]:0,u=this.bufferBase+this.buffer.length-f;if(n<s.minRepeatTerm||e&131072){let d=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,a,d,u+4,!0)}if(e&262144)this.state=this.stack[l];else{let d=this.stack[l-3];this.state=s.getGoto(d,n,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(n,a)}storeNode(e,t,i,n=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,t,i,n);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,n>4&&(n-=4);this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=n}}shift(e,t,i){let n=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4);else{let s=e,{parser:o}=this.p;(i>this.pos||t<=o.maxNode)&&(this.pos=i,o.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,i,4)}}apply(e,t,i){e&65536?this.reduce(e):this.shift(e,t,i)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new vs(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Td(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&n.push(t[s],o);if(this.stack.length<120)for(let s=0;n.length<8&&s<t.length;s+=2){let o=t[s+1];n.some((l,a)=>a&1&&l==o)||n.push(t[s],o)}t=n}let i=[];for(let n=0;n<t.length&&i.length<4;n+=2){let s=t[n+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[n],this.pos),o.score-=200,i.push(o)}return i}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let i=t>>19,n=t&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],n,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=h((n,s)=>{if(!t.includes(n))return t.push(n),e.allActions(n,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let a=o&65535,c=this.stack.length-l*3;if(c>=0&&e.getGoto(this.stack[c],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,s+1);if(l!=null)return l}})},"explore");return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new ha(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}};h(vs,"Stack");var _d=vs,$d=class $d{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}};h($d,"StackContext");var ha=$d,qd=class qd{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=n}};h(qd,"SimulatedStack");var Td=qd,ks=class ks{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new ks(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new ks(this.stack,this.pos,this.index)}};h(ks,"StackBufferCursor");var Dd=ks;function xs(r,e=Uint16Array){if(typeof r!="string")return r;let t=null;for(let i=0,n=0;i<r.length;){let s=0;for(;;){let o=r.charCodeAt(i++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),s+=a,l)break;s*=46}t?t[n++]=s:t=new e(s)}return t}h(xs,"decodeArray");var Vd=class Vd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}};h(Vd,"CachedToken");var en=Vd,_v=new en,zd=class zd{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=_v,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,n=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!n)return null;let o=this.ranges[--n];s-=i.from-o.to,i=o}for(;t<0?s>i.to:s>=i.to;){if(n==this.ranges.length-1)return null;let o=this.ranges[++n];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,n;if(t>=0&&t<this.chunk.length)i=this.pos+e,n=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=i;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),n=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),n}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=_v,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(i+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return i}};h(zd,"InputStream");var Nd=zd,Wd=class Wd{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;Av(this.data,e,t,this.id,i.data,i.tokenPrecTable)}};h(Wd,"TokenGroup");var Ei=Wd;Ei.prototype.contextual=Ei.prototype.fallback=Ei.prototype.extend=!1;var jd=class jd{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?xs(e):e}token(e,t){let i=e.pos,n=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(Av(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||n++,o==null)break;e.reset(o,e.token)}n&&(e.reset(i,e.token),e.acceptToken(this.elseToken,n))}};h(jd,"LocalTokenGroup");var Rd=jd;Rd.prototype.contextual=Ei.prototype.fallback=Ei.prototype.extend=!1;function Av(r,e,t,i,n,s){let o=0,l=1<<i,{dialect:a}=t.p.parser;e:for(;l&r[o];){let c=r[o+1];for(let p=o+3;p<c;p+=2)if((r[p+1]&l)>0){let m=r[p];if(a.allows(m)&&(e.token.value==-1||e.token.value==m||qO(m,e.token.value,n,s))){e.acceptToken(m);break}}let f=e.next,u=0,d=r[o+2];if(e.next<0&&d>u&&r[c+d*3-3]==65535&&r[c+d*3-3]==65535){o=r[c+d*3-1];continue e}for(;u<d;){let p=u+d>>1,m=c+p+(p<<1),y=r[m],g=r[m+1]||65536;if(f<y)d=p;else if(f>=g)u=p+1;else{o=r[m+2],e.advance();continue e}}break}}h(Av,"readToken");function Tv(r,e,t){for(let i=e,n;(n=r[i])!=65535;i++)if(n==t)return i-e;return-1}h(Tv,"findOffset");function qO(r,e,t,i){let n=Tv(t,i,e);return n<0||Tv(t,i,r)<n}h(qO,"overrides");var ft=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),Od=null;function Dv(r,e,t){let i=r.cursor(_e.IncludeAnonymous);for(i.moveTo(e);;)if(!(t<0?i.childBefore(e):i.childAfter(e)))for(;;){if((t<0?i.to<e:i.from>e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(r.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:r.length}}h(Dv,"cutAt");var Hd=class Hd{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Dv(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Dv(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let i=this.trees[t],n=this.index[t];if(n==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[n],o=this.start[t]+i.positions[n];if(o>e)return this.nextStart=o,null;if(s instanceof Le){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let a=s.prop(ae.lookAhead);if(!a||l+a<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}};h(Hd,"FragmentCursor");var Ad=Hd,Yd=class Yd{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new en)}getActions(e){let t=0,i=null,{parser:n}=e.p,{tokenizers:s}=n,o=n.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let c=0;c<s.length;c++){if(!(1<<c&o))continue;let f=s[c],u=this.tokens[c];if(!(i&&!f.fallback)&&((f.contextual||u.start!=e.pos||u.mask!=o||u.context!=l)&&(this.updateCachedToken(u,f,e),u.mask=o,u.context=l),u.lookAhead>u.end+25&&(a=Math.max(u.lookAhead,a)),u.value!=0)){let d=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!f.extend&&(i=u,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new en,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new en,{pos:i,p:n}=e;return t.start=i,t.end=Math.min(i+1,n.stream.end),t.value=i==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,i){let n=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(n,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),i);if(l>=0&&i.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,i,n){for(let s=0;s<n;s+=3)if(this.actions[s]==e)return n;return this.actions[n++]=e,this.actions[n++]=t,this.actions[n++]=i,n}addActions(e,t,i,n){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let a=0;a<2;a++)for(let c=o.stateSlot(s,a?2:1);;c+=3){if(l[c]==65535)if(l[c+1]==1)c=ai(l,c+2);else{n==0&&l[c+1]==2&&(n=this.putAction(ai(l,c+2),t,i,n));break}l[c]==t&&(n=this.putAction(ai(l,c+1),t,i,n))}return n}};h(Yd,"TokenCache");var Md=Yd,Jd=class Jd{constructor(e,t,i,n){this.parser=e,this.input=t,this.ranges=n,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Nd(t,n),this.tokens=new Md(e,this.stream),this.topTerm=e.top[1];let{from:s}=n[0];this.stacks=[_d.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new Ad(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],n,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>t)i.push(l);else{if(this.advanceStack(l,i,e))continue;{n||(n=[],s=[]),n.push(l);let a=this.tokens.getMainToken(l);s.push(a.value,a.end)}}break}}if(!i.length){let o=n&&VO(n);if(o)return ft&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw ft&&n&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&n){let o=this.stoppedAt!=null&&n[0].pos>this.stoppedAt?n[0]:this.runRecovery(n,s,i);if(o)return ft&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o<i.length-1;o++){let l=i[o];for(let a=o+1;a<i.length;a++){let c=i[a];if(l.sameState(c)||l.buffer.length>500&&c.buffer.length>500)if((l.score-c.score||l.buffer.length-c.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o<i.length;o++)i[o].pos<this.minStackPos&&(this.minStackPos=i[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,i){let n=e.pos,{parser:s}=this,o=ft?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,f=c?e.curContext.hash:0;for(let u=this.fragments.nodeAt(n);u;){let d=this.parser.nodeSet.types[u.type.id]==u.type?s.getGoto(e.state,u.type.id):-1;if(d>-1&&u.length&&(!c||(u.prop(ae.contextHash)||0)==f))return e.useNode(u,d),ft&&console.log(o+this.stackID(e)+" (via reuse of ".concat(s.getName(u.type.id),")")),!0;if(!(u instanceof Le)||u.children.length==0||u.positions[0]>0)break;let p=u.children[0];if(p instanceof Le&&u.positions[0]==0)u=p;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),ft&&console.log(o+this.stackID(e)+" (via always-reduce ".concat(s.getName(l&65535),")")),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let c=0;c<a.length;){let f=a[c++],u=a[c++],d=a[c++],p=c==a.length||!i,m=p?e:e.split();if(m.apply(f,u,d),ft&&console.log(o+this.stackID(m)+" (via ".concat(f&65536?"reduce of ".concat(s.getName(f&65535)):"shift"," for ").concat(s.getName(u)," @ ").concat(n).concat(m==e?"":", split",")")),p)return!0;m.pos>n?t.push(m):i.push(m)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Nv(e,t),!0}}runRecovery(e,t,i){let n=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],a=t[o<<1],c=t[(o<<1)+1],f=ft?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),ft&&console.log(f+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let u=l.split(),d=f;for(let p=0;u.forceReduce()&&p<10&&(ft&&console.log(d+this.stackID(u)+" (via force-reduce)"),!this.advanceFully(u,i));p++)ft&&(d=this.stackID(u)+" -> ");for(let p of l.recoverByInsert(a))ft&&console.log(f+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>l.pos?(c==l.pos&&(c++,a=0),l.recoverByDelete(a,c),ft&&console.log(f+this.stackID(l)+" (via recover-delete ".concat(this.parser.getName(a),")")),Nv(l,i)):(!n||n.score<l.score)&&(n=l)}return n}stackToTree(e){return e.close(),Le.build({buffer:Dd.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Od||(Od=new WeakMap)).get(e);return t||Od.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};h(Jd,"Parse");var Pd=Jd;function Nv(r,e){for(let t=0;t<e.length;t++){let i=e[t];if(i.pos==r.pos&&i.sameState(r)){e[t].score<r.score&&(e[t]=r);return}}e.push(r)}h(Nv,"pushStackDedup");var Gd=class Gd{constructor(e,t,i){this.source=e,this.flags=t,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}};h(Gd,"Dialect");var Id=Gd;var Ss=class Ss extends Hr{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError("Parser version (".concat(e.version,") doesn't match runtime version (14)"));let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;l<e.repeatNodeCount;l++)t.push("");let i=Object.keys(e.topRules).map(l=>e.topRules[l][1]),n=[];for(let l=0;l<t.length;l++)n.push([]);function s(l,a,c){n[l].push([a,a.deserialize(String(c))])}if(h(s,"setProp"),e.nodeProps)for(let l of e.nodeProps){let a=l[0];typeof a=="string"&&(a=ae[a]);for(let c=1;c<l.length;){let f=l[c++];if(f>=0)s(f,a,l[c++]);else{let u=l[c+-f];for(let d=-f;d>0;d--)s(l[c++],a,u);c++}}}this.nodeSet=new ls(t.map((l,a)=>Ie.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:n[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let o=xs(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(Rv),this.states=xs(e.states,Uint32Array),this.data=xs(e.stateData),this.goto=xs(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Ei(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let n=new Pd(this,e,t,i);for(let s of this.wrappers)n=s(n,e,t,i);return n}getGoto(e,t,i=!1){let n=this.goto;if(t>=n[0])return-1;for(let s=n[t+1];;){let o=n[s++],l=o&1,a=n[s++];if(l&&i)return a;for(let c=s+(o>>1);s<c;s++)if(n[s]==e)return a;if(l)return-1}}hasAction(e,t){let i=this.data;for(let n=0;n<2;n++)for(let s=this.stateSlot(e,n?2:1),o;;s+=3){if((o=i[s])==65535)if(i[s+1]==1)o=i[s=ai(i,s+2)];else{if(i[s+1]==2)return ai(i,s+2);break}if(o==t||o==0)return ai(i,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),n=i?t(i):void 0;for(let s=this.stateSlot(e,1);n==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=ai(this.data,s+2);else break;n=t(ai(this.data,s+1))}return n}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=ai(this.data,i+2);else break;if(!(this.data[i+2]&1)){let n=this.data[i+1];t.some((s,o)=>o&1&&s==n)||t.push(this.data[i],n)}}return t}configure(e){let t=Object.assign(Object.create(Ss.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError("Invalid top rule name ".concat(e.top));t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let n=e.tokenizers.find(s=>s.from==i);return n?n.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,n)=>{let s=e.specializers.find(l=>l.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return t.specializers[n]=Rv(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(i[o]=!0)}let n=null;for(let s=0;s<t.length;s++)if(!i[s])for(let o=this.dialects[t[s]],l;(l=this.data[o++])!=65535;)(n||(n=new Uint8Array(this.maxTerm+1)))[l]=1;return new Id(e,i,n)}static deserialize(e){return new Ss(e)}};h(Ss,"LRParser");var ca=Ss;function ai(r,e){return r[e]|r[e+1]<<16}h(ai,"pair");function VO(r){let e=null;for(let t of r){let i=t.p.stoppedAt;(t.pos==t.p.stream.end||i!=null&&t.pos>i)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}h(VO,"findFinished");function Rv(r){if(r.external){let e=r.extend?1:0;return(t,i)=>r.external(t,i)<<1|e}return r.get}h(Rv,"getSpecializer");var Mv=ca.deserialize({version:14,states:"'[QVQPOOOhQPO'#CsOmQPO'#CwOrQPO'#CzOOQO'#Cp'#CpOOQO'#Ci'#CiQVQPOOOwQPO'#CpO|QQO,59_O![QQO,59cO!aQSO,59fOOQO-E6g-E6gO!fQWO'#C_OOQO,59[,59[OOQO'#Cu'#CuO!qQPO'#CtO!|QPO1G.yO#RQPO'#CxO#WQPO1G.}O#]QPO1G/QO#bQWO'#CjO#mQPO,58yOOQO,58y,58yO#mQPO,58yO|QQO'#CkO#uQPO,59`OOQO7+$e7+$eO|QQO,59dOOQO7+$i7+$iO![QQO7+$lOOQO,59U,59UOOQO-E6h-E6hOOQO1G.e1G.eO$QQPO1G.eOOQO,59V,59VOOQO-E6i-E6iOOQO1G/O1G/OO$YQPO<<HWOOQO7+$P7+$PO$bQQOAN=rO$jQPOAN=rOOQOAN=rAN=rOOQO,59W,59WOOQOG23^G23^O$rQQOG23^OOQO-E6j-E6jOOQOLD(xLD(xP![QQO'#Cl",stateData:"%S~OcOS~OQVOTPOXQOYRO[SO~OeWO~OeXO~OeYO~Oe[O~OU^OV^OW^Oe[O~OWaO~OZcO~OSgOe[OffO~OjhOfhXohX~OfjO~OmkO~OflO~OomO~OSnOe^Xf^X~Oe[OfpO~OjhOfhaoha~Oe[OfvO~OfyOowO~OWaOf{O~Of{Oo|O~OWaOf!OO~OQTXYScY~",goto:"#^oPPPpPPPPPPPPP!O!U!`!fPPP!lPP!p!t!zP!p#RP!pQ]VU^WhkXd[egqQUORZUQe[SoeqRqgQi_RsiQxuR}xTTOUTSOUQ`WRtkS_WkRrhQbXQumVzw|!P",nodeNames:"\u26A0 Program CommentCommand Braced BraceContent PreambleCommand Quoted Number Identifier StringCommand Command Key Comment",maxTerm:31,skippedNodes:[0],repeatNodeCount:4,tokenData:"!<f~R|OX#{X^$g^p#{pq$gqr#{rs&]st+[t|#{|}+r}!Q#{!Q![,Y![!_#{!_!`,v!`!b#{!b!c-^!c!}Kx!}#R#{#R#SKx#S#T#{#T#bKx#b#cNO#c#oKx#o#p!<[#p#q#{#q#r!<a#r#y#{#y#z$g#z$f#{$f$g$g$g#BY#{#BY#BZ$g#BZ$IS#{$IS$I_$g$I_$I|#{$I|$JO$g$JO$JT#{$JT$JU$g$JU$KV#{$KV$KW$g$KW&FU#{&FU&FV$g&FV;'S#{;'S;=`$a<%lO#{W$QTSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{W$dP;=`<%l#{~$niSWc~OX#{X^$g^p#{pq$gq#o#{#p#q#{#r#y#{#y#z$g#z$f#{$f$g$g$g#BY#{#BY#BZ$g#BZ$IS#{$IS$I_$g$I_$I|#{$I|$JO$g$JO$JT#{$JT$JU$g$JU$KV#{$KV$KW$g$KW&FU#{&FU&FV$g&FV;'S#{;'S;=`$a<%lO#{Y&bZSWOr&]rs'Ts#O&]#O#P'k#P#o&]#o#p)]#p#q&]#q#r)]#r;'S&];'S;=`+U<%lO&]Y'[TUQSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{Y'pZSWOr&]rs(cs#O&]#O#P'k#P#o&]#o#p)]#p#q&]#q#r)]#r;'S&];'S;=`+U<%lO&]Y(jZUQSWOr&]rs'Ts#O&]#O#P'k#P#o&]#o#p)]#p#q&]#q#r)]#r;'S&];'S;=`+U<%lO&]Q)`VOr)]rs)us#O)]#O#P)z#P;'S)];'S;=`+O<%lO)]Q)zOUQQ)}VOr)]rs*ds#O)]#O#P)z#P;'S)];'S;=`+O<%lO)]Q*iVUQOr)]rs)us#O)]#O#P)z#P;'S)];'S;=`+O<%lO)]Q+RP;=`<%l)]Y+XP;=`<%l&]X+cTjPSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X+yToPSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{Y,aVVQSWO!Q#{!Q![,Y![#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X,}TmPSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{~-cfSWO!c#{!c!e.w!e!f0{!f!r.w!r!s9|!s!u.w!u!vDW!v!}.w!}#R#{#R#S.w#S#T#{#T#V.w#V#W0{#W#d.w#d#e9|#e#g.w#g#hDW#h#o.w#p#q#{#r;'S#{;'S;=`$a<%lO#{~.|^SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~0P^Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~1QbSWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!q/x!q!r2Y!r!}/x!}#R#{#R#S/x#S#T#{#T#c/x#c#d2Y#d#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~2abY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!o/x!o!p3i!p!}/x!}#R#{#R#S/x#S#T#{#T#a/x#a#b3i#b#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~3pbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!o/x!o!p4x!p!}/x!}#R#{#R#S/x#S#T#{#T#a/x#a#b4x#b#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~5PbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!g/x!g!h6X!h!}/x!}#R#{#R#S/x#S#T#{#T#X/x#X#Y6X#Y#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~6`bY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!p/x!p!q7h!q!}/x!}#R#{#R#S/x#S#T#{#T#b/x#b#c7h#c#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~7obY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!v/x!v!w8w!w!}/x!}#R#{#R#S/x#S#T#{#T#h/x#h#i8w#i#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~9Q^Q~Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~:RbSWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!t/x!t!u;Z!u!}/x!}#R#{#R#S/x#S#T#{#T#f/x#f#g;Z#g#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~;bbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!g/x!g!h<j!h!}/x!}#R#{#R#S/x#S#T#{#T#X/x#X#Y<j#Y#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~<q`Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!d=s!d!}/x!}#R#{#R#S/x#S#T#{#T#U=s#U#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~=zbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!o/x!o!p?S!p!}/x!}#R#{#R#S/x#S#T#{#T#a/x#a#b?S#b#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~?ZbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!d/x!d!e@c!e!}/x!}#R#{#R#S/x#S#T#{#T#U/x#U#V@c#V#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~@jbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!n/x!n!oAr!o!}/x!}#R#{#R#S/x#S#T#{#T#`/x#`#aAr#a#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~AybY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!g/x!g!hCR!h!}/x!}#R#{#R#S/x#S#T#{#T#X/x#X#YCR#Y#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~C[^T~Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~D]bSWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!v/x!v!wEe!w!}/x!}#R#{#R#S/x#S#T#{#T#h/x#h#iEe#i#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~ElbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!t/x!t!uFt!u!}/x!}#R#{#R#S/x#S#T#{#T#f/x#f#gFt#g#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~F{bY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!k/x!k!lHT!l!}/x!}#R#{#R#S/x#S#T#{#T#]/x#]#^HT#^#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~H[bY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!p/x!p!qId!q!}/x!}#R#{#R#S/x#S#T#{#T#b/x#b#cId#c#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~IkbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!i/x!i!jJs!j!}/x!}#R#{#R#S/x#S#T#{#T#Z/x#Z#[Js#[#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~J|^X~Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{^K}^SWO}#{}!OLy!O!Q#{!Q![Ly![!c#{!c!}Ly!}#R#{#R#SLy#S#T#{#T#oLy#p#q#{#r;'S#{;'S;=`$a<%lO#{^MS^WQZSSWO}#{}!OLy!O!Q#{!Q![Ly![!c#{!c!}Ly!}#R#{#R#SLy#S#T#{#T#oLy#p#q#{#r;'S#{;'S;=`$a<%lO#{_NT`SWO}#{}!OLy!O!Q#{!Q![Ly![!c#{!c!}Ly!}#R#{#R#SLy#S#T#{#T#cLy#c#d! V#d#oLy#p#q#{#r;'S#{;'S;=`$a<%lO#{_! ``WQZSSWOp#{pq!!bq}#{}!OLy!O!Q#{!Q![Ly![!c#{!c!}Ly!}#R#{#R#SLy#S#T#{#T#oLy#p#q#{#r;'S#{;'S;=`$a<%lO#{X!!gVSWO#]#{#]#^!!|#^#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!#RVSWO#W#{#W#X!#h#X#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!#mVSWO#X#{#X#Y!$S#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!$XVSWO#T#{#T#U!$n#U#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!$sVSWOp#{pq!%Yq#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!%_VSWO#k#{#k#l!%t#l#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!%yVSWO#[#{#[#]!&`#]#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!&eVSWO#m#{#m#n!&z#n#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!'PVSWOp#{pq!'fq#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!'kVSWO#h#{#h#i!(Q#i#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!(VVSWO#[#{#[#]!(l#]#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!(qVSWO#]#{#]#^!)W#^#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!)]VSWO#g#{#g#h!)r#h#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!)wVSWOp#{pq!*^q#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!*cVSWO#g#{#g#h!*x#h#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!*}VSWO#h#{#h#i!+d#i#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!+iVSWO#f#{#f#g!,O#g#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!,TVSWO#]#{#]#^!,j#^#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!,oVSWO#b#{#b#c!-U#c#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!-ZVSWO#Z#{#Z#[!-p#[#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!-uVSWOp#{pq!.[q#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!.aVSWO#]#{#]#^!.v#^#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!.{VSWO#g#{#g#h!/b#h#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!/gVSWOp#{pq!/|q#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!0RVSWO#b#{#b#c!0h#c#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!0mVSWO#X#{#X#Y!1S#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!1XVSWO#X#{#X#Y!1n#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!1sVSWO#W#{#W#X!2Y#X#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!2_VSWO#X#{#X#Y!2t#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!2yVSWO#W#{#W#X!3`#X#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!3eVSWOp#{pq!3zq#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!4PVSWO#U#{#U#V!4f#V#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!4kVSWO#i#{#i#j!5Q#j#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!5VVSWO#h#{#h#i!5l#i#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!5qVSWOp#{pq!6Wq#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!6]VSWO#k#{#k#l!6r#l#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!6wVSWO#[#{#[#]!7^#]#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!7cVSWO#T#{#T#U!7x#U#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!7}VSWO#h#{#h#i!8d#i#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!8iVSWO#X#{#X#Y!9O#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!9TVSWO#j#{#j#k!9j#k#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!9oVSWO#X#{#X#Y!:U#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!:ZVSWO#f#{#f#g!:p#g#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!:uXSWOp!;bpq#{q!b!;b!b!c#{!c#o!;b#p#q!;b#r;'S!;b;'S;=`!<U<%lO!;bX!;iX[PSWOp!;bpq#{q!b!;b!b!c#{!c#o!;b#p#q!;b#r;'S!;b;'S;=`!<U<%lO!;bX!<XP;=`<%l!;b~!<aOe~~!<fOf~",tokenizers:[0,1,2,3],topRules:{Program:[0,1]},tokenPrec:180});var zO=Kl.define({parser:Mv.configure({props:[Xl({Identifier:_.variableName,Comment:_.comment,Key:_.name,Number:_.number,BraceContent:_.string,Quoted:_.string,Command:_.className,CommentCommand:_.className,PreambleCommand:_.className,StringCommand:_.className,Field:_.variableName})]})}),WO=Kr.define([{tag:_.comment,color:"var(--light5)"},{tag:_.name,color:"var(--orange)"},{tag:_.number,color:"var(--light-blue)"},{tag:_.string,color:"var(--green)"},{tag:_.className,color:"var(--pink)"},{tag:_.variableName,color:"white"}]);function Pv(){return new Zl(zO)}h(Pv,"bibtexLanguage");function Iv(){return hv(WO)}h(Iv,"bibtexSyntaxHighlighting");function jO(r){let e,t,i;return t=new Ov({props:{bibtex:r[0]}}),{c(){e=D("main"),M(t.$$.fragment),F(e,"id","editor"),F(e,"class","svelte-x4zh2g")},m(n,s){k(n,e,s),A(t,e,null),r[5](e),i=!0},p(n,[s]){let o={};s&1&&(o.bibtex=n[0]),t.$set(o)},i(n){i||(C(t.$$.fragment,n),i=!0)},o(n){U(t.$$.fragment,n),i=!1},d(n){n&&v(e),R(t),r[5](null)}}}h(jO,"create_fragment");function HO(r,e,t){let{bibtex:i}=e,{error:n}=e,s,o,l;Ph(()=>{let c=ie.updateListener.of(f=>{o&&f.docChanged&&t(0,i=o.state.doc.toString())});t(4,l=new _r),t(3,o=new ie({parent:s,state:Be.create({doc:i,extensions:[V2(),z2(),I2(),Be.allowMultipleSelections.of(!0),dv(),A2(),Pv(),Iv(),iu.of([...vv,Sv]),gv(),c,l.of([])]})})),o.focus(),window.cmEditor=o});function a(c){J[c?"unshift":"push"](()=>{s=c,t(1,s)})}return h(a,"main_binding"),r.$$set=c=>{"bibtex"in c&&t(0,i=c.bibtex),"error"in c&&t(2,n=c.error)},r.$$.update=()=>{r.$$.dirty&28&&(o==null||o.dispatch({effects:l.reconfigure(Ev(()=>{if(n&&o){let c=o.state.doc.line(n.line),f=c.from,u=c.to;return[{from:f,to:u,severity:"error",message:"Syntax Error"}]}return[]}))})),r.$$.dirty&9&&o&&i!==o.state.doc.toString()&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:i}})},[i,s,n,o,l,a]}h(HO,"instance");var Kd=class Kd extends se{constructor(e){super(),le(this,e,HO,jO,oe,{bibtex:0,error:2})}};h(Kd,"Editor");var Xd=Kd,$v=Xd;function YO(r){let e,t,i,n,s,o=r[3].default,l=fi(o,r,r[2],null);return{c(){e=D("details"),t=D("summary"),i=Y(r[0]),n=$(),l&&l.c(),F(t,"class","svelte-ee92zc"),e.open=r[1],F(e,"class","svelte-ee92zc")},m(a,c){k(a,e,c),q(e,t),q(t,i),q(e,n),l&&l.m(e,null),s=!0},p(a,[c]){(!s||c&1)&&qe(i,a[0]),l&&l.p&&(!s||c&4)&&di(l,o,a,a[2],s?ui(o,a[2],c,null):pi(a[2]),null),(!s||c&2)&&(e.open=a[1])},i(a){s||(C(l,a),s=!0)},o(a){U(l,a),s=!1},d(a){a&&v(e),l&&l.d(a)}}}h(YO,"create_fragment");function JO(r,e,t){let{$$slots:i={},$$scope:n}=e,{title:s}=e,{open:o=!1}=e;return r.$$set=l=>{"title"in l&&t(0,s=l.title),"open"in l&&t(1,o=l.open),"$$scope"in l&&t(2,n=l.$$scope)},[s,o,n,i]}h(JO,"instance");var ep=class ep extends se{constructor(e){super(),le(this,e,JO,YO,oe,{title:0,open:1})}};h(ep,"Collapsible");var Zd=ep,it=Zd;function GO(r){let e,t,i;return{c(){e=D("input"),F(e,"type","checkbox"),F(e,"name",r[1]),F(e,"class","svelte-1tu5lm6")},m(n,s){k(n,e,s),e.checked=r[0],t||(i=[ve(e,"change",r[3]),ve(e,"change",r[4])],t=!0)},p(n,[s]){s&2&&F(e,"name",n[1]),s&1&&(e.checked=n[0])},i:Ce,o:Ce,d(n){n&&v(e),t=!1,At(i)}}}h(GO,"create_fragment");function XO(r,e,t){let{name:i}=e,{checked:n=void 0}=e,s=Oi();function o(){n=this.checked,t(0,n)}h(o,"input_change_handler");let l=h(()=>s("change"),"change_handler");return r.$$set=a=>{"name"in a&&t(1,i=a.name),"checked"in a&&t(0,n=a.checked)},[n,i,s,o,l]}h(XO,"instance");var ip=class ip extends se{constructor(e){super(),le(this,e,XO,GO,oe,{name:1,checked:0})}};h(ip,"Checkbox");var tp=ip,ir=tp;function KO(r){let e,t,i=r[3].default,n=fi(i,r,r[2],null);return{c(){e=D("label"),n&&n.c(),F(e,"title",r[0]),F(e,"class","svelte-a2tm3u"),vr(e,"inset",r[1])},m(s,o){k(s,e,o),n&&n.m(e,null),t=!0},p(s,[o]){n&&n.p&&(!t||o&4)&&di(n,i,s,s[2],t?ui(i,s[2],o,null):pi(s[2]),null),(!t||o&1)&&F(e,"title",s[0]),(!t||o&2)&&vr(e,"inset",s[1])},i(s){t||(C(n,s),t=!0)},o(s){U(n,s),t=!1},d(s){s&&v(e),n&&n.d(s)}}}h(KO,"create_fragment");function ZO(r,e,t){let{$$slots:i={},$$scope:n}=e,{title:s=void 0}=e,{inset:o=void 0}=e;return r.$$set=l=>{"title"in l&&t(0,s=l.title),"inset"in l&&t(1,o=l.inset),"$$scope"in l&&t(2,n=l.$$scope)},[s,o,n,i]}h(ZO,"instance");var np=class np extends se{constructor(e){super(),le(this,e,ZO,KO,oe,{title:0,inset:1})}};h(np,"Label");var rp=np,rt=rp;function e_(r){let e,t,i=r[1].default,n=fi(i,r,r[0],null);return{c(){e=D("div"),n&&n.c(),F(e,"class","suboptions svelte-1gkj6ol")},m(s,o){k(s,e,o),n&&n.m(e,null),t=!0},p(s,[o]){n&&n.p&&(!t||o&1)&&di(n,i,s,s[0],t?ui(i,s[0],o,null):pi(s[0]),null)},i(s){t||(C(n,s),t=!0)},o(s){U(n,s),t=!1},d(s){s&&v(e),n&&n.d(s)}}}h(e_,"create_fragment");function t_(r,e,t){let{$$slots:i={},$$scope:n}=e;return r.$$set=s=>{"$$scope"in s&&t(0,n=s.$$scope)},[n,i]}h(t_,"instance");var op=class op extends se{constructor(e){super(),le(this,e,t_,e_,oe,{})}};h(op,"SubOptions");var sp=op,fa=sp;function i_(r){let e,t,i,n=r[3].title+"",s,o;function l(c){r[7](c)}h(l,"checkbox_checked_binding");let a={name:r[1]};return r[0]!==void 0&&(a.checked=r[0]),e=new ir({props:a}),J.push(()=>K(e,"checked",l)),e.$on("change",r[8]),{c(){M(e.$$.fragment),i=$(),s=Y(n)},m(c,f){A(e,c,f),k(c,i,f),k(c,s,f),o=!0},p(c,f){let u={};f&2&&(u.name=c[1]),!t&&f&1&&(t=!0,u.checked=c[0],X(()=>t=!1)),e.$set(u)},i(c){o||(C(e.$$.fragment,c),o=!0)},o(c){U(e.$$.fragment,c),o=!1},d(c){R(e,c),c&&v(i),c&&v(s)}}}h(i_,"create_default_slot_1");function qv(r){let e,t,i=r[0]&&Vv(r);return{c(){i&&i.c(),e=ei()},m(n,s){i&&i.m(n,s),k(n,e,s),t=!0},p(n,s){n[0]?i?(i.p(n,s),s&1&&C(i,1)):(i=Vv(n),i.c(),C(i,1),i.m(e.parentNode,e)):i&&(ti(),U(i,1,1,()=>{i=null}),ii())},i(n){t||(C(i),t=!0)},o(n){U(i),t=!1},d(n){i&&i.d(n),n&&v(e)}}}h(qv,"create_if_block");function Vv(r){let e,t;return e=new fa({props:{$$slots:{default:[r_]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,n){let s={};n&512&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(Vv,"create_if_block_1");function r_(r){let e,t=r[6].default,i=fi(t,r,r[9],null);return{c(){i&&i.c()},m(n,s){i&&i.m(n,s),e=!0},p(n,s){i&&i.p&&(!e||s&512)&&di(i,t,n,n[9],e?ui(t,n[9],s,null):pi(n[9]),null)},i(n){e||(C(i,n),e=!0)},o(n){U(i,n),e=!1},d(n){i&&i.d(n)}}}h(r_,"create_default_slot");function n_(r){var o;let e,t,i,n;e=new rt({props:{title:(o=r[3].description)==null?void 0:o.join("\n"),inset:!0,$$slots:{default:[i_]},$$scope:{ctx:r}}});let s=r[4].default&&qv(r);return{c(){M(e.$$.fragment),t=$(),s&&s.c(),i=ei()},m(l,a){A(e,l,a),k(l,t,a),s&&s.m(l,a),k(l,i,a),n=!0},p(l,[a]){let c={};a&515&&(c.$$scope={dirty:a,ctx:l}),e.$set(c),l[4].default?s?(s.p(l,a),a&16&&C(s,1)):(s=qv(l),s.c(),C(s,1),s.m(i.parentNode,i)):s&&(ti(),U(s,1,1,()=>{s=null}),ii())},i(l){n||(C(e.$$.fragment,l),C(s),n=!0)},o(l){U(e.$$.fragment,l),U(s),n=!1},d(l){R(e,l),l&&v(t),s&&s.d(l),l&&v(i)}}}h(n_,"create_fragment");function s_(r,e,t){let{$$slots:i={},$$scope:n}=e,s=Ky(i),{option:o}=e,{checked:l=void 0}=e,a=Oi(),c=Object.fromEntries(wr.map(p=>[p.key,p])),f=c[o];function u(p){l=p,t(0,l)}h(u,"checkbox_checked_binding");let d=h(()=>a("change",l!=null?l:!1),"change_handler");return r.$$set=p=>{"option"in p&&t(1,o=p.option),"checked"in p&&t(0,l=p.checked),"$$scope"in p&&t(9,n=p.$$scope)},[l,o,a,f,s,c,i,u,d,n]}h(s_,"instance");var ap=class ap extends se{constructor(e){super(),le(this,e,s_,n_,oe,{option:1,checked:0,optionDefinitionByKey:5})}get optionDefinitionByKey(){return this.$$.ctx[5]}};h(ap,"Option");var lp=ap,me=lp;function o_(r){let e,t,i,n,s,o;return{c(){e=Y("Fields to omit:\n "),t=D("textarea"),i=$(),n=D("p"),n.innerHTML="Space delimited, e.g: <code>id type publisher author</code>",F(t,"name","omitList"),F(t,"class","omit svelte-1t0249j"),F(t,"placeholder","e.g. abstract keywords"),F(t,"spellcheck","false")},m(l,a){k(l,e,a),k(l,t,a),ke(t,r[1]),k(l,i,a),k(l,n,a),s||(o=ve(t,"input",r[9]),s=!0)},p(l,a){a&2&&ke(t,l[1])},d(l){l&&v(e),l&&v(t),l&&v(i),l&&v(n),s=!1,o()}}}h(o_,"create_default_slot_2");function l_(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=Y("Template:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML='<a href="./manual/key-generation.html" target="_blank">Template documentation</a>',F(i,"name","generateKeysTemplate")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[7]),k(a,n,c),k(a,s,c),o||(l=ve(i,"input",r[14]),o=!0)},p(a,c){c&128&&ke(i,a[7])},d(a){a&&v(e),a&&v(n),a&&v(s),o=!1,l()}}}h(l_,"create_default_slot_1");function a_(r){let e,t,i,n,s,o,l,a,c,f,u,d,p,m,y,g,b,x;function w(O){r[10](O)}h(w,"option0_checked_binding");let E={option:"omit",$$slots:{default:[o_]},$$scope:{ctx:r}};r[0]!==void 0&&(E.checked=r[0]),e=new me({props:E}),J.push(()=>K(e,"checked",w));function S(O){r[11](O)}h(S,"option1_checked_binding");let T={option:"stripComments"};r[2]!==void 0&&(T.checked=r[2]),n=new me({props:T}),J.push(()=>K(n,"checked",S));function L(O){r[12](O)}h(L,"option2_checked_binding");let z={option:"tidyComments"};r[3]!==void 0&&(z.checked=r[3]),l=new me({props:z}),J.push(()=>K(l,"checked",L));function j(O){r[13](O)}h(j,"option3_checked_binding");let G={option:"lowercase"};r[4]!==void 0&&(G.checked=r[4]),f=new me({props:G}),J.push(()=>K(f,"checked",j));function N(O){r[15](O)}h(N,"option4_checked_binding");let H={option:"generateKeys",$$slots:{default:[l_]},$$scope:{ctx:r}};r[6]!==void 0&&(H.checked=r[6]),p=new me({props:H}),J.push(()=>K(p,"checked",N));function te(O){r[16](O)}h(te,"option5_checked_binding");let P={option:"trailingCommas"};return r[5]!==void 0&&(P.checked=r[5]),g=new me({props:P}),J.push(()=>K(g,"checked",te)),{c(){M(e.$$.fragment),i=$(),M(n.$$.fragment),o=$(),M(l.$$.fragment),c=$(),M(f.$$.fragment),d=$(),M(p.$$.fragment),y=$(),M(g.$$.fragment)},m(O,ee){A(e,O,ee),k(O,i,ee),A(n,O,ee),k(O,o,ee),A(l,O,ee),k(O,c,ee),A(f,O,ee),k(O,d,ee),A(p,O,ee),k(O,y,ee),A(g,O,ee),x=!0},p(O,ee){let fe={};ee&16777218&&(fe.$$scope={dirty:ee,ctx:O}),!t&&ee&1&&(t=!0,fe.checked=O[0],X(()=>t=!1)),e.$set(fe);let Fe={};!s&&ee&4&&(s=!0,Fe.checked=O[2],X(()=>s=!1)),n.$set(Fe);let Qe={};!a&&ee&8&&(a=!0,Qe.checked=O[3],X(()=>a=!1)),l.$set(Qe);let he={};!u&&ee&16&&(u=!0,he.checked=O[4],X(()=>u=!1)),f.$set(he);let xe={};ee&16777344&&(xe.$$scope={dirty:ee,ctx:O}),!m&&ee&64&&(m=!0,xe.checked=O[6],X(()=>m=!1)),p.$set(xe);let Ue={};!b&&ee&32&&(b=!0,Ue.checked=O[5],X(()=>b=!1)),g.$set(Ue)},i(O){x||(C(e.$$.fragment,O),C(n.$$.fragment,O),C(l.$$.fragment,O),C(f.$$.fragment,O),C(p.$$.fragment,O),C(g.$$.fragment,O),x=!0)},o(O){U(e.$$.fragment,O),U(n.$$.fragment,O),U(l.$$.fragment,O),U(f.$$.fragment,O),U(p.$$.fragment,O),U(g.$$.fragment,O),x=!1},d(O){R(e,O),O&&v(i),R(n,O),O&&v(o),R(l,O),O&&v(c),R(f,O),O&&v(d),R(p,O),O&&v(y),R(g,O)}}}h(a_,"create_default_slot");function h_(r){let e,t;return e=new it({props:{title:"Clean up",open:!0,$$slots:{default:[a_]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,[n]){let s={};n&16777471&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(h_,"create_fragment");function c_(r,e,t){var i,n,s,o,l,a,c;let{options:f}=e,u=f.omit!==void 0&&f.omit.length>0,d=(n=(i=f.omit)===null||i===void 0?void 0:i.join(" "))!==null&&n!==void 0?n:"",p=(s=f.stripComments)!==null&&s!==void 0?s:!1,m=(o=f.tidyComments)!==null&&o!==void 0?o:!1,y=(l=f.lowercase)!==null&&l!==void 0?l:!1,g=(a=f.trailingCommas)!==null&&a!==void 0?a:!1,b=f.generateKeys!==void 0&&f.generateKeys.length>0,x=(c=f.generateKeys)!==null&&c!==void 0?c:"[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]";function w(){d=this.value,t(1,d)}h(w,"textarea_input_handler");function E(N){u=N,t(0,u)}h(E,"option0_checked_binding");function S(N){p=N,t(2,p)}h(S,"option1_checked_binding");function T(N){m=N,t(3,m)}h(T,"option2_checked_binding");function L(N){y=N,t(4,y)}h(L,"option3_checked_binding");function z(){x=this.value,t(7,x)}h(z,"textarea_input_handler_1");function j(N){b=N,t(6,b)}h(j,"option4_checked_binding");function G(N){g=N,t(5,g)}return h(G,"option5_checked_binding"),r.$$set=N=>{"options"in N&&t(8,f=N.options)},r.$$.update=()=>{r.$$.dirty&255&&(t(8,f.omit=u&&d.length>0?d.split(/[\n\t ,]+/):void 0,f),t(8,f.stripComments=p,f),t(8,f.tidyComments=m,f),t(8,f.lowercase=y,f),t(8,f.trailingCommas=g,f),t(8,f.generateKeys=b?x:void 0,f))},[u,d,p,m,y,g,b,x,f,w,E,S,T,L,z,j,G]}h(c_,"instance");var cp=class cp extends se{constructor(e){super(),le(this,e,c_,h_,oe,{options:8})}};h(cp,"CleanupOptions");var hp=cp,zv=hp;function Wv(r){return wr.map(e=>{var t;return(t=e.toCLI)==null?void 0:t.call(e,r[e.key],r)}).filter(e=>typeof e=="string")}h(Wv,"optionsToCLIArgs");function jv(r,e,t){let i=r.slice();return i[2]=e[t][0],i[3]=e[t][1],i}h(jv,"get_each_context");function Hv(r){let e,t,i=r[3]+"",n,s;return{c(){e=Y("="),t=D("span"),n=Y(i),s=$(),F(t,"class","opt-val svelte-1xnx1c1")},m(o,l){k(o,e,l),k(o,t,l),q(t,n),k(o,s,l)},p(o,l){l&1&&i!==(i=o[3]+"")&&qe(n,i)},d(o){o&&v(e),o&&v(t),o&&v(s)}}}h(Hv,"create_if_block");function Yv(r){let e,t=r[2]+"",i,n=" ",s,o=r[3]&&r[3].length>0&&Hv(r);return{c(){e=D("span"),i=Y(t),o&&o.c(),s=Y(n),F(e,"class","opt-name svelte-1xnx1c1")},m(l,a){k(l,e,a),q(e,i),o&&o.m(l,a),k(l,s,a)},p(l,a){a&1&&t!==(t=l[2]+"")&&qe(i,t),l[3]&&l[3].length>0?o?o.p(l,a):(o=Hv(l),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(l){l&&v(e),o&&o.d(l),l&&v(s)}}}h(Yv,"create_each_block");function f_(r){let e,t,i,n,s,o=r[0],l=[];for(let a=0;a<o.length;a+=1)l[a]=Yv(jv(r,o,a));return{c(){e=D("p"),e.textContent="To run this configuration on the command line:",t=$(),i=D("code"),n=Y("bibtex-tidy ");for(let a=0;a<l.length;a+=1)l[a].c();s=Y(" YOUR_FILE.bib"),F(i,"id","cli"),F(i,"class","svelte-1xnx1c1")},m(a,c){k(a,e,c),k(a,t,c),k(a,i,c),q(i,n);for(let f=0;f<l.length;f+=1)l[f]&&l[f].m(i,null);q(i,s)},p(a,c){if(c&1){o=a[0];let f;for(f=0;f<o.length;f+=1){let u=jv(a,o,f);l[f]?l[f].p(u,c):(l[f]=Yv(u),l[f].c(),l[f].m(i,s))}for(;f<l.length;f+=1)l[f].d(1);l.length=o.length}},d(a){a&&v(e),a&&v(t),a&&v(i),xn(l,a)}}}h(f_,"create_default_slot");function u_(r){let e,t;return e=new it({props:{title:"CLI",$$slots:{default:[f_]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,[n]){let s={};n&65&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(u_,"create_fragment");function d_(r,e,t){let{options:i}=e,n;return r.$$set=s=>{"options"in s&&t(1,i=s.options)},r.$$.update=()=>{r.$$.dirty&2&&t(0,n=Wv(i).map(s=>{let o=s.indexOf("=");return o===-1?[s]:[s.slice(0,o),s.slice(o+1)]}))},[n,i]}h(d_,"instance");var up=class up extends se{constructor(e){super(),le(this,e,d_,u_,oe,{options:1})}};h(up,"Cli");var fp=up,Jv=fp;function p_(r){let e,t=!1,i,n,s;return i=t1(r[4][0]),{c(){e=D("input"),F(e,"type","radio"),F(e,"name",r[1]),e.__value=r[2],e.value=e.__value,F(e,"class","svelte-qhlda7"),i.p(e)},m(o,l){k(o,e,l),e.checked=e.__value===r[0],n||(s=ve(e,"change",r[3]),n=!0)},p(o,[l]){l&2&&F(e,"name",o[1]),l&4&&(e.__value=o[2],e.value=e.__value,t=!0),(t||l&1)&&(e.checked=e.__value===o[0])},i:Ce,o:Ce,d(o){o&&v(e),i.r(),n=!1,s()}}}h(p_,"create_fragment");function m_(r,e,t){let{name:i}=e,{group:n}=e,{value:s=void 0}=e,o=[[]];function l(){n=this.__value,t(0,n)}return h(l,"input_change_handler"),r.$$set=a=>{"name"in a&&t(1,i=a.name),"group"in a&&t(0,n=a.group),"value"in a&&t(2,s=a.value)},[n,i,s,l,o]}h(m_,"instance");var pp=class pp extends se{constructor(e){super(),le(this,e,m_,p_,oe,{name:1,group:0,value:2})}};h(pp,"Radio");var dp=pp,Ci=dp;function g_(r){let e,t,i,n;function s(l){r[8](l)}h(s,"checkbox_checked_binding");let o={name:"uniqKEY"};return r[1]!==void 0&&(o.checked=r[1]),e=new ir({props:o}),J.push(()=>K(e,"checked",s)),{c(){M(e.$$.fragment),i=Y("\n Matching Keys")},m(l,a){A(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&2&&(t=!0,c.checked=l[1],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){U(e.$$.fragment,l),n=!1},d(l){R(e,l),l&&v(i)}}}h(g_,"create_default_slot_10");function b_(r){let e,t,i,n;function s(l){r[9](l)}h(s,"checkbox_checked_binding_1");let o={name:"uniqDOI"};return r[2]!==void 0&&(o.checked=r[2]),e=new ir({props:o}),J.push(()=>K(e,"checked",s)),{c(){M(e.$$.fragment),i=Y("\n Matching DOIs")},m(l,a){A(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&4&&(t=!0,c.checked=l[2],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){U(e.$$.fragment,l),n=!1},d(l){R(e,l),l&&v(i)}}}h(b_,"create_default_slot_9");function y_(r){let e,t,i,n;function s(l){r[10](l)}h(s,"checkbox_checked_binding_2");let o={name:"uniqCIT"};return r[3]!==void 0&&(o.checked=r[3]),e=new ir({props:o}),J.push(()=>K(e,"checked",s)),{c(){M(e.$$.fragment),i=Y("\n Similar author and title")},m(l,a){A(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&8&&(t=!0,c.checked=l[3],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){U(e.$$.fragment,l),n=!1},d(l){R(e,l),l&&v(i)}}}h(y_,"create_default_slot_8");function x_(r){let e,t,i,n;function s(l){r[11](l)}h(s,"checkbox_checked_binding_3");let o={name:"uniqABS"};return r[4]!==void 0&&(o.checked=r[4]),e=new ir({props:o}),J.push(()=>K(e,"checked",s)),{c(){M(e.$$.fragment),i=Y("\n Similar abstracts")},m(l,a){A(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&16&&(t=!0,c.checked=l[4],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){U(e.$$.fragment,l),n=!1},d(l){R(e,l),l&&v(i)}}}h(x_,"create_default_slot_7");function v_(r){let e,t,i,n,s,o,l,a,c,f;return i=new rt({props:{$$slots:{default:[g_]},$$scope:{ctx:r}}}),s=new rt({props:{$$slots:{default:[b_]},$$scope:{ctx:r}}}),l=new rt({props:{$$slots:{default:[y_]},$$scope:{ctx:r}}}),c=new rt({props:{$$slots:{default:[x_]},$$scope:{ctx:r}}}),{c(){e=D("p"),e.textContent="What to check:",t=$(),M(i.$$.fragment),n=$(),M(s.$$.fragment),o=$(),M(l.$$.fragment),a=$(),M(c.$$.fragment)},m(u,d){k(u,e,d),k(u,t,d),A(i,u,d),k(u,n,d),A(s,u,d),k(u,o,d),A(l,u,d),k(u,a,d),A(c,u,d),f=!0},p(u,d){let p={};d&134217730&&(p.$$scope={dirty:d,ctx:u}),i.$set(p);let m={};d&134217732&&(m.$$scope={dirty:d,ctx:u}),s.$set(m);let y={};d&134217736&&(y.$$scope={dirty:d,ctx:u}),l.$set(y);let g={};d&134217744&&(g.$$scope={dirty:d,ctx:u}),c.$set(g)},i(u){f||(C(i.$$.fragment,u),C(s.$$.fragment,u),C(l.$$.fragment,u),C(c.$$.fragment,u),f=!0)},o(u){U(i.$$.fragment,u),U(s.$$.fragment,u),U(l.$$.fragment,u),U(c.$$.fragment,u),f=!1},d(u){u&&v(e),u&&v(t),R(i,u),u&&v(n),R(s,u),u&&v(o),R(l,u),u&&v(a),R(c,u)}}}h(v_,"create_default_slot_6");function k_(r){let e,t,i,n,s;function o(a){r[13](a)}h(o,"radio_group_binding");let l={name:"mergeStrategy",value:"combine"};return r[6]!==void 0&&(l.group=r[6]),e=new Ci({props:l}),J.push(()=>K(e,"group",o)),{c(){M(e.$$.fragment),i=$(),n=D("span"),n.innerHTML="<strong>Combine</strong><br/> \n <small>Keep original entry and merge in fields of duplicates if they do not\n already exist</small>"},m(a,c){A(e,a,c),k(a,i,c),k(a,n,c),s=!0},p(a,c){let f={};!t&&c&64&&(t=!0,f.group=a[6],X(()=>t=!1)),e.$set(f)},i(a){s||(C(e.$$.fragment,a),s=!0)},o(a){U(e.$$.fragment,a),s=!1},d(a){R(e,a),a&&v(i),a&&v(n)}}}h(k_,"create_default_slot_5");function S_(r){let e,t,i,n,s;function o(a){r[14](a)}h(o,"radio_group_binding_1");let l={name:"mergeStrategy",value:"overwrite"};return r[6]!==void 0&&(l.group=r[6]),e=new Ci({props:l}),J.push(()=>K(e,"group",o)),{c(){M(e.$$.fragment),i=$(),n=D("span"),n.innerHTML="<strong>Overwrite</strong><br/> \n <small>Keep original entry and merge in fields of duplicates, overwriting\n existing fields if they exist</small>"},m(a,c){A(e,a,c),k(a,i,c),k(a,n,c),s=!0},p(a,c){let f={};!t&&c&64&&(t=!0,f.group=a[6],X(()=>t=!1)),e.$set(f)},i(a){s||(C(e.$$.fragment,a),s=!0)},o(a){U(e.$$.fragment,a),s=!1},d(a){R(e,a),a&&v(i),a&&v(n)}}}h(S_,"create_default_slot_4");function w_(r){let e,t,i,n,s;function o(a){r[15](a)}h(o,"radio_group_binding_2");let l={name:"mergeStrategy",value:"first"};return r[6]!==void 0&&(l.group=r[6]),e=new Ci({props:l}),J.push(()=>K(e,"group",o)),{c(){M(e.$$.fragment),i=$(),n=D("span"),n.innerHTML="<strong>First</strong><br/> \n <small>Only keep the original entry</small>"},m(a,c){A(e,a,c),k(a,i,c),k(a,n,c),s=!0},p(a,c){let f={};!t&&c&64&&(t=!0,f.group=a[6],X(()=>t=!1)),e.$set(f)},i(a){s||(C(e.$$.fragment,a),s=!0)},o(a){U(e.$$.fragment,a),s=!1},d(a){R(e,a),a&&v(i),a&&v(n)}}}h(w_,"create_default_slot_3");function F_(r){let e,t,i,n,s;function o(a){r[16](a)}h(o,"radio_group_binding_3");let l={name:"mergeStrategy",value:"last"};return r[6]!==void 0&&(l.group=r[6]),e=new Ci({props:l}),J.push(()=>K(e,"group",o)),{c(){M(e.$$.fragment),i=$(),n=D("span"),n.innerHTML="<strong>Last</strong><br/> \n <small>Only keep the last found duplicate</small>"},m(a,c){A(e,a,c),k(a,i,c),k(a,n,c),s=!0},p(a,c){let f={};!t&&c&64&&(t=!0,f.group=a[6],X(()=>t=!1)),e.$set(f)},i(a){s||(C(e.$$.fragment,a),s=!0)},o(a){U(e.$$.fragment,a),s=!1},d(a){R(e,a),a&&v(i),a&&v(n)}}}h(F_,"create_default_slot_2");function Q_(r){let e,t,i,n,s,o,l,a;return e=new rt({props:{$$slots:{default:[k_]},$$scope:{ctx:r}}}),i=new rt({props:{$$slots:{default:[S_]},$$scope:{ctx:r}}}),s=new rt({props:{$$slots:{default:[w_]},$$scope:{ctx:r}}}),l=new rt({props:{$$slots:{default:[F_]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment),t=$(),M(i.$$.fragment),n=$(),M(s.$$.fragment),o=$(),M(l.$$.fragment)},m(c,f){A(e,c,f),k(c,t,f),A(i,c,f),k(c,n,f),A(s,c,f),k(c,o,f),A(l,c,f),a=!0},p(c,f){let u={};f&134217792&&(u.$$scope={dirty:f,ctx:c}),e.$set(u);let d={};f&134217792&&(d.$$scope={dirty:f,ctx:c}),i.$set(d);let p={};f&134217792&&(p.$$scope={dirty:f,ctx:c}),s.$set(p);let m={};f&134217792&&(m.$$scope={dirty:f,ctx:c}),l.$set(m)},i(c){a||(C(e.$$.fragment,c),C(i.$$.fragment,c),C(s.$$.fragment,c),C(l.$$.fragment,c),a=!0)},o(c){U(e.$$.fragment,c),U(i.$$.fragment,c),U(s.$$.fragment,c),U(l.$$.fragment,c),a=!1},d(c){R(e,c),c&&v(t),R(i,c),c&&v(n),R(s,c),c&&v(o),R(l,c)}}}h(Q_,"create_default_slot_1");function B_(r){let e,t,i,n,s,o;function l(u){r[12](u)}h(l,"option0_checked_binding");let a={option:"duplicates",$$slots:{default:[v_]},$$scope:{ctx:r}};r[0]!==void 0&&(a.checked=r[0]),e=new me({props:a}),J.push(()=>K(e,"checked",l));function c(u){r[17](u)}h(c,"option1_checked_binding");let f={option:"merge",$$slots:{default:[Q_]},$$scope:{ctx:r}};return r[5]!==void 0&&(f.checked=r[5]),n=new me({props:f}),J.push(()=>K(n,"checked",c)),{c(){M(e.$$.fragment),i=$(),M(n.$$.fragment)},m(u,d){A(e,u,d),k(u,i,d),A(n,u,d),o=!0},p(u,d){let p={};d&134217758&&(p.$$scope={dirty:d,ctx:u}),!t&&d&1&&(t=!0,p.checked=u[0],X(()=>t=!1)),e.$set(p);let m={};d&134217792&&(m.$$scope={dirty:d,ctx:u}),!s&&d&32&&(s=!0,m.checked=u[5],X(()=>s=!1)),n.$set(m)},i(u){o||(C(e.$$.fragment,u),C(n.$$.fragment,u),o=!0)},o(u){U(e.$$.fragment,u),U(n.$$.fragment,u),o=!1},d(u){R(e,u),u&&v(i),R(n,u)}}}h(B_,"create_default_slot");function E_(r){let e,t;return e=new it({props:{title:"Duplicates",open:!0,$$slots:{default:[B_]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,[n]){let s={};n&134217855&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(E_,"create_fragment");function C_(r,e,t){var i,n,s,o,l,a,c,f,u;let{options:d}=e,p=d.duplicates!==void 0,m=(n=(i=d.duplicates)===null||i===void 0?void 0:i.includes("key"))!==null&&n!==void 0?n:!0,y=(o=(s=d.duplicates)===null||s===void 0?void 0:s.includes("doi"))!==null&&o!==void 0?o:!1,g=(a=(l=d.duplicates)===null||l===void 0?void 0:l.includes("citation"))!==null&&a!==void 0?a:!1,b=(f=(c=d.duplicates)===null||c===void 0?void 0:c.includes("abstract"))!==null&&f!==void 0?f:!1,x=d.merge!==void 0,w=(u=d.merge)!==null&&u!==void 0?u:"combine";function E(P){m=P,t(1,m)}h(E,"checkbox_checked_binding");function S(P){y=P,t(2,y)}h(S,"checkbox_checked_binding_1");function T(P){g=P,t(3,g)}h(T,"checkbox_checked_binding_2");function L(P){b=P,t(4,b)}h(L,"checkbox_checked_binding_3");function z(P){p=P,t(0,p)}h(z,"option0_checked_binding");function j(P){w=P,t(6,w)}h(j,"radio_group_binding");function G(P){w=P,t(6,w)}h(G,"radio_group_binding_1");function N(P){w=P,t(6,w)}h(N,"radio_group_binding_2");function H(P){w=P,t(6,w)}h(H,"radio_group_binding_3");function te(P){x=P,t(5,x)}return h(te,"option1_checked_binding"),r.$$set=P=>{"options"in P&&t(7,d=P.options)},r.$$.update=()=>{r.$$.dirty&255&&(p?(t(7,d.duplicates=[],d),m&&d.duplicates.push("key"),y&&d.duplicates.push("doi"),g&&d.duplicates.push("citation"),b&&d.duplicates.push("abstract")):t(7,d.duplicates=void 0,d),t(7,d.merge=x?w:void 0,d))},[p,m,y,g,b,x,w,d,E,S,T,L,z,j,G,N,H,te]}h(C_,"instance");var gp=class gp extends se{constructor(e){super(),le(this,e,C_,E_,oe,{options:7})}};h(gp,"DuplicateOptions");var mp=gp,Gv=mp;function U_(r){let e,t,i,n,s,o;return{c(){e=D("strong"),e.textContent="There's a problem with the bibtex",t=D("br"),i=Y("\n Unknown error: "),n=Y(r[0]),s=D("br"),o=Y("\n This is probably a bug.")},m(l,a){k(l,e,a),k(l,t,a),k(l,i,a),k(l,n,a),k(l,s,a),k(l,o,a)},p(l,a){a&1&&qe(n,l[0])},d(l){l&&v(e),l&&v(t),l&&v(i),l&&v(n),l&&v(s),l&&v(o)}}}h(U_,"create_else_block_1");function L_(r){let e,t,i,n=r[0].name+"",s,o,l=r[0].line+"",a,c,f=r[0].column+"",u,d,p,m;function y(x,w){return x[0].hint?__:O_}h(y,"select_block_type_1");let g=y(r,-1),b=g(r);return{c(){e=D("strong"),e.textContent="There's a problem with the bibtex",t=D("br"),i=$(),s=Y(n),o=Y(" on line "),a=Y(l),c=Y(" column "),u=Y(f),d=D("br"),p=$(),b.c(),m=ei()},m(x,w){k(x,e,w),k(x,t,w),k(x,i,w),k(x,s,w),k(x,o,w),k(x,a,w),k(x,c,w),k(x,u,w),k(x,d,w),k(x,p,w),b.m(x,w),k(x,m,w)},p(x,w){w&1&&n!==(n=x[0].name+"")&&qe(s,n),w&1&&l!==(l=x[0].line+"")&&qe(a,l),w&1&&f!==(f=x[0].column+"")&&qe(u,f),g===(g=y(x,w))&&b?b.p(x,w):(b.d(1),b=g(x),b&&(b.c(),b.m(m.parentNode,m)))},d(x){x&&v(e),x&&v(t),x&&v(i),x&&v(s),x&&v(o),x&&v(a),x&&v(c),x&&v(u),x&&v(d),x&&v(p),b.d(x),x&&v(m)}}}h(L_,"create_if_block");function O_(r){let e,t=JSON.stringify(r[0].char)+"",i,n,s=r[0].node.type+"",o,l;return{c(){e=Y("Unexpected "),i=Y(t),n=Y(" in "),o=Y(s),l=Y(".")},m(a,c){k(a,e,c),k(a,i,c),k(a,n,c),k(a,o,c),k(a,l,c)},p(a,c){c&1&&t!==(t=JSON.stringify(a[0].char)+"")&&qe(i,t),c&1&&s!==(s=a[0].node.type+"")&&qe(o,s)},d(a){a&&v(e),a&&v(i),a&&v(n),a&&v(o),a&&v(l)}}}h(O_,"create_else_block");function __(r){let e=r[0].hint+"",t;return{c(){t=Y(e)},m(i,n){k(i,t,n)},p(i,n){n&1&&e!==(e=i[0].hint+"")&&qe(t,e)},d(i){i&&v(t)}}}h(__,"create_if_block_1");function T_(r){let e,t,i,n,s,o,l;function a(u,d){return u[0]instanceof dt?L_:U_}h(a,"select_block_type");let c=a(r,-1),f=c(r);return{c(){e=D("div"),t=Mt("svg"),i=Mt("circle"),n=Mt("line"),s=Mt("line"),o=$(),l=D("div"),f.c(),F(i,"cx","12"),F(i,"cy","12"),F(i,"r","10"),F(i,"class","svelte-176xcb"),F(n,"x1","12"),F(n,"y1","8"),F(n,"x2","12"),F(n,"y2","12"),F(n,"class","svelte-176xcb"),F(s,"x1","12"),F(s,"y1","16"),F(s,"x2","12.01"),F(s,"y2","16"),F(s,"class","svelte-176xcb"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width","24"),F(t,"height","24"),F(t,"viewBox","0 0 24 24"),F(t,"fill","none"),F(t,"stroke","currentColor"),F(t,"stroke-width","2"),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class","svelte-176xcb"),F(l,"class","text"),F(e,"class","container svelte-176xcb")},m(u,d){k(u,e,d),q(e,t),q(t,i),q(t,n),q(t,s),q(e,o),q(e,l),f.m(l,null)},p(u,[d]){c===(c=a(u,d))&&f?f.p(u,d):(f.d(1),f=c(u),f&&(f.c(),f.m(l,null)))},i:Ce,o:Ce,d(u){u&&v(e),f.d()}}}h(T_,"create_fragment");function D_(r,e,t){let{error:i}=e;return r.$$set=n=>{"error"in n&&t(0,i=n.error)},[i]}h(D_,"instance");var yp=class yp extends se{constructor(e){super(),le(this,e,D_,T_,oe,{error:0})}};h(yp,"FeedbackError");var bp=yp,Xv=bp;function Kv(r,e,t){let i=r.slice();return i[4]=e[t],i}h(Kv,"get_each_context");function Zv(r,e,t){let i=r.slice();return i[7]=e[t],i}h(Zv,"get_each_context_1");function N_(r){let e,t=r[2],i=[];for(let n=0;n<t.length;n+=1)i[n]=ek(Zv(r,t,n));return{c(){e=D("ul");for(let n=0;n<i.length;n+=1)i[n].c()},m(n,s){k(n,e,s);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(n,s){if(s&4){t=n[2];let o;for(o=0;o<t.length;o+=1){let l=Zv(n,t,o);i[o]?i[o].p(l,s):(i[o]=ek(l),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=t.length}},d(n){n&&v(e),xn(i,n)}}}h(N_,"create_if_block_2");function ek(r){let e,t,i=r[7].message+"",n;return{c(){e=D("li"),t=Y("$"),n=Y(i)},m(s,o){k(s,e,o),q(e,t),q(e,n)},p:Ce,d(s){s&&v(e)}}}h(ek,"create_each_block_1");function tk(r){let e;function t(s,o){return s[3].length===0?A_:R_}h(t,"select_block_type");let n=t(r,-1)(r);return{c(){n.c(),e=ei()},m(s,o){n.m(s,o),k(s,e,o)},p(s,o){n.p(s,o)},d(s){n.d(s),s&&v(e)}}}h(tk,"create_if_block");function R_(r){let e,t,i,n=r[3],s=[];for(let o=0;o<n.length;o+=1)s[o]=ik(Kv(r,n,o));return{c(){e=D("strong"),e.textContent="".concat(r[3].length," merged:"),t=$(),i=D("ul");for(let o=0;o<s.length;o+=1)s[o].c();F(e,"class","svelte-yy7yvg")},m(o,l){k(o,e,l),k(o,t,l),k(o,i,l);for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(i,null)},p(o,l){if(l&8){n=o[3];let a;for(a=0;a<n.length;a+=1){let c=Kv(o,n,a);s[a]?s[a].p(c,l):(s[a]=ik(c),s[a].c(),s[a].m(i,null))}for(;a<s.length;a+=1)s[a].d(1);s.length=n.length}},d(o){o&&v(e),o&&v(t),o&&v(i),xn(s,o)}}}h(R_,"create_else_block");function A_(r){let e;return{c(){e=Y("No duplicates")},m(t,i){k(t,e,i)},p:Ce,d(t){t&&v(e)}}}h(A_,"create_if_block_1");function ik(r){let e,t=r[4].message+"",i;return{c(){e=D("li"),i=Y(t)},m(n,s){k(n,e,s),q(e,i)},p:Ce,d(n){n&&v(e)}}}h(ik,"create_each_block");function M_(r){let e,t,i,n,s,o,l,a,c,f,u=r[1].count+"",d,p,m,y=r[2].length>0&&N_(r),g=r[0].merge&&tk(r);return{c(){e=D("div"),t=Mt("svg"),i=Mt("circle"),n=Mt("line"),s=Mt("line"),o=$(),l=D("div"),a=D("strong"),a.textContent="Successful!",c=D("br"),f=Y("\n Tidied "),d=Y(u),p=Y(" entries.\n\n "),y&&y.c(),m=$(),g&&g.c(),F(i,"cx","12"),F(i,"cy","12"),F(i,"r","10"),F(i,"class","svelte-yy7yvg"),F(n,"x1","12"),F(n,"y1","16"),F(n,"x2","12"),F(n,"y2","12"),F(n,"class","svelte-yy7yvg"),F(s,"x1","12"),F(s,"y1","8"),F(s,"x2","12.01"),F(s,"y2","8"),F(s,"class","svelte-yy7yvg"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"width","24"),F(t,"height","24"),F(t,"viewBox","0 0 24 24"),F(t,"fill","none"),F(t,"stroke","currentColor"),F(t,"stroke-width","2"),F(t,"stroke-linecap","round"),F(t,"stroke-linejoin","round"),F(t,"class","feather feather-info svelte-yy7yvg"),F(a,"class","svelte-yy7yvg"),F(l,"class","text"),F(e,"class","container svelte-yy7yvg")},m(b,x){k(b,e,x),q(e,t),q(t,i),q(t,n),q(t,s),q(e,o),q(e,l),q(l,a),q(l,c),q(l,f),q(l,d),q(l,p),y&&y.m(l,null),q(l,m),g&&g.m(l,null)},p(b,[x]){x&2&&u!==(u=b[1].count+"")&&qe(d,u),b[2].length>0&&y.p(b,x),b[0].merge?g?g.p(b,x):(g=tk(b),g.c(),g.m(l,null)):g&&(g.d(1),g=null)},i:Ce,o:Ce,d(b){b&&v(e),y&&y.d(),g&&g.d()}}}h(M_,"create_fragment");function P_(r,e,t){let{options:i}=e,{result:n}=e,s=n.warnings.filter(l=>l.code!=="DUPLICATE_ENTRY"),o=n.warnings.filter(l=>l.code==="DUPLICATE_ENTRY");return r.$$set=l=>{"options"in l&&t(0,i=l.options),"result"in l&&t(1,n=l.result)},[i,n,s,o]}h(P_,"instance");var vp=class vp extends se{constructor(e){super(),le(this,e,P_,M_,oe,{options:0,result:1})}};h(vp,"FeedbackSuccess");var xp=vp,rk=xp;function I_(r){let e,t;return e=new Xv({props:{error:r[1].error}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,n){let s={};n&2&&(s.error=i[1].error),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(I_,"create_else_block");function $_(r){let e,t;return e=new rk({props:{options:r[0],result:r[1].result}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,n){let s={};n&1&&(s.options=i[0]),n&2&&(s.result=i[1].result),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h($_,"create_if_block");function q_(r){let e,t,i,n,s=[$_,I_],o=[];function l(a,c){return a[1].status==="success"?0:1}return h(l,"select_block_type"),t=l(r,-1),i=o[t]=s[t](r),{c(){e=D("div"),i.c(),F(e,"role","alert"),F(e,"class","svelte-1pqmac")},m(a,c){k(a,e,c),o[t].m(e,null),n=!0},p(a,[c]){let f=t;t=l(a,c),t===f?o[t].p(a,c):(ti(),U(o[f],1,1,()=>{o[f]=null}),ii(),i=o[t],i?i.p(a,c):(i=o[t]=s[t](a),i.c()),C(i,1),i.m(e,null))},i(a){n||(C(i),n=!0)},o(a){U(i),n=!1},d(a){a&&v(e),o[t].d()}}}h(q_,"create_fragment");function V_(r,e,t){let{options:i}=e,{status:n}=e;return r.$$set=s=>{"options"in s&&t(0,i=s.options),"status"in s&&t(1,n=s.status)},[i,n]}h(V_,"instance");var Sp=class Sp extends se{constructor(e){super(),le(this,e,V_,q_,oe,{options:0,status:1})}};h(Sp,"Feedback");var kp=Sp,nk=kp;function z_(r){let e,t,i,n;function s(l){r[3](l)}h(s,"radio_group_binding");let o={name:"indent",value:"tabs"};return r[0]!==void 0&&(o.group=r[0]),e=new Ci({props:o}),J.push(()=>K(e,"group",s)),{c(){M(e.$$.fragment),i=Y("\n Indent with tabs")},m(l,a){A(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&1&&(t=!0,c.group=l[0],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){U(e.$$.fragment,l),n=!1},d(l){R(e,l),l&&v(i)}}}h(z_,"create_default_slot_3");function W_(r){let e,t,i,n;function s(l){r[4](l)}h(s,"radio_group_binding_1");let o={name:"indent",value:"spaces"};return r[0]!==void 0&&(o.group=r[0]),e=new Ci({props:o}),J.push(()=>K(e,"group",s)),{c(){M(e.$$.fragment),i=Y("\n Indent with spaces")},m(l,a){A(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&1&&(t=!0,c.group=l[0],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){U(e.$$.fragment,l),n=!1},d(l){R(e,l),l&&v(i)}}}h(W_,"create_default_slot_2");function sk(r){let e,t;return e=new fa({props:{$$slots:{default:[j_]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,n){let s={};n&66&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(sk,"create_if_block");function j_(r){let e,t,i,n,s;return{c(){e=D("label"),t=Y("Spaces: "),i=D("input"),F(i,"name","spaces"),F(i,"type","number")},m(o,l){k(o,e,l),q(e,t),q(e,i),ke(i,r[1]),n||(s=ve(i,"input",r[5]),n=!0)},p(o,l){l&2&&Ut(i.value)!==o[1]&&ke(i,o[1])},d(o){o&&v(e),n=!1,s()}}}h(j_,"create_default_slot_1");function H_(r){let e,t,i,n,s,o;e=new rt({props:{title:"Indent fields with tabs",$$slots:{default:[z_]},$$scope:{ctx:r}}}),i=new rt({props:{title:"Indent fields with spaces",$$slots:{default:[W_]},$$scope:{ctx:r}}});let l=r[0]==="spaces"&&sk(r);return{c(){M(e.$$.fragment),t=$(),M(i.$$.fragment),n=$(),l&&l.c(),s=ei()},m(a,c){A(e,a,c),k(a,t,c),A(i,a,c),k(a,n,c),l&&l.m(a,c),k(a,s,c),o=!0},p(a,c){let f={};c&65&&(f.$$scope={dirty:c,ctx:a}),e.$set(f);let u={};c&65&&(u.$$scope={dirty:c,ctx:a}),i.$set(u),a[0]==="spaces"?l?(l.p(a,c),c&1&&C(l,1)):(l=sk(a),l.c(),C(l,1),l.m(s.parentNode,s)):l&&(ti(),U(l,1,1,()=>{l=null}),ii())},i(a){o||(C(e.$$.fragment,a),C(i.$$.fragment,a),C(l),o=!0)},o(a){U(e.$$.fragment,a),U(i.$$.fragment,a),U(l),o=!1},d(a){R(e,a),a&&v(t),R(i,a),a&&v(n),l&&l.d(a),a&&v(s)}}}h(H_,"create_default_slot");function Y_(r){let e,t;return e=new it({props:{title:"Indent",open:!0,$$slots:{default:[H_]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,[n]){let s={};n&67&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(Y_,"create_fragment");function J_(r,e,t){let{options:i}=e,n=i.tab?"tabs":"spaces",s=i.space;function o(c){n=c,t(0,n)}h(o,"radio_group_binding");function l(c){n=c,t(0,n)}h(l,"radio_group_binding_1");function a(){s=Ut(this.value),t(1,s)}return h(a,"input_input_handler"),r.$$set=c=>{"options"in c&&t(2,i=c.options)},r.$$.update=()=>{r.$$.dirty&3&&(t(2,i.space=s,i),t(2,i.tab=n==="tabs",i))},[n,s,i,o,l,a]}h(J_,"instance");var Fp=class Fp extends se{constructor(e){super(),le(this,e,J_,Y_,oe,{options:2})}};h(Fp,"IndentOptions");var wp=Fp,ok=wp;function G_(r){let e,t,i,n,s,o,l,a,c;return{c(){e=D("label"),t=Y("Fields to sort by:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML="Space delimited, e.g: <code>key type publisher author</code>. For\n descending order, prefix the field name with a dash, e.g.\n <code>-year author</code>.",o=$(),l=D("p"),l.innerHTML="In addition to field names, you can use <code>key</code> to sort by\n citation key,\n <code>type</code> to sort by entry type (@article, @misc, etc), and\n <code>special</code> to sort special entries (@string, @preamble, @xdata, and\n @set) to the top.",F(i,"name","sortList"),F(i,"spellcheck","false")},m(f,u){k(f,e,u),q(e,t),q(e,i),ke(i,r[3]),k(f,n,u),k(f,s,u),k(f,o,u),k(f,l,u),a||(c=ve(i,"input",r[5]),a=!0)},p(f,u){u&8&&ke(i,f[3])},d(f){f&&v(e),f&&v(n),f&&v(s),f&&v(o),f&&v(l),a=!1,c()}}}h(G_,"create_default_slot_2");function X_(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=Y("Field order:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML="Space delimited, e.g: <code>title author year</code>",F(i,"name","sortFieldList"),F(i,"spellcheck","false")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[1]),k(a,n,c),k(a,s,c),o||(l=ve(i,"input",r[7]),o=!0)},p(a,c){c&2&&ke(i,a[1])},d(a){a&&v(e),a&&v(n),a&&v(s),o=!1,l()}}}h(X_,"create_default_slot_1");function K_(r){let e,t,i,n,s,o;function l(u){r[6](u)}h(l,"option0_checked_binding");let a={option:"sort",$$slots:{default:[G_]},$$scope:{ctx:r}};r[2]!==void 0&&(a.checked=r[2]),e=new me({props:a}),J.push(()=>K(e,"checked",l));function c(u){r[8](u)}h(c,"option1_checked_binding");let f={option:"sortFields",$$slots:{default:[X_]},$$scope:{ctx:r}};return r[0]!==void 0&&(f.checked=r[0]),n=new me({props:f}),J.push(()=>K(n,"checked",c)),{c(){M(e.$$.fragment),i=$(),M(n.$$.fragment)},m(u,d){A(e,u,d),k(u,i,d),A(n,u,d),o=!0},p(u,d){let p={};d&2056&&(p.$$scope={dirty:d,ctx:u}),!t&&d&4&&(t=!0,p.checked=u[2],X(()=>t=!1)),e.$set(p);let m={};d&2050&&(m.$$scope={dirty:d,ctx:u}),!s&&d&1&&(s=!0,m.checked=u[0],X(()=>s=!1)),n.$set(m)},i(u){o||(C(e.$$.fragment,u),C(n.$$.fragment,u),o=!0)},o(u){U(e.$$.fragment,u),U(n.$$.fragment,u),o=!1},d(u){R(e,u),u&&v(i),R(n,u)}}}h(K_,"create_default_slot");function Z_(r){let e,t;return e=new it({props:{title:"Sorting",open:!0,$$slots:{default:[K_]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,[n]){let s={};n&2063&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(Z_,"create_fragment");function eT(r,e,t){var i,n;let{options:s}=e,o=s.sortFields!==void 0&&s.sortFields.length>0,l=((i=s.sortFields)!==null&&i!==void 0?i:yo).join(" "),a=s.sort!==void 0&&s.sort.length>0,c=((n=s.sort)!==null&&n!==void 0?n:Gh).join(" ");function f(){c=this.value,t(3,c)}h(f,"textarea_input_handler");function u(m){a=m,t(2,a)}h(u,"option0_checked_binding");function d(){l=this.value,t(1,l)}h(d,"textarea_input_handler_1");function p(m){o=m,t(0,o)}return h(p,"option1_checked_binding"),r.$$set=m=>{"options"in m&&t(4,s=m.options)},r.$$.update=()=>{r.$$.dirty&15&&(t(4,s.sortFields=o&&l.length>0?l.split(/[\n\t ,]+/):void 0,s),t(4,s.sort=a&&c.length>0?c.split(/[\n\t ,]+/):void 0,s))},[o,l,a,c,s,f,u,d,p]}h(eT,"instance");var Bp=class Bp extends se{constructor(e){super(),le(this,e,eT,Z_,oe,{options:4})}};h(Bp,"SortingOptions");var Qp=Bp,lk=Qp;function tT(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=Y("Fields to enclose in double braces:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML="Space delimited, e.g: <code>title journal</code>.",F(i,"name","enclosingBracesList"),F(i,"spellcheck","false")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[12]),k(a,n,c),k(a,s,c),o||(l=ve(i,"input",r[17]),o=!0)},p(a,c){c[0]&4096&&ke(i,a[12])},d(a){a&&v(e),a&&v(n),a&&v(s),o=!1,l()}}}h(tT,"create_default_slot_3");function iT(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=Y("Remove braces from values of these fields:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML="Space delimited, e.g: <code>title journal</code>.",F(i,"name","removeBracesList"),F(i,"spellcheck","false")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[14]),k(a,n,c),k(a,s,c),o||(l=ve(i,"input",r[19]),o=!0)},p(a,c){c[0]&16384&&ke(i,a[14])},d(a){a&&v(e),a&&v(n),a&&v(s),o=!1,l()}}}h(iT,"create_default_slot_2");function rT(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=Y("Maximum number of authors:\n "),i=D("input"),n=$(),s=D("p"),s.textContent='Author lists longer than this will be truncated to "and others".',F(i,"name","maxAuthorsNum"),F(i,"type","number")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[10]),k(a,n,c),k(a,s,c),o||(l=ve(i,"input",r[29]),o=!0)},p(a,c){c[0]&1024&&Ut(i.value)!==a[10]&&ke(i,a[10])},d(a){a&&v(e),a&&v(n),a&&v(s),o=!1,l()}}}h(rT,"create_default_slot_1");function nT(r){let e,t,i,n,s,o,l,a,c,f,u,d,p,m,y,g,b,x,w,E,S,T,L,z,j,G,N,H,te,P,O,ee,fe,Fe,Qe,he,xe,Ue;function Je(B){r[16](B)}h(Je,"option0_checked_binding");let nt={option:"curly"};r[0]!==void 0&&(nt.checked=r[0]),i=new me({props:nt}),J.push(()=>K(i,"checked",Je));function wt(B){r[18](B)}h(wt,"option1_checked_binding");let Gt={option:"enclosingBraces",$$slots:{default:[tT]},$$scope:{ctx:r}};r[11]!==void 0&&(Gt.checked=r[11]),o=new me({props:Gt}),J.push(()=>K(o,"checked",wt));function rr(B){r[20](B)}h(rr,"option2_checked_binding");let Ee={option:"removeBraces",$$slots:{default:[iT]},$$scope:{ctx:r}};r[13]!==void 0&&(Ee.checked=r[13]),c=new me({props:Ee}),J.push(()=>K(c,"checked",rr));function re(B){r[21](B)}h(re,"option3_checked_binding");let De={option:"stripEnclosingBraces"};r[1]!==void 0&&(De.checked=r[1]),d=new me({props:De}),J.push(()=>K(d,"checked",re));function nr(B){r[22](B)}h(nr,"option4_checked_binding");let ue={option:"numeric"};r[2]!==void 0&&(ue.checked=r[2]),y=new me({props:ue}),J.push(()=>K(y,"checked",nr));function ws(B){r[23](B)}h(ws,"option5_checked_binding");let tn={option:"months"};r[3]!==void 0&&(tn.checked=r[3]),x=new me({props:tn}),J.push(()=>K(x,"checked",ws));function Fs(B){r[24](B)}h(Fs,"option6_checked_binding");let rn={option:"dropAllCaps"};r[4]!==void 0&&(rn.checked=r[4]),S=new me({props:rn}),J.push(()=>K(S,"checked",Fs));function Qs(B){r[25](B)}h(Qs,"option7_checked_binding");let Np={option:"escape"};r[5]!==void 0&&(Np.checked=r[5]),z=new me({props:Np}),J.push(()=>K(z,"checked",Qs));function pk(B){r[26](B)}h(pk,"option8_checked_binding");let Rp={option:"encodeUrls"};r[6]!==void 0&&(Rp.checked=r[6]),N=new me({props:Rp}),J.push(()=>K(N,"checked",pk));function mk(B){r[27](B)}h(mk,"option9_checked_binding");let Ap={option:"removeEmptyFields"};r[7]!==void 0&&(Ap.checked=r[7]),P=new me({props:Ap}),J.push(()=>K(P,"checked",mk));function gk(B){r[28](B)}h(gk,"option10_checked_binding");let Mp={option:"removeDuplicateFields"};r[8]!==void 0&&(Mp.checked=r[8]),fe=new me({props:Mp}),J.push(()=>K(fe,"checked",gk));function bk(B){r[30](B)}h(bk,"option11_checked_binding");let Pp={option:"maxAuthors",$$slots:{default:[rT]},$$scope:{ctx:r}};return r[9]!==void 0&&(Pp.checked=r[9]),he=new me({props:Pp}),J.push(()=>K(he,"checked",bk)),{c(){e=D("div"),t=$(),M(i.$$.fragment),s=$(),M(o.$$.fragment),a=$(),M(c.$$.fragment),u=$(),M(d.$$.fragment),m=$(),M(y.$$.fragment),b=$(),M(x.$$.fragment),E=$(),M(S.$$.fragment),L=$(),M(z.$$.fragment),G=$(),M(N.$$.fragment),te=$(),M(P.$$.fragment),ee=$(),M(fe.$$.fragment),Qe=$(),M(he.$$.fragment),F(e,"id","valueOptions")},m(B,ne){k(B,e,ne),k(B,t,ne),A(i,B,ne),k(B,s,ne),A(o,B,ne),k(B,a,ne),A(c,B,ne),k(B,u,ne),A(d,B,ne),k(B,m,ne),A(y,B,ne),k(B,b,ne),A(x,B,ne),k(B,E,ne),A(S,B,ne),k(B,L,ne),A(z,B,ne),k(B,G,ne),A(N,B,ne),k(B,te,ne),A(P,B,ne),k(B,ee,ne),A(fe,B,ne),k(B,Qe,ne),A(he,B,ne),Ue=!0},p(B,ne){let Ip={};!n&&ne[0]&1&&(n=!0,Ip.checked=B[0],X(()=>n=!1)),i.$set(Ip);let ua={};ne[0]&4096|ne[1]&16384&&(ua.$$scope={dirty:ne,ctx:B}),!l&&ne[0]&2048&&(l=!0,ua.checked=B[11],X(()=>l=!1)),o.$set(ua);let da={};ne[0]&16384|ne[1]&16384&&(da.$$scope={dirty:ne,ctx:B}),!f&&ne[0]&8192&&(f=!0,da.checked=B[13],X(()=>f=!1)),c.$set(da);let $p={};!p&&ne[0]&2&&(p=!0,$p.checked=B[1],X(()=>p=!1)),d.$set($p);let qp={};!g&&ne[0]&4&&(g=!0,qp.checked=B[2],X(()=>g=!1)),y.$set(qp);let Vp={};!w&&ne[0]&8&&(w=!0,Vp.checked=B[3],X(()=>w=!1)),x.$set(Vp);let zp={};!T&&ne[0]&16&&(T=!0,zp.checked=B[4],X(()=>T=!1)),S.$set(zp);let Wp={};!j&&ne[0]&32&&(j=!0,Wp.checked=B[5],X(()=>j=!1)),z.$set(Wp);let jp={};!H&&ne[0]&64&&(H=!0,jp.checked=B[6],X(()=>H=!1)),N.$set(jp);let Hp={};!O&&ne[0]&128&&(O=!0,Hp.checked=B[7],X(()=>O=!1)),P.$set(Hp);let Yp={};!Fe&&ne[0]&256&&(Fe=!0,Yp.checked=B[8],X(()=>Fe=!1)),fe.$set(Yp);let pa={};ne[0]&1024|ne[1]&16384&&(pa.$$scope={dirty:ne,ctx:B}),!xe&&ne[0]&512&&(xe=!0,pa.checked=B[9],X(()=>xe=!1)),he.$set(pa)},i(B){Ue||(C(i.$$.fragment,B),C(o.$$.fragment,B),C(c.$$.fragment,B),C(d.$$.fragment,B),C(y.$$.fragment,B),C(x.$$.fragment,B),C(S.$$.fragment,B),C(z.$$.fragment,B),C(N.$$.fragment,B),C(P.$$.fragment,B),C(fe.$$.fragment,B),C(he.$$.fragment,B),Ue=!0)},o(B){U(i.$$.fragment,B),U(o.$$.fragment,B),U(c.$$.fragment,B),U(d.$$.fragment,B),U(y.$$.fragment,B),U(x.$$.fragment,B),U(S.$$.fragment,B),U(z.$$.fragment,B),U(N.$$.fragment,B),U(P.$$.fragment,B),U(fe.$$.fragment,B),U(he.$$.fragment,B),Ue=!1},d(B){B&&v(e),B&&v(t),R(i,B),B&&v(s),R(o,B),B&&v(a),R(c,B),B&&v(u),R(d,B),B&&v(m),R(y,B),B&&v(b),R(x,B),B&&v(E),R(S,B),B&&v(L),R(z,B),B&&v(G),R(N,B),B&&v(te),R(P,B),B&&v(ee),R(fe,B),B&&v(Qe),R(he,B)}}}h(nT,"create_default_slot");function sT(r){let e,t;return e=new it({props:{open:!0,title:"Values",$$slots:{default:[nT]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,n){let s={};n[0]&32767|n[1]&16384&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(sT,"create_fragment");function oT(r,e,t){var i,n,s,o,l,a,c,f,u,d,p,m,y,g;let{options:b}=e,x=(i=b.curly)!==null&&i!==void 0?i:!1,w=(n=b.stripEnclosingBraces)!==null&&n!==void 0?n:!1,E=(s=b.numeric)!==null&&s!==void 0?s:!1,S=(o=b.months)!==null&&o!==void 0?o:!1,T=(l=b.dropAllCaps)!==null&&l!==void 0?l:!1,L=(a=b.escape)!==null&&a!==void 0?a:!1,z=(c=b.encodeUrls)!==null&&c!==void 0?c:!1,j=(f=b.removeEmptyFields)!==null&&f!==void 0?f:!1,G=(u=b.removeDuplicateFields)!==null&&u!==void 0?u:!1,N=b.maxAuthors!==void 0,H=(d=b.maxAuthors)!==null&&d!==void 0?d:3,te=b.enclosingBraces!==void 0&&b.enclosingBraces.length>0,P=(m=(p=b.enclosingBraces)===null||p===void 0?void 0:p.join(" "))!==null&&m!==void 0?m:"title",O=b.removeBraces!==void 0&&b.removeBraces.length>0,ee=(g=(y=b.enclosingBraces)===null||y===void 0?void 0:y.join(" "))!==null&&g!==void 0?g:"title";function fe(ue){x=ue,t(0,x)}h(fe,"option0_checked_binding");function Fe(){P=this.value,t(12,P)}h(Fe,"textarea_input_handler");function Qe(ue){te=ue,t(11,te)}h(Qe,"option1_checked_binding");function he(){ee=this.value,t(14,ee)}h(he,"textarea_input_handler_1");function xe(ue){O=ue,t(13,O)}h(xe,"option2_checked_binding");function Ue(ue){w=ue,t(1,w)}h(Ue,"option3_checked_binding");function Je(ue){E=ue,t(2,E)}h(Je,"option4_checked_binding");function nt(ue){S=ue,t(3,S)}h(nt,"option5_checked_binding");function wt(ue){T=ue,t(4,T)}h(wt,"option6_checked_binding");function Gt(ue){L=ue,t(5,L)}h(Gt,"option7_checked_binding");function rr(ue){z=ue,t(6,z)}h(rr,"option8_checked_binding");function Ee(ue){j=ue,t(7,j)}h(Ee,"option9_checked_binding");function re(ue){G=ue,t(8,G)}h(re,"option10_checked_binding");function De(){H=Ut(this.value),t(10,H)}h(De,"input_input_handler");function nr(ue){N=ue,t(9,N)}return h(nr,"option11_checked_binding"),r.$$set=ue=>{"options"in ue&&t(15,b=ue.options)},r.$$.update=()=>{r.$$.dirty[0]&32767&&(t(15,b.curly=x,b),t(15,b.stripEnclosingBraces=w,b),t(15,b.numeric=E,b),t(15,b.months=S,b),t(15,b.dropAllCaps=T,b),t(15,b.escape=L,b),t(15,b.encodeUrls=z,b),t(15,b.removeEmptyFields=j,b),t(15,b.removeDuplicateFields=G,b),t(15,b.maxAuthors=N?H:void 0,b),t(15,b.enclosingBraces=te&&P.length>0?P.split(/[\n\t ,]+/):void 0,b),t(15,b.removeBraces=O&&ee.length>0?ee.split(/[\n\t ,]+/):void 0,b))},[x,w,E,S,T,L,z,j,G,N,H,te,P,O,ee,b,fe,Fe,Qe,he,xe,Ue,Je,nt,wt,Gt,rr,Ee,re,De,nr]}h(oT,"instance");var Cp=class Cp extends se{constructor(e){super(),le(this,e,oT,sT,oe,{options:15},null,[-1,-1])}};h(Cp,"ValueOptions");var Ep=Cp,ak=Ep;function aT(r){let e,t,i,n,s;return{c(){e=D("label"),t=Y("Column:\n "),i=D("input"),F(i,"name","alignnum"),F(i,"type","number")},m(o,l){k(o,e,l),q(e,t),q(e,i),ke(i,r[2]),n||(s=ve(i,"input",r[5]),n=!0)},p(o,l){l&4&&Ut(i.value)!==o[2]&&ke(i,o[2])},d(o){o&&v(e),n=!1,s()}}}h(aT,"create_default_slot_2");function hT(r){let e,t,i,n,s;return{c(){e=D("label"),t=Y("Column:\n "),i=D("input"),F(i,"name","wrapnum"),F(i,"type","number")},m(o,l){k(o,e,l),q(e,t),q(e,i),ke(i,r[4]),n||(s=ve(i,"input",r[7]),n=!0)},p(o,l){l&16&&Ut(i.value)!==o[4]&&ke(i,o[4])},d(o){o&&v(e),n=!1,s()}}}h(hT,"create_default_slot_1");function cT(r){let e,t,i,n,s,o,l,a,c;function f(g){r[6](g)}h(f,"option0_checked_binding");let u={option:"align",$$slots:{default:[aT]},$$scope:{ctx:r}};r[1]!==void 0&&(u.checked=r[1]),e=new me({props:u}),J.push(()=>K(e,"checked",f));function d(g){r[8](g)}h(d,"option1_checked_binding");let p={option:"wrap",$$slots:{default:[hT]},$$scope:{ctx:r}};r[3]!==void 0&&(p.checked=r[3]),n=new me({props:p}),J.push(()=>K(n,"checked",d));function m(g){r[9](g)}h(m,"option2_checked_binding");let y={option:"blankLines"};return r[0].blankLines!==void 0&&(y.checked=r[0].blankLines),l=new me({props:y}),J.push(()=>K(l,"checked",m)),{c(){M(e.$$.fragment),i=$(),M(n.$$.fragment),o=$(),M(l.$$.fragment)},m(g,b){A(e,g,b),k(g,i,b),A(n,g,b),k(g,o,b),A(l,g,b),c=!0},p(g,b){let x={};b&2052&&(x.$$scope={dirty:b,ctx:g}),!t&&b&2&&(t=!0,x.checked=g[1],X(()=>t=!1)),e.$set(x);let w={};b&2064&&(w.$$scope={dirty:b,ctx:g}),!s&&b&8&&(s=!0,w.checked=g[3],X(()=>s=!1)),n.$set(w);let E={};!a&&b&1&&(a=!0,E.checked=g[0].blankLines,X(()=>a=!1)),l.$set(E)},i(g){c||(C(e.$$.fragment,g),C(n.$$.fragment,g),C(l.$$.fragment,g),c=!0)},o(g){U(e.$$.fragment,g),U(n.$$.fragment,g),U(l.$$.fragment,g),c=!1},d(g){R(e,g),g&&v(i),R(n,g),g&&v(o),R(l,g)}}}h(cT,"create_default_slot");function fT(r){let e,t;return e=new it({props:{title:"Whitespace",open:!0,$$slots:{default:[cT]},$$scope:{ctx:r}}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,[n]){let s={};n&2079&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(fT,"create_fragment");function uT(r,e,t){var i;let{options:n}=e,s=n.align>1,o=s?n.align:13,l=n.wrap!==void 0,a=(i=n.wrap)!==null&&i!==void 0?i:80;function c(){o=Ut(this.value),t(2,o)}h(c,"input_input_handler");function f(m){s=m,t(1,s)}h(f,"option0_checked_binding");function u(){a=Ut(this.value),t(4,a)}h(u,"input_input_handler_1");function d(m){l=m,t(3,l)}h(d,"option1_checked_binding");function p(m){r.$$.not_equal(n.blankLines,m)&&(n.blankLines=m,t(0,n),t(1,s),t(2,o),t(3,l),t(4,a))}return h(p,"option2_checked_binding"),r.$$set=m=>{"options"in m&&t(0,n=m.options)},r.$$.update=()=>{r.$$.dirty&30&&(t(0,n.align=s?o:1,n),t(0,n.wrap=l?a:void 0,n))},[n,s,o,l,a,c,f,u,d,p]}h(uT,"instance");var Lp=class Lp extends se{constructor(e){super(),le(this,e,uT,fT,oe,{options:0})}};h(Lp,"WhitespaceOptions");var Up=Lp,hk=Up;function ck(r){let e,t;return e=new nk({props:{options:r[0],status:r[1]}}),{c(){M(e.$$.fragment)},m(i,n){A(e,i,n),t=!0},p(i,n){let s={};n&1&&(s.options=i[0]),n&2&&(s.status=i[1]),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){U(e.$$.fragment,i),t=!1},d(i){R(e,i)}}}h(ck,"create_if_block");function dT(r){let e,t,i,n,s,o,l,a,c,f,u,d,p,m,y,g,b,x,w,E,S,T,L,z,j,G,N,H,te,P,O;function ee(re){r[4](re)}h(ee,"indentoptions_options_binding");let fe={};r[0]!==void 0&&(fe.options=r[0]),s=new ok({props:fe}),J.push(()=>K(s,"options",ee));function Fe(re){r[5](re)}h(Fe,"whitespaceoptions_options_binding");let Qe={};r[0]!==void 0&&(Qe.options=r[0]),a=new hk({props:Qe}),J.push(()=>K(a,"options",Fe));function he(re){r[6](re)}h(he,"valueoptions_options_binding");let xe={};r[0]!==void 0&&(xe.options=r[0]),u=new ak({props:xe}),J.push(()=>K(u,"options",he));function Ue(re){r[7](re)}h(Ue,"sortingoptions_options_binding");let Je={};r[0]!==void 0&&(Je.options=r[0]),m=new lk({props:Je}),J.push(()=>K(m,"options",Ue));function nt(re){r[8](re)}h(nt,"duplicateoptions_options_binding");let wt={};r[0]!==void 0&&(wt.options=r[0]),b=new Gv({props:wt}),J.push(()=>K(b,"options",nt));function Gt(re){r[9](re)}h(Gt,"cleanupoptions_options_binding");let rr={};r[0]!==void 0&&(rr.options=r[0]),E=new zv({props:rr}),J.push(()=>K(E,"options",Gt)),L=new Jv({props:{options:r[0]}});let Ee=r[1]&&ck(r);return{c(){e=D("aside"),t=D("form"),i=D("header"),i.innerHTML='<h1 class="svelte-kvjsp8">BibTeX Tidy</h1> \n <p>This tool tidies bibtex files by fixing inconsistent whitespace,\n removing duplicates, removing unwanted fields, and sorting entries.</p> \n <p><a class="btn" href="https://github.com/FlamingTempura/bibtex-tidy">Github</a> \n <a class="btn" href="https://github.com/FlamingTempura/bibtex-tidy/issues">Report a bug</a></p>',n=$(),M(s.$$.fragment),l=$(),M(a.$$.fragment),f=$(),M(u.$$.fragment),p=$(),M(m.$$.fragment),g=$(),M(b.$$.fragment),w=$(),M(E.$$.fragment),T=$(),M(L.$$.fragment),z=$(),j=D("div"),Ee&&Ee.c(),G=$(),N=D("button"),H=Y("Tidy"),F(i,"class","intro svelte-kvjsp8"),F(t,"class","svelte-kvjsp8"),F(N,"id","tidy"),N.disabled=r[2],F(N,"class","svelte-kvjsp8"),F(j,"class","run svelte-kvjsp8"),F(e,"id","sidebar"),F(e,"class","svelte-kvjsp8")},m(re,De){k(re,e,De),q(e,t),q(t,i),q(t,n),A(s,t,null),q(t,l),A(a,t,null),q(t,f),A(u,t,null),q(t,p),A(m,t,null),q(t,g),A(b,t,null),q(t,w),A(E,t,null),q(t,T),A(L,t,null),q(e,z),q(e,j),Ee&&Ee.m(j,null),q(j,G),q(j,N),q(N,H),te=!0,P||(O=[ve(t,"submit",pT),ve(N,"click",r[10])],P=!0)},p(re,[De]){let nr={};!o&&De&1&&(o=!0,nr.options=re[0],X(()=>o=!1)),s.$set(nr);let ue={};!c&&De&1&&(c=!0,ue.options=re[0],X(()=>c=!1)),a.$set(ue);let ws={};!d&&De&1&&(d=!0,ws.options=re[0],X(()=>d=!1)),u.$set(ws);let tn={};!y&&De&1&&(y=!0,tn.options=re[0],X(()=>y=!1)),m.$set(tn);let Fs={};!x&&De&1&&(x=!0,Fs.options=re[0],X(()=>x=!1)),b.$set(Fs);let rn={};!S&&De&1&&(S=!0,rn.options=re[0],X(()=>S=!1)),E.$set(rn);let Qs={};De&1&&(Qs.options=re[0]),L.$set(Qs),re[1]?Ee?(Ee.p(re,De),De&2&&C(Ee,1)):(Ee=ck(re),Ee.c(),C(Ee,1),Ee.m(j,G)):Ee&&(ti(),U(Ee,1,1,()=>{Ee=null}),ii()),(!te||De&4)&&(N.disabled=re[2])},i(re){te||(C(s.$$.fragment,re),C(a.$$.fragment,re),C(u.$$.fragment,re),C(m.$$.fragment,re),C(b.$$.fragment,re),C(E.$$.fragment,re),C(L.$$.fragment,re),C(Ee),te=!0)},o(re){U(s.$$.fragment,re),U(a.$$.fragment,re),U(u.$$.fragment,re),U(m.$$.fragment,re),U(b.$$.fragment,re),U(E.$$.fragment,re),U(L.$$.fragment,re),U(Ee),te=!1},d(re){re&&v(e),R(s),R(a),R(u),R(m),R(b),R(E),R(L),Ee&&Ee.d(),P=!1,At(O)}}}h(dT,"create_fragment");var pT=h(()=>!1,"submit_handler");function mT(r,e,t){let{status:i}=e,{running:n}=e,{options:s}=e,o=Oi();function l(m){s=m,t(0,s)}h(l,"indentoptions_options_binding");function a(m){s=m,t(0,s)}h(a,"whitespaceoptions_options_binding");function c(m){s=m,t(0,s)}h(c,"valueoptions_options_binding");function f(m){s=m,t(0,s)}h(f,"sortingoptions_options_binding");function u(m){s=m,t(0,s)}h(u,"duplicateoptions_options_binding");function d(m){s=m,t(0,s)}h(d,"cleanupoptions_options_binding");let p=h(()=>o("tidy"),"click_handler");return r.$$set=m=>{"status"in m&&t(1,i=m.status),"running"in m&&t(2,n=m.running),"options"in m&&t(0,s=m.options)},[s,i,n,o,l,a,c,f,u,d,p]}h(mT,"instance");var _p=class _p extends se{constructor(e){super(),le(this,e,mT,dT,oe,{status:1,running:2,options:0})}};h(_p,"Sidebar");var Op=_p,fk=Op;var uk='Click Tidy to clean up the entries below \n@Book{sweig42,\n Author = { Stefa{n} Sweig },\n title = { The impossible book },\n publisher = { Dead Poet Society},\n year = 1942,\n month = mar\n}\n@article{steward03,\n author = {Martha Steward},\n title = {Cooking behind bars}, publisher = "Culinary Expert Series",\n year = {2003}\n}\n@Book{impossible,\n Author = { Stefan Sweig },\n title = { The impossible book },\n publisher = { Dead Poet Society},\n year = 1942,\n month = mar\n}\n';function gT(r){let e,t,i,n,s,o;function l(u){r[6](u)}h(l,"editor_bibtex_binding");let a={error:r[4]};r[2]!==void 0&&(a.bibtex=r[2]),e=new $v({props:a}),J.push(()=>K(e,"bibtex",l));function c(u){r[7](u)}h(c,"sidebar_options_binding");let f={status:r[3],running:r[1]};return r[0]!==void 0&&(f.options=r[0]),n=new fk({props:f}),J.push(()=>K(n,"options",c)),n.$on("tidy",r[5]),{c(){M(e.$$.fragment),i=$(),M(n.$$.fragment)},m(u,d){A(e,u,d),k(u,i,d),A(n,u,d),o=!0},p(u,[d]){let p={};d&16&&(p.error=u[4]),!t&&d&4&&(t=!0,p.bibtex=u[2],X(()=>t=!1)),e.$set(p);let m={};d&8&&(m.status=u[3]),d&2&&(m.running=u[1]),!s&&d&1&&(s=!0,m.options=u[0],X(()=>s=!1)),n.$set(m)},i(u){o||(C(e.$$.fragment,u),C(n.$$.fragment,u),o=!0)},o(u){U(e.$$.fragment,u),U(n.$$.fragment,u),o=!1},d(u){R(e,u),u&&v(i),R(n,u)}}}h(gT,"create_fragment");function bT(r,e,t){var i;let n=Ti({tab:!0,align:13,curly:!0,numeric:!0,escape:!1,duplicates:["key"],sortFields:!0,removeDuplicateFields:!1}),s=!1,o=uk,l=(i=u())!==null&&i!==void 0?i:n,a,c;function f(){t(1,s=!0),t(3,a=void 0),t(4,c=void 0),setTimeout(()=>{try{let m=Sc(o,l);t(2,o=m.bibtex),t(3,a={status:"success",result:m})}catch(m){console.error("bibtex parse problem:",m),t(3,a={status:"error",error:m}),m instanceof dt&&t(4,c=m)}finally{t(1,s=!1)}},100)}h(f,"handleTidy");function u(){let m=window.location.search,g=new URLSearchParams(m).get("opt");if(g)try{return Ti(JSON.parse(g))}catch(b){console.error("Error parsing options in URL");return}}h(u,"getOptionsFromURL"),window.addEventListener("popstate",()=>{var m;t(0,l=(m=u())!==null&&m!==void 0?m:n)});function d(m){o=m,t(2,o)}h(d,"editor_bibtex_binding");function p(m){l=m,t(0,l)}return h(p,"sidebar_options_binding"),r.$$.update=()=>{if(r.$$.dirty&1){let m=JSON.stringify(l),y=new URLSearchParams([["opt",m]]);window.history.pushState(l,"","index.html?".concat(y.toString()))}},[l,s,o,a,c,f,d,p]}h(bT,"instance");var Dp=class Dp extends se{constructor(e){super(),le(this,e,bT,gT,oe,{})}};h(Dp,"App");var Tp=Dp,dk=Tp;new dk({target:document.body});})(); +"use strict";(()=>{var xk=Object.create;var ga=Object.defineProperty;var kk=Object.getOwnPropertyDescriptor;var wk=Object.getOwnPropertyNames;var Sk=Object.getPrototypeOf,Fk=Object.prototype.hasOwnProperty;var h=(r,e)=>ga(r,"name",{value:e,configurable:!0});var F=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Qk=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of wk(e))!Fk.call(r,n)&&n!==t&&ga(r,n,{get:()=>e[n],enumerable:!(i=kk(e,n))||i.enumerable});return r};var Es=(r,e,t)=>(t=r!=null?xk(Sk(r)):{},Qk(e||!r||!r.__esModule?ga(t,"default",{value:r,enumerable:!0}):t,r));var Ge=F((ba,Yp)=>{"use strict";var nn=h(function(r){return r&&r.Math===Math&&r},"check");Yp.exports=nn(typeof globalThis=="object"&&globalThis)||nn(typeof window=="object"&&window)||nn(typeof self=="object"&&self)||nn(typeof global=="object"&&global)||nn(typeof ba=="object"&&ba)||function(){return this}()||Function("return this")()});var Xe=F((QT,Jp)=>{"use strict";Jp.exports=function(r){try{return!!r()}catch(e){return!0}}});var Ke=F((BT,Gp)=>{"use strict";var Bk=Xe();Gp.exports=!Bk(function(){return Object.defineProperty({},1,{get:h(function(){return 7},"get")})[1]!==7})});var Cs=F((CT,Xp)=>{"use strict";var Ek=Xe();Xp.exports=!Ek(function(){var r=(function(){}).bind();return typeof r!="function"||r.hasOwnProperty("prototype")})});var Xt=F((LT,Kp)=>{"use strict";var Ck=Cs(),Ls=Function.prototype.call;Kp.exports=Ck?Ls.bind(Ls):function(){return Ls.apply(Ls,arguments)}});var im=F(tm=>{"use strict";var Zp={}.propertyIsEnumerable,em=Object.getOwnPropertyDescriptor,Lk=em&&!Zp.call({1:2},1);tm.f=Lk?h(function(e){var t=em(this,e);return!!t&&t.enumerable},"propertyIsEnumerable"):Zp});var sr=F((_T,rm)=>{"use strict";rm.exports=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}});var Ne=F((TT,om)=>{"use strict";var nm=Cs(),sm=Function.prototype,ya=sm.call,Uk=nm&&sm.bind.bind(ya,ya);om.exports=nm?Uk:function(r){return function(){return ya.apply(r,arguments)}}});var sn=F((DT,am)=>{"use strict";var lm=Ne(),Ok=lm({}.toString),_k=lm("".slice);am.exports=function(r){return _k(Ok(r),8,-1)}});var cm=F((NT,hm)=>{"use strict";var Tk=Ne(),Dk=Xe(),Nk=sn(),va=Object,Rk=Tk("".split);hm.exports=Dk(function(){return!va("z").propertyIsEnumerable(0)})?function(r){return Nk(r)==="String"?Rk(r,""):va(r)}:va});var Us=F((RT,fm)=>{"use strict";fm.exports=function(r){return r==null}});var on=F((AT,um)=>{"use strict";var Ak=Us(),Mk=TypeError;um.exports=function(r){if(Ak(r))throw new Mk("Can't call method on "+r);return r}});var or=F((MT,dm)=>{"use strict";var Pk=cm(),Ik=on();dm.exports=function(r){return Pk(Ik(r))}});var Re=F((PT,pm)=>{"use strict";var xa=typeof document=="object"&&document.all;pm.exports=typeof xa>"u"&&xa!==void 0?function(r){return typeof r=="function"||r===xa}:function(r){return typeof r=="function"}});var Ft=F((IT,mm)=>{"use strict";var $k=Re();mm.exports=function(r){return typeof r=="object"?r!==null:$k(r)}});var lr=F(($T,gm)=>{"use strict";var ka=Ge(),qk=Re(),Vk=h(function(r){return qk(r)?r:void 0},"aFunction");gm.exports=function(r,e){return arguments.length<2?Vk(ka[r]):ka[r]&&ka[r][e]}});var Os=F((VT,bm)=>{"use strict";var zk=Ne();bm.exports=zk({}.isPrototypeOf)});var km=F((zT,xm)=>{"use strict";var Wk=Ge(),ym=Wk.navigator,vm=ym&&ym.userAgent;xm.exports=vm?String(vm):""});var Cm=F((WT,Em)=>{"use strict";var Bm=Ge(),wa=km(),wm=Bm.process,Sm=Bm.Deno,Fm=wm&&wm.versions||Sm&&Sm.version,Qm=Fm&&Fm.v8,Qt,_s;Qm&&(Qt=Qm.split("."),_s=Qt[0]>0&&Qt[0]<4?1:+(Qt[0]+Qt[1]));!_s&&wa&&(Qt=wa.match(/Edge\/(\d+)/),(!Qt||Qt[1]>=74)&&(Qt=wa.match(/Chrome\/(\d+)/),Qt&&(_s=+Qt[1])));Em.exports=_s});var Sa=F((jT,Um)=>{"use strict";var Lm=Cm(),jk=Xe(),Hk=Ge(),Yk=Hk.String;Um.exports=!!Object.getOwnPropertySymbols&&!jk(function(){var r=Symbol("symbol detection");return!Yk(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&Lm&&Lm<41})});var Fa=F((HT,Om)=>{"use strict";var Jk=Sa();Om.exports=Jk&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Qa=F((YT,_m)=>{"use strict";var Gk=lr(),Xk=Re(),Kk=Os(),Zk=Fa(),ew=Object;_m.exports=Zk?function(r){return typeof r=="symbol"}:function(r){var e=Gk("Symbol");return Xk(e)&&Kk(e.prototype,ew(r))}});var Ts=F((JT,Tm)=>{"use strict";var tw=String;Tm.exports=function(r){try{return tw(r)}catch(e){return"Object"}}});var ar=F((GT,Dm)=>{"use strict";var iw=Re(),rw=Ts(),nw=TypeError;Dm.exports=function(r){if(iw(r))return r;throw new nw(rw(r)+" is not a function")}});var Ds=F((XT,Nm)=>{"use strict";var sw=ar(),ow=Us();Nm.exports=function(r,e){var t=r[e];return ow(t)?void 0:sw(t)}});var Am=F((KT,Rm)=>{"use strict";var Ba=Xt(),Ea=Re(),Ca=Ft(),lw=TypeError;Rm.exports=function(r,e){var t,i;if(e==="string"&&Ea(t=r.toString)&&!Ca(i=Ba(t,r))||Ea(t=r.valueOf)&&!Ca(i=Ba(t,r))||e!=="string"&&Ea(t=r.toString)&&!Ca(i=Ba(t,r)))return i;throw new lw("Can't convert object to primitive value")}});var hr=F((ZT,Mm)=>{"use strict";Mm.exports=!1});var Ns=F((eD,Im)=>{"use strict";var Pm=Ge(),aw=Object.defineProperty;Im.exports=function(r,e){try{aw(Pm,r,{value:e,configurable:!0,writable:!0})}catch(t){Pm[r]=e}return e}});var Rs=F((tD,Vm)=>{"use strict";var hw=hr(),cw=Ge(),fw=Ns(),$m="__core-js_shared__",qm=Vm.exports=cw[$m]||fw($m,{});(qm.versions||(qm.versions=[])).push({version:"3.38.1",mode:hw?"pure":"global",copyright:"\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})});var La=F((iD,Wm)=>{"use strict";var zm=Rs();Wm.exports=function(r,e){return zm[r]||(zm[r]=e||{})}});var As=F((rD,jm)=>{"use strict";var uw=on(),dw=Object;jm.exports=function(r){return dw(uw(r))}});var Bt=F((nD,Hm)=>{"use strict";var pw=Ne(),mw=As(),gw=pw({}.hasOwnProperty);Hm.exports=Object.hasOwn||h(function(e,t){return gw(mw(e),t)},"hasOwn")});var Ua=F((oD,Ym)=>{"use strict";var bw=Ne(),yw=0,vw=Math.random(),xw=bw(1 .toString);Ym.exports=function(r){return"Symbol("+(r===void 0?"":r)+")_"+xw(++yw+vw,36)}});var st=F((lD,Gm)=>{"use strict";var kw=Ge(),ww=La(),Jm=Bt(),Sw=Ua(),Fw=Sa(),Qw=Fa(),cr=kw.Symbol,Oa=ww("wks"),Bw=Qw?cr.for||cr:cr&&cr.withoutSetter||Sw;Gm.exports=function(r){return Jm(Oa,r)||(Oa[r]=Fw&&Jm(cr,r)?cr[r]:Bw("Symbol."+r)),Oa[r]}});var eg=F((aD,Zm)=>{"use strict";var Ew=Xt(),Xm=Ft(),Km=Qa(),Cw=Ds(),Lw=Am(),Uw=st(),Ow=TypeError,_w=Uw("toPrimitive");Zm.exports=function(r,e){if(!Xm(r)||Km(r))return r;var t=Cw(r,_w),i;if(t){if(e===void 0&&(e="default"),i=Ew(t,r,e),!Xm(i)||Km(i))return i;throw new Ow("Can't convert object to primitive value")}return e===void 0&&(e="number"),Lw(r,e)}});var _a=F((hD,tg)=>{"use strict";var Tw=eg(),Dw=Qa();tg.exports=function(r){var e=Tw(r,"string");return Dw(e)?e:e+""}});var Da=F((cD,rg)=>{"use strict";var Nw=Ge(),ig=Ft(),Ta=Nw.document,Rw=ig(Ta)&&ig(Ta.createElement);rg.exports=function(r){return Rw?Ta.createElement(r):{}}});var Na=F((fD,ng)=>{"use strict";var Aw=Ke(),Mw=Xe(),Pw=Da();ng.exports=!Aw&&!Mw(function(){return Object.defineProperty(Pw("div"),"a",{get:h(function(){return 7},"get")}).a!==7})});var Ra=F(og=>{"use strict";var Iw=Ke(),$w=Xt(),qw=im(),Vw=sr(),zw=or(),Ww=_a(),jw=Bt(),Hw=Na(),sg=Object.getOwnPropertyDescriptor;og.f=Iw?sg:h(function(e,t){if(e=zw(e),t=Ww(t),Hw)try{return sg(e,t)}catch(i){}if(jw(e,t))return Vw(!$w(qw.f,e,t),e[t])},"getOwnPropertyDescriptor")});var Aa=F((mD,lg)=>{"use strict";var Yw=Ke(),Jw=Xe();lg.exports=Yw&&Jw(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Kt=F((gD,ag)=>{"use strict";var Gw=Ft(),Xw=String,Kw=TypeError;ag.exports=function(r){if(Gw(r))return r;throw new Kw(Xw(r)+" is not an object")}});var Rt=F(cg=>{"use strict";var Zw=Ke(),eS=Na(),tS=Aa(),Ms=Kt(),hg=_a(),iS=TypeError,Ma=Object.defineProperty,rS=Object.getOwnPropertyDescriptor,Pa="enumerable",Ia="configurable",$a="writable";cg.f=Zw?tS?h(function(e,t,i){if(Ms(e),t=hg(t),Ms(i),typeof e=="function"&&t==="prototype"&&"value"in i&&$a in i&&!i[$a]){var n=rS(e,t);n&&n[$a]&&(e[t]=i.value,i={configurable:Ia in i?i[Ia]:n[Ia],enumerable:Pa in i?i[Pa]:n[Pa],writable:!1})}return Ma(e,t,i)},"defineProperty"):Ma:h(function(e,t,i){if(Ms(e),t=hg(t),Ms(i),eS)try{return Ma(e,t,i)}catch(n){}if("get"in i||"set"in i)throw new iS("Accessors not supported");return"value"in i&&(e[t]=i.value),e},"defineProperty")});var Ps=F((vD,fg)=>{"use strict";var nS=Ke(),sS=Rt(),oS=sr();fg.exports=nS?function(r,e,t){return sS.f(r,e,oS(1,t))}:function(r,e,t){return r[e]=t,r}});var Is=F((xD,dg)=>{"use strict";var qa=Ke(),lS=Bt(),ug=Function.prototype,aS=qa&&Object.getOwnPropertyDescriptor,Va=lS(ug,"name"),hS=Va&&h(function(){},"something").name==="something",cS=Va&&(!qa||qa&&aS(ug,"name").configurable);dg.exports={EXISTS:Va,PROPER:hS,CONFIGURABLE:cS}});var Wa=F((wD,pg)=>{"use strict";var fS=Ne(),uS=Re(),za=Rs(),dS=fS(Function.toString);uS(za.inspectSource)||(za.inspectSource=function(r){return dS(r)});pg.exports=za.inspectSource});var bg=F((SD,gg)=>{"use strict";var pS=Ge(),mS=Re(),mg=pS.WeakMap;gg.exports=mS(mg)&&/native code/.test(String(mg))});var $s=F((FD,vg)=>{"use strict";var gS=La(),bS=Ua(),yg=gS("keys");vg.exports=function(r){return yg[r]||(yg[r]=bS(r))}});var qs=F((QD,xg)=>{"use strict";xg.exports={}});var Ws=F((BD,Sg)=>{"use strict";var yS=bg(),wg=Ge(),vS=Ft(),xS=Ps(),ja=Bt(),Ha=Rs(),kS=$s(),wS=qs(),kg="Object already initialized",Ya=wg.TypeError,SS=wg.WeakMap,Vs,ln,zs,FS=h(function(r){return zs(r)?ln(r):Vs(r,{})},"enforce"),QS=h(function(r){return function(e){var t;if(!vS(e)||(t=ln(e)).type!==r)throw new Ya("Incompatible receiver, "+r+" required");return t}},"getterFor");yS||Ha.state?(Et=Ha.state||(Ha.state=new SS),Et.get=Et.get,Et.has=Et.has,Et.set=Et.set,Vs=h(function(r,e){if(Et.has(r))throw new Ya(kg);return e.facade=r,Et.set(r,e),e},"set"),ln=h(function(r){return Et.get(r)||{}},"get"),zs=h(function(r){return Et.has(r)},"has")):(Li=kS("state"),wS[Li]=!0,Vs=h(function(r,e){if(ja(r,Li))throw new Ya(kg);return e.facade=r,xS(r,Li,e),e},"set"),ln=h(function(r){return ja(r,Li)?r[Li]:{}},"get"),zs=h(function(r){return ja(r,Li)},"has"));var Et,Li;Sg.exports={set:Vs,get:ln,has:zs,enforce:FS,getterFor:QS}});var Xa=F((CD,Bg)=>{"use strict";var Ga=Ne(),BS=Xe(),ES=Re(),js=Bt(),Ja=Ke(),CS=Is().CONFIGURABLE,LS=Wa(),Qg=Ws(),US=Qg.enforce,OS=Qg.get,Fg=String,Hs=Object.defineProperty,_S=Ga("".slice),TS=Ga("".replace),DS=Ga([].join),NS=Ja&&!BS(function(){return Hs(function(){},"length",{value:8}).length!==8}),RS=String(String).split("String"),AS=Bg.exports=function(r,e,t){_S(Fg(e),0,7)==="Symbol("&&(e="["+TS(Fg(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!js(r,"name")||CS&&r.name!==e)&&(Ja?Hs(r,"name",{value:e,configurable:!0}):r.name=e),NS&&t&&js(t,"arity")&&r.length!==t.arity&&Hs(r,"length",{value:t.arity});try{t&&js(t,"constructor")&&t.constructor?Ja&&Hs(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(n){}var i=US(r);return js(i,"source")||(i.source=DS(RS,typeof e=="string"?e:"")),r};Function.prototype.toString=AS(h(function(){return ES(this)&&OS(this).source||LS(this)},"toString"),"toString")});var fr=F((UD,Eg)=>{"use strict";var MS=Re(),PS=Rt(),IS=Xa(),$S=Ns();Eg.exports=function(r,e,t,i){i||(i={});var n=i.enumerable,s=i.name!==void 0?i.name:e;if(MS(t)&&IS(t,s,i),i.global)n?r[e]=t:$S(e,t);else{try{i.unsafe?r[e]&&(n=!0):delete r[e]}catch(o){}n?r[e]=t:PS.f(r,e,{value:t,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return r}});var Lg=F((OD,Cg)=>{"use strict";var qS=Math.ceil,VS=Math.floor;Cg.exports=Math.trunc||h(function(e){var t=+e;return(t>0?VS:qS)(t)},"trunc")});var Ka=F((TD,Ug)=>{"use strict";var zS=Lg();Ug.exports=function(r){var e=+r;return e!==e||e===0?0:zS(e)}});var Za=F((DD,Og)=>{"use strict";var WS=Ka(),jS=Math.max,HS=Math.min;Og.exports=function(r,e){var t=WS(r);return t<0?jS(t+e,0):HS(t,e)}});var Tg=F((ND,_g)=>{"use strict";var YS=Ka(),JS=Math.min;_g.exports=function(r){var e=YS(r);return e>0?JS(e,9007199254740991):0}});var an=F((RD,Dg)=>{"use strict";var GS=Tg();Dg.exports=function(r){return GS(r.length)}});var Ag=F((AD,Rg)=>{"use strict";var XS=or(),KS=Za(),ZS=an(),Ng=h(function(r){return function(e,t,i){var n=XS(e),s=ZS(n);if(s===0)return!r&&-1;var o=KS(i,s),l;if(r&&t!==t){for(;s>o;)if(l=n[o++],l!==l)return!0}else for(;s>o;o++)if((r||o in n)&&n[o]===t)return r||o||0;return!r&&-1}},"createMethod");Rg.exports={includes:Ng(!0),indexOf:Ng(!1)}});var th=F((PD,Pg)=>{"use strict";var eF=Ne(),eh=Bt(),tF=or(),iF=Ag().indexOf,rF=qs(),Mg=eF([].push);Pg.exports=function(r,e){var t=tF(r),i=0,n=[],s;for(s in t)!eh(rF,s)&&eh(t,s)&&Mg(n,s);for(;e.length>i;)eh(t,s=e[i++])&&(~iF(n,s)||Mg(n,s));return n}});var Ys=F((ID,Ig)=>{"use strict";Ig.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var qg=F($g=>{"use strict";var nF=th(),sF=Ys(),oF=sF.concat("length","prototype");$g.f=Object.getOwnPropertyNames||h(function(e){return nF(e,oF)},"getOwnPropertyNames")});var zg=F(Vg=>{"use strict";Vg.f=Object.getOwnPropertySymbols});var jg=F((zD,Wg)=>{"use strict";var lF=lr(),aF=Ne(),hF=qg(),cF=zg(),fF=Kt(),uF=aF([].concat);Wg.exports=lF("Reflect","ownKeys")||h(function(e){var t=hF.f(fF(e)),i=cF.f;return i?uF(t,i(e)):t},"ownKeys")});var Jg=F((jD,Yg)=>{"use strict";var Hg=Bt(),dF=jg(),pF=Ra(),mF=Rt();Yg.exports=function(r,e,t){for(var i=dF(e),n=mF.f,s=pF.f,o=0;o<i.length;o++){var l=i[o];!Hg(r,l)&&!(t&&Hg(t,l))&&n(r,l,s(e,l))}}});var Xg=F((HD,Gg)=>{"use strict";var gF=Xe(),bF=Re(),yF=/#|\.prototype\./,hn=h(function(r,e){var t=xF[vF(r)];return t===wF?!0:t===kF?!1:bF(e)?gF(e):!!e},"isForced"),vF=hn.normalize=function(r){return String(r).replace(yF,".").toLowerCase()},xF=hn.data={},kF=hn.NATIVE="N",wF=hn.POLYFILL="P";Gg.exports=hn});var hi=F((JD,Kg)=>{"use strict";var Js=Ge(),SF=Ra().f,FF=Ps(),QF=fr(),BF=Ns(),EF=Jg(),CF=Xg();Kg.exports=function(r,e){var t=r.target,i=r.global,n=r.stat,s,o,l,a,c,f;if(i?o=Js:n?o=Js[t]||BF(t,{}):o=Js[t]&&Js[t].prototype,o)for(l in e){if(c=e[l],r.dontCallGetSet?(f=SF(o,l),a=f&&f.value):a=o[l],s=CF(i?l:t+(n?".":"#")+l,r.forced),!s&&a!==void 0){if(typeof c==typeof a)continue;EF(c,a)}(r.sham||a&&a.sham)&&FF(c,"sham",!0),QF(o,l,c,r)}}});var ih=F((GD,Zg)=>{"use strict";var LF=sn();Zg.exports=Array.isArray||h(function(e){return LF(e)==="Array"},"isArray")});var t0=F((KD,e0)=>{"use strict";var UF=TypeError,OF=9007199254740991;e0.exports=function(r){if(r>OF)throw UF("Maximum allowed index exceeded");return r}});var r0=F((ZD,i0)=>{"use strict";var _F=sn(),TF=Ne();i0.exports=function(r){if(_F(r)==="Function")return TF(r)}});var Gs=F((e4,s0)=>{"use strict";var n0=r0(),DF=ar(),NF=Cs(),RF=n0(n0.bind);s0.exports=function(r,e){return DF(r),e===void 0?r:NF?RF(r,e):function(){return r.apply(e,arguments)}}});var a0=F((t4,l0)=>{"use strict";var AF=ih(),MF=an(),PF=t0(),IF=Gs(),o0=h(function(r,e,t,i,n,s,o,l){for(var a=n,c=0,f=o?IF(o,l):!1,u,d;c<i;)c in t&&(u=f?f(t[c],c,e):t[c],s>0&&AF(u)?(d=MF(u),a=o0(r,e,u,d,a,s-1)-1):(PF(a+1),r[a]=u),a++),c++;return a},"flattenIntoArray");l0.exports=o0});var f0=F((r4,c0)=>{"use strict";var $F=st(),qF=$F("toStringTag"),h0={};h0[qF]="z";c0.exports=String(h0)==="[object z]"});var cn=F((n4,u0)=>{"use strict";var VF=f0(),zF=Re(),Xs=sn(),WF=st(),jF=WF("toStringTag"),HF=Object,YF=Xs(function(){return arguments}())==="Arguments",JF=h(function(r,e){try{return r[e]}catch(t){}},"tryGet");u0.exports=VF?Xs:function(r){var e,t,i;return r===void 0?"Undefined":r===null?"Null":typeof(t=JF(e=HF(r),jF))=="string"?t:YF?Xs(e):(i=Xs(e))==="Object"&&zF(e.callee)?"Arguments":i}});var y0=F((o4,b0)=>{"use strict";var GF=Ne(),XF=Xe(),d0=Re(),KF=cn(),ZF=lr(),eQ=Wa(),p0=h(function(){},"noop"),m0=ZF("Reflect","construct"),rh=/^\s*(?:class|function)\b/,tQ=GF(rh.exec),iQ=!rh.test(p0),fn=h(function(e){if(!d0(e))return!1;try{return m0(p0,[],e),!0}catch(t){return!1}},"isConstructor"),g0=h(function(e){if(!d0(e))return!1;switch(KF(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return iQ||!!tQ(rh,eQ(e))}catch(t){return!0}},"isConstructor");g0.sham=!0;b0.exports=!m0||XF(function(){var r;return fn(fn.call)||!fn(Object)||!fn(function(){r=!0})||r})?g0:fn});var w0=F((a4,k0)=>{"use strict";var v0=ih(),rQ=y0(),nQ=Ft(),sQ=st(),oQ=sQ("species"),x0=Array;k0.exports=function(r){var e;return v0(r)&&(e=r.constructor,rQ(e)&&(e===x0||v0(e.prototype))?e=void 0:nQ(e)&&(e=e[oQ],e===null&&(e=void 0))),e===void 0?x0:e}});var F0=F((h4,S0)=>{"use strict";var lQ=w0();S0.exports=function(r,e){return new(lQ(r))(e===0?0:e)}});var Q0=F(()=>{"use strict";var aQ=hi(),hQ=a0(),cQ=ar(),fQ=As(),uQ=an(),dQ=F0();aQ({target:"Array",proto:!0},{flatMap:h(function(e){var t=fQ(this),i=uQ(t),n;return cQ(e),n=dQ(t,0),n.length=hQ(n,t,t,i,0,1,e,arguments.length>1?arguments[1]:void 0),n},"flatMap")})});var ur=F((d4,B0)=>{"use strict";B0.exports={}});var C0=F((p4,E0)=>{"use strict";var pQ=st(),mQ=ur(),gQ=pQ("iterator"),bQ=Array.prototype;E0.exports=function(r){return r!==void 0&&(mQ.Array===r||bQ[gQ]===r)}});var Ks=F((m4,U0)=>{"use strict";var yQ=cn(),L0=Ds(),vQ=Us(),xQ=ur(),kQ=st(),wQ=kQ("iterator");U0.exports=function(r){if(!vQ(r))return L0(r,wQ)||L0(r,"@@iterator")||xQ[yQ(r)]}});var nh=F((g4,O0)=>{"use strict";var SQ=Xt(),FQ=ar(),QQ=Kt(),BQ=Ts(),EQ=Ks(),CQ=TypeError;O0.exports=function(r,e){var t=arguments.length<2?EQ(r):e;if(FQ(t))return QQ(SQ(t,r));throw new CQ(BQ(r)+" is not iterable")}});var D0=F((b4,T0)=>{"use strict";var LQ=Xt(),_0=Kt(),UQ=Ds();T0.exports=function(r,e,t){var i,n;_0(r);try{if(i=UQ(r,"return"),!i){if(e==="throw")throw t;return t}i=LQ(i,r)}catch(s){n=!0,i=s}if(e==="throw")throw t;if(n)throw i;return _0(i),t}});var P0=F((y4,M0)=>{"use strict";var OQ=Gs(),_Q=Xt(),TQ=Kt(),DQ=Ts(),NQ=C0(),RQ=an(),N0=Os(),AQ=nh(),MQ=Ks(),R0=D0(),PQ=TypeError,Zs=h(function(r,e){this.stopped=r,this.result=e},"Result"),A0=Zs.prototype;M0.exports=function(r,e,t){var i=t&&t.that,n=!!(t&&t.AS_ENTRIES),s=!!(t&&t.IS_RECORD),o=!!(t&&t.IS_ITERATOR),l=!!(t&&t.INTERRUPTED),a=OQ(e,i),c,f,u,d,p,m,y,g=h(function(v){return c&&R0(c,"normal",v),new Zs(!0,v)},"stop"),b=h(function(v){return n?(TQ(v),l?a(v[0],v[1],g):a(v[0],v[1])):l?a(v,g):a(v)},"callFn");if(s)c=r.iterator;else if(o)c=r;else{if(f=MQ(r),!f)throw new PQ(DQ(r)+" is not iterable");if(NQ(f)){for(u=0,d=RQ(r);d>u;u++)if(p=b(r[u]),p&&N0(A0,p))return p;return new Zs(!1)}c=AQ(r,f)}for(m=s?r.next:c.next;!(y=_Q(m,c)).done;){try{p=b(y.value)}catch(v){R0(c,"throw",v)}if(typeof p=="object"&&p&&N0(A0,p))return p}return new Zs(!1)}});var $0=F((x4,I0)=>{"use strict";var IQ=Ke(),$Q=Rt(),qQ=sr();I0.exports=function(r,e,t){IQ?$Q.f(r,e,qQ(0,t)):r[e]=t}});var q0=F(()=>{"use strict";var VQ=hi(),zQ=P0(),WQ=$0();VQ({target:"Object",stat:!0},{fromEntries:h(function(e){var t={};return zQ(e,function(i,n){WQ(t,i,n)},{AS_ENTRIES:!0}),t},"fromEntries")})});var sh=F((F4,V0)=>{"use strict";var jQ=cn(),HQ=String;V0.exports=function(r){if(jQ(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return HQ(r)}});var oh=F((Q4,z0)=>{"use strict";z0.exports=" \n\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"});var H0=F((B4,j0)=>{"use strict";var YQ=Ne(),JQ=on(),GQ=sh(),ah=oh(),W0=YQ("".replace),XQ=RegExp("^["+ah+"]+"),KQ=RegExp("(^|[^"+ah+"])["+ah+"]+$"),lh=h(function(r){return function(e){var t=GQ(JQ(e));return r&1&&(t=W0(t,XQ,"")),r&2&&(t=W0(t,KQ,"$1")),t}},"createMethod");j0.exports={start:lh(1),end:lh(2),trim:lh(3)}});var X0=F((C4,G0)=>{"use strict";var ZQ=Is().PROPER,eB=Xe(),Y0=oh(),J0="\u200B\x85\u180E";G0.exports=function(r){return eB(function(){return!!Y0[r]()||J0[r]()!==J0||ZQ&&Y0[r].name!==r})}});var hh=F((L4,K0)=>{"use strict";var tB=H0().end,iB=X0();K0.exports=iB("trimEnd")?h(function(){return tB(this)},"trimEnd"):"".trimEnd});var eb=F(()=>{"use strict";var rB=hi(),Z0=hh();rB({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==Z0},{trimRight:Z0})});var ib=F(()=>{"use strict";eb();var nB=hi(),tb=hh();nB({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==tb},{trimEnd:tb})});var nb=F((N4,rb)=>{"use strict";var sB=th(),oB=Ys();rb.exports=Object.keys||h(function(e){return sB(e,oB)},"keys")});var ob=F(sb=>{"use strict";var lB=Ke(),aB=Aa(),hB=Rt(),cB=Kt(),fB=or(),uB=nb();sb.f=lB&&!aB?Object.defineProperties:h(function(e,t){cB(e);for(var i=fB(t),n=uB(t),s=n.length,o=0,l;s>o;)hB.f(e,l=n[o++],i[l]);return e},"defineProperties")});var ab=F((P4,lb)=>{"use strict";var dB=lr();lb.exports=dB("document","documentElement")});var un=F((I4,mb)=>{"use strict";var pB=Kt(),mB=ob(),hb=Ys(),gB=qs(),bB=ab(),yB=Da(),vB=$s(),cb=">",fb="<",fh="prototype",uh="script",db=vB("IE_PROTO"),ch=h(function(){},"EmptyConstructor"),pb=h(function(r){return fb+uh+cb+r+fb+"/"+uh+cb},"scriptTag"),ub=h(function(r){r.write(pb("")),r.close();var e=r.parentWindow.Object;return r=null,e},"NullProtoObjectViaActiveX"),xB=h(function(){var r=yB("iframe"),e="java"+uh+":",t;return r.style.display="none",bB.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(pb("document.F=Object")),t.close(),t.F},"NullProtoObjectViaIFrame"),eo,to=h(function(){try{eo=new ActiveXObject("htmlfile")}catch(e){}to=typeof document<"u"?document.domain&&eo?ub(eo):xB():ub(eo);for(var r=hb.length;r--;)delete to[fh][hb[r]];return to()},"NullProtoObject");gB[db]=!0;mb.exports=Object.create||h(function(e,t){var i;return e!==null?(ch[fh]=pB(e),i=new ch,ch[fh]=null,i[db]=e):i=to(),t===void 0?i:mB.f(i,t)},"create")});var bb=F((q4,gb)=>{"use strict";var kB=st(),wB=un(),SB=Rt().f,dh=kB("unscopables"),ph=Array.prototype;ph[dh]===void 0&&SB(ph,dh,{configurable:!0,value:wB(null)});gb.exports=function(r){ph[dh][r]=!0}});var vb=F((V4,yb)=>{"use strict";var FB=Xe();yb.exports=!FB(function(){function r(){}return h(r,"F"),r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype})});var gh=F((W4,kb)=>{"use strict";var QB=Bt(),BB=Re(),EB=As(),CB=$s(),LB=vb(),xb=CB("IE_PROTO"),mh=Object,UB=mh.prototype;kb.exports=LB?mh.getPrototypeOf:function(r){var e=EB(r);if(QB(e,xb))return e[xb];var t=e.constructor;return BB(t)&&e instanceof t?t.prototype:e instanceof mh?UB:null}});var xh=F((j4,Fb)=>{"use strict";var OB=Xe(),_B=Re(),TB=Ft(),DB=un(),wb=gh(),NB=fr(),RB=st(),AB=hr(),vh=RB("iterator"),Sb=!1,Zt,bh,yh;[].keys&&(yh=[].keys(),"next"in yh?(bh=wb(wb(yh)),bh!==Object.prototype&&(Zt=bh)):Sb=!0);var MB=!TB(Zt)||OB(function(){var r={};return Zt[vh].call(r)!==r});MB?Zt={}:AB&&(Zt=DB(Zt));_B(Zt[vh])||NB(Zt,vh,function(){return this});Fb.exports={IteratorPrototype:Zt,BUGGY_SAFARI_ITERATORS:Sb}});var io=F((H4,Bb)=>{"use strict";var PB=Rt().f,IB=Bt(),$B=st(),Qb=$B("toStringTag");Bb.exports=function(r,e,t){r&&!t&&(r=r.prototype),r&&!IB(r,Qb)&&PB(r,Qb,{configurable:!0,value:e})}});var kh=F((Y4,Eb)=>{"use strict";var qB=xh().IteratorPrototype,VB=un(),zB=sr(),WB=io(),jB=ur(),HB=h(function(){return this},"returnThis");Eb.exports=function(r,e,t,i){var n=e+" Iterator";return r.prototype=VB(qB,{next:zB(+!i,t)}),WB(r,n,!1,!0),jB[n]=HB,r}});var Lb=F((G4,Cb)=>{"use strict";var YB=Ne(),JB=ar();Cb.exports=function(r,e,t){try{return YB(JB(Object.getOwnPropertyDescriptor(r,e)[t]))}catch(i){}}});var Ob=F((X4,Ub)=>{"use strict";var GB=Ft();Ub.exports=function(r){return GB(r)||r===null}});var Tb=F((K4,_b)=>{"use strict";var XB=Ob(),KB=String,ZB=TypeError;_b.exports=function(r){if(XB(r))return r;throw new ZB("Can't set "+KB(r)+" as a prototype")}});var Nb=F((Z4,Db)=>{"use strict";var eE=Lb(),tE=Ft(),iE=on(),rE=Tb();Db.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=eE(Object.prototype,"__proto__","set"),t(e,[]),r=e instanceof Array}catch(i){}return h(function(n,s){return iE(n),rE(s),tE(n)&&(r?t(n,s):n.__proto__=s),n},"setPrototypeOf")}():void 0)});var jb=F((tN,Wb)=>{"use strict";var nE=hi(),sE=Xt(),ro=hr(),Vb=Is(),oE=Re(),lE=kh(),Rb=gh(),Ab=Nb(),aE=io(),hE=Ps(),wh=fr(),cE=st(),Mb=ur(),zb=xh(),fE=Vb.PROPER,uE=Vb.CONFIGURABLE,Pb=zb.IteratorPrototype,no=zb.BUGGY_SAFARI_ITERATORS,dn=cE("iterator"),Ib="keys",pn="values",$b="entries",qb=h(function(){return this},"returnThis");Wb.exports=function(r,e,t,i,n,s,o){lE(t,e,i);var l=h(function(b){if(b===n&&d)return d;if(!no&&b&&b in f)return f[b];switch(b){case Ib:return h(function(){return new t(this,b)},"keys");case pn:return h(function(){return new t(this,b)},"values");case $b:return h(function(){return new t(this,b)},"entries")}return function(){return new t(this)}},"getIterationMethod"),a=e+" Iterator",c=!1,f=r.prototype,u=f[dn]||f["@@iterator"]||n&&f[n],d=!no&&u||l(n),p=e==="Array"&&f.entries||u,m,y,g;if(p&&(m=Rb(p.call(new r)),m!==Object.prototype&&m.next&&(!ro&&Rb(m)!==Pb&&(Ab?Ab(m,Pb):oE(m[dn])||wh(m,dn,qb)),aE(m,a,!0,!0),ro&&(Mb[a]=qb))),fE&&n===pn&&u&&u.name!==pn&&(!ro&&uE?hE(f,"name",pn):(c=!0,d=h(function(){return sE(u,this)},"values"))),n)if(y={values:l(pn),keys:s?d:l(Ib),entries:l($b)},o)for(g in y)(no||c||!(g in f))&&wh(f,g,y[g]);else nE({target:e,proto:!0,forced:no||c},y);return(!ro||o)&&f[dn]!==d&&wh(f,dn,d,{name:n}),Mb[e]=d,y}});var Sh=F((rN,Hb)=>{"use strict";Hb.exports=function(r,e){return{value:r,done:e}}});var Zb=F((nN,Kb)=>{"use strict";var dE=or(),Fh=bb(),Yb=ur(),Gb=Ws(),pE=Rt().f,mE=jb(),so=Sh(),gE=hr(),bE=Ke(),Xb="Array Iterator",yE=Gb.set,vE=Gb.getterFor(Xb);Kb.exports=mE(Array,"Array",function(r,e){yE(this,{type:Xb,target:dE(r),index:0,kind:e})},function(){var r=vE(this),e=r.target,t=r.index++;if(!e||t>=e.length)return r.target=null,so(void 0,!0);switch(r.kind){case"keys":return so(t,!1);case"values":return so(e[t],!1)}return so([t,e[t]],!1)},"values");var Jb=Yb.Arguments=Yb.Array;Fh("keys");Fh("values");Fh("entries");if(!gE&&bE&&Jb.name!=="values")try{pE(Jb,"name",{value:"values"})}catch(r){}});var iy=F(()=>{"use strict";var xE=hi(),kE=Ne(),wE=Za(),SE=RangeError,ey=String.fromCharCode,ty=String.fromCodePoint,FE=kE([].join),QE=!!ty&&ty.length!==1;xE({target:"String",stat:!0,arity:1,forced:QE},{fromCodePoint:h(function(e){for(var t=[],i=arguments.length,n=0,s;i>n;){if(s=+arguments[n++],wE(s,1114111)!==s)throw new SE(s+" is not a valid code point");t[n]=s<65536?ey(s):ey(((s-=65536)>>10)+55296,s%1024+56320)}return FE(t,"")},"fromCodePoint")})});var sy=F((aN,ny)=>{"use strict";var ry=Ge(),BE=Ke(),EE=Object.getOwnPropertyDescriptor;ny.exports=function(r){if(!BE)return ry[r];var e=EE(ry,r);return e&&e.value}});var ay=F((hN,ly)=>{"use strict";var CE=Xe(),LE=st(),UE=Ke(),oy=hr(),OE=LE("iterator");ly.exports=!CE(function(){var r=new URL("b?a=1&b=2&c=3","https://a"),e=r.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),i="";return r.pathname="c%20d",e.forEach(function(n,s){e.delete("b"),i+=s+n}),t.delete("a",2),t.delete("b",void 0),oy&&(!r.toJSON||!t.has("a",1)||t.has("a",2)||!t.has("a",void 0)||t.has("b"))||!e.size&&(oy||!UE)||!e.sort||r.href!=="https://a/c%20d?a=1&c=3"||e.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!e[OE]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||i!=="a1c3"||new URL("https://x",void 0).host!=="x"})});var fy=F((cN,cy)=>{"use strict";var hy=Xa(),_E=Rt();cy.exports=function(r,e,t){return t.get&&hy(t.get,e,{getter:!0}),t.set&&hy(t.set,e,{setter:!0}),_E.f(r,e,t)}});var dy=F((fN,uy)=>{"use strict";var TE=fr();uy.exports=function(r,e,t){for(var i in e)TE(r,i,e[i],t);return r}});var my=F((uN,py)=>{"use strict";var DE=Os(),NE=TypeError;py.exports=function(r,e){if(DE(e,r))return r;throw new NE("Incorrect invocation")}});var by=F((dN,gy)=>{"use strict";var RE=TypeError;gy.exports=function(r,e){if(r<e)throw new RE("Not enough arguments");return r}});var vy=F((pN,yy)=>{"use strict";var AE=Ne();yy.exports=AE([].slice)});var wy=F((mN,ky)=>{"use strict";var xy=vy(),ME=Math.floor,Qh=h(function(r,e){var t=r.length;if(t<8)for(var i=1,n,s;i<t;){for(s=i,n=r[i];s&&e(r[s-1],n)>0;)r[s]=r[--s];s!==i++&&(r[s]=n)}else for(var o=ME(t/2),l=Qh(xy(r,0,o),e),a=Qh(xy(r,o),e),c=l.length,f=a.length,u=0,d=0;u<c||d<f;)r[u+d]=u<c&&d<f?e(l[u],a[d])<=0?l[u++]:a[d++]:u<c?l[u++]:a[d++];return r},"sort");ky.exports=Qh});var jy=F((bN,Wy)=>{"use strict";Zb();iy();var Oh=hi(),Ny=Ge(),_h=sy(),PE=lr(),oo=Xt(),Ct=Ne(),mn=Ke(),Ry=ay(),Ay=fr(),IE=fy(),$E=dy(),qE=io(),VE=kh(),Th=Ws(),My=my(),Bh=Re(),zE=Bt(),WE=Gs(),jE=cn(),HE=Kt(),Py=Ft(),$e=sh(),YE=un(),Sy=sr(),Fy=nh(),JE=Ks(),lo=Sh(),dr=by(),GE=st(),XE=wy(),KE=GE("iterator"),mr="URLSearchParams",Iy=mr+"Iterator",$y=Th.set,ut=Th.getterFor(mr),ZE=Th.getterFor(Iy),Qy=_h("fetch"),co=_h("Request"),gn=_h("Headers"),Eh=co&&co.prototype,By=gn&&gn.prototype,eC=Ny.TypeError,tC=Ny.encodeURIComponent,iC=String.fromCharCode,rC=PE("String","fromCodePoint"),nC=parseInt,ho=Ct("".charAt),Ey=Ct([].join),ci=Ct([].push),qy=Ct("".replace),sC=Ct([].shift),Cy=Ct([].splice),Ly=Ct("".split),Vy=Ct("".slice),oC=Ct(/./.exec),lC=/\+/g,Ch="\uFFFD",aC=/^[0-9a-f]+$/i,Uy=h(function(r,e){var t=Vy(r,e,e+2);return oC(aC,t)?nC(t,16):NaN},"parseHexOctet"),hC=h(function(r){for(var e=0,t=128;t>0&&r&t;t>>=1)e++;return e},"getLeadingOnes"),cC=h(function(r){var e=null;switch(r.length){case 1:e=r[0];break;case 2:e=(r[0]&31)<<6|r[1]&63;break;case 3:e=(r[0]&15)<<12|(r[1]&63)<<6|r[2]&63;break;case 4:e=(r[0]&7)<<18|(r[1]&63)<<12|(r[2]&63)<<6|r[3]&63;break}return e>1114111?null:e},"utf8Decode"),Oy=h(function(r){r=qy(r,lC," ");for(var e=r.length,t="",i=0;i<e;){var n=ho(r,i);if(n==="%"){if(ho(r,i+1)==="%"||i+3>e){t+="%",i++;continue}var s=Uy(r,i+1);if(s!==s){t+=n,i++;continue}i+=2;var o=hC(s);if(o===0)n=iC(s);else{if(o===1||o>4){t+=Ch,i++;continue}for(var l=[s],a=1;a<o&&(i++,!(i+3>e||ho(r,i)!=="%"));){var c=Uy(r,i+1);if(c!==c){i+=3;break}if(c>191||c<128)break;ci(l,c),i+=2,a++}if(l.length!==o){t+=Ch;continue}var f=cC(l);f===null?t+=Ch:n=rC(f)}}t+=n,i++}return t},"decode"),fC=/[!'()~]|%20/g,uC={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},dC=h(function(r){return uC[r]},"replacer"),_y=h(function(r){return qy(tC(r),fC,dC)},"serialize"),Lh=VE(h(function(e,t){$y(this,{type:Iy,target:ut(e).entries,index:0,kind:t})},"Iterator"),mr,h(function(){var e=ZE(this),t=e.target,i=e.index++;if(!t||i>=t.length)return e.target=null,lo(void 0,!0);var n=t[i];switch(e.kind){case"keys":return lo(n.key,!1);case"values":return lo(n.value,!1)}return lo([n.key,n.value],!1)},"next"),!0),zy=h(function(r){this.entries=[],this.url=null,r!==void 0&&(Py(r)?this.parseObject(r):this.parseQuery(typeof r=="string"?ho(r,0)==="?"?Vy(r,1):r:$e(r)))},"URLSearchParamsState");zy.prototype={type:mr,bindURL:h(function(r){this.url=r,this.update()},"bindURL"),parseObject:h(function(r){var e=this.entries,t=JE(r),i,n,s,o,l,a,c;if(t)for(i=Fy(r,t),n=i.next;!(s=oo(n,i)).done;){if(o=Fy(HE(s.value)),l=o.next,(a=oo(l,o)).done||(c=oo(l,o)).done||!oo(l,o).done)throw new eC("Expected sequence with length 2");ci(e,{key:$e(a.value),value:$e(c.value)})}else for(var f in r)zE(r,f)&&ci(e,{key:f,value:$e(r[f])})},"parseObject"),parseQuery:h(function(r){if(r)for(var e=this.entries,t=Ly(r,"&"),i=0,n,s;i<t.length;)n=t[i++],n.length&&(s=Ly(n,"="),ci(e,{key:Oy(sC(s)),value:Oy(Ey(s,"="))}))},"parseQuery"),serialize:h(function(){for(var r=this.entries,e=[],t=0,i;t<r.length;)i=r[t++],ci(e,_y(i.key)+"="+_y(i.value));return Ey(e,"&")},"serialize"),update:h(function(){this.entries.length=0,this.parseQuery(this.url.query)},"update"),updateURL:h(function(){this.url&&this.url.update()},"updateURL")};var fo=h(function(){My(this,pr);var e=arguments.length>0?arguments[0]:void 0,t=$y(this,new zy(e));mn||(this.size=t.entries.length)},"URLSearchParams"),pr=fo.prototype;$E(pr,{append:h(function(e,t){var i=ut(this);dr(arguments.length,2),ci(i.entries,{key:$e(e),value:$e(t)}),mn||this.length++,i.updateURL()},"append"),delete:h(function(r){for(var e=ut(this),t=dr(arguments.length,1),i=e.entries,n=$e(r),s=t<2?void 0:arguments[1],o=s===void 0?s:$e(s),l=0;l<i.length;){var a=i[l];if(a.key===n&&(o===void 0||a.value===o)){if(Cy(i,l,1),o!==void 0)break}else l++}mn||(this.size=i.length),e.updateURL()},"delete"),get:h(function(e){var t=ut(this).entries;dr(arguments.length,1);for(var i=$e(e),n=0;n<t.length;n++)if(t[n].key===i)return t[n].value;return null},"get"),getAll:h(function(e){var t=ut(this).entries;dr(arguments.length,1);for(var i=$e(e),n=[],s=0;s<t.length;s++)t[s].key===i&&ci(n,t[s].value);return n},"getAll"),has:h(function(e){for(var t=ut(this).entries,i=dr(arguments.length,1),n=$e(e),s=i<2?void 0:arguments[1],o=s===void 0?s:$e(s),l=0;l<t.length;){var a=t[l++];if(a.key===n&&(o===void 0||a.value===o))return!0}return!1},"has"),set:h(function(e,t){var i=ut(this);dr(arguments.length,1);for(var n=i.entries,s=!1,o=$e(e),l=$e(t),a=0,c;a<n.length;a++)c=n[a],c.key===o&&(s?Cy(n,a--,1):(s=!0,c.value=l));s||ci(n,{key:o,value:l}),mn||(this.size=n.length),i.updateURL()},"set"),sort:h(function(){var e=ut(this);XE(e.entries,function(t,i){return t.key>i.key?1:-1}),e.updateURL()},"sort"),forEach:h(function(e){for(var t=ut(this).entries,i=WE(e,arguments.length>1?arguments[1]:void 0),n=0,s;n<t.length;)s=t[n++],i(s.value,s.key,this)},"forEach"),keys:h(function(){return new Lh(this,"keys")},"keys"),values:h(function(){return new Lh(this,"values")},"values"),entries:h(function(){return new Lh(this,"entries")},"entries")},{enumerable:!0});Ay(pr,KE,pr.entries,{name:"entries"});Ay(pr,"toString",h(function(){return ut(this).serialize()},"toString"),{enumerable:!0});mn&&IE(pr,"size",{get:h(function(){return ut(this).entries.length},"size"),configurable:!0,enumerable:!0});qE(fo,mr);Oh({global:!0,constructor:!0,forced:!Ry},{URLSearchParams:fo});!Ry&&Bh(gn)&&(Ty=Ct(By.has),Dy=Ct(By.set),Uh=h(function(r){if(Py(r)){var e=r.body,t;if(jE(e)===mr)return t=r.headers?new gn(r.headers):new gn,Ty(t,"content-type")||Dy(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),YE(r,{body:Sy(0,$e(e)),headers:Sy(0,t)})}return r},"wrapRequestOptions"),Bh(Qy)&&Oh({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:h(function(e){return Qy(e,arguments.length>1?Uh(arguments[1]):{})},"fetch")}),Bh(co)&&(ao=h(function(e){return My(this,Eh),new co(e,arguments.length>1?Uh(arguments[1]):{})},"Request"),Eh.constructor=ao,ao.prototype=Eh,Oh({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:ao})));var Ty,Dy,Uh,ao;Wy.exports={URLSearchParams:fo,getState:ut}});var Hy=F(()=>{"use strict";jy()});var p6=Es(Q0()),m6=Es(q0()),g6=Es(ib()),b6=Es(Hy());function Ce(){}h(Ce,"noop");function pC(r,e){for(let t in e)r[t]=e[t];return r}h(pC,"assign");function Ph(r){return r()}h(Ph,"run");function Yy(){return Object.create(null)}h(Yy,"blank_object");function At(r){r.forEach(Ph)}h(At,"run_all");function po(r){return typeof r=="function"}h(po,"is_function");function oe(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}h(oe,"safe_not_equal");function Jy(r){return Object.keys(r).length===0}h(Jy,"is_empty");function fi(r,e,t,i){if(r){let n=Gy(r,e,t,i);return r[0](n)}}h(fi,"create_slot");function Gy(r,e,t,i){return r[1]&&i?pC(t.ctx.slice(),r[1](i(e))):t.ctx}h(Gy,"get_slot_context");function ui(r,e,t,i){if(r[2]&&i){let n=r[2](i(t));if(e.dirty===void 0)return n;if(typeof n=="object"){let s=[],o=Math.max(e.dirty.length,n.length);for(let l=0;l<o;l+=1)s[l]=e.dirty[l]|n[l];return s}return e.dirty|n}return e.dirty}h(ui,"get_slot_changes");function di(r,e,t,i,n,s){if(n){let o=Gy(e,t,i,s);r.p(o,n)}}h(di,"update_slot_base");function pi(r){if(r.ctx.length>32){let e=[],t=r.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}h(pi,"get_all_dirty_from_scope");function Xy(r){let e={};for(let t in r)e[t]=!0;return e}h(Xy,"compute_slots");var Ky=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global,mo=class mo{constructor(e){this.options=e,this._listeners="WeakMap"in Ky?new WeakMap:void 0}observe(e,t){return this._listeners.set(e,t),this._getObserver().observe(e,this.options),()=>{this._listeners.delete(e),this._observer.unobserve(e)}}_getObserver(){var e;return(e=this._observer)!==null&&e!==void 0?e:this._observer=new ResizeObserver(t=>{var i;for(let n of t)mo.entries.set(n.target,n),(i=this._listeners.get(n.target))===null||i===void 0||i(n)})}};h(mo,"ResizeObserverSingleton");var Nh=mo;Nh.entries="WeakMap"in Ky?new WeakMap:void 0;var Zy=!1;function mC(){Zy=!0}h(mC,"start_hydrating");function gC(){Zy=!1}h(gC,"end_hydrating");function q(r,e){r.appendChild(e)}h(q,"append");function k(r,e,t){r.insertBefore(e,t||null)}h(k,"insert");function x(r){r.parentNode&&r.parentNode.removeChild(r)}h(x,"detach");function vn(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}h(vn,"destroy_each");function D(r){return document.createElement(r)}h(D,"element");function Mt(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}h(Mt,"svg_element");function j(r){return document.createTextNode(r)}h(j,"text");function $(){return j(" ")}h($,"space");function ei(){return j("")}h(ei,"empty");function xe(r,e,t,i){return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}h(xe,"listen");function S(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}h(S,"attr");function e1(r){let e;return{p(...t){e=t,e.forEach(i=>r.push(i))},r(){e.forEach(t=>r.splice(r.indexOf(t),1))}}}h(e1,"init_binding_group");function Lt(r){return r===""?null:+r}h(Lt,"to_number");function bC(r){return Array.from(r.childNodes)}h(bC,"children");function qe(r,e){e=""+e,r.data!==e&&(r.data=e)}h(qe,"set_data");function ke(r,e){r.value=e==null?"":e}h(ke,"set_input_value");function xr(r,e,t){r.classList[t?"add":"remove"](e)}h(xr,"toggle_class");function yC(r,e,{bubbles:t=!1,cancelable:i=!1}={}){let n=document.createEvent("CustomEvent");return n.initCustomEvent(r,t,i,e),n}h(yC,"custom_event");var yn;function bn(r){yn=r}h(bn,"set_current_component");function t1(){if(!yn)throw new Error("Function called outside component initialization");return yn}h(t1,"get_current_component");function Ih(r){t1().$$.on_mount.push(r)}h(Ih,"onMount");function Oi(){let r=t1();return(e,t,{cancelable:i=!1}={})=>{let n=r.$$.callbacks[e];if(n){let s=yC(e,t,{cancelable:i});return n.slice().forEach(o=>{o.call(r,s)}),!s.defaultPrevented}return!0}}h(Oi,"createEventDispatcher");var br=[];var Y=[],yr=[],Rh=[],vC=Promise.resolve(),Ah=!1;function xC(){Ah||(Ah=!0,vC.then(i1))}h(xC,"schedule_update");function Mh(r){yr.push(r)}h(Mh,"add_render_callback");function X(r){Rh.push(r)}h(X,"add_flush_callback");var Dh=new Set,gr=0;function i1(){if(gr!==0)return;let r=yn;do{try{for(;gr<br.length;){let e=br[gr];gr++,bn(e),kC(e.$$)}}catch(e){throw br.length=0,gr=0,e}for(bn(null),br.length=0,gr=0;Y.length;)Y.pop()();for(let e=0;e<yr.length;e+=1){let t=yr[e];Dh.has(t)||(Dh.add(t),t())}yr.length=0}while(br.length);for(;Rh.length;)Rh.pop()();Ah=!1,Dh.clear(),bn(r)}h(i1,"flush");function kC(r){if(r.fragment!==null){r.update(),At(r.before_update);let e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Mh)}}h(kC,"update");function wC(r){let e=[],t=[];yr.forEach(i=>r.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),yr=e}h(wC,"flush_render_callbacks");var uo=new Set,Ui;function ti(){Ui={r:0,c:[],p:Ui}}h(ti,"group_outros");function ii(){Ui.r||At(Ui.c),Ui=Ui.p}h(ii,"check_outros");function C(r,e){r&&r.i&&(uo.delete(r),r.i(e))}h(C,"transition_in");function L(r,e,t,i){if(r&&r.o){if(uo.has(r))return;uo.add(r),Ui.c.push(()=>{uo.delete(r),i&&(t&&r.d(1),i())}),r.o(e)}else i&&i()}h(L,"transition_out");var SC=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"],kN=new Set([...SC]);var wN=new RegExp("[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]","u");function K(r,e,t){let i=r.$$.props[e];i!==void 0&&(r.$$.bound[i]=t,t(r.$$.ctx[i]))}h(K,"bind");function A(r){r&&r.c()}h(A,"create_component");function R(r,e,t,i){let{fragment:n,after_update:s}=r.$$;n&&n.m(e,t),i||Mh(()=>{let o=r.$$.on_mount.map(Ph).filter(po);r.$$.on_destroy?r.$$.on_destroy.push(...o):At(o),r.$$.on_mount=[]}),s.forEach(Mh)}h(R,"mount_component");function N(r,e){let t=r.$$;t.fragment!==null&&(wC(t.after_update),At(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}h(N,"destroy_component");function FC(r,e){r.$$.dirty[0]===-1&&(br.push(r),xC(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}h(FC,"make_dirty");function le(r,e,t,i,n,s,o,l=[-1]){let a=yn;bn(r);let c=r.$$={fragment:null,ctx:[],props:s,update:Ce,not_equal:n,bound:Yy(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:Yy(),dirty:l,skip_bound:!1,root:e.target||a.$$.root};o&&o(c.root);let f=!1;if(c.ctx=t?t(r,e.props||{},(u,d,...p)=>{let m=p.length?p[0]:d;return c.ctx&&n(c.ctx[u],c.ctx[u]=m)&&(!c.skip_bound&&c.bound[u]&&c.bound[u](m),f&&FC(r,u)),d}):[],c.update(),f=!0,At(c.before_update),c.fragment=i?i(c.ctx):!1,e.target){if(e.hydrate){mC();let u=bC(e.target);c.fragment&&c.fragment.l(u),u.forEach(x)}else c.fragment&&c.fragment.c();e.intro&&C(r.$$.fragment),R(r,e.target,e.anchor,e.customElement),gC(),i1()}bn(a)}h(le,"init");var QC,vr;typeof HTMLElement=="function"&&(QC=(vr=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(Ph).filter(po);for(let t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(e,t,i){this[e]=i}disconnectedCallback(){At(this.$$.on_disconnect)}$destroy(){N(this,1),this.$destroy=Ce}$on(e,t){if(!po(t))return Ce;let i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}$set(e){this.$$set&&!Jy(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}},h(vr,"SvelteElement"),vr));var $h=class $h{$destroy(){N(this,1),this.$destroy=Ce}$on(e,t){if(!po(t))return Ce;let i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{let n=i.indexOf(t);n!==-1&&i.splice(n,1)}}$set(e){this.$$set&&!Jy(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};h($h,"SvelteComponent");var se=$h;var qh=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],r1=new Set(qh),n1={1:"jan",2:"feb",3:"mar",4:"apr",5:"may",6:"jun",7:"jul",8:"aug",9:"sep",10:"oct",11:"nov",12:"dec",jan:"jan",feb:"feb",mar:"mar",apr:"apr",may:"may",jun:"jun",jul:"jul",aug:"aug",sep:"sep",oct:"oct",nov:"nov",dec:"dec",january:"jan",february:"feb",march:"mar",april:"apr",june:"jun",july:"jul",august:"aug",september:"sep",october:"oct",november:"nov",december:"dec"};var bo=class bo{constructor(e,t,i=[]){this.kind=e;this.parent=t;this.children=i;this.type="block";t instanceof bo?t.children.push(this):t instanceof go&&t.args.push(this)}renderAsText(){return this.children.map(e=>e.renderAsText()).join("")}};h(bo,"BlockNode");var _i=bo,jh=class jh{constructor(e,t=""){this.parent=e;this.text=t;this.type="text";e.children.push(this)}renderAsText(){return this.text.replace(/"/g,"")}};h(jh,"TextNode");var Vh=jh,Hh=class Hh{constructor(e,t="",i=[]){this.parent=e;this.command=t;this.args=i;this.type="command";e.children.push(this)}renderAsText(){return this.args.map(e=>e.renderAsText()).join("")}};h(Hh,"CommandNode");var go=Hh;function kr(r){let e=new _i("root"),t=e;for(let i=0;i<r.length;i++){let n=r[i];if(!n)break;switch(t.type){case"block":{n==="\\"?t=new go(t):n==="{"?t=new _i("curly",t):(n==="}"&&t.kind==="curly"||n==="]"&&t.kind==="square")&&t.parent?t=t.parent:t=new Vh(t,n);break}case"text":{n==="\\"||n==="{"||n==="}"&&t.parent.kind==="curly"||n==="]"&&t.parent.kind==="square"?(t=t.parent,i--):t.text+=n;break}case"command":n==="{"?t=new _i("curly",t):n==="["?t=new _i("square",t):n==="}"&&t.parent.kind==="curly"||n==="]"&&t.parent.kind==="square"||/\s/.test(n)||t.args.length>0?(t=t.parent,i--):t.command+=n}}return e}h(kr,"parseLaTeX");function yo(r){return zh(r)}h(yo,"stringifyLaTeX");function zh(r){let e=r.children.map(t=>{switch(t.type){case"block":return zh(t);case"command":return BC(t);case"text":return t.text}}).join("");switch(r.kind){case"root":return e;case"curly":return"{".concat(e,"}");case"square":return"[".concat(e,"]")}}h(zh,"stringifyBlock");function BC(r){return"\\".concat(r.command).concat(r.args.map(zh).join(""))}h(BC,"stringifyCommand");function Wh(r){let e=new _i(r.kind);for(let t of r.children)if(t.type==="block"&&t.kind==="curly"&&t.children.every(i=>i.type!=="command")){let i=Wh(t);e.children.push(...i.children)}else e.children.push(t);return e}h(Wh,"flattenLaTeX");function wr(r){return r.replace(/[^0-9A-Za-z]/g,"").toLocaleLowerCase()}h(wr,"alphaNum");function s1(r){return r.replace(/\r\n?/g,"\n")}h(s1,"convertCRLF");function o1(r,e){let t=r.split(" "),i=[],n="";for(let[s,o]of t.entries())n.length+o.length+1>e&&s>0&&(i.push(n.trim()),n=""),n+="".concat(o," ");return[...i,n.trim()]}h(o1,"wrapText");function l1(r){return r.replace(/\s*\n\s*\n\s*/g,"<<BIBTEX_TIDY_PARA>>").replace(/\s*\n\s*/g," ").replace(/<<BIBTEX_TIDY_PARA>>/g,"\n\n")}h(l1,"unwrapText");function Yh(r){var n,s,o,l;let e=kr(r),t=e.children.length===1&&((n=e.children[0])==null?void 0:n.type)==="block"&&((s=e.children[0])==null?void 0:s.kind)==="curly"&&e.children[0].children.length===1&&((o=e.children[0].children[0])==null?void 0:o.type)==="block"&&((l=e.children[0].children[0])==null?void 0:l.kind)==="curly",i=yo(e);return t?i:"{".concat(i,"}")}h(Yh,"doubleEnclose");function Jh(r){var e;return r.type!=="text"&&((e=r.block)==null?void 0:e.type)==="entry"}h(Jh,"isEntryNode");function h1(r,e,t){let{omit:i,tab:n,space:s}=e,o=n?" ":" ".repeat(s),l=new Set(i),a=r.children.map(c=>EC(c,e,o,l,t)).join("").trimEnd();return a.endsWith("\n")||(a+="\n"),a}h(h1,"formatBibtex");function EC(r,e,t,i,n){if(r.type==="text")return a1(r.text,e);if(!r.block)throw new Error("FATAL!");switch(r.block.type){case"preamble":case"string":return"".concat(r.block.raw,"\n").concat(e.blankLines?"\n":"");case"comment":return a1(r.block.raw,e);case"entry":return CC(r.command,r.block,e,t,i,n==null?void 0:n.get(r.block))+(e.blankLines?"\n":"")}}h(EC,"formatNode");function CC(r,e,t,i,n,s){let{align:o,trailingCommas:l,removeDuplicateFields:a,removeEmptyFields:c,lowercase:f}=t,u="",d=f?r.toLocaleLowerCase():r;u+="@".concat(d,"{");let p=s!=null?s:e.key;p&&(u+="".concat(p,","));let m=new Set;for(let[y,g]of e.fields.entries()){let b=g.name.toLocaleLowerCase(),v=f?b:g.name;if(g.name!==""&&!n.has(b)&&!(a&&m.has(b))){if(m.add(b),g.value.concat.length===0){if(c)continue;u+="\n".concat(i).concat(v)}else{let w=Gh(g,t);if(c&&(w==="{}"||w==='""'))continue;u+="\n".concat(i).concat(v.trim().padEnd(o-1)," = ").concat(w)}(y<e.fields.length-1||l)&&(u+=",")}}return u+="\n}\n",u}h(CC,"formatEntry");function a1(r,{stripComments:e,tidyComments:t}){if(e)return"";if(t){let i=r.trim();return i===""?"":"".concat(i,"\n")}return r.replace(/^[ \t]*\n|[ \t]*$/g,"")}h(a1,"formatComment");function Gh(r,e){let{curly:t,numeric:i,align:n,wrap:s,tab:o,space:l,enclosingBraces:a}=e,c=r.name.toLocaleLowerCase(),f=o?" ":" ".repeat(l),u=new Set((a!=null?a:[]).map(d=>d.toLocaleLowerCase()));return r.value.concat.map(({type:d,value:p})=>{let m=p.match(/^[1-9][0-9]*$/);if(m&&t&&(d="braced"),d==="literal"||i&&m)return p;let y=p.slice(0,3).toLowerCase(),g=c==="month"&&r1.has(y);if(!t&&i&&g)return y;if(p=l1(p),u.has(c)&&(d==="braced"||t)&&(p=Yh(p)),d==="braced"&&r.value.concat.length===1&&(p=p.trim()),d==="braced"||t){let b="".concat(f).concat(n,"{").concat(p,"}").length,v=p.includes("\n\n");if(s&&b>s||v){let w=p.split("\n\n"),B=f.repeat(2);if(s){let E=s;w=w.map(T=>o1(T,E-B.length).join("\n".concat(B)))}p="\n".concat(B).concat(w.join("\n\n".concat(B)),"\n").concat(f)}return Yh(p)}return'"'.concat(p,'"')}).join(" # ")}h(Gh,"formatValue");var c1=["doi","citation","abstract"];var vo=["title","shorttitle","author","year","month","day","journal","booktitle","location","on","publisher","address","series","volume","number","pages","doi","isbn","issn","url","urldate","copyright","category","note","metadata"],Xh=["key"],f1="[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]",Sr=[{key:"help",cli:{"--help":!0,"-h":!0},title:"Help",description:["Show help"],type:"boolean"},{key:"v2",cli:{"--v2":!0},title:"Enable planned v2 CLI changes",description:["Input files will no longer be modified by default. Instead, you will need to specify `--modify`/`-m` option to overwrite the file, or `--output`/`-o` to output to a different file."],type:"string",defaultValue:void 0},{key:"outputPath",cli:{"--output":h(r=>r[0],"--output"),"-o":h(r=>r[0],"-o")},title:"Output path",description:["Write output to specified path. When omitted (and -m/--modify is not used), the result will be printed to stdout."],type:"string",defaultValue:void 0},{key:"modify",cli:{"--modify":!0,"-m":!0,"--no-modify":!1},title:"Modify input files",description:["Overwrite the original input files with the tidied result. This is enabled by default but will be disabled by default in v2. For v1, use --no-modify to output to stdout instead of overwriting the input files."],type:"boolean",defaultValue:!0},{key:"omit",cli:{"--omit":h(r=>(r.length===0&&(console.error("Expected a omit list"),process.exit(1)),r),"--omit")},toCLI:h(r=>Array.isArray(r)&&r.length>0?"--omit=".concat(r.join(",")):void 0,"toCLI"),title:"Remove fields",description:["Remove specified fields from bibliography entries."],examples:["--omit=id,name"],type:"string[]",defaultValue:[]},{key:"curly",cli:{"--curly":!0,"--no-curly":!1},toCLI:h(r=>r?"--curly":void 0,"toCLI"),title:"Enclose values in braces",description:['Enclose all property values in braces. Quoted values will be converted to braces. For example, "Journal of Tea" will become {Journal of Tea}.'],type:"boolean",defaultValue:!1},{key:"numeric",cli:{"--numeric":!0,"--no-numeric":!1},toCLI:h(r=>r?"--numeric":void 0,"toCLI"),title:"Use numeric values where possible",description:["Strip quotes and braces from numeric/month values. For example, {1998} will become 1998."],type:"boolean",defaultValue:!1},{key:"months",cli:{"--months":!0},toCLI:h(r=>r?"--months":void 0,"toCLI"),title:"Abbreviate months",description:["Convert all months to three letter abbreviations (jan, feb, etc)."],type:"boolean",defaultValue:!1},{key:"space",cli:{"--space":h(r=>r.length>0?Number(r[0]):!0,"--space")},toCLI:h((r,e)=>{if(!e.tab){if(typeof r=="number"&&r!==2)return"--space=".concat(r);if(r&&r!==2)return"--space"}},"toCLI"),title:"Indent with spaces",description:["Indent all fields with the specified number of spaces. Ignored if tab is set."],examples:["--space=2 (default)","--space=4"],type:"boolean | number",convertBoolean:{true:2,false:void 0},defaultValue:2},{key:"tab",cli:{"--tab":!0,"--no-tab":!1},toCLI:h(r=>r?"--tab":void 0,"toCLI"),title:"Indent with tabs",description:["Indent all fields with a tab."],type:"boolean",defaultValue:!1},{key:"align",cli:{"--align":h(r=>Number(r[0]),"--align"),"--no-align":!1},toCLI:h(r=>{if(r===!1||r===1||r===0)return"--no-align";if(typeof r=="number"&&r!==14)return"--align=".concat(r)},"toCLI"),title:"Align values",description:["Insert whitespace between fields and values so that values are visually aligned."],examples:["--align=14 (default)"],type:"boolean | number",convertBoolean:{true:14,false:1},defaultValue:14},{key:"blankLines",cli:{"--blank-lines":!0,"--no-blank-lines":!1},toCLI:h(r=>r?"--blank-lines":void 0,"toCLI"),title:"Insert blank lines",description:["Insert an empty line between each entry."],type:"boolean"},{key:"sort",cli:{"--sort":h(r=>r.length>0?r:!0,"--sort"),"--no-sort":!1},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return"--sort=".concat(r.join(","));if(r===!0)return"--sort"},"toCLI"),title:"Sort bibliography entries",description:["Sort entries by the specified field names (citation key is used if no fields are specified). For descending order, prefix the field with a dash (-).","Multiple fields may be specified to sort everything by first field, then by the second field whenever the first field for entries are equal, etc.","The following additional fields are also permitted: key (entry citation key), type (sorts by the type of entry, e.g. article), and special (ensures that @string, @preamble, @set, and @xdata entries are first). "],examples:["--sort (sort by citation key)","--sort=-year,name (sort year descending then name ascending)","--sort=name,year"],type:"boolean | string[]",convertBoolean:{true:Xh,false:void 0}},{key:"duplicates",cli:{"--duplicates":h(r=>{if(r.length===0)return!0;for(let e of r)e!=="doi"&&e!=="key"&&e!=="abstract"&&e!=="citation"&&(console.error('Invalid key for merge option: "'.concat(e,'"')),process.exit(1));return r},"--duplicates")},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return"--duplicates=".concat(r.join(","));if(r===!0)return"--duplicates"},"toCLI"),title:"Check for duplicates",description:["Warn if duplicates are found, which are entries where DOI, abstract, or author and title are the same."],examples:["--duplicates doi (same DOIs)","--duplicates key (same IDs)","--duplicates abstract (similar abstracts)","--duplicates citation (similar author and titles)","--duplicates doi, key (identical DOI or keys)","--duplicates (same DOI, key, abstract, or citation)"],type:"boolean | ('doi' | 'key' | 'abstract' | 'citation')[]",convertBoolean:{true:c1,false:void 0},defaultValue:h(r=>r.merge?c1:void 0,"defaultValue")},{key:"merge",cli:{"--merge":h(r=>r.length===0?!0:(r[0]!=="first"&&r[0]!=="last"&&r[0]!=="combine"&&r[0]!=="overwrite"&&(console.error('Invalid merge strategy: "'.concat(r[0],'"')),process.exit(1)),r[0]),"--merge"),"--no-merge":!1},toCLI:h(r=>{if(typeof r=="string")return"--merge=".concat(r);if(r)return"--merge"},"toCLI"),title:"Merge duplicate entries",description:["Merge duplicates entries. Use the duplicates option to determine how duplicates are identified. There are different ways to merge:","- first: only keep the original entry","- last: only keep the last found duplicate","- combine: keep original entry and merge in fields of duplicates if they do not already exist","- overwrite: keep original entry and merge in fields of duplicates, overwriting existing fields if they exist"],type:"boolean | 'first' | 'last' | 'combine' | 'overwrite'",convertBoolean:{true:"combine",false:void 0}},{key:"stripEnclosingBraces",cli:{"--strip-enclosing-braces":!0},toCLI:h(r=>r?"--strip-enclosing-braces":void 0,"toCLI"),title:"Strip double-braced values",description:["Where an entire value is enclosed in double braces, remove the extra braces. For example, {{Journal of Tea}} will become {Journal of Tea}."],type:"boolean",defaultValue:!1},{key:"dropAllCaps",cli:{"--drop-all-caps":!0},toCLI:h(r=>r?"--drop-all-caps":void 0,"toCLI"),title:"Drop all caps",description:["Where values are all caps, make them title case. For example, {JOURNAL OF TEA} will become {Journal of Tea}. Roman numerals will be left unchanged."],type:"boolean",defaultValue:!1},{key:"escape",cli:{"--escape":!0,"--no-escape":!1},toCLI:h(r=>r===!1?"--no-escape":void 0,"toCLI"),title:"Escape special characters",description:["Escape special characters, such as umlaut. This ensures correct typesetting with latex. Enabled by default."],type:"boolean",defaultValue:!0},{key:"sortFields",cli:{"--sort-fields":h(r=>r.length>0?r:!0,"--sort-fields")},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return JSON.stringify(r)===JSON.stringify(vo)?"--sort-fields":"--sort-fields=".concat(r.join(","));if(r===!0)return"--sort-fields"},"toCLI"),title:"Sort fields",description:["Sort the fields within entries.","If no fields are specified fields will be sorted by: title, shorttitle, author, year, month, day, journal, booktitle, location, on, publisher, address, series, volume, number, pages, doi, isbn, issn, url, urldate, copyright, category, note, metadata"],examples:["--sort-fields=name,author"],type:"boolean | string[]",convertBoolean:{true:vo,false:void 0},defaultValue:void 0},{key:"sortProperties",cli:{"--sort-properties":h(r=>r.length>0?r:!0,"--sort-properties")},title:"Sort properties",description:["Alias of sort fields (legacy)"],type:"boolean | string[]",deprecated:!0},{key:"stripComments",cli:{"--strip-comments":!0,"--no-strip-comments":!1},toCLI:h(r=>r?"--strip-comments":void 0,"toCLI"),title:"Remove comments",description:["Remove all comments from the bibtex source."],type:"boolean",defaultValue:!1},{key:"trailingCommas",cli:{"--trailing-commas":!0,"--no-trailing-commas":!0},toCLI:h(r=>r?"--trailing-commas":void 0,"toCLI"),title:"Trailing commas",description:["End the last key value pair in each entry with a comma."],type:"boolean",defaultValue:!1},{key:"encodeUrls",cli:{"--encode-urls":!0,"--no-encode-urls":!0},toCLI:h(r=>r?"--encode-urls":void 0,"toCLI"),title:"Encode URLs",description:["Replace invalid URL characters with percent encoded values."],type:"boolean",defaultValue:!1},{key:"tidyComments",cli:{"--tidy-comments":!0,"--no-tidy-comments":!1},toCLI:h(r=>r===!1?"--no-tidy-comments":void 0,"toCLI"),title:"Tidy comments",description:["Remove whitespace surrounding comments."],type:"boolean",defaultValue:!0},{key:"removeEmptyFields",cli:{"--remove-empty-fields":!0,"--no-remove-empty-fields":!1},toCLI:h(r=>r?"--remove-empty-fields":void 0,"toCLI"),title:"Remove empty fields",description:["Remove any fields that have empty values."],type:"boolean",defaultValue:!1},{key:"removeDuplicateFields",cli:{"--remove-dupe-fields":!0,"--no-remove-dupe-fields":!1},toCLI:h(r=>r===!1?"--no-remove-dupe-fields":void 0,"toCLI"),title:"Remove duplicate fields",description:["Only allow one of each field in each entry. Enabled by default."],type:"boolean",defaultValue:!0},{key:"generateKeys",cli:{"--generate-keys":h(r=>r.length>0?r:!0,"--generate-keys")},toCLI:h(r=>{if(r===!0||r===f1)return"--generate-keys";if(typeof r=="string")return'--generate-keys="'.concat(r.replace(/"/g,'\\"'),'"')},"toCLI"),title:"Generate citation keys [Experimental]",description:["For all entries replace the key with a new key of the form <author><year><title>. A JabRef citation pattern can be provided. This is an experimental option that may change without warning."],type:"boolean | string",convertBoolean:{true:f1,false:void 0},defaultValue:void 0},{key:"maxAuthors",cli:{"--max-authors":h(r=>Number(r[0]),"--max-authors")},toCLI:h(r=>r?"--max-authors=".concat(r):void 0,"toCLI"),title:"Maximum authors",description:['Truncate authors if above a given number into "and others".'],type:"number"},{key:"lowercase",cli:{"--no-lowercase":!1},toCLI:h(r=>r===!1?"--no-lowercase":void 0,"toCLI"),title:"Lowercase fields",description:["Lowercase field names and entry type. Enabled by default."],type:"boolean",defaultValue:!0},{key:"enclosingBraces",cli:{"--enclosing-braces":h(r=>r.length>0?r:!0,"--enclosing-braces")},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return"--enclosing-braces=".concat(r.join(","));if(r===!0)return"--enclosing-braces"},"toCLI"),title:"Enclose values in double braces",description:["Enclose the given fields in double braces, such that case is preserved during BibTeX compilation."],examples:["--enclosing-braces=title,journal (output title and journal fields will be of the form {{This is a title}})","--enclosing-braces (equivalent to ---enclosing-braces=title)"],type:"boolean | string[]",convertBoolean:{true:["title"],false:void 0}},{key:"removeBraces",cli:{"--remove-braces":h(r=>r.length>0?r:!0,"--remove-braces")},toCLI:h(r=>{if(Array.isArray(r)&&r.length>0)return"--remove-braces=".concat(r.join(","));if(r===!0)return"--remove-braces"},"toCLI"),title:"Remove braces",description:["Remove any curly braces within the value, unless they are part of a command."],examples:["--remove-braces=title,journal","--remove-braces (equivalent to ---remove-braces=title)"],type:"boolean | string[]",convertBoolean:{true:["title"],false:void 0}},{key:"wrap",cli:{"--wrap":h(r=>r.length>0?Number(r[0]):!0,"--wrap"),"--no-wrap":!1},toCLI:h(r=>r?"--wrap=".concat(r):void 0,"toCLI"),title:"Wrap values",description:["Wrap long values at the given column"],examples:["--wrap (80 by default)","--wrap=82"],type:"boolean | number",convertBoolean:{true:80,false:void 0}},{key:"version",cli:{"--version":!0,"-v":!0},title:"Version",description:["Show bibtex-tidy version."],type:"boolean"},{key:"quiet",cli:{"--quiet":!0},title:"Quiet",description:["Suppress logs on stdout."],type:"boolean"},{key:"backup",cli:{"--backup":!0,"--no-backup":!1},title:"Backup",description:["Make a backup <filename>.original. Enabled by default (unless --modify is explicitly provided or outputting to a different file/stdio). Deprecated but provided for backward compatibility."],type:"boolean",defaultValue:!0,deprecated:!0}];function Ti(r){return Object.fromEntries(Sr.map(e=>{let t=e.key,i=r[t];return e.convertBoolean&&typeof i=="boolean"?[t,i?e.convertBoolean.true:e.convertBoolean.false]:typeof i>"u"&&e.defaultValue!==void 0?typeof e.defaultValue=="function"?[t,e.defaultValue(r)]:[t,e.defaultValue]:[t,i]}))}h(Ti,"normalizeOptions");var Kh=class Kh{constructor(e=Ti({})){this.tidyOptions=e;this.valueLookup=new Map;this.fieldLookup=new Map;this.renderValueLookup=new Map}lookupEntryValue(e,t){var s,o;let i=t.toLocaleLowerCase(),n=(s=this.valueLookup.get(e))==null?void 0:s.get(t);if(n===void 0){let l=this.lookupField(e,i);l?n=(o=Gh(l,this.tidyOptions))!=null?o:"":n="",this.valueLookup.set(e,new Map([[i,n]]))}return n}invalidateEntryValue(e,t){var i,n;(i=this.valueLookup.get(e))==null||i.delete(t.toLocaleLowerCase()),(n=this.renderValueLookup.get(e))==null||n.delete(t.toLocaleLowerCase())}lookupField(e,t){var n;let i=(n=this.fieldLookup.get(e))==null?void 0:n.get(t);return i===void 0&&(i=e.fields.find(s=>s.name.toLocaleLowerCase()===t)),i}lookupRenderedEntryValue(e,t){var s;let i=t.toLocaleLowerCase(),n=(s=this.renderValueLookup.get(e))==null?void 0:s.get(t);if(n===void 0){let o=this.lookupEntryValue(e,i);n=kr(o).renderAsText(),this.renderValueLookup.set(e,new Map([[i,n]]))}return n}lookupRenderedEntryValues(e){let t=new Map;for(let i of e.fields)t.set(i.name,this.lookupRenderedEntryValue(e,i.name));return t}};h(Kh,"Cache");var xo=Kh;function Di(r){return r.split(/\s+and\s+/i).map(UC)}h(Di,"parseNameList");function LC(r){let e=r.filter(n=>n.type==="name"),t=r.filter(n=>n.type==="prefix"),i=r.filter(n=>n.type==="comma");if(r.length===0)return"Empty";if(r.length===1&&Ze(r)==="others")return"Others";if(r.length===e.length&&r.length===1)return"LastName";if(r.length===e.length)return"FirstName LastNames";if(t.length>0&&i.length===0)return"FirstNames Prefixes LastNames";if(i.length===1)return"LastNames, FirstNames Prefixes";if(i.length===2)return"LastNames, Suffixes, FirstNames Prefixes";throw new Error("Invalid name syntax: ".concat(r.map(n=>n.type).join(" ")))}h(LC,"detectNameSyntax");function UC(r){let e=OC(r);switch(LC(e)){case"Empty":return{first:"",last:"",pre:"",suf:""};case"Others":return{first:"",last:"others",pre:"",suf:""};case"LastName":return{first:"",last:Ze(e),pre:"",suf:""};case"FirstName LastNames":{let[t,i]=ko(e,["name","name"]);return{first:Ze(t),last:Ze(i),pre:"",suf:""}}case"FirstNames Prefixes LastNames":{let[t,i,n]=ko(e,["name","prefix","name"]);return{first:Ze(t),pre:Ze(i),last:Ze(n),suf:""}}case"LastNames, FirstNames Prefixes":{let[t,i,n]=ko(e,["name","comma","prefix"]);return{last:Ze(t),first:Ze(i),pre:Ze(n),suf:""}}case"LastNames, Suffixes, FirstNames Prefixes":{let[t,i,n,s]=ko(e,["name","comma","comma","prefix"]);return{last:Ze(t),suf:Ze(i),first:Ze(n),pre:Ze(s)}}}}h(UC,"parseName");function OC(r){let e=[],t="";function i(){t&&e.push({type:_C(t)?"prefix":"name",value:t})}h(i,"flushToken");for(let n of r)n===","?(i(),e.push({type:"comma"}),t=""):/\s/.test(n)?(i(),t=""):t+=n;return i(),e}h(OC,"tokeniseName");function Ze(r){return r.filter(e=>e.type!=="comma").map(e=>e.value).join(" ")}h(Ze,"nameStr");function _C(r){return/^[a-z]/.test(r)}h(_C,"isPrefixToken");function ko(r,e){var n;let t=e.map(()=>[]),i=-1;for(let s of r)e[i+1]===s.type&&i++,(n=t[i])==null||n.push(s);return t}h(ko,"partition");function u1(r,e,t,i){var u,d;let n=new Map;if(t)for(let p of t)n.set(p,!!i);n.has("key")||n.set("key",!1);let s=new Set,o=[],l=new Map,a=new Map,c=new Map,f=new Map;for(let p of r)for(let[m,y]of n){let g,b;switch(m){case"key":{if(!p.key)continue;let v=p.key.toLocaleLowerCase();g=l.get(v),g?b="The citation key ".concat(p.key," has already been used."):l.set(v,p);break}case"doi":{let v=wr(e.lookupEntryValue(p,"doi"));if(!v)continue;g=a.get(v),g?b="Entry ".concat(p.key," has an identical DOI to entry ").concat(g.key,"."):a.set(v,p);break}case"citation":{let v=e.lookupEntryValue(p,"title"),w=e.lookupEntryValue(p,"author"),B=e.lookupEntryValue(p,"number");if(!v||!w)continue;let E=[wr((d=(u=Di(w)[0])==null?void 0:u.last)!=null?d:w),wr(v),wr(B!=null?B:"0")].join(":");g=c.get(E),g?b="Entry ".concat(p.key," has similar content to entry ").concat(g.key,"."):c.set(E,p);break}case"abstract":{let w=wr(e.lookupEntryValue(p,"abstract")).slice(0,100);if(!w)continue;g=f.get(w),g?b="Entry ".concat(p.key," has a similar abstract to entry ").concat(g.key,"."):f.set(w,p);break}}g&&y&&(s.add(p),TC(i,g,p)),b&&o.push({code:"DUPLICATE_ENTRY",rule:m,message:"Duplicate ".concat(y?"removed":"detected",". ").concat(b)})}return{entries:s,warnings:o}}h(u1,"checkForDuplicates");function TC(r,e,t){if(r)switch(r){case"last":e.key=t.key,e.fields=t.fields;break;case"combine":case"overwrite":for(let i of t.fields){let n=e.fields.find(s=>s.name.toLocaleLowerCase()===i.name.toLocaleLowerCase());n?r==="overwrite"&&(n.value=i.value):e.fields.push(i)}break;case"first":return}}h(TC,"mergeEntries");function d1(r){let e=[],t=r.matchAll(/\[[^:\]]+(?::[^:\]]+)*\]/g),i=0;for(let n of t){if(n.index===void 0)break;n.index!==i&&e.push(r.slice(i,n.index));let[s,...o]=n[0].slice(1,-1).split(":");if(!s)throw new Error("Token parse error");let l,a=s.replace(/[0-9]+/g,c=>(l=Number(c),"N"));e.push({marker:a,parameter:l,modifiers:o}),i=n.index+n[0].length}return i<r.length&&e.push(r.slice(i)),e}h(d1,"parseEntryKeyTemplate");var DC={auth:{description:"Last name of first authors",callback:h(r=>{var i,n;let t=(n=Di((i=r.get("author"))!=null?i:"")[0])==null?void 0:n.last;return t?[t]:[]},"callback")},authEtAl:{description:"If 1 or 2 authors, both authors, otherwise first author and EtAl",callback:h(r=>{var t;let e=Di((t=r.get("author"))!=null?t:"");return[...e.slice(0,2).map(i=>i.last),...e.length>2?["Et","Al"]:[]]},"callback")},authors:{description:"Last name all authors",callback:h(r=>{var t;return Di((t=r.get("author"))!=null?t:"").map(i=>i.last)},"callback")},authorsN:{description:"Last name N authors, with EtAl if more",callback:h((r,e=0)=>{var i;let t=Di((i=r.get("author"))!=null?i:"");return[...t.slice(0,e).map(n=>n.last),...t.length>e?["Et","Al"]:[]]},"callback")},veryshorttitle:{description:"First non-function word of the title",callback:h(r=>m1(wo(r)).slice(0,1),"callback")},shorttitle:{description:"First three non-function words of the title",callback:h(r=>m1(wo(r)).slice(0,3),"callback")},title:{description:"Full title, capitalized",callback:h(r=>b1(Fo(wo(r))),"callback")},fulltitle:{description:"Full title, verbatim",callback:h(r=>Fo(wo(r)),"callback")},year:{description:"Year",callback:h(r=>{var t;let e=(t=r.get("year"))==null?void 0:t.replace(/[^0-9]/g,"");return e?[e]:[]},"callback")},duplicateLetter:{description:"If the multiple entries end up with the same key, then insert a letter a-z. By default this will be inserted at the end.",callback:h((r,e,t)=>[t?NC(t):""],"callback")},duplicateNumber:{description:"If the multiple entries end up with the same key, then insert a number.",callback:h((r,e,t)=>[t?String(t):""],"callback")}};function NC(r){return String.fromCharCode(96+r)}h(NC,"numToLetter");var RC={required:{description:"If data is missing, revert to existing key",callback:h(r=>{if(r.length===0)throw new So;return r},"callback")},lower:{description:"Convert to lowercase",callback:h(r=>r.map(e=>e.toLocaleLowerCase()),"callback")},upper:{description:"Convert to uppercase",callback:h(r=>r.map(e=>e.toLocaleUpperCase()),"callback")},capitalize:{description:"Capitalize first letter of each word",callback:b1}},Zh=class Zh extends Error{};h(Zh,"MissingRequiredData");var So=Zh;function g1(r,e,t){var l;let i=t;!t.includes("[duplicateLetter]")&&!t.includes("[duplicateNumber]")&&(i="".concat(t,"[duplicateLetter]"));let n=d1(i),s=new Map;for(let a of r){let c=e.lookupRenderedEntryValues(a),f=p1(c,n);if(!f)continue;let u=(l=s.get(f))!=null?l:[];u.push(a),s.set(f,u)}let o=new Map;for(let[a,c]of s){let f=c.length>1;for(let u=0;u<c.length;u++){let d=c[u];if(!d)continue;let p=e.lookupRenderedEntryValues(d),m=f?p1(p,n,u+1):a;m&&o.set(d,m)}}return o}h(g1,"generateKeys");function p1(r,e,t){try{let i=e.map(n=>{if(typeof n=="string")return n;let{marker:s,parameter:o,modifiers:l}=n,a=DC[s],c;if(a)c=a.callback(r,o,t);else if(s===s.toLocaleUpperCase()){let f=r.get(s.toLocaleLowerCase());c=f?Fo(f):[]}else throw new Error("Invalid citation key token ".concat(s));for(let f of l){let u=RC[f];if(u)c=u.callback(c);else throw new Error("Invalid modifier ".concat(f))}return c.join("")}).join("");return i=MC(i),i===""?void 0:i}catch(i){if(i instanceof So)return;throw i}}h(p1,"generateKey");var AC=new Set(["a","about","above","across","against","along","among","an","and","around","at","before","behind","below","beneath","beside","between","beyond","but","by","down","during","except","for","for","from","in","inside","into","like","near","nor","of","off","on","onto","or","since","so","the","through","to","toward","under","until","up","upon","with","within","without","yet"]);function m1(r){return Fo(r).filter(e=>!AC.has(e.toLocaleLowerCase()))}h(m1,"nonFunctionWords");function Fo(r){return r.split(/[\s.,:;]+/).filter(e=>e.length>0)}h(Fo,"words");function b1(r){return r.map(e=>e.slice(0,1).toLocaleUpperCase()+e.slice(1).toLocaleLowerCase())}h(b1,"capitalize");function wo(r){var e,t;return(t=(e=r.get("title"))!=null?e:r.get("booktitle"))!=null?t:""}h(wo,"title");function MC(r){return r.replace(/[{},\s\\#%~()"'=.,:;[\]_]+/g,"")}h(MC,"removeUnsafeEntryKeyChars");var ac=class ac{constructor(e=[]){this.children=e;this.type="root"}};h(ac,"RootNode");var ec=ac,hc=class hc{constructor(e,t){this.parent=e;this.text=t;this.type="text";e.children.push(this)}};h(hc,"TextNode");var Fr=hc,cc=class cc{constructor(e){this.parent=e;this.type="block";this.command="";e.children.push(this)}};h(cc,"BlockNode");var Bo=cc,fc=class fc{constructor(e,t,i,n){this.parent=e;this.raw=t;this.braces=i;this.parens=n;this.type="comment";e.block=this}};h(fc,"CommentNode");var tc=fc,uc=class uc{constructor(e,t,i,n){this.parent=e;this.raw=t;this.braces=i;this.parens=n;this.type="preamble";e.block=this}};h(uc,"PreambleNode");var ic=uc,dc=class dc{constructor(e,t,i,n){this.parent=e;this.raw=t;this.braces=i;this.parens=n;this.type="string";e.block=this}};h(dc,"StringNode");var rc=dc,pc=class pc{constructor(e,t){this.parent=e;this.wrapType=t;this.type="entry";e.block=this,this.fields=[]}};h(pc,"EntryNode");var nc=pc,mc=class mc{constructor(e,t=""){this.parent=e;this.name=t;this.type="field";this.value=new sc(this)}};h(mc,"FieldNode");var Ni=mc,gc=class gc{constructor(e){this.parent=e;this.type="concat";this.canConsumeValue=!0;this.concat=[]}};h(gc,"ConcatNode");var sc=gc,bc=class bc{constructor(e,t){this.parent=e;this.value=t;this.type="literal"}};h(bc,"LiteralNode");var xn=bc;function PC(r,e){let t=new xn(r,e);return r.concat.push(t),t}h(PC,"createLiteralNode");var yc=class yc{constructor(e){this.parent=e;this.type="braced";this.value="";this.depth=0}};h(yc,"BracedNode");var oc=yc;function IC(r){let e=new oc(r);return r.concat.push(e),e}h(IC,"createBracedNode");var vc=class vc{constructor(e){this.parent=e;this.type="quoted";this.value="";this.depth=0}};h(vc,"QuotedNode");var lc=vc;function $C(r){let e=new lc(r);return r.concat.push(e),e}h($C,"createQuotedNode");function v1(r){var s,o,l;let e=new ec,t=e,i=1,n=0;for(let a=0;a<r.length;a++){let c=(s=r[a])!=null?s:"",f=(o=r[a-1])!=null?o:"";switch(c==="\n"&&(i++,n=0),n++,t.type){case"root":{t=c==="@"?new Bo(t):new Fr(t,c);break}case"text":{c==="@"&&/[\s\r\n}]/.test(f)?t=new Bo(t.parent):t.text+=c;break}case"block":{if(c==="@"){let u=t.parent.children[t.parent.children.length-2];(u==null?void 0:u.type)==="text"?u.text+="@".concat(t.command):(t.parent.children.pop(),new Fr(t.parent,"@".concat(t.command)),t.parent.children.push(t)),t.command=""}else if(c==="{"||c==="("){let u=t.command.trim();if(u===""||/\s/.test(u))t.parent.children.pop(),t=new Fr(t.parent,"@".concat(t.command).concat(c));else{t.command=u;let d=t.command.toLowerCase(),[p,m]=c==="{"?[1,0]:[0,1],y="@".concat(d).concat(c);switch(d){case"string":t=new rc(t,y,p,m);break;case"preamble":t=new ic(t,y,p,m);break;case"comment":t=new tc(t,y,p,m);break;default:t=new nc(t,c);break}}}else c.match(/[=#,})[\]]/)?(t.parent.children.pop(),t=new Fr(t.parent,"@".concat(t.command).concat(c))):t.command+=c;break}case"comment":case"string":case"preamble":c==="{"?t.braces++:c==="}"?t.braces--:c==="("?t.parens++:c===")"&&t.parens--,t.raw+=c,t.braces===0&&t.parens===0&&(t=t.parent.parent);break;case"entry":{if(Qo(c))t.key&&(t.keyEnded=!0);else if(c===",")t=new Ni(t);else if(t.wrapType==="{"&&c==="}"||t.wrapType==="("&&c===")")t=t.parent.parent;else if(c==="="&&t.key&&y1(t.key)){let u=new Ni(t,t.key);t.fields.push(u),t.key=void 0,t=u.value}else{if(t.keyEnded)throw new dt(r,t,a,i,n,"The entry key cannot contain whitespace");if(qC(c))t.key=((l=t.key)!=null?l:"")+c;else throw new dt(r,t,a,i,n,"The entry key cannot contain the character (".concat(c,")"))}break}case"field":{if(c==="}"||c===")")t.name=t.name.trim(),t=t.parent.parent.parent;else if(c==="=")t.name=t.name.trim(),t=t.value;else if(c===",")t.name=t.name.trim(),t=new Ni(t.parent);else if(y1(c))t.name?t.name+=c:Qo(c)||(t.parent.fields.push(t),t.name=c);else throw new dt(r,t,a,i,n);break}case"concat":{if(Qo(c))break;if(t.canConsumeValue){if(/[#=,}()[\]]/.test(c))throw new dt(r,t,a,i,n);t.canConsumeValue=!1,c==="{"?t=IC(t):c==='"'?t=$C(t):t=PC(t,c)}else if(c===",")t=new Ni(t.parent.parent);else if(c==="}"||c===")")t=t.parent.parent.parent.parent;else if(c==="#")t.canConsumeValue=!0;else throw new dt(r,t,a,i,n);break}case"literal":Qo(c)?t=t.parent:c===","?t=new Ni(t.parent.parent.parent):c==="}"?t=t.parent.parent.parent.parent.parent:c==="#"?(t=t.parent,t.canConsumeValue=!0):t.value+=c;break;case"braced":if(c==="}"&&t.depth===0){t=t.parent;break}c==="{"?t.depth++:c==="}"&&t.depth--,t.value+=c;break;case"quoted":if(c==='"'&&t.depth===0){t=t.parent;break}if(c==="{")t.depth++;else if(c==="}"&&(t.depth--,t.depth<0))throw new dt(r,t,a,i,n);t.value+=c;break}}return e}h(v1,"parseBibTeX");function Qo(r){return/^[ \t\n\r]*$/.test(r)}h(Qo,"isWhitespace");function qC(r){return!/[#%{}~$,]/.test(r)}h(qC,"isValidKeyCharacter");function y1(r){return!/[=,{}()[\]]/.test(r)}h(y1,"isValidFieldName");var xc=class xc extends Error{constructor(t,i,n,s,o,l){var a;super("Line ".concat(s,":").concat(o,": Syntax Error in ").concat(i.type," (").concat(l,")\n").concat(t.slice(Math.max(0,n-20),n),">>").concat(t[n],"<<").concat(t.slice(n+1,n+20)));this.node=i;this.line=s;this.column=o;this.hint=l;this.name="Syntax Error",this.char=(a=t[n])!=null?a:""}};h(xc,"BibTeXSyntaxError");var dt=xc;var x1={condition:h((r,e)=>!!(e.months&&r==="month"),"condition"),modifyNode:h(r=>{let e=r.value;for(let t=0;t<e.concat.length;t++){let i=e.concat[t],n=n1[i.value.toLowerCase()];n&&(e.concat[t]=new xn(e,n))}},"modifyNode")};var k1={condition:h((r,e,t,i)=>!!(e.dropAllCaps&&!i.lookupRenderedEntryValue(t,r).match(/[a-z]/)),"condition"),modifyRenderedValue:h(r=>r.replace(/(\w)(\S*)/g,(e,t,i)=>{let n=t+i;return VC(n)?n:t.toLocaleUpperCase()+i.toLocaleLowerCase()}),"modifyRenderedValue")};function VC(r){return/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(r)}h(VC,"isRomanNumeral");var w1={condition:h((r,e)=>!!(r==="url"&&e.encodeUrls),"condition"),modifyRenderedValue:h(r=>r.replace(/\\?_/g,"\\%5F"),"modifyRenderedValue")};var S1=new Map([["0023","\\#"],["0024","\\$"],["0025","\\%"],["0026","\\&"],["0027","'"],["0040","\\@"],["002a","\\textasteriskcentered"],["005f","\\_"],["007c","\\vert{}"],["00a0","~"],["00a1","\\textexclamdown{}"],["00a2","\\textcent{}"],["00a3","\\textsterling{}"],["00a4","\\textcurrency{}"],["00a5","\\textyen{}"],["00a6","\\textbrokenbar{}"],["00a7","\\textsection{}"],["00a8","\\textasciidieresis{}"],["00a9","\\textcopyright{}"],["00aa","\\textordfeminine{}"],["00ab","\\guillemotleft{}"],["00ac","\\lnot{}"],["00ad","\\-"],["00ae","\\textregistered{}"],["00af","\\textasciimacron{}"],["00b0","\\textdegree{}"],["00b1","\\pm{}"],["00b2","\\ensuremath{^2}"],["00b3","\\ensuremath{^3}"],["00b4","\\textasciiacute{}"],["00b5","\\mathrm{\\mu}"],["00b6","\\textparagraph{}"],["00b7","\\cdot{}"],["00b8","\\c{}"],["00b9","\\ensuremath{^1}"],["00ba","\\textordmasculine{}"],["00bb","\\guillemotright{}"],["00bc","\\textonequarter{}"],["00bd","\\textonehalf{}"],["00be","\\textthreequarters{}"],["00bf","\\textquestiondown{}"],["00c0","\\`{A}"],["00c1","\\'{A}"],["00c2","\\^{A}"],["00c3","\\~{A}"],["00c4",'\\"{A}'],["00c5","\\AA{}"],["00c6","\\AE{}"],["00c7","\\c{C}"],["00c8","\\`{E}"],["00c9","\\'{E}"],["00ca","\\^{E}"],["00cb",'\\"{E}'],["00cc","\\`{I}"],["00cd","\\'{I}"],["00ce","\\^{I}"],["00cf",'\\"{I}'],["00d0","\\DH{}"],["00d1","\\~{N}"],["00d2","\\`{O}"],["00d3","\\'{O}"],["00d4","\\^{O}"],["00d5","\\~{O}"],["00d6",'\\"{O}'],["00d7","\\texttimes{}"],["00d8","\\O{}"],["00d9","\\`{U}"],["00da","\\'{U}"],["00db","\\^{U}"],["00dc",'\\"{U}'],["00dd","\\'{Y}"],["00de","\\TH{}"],["00df","\\ss{}"],["00e0","\\`{a}"],["00e1","\\'{a}"],["00e2","\\^{a}"],["00e3","\\~{a}"],["00e4",'\\"{a}'],["00e5","\\aa{}"],["00e6","\\ae{}"],["00e7","\\c{c}"],["00e8","\\`{e}"],["00e9","\\'{e}"],["00ea","\\^{e}"],["00eb",'\\"{e}'],["00ec","\\`{\\i}"],["00ed","\\'{\\i}"],["00ee","\\^{\\i}"],["00ef",'\\"{\\i}'],["00f0","\\dh{}"],["00f1","\\~{n}"],["00f2","\\`{o}"],["00f3","\\'{o}"],["00f4","\\^{o}"],["00f5","\\~{o}"],["00f6",'\\"{o}'],["00f7","\\div{}"],["00f8","\\o{}"],["00f9","\\`{u}"],["00fa","\\'{u}"],["00fb","\\^{u}"],["00fc",'\\"{u}'],["00fd","\\'{y}"],["00fe","\\th{}"],["00ff",'\\"{y}'],["0100","\\={A}"],["0101","\\={a}"],["0102","\\u{A}"],["0103","\\u{a}"],["0104","\\k{A}"],["0105","\\k{a}"],["0106","\\'{C}"],["0107","\\'{c}"],["0108","\\^{C}"],["0109","\\^{c}"],["010a","\\.{C}"],["010b","\\.{c}"],["010c","\\v{C}"],["010d","\\v{c}"],["010e","\\v{D}"],["010f","\\v{d}"],["0110","\\DJ{}"],["0111","\\dj{}"],["0112","\\={E}"],["0113","\\={e}"],["0114","\\u{E}"],["0115","\\u{e}"],["0116","\\.{E}"],["0117","\\.{e}"],["0118","\\k{E}"],["0119","\\k{e}"],["011a","\\v{E}"],["011b","\\v{e}"],["011c","\\^{G}"],["011d","\\^{g}"],["011e","\\u{G}"],["011f","\\u{g}"],["0120","\\.{G}"],["0121","\\.{g}"],["0122","\\c{G}"],["0123","\\c{g}"],["0124","\\^{H}"],["0125","\\^{h}"],["0126","{\\fontencoding{LELA}\\selectfont\\char40}"],["0127","\\Elzxh{}"],["0128","\\~{I}"],["0129","\\~{\\i}"],["012a","\\={I}"],["012b","\\={\\i}"],["012c","\\u{I}"],["012d","\\u{\\i}"],["012e","\\k{I}"],["012f","\\k{i}"],["0130","\\.{I}"],["0131","\\i{}"],["0132","IJ"],["0133","ij"],["0134","\\^{J}"],["0135","\\^{\\j}"],["0136","\\c{K}"],["0137","\\c{k}"],["0138","{\\fontencoding{LELA}\\selectfont\\char91}"],["0139","\\'{L}"],["013a","\\'{l}"],["013b","\\c{L}"],["013c","\\c{l}"],["013d","\\v{L}"],["013e","\\v{l}"],["013f","{\\fontencoding{LELA}\\selectfont\\char201}"],["0140","{\\fontencoding{LELA}\\selectfont\\char202}"],["0141","\\L{}"],["0142","\\l{}"],["0143","\\'{N}"],["0144","\\'{n}"],["0145","\\c{N}"],["0146","\\c{n}"],["0147","\\v{N}"],["0148","\\v{n}"],["0149","'n"],["014a","\\NG{}"],["014b","\\ng{}"],["014c","\\={O}"],["014d","\\={o}"],["014e","\\u{O}"],["014f","\\u{o}"],["0150","\\H{O}"],["0151","\\H{o}"],["0152","\\OE{}"],["0153","\\oe{}"],["0154","\\'{R}"],["0155","\\'{r}"],["0156","\\c{R}"],["0157","\\c{r}"],["0158","\\v{R}"],["0159","\\v{r}"],["015a","\\'{S}"],["015b","\\'{s}"],["015c","\\^{S}"],["015d","\\^{s}"],["015e","\\c{S}"],["015f","\\c{s}"],["0160","\\v{S}"],["0161","\\v{s}"],["0162","\\c{T}"],["0163","\\c{t}"],["0164","\\v{T}"],["0165","\\v{t}"],["0166","{\\fontencoding{LELA}\\selectfont\\char47}"],["0167","{\\fontencoding{LELA}\\selectfont\\char63}"],["0168","\\~{U}"],["0169","\\~{u}"],["016a","\\={U}"],["016b","\\={u}"],["016c","\\u{U}"],["016d","\\u{u}"],["016e","\\r{U}"],["016f","\\r{u}"],["0170","\\H{U}"],["0171","\\H{u}"],["0172","\\k{U}"],["0173","\\k{u}"],["0174","\\^{W}"],["0175","\\^{w}"],["0176","\\^{Y}"],["0177","\\^{y}"],["0178",'\\"{Y}'],["0179","\\'{Z}"],["017a","\\'{z}"],["017b","\\.{Z}"],["017c","\\.{z}"],["017d","\\v{Z}"],["017e","\\v{z}"],["0195","\\texthvlig{}"],["019e","\\textnrleg{}"],["01aa","\\eth{}"],["01ba","{\\fontencoding{LELA}\\selectfont\\char195}"],["01c2","\\textdoublepipe{}"],["01f5","\\'{g}"],["0250","\\Elztrna{}"],["0252","\\Elztrnsa{}"],["0254","\\Elzopeno{}"],["0256","\\Elzrtld{}"],["0258","{\\fontencoding{LEIP}\\selectfont\\char61}"],["0259","\\Elzschwa{}"],["025b","\\varepsilon{}"],["0263","\\Elzpgamma{}"],["0264","\\Elzpbgam{}"],["0265","\\Elztrnh{}"],["026c","\\Elzbtdl{}"],["026d","\\Elzrtll{}"],["026f","\\Elztrnm{}"],["0270","\\Elztrnmlr{}"],["0271","\\Elzltlmr{}"],["0272","\\Elzltln{}"],["0273","\\Elzrtln{}"],["0277","\\Elzclomeg{}"],["0278","\\textphi{}"],["0279","\\Elztrnr{}"],["027a","\\Elztrnrl{}"],["027b","\\Elzrttrnr{}"],["027c","\\Elzrl{}"],["027d","\\Elzrtlr{}"],["027e","\\Elzfhr{}"],["027f","{\\fontencoding{LEIP}\\selectfont\\char202}"],["0282","\\Elzrtls{}"],["0283","\\Elzesh{}"],["0287","\\Elztrnt{}"],["0288","\\Elzrtlt{}"],["028a","\\Elzpupsil{}"],["028b","\\Elzpscrv{}"],["028c","\\Elzinvv{}"],["028d","\\Elzinvw{}"],["028e","\\Elztrny{}"],["0290","\\Elzrtlz{}"],["0292","\\Elzyogh{}"],["0294","\\Elzglst{}"],["0295","\\Elzreglst{}"],["0296","\\Elzinglst{}"],["029e","\\textturnk{}"],["02a4","\\Elzdyogh{}"],["02a7","\\Elztesh{}"],["02c7","\\textasciicaron{}"],["02c8","\\Elzverts{}"],["02cc","\\Elzverti{}"],["02d0","\\Elzlmrk{}"],["02d1","\\Elzhlmrk{}"],["02d2","\\Elzsbrhr{}"],["02d3","\\Elzsblhr{}"],["02d4","\\Elzrais{}"],["02d5","\\Elzlow{}"],["02d8","\\textasciibreve{}"],["02d9","\\textperiodcentered{}"],["02da","\\r{}"],["02db","\\k{}"],["02dc","\\texttildelow{}"],["02dd","\\H{}"],["02e5","\\tone{55}"],["02e6","\\tone{44}"],["02e7","\\tone{33}"],["02e8","\\tone{22}"],["02e9","\\tone{11}"],["0300","\\`"],["0301","\\'"],["0302","\\^"],["0303","\\~"],["0304","\\="],["0306","\\u"],["0307","\\."],["0308",'\\"'],["030a","\\r"],["030b","\\H"],["030c","\\v"],["030f","\\cyrchar\\C"],["0311","{\\fontencoding{LECO}\\selectfont\\char177}"],["0318","{\\fontencoding{LECO}\\selectfont\\char184}"],["0319","{\\fontencoding{LECO}\\selectfont\\char185}"],["0321","\\Elzpalh{}"],["0322","\\Elzrh{}"],["0327","\\c"],["0328","\\k"],["032a","\\Elzsbbrg{}"],["032b","{\\fontencoding{LECO}\\selectfont\\char203}"],["032f","{\\fontencoding{LECO}\\selectfont\\char207}"],["0335","\\Elzxl{}"],["0336","\\Elzbar{}"],["0337","{\\fontencoding{LECO}\\selectfont\\char215}"],["0338","{\\fontencoding{LECO}\\selectfont\\char216}"],["033a","{\\fontencoding{LECO}\\selectfont\\char218}"],["033b","{\\fontencoding{LECO}\\selectfont\\char219}"],["033c","{\\fontencoding{LECO}\\selectfont\\char220}"],["033d","{\\fontencoding{LECO}\\selectfont\\char221}"],["0361","{\\fontencoding{LECO}\\selectfont\\char225}"],["0386","\\'{A}"],["0388","\\'{E}"],["0389","\\'{H}"],["038a","\\'{}{I}"],["038c","\\'{}O"],["038e","\\mathrm{'Y}"],["038f","\\mathrm{'\\Omega}"],["0390","\\acute{\\ddot{\\iota}}"],["0391","\\ensuremath{\\Alpha}"],["0392","\\ensuremath{\\Beta}"],["0393","\\ensuremath{\\Gamma}"],["0394","\\ensuremath{\\Delta}"],["0395","\\ensuremath{\\Epsilon}"],["0396","\\ensuremath{\\Zeta}"],["0397","\\ensuremath{\\Eta}"],["0398","\\ensuremath{\\Theta}"],["0399","\\ensuremath{\\Iota}"],["039a","\\ensuremath{\\Kappa}"],["039b","\\ensuremath{\\Lambda}"],["039e","\\ensuremath{\\Xi}"],["03a0","\\ensuremath{\\Pi}"],["03a1","\\ensuremath{\\Rho}"],["03a3","\\ensuremath{\\Sigma}"],["03a4","\\ensuremath{\\Tau}"],["03a5","\\ensuremath{\\Upsilon}"],["03a6","\\ensuremath{\\Phi}"],["03a7","\\ensuremath{\\Chi}"],["03a8","\\ensuremath{\\Psi}"],["03a9","\\ensuremath{\\Omega}"],["03aa","\\mathrm{\\ddot{I}}"],["03ab","\\mathrm{\\ddot{Y}}"],["03ac","\\'{$\\alpha$}"],["03ad","\\acute{\\epsilon}"],["03ae","\\acute{\\eta}"],["03af","\\acute{\\iota}"],["03b0","\\acute{\\ddot{\\upsilon}}"],["03b1","\\ensuremath{\\alpha}"],["03b2","\\ensuremath{\\beta}"],["03b3","\\ensuremath{\\gamma}"],["03b4","\\ensuremath{\\delta}"],["03b5","\\ensuremath{\\epsilon}"],["03b6","\\ensuremath{\\zeta}"],["03b7","\\ensuremath{\\eta}"],["03b8","\\texttheta{}"],["03b9","\\ensuremath{\\iota}"],["03ba","\\ensuremath{\\kappa}"],["03bb","\\ensuremath{\\lambda}"],["03bc","\\ensuremath{\\mu}"],["03bd","\\ensuremath{\\nu}"],["03be","\\ensuremath{\\xi}"],["03c0","\\ensuremath{\\pi}"],["03c1","\\ensuremath{\\rho}"],["03c2","\\ensuremath{\\varsigma}"],["03c3","\\ensuremath{\\sigma}"],["03c4","\\ensuremath{\\tau}"],["03c5","\\ensuremath{\\upsilon}"],["03c6","\\ensuremath{\\varphi}"],["03c7","\\ensuremath{\\chi}"],["03c8","\\ensuremath{\\psi}"],["03c9","\\ensuremath{\\omega}"],["03ca","\\ensuremath{\\ddot{\\iota}}"],["03cb","\\ensuremath{\\ddot{\\upsilon}}"],["03cc","\\'{o}"],["03cd","\\acute{\\upsilon}"],["03ce","\\acute{\\omega}"],["03d0","\\Pisymbol{ppi022}{87}"],["03d1","\\textvartheta{}"],["03d2","\\ensuremath{\\Upsilon}"],["03d5","\\ensuremath{\\phi}"],["03d6","\\ensuremath{\\varpi}"],["03da","\\Stigma{}"],["03dc","\\Digamma{}"],["03dd","\\digamma{}"],["03de","\\Koppa{}"],["03e0","\\Sampi{}"],["03f0","\\varkappa{}"],["03f1","\\varrho{}"],["03f4","\\textTheta{}"],["03f6","\\backepsilon{}"],["0401","\\cyrchar\\CYRYO{}"],["0402","\\cyrchar\\CYRDJE{}"],["0403","\\cyrchar{\\'\\CYRG}"],["0404","\\cyrchar\\CYRIE{}"],["0405","\\cyrchar\\CYRDZE{}"],["0406","\\cyrchar\\CYRII{}"],["0407","\\cyrchar\\CYRYI{}"],["0408","\\cyrchar\\CYRJE{}"],["0409","\\cyrchar\\CYRLJE{}"],["040a","\\cyrchar\\CYRNJE{}"],["040b","\\cyrchar\\CYRTSHE{}"],["040c","\\cyrchar{\\'\\CYRK}"],["040e","\\cyrchar\\CYRUSHRT{}"],["040f","\\cyrchar\\CYRDZHE{}"],["0410","\\cyrchar\\CYRA{}"],["0411","\\cyrchar\\CYRB{}"],["0412","\\cyrchar\\CYRV{}"],["0413","\\cyrchar\\CYRG{}"],["0414","\\cyrchar\\CYRD{}"],["0415","\\cyrchar\\CYRE{}"],["0416","\\cyrchar\\CYRZH{}"],["0417","\\cyrchar\\CYRZ{}"],["0418","\\cyrchar\\CYRI{}"],["0419","\\cyrchar\\CYRISHRT{}"],["041a","\\cyrchar\\CYRK{}"],["041b","\\cyrchar\\CYRL{}"],["041c","\\cyrchar\\CYRM{}"],["041d","\\cyrchar\\CYRN{}"],["041e","\\cyrchar\\CYRO{}"],["041f","\\cyrchar\\CYRP{}"],["0420","\\cyrchar\\CYRR{}"],["0421","\\cyrchar\\CYRS{}"],["0422","\\cyrchar\\CYRT{}"],["0423","\\cyrchar\\CYRU{}"],["0424","\\cyrchar\\CYRF{}"],["0425","\\cyrchar\\CYRH{}"],["0426","\\cyrchar\\CYRC{}"],["0427","\\cyrchar\\CYRCH{}"],["0428","\\cyrchar\\CYRSH{}"],["0429","\\cyrchar\\CYRSHCH{}"],["042a","\\cyrchar\\CYRHRDSN{}"],["042b","\\cyrchar\\CYRERY{}"],["042c","\\cyrchar\\CYRSFTSN{}"],["042d","\\cyrchar\\CYREREV{}"],["042e","\\cyrchar\\CYRYU{}"],["042f","\\cyrchar\\CYRYA{}"],["0430","\\cyrchar\\cyra{}"],["0431","\\cyrchar\\cyrb{}"],["0432","\\cyrchar\\cyrv{}"],["0433","\\cyrchar\\cyrg{}"],["0434","\\cyrchar\\cyrd{}"],["0435","\\cyrchar\\cyre{}"],["0436","\\cyrchar\\cyrzh{}"],["0437","\\cyrchar\\cyrz{}"],["0438","\\cyrchar\\cyri{}"],["0439","\\cyrchar\\cyrishrt{}"],["043a","\\cyrchar\\cyrk{}"],["043b","\\cyrchar\\cyrl{}"],["043c","\\cyrchar\\cyrm{}"],["043d","\\cyrchar\\cyrn{}"],["043e","\\cyrchar\\cyro{}"],["043f","\\cyrchar\\cyrp{}"],["0440","\\cyrchar\\cyrr{}"],["0441","\\cyrchar\\cyrs{}"],["0442","\\cyrchar\\cyrt{}"],["0443","\\cyrchar\\cyru{}"],["0444","\\cyrchar\\cyrf{}"],["0445","\\cyrchar\\cyrh{}"],["0446","\\cyrchar\\cyrc{}"],["0447","\\cyrchar\\cyrch{}"],["0448","\\cyrchar\\cyrsh{}"],["0449","\\cyrchar\\cyrshch{}"],["044a","\\cyrchar\\cyrhrdsn{}"],["044b","\\cyrchar\\cyrery{}"],["044c","\\cyrchar\\cyrsftsn{}"],["044d","\\cyrchar\\cyrerev{}"],["044e","\\cyrchar\\cyryu{}"],["044f","\\cyrchar\\cyrya{}"],["0451","\\cyrchar\\cyryo{}"],["0452","\\cyrchar\\cyrdje{}"],["0453","\\cyrchar{\\'\\cyrg}"],["0454","\\cyrchar\\cyrie{}"],["0455","\\cyrchar\\cyrdze{}"],["0456","\\cyrchar\\cyrii{}"],["0457","\\cyrchar\\cyryi{}"],["0458","\\cyrchar\\cyrje{}"],["0459","\\cyrchar\\cyrlje{}"],["045a","\\cyrchar\\cyrnje{}"],["045b","\\cyrchar\\cyrtshe{}"],["045c","\\cyrchar{\\'\\cyrk}"],["045e","\\cyrchar\\cyrushrt{}"],["045f","\\cyrchar\\cyrdzhe{}"],["0460","\\cyrchar\\CYROMEGA{}"],["0461","\\cyrchar\\cyromega{}"],["0462","\\cyrchar\\CYRYAT{}"],["0464","\\cyrchar\\CYRIOTE{}"],["0465","\\cyrchar\\cyriote{}"],["0466","\\cyrchar\\CYRLYUS{}"],["0467","\\cyrchar\\cyrlyus{}"],["0468","\\cyrchar\\CYRIOTLYUS{}"],["0469","\\cyrchar\\cyriotlyus{}"],["046a","\\cyrchar\\CYRBYUS{}"],["046c","\\cyrchar\\CYRIOTBYUS{}"],["046d","\\cyrchar\\cyriotbyus{}"],["046e","\\cyrchar\\CYRKSI{}"],["046f","\\cyrchar\\cyrksi{}"],["0470","\\cyrchar\\CYRPSI{}"],["0471","\\cyrchar\\cyrpsi{}"],["0472","\\cyrchar\\CYRFITA{}"],["0474","\\cyrchar\\CYRIZH{}"],["0478","\\cyrchar\\CYRUK{}"],["0479","\\cyrchar\\cyruk{}"],["047a","\\cyrchar\\CYROMEGARND{}"],["047b","\\cyrchar\\cyromegarnd{}"],["047c","\\cyrchar\\CYROMEGATITLO{}"],["047d","\\cyrchar\\cyromegatitlo{}"],["047e","\\cyrchar\\CYROT{}"],["047f","\\cyrchar\\cyrot{}"],["0480","\\cyrchar\\CYRKOPPA{}"],["0481","\\cyrchar\\cyrkoppa{}"],["0482","\\cyrchar\\cyrthousands{}"],["0488","\\cyrchar\\cyrhundredthousands{}"],["0489","\\cyrchar\\cyrmillions{}"],["048c","\\cyrchar\\CYRSEMISFTSN{}"],["048d","\\cyrchar\\cyrsemisftsn{}"],["048e","\\cyrchar\\CYRRTICK{}"],["048f","\\cyrchar\\cyrrtick{}"],["0490","\\cyrchar\\CYRGUP{}"],["0491","\\cyrchar\\cyrgup{}"],["0492","\\cyrchar\\CYRGHCRS{}"],["0493","\\cyrchar\\cyrghcrs{}"],["0494","\\cyrchar\\CYRGHK{}"],["0495","\\cyrchar\\cyrghk{}"],["0496","\\cyrchar\\CYRZHDSC{}"],["0497","\\cyrchar\\cyrzhdsc{}"],["0498","\\cyrchar\\CYRZDSC{}"],["0499","\\cyrchar\\cyrzdsc{}"],["049a","\\cyrchar\\CYRKDSC{}"],["049b","\\cyrchar\\cyrkdsc{}"],["049c","\\cyrchar\\CYRKVCRS{}"],["049d","\\cyrchar\\cyrkvcrs{}"],["049e","\\cyrchar\\CYRKHCRS{}"],["049f","\\cyrchar\\cyrkhcrs{}"],["04a0","\\cyrchar\\CYRKBEAK{}"],["04a1","\\cyrchar\\cyrkbeak{}"],["04a2","\\cyrchar\\CYRNDSC{}"],["04a3","\\cyrchar\\cyrndsc{}"],["04a4","\\cyrchar\\CYRNG{}"],["04a5","\\cyrchar\\cyrng{}"],["04a6","\\cyrchar\\CYRPHK{}"],["04a7","\\cyrchar\\cyrphk{}"],["04a8","\\cyrchar\\CYRABHHA{}"],["04a9","\\cyrchar\\cyrabhha{}"],["04aa","\\cyrchar\\CYRSDSC{}"],["04ab","\\cyrchar\\cyrsdsc{}"],["04ac","\\cyrchar\\CYRTDSC{}"],["04ad","\\cyrchar\\cyrtdsc{}"],["04ae","\\cyrchar\\CYRY{}"],["04af","\\cyrchar\\cyry{}"],["04b0","\\cyrchar\\CYRYHCRS{}"],["04b1","\\cyrchar\\cyryhcrs{}"],["04b2","\\cyrchar\\CYRHDSC{}"],["04b3","\\cyrchar\\cyrhdsc{}"],["04b4","\\cyrchar\\CYRTETSE{}"],["04b5","\\cyrchar\\cyrtetse{}"],["04b6","\\cyrchar\\CYRCHRDSC{}"],["04b7","\\cyrchar\\cyrchrdsc{}"],["04b8","\\cyrchar\\CYRCHVCRS{}"],["04b9","\\cyrchar\\cyrchvcrs{}"],["04ba","\\cyrchar\\CYRSHHA{}"],["04bb","\\cyrchar\\cyrshha{}"],["04bc","\\cyrchar\\CYRABHCH{}"],["04bd","\\cyrchar\\cyrabhch{}"],["04be","\\cyrchar\\CYRABHCHDSC{}"],["04bf","\\cyrchar\\cyrabhchdsc{}"],["04c0","\\cyrchar\\CYRpalochka{}"],["04c3","\\cyrchar\\CYRKHK{}"],["04c4","\\cyrchar\\cyrkhk{}"],["04c7","\\cyrchar\\CYRNHK{}"],["04c8","\\cyrchar\\cyrnhk{}"],["04cb","\\cyrchar\\CYRCHLDSC{}"],["04cc","\\cyrchar\\cyrchldsc{}"],["04d4","\\cyrchar\\CYRAE{}"],["04d5","\\cyrchar\\cyrae{}"],["04d8","\\cyrchar\\CYRSCHWA{}"],["04d9","\\cyrchar\\cyrschwa{}"],["04e0","\\cyrchar\\CYRABHDZE{}"],["04e1","\\cyrchar\\cyrabhdze{}"],["04e8","\\cyrchar\\CYROTLD{}"],["04e9","\\cyrchar\\cyrotld{}"],["2002","\\hspace{0.6em}"],["2003","\\hspace{1em}"],["2004","\\hspace{0.33em}"],["2005","\\hspace{0.25em}"],["2006","\\hspace{0.166em}"],["2007","\\hphantom{0}"],["2008","\\hphantom{,}"],["2009","\\hspace{0.167em}"],["200a","\\mkern1mu{}"],["2010","-"],["2014","--"],["2015","\\rule{1em}{1pt}"],["2016","\\Vert{}"],["2018","`"],["2019","'"],["201b","\\Elzreapos{}"],["201c","``"],["201d","''"],["201e",",,"],["2020","\\textdagger{}"],["2021","\\textdaggerdbl{}"],["2022","\\textbullet{}"],["2025",".."],["2026","\\ldots{}"],["2030","\\textperthousand{}"],["2031","\\textpertenthousand{}"],["2032","\\ensuremath{'}"],["2033","\\ensuremath{''}"],["2034","\\ensuremath{'''}"],["2035","\\backprime{}"],["2039","\\guilsinglleft{}"],["203a","\\guilsinglright{}"],["2057","''''"],["205f","\\mkern4mu{}"],["2060","\\nolinebreak{}"],["20a7","\\ensuremath{\\Elzpes}"],["20ac","\\mbox{\\texteuro}{}"],["20db","\\dddot{}"],["20dc","\\ddddot{}"],["2102","\\mathbb{C}"],["210a","\\mathscr{g}"],["210b","\\mathscr{H}"],["210c","\\mathfrak{H}"],["210d","\\mathbb{H}"],["210f","\\hslash{}"],["2110","\\mathscr{I}"],["2111","\\mathfrak{I}"],["2112","\\mathscr{L}"],["2113","\\mathscr{l}"],["2115","\\mathbb{N}"],["2116","\\cyrchar\\textnumero{}"],["2118","\\wp{}"],["2119","\\mathbb{P}"],["211a","\\mathbb{Q}"],["211b","\\mathscr{R}"],["211c","\\mathfrak{R}"],["211d","\\mathbb{R}"],["211e","\\Elzxrat{}"],["2122","\\texttrademark{}"],["2124","\\mathbb{Z}"],["2126","\\Omega{}"],["2127","\\mho{}"],["2128","\\mathfrak{Z}"],["2129","\\ElsevierGlyph{2129}"],["212b","\\AA{}"],["212c","\\mathscr{B}"],["212d","\\mathfrak{C}"],["212f","\\mathscr{e}"],["2130","\\mathscr{E}"],["2131","\\mathscr{F}"],["2133","\\mathscr{M}"],["2134","\\mathscr{o}"],["2135","\\aleph{}"],["2136","\\beth{}"],["2137","\\gimel{}"],["2138","\\daleth{}"],["2153","\\textfrac{1}{3}"],["2154","\\textfrac{2}{3}"],["2155","\\textfrac{1}{5}"],["2156","\\textfrac{2}{5}"],["2157","\\textfrac{3}{5}"],["2158","\\textfrac{4}{5}"],["2159","\\textfrac{1}{6}"],["215a","\\textfrac{5}{6}"],["215b","\\textfrac{1}{8}"],["215c","\\textfrac{3}{8}"],["215d","\\textfrac{5}{8}"],["215e","\\textfrac{7}{8}"],["2190","\\leftarrow{}"],["2191","\\uparrow{}"],["2192","\\rightarrow{}"],["2193","\\downarrow{}"],["2194","\\leftrightarrow{}"],["2195","\\updownarrow{}"],["2196","\\nwarrow{}"],["2197","\\nearrow{}"],["2198","\\searrow{}"],["2199","\\swarrow{}"],["219a","\\nleftarrow{}"],["219b","\\nrightarrow{}"],["219c","\\arrowwaveright{}"],["219d","\\arrowwaveright{}"],["219e","\\twoheadleftarrow{}"],["21a0","\\twoheadrightarrow{}"],["21a2","\\leftarrowtail{}"],["21a3","\\rightarrowtail{}"],["21a6","\\mapsto{}"],["21a9","\\hookleftarrow{}"],["21aa","\\hookrightarrow{}"],["21ab","\\looparrowleft{}"],["21ac","\\looparrowright{}"],["21ad","\\leftrightsquigarrow{}"],["21ae","\\nleftrightarrow{}"],["21b0","\\Lsh{}"],["21b1","\\Rsh{}"],["21b3","\\ElsevierGlyph{21B3}"],["21b6","\\curvearrowleft{}"],["21b7","\\curvearrowright{}"],["21ba","\\circlearrowleft{}"],["21bb","\\circlearrowright{}"],["21bc","\\leftharpoonup{}"],["21bd","\\leftharpoondown{}"],["21be","\\upharpoonright{}"],["21bf","\\upharpoonleft{}"],["21c0","\\rightharpoonup{}"],["21c1","\\rightharpoondown{}"],["21c2","\\downharpoonright{}"],["21c3","\\downharpoonleft{}"],["21c4","\\rightleftarrows{}"],["21c5","\\dblarrowupdown{}"],["21c6","\\leftrightarrows{}"],["21c7","\\leftleftarrows{}"],["21c8","\\upuparrows{}"],["21c9","\\rightrightarrows{}"],["21ca","\\downdownarrows{}"],["21cb","\\leftrightharpoons{}"],["21cc","\\rightleftharpoons{}"],["21cd","\\nLeftarrow{}"],["21ce","\\nLeftrightarrow{}"],["21cf","\\nRightarrow{}"],["21d0","\\Leftarrow{}"],["21d1","\\Uparrow{}"],["21d2","\\Rightarrow{}"],["21d3","\\Downarrow{}"],["21d4","\\Leftrightarrow{}"],["21d5","\\Updownarrow{}"],["21da","\\Lleftarrow{}"],["21db","\\Rrightarrow{}"],["21dd","\\rightsquigarrow{}"],["21f5","\\DownArrowUpArrow{}"],["2200","\\forall{}"],["2201","\\complement{}"],["2202","\\partial{}"],["2203","\\exists{}"],["2204","\\nexists{}"],["2205","\\varnothing{}"],["2207","\\nabla{}"],["2208","\\in{}"],["2209","\\not\\in{}"],["220b","\\ni{}"],["220c","\\not\\ni{}"],["220f","\\prod{}"],["2210","\\coprod{}"],["2211","\\sum{}"],["2212","-"],["2213","\\mp{}"],["2214","\\dotplus{}"],["2216","\\setminus{}"],["2217","{\\_\\ast}"],["2218","\\circ{}"],["2219","\\bullet{}"],["221a","\\surd{}"],["221d","\\propto{}"],["221e","\\infty{}"],["221f","\\rightangle{}"],["2220","\\angle{}"],["2221","\\measuredangle{}"],["2222","\\sphericalangle{}"],["2223","\\mid{}"],["2224","\\nmid{}"],["2225","\\parallel{}"],["2226","\\nparallel{}"],["2227","\\wedge{}"],["2228","\\vee{}"],["2229","\\cap{}"],["222a","\\cup{}"],["222b","\\int{}"],["222c","\\int\\!\\int{}"],["222d","\\int\\!\\int\\!\\int{}"],["222e","\\oint{}"],["222f","\\surfintegral{}"],["2230","\\volintegral{}"],["2231","\\clwintegral{}"],["2232","\\ElsevierGlyph{2232}"],["2233","\\ElsevierGlyph{2233}"],["2234","\\therefore{}"],["2235","\\because{}"],["2237","\\Colon{}"],["2238","\\ElsevierGlyph{2238}"],["223a","\\mathbin{{:}\\!\\!{-}\\!\\!{:}}"],["223b","\\homothetic{}"],["223c","\\sim{}"],["223d","\\backsim{}"],["223e","\\lazysinv{}"],["2240","\\wr{}"],["2241","\\not\\sim{}"],["2242","\\ElsevierGlyph{2242}"],["2243","\\simeq{}"],["2244","\\not\\simeq{}"],["2245","\\cong{}"],["2246","\\approxnotequal{}"],["2247","\\not\\cong{}"],["2248","\\approx{}"],["2249","\\not\\approx{}"],["224a","\\approxeq{}"],["224b","\\tildetrpl{}"],["224c","\\allequal{}"],["224d","\\asymp{}"],["224e","\\Bumpeq{}"],["224f","\\bumpeq{}"],["2250","\\doteq{}"],["2251","\\doteqdot{}"],["2252","\\fallingdotseq{}"],["2253","\\risingdotseq{}"],["2254",":="],["2255","=:"],["2256","\\eqcirc{}"],["2257","\\circeq{}"],["2259","\\estimates{}"],["225a","\\ElsevierGlyph{225A}"],["225b","\\starequal{}"],["225c","\\triangleq{}"],["225f","\\ElsevierGlyph{225F}"],["2260","\\not ="],["2261","\\equiv{}"],["2262","\\not\\equiv{}"],["2264","\\leq{}"],["2265","\\geq{}"],["2266","\\leqq{}"],["2267","\\geqq{}"],["2268","\\lneqq{}"],["2269","\\gneqq{}"],["226a","\\ll{}"],["226b","\\gg{}"],["226c","\\between{}"],["226d","\\not\\kern-0.3em\\times{}"],["226e","\\not<"],["226f","\\not>"],["2270","\\not\\leq{}"],["2271","\\not\\geq{}"],["2272","\\lessequivlnt{}"],["2273","\\greaterequivlnt{}"],["2274","\\ElsevierGlyph{2274}"],["2275","\\ElsevierGlyph{2275}"],["2276","\\lessgtr{}"],["2277","\\gtrless{}"],["2278","\\notlessgreater{}"],["2279","\\notgreaterless{}"],["227a","\\prec{}"],["227b","\\succ{}"],["227c","\\preccurlyeq{}"],["227d","\\succcurlyeq{}"],["227e","\\precapprox{}"],["227f","\\succapprox{}"],["2280","\\not\\prec{}"],["2281","\\not\\succ{}"],["2282","\\subset{}"],["2283","\\supset{}"],["2284","\\not\\subset{}"],["2285","\\not\\supset{}"],["2286","\\subseteq{}"],["2287","\\supseteq{}"],["2288","\\not\\subseteq{}"],["2289","\\not\\supseteq{}"],["228a","\\subsetneq{}"],["228b","\\supsetneq{}"],["228e","\\uplus{}"],["228f","\\sqsubset{}"],["2290","\\sqsupset{}"],["2291","\\sqsubseteq{}"],["2292","\\sqsupseteq{}"],["2293","\\sqcap{}"],["2294","\\sqcup{}"],["2295","\\oplus{}"],["2296","\\ominus{}"],["2297","\\otimes{}"],["2298","\\oslash{}"],["2299","\\odot{}"],["229a","\\circledcirc{}"],["229b","\\circledast{}"],["229d","\\circleddash{}"],["229e","\\boxplus{}"],["229f","\\boxminus{}"],["22a0","\\boxtimes{}"],["22a1","\\boxdot{}"],["22a2","\\vdash{}"],["22a3","\\dashv{}"],["22a4","\\top{}"],["22a5","\\perp{}"],["22a7","\\truestate{}"],["22a8","\\forcesextra{}"],["22a9","\\Vdash{}"],["22aa","\\Vvdash{}"],["22ab","\\VDash{}"],["22ac","\\nvdash{}"],["22ad","\\nvDash{}"],["22ae","\\nVdash{}"],["22af","\\nVDash{}"],["22b2","\\vartriangleleft{}"],["22b3","\\vartriangleright{}"],["22b4","\\trianglelefteq{}"],["22b5","\\trianglerighteq{}"],["22b6","\\original{}"],["22b7","\\image{}"],["22b8","\\multimap{}"],["22b9","\\hermitconjmatrix{}"],["22ba","\\intercal{}"],["22bb","\\veebar{}"],["22be","\\rightanglearc{}"],["22c0","\\ElsevierGlyph{22C0}"],["22c1","\\ElsevierGlyph{22C1}"],["22c2","\\bigcap{}"],["22c3","\\bigcup{}"],["22c4","\\diamond{}"],["22c5","\\cdot{}"],["22c6","\\star{}"],["22c7","\\divideontimes{}"],["22c8","\\bowtie{}"],["22c9","\\ltimes{}"],["22ca","\\rtimes{}"],["22cb","\\leftthreetimes{}"],["22cc","\\rightthreetimes{}"],["22cd","\\backsimeq{}"],["22ce","\\curlyvee{}"],["22cf","\\curlywedge{}"],["22d0","\\Subset{}"],["22d1","\\Supset{}"],["22d2","\\Cap{}"],["22d3","\\Cup{}"],["22d4","\\pitchfork{}"],["22d6","\\lessdot{}"],["22d7","\\gtrdot{}"],["22d8","\\verymuchless{}"],["22d9","\\verymuchgreater{}"],["22da","\\lesseqgtr{}"],["22db","\\gtreqless{}"],["22de","\\curlyeqprec{}"],["22df","\\curlyeqsucc{}"],["22e2","\\not\\sqsubseteq{}"],["22e3","\\not\\sqsupseteq{}"],["22e5","\\Elzsqspne{}"],["22e6","\\lnsim{}"],["22e7","\\gnsim{}"],["22e8","\\precedesnotsimilar{}"],["22e9","\\succnsim{}"],["22ea","\\ntriangleleft{}"],["22eb","\\ntriangleright{}"],["22ec","\\ntrianglelefteq{}"],["22ed","\\ntrianglerighteq{}"],["22ee","\\vdots{}"],["22ef","\\cdots{}"],["22f0","\\upslopeellipsis{}"],["22f1","\\downslopeellipsis{}"],["2305","\\barwedge{}"],["2306","\\perspcorrespond{}"],["2308","\\lceil{}"],["2309","\\rceil{}"],["230a","\\lfloor{}"],["230b","\\rfloor{}"],["2315","\\recorder{}"],["2316",'\\mathchar"2208'],["231c","\\ulcorner{}"],["231d","\\urcorner{}"],["231e","\\llcorner{}"],["231f","\\lrcorner{}"],["2322","\\frown{}"],["2323","\\smile{}"],["2329","\\langle{}"],["232a","\\rangle{}"],["233d","\\ElsevierGlyph{E838}"],["23a3","\\Elzdlcorn{}"],["23b0","\\lmoustache{}"],["23b1","\\rmoustache{}"],["2423","\\textvisiblespace{}"],["2460","\\ding{172}"],["2461","\\ding{173}"],["2462","\\ding{174}"],["2463","\\ding{175}"],["2464","\\ding{176}"],["2465","\\ding{177}"],["2466","\\ding{178}"],["2467","\\ding{179}"],["2468","\\ding{180}"],["2469","\\ding{181}"],["24c8","\\circledS{}"],["2506","\\Elzdshfnc{}"],["2519","\\Elzsqfnw{}"],["2571","\\diagup{}"],["25a0","\\ding{110}"],["25a1","\\square{}"],["25aa","\\blacksquare{}"],["25ad","\\fbox{~~}"],["25af","\\Elzvrecto{}"],["25b1","\\ElsevierGlyph{E381}"],["25b2","\\ding{115}"],["25b3","\\bigtriangleup{}"],["25b4","\\blacktriangle{}"],["25b5","\\vartriangle{}"],["25b8","\\blacktriangleright{}"],["25b9","\\triangleright{}"],["25bc","\\ding{116}"],["25bd","\\bigtriangledown{}"],["25be","\\blacktriangledown{}"],["25bf","\\triangledown{}"],["25c2","\\blacktriangleleft{}"],["25c3","\\triangleleft{}"],["25c6","\\ding{117}"],["25ca","\\lozenge{}"],["25cb","\\bigcirc{}"],["25cf","\\ding{108}"],["25d0","\\Elzcirfl{}"],["25d1","\\Elzcirfr{}"],["25d2","\\Elzcirfb{}"],["25d7","\\ding{119}"],["25d8","\\Elzrvbull{}"],["25e7","\\Elzsqfl{}"],["25e8","\\Elzsqfr{}"],["25ea","\\Elzsqfse{}"],["25ef","\\bigcirc{}"],["2605","\\ding{72}"],["2606","\\ding{73}"],["260e","\\ding{37}"],["261b","\\ding{42}"],["261e","\\ding{43}"],["263e","\\rightmoon{}"],["263f","\\mercury{}"],["2640","\\venus{}"],["2642","\\male{}"],["2643","\\jupiter{}"],["2644","\\saturn{}"],["2645","\\uranus{}"],["2646","\\neptune{}"],["2647","\\pluto{}"],["2648","\\aries{}"],["2649","\\taurus{}"],["264a","\\gemini{}"],["264b","\\cancer{}"],["264c","\\leo{}"],["264d","\\virgo{}"],["264e","\\libra{}"],["264f","\\scorpio{}"],["2650","\\sagittarius{}"],["2651","\\capricornus{}"],["2652","\\aquarius{}"],["2653","\\pisces{}"],["2660","\\ding{171}"],["2662","\\diamond{}"],["2663","\\ding{168}"],["2665","\\ding{170}"],["2666","\\ding{169}"],["2669","\\quarternote{}"],["266a","\\eighthnote{}"],["266d","\\flat{}"],["266e","\\natural{}"],["266f","\\sharp{}"],["2701","\\ding{33}"],["2702","\\ding{34}"],["2703","\\ding{35}"],["2704","\\ding{36}"],["2706","\\ding{38}"],["2707","\\ding{39}"],["2708","\\ding{40}"],["2709","\\ding{41}"],["270c","\\ding{44}"],["270d","\\ding{45}"],["270e","\\ding{46}"],["270f","\\ding{47}"],["2710","\\ding{48}"],["2711","\\ding{49}"],["2712","\\ding{50}"],["2713","\\ding{51}"],["2714","\\ding{52}"],["2715","\\ding{53}"],["2716","\\ding{54}"],["2717","\\ding{55}"],["2718","\\ding{56}"],["2719","\\ding{57}"],["271a","\\ding{58}"],["271b","\\ding{59}"],["271c","\\ding{60}"],["271d","\\ding{61}"],["271e","\\ding{62}"],["271f","\\ding{63}"],["2720","\\ding{64}"],["2721","\\ding{65}"],["2722","\\ding{66}"],["2723","\\ding{67}"],["2724","\\ding{68}"],["2725","\\ding{69}"],["2726","\\ding{70}"],["2727","\\ding{71}"],["2729","\\ding{73}"],["272a","\\ding{74}"],["272b","\\ding{75}"],["272c","\\ding{76}"],["272d","\\ding{77}"],["272e","\\ding{78}"],["272f","\\ding{79}"],["2730","\\ding{80}"],["2731","\\ding{81}"],["2732","\\ding{82}"],["2733","\\ding{83}"],["2734","\\ding{84}"],["2735","\\ding{85}"],["2736","\\ding{86}"],["2737","\\ding{87}"],["2738","\\ding{88}"],["2739","\\ding{89}"],["273a","\\ding{90}"],["273b","\\ding{91}"],["273c","\\ding{92}"],["273d","\\ding{93}"],["273e","\\ding{94}"],["273f","\\ding{95}"],["2740","\\ding{96}"],["2741","\\ding{97}"],["2742","\\ding{98}"],["2743","\\ding{99}"],["2744","\\ding{100}"],["2745","\\ding{101}"],["2746","\\ding{102}"],["2747","\\ding{103}"],["2748","\\ding{104}"],["2749","\\ding{105}"],["274a","\\ding{106}"],["274b","\\ding{107}"],["274d","\\ding{109}"],["274f","\\ding{111}"],["2750","\\ding{112}"],["2751","\\ding{113}"],["2752","\\ding{114}"],["2756","\\ding{118}"],["2758","\\ding{120}"],["2759","\\ding{121}"],["275a","\\ding{122}"],["275b","\\ding{123}"],["275c","\\ding{124}"],["275d","\\ding{125}"],["275e","\\ding{126}"],["2761","\\ding{161}"],["2762","\\ding{162}"],["2763","\\ding{163}"],["2764","\\ding{164}"],["2765","\\ding{165}"],["2766","\\ding{166}"],["2767","\\ding{167}"],["2776","\\ding{182}"],["2777","\\ding{183}"],["2778","\\ding{184}"],["2779","\\ding{185}"],["277a","\\ding{186}"],["277b","\\ding{187}"],["277c","\\ding{188}"],["277d","\\ding{189}"],["277e","\\ding{190}"],["277f","\\ding{191}"],["2780","\\ding{192}"],["2781","\\ding{193}"],["2782","\\ding{194}"],["2783","\\ding{195}"],["2784","\\ding{196}"],["2785","\\ding{197}"],["2786","\\ding{198}"],["2787","\\ding{199}"],["2788","\\ding{200}"],["2789","\\ding{201}"],["278a","\\ding{202}"],["278b","\\ding{203}"],["278c","\\ding{204}"],["278d","\\ding{205}"],["278e","\\ding{206}"],["278f","\\ding{207}"],["2790","\\ding{208}"],["2791","\\ding{209}"],["2792","\\ding{210}"],["2793","\\ding{211}"],["2794","\\ding{212}"],["2798","\\ding{216}"],["2799","\\ding{217}"],["279a","\\ding{218}"],["279b","\\ding{219}"],["279c","\\ding{220}"],["279d","\\ding{221}"],["279e","\\ding{222}"],["279f","\\ding{223}"],["27a0","\\ding{224}"],["27a1","\\ding{225}"],["27a2","\\ding{226}"],["27a3","\\ding{227}"],["27a4","\\ding{228}"],["27a5","\\ding{229}"],["27a6","\\ding{230}"],["27a7","\\ding{231}"],["27a8","\\ding{232}"],["27a9","\\ding{233}"],["27aa","\\ding{234}"],["27ab","\\ding{235}"],["27ac","\\ding{236}"],["27ad","\\ding{237}"],["27ae","\\ding{238}"],["27af","\\ding{239}"],["27b1","\\ding{241}"],["27b2","\\ding{242}"],["27b3","\\ding{243}"],["27b4","\\ding{244}"],["27b5","\\ding{245}"],["27b6","\\ding{246}"],["27b7","\\ding{247}"],["27b8","\\ding{248}"],["27b9","\\ding{249}"],["27ba","\\ding{250}"],["27bb","\\ding{251}"],["27bc","\\ding{252}"],["27bd","\\ding{253}"],["27be","\\ding{254}"],["27f5","\\longleftarrow{}"],["27f6","\\longrightarrow{}"],["27f7","\\longleftrightarrow{}"],["27f8","\\Longleftarrow{}"],["27f9","\\Longrightarrow{}"],["27fa","\\Longleftrightarrow{}"],["27fc","\\longmapsto{}"],["27ff","\\sim\\joinrel\\leadsto"],["2905","\\ElsevierGlyph{E212}"],["2912","\\UpArrowBar{}"],["2913","\\DownArrowBar{}"],["2923","\\ElsevierGlyph{E20C}"],["2924","\\ElsevierGlyph{E20D}"],["2925","\\ElsevierGlyph{E20B}"],["2926","\\ElsevierGlyph{E20A}"],["2927","\\ElsevierGlyph{E211}"],["2928","\\ElsevierGlyph{E20E}"],["2929","\\ElsevierGlyph{E20F}"],["292a","\\ElsevierGlyph{E210}"],["2933","\\ElsevierGlyph{E21C}"],["2936","\\ElsevierGlyph{E21A}"],["2937","\\ElsevierGlyph{E219}"],["2940","\\Elolarr{}"],["2941","\\Elorarr{}"],["2942","\\ElzRlarr{}"],["2944","\\ElzrLarr{}"],["2947","\\Elzrarrx{}"],["294e","\\LeftRightVector{}"],["294f","\\RightUpDownVector{}"],["2950","\\DownLeftRightVector{}"],["2951","\\LeftUpDownVector{}"],["2952","\\LeftVectorBar{}"],["2953","\\RightVectorBar{}"],["2954","\\RightUpVectorBar{}"],["2955","\\RightDownVectorBar{}"],["2956","\\DownLeftVectorBar{}"],["2957","\\DownRightVectorBar{}"],["2958","\\LeftUpVectorBar{}"],["2959","\\LeftDownVectorBar{}"],["295a","\\LeftTeeVector{}"],["295b","\\RightTeeVector{}"],["295c","\\RightUpTeeVector{}"],["295d","\\RightDownTeeVector{}"],["295e","\\DownLeftTeeVector{}"],["295f","\\DownRightTeeVector{}"],["2960","\\LeftUpTeeVector{}"],["2961","\\LeftDownTeeVector{}"],["296e","\\UpEquilibrium{}"],["296f","\\ReverseUpEquilibrium{}"],["2970","\\RoundImplies{}"],["297c","\\ElsevierGlyph{E214}"],["297d","\\ElsevierGlyph{E215}"],["2980","\\Elztfnc{}"],["2985","\\ElsevierGlyph{3018}"],["2986","\\Elroang{}"],["2993","<\\kern-0.58em("],["2994","\\ElsevierGlyph{E291}"],["2999","\\Elzddfnc{}"],["299c","\\Angle{}"],["29a0","\\Elzlpargt{}"],["29b5","\\ElsevierGlyph{E260}"],["29b6","\\ElsevierGlyph{E61B}"],["29ca","\\ElzLap{}"],["29cb","\\Elzdefas{}"],["29cf","\\LeftTriangleBar{}"],["29d0","\\RightTriangleBar{}"],["29dc","\\ElsevierGlyph{E372}"],["29eb","\\blacklozenge{}"],["29f4","\\RuleDelayed{}"],["2a04","\\Elxuplus{}"],["2a05","\\ElzThr{}"],["2a06","\\Elxsqcup{}"],["2a07","\\ElzInf{}"],["2a08","\\ElzSup{}"],["2a0d","\\ElzCint{}"],["2a0f","\\clockoint{}"],["2a10","\\ElsevierGlyph{E395}"],["2a16","\\sqrint{}"],["2a25","\\ElsevierGlyph{E25A}"],["2a2a","\\ElsevierGlyph{E25B}"],["2a2d","\\ElsevierGlyph{E25C}"],["2a2e","\\ElsevierGlyph{E25D}"],["2a2f","\\ElzTimes{}"],["2a34","\\ElsevierGlyph{E25E}"],["2a35","\\ElsevierGlyph{E25E}"],["2a3c","\\ElsevierGlyph{E259}"],["2a3f","\\amalg{}"],["2a53","\\ElzAnd{}"],["2a54","\\ElzOr{}"],["2a55","\\ElsevierGlyph{E36E}"],["2a56","\\ElOr{}"],["2a5e","\\perspcorrespond{}"],["2a5f","\\Elzminhat{}"],["2a63","\\ElsevierGlyph{225A}"],["2a6e","\\stackrel{*}{=}"],["2a75","\\Equal{}"],["2a7d","\\leqslant{}"],["2a7e","\\geqslant{}"],["2a85","\\lessapprox{}"],["2a86","\\gtrapprox{}"],["2a87","\\lneq{}"],["2a88","\\gneq{}"],["2a89","\\lnapprox{}"],["2a8a","\\gnapprox{}"],["2a8b","\\lesseqqgtr{}"],["2a8c","\\gtreqqless{}"],["2a95","\\eqslantless{}"],["2a96","\\eqslantgtr{}"],["2a9d","\\Pisymbol{ppi020}{117}"],["2a9e","\\Pisymbol{ppi020}{105}"],["2aa1","\\NestedLessLess{}"],["2aa2","\\NestedGreaterGreater{}"],["2aaf","\\preceq{}"],["2ab0","\\succeq{}"],["2ab5","\\precneqq{}"],["2ab6","\\succneqq{}"],["2ab7","\\precapprox{}"],["2ab8","\\succapprox{}"],["2ab9","\\precnapprox{}"],["2aba","\\succnapprox{}"],["2ac5","\\subseteqq{}"],["2ac6","\\supseteqq{}"],["2acb","\\subsetneqq{}"],["2acc","\\supsetneqq{}"],["2aeb","\\ElsevierGlyph{E30D}"],["2af6","\\Elztdcol{}"],["2afd","{{/}\\!\\!{/}}"],["300a","\\ElsevierGlyph{300A}"],["300b","\\ElsevierGlyph{300B}"],["3018","\\ElsevierGlyph{3018}"],["3019","\\ElsevierGlyph{3019}"],["301a","\\openbracketleft{}"],["301b","\\openbracketright{}"],["fb00","ff"],["fb01","fi"],["fb02","fl"],["fb03","ffi"],["fb04","ffl"],["d400","\\mathbf{A}"],["d401","\\mathbf{B}"],["d402","\\mathbf{C}"],["d403","\\mathbf{D}"],["d404","\\mathbf{E}"],["d405","\\mathbf{F}"],["d406","\\mathbf{G}"],["d407","\\mathbf{H}"],["d408","\\mathbf{I}"],["d409","\\mathbf{J}"],["d40a","\\mathbf{K}"],["d40b","\\mathbf{L}"],["d40c","\\mathbf{M}"],["d40d","\\mathbf{N}"],["d40e","\\mathbf{O}"],["d40f","\\mathbf{P}"],["d410","\\mathbf{Q}"],["d411","\\mathbf{R}"],["d412","\\mathbf{S}"],["d413","\\mathbf{T}"],["d414","\\mathbf{U}"],["d415","\\mathbf{V}"],["d416","\\mathbf{W}"],["d417","\\mathbf{X}"],["d418","\\mathbf{Y}"],["d419","\\mathbf{Z}"],["d41a","\\mathbf{a}"],["d41b","\\mathbf{b}"],["d41c","\\mathbf{c}"],["d41d","\\mathbf{d}"],["d41e","\\mathbf{e}"],["d41f","\\mathbf{f}"],["d420","\\mathbf{g}"],["d421","\\mathbf{h}"],["d422","\\mathbf{i}"],["d423","\\mathbf{j}"],["d424","\\mathbf{k}"],["d425","\\mathbf{l}"],["d426","\\mathbf{m}"],["d427","\\mathbf{n}"],["d428","\\mathbf{o}"],["d429","\\mathbf{p}"],["d42a","\\mathbf{q}"],["d42b","\\mathbf{r}"],["d42c","\\mathbf{s}"],["d42d","\\mathbf{t}"],["d42e","\\mathbf{u}"],["d42f","\\mathbf{v}"],["d430","\\mathbf{w}"],["d431","\\mathbf{x}"],["d432","\\mathbf{y}"],["d433","\\mathbf{z}"],["d434","\\mathsl{A}"],["d435","\\mathsl{B}"],["d436","\\mathsl{C}"],["d437","\\mathsl{D}"],["d438","\\mathsl{E}"],["d439","\\mathsl{F}"],["d43a","\\mathsl{G}"],["d43b","\\mathsl{H}"],["d43c","\\mathsl{I}"],["d43d","\\mathsl{J}"],["d43e","\\mathsl{K}"],["d43f","\\mathsl{L}"],["d440","\\mathsl{M}"],["d441","\\mathsl{N}"],["d442","\\mathsl{O}"],["d443","\\mathsl{P}"],["d444","\\mathsl{Q}"],["d445","\\mathsl{R}"],["d446","\\mathsl{S}"],["d447","\\mathsl{T}"],["d448","\\mathsl{U}"],["d449","\\mathsl{V}"],["d44a","\\mathsl{W}"],["d44b","\\mathsl{X}"],["d44c","\\mathsl{Y}"],["d44d","\\mathsl{Z}"],["d44e","\\mathsl{a}"],["d44f","\\mathsl{b}"],["d450","\\mathsl{c}"],["d451","\\mathsl{d}"],["d452","\\mathsl{e}"],["d453","\\mathsl{f}"],["d454","\\mathsl{g}"],["d456","\\mathsl{i}"],["d457","\\mathsl{j}"],["d458","\\mathsl{k}"],["d459","\\mathsl{l}"],["d45a","\\mathsl{m}"],["d45b","\\mathsl{n}"],["d45c","\\mathsl{o}"],["d45d","\\mathsl{p}"],["d45e","\\mathsl{q}"],["d45f","\\mathsl{r}"],["d460","\\mathsl{s}"],["d461","\\mathsl{t}"],["d462","\\mathsl{u}"],["d463","\\mathsl{v}"],["d464","\\mathsl{w}"],["d465","\\mathsl{x}"],["d466","\\mathsl{y}"],["d467","\\mathsl{z}"],["d468","\\mathbit{A}"],["d469","\\mathbit{B}"],["d46a","\\mathbit{C}"],["d46b","\\mathbit{D}"],["d46c","\\mathbit{E}"],["d46d","\\mathbit{F}"],["d46e","\\mathbit{G}"],["d46f","\\mathbit{H}"],["d470","\\mathbit{I}"],["d471","\\mathbit{J}"],["d472","\\mathbit{K}"],["d473","\\mathbit{L}"],["d474","\\mathbit{M}"],["d475","\\mathbit{N}"],["d476","\\mathbit{O}"],["d477","\\mathbit{P}"],["d478","\\mathbit{Q}"],["d479","\\mathbit{R}"],["d47a","\\mathbit{S}"],["d47b","\\mathbit{T}"],["d47c","\\mathbit{U}"],["d47d","\\mathbit{V}"],["d47e","\\mathbit{W}"],["d47f","\\mathbit{X}"],["d480","\\mathbit{Y}"],["d481","\\mathbit{Z}"],["d482","\\mathbit{a}"],["d483","\\mathbit{b}"],["d484","\\mathbit{c}"],["d485","\\mathbit{d}"],["d486","\\mathbit{e}"],["d487","\\mathbit{f}"],["d488","\\mathbit{g}"],["d489","\\mathbit{h}"],["d48a","\\mathbit{i}"],["d48b","\\mathbit{j}"],["d48c","\\mathbit{k}"],["d48d","\\mathbit{l}"],["d48e","\\mathbit{m}"],["d48f","\\mathbit{n}"],["d490","\\mathbit{o}"],["d491","\\mathbit{p}"],["d492","\\mathbit{q}"],["d493","\\mathbit{r}"],["d494","\\mathbit{s}"],["d495","\\mathbit{t}"],["d496","\\mathbit{u}"],["d497","\\mathbit{v}"],["d498","\\mathbit{w}"],["d499","\\mathbit{x}"],["d49a","\\mathbit{y}"],["d49b","\\mathbit{z}"],["d49c","\\mathscr{A}"],["d49e","\\mathscr{C}"],["d49f","\\mathscr{D}"],["d4a2","\\mathscr{G}"],["d4a5","\\mathscr{J}"],["d4a6","\\mathscr{K}"],["d4a9","\\mathscr{N}"],["d4aa","\\mathscr{O}"],["d4ab","\\mathscr{P}"],["d4ac","\\mathscr{Q}"],["d4ae","\\mathscr{S}"],["d4af","\\mathscr{T}"],["d4b0","\\mathscr{U}"],["d4b1","\\mathscr{V}"],["d4b2","\\mathscr{W}"],["d4b3","\\mathscr{X}"],["d4b4","\\mathscr{Y}"],["d4b5","\\mathscr{Z}"],["d4b6","\\mathscr{a}"],["d4b7","\\mathscr{b}"],["d4b8","\\mathscr{c}"],["d4b9","\\mathscr{d}"],["d4bb","\\mathscr{f}"],["d4bd","\\mathscr{h}"],["d4be","\\mathscr{i}"],["d4bf","\\mathscr{j}"],["d4c0","\\mathscr{k}"],["d4c1","\\mathscr{l}"],["d4c2","\\mathscr{m}"],["d4c3","\\mathscr{n}"],["d4c5","\\mathscr{p}"],["d4c6","\\mathscr{q}"],["d4c7","\\mathscr{r}"],["d4c8","\\mathscr{s}"],["d4c9","\\mathscr{t}"],["d4ca","\\mathscr{u}"],["d4cb","\\mathscr{v}"],["d4cc","\\mathscr{w}"],["d4cd","\\mathscr{x}"],["d4ce","\\mathscr{y}"],["d4cf","\\mathscr{z}"],["d4d0","\\mathmit{A}"],["d4d1","\\mathmit{B}"],["d4d2","\\mathmit{C}"],["d4d3","\\mathmit{D}"],["d4d4","\\mathmit{E}"],["d4d5","\\mathmit{F}"],["d4d6","\\mathmit{G}"],["d4d7","\\mathmit{H}"],["d4d8","\\mathmit{I}"],["d4d9","\\mathmit{J}"],["d4da","\\mathmit{K}"],["d4db","\\mathmit{L}"],["d4dc","\\mathmit{M}"],["d4dd","\\mathmit{N}"],["d4de","\\mathmit{O}"],["d4df","\\mathmit{P}"],["d4e0","\\mathmit{Q}"],["d4e1","\\mathmit{R}"],["d4e2","\\mathmit{S}"],["d4e3","\\mathmit{T}"],["d4e4","\\mathmit{U}"],["d4e5","\\mathmit{V}"],["d4e6","\\mathmit{W}"],["d4e7","\\mathmit{X}"],["d4e8","\\mathmit{Y}"],["d4e9","\\mathmit{Z}"],["d4ea","\\mathmit{a}"],["d4eb","\\mathmit{b}"],["d4ec","\\mathmit{c}"],["d4ed","\\mathmit{d}"],["d4ee","\\mathmit{e}"],["d4ef","\\mathmit{f}"],["d4f0","\\mathmit{g}"],["d4f1","\\mathmit{h}"],["d4f2","\\mathmit{i}"],["d4f3","\\mathmit{j}"],["d4f4","\\mathmit{k}"],["d4f5","\\mathmit{l}"],["d4f6","\\mathmit{m}"],["d4f7","\\mathmit{n}"],["d4f8","\\mathmit{o}"],["d4f9","\\mathmit{p}"],["d4fa","\\mathmit{q}"],["d4fb","\\mathmit{r}"],["d4fc","\\mathmit{s}"],["d4fd","\\mathmit{t}"],["d4fe","\\mathmit{u}"],["d4ff","\\mathmit{v}"],["d500","\\mathmit{w}"],["d501","\\mathmit{x}"],["d502","\\mathmit{y}"],["d503","\\mathmit{z}"],["d504","\\mathfrak{A}"],["d505","\\mathfrak{B}"],["d507","\\mathfrak{D}"],["d508","\\mathfrak{E}"],["d509","\\mathfrak{F}"],["d50a","\\mathfrak{G}"],["d50d","\\mathfrak{J}"],["d50e","\\mathfrak{K}"],["d50f","\\mathfrak{L}"],["d510","\\mathfrak{M}"],["d511","\\mathfrak{N}"],["d512","\\mathfrak{O}"],["d513","\\mathfrak{P}"],["d514","\\mathfrak{Q}"],["d516","\\mathfrak{S}"],["d517","\\mathfrak{T}"],["d518","\\mathfrak{U}"],["d519","\\mathfrak{V}"],["d51a","\\mathfrak{W}"],["d51b","\\mathfrak{X}"],["d51c","\\mathfrak{Y}"],["d51e","\\mathfrak{a}"],["d51f","\\mathfrak{b}"],["d520","\\mathfrak{c}"],["d521","\\mathfrak{d}"],["d522","\\mathfrak{e}"],["d523","\\mathfrak{f}"],["d524","\\mathfrak{g}"],["d525","\\mathfrak{h}"],["d526","\\mathfrak{i}"],["d527","\\mathfrak{j}"],["d528","\\mathfrak{k}"],["d529","\\mathfrak{l}"],["d52a","\\mathfrak{m}"],["d52b","\\mathfrak{n}"],["d52c","\\mathfrak{o}"],["d52d","\\mathfrak{p}"],["d52e","\\mathfrak{q}"],["d52f","\\mathfrak{r}"],["d530","\\mathfrak{s}"],["d531","\\mathfrak{t}"],["d532","\\mathfrak{u}"],["d533","\\mathfrak{v}"],["d534","\\mathfrak{w}"],["d535","\\mathfrak{x}"],["d536","\\mathfrak{y}"],["d537","\\mathfrak{z}"],["d538","\\mathbb{A}"],["d539","\\mathbb{B}"],["d53b","\\mathbb{D}"],["d53c","\\mathbb{E}"],["d53d","\\mathbb{F}"],["d53e","\\mathbb{G}"],["d540","\\mathbb{I}"],["d541","\\mathbb{J}"],["d542","\\mathbb{K}"],["d543","\\mathbb{L}"],["d544","\\mathbb{M}"],["d546","\\mathbb{O}"],["d54a","\\mathbb{S}"],["d54b","\\mathbb{T}"],["d54c","\\mathbb{U}"],["d54d","\\mathbb{V}"],["d54e","\\mathbb{W}"],["d54f","\\mathbb{X}"],["d550","\\mathbb{Y}"],["d552","\\mathbb{a}"],["d553","\\mathbb{b}"],["d554","\\mathbb{c}"],["d555","\\mathbb{d}"],["d556","\\mathbb{e}"],["d557","\\mathbb{f}"],["d558","\\mathbb{g}"],["d559","\\mathbb{h}"],["d55a","\\mathbb{i}"],["d55b","\\mathbb{j}"],["d55c","\\mathbb{k}"],["d55d","\\mathbb{l}"],["d55e","\\mathbb{m}"],["d55f","\\mathbb{n}"],["d560","\\mathbb{o}"],["d561","\\mathbb{p}"],["d562","\\mathbb{q}"],["d563","\\mathbb{r}"],["d564","\\mathbb{s}"],["d565","\\mathbb{t}"],["d566","\\mathbb{u}"],["d567","\\mathbb{v}"],["d568","\\mathbb{w}"],["d569","\\mathbb{x}"],["d56a","\\mathbb{y}"],["d56b","\\mathbb{z}"],["d56c","\\mathslbb{A}"],["d56d","\\mathslbb{B}"],["d56e","\\mathslbb{C}"],["d56f","\\mathslbb{D}"],["d570","\\mathslbb{E}"],["d571","\\mathslbb{F}"],["d572","\\mathslbb{G}"],["d573","\\mathslbb{H}"],["d574","\\mathslbb{I}"],["d575","\\mathslbb{J}"],["d576","\\mathslbb{K}"],["d577","\\mathslbb{L}"],["d578","\\mathslbb{M}"],["d579","\\mathslbb{N}"],["d57a","\\mathslbb{O}"],["d57b","\\mathslbb{P}"],["d57c","\\mathslbb{Q}"],["d57d","\\mathslbb{R}"],["d57e","\\mathslbb{S}"],["d57f","\\mathslbb{T}"],["d580","\\mathslbb{U}"],["d581","\\mathslbb{V}"],["d582","\\mathslbb{W}"],["d583","\\mathslbb{X}"],["d584","\\mathslbb{Y}"],["d585","\\mathslbb{Z}"],["d586","\\mathslbb{a}"],["d587","\\mathslbb{b}"],["d588","\\mathslbb{c}"],["d589","\\mathslbb{d}"],["d58a","\\mathslbb{e}"],["d58b","\\mathslbb{f}"],["d58c","\\mathslbb{g}"],["d58d","\\mathslbb{h}"],["d58e","\\mathslbb{i}"],["d58f","\\mathslbb{j}"],["d590","\\mathslbb{k}"],["d591","\\mathslbb{l}"],["d592","\\mathslbb{m}"],["d593","\\mathslbb{n}"],["d594","\\mathslbb{o}"],["d595","\\mathslbb{p}"],["d596","\\mathslbb{q}"],["d597","\\mathslbb{r}"],["d598","\\mathslbb{s}"],["d599","\\mathslbb{t}"],["d59a","\\mathslbb{u}"],["d59b","\\mathslbb{v}"],["d59c","\\mathslbb{w}"],["d59d","\\mathslbb{x}"],["d59e","\\mathslbb{y}"],["d59f","\\mathslbb{z}"],["d5a0","\\mathsf{A}"],["d5a1","\\mathsf{B}"],["d5a2","\\mathsf{C}"],["d5a3","\\mathsf{D}"],["d5a4","\\mathsf{E}"],["d5a5","\\mathsf{F}"],["d5a6","\\mathsf{G}"],["d5a7","\\mathsf{H}"],["d5a8","\\mathsf{I}"],["d5a9","\\mathsf{J}"],["d5aa","\\mathsf{K}"],["d5ab","\\mathsf{L}"],["d5ac","\\mathsf{M}"],["d5ad","\\mathsf{N}"],["d5ae","\\mathsf{O}"],["d5af","\\mathsf{P}"],["d5b0","\\mathsf{Q}"],["d5b1","\\mathsf{R}"],["d5b2","\\mathsf{S}"],["d5b3","\\mathsf{T}"],["d5b4","\\mathsf{U}"],["d5b5","\\mathsf{V}"],["d5b6","\\mathsf{W}"],["d5b7","\\mathsf{X}"],["d5b8","\\mathsf{Y}"],["d5b9","\\mathsf{Z}"],["d5ba","\\mathsf{a}"],["d5bb","\\mathsf{b}"],["d5bc","\\mathsf{c}"],["d5bd","\\mathsf{d}"],["d5be","\\mathsf{e}"],["d5bf","\\mathsf{f}"],["d5c0","\\mathsf{g}"],["d5c1","\\mathsf{h}"],["d5c2","\\mathsf{i}"],["d5c3","\\mathsf{j}"],["d5c4","\\mathsf{k}"],["d5c5","\\mathsf{l}"],["d5c6","\\mathsf{m}"],["d5c7","\\mathsf{n}"],["d5c8","\\mathsf{o}"],["d5c9","\\mathsf{p}"],["d5ca","\\mathsf{q}"],["d5cb","\\mathsf{r}"],["d5cc","\\mathsf{s}"],["d5cd","\\mathsf{t}"],["d5ce","\\mathsf{u}"],["d5cf","\\mathsf{v}"],["d5d0","\\mathsf{w}"],["d5d1","\\mathsf{x}"],["d5d2","\\mathsf{y}"],["d5d3","\\mathsf{z}"],["d5d4","\\mathsfbf{A}"],["d5d5","\\mathsfbf{B}"],["d5d6","\\mathsfbf{C}"],["d5d7","\\mathsfbf{D}"],["d5d8","\\mathsfbf{E}"],["d5d9","\\mathsfbf{F}"],["d5da","\\mathsfbf{G}"],["d5db","\\mathsfbf{H}"],["d5dc","\\mathsfbf{I}"],["d5dd","\\mathsfbf{J}"],["d5de","\\mathsfbf{K}"],["d5df","\\mathsfbf{L}"],["d5e0","\\mathsfbf{M}"],["d5e1","\\mathsfbf{N}"],["d5e2","\\mathsfbf{O}"],["d5e3","\\mathsfbf{P}"],["d5e4","\\mathsfbf{Q}"],["d5e5","\\mathsfbf{R}"],["d5e6","\\mathsfbf{S}"],["d5e7","\\mathsfbf{T}"],["d5e8","\\mathsfbf{U}"],["d5e9","\\mathsfbf{V}"],["d5ea","\\mathsfbf{W}"],["d5eb","\\mathsfbf{X}"],["d5ec","\\mathsfbf{Y}"],["d5ed","\\mathsfbf{Z}"],["d5ee","\\mathsfbf{a}"],["d5ef","\\mathsfbf{b}"],["d5f0","\\mathsfbf{c}"],["d5f1","\\mathsfbf{d}"],["d5f2","\\mathsfbf{e}"],["d5f3","\\mathsfbf{f}"],["d5f4","\\mathsfbf{g}"],["d5f5","\\mathsfbf{h}"],["d5f6","\\mathsfbf{i}"],["d5f7","\\mathsfbf{j}"],["d5f8","\\mathsfbf{k}"],["d5f9","\\mathsfbf{l}"],["d5fa","\\mathsfbf{m}"],["d5fb","\\mathsfbf{n}"],["d5fc","\\mathsfbf{o}"],["d5fd","\\mathsfbf{p}"],["d5fe","\\mathsfbf{q}"],["d5ff","\\mathsfbf{r}"],["d600","\\mathsfbf{s}"],["d601","\\mathsfbf{t}"],["d602","\\mathsfbf{u}"],["d603","\\mathsfbf{v}"],["d604","\\mathsfbf{w}"],["d605","\\mathsfbf{x}"],["d606","\\mathsfbf{y}"],["d607","\\mathsfbf{z}"],["d608","\\mathsfsl{A}"],["d609","\\mathsfsl{B}"],["d60a","\\mathsfsl{C}"],["d60b","\\mathsfsl{D}"],["d60c","\\mathsfsl{E}"],["d60d","\\mathsfsl{F}"],["d60e","\\mathsfsl{G}"],["d60f","\\mathsfsl{H}"],["d610","\\mathsfsl{I}"],["d611","\\mathsfsl{J}"],["d612","\\mathsfsl{K}"],["d613","\\mathsfsl{L}"],["d614","\\mathsfsl{M}"],["d615","\\mathsfsl{N}"],["d616","\\mathsfsl{O}"],["d617","\\mathsfsl{P}"],["d618","\\mathsfsl{Q}"],["d619","\\mathsfsl{R}"],["d61a","\\mathsfsl{S}"],["d61b","\\mathsfsl{T}"],["d61c","\\mathsfsl{U}"],["d61d","\\mathsfsl{V}"],["d61e","\\mathsfsl{W}"],["d61f","\\mathsfsl{X}"],["d620","\\mathsfsl{Y}"],["d621","\\mathsfsl{Z}"],["d622","\\mathsfsl{a}"],["d623","\\mathsfsl{b}"],["d624","\\mathsfsl{c}"],["d625","\\mathsfsl{d}"],["d626","\\mathsfsl{e}"],["d627","\\mathsfsl{f}"],["d628","\\mathsfsl{g}"],["d629","\\mathsfsl{h}"],["d62a","\\mathsfsl{i}"],["d62b","\\mathsfsl{j}"],["d62c","\\mathsfsl{k}"],["d62d","\\mathsfsl{l}"],["d62e","\\mathsfsl{m}"],["d62f","\\mathsfsl{n}"],["d630","\\mathsfsl{o}"],["d631","\\mathsfsl{p}"],["d632","\\mathsfsl{q}"],["d633","\\mathsfsl{r}"],["d634","\\mathsfsl{s}"],["d635","\\mathsfsl{t}"],["d636","\\mathsfsl{u}"],["d637","\\mathsfsl{v}"],["d638","\\mathsfsl{w}"],["d639","\\mathsfsl{x}"],["d63a","\\mathsfsl{y}"],["d63b","\\mathsfsl{z}"],["d63c","\\mathsfbfsl{A}"],["d63d","\\mathsfbfsl{B}"],["d63e","\\mathsfbfsl{C}"],["d63f","\\mathsfbfsl{D}"],["d640","\\mathsfbfsl{E}"],["d641","\\mathsfbfsl{F}"],["d642","\\mathsfbfsl{G}"],["d643","\\mathsfbfsl{H}"],["d644","\\mathsfbfsl{I}"],["d645","\\mathsfbfsl{J}"],["d646","\\mathsfbfsl{K}"],["d647","\\mathsfbfsl{L}"],["d648","\\mathsfbfsl{M}"],["d649","\\mathsfbfsl{N}"],["d64a","\\mathsfbfsl{O}"],["d64b","\\mathsfbfsl{P}"],["d64c","\\mathsfbfsl{Q}"],["d64d","\\mathsfbfsl{R}"],["d64e","\\mathsfbfsl{S}"],["d64f","\\mathsfbfsl{T}"],["d650","\\mathsfbfsl{U}"],["d651","\\mathsfbfsl{V}"],["d652","\\mathsfbfsl{W}"],["d653","\\mathsfbfsl{X}"],["d654","\\mathsfbfsl{Y}"],["d655","\\mathsfbfsl{Z}"],["d656","\\mathsfbfsl{a}"],["d657","\\mathsfbfsl{b}"],["d658","\\mathsfbfsl{c}"],["d659","\\mathsfbfsl{d}"],["d65a","\\mathsfbfsl{e}"],["d65b","\\mathsfbfsl{f}"],["d65c","\\mathsfbfsl{g}"],["d65d","\\mathsfbfsl{h}"],["d65e","\\mathsfbfsl{i}"],["d65f","\\mathsfbfsl{j}"],["d660","\\mathsfbfsl{k}"],["d661","\\mathsfbfsl{l}"],["d662","\\mathsfbfsl{m}"],["d663","\\mathsfbfsl{n}"],["d664","\\mathsfbfsl{o}"],["d665","\\mathsfbfsl{p}"],["d666","\\mathsfbfsl{q}"],["d667","\\mathsfbfsl{r}"],["d668","\\mathsfbfsl{s}"],["d669","\\mathsfbfsl{t}"],["d66a","\\mathsfbfsl{u}"],["d66b","\\mathsfbfsl{v}"],["d66c","\\mathsfbfsl{w}"],["d66d","\\mathsfbfsl{x}"],["d66e","\\mathsfbfsl{y}"],["d66f","\\mathsfbfsl{z}"],["d670","\\mathtt{A}"],["d671","\\mathtt{B}"],["d672","\\mathtt{C}"],["d673","\\mathtt{D}"],["d674","\\mathtt{E}"],["d675","\\mathtt{F}"],["d676","\\mathtt{G}"],["d677","\\mathtt{H}"],["d678","\\mathtt{I}"],["d679","\\mathtt{J}"],["d67a","\\mathtt{K}"],["d67b","\\mathtt{L}"],["d67c","\\mathtt{M}"],["d67d","\\mathtt{N}"],["d67e","\\mathtt{O}"],["d67f","\\mathtt{P}"],["d680","\\mathtt{Q}"],["d681","\\mathtt{R}"],["d682","\\mathtt{S}"],["d683","\\mathtt{T}"],["d684","\\mathtt{U}"],["d685","\\mathtt{V}"],["d686","\\mathtt{W}"],["d687","\\mathtt{X}"],["d688","\\mathtt{Y}"],["d689","\\mathtt{Z}"],["d68a","\\mathtt{a}"],["d68b","\\mathtt{b}"],["d68c","\\mathtt{c}"],["d68d","\\mathtt{d}"],["d68e","\\mathtt{e}"],["d68f","\\mathtt{f}"],["d690","\\mathtt{g}"],["d691","\\mathtt{h}"],["d692","\\mathtt{i}"],["d693","\\mathtt{j}"],["d694","\\mathtt{k}"],["d695","\\mathtt{l}"],["d696","\\mathtt{m}"],["d697","\\mathtt{n}"],["d698","\\mathtt{o}"],["d699","\\mathtt{p}"],["d69a","\\mathtt{q}"],["d69b","\\mathtt{r}"],["d69c","\\mathtt{s}"],["d69d","\\mathtt{t}"],["d69e","\\mathtt{u}"],["d69f","\\mathtt{v}"],["d6a0","\\mathtt{w}"],["d6a1","\\mathtt{x}"],["d6a2","\\mathtt{y}"],["d6a3","\\mathtt{z}"],["d6a8","\\mathbf{\\Alpha}"],["d6a9","\\mathbf{\\Beta}"],["d6aa","\\mathbf{\\Gamma}"],["d6ab","\\mathbf{\\Delta}"],["d6ac","\\mathbf{\\Epsilon}"],["d6ad","\\mathbf{\\Zeta}"],["d6ae","\\mathbf{\\Eta}"],["d6af","\\mathbf{\\Theta}"],["d6b0","\\mathbf{\\Iota}"],["d6b1","\\mathbf{\\Kappa}"],["d6b2","\\mathbf{\\Lambda}"],["d6b5","\\mathbf{\\Xi}"],["d6b7","\\mathbf{\\Pi}"],["d6b8","\\mathbf{\\Rho}"],["d6b9","\\mathbf{\\vartheta}"],["d6ba","\\mathbf{\\Sigma}"],["d6bb","\\mathbf{\\Tau}"],["d6bc","\\mathbf{\\Upsilon}"],["d6bd","\\mathbf{\\Phi}"],["d6be","\\mathbf{\\Chi}"],["d6bf","\\mathbf{\\Psi}"],["d6c0","\\mathbf{\\Omega}"],["d6c1","\\mathbf{\\nabla}"],["d6c2","\\mathbf{\\Alpha}"],["d6c3","\\mathbf{\\Beta}"],["d6c4","\\mathbf{\\Gamma}"],["d6c5","\\mathbf{\\Delta}"],["d6c6","\\mathbf{\\Epsilon}"],["d6c7","\\mathbf{\\Zeta}"],["d6c8","\\mathbf{\\Eta}"],["d6c9","\\mathbf{\\theta}"],["d6ca","\\mathbf{\\Iota}"],["d6cb","\\mathbf{\\Kappa}"],["d6cc","\\mathbf{\\Lambda}"],["d6cf","\\mathbf{\\Xi}"],["d6d1","\\mathbf{\\Pi}"],["d6d2","\\mathbf{\\Rho}"],["d6d3","\\mathbf{\\varsigma}"],["d6d4","\\mathbf{\\Sigma}"],["d6d5","\\mathbf{\\Tau}"],["d6d6","\\mathbf{\\Upsilon}"],["d6d7","\\mathbf{\\Phi}"],["d6d8","\\mathbf{\\Chi}"],["d6d9","\\mathbf{\\Psi}"],["d6da","\\mathbf{\\Omega}"],["d6db","\\partial{}"],["d6dc","\\in"],["d6dd","\\mathbf{\\vartheta}"],["d6de","\\mathbf{\\varkappa}"],["d6df","\\mathbf{\\phi}"],["d6e0","\\mathbf{\\varrho}"],["d6e1","\\mathbf{\\varpi}"],["d6e2","\\mathsl{\\Alpha}"],["d6e3","\\mathsl{\\Beta}"],["d6e4","\\mathsl{\\Gamma}"],["d6e5","\\mathsl{\\Delta}"],["d6e6","\\mathsl{\\Epsilon}"],["d6e7","\\mathsl{\\Zeta}"],["d6e8","\\mathsl{\\Eta}"],["d6e9","\\mathsl{\\Theta}"],["d6ea","\\mathsl{\\Iota}"],["d6eb","\\mathsl{\\Kappa}"],["d6ec","\\mathsl{\\Lambda}"],["d6ef","\\mathsl{\\Xi}"],["d6f1","\\mathsl{\\Pi}"],["d6f2","\\mathsl{\\Rho}"],["d6f3","\\mathsl{\\vartheta}"],["d6f4","\\mathsl{\\Sigma}"],["d6f5","\\mathsl{\\Tau}"],["d6f6","\\mathsl{\\Upsilon}"],["d6f7","\\mathsl{\\Phi}"],["d6f8","\\mathsl{\\Chi}"],["d6f9","\\mathsl{\\Psi}"],["d6fa","\\mathsl{\\Omega}"],["d6fb","\\mathsl{\\nabla}"],["d6fc","\\mathsl{\\Alpha}"],["d6fd","\\mathsl{\\Beta}"],["d6fe","\\mathsl{\\Gamma}"],["d6ff","\\mathsl{\\Delta}"],["d700","\\mathsl{\\Epsilon}"],["d701","\\mathsl{\\Zeta}"],["d702","\\mathsl{\\Eta}"],["d703","\\mathsl{\\Theta}"],["d704","\\mathsl{\\Iota}"],["d705","\\mathsl{\\Kappa}"],["d706","\\mathsl{\\Lambda}"],["d709","\\mathsl{\\Xi}"],["d70b","\\mathsl{\\Pi}"],["d70c","\\mathsl{\\Rho}"],["d70d","\\mathsl{\\varsigma}"],["d70e","\\mathsl{\\Sigma}"],["d70f","\\mathsl{\\Tau}"],["d710","\\mathsl{\\Upsilon}"],["d711","\\mathsl{\\Phi}"],["d712","\\mathsl{\\Chi}"],["d713","\\mathsl{\\Psi}"],["d714","\\mathsl{\\Omega}"],["d715","\\partial{}"],["d716","\\in"],["d717","\\mathsl{\\vartheta}"],["d718","\\mathsl{\\varkappa}"],["d719","\\mathsl{\\phi}"],["d71a","\\mathsl{\\varrho}"],["d71b","\\mathsl{\\varpi}"],["d71c","\\mathbit{\\Alpha}"],["d71d","\\mathbit{\\Beta}"],["d71e","\\mathbit{\\Gamma}"],["d71f","\\mathbit{\\Delta}"],["d720","\\mathbit{\\Epsilon}"],["d721","\\mathbit{\\Zeta}"],["d722","\\mathbit{\\Eta}"],["d723","\\mathbit{\\Theta}"],["d724","\\mathbit{\\Iota}"],["d725","\\mathbit{\\Kappa}"],["d726","\\mathbit{\\Lambda}"],["d729","\\mathbit{\\Xi}"],["d72b","\\mathbit{\\Pi}"],["d72c","\\mathbit{\\Rho}"],["d72d","\\mathbit{O}"],["d72e","\\mathbit{\\Sigma}"],["d72f","\\mathbit{\\Tau}"],["d730","\\mathbit{\\Upsilon}"],["d731","\\mathbit{\\Phi}"],["d732","\\mathbit{\\Chi}"],["d733","\\mathbit{\\Psi}"],["d734","\\mathbit{\\Omega}"],["d735","\\mathbit{\\nabla}"],["d736","\\mathbit{\\Alpha}"],["d737","\\mathbit{\\Beta}"],["d738","\\mathbit{\\Gamma}"],["d739","\\mathbit{\\Delta}"],["d73a","\\mathbit{\\Epsilon}"],["d73b","\\mathbit{\\Zeta}"],["d73c","\\mathbit{\\Eta}"],["d73d","\\mathbit{\\Theta}"],["d73e","\\mathbit{\\Iota}"],["d73f","\\mathbit{\\Kappa}"],["d740","\\mathbit{\\Lambda}"],["d743","\\mathbit{\\Xi}"],["d745","\\mathbit{\\Pi}"],["d746","\\mathbit{\\Rho}"],["d747","\\mathbit{\\varsigma}"],["d748","\\mathbit{\\Sigma}"],["d749","\\mathbit{\\Tau}"],["d74a","\\mathbit{\\Upsilon}"],["d74b","\\mathbit{\\Phi}"],["d74c","\\mathbit{\\Chi}"],["d74d","\\mathbit{\\Psi}"],["d74e","\\mathbit{\\Omega}"],["d74f","\\partial{}"],["d750","\\in"],["d751","\\mathbit{\\vartheta}"],["d752","\\mathbit{\\varkappa}"],["d753","\\mathbit{\\phi}"],["d754","\\mathbit{\\varrho}"],["d755","\\mathbit{\\varpi}"],["d756","\\mathsfbf{\\Alpha}"],["d757","\\mathsfbf{\\Beta}"],["d758","\\mathsfbf{\\Gamma}"],["d759","\\mathsfbf{\\Delta}"],["d75a","\\mathsfbf{\\Epsilon}"],["d75b","\\mathsfbf{\\Zeta}"],["d75c","\\mathsfbf{\\Eta}"],["d75d","\\mathsfbf{\\Theta}"],["d75e","\\mathsfbf{\\Iota}"],["d75f","\\mathsfbf{\\Kappa}"],["d760","\\mathsfbf{\\Lambda}"],["d763","\\mathsfbf{\\Xi}"],["d765","\\mathsfbf{\\Pi}"],["d766","\\mathsfbf{\\Rho}"],["d767","\\mathsfbf{\\vartheta}"],["d768","\\mathsfbf{\\Sigma}"],["d769","\\mathsfbf{\\Tau}"],["d76a","\\mathsfbf{\\Upsilon}"],["d76b","\\mathsfbf{\\Phi}"],["d76c","\\mathsfbf{\\Chi}"],["d76d","\\mathsfbf{\\Psi}"],["d76e","\\mathsfbf{\\Omega}"],["d76f","\\mathsfbf{\\nabla}"],["d770","\\mathsfbf{\\Alpha}"],["d771","\\mathsfbf{\\Beta}"],["d772","\\mathsfbf{\\Gamma}"],["d773","\\mathsfbf{\\Delta}"],["d774","\\mathsfbf{\\Epsilon}"],["d775","\\mathsfbf{\\Zeta}"],["d776","\\mathsfbf{\\Eta}"],["d777","\\mathsfbf{\\Theta}"],["d778","\\mathsfbf{\\Iota}"],["d779","\\mathsfbf{\\Kappa}"],["d77a","\\mathsfbf{\\Lambda}"],["d77d","\\mathsfbf{\\Xi}"],["d77f","\\mathsfbf{\\Pi}"],["d780","\\mathsfbf{\\Rho}"],["d781","\\mathsfbf{\\varsigma}"],["d782","\\mathsfbf{\\Sigma}"],["d783","\\mathsfbf{\\Tau}"],["d784","\\mathsfbf{\\Upsilon}"],["d785","\\mathsfbf{\\Phi}"],["d786","\\mathsfbf{\\Chi}"],["d787","\\mathsfbf{\\Psi}"],["d788","\\mathsfbf{\\Omega}"],["d789","\\partial{}"],["d78a","\\in"],["d78b","\\mathsfbf{\\vartheta}"],["d78c","\\mathsfbf{\\varkappa}"],["d78d","\\mathsfbf{\\phi}"],["d78e","\\mathsfbf{\\varrho}"],["d78f","\\mathsfbf{\\varpi}"],["d790","\\mathsfbfsl{\\Alpha}"],["d791","\\mathsfbfsl{\\Beta}"],["d792","\\mathsfbfsl{\\Gamma}"],["d793","\\mathsfbfsl{\\Delta}"],["d794","\\mathsfbfsl{\\Epsilon}"],["d795","\\mathsfbfsl{\\Zeta}"],["d796","\\mathsfbfsl{\\Eta}"],["d797","\\mathsfbfsl{\\vartheta}"],["d798","\\mathsfbfsl{\\Iota}"],["d799","\\mathsfbfsl{\\Kappa}"],["d79a","\\mathsfbfsl{\\Lambda}"],["d79d","\\mathsfbfsl{\\Xi}"],["d79f","\\mathsfbfsl{\\Pi}"],["d7a0","\\mathsfbfsl{\\Rho}"],["d7a1","\\mathsfbfsl{\\vartheta}"],["d7a2","\\mathsfbfsl{\\Sigma}"],["d7a3","\\mathsfbfsl{\\Tau}"],["d7a4","\\mathsfbfsl{\\Upsilon}"],["d7a5","\\mathsfbfsl{\\Phi}"],["d7a6","\\mathsfbfsl{\\Chi}"],["d7a7","\\mathsfbfsl{\\Psi}"],["d7a8","\\mathsfbfsl{\\Omega}"],["d7a9","\\mathsfbfsl{\\nabla}"],["d7aa","\\mathsfbfsl{\\Alpha}"],["d7ab","\\mathsfbfsl{\\Beta}"],["d7ac","\\mathsfbfsl{\\Gamma}"],["d7ad","\\mathsfbfsl{\\Delta}"],["d7ae","\\mathsfbfsl{\\Epsilon}"],["d7af","\\mathsfbfsl{\\Zeta}"],["d7b0","\\mathsfbfsl{\\Eta}"],["d7b1","\\mathsfbfsl{\\vartheta}"],["d7b2","\\mathsfbfsl{\\Iota}"],["d7b3","\\mathsfbfsl{\\Kappa}"],["d7b4","\\mathsfbfsl{\\Lambda}"],["d7b7","\\mathsfbfsl{\\Xi}"],["d7b9","\\mathsfbfsl{\\Pi}"],["d7ba","\\mathsfbfsl{\\Rho}"],["d7bb","\\mathsfbfsl{\\varsigma}"],["d7bc","\\mathsfbfsl{\\Sigma}"],["d7bd","\\mathsfbfsl{\\Tau}"],["d7be","\\mathsfbfsl{\\Upsilon}"],["d7bf","\\mathsfbfsl{\\Phi}"],["d7c0","\\mathsfbfsl{\\Chi}"],["d7c1","\\mathsfbfsl{\\Psi}"],["d7c2","\\mathsfbfsl{\\Omega}"],["d7c3","\\partial{}"],["d7c4","\\in"],["d7c5","\\mathsfbfsl{\\vartheta}"],["d7c6","\\mathsfbfsl{\\varkappa}"],["d7c7","\\mathsfbfsl{\\phi}"],["d7c8","\\mathsfbfsl{\\varrho}"],["d7c9","\\mathsfbfsl{\\varpi}"],["d7ce","\\mathbf{0}"],["d7cf","\\mathbf{1}"],["d7d0","\\mathbf{2}"],["d7d1","\\mathbf{3}"],["d7d2","\\mathbf{4}"],["d7d3","\\mathbf{5}"],["d7d4","\\mathbf{6}"],["d7d5","\\mathbf{7}"],["d7d6","\\mathbf{8}"],["d7d7","\\mathbf{9}"],["d7d8","\\mathbb{0}"],["d7d9","\\mathbb{1}"],["d7da","\\mathbb{2}"],["d7db","\\mathbb{3}"],["d7dc","\\mathbb{4}"],["d7dd","\\mathbb{5}"],["d7de","\\mathbb{6}"],["d7df","\\mathbb{7}"],["d7e0","\\mathbb{8}"],["d7e1","\\mathbb{9}"],["d7e2","\\mathsf{0}"],["d7e3","\\mathsf{1}"],["d7e4","\\mathsf{2}"],["d7e5","\\mathsf{3}"],["d7e6","\\mathsf{4}"],["d7e7","\\mathsf{5}"],["d7e8","\\mathsf{6}"],["d7e9","\\mathsf{7}"],["d7ea","\\mathsf{8}"],["d7eb","\\mathsf{9}"],["d7ec","\\mathsfbf{0}"],["d7ed","\\mathsfbf{1}"],["d7ee","\\mathsfbf{2}"],["d7ef","\\mathsfbf{3}"],["d7f0","\\mathsfbf{4}"],["d7f1","\\mathsfbf{5}"],["d7f2","\\mathsfbf{6}"],["d7f3","\\mathsfbf{7}"],["d7f4","\\mathsfbf{8}"],["d7f5","\\mathsfbf{9}"],["d7f6","\\mathtt{0}"],["d7f7","\\mathtt{1}"],["d7f8","\\mathtt{2}"],["d7f9","\\mathtt{3}"],["d7fa","\\mathtt{4}"],["d7fb","\\mathtt{5}"],["d7fc","\\mathtt{6}"],["d7fd","\\mathtt{7}"],["d7fe","\\mathtt{8}"],["d7ff","\\mathtt{9}"]]);var zC=["url","doi","eprint","file","verba","verbb","verbc","pdf"],F1={condition:h((r,e)=>!!(e.escape&&!zC.includes(r)),"condition"),modifyRenderedValue:h(r=>{var s;let e=r,t=[];e=e.replace(/\$[^$]+\$/g,o=>(t.push(o),"MATH.EXP.".concat(t.length-1)));let i="",n=!1;for(let o=0;o<e.length;o++){if(n){n=!1,i+=e[o];continue}if(e[o]==="\\"){n=!0,i+=e[o];continue}let l=e.charCodeAt(o).toString(16).padStart(4,"0");i+=(s=S1.get(l))!=null?s:e[o]}return i.replace(/MATH\.EXP\.(\d+)/g,(o,l)=>{var a;return(a=t[Number(l)])!=null?a:""})},"modifyRenderedValue")};var Q1={condition:h(r=>r==="pages","condition"),modifyRenderedValue:h(r=>{let e=r;for(let t=0;t<4;t++)e=e.replace(/(\d)\s*-\s*(\d)/g,"$1--$2");return e},"modifyRenderedValue")};var B1={condition:h((r,e)=>r==="author"&&e.maxAuthors?e.maxAuthors:!1,"condition"),modifyRenderedValue:h((r,e)=>{let t=r.split(" and ");return t.length>e?[...t.slice(0,e),"others"].join(" and "):r},"modifyRenderedValue")};var E1={condition:h((r,e)=>{var t;return!!((t=e.removeBraces)!=null&&t.some(i=>i.toLocaleLowerCase()===r))},"condition"),modifyRenderedValue:h(r=>yo(Wh(kr(r))),"modifyRenderedValue")};var C1={condition:h((r,e)=>!!e.stripEnclosingBraces,"condition"),modifyRenderedValue:h(r=>r.replace(/^\{([^{}]*)\}$/g,"$1"),"modifyRenderedValue")};function L1(r,e,t){var s,o,l,a,c;let i=new Map,n=[];for(let f of r.children){if(f.type==="text"||((s=f.block)==null?void 0:s.type)!=="entry"&&!t.includes("special")){n.push(f);continue}let u=new Map;for(let d of t){d.startsWith("-")&&(d=d.slice(1));let p;switch(d){case"key":if(((o=f.block)==null?void 0:o.type)!=="entry")continue;p=(l=f.block.key)!=null?l:"";break;case"type":p=f.command;break;case"month":{if(((a=f.block)==null?void 0:a.type)!=="entry")continue;let m=e.lookupEntryValue(f.block,d),y=m?qh.indexOf(m):-1;p=y>-1?y:"";break}case"special":p=jC(f)?0:1;break;default:if(((c=f.block)==null?void 0:c.type)!=="entry")continue;p=e.lookupEntryValue(f.block,d)}u.set(d,typeof p=="string"?p.toLowerCase():p)}for(i.set(f,u);n.length>0;){let d=n.pop();if(!d)break;i.set(d,u)}}for(let f of[...t].reverse()){let u=f.startsWith("-"),d=u?f.slice(1):f;r.children.sort((p,m)=>{var b,v,w,B;let y=(v=(b=i.get(p))==null?void 0:b.get(d))!=null?v:"\uFFF0",g=(B=(w=i.get(m))==null?void 0:w.get(d))!=null?B:"\uFFF0";return typeof y=="number"&&(y=String(y).padStart(50,"0")),typeof g=="number"&&(g=String(g).padStart(50,"0")),(u?g:y).localeCompare(u?y:g)})}}h(L1,"sortEntries");var WC=new Set(["string","preamble","set","xdata"]);function jC(r){return WC.has(r.command.toLowerCase())}h(jC,"isBibLaTeXSpecialEntry");function U1(r,e){for(let t of r)t.fields.sort((i,n)=>{let s=e.indexOf(i.name.toLocaleLowerCase()),o=e.indexOf(n.name.toLocaleLowerCase());return s===-1&&o===-1?0:s===-1?1:o===-1?-1:o<s?1:o>s?-1:0})}h(U1,"sortEntryFields");function kc(r,e={}){let t=Ti(e),i=s1(r),n=v1(i),s=O1(n),o=s.filter(d=>!d.key).map(d=>({code:"MISSING_KEY",message:"".concat(d.parent.command," entry does not have a citation key.")})),l=new xo(t),a=[w1,B1,F1,k1,Q1,x1,C1,E1];for(let d of s)for(let p of d.fields)for(let m of a){let y=m.condition(p.name.toLocaleLowerCase(),t,d,l);if(y){m.modifyNode&&(m.modifyNode(p,y),l.invalidateEntryValue(d,p.name));for(let g of p.value.concat)if((g.type==="braced"||g.type==="quoted")&&m.modifyRenderedValue){let b=m.modifyRenderedValue(g.value,y);b!==g.value&&(g.value=b,l.invalidateEntryValue(d,p.name))}}}let c=u1(s,l,t.duplicates,t.merge);o.push(...c.warnings),n.children=n.children.filter(d=>!Jh(d)||!c.entries.has(d.block)),t.sort&&L1(n,l,t.sort),t.sortFields&&U1(s,t.sortFields);let f=t.generateKeys?g1(s,l,t.generateKeys):void 0;return{bibtex:h1(n,t,f),warnings:o,count:s.length}}h(kc,"tidy");function O1(r){return r.children.filter(Jh).map(e=>e.block)}h(O1,"getEntries");var Ao=class Ao{lineAt(e){if(e<0||e>this.length)throw new RangeError("Invalid position ".concat(e," in document of length ").concat(this.length));return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError("Invalid line number ".concat(e," in ").concat(this.lines,"-line document"));return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Or(this,e,t);let n=[];return this.decompose(0,e,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(t,this.length,n,1),Er.from(n,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Or(this,e,t);let i=[];return this.decompose(e,t,i,0),Er.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),n=new Pi(this),s=new Pi(e);for(let o=t,l=t;;){if(n.next(o),s.next(o),o=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(l+=n.value.length,n.done||l>=i)return!0}}iter(e=1){return new Pi(this,e)}iterRange(e,t=this.length){return new Uo(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let n=this.line(e).from;i=this.iterRange(n,Math.max(n,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Oo(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Ao.empty:e.length<=32?new lt(e):Er.from(lt.split(e,[]))}};h(Ao,"Text");var de=Ao,pt=class pt extends de{constructor(e,t=HC(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,n){for(let s=0;;s++){let o=this.text[s],l=n+o.length;if((t?i:l)>=e)return new Sc(n,l,i,o);n=l+1,i++}}decompose(e,t,i,n){let s=e<=0&&t>=this.length?this:new pt(_1(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(n&1){let o=i.pop(),l=Lo(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new pt(l,o.length+s.length));else{let a=l.length>>1;i.push(new pt(l.slice(0,a)),new pt(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof pt))return super.replace(e,t,i);[e,t]=Or(this,e,t);let n=Lo(this.text,Lo(i.text,_1(this.text,0,e)),t),s=this.length+i.length-(t-e);return n.length<=32?new pt(n,s):Er.from(pt.split(n,[]),s)}sliceString(e,t=this.length,i="\n"){[e,t]=Or(this,e,t);let n="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(n+=i),e<a&&t>s&&(n+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return n}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],n=-1;for(let s of e)i.push(s),n+=s.length+1,i.length==32&&(t.push(new pt(i,n)),i=[],n=-1);return n>-1&&t.push(new pt(i,n)),t}};h(pt,"TextLeaf");var lt=pt,mi=class mi extends de{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,n){for(let s=0;;s++){let o=this.children[s],l=n+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,n);n=l+1,i=a+1}}decompose(e,t,i,n){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let c=n&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!c?i.push(l):l.decompose(e-o,t-o,i,c)}o=a+1}}replace(e,t,i){if([e,t]=Or(this,e,t),i.lines<this.lines)for(let n=0,s=0;n<this.children.length;n++){let o=this.children[n],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,i),c=this.lines-o.lines+a.lines;if(a.lines<c>>4&&a.lines>c>>6){let f=this.children.slice();return f[n]=a,new mi(f,this.length-(t-e)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i="\n"){[e,t]=Or(this,e,t);let n="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(n+=i),e<a&&t>o&&(n+=l.sliceString(e-o,t-o,i)),o=a+1}return n}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof mi))return 0;let i=0,[n,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;n+=t,s+=t){if(n==o||s==l)return i;let a=this.children[n],c=e.children[s];if(a!=c)return i+a.scanIdentical(c,t);i+=a.length+1}}static from(e,t=e.reduce((i,n)=>i+n.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let m of e)m.flatten(p);return new lt(p,t)}let n=Math.max(32,i>>5),s=n<<1,o=n>>1,l=[],a=0,c=-1,f=[];function u(p){let m;if(p.lines>s&&p instanceof mi)for(let y of p.children)u(y);else p.lines>o&&(a>o||!a)?(d(),l.push(p)):p instanceof lt&&a&&(m=f[f.length-1])instanceof lt&&p.lines+m.lines<=32?(a+=p.lines,c+=p.length+1,f[f.length-1]=new lt(m.text.concat(p.text),m.length+1+p.length)):(a+p.lines>n&&d(),a+=p.lines,c+=p.length+1,f.push(p))}h(u,"add");function d(){a!=0&&(l.push(f.length==1?f[0]:mi.from(f,c)),c=-1,a=f.length=0)}h(d,"flush");for(let p of e)u(p);return d(),l.length==1?l[0]:new mi(l,t)}};h(mi,"TextNode");var Er=mi;de.empty=new lt([""],0);function HC(r){let e=-1;for(let t of r)e+=t.length+1;return e}h(HC,"textLength");function Lo(r,e,t=0,i=1e9){for(let n=0,s=0,o=!0;s<r.length&&n<=i;s++){let l=r[s],a=n+l.length;a>=t&&(a>i&&(l=l.slice(0,i-n)),n<t&&(l=l.slice(t-n)),o?(e[e.length-1]+=l,o=!1):e.push(l)),n=a+1}return e}h(Lo,"appendText");function _1(r,e,t){return Lo(r,[""],e,t)}h(_1,"sliceText");var Mc=class Mc{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof lt?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],s=this.offsets[i],o=s>>1,l=n instanceof lt?n.text.length:n.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value="\n",this;e--}else if(n instanceof lt){let a=n.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=n.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof lt?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}};h(Mc,"RawTextCursor");var Pi=Mc,Pc=class Pc{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Pi(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:n}=this.cursor.next(e);return this.pos+=(n.length+e)*t,this.value=n.length<=i?n:t<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}};h(Pc,"PartialTextCursor");var Uo=Pc,Ic=class Ic{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:n}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}};h(Ic,"LineCursor");var Oo=Ic;typeof Symbol<"u"&&(de.prototype[Symbol.iterator]=function(){return this.iter()},Pi.prototype[Symbol.iterator]=Uo.prototype[Symbol.iterator]=Oo.prototype[Symbol.iterator]=function(){return this});var $c=class $c{constructor(e,t,i,n){this.from=e,this.to=t,this.number=i,this.text=n}get length(){return this.to-this.from}};h($c,"Line");var Sc=$c;function Or(r,e,t){return e=Math.max(0,Math.min(r.length,e)),[e,Math.max(e,Math.min(r.length,t))]}h(Or,"clip");var Cr="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(r=>r?parseInt(r,36):1);for(let r=1;r<Cr.length;r++)Cr[r]+=Cr[r-1];function YC(r){for(let e=1;e<Cr.length;e+=2)if(Cr[e]>r)return Cr[e-1]<=r;return!1}h(YC,"isExtendingChar");function T1(r){return r>=127462&&r<=127487}h(T1,"isRegionalIndicator");var D1=8205;function mt(r,e,t=!0,i=!0){return(t?I1:JC)(r,e,i)}h(mt,"findClusterBreak");function I1(r,e,t){if(e==r.length)return e;e&&$1(r.charCodeAt(e))&&q1(r.charCodeAt(e-1))&&e--;let i=wn(r,e);for(e+=_o(i);e<r.length;){let n=wn(r,e);if(i==D1||n==D1||t&&YC(n))e+=_o(n),i=n;else if(T1(n)){let s=0,o=e-2;for(;o>=0&&T1(wn(r,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}h(I1,"nextClusterBreak");function JC(r,e,t){for(;e>0;){let i=I1(r,e-2,t);if(i<e)return i;e--}return 0}h(JC,"prevClusterBreak");function $1(r){return r>=56320&&r<57344}h($1,"surrogateLow");function q1(r){return r>=55296&&r<56320}h(q1,"surrogateHigh");function wn(r,e){let t=r.charCodeAt(e);if(!q1(t)||e+1==r.length)return t;let i=r.charCodeAt(e+1);return $1(i)?(t-55296<<10)+(i-56320)+65536:t}h(wn,"codePointAt");function _o(r){return r<65536?1:2}h(_o,"codePointSize");var Fc=/\r\n?|\n/,ze=function(r){return r[r.Simple=0]="Simple",r[r.TrackDel=1]="TrackDel",r[r.TrackBefore=2]="TrackBefore",r[r.TrackAfter=3]="TrackAfter",r}(ze||(ze={})),Br=class Br{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,n=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(i,n,s),n+=s):n+=o,i+=s}}iterChangedRanges(e,t=!1){Qc(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];n<0?e.push(i,n):e.push(n,i)}return new Br(e)}composeDesc(e){return this.empty?e:e.empty?this:V1(this,e)}mapDesc(e,t=!1){return e.empty?this:Bc(this,e,t)}mapPos(e,t=-1,i=ze.Simple){let n=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],c=n+l;if(a<0){if(c>e)return s+(e-n);s+=l}else{if(i!=ze.Simple&&c>=e&&(i==ze.TrackDel&&n<e&&c>e||i==ze.TrackBefore&&n<e||i==ze.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!l)return e==n||t<0?s:s+a;s+=a}n=c}if(e>n)throw new RangeError("Position ".concat(e," is out of range for changeset of length ").concat(n));return s}touchesRange(e,t=e){for(let i=0,n=0;i<this.sections.length&&n<=t;){let s=this.sections[i++],o=this.sections[i++],l=n+s;if(o>=0&&n<=t&&l>=e)return n<e&&l>t?"cover":!0;n=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],n=this.sections[t++];e+=(e?" ":"")+i+(n>=0?":"+n:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Br(e)}static create(e){return new Br(e)}};h(Br,"ChangeDesc");var ri=Br,Pt=class Pt extends ri{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Qc(this,(t,i,n,s,o)=>e=e.replace(n,n+(i-t),o),!1),e}mapDesc(e,t=!1){return Bc(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let n=0,s=0;n<t.length;n+=2){let o=t[n],l=t[n+1];if(l>=0){t[n]=l,t[n+1]=o;let a=n>>1;for(;i.length<a;)i.push(de.empty);i.push(o?e.slice(s,s+o):de.empty)}s+=o}return new Pt(t,i)}compose(e){return this.empty?e:e.empty?this:V1(this,e,!0)}map(e,t=!1){return e.empty?this:Bc(this,e,t,!0)}iterChanges(e,t=!1){Qc(this,e,t)}get desc(){return ri.create(this.sections)}filter(e){let t=[],i=[],n=[],s=new Ii(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let f=Math.min(s.len,a-l);Me(n,f,-1);let u=s.ins==-1?-1:s.off==0?s.ins:0;Me(t,f,u),u>0&&gi(i,t,s.text),s.forward(f),l+=f}let c=e[o++];for(;l<c;){if(s.done)break e;let f=Math.min(s.len,c-l);Me(t,f,-1),Me(n,f,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(f),l+=f}}return{changes:new Pt(t,i),filtered:ri.create(n)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],n=this.sections[t+1];n<0?e.push(i):n==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let n=[],s=[],o=0,l=null;function a(f=!1){if(!f&&!n.length)return;o<t&&Me(n,t-o,-1);let u=new Pt(n,s);l=l?l.compose(u.map(l)):u,n=[],s=[],o=0}h(a,"flush");function c(f){if(Array.isArray(f))for(let u of f)c(u);else if(f instanceof Pt){if(f.length!=t)throw new RangeError("Mismatched change set length (got ".concat(f.length,", expected ").concat(t,")"));a(),l=l?l.compose(f.map(l)):f}else{let{from:u,to:d=u,insert:p}=f;if(u>d||u<0||d>t)throw new RangeError("Invalid change range ".concat(u," to ").concat(d," (in doc of length ").concat(t,")"));let m=p?typeof p=="string"?de.of(p.split(i||Fc)):p:de.empty,y=m.length;if(u==d&&y==0)return;u<o&&a(),u>o&&Me(n,u-o,-1),Me(n,d-u,y),gi(s,n,m),o=d}}return h(c,"process"),c(e),a(!l),l}static empty(e){return new Pt(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let n=0;n<e.length;n++){let s=e[n];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length<n;)i.push(de.empty);i[n]=de.of(s.slice(1)),t.push(s[0],i[n].length)}}}return new Pt(t,i)}static createSet(e,t){return new Pt(e,t)}};h(Pt,"ChangeSet");var We=Pt;function Me(r,e,t,i=!1){if(e==0&&t<=0)return;let n=r.length-2;n>=0&&t<=0&&t==r[n+1]?r[n]+=e:e==0&&r[n]==0?r[n+1]+=t:i?(r[n]+=e,r[n+1]+=t):r.push(e,t)}h(Me,"addSection");function gi(r,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<r.length)r[r.length-1]=r[r.length-1].append(t);else{for(;r.length<i;)r.push(de.empty);r.push(t)}}h(gi,"addInsert");function Qc(r,e,t){let i=r.inserted;for(let n=0,s=0,o=0;o<r.sections.length;){let l=r.sections[o++],a=r.sections[o++];if(a<0)n+=l,s+=l;else{let c=n,f=s,u=de.empty;for(;c+=l,f+=a,a&&i&&(u=u.append(i[o-2>>1])),!(t||o==r.sections.length||r.sections[o+1]<0);)l=r.sections[o++],a=r.sections[o++];e(n,c,s,f,u),n=c,s=f}}}h(Qc,"iterChanges");function Bc(r,e,t,i=!1){let n=[],s=i?[]:null,o=new Ii(r),l=new Ii(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let c=Math.min(o.len,l.len);Me(n,c,-1),o.forward(c),l.forward(c)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let c=l.len;for(Me(n,l.ins,-1);c;){let f=Math.min(o.len,c);o.ins>=0&&a<o.i&&o.len<=f&&(Me(n,0,o.ins),s&&gi(s,n,o.text),a=o.i),o.forward(f),c-=f}l.next()}else if(o.ins>=0){let c=0,f=o.len;for(;f;)if(l.ins==-1){let u=Math.min(f,l.len);c+=u,f-=u,l.forward(u)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;Me(n,c,a<o.i?o.ins:0),s&&a<o.i&&gi(s,n,o.text),a=o.i,o.forward(o.len-f)}else{if(o.done&&l.done)return s?We.createSet(n,s):ri.create(n);throw new Error("Mismatched change set lengths")}}h(Bc,"mapSet");function V1(r,e,t=!1){let i=[],n=t?[]:null,s=new Ii(r),o=new Ii(e);for(let l=!1;;){if(s.done&&o.done)return n?We.createSet(i,n):ri.create(i);if(s.ins==0)Me(i,s.len,0,l),s.next();else if(o.len==0&&!o.done)Me(i,0,o.ins,l),n&&gi(n,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),c=i.length;if(s.ins==-1){let f=o.ins==-1?-1:o.off?0:o.ins;Me(i,a,f,l),n&&f&&gi(n,i,o.text)}else o.ins==-1?(Me(i,s.off?0:s.len,a,l),n&&gi(n,i,s.textBit(a))):(Me(i,s.off?0:s.len,o.off?0:o.ins,l),n&&!o.off&&gi(n,i,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>c),s.forward2(a),o.forward(a)}}}}h(V1,"composeSets");var qc=class qc{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?de.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?de.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}};h(qc,"SectionIter");var Ii=qc,Fn=class Fn{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,n;return this.empty?i=n=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),n=e.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new Fn(i,n,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Z.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Z.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Z.range(e.anchor,e.head)}static create(e,t,i){return new Fn(e,t,i)}};h(Fn,"SelectionRange");var Qr=Fn,Ve=class Ve{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Ve.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Ve([this.main],0)}addRange(e,t=!0){return Ve.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,Ve.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Ve(e.ranges.map(t=>Qr.fromJSON(t)),e.main)}static single(e,t=e){return new Ve([Ve.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;n<e.length;n++){let s=e[n];if(s.empty?s.from<=i:s.from<i)return Ve.normalized(e.slice(),t);i=s.to}return new Ve(e,t)}static cursor(e,t=0,i,n){return Qr.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(n!=null?n:16777215)<<6)}static range(e,t,i,n){let s=(i!=null?i:16777215)<<6|(n==null?7:Math.min(6,n));return t<e?Qr.create(t,e,48|s):Qr.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((n,s)=>n.from-s.from),t=e.indexOf(i);for(let n=1;n<e.length;n++){let s=e[n],o=e[n-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);n<=t&&t--,e.splice(--n,2,s.anchor>s.head?Ve.range(a,l):Ve.range(l,a))}}return new Ve(e,t)}};h(Ve,"EditorSelection");var Z=Ve;function z1(r,e){for(let t of r.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}h(z1,"checkSelection");var Rc=0,Mo=class Mo{constructor(e,t,i,n,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=n,this.id=Rc++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Mo(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Ac),!!e.static,e.enables)}of(e){return new Lr([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Lr(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Lr(e,this,2,t)}from(e,t){return t||(t=h(i=>i,"get")),this.compute([e],i=>t(i.field(e)))}};h(Mo,"Facet");var z=Mo;function Ac(r,e){return r==e||r.length==e.length&&r.every((t,i)=>t===e[i])}h(Ac,"sameArray");var Vc=class Vc{constructor(e,t,i,n){this.dependencies=e,this.facet=t,this.type=i,this.value=n,this.id=Rc++}dynamicSlot(e){var t;let i=this.value,n=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,c=!1,f=[];for(let u of this.dependencies)u=="doc"?a=!0:u=="selection"?c=!0:((t=e[u.id])!==null&&t!==void 0?t:1)&1||f.push(e[u.id]);return{create(u){return u.values[o]=i(u),1},update(u,d){if(a&&d.docChanged||c&&(d.docChanged||d.selection)||Ec(u,f)){let p=i(u);if(l?!N1(p,u.values[o],n):!n(p,u.values[o]))return u.values[o]=p,1}return 0},reconfigure:h((u,d)=>{let p,m=d.config.address[s];if(m!=null){let y=No(d,m);if(this.dependencies.every(g=>g instanceof z?d.facet(g)===u.facet(g):g instanceof Pe?d.field(g,!1)==u.field(g,!1):!0)||(l?N1(p=i(u),y,n):n(p=i(u),y)))return u.values[o]=y,0}else p=i(u);return u.values[o]=p,1},"reconfigure")}}};h(Vc,"FacetProvider");var Lr=Vc;function N1(r,e,t){if(r.length!=e.length)return!1;for(let i=0;i<r.length;i++)if(!t(r[i],e[i]))return!1;return!0}h(N1,"compareArray");function Ec(r,e){let t=!1;for(let i of e)Sn(r,i)&1&&(t=!0);return t}h(Ec,"ensureAll");function GC(r,e,t){let i=t.map(a=>r[a.id]),n=t.map(a=>a.type),s=i.filter(a=>!(a&1)),o=r[e.id]>>1;function l(a){let c=[];for(let f=0;f<i.length;f++){let u=No(a,i[f]);if(n[f]==2)for(let d of u)c.push(d);else c.push(u)}return e.combine(c)}return h(l,"get"),{create(a){for(let c of i)Sn(a,c);return a.values[o]=l(a),1},update(a,c){if(!Ec(a,s))return 0;let f=l(a);return e.compare(f,a.values[o])?0:(a.values[o]=f,1)},reconfigure(a,c){let f=Ec(a,i),u=c.config.facets[e.id],d=c.facet(e);if(u&&!f&&Ac(t,u))return a.values[o]=d,0;let p=l(a);return e.compare(p,d)?(a.values[o]=d,0):(a.values[o]=p,1)}}}h(GC,"dynamicFacetSlot");var R1=z.define({static:!0}),Po=class Po{constructor(e,t,i,n,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=n,this.spec=s,this.provides=void 0}static define(e){let t=new Po(Rc++,e.create,e.update,e.compare||((i,n)=>i===n),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(R1).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:h(i=>(i.values[t]=this.create(i),1),"create"),update:h((i,n)=>{let s=i.values[t],o=this.updateF(s,n);return this.compareF(s,o)?0:(i.values[t]=o,1)},"update"),reconfigure:h((i,n)=>n.config.address[this.id]!=null?(i.values[t]=n.field(this),0):(i.values[t]=this.create(i),1),"reconfigure")}}init(e){return[this,R1.of({field:this,create:e})]}get extension(){return this}};h(Po,"StateField");var Pe=Po,Ri={lowest:4,low:3,default:2,high:1,highest:0};function kn(r){return e=>new To(e,r)}h(kn,"prec");var Tr={highest:kn(Ri.highest),high:kn(Ri.high),default:kn(Ri.default),low:kn(Ri.low),lowest:kn(Ri.lowest)},zc=class zc{constructor(e,t){this.inner=e,this.prec=t}};h(zc,"PrecExtension");var To=zc,Io=class Io{of(e){return new Qn(this,e)}reconfigure(e){return Io.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}};h(Io,"Compartment");var _r=Io,Wc=class Wc{constructor(e,t){this.compartment=e,this.inner=t}};h(Wc,"CompartmentInstance");var Qn=Wc,$o=class $o{constructor(e,t,i,n,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let n=[],s=Object.create(null),o=new Map;for(let d of XC(e,t,o))d instanceof Pe?n.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let l=Object.create(null),a=[],c=[];for(let d of n)l[d.id]=c.length<<1,c.push(p=>d.slot(p));let f=i==null?void 0:i.config.facets;for(let d in s){let p=s[d],m=p[0].facet,y=f&&f[d]||[];if(p.every(g=>g.type==0))if(l[m.id]=a.length<<1|1,Ac(y,p))a.push(i.facet(m));else{let g=m.combine(p.map(b=>b.value));a.push(i&&m.compare(g,i.facet(m))?i.facet(m):g)}else{for(let g of p)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=c.length<<1,c.push(b=>g.dynamicSlot(b)));l[m.id]=c.length<<1,c.push(g=>GC(g,m,p))}}let u=c.map(d=>d(l));return new $o(e,o,u,l,a,s)}};h($o,"Configuration");var Do=$o;function XC(r,e,t){let i=[[],[],[],[],[]],n=new Map;function s(o,l){let a=n.get(o);if(a!=null){if(a<=l)return;let c=i[a].indexOf(o);c>-1&&i[a].splice(c,1),o instanceof Qn&&t.delete(o.compartment)}if(n.set(o,l),Array.isArray(o))for(let c of o)s(c,l);else if(o instanceof Qn){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let c=e.get(o.compartment)||o.inner;t.set(o.compartment,c),s(c,l)}else if(o instanceof To)s(o.inner,o.prec);else if(o instanceof Pe)i[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof Lr)i[l].push(o),o.facet.extensions&&s(o.facet.extensions,Ri.default);else{let c=o.extension;if(!c)throw new Error("Unrecognized extension value in extension set (".concat(o,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));s(c,l)}}return h(s,"inner"),s(r,Ri.default),i.reduce((o,l)=>o.concat(l))}h(XC,"flatten");function Sn(r,e){if(e&1)return 2;let t=e>>1,i=r.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;r.status[t]=4;let n=r.computeSlot(r,r.config.dynamicSlots[t]);return r.status[t]=2|n}h(Sn,"ensureAddr");function No(r,e){return e&1?r.config.staticValues[e>>1]:r.values[e>>1]}h(No,"getAddr");var W1=z.define(),Cc=z.define({combine:h(r=>r.some(e=>e),"combine"),static:!0}),j1=z.define({combine:h(r=>r.length?r[0]:void 0,"combine"),static:!0}),H1=z.define(),Y1=z.define(),J1=z.define(),G1=z.define({combine:h(r=>r.length?r[0]:!1,"combine")}),jc=class jc{constructor(e,t){this.type=e,this.value=t}static define(){return new Lc}};h(jc,"Annotation");var gt=jc,Hc=class Hc{of(e){return new gt(this,e)}};h(Hc,"AnnotationType");var Lc=Hc,Yc=class Yc{constructor(e){this.map=e}of(e){return new pe(this,e)}};h(Yc,"StateEffectType");var Uc=Yc,qo=class qo{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new qo(this.type,t)}is(e){return this.type==e}static define(e={}){return new Uc(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let n of e){let s=n.map(t);s&&i.push(s)}return i}};h(qo,"StateEffect");var pe=qo;pe.reconfigure=pe.define();pe.appendConfig=pe.define();var Mi=class Mi{constructor(e,t,i,n,s,o){this.startState=e,this.changes=t,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&z1(i,t.newLength),s.some(l=>l.type==Mi.time)||(this.annotations=s.concat(Mi.time.of(Date.now())))}static create(e,t,i,n,s,o){return new Mi(e,t,i,n,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Mi.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}};h(Mi,"Transaction");var Te=Mi;Te.time=gt.define();Te.userEvent=gt.define();Te.addToHistory=gt.define();Te.remote=gt.define();function KC(r,e){let t=[];for(let i=0,n=0;;){let s,o;if(i<r.length&&(n==e.length||e[n]>=r[i]))s=r[i++],o=r[i++];else if(n<e.length)s=e[n++],o=e[n++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}h(KC,"joinRanges");function X1(r,e,t){var i;let n,s,o;return t?(n=e.changes,s=We.empty(e.changes.length),o=r.changes.compose(e.changes)):(n=e.changes.map(r.changes),s=r.changes.mapDesc(e.changes,!0),o=r.changes.compose(n)),{changes:o,selection:e.selection?e.selection.map(s):(i=r.selection)===null||i===void 0?void 0:i.map(n),effects:pe.mapEffects(r.effects,n).concat(pe.mapEffects(e.effects,s)),annotations:r.annotations.length?r.annotations.concat(e.annotations):e.annotations,scrollIntoView:r.scrollIntoView||e.scrollIntoView}}h(X1,"mergeTransaction");function Oc(r,e,t){let i=e.selection,n=Ur(e.annotations);return e.userEvent&&(n=n.concat(Te.userEvent.of(e.userEvent))),{changes:e.changes instanceof We?e.changes:We.of(e.changes||[],t,r.facet(j1)),selection:i&&(i instanceof Z?i:Z.single(i.anchor,i.head)),effects:Ur(e.effects),annotations:n,scrollIntoView:!!e.scrollIntoView}}h(Oc,"resolveTransactionInner");function K1(r,e,t){let i=Oc(r,e.length?e[0]:{},r.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;i=X1(i,Oc(r,e[s],o?i.changes.newLength:r.doc.length),o)}let n=Te.create(r,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return eL(t?ZC(n):n)}h(K1,"resolveTransaction");function ZC(r){let e=r.startState,t=!0;for(let n of e.facet(H1)){let s=n(r);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:KC(t,s))}if(t!==!0){let n,s;if(t===!1)s=r.changes.invertedDesc,n=We.empty(e.doc.length);else{let o=r.changes.filter(t);n=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}r=Te.create(e,n,r.selection&&r.selection.map(s),pe.mapEffects(r.effects,s),r.annotations,r.scrollIntoView)}let i=e.facet(Y1);for(let n=i.length-1;n>=0;n--){let s=i[n](r);s instanceof Te?r=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Te?r=s[0]:r=K1(e,Ur(s),!1)}return r}h(ZC,"filterTransaction");function eL(r){let e=r.startState,t=e.facet(J1),i=r;for(let n=t.length-1;n>=0;n--){let s=t[n](r);s&&Object.keys(s).length&&(i=X1(i,Oc(e,s,r.changes.newLength),!0))}return i==r?r:Te.create(e,r.changes,r.selection,i.effects,i.annotations,i.scrollIntoView)}h(eL,"extendTransaction");var tL=[];function Ur(r){return r==null?tL:Array.isArray(r)?r:[r]}h(Ur,"asArray");var Ot=function(r){return r[r.Word=0]="Word",r[r.Space=1]="Space",r[r.Other=2]="Other",r}(Ot||(Ot={})),iL=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,_c;try{_c=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(r){}function rL(r){if(_c)return _c.test(r);for(let e=0;e<r.length;e++){let t=r[e];if(/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||iL.test(t)))return!0}return!1}h(rL,"hasWordChar");function nL(r){return e=>{if(!/\S/.test(e))return Ot.Space;if(rL(e))return Ot.Word;for(let t=0;t<r.length;t++)if(e.indexOf(r[t])>-1)return Ot.Word;return Ot.Other}}h(nL,"makeCategorizer");var ot=class ot{constructor(e,t,i,n,s,o){this.config=e,this.doc=t,this.selection=i,this.values=n,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Sn(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return Sn(this,i),No(this,i)}update(...e){return K1(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:n}=t;for(let l of e.effects)l.is(_r.reconfigure)?(t&&(n=new Map,t.compartments.forEach((a,c)=>n.set(c,a)),t=null),n.set(l.value.compartment,l.value.extension)):l.is(pe.reconfigure)?(t=null,i=l.value):l.is(pe.appendConfig)&&(t=null,i=Ur(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=Do.resolve(i,n,this),s=new ot(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,c)=>c.reconfigure(a,this),null).values);let o=e.startState.facet(Cc)?e.newSelection:e.newSelection.asSingle();new ot(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Z.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),n=this.changes(i.changes),s=[i.range],o=Ur(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),c=this.changes(a.changes),f=c.map(n);for(let d=0;d<l;d++)s[d]=s[d].map(f);let u=n.mapDesc(c,!0);s.push(a.range.map(u)),n=n.compose(f),o=pe.mapEffects(o,f).concat(pe.mapEffects(Ur(a.effects),u))}return{changes:n,selection:Z.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof We?e:We.of(e,this.doc.length,this.facet(ot.lineSeparator))}toText(e){return de.of(e.split(this.facet(ot.lineSeparator)||Fc))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Sn(this,t),No(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let n=e[i];n instanceof Pe&&this.config.address[n.id]!=null&&(t[i]=n.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let n=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],l=e[s];n.push(o.init(a=>o.spec.fromJSON(l,a)))}}return ot.create({doc:e.doc,selection:Z.fromJSON(e.selection),extensions:t.extensions?n.concat([t.extensions]):n})}static create(e={}){let t=Do.resolve(e.extensions||[],new Map),i=e.doc instanceof de?e.doc:de.of((e.doc||"").split(t.staticFacet(ot.lineSeparator)||Fc)),n=e.selection?e.selection instanceof Z?e.selection:Z.single(e.selection.anchor,e.selection.head):Z.single(0);return z1(n,i.length),t.staticFacet(Cc)||(n=n.asSingle()),new ot(t,i,n,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(ot.tabSize)}get lineBreak(){return this.facet(ot.lineSeparator)||"\n"}get readOnly(){return this.facet(G1)}phrase(e,...t){for(let i of this.facet(ot.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,n)=>{if(n=="$")return"$";let s=+(n||1);return!s||s>t.length?i:t[s-1]})),e}languageDataAt(e,t,i=-1){let n=[];for(let s of this.facet(W1))for(let o of s(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&n.push(o[e]);return n}charCategorizer(e){return nL(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:n}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=mt(t,o,!1);if(s(t.slice(a,o))!=Ot.Word)break;o=a}for(;l<n;){let a=mt(t,l);if(s(t.slice(l,a))!=Ot.Word)break;l=a}return o==l?null:Z.range(o+i,l+i)}};h(ot,"EditorState");var Be=ot;Be.allowMultipleSelections=Cc;Be.tabSize=z.define({combine:h(r=>r.length?r[0]:4,"combine")});Be.lineSeparator=j1;Be.readOnly=G1;Be.phrases=z.define({compare(r,e){let t=Object.keys(r),i=Object.keys(e);return t.length==i.length&&t.every(n=>r[n]==e[n])}});Be.languageData=W1;Be.changeFilter=H1;Be.transactionFilter=Y1;Be.transactionExtender=J1;_r.reconfigure=pe.define();function si(r,e,t={}){let i={};for(let n of r)for(let s of Object.keys(n)){let o=n[s],l=i[s];if(l===void 0)i[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,s))i[s]=t[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let n in e)i[n]===void 0&&(i[n]=e[n]);return i}h(si,"combineConfig");var Jc=class Jc{eq(e){return this==e}range(e,t=e){return Bn.create(e,t,this)}};h(Jc,"RangeValue");var ni=Jc;ni.prototype.startSide=ni.prototype.endSide=0;ni.prototype.point=!1;ni.prototype.mapMode=ze.TrackDel;var Vo=class Vo{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new Vo(e,t,i)}};h(Vo,"Range");var Bn=Vo;function Tc(r,e){return r.from-e.from||r.value.startSide-e.value.startSide}h(Tc,"cmpRange");var zo=class zo{constructor(e,t,i,n){this.from=e,this.to=t,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,n=0){let s=i?this.to:this.from;for(let o=n,l=s.length;;){if(o==l)return o;let a=o+l>>1,c=s[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return c>=0?o:l;c>=0?l=a:o=a+1}}between(e,t,i,n){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,s);s<o;s++)if(n(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let i=[],n=[],s=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let c=this.value[a],f=this.from[a]+e,u=this.to[a]+e,d,p;if(f==u){let m=t.mapPos(f,c.startSide,c.mapMode);if(m==null||(d=p=m,c.startSide!=c.endSide&&(p=t.mapPos(f,c.endSide),p<d)))continue}else if(d=t.mapPos(f,c.startSide),p=t.mapPos(u,c.endSide),d>p||d==p&&c.startSide>0&&c.endSide<=0)continue;(p-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(l=Math.max(l,p-d)),i.push(c),n.push(d-o),s.push(p-o))}return{mapped:i.length?new zo(n,s,i,l):null,pos:o}}};h(zo,"Chunk");var Dc=zo,Ut=class Ut{constructor(e,t,i,n){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=n}static create(e,t,i,n){return new Ut(e,t,i,n)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Tc)),this.isEmpty)return t.length?Ut.of(t):this;let l=new Ro(this,null,-1).goto(0),a=0,c=[],f=new $i;for(;l.value||a<t.length;)if(a<t.length&&(l.from-t[a].from||l.startSide-t[a].value.startSide)>=0){let u=t[a++];f.addInner(u.from,u.to,u.value)||c.push(u)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(l.chunkIndex)<t[a].from)&&(!o||n>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||n>l.to||s<l.from||o(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||c.push(Bn.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!c.length?Ut.empty:this.nextLayer.update({add:c,filter:o,filterFrom:n,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],n=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],c=e.touchesRange(l,l+a.length);if(c===!1)n=Math.max(n,a.maxPoint),t.push(a),i.push(e.mapPos(l));else if(c===!0){let{mapped:f,pos:u}=a.map(l,e);f&&(n=Math.max(n,f.maxPoint),t.push(f),i.push(u))}}let s=this.nextLayer.map(e);return t.length==0?s:new Ut(i,t,s||Ut.empty,n)}between(e,t,i){if(!this.isEmpty){for(let n=0;n<this.chunk.length;n++){let s=this.chunkPos[n],o=this.chunk[n];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return En.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return En.from(e).goto(t)}static compare(e,t,i,n,s=-1){let o=e.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),l=t.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),a=A1(o,l,i),c=new Ai(o,a,s),f=new Ai(l,a,s);i.iterGaps((u,d,p)=>M1(c,u,f,d,p,n)),i.empty&&i.length==0&&M1(c,0,f,0,0,n)}static eq(e,t,i=0,n){n==null&&(n=999999999);let s=e.filter(f=>!f.isEmpty&&t.indexOf(f)<0),o=t.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=A1(s,o),a=new Ai(s,l,0).goto(i),c=new Ai(o,l,0).goto(i);for(;;){if(a.to!=c.to||!Nc(a.active,c.active)||a.point&&(!c.point||!a.point.eq(c.point)))return!1;if(a.to>n)return!0;a.next(),c.next()}}static spans(e,t,i,n,s=-1){let o=new Ai(e,null,s).goto(t),l=t,a=o.openStart;for(;;){let c=Math.min(o.to,i);if(o.point){let f=o.activeForPoint(o.to),u=o.pointFrom<t?f.length+1:o.point.startSide<0?f.length:Math.min(f.length,a);n.point(l,c,o.point,f,u,o.pointRank),a=Math.min(o.openEnd(c),f.length)}else c>l&&(n.span(l,c,o.active,a),a=o.openEnd(c));if(o.to>i)return a+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,t=!1){let i=new $i;for(let n of e instanceof Bn?[e]:t?sL(e):e)i.add(n.from,n.to,n.value);return i.finish()}static join(e){if(!e.length)return Ut.empty;let t=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let n=e[i];n!=Ut.empty;n=n.nextLayer)t=new Ut(n.chunkPos,n.chunk,t,Math.max(n.maxPoint,t.maxPoint));return t}};h(Ut,"RangeSet");var be=Ut;be.empty=new be([],[],null,-1);function sL(r){if(r.length>1)for(let e=r[0],t=1;t<r.length;t++){let i=r[t];if(Tc(e,i)>0)return r.slice().sort(Tc);e=i}return r}h(sL,"lazySort");be.empty.nextLayer=be.empty;var Wo=class Wo{finishChunk(e){this.chunks.push(new Dc(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new Wo)).add(e,t,i)}addInner(e,t,i){let n=e-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return n<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(be.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=be.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};h(Wo,"RangeSetBuilder");var $i=Wo;function A1(r,e,t){let i=new Map;for(let s of r)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&i.set(s.chunk[o],s.chunkPos[o]);let n=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=i.get(s.chunk[o]);l!=null&&(t?t.mapPos(l):l)==s.chunkPos[o]&&!(t!=null&&t.touchesRange(l,l+s.chunk[o].length))&&n.add(s.chunk[o])}return n}h(A1,"findSharedChunks");var Gc=class Gc{constructor(e,t,i,n=0){this.layer=e,this.skip=t,this.minPoint=i,this.rank=n}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,i){for(;this.chunkIndex<this.layer.chunk.length;){let n=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(n)||this.layer.chunkEnd(this.chunkIndex)<e||n.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let n=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!i||this.rangeIndex<n)&&this.setRangeIndex(n)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],i=e+t.from[this.rangeIndex];if(this.from=i,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}};h(Gc,"LayerCursor");var Ro=Gc,jo=class jo{constructor(e){this.heap=e}static from(e,t=null,i=-1){let n=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=i&&n.push(new Ro(o,t,i,s));return n.length==1?n[0]:new jo(n)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)wc(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)wc(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),wc(this.heap,0)}}};h(jo,"HeapCursor");var En=jo;function wc(r,e){for(let t=r[e];;){let i=(e<<1)+1;if(i>=r.length)break;let n=r[i];if(i+1<r.length&&n.compare(r[i+1])>=0&&(n=r[i+1],i++),t.compare(n)<0)break;r[i]=t,r[e]=n,e=i}}h(wc,"heapBubble");var Xc=class Xc{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=En.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Eo(this.active,e),Eo(this.activeTo,e),Eo(this.activeRank,e),this.minActive=P1(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:n,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||n-this.activeTo[t])>0;)t++;Co(this.active,t,i),Co(this.activeTo,t,n),Co(this.activeRank,t,s),e&&Co(e,t,this.cursor.from),this.minActive=P1(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>e){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&Eo(i,n)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let n=i.length-1;n>=0&&i[n]<e;n--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}};h(Xc,"SpanCursor");var Ai=Xc;function M1(r,e,t,i,n,s){r.goto(e),t.goto(i);let o=i+n,l=i,a=i-e;for(;;){let c=r.to+a-t.to||r.endSide-t.endSide,f=c<0?r.to+a:t.to,u=Math.min(f,o);if(r.point||t.point?r.point&&t.point&&(r.point==t.point||r.point.eq(t.point))&&Nc(r.activeForPoint(r.to),t.activeForPoint(t.to))||s.comparePoint(l,u,r.point,t.point):u>l&&!Nc(r.active,t.active)&&s.compareRange(l,u,r.active,t.active),f>o)break;l=f,c<=0&&r.next(),c>=0&&t.next()}}h(M1,"compare");function Nc(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!=e[t]&&!r[t].eq(e[t]))return!1;return!0}h(Nc,"sameValues");function Eo(r,e){for(let t=e,i=r.length-1;t<i;t++)r[t]=r[t+1];r.pop()}h(Eo,"remove");function Co(r,e,t){for(let i=r.length-1;i>=e;i--)r[i+1]=r[i];r[e]=t}h(Co,"insert");function P1(r,e){let t=-1,i=1e9;for(let n=0;n<e.length;n++)(e[n]-i||r[n].endSide-r[t].endSide)<0&&(t=n,i=e[n]);return t}h(P1,"findMinIndex");function Ho(r,e,t=r.length){let i=0;for(let n=0;n<t;)r.charCodeAt(n)==9?(i+=e-i%e,n++):(i++,n=mt(r,n));return i}h(Ho,"countColumn");function Z1(r,e,t,i){for(let n=0,s=0;;){if(s>=e)return n;if(n==r.length)break;s+=r.charCodeAt(n)==9?t-s%t:1,n=mt(r,n)}return i===!0?-1:r.length}h(Z1,"findColumn");var Kc="\u037C",ev=typeof Symbol>"u"?"__"+Kc:Symbol.for(Kc),Zc=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),tv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},tf=class tf{constructor(e,t){this.rules=[];let{finish:i}=t||{};function n(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}h(n,"splitSelector");function s(o,l,a,c){let f=[],u=/^@(\w+)\b/.exec(o[0]),d=u&&u[1]=="keyframes";if(u&&l==null)return a.push(o[0]+";");for(let p in l){let m=l[p];if(/&/.test(p))s(p.split(/,\s*/).map(y=>o.map(g=>y.replace(/&/,g))).reduce((y,g)=>y.concat(g)),m,a);else if(m&&typeof m=="object"){if(!u)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(n(p),m,f,d)}else m!=null&&f.push(p.replace(/_.*/,"").replace(/[A-Z]/g,y=>"-"+y.toLowerCase())+": "+m+";")}(f.length||d)&&a.push((i&&!u&&!c?o.map(i):o).join(", ")+" {"+f.join(" ")+"}")}h(s,"render");for(let o in e)s(n(o),e[o],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=tv[ev]||1;return tv[ev]=e+1,Kc+e.toString(36)}static mount(e,t,i){let n=e[Zc],s=i&&i.nonce;n?s&&n.setNonce(s):n=new ef(e,s),n.mount(Array.isArray(t)?t:[t],e)}};h(tf,"StyleModule");var bt=tf,iv=new Map,rf=class rf{constructor(e,t){let i=e.ownerDocument||e,n=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let s=iv.get(i);if(s)return e[Zc]=s;this.sheet=new n.CSSStyleSheet,iv.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Zc]=this}mount(e,t){let i=this.sheet,n=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],a=this.modules.indexOf(l);if(a<s&&a>-1&&(this.modules.splice(a,1),s--,a=-1),a==-1){if(this.modules.splice(s++,0,l),i)for(let c=0;c<l.rules.length;c++)i.insertRule(l.rules[c],n++)}else{for(;s<a;)n+=this.modules[s++].rules.length;n+=l.rules.length,s++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let a=0;a<this.modules.length;a++)o+=this.modules[a].getRules()+"\n";this.styleTag.textContent=o;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}};h(rf,"StyleSet");var ef=rf;var oi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Dr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},oL=typeof navigator<"u"&&/Mac/.test(navigator.platform),lL=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Oe=0;Oe<10;Oe++)oi[48+Oe]=oi[96+Oe]=String(Oe);var Oe;for(Oe=1;Oe<=24;Oe++)oi[Oe+111]="F"+Oe;var Oe;for(Oe=65;Oe<=90;Oe++)oi[Oe]=String.fromCharCode(Oe+32),Dr[Oe]=String.fromCharCode(Oe);var Oe;for(Yo in oi)Dr.hasOwnProperty(Yo)||(Dr[Yo]=oi[Yo]);var Yo;function rv(r){var e=oL&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||lL&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?Dr:oi)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}h(rv,"keyName");function Jn(r){let e;return r.nodeType==11?e=r.getSelection?r:r.ownerDocument:e=r,e.getSelection()}h(Jn,"getSelection");function cf(r,e){return e?r==e||r.contains(e.nodeType!=1?e.parentNode:e):!1}h(cf,"contains");function aL(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}h(aL,"deepActiveElement");function nl(r,e){if(!e.anchorNode)return!1;try{return cf(r,e.anchorNode)}catch(t){return!1}}h(nl,"hasSelection");function Gn(r){return r.nodeType==3?ji(r,0,r.nodeValue.length).getClientRects():r.nodeType==1?r.getClientRects():[]}h(Gn,"clientRectsFor");function Dn(r,e,t,i){return t?nv(r,e,t,i,-1)||nv(r,e,t,i,1):!1}h(Dn,"isEquivalentPosition");function Wi(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e}h(Wi,"domIndex");function cl(r){return r.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(r.nodeName)}h(cl,"isBlockElement");function nv(r,e,t,i,n){for(;;){if(r==t&&e==i)return!0;if(e==(n<0?0:li(r))){if(r.nodeName=="DIV")return!1;let s=r.parentNode;if(!s||s.nodeType!=1)return!1;e=Wi(r)+(n<0?0:1),r=s}else if(r.nodeType==1){if(r=r.childNodes[e+(n<0?-1:0)],r.nodeType==1&&r.contentEditable=="false")return!1;e=n<0?li(r):0}else return!1}}h(nv,"scanFor");function li(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}h(li,"maxOffset");function Al(r,e){let t=e?r.left:r.right;return{left:t,right:t,top:r.top,bottom:r.bottom}}h(Al,"flattenRect");function hL(r){let e=r.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:r.innerWidth,top:0,bottom:r.innerHeight}}h(hL,"windowRect");function qv(r,e){let t=e.width/r.offsetWidth,i=e.height/r.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-r.offsetWidth)<1)&&(t=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-r.offsetHeight)<1)&&(i=1),{scaleX:t,scaleY:i}}h(qv,"getScale");function cL(r,e,t,i,n,s,o,l){let a=r.ownerDocument,c=a.defaultView||window;for(let f=r,u=!1;f&&!u;)if(f.nodeType==1){let d,p=f==a.body,m=1,y=1;if(p)d=hL(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(u=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let v=f.getBoundingClientRect();({scaleX:m,scaleY:y}=qv(f,v)),d={left:v.left,right:v.left+f.clientWidth*m,top:v.top,bottom:v.top+f.clientHeight*y}}let g=0,b=0;if(n=="nearest")e.top<d.top?(b=-(d.top-e.top+o),t>0&&e.bottom>d.bottom+b&&(b=e.bottom-d.bottom+b+o)):e.bottom>d.bottom&&(b=e.bottom-d.bottom+o,t<0&&e.top-b<d.top&&(b=-(d.top+b-e.top+o)));else{let v=e.bottom-e.top,w=d.bottom-d.top;b=(n=="center"&&v<=w?e.top+v/2-w/2:n=="start"||n=="center"&&t<0?e.top-o:e.bottom-w+o)-d.top}if(i=="nearest"?e.left<d.left?(g=-(d.left-e.left+s),t>0&&e.right>d.right+g&&(g=e.right-d.right+g+s)):e.right>d.right&&(g=e.right-d.right+s,t<0&&e.left<d.left+g&&(g=-(d.left+g-e.left+s))):g=(i=="center"?e.left+(e.right-e.left)/2-(d.right-d.left)/2:i=="start"==l?e.left-s:e.right-(d.right-d.left)+s)-d.left,g||b)if(p)c.scrollBy(g,b);else{let v=0,w=0;if(b){let B=f.scrollTop;f.scrollTop+=b/y,w=(f.scrollTop-B)*y}if(g){let B=f.scrollLeft;f.scrollLeft+=g/m,v=(f.scrollLeft-B)*m}e={left:e.left-v,top:e.top-w,right:e.right-v,bottom:e.bottom-w},v&&Math.abs(v-g)<1&&(i="nearest"),w&&Math.abs(w-b)<1&&(n="nearest")}if(p)break;f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}h(cL,"scrollRectIntoView");function fL(r){let e=r.ownerDocument,t,i;for(let n=r.parentNode;n&&!(n==e.body||t&&i);)if(n.nodeType==1)!i&&n.scrollHeight>n.clientHeight&&(i=n),!t&&n.scrollWidth>n.clientWidth&&(t=n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;return{x:t,y:i}}h(fL,"scrollableParents");var ru=class ru{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:i}=e;this.set(t,Math.min(e.anchorOffset,t?li(t):0),i,Math.min(e.focusOffset,i?li(i):0))}set(e,t,i,n){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=n}};h(ru,"DOMSelectionState");var ff=ru,Nr=null;function Vv(r){if(r.setActive)return r.setActive();if(Nr)return r.focus(Nr);let e=[];for(let t=r;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(r.focus(Nr==null?{get preventScroll(){return Nr={preventScroll:!0},!0}}:void 0),!Nr){Nr=!1;for(let t=0;t<e.length;){let i=e[t++],n=e[t++],s=e[t++];i.scrollTop!=n&&(i.scrollTop=n),i.scrollLeft!=s&&(i.scrollLeft=s)}}}h(Vv,"focusPreventScroll");var sv;function ji(r,e,t=e){let i=sv||(sv=document.createRange());return i.setEnd(r,t),i.setStart(r,e),i}h(ji,"textRange");function qr(r,e,t,i){let n={key:e,code:e,keyCode:t,which:t,cancelable:!0};i&&({altKey:n.altKey,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,metaKey:n.metaKey}=i);let s=new KeyboardEvent("keydown",n);s.synthetic=!0,r.dispatchEvent(s);let o=new KeyboardEvent("keyup",n);return o.synthetic=!0,r.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}h(qr,"dispatchKey");function uL(r){for(;r;){if(r&&(r.nodeType==9||r.nodeType==11&&r.host))return r;r=r.assignedSlot||r.parentNode}return null}h(uL,"getRoot");function zv(r){for(;r.attributes.length;)r.removeAttributeNode(r.attributes[0])}h(zv,"clearAttributes");function dL(r,e){let t=e.focusNode,i=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=i)return!1;for(i=Math.min(i,li(t));;)if(i){if(t.nodeType!=1)return!1;let n=t.childNodes[i-1];n.contentEditable=="false"?i--:(t=n,i=li(t))}else{if(t==r)return!0;i=Wi(t),t=t.parentNode}}h(dL,"atElementStart");function Wv(r){return r.scrollTop>Math.max(1,r.scrollHeight-r.clientHeight-4)}h(Wv,"isScrolledToBottom");function jv(r,e){for(let t=r,i=e;;){if(t.nodeType==3&&i>0)return{node:t,offset:i};if(t.nodeType==1&&i>0){if(t.contentEditable=="false")return null;t=t.childNodes[i-1],i=li(t)}else if(t.parentNode&&!cl(t))i=Wi(t),t=t.parentNode;else return null}}h(jv,"textNodeBefore");function Hv(r,e){for(let t=r,i=e;;){if(t.nodeType==3&&i<t.nodeValue.length)return{node:t,offset:i};if(t.nodeType==1&&i<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[i],i=0}else if(t.parentNode&&!cl(t))i=Wi(t)+1,t=t.parentNode;else return null}}h(Hv,"textNodeAfter");var In=class In{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new In(e.parentNode,Wi(e),t)}static after(e,t){return new In(e.parentNode,Wi(e)+1,t)}};h(In,"DOMPos");var je=In,Yf=[],$n=class $n{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let i of this.children){if(i==e)return t;t+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(this.flags&2){let i=this.dom,n=null,s;for(let o of this.children){if(o.flags&7){if(!o.dom&&(s=n?n.nextSibling:i.firstChild)){let l=$n.get(s);(!l||!l.parent&&l.canReuseDOM(o))&&o.reuseDOM(s)}o.sync(e,t),o.flags&=-8}if(s=n?n.nextSibling:i.firstChild,t&&!t.written&&t.node==i&&s!=o.dom&&(t.written=!0),o.dom.parentNode==i)for(;s&&s!=o.dom;)s=ov(s);else i.insertBefore(o.dom,s);n=o.dom}for(s=n?n.nextSibling:i.firstChild,s&&t&&t.node==i&&(t.written=!0);s;)s=ov(s)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,t),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let i;if(e==this.dom)i=this.dom.childNodes[t];else{let n=li(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;n==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?n=-1:n=1),e=s}n<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!$n.get(i);)i=i.nextSibling;if(!i)return this.length;for(let n=0,s=0;;n++){let o=this.children[n];if(o.dom==i)return s;s+=o.length+o.breakAfter}}domBoundsAround(e,t,i=0){let n=-1,s=-1,o=-1,l=-1;for(let a=0,c=i,f=i;a<this.children.length;a++){let u=this.children[a],d=c+u.length;if(c<e&&d>t)return u.domBoundsAround(e,t,c);if(d>=e&&n==-1&&(n=a,s=c),c>t&&u.dom.parentNode==this.dom){o=a,l=f;break}f=d,c=d+u.breakAfter}return{from:s,to:l<0?i+this.length:l,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Yf){this.markDirty();for(let n=e;n<t;n++){let s=this.children[n];s.parent==this&&i.indexOf(s)<0&&s.destroy()}this.children.splice(e,t-e,...i);for(let n=0;n<i.length;n++)i[n].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new fl(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,i,n,s,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}};h($n,"ContentView");var ye=$n;ye.prototype.breakAfter=0;function ov(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}h(ov,"rm$1");var nu=class nu{constructor(e,t,i){this.children=e,this.pos=t,this.i=i,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}};h(nu,"ChildCursor");var fl=nu;function Yv(r,e,t,i,n,s,o,l,a){let{children:c}=r,f=c.length?c[e]:null,u=s.length?s[s.length-1]:null,d=u?u.breakAfter:o;if(!(e==i&&f&&!o&&!d&&s.length<2&&f.merge(t,n,s.length?u:null,t==0,l,a))){if(i<c.length){let p=c[i];p&&(n<p.length||p.breakAfter&&(u!=null&&u.breakAfter))?(e==i&&(p=p.split(n),n=0),!d&&u&&p.merge(0,n,u,!0,0,a)?s[s.length-1]=p:((n||p.children.length&&!p.children[0].length)&&p.merge(0,n,null,!1,0,a),s.push(p))):p!=null&&p.breakAfter&&(u?u.breakAfter=1:o=1),i++}for(f&&(f.breakAfter=o,t>0&&(!o&&s.length&&f.merge(t,f.length,s[0],!1,l,0)?f.breakAfter=s.shift().breakAfter:(t<f.length||f.children.length&&f.children[f.children.length-1].length==0)&&f.merge(t,f.length,null,!1,l,0),e++));e<i&&s.length;)if(c[i-1].become(s[s.length-1]))i--,s.pop(),a=s.length?0:l;else if(c[e].become(s[0]))e++,s.shift(),l=s.length?0:a;else break;!s.length&&e&&i<c.length&&!c[e-1].breakAfter&&c[i].merge(0,0,c[e-1],!1,l,a)&&e--,(e<i||s.length)&&r.replaceChildren(e,i,s)}}h(Yv,"replaceRange");function Jv(r,e,t,i,n,s){let o=r.childCursor(),{i:l,off:a}=o.findPos(t,1),{i:c,off:f}=o.findPos(e,-1),u=e-t;for(let d of i)u+=d.length;r.length+=u,Yv(r,c,f,l,a,i,0,n,s)}h(Jv,"mergeChildrenInto");var et=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},uf=typeof document<"u"?document:{documentElement:{style:{}}},df=/Edge\/(\d+)/.exec(et.userAgent),Gv=/MSIE \d/.test(et.userAgent),pf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(et.userAgent),Ml=!!(Gv||pf||df),lv=!Ml&&/gecko\/(\d+)/i.test(et.userAgent),nf=!Ml&&/Chrome\/(\d+)/.exec(et.userAgent),av="webkitFontSmoothing"in uf.documentElement.style,Xv=!Ml&&/Apple Computer/.test(et.vendor),hv=Xv&&(/Mobile\/\w+/.test(et.userAgent)||et.maxTouchPoints>2),V={mac:hv||/Mac/.test(et.platform),windows:/Win/.test(et.platform),linux:/Linux|X11/.test(et.platform),ie:Ml,ie_version:Gv?uf.documentMode||6:pf?+pf[1]:df?+df[1]:0,gecko:lv,gecko_version:lv?+(/Firefox\/(\d+)/.exec(et.userAgent)||[0,0])[1]:0,chrome:!!nf,chrome_version:nf?+nf[1]:0,ios:hv,android:/Android\b/.test(et.userAgent),webkit:av,safari:Xv,webkit_version:av?+(/\bAppleWebKit\/(\d+)/.exec(et.userAgent)||[0,0])[1]:0,tabSize:uf.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"},pL=256,qn=class qn extends ye{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return this.flags&8||i&&(!(i instanceof qn)||this.length-(t-e)+i.length>pL||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new qn(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new je(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return mL(this.dom,e,t)}};h(qn,"TextView");var zt=qn,Vn=class Vn extends ye{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let n of t)n.setParent(this)}setAttrs(e){if(zv(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,i,n,s,o){return i&&(!(i instanceof Vn&&i.mark.eq(this.mark))||e&&s<=0||t<this.length&&o<=0)?!1:(Jv(this,e,t,i?i.children.slice():[],s-1,o-1),this.markDirty(),!0)}split(e){let t=[],i=0,n=-1,s=0;for(let l of this.children){let a=i+l.length;a>e&&t.push(i<e?l.split(e-i):l),n<0&&i>=e&&(n=s),i=a,s++}let o=this.length-e;return this.length=e,n>-1&&(this.children.length=n,this.markDirty()),new Vn(this.mark,t,o)}domAtPos(e){return Kv(this,e)}coordsAt(e,t){return ex(this,e,t)}};h(Vn,"MarkView");var xi=Vn;function mL(r,e,t){let i=r.nodeValue.length;e>i&&(e=i);let n=e,s=e,o=0;e==0&&t<0||e==i&&t>=0?V.chrome||V.gecko||(e?(n--,o=1):s<i&&(s++,o=-1)):t<0?n--:s<i&&s++;let l=ji(r,n,s).getClientRects();if(!l.length)return null;let a=l[(o?o<0:t>=0)?0:l.length-1];return V.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,c=>c.width)||a),o?Al(a,o<0):a||null}h(mL,"textCoords");var qi=class qi extends ye{static create(e,t,i){return new qi(e,t,i)}constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}split(e){let t=qi.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,i,n,s,o){return i&&(!(i instanceof qi)||!this.widget.compare(i.widget)||e>0&&s<=0||t<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}become(e){return e instanceof qi&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return de.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,i=t&&t.state.doc,n=this.posAtStart;return i?i.slice(n,n+this.length):de.empty}domAtPos(e){return(this.length?e==0:this.side>0)?je.before(this.dom):je.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?n.length-1:0;s=n[l],!(e>0?l==0:l==n.length-1||s.top<s.bottom);l+=o?-1:1);return Al(s,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}};h(qi,"WidgetView");var Xn=qi,zn=class zn extends ye{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof zn&&e.side==this.side}split(){return new zn(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?je.before(this.dom):je.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return de.empty}get isHidden(){return!0}};h(zn,"WidgetBufferView");var Kn=zn;zt.prototype.children=Xn.prototype.children=Kn.prototype.children=Yf;function Kv(r,e){let t=r.dom,{children:i}=r,n=0;for(let s=0;n<i.length;n++){let o=i[n],l=s+o.length;if(!(l==s&&o.getSide()<=0)){if(e>s&&e<l&&o.dom.parentNode==t)return o.domAtPos(e-s);if(e<=s)break;s=l}}for(let s=n;s>0;s--){let o=i[s-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let s=n;s<i.length;s++){let o=i[s];if(o.dom.parentNode==t)return o.domAtPos(0)}return new je(t,0)}h(Kv,"inlineDOMAtPos");function Zv(r,e,t){let i,{children:n}=r;t>0&&e instanceof xi&&n.length&&(i=n[n.length-1])instanceof xi&&i.mark.eq(e.mark)?Zv(i,e.children[0],t-1):(n.push(e),e.setParent(r)),r.length+=e.length}h(Zv,"joinInlineInto");function ex(r,e,t){let i=null,n=-1,s=null,o=-1;function l(c,f){for(let u=0,d=0;u<c.children.length&&d<=f;u++){let p=c.children[u],m=d+p.length;m>=f&&(p.children.length?l(p,f-d):(!s||s.isHidden&&t>0)&&(m>f||d==m&&p.getSide()>0)?(s=p,o=f-d):(d<f||d==m&&p.getSide()<0&&!p.isHidden)&&(i=p,n=f-d)),d=m}}h(l,"scan"),l(r,e);let a=(t<0?i:s)||i||s;return a?a.coordsAt(Math.max(0,a==i?n:o),t):gL(r)}h(ex,"coordsInChildren");function gL(r){let e=r.dom.lastChild;if(!e)return r.dom.getBoundingClientRect();let t=Gn(e);return t[t.length-1]||null}h(gL,"fallbackRect");function mf(r,e){for(let t in r)t=="class"&&e.class?e.class+=" "+r.class:t=="style"&&e.style?e.style+=";"+r.style:e[t]=r[t];return e}h(mf,"combineAttrs");var cv=Object.create(null);function ul(r,e,t){if(r==e)return!0;r||(r=cv),e||(e=cv);let i=Object.keys(r),n=Object.keys(e);if(i.length-(t&&i.indexOf(t)>-1?1:0)!=n.length-(t&&n.indexOf(t)>-1?1:0))return!1;for(let s of i)if(s!=t&&(n.indexOf(s)==-1||r[s]!==e[s]))return!1;return!0}h(ul,"attrsEq");function gf(r,e,t){let i=!1;if(e)for(let n in e)t&&n in t||(i=!0,n=="style"?r.style.cssText="":r.removeAttribute(n));if(t)for(let n in t)e&&e[n]==t[n]||(i=!0,n=="style"?r.style.cssText=t[n]:r.setAttribute(n,t[n]));return i}h(gf,"updateAttrs");function bL(r){let e=Object.create(null);for(let t=0;t<r.attributes.length;t++){let i=r.attributes[t];e[i.name]=i.value}return e}h(bL,"getAttrs");var su=class su{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}};h(su,"WidgetType");var ki=su,He=function(r){return r[r.Text=0]="Text",r[r.WidgetBefore=1]="WidgetBefore",r[r.WidgetAfter=2]="WidgetAfter",r[r.WidgetRange=3]="WidgetRange",r}(He||(He={})),ou=class ou extends ni{constructor(e,t,i,n){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=n}get heightRelevant(){return!1}static mark(e){return new Zn(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return t+=i&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new wi(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,n;if(e.isBlockGap)i=-5e8,n=4e8;else{let{start:s,end:o}=tx(e,t);i=(s?t?-3e8:-1:5e8)-1,n=(o?t?2e8:1:-6e8)+1}return new wi(e,i,n,t,e.widget||null,!0)}static line(e){return new es(e)}static set(e,t=!1){return be.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};h(ou,"Decoration");var ce=ou;ce.none=be.empty;var Bl=class Bl extends ce{constructor(e){let{start:t,end:i}=tx(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,i;return this==e||e instanceof Bl&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&ul(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}};h(Bl,"MarkDecoration");var Zn=Bl;Zn.prototype.point=!1;var El=class El extends ce{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof El&&this.spec.class==e.spec.class&&ul(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}};h(El,"LineDecoration");var es=El;es.prototype.mapMode=ze.TrackBefore;es.prototype.point=!0;var Cl=class Cl extends ce{constructor(e,t,i,n,s,o){super(t,i,s,e),this.block=n,this.isReplace=o,this.mapMode=n?t<=0?ze.TrackBefore:ze.TrackAfter:ze.TrackDel}get type(){return this.startSide!=this.endSide?He.WidgetRange:this.startSide<=0?He.WidgetBefore:He.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Cl&&yL(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}};h(Cl,"PointDecoration");var wi=Cl;wi.prototype.point=!0;function tx(r,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=r;return t==null&&(t=r.inclusive),i==null&&(i=r.inclusive),{start:t!=null?t:e,end:i!=null?i:e}}h(tx,"getInclusive");function yL(r,e){return r==e||!!(r&&e&&r.compare(e))}h(yL,"widgetsEq");function bf(r,e,t,i=0){let n=t.length-1;n>=0&&t[n]+i>=r?t[n]=Math.max(t[n],e):t.push(r,e)}h(bf,"addRange");var Vi=class Vi extends ye{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,n,s,o){if(i){if(!(i instanceof Vi))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),Jv(this,e,t,i?i.children.slice():[],s,o),!0}split(e){let t=new Vi;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:n}=this.childPos(e);n&&(t.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let s=i;s<this.children.length;s++)t.append(this.children[s],0);for(;i>0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){ul(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Zv(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=mf(t,this.attrs||{})),i&&(this.attrs=mf({class:i},this.attrs||{}))}domAtPos(e){return Kv(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var i;this.dom?this.flags&4&&(zv(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(gf(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let n=this.dom.lastChild;for(;n&&ye.get(n)instanceof xi;)n=n.lastChild;if(!n||!this.length||n.nodeName!="BR"&&((i=ye.get(n))===null||i===void 0?void 0:i.isEditable)==!1&&(!V.ios||!this.children.some(s=>s instanceof zt))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let i of this.children){if(!(i instanceof zt)||/[^ -~]/.test(i.text))return null;let n=Gn(i.dom);if(n.length!=1)return null;e+=n[0].width,t=n[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let i=ex(this,e,t);if(!this.children.length&&i&&this.parent){let{heightOracle:n}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-n.lineHeight)<2&&n.textHeight<s){let o=(s-n.textHeight)/2;return{top:i.top+o,bottom:i.bottom-o,left:i.left,right:i.left}}}return i}become(e){return e instanceof Vi&&this.children.length==0&&e.children.length==0&&ul(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let i=0,n=0;i<e.children.length;i++){let s=e.children[i],o=n+s.length;if(o>=t){if(s instanceof Vi)return s;if(o>t)break}n=o+s.breakAfter}return null}};h(Vi,"LineView");var Ae=Vi,Pr=class Pr extends ye{constructor(e,t,i){super(),this.widget=e,this.length=t,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,n,s,o){return i&&(!(i instanceof Pr)||!this.widget.compare(i.widget)||e>0&&s<=0||t<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?je.before(this.dom):je.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let i=new Pr(this.widget,t,this.deco);return i.breakAfter=this.breakAfter,i}get children(){return Yf}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):de.empty}domBoundsAround(){return null}become(e){return e instanceof Pr&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let i=this.widget.coordsAt(this.dom,e,t);return i||(this.widget instanceof ts?null:Al(this.dom.getBoundingClientRect(),this.length?e==0:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:i}=this.deco;return t==i?!1:e<0?t<0:i>0}};h(Pr,"BlockWidgetView");var zi=Pr,lu=class lu extends ki{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};h(lu,"BlockGapWidget");var ts=lu,Ll=class Ll{constructor(e,t,i,n){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof zi&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ae),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Jo(new Kn(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof zi)&&this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=s,this.textOff=0}let n=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-i)),this.getLine().append(Jo(new zt(this.text.slice(this.textOff,this.textOff+n)),t),i),this.atCursorPos=!0,this.textOff+=n,e-=n,i=0}}span(e,t,i,n){this.buildText(t-e,i,n),this.pos=t,this.openStart<0&&(this.openStart=n)}point(e,t,i,n,s,o){if(this.disallowBlockEffectsFor[o]&&i instanceof wi){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof wi)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new zi(i.widget||Si.block,l,i));else{let a=Xn.create(i.widget||Si.inline,l,l?0:i.startSide),c=this.atCursorPos&&!a.isEditable&&s<=n.length&&(e<t||i.startSide>0),f=!a.isEditable&&(e<t||s>n.length||i.startSide<=0),u=this.getLine();this.pendingBuffer==2&&!c&&!a.isEditable&&(this.pendingBuffer=0),this.flushBuffer(n),c&&(u.append(Jo(new Kn(1),n),s),s=n.length+Math.max(0,s-n.length)),u.append(Jo(a,n),s),this.atCursorPos=f,this.pendingBuffer=f?e<t||s>n.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,i,n,s){let o=new Ll(e,t,i,s);return o.openEnd=be.spans(n,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}};h(Ll,"ContentBuilder");var Nn=Ll;function Jo(r,e){for(let t of e)r=new xi(t,[r],r.length);return r}h(Jo,"wrapMarks");var au=class au extends ki{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};h(au,"NullWidget");var Si=au;Si.inline=new Si("span");Si.block=new Si("div");var Se=function(r){return r[r.LTR=0]="LTR",r[r.RTL=1]="RTL",r}(Se||(Se={})),Hi=Se.LTR,Jf=Se.RTL;function ix(r){let e=[];for(let t=0;t<r.length;t++)e.push(1<<+r[t]);return e}h(ix,"dec");var vL=ix("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),xL=ix("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),yf=Object.create(null),It=[];for(let r of["()","[]","{}"]){let e=r.charCodeAt(0),t=r.charCodeAt(1);yf[e]=t,yf[t]=-e}function rx(r){return r<=247?vL[r]:1424<=r&&r<=1524?2:1536<=r&&r<=1785?xL[r-1536]:1774<=r&&r<=2220?4:8192<=r&&r<=8204?256:64336<=r&&r<=65023?4:1}h(rx,"charType");var kL=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,hu=class hu{get dir(){return this.level%2?Jf:Hi}constructor(e,t,i){this.from=e,this.to=t,this.level=i}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,i,n){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=t&&l.to>=t){if(l.level==i)return o;(s<0||(n!=0?n<0?l.from<t:l.to>t:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}};h(hu,"BidiSpan");var qt=hu;function nx(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++){let i=r[t],n=e[t];if(i.from!=n.from||i.to!=n.to||i.direction!=n.direction||!nx(i.inner,n.inner))return!1}return!0}h(nx,"isolatesEq");var ge=[];function wL(r,e,t,i,n){for(let s=0;s<=i.length;s++){let o=s?i[s-1].to:e,l=s<i.length?i[s].from:t,a=s?256:n;for(let c=o,f=a,u=a;c<l;c++){let d=rx(r.charCodeAt(c));d==512?d=f:d==8&&u==4&&(d=16),ge[c]=d==4?2:d,d&7&&(u=d),f=d}for(let c=o,f=a,u=a;c<l;c++){let d=ge[c];if(d==128)c<l-1&&f==ge[c+1]&&f&24?d=ge[c]=f:ge[c]=256;else if(d==64){let p=c+1;for(;p<l&&ge[p]==64;)p++;let m=c&&f==8||p<t&&ge[p]==8?u==1?1:8:256;for(let y=c;y<p;y++)ge[y]=m;c=p-1}else d==8&&u==1&&(ge[c]=1);f=d,d&7&&(u=d)}}}h(wL,"computeCharTypes");function SL(r,e,t,i,n){let s=n==1?2:1;for(let o=0,l=0,a=0;o<=i.length;o++){let c=o?i[o-1].to:e,f=o<i.length?i[o].from:t;for(let u=c,d,p,m;u<f;u++)if(p=yf[d=r.charCodeAt(u)])if(p<0){for(let y=l-3;y>=0;y-=3)if(It[y+1]==-p){let g=It[y+2],b=g&2?n:g&4?g&1?s:n:0;b&&(ge[u]=ge[It[y]]=b),l=y;break}}else{if(It.length==189)break;It[l++]=u,It[l++]=d,It[l++]=a}else if((m=ge[u])==2||m==1){let y=m==n;a=y?0:1;for(let g=l-3;g>=0;g-=3){let b=It[g+2];if(b&2)break;if(y)It[g+2]|=2;else{if(b&4)break;It[g+2]|=4}}}}}h(SL,"processBracketPairs");function FL(r,e,t,i){for(let n=0,s=i;n<=t.length;n++){let o=n?t[n-1].to:r,l=n<t.length?t[n].from:e;for(let a=o;a<l;){let c=ge[a];if(c==256){let f=a+1;for(;;)if(f==l){if(n==t.length)break;f=t[n++].to,l=n<t.length?t[n].from:e}else if(ge[f]==256)f++;else break;let u=s==1,d=(f<e?ge[f]:i)==1,p=u==d?u?1:2:i;for(let m=f,y=n,g=y?t[y-1].to:r;m>a;)m==g&&(m=t[--y].from,g=y?t[y-1].to:r),ge[--m]=p;a=f}else s=c,a++}}}h(FL,"processNeutrals");function vf(r,e,t,i,n,s,o){let l=i%2?2:1;if(i%2==n%2)for(let a=e,c=0;a<t;){let f=!0,u=!1;if(c==s.length||a<s[c].from){let y=ge[a];y!=l&&(f=!1,u=y==16)}let d=!f&&l==1?[]:null,p=f?i:i+1,m=a;e:for(;;)if(c<s.length&&m==s[c].from){if(u)break e;let y=s[c];if(!f)for(let g=y.to,b=c+1;;){if(g==t)break e;if(b<s.length&&s[b].from==g)g=s[b++].to;else{if(ge[g]==l)break e;break}}if(c++,d)d.push(y);else{y.from>a&&o.push(new qt(a,y.from,p));let g=y.direction==Hi!=!(p%2);xf(r,g?i+1:i,n,y.inner,y.from,y.to,o),a=y.to}m=y.to}else{if(m==t||(f?ge[m]!=l:ge[m]==l))break;m++}d?vf(r,a,m,i+1,n,d,o):a<m&&o.push(new qt(a,m,p)),a=m}else for(let a=t,c=s.length;a>e;){let f=!0,u=!1;if(!c||a>s[c-1].to){let y=ge[a-1];y!=l&&(f=!1,u=y==16)}let d=!f&&l==1?[]:null,p=f?i:i+1,m=a;e:for(;;)if(c&&m==s[c-1].to){if(u)break e;let y=s[--c];if(!f)for(let g=y.from,b=c;;){if(g==e)break e;if(b&&s[b-1].to==g)g=s[--b].from;else{if(ge[g-1]==l)break e;break}}if(d)d.push(y);else{y.to<a&&o.push(new qt(y.to,a,p));let g=y.direction==Hi!=!(p%2);xf(r,g?i+1:i,n,y.inner,y.from,y.to,o),a=y.from}m=y.from}else{if(m==e||(f?ge[m-1]!=l:ge[m-1]==l))break;m--}d?vf(r,m,a,i+1,n,d,o):m<a&&o.push(new qt(m,a,p)),a=m}}h(vf,"emitSpans");function xf(r,e,t,i,n,s,o){let l=e%2?2:1;wL(r,n,s,i,l),SL(r,n,s,i,l),FL(n,s,i,l),vf(r,n,s,e,t,i,o)}h(xf,"computeSectionOrder");function QL(r,e,t){if(!r)return[new qt(0,0,e==Jf?1:0)];if(e==Hi&&!t.length&&!kL.test(r))return sx(r.length);if(t.length)for(;r.length>ge.length;)ge[ge.length]=256;let i=[],n=e==Hi?0:1;return xf(r,n,n,t,0,r.length,i),i}h(QL,"computeOrder");function sx(r){return[new qt(0,r,0)]}h(sx,"trivialOrder");var ox="";function BL(r,e,t,i,n){var s;let o=i.head-r.from,l=qt.find(e,o,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),a=e[l],c=a.side(n,t);if(o==c){let d=l+=n?1:-1;if(d<0||d>=e.length)return null;a=e[l=d],o=a.side(!n,t),c=a.side(n,t)}let f=mt(r.text,o,a.forward(n,t));(f<a.from||f>a.to)&&(f=c),ox=r.text.slice(Math.min(o,f),Math.max(o,f));let u=l==(n?e.length-1:0)?null:e[l+(n?1:-1)];return u&&f==c&&u.level+(n?0:1)<a.level?Z.cursor(u.side(!n,t)+r.from,u.forward(n,t)?1:-1,u.level):Z.cursor(f+r.from,a.forward(n,t)?-1:1,a.level)}h(BL,"moveVisually");function EL(r,e,t){for(let i=e;i<t;i++){let n=rx(r.charCodeAt(i));if(n==1)return Hi;if(n==2||n==4)return Jf}return Hi}h(EL,"autoDirection");var lx=z.define(),ax=z.define(),hx=z.define(),cx=z.define(),kf=z.define(),fx=z.define(),ux=z.define(),Gf=z.define(),Xf=z.define(),dx=z.define({combine:h(r=>r.some(e=>e),"combine")}),px=z.define({combine:h(r=>r.some(e=>e),"combine")}),mx=z.define(),Wn=class Wn{constructor(e,t="nearest",i="nearest",n=5,s=5,o=!1){this.range=e,this.y=t,this.x=i,this.yMargin=n,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new Wn(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Wn(Z.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}};h(Wn,"ScrollTarget");var Rn=Wn,Go=pe.define({map:h((r,e)=>r.map(e),"map")}),gx=pe.define();function tt(r,e,t){let i=r.facet(cx);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}h(tt,"logException");var bi=z.define({combine:h(r=>r.length?r[0]:!0,"combine")}),CL=0,Ln=z.define(),jn=class jn{constructor(e,t,i,n,s){this.id=e,this.create=t,this.domEventHandlers=i,this.domEventObservers=n,this.extension=s(this)}static define(e,t){let{eventHandlers:i,eventObservers:n,provide:s,decorations:o}=t||{};return new jn(CL++,e,i,n,l=>{let a=[Ln.of(l)];return o&&a.push(is.of(c=>{let f=c.plugin(l);return f?o(f):ce.none})),s&&a.push(s(l)),a})}static fromClass(e,t){return jn.define(i=>new e(i),t)}};h(jn,"ViewPlugin");var Ye=jn,cu=class cu{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(tt(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(n){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){tt(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){tt(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}};h(cu,"PluginInstance");var An=cu,bx=z.define(),Kf=z.define(),is=z.define(),yx=z.define(),Zf=z.define(),vx=z.define();function fv(r,e){let t=r.state.facet(vx);if(!t.length)return t;let i=t.map(s=>s instanceof Function?s(r):s),n=[];return be.spans(i,e.from,e.to,{point(){},span(s,o,l,a){let c=s-e.from,f=o-e.from,u=n;for(let d=l.length-1;d>=0;d--,a--){let p=l[d].spec.bidiIsolate,m;if(p==null&&(p=EL(e.text,c,f)),a>0&&u.length&&(m=u[u.length-1]).to==c&&m.direction==p)m.to=f,u=m.inner;else{let y={from:c,to:f,direction:p,inner:[]};u.push(y),u=y.inner}}}}),n}h(fv,"getIsolatedRanges");var xx=z.define();function kx(r){let e=0,t=0,i=0,n=0;for(let s of r.state.facet(xx)){let o=s(r);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(n=Math.max(n,o.bottom)))}return{left:e,right:t,top:i,bottom:n}}h(kx,"getScrollMargins");var Un=z.define(),Ir=class Ir{constructor(e,t,i,n){this.fromA=e,this.toA=t,this.fromB=i,this.toB=n}join(e){return new Ir(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let n=e[t-1];if(!(n.fromA>i.toA)){if(n.toA<i.fromA)break;i=i.join(n),e.splice(t-1,1)}}return e.splice(t,0,i),e}static extendWithRanges(e,t){if(t.length==0)return e;let i=[];for(let n=0,s=0,o=0,l=0;;n++){let a=n==e.length?null:e[n],c=o-l,f=a?a.fromB:1e9;for(;s<t.length&&t[s]<f;){let u=t[s],d=t[s+1],p=Math.max(l,u),m=Math.min(f,d);if(p<=m&&new Ir(p+c,m+c,p,m).addToSet(i),d>f)break;s+=2}if(!a)return i;new Ir(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}};h(Ir,"ChangedRange");var Vt=Ir,Ul=class Ul{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=We.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let n=[];this.changes.iterChangedRanges((s,o,l,a)=>n.push(new Vt(s,o,l,a))),this.changedRanges=n}static create(e,t,i){return new Ul(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}};h(Ul,"ViewUpdate");var dl=Ul,fu=class fu extends ye{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ce.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Ae],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Vt(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:c,toA:f})=>f<this.minWidthFrom||c>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?n=this.domChanged.newSel.head:!NL(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let s=n>-1?UL(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:c,to:f}=this.hasComposition;i=new Vt(c,f,e.changes.mapPos(c,-1),e.changes.mapPos(f,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(V.ie||V.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),a=TL(o,l,e.changes);return i=Vt.extendWithRanges(i,a),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,i);let{observer:n}=this.view;n.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=V.chrome||V.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||n.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof zi&&o.widget instanceof ts&&s.push(o.dom);n.updateGaps(s)}updateChildren(e,t,i){let n=i?i.range.addToSet(e.slice()):e,s=this.childCursor(t);for(let o=n.length-1;;o--){let l=o>=0?n[o]:null;if(!l)break;let{fromA:a,toA:c,fromB:f,toB:u}=l,d,p,m,y;if(i&&i.range.fromB<u&&i.range.toB>f){let B=Nn.build(this.view.state.doc,f,i.range.fromB,this.decorations,this.dynamicDecorationMap),E=Nn.build(this.view.state.doc,i.range.toB,u,this.decorations,this.dynamicDecorationMap);p=B.breakAtStart,m=B.openStart,y=E.openEnd;let T=this.compositionView(i);E.breakAtStart?T.breakAfter=1:E.content.length&&T.merge(T.length,T.length,E.content[0],!1,E.openStart,0)&&(T.breakAfter=E.content[0].breakAfter,E.content.shift()),B.content.length&&T.merge(0,0,B.content[B.content.length-1],!0,0,B.openEnd)&&B.content.pop(),d=B.content.concat(T).concat(E.content)}else({content:d,breakAtStart:p,openStart:m,openEnd:y}=Nn.build(this.view.state.doc,f,u,this.decorations,this.dynamicDecorationMap));let{i:g,off:b}=s.findPos(c,1),{i:v,off:w}=s.findPos(a,-1);Yv(this,v,w,g,b,d,p,m,y)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let i of t.effects)i.is(gx)&&(this.editContextFormatting=i.value)}compositionView(e){let t=new zt(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new xi(n,[t],t.length);let i=new Ae;return i.append(t,0),i}fixCompositionDOM(e){let t=h((s,o)=>{o.flags|=8|(o.children.some(a=>a.flags&7)?1:0),this.markedForComposition.add(o);let l=ye.get(s);l&&l!=o&&(l.dom=null),o.setDOM(s)},"fix"),i=this.childPos(e.range.fromB,1),n=this.children[i.i];t(e.line,n);for(let s=e.marks.length-1;s>=-1;s--)i=n.childPos(i.off,1),n=n.children[i.i],t(s>=0?e.marks[s].node:e.text,n)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,n=i==this.dom,s=!n&&nl(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(n||t||s))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(l.anchor)),c=l.empty?a:this.moveToLine(this.domAtPos(l.head));if(V.gecko&&l.empty&&!this.hasComposition&&LL(a)){let u=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(u,a.node.childNodes[a.offset]||null)),a=c=new je(u,0),o=!0}let f=this.view.observer.selectionRange;(o||!f.focusNode||(!Dn(a.node,a.offset,f.anchorNode,f.anchorOffset)||!Dn(c.node,c.offset,f.focusNode,f.focusOffset))&&!this.suppressWidgetCursorChange(f,l))&&(this.view.observer.ignore(()=>{V.android&&V.chrome&&this.dom.contains(f.focusNode)&&DL(f.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let u=Jn(this.view.root);if(u)if(l.empty){if(V.gecko){let d=OL(a.node,a.offset);if(d&&d!=3){let p=(d==1?jv:Hv)(a.node,a.offset);p&&(a=new je(p.node,p.offset))}}u.collapse(a.node,a.offset),l.bidiLevel!=null&&u.caretBidiLevel!==void 0&&(u.caretBidiLevel=l.bidiLevel)}else if(u.extend){u.collapse(a.node,a.offset);try{u.extend(c.node,c.offset)}catch(d){}}else{let d=document.createRange();l.anchor>l.head&&([a,c]=[c,a]),d.setEnd(c.node,c.offset),d.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(d)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(a,c)),this.impreciseAnchor=a.precise?null:new je(f.anchorNode,f.anchorOffset),this.impreciseHead=c.precise?null:new je(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Dn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,i=Jn(e.root),{anchorNode:n,anchorOffset:s}=e.observer.selectionRange;if(!i||!t.empty||!t.assoc||!i.modify)return;let o=Ae.find(this,t.head);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let a=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!a||!c||a.bottom>c.top)return;let f=this.domAtPos(t.head+t.assoc);i.collapse(f.node,f.offset),i.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&i.collapse(n,s)}moveToLine(e){let t=this.dom,i;if(e.node!=t)return e;for(let n=e.offset;!i&&n<t.childNodes.length;n++){let s=ye.get(t.childNodes[n]);s instanceof Ae&&(i=s.domAtPos(0))}for(let n=e.offset-1;!i&&n>=0;n--){let s=ye.get(t.childNodes[n]);s instanceof Ae&&(i=s.domAtPos(s.length))}return i?new je(i.node,i.offset,!0):e}nearest(e){for(let t=e;t;){let i=ye.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let n=this.children[t];if(i<n.length||n instanceof Ae)break;t++,i=0}return this.children[t].domAtPos(i)}coordsAt(e,t){let i=null,n=0;for(let s=this.length,o=this.children.length-1;o>=0;o--){let l=this.children[o],a=s-l.breakAfter,c=a-l.length;if(a<e)break;if(c<=e&&(c<e||l.covers(-1))&&(a>e||l.covers(1))&&(!i||l instanceof Ae&&!(i instanceof Ae&&t>=0)))i=l,n=c;else if(i&&c==e&&a==e&&l instanceof zi&&Math.abs(t)<2){if(l.deco.startSide<0)break;o&&(i=null)}s=c}return i?i.coordsAt(e-n,t):null}coordsForChar(e){let{i:t,off:i}=this.childPos(e,1),n=this.children[t];if(!(n instanceof Ae))return null;for(;n.children.length;){let{i:l,off:a}=n.childPos(i,1);for(;;l++){if(l==n.children.length)return null;if((n=n.children[l]).length)break}i=a}if(!(n instanceof zt))return null;let s=mt(n.text,i);if(s==i)return null;let o=ji(n.dom,i,s).getClientRects();for(let l=0;l<o.length;l++){let a=o[l];if(l==o.length-1||a.top<a.bottom&&a.left<a.right)return a}return null}measureVisibleLineHeights(e){let t=[],{from:i,to:n}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==Se.LTR;for(let c=0,f=0;f<this.children.length;f++){let u=this.children[f],d=c+u.length;if(d>n)break;if(c>=i){let p=u.dom.getBoundingClientRect();if(t.push(p.height),o){let m=u.dom.lastChild,y=m?Gn(m):[];if(y.length){let g=y[y.length-1],b=a?g.right-p.left:p.right-g.left;b>l&&(l=b,this.minWidth=s,this.minWidthFrom=c,this.minWidthTo=d)}}}c=d+u.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?Se.RTL:Se.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Ae){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),t,i,n;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Gn(e.firstChild)[0];t=e.getBoundingClientRect().height,i=s?s.width/27:7,n=s?s.height:t,e.remove()}),{lineHeight:t,charWidth:i,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new fl(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,n=0;;n++){let s=n==t.viewports.length?null:t.viewports[n],o=s?s.from-1:this.length;if(o>i){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(i).top)/this.view.scaleY;e.push(ce.replace({widget:new ts(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return ce.set(e)}updateDeco(){let e=1,t=this.view.state.facet(is).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,n=this.view.state.facet(yx).map((s,o)=>{let l=typeof s=="function";return l&&(i=!0),l?s(this.view):s});for(n.length&&(this.dynamicDecorationMap[e++]=i,t.push(be.join(n))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let c=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=c.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let c of this.view.state.facet(mx))try{if(c(this.view,e.range,e))return!0}catch(f){tt(this.view.state,f,"scroll handler")}let{range:t}=e,i=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),n;if(!i)return;!t.empty&&(n=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,n.left),top:Math.min(i.top,n.top),right:Math.max(i.right,n.right),bottom:Math.max(i.bottom,n.bottom)});let s=kx(this.view),o={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:l,offsetHeight:a}=this.view.scrollDOM;cL(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==Se.LTR)}};h(fu,"DocView");var pl=fu;function LL(r){return r.node.nodeType==1&&r.node.firstChild&&(r.offset==0||r.node.childNodes[r.offset-1].contentEditable=="false")&&(r.offset==r.node.childNodes.length||r.node.childNodes[r.offset].contentEditable=="false")}h(LL,"betweenUneditable");function wx(r,e){let t=r.observer.selectionRange;if(!t.focusNode)return null;let i=jv(t.focusNode,t.focusOffset),n=Hv(t.focusNode,t.focusOffset),s=i||n;if(n&&i&&n.node!=i.node){let l=ye.get(n.node);if(!l||l instanceof zt&&l.text!=n.node.nodeValue)s=n;else if(r.docView.lastCompositionAfterCursor){let a=ye.get(i.node);!a||a instanceof zt&&a.text!=i.node.nodeValue||(s=n)}}if(r.docView.lastCompositionAfterCursor=s!=i,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}h(wx,"findCompositionNode");function UL(r,e,t){let i=wx(r,t);if(!i)return null;let{node:n,from:s,to:o}=i,l=n.nodeValue;if(/[\n\r]/.test(l)||r.state.doc.sliceString(i.from,i.to)!=l)return null;let a=e.invertedDesc,c=new Vt(a.mapPos(s),a.mapPos(o),s,o),f=[];for(let u=n.parentNode;;u=u.parentNode){let d=ye.get(u);if(d instanceof xi)f.push({node:u,deco:d.mark});else{if(d instanceof Ae||u.nodeName=="DIV"&&u.parentNode==r.contentDOM)return{range:c,text:n,marks:f,line:u};if(u!=r.contentDOM)f.push({node:u,deco:new Zn({inclusive:!0,attributes:bL(u),tagName:u.tagName.toLowerCase()})});else return null}}}h(UL,"findCompositionRange");function OL(r,e){return r.nodeType!=1?0:(e&&r.childNodes[e-1].contentEditable=="false"?1:0)|(e<r.childNodes.length&&r.childNodes[e].contentEditable=="false"?2:0)}h(OL,"nextToUneditable");var Vr,_L=(Vr=class{constructor(){this.changes=[]}compareRange(e,t){bf(e,t,this.changes)}comparePoint(e,t){bf(e,t,this.changes)}},h(Vr,"DecorationComparator"),Vr);function TL(r,e,t){let i=new _L;return be.compare(r,e,t,i),i.changes}h(TL,"findChangedDeco");function DL(r,e){for(let t=r;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}h(DL,"inUneditable");function NL(r,e){let t=!1;return e&&r.iterChangedRanges((i,n)=>{i<e.to&&n>e.from&&(t=!0)}),t}h(NL,"touchesComposition");function RL(r,e,t=1){let i=r.charCategorizer(e),n=r.doc.lineAt(e),s=e-n.from;if(n.length==0)return Z.cursor(e);s==0?t=1:s==n.length&&(t=-1);let o=s,l=s;t<0?o=mt(n.text,s,!1):l=mt(n.text,s);let a=i(n.text.slice(o,l));for(;o>0;){let c=mt(n.text,o,!1);if(i(n.text.slice(c,o))!=a)break;o=c}for(;l<n.length;){let c=mt(n.text,l);if(i(n.text.slice(l,c))!=a)break;l=c}return Z.range(o+n.from,l+n.from)}h(RL,"groupAt");function AL(r,e){return e.left>r?e.left-r:Math.max(0,r-e.right)}h(AL,"getdx");function ML(r,e){return e.top>r?e.top-r:Math.max(0,r-e.bottom)}h(ML,"getdy");function sf(r,e){return r.top<e.bottom-1&&r.bottom>e.top+1}h(sf,"yOverlap");function uv(r,e){return e<r.top?{top:e,left:r.left,right:r.right,bottom:r.bottom}:r}h(uv,"upTop");function dv(r,e){return e>r.bottom?{top:r.top,left:r.left,right:r.right,bottom:e}:r}h(dv,"upBot");function wf(r,e,t){let i,n,s,o,l=!1,a,c,f,u;for(let m=r.firstChild;m;m=m.nextSibling){let y=Gn(m);for(let g=0;g<y.length;g++){let b=y[g];n&&sf(n,b)&&(b=uv(dv(b,n.bottom),n.top));let v=AL(e,b),w=ML(t,b);if(v==0&&w==0)return m.nodeType==3?pv(m,e,t):wf(m,e,t);if(!i||o>w||o==w&&s>v){i=m,n=b,s=v,o=w;let B=w?t<b.top?-1:1:v?e<b.left?-1:1:0;l=!B||(B>0?g<y.length-1:g>0)}v==0?t>b.bottom&&(!f||f.bottom<b.bottom)?(a=m,f=b):t<b.top&&(!u||u.top>b.top)&&(c=m,u=b):f&&sf(f,b)?f=dv(f,b.bottom):u&&sf(u,b)&&(u=uv(u,b.top))}}if(f&&f.bottom>=t?(i=a,n=f):u&&u.top<=t&&(i=c,n=u),!i)return{node:r,offset:0};let d=Math.max(n.left,Math.min(n.right,e));if(i.nodeType==3)return pv(i,d,t);if(l&&i.contentEditable!="false")return wf(i,d,t);let p=Array.prototype.indexOf.call(r.childNodes,i)+(e>=(n.left+n.right)/2?1:0);return{node:r,offset:p}}h(wf,"domPosAtCoords");function pv(r,e,t){let i=r.nodeValue.length,n=-1,s=1e9,o=0;for(let l=0;l<i;l++){let a=ji(r,l,l+1).getClientRects();for(let c=0;c<a.length;c++){let f=a[c];if(f.top==f.bottom)continue;o||(o=e-f.left);let u=(f.top>t?f.top-t:t-f.bottom)-1;if(f.left-1<=e&&f.right+1>=e&&u<s){let d=e>=(f.left+f.right)/2,p=d;if((V.chrome||V.gecko)&&ji(r,l).getBoundingClientRect().left==f.right&&(p=!d),u<=0)return{node:r,offset:l+(p?1:0)};n=l+(p?1:0),s=u}}}return{node:r,offset:n>-1?n:o>0?r.nodeValue.length:0}}h(pv,"domPosInText");function Sx(r,e,t,i=-1){var n,s;let o=r.contentDOM.getBoundingClientRect(),l=o.top+r.viewState.paddingTop,a,{docHeight:c}=r.viewState,{x:f,y:u}=e,d=u-l;if(d<0)return 0;if(d>c)return r.state.doc.length;for(let B=r.viewState.heightOracle.textHeight/2,E=!1;a=r.elementAtHeight(d),a.type!=He.Text;)for(;d=i>0?a.bottom+B:a.top-B,!(d>=0&&d<=c);){if(E)return t?null:0;E=!0,i=-i}u=l+d;let p=a.from;if(p<r.viewport.from)return r.viewport.from==0?0:t?null:mv(r,o,a,f,u);if(p>r.viewport.to)return r.viewport.to==r.state.doc.length?r.state.doc.length:t?null:mv(r,o,a,f,u);let m=r.dom.ownerDocument,y=r.root.elementFromPoint?r.root:m,g=y.elementFromPoint(f,u);g&&!r.contentDOM.contains(g)&&(g=null),g||(f=Math.max(o.left+1,Math.min(o.right-1,f)),g=y.elementFromPoint(f,u),g&&!r.contentDOM.contains(g)&&(g=null));let b,v=-1;if(g&&((n=r.docView.nearest(g))===null||n===void 0?void 0:n.isEditable)!=!1){if(m.caretPositionFromPoint){let B=m.caretPositionFromPoint(f,u);B&&({offsetNode:b,offset:v}=B)}else if(m.caretRangeFromPoint){let B=m.caretRangeFromPoint(f,u);B&&({startContainer:b,startOffset:v}=B,(!r.contentDOM.contains(b)||V.safari&&PL(b,v,f)||V.chrome&&IL(b,v,f))&&(b=void 0))}}if(!b||!r.docView.dom.contains(b)){let B=Ae.find(r.docView,p);if(!B)return d>a.top+a.height/2?a.to:a.from;({node:b,offset:v}=wf(B.dom,f,u))}let w=r.docView.nearest(b);if(!w)return null;if(w.isWidget&&((s=w.dom)===null||s===void 0?void 0:s.nodeType)==1){let B=w.dom.getBoundingClientRect();return e.y<B.top||e.y<=B.bottom&&e.x<=(B.left+B.right)/2?w.posAtStart:w.posAtEnd}else return w.localPosFromDOM(b,v)+w.posAtStart}h(Sx,"posAtCoords");function mv(r,e,t,i,n){let s=Math.round((i-e.left)*r.defaultCharacterWidth);if(r.lineWrapping&&t.height>r.defaultLineHeight*1.5){let l=r.viewState.heightOracle.textHeight,a=Math.floor((n-t.top-(r.defaultLineHeight-l)*.5)/l);s+=a*r.viewState.heightOracle.lineLength}let o=r.state.sliceDoc(t.from,t.to);return t.from+Z1(o,s,r.state.tabSize)}h(mv,"posAtCoordsImprecise");function PL(r,e,t){let i;if(r.nodeType!=3||e!=(i=r.nodeValue.length))return!1;for(let n=r.nextSibling;n;n=n.nextSibling)if(n.nodeType!=1||n.nodeName!="BR")return!1;return ji(r,i-1,i).getBoundingClientRect().left>t}h(PL,"isSuspiciousSafariCaretResult");function IL(r,e,t){if(e!=0)return!1;for(let n=r;;){let s=n.parentNode;if(!s||s.nodeType!=1||s.firstChild!=n)return!1;if(s.classList.contains("cm-line"))break;n=s}let i=r.nodeType==1?r.getBoundingClientRect():ji(r,0,Math.max(r.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}h(IL,"isSuspiciousChromeCaretResult");function Sf(r,e){let t=r.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==He.Text))return i}return t}h(Sf,"blockAt");function $L(r,e,t,i){let n=Sf(r,e.head),s=!i||n.type!=He.Text||!(r.lineWrapping||n.widgetLineBreaks)?null:r.coordsAtPos(e.assoc<0&&e.head>n.from?e.head-1:e.head);if(s){let o=r.dom.getBoundingClientRect(),l=r.textDirectionAt(n.from),a=r.posAtCoords({x:t==(l==Se.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(a!=null)return Z.cursor(a,t?-1:1)}return Z.cursor(t?n.to:n.from,t?-1:1)}h($L,"moveToLineBoundary");function gv(r,e,t,i){let n=r.state.doc.lineAt(e.head),s=r.bidiSpans(n),o=r.textDirectionAt(n.from);for(let l=e,a=null;;){let c=BL(n,s,o,l,t),f=ox;if(!c){if(n.number==(t?r.state.doc.lines:1))return l;f="\n",n=r.state.doc.line(n.number+(t?1:-1)),s=r.bidiSpans(n),c=r.visualLineSide(n,!t)}if(a){if(!a(f))return l}else{if(!i)return c;a=i(f)}l=c}}h(gv,"moveByChar");function qL(r,e,t){let i=r.state.charCategorizer(e),n=i(t);return s=>{let o=i(s);return n==Ot.Space&&(n=o),n==o}}h(qL,"byGroup");function VL(r,e,t,i){let n=e.head,s=t?1:-1;if(n==(t?r.state.doc.length:0))return Z.cursor(n,e.assoc);let o=e.goalColumn,l,a=r.contentDOM.getBoundingClientRect(),c=r.coordsAtPos(n,e.assoc||-1),f=r.documentTop;if(c)o==null&&(o=c.left-a.left),l=s<0?c.top:c.bottom;else{let p=r.viewState.lineBlockAt(n);o==null&&(o=Math.min(a.right-a.left,r.defaultCharacterWidth*(n-p.from))),l=(s<0?p.top:p.bottom)+f}let u=a.left+o,d=i!=null?i:r.viewState.heightOracle.textHeight>>1;for(let p=0;;p+=10){let m=l+(d+p)*s,y=Sx(r,{x:u,y:m},!1,s);if(m<a.top||m>a.bottom||(s<0?y<n:y>n)){let g=r.docView.coordsForChar(y),b=!g||m<g.top?-1:1;return Z.cursor(y,b,void 0,o)}}}h(VL,"moveVertically");function sl(r,e,t){for(;;){let i=0;for(let n of r)n.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let a=i||t||(e-s<o-e?-1:1);e=a<0?s:o,i=a}});if(!i)return e}}h(sl,"skipAtomicRanges");function of(r,e,t){let i=sl(r.state.facet(Zf).map(n=>n(r)),t.from,e.head>t.from?-1:1);return i==t.from?t:Z.cursor(i,i<t.from?1:-1)}h(of,"skipAtoms");var On="\uFFFF",uu=class uu{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(Be.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=On}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let n=e;;){this.findPointBefore(i,n);let s=this.text.length;this.readNode(n);let o=n.nextSibling;if(o==t)break;let l=ye.get(n),a=ye.get(o);(l&&a?l.breakAfter:(l?l.breakAfter:cl(n))||cl(o)&&(n.nodeName!="BR"||n.cmIgnore)&&this.text.length>s)&&this.lineBreak(),n=o}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=n.exec(t))&&(s=l.index,o=l[0].length),this.append(t.slice(i,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=s+o}}readNode(e){if(e.cmIgnore)return;let t=ye.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let n=i.iter();!n.next().done;)n.lineBreak?this.lineBreak():this.append(n.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(zL(e,i.node,i.offset)?t:0))}};h(uu,"DOMReader");var Ff=uu;function zL(r,e,t){for(;;){if(!e||t<li(e))return!1;if(e==r)return!0;t=Wi(e)+1,e=e.parentNode}}h(zL,"isAtEnd");var du=class du{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}};h(du,"DOMPoint");var ml=du,pu=class pu{constructor(e,t,i,n){this.typeOver=n,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,i,0))){let l=s||o?[]:HL(e),a=new Ff(l,e.state);a.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=a.text,this.newSel=YL(l,this.bounds.from)}else{let l=e.observer.selectionRange,a=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!cf(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),c=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!cf(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),f=e.viewport;if((V.ios||V.chrome)&&e.state.selection.main.empty&&a!=c&&(f.from>0||f.to<e.state.doc.length)){let u=Math.min(a,c),d=Math.max(a,c),p=f.from-u,m=f.to-d;(p==0||p==1||u==0)&&(m==0||m==-1||d==e.state.doc.length)&&(a=0,c=e.state.doc.length)}this.newSel=Z.single(c,a)}}};h(pu,"DOMChange");var Qf=pu;function Fx(r,e){let t,{newSel:i}=e,n=r.state.selection.main,s=r.inputState.lastKeyTime>Date.now()-100?r.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,a=n.from,c=null;(s===8||V.android&&e.text.length<l-o)&&(a=n.to,c="end");let f=jL(r.state.doc.sliceString(o,l,On),e.text,a-o,c);f&&(V.chrome&&s==13&&f.toB==f.from+2&&e.text.slice(f.from,f.toB)==On+On&&f.toB--,t={from:o+f.from,to:o+f.toA,insert:de.of(e.text.slice(f.from,f.toB).split(On))})}else i&&(!r.hasFocus&&r.state.facet(bi)||i.main.eq(n))&&(i=null);if(!t&&!i)return!1;if(!t&&e.typeOver&&!n.empty&&i&&i.main.empty?t={from:n.from,to:n.to,insert:r.state.doc.slice(n.from,n.to)}:t&&t.from>=n.from&&t.to<=n.to&&(t.from!=n.from||t.to!=n.to)&&n.to-n.from-(t.to-t.from)<=4?t={from:n.from,to:n.to,insert:r.state.doc.slice(n.from,t.from).append(t.insert).append(r.state.doc.slice(t.to,n.to))}:(V.mac||V.android)&&t&&t.from==t.to&&t.from==n.head-1&&/^\. ?$/.test(t.insert.toString())&&r.contentDOM.getAttribute("autocorrect")=="off"?(i&&t.insert.length==2&&(i=Z.single(i.main.anchor-1,i.main.head-1)),t={from:n.from,to:n.to,insert:de.of([" "])}):V.chrome&&t&&t.from==t.to&&t.from==n.head&&t.insert.toString()=="\n "&&r.lineWrapping&&(i&&(i=Z.single(i.main.anchor-1,i.main.head-1)),t={from:n.from,to:n.to,insert:de.of([" "])}),t)return eu(r,t,i,s);if(i&&!i.main.eq(n)){let o=!1,l="select";return r.inputState.lastSelectionTime>Date.now()-50&&(r.inputState.lastSelectionOrigin=="select"&&(o=!0),l=r.inputState.lastSelectionOrigin),r.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}h(Fx,"applyDOMChange");function eu(r,e,t,i=-1){if(V.ios&&r.inputState.flushIOSKey(e))return!0;let n=r.state.selection.main;if(V.android&&(e.to==n.to&&(e.from==n.from||e.from==n.from-1&&r.state.sliceDoc(e.from,n.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&qr(r.contentDOM,"Enter",13)||(e.from==n.from-1&&e.to==n.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>n.head)&&qr(r.contentDOM,"Backspace",8)||e.from==n.from&&e.to==n.to+1&&e.insert.length==0&&qr(r.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();r.inputState.composing>=0&&r.inputState.composing++;let o,l=h(()=>o||(o=WL(r,e,t)),"defaultInsert");return r.state.facet(fx).some(a=>a(r,e.from,e.to,s,l))||r.dispatch(l()),!0}h(eu,"applyDOMChangeInner");function WL(r,e,t){let i,n=r.state,s=n.selection.main;if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&r.inputState.composing<0){let l=s.from<e.from?n.sliceDoc(s.from,e.from):"",a=s.to>e.to?n.sliceDoc(e.to,s.to):"";i=n.replaceSelection(r.state.toText(l+e.insert.sliceString(0,void 0,r.state.lineBreak)+a))}else{let l=n.changes(e),a=t&&t.main.to<=l.newLength?t.main:void 0;if(n.selection.ranges.length>1&&r.inputState.composing>=0&&e.to<=s.to&&e.to>=s.to-10){let c=r.state.sliceDoc(e.from,e.to),f,u=t&&wx(r,t.main.head);if(u){let m=e.insert.length-(e.to-e.from);f={from:u.from,to:u.to-m}}else f=r.state.doc.lineAt(s.head);let d=s.to-e.to,p=s.to-s.from;i=n.changeByRange(m=>{if(m.from==s.from&&m.to==s.to)return{changes:l,range:a||m.map(l)};let y=m.to-d,g=y-c.length;if(m.to-m.from!=p||r.state.sliceDoc(g,y)!=c||m.to>=f.from&&m.from<=f.to)return{range:m};let b=n.changes({from:g,to:y,insert:e.insert}),v=m.to-s.to;return{changes:b,range:a?Z.range(Math.max(0,a.anchor+v),Math.max(0,a.head+v)):m.map(b)}})}else i={changes:l,selection:a&&n.selection.replaceRange(a)}}let o="input.type";return(r.composing||r.inputState.compositionPendingChange&&r.inputState.compositionEndedAt>Date.now()-50)&&(r.inputState.compositionPendingChange=!1,o+=".compose",r.inputState.compositionFirstChange&&(o+=".start",r.inputState.compositionFirstChange=!1)),n.update(i,{userEvent:o,scrollIntoView:!0})}h(WL,"applyDefaultInsert");function jL(r,e,t,i){let n=Math.min(r.length,e.length),s=0;for(;s<n&&r.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==n&&r.length==e.length)return null;let o=r.length,l=e.length;for(;o>0&&l>0&&r.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,s-Math.min(o,l));t-=o+a-s}if(o<s&&r.length<e.length){let a=t<=s&&t>=o?s-t:0;s-=a,l=s+(l-o),o=s}else if(l<s){let a=t<=s&&t>=l?s-t:0;s-=a,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}h(jL,"findDiff");function HL(r){let e=[];if(r.root.activeElement!=r.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:n,focusOffset:s}=r.observer.selectionRange;return t&&(e.push(new ml(t,i)),(n!=t||s!=i)&&e.push(new ml(n,s))),e}h(HL,"selectionPoints");function YL(r,e){if(r.length==0)return null;let t=r[0].pos,i=r.length==2?r[1].pos:t;return t>-1&&i>-1?Z.single(t+e,i+e):null}h(YL,"selectionFromPoints");var mu=class mu{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,V.safari&&e.contentDOM.addEventListener("input",()=>null),V.gecko&&hU(e.contentDOM.ownerDocument)}handleEvent(e){!tU(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let i=this.handlers[e];if(i){for(let n of i.observers)n(this.view,t);for(let n of i.handlers){if(t.defaultPrevented)break;if(n(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=JL(e),i=this.handlers,n=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,l=i[s];l&&o!=!l.handlers.length&&(n.removeEventListener(s,this.handleEvent),l=null),l||n.addEventListener(s,this.handleEvent,{passive:o})}for(let s in i)s!="scroll"&&!t[s]&&n.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Bx.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),V.android&&V.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return V.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Qx.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||GL.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,qr(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:V.safari&&!V.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};h(mu,"InputState");var Bf=mu;function bv(r,e){return(t,i)=>{try{return e.call(r,i,t)}catch(n){tt(t.state,n)}}}h(bv,"bindHandler");function JL(r){let e=Object.create(null);function t(i){return e[i]||(e[i]={observers:[],handlers:[]})}h(t,"record");for(let i of r){let n=i.spec;if(n&&n.domEventHandlers)for(let s in n.domEventHandlers){let o=n.domEventHandlers[s];o&&t(s).handlers.push(bv(i.value,o))}if(n&&n.domEventObservers)for(let s in n.domEventObservers){let o=n.domEventObservers[s];o&&t(s).observers.push(bv(i.value,o))}}for(let i in _t)t(i).handlers.push(_t[i]);for(let i in vt)t(i).observers.push(vt[i]);return e}h(JL,"computeHandlers");var Qx=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],GL="dthko",Bx=[16,17,18,20,91,92,224,225],Xo=6;function Ko(r){return Math.max(0,r)*.7+8}h(Ko,"dragScrollSpeed");function XL(r,e){return Math.max(Math.abs(r.clientX-e.clientX),Math.abs(r.clientY-e.clientY))}h(XL,"dist");var gu=class gu{constructor(e,t,i,n){this.view=e,this.startEvent=t,this.style=i,this.mustSelect=n,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=fL(e.contentDOM),this.atoms=e.state.facet(Zf).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Be.allowMultipleSelections)&&KL(e,t),this.dragging=eU(e,t)&&Lx(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&XL(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,i=0,n=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:n,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let a=kx(this.view);e.clientX-a.left<=n+Xo?t=-Ko(n-e.clientX):e.clientX+a.right>=o-Xo&&(t=Ko(e.clientX-o)),e.clientY-a.top<=s+Xo?i=-Ko(s-e.clientY):e.clientY+a.bottom>=l-Xo&&(i=Ko(e.clientY-l)),this.setScrollSpeed(t,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let i=0;i<e.ranges.length;i++){let n=e.ranges[i],s=null;if(n.empty){let o=sl(this.atoms,n.from,0);o!=n.from&&(s=Z.cursor(o,-1))}else{let o=sl(this.atoms,n.from,-1),l=sl(this.atoms,n.to,1);(o!=n.from||l!=n.to)&&(s=Z.range(n.from==n.anchor?o:l,n.from==n.head?o:l))}s&&(t||(t=e.ranges.slice()),t[i]=s)}return t?Z.create(t,e.mainIndex):e}select(e){let{view:t}=this,i=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};h(gu,"MouseSelection");var Ef=gu;function KL(r,e){let t=r.state.facet(lx);return t.length?t[0](e):V.mac?e.metaKey:e.ctrlKey}h(KL,"addsSelectionRange");function ZL(r,e){let t=r.state.facet(ax);return t.length?t[0](e):V.mac?!e.altKey:!e.ctrlKey}h(ZL,"dragMovesSelection");function eU(r,e){let{main:t}=r.state.selection;if(t.empty)return!1;let i=Jn(r.root);if(!i||i.rangeCount==0)return!0;let n=i.getRangeAt(0).getClientRects();for(let s=0;s<n.length;s++){let o=n[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}h(eU,"isInPrimarySelection");function tU(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=r.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=ye.get(t))&&i.ignoreEvent(e))return!1;return!0}h(tU,"eventBelongsToEditor");var _t=Object.create(null),vt=Object.create(null),Ex=V.ie&&V.ie_version<15||V.ios&&V.webkit_version<604;function iU(r){let e=r.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{r.focus(),t.remove(),Cx(r,t.value)},50)}h(iU,"capturePaste");function Pl(r,e,t){for(let i of r.facet(e))t=i(t,r);return t}h(Pl,"textFilter");function Cx(r,e){e=Pl(r.state,Gf,e);let{state:t}=r,i,n=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(Cf!=null&&t.selection.ranges.every(a=>a.empty)&&Cf==s.toString()){let a=-1;i=t.changeByRange(c=>{let f=t.doc.lineAt(c.from);if(f.from==a)return{range:c};a=f.from;let u=t.toText((o?s.line(n++).text:e)+t.lineBreak);return{changes:{from:f.from,insert:u},range:Z.cursor(c.from+u.length)}})}else o?i=t.changeByRange(a=>{let c=s.line(n++);return{changes:{from:a.from,to:a.to,insert:c.text},range:Z.cursor(a.from+c.length)}}):i=t.replaceSelection(s);r.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}h(Cx,"doPaste");vt.scroll=r=>{r.inputState.lastScrollTop=r.scrollDOM.scrollTop,r.inputState.lastScrollLeft=r.scrollDOM.scrollLeft};_t.keydown=(r,e)=>(r.inputState.setSelectionOrigin("select"),e.keyCode==27&&r.inputState.tabFocusMode!=0&&(r.inputState.tabFocusMode=Date.now()+2e3),!1);vt.touchstart=(r,e)=>{r.inputState.lastTouchTime=Date.now(),r.inputState.setSelectionOrigin("select.pointer")};vt.touchmove=r=>{r.inputState.setSelectionOrigin("select.pointer")};_t.mousedown=(r,e)=>{if(r.observer.flush(),r.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let i of r.state.facet(hx))if(t=i(r,e),t)break;if(!t&&e.button==0&&(t=sU(r,e)),t){let i=!r.hasFocus;r.inputState.startMouseSelection(new Ef(r,e,t,i)),i&&r.observer.ignore(()=>{Vv(r.contentDOM);let s=r.root.activeElement;s&&!s.contains(r.contentDOM)&&s.blur()});let n=r.inputState.mouseSelection;if(n)return n.start(e),n.dragging===!1}return!1};function yv(r,e,t,i){if(i==1)return Z.cursor(e,t);if(i==2)return RL(r.state,e,t);{let n=Ae.find(r.docView,e),s=r.state.doc.lineAt(n?n.posAtEnd:e),o=n?n.posAtStart:s.from,l=n?n.posAtEnd:s.to;return l<r.state.doc.length&&l==s.to&&l++,Z.range(o,l)}}h(yv,"rangeForClick");var vv=h((r,e,t)=>e>=t.top&&e<=t.bottom&&r>=t.left&&r<=t.right,"inside");function rU(r,e,t,i){let n=Ae.find(r.docView,e);if(!n)return 1;let s=e-n.posAtStart;if(s==0)return 1;if(s==n.length)return-1;let o=n.coordsAt(s,-1);if(o&&vv(t,i,o))return-1;let l=n.coordsAt(s,1);return l&&vv(t,i,l)?1:o&&o.bottom>=i?-1:1}h(rU,"findPositionSide");function xv(r,e){let t=r.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:rU(r,t,e.clientX,e.clientY)}}h(xv,"queryPos");var nU=V.ie&&V.ie_version<=11,kv=null,wv=0,Sv=0;function Lx(r){if(!nU)return r.detail;let e=kv,t=Sv;return kv=r,Sv=Date.now(),wv=!e||t>Date.now()-400&&Math.abs(e.clientX-r.clientX)<2&&Math.abs(e.clientY-r.clientY)<2?(wv+1)%3:1}h(Lx,"getClickType");function sU(r,e){let t=xv(r,e),i=Lx(e),n=r.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),n=n.map(s.changes))},get(s,o,l){let a=xv(r,s),c,f=yv(r,a.pos,a.bias,i);if(t.pos!=a.pos&&!o){let u=yv(r,t.pos,t.bias,i),d=Math.min(u.from,f.from),p=Math.max(u.to,f.to);f=d<f.from?Z.range(d,p):Z.range(p,d)}return o?n.replaceRange(n.main.extend(f.from,f.to)):l&&i==1&&n.ranges.length>1&&(c=oU(n,a.pos))?c:l?n.addRange(f):Z.create([f])}}}h(sU,"basicMouseSelection");function oU(r,e){for(let t=0;t<r.ranges.length;t++){let{from:i,to:n}=r.ranges[t];if(i<=e&&n>=e)return Z.create(r.ranges.slice(0,t).concat(r.ranges.slice(t+1)),r.mainIndex==t?0:r.mainIndex-(r.mainIndex>t?1:0))}return null}h(oU,"removeRangeAround");_t.dragstart=(r,e)=>{let{selection:{main:t}}=r.state;if(e.target.draggable){let n=r.docView.nearest(e.target);if(n&&n.isWidget){let s=n.posAtStart,o=s+n.length;(s>=t.to||o<=t.from)&&(t=Z.range(s,o))}}let{inputState:i}=r;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",Pl(r.state,Xf,r.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};_t.dragend=r=>(r.inputState.draggedContent=null,!1);function Fv(r,e,t,i){if(t=Pl(r.state,Gf,t),!t)return;let n=r.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=r.inputState,o=i&&s&&ZL(r,e)?{from:s.from,to:s.to}:null,l={from:n,insert:t},a=r.state.changes(o?[o,l]:l);r.focus(),r.dispatch({changes:a,selection:{anchor:a.mapPos(n,-1),head:a.mapPos(n,1)},userEvent:o?"move.drop":"input.drop"}),r.inputState.draggedContent=null}h(Fv,"dropText");_t.drop=(r,e)=>{if(!e.dataTransfer)return!1;if(r.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let i=Array(t.length),n=0,s=h(()=>{++n==t.length&&Fv(r,e,i.filter(o=>o!=null).join(r.state.lineBreak),!1)},"finishFile");for(let o=0;o<t.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),s()},l.readAsText(t[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return Fv(r,e,i,!0),!0}return!1};_t.paste=(r,e)=>{if(r.state.readOnly)return!0;r.observer.flush();let t=Ex?null:e.clipboardData;return t?(Cx(r,t.getData("text/plain")||t.getData("text/uri-list")),!0):(iU(r),!1)};function lU(r,e){let t=r.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),r.focus()},50)}h(lU,"captureCopy");function aU(r){let e=[],t=[],i=!1;for(let n of r.selection.ranges)n.empty||(e.push(r.sliceDoc(n.from,n.to)),t.push(n));if(!e.length){let n=-1;for(let{from:s}of r.selection.ranges){let o=r.doc.lineAt(s);o.number>n&&(e.push(o.text),t.push({from:o.from,to:Math.min(r.doc.length,o.to+1)})),n=o.number}i=!0}return{text:Pl(r,Xf,e.join(r.lineBreak)),ranges:t,linewise:i}}h(aU,"copiedRange");var Cf=null;_t.copy=_t.cut=(r,e)=>{let{text:t,ranges:i,linewise:n}=aU(r.state);if(!t&&!n)return!1;Cf=n?t:null,e.type=="cut"&&!r.state.readOnly&&r.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=Ex?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(lU(r,t),!1)};var Ux=gt.define();function Ox(r,e){let t=[];for(let i of r.facet(ux)){let n=i(r,e);n&&t.push(n)}return t?r.update({effects:t,annotations:Ux.of(!0)}):null}h(Ox,"focusChangeTransaction");function _x(r){setTimeout(()=>{let e=r.hasFocus;if(e!=r.inputState.notifiedFocused){let t=Ox(r.state,e);t?r.dispatch(t):r.update([])}},10)}h(_x,"updateForFocusChange");vt.focus=r=>{r.inputState.lastFocusTime=Date.now(),!r.scrollDOM.scrollTop&&(r.inputState.lastScrollTop||r.inputState.lastScrollLeft)&&(r.scrollDOM.scrollTop=r.inputState.lastScrollTop,r.scrollDOM.scrollLeft=r.inputState.lastScrollLeft),_x(r)};vt.blur=r=>{r.observer.clearSelectionRange(),_x(r)};vt.compositionstart=vt.compositionupdate=r=>{r.observer.editContext||(r.inputState.compositionFirstChange==null&&(r.inputState.compositionFirstChange=!0),r.inputState.composing<0&&(r.inputState.composing=0))};vt.compositionend=r=>{r.observer.editContext||(r.inputState.composing=-1,r.inputState.compositionEndedAt=Date.now(),r.inputState.compositionPendingKey=!0,r.inputState.compositionPendingChange=r.observer.pendingRecords().length>0,r.inputState.compositionFirstChange=null,V.chrome&&V.android?r.observer.flushSoon():r.inputState.compositionPendingChange?Promise.resolve().then(()=>r.observer.flush()):setTimeout(()=>{r.inputState.composing<0&&r.docView.hasComposition&&r.update([])},50))};vt.contextmenu=r=>{r.inputState.lastContextMenu=Date.now()};_t.beforeinput=(r,e)=>{var t,i;if(e.inputType=="insertReplacementText"&&r.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],a=r.posAtDOM(l.startContainer,l.startOffset),c=r.posAtDOM(l.endContainer,l.endOffset);return eu(r,{from:a,to:c,insert:r.state.toText(s)},null),!0}}let n;if(V.chrome&&V.android&&(n=Qx.find(s=>s.inputType==e.inputType))&&(r.observer.delayAndroidKey(n.key,n.keyCode),n.key=="Backspace"||n.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&r.hasFocus&&(r.contentDOM.blur(),r.focus())},100)}return V.ios&&e.inputType=="deleteContentForward"&&r.observer.flushSoon(),V.safari&&e.inputType=="insertText"&&r.inputState.composing>=0&&setTimeout(()=>vt.compositionend(r,e),20),!1};var Qv=new Set;function hU(r){Qv.has(r)||(Qv.add(r),r.addEventListener("copy",()=>{}),r.addEventListener("cut",()=>{}))}h(hU,"firefoxCopyCutHack");var Bv=["pre-wrap","normal","pre-line","break-spaces"],zr=!1;function Ev(){zr=!1}h(Ev,"clearHeightChangeFlag");var bu=class bu{constructor(e){this.lineWrapping=e,this.doc=de.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Bv.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i<e.length;i++){let n=e[i];n<0?i++:this.heightSamples[Math.floor(n*10)]||(t=!0,this.heightSamples[Math.floor(n*10)]=!0)}return t}refresh(e,t,i,n,s,o){let l=Bv.indexOf(e)>-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=i,this.textHeight=n,this.lineLength=s,a){this.heightSamples={};for(let c=0;c<o.length;c++){let f=o[c];f<0?c++:this.heightSamples[Math.floor(f*10)]=!0}}return a}};h(bu,"HeightOracle");var Lf=bu,yu=class yu{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}};h(yu,"MeasuredHeights");var Uf=yu,Ol=class Ol{constructor(e,t,i,n,s){this.from=e,this.length=t,this.top=i,this.height=n,this._content=s}get type(){return typeof this._content=="number"?He.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof wi?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Ol(this.from,this.length+e.length,this.top,this.height+e.height,t)}};h(Ol,"BlockInfo");var $t=Ol,we=function(r){return r[r.ByPos=0]="ByPos",r[r.ByHeight=1]="ByHeight",r[r.ByPosNoHeight=2]="ByPosNoHeight",r}(we||(we={})),ol=.001,$r=class $r{constructor(e,t,i=2){this.length=e,this.height=t,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>ol&&(zr=!0),this.height=e)}replace(e,t,i){return $r.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,n){let s=this,o=i.doc;for(let l=n.length-1;l>=0;l--){let{fromA:a,toA:c,fromB:f,toB:u}=n[l],d=s.lineAt(a,we.ByPosNoHeight,i.setDoc(t),0,0),p=d.to>=c?d:s.lineAt(c,we.ByPosNoHeight,i,0,0);for(u+=p.to-c,c=p.to;l>0&&d.from<=n[l-1].toA;)a=n[l-1].fromA,f=n[l-1].fromB,l--,a<d.from&&(d=s.lineAt(a,we.ByPosNoHeight,i,0,0));f+=d.from-a,a=d.from;let m=_f.build(i.setDoc(o),e,f,u);s=gl(s,s.replace(a,c,m))}return s.updateHeight(i,0)}static empty(){return new yt(0,0)}static of(e){if(e.length==1)return e[0];let t=0,i=e.length,n=0,s=0;for(;;)if(t==i)if(n>s*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,n-=l.size}else if(s>n*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,s-=l.size}else break;else if(n<s){let l=e[t++];l&&(n+=l.size)}else{let l=e[--i];l&&(s+=l.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,i++),new Of($r.of(e.slice(0,t)),o,$r.of(e.slice(i)))}};h($r,"HeightMap");var ht=$r;function gl(r,e){return r==e?r:(r.constructor!=e.constructor&&(zr=!0),e)}h(gl,"replace");ht.prototype.size=1;var vu=class vu extends ht{constructor(e,t,i){super(e,t),this.deco=i}blockAt(e,t,i,n){return new $t(n,this.length,i,this.height,this.deco||0)}lineAt(e,t,i,n,s){return this.blockAt(0,i,n,s)}forEachLine(e,t,i,n,s,o){e<=s+this.length&&t>=s&&o(this.blockAt(0,i,n,s))}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more&&this.setHeight(n.heights[n.index++]),this.outdated=!1,this}toString(){return"block(".concat(this.length,")")}};h(vu,"HeightMapBlock");var bl=vu,Hn=class Hn extends bl{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,i,n){return new $t(n,this.length,i,this.height,this.breaks)}replace(e,t,i){let n=i[0];return i.length==1&&(n instanceof Hn||n instanceof vi&&n.flags&4)&&Math.abs(this.length-n.length)<10?(n instanceof vi?n=new Hn(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):ht.of(i)}updateHeight(e,t=0,i=!1,n){return n&&n.from<=t&&n.more?this.setHeight(n.heights[n.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}};h(Hn,"HeightMapText");var yt=Hn,at=class at extends ht{constructor(e){super(e,0)}heightMetrics(e,t){let i=e.doc.lineAt(t).number,n=e.doc.lineAt(t+this.length).number,s=n-i+1,o,l=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*s);o=a/s,this.length>s+1&&(l=(this.height-a)/(this.length-s-1))}else o=this.height/s;return{firstLine:i,lastLine:n,perLine:o,perChar:l}}blockAt(e,t,i,n){let{firstLine:s,lastLine:o,perLine:l,perChar:a}=this.heightMetrics(t,n);if(t.lineWrapping){let c=n+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),f=t.doc.lineAt(c),u=l+f.length*a,d=Math.max(i,e-u/2);return new $t(f.from,f.length,d,u,0)}else{let c=Math.max(0,Math.min(o-s,Math.floor((e-i)/l))),{from:f,length:u}=t.doc.line(s+c);return new $t(f,u,i+l*c,l,0)}}lineAt(e,t,i,n,s){if(t==we.ByHeight)return this.blockAt(e,i,n,s);if(t==we.ByPosNoHeight){let{from:p,to:m}=i.doc.lineAt(e);return new $t(p,m-p,0,0,0)}let{firstLine:o,perLine:l,perChar:a}=this.heightMetrics(i,s),c=i.doc.lineAt(e),f=l+c.length*a,u=c.number-o,d=n+l*u+a*(c.from-s-u);return new $t(c.from,c.length,Math.max(n,Math.min(d,n+this.height-f)),f,0)}forEachLine(e,t,i,n,s,o){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:l,perLine:a,perChar:c}=this.heightMetrics(i,s);for(let f=e,u=n;f<=t;){let d=i.doc.lineAt(f);if(f==e){let m=d.number-l;u+=a*m+c*(e-s-m)}let p=a+c*d.length;o(new $t(d.from,d.length,u,p,0)),u+=p,f=d.to+1}}replace(e,t,i){let n=this.length-t;if(n>0){let s=i[i.length-1];s instanceof at?i[i.length-1]=new at(s.length+n):i.push(null,new at(n-1))}if(e>0){let s=i[0];s instanceof at?i[0]=new at(e+s.length):i.unshift(new at(e-1),null)}return ht.of(i)}decomposeLeft(e,t){t.push(new at(e-1),null)}decomposeRight(e,t){t.push(null,new at(this.length-e-1))}updateHeight(e,t=0,i=!1,n){let s=t+this.length;if(n&&n.from<=t+this.length&&n.more){let o=[],l=Math.max(t,n.from),a=-1;for(n.from>t&&o.push(new at(n.from-t-1).updateHeight(e,t));l<=s&&n.more;){let f=e.doc.lineAt(l).length;o.length&&o.push(null);let u=n.heights[n.index++];a==-1?a=u:Math.abs(u-a)>=ol&&(a=-2);let d=new yt(f,u);d.outdated=!1,o.push(d),l+=f+1}l<=s&&o.push(null,new at(s-l).updateHeight(e,l));let c=ht.of(o);return(a<0||Math.abs(c.height-this.height)>=ol||Math.abs(a-this.heightMetrics(e,t).perLine)>=ol)&&(zr=!0),gl(this,c)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return"gap(".concat(this.length,")")}};h(at,"HeightMapGap");var vi=at,xu=class xu extends ht{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,n){let s=i+this.left.height;return e<s?this.left.blockAt(e,t,i,n):this.right.blockAt(e,t,s,n+this.left.length+this.break)}lineAt(e,t,i,n,s){let o=n+this.left.height,l=s+this.left.length+this.break,a=t==we.ByHeight?e<o:e<l,c=a?this.left.lineAt(e,t,i,n,s):this.right.lineAt(e,t,i,o,l);if(this.break||(a?c.to<l:c.from>l))return c;let f=t==we.ByPosNoHeight?we.ByPosNoHeight:we.ByPos;return a?c.join(this.right.lineAt(l,f,i,o,l)):this.left.lineAt(l,f,i,n,s).join(c)}forEachLine(e,t,i,n,s,o){let l=n+this.left.height,a=s+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,i,n,s,o),t>=a&&this.right.forEachLine(e,t,i,l,a,o);else{let c=this.lineAt(a,we.ByPos,i,n,s);e<c.from&&this.left.forEachLine(e,c.from-1,i,n,s,o),c.to>=e&&c.from<=t&&o(c),t>c.to&&this.right.forEachLine(c.to+1,t,i,l,a,o)}}replace(e,t,i){let n=this.left.length+this.break;if(t<n)return this.balanced(this.left.replace(e,t,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-n,t-n,i));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of i)s.push(l);if(e>0&&Cv(s,o-1),t<this.length){let l=s.length;this.decomposeRight(t,s),Cv(s,l)}return ht.of(s)}decomposeLeft(e,t){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(i++,e>=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,n=i+this.break;if(e>=n)return this.right.decomposeRight(e-n,t);e<i&&this.left.decomposeRight(e,t),this.break&&e<n&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ht.of(this.break?[e,null,t]:[e,t]):(this.left=gl(this.left,e),this.right=gl(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,n){let{left:s,right:o}=this,l=t+s.length+this.break,a=null;return n&&n.from<=t+s.length&&n.more?a=s=s.updateHeight(e,t,i,n):s.updateHeight(e,t,i),n&&n.from<=l+o.length&&n.more?a=o=o.updateHeight(e,l,i,n):o.updateHeight(e,l,i),a?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};h(xu,"HeightMapBranch");var Of=xu;function Cv(r,e){let t,i;r[e]==null&&(t=r[e-1])instanceof vi&&(i=r[e+1])instanceof vi&&r.splice(e-1,3,new vi(t.length+1+i.length))}h(Cv,"mergeGaps");var cU=5,_l=class _l{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof yt?n.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new yt(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e<t||i.heightRelevant){let n=i.widget?i.widget.estimatedHeight:0,s=i.widget?i.widget.lineBreaks:0;n<0&&(n=this.oracle.lineHeight);let o=t-e;i.block?this.addBlock(new bl(o,n,i)):(o||s||n>=cU)&&this.addLineDeco(n,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new yt(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new vi(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof yt)return e;let t=new yt(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,i){let n=this.ensureLine();n.length+=i,n.collapsed+=i,n.widgetHeight=Math.max(n.widgetHeight,e),n.breaks+=t,this.writtenTo=this.pos=this.pos+i}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof yt)&&!this.isCovered?this.nodes.push(new yt(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let n of this.nodes)n instanceof yt&&n.updateHeight(this.oracle,i),i+=n?n.length:1;return this.nodes}static build(e,t,i,n){let s=new _l(i,e);return be.spans(t,i,n,s,0),s.finish(i)}};h(_l,"NodeBuilder");var _f=_l;function fU(r,e,t){let i=new Tf;return be.compare(r,e,t,i,0),i.changes}h(fU,"heightRelevantDecoChanges");var ku=class ku{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,i,n){(e<t||i&&i.heightRelevant||n&&n.heightRelevant)&&bf(e,t,this.changes,5)}};h(ku,"DecorationComparator");var Tf=ku;function uU(r,e){let t=r.getBoundingClientRect(),i=r.ownerDocument,n=i.defaultView||window,s=Math.max(0,t.left),o=Math.min(n.innerWidth,t.right),l=Math.max(0,t.top),a=Math.min(n.innerHeight,t.bottom);for(let c=r.parentNode;c&&c!=i.body;)if(c.nodeType==1){let f=c,u=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&u.overflow!="visible"){let d=f.getBoundingClientRect();s=Math.max(s,d.left),o=Math.min(o,d.right),l=Math.max(l,d.top),a=Math.min(c==r.parentNode?n.innerHeight:a,d.bottom)}c=u.position=="absolute"||u.position=="fixed"?f.offsetParent:f.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,a)-(t.top+e)}}h(uU,"visiblePixelRange");function dU(r,e){let t=r.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}h(dU,"fullPixelRange");var wu=class wu{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++){let n=e[i],s=t[i];if(n.from!=s.from||n.to!=s.to||n.size!=s.size)return!1}return!0}draw(e,t){return ce.replace({widget:new Df(this.size*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}};h(wu,"LineGap");var Mn=wu,Su=class Su extends ki{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}};h(Su,"LineGapWidget");var Df=Su,Fu=class Fu{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Lv,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Se.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(Kf).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new Lf(t),this.stateDeco=e.facet(is).filter(i=>typeof i!="function"),this.heightMap=ht.empty().applyChanges(this.stateDeco,de.empty,this.heightOracle.setDoc(e.doc),[new Vt(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ce.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let n=i?t.head:t.anchor;if(!e.some(({from:s,to:o})=>n>=s&&n<=o)){let{from:s,to:o}=this.lineBlockAt(n);e.push(new Rr(s,o))}}return this.viewports=e.sort((i,n)=>i.from-n.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Lv:new Nf(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(_n(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(is).filter(f=>typeof f!="function");let n=e.changedRanges,s=Vt.extendWithRanges(n,fU(i,this.stateDeco,e?e.changes:We.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Ev(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||zr)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<a.from||t.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let c=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(px)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),n=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Se.RTL:Se.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),l=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let c=0,f=0;if(l.width&&l.height){let{scaleX:B,scaleY:E}=qv(t,l);(B>.005&&Math.abs(this.scaleX-B)>.005||E>.005&&Math.abs(this.scaleY-E)>.005)&&(this.scaleX=B,this.scaleY=E,c|=8,o=a=!0)}let u=(parseInt(i.paddingTop)||0)*this.scaleY,d=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(n.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=8);let p=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=Wv(e.scrollDOM);let m=(this.printing?dU:uU)(t,this.paddingTop),y=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let v=l.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,c|=8),a){let B=e.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(B)&&(o=!0),o||n.lineWrapping&&Math.abs(v-this.contentDOMWidth)>n.charWidth){let{lineHeight:E,charWidth:T,textHeight:_}=e.docView.measureTextSize();o=E>0&&n.refresh(s,E,T,_,v/T,B),o&&(e.docView.minWidth=0,c|=8)}y>0&&g>0?f=Math.max(y,g):y<0&&g<0&&(f=Math.min(y,g)),Ev();for(let E of this.viewports){let T=E.from==this.viewport.from?B:e.docView.measureVisibleLineHeights(E);this.heightMap=(o?ht.empty().applyChanges(this.stateDeco,de.empty,this.heightOracle,[new Vt(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(n,0,o,new Uf(E.from,T))}zr&&(c|=2)}let w=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),c|=this.updateForViewport()),(c&2||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,a=new Rr(n.lineAt(o-i*1e3,we.ByHeight,s,0,0).from,n.lineAt(l+(1-i)*1e3,we.ByHeight,s,0,0).to);if(t){let{head:c}=t.range;if(c<a.from||c>a.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),u=n.lineAt(c,we.ByPos,s,0,0),d;t.y=="center"?d=(u.top+u.bottom)/2-f/2:t.y=="start"||t.y=="nearest"&&c<a.from?d=u.top:d=u.bottom-f,a=new Rr(n.lineAt(d-1e3/2,we.ByHeight,s,0,0).from,n.lineAt(d+f+1e3/2,we.ByHeight,s,0,0).to)}}return a}mapViewport(e,t){let i=t.mapPos(e.from,-1),n=t.mapPos(e.to,1);return new Rr(this.heightMap.lineAt(i,we.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(n,we.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},i=0){if(!this.inView)return!0;let{top:n}=this.heightMap.lineAt(e,we.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,we.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||n<=o-Math.max(10,Math.min(-i,250)))&&(t==this.state.doc.length||s>=l+Math.max(10,Math.min(i,250)))&&n>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let i=[];for(let n of e)t.touchesRange(n.from,n.to)||i.push(new Mn(t.mapPos(n.from),t.mapPos(n.to),n.size));return i}ensureLineGaps(e,t){let i=this.heightOracle.lineWrapping,n=i?1e4:2e3,s=n>>1,o=n<<1;if(this.defaultTextDirection!=Se.LTR&&!i)return[];let l=[],a=h((f,u,d,p)=>{if(u-f<s)return;let m=this.state.selection.main,y=[m.from];m.empty||y.push(m.to);for(let b of y)if(b>f&&b<u){a(f,b-10,d,p),a(b+10,u,d,p);return}let g=mU(e,b=>b.from>=d.from&&b.to<=d.to&&Math.abs(b.from-f)<s&&Math.abs(b.to-u)<s&&!y.some(v=>b.from<v&&b.to>v));if(!g){if(u<d.to&&t&&i&&t.visibleRanges.some(b=>b.from<=u&&b.to>=u)){let b=t.moveToLineBoundary(Z.cursor(u),!1,!0).head;b>f&&(u=b)}g=new Mn(f,u,this.gapSize(d,f,u,p))}l.push(g)},"addGap"),c=h(f=>{if(f.length<o||f.type!=He.Text)return;let u=pU(f.from,f.to,this.stateDeco);if(u.total<o)return;let d=this.scrollTarget?this.scrollTarget.range.head:null,p,m;if(i){let y=n/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,b;if(d!=null){let v=el(u,d),w=((this.visibleBottom-this.visibleTop)/2+y)/f.height;g=v-w,b=v+w}else g=(this.visibleTop-f.top-y)/f.height,b=(this.visibleBottom-f.top+y)/f.height;p=Zo(u,g),m=Zo(u,b)}else{let y=u.total*this.heightOracle.charWidth,g=n*this.heightOracle.charWidth,b,v;if(d!=null){let w=el(u,d),B=((this.pixelViewport.right-this.pixelViewport.left)/2+g)/y;b=w-B,v=w+B}else b=(this.pixelViewport.left-g)/y,v=(this.pixelViewport.right+g)/y;p=Zo(u,b),m=Zo(u,v)}p>f.from&&a(f.from,p,f,u),m<f.to&&a(m,f.to,f,u)},"checkLine");for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(c):c(f);return l}gapSize(e,t,i,n){let s=el(n,i)-el(n,t);return this.heightOracle.lineWrapping?e.height*s:n.total*this.heightOracle.charWidth*s}updateLineGaps(e){Mn.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ce.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];be.spans(e,this.viewport.from,this.viewport.to,{span(n,s){t.push({from:n,to:s})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((n,s)=>n.from!=t[s].from||n.to!=t[s].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||_n(this.heightMap.lineAt(e,we.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||_n(this.heightMap.lineAt(this.scaler.fromDOM(e),we.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return _n(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}};h(Fu,"ViewState");var yl=Fu,Qu=class Qu{constructor(e,t){this.from=e,this.to=t}};h(Qu,"Viewport");var Rr=Qu;function pU(r,e,t){let i=[],n=r,s=0;return be.spans(t,r,e,{span(){},point(o,l){o>n&&(i.push({from:n,to:o}),s+=o-n),n=l}},20),n<e&&(i.push({from:n,to:e}),s+=e-n),{total:s,ranges:i}}h(pU,"lineStructure");function Zo({total:r,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let i=Math.floor(r*t);for(let n=0;;n++){let{from:s,to:o}=e[n],l=o-s;if(i<=l)return s+i;i-=l}}h(Zo,"findPosition");function el(r,e){let t=0;for(let{from:i,to:n}of r.ranges){if(e<=n){t+=e-i;break}t+=n-i}return t/r.total}h(el,"findFraction");function mU(r,e){for(let t of r)if(e(t))return t}h(mU,"find");var Lv={toDOM(r){return r},fromDOM(r){return r},scale:1,eq(r){return r==this}},Tl=class Tl{constructor(e,t,i){let n=0,s=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let c=t.lineAt(l,we.ByPos,e,0,0).top,f=t.lineAt(a,we.ByPos,e,0,0).bottom;return n+=f-c,{from:l,to:a,top:c,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-n)/(t.height-n);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,i=0,n=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return n+(e-i)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);i=s.bottom,n=s.domBottom}}fromDOM(e){for(let t=0,i=0,n=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return i+(e-n)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);i=s.bottom,n=s.domBottom}}eq(e){return e instanceof Tl?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,i)=>t.from==e.viewports[i].from&&t.to==e.viewports[i].to):!1}};h(Tl,"BigScaler");var Nf=Tl;function _n(r,e){if(e.scale==1)return r;let t=e.toDOM(r.top),i=e.toDOM(r.bottom);return new $t(r.from,r.length,t,i-t,Array.isArray(r._content)?r._content.map(n=>_n(n,e)):r._content)}h(_n,"scaleBlock");var tl=z.define({combine:h(r=>r.join(" "),"combine")}),Rf=z.define({combine:h(r=>r.indexOf(!0)>-1,"combine")}),Af=bt.newName(),Tx=bt.newName(),Dx=bt.newName(),Nx={"&light":"."+Tx,"&dark":"."+Dx};function Mf(r,e,t){return new bt(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,n=>{if(n=="&")return r;if(!t||!t[n])throw new RangeError("Unsupported selector: ".concat(n));return t[n]}):r+" "+i}})}h(Mf,"buildTheme");var gU=Mf("."+Af,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Nx),bU={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},lf=V.ie&&V.ie_version<=11,Bu=class Bu{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new ff,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let i of t)this.queue.push(i);(V.ie&&V.ie_version<=11||V.ios&&e.composing)&&t.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(V.chrome&&V.chrome_version<126)&&(this.editContext=new If(e),e.state.facet(bi)&&(e.contentDOM.editContext=this.editContext.editContext)),lf&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(bi)?i.root.activeElement!=this.dom:!nl(i.dom,n))return;let s=n.anchorNode&&i.docView.nearest(n.anchorNode);if(s&&s.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(V.ie&&V.ie_version<=11||V.android&&V.chrome)&&!i.state.selection.main.empty&&n.focusNode&&Dn(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Jn(e.root);if(!t)return!1;let i=V.safari&&e.root.nodeType==11&&aL(this.dom.ownerDocument)==this.dom&&yU(this.view,t)||t;if(!i||this.selectionRange.eq(i))return!1;let n=nl(this.dom,i);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&dL(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),n&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let i=this.dom;i;)if(i.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=t)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,bU),lf&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),lf&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var i;if(!this.delayedAndroidKey){let n=h(()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&qr(this.dom,s.key,s.keyCode))},"flush");this.flushingAndroidKey=this.view.win.requestAnimationFrame(n)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,i=-1,n=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(n=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:n}}readChange(){let{from:e,to:t,typeOver:i}=this.processRecords(),n=this.selectionChanged&&nl(this.dom,this.selectionRange);if(e<0&&!n)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new Qf(this.view,e,t,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let i=this.view.state,n=Fx(this.view,t);return this.view.state==i&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),n}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let i=Uv(t,e.previousSibling||e.target.previousSibling,-1),n=Uv(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:n?t.posBefore(n):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(bi)!=e.state.facet(bi)&&(e.view.contentDOM.editContext=e.state.facet(bi)?this.editContext.editContext:null))}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};h(Bu,"DOMObserver");var Pf=Bu;function Uv(r,e,t){for(;e;){let i=ye.get(e);if(i&&i.parent==r)return i;let n=e.parentNode;e=n!=r.dom?n:t>0?e.nextSibling:e.previousSibling}return null}h(Uv,"findChild");function Ov(r,e){let t=e.startContainer,i=e.startOffset,n=e.endContainer,s=e.endOffset,o=r.docView.domAtPos(r.state.selection.main.anchor);return Dn(o.node,o.offset,n,s)&&([t,i,n,s]=[n,s,t,i]),{anchorNode:t,anchorOffset:i,focusNode:n,focusOffset:s}}h(Ov,"buildSelectionRangeFromRange");function yU(r,e){if(e.getComposedRanges){let n=e.getComposedRanges(r.root)[0];if(n)return Ov(r,n)}let t=null;function i(n){n.preventDefault(),n.stopImmediatePropagation(),t=n.getTargetRanges()[0]}return h(i,"read"),r.contentDOM.addEventListener("beforeinput",i,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",i,!0),t?Ov(r,t):null}h(yU,"safariSelectionRangeHack");var Eu=class Eu{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let{anchor:n}=e.state.selection.main,s={from:this.toEditorPos(i.updateRangeStart),to:this.toEditorPos(i.updateRangeEnd),insert:de.of(i.text.split("\n"))};s.from==this.from&&n<this.from?s.from=n:s.to==this.to&&n>this.to&&(s.to=n),!(s.from==s.to&&!s.insert.length)&&(this.pendingContextChange=s,e.state.readOnly||eu(e,s,Z.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=i=>{let n=[],s=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o<l;o++){let a=e.coordsForChar(o);s=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||s||new DOMRect,n.push(s)}t.updateCharacterBounds(i.rangeStart,n)},this.handlers.textformatupdate=i=>{let n=[];for(let s of i.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(o!="None"&&l!="None"){let a="text-decoration: underline ".concat(o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":"").concat(l=="Thin"?1:2,"px");n.push(ce.mark({attributes:{style:a}}).range(this.toEditorPos(s.rangeStart),this.toEditorPos(s.rangeEnd)))}}e.dispatch({effects:gx.of(ce.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:h(i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let n=Jn(i.root);n&&n.rangeCount&&this.editContext.updateSelectionBounds(n.getRangeAt(0).getBoundingClientRect())},"read")}}applyEdits(e){let t=0,i=!1,n=this.pendingContextChange;return e.changes.iterChanges((s,o,l,a,c)=>{if(i)return;let f=c.length-(o-s);if(n&&o>=n.to)if(n.from==s&&n.to==o&&n.insert.eq(c)){n=this.pendingContextChange=null,t+=f,this.to+=f;return}else n=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=f,this.to+=f;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+c.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),c.toString()),this.to+=f}t+=f}),n&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),n=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=n)&&this.editContext.updateSelection(i,n)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}};h(Eu,"EditContextManager");var If=Eu,Yn=class Yn{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(n=>n.forEach(s=>i(s,this)))||(n=>this.update(n)),this.dispatch=this.dispatch.bind(this),this._root=e.root||uL(e.parent)||document,this.viewState=new yl(e.state||Be.create(e)),e.scrollTo&&e.scrollTo.is(Go)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Ln).map(n=>new An(n));for(let n of this.plugins)n.update(this);this.observer=new Pf(this),this.inputState=new Bf(this),this.inputState.ensureHandlers(this.plugins),this.docView=new pl(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Te?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,n,s=this.state;for(let d of e){if(d.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=d.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,a=null;e.some(d=>d.annotation(Ux))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=Ox(s,o),a||(l=1));let c=this.observer.delayedAndroidKey,f=null;if(c?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(f=null)):this.observer.clear(),s.facet(Be.phrases)!=this.state.facet(Be.phrases))return this.setState(s);n=dl.create(this,s,e),n.flags|=l;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let d of e){if(u&&(u=u.map(d.changes)),d.scrollIntoView){let{main:p}=d.state.selection;u=new Rn(p.empty?p:Z.cursor(p.head,p.head>p.anchor?-1:1))}for(let p of d.effects)p.is(Go)&&(u=p.value.clip(this.state))}this.viewState.update(n,u),this.bidiCache=vl.update(this.bidiCache,n.changes),n.empty||(this.updatePlugins(n),this.inputState.update(n)),t=this.docView.update(n),this.state.facet(Un)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(d=>d.isUserEvent("select.pointer")))}finally{this.updateState=0}if(n.startState.facet(tl)!=n.state.facet(tl)&&(this.viewState.mustMeasureContent=!0),(t||i||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!n.empty)for(let d of this.state.facet(kf))try{d(n)}catch(p){tt(this.state,p,"update listener")}(a||f)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),f&&!Fx(this,f)&&c.force&&qr(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new yl(e),this.plugins=e.facet(Ln).map(i=>new An(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new pl(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Ln),i=e.state.facet(Ln);if(t!=i){let n=[];for(let s of i){let o=t.indexOf(s);if(o<0)n.push(new An(s));else{let l=this.plugins[o];l.mustUpdate=e,n.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let n of this.plugins)n.mustUpdate=e;for(let n=0;n<this.plugins.length;n++)this.plugins[n].update(this);t!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(i){tt(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,i=this.scrollDOM,n=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(Wv(i))s=-1,o=this.viewState.heightMap.height;else{let p=this.viewState.scrollAnchorAt(n);s=p.from,o=p.top}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];a&4||([this.measureRequests,c]=[c,this.measureRequests]);let f=c.map(p=>{try{return p.read(this)}catch(m){return tt(this.state,m),_v}}),u=dl.create(this,this.state,[]),d=!1;u.flags|=a,t?t.flags|=a:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u),d&&this.docViewUpdate());for(let p=0;p<c.length;p++)if(f[p]!=_v)try{let m=c[p];m.write&&m.write(f[p],this)}catch(m){tt(this.state,m)}if(d&&this.docView.updateSelection(!0),!u.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let m=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(m>1||m<-1){n=n+m,i.scrollTop=n/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(kf))l(t)}get themeClasses(){return Af+" "+(this.state.facet(Rf)?Dx:Tx)+" "+this.state.facet(tl)}updateAttrs(){let e=Tv(this,bx,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(bi)?"true":"false",class:"cm-content",style:"".concat(V.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Tv(this,Kf,t);let i=this.observer.ignore(()=>{let n=gf(this.contentDOM,this.contentAttrs,t),s=gf(this.dom,this.editorAttrs,e);return n||s});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let n of i.effects)if(n.is(Yn.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=n.value}}mountStyles(){this.styleModules=this.state.facet(Un);let e=this.state.facet(Yn.cspNonce);bt.mount(this.root,this.styleModules.concat(gU).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(i=>i.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return of(this,e,gv(this,e,t,i))}moveByGroup(e,t){return of(this,e,gv(this,e,t,i=>qL(this,e.head,i)))}visualLineSide(e,t){let i=this.bidiSpans(e),n=this.textDirectionAt(e.from),s=i[t?i.length-1:0];return Z.cursor(s.side(t,n)+e.from,s.forward(!t,n)?1:-1)}moveToLineBoundary(e,t,i=!0){return $L(this,e,t,i)}moveVertically(e,t,i){return of(this,e,VL(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Sx(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let n=this.state.doc.lineAt(e),s=this.bidiSpans(n),o=s[qt.find(s,e-n.from,-1,t)];return Al(i,o.dir==Se.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(dx)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>vU)return sx(e.length);let t=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||nx(s.isolates,i=fv(this,e))))return s.order;i||(i=fv(this,e));let n=QL(e.text,t,i);return this.bidiCache.push(new vl(e.from,e.to,t,i,!0,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||V.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Vv(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Go.of(new Rn(typeof e=="number"?Z.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Go.of(new Rn(Z.cursor(i.from),"start","start",i.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ye.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ye.define(()=>({}),{eventObservers:e})}static theme(e,t){let i=bt.newName(),n=[tl.of(i),Un.of(Mf(".".concat(i),e))];return t&&t.dark&&n.push(Rf.of(!0)),n}static baseTheme(e){return Tr.lowest(Un.of(Mf("."+Af,e,Nx)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),n=i&&ye.get(i)||ye.get(e);return((t=n==null?void 0:n.rootView)===null||t===void 0?void 0:t.view)||null}};h(Yn,"EditorView");var te=Yn;te.styleModule=Un;te.inputHandler=fx;te.clipboardInputFilter=Gf;te.clipboardOutputFilter=Xf;te.scrollHandler=mx;te.focusChangeEffect=ux;te.perLineTextDirection=dx;te.exceptionSink=cx;te.updateListener=kf;te.editable=bi;te.mouseSelectionStyle=hx;te.dragMovesSelection=ax;te.clickAddsSelectionRange=lx;te.decorations=is;te.outerDecorations=yx;te.atomicRanges=Zf;te.bidiIsolatedRanges=vx;te.scrollMargins=xx;te.darkTheme=Rf;te.cspNonce=z.define({combine:h(r=>r.length?r[0]:"","combine")});te.contentAttributes=Kf;te.editorAttributes=bx;te.lineWrapping=te.contentAttributes.of({class:"cm-lineWrapping"});te.announce=pe.define();var vU=4096,_v={},Dl=class Dl{constructor(e,t,i,n,s,o){this.from=e,this.to=t,this.dir=i,this.isolates=n,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let i=[],n=e.length?e[e.length-1].dir:Se.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==n&&!t.touchesRange(o.from,o.to)&&i.push(new Dl(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return i}};h(Dl,"CachedOrder");var vl=Dl;function Tv(r,e,t){for(let i=r.state.facet(e),n=i.length-1;n>=0;n--){let s=i[n],o=typeof s=="function"?s(r):s;o&&mf(o,t)}return t}h(Tv,"attrsFromFacet");var xU=V.mac?"mac":V.windows?"win":V.linux?"linux":"key";function kU(r,e){let t=r.split(/-(?!$)/),i=t[t.length-1];i=="Space"&&(i=" ");let n,s,o,l;for(let a=0;a<t.length-1;++a){let c=t[a];if(/^(cmd|meta|m)$/i.test(c))l=!0;else if(/^a(lt)?$/i.test(c))n=!0;else if(/^(c|ctrl|control)$/i.test(c))s=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+c)}return n&&(i="Alt-"+i),s&&(i="Ctrl-"+i),l&&(i="Meta-"+i),o&&(i="Shift-"+i),i}h(kU,"normalizeKeyName");function il(r,e,t){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t!==!1&&e.shiftKey&&(r="Shift-"+r),r}h(il,"modifiers");var wU=Tr.default(te.domEventHandlers({keydown(r,e){return BU(SU(e.state),r,e,"editor")}})),tu=z.define({enables:wU}),Dv=new WeakMap;function SU(r){let e=r.facet(tu),t=Dv.get(e);return t||Dv.set(e,t=QU(e.reduce((i,n)=>i.concat(n),[]))),t}h(SU,"getKeymap");var yi=null,FU=4e3;function QU(r,e=xU){let t=Object.create(null),i=Object.create(null),n=h((o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},"checkPrefix"),s=h((o,l,a,c,f)=>{var u,d;let p=t[o]||(t[o]=Object.create(null)),m=l.split(/ (?!$)/).map(b=>kU(b,e));for(let b=1;b<m.length;b++){let v=m.slice(0,b).join(" ");n(v,!0),p[v]||(p[v]={preventDefault:!0,stopPropagation:!1,run:[w=>{let B=yi={view:w,prefix:v,scope:o};return setTimeout(()=>{yi==B&&(yi=null)},FU),!0}]})}let y=m.join(" ");n(y,!1);let g=p[y]||(p[y]={preventDefault:!1,stopPropagation:!1,run:((d=(u=p._any)===null||u===void 0?void 0:u.run)===null||d===void 0?void 0:d.slice())||[]});a&&g.run.push(a),c&&(g.preventDefault=!0),f&&(g.stopPropagation=!0)},"add");for(let o of r){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let c of l){let f=t[c]||(t[c]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:u}=o;for(let d in f)f[d].run.push(p=>u(p,$f))}let a=o[e]||o.key;if(a)for(let c of l)s(c,a,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(c,"Shift-"+a,o.shift,o.preventDefault,o.stopPropagation)}return t}h(QU,"buildKeymap");var $f=null;function BU(r,e,t,i){$f=e;let n=rv(e),s=wn(n,0),o=_o(s)==n.length&&n!=" ",l="",a=!1,c=!1,f=!1;yi&&yi.view==t&&yi.scope==i&&(l=yi.prefix+" ",Bx.indexOf(e.keyCode)<0&&(c=!0,yi=null));let u=new Set,d=h(g=>{if(g){for(let b of g.run)if(!u.has(b)&&(u.add(b),b(t)))return g.stopPropagation&&(f=!0),!0;g.preventDefault&&(g.stopPropagation&&(f=!0),c=!0)}return!1},"runFor"),p=r[i],m,y;return p&&(d(p[l+il(n,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(V.windows&&e.ctrlKey&&e.altKey)&&(m=oi[e.keyCode])&&m!=n?(d(p[l+il(m,e,!0)])||e.shiftKey&&(y=Dr[e.keyCode])!=n&&y!=m&&d(p[l+il(y,e,!1)]))&&(a=!0):o&&e.shiftKey&&d(p[l+il(n,e,!0)])&&(a=!0),!a&&d(p._any)&&(a=!0)),c&&(a=!0),a&&f&&e.stopPropagation(),$f=null,a}h(BU,"runHandlers");var Nl=class Nl{constructor(e,t,i,n,s){this.className=e,this.left=t,this.top=i,this.width=n,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,i){if(i.empty){let n=e.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let s=Rx(e);return[new Nl(t,n.left-s.left,n.top-s.top,null,n.bottom-n.top)]}else return EU(e,t,i)}};h(Nl,"RectangleMarker");var rs=Nl;function Rx(r){let e=r.scrollDOM.getBoundingClientRect();return{left:(r.textDirection==Se.LTR?e.left:e.right-r.scrollDOM.clientWidth*r.scaleX)-r.scrollDOM.scrollLeft*r.scaleX,top:e.top-r.scrollDOM.scrollTop*r.scaleY}}h(Rx,"getBase");function Nv(r,e,t,i){let n=r.coordsAtPos(e,t*2);if(!n)return i;let s=r.dom.getBoundingClientRect(),o=(n.top+n.bottom)/2,l=r.posAtCoords({x:s.left+1,y:o}),a=r.posAtCoords({x:s.right-1,y:o});return l==null||a==null?i:{from:Math.max(i.from,Math.min(l,a)),to:Math.min(i.to,Math.max(l,a))}}h(Nv,"wrappedLine");function EU(r,e,t){if(t.to<=r.viewport.from||t.from>=r.viewport.to)return[];let i=Math.max(t.from,r.viewport.from),n=Math.min(t.to,r.viewport.to),s=r.textDirection==Se.LTR,o=r.contentDOM,l=o.getBoundingClientRect(),a=Rx(r),c=o.querySelector(".cm-line"),f=c&&window.getComputedStyle(c),u=l.left+(f?parseInt(f.paddingLeft)+Math.min(0,parseInt(f.textIndent)):0),d=l.right-(f?parseInt(f.paddingRight):0),p=Sf(r,i),m=Sf(r,n),y=p.type==He.Text?p:null,g=m.type==He.Text?m:null;if(y&&(r.lineWrapping||p.widgetLineBreaks)&&(y=Nv(r,i,1,y)),g&&(r.lineWrapping||m.widgetLineBreaks)&&(g=Nv(r,n,-1,g)),y&&g&&y.from==g.from&&y.to==g.to)return v(w(t.from,t.to,y));{let E=y?w(t.from,null,y):B(p,!1),T=g?w(null,t.to,g):B(m,!0),_=[];return(y||p).to<(g||m).from-(y&&g?1:0)||p.widgetLineBreaks>1&&E.bottom+r.defaultLineHeight/2<T.top?_.push(b(u,E.bottom,d,T.top)):E.bottom<T.top&&r.elementAtHeight((E.bottom+T.top)/2).type==He.Text&&(E.bottom=T.top=(E.bottom+T.top)/2),v(E).concat(_).concat(v(T))}function b(E,T,_,W){return new rs(e,E-a.left,T-a.top-.01,_-E,W-T+.01)}h(b,"piece");function v({top:E,bottom:T,horizontal:_}){let W=[];for(let H=0;H<_.length;H+=2)W.push(b(_[H],E,_[H+1],T));return W}h(v,"pieces");function w(E,T,_){let W=1e9,H=-1e9,G=[];function M(I,U,ee,fe,Fe){let Qe=r.coordsAtPos(I,I==_.to?-2:2),he=r.coordsAtPos(ee,ee==_.from?2:-2);!Qe||!he||(W=Math.min(Qe.top,he.top,W),H=Math.max(Qe.bottom,he.bottom,H),Fe==Se.LTR?G.push(s&&U?u:Qe.left,s&&fe?d:he.right):G.push(!s&&fe?u:he.left,!s&&U?d:Qe.right))}h(M,"addSpan");let J=E!=null?E:_.from,ne=T!=null?T:_.to;for(let I of r.visibleRanges)if(I.to>J&&I.from<ne)for(let U=Math.max(I.from,J),ee=Math.min(I.to,ne);;){let fe=r.state.doc.lineAt(U);for(let Fe of r.bidiSpans(fe)){let Qe=Fe.from+fe.from,he=Fe.to+fe.from;if(Qe>=ee)break;he>U&&M(Math.max(Qe,U),E==null&&Qe<=J,Math.min(he,ee),T==null&&he>=ne,Fe.dir)}if(U=fe.to+1,U>=ee)break}return G.length==0&&M(J,E==null,ne,T==null,r.textDirection),{top:W,bottom:H,horizontal:G}}h(w,"drawForLine");function B(E,T){let _=l.top+(T?E.top:E.bottom);return{top:_,bottom:_,horizontal:[]}}h(B,"drawForWidget")}h(EU,"rectanglesForRange");function CU(r,e){return r.constructor==e.constructor&&r.eq(e)}h(CU,"sameMarker");var Cu=class Cu{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(ll)!=e.state.facet(ll)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,i=e.facet(ll);for(;t<i.length&&i[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform="scale(".concat(1/e,", ").concat(1/t,")"))}draw(e){if(e.length!=this.drawn.length||e.some((t,i)=>!CU(t,this.drawn[i]))){let t=this.dom.firstChild,i=0;for(let n of e)n.update&&t&&n.constructor&&this.drawn[i].constructor&&n.update(t,this.drawn[i])?(t=t.nextSibling,i++):this.dom.insertBefore(n.draw(),t);for(;t;){let n=t.nextSibling;t.remove(),t=n}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}};h(Cu,"LayerView");var qf=Cu,ll=z.define();function Ax(r){return[Ye.define(e=>new qf(e,r)),ll.of(r)]}h(Ax,"layer");var Mx=!V.ios,ns=z.define({combine(r){return si(r,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:h((e,t)=>Math.min(e,t),"cursorBlinkRate"),drawRangeCursor:h((e,t)=>e||t,"drawRangeCursor")})}});function Px(r={}){return[ns.of(r),LU,UU,OU,px.of(!0)]}h(Px,"drawSelection");function Ix(r){return r.startState.facet(ns)!=r.state.facet(ns)}h(Ix,"configChanged");var LU=Ax({above:!0,markers(r){let{state:e}=r,t=e.facet(ns),i=[];for(let n of e.selection.ranges){let s=n==e.selection.main;if(n.empty?!s||Mx:t.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=n.empty?n:Z.cursor(n.head,n.head>n.anchor?-1:1);for(let a of rs.forRange(r,o,l))i.push(a)}}return i},update(r,e){r.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=Ix(r);return t&&Rv(r.state,e),r.docChanged||r.selectionSet||t},mount(r,e){Rv(e.state,r)},class:"cm-cursorLayer"});function Rv(r,e){e.style.animationDuration=r.facet(ns).cursorBlinkRate+"ms"}h(Rv,"setBlinkRate");var UU=Ax({above:!1,markers(r){return r.state.selection.ranges.map(e=>e.empty?[]:rs.forRange(r,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(r,e){return r.docChanged||r.selectionSet||r.viewportChanged||Ix(r)},class:"cm-selectionLayer"}),Vf={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Mx&&(Vf[".cm-line"].caretColor=Vf[".cm-content"].caretColor="transparent !important");var OU=Tr.highest(te.theme(Vf)),$x=pe.define({map(r,e){return r==null?null:e.mapPos(r)}}),Tn=Pe.define({create(){return null},update(r,e){return r!=null&&(r=e.changes.mapPos(r)),e.effects.reduce((t,i)=>i.is($x)?i.value:t,r)}}),_U=Ye.fromClass(class{constructor(r){this.view=r,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(r){var e;let t=r.state.field(Tn);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(r.startState.field(Tn)!=t||r.docChanged||r.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:r}=this,e=r.state.field(Tn),t=e!=null&&r.coordsAtPos(e);if(!t)return null;let i=r.scrollDOM.getBoundingClientRect();return{left:t.left-i.left+r.scrollDOM.scrollLeft*r.scaleX,top:t.top-i.top+r.scrollDOM.scrollTop*r.scaleY,height:t.bottom-t.top}}drawCursor(r){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;r?(this.cursor.style.left=r.left/e+"px",this.cursor.style.top=r.top/t+"px",this.cursor.style.height=r.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(r){this.view.state.field(Tn)!=r&&this.view.dispatch({effects:$x.of(r)})}},{eventObservers:{dragover(r){this.setDropPos(this.view.posAtCoords({x:r.clientX,y:r.clientY}))},dragleave(r){(r.target==this.view.contentDOM||!this.view.contentDOM.contains(r.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function qx(){return[Tn,_U]}h(qx,"dropCursor");var oA=/x/.unicode!=null?"gu":"g";var Cn="-10000px",Lu=class Lu{constructor(e,t,i,n){this.facet=t,this.createTooltipView=i,this.removeTooltipView=n,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=i(o,s))}update(e,t){var i;let n=e.state.facet(this.facet),s=n.filter(a=>a);if(n===this.input){for(let a of this.tooltipViews)a.update&&a.update(e);return!1}let o=[],l=t?[]:null;for(let a=0;a<s.length;a++){let c=s[a],f=-1;if(c){for(let u=0;u<this.tooltips.length;u++){let d=this.tooltips[u];d&&d.create==c.create&&(f=u)}if(f<0)o[a]=this.createTooltipView(c,a?o[a-1]:null),l&&(l[a]=!!c.above);else{let u=o[a]=this.tooltipViews[f];l&&(l[a]=t[f]),u.update&&u.update(e)}}}for(let a of this.tooltipViews)o.indexOf(a)<0&&(this.removeTooltipView(a),(i=a.destroy)===null||i===void 0||i.call(a));return t&&(l.forEach((a,c)=>t[c]=a),t.length=l.length),this.input=n,this.tooltips=s,this.tooltipViews=o,!0}};h(Lu,"TooltipViewManager");var xl=Lu;function TU(r){let{win:e}=r;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}h(TU,"windowSpace");var af=z.define({combine:h(r=>{var e,t,i;return{position:V.ios?"absolute":((e=r.find(n=>n.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=r.find(n=>n.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=r.find(n=>n.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||TU}},"combine")}),Av=new WeakMap,Vx=Ye.fromClass(class{constructor(r){this.view=r,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=r.state.facet(af);this.position=e.position,this.parent=e.parent,this.classes=r.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new xl(r,iu,(t,i)=>this.createTooltip(t,i),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),r.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let r of this.manager.tooltipViews)this.intersectionObserver.observe(r.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(r){r.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(r,this.above);e&&this.observeIntersection();let t=e||r.geometryChanged,i=r.state.facet(af);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let n of this.manager.tooltipViews)n.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let n of this.manager.tooltipViews)this.container.appendChild(n.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(r,e){let t=r.create(this.view),i=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),r.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let n=document.createElement("div");n.className="cm-tooltip-arrow",t.dom.appendChild(n)}return t.dom.style.position=this.position,t.dom.style.top=Cn,t.dom.style.left="0px",this.container.insertBefore(t.dom,i),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var r,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(r=i.destroy)===null||r===void 0||r.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let r=this.view.dom.getBoundingClientRect(),e=1,t=1,i=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:n}=this.manager.tooltipViews[0];if(V.gecko)i=n.offsetParent!=this.container.ownerDocument.body;else if(n.style.top==Cn&&n.style.left=="0px"){let s=n.getBoundingClientRect();i=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}}if(i||this.position=="absolute")if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);return{editor:r,parent:this.parent?this.container.getBoundingClientRect():r,pos:this.manager.tooltips.map((n,s)=>{let o=this.manager.tooltipViews[s];return o.getCoords?o.getCoords(n.pos):this.view.coordsAtPos(n.pos)}),size:this.manager.tooltipViews.map(({dom:n})=>n.getBoundingClientRect()),space:this.view.state.facet(af).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:i}}writeMeasure(r){var e;if(r.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{editor:t,space:i,scaleX:n,scaleY:s}=r,o=[];for(let l=0;l<this.manager.tooltips.length;l++){let a=this.manager.tooltips[l],c=this.manager.tooltipViews[l],{dom:f}=c,u=r.pos[l],d=r.size[l];if(!u||u.bottom<=Math.max(t.top,i.top)||u.top>=Math.min(t.bottom,i.bottom)||u.right<Math.max(t.left,i.left)-.1||u.left>Math.min(t.right,i.right)+.1){f.style.top=Cn;continue}let p=a.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,m=p?7:0,y=d.right-d.left,g=(e=Av.get(c))!==null&&e!==void 0?e:d.bottom-d.top,b=c.offset||NU,v=this.view.textDirection==Se.LTR,w=d.width>i.right-i.left?v?i.left:i.right-d.width:v?Math.max(i.left,Math.min(u.left-(p?14:0)+b.x,i.right-y)):Math.min(Math.max(i.left,u.left-y+(p?14:0)-b.x),i.right-y),B=this.above[l];!a.strictSide&&(B?u.top-(d.bottom-d.top)-b.y<i.top:u.bottom+(d.bottom-d.top)+b.y>i.bottom)&&B==i.bottom-u.bottom>u.top-i.top&&(B=this.above[l]=!B);let E=(B?u.top-i.top:i.bottom-u.bottom)-m;if(E<g&&c.resize!==!1){if(E<this.view.defaultLineHeight){f.style.top=Cn;continue}Av.set(c,g),f.style.height=(g=E)/s+"px"}else f.style.height&&(f.style.height="");let T=B?u.top-g-m-b.y:u.bottom+m+b.y,_=w+y;if(c.overlap!==!0)for(let W of o)W.left<_&&W.right>w&&W.top<T+g&&W.bottom>T&&(T=B?W.top-g-2-m:W.bottom+m+2);if(this.position=="absolute"?(f.style.top=(T-r.parent.top)/s+"px",f.style.left=(w-r.parent.left)/n+"px"):(f.style.top=T/s+"px",f.style.left=w/n+"px"),p){let W=u.left+(v?b.x:-b.x)-(w+14-7);p.style.left=W/n+"px"}c.overlap!==!0&&o.push({left:w,top:T,right:_,bottom:T+g}),f.classList.toggle("cm-tooltip-above",B),f.classList.toggle("cm-tooltip-below",!B),c.positioned&&c.positioned(r.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let r of this.manager.tooltipViews)r.dom.style.top=Cn}},{eventObservers:{scroll(){this.maybeMeasure()}}}),DU=te.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"".concat(7*2,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),NU={x:0,y:0},iu=z.define({enables:[Vx,DU]}),kl=z.define({combine:h(r=>r.reduce((e,t)=>e.concat(t),[]),"combine")}),Rl=class Rl{static create(e){return new Rl(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new xl(e,kl,(t,i)=>this.createHostedView(t,i),t=>t.dom.remove())}createHostedView(e,t){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let i of this.manager.tooltipViews){let n=i[e];if(n!==void 0){if(t===void 0)t=n;else if(t!==n)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}};h(Rl,"HoverTooltipHost");var wl=Rl,RU=iu.compute([kl],r=>{let e=r.facet(kl);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var i;return(i=t.end)!==null&&i!==void 0?i:t.pos})),create:wl.create,above:e[0].above,arrow:e.some(t=>t.arrow)}}),Uu=class Uu{constructor(e,t,i,n,s){this.view=e,this.source=t,this.field=i,this.setHover=n,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,i=e.docView.nearest(t.target);if(!i)return;let n,s=1;if(i instanceof Xn)n=i.posAtStart;else{if(n=e.posAtCoords(t),n==null)return;let l=e.coordsAtPos(n);if(!l||t.y<l.top||t.y>l.bottom||t.x<l.left-e.defaultCharacterWidth||t.x>l.right+e.defaultCharacterWidth)return;let a=e.bidiSpans(e.state.doc.lineAt(n)).find(f=>f.from<=n&&f.to>=n),c=a&&a.dir==Se.RTL?-1:1;s=t.x<l.left?-c:c}let o=this.source(e,n,s);if(o!=null&&o.then){let l=this.pending={pos:n};o.then(a=>{this.pending==l&&(this.pending=null,a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])}))},a=>tt(e.state,a,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(Vx),t=e?e.manager.tooltips.findIndex(i=>i.create==wl.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:n,tooltip:s}=this;if(n.length&&s&&!AU(s.dom,e)||this.pending){let{pos:o}=n[0]||this.pending,l=(i=(t=n[0])===null||t===void 0?void 0:t.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!MU(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=h(i=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})},"watch");e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}};h(Uu,"HoverPlugin");var zf=Uu,rl=4;function AU(r,e){let{left:t,right:i,top:n,bottom:s}=r.getBoundingClientRect(),o;if(o=r.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();n=Math.min(l.top,n),s=Math.max(l.bottom,s)}return e.clientX>=t-rl&&e.clientX<=i+rl&&e.clientY>=n-rl&&e.clientY<=s+rl}h(AU,"isInTooltip");function MU(r,e,t,i,n,s){let o=r.scrollDOM.getBoundingClientRect(),l=r.documentTop+r.documentPadding.top+r.contentHeight;if(o.left>i||o.right<i||o.top>n||Math.min(o.bottom,l)<n)return!1;let a=r.posAtCoords({x:i,y:n},!1);return a>=e&&a<=t}h(MU,"isOverRange");function zx(r,e={}){let t=pe.define(),i=Pe.define({create(){return[]},update(n,s){if(n.length&&(e.hideOnChange&&(s.docChanged||s.selection)?n=[]:e.hideOn&&(n=n.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let l of n){let a=s.changes.mapPos(l.pos,-1,ze.TrackDel);if(a!=null){let c=Object.assign(Object.create(null),l);c.pos=a,c.end!=null&&(c.end=s.changes.mapPos(c.end)),o.push(c)}}n=o}for(let o of s.effects)o.is(t)&&(n=o.value),o.is(PU)&&(n=[]);return n},provide:h(n=>kl.from(n),"provide")});return{active:i,extension:[i,Ye.define(n=>new zf(n,r,i,t,e.hoverTime||300)),RU]}}h(zx,"hoverTooltip");var PU=pe.define();var Mv=z.define({combine(r){let e,t;for(let i of r)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});var IU=Ye.fromClass(class{constructor(r){this.input=r.state.facet(Sl),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(r));let e=r.state.facet(Mv);this.top=new Ar(r,!0,e.topContainer),this.bottom=new Ar(r,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(r){let e=r.state.facet(Mv);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ar(r.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ar(r.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=r.state.facet(Sl);if(t!=this.input){let i=t.filter(a=>a),n=[],s=[],o=[],l=[];for(let a of i){let c=this.specs.indexOf(a),f;c<0?(f=a(r.view),l.push(f)):(f=this.panels[c],f.update&&f.update(r)),n.push(f),(f.top?s:o).push(f)}this.specs=i,this.panels=n,this.top.sync(s),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(r)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:h(r=>te.scrollMargins.of(e=>{let t=e.plugin(r);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}}),"provide")}),Ou=class Ou{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Pv(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Pv(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}};h(Ou,"PanelGroup");var Ar=Ou;function Pv(r){let e=r.nextSibling;return r.remove(),e}h(Pv,"rm");var Sl=z.define({enables:IU}),_u=class _u extends ni{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};h(_u,"GutterMarker");var xt=_u;xt.prototype.elementClass="";xt.prototype.toDOM=void 0;xt.prototype.mapMode=ze.TrackBefore;xt.prototype.startSide=xt.prototype.endSide=-1;xt.prototype.point=!0;var al=z.define(),$U=z.define();var hl=z.define();var Wf=z.define({combine:h(r=>r.some(e=>e),"combine")});function qU(r){let e=[VU];return r&&r.fixed===!1&&e.push(Wf.of(!0)),e}h(qU,"gutters");var VU=Ye.fromClass(class{constructor(r){this.view=r,this.prevViewport=r.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=r.state.facet(hl).map(e=>new Fl(r,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!r.state.facet(Wf),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),r.scrollDOM.insertBefore(this.dom,r.contentDOM)}update(r){if(this.updateGutters(r)){let e=this.prevViewport,t=r.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}r.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Wf)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=r.view.viewport}syncGutters(r){let e=this.dom.nextSibling;r&&this.dom.remove();let t=be.iter(this.view.state.facet(al),this.view.viewport.from),i=[],n=this.gutters.map(s=>new Hf(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let o=!0;for(let l of s.type)if(l.type==He.Text&&o){jf(t,i,l.from);for(let a of n)a.line(this.view,l,i);o=!1}else if(l.widget)for(let a of n)a.widget(this.view,l)}else if(s.type==He.Text){jf(t,i,s.from);for(let o of n)o.line(this.view,s,i)}else if(s.widget)for(let o of n)o.widget(this.view,s);for(let s of n)s.finish();r&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(r){let e=r.startState.facet(hl),t=r.state.facet(hl),i=r.docChanged||r.heightChanged||r.viewportChanged||!be.eq(r.startState.facet(al),r.state.facet(al),r.view.viewport.from,r.view.viewport.to);if(e==t)for(let n of this.gutters)n.update(r)&&(i=!0);else{i=!0;let n=[];for(let s of t){let o=e.indexOf(s);o<0?n.push(new Fl(this.view,s)):(this.gutters[o].update(r),n.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),n.indexOf(s)<0&&s.destroy();for(let s of n)this.dom.appendChild(s.dom);this.gutters=n}return i}destroy(){for(let r of this.gutters)r.destroy();this.dom.remove()}},{provide:h(r=>te.scrollMargins.of(e=>{let t=e.plugin(r);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==Se.LTR?{left:t.dom.offsetWidth*e.scaleX}:{right:t.dom.offsetWidth*e.scaleX}}),"provide")});function Iv(r){return Array.isArray(r)?r:[r]}h(Iv,"asArray");function jf(r,e,t){for(;r.value&&r.from<=t;)r.from==t&&e.push(r.value),r.next()}h(jf,"advanceCursor");var Tu=class Tu{constructor(e,t,i){this.gutter=e,this.height=i,this.i=0,this.cursor=be.iter(e.markers,t.from)}addElement(e,t,i){let{gutter:n}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==n.elements.length){let l=new Ql(e,o,s,i);n.elements.push(l),n.dom.appendChild(l.dom)}else n.elements[this.i].update(e,o,s,i);this.height=t.bottom,this.i++}line(e,t,i){let n=[];jf(this.cursor,n,t.from),i.length&&(n=n.concat(i));let s=this.gutter.config.lineMarker(e,t,n);s&&n.unshift(s);let o=this.gutter;n.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,n)}widget(e,t){let i=this.gutter.config.widgetMarker(e,t.widget,t),n=i?[i]:null;for(let s of e.state.facet($U)){let o=s(e,t.widget,t);o&&(n||(n=[])).push(o)}n&&this.addElement(e,t,n)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}};h(Tu,"UpdateContext");var Hf=Tu,Du=class Du{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,n=>{let s=n.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let a=s.getBoundingClientRect();o=(a.top+a.bottom)/2}else o=n.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[i](e,l,n)&&n.preventDefault()});this.markers=Iv(t.markers(e)),t.initialSpacer&&(this.spacer=new Ql(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Iv(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let n=this.config.updateSpacer(this.spacer.markers[0],e);n!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[n])}let i=e.view.viewport;return!be.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}};h(Du,"SingleGutterView");var Fl=Du,Nu=class Nu{constructor(e,t,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,n)}update(e,t,i,n){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),zU(this.markers,n)||this.setMarkers(e,n)}setMarkers(e,t){let i="cm-gutterElement",n=this.dom.firstChild;for(let s=0,o=0;;){let l=o,a=s<t.length?t[s++]:null,c=!1;if(a){let f=a.elementClass;f&&(i+=" "+f);for(let u=o;u<this.markers.length;u++)if(this.markers[u].compare(a)){l=u,c=!0;break}}else l=this.markers.length;for(;o<l;){let f=this.markers[o++];if(f.toDOM){f.destroy(n);let u=n.nextSibling;n.remove(),n=u}}if(!a)break;a.toDOM&&(c?n=n.nextSibling:this.dom.insertBefore(a.toDOM(e),n)),c&&o++}this.dom.className=i,this.markers=t}destroy(){this.setMarkers(null,[])}};h(Nu,"GutterElement");var Ql=Nu;function zU(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].compare(e[t]))return!1;return!0}h(zU,"sameMarkers");var WU=z.define(),jU=z.define(),Mr=z.define({combine(r){return si(r,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let i=Object.assign({},e);for(let n in t){let s=i[n],o=t[n];i[n]=s?(l,a,c)=>s(l,a,c)||o(l,a,c):o}return i}})}}),Ru=class Ru extends xt{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};h(Ru,"NumberMarker");var Pn=Ru;function hf(r,e){return r.state.facet(Mr).formatNumber(e,r.state)}h(hf,"formatNumber");var HU=hl.compute([Mr],r=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(WU)},lineMarker(e,t,i){return i.some(n=>n.toDOM)?null:new Pn(hf(e,e.state.doc.lineAt(t.from).number))},widgetMarker:h((e,t,i)=>{for(let n of e.state.facet(jU)){let s=n(e,t,i);if(s)return s}return null},"widgetMarker"),lineMarkerChange:h(e=>e.startState.facet(Mr)!=e.state.facet(Mr),"lineMarkerChange"),initialSpacer(e){return new Pn(hf(e,$v(e.state.doc.lines)))},updateSpacer(e,t){let i=hf(t.view,$v(t.view.state.doc.lines));return i==e.number?e:new Pn(i)},domEventHandlers:r.facet(Mr).domEventHandlers}));function Wx(r={}){return[Mr.of(r),qU(),HU]}h(Wx,"lineNumbers");function $v(r){let e=9;for(;e<r;)e=e*10+9;return e}h($v,"maxLineNumber");var YU=new class extends xt{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},JU=al.compute(["selection"],r=>{let e=[],t=-1;for(let i of r.selection.ranges){let n=r.doc.lineAt(i.head).from;n>t&&(t=n,e.push(YU.range(n)))}return be.of(e)});function jx(){return JU}h(jx,"highlightActiveLineGutter");var GU=0,zu=class zu{constructor(e,t){this.from=e,this.to=t}};h(zu,"Range");var ss=zu,Wu=class Wu{constructor(e={}){this.id=GU++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ie.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}};h(Wu,"NodeProp");var ae=Wu;ae.closedBy=new ae({deserialize:h(r=>r.split(" "),"deserialize")});ae.openedBy=new ae({deserialize:h(r=>r.split(" "),"deserialize")});ae.group=new ae({deserialize:h(r=>r.split(" "),"deserialize")});ae.isolate=new ae({deserialize:h(r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"},"deserialize")});ae.contextHash=new ae({perNode:!0});ae.lookAhead=new ae({perNode:!0});ae.mounted=new ae({perNode:!0});var ju=class ju{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[ae.mounted.id]}};h(ju,"MountedTree");var jr=ju,XU=Object.create(null),Vl=class Vl{constructor(e,t,i,n=0){this.name=e,this.props=t,this.id=i,this.flags=n}static define(e){let t=e.props&&e.props.length?Object.create(null):XU,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),n=new Vl(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(n)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return n}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(ae.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let n of i.split(" "))t[n]=e[i];return i=>{for(let n=i.prop(ae.group),s=-1;s<(n?n.length:0);s++){let o=t[s<0?i.name:n[s]];if(o)return o}}}};h(Vl,"NodeType");var Ie=Vl;Ie.none=new Ie("",Object.create(null),0,8);var zl=class zl{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let n=null;for(let s of e){let o=s(i);o&&(n||(n=Object.assign({},i.props)),n[o[0].id]=o[1])}t.push(n?new Ie(i.name,n,i.id,i.flags):i)}return new zl(t)}};h(zl,"NodeSet");var as=zl,Il=new WeakMap,Hx=new WeakMap,_e;(function(r){r[r.ExcludeBuffers=1]="ExcludeBuffers",r[r.IncludeAnonymous=2]="IncludeAnonymous",r[r.IgnoreMounts=4]="IgnoreMounts",r[r.IgnoreOverlays=8]="IgnoreOverlays"})(_e||(_e={}));var os=class os{constructor(e,t,i,n,s){if(this.type=e,this.children=t,this.positions=i,this.length=n,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=jr.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let n=i.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new fs(this.topNode,e)}cursorAt(e,t=0,i=0){let n=Il.get(this)||this.topNode,s=new fs(n);return s.moveTo(e,t),Il.set(this,s._tree),s}get topNode(){return new Wt(this,0,0,null)}resolve(e,t=0){let i=hs(Il.get(this)||this.topNode,e,t,!1);return Il.set(this,i),i}resolveInner(e,t=0){let i=hs(Hx.get(this)||this.topNode,e,t,!0);return Hx.set(this,i),i}resolveStack(e,t=0){return KU(this,e,t)}iterate(e){let{enter:t,leave:i,from:n=0,to:s=this.length}=e,o=e.mode||0,l=(o&_e.IncludeAnonymous)>0;for(let a=this.cursor(o|_e.IncludeAnonymous);;){let c=!1;if(a.from<=s&&a.to>=n&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;c=!0}for(;c&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Vu(Ie.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,n)=>new os(this.type,t,i,n,this.propValues),e.makeTree||((t,i,n)=>new os(Ie.none,t,i,n)))}static build(e){return ZU(e)}};h(os,"Tree");var Ue=os;Ue.empty=new Ue(Ie.none,[],[],0);var Wl=class Wl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Wl(this.buffer,this.index)}};h(Wl,"FlatBufferCursor");var Au=Wl,jl=class jl{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return Ie.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],n=this.set.types[t],s=n.name;if(/\W/.test(s)&&!n.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,n,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(Gx(s,n,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let n=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=n[l++],s[a++]=n[l++]-i;let c=s[a++]=n[l++]-i;s[a++]=n[l++]-e,o=Math.max(o,c)}return new jl(s,o,this.set)}};h(jl,"TreeBuffer");var Fi=jl;function Gx(r,e,t,i){switch(r){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}h(Gx,"checkSide");function hs(r,e,t,i){for(var n;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to<e);){let o=!i&&r instanceof Wt&&r.index<0?null:r.parent;if(!o)return r;r=o}let s=i?0:_e.IgnoreOverlays;if(i)for(let o=r,l=o.parent;l;o=l,l=o.parent)o instanceof Wt&&o.index<0&&((n=l.enter(e,t,s))===null||n===void 0?void 0:n.from)!=o.from&&(r=l);for(;;){let o=r.enter(e,t,s);if(!o)return r;r=o}}h(hs,"resolveNode");var Hu=class Hu{cursor(e=0){return new fs(this,e)}getChild(e,t=null,i=null){let n=Yx(this,e,t,i);return n.length?n[0]:null}getChildren(e,t=null,i=null){return Yx(this,e,t,i)}resolve(e,t=0){return hs(this,e,t,!1)}resolveInner(e,t=0){return hs(this,e,t,!0)}matchContext(e){return Mu(this,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let n=t.lastChild;if(!n||n.to!=t.to)break;n.type.isError&&n.from==n.to?(i=t,t=n.prevSibling):t=n}return i}get node(){return this}get next(){return this.parent}};h(Hu,"BaseNode");var ql=Hu,Wr=class Wr extends ql{constructor(e,t,i,n){super(),this._tree=e,this.from=t,this.index=i,this._parent=n}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,n,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,c=t>0?l.length:-1;e!=c;e+=t){let f=l[e],u=a[e]+o.from;if(Gx(n,i,u,u+f.length)){if(f instanceof Fi){if(s&_e.ExcludeBuffers)continue;let d=f.findChild(0,f.buffer.length,t,i-u,n);if(d>-1)return new cs(new Pu(o,f,e,u),null,d)}else if(s&_e.IncludeAnonymous||!f.type.isAnonymous||qu(f)){let d;if(!(s&_e.IgnoreMounts)&&(d=jr.get(f))&&!d.overlay)return new Wr(d.tree,u,e,o);let p=new Wr(f,u,e,o);return s&_e.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?f.children.length-1:0,t,i,n)}}}if(s&_e.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let n;if(!(i&_e.IgnoreOverlays)&&(n=jr.get(this._tree))&&n.overlay){let s=e-this.from;for(let{from:o,to:l}of n.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new Wr(n.tree,n.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};h(Wr,"TreeNode");var Wt=Wr;function Yx(r,e,t,i){let n=r.cursor(),s=[];if(!n.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=n.type.is(t),!n.nextSibling())return s}for(;;){if(i!=null&&n.type.is(i))return s;if(n.type.is(e)&&s.push(n.node),!n.nextSibling())return i==null?s:[]}}h(Yx,"getChildren");function Mu(r,e,t=e.length-1){for(let i=r.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}h(Mu,"matchNodeContext");var Yu=class Yu{constructor(e,t,i,n){this.parent=e,this.buffer=t,this.index=i,this.start=n}};h(Yu,"BufferContext");var Pu=Yu,Yi=class Yi extends ql{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new Yi(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&_e.ExcludeBuffers)return null;let{buffer:n}=this.context,s=n.findChild(this.index+4,n.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new Yi(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Yi(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Yi(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,n=this.index+4,s=i.buffer[this.index+3];if(s>n){let o=i.buffer[this.index+1];e.push(i.slice(n,s,o)),t.push(0)}return new Ue(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};h(Yi,"BufferNode");var cs=Yi;function Xx(r){if(!r.length)return null;let e=0,t=r[0];for(let s=1;s<r.length;s++){let o=r[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof Wt&&t.index<0?null:t.parent,n=r.slice();return i?n[e]=i:n.splice(e,1),new Iu(n,t)}h(Xx,"iterStack");var Ju=class Ju{constructor(e,t){this.heads=e,this.node=t}get next(){return Xx(this.heads)}};h(Ju,"StackIterator");var Iu=Ju;function KU(r,e,t){let i=r.resolveInner(e,t),n=null;for(let s=i instanceof Wt?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(n||(n=[i])).push(o.resolve(e,t)),s=o}else{let o=jr.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new Wt(o.tree,o.overlay[0].from+s.from,-1,s);(n||(n=[i])).push(hs(l,e,t,!1))}}return n?Xx(n):i}h(KU,"stackIterator");var Gu=class Gu{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Wt)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:n}=this.buffer;return this.type=t||n.set.types[n.buffer[e]],this.from=i+n.buffer[e+1],this.to=i+n.buffer[e+2],!0}yield(e){return e?e instanceof Wt?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:n}=this.buffer,s=n.findChild(this.index+4,n.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&_e.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&_e.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&_e.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let n=i<0?0:this.stack[i]+4;if(this.index!=n)return this.yieldBuf(t.findChild(n,this.index,-1,0,4))}else{let n=t.buffer[this.index+3];if(n<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(n)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:n}=this;if(n){if(e>0){if(this.index<n.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(n.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=n)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&_e.IncludeAnonymous||l instanceof Fi||!l.type.isAnonymous||qu(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let n=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==n){if(n==this.index)return o;t=o,i=s+1;break e}n=this.stack[--s]}for(let n=i;n<this.stack.length;n++)t=new cs(this.buffer,t,this.stack[n]);return this.bufferNode=new cs(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let n=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(n=!0)}for(;n&&t&&t(this),n=this.type.isAnonymous,!this.nextSibling();){if(!i)return;this.parent(),i--,n=!0}}}matchContext(e){if(!this.buffer)return Mu(this.node,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let n=e.length-1,s=this.stack.length-1;n>=0;s--){if(s<0)return Mu(this.node,e,n);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[n]&&e[n]!=o.name)return!1;n--}}return!0}};h(Gu,"TreeCursor");var fs=Gu;function qu(r){return r.children.some(e=>e instanceof Fi||!e.type.isAnonymous||qu(e))}h(qu,"hasChild");function ZU(r){var e;let{buffer:t,nodeSet:i,maxBufferLength:n=1024,reused:s=[],minRepeatType:o=i.types.length}=r,l=Array.isArray(t)?new Au(t,t.length):t,a=i.types,c=0,f=0;function u(E,T,_,W,H,G){let{id:M,start:J,end:ne,size:I}=l,U=f;for(;I<0;)if(l.next(),I==-1){let he=s[M];_.push(he),W.push(J-E);return}else if(I==-3){c=M;return}else if(I==-4){f=M;return}else throw new RangeError("Unrecognized record size: ".concat(I));let ee=a[M],fe,Fe,Qe=J-E;if(ne-J<=n&&(Fe=g(l.pos-T,H))){let he=new Uint16Array(Fe.size-Fe.skip),ve=l.pos-Fe.size,Le=he.length;for(;l.pos>ve;)Le=b(Fe.start,he,Le);fe=new Fi(he,ne-Fe.start,i),Qe=Fe.start-E}else{let he=l.pos-I;l.next();let ve=[],Le=[],Je=M>=o?M:-1,nt=0,St=ne;for(;l.pos>he;)Je>=0&&l.id==Je&&l.size>=0?(l.end<=St-n&&(m(ve,Le,J,nt,l.end,St,Je,U),nt=ve.length,St=l.end),l.next()):G>2500?d(J,he,ve,Le):u(J,he,ve,Le,Je,G+1);if(Je>=0&&nt>0&&nt<ve.length&&m(ve,Le,J,nt,J,St,Je,U),ve.reverse(),Le.reverse(),Je>-1&&nt>0){let Gt=p(ee);fe=Vu(ee,ve,Le,0,ve.length,0,ne-J,Gt,Gt)}else fe=y(ee,ve,Le,ne-J,U-ne)}_.push(fe),W.push(Qe)}h(u,"takeNode");function d(E,T,_,W){let H=[],G=0,M=-1;for(;l.pos>T;){let{id:J,start:ne,end:I,size:U}=l;if(U>4)l.next();else{if(M>-1&&ne<M)break;M<0&&(M=I-n),H.push(J,ne,I),G++,l.next()}}if(G){let J=new Uint16Array(G*4),ne=H[H.length-2];for(let I=H.length-3,U=0;I>=0;I-=3)J[U++]=H[I],J[U++]=H[I+1]-ne,J[U++]=H[I+2]-ne,J[U++]=U;_.push(new Fi(J,H[2]-ne,i)),W.push(ne-E)}}h(d,"takeFlatNode");function p(E){return(T,_,W)=>{let H=0,G=T.length-1,M,J;if(G>=0&&(M=T[G])instanceof Ue){if(!G&&M.type==E&&M.length==W)return M;(J=M.prop(ae.lookAhead))&&(H=_[G]+M.length+J)}return y(E,T,_,W,H)}}h(p,"makeBalanced");function m(E,T,_,W,H,G,M,J){let ne=[],I=[];for(;E.length>W;)ne.push(E.pop()),I.push(T.pop()+_-H);E.push(y(i.types[M],ne,I,G-H,J-G)),T.push(H-_)}h(m,"makeRepeatLeaf");function y(E,T,_,W,H=0,G){if(c){let M=[ae.contextHash,c];G=G?[M].concat(G):[M]}if(H>25){let M=[ae.lookAhead,H];G=G?[M].concat(G):[M]}return new Ue(E,T,_,W,G)}h(y,"makeTree");function g(E,T){let _=l.fork(),W=0,H=0,G=0,M=_.end-n,J={size:0,start:0,skip:0};e:for(let ne=_.pos-E;_.pos>ne;){let I=_.size;if(_.id==T&&I>=0){J.size=W,J.start=H,J.skip=G,G+=4,W+=4,_.next();continue}let U=_.pos-I;if(I<0||U<ne||_.start<M)break;let ee=_.id>=o?4:0,fe=_.start;for(_.next();_.pos>U;){if(_.size<0)if(_.size==-3)ee+=4;else break e;else _.id>=o&&(ee+=4);_.next()}H=fe,W+=I,G+=ee}return(T<0||W==E)&&(J.size=W,J.start=H,J.skip=G),J.size>4?J:void 0}h(g,"findBufferSize");function b(E,T,_){let{id:W,start:H,end:G,size:M}=l;if(l.next(),M>=0&&W<o){let J=_;if(M>4){let ne=l.pos-(M-4);for(;l.pos>ne;)_=b(E,T,_)}T[--_]=J,T[--_]=G-E,T[--_]=H-E,T[--_]=W}else M==-3?c=W:M==-4&&(f=W);return _}h(b,"copyToBuffer");let v=[],w=[];for(;l.pos>0;)u(r.start||0,r.bufferStart||0,v,w,-1,0);let B=(e=r.length)!==null&&e!==void 0?e:v.length?w[0]+v[0].length:0;return new Ue(a[r.topID],v.reverse(),w.reverse(),B)}h(ZU,"buildTree");var Jx=new WeakMap;function $l(r,e){if(!r.isAnonymous||e instanceof Fi||e.type!=r)return 1;let t=Jx.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=r||!(i instanceof Ue)){t=1;break}t+=$l(r,i)}Jx.set(e,t)}return t}h($l,"nodeSize");function Vu(r,e,t,i,n,s,o,l,a){let c=0;for(let m=i;m<n;m++)c+=$l(r,e[m]);let f=Math.ceil(c*1.5/8),u=[],d=[];function p(m,y,g,b,v){for(let w=g;w<b;){let B=w,E=y[w],T=$l(r,m[w]);for(w++;w<b;w++){let _=$l(r,m[w]);if(T+_>=f)break;T+=_}if(w==B+1){if(T>f){let _=m[B];p(_.children,_.positions,0,_.children.length,y[B]+v);continue}u.push(m[B])}else{let _=y[w-1]+m[w-1].length-E;u.push(Vu(r,m,y,B,w,E,_,null,a))}d.push(E+v-s)}}return h(p,"divide"),p(e,t,i,n,0),(l||a)(u,d,o)}h(Vu,"balanceRange");var ls=class ls{constructor(e,t,i,n,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=n,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let n=[new ls(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&n.push(s);return n}static applyChanges(e,t,i=128){if(!t.length)return e;let n=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,c=0;;l++){let f=l<t.length?t[l]:null,u=f?f.fromA:1e9;if(u-a>=i)for(;o&&o.from<u;){let d=o;if(a>=d.from||u<=d.to||c){let p=Math.max(d.from,a)-c,m=Math.min(d.to,u)-c;d=p>=m?null:new ls(p,m,d.tree,d.offset+c,l>0,!!f)}if(d&&n.push(d),o.to>u)break;o=s<e.length?e[s++]:null}if(!f)break;a=f.toA,c=f.toA-f.toB}return n}};h(ls,"TreeFragment");var Ji=ls,Xu=class Xu{startParse(e,t,i){return typeof e=="string"&&(e=new $u(e)),i=i?i.length?i.map(n=>new ss(n.from,n.to)):[new ss(0,0)]:[new ss(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let n=this.startParse(e,t,i);for(;;){let s=n.advance();if(s)return s}}};h(Xu,"Parser");var Hr=Xu,Ku=class Ku{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};h(Ku,"StringInput");var $u=Ku;var pA=new ae({perNode:!0});var eO=0,ds=class ds{constructor(e,t,i,n){this.name=e,this.set=t,this.base=i,this.modified=n,this.id=eO++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e="".concat(t.name,"(").concat(e,")"));return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof ds&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let n=new ds(i,[],null,[]);if(n.set.push(n),t)for(let s of t.set)n.set.push(s);return n}static defineModifier(e){let t=new Gl(e);return i=>i.modified.indexOf(t)>-1?i:Gl.get(i.base||i,i.modified.concat(t).sort((n,s)=>n.id-s.id))}};h(ds,"Tag");var Tt=ds,tO=0,Xl=class Xl{constructor(e){this.name=e,this.instances=[],this.id=tO++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&iO(t,l.modified));if(i)return i;let n=[],s=new Tt(e.name,n,e,t);for(let l of t)l.instances.push(s);let o=rO(t);for(let l of e.set)if(!l.modified.length)for(let a of o)n.push(Xl.get(l,a));return s}};h(Xl,"Modifier");var Gl=Xl;function iO(r,e){return r.length==e.length&&r.every((t,i)=>t==e[i])}h(iO,"sameArray");function rO(r){let e=[[]];for(let t=0;t<r.length;t++)for(let i=0,n=e.length;i<n;i++)e.push(e[i].concat(r[t]));return e.sort((t,i)=>i.length-t.length)}h(rO,"powerSet");function Kl(r){let e=Object.create(null);for(let t in r){let i=r[t];Array.isArray(i)||(i=[i]);for(let n of t.split(" "))if(n){let s=[],o=2,l=n;for(let u=0;;){if(l=="..."&&u>0&&u+3==n.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!d)throw new RangeError("Invalid path: "+n);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),u+=d[0].length,u==n.length)break;let p=n[u++];if(u==n.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+n);l=n.slice(u)}let a=s.length-1,c=s[a];if(!c)throw new RangeError("Invalid path: "+n);let f=new Yr(i,o,a>0?s.slice(0,a):null);e[c]=f.sort(e[c])}}return e2.add(e)}h(Kl,"styleTags");var e2=new ae,rd=class rd{constructor(e,t,i,n){this.tags=e,this.mode=t,this.context=i,this.next=n}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};h(rd,"Rule");var Yr=rd;Yr.empty=new Yr([],2,null);function id(r,e){let t=Object.create(null);for(let s of r)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:i,all:n=null}=e||{};return{style:h(s=>{let o=n;for(let l of s)for(let a of l.set){let c=t[a.id];if(c){o=o?o+" "+c:c;break}}return o},"style"),scope:i}}h(id,"tagHighlighter");function nO(r,e){let t=null;for(let i of r){let n=i.style(e);n&&(t=t?t+" "+n:n)}return t}h(nO,"highlightTags");function t2(r,e,t,i=0,n=r.length){let s=new ed(i,Array.isArray(e)?e:[e],t);s.highlightRange(r.cursor(),i,n,"",s.highlighters),s.flush(n)}h(t2,"highlightTree");var nd=class nd{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,n,s){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(o)));let c=n,f=sO(e)||Yr.empty,u=nO(s,f.tags);if(u&&(c&&(c+=" "),c+=u,f.mode==1&&(n+=(n?" ":"")+u)),this.startSpan(Math.max(t,l),c),f.opaque)return;let d=e.tree&&e.tree.prop(ae.mounted);if(d&&d.overlay){let p=e.node.enter(d.overlay[0].from+l,1),m=this.highlighters.filter(g=>!g.scope||g.scope(d.tree.type)),y=e.firstChild();for(let g=0,b=l;;g++){let v=g<d.overlay.length?d.overlay[g]:null,w=v?v.from+l:a,B=Math.max(t,b),E=Math.min(i,w);if(B<E&&y)for(;e.from<E&&(this.highlightRange(e,B,E,n,s),this.startSpan(Math.min(E,e.to),c),!(e.to>=w||!e.nextSibling())););if(!v||w>i)break;b=v.to+l,b>t&&(this.highlightRange(p.cursor(),Math.max(t,v.from+l),Math.min(i,b),"",m),this.startSpan(Math.min(i,b),c))}y&&e.parent()}else if(e.firstChild()){d&&(n="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,n,s),this.startSpan(Math.min(i,e.to),c)}while(e.nextSibling());e.parent()}}};h(nd,"HighlightBuilder");var ed=nd;function sO(r){let e=r.type.prop(e2);for(;e&&e.context&&!r.matchContext(e.context);)e=e.next;return e||null}h(sO,"getStyleTags");var P=Tt.define,Hl=P(),Qi=P(),Kx=P(Qi),Zx=P(Qi),Bi=P(),Yl=P(Bi),Zu=P(Bi),Yt=P(),Gi=P(Yt),jt=P(),Ht=P(),td=P(),us=P(td),Jl=P(),O={comment:Hl,lineComment:P(Hl),blockComment:P(Hl),docComment:P(Hl),name:Qi,variableName:P(Qi),typeName:Kx,tagName:P(Kx),propertyName:Zx,attributeName:P(Zx),className:P(Qi),labelName:P(Qi),namespace:P(Qi),macroName:P(Qi),literal:Bi,string:Yl,docString:P(Yl),character:P(Yl),attributeValue:P(Yl),number:Zu,integer:P(Zu),float:P(Zu),bool:P(Bi),regexp:P(Bi),escape:P(Bi),color:P(Bi),url:P(Bi),keyword:jt,self:P(jt),null:P(jt),atom:P(jt),unit:P(jt),modifier:P(jt),operatorKeyword:P(jt),controlKeyword:P(jt),definitionKeyword:P(jt),moduleKeyword:P(jt),operator:Ht,derefOperator:P(Ht),arithmeticOperator:P(Ht),logicOperator:P(Ht),bitwiseOperator:P(Ht),compareOperator:P(Ht),updateOperator:P(Ht),definitionOperator:P(Ht),typeOperator:P(Ht),controlOperator:P(Ht),punctuation:td,separator:P(td),bracket:us,angleBracket:P(us),squareBracket:P(us),paren:P(us),brace:P(us),content:Yt,heading:Gi,heading1:P(Gi),heading2:P(Gi),heading3:P(Gi),heading4:P(Gi),heading5:P(Gi),heading6:P(Gi),contentSeparator:P(Yt),list:P(Yt),quote:P(Yt),emphasis:P(Yt),strong:P(Yt),link:P(Yt),monospace:P(Yt),strikethrough:P(Yt),inserted:P(),deleted:P(),changed:P(),invalid:P(),meta:Jl,documentMeta:P(Jl),annotation:P(Jl),processingInstruction:P(Jl),definition:Tt.defineModifier("definition"),constant:Tt.defineModifier("constant"),function:Tt.defineModifier("function"),standard:Tt.defineModifier("standard"),local:Tt.defineModifier("local"),special:Tt.defineModifier("special")};for(let r in O){let e=O[r];e instanceof Tt&&(e.name=r)}var yA=id([{tag:O.link,class:"tok-link"},{tag:O.heading,class:"tok-heading"},{tag:O.emphasis,class:"tok-emphasis"},{tag:O.strong,class:"tok-strong"},{tag:O.keyword,class:"tok-keyword"},{tag:O.atom,class:"tok-atom"},{tag:O.bool,class:"tok-bool"},{tag:O.url,class:"tok-url"},{tag:O.labelName,class:"tok-labelName"},{tag:O.inserted,class:"tok-inserted"},{tag:O.deleted,class:"tok-deleted"},{tag:O.literal,class:"tok-literal"},{tag:O.string,class:"tok-string"},{tag:O.number,class:"tok-number"},{tag:[O.regexp,O.escape,O.special(O.string)],class:"tok-string2"},{tag:O.variableName,class:"tok-variableName"},{tag:O.local(O.variableName),class:"tok-variableName tok-local"},{tag:O.definition(O.variableName),class:"tok-variableName tok-definition"},{tag:O.special(O.variableName),class:"tok-variableName2"},{tag:O.definition(O.propertyName),class:"tok-propertyName tok-definition"},{tag:O.typeName,class:"tok-typeName"},{tag:O.namespace,class:"tok-namespace"},{tag:O.className,class:"tok-className"},{tag:O.macroName,class:"tok-macroName"},{tag:O.propertyName,class:"tok-propertyName"},{tag:O.operator,class:"tok-operator"},{tag:O.comment,class:"tok-comment"},{tag:O.meta,class:"tok-meta"},{tag:O.invalid,class:"tok-invalid"},{tag:O.punctuation,class:"tok-punctuation"}]);var sd,Jr=new ae;function lO(r){return z.define({combine:r?e=>e.concat(r):void 0})}h(lO,"defineLanguageFacet");var aO=new ae,md=class md{constructor(e,t,i=[],n=""){this.data=e,this.name=n,Be.prototype.hasOwnProperty("tree")||Object.defineProperty(Be.prototype,"tree",{get(){return Xi(this)}}),this.parser=t,this.extension=[Xr.of(this),Be.languageData.of((s,o,l)=>{let a=i2(s,o,l),c=a.type.prop(Jr);if(!c)return[];let f=s.facet(c),u=a.type.prop(aO);if(u){let d=a.resolve(o-a.from,l);for(let p of u)if(p.test(d,s)){let m=s.facet(p.facet);return p.type=="replace"?m:m.concat(f)}}return f})].concat(i)}isActiveAt(e,t,i=-1){return i2(e,t,i).type.prop(Jr)==this.data}findRegions(e){let t=e.facet(Xr);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],n=h((s,o)=>{if(s.prop(Jr)==this.data){i.push({from:o,to:o+s.length});return}let l=s.prop(ae.mounted);if(l){if(l.tree.prop(Jr)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+s.length});return}else if(l.overlay){let a=i.length;if(n(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;a<s.children.length;a++){let c=s.children[a];c instanceof Ue&&n(c,s.positions[a]+o)}},"explore");return n(Xi(e),0),i}get allowsNesting(){return!0}};h(md,"Language");var ct=md;ct.setState=pe.define();function i2(r,e,t){let i=r.facet(Xr),n=Xi(r).topNode;if(!i||i.allowsNesting)for(let s=n;s;s=s.enter(e,t,_e.ExcludeBuffers))s.type.isTop&&(n=s);return n}h(i2,"topNodeAt");var gs=class gs extends ct{constructor(e,t,i){super(e,t,[],i),this.parser=t}static define(e){let t=lO(e.languageData);return new gs(t,e.parser.configure({props:[Jr.add(i=>i.isTop?t:void 0)]}),e.name)}configure(e,t){return new gs(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};h(gs,"LRLanguage");var Zl=gs;function Xi(r){let e=r.field(ct.state,!1);return e?e.tree:Ue.empty}h(Xi,"syntaxTree");var gd=class gd{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e<i||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}};h(gd,"DocInput");var hd=gd,ps=null,bs=class bs{constructor(e,t,i=[],n,s,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new bs(e,t,[],Ue.empty,0,i,[],null)}startParse(){return this.parser.startParse(new hd(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Ue.empty&&this.isDone(t!=null?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let n=Date.now()+e;e=h(()=>Date.now()>n,"until")}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n)if(this.fragments=this.withoutTempSkipped(Ji.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t!=null?t:this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Ji.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ps;ps=this;try{return e()}finally{ps=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=r2(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:n,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((c,f,u,d)=>a.push({fromA:c,toA:f,fromB:u,toB:d})),i=Ji.applyChanges(i,a),n=Ue.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let c of this.skipped){let f=e.mapPos(c.from,1),u=e.mapPos(c.to,-1);f<u&&l.push({from:f,to:u})}}}return new bs(this.parser,t,i,n,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:n,to:s}=this.skipped[i];n<e.to&&s>e.from&&(this.fragments=r2(this.fragments,n,s),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Hr{createParse(t,i,n){let s=n[0].from,o=n[n.length-1].to;return{parsedPos:s,advance(){let a=ps;if(a){for(let c of n)a.tempSkipped.push(c);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new Ue(Ie.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return ps}};h(bs,"ParseContext");var cd=bs;function r2(r,e,t){return Ji.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}h(r2,"cutFragments");var ys=class ys{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new ys(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=cd.create(e.facet(Xr).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new ys(i)}};h(ys,"LanguageState");var vs=ys;ct.state=Pe.define({create:vs.init,update(r,e){for(let t of e.effects)if(t.is(ct.setState))return t.value;return e.startState.facet(Xr)!=e.state.facet(Xr)?vs.init(e.state):r.apply(e)}});var l2=h(r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)},"requestIdle");typeof requestIdleCallback<"u"&&(l2=h(r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)},"requestIdle"));var od=typeof navigator<"u"&&(!((sd=navigator.scheduling)===null||sd===void 0)&&sd.isInputPending)?()=>navigator.scheduling.isInputPending():null,Gr,hO=Ye.fromClass((Gr=class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(ct.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(ct.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=l2(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:n}}=this.view,s=i.field(ct.state);if(s.tree==s.context.tree&&s.context.isDone(n+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!od?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<n&&i.doc.length>n+1e3,a=s.context.work(()=>od&&od()||Date.now()>o,n+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ct.setState.of(new vs(s.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>tt(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},h(Gr,"ParseWorker"),Gr),{eventHandlers:{focus(){this.scheduleWork()}}}),Xr=z.define({combine(r){return r.length?r[0]:null},enables:h(r=>[ct.state,hO,te.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})],"enables")}),bd=class bd{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}};h(bd,"LanguageSupport");var ea=bd;var ia=z.define({combine:h(r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e},"combine")});function a2(r){let e=r.facet(ia);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}h(a2,"getIndentUnit");function h2(r,e){let t="",i=r.tabSize,n=r.facet(ia)[0];if(n==" "){for(;e>=i;)t+=" ",e-=i;n=" "}for(let s=0;s<e;s++)t+=n;return t}h(h2,"indentString");var ta=class ta{constructor(e,t){this.specs=e;let i;function n(l){let a=bt.newName();return(i||(i=Object.create(null)))["."+a]=l,a}h(n,"def");let s=typeof t.all=="string"?t.all:t.all?n(t.all):void 0,o=t.scope;this.scope=o instanceof ct?l=>l.prop(Jr)==o.data:o?l=>l==o:void 0,this.style=id(e.map(l=>({tag:l.tag,class:l.class||n(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=i?new bt(i):null,this.themeType=t.themeType}static define(e,t){return new ta(e,t||{})}};h(ta,"HighlightStyle");var Kr=ta,fd=z.define(),c2=z.define({combine(r){return r.length?[r[0]]:null}});function ld(r){let e=r.facet(fd);return e.length?e:r.facet(c2)}h(ld,"getHighlighters");function f2(r,e){let t=[cO],i;return r instanceof Kr&&(r.module&&t.push(te.styleModule.of(r.module)),i=r.themeType),e!=null&&e.fallback?t.push(c2.of(r)):i?t.push(fd.computeN([te.darkTheme],n=>n.facet(te.darkTheme)==(i=="dark")?[r]:[])):t.push(fd.of(r)),t}h(f2,"syntaxHighlighting");var yd=class yd{constructor(e){this.markCache=Object.create(null),this.tree=Xi(e.state),this.decorations=this.buildDeco(e,ld(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Xi(e.state),i=ld(e.state),n=i!=ld(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!n&&t.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||n)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return ce.none;let i=new $i;for(let{from:n,to:s}of e.visibleRanges)t2(this.tree,t,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=ce.mark({class:a})))},n,s);return i.finish()}};h(yd,"TreeHighlighter");var ud=yd,cO=Tr.high(Ye.fromClass(ud,{decorations:h(r=>r.decorations,"decorations")})),BA=Kr.define([{tag:O.meta,color:"#404740"},{tag:O.link,textDecoration:"underline"},{tag:O.heading,textDecoration:"underline",fontWeight:"bold"},{tag:O.emphasis,fontStyle:"italic"},{tag:O.strong,fontWeight:"bold"},{tag:O.strikethrough,textDecoration:"line-through"},{tag:O.keyword,color:"#708"},{tag:[O.atom,O.bool,O.url,O.contentSeparator,O.labelName],color:"#219"},{tag:[O.literal,O.inserted],color:"#164"},{tag:[O.string,O.deleted],color:"#a11"},{tag:[O.regexp,O.escape,O.special(O.string)],color:"#e40"},{tag:O.definition(O.variableName),color:"#00f"},{tag:O.local(O.variableName),color:"#30a"},{tag:[O.typeName,O.namespace],color:"#085"},{tag:O.className,color:"#167"},{tag:[O.special(O.variableName),O.macroName],color:"#256"},{tag:O.definition(O.propertyName),color:"#00c"},{tag:O.comment,color:"#940"},{tag:O.invalid,color:"#f00"}]),fO=te.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),u2=1e4,d2="()[]{}",p2=z.define({combine(r){return si(r,{afterCursor:!0,brackets:d2,maxScanDistance:u2,renderMatch:pO})}}),uO=ce.mark({class:"cm-matchingBracket"}),dO=ce.mark({class:"cm-nonmatchingBracket"});function pO(r){let e=[],t=r.matched?uO:dO;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}h(pO,"defaultRenderMatch");var mO=Pe.define({create(){return ce.none},update(r,e){if(!e.docChanged&&!e.selection)return r;let t=[],i=e.state.facet(p2);for(let n of e.state.selection.ranges){if(!n.empty)continue;let s=ms(e.state,n.head,-1,i)||n.head>0&&ms(e.state,n.head-1,1,i)||i.afterCursor&&(ms(e.state,n.head,1,i)||n.head<e.state.doc.length&&ms(e.state,n.head+1,-1,i));s&&(t=t.concat(i.renderMatch(s,e.state)))}return ce.set(t,!0)},provide:h(r=>te.decorations.from(r),"provide")}),gO=[mO,fO];function m2(r={}){return[p2.of(r),gO]}h(m2,"bracketMatching");var bO=new ae;function dd(r,e,t){let i=r.prop(e<0?ae.openedBy:ae.closedBy);if(i)return i;if(r.name.length==1){let n=t.indexOf(r.name);if(n>-1&&n%2==(e<0?1:0))return[t[n+e]]}return null}h(dd,"matchingNodes");function pd(r){let e=r.type.prop(bO);return e?e(r.node):r}h(pd,"findHandle");function ms(r,e,t,i={}){let n=i.maxScanDistance||u2,s=i.brackets||d2,o=Xi(r),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let c=dd(a.type,t,s);if(c&&a.from<a.to){let f=pd(a);if(f&&(t>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return yO(r,e,t,a,f,c,s)}}return vO(r,e,t,o,l.type,n,s)}h(ms,"matchBrackets");function yO(r,e,t,i,n,s,o){let l=i.parent,a={from:n.from,to:n.to},c=0,f=l==null?void 0:l.cursor();if(f&&(t<0?f.childBefore(i.from):f.childAfter(i.to)))do if(t<0?f.to<=i.from:f.from>=i.to){if(c==0&&s.indexOf(f.type.name)>-1&&f.from<f.to){let u=pd(f);return{start:a,end:u?{from:u.from,to:u.to}:void 0,matched:!0}}else if(dd(f.type,t,o))c++;else if(dd(f.type,-t,o)){if(c==0){let u=pd(f);return{start:a,end:u&&u.from<u.to?{from:u.from,to:u.to}:void 0,matched:!1}}c--}}while(t<0?f.prevSibling():f.nextSibling());return{start:a,matched:!1}}h(yO,"matchMarkedBrackets");function vO(r,e,t,i,n,s,o){let l=t<0?r.sliceDoc(e-1,e):r.sliceDoc(e,e+1),a=o.indexOf(l);if(a<0||a%2==0!=t>0)return null;let c={from:t<0?e-1:e,to:t>0?e+1:e},f=r.doc.iterRange(e,t>0?r.doc.length:0),u=0;for(let d=0;!f.next().done&&d<=s;){let p=f.value;t<0&&(d+=p.length);let m=e+d*t;for(let y=t>0?0:p.length-1,g=t>0?p.length:-1;y!=g;y+=t){let b=o.indexOf(p[y]);if(!(b<0||i.resolveInner(m+y,1).type!=n))if(b%2==0==t>0)u++;else{if(u==1)return{start:c,end:{from:m+y,to:m+y+1},matched:b>>1==a>>1};u--}}t>0&&(d+=p.length)}return f.done?{start:c,matched:!1}:null}h(vO,"matchPlainBrackets");var xO=Object.create(null),n2=[Ie.none];var s2=[],o2=Object.create(null),kO=Object.create(null);for(let[r,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])kO[r]=wO(xO,e);function ad(r,e){s2.indexOf(r)>-1||(s2.push(r),console.warn(e))}h(ad,"warnForPart");function wO(r,e){let t=[];for(let l of e.split(" ")){let a=[];for(let c of l.split(".")){let f=r[c]||O[c];f?typeof f=="function"?a.length?a=a.map(f):ad(c,"Modifier ".concat(c," used at start of tag")):a.length?ad(c,"Tag ".concat(c," used as modifier")):a=Array.isArray(f)?f:[f]:ad(c,"Unknown highlighting tag ".concat(c))}for(let c of a)t.push(c)}if(!t.length)return 0;let i=e.replace(/ /g,"_"),n=i+" "+t.map(l=>l.id),s=o2[n];if(s)return s.id;let o=o2[n]=Ie.define({id:n2.length,name:i,props:[Kl({[i]:t})]});return n2.push(o),o.id}h(wO,"createTokenType");var EA={rtl:ce.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:Se.RTL}),ltr:ce.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:Se.LTR}),auto:ce.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var xd=gt.define(),SO=gt.define(),FO=z.define(),g2=z.define({combine(r){return si(r,{minDepth:100,newGroupDelay:500,joinToEvent:h((e,t)=>t,"joinToEvent")},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:h((e,t)=>(i,n)=>e(i,n)||t(i,n),"joinToEvent")})}}),b2=Pe.define({create(){return er.empty},update(r,e){let t=e.state.facet(g2),i=e.annotation(xd);if(i){let a=Dt.fromTransaction(e,i.selection),c=i.side,f=c==0?r.undone:r.done;return a?f=ra(f,f.length,t.minDepth,a):f=k2(f,e.startState.selection),new er(c==0?i.rest:f,c==0?f:i.rest)}let n=e.annotation(SO);if((n=="full"||n=="before")&&(r=r.isolate()),e.annotation(Te.addToHistory)===!1)return e.changes.empty?r:r.addMapping(e.changes.desc);let s=Dt.fromTransaction(e),o=e.annotation(Te.time),l=e.annotation(Te.userEvent);return s?r=r.addChanges(s,o,l,t,e):e.selection&&(r=r.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(n=="full"||n=="after")&&(r=r.isolate()),r},toJSON(r){return{done:r.done.map(e=>e.toJSON()),undone:r.undone.map(e=>e.toJSON())}},fromJSON(r){return new er(r.done.map(Dt.fromJSON),r.undone.map(Dt.fromJSON))}});function y2(r={}){return[b2,g2.of(r),te.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?v2:e.inputType=="historyRedo"?kd:null;return i?(e.preventDefault(),i(t)):!1}})]}h(y2,"history");function na(r,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let n=t.field(b2,!1);if(!n)return!1;let s=n.pop(r,t,e);return s?(i(s),!0):!1}}h(na,"cmd");var v2=na(0,!1),kd=na(1,!1),QO=na(0,!0),BO=na(1,!0);var Ki=class Ki{constructor(e,t,i,n,s){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(e){return new Ki(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(n=>n.toJSON())}}static fromJSON(e){return new Ki(e.changes&&We.fromJSON(e.changes),[],e.mapped&&ri.fromJSON(e.mapped),e.startSelection&&Z.fromJSON(e.startSelection),e.selectionsAfter.map(Z.fromJSON))}static fromTransaction(e,t){let i=kt;for(let n of e.startState.facet(FO)){let s=n(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new Ki(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,kt)}static selection(e){return new Ki(void 0,kt,void 0,void 0,e)}};h(Ki,"HistEvent");var Dt=Ki;function ra(r,e,t,i){let n=e+1>t+20?e-t-1:0,s=r.slice(n,e);return s.push(i),s}h(ra,"updateBranch");function EO(r,e){let t=[],i=!1;return r.iterChangedRanges((n,s)=>t.push(n,s)),e.iterChangedRanges((n,s,o,l)=>{for(let a=0;a<t.length;){let c=t[a++],f=t[a++];l>=c&&o<=f&&(i=!0)}}),i}h(EO,"isAdjacent");function CO(r,e){return r.ranges.length==e.ranges.length&&r.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}h(CO,"eqSelectionShape");function x2(r,e){return r.length?e.length?r.concat(e):r:e}h(x2,"conc");var kt=[],LO=200;function k2(r,e){if(r.length){let t=r[r.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-LO));return i.length&&i[i.length-1].eq(e)?r:(i.push(e),ra(r,r.length-1,1e9,t.setSelAfter(i)))}else return[Dt.selection([e])]}h(k2,"addSelection");function UO(r){let e=r[r.length-1],t=r.slice();return t[r.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}h(UO,"popSelection");function vd(r,e){if(!r.length)return r;let t=r.length,i=kt;for(;t;){let n=OO(r[t-1],e,i);if(n.changes&&!n.changes.empty||n.effects.length){let s=r.slice(0,t);return s[t-1]=n,s}else e=n.mapped,t--,i=n.selectionsAfter}return i.length?[Dt.selection(i)]:kt}h(vd,"addMappingToBranch");function OO(r,e,t){let i=x2(r.selectionsAfter.length?r.selectionsAfter.map(l=>l.map(e)):kt,t);if(!r.changes)return Dt.selection(i);let n=r.changes.map(e),s=e.mapDesc(r.changes,!0),o=r.mapped?r.mapped.composeDesc(s):s;return new Dt(n,pe.mapEffects(r.effects,e),o,r.startSelection.map(s),i)}h(OO,"mapEvent");var _O=/^(input\.type|delete)($|\.)/,Zi=class Zi{constructor(e,t,i=0,n=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new Zi(this.done,this.undone):this}addChanges(e,t,i,n,s){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||_O.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime<n.newGroupDelay&&n.joinToEvent(s,EO(l.changes,e.changes))||i=="input.type.compose")?o=ra(o,o.length-1,n.minDepth,new Dt(e.changes.compose(l.changes),x2(pe.mapEffects(e.effects,l.changes),l.effects),l.mapped,l.startSelection,kt)):o=ra(o,o.length,n.minDepth,e),new Zi(o,kt,t,i)}addSelection(e,t,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:kt;return s.length>0&&t-this.prevTime<n&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&CO(s[s.length-1],e)?this:new Zi(k2(this.done,e),this.undone,t,i)}addMapping(e){return new Zi(vd(this.done,e),vd(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,i){let n=e==0?this.done:this.undone;if(n.length==0)return null;let s=n[n.length-1],o=s.selectionsAfter[0]||t.selection;if(i&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:xd.of({side:e,rest:UO(n),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let l=n.length==1?kt:n.slice(0,n.length-1);return s.mapped&&(l=vd(l,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:xd.of({side:e,rest:l,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}};h(Zi,"HistoryState");var er=Zi;er.empty=new er(kt,kt);var w2=[{key:"Mod-z",run:v2,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:kd,preventDefault:!0},{linux:"Ctrl-Shift-z",run:kd,preventDefault:!0},{key:"Mod-u",run:QO,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:BO,preventDefault:!0}];var AA=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function S2(r,e){let t=-1;return r.changeByRange(i=>{let n=[];for(let o=i.from;o<=i.to;){let l=r.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,n,i),t=l.number),o=l.to+1}let s=r.changes(n);return{changes:n,range:Z.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}h(S2,"changeBySelectedLine");var TO=h(({state:r,dispatch:e})=>r.readOnly?!1:(e(r.update(S2(r,(t,i)=>{i.push({from:t.from,insert:r.facet(ia)})}),{userEvent:"input.indent"})),!0),"indentMore"),DO=h(({state:r,dispatch:e})=>r.readOnly?!1:(e(r.update(S2(r,(t,i)=>{let n=/^\s*/.exec(t.text)[0];if(!n)return;let s=Ho(n,r.tabSize),o=0,l=h2(r,Math.max(0,s-a2(r)));for(;o<n.length&&o<l.length&&n.charCodeAt(o)==l.charCodeAt(o);)o++;i.push({from:t.from+o,to:t.from+n.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),"indentLess");var F2={key:"Tab",run:TO,shift:DO};function wt(){var r=arguments[0];typeof r=="string"&&(r=document.createElement(r));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var n=t[i];typeof n=="string"?r.setAttribute(i,n):n!=null&&(r[i]=n)}e++}for(;e<arguments.length;e++)Q2(r,arguments[e]);return r}h(wt,"crelt");function Q2(r,e){if(typeof e=="string")r.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)r.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)Q2(r,e[t]);else throw new RangeError("Unsupported child node: "+e)}h(Q2,"add");var Qd=class Qd{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}};h(Qd,"SelectedDiagnostic");var wd=Qd,aa=class aa{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let n=e,s=i.facet(Jt).markerFilter;s&&(n=s(n,i));let o=ce.set(n.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?ce.widget({widget:new Sd(l),diagnostic:l}).range(l.from):ce.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity+(l.markClass?" "+l.markClass:"")},diagnostic:l}).range(l.from,l.to)),!0);return new aa(o,t,Zr(o))}};h(aa,"LintState");var tr=aa;function Zr(r,e=null,t=0){let i=null;return r.between(t,1e9,(n,s,{spec:o})=>{if(!(e&&o.diagnostic!=e))return i=new wd(n,s,o.diagnostic),!1}),i}h(Zr,"findDiagnostic");function NO(r,e){let t=e.pos,i=e.end||t,n=r.state.facet(Jt).hideOn(r,t,i);if(n!=null)return n;let s=r.startState.doc.lineAt(e.pos);return!!(r.effects.some(o=>o.is(Fd))||r.changes.touchesRange(s.from,Math.max(s.to,i)))}h(NO,"hideTooltip");function RO(r,e){return r.field(Nt,!1)?e:e.concat(pe.appendConfig.of(_2))}h(RO,"maybeEnableLint");function AO(r,e){return{effects:RO(r,[Fd.of(e)])}}h(AO,"setDiagnostics");var Fd=pe.define(),E2=pe.define(),C2=pe.define(),Nt=Pe.define({create(){return new tr(ce.none,null,null)},update(r,e){if(e.docChanged&&r.diagnostics.size){let t=r.diagnostics.map(e.changes),i=null,n=r.panel;if(r.selected){let s=e.changes.mapPos(r.selected.from,1);i=Zr(t,r.selected.diagnostic,s)||Zr(t,null,s)}!t.size&&n&&e.state.facet(Jt).autoPanel&&(n=null),r=new tr(t,n,i)}for(let t of e.effects)if(t.is(Fd)){let i=e.state.facet(Jt).autoPanel?t.value.length?la.open:null:r.panel;r=tr.init(t.value,i,e.state)}else t.is(E2)?r=new tr(r.diagnostics,t.value?la.open:null,r.selected):t.is(C2)&&(r=new tr(r.diagnostics,r.panel,t.value));return r},provide:h(r=>[Sl.from(r,e=>e.panel),te.decorations.from(r,e=>e.diagnostics)],"provide")});var MO=ce.mark({class:"cm-lintRange cm-lintRange-active"});function PO(r,e,t){let{diagnostics:i}=r.state.field(Nt),n=[],s=2e8,o=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(a,c,{spec:f})=>{e>=a&&e<=c&&(a==c||(e>a||t>0)&&(e<c||t<0))&&(n.push(f.diagnostic),s=Math.min(a,s),o=Math.max(c,o))});let l=r.state.facet(Jt).tooltipFilter;return l&&(n=l(n,r.state)),n.length?{pos:s,end:o,above:r.state.doc.lineAt(s).to<o,create(){return{dom:IO(r,n)}}}:null}h(PO,"lintTooltip");function IO(r,e){return wt("ul",{class:"cm-tooltip-lint"},e.map(t=>O2(r,t,!1)))}h(IO,"diagnosticsTooltip");var B2=h(r=>{let e=r.state.field(Nt,!1);return!e||!e.panel?!1:(r.dispatch({effects:E2.of(!1)}),!0)},"closeLintPanel");var $O=Ye.fromClass(class{constructor(r){this.view=r,this.timeout=-1,this.set=!0;let{delay:e}=r.state.facet(Jt);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let r=Date.now();if(r<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-r);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(Jt);t.length&&Promise.all(t.map(i=>Promise.resolve(i(this.view)))).then(i=>{let n=i.reduce((s,o)=>s.concat(o));this.view.state.doc==e.doc&&this.view.dispatch(AO(this.view.state,n))},i=>{tt(this.view.state,i)})}}update(r){let e=r.state.facet(Jt);(r.docChanged||e!=r.startState.facet(Jt)||e.needsRefresh&&e.needsRefresh(r))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),Jt=z.define({combine(r){return Object.assign({sources:r.map(e=>e.source).filter(e=>e!=null)},si(r.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:h(()=>null,"hideOn")},{needsRefresh:h((e,t)=>e?t?i=>e(i)||t(i):e:t,"needsRefresh")}))}});function L2(r,e={}){return[Jt.of({source:r,config:e}),$O,_2]}h(L2,"linter");function U2(r){let e=[];if(r)e:for(let{name:t}of r){for(let i=0;i<t.length;i++){let n=t[i];if(/[a-zA-Z]/.test(n)&&!e.some(s=>s.toLowerCase()==n.toLowerCase())){e.push(n);continue e}}e.push("")}return e}h(U2,"assignKeys");function O2(r,e,t){var i;let n=t?U2(e.actions):[];return wt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},wt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(r):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,o)=>{let l=!1,a=h(d=>{if(d.preventDefault(),l)return;l=!0;let p=Zr(r.state.field(Nt).diagnostics,e);p&&s.apply(r,p.from,p.to)},"click"),{name:c}=s,f=n[o]?c.indexOf(n[o]):-1,u=f<0?c:[c.slice(0,f),wt("u",c.slice(f,f+1)),c.slice(f+1)];return wt("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":" Action: ".concat(c).concat(f<0?"":' (access key "'.concat(n[o],')"'),".")},u)}),e.source&&wt("div",{class:"cm-diagnosticSource"},e.source))}h(O2,"renderDiagnostic");var Bd=class Bd extends ki{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return wt("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}};h(Bd,"DiagnosticWidget");var Sd=Bd,Ed=class Ed{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=O2(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}};h(Ed,"PanelItem");var oa=Ed,ha=class ha{constructor(e){this.view=e,this.items=[];let t=h(n=>{if(n.keyCode==27)B2(this.view),this.view.focus();else if(n.keyCode==38||n.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(n.keyCode==40||n.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(n.keyCode==36)this.moveSelection(0);else if(n.keyCode==35)this.moveSelection(this.items.length-1);else if(n.keyCode==13)this.view.focus();else if(n.keyCode>=65&&n.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=U2(s.actions);for(let l=0;l<o.length;l++)if(o[l].toUpperCase().charCodeAt(0)==n.keyCode){let a=Zr(this.view.state.field(Nt).diagnostics,s);a&&s.actions[l].apply(e,a.from,a.to)}}else return;n.preventDefault()},"onkeydown"),i=h(n=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(n.target)&&this.moveSelection(s)},"onclick");this.list=wt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:i}),this.dom=wt("div",{class:"cm-panel-lint"},this.list,wt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:h(()=>B2(this.view),"onclick")},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(Nt).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Nt),i=0,n=!1,s=null;for(e.between(0,this.view.state.doc.length,(o,l,{spec:a})=>{let c=-1,f;for(let u=i;u<this.items.length;u++)if(this.items[u].diagnostic==a.diagnostic){c=u;break}c<0?(f=new oa(this.view,a.diagnostic),this.items.splice(i,0,f),n=!0):(f=this.items[c],c>i&&(this.items.splice(i,c-i),n=!0)),t&&f.diagnostic==t.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),s=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),i++});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)n=!0,this.items.pop();this.items.length==0&&(this.items.push(new oa(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),n=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:h(()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),"read"),write:h(({sel:o,panel:l})=>{let a=l.height/this.list.offsetHeight;o.top<l.top?this.list.scrollTop-=(l.top-o.top)/a:o.bottom>l.bottom&&(this.list.scrollTop+=(o.bottom-l.bottom)/a)},"write")})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}h(t,"rm");for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Nt),i=Zr(t.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:C2.of(i)})}static open(e){return new ha(e)}};h(ha,"LintPanel");var la=ha;function qO(r,e='viewBox="0 0 40 40"'){return'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" '.concat(e,">").concat(encodeURIComponent(r),"</svg>')")}h(qO,"svg");function sa(r){return qO('<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="'.concat(r,'" fill="none" stroke-width=".7"/>'),'width="6" height="3"')}h(sa,"underline");var VO=te.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:sa("#d11")},".cm-lintRange-warning":{backgroundImage:sa("orange")},".cm-lintRange-info":{backgroundImage:sa("#999")},".cm-lintRange-hint":{backgroundImage:sa("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});var _2=[Nt,te.decorations.compute([Nt],r=>{let{selected:e,panel:t}=r.field(Nt);return!e||!t||e.from==e.to?ce.none:ce.set([MO.range(e.from,e.to)])}),zx(PO,{hideOn:NO}),VO];function zO(r){let e,t,i;return{c(){e=D("button"),e.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" class="svelte-1ha11jr"><path d="M704 896H64V320h640v192h64V192c0-35-29-64-64-64H512C512 57 455 0 384 0S256 57 256 128H64c-35 0-64 29-64 64v704c0 35 29 64 64 64h640c35 0 64-29 64-64V768h-64v128zM192 192h64s64-29 64-64 29-64 64-64 64 29 64 64 32 64 64 64h64s64 29 64 64H128c0-39 28-64 64-64zm-64 512h128v-64H128v64zm448-128V448L320 640l256 192V704h320V576H576zM128 832h192v-64H128v64zm320-448H128v64h320v-64zM256 512H128v64h128v-64z"></path></svg>',S(e,"class","btn svelte-1ha11jr"),S(e,"id","copy"),S(e,"title","Copy bibtex"),xr(e,"copied",r[0])},m(n,s){k(n,e,s),t||(i=xe(e,"click",r[1]),t=!0)},p(n,[s]){s&1&&xr(e,"copied",n[0])},i:Ce,o:Ce,d(n){n&&x(e),t=!1,i()}}}h(zO,"create_fragment");function WO(r,e,t){let i,n=!1,{bibtex:s}=e,o=h(()=>{navigator.clipboard.writeText(s).then(()=>{t(0,n=!0),clearInterval(i),i=setTimeout(()=>{t(0,n=!1)},3e3)}).catch(()=>{alert("Failed to copy")})},"handleCopy");return r.$$set=l=>{"bibtex"in l&&t(2,s=l.bibtex)},[n,o,s]}h(WO,"instance");var Ld=class Ld extends se{constructor(e){super(),le(this,e,WO,zO,oe,{bibtex:2})}};h(Ld,"CopyButton");var Cd=Ld,T2=Cd;var ks=class ks{constructor(e,t,i,n,s,o,l,a,c,f=0,u){this.p=e,this.stack=t,this.state=i,this.reducePos=n,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=c,this.lookAhead=f,this.parent=u}toString(){return"[".concat(this.stack.filter((e,t)=>t%3==0).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}static start(e,t,i=0){let n=e.parser.context;return new ks(e,[],t,i,i,0,[],0,n?new ca(n,n.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,n=e&65535,{parser:s}=this.p,o=s.dynamicPrecedence(n);if(o&&(this.score+=o),i==0){this.pushState(s.getGoto(this.state,n,!0),this.reducePos),n<s.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,4,!0),this.reduceContext(n,this.reducePos);return}let l=this.stack.length-(i-1)*3-(e&262144?6:0),a=l?this.stack[l-2]:this.p.ranges[0].from,c=this.reducePos-a;c>=2e3&&!(!((t=this.p.parser.nodeSet.types[n])===null||t===void 0)&&t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=c));let f=l?this.stack[l-1]:0,u=this.bufferBase+this.buffer.length-f;if(n<s.minRepeatTerm||e&131072){let d=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,a,d,u+4,!0)}if(e&262144)this.state=this.stack[l];else{let d=this.stack[l-3];this.state=s.getGoto(d,n,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(n,a)}storeNode(e,t,i,n=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,t,i,n);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,n>4&&(n-=4);this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=n}}shift(e,t,i){let n=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4);else{let s=e,{parser:o}=this.p;(i>this.pos||t<=o.maxNode)&&(this.pos=i,o.stateFlag(s,1)||(this.reducePos=i)),this.pushState(s,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,i,4)}}apply(e,t,i){e&65536?this.reduce(e):this.shift(e,t,i)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let n=this.pos;this.reducePos=this.pos=n+e.length,this.pushState(t,n),this.buffer.push(i,n,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),n=e.bufferBase+t;for(;e&&n==e.bufferBase;)e=e.parent;return new ks(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,n,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new _d(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if(!(i&65536))return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&n.push(t[s],o);if(this.stack.length<120)for(let s=0;n.length<8&&s<t.length;s+=2){let o=t[s+1];n.some((l,a)=>a&1&&l==o)||n.push(t[s],o)}t=n}let i=[];for(let n=0;n<t.length&&i.length<4;n+=2){let s=t[n+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[n],this.pos),o.score-=200,i.push(o)}return i}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let i=t>>19,n=t&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],n,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=h((n,s)=>{if(!t.includes(n))return t.push(n),e.allActions(n,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let a=o&65535,c=this.stack.length-l*3;if(c>=0&&e.getGoto(this.stack[c],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,s+1);if(l!=null)return l}})},"explore");return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new ca(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}};h(ks,"Stack");var Od=ks,Id=class Id{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}};h(Id,"StackContext");var ca=Id,$d=class $d{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=n}};h($d,"SimulatedStack");var _d=$d,ws=class ws{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new ws(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new ws(this.stack,this.pos,this.index)}};h(ws,"StackBufferCursor");var Td=ws;function xs(r,e=Uint16Array){if(typeof r!="string")return r;let t=null;for(let i=0,n=0;i<r.length;){let s=0;for(;;){let o=r.charCodeAt(i++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),s+=a,l)break;s*=46}t?t[n++]=s:t=new e(s)}return t}h(xs,"decodeArray");var qd=class qd{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}};h(qd,"CachedToken");var en=qd,D2=new en,Vd=class Vd{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=D2,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,n=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!n)return null;let o=this.ranges[--n];s-=i.from-o.to,i=o}for(;t<0?s>i.to:s>=i.to;){if(n==this.ranges.length-1)return null;let o=this.ranges[++n];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,n;if(t>=0&&t<this.chunk.length)i=this.pos+e,n=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=i;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),n=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),n}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=D2,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let n of this.ranges){if(n.from>=t)break;n.to>e&&(i+=this.input.read(Math.max(n.from,e),Math.min(n.to,t)))}return i}};h(Vd,"InputStream");var Dd=Vd,zd=class zd{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;P2(this.data,e,t,this.id,i.data,i.tokenPrecTable)}};h(zd,"TokenGroup");var Ei=zd;Ei.prototype.contextual=Ei.prototype.fallback=Ei.prototype.extend=!1;var Wd=class Wd{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?xs(e):e}token(e,t){let i=e.pos,n=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(P2(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||n++,o==null)break;e.reset(o,e.token)}n&&(e.reset(i,e.token),e.acceptToken(this.elseToken,n))}};h(Wd,"LocalTokenGroup");var Nd=Wd;Nd.prototype.contextual=Ei.prototype.fallback=Ei.prototype.extend=!1;function P2(r,e,t,i,n,s){let o=0,l=1<<i,{dialect:a}=t.p.parser;e:for(;l&r[o];){let c=r[o+1];for(let p=o+3;p<c;p+=2)if((r[p+1]&l)>0){let m=r[p];if(a.allows(m)&&(e.token.value==-1||e.token.value==m||HO(m,e.token.value,n,s))){e.acceptToken(m);break}}let f=e.next,u=0,d=r[o+2];if(e.next<0&&d>u&&r[c+d*3-3]==65535&&r[c+d*3-3]==65535){o=r[c+d*3-1];continue e}for(;u<d;){let p=u+d>>1,m=c+p+(p<<1),y=r[m],g=r[m+1]||65536;if(f<y)d=p;else if(f>=g)u=p+1;else{o=r[m+2],e.advance();continue e}}break}}h(P2,"readToken");function N2(r,e,t){for(let i=e,n;(n=r[i])!=65535;i++)if(n==t)return i-e;return-1}h(N2,"findOffset");function HO(r,e,t,i){let n=N2(t,i,e);return n<0||N2(t,i,r)<n}h(HO,"overrides");var ft=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),Ud=null;function R2(r,e,t){let i=r.cursor(_e.IncludeAnonymous);for(i.moveTo(e);;)if(!(t<0?i.childBefore(e):i.childAfter(e)))for(;;){if((t<0?i.to<e:i.from>e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(r.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:r.length}}h(R2,"cutAt");var jd=class jd{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?R2(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?R2(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let i=this.trees[t],n=this.index[t];if(n==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[n],o=this.start[t]+i.positions[n];if(o>e)return this.nextStart=o,null;if(s instanceof Ue){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let a=s.prop(ae.lookAhead);if(!a||l+a<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}};h(jd,"FragmentCursor");var Rd=jd,Hd=class Hd{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new en)}getActions(e){let t=0,i=null,{parser:n}=e.p,{tokenizers:s}=n,o=n.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let c=0;c<s.length;c++){if(!(1<<c&o))continue;let f=s[c],u=this.tokens[c];if(!(i&&!f.fallback)&&((f.contextual||u.start!=e.pos||u.mask!=o||u.context!=l)&&(this.updateCachedToken(u,f,e),u.mask=o,u.context=l),u.lookAhead>u.end+25&&(a=Math.max(u.lookAhead,a)),u.value!=0)){let d=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!f.extend&&(i=u,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new en,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new en,{pos:i,p:n}=e;return t.start=i,t.end=Math.min(i+1,n.stream.end),t.value=i==n.stream.end?n.parser.eofTerm:0,t}updateCachedToken(e,t,i){let n=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(n,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),i);if(l>=0&&i.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(n+1)}putAction(e,t,i,n){for(let s=0;s<n;s+=3)if(this.actions[s]==e)return n;return this.actions[n++]=e,this.actions[n++]=t,this.actions[n++]=i,n}addActions(e,t,i,n){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let a=0;a<2;a++)for(let c=o.stateSlot(s,a?2:1);;c+=3){if(l[c]==65535)if(l[c+1]==1)c=ai(l,c+2);else{n==0&&l[c+1]==2&&(n=this.putAction(ai(l,c+2),t,i,n));break}l[c]==t&&(n=this.putAction(ai(l,c+1),t,i,n))}return n}};h(Hd,"TokenCache");var Ad=Hd,Yd=class Yd{constructor(e,t,i,n){this.parser=e,this.input=t,this.ranges=n,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Dd(t,n),this.tokens=new Ad(e,this.stream),this.topTerm=e.top[1];let{from:s}=n[0];this.stacks=[Od.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new Rd(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],n,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>t)i.push(l);else{if(this.advanceStack(l,i,e))continue;{n||(n=[],s=[]),n.push(l);let a=this.tokens.getMainToken(l);s.push(a.value,a.end)}}break}}if(!i.length){let o=n&&YO(n);if(o)return ft&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw ft&&n&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&n){let o=this.stoppedAt!=null&&n[0].pos>this.stoppedAt?n[0]:this.runRecovery(n,s,i);if(o)return ft&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o<i.length-1;o++){let l=i[o];for(let a=o+1;a<i.length;a++){let c=i[a];if(l.sameState(c)||l.buffer.length>500&&c.buffer.length>500)if((l.score-c.score||l.buffer.length-c.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o<i.length;o++)i[o].pos<this.minStackPos&&(this.minStackPos=i[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,i){let n=e.pos,{parser:s}=this,o=ft?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&n>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,f=c?e.curContext.hash:0;for(let u=this.fragments.nodeAt(n);u;){let d=this.parser.nodeSet.types[u.type.id]==u.type?s.getGoto(e.state,u.type.id):-1;if(d>-1&&u.length&&(!c||(u.prop(ae.contextHash)||0)==f))return e.useNode(u,d),ft&&console.log(o+this.stackID(e)+" (via reuse of ".concat(s.getName(u.type.id),")")),!0;if(!(u instanceof Ue)||u.children.length==0||u.positions[0]>0)break;let p=u.children[0];if(p instanceof Ue&&u.positions[0]==0)u=p;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),ft&&console.log(o+this.stackID(e)+" (via always-reduce ".concat(s.getName(l&65535),")")),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let c=0;c<a.length;){let f=a[c++],u=a[c++],d=a[c++],p=c==a.length||!i,m=p?e:e.split();if(m.apply(f,u,d),ft&&console.log(o+this.stackID(m)+" (via ".concat(f&65536?"reduce of ".concat(s.getName(f&65535)):"shift"," for ").concat(s.getName(u)," @ ").concat(n).concat(m==e?"":", split",")")),p)return!0;m.pos>n?t.push(m):i.push(m)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return A2(e,t),!0}}runRecovery(e,t,i){let n=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],a=t[o<<1],c=t[(o<<1)+1],f=ft?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),ft&&console.log(f+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let u=l.split(),d=f;for(let p=0;u.forceReduce()&&p<10&&(ft&&console.log(d+this.stackID(u)+" (via force-reduce)"),!this.advanceFully(u,i));p++)ft&&(d=this.stackID(u)+" -> ");for(let p of l.recoverByInsert(a))ft&&console.log(f+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,i);this.stream.end>l.pos?(c==l.pos&&(c++,a=0),l.recoverByDelete(a,c),ft&&console.log(f+this.stackID(l)+" (via recover-delete ".concat(this.parser.getName(a),")")),A2(l,i)):(!n||n.score<l.score)&&(n=l)}return n}stackToTree(e){return e.close(),Ue.build({buffer:Td.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Ud||(Ud=new WeakMap)).get(e);return t||Ud.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};h(Yd,"Parse");var Md=Yd;function A2(r,e){for(let t=0;t<e.length;t++){let i=e[t];if(i.pos==r.pos&&i.sameState(r)){e[t].score<r.score&&(e[t]=r);return}}e.push(r)}h(A2,"pushStackDedup");var Jd=class Jd{constructor(e,t,i){this.source=e,this.flags=t,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}};h(Jd,"Dialect");var Pd=Jd;var Ss=class Ss extends Hr{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError("Parser version (".concat(e.version,") doesn't match runtime version (14)"));let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;l<e.repeatNodeCount;l++)t.push("");let i=Object.keys(e.topRules).map(l=>e.topRules[l][1]),n=[];for(let l=0;l<t.length;l++)n.push([]);function s(l,a,c){n[l].push([a,a.deserialize(String(c))])}if(h(s,"setProp"),e.nodeProps)for(let l of e.nodeProps){let a=l[0];typeof a=="string"&&(a=ae[a]);for(let c=1;c<l.length;){let f=l[c++];if(f>=0)s(f,a,l[c++]);else{let u=l[c+-f];for(let d=-f;d>0;d--)s(l[c++],a,u);c++}}}this.nodeSet=new as(t.map((l,a)=>Ie.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:n[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let o=xs(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(M2),this.states=xs(e.states,Uint32Array),this.data=xs(e.stateData),this.goto=xs(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Ei(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let n=new Md(this,e,t,i);for(let s of this.wrappers)n=s(n,e,t,i);return n}getGoto(e,t,i=!1){let n=this.goto;if(t>=n[0])return-1;for(let s=n[t+1];;){let o=n[s++],l=o&1,a=n[s++];if(l&&i)return a;for(let c=s+(o>>1);s<c;s++)if(n[s]==e)return a;if(l)return-1}}hasAction(e,t){let i=this.data;for(let n=0;n<2;n++)for(let s=this.stateSlot(e,n?2:1),o;;s+=3){if((o=i[s])==65535)if(i[s+1]==1)o=i[s=ai(i,s+2)];else{if(i[s+1]==2)return ai(i,s+2);break}if(o==t||o==0)return ai(i,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),n=i?t(i):void 0;for(let s=this.stateSlot(e,1);n==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=ai(this.data,s+2);else break;n=t(ai(this.data,s+1))}return n}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=ai(this.data,i+2);else break;if(!(this.data[i+2]&1)){let n=this.data[i+1];t.some((s,o)=>o&1&&s==n)||t.push(this.data[i],n)}}return t}configure(e){let t=Object.assign(Object.create(Ss.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError("Invalid top rule name ".concat(e.top));t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let n=e.tokenizers.find(s=>s.from==i);return n?n.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,n)=>{let s=e.specializers.find(l=>l.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return t.specializers[n]=M2(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(i[o]=!0)}let n=null;for(let s=0;s<t.length;s++)if(!i[s])for(let o=this.dialects[t[s]],l;(l=this.data[o++])!=65535;)(n||(n=new Uint8Array(this.maxTerm+1)))[l]=1;return new Pd(e,i,n)}static deserialize(e){return new Ss(e)}};h(Ss,"LRParser");var fa=Ss;function ai(r,e){return r[e]|r[e+1]<<16}h(ai,"pair");function YO(r){let e=null;for(let t of r){let i=t.p.stoppedAt;(t.pos==t.p.stream.end||i!=null&&t.pos>i)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}h(YO,"findFinished");function M2(r){if(r.external){let e=r.extend?1:0;return(t,i)=>r.external(t,i)<<1|e}return r.get}h(M2,"getSpecializer");var I2=fa.deserialize({version:14,states:"'[QVQPOOOhQPO'#CsOmQPO'#CwOrQPO'#CzOOQO'#Cp'#CpOOQO'#Ci'#CiQVQPOOOwQPO'#CpO|QQO,59_O![QQO,59cO!aQSO,59fOOQO-E6g-E6gO!fQWO'#C_OOQO,59[,59[OOQO'#Cu'#CuO!qQPO'#CtO!|QPO1G.yO#RQPO'#CxO#WQPO1G.}O#]QPO1G/QO#bQWO'#CjO#mQPO,58yOOQO,58y,58yO#mQPO,58yO|QQO'#CkO#uQPO,59`OOQO7+$e7+$eO|QQO,59dOOQO7+$i7+$iO![QQO7+$lOOQO,59U,59UOOQO-E6h-E6hOOQO1G.e1G.eO$QQPO1G.eOOQO,59V,59VOOQO-E6i-E6iOOQO1G/O1G/OO$YQPO<<HWOOQO7+$P7+$PO$bQQOAN=rO$jQPOAN=rOOQOAN=rAN=rOOQO,59W,59WOOQOG23^G23^O$rQQOG23^OOQO-E6j-E6jOOQOLD(xLD(xP![QQO'#Cl",stateData:"%S~OcOS~OQVOTPOXQOYRO[SO~OeWO~OeXO~OeYO~Oe[O~OU^OV^OW^Oe[O~OWaO~OZcO~OSgOe[OffO~OjhOfhXohX~OfjO~OmkO~OflO~OomO~OSnOe^Xf^X~Oe[OfpO~OjhOfhaoha~Oe[OfvO~OfyOowO~OWaOf{O~Of{Oo|O~OWaOf!OO~OQTXYScY~",goto:"#^oPPPpPPPPPPPPP!O!U!`!fPPP!lPP!p!t!zP!p#RP!pQ]VU^WhkXd[egqQUORZUQe[SoeqRqgQi_RsiQxuR}xTTOUTSOUQ`WRtkS_WkRrhQbXQumVzw|!P",nodeNames:"\u26A0 Program CommentCommand Braced BraceContent PreambleCommand Quoted Number Identifier StringCommand Command Key Comment",maxTerm:31,skippedNodes:[0],repeatNodeCount:4,tokenData:"!<f~R|OX#{X^$g^p#{pq$gqr#{rs&]st+[t|#{|}+r}!Q#{!Q![,Y![!_#{!_!`,v!`!b#{!b!c-^!c!}Kx!}#R#{#R#SKx#S#T#{#T#bKx#b#cNO#c#oKx#o#p!<[#p#q#{#q#r!<a#r#y#{#y#z$g#z$f#{$f$g$g$g#BY#{#BY#BZ$g#BZ$IS#{$IS$I_$g$I_$I|#{$I|$JO$g$JO$JT#{$JT$JU$g$JU$KV#{$KV$KW$g$KW&FU#{&FU&FV$g&FV;'S#{;'S;=`$a<%lO#{W$QTSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{W$dP;=`<%l#{~$niSWc~OX#{X^$g^p#{pq$gq#o#{#p#q#{#r#y#{#y#z$g#z$f#{$f$g$g$g#BY#{#BY#BZ$g#BZ$IS#{$IS$I_$g$I_$I|#{$I|$JO$g$JO$JT#{$JT$JU$g$JU$KV#{$KV$KW$g$KW&FU#{&FU&FV$g&FV;'S#{;'S;=`$a<%lO#{Y&bZSWOr&]rs'Ts#O&]#O#P'k#P#o&]#o#p)]#p#q&]#q#r)]#r;'S&];'S;=`+U<%lO&]Y'[TUQSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{Y'pZSWOr&]rs(cs#O&]#O#P'k#P#o&]#o#p)]#p#q&]#q#r)]#r;'S&];'S;=`+U<%lO&]Y(jZUQSWOr&]rs'Ts#O&]#O#P'k#P#o&]#o#p)]#p#q&]#q#r)]#r;'S&];'S;=`+U<%lO&]Q)`VOr)]rs)us#O)]#O#P)z#P;'S)];'S;=`+O<%lO)]Q)zOUQQ)}VOr)]rs*ds#O)]#O#P)z#P;'S)];'S;=`+O<%lO)]Q*iVUQOr)]rs)us#O)]#O#P)z#P;'S)];'S;=`+O<%lO)]Q+RP;=`<%l)]Y+XP;=`<%l&]X+cTjPSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X+yToPSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{Y,aVVQSWO!Q#{!Q![,Y![#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X,}TmPSWO#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{~-cfSWO!c#{!c!e.w!e!f0{!f!r.w!r!s9|!s!u.w!u!vDW!v!}.w!}#R#{#R#S.w#S#T#{#T#V.w#V#W0{#W#d.w#d#e9|#e#g.w#g#hDW#h#o.w#p#q#{#r;'S#{;'S;=`$a<%lO#{~.|^SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~0P^Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~1QbSWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!q/x!q!r2Y!r!}/x!}#R#{#R#S/x#S#T#{#T#c/x#c#d2Y#d#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~2abY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!o/x!o!p3i!p!}/x!}#R#{#R#S/x#S#T#{#T#a/x#a#b3i#b#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~3pbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!o/x!o!p4x!p!}/x!}#R#{#R#S/x#S#T#{#T#a/x#a#b4x#b#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~5PbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!g/x!g!h6X!h!}/x!}#R#{#R#S/x#S#T#{#T#X/x#X#Y6X#Y#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~6`bY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!p/x!p!q7h!q!}/x!}#R#{#R#S/x#S#T#{#T#b/x#b#c7h#c#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~7obY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!v/x!v!w8w!w!}/x!}#R#{#R#S/x#S#T#{#T#h/x#h#i8w#i#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~9Q^Q~Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~:RbSWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!t/x!t!u;Z!u!}/x!}#R#{#R#S/x#S#T#{#T#f/x#f#g;Z#g#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~;bbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!g/x!g!h<j!h!}/x!}#R#{#R#S/x#S#T#{#T#X/x#X#Y<j#Y#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~<q`Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!d=s!d!}/x!}#R#{#R#S/x#S#T#{#T#U=s#U#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~=zbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!o/x!o!p?S!p!}/x!}#R#{#R#S/x#S#T#{#T#a/x#a#b?S#b#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~?ZbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!d/x!d!e@c!e!}/x!}#R#{#R#S/x#S#T#{#T#U/x#U#V@c#V#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~@jbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!n/x!n!oAr!o!}/x!}#R#{#R#S/x#S#T#{#T#`/x#`#aAr#a#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~AybY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!g/x!g!hCR!h!}/x!}#R#{#R#S/x#S#T#{#T#X/x#X#YCR#Y#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~C[^T~Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~D]bSWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!v/x!v!wEe!w!}/x!}#R#{#R#S/x#S#T#{#T#h/x#h#iEe#i#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~ElbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!t/x!t!uFt!u!}/x!}#R#{#R#S/x#S#T#{#T#f/x#f#gFt#g#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~F{bY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!k/x!k!lHT!l!}/x!}#R#{#R#S/x#S#T#{#T#]/x#]#^HT#^#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~H[bY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!p/x!p!qId!q!}/x!}#R#{#R#S/x#S#T#{#T#b/x#b#cId#c#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~IkbY~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!i/x!i!jJs!j!}/x!}#R#{#R#S/x#S#T#{#T#Z/x#Z#[Js#[#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{~J|^X~Y~SWO}#{}!O/x!O!Q#{!Q![/x![!c#{!c!}/x!}#R#{#R#S/x#S#T#{#T#o/x#p#q#{#r;'S#{;'S;=`$a<%lO#{^K}^SWO}#{}!OLy!O!Q#{!Q![Ly![!c#{!c!}Ly!}#R#{#R#SLy#S#T#{#T#oLy#p#q#{#r;'S#{;'S;=`$a<%lO#{^MS^WQZSSWO}#{}!OLy!O!Q#{!Q![Ly![!c#{!c!}Ly!}#R#{#R#SLy#S#T#{#T#oLy#p#q#{#r;'S#{;'S;=`$a<%lO#{_NT`SWO}#{}!OLy!O!Q#{!Q![Ly![!c#{!c!}Ly!}#R#{#R#SLy#S#T#{#T#cLy#c#d! V#d#oLy#p#q#{#r;'S#{;'S;=`$a<%lO#{_! ``WQZSSWOp#{pq!!bq}#{}!OLy!O!Q#{!Q![Ly![!c#{!c!}Ly!}#R#{#R#SLy#S#T#{#T#oLy#p#q#{#r;'S#{;'S;=`$a<%lO#{X!!gVSWO#]#{#]#^!!|#^#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!#RVSWO#W#{#W#X!#h#X#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!#mVSWO#X#{#X#Y!$S#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!$XVSWO#T#{#T#U!$n#U#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!$sVSWOp#{pq!%Yq#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!%_VSWO#k#{#k#l!%t#l#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!%yVSWO#[#{#[#]!&`#]#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!&eVSWO#m#{#m#n!&z#n#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!'PVSWOp#{pq!'fq#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!'kVSWO#h#{#h#i!(Q#i#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!(VVSWO#[#{#[#]!(l#]#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!(qVSWO#]#{#]#^!)W#^#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!)]VSWO#g#{#g#h!)r#h#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!)wVSWOp#{pq!*^q#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!*cVSWO#g#{#g#h!*x#h#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!*}VSWO#h#{#h#i!+d#i#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!+iVSWO#f#{#f#g!,O#g#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!,TVSWO#]#{#]#^!,j#^#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!,oVSWO#b#{#b#c!-U#c#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!-ZVSWO#Z#{#Z#[!-p#[#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!-uVSWOp#{pq!.[q#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!.aVSWO#]#{#]#^!.v#^#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!.{VSWO#g#{#g#h!/b#h#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!/gVSWOp#{pq!/|q#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!0RVSWO#b#{#b#c!0h#c#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!0mVSWO#X#{#X#Y!1S#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!1XVSWO#X#{#X#Y!1n#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!1sVSWO#W#{#W#X!2Y#X#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!2_VSWO#X#{#X#Y!2t#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!2yVSWO#W#{#W#X!3`#X#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!3eVSWOp#{pq!3zq#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!4PVSWO#U#{#U#V!4f#V#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!4kVSWO#i#{#i#j!5Q#j#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!5VVSWO#h#{#h#i!5l#i#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!5qVSWOp#{pq!6Wq#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!6]VSWO#k#{#k#l!6r#l#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!6wVSWO#[#{#[#]!7^#]#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!7cVSWO#T#{#T#U!7x#U#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!7}VSWO#h#{#h#i!8d#i#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!8iVSWO#X#{#X#Y!9O#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!9TVSWO#j#{#j#k!9j#k#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!9oVSWO#X#{#X#Y!:U#Y#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!:ZVSWO#f#{#f#g!:p#g#o#{#p#q#{#r;'S#{;'S;=`$a<%lO#{X!:uXSWOp!;bpq#{q!b!;b!b!c#{!c#o!;b#p#q!;b#r;'S!;b;'S;=`!<U<%lO!;bX!;iX[PSWOp!;bpq#{q!b!;b!b!c#{!c#o!;b#p#q!;b#r;'S!;b;'S;=`!<U<%lO!;bX!<XP;=`<%l!;b~!<aOe~~!<fOf~",tokenizers:[0,1,2,3],topRules:{Program:[0,1]},tokenPrec:180});var JO=Zl.define({parser:I2.configure({props:[Kl({Identifier:O.variableName,Comment:O.comment,Key:O.name,Number:O.number,BraceContent:O.string,Quoted:O.string,Command:O.className,CommentCommand:O.className,PreambleCommand:O.className,StringCommand:O.className,Field:O.variableName})]})}),GO=Kr.define([{tag:O.comment,color:"var(--light5)"},{tag:O.name,color:"var(--orange)"},{tag:O.number,color:"var(--light-blue)"},{tag:O.string,color:"var(--green)"},{tag:O.className,color:"var(--pink)"},{tag:O.variableName,color:"white"}]);function $2(){return new ea(JO)}h($2,"bibtexLanguage");function q2(){return f2(GO)}h(q2,"bibtexSyntaxHighlighting");function XO(r){let e,t,i;return t=new T2({props:{bibtex:r[0]}}),{c(){e=D("main"),A(t.$$.fragment),S(e,"id","editor"),S(e,"class","svelte-x4zh2g")},m(n,s){k(n,e,s),R(t,e,null),r[5](e),i=!0},p(n,[s]){let o={};s&1&&(o.bibtex=n[0]),t.$set(o)},i(n){i||(C(t.$$.fragment,n),i=!0)},o(n){L(t.$$.fragment,n),i=!1},d(n){n&&x(e),N(t),r[5](null)}}}h(XO,"create_fragment");function KO(r,e,t){let{bibtex:i}=e,{error:n}=e,s,o,l;Ih(()=>{let c=te.updateListener.of(f=>{o&&f.docChanged&&t(0,i=o.state.doc.toString())});t(4,l=new _r),t(3,o=new te({parent:s,state:Be.create({doc:i,extensions:[Wx(),jx(),qx(),Be.allowMultipleSelections.of(!0),m2(),Px(),$2(),q2(),tu.of([...w2,F2]),y2(),c,l.of([])]})})),o.focus(),window.cmEditor=o});function a(c){Y[c?"unshift":"push"](()=>{s=c,t(1,s)})}return h(a,"main_binding"),r.$$set=c=>{"bibtex"in c&&t(0,i=c.bibtex),"error"in c&&t(2,n=c.error)},r.$$.update=()=>{r.$$.dirty&28&&(o==null||o.dispatch({effects:l.reconfigure(L2(()=>{if(n&&o){let c=o.state.doc.line(n.line),f=c.from,u=c.to;return[{from:f,to:u,severity:"error",message:"Syntax Error"}]}return[]}))})),r.$$.dirty&9&&o&&i!==o.state.doc.toString()&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:i}})},[i,s,n,o,l,a]}h(KO,"instance");var Xd=class Xd extends se{constructor(e){super(),le(this,e,KO,XO,oe,{bibtex:0,error:2})}};h(Xd,"Editor");var Gd=Xd,V2=Gd;function ZO(r){let e,t,i,n,s,o=r[3].default,l=fi(o,r,r[2],null);return{c(){e=D("details"),t=D("summary"),i=j(r[0]),n=$(),l&&l.c(),S(t,"class","svelte-ee92zc"),e.open=r[1],S(e,"class","svelte-ee92zc")},m(a,c){k(a,e,c),q(e,t),q(t,i),q(e,n),l&&l.m(e,null),s=!0},p(a,[c]){(!s||c&1)&&qe(i,a[0]),l&&l.p&&(!s||c&4)&&di(l,o,a,a[2],s?ui(o,a[2],c,null):pi(a[2]),null),(!s||c&2)&&(e.open=a[1])},i(a){s||(C(l,a),s=!0)},o(a){L(l,a),s=!1},d(a){a&&x(e),l&&l.d(a)}}}h(ZO,"create_fragment");function e_(r,e,t){let{$$slots:i={},$$scope:n}=e,{title:s}=e,{open:o=!1}=e;return r.$$set=l=>{"title"in l&&t(0,s=l.title),"open"in l&&t(1,o=l.open),"$$scope"in l&&t(2,n=l.$$scope)},[s,o,n,i]}h(e_,"instance");var Zd=class Zd extends se{constructor(e){super(),le(this,e,e_,ZO,oe,{title:0,open:1})}};h(Zd,"Collapsible");var Kd=Zd,it=Kd;function t_(r){let e,t,i;return{c(){e=D("input"),S(e,"type","checkbox"),S(e,"name",r[1]),S(e,"class","svelte-1tu5lm6")},m(n,s){k(n,e,s),e.checked=r[0],t||(i=[xe(e,"change",r[3]),xe(e,"change",r[4])],t=!0)},p(n,[s]){s&2&&S(e,"name",n[1]),s&1&&(e.checked=n[0])},i:Ce,o:Ce,d(n){n&&x(e),t=!1,At(i)}}}h(t_,"create_fragment");function i_(r,e,t){let{name:i}=e,{checked:n=void 0}=e,s=Oi();function o(){n=this.checked,t(0,n)}h(o,"input_change_handler");let l=h(()=>s("change"),"change_handler");return r.$$set=a=>{"name"in a&&t(1,i=a.name),"checked"in a&&t(0,n=a.checked)},[n,i,s,o,l]}h(i_,"instance");var tp=class tp extends se{constructor(e){super(),le(this,e,i_,t_,oe,{name:1,checked:0})}};h(tp,"Checkbox");var ep=tp,ir=ep;function r_(r){let e,t,i=r[3].default,n=fi(i,r,r[2],null);return{c(){e=D("label"),n&&n.c(),S(e,"title",r[0]),S(e,"class","svelte-a2tm3u"),xr(e,"inset",r[1])},m(s,o){k(s,e,o),n&&n.m(e,null),t=!0},p(s,[o]){n&&n.p&&(!t||o&4)&&di(n,i,s,s[2],t?ui(i,s[2],o,null):pi(s[2]),null),(!t||o&1)&&S(e,"title",s[0]),(!t||o&2)&&xr(e,"inset",s[1])},i(s){t||(C(n,s),t=!0)},o(s){L(n,s),t=!1},d(s){s&&x(e),n&&n.d(s)}}}h(r_,"create_fragment");function n_(r,e,t){let{$$slots:i={},$$scope:n}=e,{title:s=void 0}=e,{inset:o=void 0}=e;return r.$$set=l=>{"title"in l&&t(0,s=l.title),"inset"in l&&t(1,o=l.inset),"$$scope"in l&&t(2,n=l.$$scope)},[s,o,n,i]}h(n_,"instance");var rp=class rp extends se{constructor(e){super(),le(this,e,n_,r_,oe,{title:0,inset:1})}};h(rp,"Label");var ip=rp,rt=ip;function s_(r){let e,t,i=r[1].default,n=fi(i,r,r[0],null);return{c(){e=D("div"),n&&n.c(),S(e,"class","suboptions svelte-1gkj6ol")},m(s,o){k(s,e,o),n&&n.m(e,null),t=!0},p(s,[o]){n&&n.p&&(!t||o&1)&&di(n,i,s,s[0],t?ui(i,s[0],o,null):pi(s[0]),null)},i(s){t||(C(n,s),t=!0)},o(s){L(n,s),t=!1},d(s){s&&x(e),n&&n.d(s)}}}h(s_,"create_fragment");function o_(r,e,t){let{$$slots:i={},$$scope:n}=e;return r.$$set=s=>{"$$scope"in s&&t(0,n=s.$$scope)},[n,i]}h(o_,"instance");var sp=class sp extends se{constructor(e){super(),le(this,e,o_,s_,oe,{})}};h(sp,"SubOptions");var np=sp,ua=np;function l_(r){let e,t,i,n=r[3].title+"",s,o;function l(c){r[7](c)}h(l,"checkbox_checked_binding");let a={name:r[1]};return r[0]!==void 0&&(a.checked=r[0]),e=new ir({props:a}),Y.push(()=>K(e,"checked",l)),e.$on("change",r[8]),{c(){A(e.$$.fragment),i=$(),s=j(n)},m(c,f){R(e,c,f),k(c,i,f),k(c,s,f),o=!0},p(c,f){let u={};f&2&&(u.name=c[1]),!t&&f&1&&(t=!0,u.checked=c[0],X(()=>t=!1)),e.$set(u)},i(c){o||(C(e.$$.fragment,c),o=!0)},o(c){L(e.$$.fragment,c),o=!1},d(c){N(e,c),c&&x(i),c&&x(s)}}}h(l_,"create_default_slot_1");function z2(r){let e,t,i=r[0]&&W2(r);return{c(){i&&i.c(),e=ei()},m(n,s){i&&i.m(n,s),k(n,e,s),t=!0},p(n,s){n[0]?i?(i.p(n,s),s&1&&C(i,1)):(i=W2(n),i.c(),C(i,1),i.m(e.parentNode,e)):i&&(ti(),L(i,1,1,()=>{i=null}),ii())},i(n){t||(C(i),t=!0)},o(n){L(i),t=!1},d(n){i&&i.d(n),n&&x(e)}}}h(z2,"create_if_block");function W2(r){let e,t;return e=new ua({props:{$$slots:{default:[a_]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,n){let s={};n&512&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(W2,"create_if_block_1");function a_(r){let e,t=r[6].default,i=fi(t,r,r[9],null);return{c(){i&&i.c()},m(n,s){i&&i.m(n,s),e=!0},p(n,s){i&&i.p&&(!e||s&512)&&di(i,t,n,n[9],e?ui(t,n[9],s,null):pi(n[9]),null)},i(n){e||(C(i,n),e=!0)},o(n){L(i,n),e=!1},d(n){i&&i.d(n)}}}h(a_,"create_default_slot");function h_(r){var o;let e,t,i,n;e=new rt({props:{title:(o=r[3].description)==null?void 0:o.join("\n"),inset:!0,$$slots:{default:[l_]},$$scope:{ctx:r}}});let s=r[4].default&&z2(r);return{c(){A(e.$$.fragment),t=$(),s&&s.c(),i=ei()},m(l,a){R(e,l,a),k(l,t,a),s&&s.m(l,a),k(l,i,a),n=!0},p(l,[a]){let c={};a&515&&(c.$$scope={dirty:a,ctx:l}),e.$set(c),l[4].default?s?(s.p(l,a),a&16&&C(s,1)):(s=z2(l),s.c(),C(s,1),s.m(i.parentNode,i)):s&&(ti(),L(s,1,1,()=>{s=null}),ii())},i(l){n||(C(e.$$.fragment,l),C(s),n=!0)},o(l){L(e.$$.fragment,l),L(s),n=!1},d(l){N(e,l),l&&x(t),s&&s.d(l),l&&x(i)}}}h(h_,"create_fragment");function c_(r,e,t){let{$$slots:i={},$$scope:n}=e,s=Xy(i),{option:o}=e,{checked:l=void 0}=e,a=Oi(),c=Object.fromEntries(Sr.map(p=>[p.key,p])),f=c[o];function u(p){l=p,t(0,l)}h(u,"checkbox_checked_binding");let d=h(()=>a("change",l!=null?l:!1),"change_handler");return r.$$set=p=>{"option"in p&&t(1,o=p.option),"checked"in p&&t(0,l=p.checked),"$$scope"in p&&t(9,n=p.$$scope)},[l,o,a,f,s,c,i,u,d,n]}h(c_,"instance");var lp=class lp extends se{constructor(e){super(),le(this,e,c_,h_,oe,{option:1,checked:0,optionDefinitionByKey:5})}get optionDefinitionByKey(){return this.$$.ctx[5]}};h(lp,"Option");var op=lp,me=op;function f_(r){let e,t,i,n,s,o;return{c(){e=j("Fields to omit:\n "),t=D("textarea"),i=$(),n=D("p"),n.innerHTML="Space delimited, e.g: <code>id type publisher author</code>",S(t,"name","omitList"),S(t,"class","omit svelte-1t0249j"),S(t,"placeholder","e.g. abstract keywords"),S(t,"spellcheck","false")},m(l,a){k(l,e,a),k(l,t,a),ke(t,r[1]),k(l,i,a),k(l,n,a),s||(o=xe(t,"input",r[9]),s=!0)},p(l,a){a&2&&ke(t,l[1])},d(l){l&&x(e),l&&x(t),l&&x(i),l&&x(n),s=!1,o()}}}h(f_,"create_default_slot_2");function u_(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=j("Template:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML='<a href="./manual/key-generation.html" target="_blank">Template documentation</a>',S(i,"name","generateKeysTemplate")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[7]),k(a,n,c),k(a,s,c),o||(l=xe(i,"input",r[14]),o=!0)},p(a,c){c&128&&ke(i,a[7])},d(a){a&&x(e),a&&x(n),a&&x(s),o=!1,l()}}}h(u_,"create_default_slot_1");function d_(r){let e,t,i,n,s,o,l,a,c,f,u,d,p,m,y,g,b,v;function w(U){r[10](U)}h(w,"option0_checked_binding");let B={option:"omit",$$slots:{default:[f_]},$$scope:{ctx:r}};r[0]!==void 0&&(B.checked=r[0]),e=new me({props:B}),Y.push(()=>K(e,"checked",w));function E(U){r[11](U)}h(E,"option1_checked_binding");let T={option:"stripComments"};r[2]!==void 0&&(T.checked=r[2]),n=new me({props:T}),Y.push(()=>K(n,"checked",E));function _(U){r[12](U)}h(_,"option2_checked_binding");let W={option:"tidyComments"};r[3]!==void 0&&(W.checked=r[3]),l=new me({props:W}),Y.push(()=>K(l,"checked",_));function H(U){r[13](U)}h(H,"option3_checked_binding");let G={option:"lowercase"};r[4]!==void 0&&(G.checked=r[4]),f=new me({props:G}),Y.push(()=>K(f,"checked",H));function M(U){r[15](U)}h(M,"option4_checked_binding");let J={option:"generateKeys",$$slots:{default:[u_]},$$scope:{ctx:r}};r[6]!==void 0&&(J.checked=r[6]),p=new me({props:J}),Y.push(()=>K(p,"checked",M));function ne(U){r[16](U)}h(ne,"option5_checked_binding");let I={option:"trailingCommas"};return r[5]!==void 0&&(I.checked=r[5]),g=new me({props:I}),Y.push(()=>K(g,"checked",ne)),{c(){A(e.$$.fragment),i=$(),A(n.$$.fragment),o=$(),A(l.$$.fragment),c=$(),A(f.$$.fragment),d=$(),A(p.$$.fragment),y=$(),A(g.$$.fragment)},m(U,ee){R(e,U,ee),k(U,i,ee),R(n,U,ee),k(U,o,ee),R(l,U,ee),k(U,c,ee),R(f,U,ee),k(U,d,ee),R(p,U,ee),k(U,y,ee),R(g,U,ee),v=!0},p(U,ee){let fe={};ee&16777218&&(fe.$$scope={dirty:ee,ctx:U}),!t&&ee&1&&(t=!0,fe.checked=U[0],X(()=>t=!1)),e.$set(fe);let Fe={};!s&&ee&4&&(s=!0,Fe.checked=U[2],X(()=>s=!1)),n.$set(Fe);let Qe={};!a&&ee&8&&(a=!0,Qe.checked=U[3],X(()=>a=!1)),l.$set(Qe);let he={};!u&&ee&16&&(u=!0,he.checked=U[4],X(()=>u=!1)),f.$set(he);let ve={};ee&16777344&&(ve.$$scope={dirty:ee,ctx:U}),!m&&ee&64&&(m=!0,ve.checked=U[6],X(()=>m=!1)),p.$set(ve);let Le={};!b&&ee&32&&(b=!0,Le.checked=U[5],X(()=>b=!1)),g.$set(Le)},i(U){v||(C(e.$$.fragment,U),C(n.$$.fragment,U),C(l.$$.fragment,U),C(f.$$.fragment,U),C(p.$$.fragment,U),C(g.$$.fragment,U),v=!0)},o(U){L(e.$$.fragment,U),L(n.$$.fragment,U),L(l.$$.fragment,U),L(f.$$.fragment,U),L(p.$$.fragment,U),L(g.$$.fragment,U),v=!1},d(U){N(e,U),U&&x(i),N(n,U),U&&x(o),N(l,U),U&&x(c),N(f,U),U&&x(d),N(p,U),U&&x(y),N(g,U)}}}h(d_,"create_default_slot");function p_(r){let e,t;return e=new it({props:{title:"Clean up",open:!0,$$slots:{default:[d_]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,[n]){let s={};n&16777471&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(p_,"create_fragment");function m_(r,e,t){var i,n,s,o,l,a,c;let{options:f}=e,u=f.omit!==void 0&&f.omit.length>0,d=(n=(i=f.omit)===null||i===void 0?void 0:i.join(" "))!==null&&n!==void 0?n:"",p=(s=f.stripComments)!==null&&s!==void 0?s:!1,m=(o=f.tidyComments)!==null&&o!==void 0?o:!1,y=(l=f.lowercase)!==null&&l!==void 0?l:!1,g=(a=f.trailingCommas)!==null&&a!==void 0?a:!1,b=f.generateKeys!==void 0&&f.generateKeys.length>0,v=(c=f.generateKeys)!==null&&c!==void 0?c:"[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]";function w(){d=this.value,t(1,d)}h(w,"textarea_input_handler");function B(M){u=M,t(0,u)}h(B,"option0_checked_binding");function E(M){p=M,t(2,p)}h(E,"option1_checked_binding");function T(M){m=M,t(3,m)}h(T,"option2_checked_binding");function _(M){y=M,t(4,y)}h(_,"option3_checked_binding");function W(){v=this.value,t(7,v)}h(W,"textarea_input_handler_1");function H(M){b=M,t(6,b)}h(H,"option4_checked_binding");function G(M){g=M,t(5,g)}return h(G,"option5_checked_binding"),r.$$set=M=>{"options"in M&&t(8,f=M.options)},r.$$.update=()=>{r.$$.dirty&255&&(t(8,f.omit=u&&d.length>0?d.split(/[\n\t ,]+/):void 0,f),t(8,f.stripComments=p,f),t(8,f.tidyComments=m,f),t(8,f.lowercase=y,f),t(8,f.trailingCommas=g,f),t(8,f.generateKeys=b?v:void 0,f))},[u,d,p,m,y,g,b,v,f,w,B,E,T,_,W,H,G]}h(m_,"instance");var hp=class hp extends se{constructor(e){super(),le(this,e,m_,p_,oe,{options:8})}};h(hp,"CleanupOptions");var ap=hp,j2=ap;function H2(r){return Sr.map(e=>{var t;return(t=e.toCLI)==null?void 0:t.call(e,r[e.key],r)}).filter(e=>typeof e=="string")}h(H2,"optionsToCLIArgs");function Y2(r,e,t){let i=r.slice();return i[2]=e[t][0],i[3]=e[t][1],i}h(Y2,"get_each_context");function J2(r){let e,t,i=r[3]+"",n,s;return{c(){e=j("="),t=D("span"),n=j(i),s=$(),S(t,"class","opt-val svelte-1xnx1c1")},m(o,l){k(o,e,l),k(o,t,l),q(t,n),k(o,s,l)},p(o,l){l&1&&i!==(i=o[3]+"")&&qe(n,i)},d(o){o&&x(e),o&&x(t),o&&x(s)}}}h(J2,"create_if_block");function G2(r){let e,t=r[2]+"",i,n=" ",s,o=r[3]&&r[3].length>0&&J2(r);return{c(){e=D("span"),i=j(t),o&&o.c(),s=j(n),S(e,"class","opt-name svelte-1xnx1c1")},m(l,a){k(l,e,a),q(e,i),o&&o.m(l,a),k(l,s,a)},p(l,a){a&1&&t!==(t=l[2]+"")&&qe(i,t),l[3]&&l[3].length>0?o?o.p(l,a):(o=J2(l),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(l){l&&x(e),o&&o.d(l),l&&x(s)}}}h(G2,"create_each_block");function g_(r){let e,t,i,n,s,o=r[0],l=[];for(let a=0;a<o.length;a+=1)l[a]=G2(Y2(r,o,a));return{c(){e=D("p"),e.textContent="To run this configuration on the command line:",t=$(),i=D("code"),n=j("bibtex-tidy ");for(let a=0;a<l.length;a+=1)l[a].c();s=j(" YOUR_FILE.bib"),S(i,"id","cli"),S(i,"class","svelte-1xnx1c1")},m(a,c){k(a,e,c),k(a,t,c),k(a,i,c),q(i,n);for(let f=0;f<l.length;f+=1)l[f]&&l[f].m(i,null);q(i,s)},p(a,c){if(c&1){o=a[0];let f;for(f=0;f<o.length;f+=1){let u=Y2(a,o,f);l[f]?l[f].p(u,c):(l[f]=G2(u),l[f].c(),l[f].m(i,s))}for(;f<l.length;f+=1)l[f].d(1);l.length=o.length}},d(a){a&&x(e),a&&x(t),a&&x(i),vn(l,a)}}}h(g_,"create_default_slot");function b_(r){let e,t;return e=new it({props:{title:"CLI",$$slots:{default:[g_]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,[n]){let s={};n&65&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(b_,"create_fragment");function y_(r,e,t){let{options:i}=e,n;return r.$$set=s=>{"options"in s&&t(1,i=s.options)},r.$$.update=()=>{r.$$.dirty&2&&t(0,n=H2(i).map(s=>{let o=s.indexOf("=");return o===-1?[s]:[s.slice(0,o),s.slice(o+1)]}))},[n,i]}h(y_,"instance");var fp=class fp extends se{constructor(e){super(),le(this,e,y_,b_,oe,{options:1})}};h(fp,"Cli");var cp=fp,X2=cp;function v_(r){let e,t=!1,i,n,s;return i=e1(r[4][0]),{c(){e=D("input"),S(e,"type","radio"),S(e,"name",r[1]),e.__value=r[2],e.value=e.__value,S(e,"class","svelte-qhlda7"),i.p(e)},m(o,l){k(o,e,l),e.checked=e.__value===r[0],n||(s=xe(e,"change",r[3]),n=!0)},p(o,[l]){l&2&&S(e,"name",o[1]),l&4&&(e.__value=o[2],e.value=e.__value,t=!0),(t||l&1)&&(e.checked=e.__value===o[0])},i:Ce,o:Ce,d(o){o&&x(e),i.r(),n=!1,s()}}}h(v_,"create_fragment");function x_(r,e,t){let{name:i}=e,{group:n}=e,{value:s=void 0}=e,o=[[]];function l(){n=this.__value,t(0,n)}return h(l,"input_change_handler"),r.$$set=a=>{"name"in a&&t(1,i=a.name),"group"in a&&t(0,n=a.group),"value"in a&&t(2,s=a.value)},[n,i,s,l,o]}h(x_,"instance");var dp=class dp extends se{constructor(e){super(),le(this,e,x_,v_,oe,{name:1,group:0,value:2})}};h(dp,"Radio");var up=dp,Ci=up;function k_(r){let e,t,i,n;function s(l){r[8](l)}h(s,"checkbox_checked_binding");let o={name:"uniqKEY"};return r[1]!==void 0&&(o.checked=r[1]),e=new ir({props:o}),Y.push(()=>K(e,"checked",s)),{c(){A(e.$$.fragment),i=j("\n Matching Keys")},m(l,a){R(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&2&&(t=!0,c.checked=l[1],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){L(e.$$.fragment,l),n=!1},d(l){N(e,l),l&&x(i)}}}h(k_,"create_default_slot_10");function w_(r){let e,t,i,n;function s(l){r[9](l)}h(s,"checkbox_checked_binding_1");let o={name:"uniqDOI"};return r[2]!==void 0&&(o.checked=r[2]),e=new ir({props:o}),Y.push(()=>K(e,"checked",s)),{c(){A(e.$$.fragment),i=j("\n Matching DOIs")},m(l,a){R(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&4&&(t=!0,c.checked=l[2],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){L(e.$$.fragment,l),n=!1},d(l){N(e,l),l&&x(i)}}}h(w_,"create_default_slot_9");function S_(r){let e,t,i,n;function s(l){r[10](l)}h(s,"checkbox_checked_binding_2");let o={name:"uniqCIT"};return r[3]!==void 0&&(o.checked=r[3]),e=new ir({props:o}),Y.push(()=>K(e,"checked",s)),{c(){A(e.$$.fragment),i=j("\n Similar author and title")},m(l,a){R(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&8&&(t=!0,c.checked=l[3],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){L(e.$$.fragment,l),n=!1},d(l){N(e,l),l&&x(i)}}}h(S_,"create_default_slot_8");function F_(r){let e,t,i,n;function s(l){r[11](l)}h(s,"checkbox_checked_binding_3");let o={name:"uniqABS"};return r[4]!==void 0&&(o.checked=r[4]),e=new ir({props:o}),Y.push(()=>K(e,"checked",s)),{c(){A(e.$$.fragment),i=j("\n Similar abstracts")},m(l,a){R(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&16&&(t=!0,c.checked=l[4],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){L(e.$$.fragment,l),n=!1},d(l){N(e,l),l&&x(i)}}}h(F_,"create_default_slot_7");function Q_(r){let e,t,i,n,s,o,l,a,c,f;return i=new rt({props:{$$slots:{default:[k_]},$$scope:{ctx:r}}}),s=new rt({props:{$$slots:{default:[w_]},$$scope:{ctx:r}}}),l=new rt({props:{$$slots:{default:[S_]},$$scope:{ctx:r}}}),c=new rt({props:{$$slots:{default:[F_]},$$scope:{ctx:r}}}),{c(){e=D("p"),e.textContent="What to check:",t=$(),A(i.$$.fragment),n=$(),A(s.$$.fragment),o=$(),A(l.$$.fragment),a=$(),A(c.$$.fragment)},m(u,d){k(u,e,d),k(u,t,d),R(i,u,d),k(u,n,d),R(s,u,d),k(u,o,d),R(l,u,d),k(u,a,d),R(c,u,d),f=!0},p(u,d){let p={};d&134217730&&(p.$$scope={dirty:d,ctx:u}),i.$set(p);let m={};d&134217732&&(m.$$scope={dirty:d,ctx:u}),s.$set(m);let y={};d&134217736&&(y.$$scope={dirty:d,ctx:u}),l.$set(y);let g={};d&134217744&&(g.$$scope={dirty:d,ctx:u}),c.$set(g)},i(u){f||(C(i.$$.fragment,u),C(s.$$.fragment,u),C(l.$$.fragment,u),C(c.$$.fragment,u),f=!0)},o(u){L(i.$$.fragment,u),L(s.$$.fragment,u),L(l.$$.fragment,u),L(c.$$.fragment,u),f=!1},d(u){u&&x(e),u&&x(t),N(i,u),u&&x(n),N(s,u),u&&x(o),N(l,u),u&&x(a),N(c,u)}}}h(Q_,"create_default_slot_6");function B_(r){let e,t,i,n,s;function o(a){r[13](a)}h(o,"radio_group_binding");let l={name:"mergeStrategy",value:"combine"};return r[6]!==void 0&&(l.group=r[6]),e=new Ci({props:l}),Y.push(()=>K(e,"group",o)),{c(){A(e.$$.fragment),i=$(),n=D("span"),n.innerHTML="<strong>Combine</strong><br/> \n <small>Keep original entry and merge in fields of duplicates if they do not\n already exist</small>"},m(a,c){R(e,a,c),k(a,i,c),k(a,n,c),s=!0},p(a,c){let f={};!t&&c&64&&(t=!0,f.group=a[6],X(()=>t=!1)),e.$set(f)},i(a){s||(C(e.$$.fragment,a),s=!0)},o(a){L(e.$$.fragment,a),s=!1},d(a){N(e,a),a&&x(i),a&&x(n)}}}h(B_,"create_default_slot_5");function E_(r){let e,t,i,n,s;function o(a){r[14](a)}h(o,"radio_group_binding_1");let l={name:"mergeStrategy",value:"overwrite"};return r[6]!==void 0&&(l.group=r[6]),e=new Ci({props:l}),Y.push(()=>K(e,"group",o)),{c(){A(e.$$.fragment),i=$(),n=D("span"),n.innerHTML="<strong>Overwrite</strong><br/> \n <small>Keep original entry and merge in fields of duplicates, overwriting\n existing fields if they exist</small>"},m(a,c){R(e,a,c),k(a,i,c),k(a,n,c),s=!0},p(a,c){let f={};!t&&c&64&&(t=!0,f.group=a[6],X(()=>t=!1)),e.$set(f)},i(a){s||(C(e.$$.fragment,a),s=!0)},o(a){L(e.$$.fragment,a),s=!1},d(a){N(e,a),a&&x(i),a&&x(n)}}}h(E_,"create_default_slot_4");function C_(r){let e,t,i,n,s;function o(a){r[15](a)}h(o,"radio_group_binding_2");let l={name:"mergeStrategy",value:"first"};return r[6]!==void 0&&(l.group=r[6]),e=new Ci({props:l}),Y.push(()=>K(e,"group",o)),{c(){A(e.$$.fragment),i=$(),n=D("span"),n.innerHTML="<strong>First</strong><br/> \n <small>Only keep the original entry</small>"},m(a,c){R(e,a,c),k(a,i,c),k(a,n,c),s=!0},p(a,c){let f={};!t&&c&64&&(t=!0,f.group=a[6],X(()=>t=!1)),e.$set(f)},i(a){s||(C(e.$$.fragment,a),s=!0)},o(a){L(e.$$.fragment,a),s=!1},d(a){N(e,a),a&&x(i),a&&x(n)}}}h(C_,"create_default_slot_3");function L_(r){let e,t,i,n,s;function o(a){r[16](a)}h(o,"radio_group_binding_3");let l={name:"mergeStrategy",value:"last"};return r[6]!==void 0&&(l.group=r[6]),e=new Ci({props:l}),Y.push(()=>K(e,"group",o)),{c(){A(e.$$.fragment),i=$(),n=D("span"),n.innerHTML="<strong>Last</strong><br/> \n <small>Only keep the last found duplicate</small>"},m(a,c){R(e,a,c),k(a,i,c),k(a,n,c),s=!0},p(a,c){let f={};!t&&c&64&&(t=!0,f.group=a[6],X(()=>t=!1)),e.$set(f)},i(a){s||(C(e.$$.fragment,a),s=!0)},o(a){L(e.$$.fragment,a),s=!1},d(a){N(e,a),a&&x(i),a&&x(n)}}}h(L_,"create_default_slot_2");function U_(r){let e,t,i,n,s,o,l,a;return e=new rt({props:{$$slots:{default:[B_]},$$scope:{ctx:r}}}),i=new rt({props:{$$slots:{default:[E_]},$$scope:{ctx:r}}}),s=new rt({props:{$$slots:{default:[C_]},$$scope:{ctx:r}}}),l=new rt({props:{$$slots:{default:[L_]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment),t=$(),A(i.$$.fragment),n=$(),A(s.$$.fragment),o=$(),A(l.$$.fragment)},m(c,f){R(e,c,f),k(c,t,f),R(i,c,f),k(c,n,f),R(s,c,f),k(c,o,f),R(l,c,f),a=!0},p(c,f){let u={};f&134217792&&(u.$$scope={dirty:f,ctx:c}),e.$set(u);let d={};f&134217792&&(d.$$scope={dirty:f,ctx:c}),i.$set(d);let p={};f&134217792&&(p.$$scope={dirty:f,ctx:c}),s.$set(p);let m={};f&134217792&&(m.$$scope={dirty:f,ctx:c}),l.$set(m)},i(c){a||(C(e.$$.fragment,c),C(i.$$.fragment,c),C(s.$$.fragment,c),C(l.$$.fragment,c),a=!0)},o(c){L(e.$$.fragment,c),L(i.$$.fragment,c),L(s.$$.fragment,c),L(l.$$.fragment,c),a=!1},d(c){N(e,c),c&&x(t),N(i,c),c&&x(n),N(s,c),c&&x(o),N(l,c)}}}h(U_,"create_default_slot_1");function O_(r){let e,t,i,n,s,o;function l(u){r[12](u)}h(l,"option0_checked_binding");let a={option:"duplicates",$$slots:{default:[Q_]},$$scope:{ctx:r}};r[0]!==void 0&&(a.checked=r[0]),e=new me({props:a}),Y.push(()=>K(e,"checked",l));function c(u){r[17](u)}h(c,"option1_checked_binding");let f={option:"merge",$$slots:{default:[U_]},$$scope:{ctx:r}};return r[5]!==void 0&&(f.checked=r[5]),n=new me({props:f}),Y.push(()=>K(n,"checked",c)),{c(){A(e.$$.fragment),i=$(),A(n.$$.fragment)},m(u,d){R(e,u,d),k(u,i,d),R(n,u,d),o=!0},p(u,d){let p={};d&134217758&&(p.$$scope={dirty:d,ctx:u}),!t&&d&1&&(t=!0,p.checked=u[0],X(()=>t=!1)),e.$set(p);let m={};d&134217792&&(m.$$scope={dirty:d,ctx:u}),!s&&d&32&&(s=!0,m.checked=u[5],X(()=>s=!1)),n.$set(m)},i(u){o||(C(e.$$.fragment,u),C(n.$$.fragment,u),o=!0)},o(u){L(e.$$.fragment,u),L(n.$$.fragment,u),o=!1},d(u){N(e,u),u&&x(i),N(n,u)}}}h(O_,"create_default_slot");function __(r){let e,t;return e=new it({props:{title:"Duplicates",open:!0,$$slots:{default:[O_]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,[n]){let s={};n&134217855&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(__,"create_fragment");function T_(r,e,t){var i,n,s,o,l,a,c,f,u;let{options:d}=e,p=d.duplicates!==void 0,m=(n=(i=d.duplicates)===null||i===void 0?void 0:i.includes("key"))!==null&&n!==void 0?n:!0,y=(o=(s=d.duplicates)===null||s===void 0?void 0:s.includes("doi"))!==null&&o!==void 0?o:!1,g=(a=(l=d.duplicates)===null||l===void 0?void 0:l.includes("citation"))!==null&&a!==void 0?a:!1,b=(f=(c=d.duplicates)===null||c===void 0?void 0:c.includes("abstract"))!==null&&f!==void 0?f:!1,v=d.merge!==void 0,w=(u=d.merge)!==null&&u!==void 0?u:"combine";function B(I){m=I,t(1,m)}h(B,"checkbox_checked_binding");function E(I){y=I,t(2,y)}h(E,"checkbox_checked_binding_1");function T(I){g=I,t(3,g)}h(T,"checkbox_checked_binding_2");function _(I){b=I,t(4,b)}h(_,"checkbox_checked_binding_3");function W(I){p=I,t(0,p)}h(W,"option0_checked_binding");function H(I){w=I,t(6,w)}h(H,"radio_group_binding");function G(I){w=I,t(6,w)}h(G,"radio_group_binding_1");function M(I){w=I,t(6,w)}h(M,"radio_group_binding_2");function J(I){w=I,t(6,w)}h(J,"radio_group_binding_3");function ne(I){v=I,t(5,v)}return h(ne,"option1_checked_binding"),r.$$set=I=>{"options"in I&&t(7,d=I.options)},r.$$.update=()=>{r.$$.dirty&255&&(p?(t(7,d.duplicates=[],d),m&&d.duplicates.push("key"),y&&d.duplicates.push("doi"),g&&d.duplicates.push("citation"),b&&d.duplicates.push("abstract")):t(7,d.duplicates=void 0,d),t(7,d.merge=v?w:void 0,d))},[p,m,y,g,b,v,w,d,B,E,T,_,W,H,G,M,J,ne]}h(T_,"instance");var mp=class mp extends se{constructor(e){super(),le(this,e,T_,__,oe,{options:7})}};h(mp,"DuplicateOptions");var pp=mp,K2=pp;function D_(r){let e,t,i,n,s,o;return{c(){e=D("strong"),e.textContent="There's a problem with the bibtex",t=D("br"),i=j("\n Unknown error: "),n=j(r[0]),s=D("br"),o=j("\n This is probably a bug.")},m(l,a){k(l,e,a),k(l,t,a),k(l,i,a),k(l,n,a),k(l,s,a),k(l,o,a)},p(l,a){a&1&&qe(n,l[0])},d(l){l&&x(e),l&&x(t),l&&x(i),l&&x(n),l&&x(s),l&&x(o)}}}h(D_,"create_else_block_1");function N_(r){let e,t,i,n=r[0].name+"",s,o,l=r[0].line+"",a,c,f=r[0].column+"",u,d,p,m;function y(v,w){return v[0].hint?A_:R_}h(y,"select_block_type_1");let g=y(r,-1),b=g(r);return{c(){e=D("strong"),e.textContent="There's a problem with the bibtex",t=D("br"),i=$(),s=j(n),o=j(" on line "),a=j(l),c=j(" column "),u=j(f),d=D("br"),p=$(),b.c(),m=ei()},m(v,w){k(v,e,w),k(v,t,w),k(v,i,w),k(v,s,w),k(v,o,w),k(v,a,w),k(v,c,w),k(v,u,w),k(v,d,w),k(v,p,w),b.m(v,w),k(v,m,w)},p(v,w){w&1&&n!==(n=v[0].name+"")&&qe(s,n),w&1&&l!==(l=v[0].line+"")&&qe(a,l),w&1&&f!==(f=v[0].column+"")&&qe(u,f),g===(g=y(v,w))&&b?b.p(v,w):(b.d(1),b=g(v),b&&(b.c(),b.m(m.parentNode,m)))},d(v){v&&x(e),v&&x(t),v&&x(i),v&&x(s),v&&x(o),v&&x(a),v&&x(c),v&&x(u),v&&x(d),v&&x(p),b.d(v),v&&x(m)}}}h(N_,"create_if_block");function R_(r){let e,t=JSON.stringify(r[0].char)+"",i,n,s=r[0].node.type+"",o,l;return{c(){e=j("Unexpected "),i=j(t),n=j(" in "),o=j(s),l=j(".")},m(a,c){k(a,e,c),k(a,i,c),k(a,n,c),k(a,o,c),k(a,l,c)},p(a,c){c&1&&t!==(t=JSON.stringify(a[0].char)+"")&&qe(i,t),c&1&&s!==(s=a[0].node.type+"")&&qe(o,s)},d(a){a&&x(e),a&&x(i),a&&x(n),a&&x(o),a&&x(l)}}}h(R_,"create_else_block");function A_(r){let e=r[0].hint+"",t;return{c(){t=j(e)},m(i,n){k(i,t,n)},p(i,n){n&1&&e!==(e=i[0].hint+"")&&qe(t,e)},d(i){i&&x(t)}}}h(A_,"create_if_block_1");function M_(r){let e,t,i,n,s,o,l;function a(u,d){return u[0]instanceof dt?N_:D_}h(a,"select_block_type");let c=a(r,-1),f=c(r);return{c(){e=D("div"),t=Mt("svg"),i=Mt("circle"),n=Mt("line"),s=Mt("line"),o=$(),l=D("div"),f.c(),S(i,"cx","12"),S(i,"cy","12"),S(i,"r","10"),S(i,"class","svelte-176xcb"),S(n,"x1","12"),S(n,"y1","8"),S(n,"x2","12"),S(n,"y2","12"),S(n,"class","svelte-176xcb"),S(s,"x1","12"),S(s,"y1","16"),S(s,"x2","12.01"),S(s,"y2","16"),S(s,"class","svelte-176xcb"),S(t,"xmlns","http://www.w3.org/2000/svg"),S(t,"width","24"),S(t,"height","24"),S(t,"viewBox","0 0 24 24"),S(t,"fill","none"),S(t,"stroke","currentColor"),S(t,"stroke-width","2"),S(t,"stroke-linecap","round"),S(t,"stroke-linejoin","round"),S(t,"class","svelte-176xcb"),S(l,"class","text"),S(e,"class","container svelte-176xcb")},m(u,d){k(u,e,d),q(e,t),q(t,i),q(t,n),q(t,s),q(e,o),q(e,l),f.m(l,null)},p(u,[d]){c===(c=a(u,d))&&f?f.p(u,d):(f.d(1),f=c(u),f&&(f.c(),f.m(l,null)))},i:Ce,o:Ce,d(u){u&&x(e),f.d()}}}h(M_,"create_fragment");function P_(r,e,t){let{error:i}=e;return r.$$set=n=>{"error"in n&&t(0,i=n.error)},[i]}h(P_,"instance");var bp=class bp extends se{constructor(e){super(),le(this,e,P_,M_,oe,{error:0})}};h(bp,"FeedbackError");var gp=bp,Z2=gp;function ek(r,e,t){let i=r.slice();return i[4]=e[t],i}h(ek,"get_each_context");function tk(r,e,t){let i=r.slice();return i[7]=e[t],i}h(tk,"get_each_context_1");function I_(r){let e,t=r[2],i=[];for(let n=0;n<t.length;n+=1)i[n]=ik(tk(r,t,n));return{c(){e=D("ul");for(let n=0;n<i.length;n+=1)i[n].c()},m(n,s){k(n,e,s);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(n,s){if(s&4){t=n[2];let o;for(o=0;o<t.length;o+=1){let l=tk(n,t,o);i[o]?i[o].p(l,s):(i[o]=ik(l),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=t.length}},d(n){n&&x(e),vn(i,n)}}}h(I_,"create_if_block_2");function ik(r){let e,t,i=r[7].message+"",n;return{c(){e=D("li"),t=j("$"),n=j(i)},m(s,o){k(s,e,o),q(e,t),q(e,n)},p:Ce,d(s){s&&x(e)}}}h(ik,"create_each_block_1");function rk(r){let e;function t(s,o){return s[3].length===0?q_:$_}h(t,"select_block_type");let n=t(r,-1)(r);return{c(){n.c(),e=ei()},m(s,o){n.m(s,o),k(s,e,o)},p(s,o){n.p(s,o)},d(s){n.d(s),s&&x(e)}}}h(rk,"create_if_block");function $_(r){let e,t,i,n=r[3],s=[];for(let o=0;o<n.length;o+=1)s[o]=nk(ek(r,n,o));return{c(){e=D("strong"),e.textContent="".concat(r[3].length," merged:"),t=$(),i=D("ul");for(let o=0;o<s.length;o+=1)s[o].c();S(e,"class","svelte-yy7yvg")},m(o,l){k(o,e,l),k(o,t,l),k(o,i,l);for(let a=0;a<s.length;a+=1)s[a]&&s[a].m(i,null)},p(o,l){if(l&8){n=o[3];let a;for(a=0;a<n.length;a+=1){let c=ek(o,n,a);s[a]?s[a].p(c,l):(s[a]=nk(c),s[a].c(),s[a].m(i,null))}for(;a<s.length;a+=1)s[a].d(1);s.length=n.length}},d(o){o&&x(e),o&&x(t),o&&x(i),vn(s,o)}}}h($_,"create_else_block");function q_(r){let e;return{c(){e=j("No duplicates")},m(t,i){k(t,e,i)},p:Ce,d(t){t&&x(e)}}}h(q_,"create_if_block_1");function nk(r){let e,t=r[4].message+"",i;return{c(){e=D("li"),i=j(t)},m(n,s){k(n,e,s),q(e,i)},p:Ce,d(n){n&&x(e)}}}h(nk,"create_each_block");function V_(r){let e,t,i,n,s,o,l,a,c,f,u=r[1].count+"",d,p,m,y=r[2].length>0&&I_(r),g=r[0].merge&&rk(r);return{c(){e=D("div"),t=Mt("svg"),i=Mt("circle"),n=Mt("line"),s=Mt("line"),o=$(),l=D("div"),a=D("strong"),a.textContent="Successful!",c=D("br"),f=j("\n Tidied "),d=j(u),p=j(" entries.\n\n "),y&&y.c(),m=$(),g&&g.c(),S(i,"cx","12"),S(i,"cy","12"),S(i,"r","10"),S(i,"class","svelte-yy7yvg"),S(n,"x1","12"),S(n,"y1","16"),S(n,"x2","12"),S(n,"y2","12"),S(n,"class","svelte-yy7yvg"),S(s,"x1","12"),S(s,"y1","8"),S(s,"x2","12.01"),S(s,"y2","8"),S(s,"class","svelte-yy7yvg"),S(t,"xmlns","http://www.w3.org/2000/svg"),S(t,"width","24"),S(t,"height","24"),S(t,"viewBox","0 0 24 24"),S(t,"fill","none"),S(t,"stroke","currentColor"),S(t,"stroke-width","2"),S(t,"stroke-linecap","round"),S(t,"stroke-linejoin","round"),S(t,"class","feather feather-info svelte-yy7yvg"),S(a,"class","svelte-yy7yvg"),S(l,"class","text"),S(e,"class","container svelte-yy7yvg")},m(b,v){k(b,e,v),q(e,t),q(t,i),q(t,n),q(t,s),q(e,o),q(e,l),q(l,a),q(l,c),q(l,f),q(l,d),q(l,p),y&&y.m(l,null),q(l,m),g&&g.m(l,null)},p(b,[v]){v&2&&u!==(u=b[1].count+"")&&qe(d,u),b[2].length>0&&y.p(b,v),b[0].merge?g?g.p(b,v):(g=rk(b),g.c(),g.m(l,null)):g&&(g.d(1),g=null)},i:Ce,o:Ce,d(b){b&&x(e),y&&y.d(),g&&g.d()}}}h(V_,"create_fragment");function z_(r,e,t){let{options:i}=e,{result:n}=e,s=n.warnings.filter(l=>l.code!=="DUPLICATE_ENTRY"),o=n.warnings.filter(l=>l.code==="DUPLICATE_ENTRY");return r.$$set=l=>{"options"in l&&t(0,i=l.options),"result"in l&&t(1,n=l.result)},[i,n,s,o]}h(z_,"instance");var vp=class vp extends se{constructor(e){super(),le(this,e,z_,V_,oe,{options:0,result:1})}};h(vp,"FeedbackSuccess");var yp=vp,sk=yp;function W_(r){let e,t;return e=new Z2({props:{error:r[1].error}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,n){let s={};n&2&&(s.error=i[1].error),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(W_,"create_else_block");function j_(r){let e,t;return e=new sk({props:{options:r[0],result:r[1].result}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,n){let s={};n&1&&(s.options=i[0]),n&2&&(s.result=i[1].result),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(j_,"create_if_block");function H_(r){let e,t,i,n,s=[j_,W_],o=[];function l(a,c){return a[1].status==="success"?0:1}return h(l,"select_block_type"),t=l(r,-1),i=o[t]=s[t](r),{c(){e=D("div"),i.c(),S(e,"role","alert"),S(e,"class","svelte-1pqmac")},m(a,c){k(a,e,c),o[t].m(e,null),n=!0},p(a,[c]){let f=t;t=l(a,c),t===f?o[t].p(a,c):(ti(),L(o[f],1,1,()=>{o[f]=null}),ii(),i=o[t],i?i.p(a,c):(i=o[t]=s[t](a),i.c()),C(i,1),i.m(e,null))},i(a){n||(C(i),n=!0)},o(a){L(i),n=!1},d(a){a&&x(e),o[t].d()}}}h(H_,"create_fragment");function Y_(r,e,t){let{options:i}=e,{status:n}=e;return r.$$set=s=>{"options"in s&&t(0,i=s.options),"status"in s&&t(1,n=s.status)},[i,n]}h(Y_,"instance");var kp=class kp extends se{constructor(e){super(),le(this,e,Y_,H_,oe,{options:0,status:1})}};h(kp,"Feedback");var xp=kp,ok=xp;function J_(r){let e,t,i,n;function s(l){r[3](l)}h(s,"radio_group_binding");let o={name:"indent",value:"tabs"};return r[0]!==void 0&&(o.group=r[0]),e=new Ci({props:o}),Y.push(()=>K(e,"group",s)),{c(){A(e.$$.fragment),i=j("\n Indent with tabs")},m(l,a){R(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&1&&(t=!0,c.group=l[0],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){L(e.$$.fragment,l),n=!1},d(l){N(e,l),l&&x(i)}}}h(J_,"create_default_slot_3");function G_(r){let e,t,i,n;function s(l){r[4](l)}h(s,"radio_group_binding_1");let o={name:"indent",value:"spaces"};return r[0]!==void 0&&(o.group=r[0]),e=new Ci({props:o}),Y.push(()=>K(e,"group",s)),{c(){A(e.$$.fragment),i=j("\n Indent with spaces")},m(l,a){R(e,l,a),k(l,i,a),n=!0},p(l,a){let c={};!t&&a&1&&(t=!0,c.group=l[0],X(()=>t=!1)),e.$set(c)},i(l){n||(C(e.$$.fragment,l),n=!0)},o(l){L(e.$$.fragment,l),n=!1},d(l){N(e,l),l&&x(i)}}}h(G_,"create_default_slot_2");function lk(r){let e,t;return e=new ua({props:{$$slots:{default:[X_]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,n){let s={};n&66&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(lk,"create_if_block");function X_(r){let e,t,i,n,s;return{c(){e=D("label"),t=j("Spaces: "),i=D("input"),S(i,"name","spaces"),S(i,"type","number")},m(o,l){k(o,e,l),q(e,t),q(e,i),ke(i,r[1]),n||(s=xe(i,"input",r[5]),n=!0)},p(o,l){l&2&&Lt(i.value)!==o[1]&&ke(i,o[1])},d(o){o&&x(e),n=!1,s()}}}h(X_,"create_default_slot_1");function K_(r){let e,t,i,n,s,o;e=new rt({props:{title:"Indent fields with tabs",$$slots:{default:[J_]},$$scope:{ctx:r}}}),i=new rt({props:{title:"Indent fields with spaces",$$slots:{default:[G_]},$$scope:{ctx:r}}});let l=r[0]==="spaces"&&lk(r);return{c(){A(e.$$.fragment),t=$(),A(i.$$.fragment),n=$(),l&&l.c(),s=ei()},m(a,c){R(e,a,c),k(a,t,c),R(i,a,c),k(a,n,c),l&&l.m(a,c),k(a,s,c),o=!0},p(a,c){let f={};c&65&&(f.$$scope={dirty:c,ctx:a}),e.$set(f);let u={};c&65&&(u.$$scope={dirty:c,ctx:a}),i.$set(u),a[0]==="spaces"?l?(l.p(a,c),c&1&&C(l,1)):(l=lk(a),l.c(),C(l,1),l.m(s.parentNode,s)):l&&(ti(),L(l,1,1,()=>{l=null}),ii())},i(a){o||(C(e.$$.fragment,a),C(i.$$.fragment,a),C(l),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l),o=!1},d(a){N(e,a),a&&x(t),N(i,a),a&&x(n),l&&l.d(a),a&&x(s)}}}h(K_,"create_default_slot");function Z_(r){let e,t;return e=new it({props:{title:"Indent",open:!0,$$slots:{default:[K_]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,[n]){let s={};n&67&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(Z_,"create_fragment");function eT(r,e,t){let{options:i}=e,n=i.tab?"tabs":"spaces",s=i.space;function o(c){n=c,t(0,n)}h(o,"radio_group_binding");function l(c){n=c,t(0,n)}h(l,"radio_group_binding_1");function a(){s=Lt(this.value),t(1,s)}return h(a,"input_input_handler"),r.$$set=c=>{"options"in c&&t(2,i=c.options)},r.$$.update=()=>{r.$$.dirty&3&&(t(2,i.space=s,i),t(2,i.tab=n==="tabs",i))},[n,s,i,o,l,a]}h(eT,"instance");var Sp=class Sp extends se{constructor(e){super(),le(this,e,eT,Z_,oe,{options:2})}};h(Sp,"IndentOptions");var wp=Sp,ak=wp;function tT(r){let e,t,i,n,s,o,l,a,c;return{c(){e=D("label"),t=j("Fields to sort by:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML="Space delimited, e.g: <code>key type publisher author</code>. For\n descending order, prefix the field name with a dash, e.g.\n <code>-year author</code>.",o=$(),l=D("p"),l.innerHTML="In addition to field names, you can use <code>key</code> to sort by\n citation key,\n <code>type</code> to sort by entry type (@article, @misc, etc), and\n <code>special</code> to sort special entries (@string, @preamble, @xdata, and\n @set) to the top.",S(i,"name","sortList"),S(i,"spellcheck","false")},m(f,u){k(f,e,u),q(e,t),q(e,i),ke(i,r[3]),k(f,n,u),k(f,s,u),k(f,o,u),k(f,l,u),a||(c=xe(i,"input",r[5]),a=!0)},p(f,u){u&8&&ke(i,f[3])},d(f){f&&x(e),f&&x(n),f&&x(s),f&&x(o),f&&x(l),a=!1,c()}}}h(tT,"create_default_slot_2");function iT(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=j("Field order:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML="Space delimited, e.g: <code>title author year</code>",S(i,"name","sortFieldList"),S(i,"spellcheck","false")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[1]),k(a,n,c),k(a,s,c),o||(l=xe(i,"input",r[7]),o=!0)},p(a,c){c&2&&ke(i,a[1])},d(a){a&&x(e),a&&x(n),a&&x(s),o=!1,l()}}}h(iT,"create_default_slot_1");function rT(r){let e,t,i,n,s,o;function l(u){r[6](u)}h(l,"option0_checked_binding");let a={option:"sort",$$slots:{default:[tT]},$$scope:{ctx:r}};r[2]!==void 0&&(a.checked=r[2]),e=new me({props:a}),Y.push(()=>K(e,"checked",l));function c(u){r[8](u)}h(c,"option1_checked_binding");let f={option:"sortFields",$$slots:{default:[iT]},$$scope:{ctx:r}};return r[0]!==void 0&&(f.checked=r[0]),n=new me({props:f}),Y.push(()=>K(n,"checked",c)),{c(){A(e.$$.fragment),i=$(),A(n.$$.fragment)},m(u,d){R(e,u,d),k(u,i,d),R(n,u,d),o=!0},p(u,d){let p={};d&2056&&(p.$$scope={dirty:d,ctx:u}),!t&&d&4&&(t=!0,p.checked=u[2],X(()=>t=!1)),e.$set(p);let m={};d&2050&&(m.$$scope={dirty:d,ctx:u}),!s&&d&1&&(s=!0,m.checked=u[0],X(()=>s=!1)),n.$set(m)},i(u){o||(C(e.$$.fragment,u),C(n.$$.fragment,u),o=!0)},o(u){L(e.$$.fragment,u),L(n.$$.fragment,u),o=!1},d(u){N(e,u),u&&x(i),N(n,u)}}}h(rT,"create_default_slot");function nT(r){let e,t;return e=new it({props:{title:"Sorting",open:!0,$$slots:{default:[rT]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,[n]){let s={};n&2063&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(nT,"create_fragment");function sT(r,e,t){var i,n;let{options:s}=e,o=s.sortFields!==void 0&&s.sortFields.length>0,l=((i=s.sortFields)!==null&&i!==void 0?i:vo).join(" "),a=s.sort!==void 0&&s.sort.length>0,c=((n=s.sort)!==null&&n!==void 0?n:Xh).join(" ");function f(){c=this.value,t(3,c)}h(f,"textarea_input_handler");function u(m){a=m,t(2,a)}h(u,"option0_checked_binding");function d(){l=this.value,t(1,l)}h(d,"textarea_input_handler_1");function p(m){o=m,t(0,o)}return h(p,"option1_checked_binding"),r.$$set=m=>{"options"in m&&t(4,s=m.options)},r.$$.update=()=>{r.$$.dirty&15&&(t(4,s.sortFields=o&&l.length>0?l.split(/[\n\t ,]+/):void 0,s),t(4,s.sort=a&&c.length>0?c.split(/[\n\t ,]+/):void 0,s))},[o,l,a,c,s,f,u,d,p]}h(sT,"instance");var Qp=class Qp extends se{constructor(e){super(),le(this,e,sT,nT,oe,{options:4})}};h(Qp,"SortingOptions");var Fp=Qp,hk=Fp;function oT(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=j("Fields to enclose in double braces:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML="Space delimited, e.g: <code>title journal</code>.",S(i,"name","enclosingBracesList"),S(i,"spellcheck","false")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[12]),k(a,n,c),k(a,s,c),o||(l=xe(i,"input",r[17]),o=!0)},p(a,c){c[0]&4096&&ke(i,a[12])},d(a){a&&x(e),a&&x(n),a&&x(s),o=!1,l()}}}h(oT,"create_default_slot_3");function lT(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=j("Remove braces from values of these fields:\n "),i=D("textarea"),n=$(),s=D("p"),s.innerHTML="Space delimited, e.g: <code>title journal</code>.",S(i,"name","removeBracesList"),S(i,"spellcheck","false")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[14]),k(a,n,c),k(a,s,c),o||(l=xe(i,"input",r[19]),o=!0)},p(a,c){c[0]&16384&&ke(i,a[14])},d(a){a&&x(e),a&&x(n),a&&x(s),o=!1,l()}}}h(lT,"create_default_slot_2");function aT(r){let e,t,i,n,s,o,l;return{c(){e=D("label"),t=j("Maximum number of authors:\n "),i=D("input"),n=$(),s=D("p"),s.textContent='Author lists longer than this will be truncated to "and others".',S(i,"name","maxAuthorsNum"),S(i,"type","number")},m(a,c){k(a,e,c),q(e,t),q(e,i),ke(i,r[10]),k(a,n,c),k(a,s,c),o||(l=xe(i,"input",r[29]),o=!0)},p(a,c){c[0]&1024&&Lt(i.value)!==a[10]&&ke(i,a[10])},d(a){a&&x(e),a&&x(n),a&&x(s),o=!1,l()}}}h(aT,"create_default_slot_1");function hT(r){let e,t,i,n,s,o,l,a,c,f,u,d,p,m,y,g,b,v,w,B,E,T,_,W,H,G,M,J,ne,I,U,ee,fe,Fe,Qe,he,ve,Le;function Je(Q){r[16](Q)}h(Je,"option0_checked_binding");let nt={option:"curly"};r[0]!==void 0&&(nt.checked=r[0]),i=new me({props:nt}),Y.push(()=>K(i,"checked",Je));function St(Q){r[18](Q)}h(St,"option1_checked_binding");let Gt={option:"enclosingBraces",$$slots:{default:[oT]},$$scope:{ctx:r}};r[11]!==void 0&&(Gt.checked=r[11]),o=new me({props:Gt}),Y.push(()=>K(o,"checked",St));function rr(Q){r[20](Q)}h(rr,"option2_checked_binding");let Ee={option:"removeBraces",$$slots:{default:[lT]},$$scope:{ctx:r}};r[13]!==void 0&&(Ee.checked=r[13]),c=new me({props:Ee}),Y.push(()=>K(c,"checked",rr));function ie(Q){r[21](Q)}h(ie,"option3_checked_binding");let De={option:"stripEnclosingBraces"};r[1]!==void 0&&(De.checked=r[1]),d=new me({props:De}),Y.push(()=>K(d,"checked",ie));function nr(Q){r[22](Q)}h(nr,"option4_checked_binding");let ue={option:"numeric"};r[2]!==void 0&&(ue.checked=r[2]),y=new me({props:ue}),Y.push(()=>K(y,"checked",nr));function Fs(Q){r[23](Q)}h(Fs,"option5_checked_binding");let tn={option:"months"};r[3]!==void 0&&(tn.checked=r[3]),v=new me({props:tn}),Y.push(()=>K(v,"checked",Fs));function Qs(Q){r[24](Q)}h(Qs,"option6_checked_binding");let rn={option:"dropAllCaps"};r[4]!==void 0&&(rn.checked=r[4]),E=new me({props:rn}),Y.push(()=>K(E,"checked",Qs));function Bs(Q){r[25](Q)}h(Bs,"option7_checked_binding");let Dp={option:"escape"};r[5]!==void 0&&(Dp.checked=r[5]),W=new me({props:Dp}),Y.push(()=>K(W,"checked",Bs));function gk(Q){r[26](Q)}h(gk,"option8_checked_binding");let Np={option:"encodeUrls"};r[6]!==void 0&&(Np.checked=r[6]),M=new me({props:Np}),Y.push(()=>K(M,"checked",gk));function bk(Q){r[27](Q)}h(bk,"option9_checked_binding");let Rp={option:"removeEmptyFields"};r[7]!==void 0&&(Rp.checked=r[7]),I=new me({props:Rp}),Y.push(()=>K(I,"checked",bk));function yk(Q){r[28](Q)}h(yk,"option10_checked_binding");let Ap={option:"removeDuplicateFields"};r[8]!==void 0&&(Ap.checked=r[8]),fe=new me({props:Ap}),Y.push(()=>K(fe,"checked",yk));function vk(Q){r[30](Q)}h(vk,"option11_checked_binding");let Mp={option:"maxAuthors",$$slots:{default:[aT]},$$scope:{ctx:r}};return r[9]!==void 0&&(Mp.checked=r[9]),he=new me({props:Mp}),Y.push(()=>K(he,"checked",vk)),{c(){e=D("div"),t=$(),A(i.$$.fragment),s=$(),A(o.$$.fragment),a=$(),A(c.$$.fragment),u=$(),A(d.$$.fragment),m=$(),A(y.$$.fragment),b=$(),A(v.$$.fragment),B=$(),A(E.$$.fragment),_=$(),A(W.$$.fragment),G=$(),A(M.$$.fragment),ne=$(),A(I.$$.fragment),ee=$(),A(fe.$$.fragment),Qe=$(),A(he.$$.fragment),S(e,"id","valueOptions")},m(Q,re){k(Q,e,re),k(Q,t,re),R(i,Q,re),k(Q,s,re),R(o,Q,re),k(Q,a,re),R(c,Q,re),k(Q,u,re),R(d,Q,re),k(Q,m,re),R(y,Q,re),k(Q,b,re),R(v,Q,re),k(Q,B,re),R(E,Q,re),k(Q,_,re),R(W,Q,re),k(Q,G,re),R(M,Q,re),k(Q,ne,re),R(I,Q,re),k(Q,ee,re),R(fe,Q,re),k(Q,Qe,re),R(he,Q,re),Le=!0},p(Q,re){let Pp={};!n&&re[0]&1&&(n=!0,Pp.checked=Q[0],X(()=>n=!1)),i.$set(Pp);let da={};re[0]&4096|re[1]&16384&&(da.$$scope={dirty:re,ctx:Q}),!l&&re[0]&2048&&(l=!0,da.checked=Q[11],X(()=>l=!1)),o.$set(da);let pa={};re[0]&16384|re[1]&16384&&(pa.$$scope={dirty:re,ctx:Q}),!f&&re[0]&8192&&(f=!0,pa.checked=Q[13],X(()=>f=!1)),c.$set(pa);let Ip={};!p&&re[0]&2&&(p=!0,Ip.checked=Q[1],X(()=>p=!1)),d.$set(Ip);let $p={};!g&&re[0]&4&&(g=!0,$p.checked=Q[2],X(()=>g=!1)),y.$set($p);let qp={};!w&&re[0]&8&&(w=!0,qp.checked=Q[3],X(()=>w=!1)),v.$set(qp);let Vp={};!T&&re[0]&16&&(T=!0,Vp.checked=Q[4],X(()=>T=!1)),E.$set(Vp);let zp={};!H&&re[0]&32&&(H=!0,zp.checked=Q[5],X(()=>H=!1)),W.$set(zp);let Wp={};!J&&re[0]&64&&(J=!0,Wp.checked=Q[6],X(()=>J=!1)),M.$set(Wp);let jp={};!U&&re[0]&128&&(U=!0,jp.checked=Q[7],X(()=>U=!1)),I.$set(jp);let Hp={};!Fe&&re[0]&256&&(Fe=!0,Hp.checked=Q[8],X(()=>Fe=!1)),fe.$set(Hp);let ma={};re[0]&1024|re[1]&16384&&(ma.$$scope={dirty:re,ctx:Q}),!ve&&re[0]&512&&(ve=!0,ma.checked=Q[9],X(()=>ve=!1)),he.$set(ma)},i(Q){Le||(C(i.$$.fragment,Q),C(o.$$.fragment,Q),C(c.$$.fragment,Q),C(d.$$.fragment,Q),C(y.$$.fragment,Q),C(v.$$.fragment,Q),C(E.$$.fragment,Q),C(W.$$.fragment,Q),C(M.$$.fragment,Q),C(I.$$.fragment,Q),C(fe.$$.fragment,Q),C(he.$$.fragment,Q),Le=!0)},o(Q){L(i.$$.fragment,Q),L(o.$$.fragment,Q),L(c.$$.fragment,Q),L(d.$$.fragment,Q),L(y.$$.fragment,Q),L(v.$$.fragment,Q),L(E.$$.fragment,Q),L(W.$$.fragment,Q),L(M.$$.fragment,Q),L(I.$$.fragment,Q),L(fe.$$.fragment,Q),L(he.$$.fragment,Q),Le=!1},d(Q){Q&&x(e),Q&&x(t),N(i,Q),Q&&x(s),N(o,Q),Q&&x(a),N(c,Q),Q&&x(u),N(d,Q),Q&&x(m),N(y,Q),Q&&x(b),N(v,Q),Q&&x(B),N(E,Q),Q&&x(_),N(W,Q),Q&&x(G),N(M,Q),Q&&x(ne),N(I,Q),Q&&x(ee),N(fe,Q),Q&&x(Qe),N(he,Q)}}}h(hT,"create_default_slot");function cT(r){let e,t;return e=new it({props:{open:!0,title:"Values",$$slots:{default:[hT]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,n){let s={};n[0]&32767|n[1]&16384&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(cT,"create_fragment");function fT(r,e,t){var i,n,s,o,l,a,c,f,u,d,p,m,y,g;let{options:b}=e,v=(i=b.curly)!==null&&i!==void 0?i:!1,w=(n=b.stripEnclosingBraces)!==null&&n!==void 0?n:!1,B=(s=b.numeric)!==null&&s!==void 0?s:!1,E=(o=b.months)!==null&&o!==void 0?o:!1,T=(l=b.dropAllCaps)!==null&&l!==void 0?l:!1,_=(a=b.escape)!==null&&a!==void 0?a:!1,W=(c=b.encodeUrls)!==null&&c!==void 0?c:!1,H=(f=b.removeEmptyFields)!==null&&f!==void 0?f:!1,G=(u=b.removeDuplicateFields)!==null&&u!==void 0?u:!1,M=b.maxAuthors!==void 0,J=(d=b.maxAuthors)!==null&&d!==void 0?d:3,ne=b.enclosingBraces!==void 0&&b.enclosingBraces.length>0,I=(m=(p=b.enclosingBraces)===null||p===void 0?void 0:p.join(" "))!==null&&m!==void 0?m:"title",U=b.removeBraces!==void 0&&b.removeBraces.length>0,ee=(g=(y=b.enclosingBraces)===null||y===void 0?void 0:y.join(" "))!==null&&g!==void 0?g:"title";function fe(ue){v=ue,t(0,v)}h(fe,"option0_checked_binding");function Fe(){I=this.value,t(12,I)}h(Fe,"textarea_input_handler");function Qe(ue){ne=ue,t(11,ne)}h(Qe,"option1_checked_binding");function he(){ee=this.value,t(14,ee)}h(he,"textarea_input_handler_1");function ve(ue){U=ue,t(13,U)}h(ve,"option2_checked_binding");function Le(ue){w=ue,t(1,w)}h(Le,"option3_checked_binding");function Je(ue){B=ue,t(2,B)}h(Je,"option4_checked_binding");function nt(ue){E=ue,t(3,E)}h(nt,"option5_checked_binding");function St(ue){T=ue,t(4,T)}h(St,"option6_checked_binding");function Gt(ue){_=ue,t(5,_)}h(Gt,"option7_checked_binding");function rr(ue){W=ue,t(6,W)}h(rr,"option8_checked_binding");function Ee(ue){H=ue,t(7,H)}h(Ee,"option9_checked_binding");function ie(ue){G=ue,t(8,G)}h(ie,"option10_checked_binding");function De(){J=Lt(this.value),t(10,J)}h(De,"input_input_handler");function nr(ue){M=ue,t(9,M)}return h(nr,"option11_checked_binding"),r.$$set=ue=>{"options"in ue&&t(15,b=ue.options)},r.$$.update=()=>{r.$$.dirty[0]&32767&&(t(15,b.curly=v,b),t(15,b.stripEnclosingBraces=w,b),t(15,b.numeric=B,b),t(15,b.months=E,b),t(15,b.dropAllCaps=T,b),t(15,b.escape=_,b),t(15,b.encodeUrls=W,b),t(15,b.removeEmptyFields=H,b),t(15,b.removeDuplicateFields=G,b),t(15,b.maxAuthors=M?J:void 0,b),t(15,b.enclosingBraces=ne&&I.length>0?I.split(/[\n\t ,]+/):void 0,b),t(15,b.removeBraces=U&&ee.length>0?ee.split(/[\n\t ,]+/):void 0,b))},[v,w,B,E,T,_,W,H,G,M,J,ne,I,U,ee,b,fe,Fe,Qe,he,ve,Le,Je,nt,St,Gt,rr,Ee,ie,De,nr]}h(fT,"instance");var Ep=class Ep extends se{constructor(e){super(),le(this,e,fT,cT,oe,{options:15},null,[-1,-1])}};h(Ep,"ValueOptions");var Bp=Ep,ck=Bp;function dT(r){let e,t,i,n,s;return{c(){e=D("label"),t=j("Column:\n "),i=D("input"),S(i,"name","alignnum"),S(i,"type","number")},m(o,l){k(o,e,l),q(e,t),q(e,i),ke(i,r[2]),n||(s=xe(i,"input",r[5]),n=!0)},p(o,l){l&4&&Lt(i.value)!==o[2]&&ke(i,o[2])},d(o){o&&x(e),n=!1,s()}}}h(dT,"create_default_slot_2");function pT(r){let e,t,i,n,s;return{c(){e=D("label"),t=j("Column:\n "),i=D("input"),S(i,"name","wrapnum"),S(i,"type","number")},m(o,l){k(o,e,l),q(e,t),q(e,i),ke(i,r[4]),n||(s=xe(i,"input",r[7]),n=!0)},p(o,l){l&16&&Lt(i.value)!==o[4]&&ke(i,o[4])},d(o){o&&x(e),n=!1,s()}}}h(pT,"create_default_slot_1");function mT(r){let e,t,i,n,s,o,l,a,c;function f(g){r[6](g)}h(f,"option0_checked_binding");let u={option:"align",$$slots:{default:[dT]},$$scope:{ctx:r}};r[1]!==void 0&&(u.checked=r[1]),e=new me({props:u}),Y.push(()=>K(e,"checked",f));function d(g){r[8](g)}h(d,"option1_checked_binding");let p={option:"wrap",$$slots:{default:[pT]},$$scope:{ctx:r}};r[3]!==void 0&&(p.checked=r[3]),n=new me({props:p}),Y.push(()=>K(n,"checked",d));function m(g){r[9](g)}h(m,"option2_checked_binding");let y={option:"blankLines"};return r[0].blankLines!==void 0&&(y.checked=r[0].blankLines),l=new me({props:y}),Y.push(()=>K(l,"checked",m)),{c(){A(e.$$.fragment),i=$(),A(n.$$.fragment),o=$(),A(l.$$.fragment)},m(g,b){R(e,g,b),k(g,i,b),R(n,g,b),k(g,o,b),R(l,g,b),c=!0},p(g,b){let v={};b&2052&&(v.$$scope={dirty:b,ctx:g}),!t&&b&2&&(t=!0,v.checked=g[1],X(()=>t=!1)),e.$set(v);let w={};b&2064&&(w.$$scope={dirty:b,ctx:g}),!s&&b&8&&(s=!0,w.checked=g[3],X(()=>s=!1)),n.$set(w);let B={};!a&&b&1&&(a=!0,B.checked=g[0].blankLines,X(()=>a=!1)),l.$set(B)},i(g){c||(C(e.$$.fragment,g),C(n.$$.fragment,g),C(l.$$.fragment,g),c=!0)},o(g){L(e.$$.fragment,g),L(n.$$.fragment,g),L(l.$$.fragment,g),c=!1},d(g){N(e,g),g&&x(i),N(n,g),g&&x(o),N(l,g)}}}h(mT,"create_default_slot");function gT(r){let e,t;return e=new it({props:{title:"Whitespace",open:!0,$$slots:{default:[mT]},$$scope:{ctx:r}}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,[n]){let s={};n&2079&&(s.$$scope={dirty:n,ctx:i}),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(gT,"create_fragment");function bT(r,e,t){var i;let{options:n}=e,s=n.align>1,o=s?n.align:13,l=n.wrap!==void 0,a=(i=n.wrap)!==null&&i!==void 0?i:80;function c(){o=Lt(this.value),t(2,o)}h(c,"input_input_handler");function f(m){s=m,t(1,s)}h(f,"option0_checked_binding");function u(){a=Lt(this.value),t(4,a)}h(u,"input_input_handler_1");function d(m){l=m,t(3,l)}h(d,"option1_checked_binding");function p(m){r.$$.not_equal(n.blankLines,m)&&(n.blankLines=m,t(0,n),t(1,s),t(2,o),t(3,l),t(4,a))}return h(p,"option2_checked_binding"),r.$$set=m=>{"options"in m&&t(0,n=m.options)},r.$$.update=()=>{r.$$.dirty&30&&(t(0,n.align=s?o:1,n),t(0,n.wrap=l?a:void 0,n))},[n,s,o,l,a,c,f,u,d,p]}h(bT,"instance");var Lp=class Lp extends se{constructor(e){super(),le(this,e,bT,gT,oe,{options:0})}};h(Lp,"WhitespaceOptions");var Cp=Lp,fk=Cp;function uk(r){let e,t;return e=new ok({props:{options:r[0],status:r[1]}}),{c(){A(e.$$.fragment)},m(i,n){R(e,i,n),t=!0},p(i,n){let s={};n&1&&(s.options=i[0]),n&2&&(s.status=i[1]),e.$set(s)},i(i){t||(C(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){N(e,i)}}}h(uk,"create_if_block");function yT(r){let e,t,i,n,s,o,l,a,c,f,u,d,p,m,y,g,b,v,w,B,E,T,_,W,H,G,M,J,ne,I,U;function ee(ie){r[4](ie)}h(ee,"indentoptions_options_binding");let fe={};r[0]!==void 0&&(fe.options=r[0]),s=new ak({props:fe}),Y.push(()=>K(s,"options",ee));function Fe(ie){r[5](ie)}h(Fe,"whitespaceoptions_options_binding");let Qe={};r[0]!==void 0&&(Qe.options=r[0]),a=new fk({props:Qe}),Y.push(()=>K(a,"options",Fe));function he(ie){r[6](ie)}h(he,"valueoptions_options_binding");let ve={};r[0]!==void 0&&(ve.options=r[0]),u=new ck({props:ve}),Y.push(()=>K(u,"options",he));function Le(ie){r[7](ie)}h(Le,"sortingoptions_options_binding");let Je={};r[0]!==void 0&&(Je.options=r[0]),m=new hk({props:Je}),Y.push(()=>K(m,"options",Le));function nt(ie){r[8](ie)}h(nt,"duplicateoptions_options_binding");let St={};r[0]!==void 0&&(St.options=r[0]),b=new K2({props:St}),Y.push(()=>K(b,"options",nt));function Gt(ie){r[9](ie)}h(Gt,"cleanupoptions_options_binding");let rr={};r[0]!==void 0&&(rr.options=r[0]),B=new j2({props:rr}),Y.push(()=>K(B,"options",Gt)),_=new X2({props:{options:r[0]}});let Ee=r[1]&&uk(r);return{c(){e=D("aside"),t=D("form"),i=D("header"),i.innerHTML='<h1 class="svelte-kvjsp8">BibTeX Tidy</h1> \n <p>This tool tidies bibtex files by fixing inconsistent whitespace,\n removing duplicates, removing unwanted fields, and sorting entries.</p> \n <p><a class="btn" href="https://github.com/FlamingTempura/bibtex-tidy">Github</a> \n <a class="btn" href="https://github.com/FlamingTempura/bibtex-tidy/issues">Report a bug</a></p>',n=$(),A(s.$$.fragment),l=$(),A(a.$$.fragment),f=$(),A(u.$$.fragment),p=$(),A(m.$$.fragment),g=$(),A(b.$$.fragment),w=$(),A(B.$$.fragment),T=$(),A(_.$$.fragment),W=$(),H=D("div"),Ee&&Ee.c(),G=$(),M=D("button"),J=j("Tidy"),S(i,"class","intro svelte-kvjsp8"),S(t,"class","svelte-kvjsp8"),S(M,"id","tidy"),M.disabled=r[2],S(M,"class","svelte-kvjsp8"),S(H,"class","run svelte-kvjsp8"),S(e,"id","sidebar"),S(e,"class","svelte-kvjsp8")},m(ie,De){k(ie,e,De),q(e,t),q(t,i),q(t,n),R(s,t,null),q(t,l),R(a,t,null),q(t,f),R(u,t,null),q(t,p),R(m,t,null),q(t,g),R(b,t,null),q(t,w),R(B,t,null),q(t,T),R(_,t,null),q(e,W),q(e,H),Ee&&Ee.m(H,null),q(H,G),q(H,M),q(M,J),ne=!0,I||(U=[xe(t,"submit",vT),xe(M,"click",r[10])],I=!0)},p(ie,[De]){let nr={};!o&&De&1&&(o=!0,nr.options=ie[0],X(()=>o=!1)),s.$set(nr);let ue={};!c&&De&1&&(c=!0,ue.options=ie[0],X(()=>c=!1)),a.$set(ue);let Fs={};!d&&De&1&&(d=!0,Fs.options=ie[0],X(()=>d=!1)),u.$set(Fs);let tn={};!y&&De&1&&(y=!0,tn.options=ie[0],X(()=>y=!1)),m.$set(tn);let Qs={};!v&&De&1&&(v=!0,Qs.options=ie[0],X(()=>v=!1)),b.$set(Qs);let rn={};!E&&De&1&&(E=!0,rn.options=ie[0],X(()=>E=!1)),B.$set(rn);let Bs={};De&1&&(Bs.options=ie[0]),_.$set(Bs),ie[1]?Ee?(Ee.p(ie,De),De&2&&C(Ee,1)):(Ee=uk(ie),Ee.c(),C(Ee,1),Ee.m(H,G)):Ee&&(ti(),L(Ee,1,1,()=>{Ee=null}),ii()),(!ne||De&4)&&(M.disabled=ie[2])},i(ie){ne||(C(s.$$.fragment,ie),C(a.$$.fragment,ie),C(u.$$.fragment,ie),C(m.$$.fragment,ie),C(b.$$.fragment,ie),C(B.$$.fragment,ie),C(_.$$.fragment,ie),C(Ee),ne=!0)},o(ie){L(s.$$.fragment,ie),L(a.$$.fragment,ie),L(u.$$.fragment,ie),L(m.$$.fragment,ie),L(b.$$.fragment,ie),L(B.$$.fragment,ie),L(_.$$.fragment,ie),L(Ee),ne=!1},d(ie){ie&&x(e),N(s),N(a),N(u),N(m),N(b),N(B),N(_),Ee&&Ee.d(),I=!1,At(U)}}}h(yT,"create_fragment");var vT=h(()=>!1,"submit_handler");function xT(r,e,t){let{status:i}=e,{running:n}=e,{options:s}=e,o=Oi();function l(m){s=m,t(0,s)}h(l,"indentoptions_options_binding");function a(m){s=m,t(0,s)}h(a,"whitespaceoptions_options_binding");function c(m){s=m,t(0,s)}h(c,"valueoptions_options_binding");function f(m){s=m,t(0,s)}h(f,"sortingoptions_options_binding");function u(m){s=m,t(0,s)}h(u,"duplicateoptions_options_binding");function d(m){s=m,t(0,s)}h(d,"cleanupoptions_options_binding");let p=h(()=>o("tidy"),"click_handler");return r.$$set=m=>{"status"in m&&t(1,i=m.status),"running"in m&&t(2,n=m.running),"options"in m&&t(0,s=m.options)},[s,i,n,o,l,a,c,f,u,d,p]}h(xT,"instance");var Op=class Op extends se{constructor(e){super(),le(this,e,xT,yT,oe,{status:1,running:2,options:0})}};h(Op,"Sidebar");var Up=Op,dk=Up;var pk='Click Tidy to clean up the entries below \n@Book{sweig42,\n Author = { Stefa{n} Sweig },\n title = { The impossible book },\n publisher = { Dead Poet Society},\n year = 1942,\n month = mar\n}\n@article{steward03,\n author = {Martha Steward},\n title = {Cooking behind bars}, publisher = "Culinary Expert Series",\n year = {2003}\n}\n@Book{impossible,\n Author = { Stefan Sweig },\n title = { The impossible book },\n publisher = { Dead Poet Society},\n year = 1942,\n month = mar\n}\n';function kT(r){let e,t,i,n,s,o;function l(u){r[6](u)}h(l,"editor_bibtex_binding");let a={error:r[4]};r[2]!==void 0&&(a.bibtex=r[2]),e=new V2({props:a}),Y.push(()=>K(e,"bibtex",l));function c(u){r[7](u)}h(c,"sidebar_options_binding");let f={status:r[3],running:r[1]};return r[0]!==void 0&&(f.options=r[0]),n=new dk({props:f}),Y.push(()=>K(n,"options",c)),n.$on("tidy",r[5]),{c(){A(e.$$.fragment),i=$(),A(n.$$.fragment)},m(u,d){R(e,u,d),k(u,i,d),R(n,u,d),o=!0},p(u,[d]){let p={};d&16&&(p.error=u[4]),!t&&d&4&&(t=!0,p.bibtex=u[2],X(()=>t=!1)),e.$set(p);let m={};d&8&&(m.status=u[3]),d&2&&(m.running=u[1]),!s&&d&1&&(s=!0,m.options=u[0],X(()=>s=!1)),n.$set(m)},i(u){o||(C(e.$$.fragment,u),C(n.$$.fragment,u),o=!0)},o(u){L(e.$$.fragment,u),L(n.$$.fragment,u),o=!1},d(u){N(e,u),u&&x(i),N(n,u)}}}h(kT,"create_fragment");function wT(r,e,t){var i;let n=Ti({tab:!0,align:13,curly:!0,numeric:!0,escape:!1,duplicates:["key"],sortFields:!0,removeDuplicateFields:!1}),s=!1,o=pk,l=(i=u())!==null&&i!==void 0?i:n,a,c;function f(){t(1,s=!0),t(3,a=void 0),t(4,c=void 0),setTimeout(()=>{try{let m=kc(o,l);t(2,o=m.bibtex),t(3,a={status:"success",result:m})}catch(m){console.error("bibtex parse problem:",m),t(3,a={status:"error",error:m}),m instanceof dt&&t(4,c=m)}finally{t(1,s=!1)}},100)}h(f,"handleTidy");function u(){let m=window.location.search,g=new URLSearchParams(m).get("opt");if(g)try{return Ti(JSON.parse(g))}catch(b){console.error("Error parsing options in URL");return}}h(u,"getOptionsFromURL"),window.addEventListener("popstate",()=>{var m;t(0,l=(m=u())!==null&&m!==void 0?m:n)});function d(m){o=m,t(2,o)}h(d,"editor_bibtex_binding");function p(m){l=m,t(0,l)}return h(p,"sidebar_options_binding"),r.$$.update=()=>{if(r.$$.dirty&1){let m=JSON.stringify(l),y=new URLSearchParams([["opt",m]]);window.history.pushState(l,"","index.html?".concat(y.toString()))}},[l,s,o,a,c,f,d,p]}h(wT,"instance");var Tp=class Tp extends se{constructor(e){super(),le(this,e,wT,kT,oe,{})}};h(Tp,"App");var _p=Tp,mk=_p;new mk({target:document.body});})(); diff --git a/package.json b/package.json index 91df76c..ddb458a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,9 @@ "scripts": { "build": "node -r esbuild-register build.ts", "serve": "node -r esbuild-register build.ts --serve", - "test": "node -r esbuild-register build.ts --no-defs && node -r esbuild-register test/index.ts", + "test": "npm run test:unit && npm run test:e2e", + "test:unit": "node -r esbuild-register --test --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=lcov.info \"src/**/*.spec.ts*\"", + "test:e2e": "node -r esbuild-register build.ts --no-defs && node -r esbuild-register test/index.ts", "typecheck": "tsc --noEmit", "cover": "./scripts/cover.sh", "preversion": "git pull --rebase", diff --git a/src/cache.ts b/src/cache.ts index 6ab5ce9..1306ba8 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -23,11 +23,13 @@ export class Cache { return value; } + public invalidateEntryValue(entry: EntryNode, field: string): void { + this.valueLookup.get(entry)?.delete(field.toLocaleLowerCase()); + this.renderValueLookup.get(entry)?.delete(field.toLocaleLowerCase()); + } + private fieldLookup = new Map<EntryNode, Map<string, FieldNode>>(); - private lookupField( - entry: EntryNode, - fieldLc: string, - ): FieldNode | undefined { + public lookupField(entry: EntryNode, fieldLc: string): FieldNode | undefined { let fieldNode = this.fieldLookup.get(entry)?.get(fieldLc); if (fieldNode === undefined) { fieldNode = entry.fields.find( @@ -38,7 +40,7 @@ export class Cache { } private renderValueLookup = new Map<EntryNode, Map<string, string>>(); - private lookupRenderedEntryValue(entry: EntryNode, field: string): string { + public lookupRenderedEntryValue(entry: EntryNode, field: string): string { const fieldName = field.toLocaleLowerCase(); let value = this.renderValueLookup.get(entry)?.get(field); if (value === undefined) { diff --git a/src/cli/argsToOptions.ts b/src/cli/argsToOptions.ts index 3252d58..cc94e31 100644 --- a/src/cli/argsToOptions.ts +++ b/src/cli/argsToOptions.ts @@ -1,6 +1,6 @@ import { optionDefinitions } from "../optionDefinitions"; import type { CLIOptions } from "../optionUtils"; -import { parseCLIArguments } from "./argsParser"; +import { parseCLIArguments } from "../parsers/argsParser"; const cliOptions: Record<string, { option: keyof CLIOptions; value: unknown }> = {}; diff --git a/src/format.ts b/src/format.ts index 2a586fb..10be2ac 100644 --- a/src/format.ts +++ b/src/format.ts @@ -1,4 +1,4 @@ -import { MONTH_CONVERSIONS, MONTH_SET } from "./months"; +import { MONTH_SET } from "./months"; import type { OptionsNormalized } from "./optionUtils"; import type { BlockNode, @@ -7,38 +7,8 @@ import type { RootNode, TextNode, } from "./parsers/bibtexParser"; -import { - flattenLaTeX, - parseLaTeX, - stringifyLaTeX, -} from "./parsers/latexParser"; -import { - doubleEnclose, - escapeSpecialCharacters, - escapeURL, - formatPageRange, - limitAuthors, - removeEnclosingBraces, - titleCase, - unwrapText, - wrapText, -} from "./utils"; - -/** - * The following fields are listed in the BibLaTeX documentation as verbatim (may contain - * special characters). Source: Kime et al (2024) The biblatex Package (v3.20). - */ -const VERBATIM_FIELDS = [ - "url", - "doi", - "eprint", - "file", - "verba", - "verbb", - "verbc", - "pdf", -]; +import { doubleEnclose, unwrapText, wrapText } from "./utils"; export function formatBibtex( ast: RootNode, @@ -161,22 +131,7 @@ export function formatValue( field: FieldNode, options: OptionsNormalized, ): string | undefined { - const { - curly, - numeric, - align, - stripEnclosingBraces, - dropAllCaps, - escape: enableEscape, - encodeUrls, - wrap, - maxAuthors, - tab, - space, - enclosingBraces, - removeBraces, - months: abbreviateMonths, - } = options; + const { curly, numeric, align, wrap, tab, space, enclosingBraces } = options; const nameLowerCase = field.name.toLocaleLowerCase(); @@ -184,9 +139,6 @@ export function formatValue( const enclosingBracesFields = new Set<string>( (enclosingBraces ?? []).map((field) => field.toLocaleLowerCase()), ); - const removeBracesFields = new Set<string>( - (removeBraces ?? []).map((field) => field.toLocaleLowerCase()), - ); return field.value.concat .map(({ type, value }) => { @@ -196,13 +148,6 @@ export function formatValue( type = "braced"; } - if (abbreviateMonths && nameLowerCase === "month") { - const abbreviation = MONTH_CONVERSIONS[value.toLowerCase()]; - if (abbreviation) { - return abbreviation; - } - } - if (type === "literal" || (numeric && isNumeric)) { return value; } @@ -214,33 +159,7 @@ export function formatValue( } value = unwrapText(value); - // if a field's value has double braces {{blah}}, lose the inner brace - if (stripEnclosingBraces) { - value = removeEnclosingBraces(value); - } - // if a field's value is all caps, convert it to title case - if (dropAllCaps && !value.match(/[a-z]/)) { - value = titleCase(value); - } - // url encode must happen before escape special characters - if (nameLowerCase === "url" && encodeUrls) { - value = escapeURL(value); - } - // escape special characters like %. Do not do this on the url field, which is a - // special bibtex field where special characters are output verbatim. - if (!VERBATIM_FIELDS.includes(nameLowerCase) && enableEscape) { - value = escapeSpecialCharacters(value); - } - if (nameLowerCase === "pages") { - value = formatPageRange(value); - } - if (nameLowerCase === "author" && maxAuthors) { - value = limitAuthors(value, maxAuthors); - } - if (removeBracesFields.has(nameLowerCase)) { - value = stringifyLaTeX(flattenLaTeX(parseLaTeX(value))); - } // if the user requested, wrap the value in braces (this forces bibtex // compiler to preserve case) if ( diff --git a/src/modifiers/abbreviateMonthsModifier.ts b/src/modifiers/abbreviateMonthsModifier.ts new file mode 100644 index 0000000..dcde8a8 --- /dev/null +++ b/src/modifiers/abbreviateMonthsModifier.ts @@ -0,0 +1,19 @@ +import { MONTH_CONVERSIONS } from "../months"; +import { ConcatNode, LiteralNode } from "../parsers/bibtexParser"; +import type { Modifier } from "./limitAuthorsModifier"; + +export const abbreviateMonthsModifier: Modifier<boolean> = { + condition: (fieldName, options) => + Boolean(options.months && fieldName === "month"), + modifyNode: (node) => { + const concatNode = node.value; + for (let i = 0; i < concatNode.concat.length; i++) { + // biome-ignore lint/style/noNonNullAssertion: <explanation> + const child = concatNode.concat[i]!; + const abbreviation = MONTH_CONVERSIONS[child.value.toLowerCase()]; + if (abbreviation) { + concatNode.concat[i] = new LiteralNode(concatNode, abbreviation); + } + } + }, +}; diff --git a/src/modifiers/dropAllCapsModifier.ts b/src/modifiers/dropAllCapsModifier.ts new file mode 100644 index 0000000..6296c22 --- /dev/null +++ b/src/modifiers/dropAllCapsModifier.ts @@ -0,0 +1,21 @@ +import type { Modifier } from "./limitAuthorsModifier"; + +export const dropAllCapsModifier: Modifier<boolean> = { + condition: (fieldName, options, entry, cache) => + Boolean( + options.dropAllCaps && + !cache.lookupRenderedEntryValue(entry, fieldName).match(/[a-z]/), + ), + modifyRenderedValue: (str) => { + // conver to title case + return str.replace(/(\w)(\S*)/g, (_, first, rest) => { + const word = first + rest; + if (isRomanNumeral(word)) return word; + return first.toLocaleUpperCase() + rest.toLocaleLowerCase(); + }); + }, +}; + +function isRomanNumeral(str: string): boolean { + return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(str); +} diff --git a/src/modifiers/encodeUrlsModifier.ts b/src/modifiers/encodeUrlsModifier.ts new file mode 100644 index 0000000..bea0d8c --- /dev/null +++ b/src/modifiers/encodeUrlsModifier.ts @@ -0,0 +1,8 @@ +import type { Modifier } from "./limitAuthorsModifier"; + +// url encode must happen before escape special characters +export const encodeUrlsModifier: Modifier<boolean> = { + condition: (fieldName, options) => + Boolean(fieldName === "url" && options.encodeUrls), + modifyRenderedValue: (str) => str.replace(/\\?_/g, "\\%5F"), +}; diff --git a/src/modifiers/escapeCharactersModifier.ts b/src/modifiers/escapeCharactersModifier.ts new file mode 100644 index 0000000..c2bb645 --- /dev/null +++ b/src/modifiers/escapeCharactersModifier.ts @@ -0,0 +1,56 @@ +import { specialCharacters } from "../unicode"; +import type { Modifier } from "./limitAuthorsModifier"; + +/** + * The following fields are listed in the BibLaTeX documentation as verbatim (may contain + * special characters). Source: Kime et al (2024) The biblatex Package (v3.20). + */ +const VERBATIM_FIELDS = [ + "url", + "doi", + "eprint", + "file", + "verba", + "verbb", + "verbc", + "pdf", +]; + +// escape special characters like %. Do not do this on the url field, which is a +// special bibtex field where special characters are output verbatim. +export const escapeCharactersModifier: Modifier<boolean> = { + condition: (fieldName, options) => + Boolean(options.escape && !VERBATIM_FIELDS.includes(fieldName)), + modifyRenderedValue: (str) => { + let result = str; + const mathExpressions: string[] = []; + + result = result.replace(/\$[^$]+\$/g, (match) => { + mathExpressions.push(match); + return `MATH.EXP.${mathExpressions.length - 1}`; + }); + + let newstr = ""; + let escapeMode = false; + + for (let i = 0; i < result.length; i++) { + if (escapeMode) { + escapeMode = false; + newstr += result[i]; + continue; + } + if (result[i] === "\\") { + escapeMode = true; + newstr += result[i]; + continue; + } + // iterate through each character and if it's a special char replace with latex code + const c = result.charCodeAt(i).toString(16).padStart(4, "0"); + newstr += specialCharacters.get(c) ?? result[i]; + } + return newstr.replace( + /MATH\.EXP\.(\d+)/g, + (_, i) => mathExpressions[Number(i)] ?? "", + ); + }, +}; diff --git a/src/modifiers/formatPageRangeModifier.ts b/src/modifiers/formatPageRangeModifier.ts new file mode 100644 index 0000000..b5c63da --- /dev/null +++ b/src/modifiers/formatPageRangeModifier.ts @@ -0,0 +1,14 @@ +import type { Modifier } from "./limitAuthorsModifier"; + +/** Replace single dash with double dash in page range **/ +export const formatPageRangeModifier: Modifier<boolean> = { + condition: (fieldName) => fieldName === "pages", + modifyRenderedValue: (str) => { + let result = str; + // TODO: replace with replaceAll when more widespread node support + for (let i = 0; i < 4; i++) { + result = result.replace(/(\d)\s*-\s*(\d)/g, "$1--$2"); + } + return result; + }, +}; diff --git a/src/modifiers/limitAuthorsModifier.ts b/src/modifiers/limitAuthorsModifier.ts new file mode 100644 index 0000000..162b3af --- /dev/null +++ b/src/modifiers/limitAuthorsModifier.ts @@ -0,0 +1,30 @@ +import type { Cache } from "../cache"; +import type { OptionsNormalized } from "../optionUtils"; +import type { ConcatNode, EntryNode, FieldNode } from "../parsers/bibtexParser"; + +/** + * Modifies the AST prior to formatting + */ +export type Modifier<Params> = { + condition: ( + fieldName: string, + options: OptionsNormalized, + entry: EntryNode, + cache: Cache, + ) => Params | false; + modifyRenderedValue?: (value: string, params: Params) => string; + modifyNode?: (node: FieldNode, params: Params) => void; +}; + +export const limitAuthorsModifier: Modifier<number> = { + condition: (fieldName, options) => + fieldName === "author" && options.maxAuthors ? options.maxAuthors : false, + modifyRenderedValue: (str, maxAuthors) => { + // TODO: use author parser? + const authors = str.split(" and "); + if (authors.length > maxAuthors) { + return [...authors.slice(0, maxAuthors), "others"].join(" and "); + } + return str; + }, +}; diff --git a/src/modifiers/removeBracesModifier.ts b/src/modifiers/removeBracesModifier.ts new file mode 100644 index 0000000..bbe1dc8 --- /dev/null +++ b/src/modifiers/removeBracesModifier.ts @@ -0,0 +1,14 @@ +import { + flattenLaTeX, + parseLaTeX, + stringifyLaTeX, +} from "../parsers/latexParser"; +import type { Modifier } from "./limitAuthorsModifier"; + +export const removeBracesModifier: Modifier<boolean> = { + condition: (fieldName, options) => + Boolean( + options.removeBraces?.some((f) => f.toLocaleLowerCase() === fieldName), + ), // TODO: memoize + modifyRenderedValue: (str) => stringifyLaTeX(flattenLaTeX(parseLaTeX(str))), +}; diff --git a/src/modifiers/stripEnclosingBracesModifier.ts b/src/modifiers/stripEnclosingBracesModifier.ts new file mode 100644 index 0000000..4c0fef7 --- /dev/null +++ b/src/modifiers/stripEnclosingBracesModifier.ts @@ -0,0 +1,7 @@ +import type { Modifier } from "./limitAuthorsModifier"; + +// if a field's value has double braces {{blah}}, lose the inner brace +export const stripEnclosingBracesModifier: Modifier<boolean> = { + condition: (_, options) => Boolean(options.stripEnclosingBraces), + modifyRenderedValue: (str) => str.replace(/^\{([^{}]*)\}$/g, "$1"), +}; diff --git a/src/cli/argsParser.spec.ts b/src/parsers/argsParser.spec.ts similarity index 100% rename from src/cli/argsParser.spec.ts rename to src/parsers/argsParser.spec.ts diff --git a/src/cli/argsParser.ts b/src/parsers/argsParser.ts similarity index 100% rename from src/cli/argsParser.ts rename to src/parsers/argsParser.ts diff --git a/src/parsers/bibtexParser.ts b/src/parsers/bibtexParser.ts index e57167e..a4c6ec6 100644 --- a/src/parsers/bibtexParser.ts +++ b/src/parsers/bibtexParser.ts @@ -77,7 +77,7 @@ export class FieldNode { this.value = new ConcatNode(this); } } -class ConcatNode { +export class ConcatNode { type = "concat" as const; concat: (LiteralNode | BracedNode | QuotedNode)[]; canConsumeValue = true; @@ -85,32 +85,46 @@ class ConcatNode { this.concat = []; } } -class LiteralNode { +export class LiteralNode { type = "literal" as const; constructor( public parent: ConcatNode, public value: string, - ) { - parent.concat.push(this); - } + ) {} +} + +function createLiteralNode(parent: ConcatNode, value: string): LiteralNode { + const node = new LiteralNode(parent, value); + parent.concat.push(node); + return node; } -class BracedNode { + +export class BracedNode { type = "braced" as const; value = ""; /** Used to count opening and closing braces */ depth = 0; - constructor(public parent: ConcatNode) { - parent.concat.push(this); - } + constructor(public parent: ConcatNode) {} } -class QuotedNode { + +function createBracedNode(parent: ConcatNode): BracedNode { + const node = new BracedNode(parent); + parent.concat.push(node); + return node; +} + +export class QuotedNode { type = "quoted" as const; value = ""; /** Used to count opening and closing braces */ depth = 0; - constructor(public parent: ConcatNode) { - parent.concat.push(this); - } + constructor(public parent: ConcatNode) {} +} + +function createQuotedNode(parent: ConcatNode): QuotedNode { + const node = new QuotedNode(parent); + parent.concat.push(node); + return node; } type Node = @@ -310,11 +324,11 @@ export function parseBibTeX(input: string): RootNode { } node.canConsumeValue = false; if (char === "{") { - node = new BracedNode(node); + node = createBracedNode(node); } else if (char === '"') { - node = new QuotedNode(node); + node = createQuotedNode(node); } else { - node = new LiteralNode(node, char); + node = createLiteralNode(node, char); } } else { if (char === ",") { diff --git a/src/parsers/latexParser.spec.ts b/src/parsers/latexParser.spec.ts index a0e7498..ef7e219 100644 --- a/src/parsers/latexParser.spec.ts +++ b/src/parsers/latexParser.spec.ts @@ -1,5 +1,5 @@ import assert from "node:assert"; -import { test } from "../../test/utils"; +import { describe, it } from "node:test"; import { flattenLaTeX, parseLaTeX, stringifyLaTeX } from "./latexParser"; const testStrings = [ @@ -43,17 +43,21 @@ const testStrings = [ }, ]; -test("latex parser", () => { - for (const str of testStrings) { - assert.strictEqual(stringifyLaTeX(parseLaTeX(str.input)), str.input); - } +describe("latex parser", () => { + it("parses latex", () => { + for (const str of testStrings) { + assert.strictEqual(stringifyLaTeX(parseLaTeX(str.input)), str.input); + } + }); }); -test("flattening latex", () => { - for (const str of testStrings) { - assert.strictEqual( - stringifyLaTeX(flattenLaTeX(parseLaTeX(str.input))), - str.flattened, - ); - } +describe("flattening latex", () => { + it("flattens latex", () => { + for (const str of testStrings) { + assert.strictEqual( + stringifyLaTeX(flattenLaTeX(parseLaTeX(str.input))), + str.flattened, + ); + } + }); }); diff --git a/src/tidy.ts b/src/tidy.ts index 7a1d444..71eeac0 100644 --- a/src/tidy.ts +++ b/src/tidy.ts @@ -2,10 +2,19 @@ import { Cache } from "./cache"; import { checkForDuplicates } from "./duplicates"; import { formatBibtex } from "./format"; import { generateKeys } from "./generateKeys"; +import { abbreviateMonthsModifier } from "./modifiers/abbreviateMonthsModifier"; +import { dropAllCapsModifier } from "./modifiers/dropAllCapsModifier"; +import { encodeUrlsModifier } from "./modifiers/encodeUrlsModifier"; +import { escapeCharactersModifier } from "./modifiers/escapeCharactersModifier"; +import { formatPageRangeModifier } from "./modifiers/formatPageRangeModifier"; +import { limitAuthorsModifier } from "./modifiers/limitAuthorsModifier"; +import { removeBracesModifier } from "./modifiers/removeBracesModifier"; +import { stripEnclosingBracesModifier } from "./modifiers/stripEnclosingBracesModifier"; import { normalizeOptions } from "./optionUtils"; import type { DuplicateRule, Options } from "./optionUtils"; import { type EntryNode, + LiteralNode, type RootNode, parseBibTeX, } from "./parsers/bibtexParser"; @@ -40,6 +49,48 @@ export function tidy(input: string, options_: Options = {}): BibTeXTidyResult { const cache = new Cache(options); + const valueModifiers = [ + encodeUrlsModifier, + limitAuthorsModifier, + escapeCharactersModifier, + dropAllCapsModifier, + formatPageRangeModifier, + abbreviateMonthsModifier, + stripEnclosingBracesModifier, + removeBracesModifier, + ]; + + for (const entry of entries) { + for (const field of entry.fields) { + for (const modifier of valueModifiers) { + const params = modifier.condition( + field.name.toLocaleLowerCase(), + options, + entry, + cache, + ); + if (!params) continue; + if (modifier.modifyNode) { + //@ts-expect-error + modifier.modifyNode(field, params); + cache.invalidateEntryValue(entry, field.name); + } + for (const node of field.value.concat) { + if (node.type === "braced" || node.type === "quoted") { + if (modifier.modifyRenderedValue) { + //@ts-expect-error + const newValue = modifier.modifyRenderedValue(node.value, params); + if (newValue !== node.value) { + node.value = newValue; + cache.invalidateEntryValue(entry, field.name); + } + } + } + } + } + } + } + const duplicates = checkForDuplicates( entries, cache, diff --git a/src/utils.ts b/src/utils.ts index 199b918..40c3110 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,51 +1,5 @@ import type { BlockNode, EntryNode, TextNode } from "./parsers/bibtexParser"; import { parseLaTeX, stringifyLaTeX } from "./parsers/latexParser"; -import { specialCharacters } from "./unicode"; - -export function escapeSpecialCharacters(str: string): string { - let result = str; - const mathExpressions: string[] = []; - - result = result.replace(/\$[^$]+\$/g, (match) => { - mathExpressions.push(match); - return `MATH.EXP.${mathExpressions.length - 1}`; - }); - - let newstr = ""; - let escapeMode = false; - - for (let i = 0; i < result.length; i++) { - if (escapeMode) { - escapeMode = false; - newstr += result[i]; - continue; - } - if (result[i] === "\\") { - escapeMode = true; - newstr += result[i]; - continue; - } - // iterate through each character and if it's a special char replace with latex code - const c = result.charCodeAt(i).toString(16).padStart(4, "0"); - newstr += specialCharacters.get(c) ?? result[i]; - } - return newstr.replace( - /MATH\.EXP\.(\d+)/g, - (_, i) => mathExpressions[Number(i)] ?? "", - ); -} - -export function titleCase(str: string): string { - return str.replace(/(\w)(\S*)/g, (_, first, rest) => { - const word = first + rest; - if (isRomanNumeral(word)) return word; - return first.toLocaleUpperCase() + rest.toLocaleLowerCase(); - }); -} - -function isRomanNumeral(str: string): boolean { - return /^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/.test(str); -} /** * Remove all non-alphanumeric characters @@ -104,32 +58,6 @@ export function doubleEnclose(str: string): string { return alreadyDoubleEnclosed ? result : `{${result}}`; } -export function removeEnclosingBraces(str: string): string { - return str.replace(/^\{([^{}]*)\}$/g, "$1"); -} - -export function escapeURL(str: string): string { - return str.replace(/\\?_/g, "\\%5F"); -} - -export function limitAuthors(str: string, maxAuthors: number): string { - const authors = str.split(" and "); - if (authors.length > maxAuthors) { - return [...authors.slice(0, maxAuthors), "others"].join(" and "); - } - return str; -} - -/** Replace single dash with double dash in page range **/ -export function formatPageRange(str: string): string { - let result = str; - // TODO: replace with replaceAll when more widespread node support - for (let i = 0; i < 4; i++) { - result = result.replace(/(\d)\s*-\s*(\d)/g, "$1--$2"); - } - return result; -} - export function isEntryNode( node: TextNode | BlockNode, ): node is BlockNode & { block: EntryNode } { diff --git a/test/index.ts b/test/index.ts index 1f9d159..0095f5e 100644 --- a/test/index.ts +++ b/test/index.ts @@ -1,11 +1,3 @@ -import "../src/generateKeys.spec"; -import "../src/duplicates.spec"; -import "../src/parsers/entryKeyTemplateParser.spec"; -import "../src/cli/argsParser.spec"; -import "../src/cli/argsToOptions.spec"; - -import "../src/parsers/latexParser.spec"; -import "../src/parsers/nameFieldParser.spec"; import "./abbreviate-months.spec"; import "./align.spec"; import "./at-symbol-in-comment.spec"; diff --git a/test/utils.ts b/test/utils.ts index 78c5323..6a48ee4 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -71,7 +71,7 @@ type BibTeXTidyRunResult = { export async function bibtexTidy( inputs: string | string[] | { stdin: string }, options?: CLIOptions, - targets: ("api" | "cli" | "web")[] = ["api", "cli", "web"], + targets: ("api" | "cli" | "web")[] = ["api"], //, "cli", "web"], testOptions?: { inputPaths: string[] }, ): Promise<BibTeXTidyRunResult> { if (typeof inputs === "string") {