diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 8fd2bce3..12790eb9 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -46,6 +46,8 @@ jobs: sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf - name: Install dependencies run: npm ci + - name: Build plugins + run: npm run build:plugins - name: Run tests run: npm test # Pin dev version to get non-default targets diff --git a/.gitignore b/.gitignore index 358ff797..67db6b8d 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,5 @@ dist-ssr *.sqlite *.sqlite-* + +src-tauri/plugins/* diff --git a/src-tauri/plugins/build/filter-jsonpath/index.mjs b/src-tauri/plugins/build/filter-jsonpath/index.mjs deleted file mode 100644 index f778cd30..00000000 --- a/src-tauri/plugins/build/filter-jsonpath/index.mjs +++ /dev/null @@ -1,3191 +0,0 @@ -var Xe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; -function Nt(le) { - return le && le.__esModule && Object.prototype.hasOwnProperty.call(le, "default") ? le.default : le; -} -function Be(le) { - throw new Error('Could not dynamically require "' + le + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); -} -var Ve = { exports: {} }; -/*! jsonpath 1.1.1 */ -(function(le, Ne) { - (function(T) { - le.exports = T(); - })(function() { - return function T(L, B, v) { - function y(E, d) { - if (!B[E]) { - if (!L[E]) { - var a = typeof Be == "function" && Be; - if (!d && a) - return a(E, !0); - if (D) - return D(E, !0); - var o = new Error("Cannot find module '" + E + "'"); - throw o.code = "MODULE_NOT_FOUND", o; - } - var m = B[E] = { exports: {} }; - L[E][0].call(m.exports, function(s) { - var c = L[E][1][s]; - return y(c || s); - }, m, m.exports, T, L, B, v); - } - return B[E].exports; - } - for (var D = typeof Be == "function" && Be, S = 0; S < v.length; S++) - y(v[S]); - return y; - }({ "./aesprim": [function(T, L, B) { - (function(v, y) { - y(typeof B < "u" ? B : v.esprima = {}); - })(this, function(v) { - var y, D, S, E, d, a, o, m, s, c, r, g, b, h, n, i, p, f; - y = { - BooleanLiteral: 1, - EOF: 2, - Identifier: 3, - Keyword: 4, - NullLiteral: 5, - NumericLiteral: 6, - Punctuator: 7, - StringLiteral: 8, - RegularExpression: 9 - }, D = {}, D[y.BooleanLiteral] = "Boolean", D[y.EOF] = "", D[y.Identifier] = "Identifier", D[y.Keyword] = "Keyword", D[y.NullLiteral] = "Null", D[y.NumericLiteral] = "Numeric", D[y.Punctuator] = "Punctuator", D[y.StringLiteral] = "String", D[y.RegularExpression] = "RegularExpression", S = [ - "(", - "{", - "[", - "in", - "typeof", - "instanceof", - "new", - "return", - "case", - "delete", - "throw", - "void", - // assignment operators - "=", - "+=", - "-=", - "*=", - "/=", - "%=", - "<<=", - ">>=", - ">>>=", - "&=", - "|=", - "^=", - ",", - // binary/unary operators - "+", - "-", - "*", - "/", - "%", - "++", - "--", - "<<", - ">>", - ">>>", - "&", - "|", - "^", - "!", - "~", - "&&", - "||", - "?", - ":", - "===", - "==", - ">=", - "<=", - "<", - ">", - "!=", - "!==" - ], E = { - AssignmentExpression: "AssignmentExpression", - ArrayExpression: "ArrayExpression", - BlockStatement: "BlockStatement", - BinaryExpression: "BinaryExpression", - BreakStatement: "BreakStatement", - CallExpression: "CallExpression", - CatchClause: "CatchClause", - ConditionalExpression: "ConditionalExpression", - ContinueStatement: "ContinueStatement", - DoWhileStatement: "DoWhileStatement", - DebuggerStatement: "DebuggerStatement", - EmptyStatement: "EmptyStatement", - ExpressionStatement: "ExpressionStatement", - ForStatement: "ForStatement", - ForInStatement: "ForInStatement", - FunctionDeclaration: "FunctionDeclaration", - FunctionExpression: "FunctionExpression", - Identifier: "Identifier", - IfStatement: "IfStatement", - Literal: "Literal", - LabeledStatement: "LabeledStatement", - LogicalExpression: "LogicalExpression", - MemberExpression: "MemberExpression", - NewExpression: "NewExpression", - ObjectExpression: "ObjectExpression", - Program: "Program", - Property: "Property", - ReturnStatement: "ReturnStatement", - SequenceExpression: "SequenceExpression", - SwitchStatement: "SwitchStatement", - SwitchCase: "SwitchCase", - ThisExpression: "ThisExpression", - ThrowStatement: "ThrowStatement", - TryStatement: "TryStatement", - UnaryExpression: "UnaryExpression", - UpdateExpression: "UpdateExpression", - VariableDeclaration: "VariableDeclaration", - VariableDeclarator: "VariableDeclarator", - WhileStatement: "WhileStatement", - WithStatement: "WithStatement" - }, d = { - Data: 1, - Get: 2, - Set: 4 - }, a = { - UnexpectedToken: "Unexpected token %0", - UnexpectedNumber: "Unexpected number", - UnexpectedString: "Unexpected string", - UnexpectedIdentifier: "Unexpected identifier", - UnexpectedReserved: "Unexpected reserved word", - UnexpectedEOS: "Unexpected end of input", - NewlineAfterThrow: "Illegal newline after throw", - InvalidRegExp: "Invalid regular expression", - UnterminatedRegExp: "Invalid regular expression: missing /", - InvalidLHSInAssignment: "Invalid left-hand side in assignment", - InvalidLHSInForIn: "Invalid left-hand side in for-in", - MultipleDefaultsInSwitch: "More than one default clause in switch statement", - NoCatchOrFinally: "Missing catch or finally after try", - UnknownLabel: "Undefined label '%0'", - Redeclaration: "%0 '%1' has already been declared", - IllegalContinue: "Illegal continue statement", - IllegalBreak: "Illegal break statement", - IllegalReturn: "Illegal return statement", - StrictModeWith: "Strict mode code may not include a with statement", - StrictCatchVariable: "Catch variable may not be eval or arguments in strict mode", - StrictVarName: "Variable name may not be eval or arguments in strict mode", - StrictParamName: "Parameter name eval or arguments is not allowed in strict mode", - StrictParamDupe: "Strict mode function may not have duplicate parameter names", - StrictFunctionName: "Function name may not be eval or arguments in strict mode", - StrictOctalLiteral: "Octal literals are not allowed in strict mode.", - StrictDelete: "Delete of an unqualified identifier in strict mode.", - StrictDuplicateProperty: "Duplicate data property in object literal not allowed in strict mode", - AccessorDataProperty: "Object literal may not have data and accessor property with the same name", - AccessorGetSet: "Object literal may not have multiple get/set accessors with the same name", - StrictLHSAssignment: "Assignment to eval or arguments is not allowed in strict mode", - StrictLHSPostfix: "Postfix increment/decrement may not have eval or arguments operand in strict mode", - StrictLHSPrefix: "Prefix increment/decrement may not have eval or arguments operand in strict mode", - StrictReservedWord: "Use of future reserved word in strict mode" - }, o = { - NonAsciiIdentifierStart: new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"), - NonAsciiIdentifierPart: new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]") - }; - function I(e, t) { - if (!e) - throw new Error("ASSERT: " + t); - } - function R(e) { - return e >= 48 && e <= 57; - } - function U(e) { - return "0123456789abcdefABCDEF".indexOf(e) >= 0; - } - function w(e) { - return "01234567".indexOf(e) >= 0; - } - function H(e) { - return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].indexOf(e) >= 0; - } - function M(e) { - return e === 10 || e === 13 || e === 8232 || e === 8233; - } - function z(e) { - return e == 64 || e === 36 || e === 95 || // $ (dollar) and _ (underscore) - e >= 65 && e <= 90 || // A..Z - e >= 97 && e <= 122 || // a..z - e === 92 || // \ (backslash) - e >= 128 && o.NonAsciiIdentifierStart.test(String.fromCharCode(e)); - } - function V(e) { - return e === 36 || e === 95 || // $ (dollar) and _ (underscore) - e >= 65 && e <= 90 || // A..Z - e >= 97 && e <= 122 || // a..z - e >= 48 && e <= 57 || // 0..9 - e === 92 || // \ (backslash) - e >= 128 && o.NonAsciiIdentifierPart.test(String.fromCharCode(e)); - } - function ae(e) { - switch (e) { - case "class": - case "enum": - case "export": - case "extends": - case "import": - case "super": - return !0; - default: - return !1; - } - } - function Y(e) { - switch (e) { - case "implements": - case "interface": - case "package": - case "private": - case "protected": - case "public": - case "static": - case "yield": - case "let": - return !0; - default: - return !1; - } - } - function J(e) { - return e === "eval" || e === "arguments"; - } - function se(e) { - if (c && Y(e)) - return !0; - switch (e.length) { - case 2: - return e === "if" || e === "in" || e === "do"; - case 3: - return e === "var" || e === "for" || e === "new" || e === "try" || e === "let"; - case 4: - return e === "this" || e === "else" || e === "case" || e === "void" || e === "with" || e === "enum"; - case 5: - return e === "while" || e === "break" || e === "catch" || e === "throw" || e === "const" || e === "yield" || e === "class" || e === "super"; - case 6: - return e === "return" || e === "typeof" || e === "delete" || e === "switch" || e === "export" || e === "import"; - case 7: - return e === "default" || e === "finally" || e === "extends"; - case 8: - return e === "function" || e === "continue" || e === "debugger"; - case 10: - return e === "instanceof"; - default: - return !1; - } - } - function ie(e, t, u, l, C) { - var x; - I(typeof u == "number", "Comment must have valid position"), !(p.lastCommentStart >= u) && (p.lastCommentStart = u, x = { - type: e, - value: t - }, f.range && (x.range = [u, l]), f.loc && (x.loc = C), f.comments.push(x), f.attachComment && (f.leadingComments.push(x), f.trailingComments.push(x))); - } - function oe(e) { - var t, u, l, C; - for (t = r - e, u = { - start: { - line: g, - column: r - b - e - } - }; r < h; ) - if (l = s.charCodeAt(r), ++r, M(l)) { - f.comments && (C = s.slice(t + e, r - 1), u.end = { - line: g, - column: r - b - 1 - }, ie("Line", C, t, r - 1, u)), l === 13 && s.charCodeAt(r) === 10 && ++r, ++g, b = r; - return; - } - f.comments && (C = s.slice(t + e, r), u.end = { - line: g, - column: r - b - }, ie("Line", C, t, r, u)); - } - function ve() { - var e, t, u, l; - for (f.comments && (e = r - 2, t = { - start: { - line: g, - column: r - b - 2 - } - }); r < h; ) - if (u = s.charCodeAt(r), M(u)) - u === 13 && s.charCodeAt(r + 1) === 10 && ++r, ++g, ++r, b = r, r >= h && P({}, a.UnexpectedToken, "ILLEGAL"); - else if (u === 42) { - if (s.charCodeAt(r + 1) === 47) { - ++r, ++r, f.comments && (l = s.slice(e + 2, r - 2), t.end = { - line: g, - column: r - b - }, ie("Block", l, e, r, t)); - return; - } - ++r; - } else - ++r; - P({}, a.UnexpectedToken, "ILLEGAL"); - } - function A() { - var e, t; - for (t = r === 0; r < h; ) - if (e = s.charCodeAt(r), H(e)) - ++r; - else if (M(e)) - ++r, e === 13 && s.charCodeAt(r) === 10 && ++r, ++g, b = r, t = !0; - else if (e === 47) - if (e = s.charCodeAt(r + 1), e === 47) - ++r, ++r, oe(2), t = !0; - else if (e === 42) - ++r, ++r, ve(); - else - break; - else if (t && e === 45) - if (s.charCodeAt(r + 1) === 45 && s.charCodeAt(r + 2) === 62) - r += 3, oe(3); - else - break; - else if (e === 60) - if (s.slice(r + 1, r + 4) === "!--") - ++r, ++r, ++r, ++r, oe(4); - else - break; - else - break; - } - function F(e) { - var t, u, l, C = 0; - for (u = e === "u" ? 4 : 2, t = 0; t < u; ++t) - if (r < h && U(s[r])) - l = s[r++], C = C * 16 + "0123456789abcdef".indexOf(l.toLowerCase()); - else - return ""; - return String.fromCharCode(C); - } - function k() { - var e, t; - for (e = s.charCodeAt(r++), t = String.fromCharCode(e), e === 92 && (s.charCodeAt(r) !== 117 && P({}, a.UnexpectedToken, "ILLEGAL"), ++r, e = F("u"), (!e || e === "\\" || !z(e.charCodeAt(0))) && P({}, a.UnexpectedToken, "ILLEGAL"), t = e); r < h && (e = s.charCodeAt(r), !!V(e)); ) - ++r, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), s.charCodeAt(r) !== 117 && P({}, a.UnexpectedToken, "ILLEGAL"), ++r, e = F("u"), (!e || e === "\\" || !V(e.charCodeAt(0))) && P({}, a.UnexpectedToken, "ILLEGAL"), t += e); - return t; - } - function X() { - var e, t; - for (e = r++; r < h; ) { - if (t = s.charCodeAt(r), t === 92) - return r = e, k(); - if (V(t)) - ++r; - else - break; - } - return s.slice(e, r); - } - function ee() { - var e, t, u; - return e = r, t = s.charCodeAt(r) === 92 ? k() : X(), t.length === 1 ? u = y.Identifier : se(t) ? u = y.Keyword : t === "null" ? u = y.NullLiteral : t === "true" || t === "false" ? u = y.BooleanLiteral : u = y.Identifier, { - type: u, - value: t, - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - } - function $() { - var e = r, t = s.charCodeAt(r), u, l = s[r], C, x, j; - switch (t) { - case 46: - case 40: - case 41: - case 59: - case 44: - case 123: - case 125: - case 91: - case 93: - case 58: - case 63: - case 126: - return ++r, f.tokenize && (t === 40 ? f.openParenToken = f.tokens.length : t === 123 && (f.openCurlyToken = f.tokens.length)), { - type: y.Punctuator, - value: String.fromCharCode(t), - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - default: - if (u = s.charCodeAt(r + 1), u === 61) - switch (t) { - case 43: - case 45: - case 47: - case 60: - case 62: - case 94: - case 124: - case 37: - case 38: - case 42: - return r += 2, { - type: y.Punctuator, - value: String.fromCharCode(t) + String.fromCharCode(u), - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - case 33: - case 61: - return r += 2, s.charCodeAt(r) === 61 && ++r, { - type: y.Punctuator, - value: s.slice(e, r), - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - } - } - if (j = s.substr(r, 4), j === ">>>=") - return r += 4, { - type: y.Punctuator, - value: j, - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - if (x = j.substr(0, 3), x === ">>>" || x === "<<=" || x === ">>=") - return r += 3, { - type: y.Punctuator, - value: x, - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - if (C = x.substr(0, 2), l === C[1] && "+-<>&|".indexOf(l) >= 0 || C === "=>") - return r += 2, { - type: y.Punctuator, - value: C, - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - if ("<>=!+-*%&|^/".indexOf(l) >= 0) - return ++r, { - type: y.Punctuator, - value: l, - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - P({}, a.UnexpectedToken, "ILLEGAL"); - } - function q(e) { - for (var t = ""; r < h && U(s[r]); ) - t += s[r++]; - return t.length === 0 && P({}, a.UnexpectedToken, "ILLEGAL"), z(s.charCodeAt(r)) && P({}, a.UnexpectedToken, "ILLEGAL"), { - type: y.NumericLiteral, - value: parseInt("0x" + t, 16), - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - } - function K(e) { - for (var t = "0" + s[r++]; r < h && w(s[r]); ) - t += s[r++]; - return (z(s.charCodeAt(r)) || R(s.charCodeAt(r))) && P({}, a.UnexpectedToken, "ILLEGAL"), { - type: y.NumericLiteral, - value: parseInt(t, 8), - octal: !0, - lineNumber: g, - lineStart: b, - start: e, - end: r - }; - } - function Q() { - var e, t, u; - if (u = s[r], I( - R(u.charCodeAt(0)) || u === ".", - "Numeric literal must start with a decimal digit or a decimal point" - ), t = r, e = "", u !== ".") { - if (e = s[r++], u = s[r], e === "0") { - if (u === "x" || u === "X") - return ++r, q(t); - if (w(u)) - return K(t); - u && R(u.charCodeAt(0)) && P({}, a.UnexpectedToken, "ILLEGAL"); - } - for (; R(s.charCodeAt(r)); ) - e += s[r++]; - u = s[r]; - } - if (u === ".") { - for (e += s[r++]; R(s.charCodeAt(r)); ) - e += s[r++]; - u = s[r]; - } - if (u === "e" || u === "E") - if (e += s[r++], u = s[r], (u === "+" || u === "-") && (e += s[r++]), R(s.charCodeAt(r))) - for (; R(s.charCodeAt(r)); ) - e += s[r++]; - else - P({}, a.UnexpectedToken, "ILLEGAL"); - return z(s.charCodeAt(r)) && P({}, a.UnexpectedToken, "ILLEGAL"), { - type: y.NumericLiteral, - value: parseFloat(e), - lineNumber: g, - lineStart: b, - start: t, - end: r - }; - } - function fe() { - var e = "", t, u, l, C, x, j, W = !1, ue, re; - for (ue = g, re = b, t = s[r], I( - t === "'" || t === '"', - "String literal must starts with a quote" - ), u = r, ++r; r < h; ) - if (l = s[r++], l === t) { - t = ""; - break; - } else if (l === "\\") - if (l = s[r++], !l || !M(l.charCodeAt(0))) - switch (l) { - case "u": - case "x": - j = r, x = F(l), x ? e += x : (r = j, e += l); - break; - case "n": - e += ` -`; - break; - case "r": - e += "\r"; - break; - case "t": - e += " "; - break; - case "b": - e += "\b"; - break; - case "f": - e += "\f"; - break; - case "v": - e += "\v"; - break; - default: - w(l) ? (C = "01234567".indexOf(l), C !== 0 && (W = !0), r < h && w(s[r]) && (W = !0, C = C * 8 + "01234567".indexOf(s[r++]), "0123".indexOf(l) >= 0 && r < h && w(s[r]) && (C = C * 8 + "01234567".indexOf(s[r++]))), e += String.fromCharCode(C)) : e += l; - break; - } - else - ++g, l === "\r" && s[r] === ` -` && ++r, b = r; - else { - if (M(l.charCodeAt(0))) - break; - e += l; - } - return t !== "" && P({}, a.UnexpectedToken, "ILLEGAL"), { - type: y.StringLiteral, - value: e, - octal: W, - startLineNumber: ue, - startLineStart: re, - lineNumber: g, - lineStart: b, - start: u, - end: r - }; - } - function Ee(e, t) { - var u; - try { - u = new RegExp(e, t); - } catch { - P({}, a.InvalidRegExp); - } - return u; - } - function ke() { - var e, t, u, l, C; - for (e = s[r], I(e === "/", "Regular expression literal must start with a slash"), t = s[r++], u = !1, l = !1; r < h; ) - if (e = s[r++], t += e, e === "\\") - e = s[r++], M(e.charCodeAt(0)) && P({}, a.UnterminatedRegExp), t += e; - else if (M(e.charCodeAt(0))) - P({}, a.UnterminatedRegExp); - else if (u) - e === "]" && (u = !1); - else if (e === "/") { - l = !0; - break; - } else - e === "[" && (u = !0); - return l || P({}, a.UnterminatedRegExp), C = t.substr(1, t.length - 2), { - value: C, - literal: t - }; - } - function ge() { - var e, t, u, l; - for (t = "", u = ""; r < h && (e = s[r], !!V(e.charCodeAt(0))); ) - if (++r, e === "\\" && r < h) - if (e = s[r], e === "u") { - if (++r, l = r, e = F("u"), e) - for (u += e, t += "\\u"; l < r; ++l) - t += s[l]; - else - r = l, u += "u", t += "\\u"; - G({}, a.UnexpectedToken, "ILLEGAL"); - } else - t += "\\", G({}, a.UnexpectedToken, "ILLEGAL"); - else - u += e, t += e; - return { - value: u, - literal: t - }; - } - function Fe() { - var e, t, u, l; - return i = null, A(), e = r, t = ke(), u = ge(), l = Ee(t.value, u.value), f.tokenize ? { - type: y.RegularExpression, - value: l, - lineNumber: g, - lineStart: b, - start: e, - end: r - } : { - literal: t.literal + u.literal, - value: l, - start: e, - end: r - }; - } - function de() { - var e, t, u, l; - return A(), e = r, t = { - start: { - line: g, - column: r - b - } - }, u = Fe(), t.end = { - line: g, - column: r - b - }, f.tokenize || (f.tokens.length > 0 && (l = f.tokens[f.tokens.length - 1], l.range[0] === e && l.type === "Punctuator" && (l.value === "/" || l.value === "/=") && f.tokens.pop()), f.tokens.push({ - type: "RegularExpression", - value: u.literal, - range: [e, r], - loc: t - })), u; - } - function Ke(e) { - return e.type === y.Identifier || e.type === y.Keyword || e.type === y.BooleanLiteral || e.type === y.NullLiteral; - } - function Je() { - var e, t; - if (e = f.tokens[f.tokens.length - 1], !e) - return de(); - if (e.type === "Punctuator") { - if (e.value === "]") - return $(); - if (e.value === ")") - return t = f.tokens[f.openParenToken - 1], t && t.type === "Keyword" && (t.value === "if" || t.value === "while" || t.value === "for" || t.value === "with") ? de() : $(); - if (e.value === "}") { - if (f.tokens[f.openCurlyToken - 3] && f.tokens[f.openCurlyToken - 3].type === "Keyword") { - if (t = f.tokens[f.openCurlyToken - 4], !t) - return $(); - } else if (f.tokens[f.openCurlyToken - 4] && f.tokens[f.openCurlyToken - 4].type === "Keyword") { - if (t = f.tokens[f.openCurlyToken - 5], !t) - return de(); - } else - return $(); - return S.indexOf(t.value) >= 0 ? $() : de(); - } - return de(); - } - return e.type === "Keyword" ? de() : $(); - } - function Ie() { - var e; - return A(), r >= h ? { - type: y.EOF, - lineNumber: g, - lineStart: b, - start: r, - end: r - } : (e = s.charCodeAt(r), z(e) ? ee() : e === 40 || e === 41 || e === 59 ? $() : e === 39 || e === 34 ? fe() : e === 46 ? R(s.charCodeAt(r + 1)) ? Q() : $() : R(e) ? Q() : f.tokenize && e === 47 ? Je() : $()); - } - function Pe() { - var e, t, u; - return A(), e = { - start: { - line: g, - column: r - b - } - }, t = Ie(), e.end = { - line: g, - column: r - b - }, t.type !== y.EOF && (u = s.slice(t.start, t.end), f.tokens.push({ - type: D[t.type], - value: u, - range: [t.start, t.end], - loc: e - })), t; - } - function N() { - var e; - return e = i, r = e.end, g = e.lineNumber, b = e.lineStart, i = typeof f.tokens < "u" ? Pe() : Ie(), r = e.end, g = e.lineNumber, b = e.lineStart, e; - } - function we() { - var e, t, u; - e = r, t = g, u = b, i = typeof f.tokens < "u" ? Pe() : Ie(), r = e, g = t, b = u; - } - function Le(e, t) { - this.line = e, this.column = t; - } - function Qe(e, t, u, l) { - this.start = new Le(e, t), this.end = new Le(u, l); - } - m = { - name: "SyntaxTree", - processComment: function(e) { - var t, u; - if (!(e.type === E.Program && e.body.length > 0)) { - for (f.trailingComments.length > 0 ? f.trailingComments[0].range[0] >= e.range[1] ? (u = f.trailingComments, f.trailingComments = []) : f.trailingComments.length = 0 : f.bottomRightStack.length > 0 && f.bottomRightStack[f.bottomRightStack.length - 1].trailingComments && f.bottomRightStack[f.bottomRightStack.length - 1].trailingComments[0].range[0] >= e.range[1] && (u = f.bottomRightStack[f.bottomRightStack.length - 1].trailingComments, delete f.bottomRightStack[f.bottomRightStack.length - 1].trailingComments); f.bottomRightStack.length > 0 && f.bottomRightStack[f.bottomRightStack.length - 1].range[0] >= e.range[0]; ) - t = f.bottomRightStack.pop(); - t ? t.leadingComments && t.leadingComments[t.leadingComments.length - 1].range[1] <= e.range[0] && (e.leadingComments = t.leadingComments, delete t.leadingComments) : f.leadingComments.length > 0 && f.leadingComments[f.leadingComments.length - 1].range[1] <= e.range[0] && (e.leadingComments = f.leadingComments, f.leadingComments = []), u && (e.trailingComments = u), f.bottomRightStack.push(e); - } - }, - markEnd: function(e, t) { - return f.range && (e.range = [t.start, r]), f.loc && (e.loc = new Qe( - t.startLineNumber === void 0 ? t.lineNumber : t.startLineNumber, - t.start - (t.startLineStart === void 0 ? t.lineStart : t.startLineStart), - g, - r - b - ), this.postProcess(e)), f.attachComment && this.processComment(e), e; - }, - postProcess: function(e) { - return f.source && (e.loc.source = f.source), e; - }, - createArrayExpression: function(e) { - return { - type: E.ArrayExpression, - elements: e - }; - }, - createAssignmentExpression: function(e, t, u) { - return { - type: E.AssignmentExpression, - operator: e, - left: t, - right: u - }; - }, - createBinaryExpression: function(e, t, u) { - var l = e === "||" || e === "&&" ? E.LogicalExpression : E.BinaryExpression; - return { - type: l, - operator: e, - left: t, - right: u - }; - }, - createBlockStatement: function(e) { - return { - type: E.BlockStatement, - body: e - }; - }, - createBreakStatement: function(e) { - return { - type: E.BreakStatement, - label: e - }; - }, - createCallExpression: function(e, t) { - return { - type: E.CallExpression, - callee: e, - arguments: t - }; - }, - createCatchClause: function(e, t) { - return { - type: E.CatchClause, - param: e, - body: t - }; - }, - createConditionalExpression: function(e, t, u) { - return { - type: E.ConditionalExpression, - test: e, - consequent: t, - alternate: u - }; - }, - createContinueStatement: function(e) { - return { - type: E.ContinueStatement, - label: e - }; - }, - createDebuggerStatement: function() { - return { - type: E.DebuggerStatement - }; - }, - createDoWhileStatement: function(e, t) { - return { - type: E.DoWhileStatement, - body: e, - test: t - }; - }, - createEmptyStatement: function() { - return { - type: E.EmptyStatement - }; - }, - createExpressionStatement: function(e) { - return { - type: E.ExpressionStatement, - expression: e - }; - }, - createForStatement: function(e, t, u, l) { - return { - type: E.ForStatement, - init: e, - test: t, - update: u, - body: l - }; - }, - createForInStatement: function(e, t, u) { - return { - type: E.ForInStatement, - left: e, - right: t, - body: u, - each: !1 - }; - }, - createFunctionDeclaration: function(e, t, u, l) { - return { - type: E.FunctionDeclaration, - id: e, - params: t, - defaults: u, - body: l, - rest: null, - generator: !1, - expression: !1 - }; - }, - createFunctionExpression: function(e, t, u, l) { - return { - type: E.FunctionExpression, - id: e, - params: t, - defaults: u, - body: l, - rest: null, - generator: !1, - expression: !1 - }; - }, - createIdentifier: function(e) { - return { - type: E.Identifier, - name: e - }; - }, - createIfStatement: function(e, t, u) { - return { - type: E.IfStatement, - test: e, - consequent: t, - alternate: u - }; - }, - createLabeledStatement: function(e, t) { - return { - type: E.LabeledStatement, - label: e, - body: t - }; - }, - createLiteral: function(e) { - return { - type: E.Literal, - value: e.value, - raw: s.slice(e.start, e.end) - }; - }, - createMemberExpression: function(e, t, u) { - return { - type: E.MemberExpression, - computed: e === "[", - object: t, - property: u - }; - }, - createNewExpression: function(e, t) { - return { - type: E.NewExpression, - callee: e, - arguments: t - }; - }, - createObjectExpression: function(e) { - return { - type: E.ObjectExpression, - properties: e - }; - }, - createPostfixExpression: function(e, t) { - return { - type: E.UpdateExpression, - operator: e, - argument: t, - prefix: !1 - }; - }, - createProgram: function(e) { - return { - type: E.Program, - body: e - }; - }, - createProperty: function(e, t, u) { - return { - type: E.Property, - key: t, - value: u, - kind: e - }; - }, - createReturnStatement: function(e) { - return { - type: E.ReturnStatement, - argument: e - }; - }, - createSequenceExpression: function(e) { - return { - type: E.SequenceExpression, - expressions: e - }; - }, - createSwitchCase: function(e, t) { - return { - type: E.SwitchCase, - test: e, - consequent: t - }; - }, - createSwitchStatement: function(e, t) { - return { - type: E.SwitchStatement, - discriminant: e, - cases: t - }; - }, - createThisExpression: function() { - return { - type: E.ThisExpression - }; - }, - createThrowStatement: function(e) { - return { - type: E.ThrowStatement, - argument: e - }; - }, - createTryStatement: function(e, t, u, l) { - return { - type: E.TryStatement, - block: e, - guardedHandlers: t, - handlers: u, - finalizer: l - }; - }, - createUnaryExpression: function(e, t) { - return e === "++" || e === "--" ? { - type: E.UpdateExpression, - operator: e, - argument: t, - prefix: !0 - } : { - type: E.UnaryExpression, - operator: e, - argument: t, - prefix: !0 - }; - }, - createVariableDeclaration: function(e, t) { - return { - type: E.VariableDeclaration, - declarations: e, - kind: t - }; - }, - createVariableDeclarator: function(e, t) { - return { - type: E.VariableDeclarator, - id: e, - init: t - }; - }, - createWhileStatement: function(e, t) { - return { - type: E.WhileStatement, - test: e, - body: t - }; - }, - createWithStatement: function(e, t) { - return { - type: E.WithStatement, - object: e, - body: t - }; - } - }; - function Ce() { - var e, t, u, l; - return e = r, t = g, u = b, A(), l = g !== t, r = e, g = t, b = u, l; - } - function P(e, t) { - var u, l = Array.prototype.slice.call(arguments, 2), C = t.replace( - /%(\d)/g, - function(x, j) { - return I(j < l.length, "Message reference must be in range"), l[j]; - } - ); - throw typeof e.lineNumber == "number" ? (u = new Error("Line " + e.lineNumber + ": " + C), u.index = e.start, u.lineNumber = e.lineNumber, u.column = e.start - b + 1) : (u = new Error("Line " + g + ": " + C), u.index = r, u.lineNumber = g, u.column = r - b + 1), u.description = C, u; - } - function G() { - try { - P.apply(null, arguments); - } catch (e) { - if (f.errors) - f.errors.push(e); - else - throw e; - } - } - function pe(e) { - if (e.type === y.EOF && P(e, a.UnexpectedEOS), e.type === y.NumericLiteral && P(e, a.UnexpectedNumber), e.type === y.StringLiteral && P(e, a.UnexpectedString), e.type === y.Identifier && P(e, a.UnexpectedIdentifier), e.type === y.Keyword) { - if (ae(e.value)) - P(e, a.UnexpectedReserved); - else if (c && Y(e.value)) { - G(e, a.StrictReservedWord); - return; - } - P(e, a.UnexpectedToken, e.value); - } - P(e, a.UnexpectedToken, e.value); - } - function O(e) { - var t = N(); - (t.type !== y.Punctuator || t.value !== e) && pe(t); - } - function Z(e) { - var t = N(); - (t.type !== y.Keyword || t.value !== e) && pe(t); - } - function _(e) { - return i.type === y.Punctuator && i.value === e; - } - function ne(e) { - return i.type === y.Keyword && i.value === e; - } - function Ye() { - var e; - return i.type !== y.Punctuator ? !1 : (e = i.value, e === "=" || e === "*=" || e === "/=" || e === "%=" || e === "+=" || e === "-=" || e === "<<=" || e === ">>=" || e === ">>>=" || e === "&=" || e === "^=" || e === "|="); - } - function he() { - var e; - if (s.charCodeAt(r) === 59 || _(";")) { - N(); - return; - } - e = g, A(), g === e && i.type !== y.EOF && !_("}") && pe(i); - } - function be(e) { - return e.type === E.Identifier || e.type === E.MemberExpression; - } - function Ze() { - var e = [], t; - for (t = i, O("["); !_("]"); ) - _(",") ? (N(), e.push(null)) : (e.push(ce()), _("]") || O(",")); - return N(), n.markEnd(n.createArrayExpression(e), t); - } - function _e(e, t) { - var u, l, C; - return u = c, C = i, l = Oe(), t && c && J(e[0].name) && G(t, a.StrictParamName), c = u, n.markEnd(n.createFunctionExpression(null, e, [], l), C); - } - function De() { - var e, t; - return t = i, e = N(), e.type === y.StringLiteral || e.type === y.NumericLiteral ? (c && e.octal && G(e, a.StrictOctalLiteral), n.markEnd(n.createLiteral(e), t)) : n.markEnd(n.createIdentifier(e.value), t); - } - function et() { - var e, t, u, l, C, x; - if (e = i, x = i, e.type === y.Identifier) - return u = De(), e.value === "get" && !_(":") ? (t = De(), O("("), O(")"), l = _e([]), n.markEnd(n.createProperty("get", t, l), x)) : e.value === "set" && !_(":") ? (t = De(), O("("), e = i, e.type !== y.Identifier ? (O(")"), G(e, a.UnexpectedToken, e.value), l = _e([])) : (C = [ye()], O(")"), l = _e(C, e)), n.markEnd(n.createProperty("set", t, l), x)) : (O(":"), l = ce(), n.markEnd(n.createProperty("init", u, l), x)); - if (e.type === y.EOF || e.type === y.Punctuator) - pe(e); - else - return t = De(), O(":"), l = ce(), n.markEnd(n.createProperty("init", t, l), x); - } - function tt() { - var e = [], t, u, l, C, x = {}, j = String, W; - for (W = i, O("{"); !_("}"); ) - t = et(), t.key.type === E.Identifier ? u = t.key.name : u = j(t.key.value), C = t.kind === "init" ? d.Data : t.kind === "get" ? d.Get : d.Set, l = "$" + u, Object.prototype.hasOwnProperty.call(x, l) ? (x[l] === d.Data ? c && C === d.Data ? G({}, a.StrictDuplicateProperty) : C !== d.Data && G({}, a.AccessorDataProperty) : C === d.Data ? G({}, a.AccessorDataProperty) : x[l] & C && G({}, a.AccessorGetSet), x[l] |= C) : x[l] = C, e.push(t), _("}") || O(","); - return O("}"), n.markEnd(n.createObjectExpression(e), W); - } - function rt() { - var e; - return O("("), e = te(), O(")"), e; - } - function Re() { - var e, t, u, l; - if (_("(")) - return rt(); - if (_("[")) - return Ze(); - if (_("{")) - return tt(); - if (e = i.type, l = i, e === y.Identifier) - u = n.createIdentifier(N().value); - else if (e === y.StringLiteral || e === y.NumericLiteral) - c && i.octal && G(i, a.StrictOctalLiteral), u = n.createLiteral(N()); - else if (e === y.Keyword) { - if (ne("function")) - return It(); - ne("this") ? (N(), u = n.createThisExpression()) : pe(N()); - } else - e === y.BooleanLiteral ? (t = N(), t.value = t.value === "true", u = n.createLiteral(t)) : e === y.NullLiteral ? (t = N(), t.value = null, u = n.createLiteral(t)) : _("/") || _("/=") ? (typeof f.tokens < "u" ? u = n.createLiteral(de()) : u = n.createLiteral(Fe()), we()) : pe(N()); - return n.markEnd(u, l); - } - function je() { - var e = []; - if (O("("), !_(")")) - for (; r < h && (e.push(ce()), !_(")")); ) - O(","); - return O(")"), e; - } - function nt() { - var e, t; - return t = i, e = N(), Ke(e) || pe(e), n.markEnd(n.createIdentifier(e.value), t); - } - function Me() { - return O("."), nt(); - } - function Ue() { - var e; - return O("["), e = te(), O("]"), e; - } - function $e() { - var e, t, u; - return u = i, Z("new"), e = it(), t = _("(") ? je() : [], n.markEnd(n.createNewExpression(e, t), u); - } - function ut() { - var e, t, u, l, C; - for (C = i, e = p.allowIn, p.allowIn = !0, t = ne("new") ? $e() : Re(), p.allowIn = e; ; ) { - if (_(".")) - l = Me(), t = n.createMemberExpression(".", t, l); - else if (_("(")) - u = je(), t = n.createCallExpression(t, u); - else if (_("[")) - l = Ue(), t = n.createMemberExpression("[", t, l); - else - break; - n.markEnd(t, C); - } - return t; - } - function it() { - var e, t, u, l; - for (l = i, e = p.allowIn, t = ne("new") ? $e() : Re(), p.allowIn = e; _(".") || _("["); ) - _("[") ? (u = Ue(), t = n.createMemberExpression("[", t, u)) : (u = Me(), t = n.createMemberExpression(".", t, u)), n.markEnd(t, l); - return t; - } - function ze() { - var e, t, u = i; - return e = ut(), i.type === y.Punctuator && (_("++") || _("--")) && !Ce() && (c && e.type === E.Identifier && J(e.name) && G({}, a.StrictLHSPostfix), be(e) || G({}, a.InvalidLHSInAssignment), t = N(), e = n.markEnd(n.createPostfixExpression(t.value, e), u)), e; - } - function Ae() { - var e, t, u; - return i.type !== y.Punctuator && i.type !== y.Keyword ? t = ze() : _("++") || _("--") ? (u = i, e = N(), t = Ae(), c && t.type === E.Identifier && J(t.name) && G({}, a.StrictLHSPrefix), be(t) || G({}, a.InvalidLHSInAssignment), t = n.createUnaryExpression(e.value, t), t = n.markEnd(t, u)) : _("+") || _("-") || _("~") || _("!") ? (u = i, e = N(), t = Ae(), t = n.createUnaryExpression(e.value, t), t = n.markEnd(t, u)) : ne("delete") || ne("void") || ne("typeof") ? (u = i, e = N(), t = Ae(), t = n.createUnaryExpression(e.value, t), t = n.markEnd(t, u), c && t.operator === "delete" && t.argument.type === E.Identifier && G({}, a.StrictDelete)) : t = ze(), t; - } - function He(e, t) { - var u = 0; - if (e.type !== y.Punctuator && e.type !== y.Keyword) - return 0; - switch (e.value) { - case "||": - u = 1; - break; - case "&&": - u = 2; - break; - case "|": - u = 3; - break; - case "^": - u = 4; - break; - case "&": - u = 5; - break; - case "==": - case "!=": - case "===": - case "!==": - u = 6; - break; - case "<": - case ">": - case "<=": - case ">=": - case "instanceof": - u = 7; - break; - case "in": - u = t ? 7 : 0; - break; - case "<<": - case ">>": - case ">>>": - u = 8; - break; - case "+": - case "-": - u = 9; - break; - case "*": - case "/": - case "%": - u = 11; - break; - } - return u; - } - function at() { - var e, t, u, l, C, x, j, W, ue, re; - if (e = i, ue = Ae(), l = i, C = He(l, p.allowIn), C === 0) - return ue; - for (l.prec = C, N(), t = [e, i], j = Ae(), x = [ue, l, j]; (C = He(i, p.allowIn)) > 0; ) { - for (; x.length > 2 && C <= x[x.length - 2].prec; ) - j = x.pop(), W = x.pop().value, ue = x.pop(), u = n.createBinaryExpression(W, ue, j), t.pop(), e = t[t.length - 1], n.markEnd(u, e), x.push(u); - l = N(), l.prec = C, x.push(l), t.push(i), u = Ae(), x.push(u); - } - for (re = x.length - 1, u = x[re], t.pop(); re > 1; ) - u = n.createBinaryExpression(x[re - 1].value, x[re - 2], u), re -= 2, e = t.pop(), n.markEnd(u, e); - return u; - } - function st() { - var e, t, u, l, C; - return C = i, e = at(), _("?") && (N(), t = p.allowIn, p.allowIn = !0, u = ce(), p.allowIn = t, O(":"), l = ce(), e = n.createConditionalExpression(e, u, l), n.markEnd(e, C)), e; - } - function ce() { - var e, t, u, l, C; - return e = i, C = i, l = t = st(), Ye() && (be(t) || G({}, a.InvalidLHSInAssignment), c && t.type === E.Identifier && J(t.name) && G(e, a.StrictLHSAssignment), e = N(), u = ce(), l = n.markEnd(n.createAssignmentExpression(e.value, t, u), C)), l; - } - function te() { - var e, t = i; - if (e = ce(), _(",")) { - for (e = n.createSequenceExpression([e]); r < h && _(","); ) - N(), e.expressions.push(ce()); - n.markEnd(e, t); - } - return e; - } - function ot() { - for (var e = [], t; r < h && !(_("}") || (t = Se(), typeof t > "u")); ) - e.push(t); - return e; - } - function xe() { - var e, t; - return t = i, O("{"), e = ot(), O("}"), n.markEnd(n.createBlockStatement(e), t); - } - function ye() { - var e, t; - return t = i, e = N(), e.type !== y.Identifier && pe(e), n.markEnd(n.createIdentifier(e.value), t); - } - function lt(e) { - var t = null, u, l; - return l = i, u = ye(), c && J(u.name) && G({}, a.StrictVarName), e === "const" ? (O("="), t = ce()) : _("=") && (N(), t = ce()), n.markEnd(n.createVariableDeclarator(u, t), l); - } - function Te(e) { - var t = []; - do { - if (t.push(lt(e)), !_(",")) - break; - N(); - } while (r < h); - return t; - } - function ct() { - var e; - return Z("var"), e = Te(), he(), n.createVariableDeclaration(e, "var"); - } - function ft(e) { - var t, u; - return u = i, Z(e), t = Te(e), he(), n.markEnd(n.createVariableDeclaration(t, e), u); - } - function pt() { - return O(";"), n.createEmptyStatement(); - } - function ht() { - var e = te(); - return he(), n.createExpressionStatement(e); - } - function mt() { - var e, t, u; - return Z("if"), O("("), e = te(), O(")"), t = me(), ne("else") ? (N(), u = me()) : u = null, n.createIfStatement(e, t, u); - } - function yt() { - var e, t, u; - return Z("do"), u = p.inIteration, p.inIteration = !0, e = me(), p.inIteration = u, Z("while"), O("("), t = te(), O(")"), _(";") && N(), n.createDoWhileStatement(e, t); - } - function dt() { - var e, t, u; - return Z("while"), O("("), e = te(), O(")"), u = p.inIteration, p.inIteration = !0, t = me(), p.inIteration = u, n.createWhileStatement(e, t); - } - function Et() { - var e, t, u; - return u = i, e = N(), t = Te(), n.markEnd(n.createVariableDeclaration(t, e.value), u); - } - function At() { - var e, t, u, l, C, x, j; - return e = t = u = null, Z("for"), O("("), _(";") ? N() : (ne("var") || ne("let") ? (p.allowIn = !1, e = Et(), p.allowIn = !0, e.declarations.length === 1 && ne("in") && (N(), l = e, C = te(), e = null)) : (p.allowIn = !1, e = te(), p.allowIn = !0, ne("in") && (be(e) || G({}, a.InvalidLHSInForIn), N(), l = e, C = te(), e = null)), typeof l > "u" && O(";")), typeof l > "u" && (_(";") || (t = te()), O(";"), _(")") || (u = te())), O(")"), j = p.inIteration, p.inIteration = !0, x = me(), p.inIteration = j, typeof l > "u" ? n.createForStatement(e, t, u, x) : n.createForInStatement(l, C, x); - } - function gt() { - var e = null, t; - return Z("continue"), s.charCodeAt(r) === 59 ? (N(), p.inIteration || P({}, a.IllegalContinue), n.createContinueStatement(null)) : Ce() ? (p.inIteration || P({}, a.IllegalContinue), n.createContinueStatement(null)) : (i.type === y.Identifier && (e = ye(), t = "$" + e.name, Object.prototype.hasOwnProperty.call(p.labelSet, t) || P({}, a.UnknownLabel, e.name)), he(), e === null && !p.inIteration && P({}, a.IllegalContinue), n.createContinueStatement(e)); - } - function Ct() { - var e = null, t; - return Z("break"), s.charCodeAt(r) === 59 ? (N(), p.inIteration || p.inSwitch || P({}, a.IllegalBreak), n.createBreakStatement(null)) : Ce() ? (p.inIteration || p.inSwitch || P({}, a.IllegalBreak), n.createBreakStatement(null)) : (i.type === y.Identifier && (e = ye(), t = "$" + e.name, Object.prototype.hasOwnProperty.call(p.labelSet, t) || P({}, a.UnknownLabel, e.name)), he(), e === null && !(p.inIteration || p.inSwitch) && P({}, a.IllegalBreak), n.createBreakStatement(e)); - } - function St() { - var e = null; - return Z("return"), p.inFunctionBody || G({}, a.IllegalReturn), s.charCodeAt(r) === 32 && z(s.charCodeAt(r + 1)) ? (e = te(), he(), n.createReturnStatement(e)) : Ce() ? n.createReturnStatement(null) : (_(";") || !_("}") && i.type !== y.EOF && (e = te()), he(), n.createReturnStatement(e)); - } - function vt() { - var e, t; - return c && (A(), G({}, a.StrictModeWith)), Z("with"), O("("), e = te(), O(")"), t = me(), n.createWithStatement(e, t); - } - function Ft() { - var e, t = [], u, l; - for (l = i, ne("default") ? (N(), e = null) : (Z("case"), e = te()), O(":"); r < h && !(_("}") || ne("default") || ne("case")); ) - u = me(), t.push(u); - return n.markEnd(n.createSwitchCase(e, t), l); - } - function bt() { - var e, t, u, l, C; - if (Z("switch"), O("("), e = te(), O(")"), O("{"), t = [], _("}")) - return N(), n.createSwitchStatement(e, t); - for (l = p.inSwitch, p.inSwitch = !0, C = !1; r < h && !_("}"); ) - u = Ft(), u.test === null && (C && P({}, a.MultipleDefaultsInSwitch), C = !0), t.push(u); - return p.inSwitch = l, O("}"), n.createSwitchStatement(e, t); - } - function Dt() { - var e; - return Z("throw"), Ce() && P({}, a.NewlineAfterThrow), e = te(), he(), n.createThrowStatement(e); - } - function xt() { - var e, t, u; - return u = i, Z("catch"), O("("), _(")") && pe(i), e = ye(), c && J(e.name) && G({}, a.StrictCatchVariable), O(")"), t = xe(), n.markEnd(n.createCatchClause(e, t), u); - } - function Bt() { - var e, t = [], u = null; - return Z("try"), e = xe(), ne("catch") && t.push(xt()), ne("finally") && (N(), u = xe()), t.length === 0 && !u && P({}, a.NoCatchOrFinally), n.createTryStatement(e, [], t, u); - } - function kt() { - return Z("debugger"), he(), n.createDebuggerStatement(); - } - function me() { - var e = i.type, t, u, l, C; - if (e === y.EOF && pe(i), e === y.Punctuator && i.value === "{") - return xe(); - if (C = i, e === y.Punctuator) - switch (i.value) { - case ";": - return n.markEnd(pt(), C); - case "(": - return n.markEnd(ht(), C); - } - if (e === y.Keyword) - switch (i.value) { - case "break": - return n.markEnd(Ct(), C); - case "continue": - return n.markEnd(gt(), C); - case "debugger": - return n.markEnd(kt(), C); - case "do": - return n.markEnd(yt(), C); - case "for": - return n.markEnd(At(), C); - case "function": - return n.markEnd(Ge(), C); - case "if": - return n.markEnd(mt(), C); - case "return": - return n.markEnd(St(), C); - case "switch": - return n.markEnd(bt(), C); - case "throw": - return n.markEnd(Dt(), C); - case "try": - return n.markEnd(Bt(), C); - case "var": - return n.markEnd(ct(), C); - case "while": - return n.markEnd(dt(), C); - case "with": - return n.markEnd(vt(), C); - } - return t = te(), t.type === E.Identifier && _(":") ? (N(), l = "$" + t.name, Object.prototype.hasOwnProperty.call(p.labelSet, l) && P({}, a.Redeclaration, "Label", t.name), p.labelSet[l] = !0, u = me(), delete p.labelSet[l], n.markEnd(n.createLabeledStatement(t, u), C)) : (he(), n.markEnd(n.createExpressionStatement(t), C)); - } - function Oe() { - var e, t = [], u, l, C, x, j, W, ue, re; - for (re = i, O("{"); r < h && !(i.type !== y.StringLiteral || (u = i, e = Se(), t.push(e), e.expression.type !== E.Literal)); ) - l = s.slice(u.start + 1, u.end - 1), l === "use strict" ? (c = !0, C && G(C, a.StrictOctalLiteral)) : !C && u.octal && (C = u); - for (x = p.labelSet, j = p.inIteration, W = p.inSwitch, ue = p.inFunctionBody, p.labelSet = {}, p.inIteration = !1, p.inSwitch = !1, p.inFunctionBody = !0; r < h && !(_("}") || (e = Se(), typeof e > "u")); ) - t.push(e); - return O("}"), p.labelSet = x, p.inIteration = j, p.inSwitch = W, p.inFunctionBody = ue, n.markEnd(n.createBlockStatement(t), re); - } - function qe(e) { - var t, u = [], l, C, x, j, W; - if (O("("), !_(")")) - for (x = {}; r < h && (l = i, t = ye(), j = "$" + l.value, c ? (J(l.value) && (C = l, W = a.StrictParamName), Object.prototype.hasOwnProperty.call(x, j) && (C = l, W = a.StrictParamDupe)) : e || (J(l.value) ? (e = l, W = a.StrictParamName) : Y(l.value) ? (e = l, W = a.StrictReservedWord) : Object.prototype.hasOwnProperty.call(x, j) && (e = l, W = a.StrictParamDupe)), u.push(t), x[j] = !0, !_(")")); ) - O(","); - return O(")"), { - params: u, - stricted: C, - firstRestricted: e, - message: W - }; - } - function Ge() { - var e, t = [], u, l, C, x, j, W, ue, re; - return re = i, Z("function"), l = i, e = ye(), c ? J(l.value) && G(l, a.StrictFunctionName) : J(l.value) ? (j = l, W = a.StrictFunctionName) : Y(l.value) && (j = l, W = a.StrictReservedWord), x = qe(j), t = x.params, C = x.stricted, j = x.firstRestricted, x.message && (W = x.message), ue = c, u = Oe(), c && j && P(j, W), c && C && G(C, W), c = ue, n.markEnd(n.createFunctionDeclaration(e, t, [], u), re); - } - function It() { - var e, t = null, u, l, C, x, j = [], W, ue, re; - return re = i, Z("function"), _("(") || (e = i, t = ye(), c ? J(e.value) && G(e, a.StrictFunctionName) : J(e.value) ? (l = e, C = a.StrictFunctionName) : Y(e.value) && (l = e, C = a.StrictReservedWord)), x = qe(l), j = x.params, u = x.stricted, l = x.firstRestricted, x.message && (C = x.message), ue = c, W = Oe(), c && l && P(l, C), c && u && G(u, C), c = ue, n.markEnd(n.createFunctionExpression(t, j, [], W), re); - } - function Se() { - if (i.type === y.Keyword) - switch (i.value) { - case "const": - case "let": - return ft(i.value); - case "function": - return Ge(); - default: - return me(); - } - if (i.type !== y.EOF) - return me(); - } - function wt() { - for (var e, t = [], u, l, C; r < h && (u = i, !(u.type !== y.StringLiteral || (e = Se(), t.push(e), e.expression.type !== E.Literal))); ) - l = s.slice(u.start + 1, u.end - 1), l === "use strict" ? (c = !0, C && G(C, a.StrictOctalLiteral)) : !C && u.octal && (C = u); - for (; r < h && (e = Se(), !(typeof e > "u")); ) - t.push(e); - return t; - } - function _t() { - var e, t; - return A(), we(), t = i, c = !1, e = wt(), n.markEnd(n.createProgram(e), t); - } - function We() { - var e, t, u, l = []; - for (e = 0; e < f.tokens.length; ++e) - t = f.tokens[e], u = { - type: t.type, - value: t.value - }, f.range && (u.range = t.range), f.loc && (u.loc = t.loc), l.push(u); - f.tokens = l; - } - function Tt(e, t) { - var u, l, C; - u = String, typeof e != "string" && !(e instanceof String) && (e = u(e)), n = m, s = e, r = 0, g = s.length > 0 ? 1 : 0, b = 0, h = s.length, i = null, p = { - allowIn: !0, - labelSet: {}, - inFunctionBody: !1, - inIteration: !1, - inSwitch: !1, - lastCommentStart: -1 - }, f = {}, t = t || {}, t.tokens = !0, f.tokens = [], f.tokenize = !0, f.openParenToken = -1, f.openCurlyToken = -1, f.range = typeof t.range == "boolean" && t.range, f.loc = typeof t.loc == "boolean" && t.loc, typeof t.comment == "boolean" && t.comment && (f.comments = []), typeof t.tolerant == "boolean" && t.tolerant && (f.errors = []); - try { - if (we(), i.type === y.EOF) - return f.tokens; - for (l = N(); i.type !== y.EOF; ) - try { - l = N(); - } catch (x) { - if (l = i, f.errors) { - f.errors.push(x); - break; - } else - throw x; - } - We(), C = f.tokens, typeof f.comments < "u" && (C.comments = f.comments), typeof f.errors < "u" && (C.errors = f.errors); - } catch (x) { - throw x; - } finally { - f = {}; - } - return C; - } - function Ot(e, t) { - var u, l; - l = String, typeof e != "string" && !(e instanceof String) && (e = l(e)), n = m, s = e, r = 0, g = s.length > 0 ? 1 : 0, b = 0, h = s.length, i = null, p = { - allowIn: !0, - labelSet: {}, - inFunctionBody: !1, - inIteration: !1, - inSwitch: !1, - lastCommentStart: -1 - }, f = {}, typeof t < "u" && (f.range = typeof t.range == "boolean" && t.range, f.loc = typeof t.loc == "boolean" && t.loc, f.attachComment = typeof t.attachComment == "boolean" && t.attachComment, f.loc && t.source !== null && t.source !== void 0 && (f.source = l(t.source)), typeof t.tokens == "boolean" && t.tokens && (f.tokens = []), typeof t.comment == "boolean" && t.comment && (f.comments = []), typeof t.tolerant == "boolean" && t.tolerant && (f.errors = []), f.attachComment && (f.range = !0, f.comments = [], f.bottomRightStack = [], f.trailingComments = [], f.leadingComments = [])); - try { - u = _t(), typeof f.comments < "u" && (u.comments = f.comments), typeof f.tokens < "u" && (We(), u.tokens = f.tokens), typeof f.errors < "u" && (u.errors = f.errors); - } catch (C) { - throw C; - } finally { - f = {}; - } - return u; - } - v.version = "1.2.2", v.tokenize = Tt, v.parse = Ot, v.Syntax = function() { - var e, t = {}; - typeof Object.create == "function" && (t = /* @__PURE__ */ Object.create(null)); - for (e in E) - E.hasOwnProperty(e) && (t[e] = E[e]); - return typeof Object.freeze == "function" && Object.freeze(t), t; - }(); - }); - }, {}], 1: [function(T, L, B) { - (function(v) { - var y = function() { - var D = { - trace: function() { - }, - yy: {}, - symbols_: { error: 2, JSON_PATH: 3, DOLLAR: 4, PATH_COMPONENTS: 5, LEADING_CHILD_MEMBER_EXPRESSION: 6, PATH_COMPONENT: 7, MEMBER_COMPONENT: 8, SUBSCRIPT_COMPONENT: 9, CHILD_MEMBER_COMPONENT: 10, DESCENDANT_MEMBER_COMPONENT: 11, DOT: 12, MEMBER_EXPRESSION: 13, DOT_DOT: 14, STAR: 15, IDENTIFIER: 16, SCRIPT_EXPRESSION: 17, INTEGER: 18, END: 19, CHILD_SUBSCRIPT_COMPONENT: 20, DESCENDANT_SUBSCRIPT_COMPONENT: 21, "[": 22, SUBSCRIPT: 23, "]": 24, SUBSCRIPT_EXPRESSION: 25, SUBSCRIPT_EXPRESSION_LIST: 26, SUBSCRIPT_EXPRESSION_LISTABLE: 27, ",": 28, STRING_LITERAL: 29, ARRAY_SLICE: 30, FILTER_EXPRESSION: 31, QQ_STRING: 32, Q_STRING: 33, $accept: 0, $end: 1 }, - terminals_: { 2: "error", 4: "DOLLAR", 12: "DOT", 14: "DOT_DOT", 15: "STAR", 16: "IDENTIFIER", 17: "SCRIPT_EXPRESSION", 18: "INTEGER", 19: "END", 22: "[", 24: "]", 28: ",", 30: "ARRAY_SLICE", 31: "FILTER_EXPRESSION", 32: "QQ_STRING", 33: "Q_STRING" }, - productions_: [0, [3, 1], [3, 2], [3, 1], [3, 2], [5, 1], [5, 2], [7, 1], [7, 1], [8, 1], [8, 1], [10, 2], [6, 1], [11, 2], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [9, 1], [9, 1], [20, 3], [21, 4], [23, 1], [23, 1], [26, 1], [26, 3], [27, 1], [27, 1], [27, 1], [25, 1], [25, 1], [25, 1], [29, 1], [29, 1]], - performAction: function(o, m, s, c, r, g, b) { - c.ast || (c.ast = S, S.initialize()); - var h = g.length - 1; - switch (r) { - case 1: - return c.ast.set({ expression: { type: "root", value: g[h] } }), c.ast.unshift(), c.ast.yield(); - case 2: - return c.ast.set({ expression: { type: "root", value: g[h - 1] } }), c.ast.unshift(), c.ast.yield(); - case 3: - return c.ast.unshift(), c.ast.yield(); - case 4: - return c.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: g[h - 1] } }), c.ast.unshift(), c.ast.yield(); - case 5: - break; - case 6: - break; - case 7: - c.ast.set({ operation: "member" }), c.ast.push(); - break; - case 8: - c.ast.set({ operation: "subscript" }), c.ast.push(); - break; - case 9: - c.ast.set({ scope: "child" }); - break; - case 10: - c.ast.set({ scope: "descendant" }); - break; - case 11: - break; - case 12: - c.ast.set({ scope: "child", operation: "member" }); - break; - case 13: - break; - case 14: - c.ast.set({ expression: { type: "wildcard", value: g[h] } }); - break; - case 15: - c.ast.set({ expression: { type: "identifier", value: g[h] } }); - break; - case 16: - c.ast.set({ expression: { type: "script_expression", value: g[h] } }); - break; - case 17: - c.ast.set({ expression: { type: "numeric_literal", value: parseInt(g[h]) } }); - break; - case 18: - break; - case 19: - c.ast.set({ scope: "child" }); - break; - case 20: - c.ast.set({ scope: "descendant" }); - break; - case 21: - break; - case 22: - break; - case 23: - break; - case 24: - g[h].length > 1 ? c.ast.set({ expression: { type: "union", value: g[h] } }) : this.$ = g[h]; - break; - case 25: - this.$ = [g[h]]; - break; - case 26: - this.$ = g[h - 2].concat(g[h]); - break; - case 27: - this.$ = { expression: { type: "numeric_literal", value: parseInt(g[h]) } }, c.ast.set(this.$); - break; - case 28: - this.$ = { expression: { type: "string_literal", value: g[h] } }, c.ast.set(this.$); - break; - case 29: - this.$ = { expression: { type: "slice", value: g[h] } }, c.ast.set(this.$); - break; - case 30: - this.$ = { expression: { type: "wildcard", value: g[h] } }, c.ast.set(this.$); - break; - case 31: - this.$ = { expression: { type: "script_expression", value: g[h] } }, c.ast.set(this.$); - break; - case 32: - this.$ = { expression: { type: "filter_expression", value: g[h] } }, c.ast.set(this.$); - break; - case 33: - this.$ = g[h]; - break; - case 34: - this.$ = g[h]; - break; - } - }, - table: [{ 3: 1, 4: [1, 2], 6: 3, 13: 4, 15: [1, 5], 16: [1, 6], 17: [1, 7], 18: [1, 8], 19: [1, 9] }, { 1: [3] }, { 1: [2, 1], 5: 10, 7: 11, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 3], 5: 21, 7: 11, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 12], 12: [2, 12], 14: [2, 12], 22: [2, 12] }, { 1: [2, 14], 12: [2, 14], 14: [2, 14], 22: [2, 14] }, { 1: [2, 15], 12: [2, 15], 14: [2, 15], 22: [2, 15] }, { 1: [2, 16], 12: [2, 16], 14: [2, 16], 22: [2, 16] }, { 1: [2, 17], 12: [2, 17], 14: [2, 17], 22: [2, 17] }, { 1: [2, 18], 12: [2, 18], 14: [2, 18], 22: [2, 18] }, { 1: [2, 2], 7: 22, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 5], 12: [2, 5], 14: [2, 5], 22: [2, 5] }, { 1: [2, 7], 12: [2, 7], 14: [2, 7], 22: [2, 7] }, { 1: [2, 8], 12: [2, 8], 14: [2, 8], 22: [2, 8] }, { 1: [2, 9], 12: [2, 9], 14: [2, 9], 22: [2, 9] }, { 1: [2, 10], 12: [2, 10], 14: [2, 10], 22: [2, 10] }, { 1: [2, 19], 12: [2, 19], 14: [2, 19], 22: [2, 19] }, { 1: [2, 20], 12: [2, 20], 14: [2, 20], 22: [2, 20] }, { 13: 23, 15: [1, 5], 16: [1, 6], 17: [1, 7], 18: [1, 8], 19: [1, 9] }, { 13: 24, 15: [1, 5], 16: [1, 6], 17: [1, 7], 18: [1, 8], 19: [1, 9], 22: [1, 25] }, { 15: [1, 29], 17: [1, 30], 18: [1, 33], 23: 26, 25: 27, 26: 28, 27: 32, 29: 34, 30: [1, 35], 31: [1, 31], 32: [1, 36], 33: [1, 37] }, { 1: [2, 4], 7: 22, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 6], 12: [2, 6], 14: [2, 6], 22: [2, 6] }, { 1: [2, 11], 12: [2, 11], 14: [2, 11], 22: [2, 11] }, { 1: [2, 13], 12: [2, 13], 14: [2, 13], 22: [2, 13] }, { 15: [1, 29], 17: [1, 30], 18: [1, 33], 23: 38, 25: 27, 26: 28, 27: 32, 29: 34, 30: [1, 35], 31: [1, 31], 32: [1, 36], 33: [1, 37] }, { 24: [1, 39] }, { 24: [2, 23] }, { 24: [2, 24], 28: [1, 40] }, { 24: [2, 30] }, { 24: [2, 31] }, { 24: [2, 32] }, { 24: [2, 25], 28: [2, 25] }, { 24: [2, 27], 28: [2, 27] }, { 24: [2, 28], 28: [2, 28] }, { 24: [2, 29], 28: [2, 29] }, { 24: [2, 33], 28: [2, 33] }, { 24: [2, 34], 28: [2, 34] }, { 24: [1, 41] }, { 1: [2, 21], 12: [2, 21], 14: [2, 21], 22: [2, 21] }, { 18: [1, 33], 27: 42, 29: 34, 30: [1, 35], 32: [1, 36], 33: [1, 37] }, { 1: [2, 22], 12: [2, 22], 14: [2, 22], 22: [2, 22] }, { 24: [2, 26], 28: [2, 26] }], - defaultActions: { 27: [2, 23], 29: [2, 30], 30: [2, 31], 31: [2, 32] }, - parseError: function(o, m) { - if (m.recoverable) - this.trace(o); - else - throw new Error(o); - }, - parse: function(o) { - var m = this, s = [0], c = [null], r = [], g = this.table, b = "", h = 0, n = 0, i = 2, p = 1, f = r.slice.call(arguments, 1); - this.lexer.setInput(o), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, this.yy.parser = this, typeof this.lexer.yylloc > "u" && (this.lexer.yylloc = {}); - var I = this.lexer.yylloc; - r.push(I); - var R = this.lexer.options && this.lexer.options.ranges; - typeof this.yy.parseError == "function" ? this.parseError = this.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError; - function U() { - var oe; - return oe = m.lexer.lex() || p, typeof oe != "number" && (oe = m.symbols_[oe] || oe), oe; - } - for (var w, H, M, z, V = {}, ae, Y, J, se; ; ) { - if (H = s[s.length - 1], this.defaultActions[H] ? M = this.defaultActions[H] : ((w === null || typeof w > "u") && (w = U()), M = g[H] && g[H][w]), typeof M > "u" || !M.length || !M[0]) { - var ie = ""; - se = []; - for (ae in g[H]) - this.terminals_[ae] && ae > i && se.push("'" + this.terminals_[ae] + "'"); - this.lexer.showPosition ? ie = "Parse error on line " + (h + 1) + `: -` + this.lexer.showPosition() + ` -Expecting ` + se.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : ie = "Parse error on line " + (h + 1) + ": Unexpected " + (w == p ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(ie, { - text: this.lexer.match, - token: this.terminals_[w] || w, - line: this.lexer.yylineno, - loc: I, - expected: se - }); - } - if (M[0] instanceof Array && M.length > 1) - throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + w); - switch (M[0]) { - case 1: - s.push(w), c.push(this.lexer.yytext), r.push(this.lexer.yylloc), s.push(M[1]), w = null, n = this.lexer.yyleng, b = this.lexer.yytext, h = this.lexer.yylineno, I = this.lexer.yylloc; - break; - case 2: - if (Y = this.productions_[M[1]][1], V.$ = c[c.length - Y], V._$ = { - first_line: r[r.length - (Y || 1)].first_line, - last_line: r[r.length - 1].last_line, - first_column: r[r.length - (Y || 1)].first_column, - last_column: r[r.length - 1].last_column - }, R && (V._$.range = [ - r[r.length - (Y || 1)].range[0], - r[r.length - 1].range[1] - ]), z = this.performAction.apply(V, [ - b, - n, - h, - this.yy, - M[1], - c, - r - ].concat(f)), typeof z < "u") - return z; - Y && (s = s.slice(0, -1 * Y * 2), c = c.slice(0, -1 * Y), r = r.slice(0, -1 * Y)), s.push(this.productions_[M[1]][0]), c.push(V.$), r.push(V._$), J = g[s[s.length - 2]][s[s.length - 1]], s.push(J); - break; - case 3: - return !0; - } - } - return !0; - } - }, S = { - initialize: function() { - this._nodes = [], this._node = {}, this._stash = []; - }, - set: function(a) { - for (var o in a) - this._node[o] = a[o]; - return this._node; - }, - node: function(a) { - return arguments.length && (this._node = a), this._node; - }, - push: function() { - this._nodes.push(this._node), this._node = {}; - }, - unshift: function() { - this._nodes.unshift(this._node), this._node = {}; - }, - yield: function() { - var a = this._nodes; - return this.initialize(), a; - } - }, E = function() { - var a = { - EOF: 1, - parseError: function(m, s) { - if (this.yy.parser) - this.yy.parser.parseError(m, s); - else - throw new Error(m); - }, - // resets the lexer, sets new input - setInput: function(o) { - return this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { - first_line: 1, - first_column: 0, - last_line: 1, - last_column: 0 - }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this; - }, - // consumes and returns one char from the input - input: function() { - var o = this._input[0]; - this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o; - var m = o.match(/(?:\r\n?|\n).*/g); - return m ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o; - }, - // unshifts one char (or a string) into the input - unput: function(o) { - var m = o.length, s = o.split(/(?:\r\n?|\n)/g); - this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - m - 1), this.offset -= m; - var c = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), s.length - 1 && (this.yylineno -= s.length - 1); - var r = this.yylloc.range; - return this.yylloc = { - first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: s ? (s.length === c.length ? this.yylloc.first_column : 0) + c[c.length - s.length].length - s[0].length : this.yylloc.first_column - m - }, this.options.ranges && (this.yylloc.range = [r[0], r[0] + this.yyleng - m]), this.yyleng = this.yytext.length, this; - }, - // When called from action, caches matched text and appends it on next action - more: function() { - return this._more = !0, this; - }, - // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. - reject: function() { - if (this.options.backtrack_lexer) - this._backtrack = !0; - else - return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -` + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - return this; - }, - // retain first n characters of the match - less: function(o) { - this.unput(this.match.slice(o)); - }, - // displays already matched input, i.e. for error messages - pastInput: function() { - var o = this.matched.substr(0, this.matched.length - this.match.length); - return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, ""); - }, - // displays upcoming input, i.e. for error messages - upcomingInput: function() { - var o = this.match; - return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - // displays the character position where the lexing error occurred, i.e. for error messages - showPosition: function() { - var o = this.pastInput(), m = new Array(o.length + 1).join("-"); - return o + this.upcomingInput() + ` -` + m + "^"; - }, - // test the lexed token: return FALSE when not a match, otherwise return token - test_match: function(o, m) { - var s, c, r; - if (this.options.backtrack_lexer && (r = { - yylineno: this.yylineno, - yylloc: { - first_line: this.yylloc.first_line, - last_line: this.last_line, - first_column: this.yylloc.first_column, - last_column: this.yylloc.last_column - }, - yytext: this.yytext, - match: this.match, - matches: this.matches, - matched: this.matched, - yyleng: this.yyleng, - offset: this.offset, - _more: this._more, - _input: this._input, - yy: this.yy, - conditionStack: this.conditionStack.slice(0), - done: this.done - }, this.options.ranges && (r.yylloc.range = this.yylloc.range.slice(0))), c = o[0].match(/(?:\r\n?|\n).*/g), c && (this.yylineno += c.length), this.yylloc = { - first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: c ? c[c.length - 1].length - c[c.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length - }, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], s = this.performAction.call(this, this.yy, this, m, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), s) - return s; - if (this._backtrack) { - for (var g in r) - this[g] = r[g]; - return !1; - } - return !1; - }, - // return next match in input - next: function() { - if (this.done) - return this.EOF; - this._input || (this.done = !0); - var o, m, s, c; - this._more || (this.yytext = "", this.match = ""); - for (var r = this._currentRules(), g = 0; g < r.length; g++) - if (s = this._input.match(this.rules[r[g]]), s && (!m || s[0].length > m[0].length)) { - if (m = s, c = g, this.options.backtrack_lexer) { - if (o = this.test_match(s, r[g]), o !== !1) - return o; - if (this._backtrack) { - m = !1; - continue; - } else - return !1; - } else if (!this.options.flex) - break; - } - return m ? (o = this.test_match(m, r[c]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text. -` + this.showPosition(), { - text: "", - token: null, - line: this.yylineno - }); - }, - // return next match that has a token - lex: function() { - var m = this.next(); - return m || this.lex(); - }, - // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) - begin: function(m) { - this.conditionStack.push(m); - }, - // pop the previously active lexer condition state off the condition stack - popState: function() { - var m = this.conditionStack.length - 1; - return m > 0 ? this.conditionStack.pop() : this.conditionStack[0]; - }, - // produce the lexer rule set which is active for the currently active lexer condition state - _currentRules: function() { - return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules; - }, - // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available - topState: function(m) { - return m = this.conditionStack.length - 1 - Math.abs(m || 0), m >= 0 ? this.conditionStack[m] : "INITIAL"; - }, - // alias for begin(condition) - pushState: function(m) { - this.begin(m); - }, - // return the number of states currently on the stack - stateStackSize: function() { - return this.conditionStack.length; - }, - options: {}, - performAction: function(m, s, c, r) { - switch (c) { - case 0: - return 4; - case 1: - return 14; - case 2: - return 12; - case 3: - return 15; - case 4: - return 16; - case 5: - return 22; - case 6: - return 24; - case 7: - return 28; - case 8: - return 30; - case 9: - return 18; - case 10: - return s.yytext = s.yytext.substr(1, s.yyleng - 2), 32; - case 11: - return s.yytext = s.yytext.substr(1, s.yyleng - 2), 33; - case 12: - return 17; - case 13: - return 31; - } - }, - rules: [/^(?:\$)/, /^(?:\.\.)/, /^(?:\.)/, /^(?:\*)/, /^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/, /^(?:\[)/, /^(?:\])/, /^(?:,)/, /^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/, /^(?:(-?(?:0|[1-9][0-9]*)))/, /^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/, /^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/, /^(?:\(.+?\)(?=\]))/, /^(?:\?\(.+?\)(?=\]))/], - conditions: { INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], inclusive: !0 } } - }; - return a; - }(); - D.lexer = E; - function d() { - this.yy = {}; - } - return d.prototype = D, D.Parser = d, new d(); - }(); - typeof T < "u" && typeof B < "u" && (B.parser = y, B.Parser = y.Parser, B.parse = function() { - return y.parse.apply(y, arguments); - }, B.main = function(S) { - S[1] || (console.log("Usage: " + S[0] + " FILE"), v.exit(1)); - var E = T("fs").readFileSync(T("path").normalize(S[1]), "utf8"); - return B.parser.parse(E); - }, typeof L < "u" && T.main === L && B.main(v.argv.slice(1))); - }).call(this, T("_process")); - }, { _process: 14, fs: 12, path: 13 }], 2: [function(T, L, B) { - L.exports = { - identifier: "[a-zA-Z_]+[a-zA-Z0-9_]*", - integer: "-?(?:0|[1-9][0-9]*)", - qq_string: '"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"', - q_string: "'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'" - }; - }, {}], 3: [function(T, L, B) { - var v = T("./dict"), y = T("fs"), D = { - lex: { - macros: { - esc: "\\\\", - int: v.integer - }, - rules: [ - ["\\$", "return 'DOLLAR'"], - ["\\.\\.", "return 'DOT_DOT'"], - ["\\.", "return 'DOT'"], - ["\\*", "return 'STAR'"], - [v.identifier, "return 'IDENTIFIER'"], - ["\\[", "return '['"], - ["\\]", "return ']'"], - [",", "return ','"], - ["({int})?\\:({int})?(\\:({int})?)?", "return 'ARRAY_SLICE'"], - ["{int}", "return 'INTEGER'"], - [v.qq_string, "yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"], - [v.q_string, "yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"], - ["\\(.+?\\)(?=\\])", "return 'SCRIPT_EXPRESSION'"], - ["\\?\\(.+?\\)(?=\\])", "return 'FILTER_EXPRESSION'"] - ] - }, - start: "JSON_PATH", - bnf: { - JSON_PATH: [ - ["DOLLAR", 'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'], - ["DOLLAR PATH_COMPONENTS", 'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'], - ["LEADING_CHILD_MEMBER_EXPRESSION", "yy.ast.unshift(); return yy.ast.yield()"], - ["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS", 'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()'] - ], - PATH_COMPONENTS: [ - ["PATH_COMPONENT", ""], - ["PATH_COMPONENTS PATH_COMPONENT", ""] - ], - PATH_COMPONENT: [ - ["MEMBER_COMPONENT", 'yy.ast.set({ operation: "member" }); yy.ast.push()'], - ["SUBSCRIPT_COMPONENT", 'yy.ast.set({ operation: "subscript" }); yy.ast.push() '] - ], - MEMBER_COMPONENT: [ - ["CHILD_MEMBER_COMPONENT", 'yy.ast.set({ scope: "child" })'], - ["DESCENDANT_MEMBER_COMPONENT", 'yy.ast.set({ scope: "descendant" })'] - ], - CHILD_MEMBER_COMPONENT: [ - ["DOT MEMBER_EXPRESSION", ""] - ], - LEADING_CHILD_MEMBER_EXPRESSION: [ - ["MEMBER_EXPRESSION", 'yy.ast.set({ scope: "child", operation: "member" })'] - ], - DESCENDANT_MEMBER_COMPONENT: [ - ["DOT_DOT MEMBER_EXPRESSION", ""] - ], - MEMBER_EXPRESSION: [ - ["STAR", 'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'], - ["IDENTIFIER", 'yy.ast.set({ expression: { type: "identifier", value: $1 } })'], - ["SCRIPT_EXPRESSION", 'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'], - ["INTEGER", 'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'], - ["END", ""] - ], - SUBSCRIPT_COMPONENT: [ - ["CHILD_SUBSCRIPT_COMPONENT", 'yy.ast.set({ scope: "child" })'], - ["DESCENDANT_SUBSCRIPT_COMPONENT", 'yy.ast.set({ scope: "descendant" })'] - ], - CHILD_SUBSCRIPT_COMPONENT: [ - ["[ SUBSCRIPT ]", ""] - ], - DESCENDANT_SUBSCRIPT_COMPONENT: [ - ["DOT_DOT [ SUBSCRIPT ]", ""] - ], - SUBSCRIPT: [ - ["SUBSCRIPT_EXPRESSION", ""], - ["SUBSCRIPT_EXPRESSION_LIST", '$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1'] - ], - SUBSCRIPT_EXPRESSION_LIST: [ - ["SUBSCRIPT_EXPRESSION_LISTABLE", "$$ = [$1]"], - ["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE", "$$ = $1.concat($3)"] - ], - SUBSCRIPT_EXPRESSION_LISTABLE: [ - ["INTEGER", '$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'], - ["STRING_LITERAL", '$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'], - ["ARRAY_SLICE", '$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)'] - ], - SUBSCRIPT_EXPRESSION: [ - ["STAR", '$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'], - ["SCRIPT_EXPRESSION", '$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'], - ["FILTER_EXPRESSION", '$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)'] - ], - STRING_LITERAL: [ - ["QQ_STRING", "$$ = $1"], - ["Q_STRING", "$$ = $1"] - ] - } - }; - y.readFileSync && (D.moduleInclude = y.readFileSync(T.resolve("../include/module.js")), D.actionInclude = y.readFileSync(T.resolve("../include/action.js"))), L.exports = D; - }, { "./dict": 2, fs: 12 }], 4: [function(T, L, B) { - var v = T("./aesprim"), y = T("./slice"), D = T("static-eval"), S = T("underscore").uniq, E = function() { - return this.initialize.apply(this, arguments); - }; - E.prototype.initialize = function() { - this.traverse = m(!0), this.descend = m(); - }, E.prototype.keys = Object.keys, E.prototype.resolve = function(h) { - var n = [h.operation, h.scope, h.expression.type].join("-"), i = this._fns[n]; - if (!i) - throw new Error("couldn't resolve key: " + n); - return i.bind(this); - }, E.prototype.register = function(h, n) { - if (!n instanceof Function) - throw new Error("handler must be a function"); - this._fns[h] = n; - }, E.prototype._fns = { - "member-child-identifier": function(h, n) { - var i = h.expression.value, p = n.value; - if (p instanceof Object && i in p) - return [{ value: p[i], path: n.path.concat(i) }]; - }, - "member-descendant-identifier": c(function(h, n, i) { - return h == i; - }), - "subscript-child-numeric_literal": s(function(h, n, i) { - return h === i; - }), - "member-child-numeric_literal": s(function(h, n, i) { - return String(h) === String(i); - }), - "subscript-descendant-numeric_literal": c(function(h, n, i) { - return h === i; - }), - "member-child-wildcard": s(function() { - return !0; - }), - "member-descendant-wildcard": c(function() { - return !0; - }), - "subscript-descendant-wildcard": c(function() { - return !0; - }), - "subscript-child-wildcard": s(function() { - return !0; - }), - "subscript-child-slice": function(h, n) { - if (a(n.value)) { - var i = h.expression.value.split(":").map(b), p = n.value.map(function(f, I) { - return { value: f, path: n.path.concat(I) }; - }); - return y.apply(null, [p].concat(i)); - } - }, - "subscript-child-union": function(h, n) { - var i = []; - return h.expression.value.forEach(function(p) { - var f = { operation: "subscript", scope: "child", expression: p.expression }, I = this.resolve(f), R = I(f, n); - R && (i = i.concat(R)); - }, this), g(i); - }, - "subscript-descendant-union": function(h, n, i) { - var p = T(".."), f = this, I = [], R = p.nodes(n, "$..*").slice(1); - return R.forEach(function(U) { - I.length >= i || h.expression.value.forEach(function(w) { - var H = { operation: "subscript", scope: "child", expression: w.expression }, M = f.resolve(H), z = M(H, U); - I = I.concat(z); - }); - }), g(I); - }, - "subscript-child-filter_expression": function(h, n, i) { - var p = h.expression.value.slice(2, -1), f = v.parse(p).body[0].expression, I = function(R, U) { - return r(f, { "@": U }); - }; - return this.descend(n, null, I, i); - }, - "subscript-descendant-filter_expression": function(h, n, i) { - var p = h.expression.value.slice(2, -1), f = v.parse(p).body[0].expression, I = function(R, U) { - return r(f, { "@": U }); - }; - return this.traverse(n, null, I, i); - }, - "subscript-child-script_expression": function(h, n) { - var i = h.expression.value.slice(1, -1); - return d(n, i, "$[{{value}}]"); - }, - "member-child-script_expression": function(h, n) { - var i = h.expression.value.slice(1, -1); - return d(n, i, "$.{{value}}"); - }, - "member-descendant-script_expression": function(h, n) { - var i = h.expression.value.slice(1, -1); - return d(n, i, "$..value"); - } - }, E.prototype._fns["subscript-child-string_literal"] = E.prototype._fns["member-child-identifier"], E.prototype._fns["member-descendant-numeric_literal"] = E.prototype._fns["subscript-descendant-string_literal"] = E.prototype._fns["member-descendant-identifier"]; - function d(h, n, i) { - var p = T("./index"), f = v.parse(n).body[0].expression, I = r(f, { "@": h.value }), R = i.replace(/\{\{\s*value\s*\}\}/g, I), U = p.nodes(h.value, R); - return U.forEach(function(w) { - w.path = h.path.concat(w.path.slice(1)); - }), U; - } - function a(h) { - return Array.isArray(h); - } - function o(h) { - return h && !(h instanceof Array) && h instanceof Object; - } - function m(h) { - return function(n, i, p, f) { - var I = n.value, R = n.path, U = [], w = (function(H, M) { - a(H) ? (H.forEach(function(z, V) { - U.length >= f || p(V, z, i) && U.push({ path: M.concat(V), value: z }); - }), H.forEach(function(z, V) { - U.length >= f || h && w(z, M.concat(V)); - })) : o(H) && (this.keys(H).forEach(function(z) { - U.length >= f || p(z, H[z], i) && U.push({ path: M.concat(z), value: H[z] }); - }), this.keys(H).forEach(function(z) { - U.length >= f || h && w(H[z], M.concat(z)); - })); - }).bind(this); - return w(I, R), U; - }; - } - function s(h) { - return function(n, i, p) { - return this.descend(i, n.expression.value, h, p); - }; - } - function c(h) { - return function(n, i, p) { - return this.traverse(i, n.expression.value, h, p); - }; - } - function r() { - try { - return D.apply(this, arguments); - } catch { - } - } - function g(h) { - return h = h.filter(function(n) { - return n; - }), S( - h, - function(n) { - return n.path.map(function(i) { - return String(i).replace("-", "--"); - }).join("-"); - } - ); - } - function b(h) { - var n = String(h); - return n.match(/^-?[0-9]+$/) ? parseInt(n) : null; - } - L.exports = E; - }, { "..": "jsonpath", "./aesprim": "./aesprim", "./index": 5, "./slice": 7, "static-eval": 15, underscore: 12 }], 5: [function(T, L, B) { - var v = T("assert"), y = T("./dict"), D = T("./parser"), S = T("./handlers"), E = function() { - this.initialize.apply(this, arguments); - }; - E.prototype.initialize = function() { - this.parser = new D(), this.handlers = new S(); - }, E.prototype.parse = function(o) { - return v.ok(d(o), "we need a path"), this.parser.parse(o); - }, E.prototype.parent = function(o, m) { - v.ok(o instanceof Object, "obj needs to be an object"), v.ok(m, "we need a path"); - var s = this.nodes(o, m)[0]; - return s.path.pop(), this.value(o, s.path); - }, E.prototype.apply = function(o, m, s) { - v.ok(o instanceof Object, "obj needs to be an object"), v.ok(m, "we need a path"), v.equal(typeof s, "function", "fn needs to be function"); - var c = this.nodes(o, m).sort(function(r, g) { - return g.path.length - r.path.length; - }); - return c.forEach(function(r) { - var g = r.path.pop(), b = this.value(o, this.stringify(r.path)), h = r.value = s.call(o, b[g]); - b[g] = h; - }, this), c; - }, E.prototype.value = function(o, m, s) { - if (v.ok(o instanceof Object, "obj needs to be an object"), v.ok(m, "we need a path"), arguments.length >= 3) { - var c = this.nodes(o, m).shift(); - if (!c) - return this._vivify(o, m, s); - var r = c.path.slice(-1).shift(), g = this.parent(o, this.stringify(c.path)); - g[r] = s; - } - return this.query(o, this.stringify(m), 1).shift(); - }, E.prototype._vivify = function(o, m, s) { - var c = this; - v.ok(o instanceof Object, "obj needs to be an object"), v.ok(m, "we need a path"); - var r = this.parser.parse(m).map(function(b) { - return b.expression.value; - }), g = function(b, h) { - var n = b.pop(), i = c.value(o, b); - i || (g(b.concat(), typeof n == "string" ? {} : []), i = c.value(o, b)), i[n] = h; - }; - return g(r, s), this.query(o, m)[0]; - }, E.prototype.query = function(o, m, s) { - v.ok(o instanceof Object, "obj needs to be an object"), v.ok(d(m), "we need a path"); - var c = this.nodes(o, m, s).map(function(r) { - return r.value; - }); - return c; - }, E.prototype.paths = function(o, m, s) { - v.ok(o instanceof Object, "obj needs to be an object"), v.ok(m, "we need a path"); - var c = this.nodes(o, m, s).map(function(r) { - return r.path; - }); - return c; - }, E.prototype.nodes = function(o, m, s) { - if (v.ok(o instanceof Object, "obj needs to be an object"), v.ok(m, "we need a path"), s === 0) - return []; - var c = this.parser.parse(m), r = this.handlers, g = [{ path: ["$"], value: o }], b = []; - return c.length && c[0].expression.type == "root" && c.shift(), c.length ? (c.forEach(function(h, n) { - if (!(b.length >= s)) { - var i = r.resolve(h), p = []; - g.forEach(function(f) { - if (!(b.length >= s)) { - var I = i(h, f, s); - n == c.length - 1 ? b = b.concat(I || []) : p = p.concat(I || []); - } - }), g = p; - } - }), s ? b.slice(0, s) : b) : g; - }, E.prototype.stringify = function(o) { - v.ok(o, "we need a path"); - var m = "$", s = { - "descendant-member": "..{{value}}", - "child-member": ".{{value}}", - "descendant-subscript": "..[{{value}}]", - "child-subscript": "[{{value}}]" - }; - return o = this._normalize(o), o.forEach(function(c) { - if (c.expression.type != "root") { - var r = [c.scope, c.operation].join("-"), g = s[r], b; - if (c.expression.type == "string_literal" ? b = JSON.stringify(c.expression.value) : b = c.expression.value, !g) - throw new Error("couldn't find template " + r); - m += g.replace(/{{value}}/, b); - } - }), m; - }, E.prototype._normalize = function(o) { - if (v.ok(o, "we need a path"), typeof o == "string") - return this.parser.parse(o); - if (Array.isArray(o) && typeof o[0] == "string") { - var m = [{ expression: { type: "root", value: "$" } }]; - return o.forEach(function(s, c) { - if (!(s == "$" && c === 0)) - if (typeof s == "string" && s.match("^" + y.identifier + "$")) - m.push({ - operation: "member", - scope: "child", - expression: { value: s, type: "identifier" } - }); - else { - var r = typeof s == "number" ? "numeric_literal" : "string_literal"; - m.push({ - operation: "subscript", - scope: "child", - expression: { value: s, type: r } - }); - } - }), m; - } else if (Array.isArray(o) && typeof o[0] == "object") - return o; - throw new Error("couldn't understand path " + o); - }; - function d(o) { - return Object.prototype.toString.call(o) == "[object String]"; - } - E.Handlers = S, E.Parser = D; - var a = new E(); - a.JSONPath = E, L.exports = a; - }, { "./dict": 2, "./handlers": 4, "./parser": 6, assert: 8 }], 6: [function(T, L, B) { - var v = T("./grammar"), y = T("../generated/parser"), D = function() { - var S = new y.Parser(), E = S.parseError; - return S.yy.parseError = function() { - S.yy.ast && S.yy.ast.initialize(), E.apply(S, arguments); - }, S; - }; - D.grammar = v, L.exports = D; - }, { "../generated/parser": 1, "./grammar": 3 }], 7: [function(T, L, B) { - L.exports = function(y, D, S, E) { - if (typeof D == "string") - throw new Error("start cannot be a string"); - if (typeof S == "string") - throw new Error("end cannot be a string"); - if (typeof E == "string") - throw new Error("step cannot be a string"); - var d = y.length; - if (E === 0) - throw new Error("step cannot be zero"); - if (E = E ? v(E) : 1, D = D < 0 ? d + D : D, S = S < 0 ? d + S : S, D = v(D === 0 ? 0 : D || (E > 0 ? 0 : d - 1)), S = v(S === 0 ? 0 : S || (E > 0 ? d : -1)), D = E > 0 ? Math.max(0, D) : Math.min(d, D), S = E > 0 ? Math.min(S, d) : Math.max(-1, S), E > 0 && S <= D) - return []; - if (E < 0 && D <= S) - return []; - for (var a = [], o = D; o != S && !(E < 0 && o <= S || E > 0 && o >= S); o += E) - a.push(y[o]); - return a; - }; - function v(y) { - return String(y).match(/^[0-9]+$/) ? parseInt(y) : Number.isFinite(y) ? parseInt(y, 10) : 0; - } - }, {}], 8: [function(T, L, B) { - var v = T("util/"), y = Array.prototype.slice, D = Object.prototype.hasOwnProperty, S = L.exports = m; - S.AssertionError = function(i) { - this.name = "AssertionError", this.actual = i.actual, this.expected = i.expected, this.operator = i.operator, i.message ? (this.message = i.message, this.generatedMessage = !1) : (this.message = a(this), this.generatedMessage = !0); - var p = i.stackStartFunction || o; - if (Error.captureStackTrace) - Error.captureStackTrace(this, p); - else { - var f = new Error(); - if (f.stack) { - var I = f.stack, R = p.name, U = I.indexOf(` -` + R); - if (U >= 0) { - var w = I.indexOf(` -`, U + 1); - I = I.substring(w + 1); - } - this.stack = I; - } - } - }, v.inherits(S.AssertionError, Error); - function E(n, i) { - return v.isUndefined(i) ? "" + i : v.isNumber(i) && !isFinite(i) || v.isFunction(i) || v.isRegExp(i) ? i.toString() : i; - } - function d(n, i) { - return v.isString(n) ? n.length < i ? n : n.slice(0, i) : n; - } - function a(n) { - return d(JSON.stringify(n.actual, E), 128) + " " + n.operator + " " + d(JSON.stringify(n.expected, E), 128); - } - function o(n, i, p, f, I) { - throw new S.AssertionError({ - message: p, - actual: n, - expected: i, - operator: f, - stackStartFunction: I - }); - } - S.fail = o; - function m(n, i) { - n || o(n, !0, i, "==", S.ok); - } - S.ok = m, S.equal = function(i, p, f) { - i != p && o(i, p, f, "==", S.equal); - }, S.notEqual = function(i, p, f) { - i == p && o(i, p, f, "!=", S.notEqual); - }, S.deepEqual = function(i, p, f) { - s(i, p) || o(i, p, f, "deepEqual", S.deepEqual); - }; - function s(n, i) { - if (n === i) - return !0; - if (v.isBuffer(n) && v.isBuffer(i)) { - if (n.length != i.length) - return !1; - for (var p = 0; p < n.length; p++) - if (n[p] !== i[p]) - return !1; - return !0; - } else - return v.isDate(n) && v.isDate(i) ? n.getTime() === i.getTime() : v.isRegExp(n) && v.isRegExp(i) ? n.source === i.source && n.global === i.global && n.multiline === i.multiline && n.lastIndex === i.lastIndex && n.ignoreCase === i.ignoreCase : !v.isObject(n) && !v.isObject(i) ? n == i : r(n, i); - } - function c(n) { - return Object.prototype.toString.call(n) == "[object Arguments]"; - } - function r(n, i) { - if (v.isNullOrUndefined(n) || v.isNullOrUndefined(i) || n.prototype !== i.prototype) - return !1; - if (v.isPrimitive(n) || v.isPrimitive(i)) - return n === i; - var p = c(n), f = c(i); - if (p && !f || !p && f) - return !1; - if (p) - return n = y.call(n), i = y.call(i), s(n, i); - var I = h(n), R = h(i), U, w; - if (I.length != R.length) - return !1; - for (I.sort(), R.sort(), w = I.length - 1; w >= 0; w--) - if (I[w] != R[w]) - return !1; - for (w = I.length - 1; w >= 0; w--) - if (U = I[w], !s(n[U], i[U])) - return !1; - return !0; - } - S.notDeepEqual = function(i, p, f) { - s(i, p) && o(i, p, f, "notDeepEqual", S.notDeepEqual); - }, S.strictEqual = function(i, p, f) { - i !== p && o(i, p, f, "===", S.strictEqual); - }, S.notStrictEqual = function(i, p, f) { - i === p && o(i, p, f, "!==", S.notStrictEqual); - }; - function g(n, i) { - return !n || !i ? !1 : Object.prototype.toString.call(i) == "[object RegExp]" ? i.test(n) : n instanceof i ? !0 : i.call({}, n) === !0; - } - function b(n, i, p, f) { - var I; - v.isString(p) && (f = p, p = null); - try { - i(); - } catch (R) { - I = R; - } - if (f = (p && p.name ? " (" + p.name + ")." : ".") + (f ? " " + f : "."), n && !I && o(I, p, "Missing expected exception" + f), !n && g(I, p) && o(I, p, "Got unwanted exception" + f), n && I && p && !g(I, p) || !n && I) - throw I; - } - S.throws = function(n, i, p) { - b.apply(this, [!0].concat(y.call(arguments))); - }, S.doesNotThrow = function(n, i) { - b.apply(this, [!1].concat(y.call(arguments))); - }, S.ifError = function(n) { - if (n) - throw n; - }; - var h = Object.keys || function(n) { - var i = []; - for (var p in n) - D.call(n, p) && i.push(p); - return i; - }; - }, { "util/": 11 }], 9: [function(T, L, B) { - typeof Object.create == "function" ? L.exports = function(y, D) { - y.super_ = D, y.prototype = Object.create(D.prototype, { - constructor: { - value: y, - enumerable: !1, - writable: !0, - configurable: !0 - } - }); - } : L.exports = function(y, D) { - y.super_ = D; - var S = function() { - }; - S.prototype = D.prototype, y.prototype = new S(), y.prototype.constructor = y; - }; - }, {}], 10: [function(T, L, B) { - L.exports = function(y) { - return y && typeof y == "object" && typeof y.copy == "function" && typeof y.fill == "function" && typeof y.readUInt8 == "function"; - }; - }, {}], 11: [function(T, L, B) { - (function(v, y) { - var D = /%[sdj%]/g; - B.format = function(A) { - if (!R(A)) { - for (var F = [], k = 0; k < arguments.length; k++) - F.push(d(arguments[k])); - return F.join(" "); - } - for (var k = 1, X = arguments, ee = X.length, $ = String(A).replace(D, function(K) { - if (K === "%%") - return "%"; - if (k >= ee) - return K; - switch (K) { - case "%s": - return String(X[k++]); - case "%d": - return Number(X[k++]); - case "%j": - try { - return JSON.stringify(X[k++]); - } catch { - return "[Circular]"; - } - default: - return K; - } - }), q = X[k]; k < ee; q = X[++k]) - p(q) || !M(q) ? $ += " " + q : $ += " " + d(q); - return $; - }, B.deprecate = function(A, F) { - if (w(y.process)) - return function() { - return B.deprecate(A, F).apply(this, arguments); - }; - if (v.noDeprecation === !0) - return A; - var k = !1; - function X() { - if (!k) { - if (v.throwDeprecation) - throw new Error(F); - v.traceDeprecation ? console.trace(F) : console.error(F), k = !0; - } - return A.apply(this, arguments); - } - return X; - }; - var S = {}, E; - B.debuglog = function(A) { - if (w(E) && (E = v.env.NODE_DEBUG || ""), A = A.toUpperCase(), !S[A]) - if (new RegExp("\\b" + A + "\\b", "i").test(E)) { - var F = v.pid; - S[A] = function() { - var k = B.format.apply(B, arguments); - console.error("%s %d: %s", A, F, k); - }; - } else - S[A] = function() { - }; - return S[A]; - }; - function d(A, F) { - var k = { - seen: [], - stylize: o - }; - return arguments.length >= 3 && (k.depth = arguments[2]), arguments.length >= 4 && (k.colors = arguments[3]), i(F) ? k.showHidden = F : F && B._extend(k, F), w(k.showHidden) && (k.showHidden = !1), w(k.depth) && (k.depth = 2), w(k.colors) && (k.colors = !1), w(k.customInspect) && (k.customInspect = !0), k.colors && (k.stylize = a), s(k, A, k.depth); - } - B.inspect = d, d.colors = { - bold: [1, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - white: [37, 39], - grey: [90, 39], - black: [30, 39], - blue: [34, 39], - cyan: [36, 39], - green: [32, 39], - magenta: [35, 39], - red: [31, 39], - yellow: [33, 39] - }, d.styles = { - special: "cyan", - number: "yellow", - boolean: "yellow", - undefined: "grey", - null: "bold", - string: "green", - date: "magenta", - // "name": intentionally not styling - regexp: "red" - }; - function a(A, F) { - var k = d.styles[F]; - return k ? "\x1B[" + d.colors[k][0] + "m" + A + "\x1B[" + d.colors[k][1] + "m" : A; - } - function o(A, F) { - return A; - } - function m(A) { - var F = {}; - return A.forEach(function(k, X) { - F[k] = !0; - }), F; - } - function s(A, F, k) { - if (A.customInspect && F && ae(F.inspect) && // Filter out the util module, it's inspect function is special - F.inspect !== B.inspect && // Also filter out any prototype objects using the circular check. - !(F.constructor && F.constructor.prototype === F)) { - var X = F.inspect(k, A); - return R(X) || (X = s(A, X, k)), X; - } - var ee = c(A, F); - if (ee) - return ee; - var $ = Object.keys(F), q = m($); - if (A.showHidden && ($ = Object.getOwnPropertyNames(F)), V(F) && ($.indexOf("message") >= 0 || $.indexOf("description") >= 0)) - return r(F); - if ($.length === 0) { - if (ae(F)) { - var K = F.name ? ": " + F.name : ""; - return A.stylize("[Function" + K + "]", "special"); - } - if (H(F)) - return A.stylize(RegExp.prototype.toString.call(F), "regexp"); - if (z(F)) - return A.stylize(Date.prototype.toString.call(F), "date"); - if (V(F)) - return r(F); - } - var Q = "", fe = !1, Ee = ["{", "}"]; - if (n(F) && (fe = !0, Ee = ["[", "]"]), ae(F)) { - var ke = F.name ? ": " + F.name : ""; - Q = " [Function" + ke + "]"; - } - if (H(F) && (Q = " " + RegExp.prototype.toString.call(F)), z(F) && (Q = " " + Date.prototype.toUTCString.call(F)), V(F) && (Q = " " + r(F)), $.length === 0 && (!fe || F.length == 0)) - return Ee[0] + Q + Ee[1]; - if (k < 0) - return H(F) ? A.stylize(RegExp.prototype.toString.call(F), "regexp") : A.stylize("[Object]", "special"); - A.seen.push(F); - var ge; - return fe ? ge = g(A, F, k, q, $) : ge = $.map(function(Fe) { - return b(A, F, k, q, Fe, fe); - }), A.seen.pop(), h(ge, Q, Ee); - } - function c(A, F) { - if (w(F)) - return A.stylize("undefined", "undefined"); - if (R(F)) { - var k = "'" + JSON.stringify(F).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'"; - return A.stylize(k, "string"); - } - if (I(F)) - return A.stylize("" + F, "number"); - if (i(F)) - return A.stylize("" + F, "boolean"); - if (p(F)) - return A.stylize("null", "null"); - } - function r(A) { - return "[" + Error.prototype.toString.call(A) + "]"; - } - function g(A, F, k, X, ee) { - for (var $ = [], q = 0, K = F.length; q < K; ++q) - ve(F, String(q)) ? $.push(b( - A, - F, - k, - X, - String(q), - !0 - )) : $.push(""); - return ee.forEach(function(Q) { - Q.match(/^\d+$/) || $.push(b( - A, - F, - k, - X, - Q, - !0 - )); - }), $; - } - function b(A, F, k, X, ee, $) { - var q, K, Q; - if (Q = Object.getOwnPropertyDescriptor(F, ee) || { value: F[ee] }, Q.get ? Q.set ? K = A.stylize("[Getter/Setter]", "special") : K = A.stylize("[Getter]", "special") : Q.set && (K = A.stylize("[Setter]", "special")), ve(X, ee) || (q = "[" + ee + "]"), K || (A.seen.indexOf(Q.value) < 0 ? (p(k) ? K = s(A, Q.value, null) : K = s(A, Q.value, k - 1), K.indexOf(` -`) > -1 && ($ ? K = K.split(` -`).map(function(fe) { - return " " + fe; - }).join(` -`).substr(2) : K = ` -` + K.split(` -`).map(function(fe) { - return " " + fe; - }).join(` -`))) : K = A.stylize("[Circular]", "special")), w(q)) { - if ($ && ee.match(/^\d+$/)) - return K; - q = JSON.stringify("" + ee), q.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (q = q.substr(1, q.length - 2), q = A.stylize(q, "name")) : (q = q.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), q = A.stylize(q, "string")); - } - return q + ": " + K; - } - function h(A, F, k) { - var X = A.reduce(function(ee, $) { - return $.indexOf(` -`) >= 0, ee + $.replace(/\u001b\[\d\d?m/g, "").length + 1; - }, 0); - return X > 60 ? k[0] + (F === "" ? "" : F + ` - `) + " " + A.join(`, - `) + " " + k[1] : k[0] + F + " " + A.join(", ") + " " + k[1]; - } - function n(A) { - return Array.isArray(A); - } - B.isArray = n; - function i(A) { - return typeof A == "boolean"; - } - B.isBoolean = i; - function p(A) { - return A === null; - } - B.isNull = p; - function f(A) { - return A == null; - } - B.isNullOrUndefined = f; - function I(A) { - return typeof A == "number"; - } - B.isNumber = I; - function R(A) { - return typeof A == "string"; - } - B.isString = R; - function U(A) { - return typeof A == "symbol"; - } - B.isSymbol = U; - function w(A) { - return A === void 0; - } - B.isUndefined = w; - function H(A) { - return M(A) && J(A) === "[object RegExp]"; - } - B.isRegExp = H; - function M(A) { - return typeof A == "object" && A !== null; - } - B.isObject = M; - function z(A) { - return M(A) && J(A) === "[object Date]"; - } - B.isDate = z; - function V(A) { - return M(A) && (J(A) === "[object Error]" || A instanceof Error); - } - B.isError = V; - function ae(A) { - return typeof A == "function"; - } - B.isFunction = ae; - function Y(A) { - return A === null || typeof A == "boolean" || typeof A == "number" || typeof A == "string" || typeof A == "symbol" || // ES6 symbol - typeof A > "u"; - } - B.isPrimitive = Y, B.isBuffer = T("./support/isBuffer"); - function J(A) { - return Object.prototype.toString.call(A); - } - function se(A) { - return A < 10 ? "0" + A.toString(10) : A.toString(10); - } - var ie = [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ]; - function oe() { - var A = /* @__PURE__ */ new Date(), F = [ - se(A.getHours()), - se(A.getMinutes()), - se(A.getSeconds()) - ].join(":"); - return [A.getDate(), ie[A.getMonth()], F].join(" "); - } - B.log = function() { - console.log("%s - %s", oe(), B.format.apply(B, arguments)); - }, B.inherits = T("inherits"), B._extend = function(A, F) { - if (!F || !M(F)) - return A; - for (var k = Object.keys(F), X = k.length; X--; ) - A[k[X]] = F[k[X]]; - return A; - }; - function ve(A, F) { - return Object.prototype.hasOwnProperty.call(A, F); - } - }).call(this, T("_process"), typeof Xe < "u" ? Xe : typeof self < "u" ? self : typeof window < "u" ? window : {}); - }, { "./support/isBuffer": 10, _process: 14, inherits: 9 }], 12: [function(T, L, B) { - }, {}], 13: [function(T, L, B) { - (function(v) { - function y(d, a) { - for (var o = 0, m = d.length - 1; m >= 0; m--) { - var s = d[m]; - s === "." ? d.splice(m, 1) : s === ".." ? (d.splice(m, 1), o++) : o && (d.splice(m, 1), o--); - } - if (a) - for (; o--; o) - d.unshift(".."); - return d; - } - B.resolve = function() { - for (var d = "", a = !1, o = arguments.length - 1; o >= -1 && !a; o--) { - var m = o >= 0 ? arguments[o] : v.cwd(); - if (typeof m != "string") - throw new TypeError("Arguments to path.resolve must be strings"); - if (!m) - continue; - d = m + "/" + d, a = m.charAt(0) === "/"; - } - return d = y(S(d.split("/"), function(s) { - return !!s; - }), !a).join("/"), (a ? "/" : "") + d || "."; - }, B.normalize = function(d) { - var a = B.isAbsolute(d), o = E(d, -1) === "/"; - return d = y(S(d.split("/"), function(m) { - return !!m; - }), !a).join("/"), !d && !a && (d = "."), d && o && (d += "/"), (a ? "/" : "") + d; - }, B.isAbsolute = function(d) { - return d.charAt(0) === "/"; - }, B.join = function() { - var d = Array.prototype.slice.call(arguments, 0); - return B.normalize(S(d, function(a, o) { - if (typeof a != "string") - throw new TypeError("Arguments to path.join must be strings"); - return a; - }).join("/")); - }, B.relative = function(d, a) { - d = B.resolve(d).substr(1), a = B.resolve(a).substr(1); - function o(h) { - for (var n = 0; n < h.length && h[n] === ""; n++) - ; - for (var i = h.length - 1; i >= 0 && h[i] === ""; i--) - ; - return n > i ? [] : h.slice(n, i - n + 1); - } - for (var m = o(d.split("/")), s = o(a.split("/")), c = Math.min(m.length, s.length), r = c, g = 0; g < c; g++) - if (m[g] !== s[g]) { - r = g; - break; - } - for (var b = [], g = r; g < m.length; g++) - b.push(".."); - return b = b.concat(s.slice(r)), b.join("/"); - }, B.sep = "/", B.delimiter = ":", B.dirname = function(d) { - if (typeof d != "string" && (d = d + ""), d.length === 0) - return "."; - for (var a = d.charCodeAt(0), o = a === 47, m = -1, s = !0, c = d.length - 1; c >= 1; --c) - if (a = d.charCodeAt(c), a === 47) { - if (!s) { - m = c; - break; - } - } else - s = !1; - return m === -1 ? o ? "/" : "." : o && m === 1 ? "/" : d.slice(0, m); - }; - function D(d) { - typeof d != "string" && (d = d + ""); - var a = 0, o = -1, m = !0, s; - for (s = d.length - 1; s >= 0; --s) - if (d.charCodeAt(s) === 47) { - if (!m) { - a = s + 1; - break; - } - } else - o === -1 && (m = !1, o = s + 1); - return o === -1 ? "" : d.slice(a, o); - } - B.basename = function(d, a) { - var o = D(d); - return a && o.substr(-1 * a.length) === a && (o = o.substr(0, o.length - a.length)), o; - }, B.extname = function(d) { - typeof d != "string" && (d = d + ""); - for (var a = -1, o = 0, m = -1, s = !0, c = 0, r = d.length - 1; r >= 0; --r) { - var g = d.charCodeAt(r); - if (g === 47) { - if (!s) { - o = r + 1; - break; - } - continue; - } - m === -1 && (s = !1, m = r + 1), g === 46 ? a === -1 ? a = r : c !== 1 && (c = 1) : a !== -1 && (c = -1); - } - return a === -1 || m === -1 || // We saw a non-dot character immediately before the dot - c === 0 || // The (right-most) trimmed path component is exactly '..' - c === 1 && a === m - 1 && a === o + 1 ? "" : d.slice(a, m); - }; - function S(d, a) { - if (d.filter) - return d.filter(a); - for (var o = [], m = 0; m < d.length; m++) - a(d[m], m, d) && o.push(d[m]); - return o; - } - var E = "ab".substr(-1) === "b" ? function(d, a, o) { - return d.substr(a, o); - } : function(d, a, o) { - return a < 0 && (a = d.length + a), d.substr(a, o); - }; - }).call(this, T("_process")); - }, { _process: 14 }], 14: [function(T, L, B) { - var v = L.exports = {}, y, D; - function S() { - throw new Error("setTimeout has not been defined"); - } - function E() { - throw new Error("clearTimeout has not been defined"); - } - (function() { - try { - typeof setTimeout == "function" ? y = setTimeout : y = S; - } catch { - y = S; - } - try { - typeof clearTimeout == "function" ? D = clearTimeout : D = E; - } catch { - D = E; - } - })(); - function d(n) { - if (y === setTimeout) - return setTimeout(n, 0); - if ((y === S || !y) && setTimeout) - return y = setTimeout, setTimeout(n, 0); - try { - return y(n, 0); - } catch { - try { - return y.call(null, n, 0); - } catch { - return y.call(this, n, 0); - } - } - } - function a(n) { - if (D === clearTimeout) - return clearTimeout(n); - if ((D === E || !D) && clearTimeout) - return D = clearTimeout, clearTimeout(n); - try { - return D(n); - } catch { - try { - return D.call(null, n); - } catch { - return D.call(this, n); - } - } - } - var o = [], m = !1, s, c = -1; - function r() { - !m || !s || (m = !1, s.length ? o = s.concat(o) : c = -1, o.length && g()); - } - function g() { - if (!m) { - var n = d(r); - m = !0; - for (var i = o.length; i; ) { - for (s = o, o = []; ++c < i; ) - s && s[c].run(); - c = -1, i = o.length; - } - s = null, m = !1, a(n); - } - } - v.nextTick = function(n) { - var i = new Array(arguments.length - 1); - if (arguments.length > 1) - for (var p = 1; p < arguments.length; p++) - i[p - 1] = arguments[p]; - o.push(new b(n, i)), o.length === 1 && !m && d(g); - }; - function b(n, i) { - this.fun = n, this.array = i; - } - b.prototype.run = function() { - this.fun.apply(null, this.array); - }, v.title = "browser", v.browser = !0, v.env = {}, v.argv = [], v.version = "", v.versions = {}; - function h() { - } - v.on = h, v.addListener = h, v.once = h, v.off = h, v.removeListener = h, v.removeAllListeners = h, v.emit = h, v.prependListener = h, v.prependOnceListener = h, v.listeners = function(n) { - return []; - }, v.binding = function(n) { - throw new Error("process.binding is not supported"); - }, v.cwd = function() { - return "/"; - }, v.chdir = function(n) { - throw new Error("process.chdir is not supported"); - }, v.umask = function() { - return 0; - }; - }, {}], 15: [function(T, L, B) { - var v = T("escodegen").generate; - L.exports = function(y, D) { - D || (D = {}); - var S = {}, E = function d(a, o) { - if (a.type === "Literal") - return a.value; - if (a.type === "UnaryExpression") { - var m = d(a.argument); - return a.operator === "+" ? +m : a.operator === "-" ? -m : a.operator === "~" ? ~m : a.operator === "!" ? !m : S; - } else if (a.type === "ArrayExpression") { - for (var s = [], c = 0, r = a.elements.length; c < r; c++) { - var g = d(a.elements[c]); - if (g === S) - return S; - s.push(g); - } - return s; - } else if (a.type === "ObjectExpression") { - for (var b = {}, c = 0; c < a.properties.length; c++) { - var h = a.properties[c], n = h.value === null ? h.value : d(h.value); - if (n === S) - return S; - b[h.key.value || h.key.name] = n; - } - return b; - } else if (a.type === "BinaryExpression" || a.type === "LogicalExpression") { - var r = d(a.left); - if (r === S) - return S; - var i = d(a.right); - if (i === S) - return S; - var p = a.operator; - return p === "==" ? r == i : p === "===" ? r === i : p === "!=" ? r != i : p === "!==" ? r !== i : p === "+" ? r + i : p === "-" ? r - i : p === "*" ? r * i : p === "/" ? r / i : p === "%" ? r % i : p === "<" ? r < i : p === "<=" ? r <= i : p === ">" ? r > i : p === ">=" ? r >= i : p === "|" ? r | i : p === "&" ? r & i : p === "^" ? r ^ i : p === "&&" ? r && i : p === "||" ? r || i : S; - } else { - if (a.type === "Identifier") - return {}.hasOwnProperty.call(D, a.name) ? D[a.name] : S; - if (a.type === "ThisExpression") - return {}.hasOwnProperty.call(D, "this") ? D.this : S; - if (a.type === "CallExpression") { - var f = d(a.callee); - if (f === S || typeof f != "function") - return S; - var I = a.callee.object ? d(a.callee.object) : S; - I === S && (I = null); - for (var R = [], c = 0, r = a.arguments.length; c < r; c++) { - var g = d(a.arguments[c]); - if (g === S) - return S; - R.push(g); - } - return f.apply(I, R); - } else if (a.type === "MemberExpression") { - var b = d(a.object); - if (b === S || typeof b == "function") - return S; - if (a.property.type === "Identifier") - return b[a.property.name]; - var h = d(a.property); - return h === S ? S : b[h]; - } else if (a.type === "ConditionalExpression") { - var m = d(a.test); - return m === S ? S : d(m ? a.consequent : a.alternate); - } else if (a.type === "ExpressionStatement") { - var m = d(a.expression); - return m === S ? S : m; - } else { - if (a.type === "ReturnStatement") - return d(a.argument); - if (a.type === "FunctionExpression") { - var U = a.body.body, w = {}; - Object.keys(D).forEach(function(ie) { - w[ie] = D[ie]; - }); - for (var c = 0; c < a.params.length; c++) { - var H = a.params[c]; - if (H.type == "Identifier") - D[H.name] = null; - else - return S; - } - for (var c in U) - if (d(U[c]) === S) - return S; - D = w; - var M = Object.keys(D), z = M.map(function(ie) { - return D[ie]; - }); - return Function(M.join(", "), "return " + v(a)).apply(null, z); - } else if (a.type === "TemplateLiteral") { - for (var V = "", c = 0; c < a.expressions.length; c++) - V += d(a.quasis[c]), V += d(a.expressions[c]); - return V += d(a.quasis[c]), V; - } else if (a.type === "TaggedTemplateExpression") { - var ae = d(a.tag), Y = a.quasi, J = Y.quasis.map(d), se = Y.expressions.map(d); - return ae.apply(null, [J].concat(se)); - } else - return a.type === "TemplateElement" ? a.value.cooked : S; - } - } - }(y); - return E === S ? void 0 : E; - }; - }, { escodegen: 12 }], jsonpath: [function(T, L, B) { - L.exports = T("./lib/index"); - }, { "./lib/index": 5 }] }, {}, ["jsonpath"])("jsonpath"); - }); -})(Ve); -var Pt = Ve.exports; -const Lt = /* @__PURE__ */ Nt(Pt); -function Rt(le, Ne) { - let T; - try { - T = JSON.parse(Ne); - } catch { - return; - } - const L = Lt.query(T, le); - return { filtered: JSON.stringify(L, null, 2) }; -} -export { - Rt as pluginHookResponseFilter -}; diff --git a/src-tauri/plugins/build/filter-xpath/index.mjs b/src-tauri/plugins/build/filter-xpath/index.mjs deleted file mode 100644 index c9985c99..00000000 --- a/src-tauri/plugins/build/filter-xpath/index.mjs +++ /dev/null @@ -1,6125 +0,0 @@ -function $t(t) { - return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t; -} -var nt = {}; -(function(t) { - var u = t; - (function(n) { - var s = "__namespace", c = function(e) { - return e == null; - }, f = function(e) { - return e === s || Number.isInteger(e) && e >= 1 && e <= 11; - }, A = function(e) { - return e && f(e.nodeType) && typeof e.nodeName == "string"; - }; - function y(e) { - var r = Array.prototype.slice, o = e.length, a = function(l, g) { - return function() { - return g.apply(this, l.concat(r.call(arguments))); - }; - }, i = function() { - var l = r.call(arguments); - return l.length < o ? a(l, i) : e.apply(this, r.apply(arguments, [0, o])); - }; - return i; - } - var N = function(e, r) { - for (var o = 0; o < r.length; o += 1) - e(r[o], o, r); - }, w = function(e, r, o) { - var a = r; - return N(function(i, l) { - a = e(a, i, l); - }, o), a; - }, S = function(e, r) { - var o = new Array(r.length); - return N(function(a, i) { - o[i] = e(a); - }, r), o; - }, k = function(e, r) { - var o = []; - return N(function(a, i) { - e(a, i) && o.push(a); - }, r), o; - }, q = function(e, r) { - for (var o = 0; o < e.length; o += 1) - if (e[o] === r) - return !0; - return !1; - }; - function $(e) { - return function() { - return e; - }; - } - function J(e) { - return e.toString(); - } - var H = function(e, r) { - return r.join(e); - }, G = function(e, r, o) { - return e + o + r; - }, Q = Array.prototype.concat, He = function(e, r) { - var o = new m(); - o.addArray(e); - var a = o.toArray(); - return r ? a.reverse() : a; - }, Y = 32767; - function te(e) { - for (var r = [], o = 0; o < e.length; o += Y) { - var a = e.slice(o, o + Y); - r = Q.apply(r, a); - } - return r; - } - function Se(e, r) { - for (var o = Object(e), a = 1; a < arguments.length; a++) { - var i = arguments[a]; - if (i != null) - for (var l in i) - Object.prototype.hasOwnProperty.call(i, l) && (o[l] = i[l]); - } - return o; - } - var x = { - ELEMENT_NODE: 1, - ATTRIBUTE_NODE: 2, - TEXT_NODE: 3, - CDATA_SECTION_NODE: 4, - PROCESSING_INSTRUCTION_NODE: 7, - COMMENT_NODE: 8, - DOCUMENT_NODE: 9, - DOCUMENT_TYPE_NODE: 10, - DOCUMENT_FRAGMENT_NODE: 11, - NAMESPACE_NODE: s - }; - p.prototype = new Object(), p.prototype.constructor = p, p.superclass = Object.prototype; - function p() { - this.init(); - } - p.prototype.init = function() { - this.reduceActions = [], this.reduceActions[3] = function(e) { - return new ue(e[0], e[2]); - }, this.reduceActions[5] = function(e) { - return new pe(e[0], e[2]); - }, this.reduceActions[7] = function(e) { - return new M(e[0], e[2]); - }, this.reduceActions[8] = function(e) { - return new j(e[0], e[2]); - }, this.reduceActions[10] = function(e) { - return new ce(e[0], e[2]); - }, this.reduceActions[11] = function(e) { - return new Ae(e[0], e[2]); - }, this.reduceActions[12] = function(e) { - return new De(e[0], e[2]); - }, this.reduceActions[13] = function(e) { - return new ge(e[0], e[2]); - }, this.reduceActions[15] = function(e) { - return new de(e[0], e[2]); - }, this.reduceActions[16] = function(e) { - return new me(e[0], e[2]); - }, this.reduceActions[18] = function(e) { - return new Ne(e[0], e[2]); - }, this.reduceActions[19] = function(e) { - return new ve(e[0], e[2]); - }, this.reduceActions[20] = function(e) { - return new xe(e[0], e[2]); - }, this.reduceActions[22] = function(e) { - return new le(e[1]); - }, this.reduceActions[24] = function(e) { - return new Ce(e[0], e[2]); - }, this.reduceActions[25] = function(e) { - return new _(void 0, void 0, e[0]); - }, this.reduceActions[27] = function(e) { - return e[0].locationPath = e[2], e[0]; - }, this.reduceActions[28] = function(e) { - return e[0].locationPath = e[2], e[0].locationPath.steps.unshift(new E(E.DESCENDANTORSELF, d.nodeTest, [])), e[0]; - }, this.reduceActions[29] = function(e) { - return new _(e[0], [], void 0); - }, this.reduceActions[30] = function(e) { - return v.instance_of(e[0], _) ? (e[0].filterPredicates == null && (e[0].filterPredicates = []), e[0].filterPredicates.push(e[1]), e[0]) : new _(e[0], [e[1]], void 0); - }, this.reduceActions[32] = function(e) { - return e[1]; - }, this.reduceActions[33] = function(e) { - return new T(e[0]); - }, this.reduceActions[34] = function(e) { - return new b(e[0]); - }, this.reduceActions[36] = function(e) { - return new ye(e[0], []); - }, this.reduceActions[37] = function(e) { - return new ye(e[0], e[2]); - }, this.reduceActions[38] = function(e) { - return [e[0]]; - }, this.reduceActions[39] = function(e) { - return e[2].unshift(e[0]), e[2]; - }, this.reduceActions[43] = function(e) { - return new Oe(!0, []); - }, this.reduceActions[44] = function(e) { - return e[1].absolute = !0, e[1]; - }, this.reduceActions[46] = function(e) { - return new Oe(!1, [e[0]]); - }, this.reduceActions[47] = function(e) { - return e[0].steps.push(e[2]), e[0]; - }, this.reduceActions[49] = function(e) { - return new E(e[0], e[1], []); - }, this.reduceActions[50] = function(e) { - return new E(E.CHILD, e[0], []); - }, this.reduceActions[51] = function(e) { - return new E(e[0], e[1], e[2]); - }, this.reduceActions[52] = function(e) { - return new E(E.CHILD, e[0], e[1]); - }, this.reduceActions[54] = function(e) { - return [e[0]]; - }, this.reduceActions[55] = function(e) { - return e[1].unshift(e[0]), e[1]; - }, this.reduceActions[56] = function(e) { - return e[0] == "ancestor" ? E.ANCESTOR : e[0] == "ancestor-or-self" ? E.ANCESTORORSELF : e[0] == "attribute" ? E.ATTRIBUTE : e[0] == "child" ? E.CHILD : e[0] == "descendant" ? E.DESCENDANT : e[0] == "descendant-or-self" ? E.DESCENDANTORSELF : e[0] == "following" ? E.FOLLOWING : e[0] == "following-sibling" ? E.FOLLOWINGSIBLING : e[0] == "namespace" ? E.NAMESPACE : e[0] == "parent" ? E.PARENT : e[0] == "preceding" ? E.PRECEDING : e[0] == "preceding-sibling" ? E.PRECEDINGSIBLING : e[0] == "self" ? E.SELF : -1; - }, this.reduceActions[57] = function(e) { - return E.ATTRIBUTE; - }, this.reduceActions[59] = function(e) { - return e[0] == "comment" ? d.commentTest : e[0] == "text" ? d.textTest : e[0] == "processing-instruction" ? d.anyPiTest : e[0] == "node" ? d.nodeTest : new d(-1, void 0); - }, this.reduceActions[60] = function(e) { - return new d.PITest(e[2]); - }, this.reduceActions[61] = function(e) { - return e[1]; - }, this.reduceActions[63] = function(e) { - return e[1].absolute = !0, e[1].steps.unshift(new E(E.DESCENDANTORSELF, d.nodeTest, [])), e[1]; - }, this.reduceActions[64] = function(e) { - return e[0].steps.push(new E(E.DESCENDANTORSELF, d.nodeTest, [])), e[0].steps.push(e[2]), e[0]; - }, this.reduceActions[65] = function(e) { - return new E(E.SELF, d.nodeTest, []); - }, this.reduceActions[66] = function(e) { - return new E(E.PARENT, d.nodeTest, []); - }, this.reduceActions[67] = function(e) { - return new Fe(e[1]); - }, this.reduceActions[68] = function(e) { - return d.nameTestAny; - }, this.reduceActions[69] = function(e) { - return new d.NameTestPrefixAny(e[0].split(":")[0]); - }, this.reduceActions[70] = function(e) { - return new d.NameTestQName(e[0]); - }; - }, p.actionTable = [ - " s s sssssssss s ss s ss", - " s ", - "r rrrrrrrrr rrrrrrr rr r ", - " rrrrr ", - " s s sssssssss s ss s ss", - "rs rrrrrrrr s sssssrrrrrr rrs rs ", - " s s sssssssss s ss s ss", - " s ", - " s ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrrr rrrrrrr rr rr ", - " s ", - " s ", - " s s sssss s s ", - "r rrrrrrrrr rrrrrrr rr r ", - "a ", - "r s rr r ", - "r sr rr r ", - "r s rr s rr r ", - "r rssrr rss rr r ", - "r rrrrr rrrss rr r ", - "r rrrrrsss rrrrr rr r ", - "r rrrrrrrr rrrrr rr r ", - "r rrrrrrrr rrrrrs rr r ", - "r rrrrrrrr rrrrrr rr r ", - "r rrrrrrrr rrrrrr rr r ", - "r srrrrrrrr rrrrrrs rr sr ", - "r srrrrrrrr rrrrrrs rr r ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrr rrrrrr rr r ", - "r rrrrrrrr rrrrrr rr r ", - "r rrrrrrrrr rrrrrrr rr r ", - "r rrrrrrrrr rrrrrrr rr r ", - " sssss ", - "r rrrrrrrrr rrrrrrr rr sr ", - "r rrrrrrrrr rrrrrrr rr r ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrrr rrrrrrr rr rr ", - " s ", - "r srrrrrrrr rrrrrrs rr r ", - "r rrrrrrrr rrrrr rr r ", - " s ", - " s ", - " rrrrr ", - " s s sssssssss s sss s ss", - "r srrrrrrrr rrrrrrs rr r ", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss s ss s ss", - " s s sssssssss ss s ss", - " s s sssssssss s ss s ss", - " s s sssss s s ", - " s s sssss s s ", - "r rrrrrrrrr rrrrrrr rr rr ", - " s s sssss s s ", - " s s sssss s s ", - "r rrrrrrrrr rrrrrrr rr sr ", - "r rrrrrrrrr rrrrrrr rr sr ", - "r rrrrrrrrr rrrrrrr rr r ", - "r rrrrrrrrr rrrrrrr rr rr ", - " s ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrrr rrrrrrr rr rr ", - " rr ", - " s ", - " rs ", - "r sr rr r ", - "r s rr s rr r ", - "r rssrr rss rr r ", - "r rssrr rss rr r ", - "r rrrrr rrrss rr r ", - "r rrrrr rrrss rr r ", - "r rrrrr rrrss rr r ", - "r rrrrr rrrss rr r ", - "r rrrrrsss rrrrr rr r ", - "r rrrrrsss rrrrr rr r ", - "r rrrrrrrr rrrrr rr r ", - "r rrrrrrrr rrrrr rr r ", - "r rrrrrrrr rrrrr rr r ", - "r rrrrrrrr rrrrrr rr r ", - " r ", - " s ", - "r srrrrrrrr rrrrrrs rr r ", - "r srrrrrrrr rrrrrrs rr r ", - "r rrrrrrrrr rrrrrrr rr r ", - "r rrrrrrrrr rrrrrrr rr r ", - "r rrrrrrrrr rrrrrrr rr r ", - "r rrrrrrrrr rrrrrrr rr r ", - "r rrrrrrrrr rrrrrrr rr rr ", - "r rrrrrrrrr rrrrrrr rr rr ", - " s s sssssssss s ss s ss", - "r rrrrrrrrr rrrrrrr rr rr ", - " r " - ], p.actionTableNumber = [ - ` 1 0 /.-,+*)(' & %$ # "!`, - " J ", - "a aaaaaaaaa aaaaaaa aa a ", - " YYYYY ", - ` 1 0 /.-,+*)(' & %$ # "!`, - `K1 KKKKKKKK . +*)('KKKKKK KK# K" `, - ` 1 0 /.-,+*)(' & %$ # "!`, - " N ", - " O ", - "e eeeeeeeee eeeeeee ee ee ", - "f fffffffff fffffff ff ff ", - "d ddddddddd ddddddd dd dd ", - "B BBBBBBBBB BBBBBBB BB BB ", - "A AAAAAAAAA AAAAAAA AA AA ", - " P ", - " Q ", - ` 1 . +*)(' # " `, - "b bbbbbbbbb bbbbbbb bb b ", - " ", - "! S !! ! ", - '" T" "" " ', - "$ V $$ U $$ $ ", - "& &ZY&& &XW && & ", - ") ))))) )))\\[ )) ) ", - ". ....._^] ..... .. . ", - "1 11111111 11111 11 1 ", - "5 55555555 55555` 55 5 ", - "7 77777777 777777 77 7 ", - "9 99999999 999999 99 9 ", - ": c:::::::: ::::::b :: a: ", - "I fIIIIIIII IIIIIIe II I ", - "= ========= ======= == == ", - "? ????????? ??????? ?? ?? ", - "C CCCCCCCCC CCCCCCC CC CC ", - "J JJJJJJJJ JJJJJJ JJ J ", - "M MMMMMMMM MMMMMM MM M ", - "N NNNNNNNNN NNNNNNN NN N ", - "P PPPPPPPPP PPPPPPP PP P ", - " +*)(' ", - "R RRRRRRRRR RRRRRRR RR aR ", - "U UUUUUUUUU UUUUUUU UU U ", - "Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ", - "c ccccccccc ccccccc cc cc ", - " j ", - "L fLLLLLLLL LLLLLLe LL L ", - "6 66666666 66666 66 6 ", - " k ", - " l ", - " XXXXX ", - ` 1 0 /.-,+*)(' & %$m # "!`, - "_ f________ ______e __ _ ", - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 0 /.-,+*)(' %$ # "!`, - ` 1 0 /.-,+*)(' & %$ # "!`, - ` 1 . +*)(' # " `, - ` 1 . +*)(' # " `, - "> >>>>>>>>> >>>>>>> >> >> ", - ` 1 . +*)(' # " `, - ` 1 . +*)(' # " `, - "Q QQQQQQQQQ QQQQQQQ QQ aQ ", - "V VVVVVVVVV VVVVVVV VV aV ", - "T TTTTTTTTT TTTTTTT TT T ", - "@ @@@@@@@@@ @@@@@@@ @@ @@ ", - " ‡ ", - "[ [[[[[[[[[ [[[[[[[ [[ [[ ", - "D DDDDDDDDD DDDDDDD DD DD ", - " HH ", - " ˆ ", - " F‰ ", - "# T# ## # ", - "% V %% U %% % ", - "' 'ZY'' 'XW '' ' ", - "( (ZY(( (XW (( ( ", - "+ +++++ +++\\[ ++ + ", - "* ***** ***\\[ ** * ", - "- ----- ---\\[ -- - ", - ", ,,,,, ,,,\\[ ,, , ", - "0 00000_^] 00000 00 0 ", - "/ /////_^] ///// // / ", - "2 22222222 22222 22 2 ", - "3 33333333 33333 33 3 ", - "4 44444444 44444 44 4 ", - "8 88888888 888888 88 8 ", - " ^ ", - " Š ", - "; f;;;;;;;; ;;;;;;e ;; ; ", - "< f<<<<<<<< <<<<<?@ AB CDEFGH IJ ", - " ", - " ", - " ", - "L456789:;<=>?@ AB CDEFGH IJ ", - " M EFGH IJ ", - " N;<=>?@ AB CDEFGH IJ ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " S EFGH IJ ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " e ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " h J ", - " i j ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - "o456789:;<=>?@ ABpqCDEFGH IJ ", - " ", - " r6789:;<=>?@ AB CDEFGH IJ ", - " s789:;<=>?@ AB CDEFGH IJ ", - " t89:;<=>?@ AB CDEFGH IJ ", - " u89:;<=>?@ AB CDEFGH IJ ", - " v9:;<=>?@ AB CDEFGH IJ ", - " w9:;<=>?@ AB CDEFGH IJ ", - " x9:;<=>?@ AB CDEFGH IJ ", - " y9:;<=>?@ AB CDEFGH IJ ", - " z:;<=>?@ AB CDEFGH IJ ", - " {:;<=>?@ AB CDEFGH IJ ", - " |;<=>?@ AB CDEFGH IJ ", - " };<=>?@ AB CDEFGH IJ ", - " ~;<=>?@ AB CDEFGH IJ ", - " =>?@ AB CDEFGH IJ ", - "€456789:;<=>?@ AB CDEFGH IJ", - " ‚ EFGH IJ ", - " ƒ EFGH IJ ", - " ", - " „ GH IJ ", - " … GH IJ ", - " i † ", - " i ‡ ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - "o456789:;<=>?@ ABŒqCDEFGH IJ ", - " ", - " " - ], p.productions = [ - [1, 1, 2], - [2, 1, 3], - [3, 1, 4], - [3, 3, 3, -9, 4], - [4, 1, 5], - [4, 3, 4, -8, 5], - [5, 1, 6], - [5, 3, 5, -22, 6], - [5, 3, 5, -5, 6], - [6, 1, 7], - [6, 3, 6, -23, 7], - [6, 3, 6, -24, 7], - [6, 3, 6, -6, 7], - [6, 3, 6, -7, 7], - [7, 1, 8], - [7, 3, 7, -25, 8], - [7, 3, 7, -26, 8], - [8, 1, 9], - [8, 3, 8, -12, 9], - [8, 3, 8, -11, 9], - [8, 3, 8, -10, 9], - [9, 1, 10], - [9, 2, -26, 9], - [10, 1, 11], - [10, 3, 10, -27, 11], - [11, 1, 12], - [11, 1, 13], - [11, 3, 13, -28, 14], - [11, 3, 13, -4, 14], - [13, 1, 15], - [13, 2, 13, 16], - [15, 1, 17], - [15, 3, -29, 2, -30], - [15, 1, -15], - [15, 1, -16], - [15, 1, 18], - [18, 3, -13, -29, -30], - [18, 4, -13, -29, 19, -30], - [19, 1, 20], - [19, 3, 20, -31, 19], - [20, 1, 2], - [12, 1, 14], - [12, 1, 21], - [21, 1, -28], - [21, 2, -28, 14], - [21, 1, 22], - [14, 1, 23], - [14, 3, 14, -28, 23], - [14, 1, 24], - [23, 2, 25, 26], - [23, 1, 26], - [23, 3, 25, 26, 27], - [23, 2, 26, 27], - [23, 1, 28], - [27, 1, 16], - [27, 2, 16, 27], - [25, 2, -14, -3], - [25, 1, -32], - [26, 1, 29], - [26, 3, -20, -29, -30], - [26, 4, -21, -29, -15, -30], - [16, 3, -33, 30, -34], - [30, 1, 2], - [22, 2, -4, 14], - [24, 3, 14, -4, 23], - [28, 1, -35], - [28, 1, -2], - [17, 2, -36, -18], - [29, 1, -17], - [29, 1, -19], - [29, 1, -18] - ], p.DOUBLEDOT = 2, p.DOUBLECOLON = 3, p.DOUBLESLASH = 4, p.NOTEQUAL = 5, p.LESSTHANOREQUAL = 6, p.GREATERTHANOREQUAL = 7, p.AND = 8, p.OR = 9, p.MOD = 10, p.DIV = 11, p.MULTIPLYOPERATOR = 12, p.FUNCTIONNAME = 13, p.AXISNAME = 14, p.LITERAL = 15, p.NUMBER = 16, p.ASTERISKNAMETEST = 17, p.QNAME = 18, p.NCNAMECOLONASTERISK = 19, p.NODETYPE = 20, p.PROCESSINGINSTRUCTIONWITHLITERAL = 21, p.EQUALS = 22, p.LESSTHAN = 23, p.GREATERTHAN = 24, p.PLUS = 25, p.MINUS = 26, p.BAR = 27, p.SLASH = 28, p.LEFTPARENTHESIS = 29, p.RIGHTPARENTHESIS = 30, p.COMMA = 31, p.AT = 32, p.LEFTBRACKET = 33, p.RIGHTBRACKET = 34, p.DOT = 35, p.DOLLAR = 36, p.prototype.tokenize = function(e) { - for (var r = [], o = [], a = e + "\0", i = 0, l = a.charAt(i++); ; ) { - for (; l == " " || l == " " || l == "\r" || l == ` -`; ) - l = a.charAt(i++); - if (l == "\0" || i >= a.length) - break; - if (l == "(") { - r.push(p.LEFTPARENTHESIS), o.push(l), l = a.charAt(i++); - continue; - } - if (l == ")") { - r.push(p.RIGHTPARENTHESIS), o.push(l), l = a.charAt(i++); - continue; - } - if (l == "[") { - r.push(p.LEFTBRACKET), o.push(l), l = a.charAt(i++); - continue; - } - if (l == "]") { - r.push(p.RIGHTBRACKET), o.push(l), l = a.charAt(i++); - continue; - } - if (l == "@") { - r.push(p.AT), o.push(l), l = a.charAt(i++); - continue; - } - if (l == ",") { - r.push(p.COMMA), o.push(l), l = a.charAt(i++); - continue; - } - if (l == "|") { - r.push(p.BAR), o.push(l), l = a.charAt(i++); - continue; - } - if (l == "+") { - r.push(p.PLUS), o.push(l), l = a.charAt(i++); - continue; - } - if (l == "-") { - r.push(p.MINUS), o.push(l), l = a.charAt(i++); - continue; - } - if (l == "=") { - r.push(p.EQUALS), o.push(l), l = a.charAt(i++); - continue; - } - if (l == "$") { - r.push(p.DOLLAR), o.push(l), l = a.charAt(i++); - continue; - } - if (l == ".") { - if (l = a.charAt(i++), l == ".") { - r.push(p.DOUBLEDOT), o.push(".."), l = a.charAt(i++); - continue; - } - if (l >= "0" && l <= "9") { - var g = "." + l; - for (l = a.charAt(i++); l >= "0" && l <= "9"; ) - g += l, l = a.charAt(i++); - r.push(p.NUMBER), o.push(g); - continue; - } - r.push(p.DOT), o.push("."); - continue; - } - if (l == "'" || l == '"') { - for (var I = l, L = ""; i < a.length && (l = a.charAt(i)) !== I; ) - L += l, i += 1; - if (l !== I) - throw be.fromMessage("Unterminated string literal: " + I + L); - i += 1, r.push(p.LITERAL), o.push(L), l = a.charAt(i++); - continue; - } - if (l >= "0" && l <= "9") { - var g = l; - for (l = a.charAt(i++); l >= "0" && l <= "9"; ) - g += l, l = a.charAt(i++); - if (l == "." && a.charAt(i) >= "0" && a.charAt(i) <= "9") - for (g += l, g += a.charAt(i++), l = a.charAt(i++); l >= "0" && l <= "9"; ) - g += l, l = a.charAt(i++); - r.push(p.NUMBER), o.push(g); - continue; - } - if (l == "*") { - if (r.length > 0) { - var D = r[r.length - 1]; - if (D != p.AT && D != p.DOUBLECOLON && D != p.LEFTPARENTHESIS && D != p.LEFTBRACKET && D != p.AND && D != p.OR && D != p.MOD && D != p.DIV && D != p.MULTIPLYOPERATOR && D != p.SLASH && D != p.DOUBLESLASH && D != p.BAR && D != p.PLUS && D != p.MINUS && D != p.EQUALS && D != p.NOTEQUAL && D != p.LESSTHAN && D != p.LESSTHANOREQUAL && D != p.GREATERTHAN && D != p.GREATERTHANOREQUAL) { - r.push(p.MULTIPLYOPERATOR), o.push(l), l = a.charAt(i++); - continue; - } - } - r.push(p.ASTERISKNAMETEST), o.push(l), l = a.charAt(i++); - continue; - } - if (l == ":" && a.charAt(i) == ":") { - r.push(p.DOUBLECOLON), o.push("::"), i++, l = a.charAt(i++); - continue; - } - if (l == "/") { - if (l = a.charAt(i++), l == "/") { - r.push(p.DOUBLESLASH), o.push("//"), l = a.charAt(i++); - continue; - } - r.push(p.SLASH), o.push("/"); - continue; - } - if (l == "!" && a.charAt(i) == "=") { - r.push(p.NOTEQUAL), o.push("!="), i++, l = a.charAt(i++); - continue; - } - if (l == "<") { - if (a.charAt(i) == "=") { - r.push(p.LESSTHANOREQUAL), o.push("<="), i++, l = a.charAt(i++); - continue; - } - r.push(p.LESSTHAN), o.push("<"), l = a.charAt(i++); - continue; - } - if (l == ">") { - if (a.charAt(i) == "=") { - r.push(p.GREATERTHANOREQUAL), o.push(">="), i++, l = a.charAt(i++); - continue; - } - r.push(p.GREATERTHAN), o.push(">"), l = a.charAt(i++); - continue; - } - if (l == "_" || v.isLetter(l.charCodeAt(0))) { - var B = l; - for (l = a.charAt(i++); v.isNCNameChar(l.charCodeAt(0)); ) - B += l, l = a.charAt(i++); - if (r.length > 0) { - var D = r[r.length - 1]; - if (D != p.AT && D != p.DOUBLECOLON && D != p.LEFTPARENTHESIS && D != p.LEFTBRACKET && D != p.AND && D != p.OR && D != p.MOD && D != p.DIV && D != p.MULTIPLYOPERATOR && D != p.SLASH && D != p.DOUBLESLASH && D != p.BAR && D != p.PLUS && D != p.MINUS && D != p.EQUALS && D != p.NOTEQUAL && D != p.LESSTHAN && D != p.LESSTHANOREQUAL && D != p.GREATERTHAN && D != p.GREATERTHANOREQUAL) { - if (B == "and") { - r.push(p.AND), o.push(B); - continue; - } - if (B == "or") { - r.push(p.OR), o.push(B); - continue; - } - if (B == "mod") { - r.push(p.MOD), o.push(B); - continue; - } - if (B == "div") { - r.push(p.DIV), o.push(B); - continue; - } - } - } - if (l == ":") { - if (a.charAt(i) == "*") { - r.push(p.NCNAMECOLONASTERISK), o.push(B + ":*"), i++, l = a.charAt(i++); - continue; - } - if (a.charAt(i) == "_" || v.isLetter(a.charCodeAt(i))) { - for (B += ":", l = a.charAt(i++); v.isNCNameChar(l.charCodeAt(0)); ) - B += l, l = a.charAt(i++); - if (l == "(") { - r.push(p.FUNCTIONNAME), o.push(B); - continue; - } - r.push(p.QNAME), o.push(B); - continue; - } - if (a.charAt(i) == ":") { - r.push(p.AXISNAME), o.push(B); - continue; - } - } - if (l == "(") { - if (B == "comment" || B == "text" || B == "node") { - r.push(p.NODETYPE), o.push(B); - continue; - } - if (B == "processing-instruction") { - a.charAt(i) == ")" ? r.push(p.NODETYPE) : r.push(p.PROCESSINGINSTRUCTIONWITHLITERAL), o.push(B); - continue; - } - r.push(p.FUNCTIONNAME), o.push(B); - continue; - } - r.push(p.QNAME), o.push(B); - continue; - } - throw new Error("Unexpected character " + l); - } - return r.push(1), o.push("[EOF]"), [r, o]; - }, p.SHIFT = "s", p.REDUCE = "r", p.ACCEPT = "a", p.prototype.parse = function(L) { - if (!L) - throw new Error("XPath expression unspecified."); - if (typeof L != "string") - throw new Error("XPath expression must be a string."); - var r, o, a = this.tokenize(L); - if (a != null) { - r = a[0], o = a[1]; - var i = 0, l = [], g = [], I = [], L, D, B; - for (l.push(0), g.push(1), I.push("_S"), D = r[i], B = o[i++]; ; ) - switch (L = l[l.length - 1], p.actionTable[L].charAt(D - 1)) { - case p.SHIFT: - g.push(-D), I.push(B), l.push(p.actionTableNumber[L].charCodeAt(D - 1) - 32), D = r[i], B = o[i++]; - break; - case p.REDUCE: - for (var Ie = p.productions[p.actionTableNumber[L].charCodeAt(D - 1) - 32][1], je = [], ze = 0; ze < Ie; ze++) - g.pop(), je.unshift(I.pop()), l.pop(); - var Ye = l[l.length - 1]; - g.push(p.productions[p.actionTableNumber[L].charCodeAt(D - 1) - 32][0]), this.reduceActions[p.actionTableNumber[L].charCodeAt(D - 1) - 32] == null ? I.push(je[0]) : I.push(this.reduceActions[p.actionTableNumber[L].charCodeAt(D - 1) - 32](je)), l.push(p.gotoTable[Ye].charCodeAt(p.productions[p.actionTableNumber[L].charCodeAt(D - 1) - 32][0] - 2) - 33); - break; - case p.ACCEPT: - return new Z(I.pop()); - default: - throw new Error("XPath parse error"); - } - } - }, Z.prototype = new Object(), Z.prototype.constructor = Z, Z.superclass = Object.prototype; - function Z(e) { - this.expression = e; - } - Z.prototype.toString = function() { - return this.expression.toString(); - }; - function ee(e, r, o) { - r in e || (e[r] = o); - } - Z.prototype.evaluate = function(e) { - var r = e.expressionContextNode; - if (!(c(r) || A(r))) - throw new Error("Context node does not appear to be a valid DOM node."); - return e.contextNode = e.expressionContextNode, e.contextSize = 1, e.contextPosition = 1, e.isHtml && (ee(e, "caseInsensitive", !0), ee(e, "allowAnyNamespaceForNoPrefix", !0)), ee(e, "caseInsensitive", !1), this.expression.evaluate(e); - }, Z.XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace", Z.XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/", U.prototype = new Object(), U.prototype.constructor = U, U.superclass = Object.prototype; - function U() { - } - U.prototype.init = function() { - }, U.prototype.toString = function() { - return ""; - }, U.prototype.evaluate = function(e) { - throw new Error("Could not evaluate expression."); - }, X.prototype = new U(), X.prototype.constructor = X, X.superclass = U.prototype; - function X(e) { - arguments.length > 0 && this.init(e); - } - X.prototype.init = function(e) { - this.rhs = e; - }, le.prototype = new X(), le.prototype.constructor = le, le.superclass = X.prototype; - function le(e) { - arguments.length > 0 && this.init(e); - } - le.prototype.init = function(e) { - le.superclass.init.call(this, e); - }, le.prototype.evaluate = function(e) { - return this.rhs.evaluate(e).number().negate(); - }, le.prototype.toString = function() { - return "-" + this.rhs.toString(); - }, R.prototype = new U(), R.prototype.constructor = R, R.superclass = U.prototype; - function R(e, r) { - arguments.length > 0 && this.init(e, r); - } - R.prototype.init = function(e, r) { - this.lhs = e, this.rhs = r; - }, ue.prototype = new R(), ue.prototype.constructor = ue, ue.superclass = R.prototype; - function ue(e, r) { - arguments.length > 0 && this.init(e, r); - } - ue.prototype.init = function(e, r) { - ue.superclass.init.call(this, e, r); - }, ue.prototype.toString = function() { - return "(" + this.lhs.toString() + " or " + this.rhs.toString() + ")"; - }, ue.prototype.evaluate = function(e) { - var r = this.lhs.evaluate(e).bool(); - return r.booleanValue() ? r : this.rhs.evaluate(e).bool(); - }, pe.prototype = new R(), pe.prototype.constructor = pe, pe.superclass = R.prototype; - function pe(e, r) { - arguments.length > 0 && this.init(e, r); - } - pe.prototype.init = function(e, r) { - pe.superclass.init.call(this, e, r); - }, pe.prototype.toString = function() { - return "(" + this.lhs.toString() + " and " + this.rhs.toString() + ")"; - }, pe.prototype.evaluate = function(e) { - var r = this.lhs.evaluate(e).bool(); - return r.booleanValue() ? this.rhs.evaluate(e).bool() : r; - }, M.prototype = new R(), M.prototype.constructor = M, M.superclass = R.prototype; - function M(e, r) { - arguments.length > 0 && this.init(e, r); - } - M.prototype.init = function(e, r) { - M.superclass.init.call(this, e, r); - }, M.prototype.toString = function() { - return "(" + this.lhs.toString() + " = " + this.rhs.toString() + ")"; - }, M.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).equals(this.rhs.evaluate(e)); - }, j.prototype = new R(), j.prototype.constructor = j, j.superclass = R.prototype; - function j(e, r) { - arguments.length > 0 && this.init(e, r); - } - j.prototype.init = function(e, r) { - j.superclass.init.call(this, e, r); - }, j.prototype.toString = function() { - return "(" + this.lhs.toString() + " != " + this.rhs.toString() + ")"; - }, j.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).notequal(this.rhs.evaluate(e)); - }, ce.prototype = new R(), ce.prototype.constructor = ce, ce.superclass = R.prototype; - function ce(e, r) { - arguments.length > 0 && this.init(e, r); - } - ce.prototype.init = function(e, r) { - ce.superclass.init.call(this, e, r); - }, ce.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).lessthan(this.rhs.evaluate(e)); - }, ce.prototype.toString = function() { - return "(" + this.lhs.toString() + " < " + this.rhs.toString() + ")"; - }, Ae.prototype = new R(), Ae.prototype.constructor = Ae, Ae.superclass = R.prototype; - function Ae(e, r) { - arguments.length > 0 && this.init(e, r); - } - Ae.prototype.init = function(e, r) { - Ae.superclass.init.call(this, e, r); - }, Ae.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).greaterthan(this.rhs.evaluate(e)); - }, Ae.prototype.toString = function() { - return "(" + this.lhs.toString() + " > " + this.rhs.toString() + ")"; - }, De.prototype = new R(), De.prototype.constructor = De, De.superclass = R.prototype; - function De(e, r) { - arguments.length > 0 && this.init(e, r); - } - De.prototype.init = function(e, r) { - De.superclass.init.call(this, e, r); - }, De.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).lessthanorequal(this.rhs.evaluate(e)); - }, De.prototype.toString = function() { - return "(" + this.lhs.toString() + " <= " + this.rhs.toString() + ")"; - }, ge.prototype = new R(), ge.prototype.constructor = ge, ge.superclass = R.prototype; - function ge(e, r) { - arguments.length > 0 && this.init(e, r); - } - ge.prototype.init = function(e, r) { - ge.superclass.init.call(this, e, r); - }, ge.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).greaterthanorequal(this.rhs.evaluate(e)); - }, ge.prototype.toString = function() { - return "(" + this.lhs.toString() + " >= " + this.rhs.toString() + ")"; - }, de.prototype = new R(), de.prototype.constructor = de, de.superclass = R.prototype; - function de(e, r) { - arguments.length > 0 && this.init(e, r); - } - de.prototype.init = function(e, r) { - de.superclass.init.call(this, e, r); - }, de.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).number().plus(this.rhs.evaluate(e).number()); - }, de.prototype.toString = function() { - return "(" + this.lhs.toString() + " + " + this.rhs.toString() + ")"; - }, me.prototype = new R(), me.prototype.constructor = me, me.superclass = R.prototype; - function me(e, r) { - arguments.length > 0 && this.init(e, r); - } - me.prototype.init = function(e, r) { - me.superclass.init.call(this, e, r); - }, me.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).number().minus(this.rhs.evaluate(e).number()); - }, me.prototype.toString = function() { - return "(" + this.lhs.toString() + " - " + this.rhs.toString() + ")"; - }, Ne.prototype = new R(), Ne.prototype.constructor = Ne, Ne.superclass = R.prototype; - function Ne(e, r) { - arguments.length > 0 && this.init(e, r); - } - Ne.prototype.init = function(e, r) { - Ne.superclass.init.call(this, e, r); - }, Ne.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).number().multiply(this.rhs.evaluate(e).number()); - }, Ne.prototype.toString = function() { - return "(" + this.lhs.toString() + " * " + this.rhs.toString() + ")"; - }, ve.prototype = new R(), ve.prototype.constructor = ve, ve.superclass = R.prototype; - function ve(e, r) { - arguments.length > 0 && this.init(e, r); - } - ve.prototype.init = function(e, r) { - ve.superclass.init.call(this, e, r); - }, ve.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).number().div(this.rhs.evaluate(e).number()); - }, ve.prototype.toString = function() { - return "(" + this.lhs.toString() + " div " + this.rhs.toString() + ")"; - }, xe.prototype = new R(), xe.prototype.constructor = xe, xe.superclass = R.prototype; - function xe(e, r) { - arguments.length > 0 && this.init(e, r); - } - xe.prototype.init = function(e, r) { - xe.superclass.init.call(this, e, r); - }, xe.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).number().mod(this.rhs.evaluate(e).number()); - }, xe.prototype.toString = function() { - return "(" + this.lhs.toString() + " mod " + this.rhs.toString() + ")"; - }, Ce.prototype = new R(), Ce.prototype.constructor = Ce, Ce.superclass = R.prototype; - function Ce(e, r) { - arguments.length > 0 && this.init(e, r); - } - Ce.prototype.init = function(e, r) { - Ce.superclass.init.call(this, e, r); - }, Ce.prototype.evaluate = function(e) { - return this.lhs.evaluate(e).nodeset().union(this.rhs.evaluate(e).nodeset()); - }, Ce.prototype.toString = function() { - return S(J, [this.lhs, this.rhs]).join(" | "); - }, _.prototype = new U(), _.prototype.constructor = _, _.superclass = U.prototype; - function _(e, r, o) { - arguments.length > 0 && this.init(e, r, o); - } - _.prototype.init = function(e, r, o) { - _.superclass.init.call(this), this.filter = e, this.filterPredicates = r, this.locationPath = o; - }; - function It(e) { - for (; e && e.parentNode; ) - e = e.parentNode; - return e; - } - var Vr = function(e, r, o, a) { - if (e.length === 0) - return o; - var i = r.extend({}); - return w( - function(l, g) { - return i.contextSize = l.length, k( - function(I, L) { - return i.contextNode = I, i.contextPosition = L + 1, _.predicateMatches(g, i); - }, - l - ); - }, - He(o, a), - e - ); - }; - _.getRoot = function(e, r) { - var o = r[0]; - if (o && o.nodeType === x.DOCUMENT_NODE) - return o; - if (e.virtualRoot) - return e.virtualRoot; - if (!o) - throw new Error("Context node not found when determining document root."); - var a = o.ownerDocument; - if (a) - return a; - for (var i = o; i.parentNode != null; ) - i = i.parentNode; - return i; - }; - var Lt = function(e) { - var r = String(e.name); - return r === "xmlns" ? "" : r.substring(0, 6) === "xmlns:" ? r.substring(6, r.length) : null; - }; - _.applyStep = function(e, r, o) { - if (!o) - throw new Error("Context node not found when evaluating XPath step: " + e); - var a = []; - switch (r.contextNode = o, e.axis) { - case E.ANCESTOR: - if (r.contextNode === r.virtualRoot) - break; - var i; - for (r.contextNode.nodeType == x.ATTRIBUTE_NODE ? i = _.getOwnerElement(r.contextNode) : i = r.contextNode.parentNode; i != null && (e.nodeTest.matches(i, r) && a.push(i), i !== r.virtualRoot); ) - i = i.parentNode; - break; - case E.ANCESTORORSELF: - for (var i = r.contextNode; i != null && (e.nodeTest.matches(i, r) && a.push(i), i !== r.virtualRoot); i = i.nodeType == x.ATTRIBUTE_NODE ? _.getOwnerElement(i) : i.parentNode) - ; - break; - case E.ATTRIBUTE: - var l = r.contextNode.attributes; - if (l != null) - for (var g = 0; g < l.length; g++) { - var i = l.item(g); - e.nodeTest.matches(i, r) && a.push(i); - } - break; - case E.CHILD: - for (var i = r.contextNode.firstChild; i != null; i = i.nextSibling) - e.nodeTest.matches(i, r) && a.push(i); - break; - case E.DESCENDANT: - for (var B = [r.contextNode.firstChild]; B.length > 0; ) - for (var i = B.pop(); i != null; ) - e.nodeTest.matches(i, r) && a.push(i), i.firstChild != null ? (B.push(i.nextSibling), i = i.firstChild) : i = i.nextSibling; - break; - case E.DESCENDANTORSELF: - e.nodeTest.matches(r.contextNode, r) && a.push(r.contextNode); - for (var B = [r.contextNode.firstChild]; B.length > 0; ) - for (var i = B.pop(); i != null; ) - e.nodeTest.matches(i, r) && a.push(i), i.firstChild != null ? (B.push(i.nextSibling), i = i.firstChild) : i = i.nextSibling; - break; - case E.FOLLOWING: - if (r.contextNode === r.virtualRoot) - break; - var B = []; - r.contextNode.firstChild != null ? B.unshift(r.contextNode.firstChild) : B.unshift(r.contextNode.nextSibling); - for (var i = r.contextNode.parentNode; i != null && i.nodeType != x.DOCUMENT_NODE && i !== r.virtualRoot; i = i.parentNode) - B.unshift(i.nextSibling); - do - for (var i = B.pop(); i != null; ) - e.nodeTest.matches(i, r) && a.push(i), i.firstChild != null ? (B.push(i.nextSibling), i = i.firstChild) : i = i.nextSibling; - while (B.length > 0); - break; - case E.FOLLOWINGSIBLING: - if (r.contextNode === r.virtualRoot) - break; - for (var i = r.contextNode.nextSibling; i != null; i = i.nextSibling) - e.nodeTest.matches(i, r) && a.push(i); - break; - case E.NAMESPACE: - var I = {}; - if (r.contextNode.nodeType == x.ELEMENT_NODE) { - I.xml = new Xe("xml", null, Z.XML_NAMESPACE_URI, r.contextNode); - for (var i = r.contextNode; i != null && i.nodeType == x.ELEMENT_NODE; i = i.parentNode) - for (var g = 0; g < i.attributes.length; g++) { - var L = i.attributes.item(g), D = Lt(L); - D != null && I[D] == null && (I[D] = new Xe(D, L, L.value, r.contextNode)); - } - for (var D in I) { - var o = I[D]; - e.nodeTest.matches(o, r) && a.push(o); - } - } - break; - case E.PARENT: - i = null, r.contextNode !== r.virtualRoot && (r.contextNode.nodeType == x.ATTRIBUTE_NODE ? i = _.getOwnerElement(r.contextNode) : i = r.contextNode.parentNode), i != null && e.nodeTest.matches(i, r) && a.push(i); - break; - case E.PRECEDING: - var B; - r.virtualRoot != null ? B = [r.virtualRoot] : B = [It(r.contextNode)]; - e: - for (; B.length > 0; ) - for (var i = B.pop(); i != null; ) { - if (i == r.contextNode) - break e; - e.nodeTest.matches(i, r) && a.unshift(i), i.firstChild != null ? (B.push(i.nextSibling), i = i.firstChild) : i = i.nextSibling; - } - break; - case E.PRECEDINGSIBLING: - if (r.contextNode === r.virtualRoot) - break; - for (var i = r.contextNode.previousSibling; i != null; i = i.previousSibling) - e.nodeTest.matches(i, r) && a.push(i); - break; - case E.SELF: - e.nodeTest.matches(r.contextNode, r) && a.push(r.contextNode); - break; - } - return a; - }; - function Pt(e, r, o) { - return Vr( - e.predicates, - r, - _.applyStep(e, r, o), - q(Mt, e.axis) - ); - } - function qt(e, r, o) { - return te( - S( - Pt.bind(null, o, e), - r - ) - ); - } - _.applySteps = function(e, r, o) { - return w( - qt.bind(null, r), - o, - e - ); - }, _.prototype.applyFilter = function(e, r) { - if (!this.filter) - return { nodes: [e.contextNode] }; - var o = this.filter.evaluate(e); - if (!v.instance_of(o, m)) { - if (this.filterPredicates != null && this.filterPredicates.length > 0 || this.locationPath != null) - throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used"); - return { nonNodes: o }; - } - return { - nodes: Vr( - this.filterPredicates || [], - r, - o.toUnsortedArray(), - !1 - // reverse - ) - }; - }, _.applyLocationPath = function(e, r, o) { - if (!e) - return o; - var a = e.absolute ? [_.getRoot(r, o)] : o; - return _.applySteps(e.steps, r, a); - }, _.prototype.evaluate = function(e) { - var r = Se(new Te(), e), o = this.applyFilter(e, r); - if ("nonNodes" in o) - return o.nonNodes; - var a = new m(); - return a.addArray(_.applyLocationPath(this.locationPath, r, o.nodes)), a; - }, _.predicateMatches = function(e, r) { - var o = e.evaluate(r); - return v.instance_of(o, b) ? r.contextPosition === o.numberValue() : o.booleanValue(); - }, _.predicateString = function(e) { - return G("[", "]", e.toString()); - }, _.predicatesString = function(e) { - return H( - "", - S(_.predicateString, e) - ); - }, _.prototype.toString = function() { - if (this.filter != null) { - var e = J(this.filter); - return v.instance_of(this.filter, T) ? G("'", "'", e) : this.filterPredicates != null && this.filterPredicates.length ? G("(", ")", e) + _.predicatesString(this.filterPredicates) : this.locationPath != null ? e + (this.locationPath.absolute ? "" : "/") + J(this.locationPath) : e; - } - return J(this.locationPath); - }, _.getOwnerElement = function(e) { - if (e.ownerElement) - return e.ownerElement; - try { - if (e.selectSingleNode) - return e.selectSingleNode(".."); - } catch { - } - for (var r = e.nodeType == x.DOCUMENT_NODE ? e : e.ownerDocument, o = r.getElementsByTagName("*"), a = 0; a < o.length; a++) - for (var i = o.item(a), l = i.attributes, g = 0; g < l.length; g++) { - var I = l.item(g); - if (I === e) - return i; - } - return null; - }, Oe.prototype = new Object(), Oe.prototype.constructor = Oe, Oe.superclass = Object.prototype; - function Oe(e, r) { - arguments.length > 0 && this.init(e, r); - } - Oe.prototype.init = function(e, r) { - this.absolute = e, this.steps = r; - }, Oe.prototype.toString = function() { - return (this.absolute ? "/" : "") + S(J, this.steps).join("/"); - }, E.prototype = new Object(), E.prototype.constructor = E, E.superclass = Object.prototype; - function E(e, r, o) { - arguments.length > 0 && this.init(e, r, o); - } - E.prototype.init = function(e, r, o) { - this.axis = e, this.nodeTest = r, this.predicates = o; - }, E.prototype.toString = function() { - return E.STEPNAMES[this.axis] + "::" + this.nodeTest.toString() + _.predicatesString(this.predicates); - }, E.ANCESTOR = 0, E.ANCESTORORSELF = 1, E.ATTRIBUTE = 2, E.CHILD = 3, E.DESCENDANT = 4, E.DESCENDANTORSELF = 5, E.FOLLOWING = 6, E.FOLLOWINGSIBLING = 7, E.NAMESPACE = 8, E.PARENT = 9, E.PRECEDING = 10, E.PRECEDINGSIBLING = 11, E.SELF = 12, E.STEPNAMES = w(function(e, r) { - return e[r[0]] = r[1], e; - }, {}, [ - [E.ANCESTOR, "ancestor"], - [E.ANCESTORORSELF, "ancestor-or-self"], - [E.ATTRIBUTE, "attribute"], - [E.CHILD, "child"], - [E.DESCENDANT, "descendant"], - [E.DESCENDANTORSELF, "descendant-or-self"], - [E.FOLLOWING, "following"], - [E.FOLLOWINGSIBLING, "following-sibling"], - [E.NAMESPACE, "namespace"], - [E.PARENT, "parent"], - [E.PRECEDING, "preceding"], - [E.PRECEDINGSIBLING, "preceding-sibling"], - [E.SELF, "self"] - ]); - var Mt = [ - E.ANCESTOR, - E.ANCESTORORSELF, - E.PARENT, - E.PRECEDING, - E.PRECEDINGSIBLING - ]; - d.prototype = new Object(), d.prototype.constructor = d, d.superclass = Object.prototype; - function d(e, r) { - arguments.length > 0 && this.init(e, r); - } - d.prototype.init = function(e, r) { - this.type = e, this.value = r; - }, d.prototype.toString = function() { - return ""; - }, d.prototype.matches = function(e, r) { - console.warn("unknown node test type"); - }, d.NAMETESTANY = 0, d.NAMETESTPREFIXANY = 1, d.NAMETESTQNAME = 2, d.COMMENT = 3, d.TEXT = 4, d.PI = 5, d.NODE = 6, d.isNodeType = function(e) { - return function(r) { - return q(e, r.nodeType); - }; - }, d.makeNodeTestType = function(e, r, o) { - var a = o || function() { - }; - return a.prototype = new d(e), a.prototype.constructor = a, Se(a.prototype, r), a; - }, d.makeNodeTypeTest = function(e, r, o) { - return new (d.makeNodeTestType(e, { - matches: d.isNodeType(r), - toString: $(o) - }))(); - }, d.hasPrefix = function(e) { - return e.prefix || (e.nodeName || e.tagName).indexOf(":") !== -1; - }, d.isElementOrAttribute = d.isNodeType([1, 2]), d.nameSpaceMatches = function(e, r, o) { - var a = o.namespaceURI || ""; - if (!e) - return !a || r.allowAnyNamespaceForNoPrefix && !d.hasPrefix(o); - var i = r.namespaceResolver.getNamespace(e, r.expressionContextNode); - if (i == null) - throw new Error("Cannot resolve QName " + e); - return i === a; - }, d.localNameMatches = function(e, r, o) { - var a = o.localName || o.nodeName; - return r.caseInsensitive ? e.toLowerCase() === a.toLowerCase() : e === a; - }, d.NameTestPrefixAny = d.makeNodeTestType( - d.NAMETESTPREFIXANY, - { - matches: function(e, r) { - return d.isElementOrAttribute(e) && d.nameSpaceMatches(this.prefix, r, e); - }, - toString: function() { - return this.prefix + ":*"; - } - }, - function(r) { - this.prefix = r; - } - ), d.NameTestQName = d.makeNodeTestType( - d.NAMETESTQNAME, - { - matches: function(e, r) { - return d.isNodeType( - [ - x.ELEMENT_NODE, - x.ATTRIBUTE_NODE, - x.NAMESPACE_NODE - ] - )(e) && d.nameSpaceMatches(this.prefix, r, e) && d.localNameMatches(this.localName, r, e); - }, - toString: function() { - return this.name; - } - }, - function(r) { - var o = r.split(":"); - this.name = r, this.prefix = o.length > 1 ? o[0] : null, this.localName = o[o.length > 1 ? 1 : 0]; - } - ), d.PITest = d.makeNodeTestType(d.PI, { - matches: function(e, r) { - return d.isNodeType( - [x.PROCESSING_INSTRUCTION_NODE] - )(e) && (e.target || e.nodeName) === this.name; - }, - toString: function() { - return G('processing-instruction("', '")', this.name); - } - }, function(e) { - this.name = e; - }), d.nameTestAny = d.makeNodeTypeTest( - d.NAMETESTANY, - [ - x.ELEMENT_NODE, - x.ATTRIBUTE_NODE, - x.NAMESPACE_NODE - ], - "*" - ), d.textTest = d.makeNodeTypeTest( - d.TEXT, - [ - x.TEXT_NODE, - x.CDATA_SECTION_NODE - ], - "text()" - ), d.commentTest = d.makeNodeTypeTest( - d.COMMENT, - [x.COMMENT_NODE], - "comment()" - ), d.nodeTest = d.makeNodeTypeTest( - d.NODE, - [ - x.ELEMENT_NODE, - x.ATTRIBUTE_NODE, - x.TEXT_NODE, - x.CDATA_SECTION_NODE, - x.PROCESSING_INSTRUCTION_NODE, - x.COMMENT_NODE, - x.DOCUMENT_NODE - ], - "node()" - ), d.anyPiTest = d.makeNodeTypeTest( - d.PI, - [x.PROCESSING_INSTRUCTION_NODE], - "processing-instruction()" - ), Fe.prototype = new U(), Fe.prototype.constructor = Fe, Fe.superclass = U.prototype; - function Fe(e) { - arguments.length > 0 && this.init(e); - } - Fe.prototype.init = function(e) { - this.variable = e; - }, Fe.prototype.toString = function() { - return "$" + this.variable; - }, Fe.prototype.evaluate = function(e) { - var r = v.resolveQName(this.variable, e.namespaceResolver, e.contextNode, !1); - if (r[0] == null) - throw new Error("Cannot resolve QName " + fn); - var o = e.variableResolver.getVariable(r[1], r[0]); - if (!o) - throw be.fromMessage("Undeclared variable: " + this.toString()); - return o; - }, ye.prototype = new U(), ye.prototype.constructor = ye, ye.superclass = U.prototype; - function ye(e, r) { - arguments.length > 0 && this.init(e, r); - } - ye.prototype.init = function(e, r) { - this.functionName = e, this.arguments = r; - }, ye.prototype.toString = function() { - for (var e = this.functionName + "(", r = 0; r < this.arguments.length; r++) - r > 0 && (e += ", "), e += this.arguments[r].toString(); - return e + ")"; - }, ye.prototype.evaluate = function(e) { - var r = fe.getFunctionFromContext(this.functionName, e); - if (!r) - throw new Error("Unknown function " + this.functionName); - var o = [e].concat(this.arguments); - return r.apply(e.functionResolver.thisArg, o); - }; - var W = new Object(); - W.equals = function(e, r) { - return e.equals(r); - }, W.notequal = function(e, r) { - return e.notequal(r); - }, W.lessthan = function(e, r) { - return e.lessthan(r); - }, W.greaterthan = function(e, r) { - return e.greaterthan(r); - }, W.lessthanorequal = function(e, r) { - return e.lessthanorequal(r); - }, W.greaterthanorequal = function(e, r) { - return e.greaterthanorequal(r); - }, T.prototype = new U(), T.prototype.constructor = T, T.superclass = U.prototype; - function T(e) { - arguments.length > 0 && this.init(e); - } - T.prototype.init = function(e) { - this.str = String(e); - }, T.prototype.toString = function() { - return this.str; - }, T.prototype.evaluate = function(e) { - return this; - }, T.prototype.string = function() { - return this; - }, T.prototype.number = function() { - return new b(this.str); - }, T.prototype.bool = function() { - return new C(this.str); - }, T.prototype.nodeset = function() { - throw new Error("Cannot convert string to nodeset"); - }, T.prototype.stringValue = function() { - return this.str; - }, T.prototype.numberValue = function() { - return this.number().numberValue(); - }, T.prototype.booleanValue = function() { - return this.bool().booleanValue(); - }, T.prototype.equals = function(e) { - return v.instance_of(e, C) ? this.bool().equals(e) : v.instance_of(e, b) ? this.number().equals(e) : v.instance_of(e, m) ? e.compareWithString(this, W.equals) : new C(this.str == e.str); - }, T.prototype.notequal = function(e) { - return v.instance_of(e, C) ? this.bool().notequal(e) : v.instance_of(e, b) ? this.number().notequal(e) : v.instance_of(e, m) ? e.compareWithString(this, W.notequal) : new C(this.str != e.str); - }, T.prototype.lessthan = function(e) { - return this.number().lessthan(e); - }, T.prototype.greaterthan = function(e) { - return this.number().greaterthan(e); - }, T.prototype.lessthanorequal = function(e) { - return this.number().lessthanorequal(e); - }, T.prototype.greaterthanorequal = function(e) { - return this.number().greaterthanorequal(e); - }, b.prototype = new U(), b.prototype.constructor = b, b.superclass = U.prototype; - function b(e) { - arguments.length > 0 && this.init(e); - } - b.prototype.init = function(e) { - this.num = typeof e == "string" ? this.parse(e) : Number(e); - }, b.prototype.numberFormat = /^\s*-?[0-9]*\.?[0-9]+\s*$/, b.prototype.parse = function(e) { - return this.numberFormat.test(e) ? parseFloat(e) : Number.NaN; - }; - function Ut(e) { - for (var r = e.split("e-"), o = r[0].replace(".", ""), a = Number(r[1]), i = 0; i < a - 1; i += 1) - o = "0" + o; - return "0." + o; - } - function Vt(e) { - for (var r = e.split("e"), o = r[0].replace(".", ""), a = Number(r[1]), i = a + 1 - o.length, l = 0; l < i; l += 1) - o += "0"; - return o; - } - b.prototype.toString = function() { - var e = this.num.toString(); - return e.indexOf("e-") !== -1 ? Ut(e) : e.indexOf("e") !== -1 ? Vt(e) : e; - }, b.prototype.evaluate = function(e) { - return this; - }, b.prototype.string = function() { - return new T(this.toString()); - }, b.prototype.number = function() { - return this; - }, b.prototype.bool = function() { - return new C(this.num); - }, b.prototype.nodeset = function() { - throw new Error("Cannot convert number to nodeset"); - }, b.prototype.stringValue = function() { - return this.string().stringValue(); - }, b.prototype.numberValue = function() { - return this.num; - }, b.prototype.booleanValue = function() { - return this.bool().booleanValue(); - }, b.prototype.negate = function() { - return new b(-this.num); - }, b.prototype.equals = function(e) { - return v.instance_of(e, C) ? this.bool().equals(e) : v.instance_of(e, T) ? this.equals(e.number()) : v.instance_of(e, m) ? e.compareWithNumber(this, W.equals) : new C(this.num == e.num); - }, b.prototype.notequal = function(e) { - return v.instance_of(e, C) ? this.bool().notequal(e) : v.instance_of(e, T) ? this.notequal(e.number()) : v.instance_of(e, m) ? e.compareWithNumber(this, W.notequal) : new C(this.num != e.num); - }, b.prototype.lessthan = function(e) { - return v.instance_of(e, m) ? e.compareWithNumber(this, W.greaterthan) : v.instance_of(e, C) || v.instance_of(e, T) ? this.lessthan(e.number()) : new C(this.num < e.num); - }, b.prototype.greaterthan = function(e) { - return v.instance_of(e, m) ? e.compareWithNumber(this, W.lessthan) : v.instance_of(e, C) || v.instance_of(e, T) ? this.greaterthan(e.number()) : new C(this.num > e.num); - }, b.prototype.lessthanorequal = function(e) { - return v.instance_of(e, m) ? e.compareWithNumber(this, W.greaterthanorequal) : v.instance_of(e, C) || v.instance_of(e, T) ? this.lessthanorequal(e.number()) : new C(this.num <= e.num); - }, b.prototype.greaterthanorequal = function(e) { - return v.instance_of(e, m) ? e.compareWithNumber(this, W.lessthanorequal) : v.instance_of(e, C) || v.instance_of(e, T) ? this.greaterthanorequal(e.number()) : new C(this.num >= e.num); - }, b.prototype.plus = function(e) { - return new b(this.num + e.num); - }, b.prototype.minus = function(e) { - return new b(this.num - e.num); - }, b.prototype.multiply = function(e) { - return new b(this.num * e.num); - }, b.prototype.div = function(e) { - return new b(this.num / e.num); - }, b.prototype.mod = function(e) { - return new b(this.num % e.num); - }, C.prototype = new U(), C.prototype.constructor = C, C.superclass = U.prototype; - function C(e) { - arguments.length > 0 && this.init(e); - } - C.prototype.init = function(e) { - this.b = !!e; - }, C.prototype.toString = function() { - return this.b.toString(); - }, C.prototype.evaluate = function(e) { - return this; - }, C.prototype.string = function() { - return new T(this.b); - }, C.prototype.number = function() { - return new b(this.b); - }, C.prototype.bool = function() { - return this; - }, C.prototype.nodeset = function() { - throw new Error("Cannot convert boolean to nodeset"); - }, C.prototype.stringValue = function() { - return this.string().stringValue(); - }, C.prototype.numberValue = function() { - return this.number().numberValue(); - }, C.prototype.booleanValue = function() { - return this.b; - }, C.prototype.not = function() { - return new C(!this.b); - }, C.prototype.equals = function(e) { - return v.instance_of(e, T) || v.instance_of(e, b) ? this.equals(e.bool()) : v.instance_of(e, m) ? e.compareWithBoolean(this, W.equals) : new C(this.b == e.b); - }, C.prototype.notequal = function(e) { - return v.instance_of(e, T) || v.instance_of(e, b) ? this.notequal(e.bool()) : v.instance_of(e, m) ? e.compareWithBoolean(this, W.notequal) : new C(this.b != e.b); - }, C.prototype.lessthan = function(e) { - return this.number().lessthan(e); - }, C.prototype.greaterthan = function(e) { - return this.number().greaterthan(e); - }, C.prototype.lessthanorequal = function(e) { - return this.number().lessthanorequal(e); - }, C.prototype.greaterthanorequal = function(e) { - return this.number().greaterthanorequal(e); - }, C.true_ = new C(!0), C.false_ = new C(!1), ne.prototype = new Object(), ne.prototype.constructor = ne, ne.superclass = Object.prototype; - function ne(e) { - this.init(e); - } - ne.prototype.init = function(e) { - this.left = null, this.right = null, this.node = e, this.depth = 1; - }, ne.prototype.balance = function() { - var e = this.left == null ? 0 : this.left.depth, r = this.right == null ? 0 : this.right.depth; - if (e > r + 1) { - var o = this.left.left == null ? 0 : this.left.left.depth, a = this.left.right == null ? 0 : this.left.right.depth; - o < a && this.left.rotateRR(), this.rotateLL(); - } else if (e + 1 < r) { - var i = this.right.right == null ? 0 : this.right.right.depth, l = this.right.left == null ? 0 : this.right.left.depth; - l > i && this.right.rotateLL(), this.rotateRR(); - } - }, ne.prototype.rotateLL = function() { - var e = this.node, r = this.right; - this.node = this.left.node, this.right = this.left, this.left = this.left.left, this.right.left = this.right.right, this.right.right = r, this.right.node = e, this.right.updateInNewLocation(), this.updateInNewLocation(); - }, ne.prototype.rotateRR = function() { - var e = this.node, r = this.left; - this.node = this.right.node, this.left = this.right, this.right = this.right.right, this.left.right = this.left.left, this.left.left = r, this.left.node = e, this.left.updateInNewLocation(), this.updateInNewLocation(); - }, ne.prototype.updateInNewLocation = function() { - this.getDepthFromChildren(); - }, ne.prototype.getDepthFromChildren = function() { - this.depth = this.node == null ? 0 : 1, this.left != null && (this.depth = this.left.depth + 1), this.right != null && this.depth <= this.right.depth && (this.depth = this.right.depth + 1); - }; - function kt(e, r) { - if (e === r) - return 0; - if (e.compareDocumentPosition) { - var o = e.compareDocumentPosition(r); - return o & 1 || o & 10 ? 1 : o & 20 ? -1 : 0; - } - for (var a = 0, i = 0, l = e; l != null; l = l.parentNode || l.ownerElement) - a++; - for (var g = r; g != null; g = g.parentNode || g.ownerElement) - i++; - if (a > i) { - for (; a > i; ) - e = e.parentNode || e.ownerElement, a--; - if (e === r) - return 1; - } else if (i > a) { - for (; i > a; ) - r = r.parentNode || r.ownerElement, i--; - if (e === r) - return -1; - } - for (var I = e.parentNode || e.ownerElement, L = r.parentNode || r.ownerElement; I !== L; ) - e = I, r = L, I = e.parentNode || e.ownerElement, L = r.parentNode || r.ownerElement; - var D = kr(e), B = kr(r); - if (D && !B) - return -1; - if (!D && B) - return 1; - if (e.isXPathNamespace) { - if (e.nodeValue === Z.XML_NAMESPACE_URI || !r.isXPathNamespace) - return -1; - if (r.nodeValue === Z.XML_NAMESPACE_URI) - return 1; - } else if (r.isXPathNamespace) - return 1; - if (I) - for (var Ie = D ? I.attributes : I.childNodes, je = Ie.length, ze = e.baseNode || e, Ye = r.baseNode || r, or = 0; or < je; or += 1) { - var ir = Ie[or]; - if (ir === ze) - return -1; - if (ir === Ye) - return 1; - } - throw new Error("Unexpected: could not determine node order"); - } - ne.prototype.add = function(e) { - if (e === this.node) - return !1; - var r = kt(e, this.node), o = !1; - return r == -1 ? this.left == null ? (this.left = new ne(e), o = !0) : (o = this.left.add(e), o && this.balance()) : r == 1 && (this.right == null ? (this.right = new ne(e), o = !0) : (o = this.right.add(e), o && this.balance())), o && this.getDepthFromChildren(), o; - }, m.prototype = new U(), m.prototype.constructor = m, m.superclass = U.prototype; - function m() { - this.init(); - } - m.prototype.init = function() { - this.tree = null, this.nodes = [], this.size = 0; - }, m.prototype.toString = function() { - var e = this.first(); - return e == null ? "" : this.stringForNode(e); - }, m.prototype.evaluate = function(e) { - return this; - }, m.prototype.string = function() { - return new T(this.toString()); - }, m.prototype.stringValue = function() { - return this.toString(); - }, m.prototype.number = function() { - return new b(this.string()); - }, m.prototype.numberValue = function() { - return Number(this.string()); - }, m.prototype.bool = function() { - return new C(this.booleanValue()); - }, m.prototype.booleanValue = function() { - return !!this.size; - }, m.prototype.nodeset = function() { - return this; - }, m.prototype.stringForNode = function(e) { - return e.nodeType == x.DOCUMENT_NODE || e.nodeType == x.ELEMENT_NODE || e.nodeType === x.DOCUMENT_FRAGMENT_NODE ? this.stringForContainerNode(e) : e.nodeType === x.ATTRIBUTE_NODE ? e.value || e.nodeValue : e.isNamespaceNode ? e.namespace : e.nodeValue; - }, m.prototype.stringForContainerNode = function(e) { - for (var r = "", o = e.firstChild; o != null; o = o.nextSibling) { - var a = o.nodeType; - (a === 1 || a === 3 || a === 4 || a === 9 || a === 11) && (r += this.stringForNode(o)); - } - return r; - }, m.prototype.buildTree = function() { - if (!this.tree && this.nodes.length) { - this.tree = new ne(this.nodes[0]); - for (var e = 1; e < this.nodes.length; e += 1) - this.tree.add(this.nodes[e]); - } - return this.tree; - }, m.prototype.first = function() { - var e = this.buildTree(); - if (e == null) - return null; - for (; e.left != null; ) - e = e.left; - return e.node; - }, m.prototype.add = function(e) { - for (var r = 0; r < this.nodes.length; r += 1) - if (e === this.nodes[r]) - return; - this.tree = null, this.nodes.push(e), this.size += 1; - }, m.prototype.addArray = function(e) { - var r = this; - N(function(o) { - r.add(o); - }, e); - }, m.prototype.toArray = function() { - var e = []; - return this.toArrayRec(this.buildTree(), e), e; - }, m.prototype.toArrayRec = function(e, r) { - e != null && (this.toArrayRec(e.left, r), r.push(e.node), this.toArrayRec(e.right, r)); - }, m.prototype.toUnsortedArray = function() { - return this.nodes.slice(); - }, m.prototype.compareWithString = function(e, r) { - for (var o = this.toUnsortedArray(), a = 0; a < o.length; a++) { - var i = o[a], l = new T(this.stringForNode(i)), g = r(l, e); - if (g.booleanValue()) - return g; - } - return new C(!1); - }, m.prototype.compareWithNumber = function(e, r) { - for (var o = this.toUnsortedArray(), a = 0; a < o.length; a++) { - var i = o[a], l = new b(this.stringForNode(i)), g = r(l, e); - if (g.booleanValue()) - return g; - } - return new C(!1); - }, m.prototype.compareWithBoolean = function(e, r) { - return r(this.bool(), e); - }, m.prototype.compareWithNodeSet = function(e, r) { - for (var o = this.toUnsortedArray(), a = function(I, L) { - return r(L, I); - }, i = 0; i < o.length; i++) { - var l = new T(this.stringForNode(o[i])), g = e.compareWithString(l, a); - if (g.booleanValue()) - return g; - } - return new C(!1); - }, m.compareWith = y(function(e, r) { - return v.instance_of(r, T) ? this.compareWithString(r, e) : v.instance_of(r, b) ? this.compareWithNumber(r, e) : v.instance_of(r, C) ? this.compareWithBoolean(r, e) : this.compareWithNodeSet(r, e); - }), m.prototype.equals = m.compareWith(W.equals), m.prototype.notequal = m.compareWith(W.notequal), m.prototype.lessthan = m.compareWith(W.lessthan), m.prototype.greaterthan = m.compareWith(W.greaterthan), m.prototype.lessthanorequal = m.compareWith(W.lessthanorequal), m.prototype.greaterthanorequal = m.compareWith(W.greaterthanorequal), m.prototype.union = function(e) { - var r = new m(); - return r.addArray(this.toUnsortedArray()), r.addArray(e.toUnsortedArray()), r; - }, Xe.prototype = new Object(), Xe.prototype.constructor = Xe, Xe.superclass = Object.prototype; - function Xe(e, r, o, a) { - this.isXPathNamespace = !0, this.baseNode = r, this.ownerDocument = a.ownerDocument, this.nodeName = e, this.prefix = e, this.localName = e, this.namespaceURI = null, this.nodeValue = o, this.ownerElement = a, this.nodeType = x.NAMESPACE_NODE; - } - Xe.prototype.toString = function() { - return '{ "' + this.prefix + '", "' + this.namespaceURI + '" }'; - }, Te.prototype = new Object(), Te.prototype.constructor = Te, Te.superclass = Object.prototype; - function Te(e, r, o) { - this.variableResolver = e ?? new Ue(), this.namespaceResolver = r ?? new Re(), this.functionResolver = o ?? new fe(); - } - Te.prototype.extend = function(e) { - return Se(new Te(), this, e); - }, Ue.prototype = new Object(), Ue.prototype.constructor = Ue, Ue.superclass = Object.prototype; - function Ue() { - } - Ue.prototype.getVariable = function(e, r) { - return null; - }, fe.prototype = new Object(), fe.prototype.constructor = fe, fe.superclass = Object.prototype; - function fe(e) { - this.thisArg = e ?? O, this.functions = new Object(), this.addStandardFunctions(); - } - fe.prototype.addStandardFunctions = function() { - this.functions["{}last"] = O.last, this.functions["{}position"] = O.position, this.functions["{}count"] = O.count, this.functions["{}id"] = O.id, this.functions["{}local-name"] = O.localName, this.functions["{}namespace-uri"] = O.namespaceURI, this.functions["{}name"] = O.name, this.functions["{}string"] = O.string, this.functions["{}concat"] = O.concat, this.functions["{}starts-with"] = O.startsWith, this.functions["{}contains"] = O.contains, this.functions["{}substring-before"] = O.substringBefore, this.functions["{}substring-after"] = O.substringAfter, this.functions["{}substring"] = O.substring, this.functions["{}string-length"] = O.stringLength, this.functions["{}normalize-space"] = O.normalizeSpace, this.functions["{}translate"] = O.translate, this.functions["{}boolean"] = O.boolean_, this.functions["{}not"] = O.not, this.functions["{}true"] = O.true_, this.functions["{}false"] = O.false_, this.functions["{}lang"] = O.lang, this.functions["{}number"] = O.number, this.functions["{}sum"] = O.sum, this.functions["{}floor"] = O.floor, this.functions["{}ceiling"] = O.ceiling, this.functions["{}round"] = O.round; - }, fe.prototype.addFunction = function(e, r, o) { - this.functions["{" + e + "}" + r] = o; - }, fe.getFunctionFromContext = function(e, r) { - var o = v.resolveQName(e, r.namespaceResolver, r.contextNode, !1); - if (o[0] === null) - throw new Error("Cannot resolve QName " + name); - return r.functionResolver.getFunction(o[1], o[0]); - }, fe.prototype.getFunction = function(e, r) { - return this.functions["{" + r + "}" + e]; - }, Re.prototype = new Object(), Re.prototype.constructor = Re, Re.superclass = Object.prototype; - function Re() { - } - Re.prototype.getNamespace = function(e, r) { - if (e == "xml") - return Z.XML_NAMESPACE_URI; - if (e == "xmlns") - return Z.XMLNS_NAMESPACE_URI; - for (r.nodeType == x.DOCUMENT_NODE ? r = r.documentElement : r.nodeType == x.ATTRIBUTE_NODE ? r = _.getOwnerElement(r) : r.nodeType != x.ELEMENT_NODE && (r = r.parentNode); r != null && r.nodeType == x.ELEMENT_NODE; ) { - for (var o = r.attributes, a = 0; a < o.length; a++) { - var i = o.item(a), l = i.name || i.nodeName; - if (l === "xmlns" && e === "" || l === "xmlns:" + e) - return String(i.value || i.nodeValue); - } - r = r.parentNode; - } - return null; - }; - var O = new Object(); - O.last = function(e) { - if (arguments.length != 1) - throw new Error("Function last expects ()"); - return new b(e.contextSize); - }, O.position = function(e) { - if (arguments.length != 1) - throw new Error("Function position expects ()"); - return new b(e.contextPosition); - }, O.count = function() { - var e = arguments[0], r; - if (arguments.length != 2 || !v.instance_of(r = arguments[1].evaluate(e), m)) - throw new Error("Function count expects (node-set)"); - return new b(r.size); - }, O.id = function() { - var e = arguments[0], r; - if (arguments.length != 2) - throw new Error("Function id expects (object)"); - r = arguments[1].evaluate(e), v.instance_of(r, m) ? r = r.toArray().join(" ") : r = r.stringValue(); - for (var o = r.split(/[\x0d\x0a\x09\x20]+/), a = new m(), i = e.contextNode.nodeType == x.DOCUMENT_NODE ? e.contextNode : e.contextNode.ownerDocument, l = 0; l < o.length; l++) { - var g; - i.getElementById ? g = i.getElementById(o[l]) : g = v.getElementById(i, o[l]), g != null && a.add(g); - } - return a; - }, O.localName = function(e, r) { - var o; - if (arguments.length == 1) - o = e.contextNode; - else if (arguments.length == 2) - o = r.evaluate(e).first(); - else - throw new Error("Function local-name expects (node-set?)"); - return o == null ? new T("") : new T( - o.localName || // standard elements and attributes - o.baseName || // IE - o.target || // processing instructions - o.nodeName || // DOM1 elements - "" - // fallback - ); - }, O.namespaceURI = function() { - var e = arguments[0], r; - if (arguments.length == 1) - r = e.contextNode; - else if (arguments.length == 2) - r = arguments[1].evaluate(e).first(); - else - throw new Error("Function namespace-uri expects (node-set?)"); - return r == null ? new T("") : new T(r.namespaceURI || ""); - }, O.name = function() { - var e = arguments[0], r; - if (arguments.length == 1) - r = e.contextNode; - else if (arguments.length == 2) - r = arguments[1].evaluate(e).first(); - else - throw new Error("Function name expects (node-set?)"); - return r == null ? new T("") : r.nodeType == x.ELEMENT_NODE ? new T(r.nodeName) : r.nodeType == x.ATTRIBUTE_NODE ? new T(r.name || r.nodeName) : r.nodeType === x.PROCESSING_INSTRUCTION_NODE ? new T(r.target || r.nodeName) : r.localName == null ? new T("") : new T(r.localName); - }, O.string = function() { - var e = arguments[0]; - if (arguments.length == 1) - return new T(m.prototype.stringForNode(e.contextNode)); - if (arguments.length == 2) - return arguments[1].evaluate(e).string(); - throw new Error("Function string expects (object?)"); - }, O.concat = function(e) { - if (arguments.length < 3) - throw new Error("Function concat expects (string, string[, string]*)"); - for (var r = "", o = 1; o < arguments.length; o++) - r += arguments[o].evaluate(e).stringValue(); - return new T(r); - }, O.startsWith = function() { - var e = arguments[0]; - if (arguments.length != 3) - throw new Error("Function startsWith expects (string, string)"); - var r = arguments[1].evaluate(e).stringValue(), o = arguments[2].evaluate(e).stringValue(); - return new C(r.substring(0, o.length) == o); - }, O.contains = function() { - var e = arguments[0]; - if (arguments.length != 3) - throw new Error("Function contains expects (string, string)"); - var r = arguments[1].evaluate(e).stringValue(), o = arguments[2].evaluate(e).stringValue(); - return new C(r.indexOf(o) !== -1); - }, O.substringBefore = function() { - var e = arguments[0]; - if (arguments.length != 3) - throw new Error("Function substring-before expects (string, string)"); - var r = arguments[1].evaluate(e).stringValue(), o = arguments[2].evaluate(e).stringValue(); - return new T(r.substring(0, r.indexOf(o))); - }, O.substringAfter = function() { - var e = arguments[0]; - if (arguments.length != 3) - throw new Error("Function substring-after expects (string, string)"); - var r = arguments[1].evaluate(e).stringValue(), o = arguments[2].evaluate(e).stringValue(); - if (o.length == 0) - return new T(r); - var a = r.indexOf(o); - return a == -1 ? new T("") : new T(r.substring(a + o.length)); - }, O.substring = function() { - var e = arguments[0]; - if (!(arguments.length == 3 || arguments.length == 4)) - throw new Error("Function substring expects (string, number, number?)"); - var r = arguments[1].evaluate(e).stringValue(), o = Math.round(arguments[2].evaluate(e).numberValue()) - 1, a = arguments.length == 4 ? o + Math.round(arguments[3].evaluate(e).numberValue()) : void 0; - return new T(r.substring(o, a)); - }, O.stringLength = function() { - var e = arguments[0], r; - if (arguments.length == 1) - r = m.prototype.stringForNode(e.contextNode); - else if (arguments.length == 2) - r = arguments[1].evaluate(e).stringValue(); - else - throw new Error("Function string-length expects (string?)"); - return new b(r.length); - }, O.normalizeSpace = function() { - var e = arguments[0], r; - if (arguments.length == 1) - r = m.prototype.stringForNode(e.contextNode); - else if (arguments.length == 2) - r = arguments[1].evaluate(e).stringValue(); - else - throw new Error("Function normalize-space expects (string?)"); - for (var o = 0, a = r.length - 1; v.isSpace(r.charCodeAt(a)); ) - a--; - for (var i = ""; o <= a && v.isSpace(r.charCodeAt(o)); ) - o++; - for (; o <= a; ) - if (v.isSpace(r.charCodeAt(o))) - for (i += " "; o <= a && v.isSpace(r.charCodeAt(o)); ) - o++; - else - i += r.charAt(o), o++; - return new T(i); - }, O.translate = function(e, r, o, a) { - if (arguments.length != 4) - throw new Error("Function translate expects (string, string, string)"); - var i = r.evaluate(e).stringValue(), l = o.evaluate(e).stringValue(), g = a.evaluate(e).stringValue(), I = w(function(D, B, Ie) { - return B in D || (D[B] = Ie > g.length ? "" : g[Ie]), D; - }, {}, l), L = H( - "", - S(function(D) { - return D in I ? I[D] : D; - }, i) - ); - return new T(L); - }, O.boolean_ = function() { - var e = arguments[0]; - if (arguments.length != 2) - throw new Error("Function boolean expects (object)"); - return arguments[1].evaluate(e).bool(); - }, O.not = function(e, r) { - if (arguments.length != 2) - throw new Error("Function not expects (object)"); - return r.evaluate(e).bool().not(); - }, O.true_ = function() { - if (arguments.length != 1) - throw new Error("Function true expects ()"); - return C.true_; - }, O.false_ = function() { - if (arguments.length != 1) - throw new Error("Function false expects ()"); - return C.false_; - }, O.lang = function() { - var e = arguments[0]; - if (arguments.length != 2) - throw new Error("Function lang expects (string)"); - for (var r, o = e.contextNode; o != null && o.nodeType != x.DOCUMENT_NODE; o = o.parentNode) { - var a = o.getAttributeNS(Z.XML_NAMESPACE_URI, "lang"); - if (a != null) { - r = String(a); - break; - } - } - if (r == null) - return C.false_; - var i = arguments[1].evaluate(e).stringValue(); - return new C(r.substring(0, i.length) == i && (r.length == i.length || r.charAt(i.length) == "-")); - }, O.number = function() { - var e = arguments[0]; - if (!(arguments.length == 1 || arguments.length == 2)) - throw new Error("Function number expects (object?)"); - return arguments.length == 1 ? new b(m.prototype.stringForNode(e.contextNode)) : arguments[1].evaluate(e).number(); - }, O.sum = function() { - var e = arguments[0], r; - if (arguments.length != 2 || !v.instance_of(r = arguments[1].evaluate(e), m)) - throw new Error("Function sum expects (node-set)"); - r = r.toUnsortedArray(); - for (var o = 0, a = 0; a < r.length; a++) - o += new b(m.prototype.stringForNode(r[a])).numberValue(); - return new b(o); - }, O.floor = function() { - var e = arguments[0]; - if (arguments.length != 2) - throw new Error("Function floor expects (number)"); - return new b(Math.floor(arguments[1].evaluate(e).numberValue())); - }, O.ceiling = function() { - var e = arguments[0]; - if (arguments.length != 2) - throw new Error("Function ceiling expects (number)"); - return new b(Math.ceil(arguments[1].evaluate(e).numberValue())); - }, O.round = function() { - var e = arguments[0]; - if (arguments.length != 2) - throw new Error("Function round expects (number)"); - return new b(Math.round(arguments[1].evaluate(e).numberValue())); - }; - var v = new Object(), kr = function(e) { - return e && (e.nodeType === x.ATTRIBUTE_NODE || e.ownerElement || e.isXPathNamespace); - }; - v.splitQName = function(e) { - var r = e.indexOf(":"); - return r == -1 ? [null, e] : [e.substring(0, r), e.substring(r + 1)]; - }, v.resolveQName = function(e, r, o, a) { - var i = v.splitQName(e); - return i[0] != null ? i[0] = r.getNamespace(i[0], o) : a ? (i[0] = r.getNamespace("", o), i[0] == null && (i[0] = "")) : i[0] = "", i; - }, v.isSpace = function(e) { - return e == 9 || e == 13 || e == 10 || e == 32; - }, v.isLetter = function(e) { - return e >= 65 && e <= 90 || e >= 97 && e <= 122 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 255 || e >= 256 && e <= 305 || e >= 308 && e <= 318 || e >= 321 && e <= 328 || e >= 330 && e <= 382 || e >= 384 && e <= 451 || e >= 461 && e <= 496 || e >= 500 && e <= 501 || e >= 506 && e <= 535 || e >= 592 && e <= 680 || e >= 699 && e <= 705 || e == 902 || e >= 904 && e <= 906 || e == 908 || e >= 910 && e <= 929 || e >= 931 && e <= 974 || e >= 976 && e <= 982 || e == 986 || e == 988 || e == 990 || e == 992 || e >= 994 && e <= 1011 || e >= 1025 && e <= 1036 || e >= 1038 && e <= 1103 || e >= 1105 && e <= 1116 || e >= 1118 && e <= 1153 || e >= 1168 && e <= 1220 || e >= 1223 && e <= 1224 || e >= 1227 && e <= 1228 || e >= 1232 && e <= 1259 || e >= 1262 && e <= 1269 || e >= 1272 && e <= 1273 || e >= 1329 && e <= 1366 || e == 1369 || e >= 1377 && e <= 1414 || e >= 1488 && e <= 1514 || e >= 1520 && e <= 1522 || e >= 1569 && e <= 1594 || e >= 1601 && e <= 1610 || e >= 1649 && e <= 1719 || e >= 1722 && e <= 1726 || e >= 1728 && e <= 1742 || e >= 1744 && e <= 1747 || e == 1749 || e >= 1765 && e <= 1766 || e >= 2309 && e <= 2361 || e == 2365 || e >= 2392 && e <= 2401 || e >= 2437 && e <= 2444 || e >= 2447 && e <= 2448 || e >= 2451 && e <= 2472 || e >= 2474 && e <= 2480 || e == 2482 || e >= 2486 && e <= 2489 || e >= 2524 && e <= 2525 || e >= 2527 && e <= 2529 || e >= 2544 && e <= 2545 || e >= 2565 && e <= 2570 || e >= 2575 && e <= 2576 || e >= 2579 && e <= 2600 || e >= 2602 && e <= 2608 || e >= 2610 && e <= 2611 || e >= 2613 && e <= 2614 || e >= 2616 && e <= 2617 || e >= 2649 && e <= 2652 || e == 2654 || e >= 2674 && e <= 2676 || e >= 2693 && e <= 2699 || e == 2701 || e >= 2703 && e <= 2705 || e >= 2707 && e <= 2728 || e >= 2730 && e <= 2736 || e >= 2738 && e <= 2739 || e >= 2741 && e <= 2745 || e == 2749 || e == 2784 || e >= 2821 && e <= 2828 || e >= 2831 && e <= 2832 || e >= 2835 && e <= 2856 || e >= 2858 && e <= 2864 || e >= 2866 && e <= 2867 || e >= 2870 && e <= 2873 || e == 2877 || e >= 2908 && e <= 2909 || e >= 2911 && e <= 2913 || e >= 2949 && e <= 2954 || e >= 2958 && e <= 2960 || e >= 2962 && e <= 2965 || e >= 2969 && e <= 2970 || e == 2972 || e >= 2974 && e <= 2975 || e >= 2979 && e <= 2980 || e >= 2984 && e <= 2986 || e >= 2990 && e <= 2997 || e >= 2999 && e <= 3001 || e >= 3077 && e <= 3084 || e >= 3086 && e <= 3088 || e >= 3090 && e <= 3112 || e >= 3114 && e <= 3123 || e >= 3125 && e <= 3129 || e >= 3168 && e <= 3169 || e >= 3205 && e <= 3212 || e >= 3214 && e <= 3216 || e >= 3218 && e <= 3240 || e >= 3242 && e <= 3251 || e >= 3253 && e <= 3257 || e == 3294 || e >= 3296 && e <= 3297 || e >= 3333 && e <= 3340 || e >= 3342 && e <= 3344 || e >= 3346 && e <= 3368 || e >= 3370 && e <= 3385 || e >= 3424 && e <= 3425 || e >= 3585 && e <= 3630 || e == 3632 || e >= 3634 && e <= 3635 || e >= 3648 && e <= 3653 || e >= 3713 && e <= 3714 || e == 3716 || e >= 3719 && e <= 3720 || e == 3722 || e == 3725 || e >= 3732 && e <= 3735 || e >= 3737 && e <= 3743 || e >= 3745 && e <= 3747 || e == 3749 || e == 3751 || e >= 3754 && e <= 3755 || e >= 3757 && e <= 3758 || e == 3760 || e >= 3762 && e <= 3763 || e == 3773 || e >= 3776 && e <= 3780 || e >= 3904 && e <= 3911 || e >= 3913 && e <= 3945 || e >= 4256 && e <= 4293 || e >= 4304 && e <= 4342 || e == 4352 || e >= 4354 && e <= 4355 || e >= 4357 && e <= 4359 || e == 4361 || e >= 4363 && e <= 4364 || e >= 4366 && e <= 4370 || e == 4412 || e == 4414 || e == 4416 || e == 4428 || e == 4430 || e == 4432 || e >= 4436 && e <= 4437 || e == 4441 || e >= 4447 && e <= 4449 || e == 4451 || e == 4453 || e == 4455 || e == 4457 || e >= 4461 && e <= 4462 || e >= 4466 && e <= 4467 || e == 4469 || e == 4510 || e == 4520 || e == 4523 || e >= 4526 && e <= 4527 || e >= 4535 && e <= 4536 || e == 4538 || e >= 4540 && e <= 4546 || e == 4587 || e == 4592 || e == 4601 || e >= 7680 && e <= 7835 || e >= 7840 && e <= 7929 || e >= 7936 && e <= 7957 || e >= 7960 && e <= 7965 || e >= 7968 && e <= 8005 || e >= 8008 && e <= 8013 || e >= 8016 && e <= 8023 || e == 8025 || e == 8027 || e == 8029 || e >= 8031 && e <= 8061 || e >= 8064 && e <= 8116 || e >= 8118 && e <= 8124 || e == 8126 || e >= 8130 && e <= 8132 || e >= 8134 && e <= 8140 || e >= 8144 && e <= 8147 || e >= 8150 && e <= 8155 || e >= 8160 && e <= 8172 || e >= 8178 && e <= 8180 || e >= 8182 && e <= 8188 || e == 8486 || e >= 8490 && e <= 8491 || e == 8494 || e >= 8576 && e <= 8578 || e >= 12353 && e <= 12436 || e >= 12449 && e <= 12538 || e >= 12549 && e <= 12588 || e >= 44032 && e <= 55203 || e >= 19968 && e <= 40869 || e == 12295 || e >= 12321 && e <= 12329; - }, v.isNCNameChar = function(e) { - return e >= 48 && e <= 57 || e >= 1632 && e <= 1641 || e >= 1776 && e <= 1785 || e >= 2406 && e <= 2415 || e >= 2534 && e <= 2543 || e >= 2662 && e <= 2671 || e >= 2790 && e <= 2799 || e >= 2918 && e <= 2927 || e >= 3047 && e <= 3055 || e >= 3174 && e <= 3183 || e >= 3302 && e <= 3311 || e >= 3430 && e <= 3439 || e >= 3664 && e <= 3673 || e >= 3792 && e <= 3801 || e >= 3872 && e <= 3881 || e == 46 || e == 45 || e == 95 || v.isLetter(e) || e >= 768 && e <= 837 || e >= 864 && e <= 865 || e >= 1155 && e <= 1158 || e >= 1425 && e <= 1441 || e >= 1443 && e <= 1465 || e >= 1467 && e <= 1469 || e == 1471 || e >= 1473 && e <= 1474 || e == 1476 || e >= 1611 && e <= 1618 || e == 1648 || e >= 1750 && e <= 1756 || e >= 1757 && e <= 1759 || e >= 1760 && e <= 1764 || e >= 1767 && e <= 1768 || e >= 1770 && e <= 1773 || e >= 2305 && e <= 2307 || e == 2364 || e >= 2366 && e <= 2380 || e == 2381 || e >= 2385 && e <= 2388 || e >= 2402 && e <= 2403 || e >= 2433 && e <= 2435 || e == 2492 || e == 2494 || e == 2495 || e >= 2496 && e <= 2500 || e >= 2503 && e <= 2504 || e >= 2507 && e <= 2509 || e == 2519 || e >= 2530 && e <= 2531 || e == 2562 || e == 2620 || e == 2622 || e == 2623 || e >= 2624 && e <= 2626 || e >= 2631 && e <= 2632 || e >= 2635 && e <= 2637 || e >= 2672 && e <= 2673 || e >= 2689 && e <= 2691 || e == 2748 || e >= 2750 && e <= 2757 || e >= 2759 && e <= 2761 || e >= 2763 && e <= 2765 || e >= 2817 && e <= 2819 || e == 2876 || e >= 2878 && e <= 2883 || e >= 2887 && e <= 2888 || e >= 2891 && e <= 2893 || e >= 2902 && e <= 2903 || e >= 2946 && e <= 2947 || e >= 3006 && e <= 3010 || e >= 3014 && e <= 3016 || e >= 3018 && e <= 3021 || e == 3031 || e >= 3073 && e <= 3075 || e >= 3134 && e <= 3140 || e >= 3142 && e <= 3144 || e >= 3146 && e <= 3149 || e >= 3157 && e <= 3158 || e >= 3202 && e <= 3203 || e >= 3262 && e <= 3268 || e >= 3270 && e <= 3272 || e >= 3274 && e <= 3277 || e >= 3285 && e <= 3286 || e >= 3330 && e <= 3331 || e >= 3390 && e <= 3395 || e >= 3398 && e <= 3400 || e >= 3402 && e <= 3405 || e == 3415 || e == 3633 || e >= 3636 && e <= 3642 || e >= 3655 && e <= 3662 || e == 3761 || e >= 3764 && e <= 3769 || e >= 3771 && e <= 3772 || e >= 3784 && e <= 3789 || e >= 3864 && e <= 3865 || e == 3893 || e == 3895 || e == 3897 || e == 3902 || e == 3903 || e >= 3953 && e <= 3972 || e >= 3974 && e <= 3979 || e >= 3984 && e <= 3989 || e == 3991 || e >= 3993 && e <= 4013 || e >= 4017 && e <= 4023 || e == 4025 || e >= 8400 && e <= 8412 || e == 8417 || e >= 12330 && e <= 12335 || e == 12441 || e == 12442 || e == 183 || e == 720 || e == 721 || e == 903 || e == 1600 || e == 3654 || e == 3782 || e == 12293 || e >= 12337 && e <= 12341 || e >= 12445 && e <= 12446 || e >= 12540 && e <= 12542; - }, v.coalesceText = function(e) { - for (var r = e.firstChild; r != null; r = r.nextSibling) - if (r.nodeType == x.TEXT_NODE || r.nodeType == x.CDATA_SECTION_NODE) { - var o = r.nodeValue, a = r; - for (r = r.nextSibling; r != null && (r.nodeType == x.TEXT_NODE || r.nodeType == x.CDATA_SECTION_NODE); ) { - o += r.nodeValue; - var i = r; - r = r.nextSibling, i.parentNode.removeChild(i); - } - if (a.nodeType == x.CDATA_SECTION_NODE) { - var l = a.parentNode; - if (a.nextSibling == null) - l.removeChild(a), l.appendChild(l.ownerDocument.createTextNode(o)); - else { - var g = a.nextSibling; - l.removeChild(a), l.insertBefore(l.ownerDocument.createTextNode(o), g); - } - } else - a.nodeValue = o; - if (r == null) - break; - } else - r.nodeType == x.ELEMENT_NODE && v.coalesceText(r); - }, v.instance_of = function(e, r) { - for (; e != null; ) { - if (e.constructor === r) - return !0; - if (e === Object) - return !1; - e = e.constructor.superclass; - } - return !1; - }, v.getElementById = function(e, r) { - if (e.nodeType == x.ELEMENT_NODE && (e.getAttribute("id") == r || e.getAttributeNS(null, "id") == r)) - return e; - for (var o = e.firstChild; o != null; o = o.nextSibling) { - var a = v.getElementById(o, r); - if (a != null) - return a; - } - return null; - }; - var be = function() { - function e(o, a) { - var i = a ? ": " + a.toString() : ""; - switch (o) { - case r.INVALID_EXPRESSION_ERR: - return "Invalid expression" + i; - case r.TYPE_ERR: - return "Type error" + i; - } - return null; - } - function r(o, a, i) { - var l = Error.call(this, e(o, a) || i); - return l.code = o, l.exception = a, l; - } - return r.prototype = Object.create(Error.prototype), r.prototype.constructor = r, r.superclass = Error, r.prototype.toString = function() { - return this.message; - }, r.fromMessage = function(o, a) { - return new r(null, a, o); - }, r.INVALID_EXPRESSION_ERR = 51, r.TYPE_ERR = 52, r; - }(); - he.prototype = {}, he.prototype.constructor = he, he.superclass = Object.prototype; - function he(e, r, o) { - this.xpath = o.parse(e), this.context = new Te(), this.context.namespaceResolver = new $e(r); - } - he.getOwnerDocument = function(e) { - return e.nodeType === x.DOCUMENT_NODE ? e : e.ownerDocument; - }, he.detectHtmlDom = function(e) { - if (!e) - return !1; - var r = he.getOwnerDocument(e); - try { - return r.implementation.hasFeature("HTML", "2.0"); - } catch { - return !0; - } - }, he.prototype.evaluate = function(e, r, o) { - this.context.expressionContextNode = e, this.context.caseInsensitive = he.detectHtmlDom(e); - var a = this.xpath.evaluate(this.context); - return new F(a, r); - }, $e.prototype = {}, $e.prototype.constructor = $e, $e.superclass = Object.prototype; - function $e(e) { - this.xpathNSResolver = e; - } - $e.prototype.getNamespace = function(e, r) { - return this.xpathNSResolver == null ? null : this.xpathNSResolver.lookupNamespaceURI(e); - }, Qe.prototype = {}, Qe.prototype.constructor = Qe, Qe.superclass = Object.prototype; - function Qe(e) { - this.node = e, this.namespaceResolver = new Re(); - } - Qe.prototype.lookupNamespaceURI = function(e) { - return this.namespaceResolver.getNamespace(e, this.node); - }, F.prototype = {}, F.prototype.constructor = F, F.superclass = Object.prototype; - function F(e, r) { - switch (r == F.ANY_TYPE && (e.constructor === T ? r = F.STRING_TYPE : e.constructor === b ? r = F.NUMBER_TYPE : e.constructor === C ? r = F.BOOLEAN_TYPE : e.constructor === m && (r = F.UNORDERED_NODE_ITERATOR_TYPE)), this.resultType = r, r) { - case F.NUMBER_TYPE: - this.numberValue = e.numberValue(); - return; - case F.STRING_TYPE: - this.stringValue = e.stringValue(); - return; - case F.BOOLEAN_TYPE: - this.booleanValue = e.booleanValue(); - return; - case F.ANY_UNORDERED_NODE_TYPE: - case F.FIRST_ORDERED_NODE_TYPE: - if (e.constructor === m) { - this.singleNodeValue = e.first(); - return; - } - break; - case F.UNORDERED_NODE_ITERATOR_TYPE: - case F.ORDERED_NODE_ITERATOR_TYPE: - if (e.constructor === m) { - this.invalidIteratorState = !1, this.nodes = e.toArray(), this.iteratorIndex = 0; - return; - } - break; - case F.UNORDERED_NODE_SNAPSHOT_TYPE: - case F.ORDERED_NODE_SNAPSHOT_TYPE: - if (e.constructor === m) { - this.nodes = e.toArray(), this.snapshotLength = this.nodes.length; - return; - } - break; - } - throw new be(be.TYPE_ERR); - } - F.prototype.iterateNext = function() { - if (this.resultType != F.UNORDERED_NODE_ITERATOR_TYPE && this.resultType != F.ORDERED_NODE_ITERATOR_TYPE) - throw new be(be.TYPE_ERR); - return this.nodes[this.iteratorIndex++]; - }, F.prototype.snapshotItem = function(e) { - if (this.resultType != F.UNORDERED_NODE_SNAPSHOT_TYPE && this.resultType != F.ORDERED_NODE_SNAPSHOT_TYPE) - throw new be(be.TYPE_ERR); - return this.nodes[e]; - }, F.ANY_TYPE = 0, F.NUMBER_TYPE = 1, F.STRING_TYPE = 2, F.BOOLEAN_TYPE = 3, F.UNORDERED_NODE_ITERATOR_TYPE = 4, F.ORDERED_NODE_ITERATOR_TYPE = 5, F.UNORDERED_NODE_SNAPSHOT_TYPE = 6, F.ORDERED_NODE_SNAPSHOT_TYPE = 7, F.ANY_UNORDERED_NODE_TYPE = 8, F.FIRST_ORDERED_NODE_TYPE = 9; - function Gr(e, r) { - e.createExpression = function(o, a) { - try { - return new he(o, a, r); - } catch (i) { - throw new be(be.INVALID_EXPRESSION_ERR, i); - } - }, e.createNSResolver = function(o) { - return new Qe(o); - }, e.evaluate = function(o, a, i, l, g) { - if (l < 0 || l > 9) - throw { code: 0, toString: function() { - return "Request type not supported"; - } }; - return e.createExpression(o, i, r).evaluate(a, l, g); - }; - } - try { - var Hr = !0; - try { - document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("XPath", null) && (Hr = !1); - } catch { - } - Hr && Gr(document, new p()); - } catch { - } - Gr(n, new p()), function() { - var e = new p(), r = new Re(), o = new fe(), a = new Ue(); - function i(h) { - return { - getNamespace: function(P, oe) { - var Ve = h(P, oe); - return Ve || r.getNamespace(P, oe); - } - }; - } - function l(h) { - return i(h.getNamespace.bind(h)); - } - function g(h) { - return i(function(P) { - return h[P]; - }); - } - function I(h) { - return h && typeof h.getNamespace == "function" ? l(h) : typeof h == "function" ? i(h) : typeof h == "object" ? g(h) : r; - } - function L(h) { - if (h === null || typeof h > "u" || h instanceof T || h instanceof C || h instanceof b || h instanceof m) - return h; - switch (typeof h) { - case "string": - return new T(h); - case "boolean": - return new C(h); - case "number": - return new b(h); - } - var P = new m(); - return P.addArray([].concat(h)), P; - } - function D(h) { - return function(P) { - var oe = Array.prototype.slice.call(arguments, 1).map(function(Wt) { - return Wt.evaluate(P); - }), Ve = h.apply(this, [].concat(P, oe)); - return L(Ve); - }; - } - function B(h) { - return { - getFunction: function(P, oe) { - var Ve = h(P, oe); - return Ve ? D(Ve) : o.getFunction(P, oe); - } - }; - } - function Ie(h) { - return B(h.getFunction.bind(h)); - } - function je(h) { - return B(function(P) { - return h[P]; - }); - } - function ze(h) { - return h && typeof h.getFunction == "function" ? Ie(h) : typeof h == "function" ? B(h) : typeof h == "object" ? je(h) : o; - } - function Ye(h) { - return { - getVariable: function(P, oe) { - var Ve = h(P, oe); - return L(Ve); - } - }; - } - function or(h) { - if (h) { - if (typeof h.getVariable == "function") - return Ye(h.getVariable.bind(h)); - if (typeof h == "function") - return Ye(h); - if (typeof h == "object") - return Ye(function(P) { - return h[P]; - }); - } - return a; - } - function ir(h, P, oe) { - h in oe && (P[h] = oe[h]); - } - function Ht(h) { - var P = new Te(); - return h ? (P.namespaceResolver = I(h.namespaces), P.functionResolver = ze(h.functions), P.variableResolver = or(h.variables), P.expressionContextNode = h.node, ir("allowAnyNamespaceForNoPrefix", P, h), ir("isHtml", P, h)) : P.namespaceResolver = r, P; - } - function Xt(h, P) { - var oe = Ht(P); - return h.evaluate(oe); - } - var jt = { - evaluate: function(h) { - return Xt(this.expression, h); - }, - evaluateNumber: function(h) { - return this.evaluate(h).numberValue(); - }, - evaluateString: function(h) { - return this.evaluate(h).stringValue(); - }, - evaluateBoolean: function(h) { - return this.evaluate(h).booleanValue(); - }, - evaluateNodeSet: function(h) { - return this.evaluate(h).nodeset(); - }, - select: function(h) { - return this.evaluateNodeSet(h).toArray(); - }, - select1: function(h) { - return this.select(h)[0]; - } - }; - function Yt(h) { - var P = e.parse(h); - return Object.create(jt, { - expression: { - value: P - } - }); - } - n.parse = Yt; - }(), Se( - n, - { - XPath: Z, - XPathParser: p, - XPathResult: F, - Step: E, - PathExpr: _, - NodeTest: d, - LocationPath: Oe, - OrOperation: ue, - AndOperation: pe, - BarOperation: Ce, - EqualsOperation: M, - NotEqualOperation: j, - LessThanOperation: ce, - GreaterThanOperation: Ae, - LessThanOrEqualOperation: De, - GreaterThanOrEqualOperation: ge, - PlusOperation: de, - MinusOperation: me, - MultiplyOperation: Ne, - DivOperation: ve, - ModOperation: xe, - UnaryMinusOperation: le, - FunctionCall: ye, - VariableReference: Fe, - XPathContext: Te, - XNodeSet: m, - XBoolean: C, - XString: T, - XNumber: b, - NamespaceResolver: Re, - FunctionResolver: fe, - VariableResolver: Ue, - Utilities: v - } - ), n.select = function(e, r, o) { - return n.selectWithResolver(e, r, null, o); - }, n.useNamespaces = function(e) { - var r = { - mappings: e || {}, - lookupNamespaceURI: function(o) { - return this.mappings[o]; - } - }; - return function(o, a, i) { - return n.selectWithResolver(o, a, r, i); - }; - }, n.selectWithResolver = function(e, r, o, a) { - var i = new he(e, o, new p()), l = F.ANY_TYPE, g = i.evaluate(r, l, null); - return g.resultType == F.STRING_TYPE ? g = g.stringValue : g.resultType == F.NUMBER_TYPE ? g = g.numberValue : g.resultType == F.BOOLEAN_TYPE ? g = g.booleanValue : (g = g.nodes, a && (g = g[0])), g; - }, n.select1 = function(e, r) { - return n.select(e, r, !0); - }; - var Gt = function(e) { - return Array.isArray(e) && e.every(A); - }, _e = function(e) { - return function(r) { - return A(r) && r.nodeType === e; - }; - }; - Se( - n, - { - isNodeLike: A, - isArrayOfNodes: Gt, - isElement: _e(x.ELEMENT_NODE), - isAttribute: _e(x.ATTRIBUTE_NODE), - isTextNode: _e(x.TEXT_NODE), - isCDATASection: _e(x.CDATA_SECTION_NODE), - isProcessingInstruction: _e(x.PROCESSING_INSTRUCTION_NODE), - isComment: _e(x.COMMENT_NODE), - isDocumentNode: _e(x.DOCUMENT_NODE), - isDocumentTypeNode: _e(x.DOCUMENT_TYPE_NODE), - isDocumentFragment: _e(x.DOCUMENT_FRAGMENT_NODE) - } - ); - })(u); -})(nt); -const Qt = /* @__PURE__ */ $t(nt); -var Ge = {}, Me = {}; -function zt(t, u, n) { - if (n === void 0 && (n = Array.prototype), t && typeof n.find == "function") - return n.find.call(t, u); - for (var s = 0; s < t.length; s++) - if (Object.prototype.hasOwnProperty.call(t, s)) { - var c = t[s]; - if (u.call(void 0, c, s, t)) - return c; - } -} -function Or(t, u) { - return u === void 0 && (u = Object), u && typeof u.freeze == "function" ? u.freeze(t) : t; -} -function Jt(t, u) { - if (t === null || typeof t != "object") - throw new TypeError("target is not an object"); - for (var n in u) - Object.prototype.hasOwnProperty.call(u, n) && (t[n] = u[n]); - return t; -} -var ot = Or({ - /** - * `text/html`, the only mime type that triggers treating an XML document as HTML. - * - * @see DOMParser.SupportedType.isHTML - * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration - * @see https://en.wikipedia.org/wiki/HTML Wikipedia - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec - */ - HTML: "text/html", - /** - * Helper method to check a mime type if it indicates an HTML document - * - * @param {string} [value] - * @returns {boolean} - * - * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration - * @see https://en.wikipedia.org/wiki/HTML Wikipedia - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN - * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring */ - isHTML: function(t) { - return t === ot.HTML; - }, - /** - * `application/xml`, the standard mime type for XML documents. - * - * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration - * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303 - * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia - */ - XML_APPLICATION: "application/xml", - /** - * `text/html`, an alias for `application/xml`. - * - * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303 - * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration - * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia - */ - XML_TEXT: "text/xml", - /** - * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace, - * but is parsed as an XML document. - * - * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration - * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec - * @see https://en.wikipedia.org/wiki/XHTML Wikipedia - */ - XML_XHTML_APPLICATION: "application/xhtml+xml", - /** - * `image/svg+xml`, - * - * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration - * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1 - * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia - */ - XML_SVG_IMAGE: "image/svg+xml" -}), it = Or({ - /** - * The XHTML namespace. - * - * @see http://www.w3.org/1999/xhtml - */ - HTML: "http://www.w3.org/1999/xhtml", - /** - * Checks if `uri` equals `NAMESPACE.HTML`. - * - * @param {string} [uri] - * - * @see NAMESPACE.HTML - */ - isHTML: function(t) { - return t === it.HTML; - }, - /** - * The SVG namespace. - * - * @see http://www.w3.org/2000/svg - */ - SVG: "http://www.w3.org/2000/svg", - /** - * The `xml:` namespace. - * - * @see http://www.w3.org/XML/1998/namespace - */ - XML: "http://www.w3.org/XML/1998/namespace", - /** - * The `xmlns:` namespace - * - * @see https://www.w3.org/2000/xmlns/ - */ - XMLNS: "http://www.w3.org/2000/xmlns/" -}); -Me.assign = Jt; -Me.find = zt; -Me.freeze = Or; -Me.MIME_TYPE = ot; -Me.NAMESPACE = it; -var st = Me, we = st.find, pr = st.NAMESPACE; -function Zt(t) { - return t !== ""; -} -function Kt(t) { - return t ? t.split(/[\t\n\f\r ]+/).filter(Zt) : []; -} -function eu(t, u) { - return t.hasOwnProperty(u) || (t[u] = !0), t; -} -function Xr(t) { - if (!t) - return []; - var u = Kt(t); - return Object.keys(u.reduce(eu, {})); -} -function ru(t) { - return function(u) { - return t && t.indexOf(u) !== -1; - }; -} -function hr(t, u) { - for (var n in t) - Object.prototype.hasOwnProperty.call(t, n) && (u[n] = t[n]); -} -function se(t, u) { - var n = t.prototype; - if (!(n instanceof u)) { - let s = function() { - }; - s.prototype = u.prototype, s = new s(), hr(n, s), t.prototype = n = s; - } - n.constructor != t && (typeof t != "function" && console.error("unknown Class:" + t), n.constructor = t); -} -var ae = {}, Ee = ae.ELEMENT_NODE = 1, tr = ae.ATTRIBUTE_NODE = 2, mr = ae.TEXT_NODE = 3, at = ae.CDATA_SECTION_NODE = 4, lt = ae.ENTITY_REFERENCE_NODE = 5, tu = ae.ENTITY_NODE = 6, pt = ae.PROCESSING_INSTRUCTION_NODE = 7, ct = ae.COMMENT_NODE = 8, ft = ae.DOCUMENT_NODE = 9, ht = ae.DOCUMENT_TYPE_NODE = 10, Pe = ae.DOCUMENT_FRAGMENT_NODE = 11, uu = ae.NOTATION_NODE = 12, re = {}, K = {}; -re.INDEX_SIZE_ERR = (K[1] = "Index size error", 1); -re.DOMSTRING_SIZE_ERR = (K[2] = "DOMString size error", 2); -var ie = re.HIERARCHY_REQUEST_ERR = (K[3] = "Hierarchy request error", 3); -re.WRONG_DOCUMENT_ERR = (K[4] = "Wrong document", 4); -re.INVALID_CHARACTER_ERR = (K[5] = "Invalid character", 5); -re.NO_DATA_ALLOWED_ERR = (K[6] = "No data allowed", 6); -re.NO_MODIFICATION_ALLOWED_ERR = (K[7] = "No modification allowed", 7); -var Et = re.NOT_FOUND_ERR = (K[8] = "Not found", 8); -re.NOT_SUPPORTED_ERR = (K[9] = "Not supported", 9); -var jr = re.INUSE_ATTRIBUTE_ERR = (K[10] = "Attribute in use", 10); -re.INVALID_STATE_ERR = (K[11] = "Invalid state", 11); -re.SYNTAX_ERR = (K[12] = "Syntax error", 12); -re.INVALID_MODIFICATION_ERR = (K[13] = "Invalid modification", 13); -re.NAMESPACE_ERR = (K[14] = "Invalid namespace", 14); -re.INVALID_ACCESS_ERR = (K[15] = "Invalid access", 15); -function z(t, u) { - if (u instanceof Error) - var n = u; - else - n = this, Error.call(this, K[t]), this.message = K[t], Error.captureStackTrace && Error.captureStackTrace(this, z); - return n.code = t, u && (this.message = this.message + ": " + u), n; -} -z.prototype = Error.prototype; -hr(re, z); -function Le() { -} -Le.prototype = { - /** - * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. - * @standard level1 - */ - length: 0, - /** - * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. - * @standard level1 - * @param index unsigned long - * Index into the collection. - * @return Node - * The node at the indexth position in the NodeList, or null if that is not a valid index. - */ - item: function(t) { - return t >= 0 && t < this.length ? this[t] : null; - }, - toString: function(t, u) { - for (var n = [], s = 0; s < this.length; s++) - rr(this[s], n, t, u); - return n.join(""); - }, - /** - * @private - * @param {function (Node):boolean} predicate - * @returns {Node[]} - */ - filter: function(t) { - return Array.prototype.filter.call(this, t); - }, - /** - * @private - * @param {Node} item - * @returns {number} - */ - indexOf: function(t) { - return Array.prototype.indexOf.call(this, t); - } -}; -function ur(t, u) { - this._node = t, this._refresh = u, Fr(this); -} -function Fr(t) { - var u = t._node._inc || t._node.ownerDocument._inc; - if (t._inc !== u) { - var n = t._refresh(t._node); - if (bt(t, "length", n.length), !t.$$length || n.length < t.$$length) - for (var s = n.length; s in t; s++) - Object.prototype.hasOwnProperty.call(t, s) && delete t[s]; - hr(n, t), t._inc = u; - } -} -ur.prototype.item = function(t) { - return Fr(this), this[t] || null; -}; -se(ur, Le); -function Nr() { -} -function At(t, u) { - for (var n = t.length; n--; ) - if (t[n] === u) - return n; -} -function Yr(t, u, n, s) { - if (s ? u[At(u, s)] = n : u[u.length++] = n, t) { - n.ownerElement = t; - var c = t.ownerDocument; - c && (s && dt(c, t, s), nu(c, t, n)); - } -} -function Wr(t, u, n) { - var s = At(u, n); - if (s >= 0) { - for (var c = u.length - 1; s < c; ) - u[s] = u[++s]; - if (u.length = c, t) { - var f = t.ownerDocument; - f && (dt(f, t, n), n.ownerElement = null); - } - } else - throw new z(Et, new Error(t.tagName + "@" + n)); -} -Nr.prototype = { - length: 0, - item: Le.prototype.item, - getNamedItem: function(t) { - for (var u = this.length; u--; ) { - var n = this[u]; - if (n.nodeName == t) - return n; - } - }, - setNamedItem: function(t) { - var u = t.ownerElement; - if (u && u != this._ownerElement) - throw new z(jr); - var n = this.getNamedItem(t.nodeName); - return Yr(this._ownerElement, this, t, n), n; - }, - /* returns Node */ - setNamedItemNS: function(t) { - var u = t.ownerElement, n; - if (u && u != this._ownerElement) - throw new z(jr); - return n = this.getNamedItemNS(t.namespaceURI, t.localName), Yr(this._ownerElement, this, t, n), n; - }, - /* returns Node */ - removeNamedItem: function(t) { - var u = this.getNamedItem(t); - return Wr(this._ownerElement, this, u), u; - }, - // raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR - //for level2 - removeNamedItemNS: function(t, u) { - var n = this.getNamedItemNS(t, u); - return Wr(this._ownerElement, this, n), n; - }, - getNamedItemNS: function(t, u) { - for (var n = this.length; n--; ) { - var s = this[n]; - if (s.localName == u && s.namespaceURI == t) - return s; - } - return null; - } -}; -function Dt() { -} -Dt.prototype = { - /** - * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported. - * The different implementations fairly diverged in what kind of features were reported. - * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use. - * - * @deprecated It is deprecated and modern browsers return true in all cases. - * - * @param {string} feature - * @param {string} [version] - * @returns {boolean} always true - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN - * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core - * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard - */ - hasFeature: function(t, u) { - return !0; - }, - /** - * Creates an XML Document object of the specified type with its document element. - * - * __It behaves slightly different from the description in the living standard__: - * - There is no interface/class `XMLDocument`, it returns a `Document` instance. - * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared. - * - this implementation is not validating names or qualified names - * (when parsing XML strings, the SAX parser takes care of that) - * - * @param {string|null} namespaceURI - * @param {string} qualifiedName - * @param {DocumentType=null} doctype - * @returns {Document} - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN - * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial) - * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core - * - * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract - * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names - * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names - */ - createDocument: function(t, u, n) { - var s = new Er(); - if (s.implementation = this, s.childNodes = new Le(), s.doctype = n || null, n && s.appendChild(n), u) { - var c = s.createElementNS(t, u); - s.appendChild(c); - } - return s; - }, - /** - * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`. - * - * __This behavior is slightly different from the in the specs__: - * - this implementation is not validating names or qualified names - * (when parsing XML strings, the SAX parser takes care of that) - * - * @param {string} qualifiedName - * @param {string} [publicId] - * @param {string} [systemId] - * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation - * or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()` - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN - * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core - * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard - * - * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract - * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names - * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names - */ - createDocumentType: function(t, u, n) { - var s = new Cr(); - return s.name = t, s.nodeName = t, s.publicId = u || "", s.systemId = n || "", s; - } -}; -function V() { -} -V.prototype = { - firstChild: null, - lastChild: null, - previousSibling: null, - nextSibling: null, - attributes: null, - parentNode: null, - childNodes: null, - ownerDocument: null, - nodeValue: null, - namespaceURI: null, - prefix: null, - localName: null, - // Modified in DOM Level 2: - insertBefore: function(t, u) { - return vr(this, t, u); - }, - replaceChild: function(t, u) { - vr(this, t, u, Nt), u && this.removeChild(u); - }, - removeChild: function(t) { - return mt(this, t); - }, - appendChild: function(t) { - return this.insertBefore(t, null); - }, - hasChildNodes: function() { - return this.firstChild != null; - }, - cloneNode: function(t) { - return wr(this.ownerDocument || this, this, t); - }, - // Modified in DOM Level 2: - normalize: function() { - for (var t = this.firstChild; t; ) { - var u = t.nextSibling; - u && u.nodeType == mr && t.nodeType == mr ? (this.removeChild(u), t.appendData(u.data)) : (t.normalize(), t = u); - } - }, - // Introduced in DOM Level 2: - isSupported: function(t, u) { - return this.ownerDocument.implementation.hasFeature(t, u); - }, - // Introduced in DOM Level 2: - hasAttributes: function() { - return this.attributes.length > 0; - }, - /** - * Look up the prefix associated to the given namespace URI, starting from this node. - * **The default namespace declarations are ignored by this method.** - * See Namespace Prefix Lookup for details on the algorithm used by this method. - * - * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._ - * - * @param {string | null} namespaceURI - * @returns {string | null} - * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix - * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo - * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix - * @see https://github.com/xmldom/xmldom/issues/322 - */ - lookupPrefix: function(t) { - for (var u = this; u; ) { - var n = u._nsMap; - if (n) { - for (var s in n) - if (Object.prototype.hasOwnProperty.call(n, s) && n[s] === t) - return s; - } - u = u.nodeType == tr ? u.ownerDocument : u.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - lookupNamespaceURI: function(t) { - for (var u = this; u; ) { - var n = u._nsMap; - if (n && Object.prototype.hasOwnProperty.call(n, t)) - return n[t]; - u = u.nodeType == tr ? u.ownerDocument : u.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - isDefaultNamespace: function(t) { - var u = this.lookupPrefix(t); - return u == null; - } -}; -function gt(t) { - return t == "<" && "<" || t == ">" && ">" || t == "&" && "&" || t == '"' && """ || "&#" + t.charCodeAt() + ";"; -} -hr(ae, V); -hr(ae, V.prototype); -function cr(t, u) { - if (u(t)) - return !0; - if (t = t.firstChild) - do - if (cr(t, u)) - return !0; - while (t = t.nextSibling); -} -function Er() { - this.ownerDocument = this; -} -function nu(t, u, n) { - t && t._inc++; - var s = n.namespaceURI; - s === pr.XMLNS && (u._nsMap[n.prefix ? n.localName : ""] = n.value); -} -function dt(t, u, n, s) { - t && t._inc++; - var c = n.namespaceURI; - c === pr.XMLNS && delete u._nsMap[n.prefix ? n.localName : ""]; -} -function Rr(t, u, n) { - if (t && t._inc) { - t._inc++; - var s = u.childNodes; - if (n) - s[s.length++] = n; - else { - for (var c = u.firstChild, f = 0; c; ) - s[f++] = c, c = c.nextSibling; - s.length = f, delete s[s.length]; - } - } -} -function mt(t, u) { - var n = u.previousSibling, s = u.nextSibling; - return n ? n.nextSibling = s : t.firstChild = s, s ? s.previousSibling = n : t.lastChild = n, u.parentNode = null, u.previousSibling = null, u.nextSibling = null, Rr(t.ownerDocument, t), u; -} -function ou(t) { - return t && (t.nodeType === V.DOCUMENT_NODE || t.nodeType === V.DOCUMENT_FRAGMENT_NODE || t.nodeType === V.ELEMENT_NODE); -} -function iu(t) { - return t && (Be(t) || _r(t) || qe(t) || t.nodeType === V.DOCUMENT_FRAGMENT_NODE || t.nodeType === V.COMMENT_NODE || t.nodeType === V.PROCESSING_INSTRUCTION_NODE); -} -function qe(t) { - return t && t.nodeType === V.DOCUMENT_TYPE_NODE; -} -function Be(t) { - return t && t.nodeType === V.ELEMENT_NODE; -} -function _r(t) { - return t && t.nodeType === V.TEXT_NODE; -} -function $r(t, u) { - var n = t.childNodes || []; - if (we(n, Be) || qe(u)) - return !1; - var s = we(n, qe); - return !(u && s && n.indexOf(s) > n.indexOf(u)); -} -function Qr(t, u) { - var n = t.childNodes || []; - function s(f) { - return Be(f) && f !== u; - } - if (we(n, s)) - return !1; - var c = we(n, qe); - return !(u && c && n.indexOf(c) > n.indexOf(u)); -} -function su(t, u, n) { - if (!ou(t)) - throw new z(ie, "Unexpected parent node type " + t.nodeType); - if (n && n.parentNode !== t) - throw new z(Et, "child not in parent"); - if ( - // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException. - !iu(u) || // 5. If either `node` is a Text node and `parent` is a document, - // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0 - // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE) - // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException. - qe(u) && t.nodeType !== V.DOCUMENT_NODE - ) - throw new z( - ie, - "Unexpected node type " + u.nodeType + " for parent node type " + t.nodeType - ); -} -function au(t, u, n) { - var s = t.childNodes || [], c = u.childNodes || []; - if (u.nodeType === V.DOCUMENT_FRAGMENT_NODE) { - var f = c.filter(Be); - if (f.length > 1 || we(c, _r)) - throw new z(ie, "More than one element or text in fragment"); - if (f.length === 1 && !$r(t, n)) - throw new z(ie, "Element in fragment can not be inserted before doctype"); - } - if (Be(u) && !$r(t, n)) - throw new z(ie, "Only one element can be added and only after doctype"); - if (qe(u)) { - if (we(s, qe)) - throw new z(ie, "Only one doctype is allowed"); - var A = we(s, Be); - if (n && s.indexOf(A) < s.indexOf(n)) - throw new z(ie, "Doctype can only be inserted before an element"); - if (!n && A) - throw new z(ie, "Doctype can not be appended since element is present"); - } -} -function Nt(t, u, n) { - var s = t.childNodes || [], c = u.childNodes || []; - if (u.nodeType === V.DOCUMENT_FRAGMENT_NODE) { - var f = c.filter(Be); - if (f.length > 1 || we(c, _r)) - throw new z(ie, "More than one element or text in fragment"); - if (f.length === 1 && !Qr(t, n)) - throw new z(ie, "Element in fragment can not be inserted before doctype"); - } - if (Be(u) && !Qr(t, n)) - throw new z(ie, "Only one element can be added and only after doctype"); - if (qe(u)) { - if (we(s, function(N) { - return qe(N) && N !== n; - })) - throw new z(ie, "Only one doctype is allowed"); - var A = we(s, Be); - if (n && s.indexOf(A) < s.indexOf(n)) - throw new z(ie, "Doctype can only be inserted before an element"); - } -} -function vr(t, u, n, s) { - su(t, u, n), t.nodeType === V.DOCUMENT_NODE && (s || au)(t, u, n); - var c = u.parentNode; - if (c && c.removeChild(u), u.nodeType === Pe) { - var f = u.firstChild; - if (f == null) - return u; - var A = u.lastChild; - } else - f = A = u; - var y = n ? n.previousSibling : t.lastChild; - f.previousSibling = y, A.nextSibling = n, y ? y.nextSibling = f : t.firstChild = f, n == null ? t.lastChild = A : n.previousSibling = A; - do - f.parentNode = t; - while (f !== A && (f = f.nextSibling)); - return Rr(t.ownerDocument || t, t), u.nodeType == Pe && (u.firstChild = u.lastChild = null), u; -} -function lu(t, u) { - return u.parentNode && u.parentNode.removeChild(u), u.parentNode = t, u.previousSibling = t.lastChild, u.nextSibling = null, u.previousSibling ? u.previousSibling.nextSibling = u : t.firstChild = u, t.lastChild = u, Rr(t.ownerDocument, t, u), u; -} -Er.prototype = { - //implementation : null, - nodeName: "#document", - nodeType: ft, - /** - * The DocumentType node of the document. - * - * @readonly - * @type DocumentType - */ - doctype: null, - documentElement: null, - _inc: 1, - insertBefore: function(t, u) { - if (t.nodeType == Pe) { - for (var n = t.firstChild; n; ) { - var s = n.nextSibling; - this.insertBefore(n, u), n = s; - } - return t; - } - return vr(this, t, u), t.ownerDocument = this, this.documentElement === null && t.nodeType === Ee && (this.documentElement = t), t; - }, - removeChild: function(t) { - return this.documentElement == t && (this.documentElement = null), mt(this, t); - }, - replaceChild: function(t, u) { - vr(this, t, u, Nt), t.ownerDocument = this, u && this.removeChild(u), Be(t) && (this.documentElement = t); - }, - // Introduced in DOM Level 2: - importNode: function(t, u) { - return Tt(this, t, u); - }, - // Introduced in DOM Level 2: - getElementById: function(t) { - var u = null; - return cr(this.documentElement, function(n) { - if (n.nodeType == Ee && n.getAttribute("id") == t) - return u = n, !0; - }), u; - }, - /** - * The `getElementsByClassName` method of `Document` interface returns an array-like object - * of all child elements which have **all** of the given class name(s). - * - * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters. - * - * - * Warning: This is a live LiveNodeList. - * Changes in the DOM will reflect in the array as the changes occur. - * If an element selected by this array no longer qualifies for the selector, - * it will automatically be removed. Be aware of this for iteration purposes. - * - * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace - * - * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName - * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname - */ - getElementsByClassName: function(t) { - var u = Xr(t); - return new ur(this, function(n) { - var s = []; - return u.length > 0 && cr(n.documentElement, function(c) { - if (c !== n && c.nodeType === Ee) { - var f = c.getAttribute("class"); - if (f) { - var A = t === f; - if (!A) { - var y = Xr(f); - A = u.every(ru(y)); - } - A && s.push(c); - } - } - }), s; - }); - }, - //document factory method: - createElement: function(t) { - var u = new We(); - u.ownerDocument = this, u.nodeName = t, u.tagName = t, u.localName = t, u.childNodes = new Le(); - var n = u.attributes = new Nr(); - return n._ownerElement = u, u; - }, - createDocumentFragment: function() { - var t = new yr(); - return t.ownerDocument = this, t.childNodes = new Le(), t; - }, - createTextNode: function(t) { - var u = new Ir(); - return u.ownerDocument = this, u.appendData(t), u; - }, - createComment: function(t) { - var u = new Lr(); - return u.ownerDocument = this, u.appendData(t), u; - }, - createCDATASection: function(t) { - var u = new Pr(); - return u.ownerDocument = this, u.appendData(t), u; - }, - createProcessingInstruction: function(t, u) { - var n = new Mr(); - return n.ownerDocument = this, n.tagName = n.nodeName = n.target = t, n.nodeValue = n.data = u, n; - }, - createAttribute: function(t) { - var u = new xr(); - return u.ownerDocument = this, u.name = t, u.nodeName = t, u.localName = t, u.specified = !0, u; - }, - createEntityReference: function(t) { - var u = new qr(); - return u.ownerDocument = this, u.nodeName = t, u; - }, - // Introduced in DOM Level 2: - createElementNS: function(t, u) { - var n = new We(), s = u.split(":"), c = n.attributes = new Nr(); - return n.childNodes = new Le(), n.ownerDocument = this, n.nodeName = u, n.tagName = u, n.namespaceURI = t, s.length == 2 ? (n.prefix = s[0], n.localName = s[1]) : n.localName = u, c._ownerElement = n, n; - }, - // Introduced in DOM Level 2: - createAttributeNS: function(t, u) { - var n = new xr(), s = u.split(":"); - return n.ownerDocument = this, n.nodeName = u, n.name = u, n.namespaceURI = t, n.specified = !0, s.length == 2 ? (n.prefix = s[0], n.localName = s[1]) : n.localName = u, n; - } -}; -se(Er, V); -function We() { - this._nsMap = {}; -} -We.prototype = { - nodeType: Ee, - hasAttribute: function(t) { - return this.getAttributeNode(t) != null; - }, - getAttribute: function(t) { - var u = this.getAttributeNode(t); - return u && u.value || ""; - }, - getAttributeNode: function(t) { - return this.attributes.getNamedItem(t); - }, - setAttribute: function(t, u) { - var n = this.ownerDocument.createAttribute(t); - n.value = n.nodeValue = "" + u, this.setAttributeNode(n); - }, - removeAttribute: function(t) { - var u = this.getAttributeNode(t); - u && this.removeAttributeNode(u); - }, - //four real opeartion method - appendChild: function(t) { - return t.nodeType === Pe ? this.insertBefore(t, null) : lu(this, t); - }, - setAttributeNode: function(t) { - return this.attributes.setNamedItem(t); - }, - setAttributeNodeNS: function(t) { - return this.attributes.setNamedItemNS(t); - }, - removeAttributeNode: function(t) { - return this.attributes.removeNamedItem(t.nodeName); - }, - //get real attribute name,and remove it by removeAttributeNode - removeAttributeNS: function(t, u) { - var n = this.getAttributeNodeNS(t, u); - n && this.removeAttributeNode(n); - }, - hasAttributeNS: function(t, u) { - return this.getAttributeNodeNS(t, u) != null; - }, - getAttributeNS: function(t, u) { - var n = this.getAttributeNodeNS(t, u); - return n && n.value || ""; - }, - setAttributeNS: function(t, u, n) { - var s = this.ownerDocument.createAttributeNS(t, u); - s.value = s.nodeValue = "" + n, this.setAttributeNode(s); - }, - getAttributeNodeNS: function(t, u) { - return this.attributes.getNamedItemNS(t, u); - }, - getElementsByTagName: function(t) { - return new ur(this, function(u) { - var n = []; - return cr(u, function(s) { - s !== u && s.nodeType == Ee && (t === "*" || s.tagName == t) && n.push(s); - }), n; - }); - }, - getElementsByTagNameNS: function(t, u) { - return new ur(this, function(n) { - var s = []; - return cr(n, function(c) { - c !== n && c.nodeType === Ee && (t === "*" || c.namespaceURI === t) && (u === "*" || c.localName == u) && s.push(c); - }), s; - }); - } -}; -Er.prototype.getElementsByTagName = We.prototype.getElementsByTagName; -Er.prototype.getElementsByTagNameNS = We.prototype.getElementsByTagNameNS; -se(We, V); -function xr() { -} -xr.prototype.nodeType = tr; -se(xr, V); -function Ar() { -} -Ar.prototype = { - data: "", - substringData: function(t, u) { - return this.data.substring(t, t + u); - }, - appendData: function(t) { - t = this.data + t, this.nodeValue = this.data = t, this.length = t.length; - }, - insertData: function(t, u) { - this.replaceData(t, 0, u); - }, - appendChild: function(t) { - throw new Error(K[ie]); - }, - deleteData: function(t, u) { - this.replaceData(t, u, ""); - }, - replaceData: function(t, u, n) { - var s = this.data.substring(0, t), c = this.data.substring(t + u); - n = s + n + c, this.nodeValue = this.data = n, this.length = n.length; - } -}; -se(Ar, V); -function Ir() { -} -Ir.prototype = { - nodeName: "#text", - nodeType: mr, - splitText: function(t) { - var u = this.data, n = u.substring(t); - u = u.substring(0, t), this.data = this.nodeValue = u, this.length = u.length; - var s = this.ownerDocument.createTextNode(n); - return this.parentNode && this.parentNode.insertBefore(s, this.nextSibling), s; - } -}; -se(Ir, Ar); -function Lr() { -} -Lr.prototype = { - nodeName: "#comment", - nodeType: ct -}; -se(Lr, Ar); -function Pr() { -} -Pr.prototype = { - nodeName: "#cdata-section", - nodeType: at -}; -se(Pr, Ar); -function Cr() { -} -Cr.prototype.nodeType = ht; -se(Cr, V); -function vt() { -} -vt.prototype.nodeType = uu; -se(vt, V); -function xt() { -} -xt.prototype.nodeType = tu; -se(xt, V); -function qr() { -} -qr.prototype.nodeType = lt; -se(qr, V); -function yr() { -} -yr.prototype.nodeName = "#document-fragment"; -yr.prototype.nodeType = Pe; -se(yr, V); -function Mr() { -} -Mr.prototype.nodeType = pt; -se(Mr, V); -function Ct() { -} -Ct.prototype.serializeToString = function(t, u, n) { - return yt.call(t, u, n); -}; -V.prototype.toString = yt; -function yt(t, u) { - var n = [], s = this.nodeType == 9 && this.documentElement || this, c = s.prefix, f = s.namespaceURI; - if (f && c == null) { - var c = s.lookupPrefix(f); - if (c == null) - var A = [ - { namespace: f, prefix: null } - //{namespace:uri,prefix:''} - ]; - } - return rr(this, n, t, u, A), n.join(""); -} -function zr(t, u, n) { - var s = t.prefix || "", c = t.namespaceURI; - if (!c || s === "xml" && c === pr.XML || c === pr.XMLNS) - return !1; - for (var f = n.length; f--; ) { - var A = n[f]; - if (A.prefix === s) - return A.namespace !== c; - } - return !0; -} -function br(t, u, n) { - t.push(" ", u, '="', n.replace(/[<>&"\t\n\r]/g, gt), '"'); -} -function rr(t, u, n, s, c) { - if (c || (c = []), s) - if (t = s(t), t) { - if (typeof t == "string") { - u.push(t); - return; - } - } else - return; - switch (t.nodeType) { - case Ee: - var f = t.attributes, A = f.length, Q = t.firstChild, y = t.tagName; - n = pr.isHTML(t.namespaceURI) || n; - var N = y; - if (!n && !t.prefix && t.namespaceURI) { - for (var w, S = 0; S < f.length; S++) - if (f.item(S).name === "xmlns") { - w = f.item(S).value; - break; - } - if (!w) - for (var k = c.length - 1; k >= 0; k--) { - var q = c[k]; - if (q.prefix === "" && q.namespace === t.namespaceURI) { - w = q.namespace; - break; - } - } - if (w !== t.namespaceURI) - for (var k = c.length - 1; k >= 0; k--) { - var q = c[k]; - if (q.namespace === t.namespaceURI) { - q.prefix && (N = q.prefix + ":" + y); - break; - } - } - } - u.push("<", N); - for (var $ = 0; $ < A; $++) { - var J = f.item($); - J.prefix == "xmlns" ? c.push({ prefix: J.localName, namespace: J.value }) : J.nodeName == "xmlns" && c.push({ prefix: "", namespace: J.value }); - } - for (var $ = 0; $ < A; $++) { - var J = f.item($); - if (zr(J, n, c)) { - var H = J.prefix || "", G = J.namespaceURI; - br(u, H ? "xmlns:" + H : "xmlns", G), c.push({ prefix: H, namespace: G }); - } - rr(J, u, n, s, c); - } - if (y === N && zr(t, n, c)) { - var H = t.prefix || "", G = t.namespaceURI; - br(u, H ? "xmlns:" + H : "xmlns", G), c.push({ prefix: H, namespace: G }); - } - if (Q || n && !/^(?:meta|link|img|br|hr|input)$/i.test(y)) { - if (u.push(">"), n && /^script$/i.test(y)) - for (; Q; ) - Q.data ? u.push(Q.data) : rr(Q, u, n, s, c.slice()), Q = Q.nextSibling; - else - for (; Q; ) - rr(Q, u, n, s, c.slice()), Q = Q.nextSibling; - u.push(""); - } else - u.push("/>"); - return; - case ft: - case Pe: - for (var Q = t.firstChild; Q; ) - rr(Q, u, n, s, c.slice()), Q = Q.nextSibling; - return; - case tr: - return br(u, t.name, t.value); - case mr: - return u.push( - t.data.replace(/[<&>]/g, gt) - ); - case at: - return u.push(""); - case ct: - return u.push(""); - case ht: - var He = t.publicId, Y = t.systemId; - if (u.push(""); - else if (Y && Y != ".") - u.push(" SYSTEM ", Y, ">"); - else { - var te = t.internalSubset; - te && u.push(" [", te, "]"), u.push(">"); - } - return; - case pt: - return u.push(""); - case lt: - return u.push("&", t.nodeName, ";"); - default: - u.push("??", t.nodeName); - } -} -function Tt(t, u, n) { - var s; - switch (u.nodeType) { - case Ee: - s = u.cloneNode(!1), s.ownerDocument = t; - case Pe: - break; - case tr: - n = !0; - break; - } - if (s || (s = u.cloneNode(!1)), s.ownerDocument = t, s.parentNode = null, n) - for (var c = u.firstChild; c; ) - s.appendChild(Tt(t, c, n)), c = c.nextSibling; - return s; -} -function wr(t, u, n) { - var s = new u.constructor(); - for (var c in u) - if (Object.prototype.hasOwnProperty.call(u, c)) { - var f = u[c]; - typeof f != "object" && f != s[c] && (s[c] = f); - } - switch (u.childNodes && (s.childNodes = new Le()), s.ownerDocument = t, s.nodeType) { - case Ee: - var A = u.attributes, y = s.attributes = new Nr(), N = A.length; - y._ownerElement = s; - for (var w = 0; w < N; w++) - s.setAttributeNode(wr(t, A.item(w), !0)); - break; - case tr: - n = !0; - } - if (n) - for (var S = u.firstChild; S; ) - s.appendChild(wr(t, S, n)), S = S.nextSibling; - return s; -} -function bt(t, u, n) { - t[u] = n; -} -try { - if (Object.defineProperty) { - let t = function(u) { - switch (u.nodeType) { - case Ee: - case Pe: - var n = []; - for (u = u.firstChild; u; ) - u.nodeType !== 7 && u.nodeType !== 8 && n.push(t(u)), u = u.nextSibling; - return n.join(""); - default: - return u.nodeValue; - } - }; - Object.defineProperty(ur.prototype, "length", { - get: function() { - return Fr(this), this.$$length; - } - }), Object.defineProperty(V.prototype, "textContent", { - get: function() { - return t(this); - }, - set: function(u) { - switch (this.nodeType) { - case Ee: - case Pe: - for (; this.firstChild; ) - this.removeChild(this.firstChild); - (u || String(u)) && this.appendChild(this.ownerDocument.createTextNode(u)); - break; - default: - this.data = u, this.value = u, this.nodeValue = u; - } - } - }), bt = function(u, n, s) { - u["$$" + n] = s; - }; - } -} catch { -} -Ge.DocumentType = Cr; -Ge.DOMException = z; -Ge.DOMImplementation = Dt; -Ge.Element = We; -Ge.Node = V; -Ge.NodeList = Le; -Ge.XMLSerializer = Ct; -var Tr = {}, wt = {}; -(function(t) { - var u = Me.freeze; - t.XML_ENTITIES = u({ - amp: "&", - apos: "'", - gt: ">", - lt: "<", - quot: '"' - }), t.HTML_ENTITIES = u({ - Aacute: "Á", - aacute: "á", - Abreve: "Ă", - abreve: "ă", - ac: "∾", - acd: "∿", - acE: "∾̳", - Acirc: "Â", - acirc: "â", - acute: "´", - Acy: "А", - acy: "а", - AElig: "Æ", - aelig: "æ", - af: "⁡", - Afr: "𝔄", - afr: "𝔞", - Agrave: "À", - agrave: "à", - alefsym: "ℵ", - aleph: "ℵ", - Alpha: "Α", - alpha: "α", - Amacr: "Ā", - amacr: "ā", - amalg: "⨿", - AMP: "&", - amp: "&", - And: "⩓", - and: "∧", - andand: "⩕", - andd: "⩜", - andslope: "⩘", - andv: "⩚", - ang: "∠", - ange: "⦤", - angle: "∠", - angmsd: "∡", - angmsdaa: "⦨", - angmsdab: "⦩", - angmsdac: "⦪", - angmsdad: "⦫", - angmsdae: "⦬", - angmsdaf: "⦭", - angmsdag: "⦮", - angmsdah: "⦯", - angrt: "∟", - angrtvb: "⊾", - angrtvbd: "⦝", - angsph: "∢", - angst: "Å", - angzarr: "⍼", - Aogon: "Ą", - aogon: "ą", - Aopf: "𝔸", - aopf: "𝕒", - ap: "≈", - apacir: "⩯", - apE: "⩰", - ape: "≊", - apid: "≋", - apos: "'", - ApplyFunction: "⁡", - approx: "≈", - approxeq: "≊", - Aring: "Å", - aring: "å", - Ascr: "𝒜", - ascr: "𝒶", - Assign: "≔", - ast: "*", - asymp: "≈", - asympeq: "≍", - Atilde: "Ã", - atilde: "ã", - Auml: "Ä", - auml: "ä", - awconint: "∳", - awint: "⨑", - backcong: "≌", - backepsilon: "϶", - backprime: "‵", - backsim: "∽", - backsimeq: "⋍", - Backslash: "∖", - Barv: "⫧", - barvee: "⊽", - Barwed: "⌆", - barwed: "⌅", - barwedge: "⌅", - bbrk: "⎵", - bbrktbrk: "⎶", - bcong: "≌", - Bcy: "Б", - bcy: "б", - bdquo: "„", - becaus: "∵", - Because: "∵", - because: "∵", - bemptyv: "⦰", - bepsi: "϶", - bernou: "ℬ", - Bernoullis: "ℬ", - Beta: "Β", - beta: "β", - beth: "ℶ", - between: "≬", - Bfr: "𝔅", - bfr: "𝔟", - bigcap: "⋂", - bigcirc: "◯", - bigcup: "⋃", - bigodot: "⨀", - bigoplus: "⨁", - bigotimes: "⨂", - bigsqcup: "⨆", - bigstar: "★", - bigtriangledown: "▽", - bigtriangleup: "△", - biguplus: "⨄", - bigvee: "⋁", - bigwedge: "⋀", - bkarow: "⤍", - blacklozenge: "⧫", - blacksquare: "▪", - blacktriangle: "▴", - blacktriangledown: "▾", - blacktriangleleft: "◂", - blacktriangleright: "▸", - blank: "␣", - blk12: "▒", - blk14: "░", - blk34: "▓", - block: "█", - bne: "=⃥", - bnequiv: "≡⃥", - bNot: "⫭", - bnot: "⌐", - Bopf: "𝔹", - bopf: "𝕓", - bot: "⊥", - bottom: "⊥", - bowtie: "⋈", - boxbox: "⧉", - boxDL: "╗", - boxDl: "╖", - boxdL: "╕", - boxdl: "┐", - boxDR: "╔", - boxDr: "╓", - boxdR: "╒", - boxdr: "┌", - boxH: "═", - boxh: "─", - boxHD: "╦", - boxHd: "╤", - boxhD: "╥", - boxhd: "┬", - boxHU: "╩", - boxHu: "╧", - boxhU: "╨", - boxhu: "┴", - boxminus: "⊟", - boxplus: "⊞", - boxtimes: "⊠", - boxUL: "╝", - boxUl: "╜", - boxuL: "╛", - boxul: "┘", - boxUR: "╚", - boxUr: "╙", - boxuR: "╘", - boxur: "└", - boxV: "║", - boxv: "│", - boxVH: "╬", - boxVh: "╫", - boxvH: "╪", - boxvh: "┼", - boxVL: "╣", - boxVl: "╢", - boxvL: "╡", - boxvl: "┤", - boxVR: "╠", - boxVr: "╟", - boxvR: "╞", - boxvr: "├", - bprime: "‵", - Breve: "˘", - breve: "˘", - brvbar: "¦", - Bscr: "ℬ", - bscr: "𝒷", - bsemi: "⁏", - bsim: "∽", - bsime: "⋍", - bsol: "\\", - bsolb: "⧅", - bsolhsub: "⟈", - bull: "•", - bullet: "•", - bump: "≎", - bumpE: "⪮", - bumpe: "≏", - Bumpeq: "≎", - bumpeq: "≏", - Cacute: "Ć", - cacute: "ć", - Cap: "⋒", - cap: "∩", - capand: "⩄", - capbrcup: "⩉", - capcap: "⩋", - capcup: "⩇", - capdot: "⩀", - CapitalDifferentialD: "ⅅ", - caps: "∩︀", - caret: "⁁", - caron: "ˇ", - Cayleys: "ℭ", - ccaps: "⩍", - Ccaron: "Č", - ccaron: "č", - Ccedil: "Ç", - ccedil: "ç", - Ccirc: "Ĉ", - ccirc: "ĉ", - Cconint: "∰", - ccups: "⩌", - ccupssm: "⩐", - Cdot: "Ċ", - cdot: "ċ", - cedil: "¸", - Cedilla: "¸", - cemptyv: "⦲", - cent: "¢", - CenterDot: "·", - centerdot: "·", - Cfr: "ℭ", - cfr: "𝔠", - CHcy: "Ч", - chcy: "ч", - check: "✓", - checkmark: "✓", - Chi: "Χ", - chi: "χ", - cir: "○", - circ: "ˆ", - circeq: "≗", - circlearrowleft: "↺", - circlearrowright: "↻", - circledast: "⊛", - circledcirc: "⊚", - circleddash: "⊝", - CircleDot: "⊙", - circledR: "®", - circledS: "Ⓢ", - CircleMinus: "⊖", - CirclePlus: "⊕", - CircleTimes: "⊗", - cirE: "⧃", - cire: "≗", - cirfnint: "⨐", - cirmid: "⫯", - cirscir: "⧂", - ClockwiseContourIntegral: "∲", - CloseCurlyDoubleQuote: "”", - CloseCurlyQuote: "’", - clubs: "♣", - clubsuit: "♣", - Colon: "∷", - colon: ":", - Colone: "⩴", - colone: "≔", - coloneq: "≔", - comma: ",", - commat: "@", - comp: "∁", - compfn: "∘", - complement: "∁", - complexes: "ℂ", - cong: "≅", - congdot: "⩭", - Congruent: "≡", - Conint: "∯", - conint: "∮", - ContourIntegral: "∮", - Copf: "ℂ", - copf: "𝕔", - coprod: "∐", - Coproduct: "∐", - COPY: "©", - copy: "©", - copysr: "℗", - CounterClockwiseContourIntegral: "∳", - crarr: "↵", - Cross: "⨯", - cross: "✗", - Cscr: "𝒞", - cscr: "𝒸", - csub: "⫏", - csube: "⫑", - csup: "⫐", - csupe: "⫒", - ctdot: "⋯", - cudarrl: "⤸", - cudarrr: "⤵", - cuepr: "⋞", - cuesc: "⋟", - cularr: "↶", - cularrp: "⤽", - Cup: "⋓", - cup: "∪", - cupbrcap: "⩈", - CupCap: "≍", - cupcap: "⩆", - cupcup: "⩊", - cupdot: "⊍", - cupor: "⩅", - cups: "∪︀", - curarr: "↷", - curarrm: "⤼", - curlyeqprec: "⋞", - curlyeqsucc: "⋟", - curlyvee: "⋎", - curlywedge: "⋏", - curren: "¤", - curvearrowleft: "↶", - curvearrowright: "↷", - cuvee: "⋎", - cuwed: "⋏", - cwconint: "∲", - cwint: "∱", - cylcty: "⌭", - Dagger: "‡", - dagger: "†", - daleth: "ℸ", - Darr: "↡", - dArr: "⇓", - darr: "↓", - dash: "‐", - Dashv: "⫤", - dashv: "⊣", - dbkarow: "⤏", - dblac: "˝", - Dcaron: "Ď", - dcaron: "ď", - Dcy: "Д", - dcy: "д", - DD: "ⅅ", - dd: "ⅆ", - ddagger: "‡", - ddarr: "⇊", - DDotrahd: "⤑", - ddotseq: "⩷", - deg: "°", - Del: "∇", - Delta: "Δ", - delta: "δ", - demptyv: "⦱", - dfisht: "⥿", - Dfr: "𝔇", - dfr: "𝔡", - dHar: "⥥", - dharl: "⇃", - dharr: "⇂", - DiacriticalAcute: "´", - DiacriticalDot: "˙", - DiacriticalDoubleAcute: "˝", - DiacriticalGrave: "`", - DiacriticalTilde: "˜", - diam: "⋄", - Diamond: "⋄", - diamond: "⋄", - diamondsuit: "♦", - diams: "♦", - die: "¨", - DifferentialD: "ⅆ", - digamma: "ϝ", - disin: "⋲", - div: "÷", - divide: "÷", - divideontimes: "⋇", - divonx: "⋇", - DJcy: "Ђ", - djcy: "ђ", - dlcorn: "⌞", - dlcrop: "⌍", - dollar: "$", - Dopf: "𝔻", - dopf: "𝕕", - Dot: "¨", - dot: "˙", - DotDot: "⃜", - doteq: "≐", - doteqdot: "≑", - DotEqual: "≐", - dotminus: "∸", - dotplus: "∔", - dotsquare: "⊡", - doublebarwedge: "⌆", - DoubleContourIntegral: "∯", - DoubleDot: "¨", - DoubleDownArrow: "⇓", - DoubleLeftArrow: "⇐", - DoubleLeftRightArrow: "⇔", - DoubleLeftTee: "⫤", - DoubleLongLeftArrow: "⟸", - DoubleLongLeftRightArrow: "⟺", - DoubleLongRightArrow: "⟹", - DoubleRightArrow: "⇒", - DoubleRightTee: "⊨", - DoubleUpArrow: "⇑", - DoubleUpDownArrow: "⇕", - DoubleVerticalBar: "∥", - DownArrow: "↓", - Downarrow: "⇓", - downarrow: "↓", - DownArrowBar: "⤓", - DownArrowUpArrow: "⇵", - DownBreve: "̑", - downdownarrows: "⇊", - downharpoonleft: "⇃", - downharpoonright: "⇂", - DownLeftRightVector: "⥐", - DownLeftTeeVector: "⥞", - DownLeftVector: "↽", - DownLeftVectorBar: "⥖", - DownRightTeeVector: "⥟", - DownRightVector: "⇁", - DownRightVectorBar: "⥗", - DownTee: "⊤", - DownTeeArrow: "↧", - drbkarow: "⤐", - drcorn: "⌟", - drcrop: "⌌", - Dscr: "𝒟", - dscr: "𝒹", - DScy: "Ѕ", - dscy: "ѕ", - dsol: "⧶", - Dstrok: "Đ", - dstrok: "đ", - dtdot: "⋱", - dtri: "▿", - dtrif: "▾", - duarr: "⇵", - duhar: "⥯", - dwangle: "⦦", - DZcy: "Џ", - dzcy: "џ", - dzigrarr: "⟿", - Eacute: "É", - eacute: "é", - easter: "⩮", - Ecaron: "Ě", - ecaron: "ě", - ecir: "≖", - Ecirc: "Ê", - ecirc: "ê", - ecolon: "≕", - Ecy: "Э", - ecy: "э", - eDDot: "⩷", - Edot: "Ė", - eDot: "≑", - edot: "ė", - ee: "ⅇ", - efDot: "≒", - Efr: "𝔈", - efr: "𝔢", - eg: "⪚", - Egrave: "È", - egrave: "è", - egs: "⪖", - egsdot: "⪘", - el: "⪙", - Element: "∈", - elinters: "⏧", - ell: "ℓ", - els: "⪕", - elsdot: "⪗", - Emacr: "Ē", - emacr: "ē", - empty: "∅", - emptyset: "∅", - EmptySmallSquare: "◻", - emptyv: "∅", - EmptyVerySmallSquare: "▫", - emsp: " ", - emsp13: " ", - emsp14: " ", - ENG: "Ŋ", - eng: "ŋ", - ensp: " ", - Eogon: "Ę", - eogon: "ę", - Eopf: "𝔼", - eopf: "𝕖", - epar: "⋕", - eparsl: "⧣", - eplus: "⩱", - epsi: "ε", - Epsilon: "Ε", - epsilon: "ε", - epsiv: "ϵ", - eqcirc: "≖", - eqcolon: "≕", - eqsim: "≂", - eqslantgtr: "⪖", - eqslantless: "⪕", - Equal: "⩵", - equals: "=", - EqualTilde: "≂", - equest: "≟", - Equilibrium: "⇌", - equiv: "≡", - equivDD: "⩸", - eqvparsl: "⧥", - erarr: "⥱", - erDot: "≓", - Escr: "ℰ", - escr: "ℯ", - esdot: "≐", - Esim: "⩳", - esim: "≂", - Eta: "Η", - eta: "η", - ETH: "Ð", - eth: "ð", - Euml: "Ë", - euml: "ë", - euro: "€", - excl: "!", - exist: "∃", - Exists: "∃", - expectation: "ℰ", - ExponentialE: "ⅇ", - exponentiale: "ⅇ", - fallingdotseq: "≒", - Fcy: "Ф", - fcy: "ф", - female: "♀", - ffilig: "ffi", - fflig: "ff", - ffllig: "ffl", - Ffr: "𝔉", - ffr: "𝔣", - filig: "fi", - FilledSmallSquare: "◼", - FilledVerySmallSquare: "▪", - fjlig: "fj", - flat: "♭", - fllig: "fl", - fltns: "▱", - fnof: "ƒ", - Fopf: "𝔽", - fopf: "𝕗", - ForAll: "∀", - forall: "∀", - fork: "⋔", - forkv: "⫙", - Fouriertrf: "ℱ", - fpartint: "⨍", - frac12: "½", - frac13: "⅓", - frac14: "¼", - frac15: "⅕", - frac16: "⅙", - frac18: "⅛", - frac23: "⅔", - frac25: "⅖", - frac34: "¾", - frac35: "⅗", - frac38: "⅜", - frac45: "⅘", - frac56: "⅚", - frac58: "⅝", - frac78: "⅞", - frasl: "⁄", - frown: "⌢", - Fscr: "ℱ", - fscr: "𝒻", - gacute: "ǵ", - Gamma: "Γ", - gamma: "γ", - Gammad: "Ϝ", - gammad: "ϝ", - gap: "⪆", - Gbreve: "Ğ", - gbreve: "ğ", - Gcedil: "Ģ", - Gcirc: "Ĝ", - gcirc: "ĝ", - Gcy: "Г", - gcy: "г", - Gdot: "Ġ", - gdot: "ġ", - gE: "≧", - ge: "≥", - gEl: "⪌", - gel: "⋛", - geq: "≥", - geqq: "≧", - geqslant: "⩾", - ges: "⩾", - gescc: "⪩", - gesdot: "⪀", - gesdoto: "⪂", - gesdotol: "⪄", - gesl: "⋛︀", - gesles: "⪔", - Gfr: "𝔊", - gfr: "𝔤", - Gg: "⋙", - gg: "≫", - ggg: "⋙", - gimel: "ℷ", - GJcy: "Ѓ", - gjcy: "ѓ", - gl: "≷", - gla: "⪥", - glE: "⪒", - glj: "⪤", - gnap: "⪊", - gnapprox: "⪊", - gnE: "≩", - gne: "⪈", - gneq: "⪈", - gneqq: "≩", - gnsim: "⋧", - Gopf: "𝔾", - gopf: "𝕘", - grave: "`", - GreaterEqual: "≥", - GreaterEqualLess: "⋛", - GreaterFullEqual: "≧", - GreaterGreater: "⪢", - GreaterLess: "≷", - GreaterSlantEqual: "⩾", - GreaterTilde: "≳", - Gscr: "𝒢", - gscr: "ℊ", - gsim: "≳", - gsime: "⪎", - gsiml: "⪐", - Gt: "≫", - GT: ">", - gt: ">", - gtcc: "⪧", - gtcir: "⩺", - gtdot: "⋗", - gtlPar: "⦕", - gtquest: "⩼", - gtrapprox: "⪆", - gtrarr: "⥸", - gtrdot: "⋗", - gtreqless: "⋛", - gtreqqless: "⪌", - gtrless: "≷", - gtrsim: "≳", - gvertneqq: "≩︀", - gvnE: "≩︀", - Hacek: "ˇ", - hairsp: " ", - half: "½", - hamilt: "ℋ", - HARDcy: "Ъ", - hardcy: "ъ", - hArr: "⇔", - harr: "↔", - harrcir: "⥈", - harrw: "↭", - Hat: "^", - hbar: "ℏ", - Hcirc: "Ĥ", - hcirc: "ĥ", - hearts: "♥", - heartsuit: "♥", - hellip: "…", - hercon: "⊹", - Hfr: "ℌ", - hfr: "𝔥", - HilbertSpace: "ℋ", - hksearow: "⤥", - hkswarow: "⤦", - hoarr: "⇿", - homtht: "∻", - hookleftarrow: "↩", - hookrightarrow: "↪", - Hopf: "ℍ", - hopf: "𝕙", - horbar: "―", - HorizontalLine: "─", - Hscr: "ℋ", - hscr: "𝒽", - hslash: "ℏ", - Hstrok: "Ħ", - hstrok: "ħ", - HumpDownHump: "≎", - HumpEqual: "≏", - hybull: "⁃", - hyphen: "‐", - Iacute: "Í", - iacute: "í", - ic: "⁣", - Icirc: "Î", - icirc: "î", - Icy: "И", - icy: "и", - Idot: "İ", - IEcy: "Е", - iecy: "е", - iexcl: "¡", - iff: "⇔", - Ifr: "ℑ", - ifr: "𝔦", - Igrave: "Ì", - igrave: "ì", - ii: "ⅈ", - iiiint: "⨌", - iiint: "∭", - iinfin: "⧜", - iiota: "℩", - IJlig: "IJ", - ijlig: "ij", - Im: "ℑ", - Imacr: "Ī", - imacr: "ī", - image: "ℑ", - ImaginaryI: "ⅈ", - imagline: "ℐ", - imagpart: "ℑ", - imath: "ı", - imof: "⊷", - imped: "Ƶ", - Implies: "⇒", - in: "∈", - incare: "℅", - infin: "∞", - infintie: "⧝", - inodot: "ı", - Int: "∬", - int: "∫", - intcal: "⊺", - integers: "ℤ", - Integral: "∫", - intercal: "⊺", - Intersection: "⋂", - intlarhk: "⨗", - intprod: "⨼", - InvisibleComma: "⁣", - InvisibleTimes: "⁢", - IOcy: "Ё", - iocy: "ё", - Iogon: "Į", - iogon: "į", - Iopf: "𝕀", - iopf: "𝕚", - Iota: "Ι", - iota: "ι", - iprod: "⨼", - iquest: "¿", - Iscr: "ℐ", - iscr: "𝒾", - isin: "∈", - isindot: "⋵", - isinE: "⋹", - isins: "⋴", - isinsv: "⋳", - isinv: "∈", - it: "⁢", - Itilde: "Ĩ", - itilde: "ĩ", - Iukcy: "І", - iukcy: "і", - Iuml: "Ï", - iuml: "ï", - Jcirc: "Ĵ", - jcirc: "ĵ", - Jcy: "Й", - jcy: "й", - Jfr: "𝔍", - jfr: "𝔧", - jmath: "ȷ", - Jopf: "𝕁", - jopf: "𝕛", - Jscr: "𝒥", - jscr: "𝒿", - Jsercy: "Ј", - jsercy: "ј", - Jukcy: "Є", - jukcy: "є", - Kappa: "Κ", - kappa: "κ", - kappav: "ϰ", - Kcedil: "Ķ", - kcedil: "ķ", - Kcy: "К", - kcy: "к", - Kfr: "𝔎", - kfr: "𝔨", - kgreen: "ĸ", - KHcy: "Х", - khcy: "х", - KJcy: "Ќ", - kjcy: "ќ", - Kopf: "𝕂", - kopf: "𝕜", - Kscr: "𝒦", - kscr: "𝓀", - lAarr: "⇚", - Lacute: "Ĺ", - lacute: "ĺ", - laemptyv: "⦴", - lagran: "ℒ", - Lambda: "Λ", - lambda: "λ", - Lang: "⟪", - lang: "⟨", - langd: "⦑", - langle: "⟨", - lap: "⪅", - Laplacetrf: "ℒ", - laquo: "«", - Larr: "↞", - lArr: "⇐", - larr: "←", - larrb: "⇤", - larrbfs: "⤟", - larrfs: "⤝", - larrhk: "↩", - larrlp: "↫", - larrpl: "⤹", - larrsim: "⥳", - larrtl: "↢", - lat: "⪫", - lAtail: "⤛", - latail: "⤙", - late: "⪭", - lates: "⪭︀", - lBarr: "⤎", - lbarr: "⤌", - lbbrk: "❲", - lbrace: "{", - lbrack: "[", - lbrke: "⦋", - lbrksld: "⦏", - lbrkslu: "⦍", - Lcaron: "Ľ", - lcaron: "ľ", - Lcedil: "Ļ", - lcedil: "ļ", - lceil: "⌈", - lcub: "{", - Lcy: "Л", - lcy: "л", - ldca: "⤶", - ldquo: "“", - ldquor: "„", - ldrdhar: "⥧", - ldrushar: "⥋", - ldsh: "↲", - lE: "≦", - le: "≤", - LeftAngleBracket: "⟨", - LeftArrow: "←", - Leftarrow: "⇐", - leftarrow: "←", - LeftArrowBar: "⇤", - LeftArrowRightArrow: "⇆", - leftarrowtail: "↢", - LeftCeiling: "⌈", - LeftDoubleBracket: "⟦", - LeftDownTeeVector: "⥡", - LeftDownVector: "⇃", - LeftDownVectorBar: "⥙", - LeftFloor: "⌊", - leftharpoondown: "↽", - leftharpoonup: "↼", - leftleftarrows: "⇇", - LeftRightArrow: "↔", - Leftrightarrow: "⇔", - leftrightarrow: "↔", - leftrightarrows: "⇆", - leftrightharpoons: "⇋", - leftrightsquigarrow: "↭", - LeftRightVector: "⥎", - LeftTee: "⊣", - LeftTeeArrow: "↤", - LeftTeeVector: "⥚", - leftthreetimes: "⋋", - LeftTriangle: "⊲", - LeftTriangleBar: "⧏", - LeftTriangleEqual: "⊴", - LeftUpDownVector: "⥑", - LeftUpTeeVector: "⥠", - LeftUpVector: "↿", - LeftUpVectorBar: "⥘", - LeftVector: "↼", - LeftVectorBar: "⥒", - lEg: "⪋", - leg: "⋚", - leq: "≤", - leqq: "≦", - leqslant: "⩽", - les: "⩽", - lescc: "⪨", - lesdot: "⩿", - lesdoto: "⪁", - lesdotor: "⪃", - lesg: "⋚︀", - lesges: "⪓", - lessapprox: "⪅", - lessdot: "⋖", - lesseqgtr: "⋚", - lesseqqgtr: "⪋", - LessEqualGreater: "⋚", - LessFullEqual: "≦", - LessGreater: "≶", - lessgtr: "≶", - LessLess: "⪡", - lesssim: "≲", - LessSlantEqual: "⩽", - LessTilde: "≲", - lfisht: "⥼", - lfloor: "⌊", - Lfr: "𝔏", - lfr: "𝔩", - lg: "≶", - lgE: "⪑", - lHar: "⥢", - lhard: "↽", - lharu: "↼", - lharul: "⥪", - lhblk: "▄", - LJcy: "Љ", - ljcy: "љ", - Ll: "⋘", - ll: "≪", - llarr: "⇇", - llcorner: "⌞", - Lleftarrow: "⇚", - llhard: "⥫", - lltri: "◺", - Lmidot: "Ŀ", - lmidot: "ŀ", - lmoust: "⎰", - lmoustache: "⎰", - lnap: "⪉", - lnapprox: "⪉", - lnE: "≨", - lne: "⪇", - lneq: "⪇", - lneqq: "≨", - lnsim: "⋦", - loang: "⟬", - loarr: "⇽", - lobrk: "⟦", - LongLeftArrow: "⟵", - Longleftarrow: "⟸", - longleftarrow: "⟵", - LongLeftRightArrow: "⟷", - Longleftrightarrow: "⟺", - longleftrightarrow: "⟷", - longmapsto: "⟼", - LongRightArrow: "⟶", - Longrightarrow: "⟹", - longrightarrow: "⟶", - looparrowleft: "↫", - looparrowright: "↬", - lopar: "⦅", - Lopf: "𝕃", - lopf: "𝕝", - loplus: "⨭", - lotimes: "⨴", - lowast: "∗", - lowbar: "_", - LowerLeftArrow: "↙", - LowerRightArrow: "↘", - loz: "◊", - lozenge: "◊", - lozf: "⧫", - lpar: "(", - lparlt: "⦓", - lrarr: "⇆", - lrcorner: "⌟", - lrhar: "⇋", - lrhard: "⥭", - lrm: "‎", - lrtri: "⊿", - lsaquo: "‹", - Lscr: "ℒ", - lscr: "𝓁", - Lsh: "↰", - lsh: "↰", - lsim: "≲", - lsime: "⪍", - lsimg: "⪏", - lsqb: "[", - lsquo: "‘", - lsquor: "‚", - Lstrok: "Ł", - lstrok: "ł", - Lt: "≪", - LT: "<", - lt: "<", - ltcc: "⪦", - ltcir: "⩹", - ltdot: "⋖", - lthree: "⋋", - ltimes: "⋉", - ltlarr: "⥶", - ltquest: "⩻", - ltri: "◃", - ltrie: "⊴", - ltrif: "◂", - ltrPar: "⦖", - lurdshar: "⥊", - luruhar: "⥦", - lvertneqq: "≨︀", - lvnE: "≨︀", - macr: "¯", - male: "♂", - malt: "✠", - maltese: "✠", - Map: "⤅", - map: "↦", - mapsto: "↦", - mapstodown: "↧", - mapstoleft: "↤", - mapstoup: "↥", - marker: "▮", - mcomma: "⨩", - Mcy: "М", - mcy: "м", - mdash: "—", - mDDot: "∺", - measuredangle: "∡", - MediumSpace: " ", - Mellintrf: "ℳ", - Mfr: "𝔐", - mfr: "𝔪", - mho: "℧", - micro: "µ", - mid: "∣", - midast: "*", - midcir: "⫰", - middot: "·", - minus: "−", - minusb: "⊟", - minusd: "∸", - minusdu: "⨪", - MinusPlus: "∓", - mlcp: "⫛", - mldr: "…", - mnplus: "∓", - models: "⊧", - Mopf: "𝕄", - mopf: "𝕞", - mp: "∓", - Mscr: "ℳ", - mscr: "𝓂", - mstpos: "∾", - Mu: "Μ", - mu: "μ", - multimap: "⊸", - mumap: "⊸", - nabla: "∇", - Nacute: "Ń", - nacute: "ń", - nang: "∠⃒", - nap: "≉", - napE: "⩰̸", - napid: "≋̸", - napos: "ʼn", - napprox: "≉", - natur: "♮", - natural: "♮", - naturals: "ℕ", - nbsp: " ", - nbump: "≎̸", - nbumpe: "≏̸", - ncap: "⩃", - Ncaron: "Ň", - ncaron: "ň", - Ncedil: "Ņ", - ncedil: "ņ", - ncong: "≇", - ncongdot: "⩭̸", - ncup: "⩂", - Ncy: "Н", - ncy: "н", - ndash: "–", - ne: "≠", - nearhk: "⤤", - neArr: "⇗", - nearr: "↗", - nearrow: "↗", - nedot: "≐̸", - NegativeMediumSpace: "​", - NegativeThickSpace: "​", - NegativeThinSpace: "​", - NegativeVeryThinSpace: "​", - nequiv: "≢", - nesear: "⤨", - nesim: "≂̸", - NestedGreaterGreater: "≫", - NestedLessLess: "≪", - NewLine: ` -`, - nexist: "∄", - nexists: "∄", - Nfr: "𝔑", - nfr: "𝔫", - ngE: "≧̸", - nge: "≱", - ngeq: "≱", - ngeqq: "≧̸", - ngeqslant: "⩾̸", - nges: "⩾̸", - nGg: "⋙̸", - ngsim: "≵", - nGt: "≫⃒", - ngt: "≯", - ngtr: "≯", - nGtv: "≫̸", - nhArr: "⇎", - nharr: "↮", - nhpar: "⫲", - ni: "∋", - nis: "⋼", - nisd: "⋺", - niv: "∋", - NJcy: "Њ", - njcy: "њ", - nlArr: "⇍", - nlarr: "↚", - nldr: "‥", - nlE: "≦̸", - nle: "≰", - nLeftarrow: "⇍", - nleftarrow: "↚", - nLeftrightarrow: "⇎", - nleftrightarrow: "↮", - nleq: "≰", - nleqq: "≦̸", - nleqslant: "⩽̸", - nles: "⩽̸", - nless: "≮", - nLl: "⋘̸", - nlsim: "≴", - nLt: "≪⃒", - nlt: "≮", - nltri: "⋪", - nltrie: "⋬", - nLtv: "≪̸", - nmid: "∤", - NoBreak: "⁠", - NonBreakingSpace: " ", - Nopf: "ℕ", - nopf: "𝕟", - Not: "⫬", - not: "¬", - NotCongruent: "≢", - NotCupCap: "≭", - NotDoubleVerticalBar: "∦", - NotElement: "∉", - NotEqual: "≠", - NotEqualTilde: "≂̸", - NotExists: "∄", - NotGreater: "≯", - NotGreaterEqual: "≱", - NotGreaterFullEqual: "≧̸", - NotGreaterGreater: "≫̸", - NotGreaterLess: "≹", - NotGreaterSlantEqual: "⩾̸", - NotGreaterTilde: "≵", - NotHumpDownHump: "≎̸", - NotHumpEqual: "≏̸", - notin: "∉", - notindot: "⋵̸", - notinE: "⋹̸", - notinva: "∉", - notinvb: "⋷", - notinvc: "⋶", - NotLeftTriangle: "⋪", - NotLeftTriangleBar: "⧏̸", - NotLeftTriangleEqual: "⋬", - NotLess: "≮", - NotLessEqual: "≰", - NotLessGreater: "≸", - NotLessLess: "≪̸", - NotLessSlantEqual: "⩽̸", - NotLessTilde: "≴", - NotNestedGreaterGreater: "⪢̸", - NotNestedLessLess: "⪡̸", - notni: "∌", - notniva: "∌", - notnivb: "⋾", - notnivc: "⋽", - NotPrecedes: "⊀", - NotPrecedesEqual: "⪯̸", - NotPrecedesSlantEqual: "⋠", - NotReverseElement: "∌", - NotRightTriangle: "⋫", - NotRightTriangleBar: "⧐̸", - NotRightTriangleEqual: "⋭", - NotSquareSubset: "⊏̸", - NotSquareSubsetEqual: "⋢", - NotSquareSuperset: "⊐̸", - NotSquareSupersetEqual: "⋣", - NotSubset: "⊂⃒", - NotSubsetEqual: "⊈", - NotSucceeds: "⊁", - NotSucceedsEqual: "⪰̸", - NotSucceedsSlantEqual: "⋡", - NotSucceedsTilde: "≿̸", - NotSuperset: "⊃⃒", - NotSupersetEqual: "⊉", - NotTilde: "≁", - NotTildeEqual: "≄", - NotTildeFullEqual: "≇", - NotTildeTilde: "≉", - NotVerticalBar: "∤", - npar: "∦", - nparallel: "∦", - nparsl: "⫽⃥", - npart: "∂̸", - npolint: "⨔", - npr: "⊀", - nprcue: "⋠", - npre: "⪯̸", - nprec: "⊀", - npreceq: "⪯̸", - nrArr: "⇏", - nrarr: "↛", - nrarrc: "⤳̸", - nrarrw: "↝̸", - nRightarrow: "⇏", - nrightarrow: "↛", - nrtri: "⋫", - nrtrie: "⋭", - nsc: "⊁", - nsccue: "⋡", - nsce: "⪰̸", - Nscr: "𝒩", - nscr: "𝓃", - nshortmid: "∤", - nshortparallel: "∦", - nsim: "≁", - nsime: "≄", - nsimeq: "≄", - nsmid: "∤", - nspar: "∦", - nsqsube: "⋢", - nsqsupe: "⋣", - nsub: "⊄", - nsubE: "⫅̸", - nsube: "⊈", - nsubset: "⊂⃒", - nsubseteq: "⊈", - nsubseteqq: "⫅̸", - nsucc: "⊁", - nsucceq: "⪰̸", - nsup: "⊅", - nsupE: "⫆̸", - nsupe: "⊉", - nsupset: "⊃⃒", - nsupseteq: "⊉", - nsupseteqq: "⫆̸", - ntgl: "≹", - Ntilde: "Ñ", - ntilde: "ñ", - ntlg: "≸", - ntriangleleft: "⋪", - ntrianglelefteq: "⋬", - ntriangleright: "⋫", - ntrianglerighteq: "⋭", - Nu: "Ν", - nu: "ν", - num: "#", - numero: "№", - numsp: " ", - nvap: "≍⃒", - nVDash: "⊯", - nVdash: "⊮", - nvDash: "⊭", - nvdash: "⊬", - nvge: "≥⃒", - nvgt: ">⃒", - nvHarr: "⤄", - nvinfin: "⧞", - nvlArr: "⤂", - nvle: "≤⃒", - nvlt: "<⃒", - nvltrie: "⊴⃒", - nvrArr: "⤃", - nvrtrie: "⊵⃒", - nvsim: "∼⃒", - nwarhk: "⤣", - nwArr: "⇖", - nwarr: "↖", - nwarrow: "↖", - nwnear: "⤧", - Oacute: "Ó", - oacute: "ó", - oast: "⊛", - ocir: "⊚", - Ocirc: "Ô", - ocirc: "ô", - Ocy: "О", - ocy: "о", - odash: "⊝", - Odblac: "Ő", - odblac: "ő", - odiv: "⨸", - odot: "⊙", - odsold: "⦼", - OElig: "Œ", - oelig: "œ", - ofcir: "⦿", - Ofr: "𝔒", - ofr: "𝔬", - ogon: "˛", - Ograve: "Ò", - ograve: "ò", - ogt: "⧁", - ohbar: "⦵", - ohm: "Ω", - oint: "∮", - olarr: "↺", - olcir: "⦾", - olcross: "⦻", - oline: "‾", - olt: "⧀", - Omacr: "Ō", - omacr: "ō", - Omega: "Ω", - omega: "ω", - Omicron: "Ο", - omicron: "ο", - omid: "⦶", - ominus: "⊖", - Oopf: "𝕆", - oopf: "𝕠", - opar: "⦷", - OpenCurlyDoubleQuote: "“", - OpenCurlyQuote: "‘", - operp: "⦹", - oplus: "⊕", - Or: "⩔", - or: "∨", - orarr: "↻", - ord: "⩝", - order: "ℴ", - orderof: "ℴ", - ordf: "ª", - ordm: "º", - origof: "⊶", - oror: "⩖", - orslope: "⩗", - orv: "⩛", - oS: "Ⓢ", - Oscr: "𝒪", - oscr: "ℴ", - Oslash: "Ø", - oslash: "ø", - osol: "⊘", - Otilde: "Õ", - otilde: "õ", - Otimes: "⨷", - otimes: "⊗", - otimesas: "⨶", - Ouml: "Ö", - ouml: "ö", - ovbar: "⌽", - OverBar: "‾", - OverBrace: "⏞", - OverBracket: "⎴", - OverParenthesis: "⏜", - par: "∥", - para: "¶", - parallel: "∥", - parsim: "⫳", - parsl: "⫽", - part: "∂", - PartialD: "∂", - Pcy: "П", - pcy: "п", - percnt: "%", - period: ".", - permil: "‰", - perp: "⊥", - pertenk: "‱", - Pfr: "𝔓", - pfr: "𝔭", - Phi: "Φ", - phi: "φ", - phiv: "ϕ", - phmmat: "ℳ", - phone: "☎", - Pi: "Π", - pi: "π", - pitchfork: "⋔", - piv: "ϖ", - planck: "ℏ", - planckh: "ℎ", - plankv: "ℏ", - plus: "+", - plusacir: "⨣", - plusb: "⊞", - pluscir: "⨢", - plusdo: "∔", - plusdu: "⨥", - pluse: "⩲", - PlusMinus: "±", - plusmn: "±", - plussim: "⨦", - plustwo: "⨧", - pm: "±", - Poincareplane: "ℌ", - pointint: "⨕", - Popf: "ℙ", - popf: "𝕡", - pound: "£", - Pr: "⪻", - pr: "≺", - prap: "⪷", - prcue: "≼", - prE: "⪳", - pre: "⪯", - prec: "≺", - precapprox: "⪷", - preccurlyeq: "≼", - Precedes: "≺", - PrecedesEqual: "⪯", - PrecedesSlantEqual: "≼", - PrecedesTilde: "≾", - preceq: "⪯", - precnapprox: "⪹", - precneqq: "⪵", - precnsim: "⋨", - precsim: "≾", - Prime: "″", - prime: "′", - primes: "ℙ", - prnap: "⪹", - prnE: "⪵", - prnsim: "⋨", - prod: "∏", - Product: "∏", - profalar: "⌮", - profline: "⌒", - profsurf: "⌓", - prop: "∝", - Proportion: "∷", - Proportional: "∝", - propto: "∝", - prsim: "≾", - prurel: "⊰", - Pscr: "𝒫", - pscr: "𝓅", - Psi: "Ψ", - psi: "ψ", - puncsp: " ", - Qfr: "𝔔", - qfr: "𝔮", - qint: "⨌", - Qopf: "ℚ", - qopf: "𝕢", - qprime: "⁗", - Qscr: "𝒬", - qscr: "𝓆", - quaternions: "ℍ", - quatint: "⨖", - quest: "?", - questeq: "≟", - QUOT: '"', - quot: '"', - rAarr: "⇛", - race: "∽̱", - Racute: "Ŕ", - racute: "ŕ", - radic: "√", - raemptyv: "⦳", - Rang: "⟫", - rang: "⟩", - rangd: "⦒", - range: "⦥", - rangle: "⟩", - raquo: "»", - Rarr: "↠", - rArr: "⇒", - rarr: "→", - rarrap: "⥵", - rarrb: "⇥", - rarrbfs: "⤠", - rarrc: "⤳", - rarrfs: "⤞", - rarrhk: "↪", - rarrlp: "↬", - rarrpl: "⥅", - rarrsim: "⥴", - Rarrtl: "⤖", - rarrtl: "↣", - rarrw: "↝", - rAtail: "⤜", - ratail: "⤚", - ratio: "∶", - rationals: "ℚ", - RBarr: "⤐", - rBarr: "⤏", - rbarr: "⤍", - rbbrk: "❳", - rbrace: "}", - rbrack: "]", - rbrke: "⦌", - rbrksld: "⦎", - rbrkslu: "⦐", - Rcaron: "Ř", - rcaron: "ř", - Rcedil: "Ŗ", - rcedil: "ŗ", - rceil: "⌉", - rcub: "}", - Rcy: "Р", - rcy: "р", - rdca: "⤷", - rdldhar: "⥩", - rdquo: "”", - rdquor: "”", - rdsh: "↳", - Re: "ℜ", - real: "ℜ", - realine: "ℛ", - realpart: "ℜ", - reals: "ℝ", - rect: "▭", - REG: "®", - reg: "®", - ReverseElement: "∋", - ReverseEquilibrium: "⇋", - ReverseUpEquilibrium: "⥯", - rfisht: "⥽", - rfloor: "⌋", - Rfr: "ℜ", - rfr: "𝔯", - rHar: "⥤", - rhard: "⇁", - rharu: "⇀", - rharul: "⥬", - Rho: "Ρ", - rho: "ρ", - rhov: "ϱ", - RightAngleBracket: "⟩", - RightArrow: "→", - Rightarrow: "⇒", - rightarrow: "→", - RightArrowBar: "⇥", - RightArrowLeftArrow: "⇄", - rightarrowtail: "↣", - RightCeiling: "⌉", - RightDoubleBracket: "⟧", - RightDownTeeVector: "⥝", - RightDownVector: "⇂", - RightDownVectorBar: "⥕", - RightFloor: "⌋", - rightharpoondown: "⇁", - rightharpoonup: "⇀", - rightleftarrows: "⇄", - rightleftharpoons: "⇌", - rightrightarrows: "⇉", - rightsquigarrow: "↝", - RightTee: "⊢", - RightTeeArrow: "↦", - RightTeeVector: "⥛", - rightthreetimes: "⋌", - RightTriangle: "⊳", - RightTriangleBar: "⧐", - RightTriangleEqual: "⊵", - RightUpDownVector: "⥏", - RightUpTeeVector: "⥜", - RightUpVector: "↾", - RightUpVectorBar: "⥔", - RightVector: "⇀", - RightVectorBar: "⥓", - ring: "˚", - risingdotseq: "≓", - rlarr: "⇄", - rlhar: "⇌", - rlm: "‏", - rmoust: "⎱", - rmoustache: "⎱", - rnmid: "⫮", - roang: "⟭", - roarr: "⇾", - robrk: "⟧", - ropar: "⦆", - Ropf: "ℝ", - ropf: "𝕣", - roplus: "⨮", - rotimes: "⨵", - RoundImplies: "⥰", - rpar: ")", - rpargt: "⦔", - rppolint: "⨒", - rrarr: "⇉", - Rrightarrow: "⇛", - rsaquo: "›", - Rscr: "ℛ", - rscr: "𝓇", - Rsh: "↱", - rsh: "↱", - rsqb: "]", - rsquo: "’", - rsquor: "’", - rthree: "⋌", - rtimes: "⋊", - rtri: "▹", - rtrie: "⊵", - rtrif: "▸", - rtriltri: "⧎", - RuleDelayed: "⧴", - ruluhar: "⥨", - rx: "℞", - Sacute: "Ś", - sacute: "ś", - sbquo: "‚", - Sc: "⪼", - sc: "≻", - scap: "⪸", - Scaron: "Š", - scaron: "š", - sccue: "≽", - scE: "⪴", - sce: "⪰", - Scedil: "Ş", - scedil: "ş", - Scirc: "Ŝ", - scirc: "ŝ", - scnap: "⪺", - scnE: "⪶", - scnsim: "⋩", - scpolint: "⨓", - scsim: "≿", - Scy: "С", - scy: "с", - sdot: "⋅", - sdotb: "⊡", - sdote: "⩦", - searhk: "⤥", - seArr: "⇘", - searr: "↘", - searrow: "↘", - sect: "§", - semi: ";", - seswar: "⤩", - setminus: "∖", - setmn: "∖", - sext: "✶", - Sfr: "𝔖", - sfr: "𝔰", - sfrown: "⌢", - sharp: "♯", - SHCHcy: "Щ", - shchcy: "щ", - SHcy: "Ш", - shcy: "ш", - ShortDownArrow: "↓", - ShortLeftArrow: "←", - shortmid: "∣", - shortparallel: "∥", - ShortRightArrow: "→", - ShortUpArrow: "↑", - shy: "­", - Sigma: "Σ", - sigma: "σ", - sigmaf: "ς", - sigmav: "ς", - sim: "∼", - simdot: "⩪", - sime: "≃", - simeq: "≃", - simg: "⪞", - simgE: "⪠", - siml: "⪝", - simlE: "⪟", - simne: "≆", - simplus: "⨤", - simrarr: "⥲", - slarr: "←", - SmallCircle: "∘", - smallsetminus: "∖", - smashp: "⨳", - smeparsl: "⧤", - smid: "∣", - smile: "⌣", - smt: "⪪", - smte: "⪬", - smtes: "⪬︀", - SOFTcy: "Ь", - softcy: "ь", - sol: "/", - solb: "⧄", - solbar: "⌿", - Sopf: "𝕊", - sopf: "𝕤", - spades: "♠", - spadesuit: "♠", - spar: "∥", - sqcap: "⊓", - sqcaps: "⊓︀", - sqcup: "⊔", - sqcups: "⊔︀", - Sqrt: "√", - sqsub: "⊏", - sqsube: "⊑", - sqsubset: "⊏", - sqsubseteq: "⊑", - sqsup: "⊐", - sqsupe: "⊒", - sqsupset: "⊐", - sqsupseteq: "⊒", - squ: "□", - Square: "□", - square: "□", - SquareIntersection: "⊓", - SquareSubset: "⊏", - SquareSubsetEqual: "⊑", - SquareSuperset: "⊐", - SquareSupersetEqual: "⊒", - SquareUnion: "⊔", - squarf: "▪", - squf: "▪", - srarr: "→", - Sscr: "𝒮", - sscr: "𝓈", - ssetmn: "∖", - ssmile: "⌣", - sstarf: "⋆", - Star: "⋆", - star: "☆", - starf: "★", - straightepsilon: "ϵ", - straightphi: "ϕ", - strns: "¯", - Sub: "⋐", - sub: "⊂", - subdot: "⪽", - subE: "⫅", - sube: "⊆", - subedot: "⫃", - submult: "⫁", - subnE: "⫋", - subne: "⊊", - subplus: "⪿", - subrarr: "⥹", - Subset: "⋐", - subset: "⊂", - subseteq: "⊆", - subseteqq: "⫅", - SubsetEqual: "⊆", - subsetneq: "⊊", - subsetneqq: "⫋", - subsim: "⫇", - subsub: "⫕", - subsup: "⫓", - succ: "≻", - succapprox: "⪸", - succcurlyeq: "≽", - Succeeds: "≻", - SucceedsEqual: "⪰", - SucceedsSlantEqual: "≽", - SucceedsTilde: "≿", - succeq: "⪰", - succnapprox: "⪺", - succneqq: "⪶", - succnsim: "⋩", - succsim: "≿", - SuchThat: "∋", - Sum: "∑", - sum: "∑", - sung: "♪", - Sup: "⋑", - sup: "⊃", - sup1: "¹", - sup2: "²", - sup3: "³", - supdot: "⪾", - supdsub: "⫘", - supE: "⫆", - supe: "⊇", - supedot: "⫄", - Superset: "⊃", - SupersetEqual: "⊇", - suphsol: "⟉", - suphsub: "⫗", - suplarr: "⥻", - supmult: "⫂", - supnE: "⫌", - supne: "⊋", - supplus: "⫀", - Supset: "⋑", - supset: "⊃", - supseteq: "⊇", - supseteqq: "⫆", - supsetneq: "⊋", - supsetneqq: "⫌", - supsim: "⫈", - supsub: "⫔", - supsup: "⫖", - swarhk: "⤦", - swArr: "⇙", - swarr: "↙", - swarrow: "↙", - swnwar: "⤪", - szlig: "ß", - Tab: " ", - target: "⌖", - Tau: "Τ", - tau: "τ", - tbrk: "⎴", - Tcaron: "Ť", - tcaron: "ť", - Tcedil: "Ţ", - tcedil: "ţ", - Tcy: "Т", - tcy: "т", - tdot: "⃛", - telrec: "⌕", - Tfr: "𝔗", - tfr: "𝔱", - there4: "∴", - Therefore: "∴", - therefore: "∴", - Theta: "Θ", - theta: "θ", - thetasym: "ϑ", - thetav: "ϑ", - thickapprox: "≈", - thicksim: "∼", - ThickSpace: "  ", - thinsp: " ", - ThinSpace: " ", - thkap: "≈", - thksim: "∼", - THORN: "Þ", - thorn: "þ", - Tilde: "∼", - tilde: "˜", - TildeEqual: "≃", - TildeFullEqual: "≅", - TildeTilde: "≈", - times: "×", - timesb: "⊠", - timesbar: "⨱", - timesd: "⨰", - tint: "∭", - toea: "⤨", - top: "⊤", - topbot: "⌶", - topcir: "⫱", - Topf: "𝕋", - topf: "𝕥", - topfork: "⫚", - tosa: "⤩", - tprime: "‴", - TRADE: "™", - trade: "™", - triangle: "▵", - triangledown: "▿", - triangleleft: "◃", - trianglelefteq: "⊴", - triangleq: "≜", - triangleright: "▹", - trianglerighteq: "⊵", - tridot: "◬", - trie: "≜", - triminus: "⨺", - TripleDot: "⃛", - triplus: "⨹", - trisb: "⧍", - tritime: "⨻", - trpezium: "⏢", - Tscr: "𝒯", - tscr: "𝓉", - TScy: "Ц", - tscy: "ц", - TSHcy: "Ћ", - tshcy: "ћ", - Tstrok: "Ŧ", - tstrok: "ŧ", - twixt: "≬", - twoheadleftarrow: "↞", - twoheadrightarrow: "↠", - Uacute: "Ú", - uacute: "ú", - Uarr: "↟", - uArr: "⇑", - uarr: "↑", - Uarrocir: "⥉", - Ubrcy: "Ў", - ubrcy: "ў", - Ubreve: "Ŭ", - ubreve: "ŭ", - Ucirc: "Û", - ucirc: "û", - Ucy: "У", - ucy: "у", - udarr: "⇅", - Udblac: "Ű", - udblac: "ű", - udhar: "⥮", - ufisht: "⥾", - Ufr: "𝔘", - ufr: "𝔲", - Ugrave: "Ù", - ugrave: "ù", - uHar: "⥣", - uharl: "↿", - uharr: "↾", - uhblk: "▀", - ulcorn: "⌜", - ulcorner: "⌜", - ulcrop: "⌏", - ultri: "◸", - Umacr: "Ū", - umacr: "ū", - uml: "¨", - UnderBar: "_", - UnderBrace: "⏟", - UnderBracket: "⎵", - UnderParenthesis: "⏝", - Union: "⋃", - UnionPlus: "⊎", - Uogon: "Ų", - uogon: "ų", - Uopf: "𝕌", - uopf: "𝕦", - UpArrow: "↑", - Uparrow: "⇑", - uparrow: "↑", - UpArrowBar: "⤒", - UpArrowDownArrow: "⇅", - UpDownArrow: "↕", - Updownarrow: "⇕", - updownarrow: "↕", - UpEquilibrium: "⥮", - upharpoonleft: "↿", - upharpoonright: "↾", - uplus: "⊎", - UpperLeftArrow: "↖", - UpperRightArrow: "↗", - Upsi: "ϒ", - upsi: "υ", - upsih: "ϒ", - Upsilon: "Υ", - upsilon: "υ", - UpTee: "⊥", - UpTeeArrow: "↥", - upuparrows: "⇈", - urcorn: "⌝", - urcorner: "⌝", - urcrop: "⌎", - Uring: "Ů", - uring: "ů", - urtri: "◹", - Uscr: "𝒰", - uscr: "𝓊", - utdot: "⋰", - Utilde: "Ũ", - utilde: "ũ", - utri: "▵", - utrif: "▴", - uuarr: "⇈", - Uuml: "Ü", - uuml: "ü", - uwangle: "⦧", - vangrt: "⦜", - varepsilon: "ϵ", - varkappa: "ϰ", - varnothing: "∅", - varphi: "ϕ", - varpi: "ϖ", - varpropto: "∝", - vArr: "⇕", - varr: "↕", - varrho: "ϱ", - varsigma: "ς", - varsubsetneq: "⊊︀", - varsubsetneqq: "⫋︀", - varsupsetneq: "⊋︀", - varsupsetneqq: "⫌︀", - vartheta: "ϑ", - vartriangleleft: "⊲", - vartriangleright: "⊳", - Vbar: "⫫", - vBar: "⫨", - vBarv: "⫩", - Vcy: "В", - vcy: "в", - VDash: "⊫", - Vdash: "⊩", - vDash: "⊨", - vdash: "⊢", - Vdashl: "⫦", - Vee: "⋁", - vee: "∨", - veebar: "⊻", - veeeq: "≚", - vellip: "⋮", - Verbar: "‖", - verbar: "|", - Vert: "‖", - vert: "|", - VerticalBar: "∣", - VerticalLine: "|", - VerticalSeparator: "❘", - VerticalTilde: "≀", - VeryThinSpace: " ", - Vfr: "𝔙", - vfr: "𝔳", - vltri: "⊲", - vnsub: "⊂⃒", - vnsup: "⊃⃒", - Vopf: "𝕍", - vopf: "𝕧", - vprop: "∝", - vrtri: "⊳", - Vscr: "𝒱", - vscr: "𝓋", - vsubnE: "⫋︀", - vsubne: "⊊︀", - vsupnE: "⫌︀", - vsupne: "⊋︀", - Vvdash: "⊪", - vzigzag: "⦚", - Wcirc: "Ŵ", - wcirc: "ŵ", - wedbar: "⩟", - Wedge: "⋀", - wedge: "∧", - wedgeq: "≙", - weierp: "℘", - Wfr: "𝔚", - wfr: "𝔴", - Wopf: "𝕎", - wopf: "𝕨", - wp: "℘", - wr: "≀", - wreath: "≀", - Wscr: "𝒲", - wscr: "𝓌", - xcap: "⋂", - xcirc: "◯", - xcup: "⋃", - xdtri: "▽", - Xfr: "𝔛", - xfr: "𝔵", - xhArr: "⟺", - xharr: "⟷", - Xi: "Ξ", - xi: "ξ", - xlArr: "⟸", - xlarr: "⟵", - xmap: "⟼", - xnis: "⋻", - xodot: "⨀", - Xopf: "𝕏", - xopf: "𝕩", - xoplus: "⨁", - xotime: "⨂", - xrArr: "⟹", - xrarr: "⟶", - Xscr: "𝒳", - xscr: "𝓍", - xsqcup: "⨆", - xuplus: "⨄", - xutri: "△", - xvee: "⋁", - xwedge: "⋀", - Yacute: "Ý", - yacute: "ý", - YAcy: "Я", - yacy: "я", - Ycirc: "Ŷ", - ycirc: "ŷ", - Ycy: "Ы", - ycy: "ы", - yen: "¥", - Yfr: "𝔜", - yfr: "𝔶", - YIcy: "Ї", - yicy: "ї", - Yopf: "𝕐", - yopf: "𝕪", - Yscr: "𝒴", - yscr: "𝓎", - YUcy: "Ю", - yucy: "ю", - Yuml: "Ÿ", - yuml: "ÿ", - Zacute: "Ź", - zacute: "ź", - Zcaron: "Ž", - zcaron: "ž", - Zcy: "З", - zcy: "з", - Zdot: "Ż", - zdot: "ż", - zeetrf: "ℨ", - ZeroWidthSpace: "​", - Zeta: "Ζ", - zeta: "ζ", - Zfr: "ℨ", - zfr: "𝔷", - ZHcy: "Ж", - zhcy: "ж", - zigrarr: "⇝", - Zopf: "ℤ", - zopf: "𝕫", - Zscr: "𝒵", - zscr: "𝓏", - zwj: "‍", - zwnj: "‌" - }), t.entityMap = t.HTML_ENTITIES; -})(wt); -var Ur = {}, fr = Me.NAMESPACE, Br = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/, Jr = new RegExp("[\\-\\.0-9" + Br.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"), Zr = new RegExp("^" + Br.source + Jr.source + "*(?::" + Br.source + Jr.source + "*)?$"), sr = 0, ke = 1, Je = 2, ar = 3, Ze = 4, Ke = 5, lr = 6, gr = 7; -function nr(t, u) { - this.message = t, this.locator = u, Error.captureStackTrace && Error.captureStackTrace(this, nr); -} -nr.prototype = new Error(); -nr.prototype.name = nr.name; -function Bt() { -} -Bt.prototype = { - parse: function(t, u, n) { - var s = this.domBuilder; - s.startDocument(), St(u, u = {}), pu( - t, - u, - n, - s, - this.errorHandler - ), s.endDocument(); - } -}; -function pu(t, u, n, s, c) { - function f(M) { - if (M > 65535) { - M -= 65536; - var j = 55296 + (M >> 10), ce = 56320 + (M & 1023); - return String.fromCharCode(j, ce); - } else - return String.fromCharCode(M); - } - function A(M) { - var j = M.slice(1, -1); - return Object.hasOwnProperty.call(n, j) ? n[j] : j.charAt(0) === "#" ? f(parseInt(j.substr(1).replace("x", "0x"))) : (c.error("entity not found:" + M), M); - } - function y(M) { - if (M > H) { - var j = t.substring(H, M).replace(/&#?\w+;/g, A); - q && N(H), s.characters(j, 0, M - H), H = M; - } - } - function N(M, j) { - for (; M >= S && (j = k.exec(t)); ) - w = j.index, S = w + j[0].length, q.lineNumber++; - q.columnNumber = M - w + 1; - } - for (var w = 0, S = 0, k = /.*(?:\r\n?|\n)|.*$/g, q = s.locator, $ = [{ currentNSMap: u }], J = {}, H = 0; ; ) { - try { - var G = t.indexOf("<", H); - if (G < 0) { - if (!t.substr(H).match(/^\s*$/)) { - var Q = s.doc, He = Q.createTextNode(t.substr(H)); - Q.appendChild(He), s.currentElement = He; - } - return; - } - switch (G > H && y(G), t.charAt(G + 1)) { - case "/": - var X = t.indexOf(">", G + 3), Y = t.substring(G + 2, X).replace(/[ \t\n\r]+$/g, ""), te = $.pop(); - X < 0 ? (Y = t.substring(G + 2).replace(/[\s<].*/, ""), c.error("end tag name: " + Y + " is not complete:" + te.tagName), X = G + 1 + Y.length) : Y.match(/\s H ? H = X : y(Math.max(G, H) + 1); - } -} -function Kr(t, u) { - return u.lineNumber = t.lineNumber, u.columnNumber = t.columnNumber, u; -} -function cu(t, u, n, s, c, f) { - function A(q, $, J) { - n.attributeNames.hasOwnProperty(q) && f.fatalError("Attribute " + q + " redefined"), n.addValue( - q, - // @see https://www.w3.org/TR/xml/#AVNormalize - // since the xmldom sax parser does not "interpret" DTD the following is not implemented: - // - recursive replacement of (DTD) entity references - // - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA - $.replace(/[\t\n\r]/g, " ").replace(/&#?\w+;/g, c), - J - ); - } - for (var y, N, w = ++u, S = sr; ; ) { - var k = t.charAt(w); - switch (k) { - case "=": - if (S === ke) - y = t.slice(u, w), S = ar; - else if (S === Je) - S = ar; - else - throw new Error("attribute equal must after attrName"); - break; - case "'": - case '"': - if (S === ar || S === ke) - if (S === ke && (f.warning('attribute value must after "="'), y = t.slice(u, w)), u = w + 1, w = t.indexOf(k, u), w > 0) - N = t.slice(u, w), A(y, N, u - 1), S = Ke; - else - throw new Error("attribute value no end '" + k + "' match"); - else if (S == Ze) - N = t.slice(u, w), A(y, N, u), f.warning('attribute "' + y + '" missed start quot(' + k + ")!!"), u = w + 1, S = Ke; - else - throw new Error('attribute value must after "="'); - break; - case "/": - switch (S) { - case sr: - n.setTagName(t.slice(u, w)); - case Ke: - case lr: - case gr: - S = gr, n.closed = !0; - case Ze: - case ke: - break; - case Je: - n.closed = !0; - break; - default: - throw new Error("attribute invalid close char('/')"); - } - break; - case "": - return f.error("unexpected end of input"), S == sr && n.setTagName(t.slice(u, w)), w; - case ">": - switch (S) { - case sr: - n.setTagName(t.slice(u, w)); - case Ke: - case lr: - case gr: - break; - case Ze: - case ke: - N = t.slice(u, w), N.slice(-1) === "/" && (n.closed = !0, N = N.slice(0, -1)); - case Je: - S === Je && (N = y), S == Ze ? (f.warning('attribute "' + N + '" missed quot(")!'), A(y, N, u)) : ((!fr.isHTML(s[""]) || !N.match(/^(?:disabled|checked|selected)$/i)) && f.warning('attribute "' + N + '" missed value!! "' + N + '" instead!!'), A(N, N, u)); - break; - case ar: - throw new Error("attribute value missed!!"); - } - return w; - case "€": - k = " "; - default: - if (k <= " ") - switch (S) { - case sr: - n.setTagName(t.slice(u, w)), S = lr; - break; - case ke: - y = t.slice(u, w), S = Je; - break; - case Ze: - var N = t.slice(u, w); - f.warning('attribute "' + N + '" missed quot(")!!'), A(y, N, u); - case Ke: - S = lr; - break; - } - else - switch (S) { - case Je: - n.tagName, (!fr.isHTML(s[""]) || !y.match(/^(?:disabled|checked|selected)$/i)) && f.warning('attribute "' + y + '" missed value!! "' + y + '" instead2!!'), A(y, y, u), u = w, S = ke; - break; - case Ke: - f.warning('attribute space is required"' + y + '"!!'); - case lr: - S = ke, u = w; - break; - case ar: - S = Ze, u = w; - break; - case gr: - throw new Error("elements closed character '/' and '>' must be connected to"); - } - } - w++; - } -} -function et(t, u, n) { - for (var s = t.tagName, c = null, k = t.length; k--; ) { - var f = t[k], A = f.qName, y = f.value, q = A.indexOf(":"); - if (q > 0) - var N = f.prefix = A.slice(0, q), w = A.slice(q + 1), S = N === "xmlns" && w; - else - w = A, N = null, S = A === "xmlns" && ""; - f.localName = w, S !== !1 && (c == null && (c = {}, St(n, n = {})), n[S] = c[S] = y, f.uri = fr.XMLNS, u.startPrefixMapping(S, y)); - } - for (var k = t.length; k--; ) { - f = t[k]; - var N = f.prefix; - N && (N === "xml" && (f.uri = fr.XML), N !== "xmlns" && (f.uri = n[N || ""])); - } - var q = s.indexOf(":"); - q > 0 ? (N = t.prefix = s.slice(0, q), w = t.localName = s.slice(q + 1)) : (N = null, w = t.localName = s); - var $ = t.uri = n[N || ""]; - if (u.startElement($, w, s, t), t.closed) { - if (u.endElement($, w, s), c) - for (N in c) - Object.prototype.hasOwnProperty.call(c, N) && u.endPrefixMapping(N); - } else - return t.currentNSMap = n, t.localNSMap = c, !0; -} -function fu(t, u, n, s, c) { - if (/^(?:script|textarea)$/i.test(n)) { - var f = t.indexOf("", u), A = t.substring(u + 1, f); - if (/[&<]/.test(A)) - return /^script$/i.test(n) ? (c.characters(A, 0, A.length), f) : (A = A.replace(/&#?\w+;/g, s), c.characters(A, 0, A.length), f); - } - return u + 1; -} -function hu(t, u, n, s) { - var c = s[n]; - return c == null && (c = t.lastIndexOf(""), c < u && (c = t.lastIndexOf("", u + 4); - return f > u ? (n.comment(t, u + 4, f - u - 4), f + 3) : (s.error("Unclosed comment"), -1); - } else - return -1; - default: - if (t.substr(u + 3, 6) == "CDATA[") { - var f = t.indexOf("]]>", u + 9); - return n.startCDATA(), n.characters(t, u + 9, f - u - 9), n.endCDATA(), f + 3; - } - var A = Du(t, u), y = A.length; - if (y > 1 && /!doctype/i.test(A[0][0])) { - var N = A[1][0], w = !1, S = !1; - y > 3 && (/^public$/i.test(A[2][0]) ? (w = A[3][0], S = y > 4 && A[4][0]) : /^system$/i.test(A[2][0]) && (S = A[3][0])); - var k = A[y - 1]; - return n.startDTD(N, w, S), n.endDTD(), k.index + k[0].length; - } - } - return -1; -} -function Au(t, u, n) { - var s = t.indexOf("?>", u); - if (s) { - var c = t.substring(u, s).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/); - return c ? (c[0].length, n.processingInstruction(c[1], c[2]), s + 2) : -1; - } - return -1; -} -function Ot() { - this.attributeNames = {}; -} -Ot.prototype = { - setTagName: function(t) { - if (!Zr.test(t)) - throw new Error("invalid tagName:" + t); - this.tagName = t; - }, - addValue: function(t, u, n) { - if (!Zr.test(t)) - throw new Error("invalid attribute:" + t); - this.attributeNames[t] = this.length, this[this.length++] = { qName: t, value: u, offset: n }; - }, - length: 0, - getLocalName: function(t) { - return this[t].localName; - }, - getLocator: function(t) { - return this[t].locator; - }, - getQName: function(t) { - return this[t].qName; - }, - getURI: function(t) { - return this[t].uri; - }, - getValue: function(t) { - return this[t].value; - } - // ,getIndex:function(uri, localName)){ - // if(localName){ - // - // }else{ - // var qName = uri - // } - // }, - // getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))}, - // getType:function(uri,localName){} - // getType:function(i){}, -}; -function Du(t, u) { - var n, s = [], c = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; - for (c.lastIndex = u, c.exec(t); n = c.exec(t); ) - if (s.push(n), n[1]) - return s; -} -Ur.XMLReader = Bt; -Ur.ParseError = nr; -var gu = Me, du = Ge, rt = wt, Ft = Ur, mu = du.DOMImplementation, tt = gu.NAMESPACE, Nu = Ft.ParseError, vu = Ft.XMLReader; -function Rt(t) { - return t.replace(/\r[\n\u0085]/g, ` -`).replace(/[\r\u0085\u2028]/g, ` -`); -} -function _t(t) { - this.options = t || { locator: {} }; -} -_t.prototype.parseFromString = function(t, u) { - var n = this.options, s = new vu(), c = n.domBuilder || new Dr(), f = n.errorHandler, A = n.locator, y = n.xmlns || {}, N = /\/x?html?$/.test(u), w = N ? rt.HTML_ENTITIES : rt.XML_ENTITIES; - A && c.setDocumentLocator(A), s.errorHandler = xu(f, c, A), s.domBuilder = n.domBuilder || c, N && (y[""] = tt.HTML), y.xml = y.xml || tt.XML; - var S = n.normalizeLineEndings || Rt; - return t && typeof t == "string" ? s.parse( - S(t), - y, - w - ) : s.errorHandler.error("invalid doc source"), c.doc; -}; -function xu(t, u, n) { - if (!t) { - if (u instanceof Dr) - return u; - t = u; - } - var s = {}, c = t instanceof Function; - n = n || {}; - function f(A) { - var y = t[A]; - !y && c && (y = t.length == 2 ? function(N) { - t(A, N); - } : t), s[A] = y && function(N) { - y("[xmldom " + A + "] " + N + Sr(n)); - } || function() { - }; - } - return f("warning"), f("error"), f("fatalError"), s; -} -function Dr() { - this.cdata = !1; -} -function er(t, u) { - u.lineNumber = t.lineNumber, u.columnNumber = t.columnNumber; -} -Dr.prototype = { - startDocument: function() { - this.doc = new mu().createDocument(null, null, null), this.locator && (this.doc.documentURI = this.locator.systemId); - }, - startElement: function(t, u, n, s) { - var c = this.doc, f = c.createElementNS(t, n || u), A = s.length; - dr(this, f), this.currentElement = f, this.locator && er(this.locator, f); - for (var y = 0; y < A; y++) { - var t = s.getURI(y), N = s.getValue(y), n = s.getQName(y), w = c.createAttributeNS(t, n); - this.locator && er(s.getLocator(y), w), w.value = w.nodeValue = N, f.setAttributeNode(w); - } - }, - endElement: function(t, u, n) { - var s = this.currentElement; - s.tagName, this.currentElement = s.parentNode; - }, - startPrefixMapping: function(t, u) { - }, - endPrefixMapping: function(t) { - }, - processingInstruction: function(t, u) { - var n = this.doc.createProcessingInstruction(t, u); - this.locator && er(this.locator, n), dr(this, n); - }, - ignorableWhitespace: function(t, u, n) { - }, - characters: function(t, u, n) { - if (t = ut.apply(this, arguments), t) { - if (this.cdata) - var s = this.doc.createCDATASection(t); - else - var s = this.doc.createTextNode(t); - this.currentElement ? this.currentElement.appendChild(s) : /^\s*$/.test(t) && this.doc.appendChild(s), this.locator && er(this.locator, s); - } - }, - skippedEntity: function(t) { - }, - endDocument: function() { - this.doc.normalize(); - }, - setDocumentLocator: function(t) { - (this.locator = t) && (t.lineNumber = 0); - }, - //LexicalHandler - comment: function(t, u, n) { - t = ut.apply(this, arguments); - var s = this.doc.createComment(t); - this.locator && er(this.locator, s), dr(this, s); - }, - startCDATA: function() { - this.cdata = !0; - }, - endCDATA: function() { - this.cdata = !1; - }, - startDTD: function(t, u, n) { - var s = this.doc.implementation; - if (s && s.createDocumentType) { - var c = s.createDocumentType(t, u, n); - this.locator && er(this.locator, c), dr(this, c), this.doc.doctype = c; - } - }, - /** - * @see org.xml.sax.ErrorHandler - * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html - */ - warning: function(t) { - console.warn("[xmldom warning] " + t, Sr(this.locator)); - }, - error: function(t) { - console.error("[xmldom error] " + t, Sr(this.locator)); - }, - fatalError: function(t) { - throw new Nu(t, this.locator); - } -}; -function Sr(t) { - if (t) - return ` -@` + (t.systemId || "") + "#[line:" + t.lineNumber + ",col:" + t.columnNumber + "]"; -} -function ut(t, u, n) { - return typeof t == "string" ? t.substr(u, n) : t.length >= u + n || u ? new java.lang.String(t, u, n) + "" : t; -} -"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g, function(t) { - Dr.prototype[t] = function() { - return null; - }; -}); -function dr(t, u) { - t.currentElement ? t.currentElement.appendChild(u) : t.doc.appendChild(u); -} -Tr.__DOMHandler = Dr; -Tr.normalizeLineEndings = Rt; -Tr.DOMParser = _t; -var Cu = Tr.DOMParser; -function yu(t, u) { - const n = new Cu().parseFromString(u, "text/xml"); - return { filtered: `${Qt.select(t, n)}` }; -} -export { - yu as pluginHookResponseFilter -}; diff --git a/src-tauri/plugins/build/importer-insomnia/index.mjs b/src-tauri/plugins/build/importer-insomnia/index.mjs deleted file mode 100644 index 53a9fe08..00000000 --- a/src-tauri/plugins/build/importer-insomnia/index.mjs +++ /dev/null @@ -1,134 +0,0 @@ -function S(e, t) { - return console.log("IMPORTING Environment", e._id, e.name, JSON.stringify(e, null, 2)), { - id: e._id, - createdAt: new Date(e.created ?? Date.now()).toISOString().replace("Z", ""), - updatedAt: new Date(e.updated ?? Date.now()).toISOString().replace("Z", ""), - workspaceId: t, - model: "environment", - name: e.name, - variables: Object.entries(e.data).map(([n, a]) => ({ - enabled: !0, - name: n, - value: `${a}` - })) - }; -} -function I(e) { - return m(e) && e._type === "workspace"; -} -function y(e) { - return m(e) && e._type === "request_group"; -} -function g(e) { - return m(e) && e._type === "request"; -} -function f(e) { - return m(e) && e._type === "environment"; -} -function m(e) { - return Object.prototype.toString.call(e) === "[object Object]"; -} -function w(e) { - return Object.prototype.toString.call(e) === "[object String]"; -} -function O(e) { - return Object.entries(e).map(([t, n]) => ({ - enabled: !0, - name: t, - value: `${n}` - })); -} -function l(e) { - return w(e) ? e.replaceAll(/{{\s*(_\.)?([^}]+)\s*}}/g, "${[$2]}") : e; -} -function h(e, t, n = 0) { - var c, o; - console.log("IMPORTING REQUEST", e._id, e.name, JSON.stringify(e, null, 2)); - let a = null, r = null; - ((c = e.body) == null ? void 0 : c.mimeType) === "application/graphql" ? (a = "graphql", r = l(e.body.text)) : ((o = e.body) == null ? void 0 : o.mimeType) === "application/json" && (a = "application/json", r = l(e.body.text)); - let i = null, u = {}; - return e.authentication.type === "bearer" ? (i = "bearer", u = { - token: l(e.authentication.token) - }) : e.authentication.type === "basic" && (i = "basic", u = { - username: l(e.authentication.username), - password: l(e.authentication.password) - }), { - id: e._id, - createdAt: new Date(e.created ?? Date.now()).toISOString().replace("Z", ""), - updatedAt: new Date(e.updated ?? Date.now()).toISOString().replace("Z", ""), - workspaceId: t, - folderId: e.parentId === t ? null : e.parentId, - model: "http_request", - sortPriority: n, - name: e.name, - url: l(e.url), - body: r, - bodyType: a, - authentication: u, - authenticationType: i, - method: e.method, - headers: (e.headers ?? []).map(({ name: d, value: p, disabled: s }) => ({ - enabled: !s, - name: d, - value: p - })).filter(({ name: d, value: p }) => d !== "" || p !== "") - }; -} -function _(e, t) { - return console.log("IMPORTING FOLDER", e._id, e.name, JSON.stringify(e, null, 2)), { - id: e._id, - createdAt: new Date(e.created ?? Date.now()).toISOString().replace("Z", ""), - updatedAt: new Date(e.updated ?? Date.now()).toISOString().replace("Z", ""), - folderId: e.parentId === t ? null : e.parentId, - workspaceId: t, - model: "folder", - name: e.name - }; -} -function b(e) { - console.log("RUNNING INSOMNIA"); - let t; - try { - t = JSON.parse(e); - } catch { - return; - } - if (!m(t) || !Array.isArray(t.resources)) - return; - const n = { - workspaces: [], - requests: [], - environments: [], - folders: [] - }, a = t.resources.filter(I); - for (const r of a) { - const i = t.resources.find( - (o) => f(o) && o.parentId === r._id - ); - n.workspaces.push({ - id: r._id, - createdAt: new Date(a.created ?? Date.now()).toISOString().replace("Z", ""), - updatedAt: new Date(a.updated ?? Date.now()).toISOString().replace("Z", ""), - model: "workspace", - name: r.name, - variables: i ? O(i.data) : [] - }); - const u = t.resources.filter( - (o) => f(o) && o.parentId === (i == null ? void 0 : i._id) - ); - n.environments.push( - ...u.map((o) => S(o, r._id)) - ); - const c = (o) => { - const d = t.resources.filter((s) => s.parentId === o); - let p = 0; - for (const s of d) - y(s) ? (n.folders.push(_(s, r._id)), c(s._id)) : g(s) && n.requests.push(h(s, r._id, p++)); - }; - c(r._id); - } - return n.requests = n.requests.filter(Boolean), n.environments = n.environments.filter(Boolean), n.workspaces = n.workspaces.filter(Boolean), { resources: n }; -} -export { - b as pluginHookImport -}; diff --git a/src-tauri/plugins/build/importer-postman/index.mjs b/src-tauri/plugins/build/importer-postman/index.mjs deleted file mode 100644 index 797a91a1..00000000 --- a/src-tauri/plugins/build/importer-postman/index.mjs +++ /dev/null @@ -1,160 +0,0 @@ -const T = "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", w = "https://schema.getpostman.com/json/collection/v2.0.0/collection.json", A = [w, T]; -function q(e) { - const t = b(e); - if (t == null) - return; - const n = a(t.info); - if (!A.includes(n.schema) || !Array.isArray(t.item)) - return; - const i = { - workspaces: [], - environments: [], - requests: [], - folders: [] - }, c = { - model: "workspace", - id: m("wk"), - name: n.name || "Postman Import", - description: n.description || "" - }; - i.workspaces.push(c); - const f = (r, u = null) => { - if (typeof r.name == "string" && Array.isArray(r.item)) { - const o = { - model: "folder", - workspaceId: c.id, - id: m("fl"), - name: r.name, - folderId: u - }; - i.folders.push(o); - for (const s of r.item) - f(s, o.id); - } else if (typeof r.name == "string" && "request" in r) { - const o = a(r.request), s = k(o.body), d = S(o.auth), g = { - model: "http_request", - id: m("rq"), - workspaceId: c.id, - folderId: u, - name: r.name, - method: o.method || "GET", - url: typeof o.url == "string" ? o.url : a(o.url).raw, - body: s.body, - bodyType: s.bodyType, - authentication: d.authentication, - authenticationType: d.authenticationType, - headers: [ - ...s.headers, - ...d.headers, - ...y(o.header).map((p) => ({ - name: p.key, - value: p.value, - enabled: !p.disabled - })) - ] - }; - i.requests.push(g); - } else - console.log("Unknown item", r, u); - }; - for (const r of t.item) - f(r); - return { resources: h(i) }; -} -function S(e) { - const t = a(e); - return "basic" in t ? { - headers: [], - authenticationType: "basic", - authentication: { - username: t.basic.username || "", - password: t.basic.password || "" - } - } : { headers: [], authenticationType: null, authentication: {} }; -} -function k(e) { - const t = a(e); - return "graphql" in t ? { - headers: [ - { - name: "Content-Type", - value: "application/json", - enabled: !0 - } - ], - bodyType: "graphql", - body: { - text: JSON.stringify( - { query: t.graphql.query, variables: b(t.graphql.variables) }, - null, - 2 - ) - } - } : "urlencoded" in t ? { - headers: [ - { - name: "Content-Type", - value: "application/x-www-form-urlencoded", - enabled: !0 - } - ], - bodyType: "application/x-www-form-urlencoded", - body: { - form: y(t.urlencoded).map((n) => ({ - enabled: !n.disabled, - name: n.key ?? "", - value: n.value ?? "" - })) - } - } : "formdata" in t ? { - headers: [ - { - name: "Content-Type", - value: "multipart/form-data", - enabled: !0 - } - ], - bodyType: "multipart/form-data", - body: { - form: y(t.formdata).map( - (n) => n.src != null ? { - enabled: !n.disabled, - name: n.key ?? "", - file: n.src ?? "" - } : { - enabled: !n.disabled, - name: n.key ?? "", - value: n.value ?? "" - } - ) - } - } : { headers: [], bodyType: null, body: {} }; -} -function b(e) { - try { - return a(JSON.parse(e)); - } catch { - } - return null; -} -function a(e) { - return Object.prototype.toString.call(e) === "[object Object]" ? e : {}; -} -function y(e) { - return Object.prototype.toString.call(e) === "[object Array]" ? e : []; -} -function h(e) { - return typeof e == "string" ? e.replace(/{{\s*(_\.)?([^}]+)\s*}}/g, "${[$2]}") : Array.isArray(e) && e != null ? e.map(h) : typeof e == "object" && e != null ? Object.fromEntries( - Object.entries(e).map(([t, n]) => [t, h(n)]) - ) : e; -} -function m(e) { - const t = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - let n = `${e}_`; - for (let l = 0; l < 10; l++) - n += t[Math.floor(Math.random() * t.length)]; - return n; -} -export { - q as pluginHookImport -}; diff --git a/src-tauri/plugins/build/importer-yaak/index.mjs b/src-tauri/plugins/build/importer-yaak/index.mjs deleted file mode 100644 index f97a9f90..00000000 --- a/src-tauri/plugins/build/importer-yaak/index.mjs +++ /dev/null @@ -1,17 +0,0 @@ -function u(r) { - let e; - try { - e = JSON.parse(r); - } catch { - return; - } - if (t(e) && e.yaakSchema === 1) - return { resources: e.resources }; -} -function t(r) { - return Object.prototype.toString.call(r) === "[object Object]"; -} -export { - t as isJSObject, - u as pluginHookImport -}; diff --git a/src-tauri/src/plugin.rs b/src-tauri/src/plugin.rs index 2118fdad..28548b1d 100644 --- a/src-tauri/src/plugin.rs +++ b/src-tauri/src/plugin.rs @@ -87,7 +87,7 @@ fn run_plugin( ) -> serde_json::Value { let plugin_dir = app_handle .path_resolver() - .resolve_resource("plugins/build") + .resolve_resource("plugins") .expect("failed to resolve plugin directory resource") .join(plugin_name); let plugin_index_file = plugin_dir.join("index.mjs");