diff --git a/src/CONST/index.ts b/src/CONST/index.ts index dfe481d990f9..b832c2c2a0d3 100644 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -8335,6 +8335,7 @@ const CONST = { IN: 'in', SUBMITTED: 'submitted', APPROVED: 'approved', + ANY_APPROVAL: 'anyApproval', PAID: 'paid', EXPORTED: 'exported', POSTED: 'posted', @@ -8428,6 +8429,7 @@ const CONST = { IN: 'in', SUBMITTED: 'submitted', APPROVED: 'approved', + ANY_APPROVAL: 'any-approval', PAID: 'paid', EXPORTED: 'exported', POSTED: 'posted', diff --git a/src/components/Search/types.ts b/src/components/Search/types.ts index 3c4aba5c0cf2..04ff97b9927b 100644 --- a/src/components/Search/types.ts +++ b/src/components/Search/types.ts @@ -363,6 +363,7 @@ type SearchDateFilterKeys = | typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE | typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.SUBMITTED | typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.APPROVED + | typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL | typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID | typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED | typeof CONST.SEARCH.SYNTAX_FILTER_KEYS.POSTED diff --git a/src/hooks/useAdvancedSearchFilters.ts b/src/hooks/useAdvancedSearchFilters.ts index 54ff2aa0531a..edf73d9d8470 100644 --- a/src/hooks/useAdvancedSearchFilters.ts +++ b/src/hooks/useAdvancedSearchFilters.ts @@ -60,6 +60,7 @@ const typeFiltersKeys = { [ CONST.SEARCH.SYNTAX_FILTER_KEYS.SUBMITTED, CONST.SEARCH.SYNTAX_FILTER_KEYS.APPROVED, + CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED, CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED_TO, CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID, diff --git a/src/hooks/useAutocompleteSuggestions.ts b/src/hooks/useAutocompleteSuggestions.ts index 2bd13293d02d..6e73345649fe 100644 --- a/src/hooks/useAutocompleteSuggestions.ts +++ b/src/hooks/useAutocompleteSuggestions.ts @@ -652,6 +652,7 @@ function useAutocompleteSuggestions({ mapKey: CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED_TO, })); } + case CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL: case CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE: case CONST.SEARCH.SYNTAX_FILTER_KEYS.SUBMITTED: case CONST.SEARCH.SYNTAX_FILTER_KEYS.APPROVED: @@ -663,7 +664,7 @@ function useAutocompleteSuggestions({ .filter((datePreset) => datePreset.toLowerCase().includes(autocompleteValue.toLowerCase()) && !alreadyAutocompletedKeys.has(datePreset.toLowerCase())) .sort() .slice(0, 10); - return filteredDatePresets.map((datePreset) => ({filterKey: autocompleteKey, text: datePreset})); + return filteredDatePresets.map((datePreset) => ({filterKey: getUserFriendlyKey(autocompleteKey), text: datePreset})); } default: { return []; diff --git a/src/languages/de.ts b/src/languages/de.ts index 295685bf7592..ff069dec44ad 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -10222,6 +10222,7 @@ Fügen Sie weitere Ausgabelimits hinzu, um den Cashflow Ihres Unternehmens zu sc past: 'Vergangenes', submitted: 'Eingereicht', approved: 'Genehmigt', + anyApproval: 'Jede Genehmigung', firstApprover: 'Erste:r Genehmiger:in', firstApproved: 'Zuerst genehmigt', paidBy: 'Bezahlt von', diff --git a/src/languages/el.ts b/src/languages/el.ts index 726755d8ef4c..ed6b8f3986fd 100644 --- a/src/languages/el.ts +++ b/src/languages/el.ts @@ -10425,6 +10425,7 @@ ${reportName}`, past: 'Παρελθόν', submitted: 'Υποβλήθηκε', approved: 'Εγκρίθηκε', + anyApproval: 'Οποιαδήποτε έγκριση', firstApprover: 'Πρώτος εγκρίνων', firstApproved: 'Πρώτη έγκριση', paidBy: 'Πληρώθηκε από', diff --git a/src/languages/en.ts b/src/languages/en.ts index 164b965b130a..1e692e90a3a1 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -10467,6 +10467,7 @@ const translations = { past: 'Past', submitted: 'Submitted', approved: 'Approved', + anyApproval: 'Any approval', firstApprover: 'First approver', firstApproved: 'First approved', paidBy: 'Paid by', diff --git a/src/languages/es.ts b/src/languages/es.ts index 755e4ba56448..d72227dccd44 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -10067,6 +10067,7 @@ ${reportName}`, past: 'Anterior', submitted: 'Envío', approved: 'Aprobación', + anyApproval: 'Cualquier aprobación', firstApprover: 'Primer aprobador', firstApproved: 'Primera aprobación', paidBy: 'Pagado por', diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 3e1a1dba01ce..e37388e30aae 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -10248,6 +10248,7 @@ Ajoutez davantage de règles de dépenses pour protéger la trésorerie de l’e past: 'Passé', submitted: 'Soumis', approved: 'Approuvé', + anyApproval: 'Toute approbation', firstApprover: 'Premier approbateur', firstApproved: 'Approuvé en premier', paidBy: 'Payé par', diff --git a/src/languages/it.ts b/src/languages/it.ts index 3f93d66cf488..3249ee6dd3d8 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -10174,6 +10174,7 @@ Aggiungi altre regole di spesa per proteggere il flusso di cassa aziendale.`, past: 'Passato', submitted: 'Inviato', approved: 'Approvato', + anyApproval: 'Qualsiasi approvazione', firstApprover: 'Primo approvatore', firstApproved: 'Approvato per primo', paidBy: 'Pagato da', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 331af0f9dfeb..0b7a4b3d12c2 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -10031,6 +10031,7 @@ ${reportName}`, past: '過去', submitted: '送信済み', approved: '承認済み', + anyApproval: '任意の承認', firstApprover: '最初の承認者', firstApproved: '最初に承認済み', paidBy: '支払者', diff --git a/src/languages/nl.ts b/src/languages/nl.ts index af769b13b921..e08522b79256 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -10140,6 +10140,7 @@ er bestedingsregels toe om de kasstroom van het bedrijf te beschermen.`, past: 'Verleden', submitted: 'Ingediend', approved: 'Goedgekeurd', + anyApproval: 'Elke goedkeuring', firstApprover: 'Eerste gemachtigde', firstApproved: 'Eerst goedgekeurd', paidBy: 'Betaald door', diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 4648673b4886..39297b9f1015 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -10157,6 +10157,7 @@ Dodaj więcej zasad wydatków, żeby chronić płynność finansową firmy.`, past: 'Przeszłe', submitted: 'Przesłano', approved: 'Zatwierdzono', + anyApproval: 'Jakiekolwiek zatwierdzenie', firstApprover: 'Pierwszy zatwierdzający', firstApproved: 'Najpierw zatwierdzono', paidBy: 'Zapłacone przez', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index 66b8f217c752..937fab736f9e 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -10138,6 +10138,7 @@ Adicione mais regras de gasto para proteger o fluxo de caixa da empresa.`, past: 'Passado', submitted: 'Enviado', approved: 'Aprovado', + anyApproval: 'Qualquer aprovação', firstApprover: 'Primeira pessoa aprovadora', firstApproved: 'Primeira aprovada', paidBy: 'Pago por', diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index fc862119f3a2..e73ab48a4115 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -9762,6 +9762,7 @@ ${reportName}`, past: '过去', submitted: '已提交', approved: '已批准', + anyApproval: '任意审批', firstApprover: '首位审批人', firstApproved: '首次批准', paidBy: '付款人', diff --git a/src/libs/SearchAutocompleteUtils.ts b/src/libs/SearchAutocompleteUtils.ts index 29fc562c983a..565de6f898f3 100644 --- a/src/libs/SearchAutocompleteUtils.ts +++ b/src/libs/SearchAutocompleteUtils.ts @@ -255,6 +255,7 @@ function filterOutRangesWithCorrectValue( case CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE: case CONST.SEARCH.SYNTAX_FILTER_KEYS.SUBMITTED: case CONST.SEARCH.SYNTAX_FILTER_KEYS.APPROVED: + case CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL: case CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID: case CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED: case CONST.SEARCH.SYNTAX_FILTER_KEYS.WITHDRAWN: diff --git a/src/libs/SearchParser/autocompleteParser.js b/src/libs/SearchParser/autocompleteParser.js index d73871042833..84f09d2facc4 100644 --- a/src/libs/SearchParser/autocompleteParser.js +++ b/src/libs/SearchParser/autocompleteParser.js @@ -239,84 +239,86 @@ function peg$parse(input, options) { var peg$c53 = "workspace"; var peg$c54 = "submitted"; var peg$c55 = "approved"; - var peg$c56 = "paid"; - var peg$c57 = "exported"; - var peg$c58 = "posted"; - var peg$c59 = "withdrawn"; - var peg$c60 = "groupby"; - var peg$c61 = "group-by"; - var peg$c62 = "limit"; - var peg$c63 = "feed"; - var peg$c64 = "title"; - var peg$c65 = "submitteruserid"; - var peg$c66 = "submitter-user-id"; - var peg$c67 = "submitterpayrollid"; - var peg$c68 = "submitter-payroll-id"; - var peg$c69 = "orderdealnumbers"; - var peg$c70 = "order-deal-numbers"; - var peg$c71 = "assignee"; - var peg$c72 = "createdby"; - var peg$c73 = "created-by"; - var peg$c74 = "action"; - var peg$c75 = "total"; - var peg$c76 = "has"; - var peg$c77 = "is"; - var peg$c78 = "purchaseamount"; - var peg$c79 = "purchase-amount"; - var peg$c80 = "purchasecurrency"; - var peg$c81 = "purchase-currency"; - var peg$c82 = "amountdebited"; - var peg$c83 = "amount-debited"; - var peg$c84 = "amountreimbursed"; - var peg$c85 = "amount-reimbursed"; - var peg$c86 = "columns"; - var peg$c87 = "view"; - var peg$c88 = "compare"; - var peg$c89 = "per-diem"; - var peg$c90 = "drafts"; - var peg$c91 = "draft"; - var peg$c92 = "tax"; - var peg$c93 = "policy-name"; - var peg$c94 = "long-report-id"; - var peg$c95 = "exported-to"; - var peg$c96 = "exportedto"; - var peg$c97 = "exchange-rate"; - var peg$c98 = "reimbursable-total"; - var peg$c99 = "non-reimbursable-total"; - var peg$c100 = "group-from"; - var peg$c101 = "group-expenses"; - var peg$c102 = "group-total"; - var peg$c103 = "group-card"; - var peg$c104 = "group-feed"; - var peg$c105 = "group-bank-account"; - var peg$c106 = "group-withdrawn"; - var peg$c107 = "group-withdrawal-id"; - var peg$c108 = "group-amount-debited"; - var peg$c109 = "group-amount-reimbursed"; - var peg$c110 = "group-category"; - var peg$c111 = "group-tag"; - var peg$c112 = "group-merchant"; - var peg$c113 = "group-day"; - var peg$c114 = "group-month"; - var peg$c115 = "group-week"; - var peg$c116 = "group-year"; - var peg$c117 = "group-quarter"; - var peg$c118 = "*:"; - var peg$c119 = "!="; - var peg$c120 = ">="; - var peg$c121 = ">"; - var peg$c122 = "<="; - var peg$c123 = "<"; - var peg$c124 = "\\"; - var peg$c125 = "\u201C"; - var peg$c126 = "\u201D"; - var peg$c127 = "\""; - var peg$c128 = "footercount"; - var peg$c129 = "footer-count"; - var peg$c130 = "footercurrency"; - var peg$c131 = "footer-currency"; - var peg$c132 = "footertotal"; - var peg$c133 = "footer-total"; + var peg$c56 = "anyapproval"; + var peg$c57 = "any-approval"; + var peg$c58 = "paid"; + var peg$c59 = "exported"; + var peg$c60 = "posted"; + var peg$c61 = "withdrawn"; + var peg$c62 = "groupby"; + var peg$c63 = "group-by"; + var peg$c64 = "limit"; + var peg$c65 = "feed"; + var peg$c66 = "title"; + var peg$c67 = "submitteruserid"; + var peg$c68 = "submitter-user-id"; + var peg$c69 = "submitterpayrollid"; + var peg$c70 = "submitter-payroll-id"; + var peg$c71 = "orderdealnumbers"; + var peg$c72 = "order-deal-numbers"; + var peg$c73 = "assignee"; + var peg$c74 = "createdby"; + var peg$c75 = "created-by"; + var peg$c76 = "action"; + var peg$c77 = "total"; + var peg$c78 = "has"; + var peg$c79 = "is"; + var peg$c80 = "purchaseamount"; + var peg$c81 = "purchase-amount"; + var peg$c82 = "purchasecurrency"; + var peg$c83 = "purchase-currency"; + var peg$c84 = "amountdebited"; + var peg$c85 = "amount-debited"; + var peg$c86 = "amountreimbursed"; + var peg$c87 = "amount-reimbursed"; + var peg$c88 = "columns"; + var peg$c89 = "view"; + var peg$c90 = "compare"; + var peg$c91 = "per-diem"; + var peg$c92 = "drafts"; + var peg$c93 = "draft"; + var peg$c94 = "tax"; + var peg$c95 = "policy-name"; + var peg$c96 = "long-report-id"; + var peg$c97 = "exported-to"; + var peg$c98 = "exportedto"; + var peg$c99 = "exchange-rate"; + var peg$c100 = "reimbursable-total"; + var peg$c101 = "non-reimbursable-total"; + var peg$c102 = "group-from"; + var peg$c103 = "group-expenses"; + var peg$c104 = "group-total"; + var peg$c105 = "group-card"; + var peg$c106 = "group-feed"; + var peg$c107 = "group-bank-account"; + var peg$c108 = "group-withdrawn"; + var peg$c109 = "group-withdrawal-id"; + var peg$c110 = "group-amount-debited"; + var peg$c111 = "group-amount-reimbursed"; + var peg$c112 = "group-category"; + var peg$c113 = "group-tag"; + var peg$c114 = "group-merchant"; + var peg$c115 = "group-day"; + var peg$c116 = "group-month"; + var peg$c117 = "group-week"; + var peg$c118 = "group-year"; + var peg$c119 = "group-quarter"; + var peg$c120 = "*:"; + var peg$c121 = "!="; + var peg$c122 = ">="; + var peg$c123 = ">"; + var peg$c124 = "<="; + var peg$c125 = "<"; + var peg$c126 = "\\"; + var peg$c127 = "\u201C"; + var peg$c128 = "\u201D"; + var peg$c129 = "\""; + var peg$c130 = "footercount"; + var peg$c131 = "footer-count"; + var peg$c132 = "footercurrency"; + var peg$c133 = "footer-currency"; + var peg$c134 = "footertotal"; + var peg$c135 = "footer-total"; var peg$r0 = /^[ \t\r\n\xA0,:=<>!]/; var peg$r1 = /^[:=]/; @@ -392,101 +394,103 @@ function peg$parse(input, options) { var peg$e56 = peg$literalExpectation("workspace", true); var peg$e57 = peg$literalExpectation("submitted", true); var peg$e58 = peg$literalExpectation("approved", true); - var peg$e59 = peg$literalExpectation("paid", true); - var peg$e60 = peg$literalExpectation("exported", true); - var peg$e61 = peg$literalExpectation("posted", true); - var peg$e62 = peg$literalExpectation("withdrawn", true); - var peg$e63 = peg$literalExpectation("groupBy", true); - var peg$e64 = peg$literalExpectation("group-by", true); - var peg$e65 = peg$literalExpectation("limit", true); - var peg$e66 = peg$literalExpectation("feed", true); - var peg$e67 = peg$literalExpectation("title", true); - var peg$e68 = peg$literalExpectation("submitterUserID", true); - var peg$e69 = peg$literalExpectation("submitter-user-id", true); - var peg$e70 = peg$literalExpectation("submitterPayrollID", true); - var peg$e71 = peg$literalExpectation("submitter-payroll-id", true); - var peg$e72 = peg$literalExpectation("orderDealNumbers", true); - var peg$e73 = peg$literalExpectation("order-deal-numbers", true); - var peg$e74 = peg$literalExpectation("assignee", true); - var peg$e75 = peg$literalExpectation("createdBy", true); - var peg$e76 = peg$literalExpectation("created-by", true); - var peg$e77 = peg$literalExpectation("action", true); - var peg$e78 = peg$literalExpectation("total", true); - var peg$e79 = peg$literalExpectation("has", true); - var peg$e80 = peg$literalExpectation("is", true); - var peg$e81 = peg$literalExpectation("purchaseAmount", true); - var peg$e82 = peg$literalExpectation("purchase-amount", true); - var peg$e83 = peg$literalExpectation("purchaseCurrency", true); - var peg$e84 = peg$literalExpectation("purchase-currency", true); - var peg$e85 = peg$literalExpectation("amountDebited", true); - var peg$e86 = peg$literalExpectation("amount-debited", true); - var peg$e87 = peg$literalExpectation("amountReimbursed", true); - var peg$e88 = peg$literalExpectation("amount-reimbursed", true); - var peg$e89 = peg$literalExpectation("columns", true); - var peg$e90 = peg$literalExpectation("view", true); - var peg$e91 = peg$literalExpectation("compare", true); - var peg$e92 = peg$literalExpectation("per-diem", true); - var peg$e93 = peg$literalExpectation("drafts", true); - var peg$e94 = peg$literalExpectation("draft", true); - var peg$e95 = peg$literalExpectation("tax", true); - var peg$e96 = peg$literalExpectation("policy-name", true); - var peg$e97 = peg$literalExpectation("long-report-id", true); - var peg$e98 = peg$literalExpectation("exported-to", true); - var peg$e99 = peg$classExpectation([":", "="], false, false); - var peg$e100 = peg$literalExpectation("exportedTo", true); - var peg$e101 = peg$literalExpectation("exchange-rate", true); - var peg$e102 = peg$literalExpectation("reimbursable-total", true); - var peg$e103 = peg$literalExpectation("non-reimbursable-total", true); - var peg$e104 = peg$literalExpectation("group-from", true); - var peg$e105 = peg$literalExpectation("group-expenses", true); - var peg$e106 = peg$literalExpectation("group-total", true); - var peg$e107 = peg$literalExpectation("group-card", true); - var peg$e108 = peg$literalExpectation("group-feed", true); - var peg$e109 = peg$literalExpectation("group-bank-account", true); - var peg$e110 = peg$literalExpectation("group-withdrawn", true); - var peg$e111 = peg$literalExpectation("group-withdrawal-id", true); - var peg$e112 = peg$literalExpectation("group-amount-debited", true); - var peg$e113 = peg$literalExpectation("group-amount-reimbursed", true); - var peg$e114 = peg$literalExpectation("group-category", true); - var peg$e115 = peg$literalExpectation("group-tag", true); - var peg$e116 = peg$literalExpectation("group-merchant", true); - var peg$e117 = peg$literalExpectation("group-day", true); - var peg$e118 = peg$literalExpectation("group-month", true); - var peg$e119 = peg$literalExpectation("group-week", true); - var peg$e120 = peg$literalExpectation("group-year", true); - var peg$e121 = peg$literalExpectation("group-quarter", true); - var peg$e122 = peg$otherExpectation("operator"); - var peg$e123 = peg$literalExpectation("*:", false); - var peg$e124 = peg$literalExpectation("!=", false); - var peg$e125 = peg$literalExpectation(">=", false); - var peg$e126 = peg$literalExpectation(">", false); - var peg$e127 = peg$literalExpectation("<=", false); - var peg$e128 = peg$literalExpectation("<", false); - var peg$e129 = peg$literalExpectation("\\", false); - var peg$e130 = peg$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); - var peg$e131 = peg$otherExpectation("word"); - var peg$e132 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e133 = peg$otherExpectation("whitespace"); - var peg$e134 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); - var peg$e135 = peg$otherExpectation("quote"); - var peg$e136 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e137 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); - var peg$e138 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); - var peg$e139 = peg$literalExpectation("\u201C", false); - var peg$e140 = peg$literalExpectation("\u201D", false); - var peg$e141 = peg$literalExpectation("\"", false); - var peg$e142 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e143 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e144 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); - var peg$e145 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); - var peg$e146 = peg$classExpectation([","], false, false); - var peg$e147 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); - var peg$e148 = peg$literalExpectation("footerCount", true); - var peg$e149 = peg$literalExpectation("footer-count", true); - var peg$e150 = peg$literalExpectation("footerCurrency", true); - var peg$e151 = peg$literalExpectation("footer-currency", true); - var peg$e152 = peg$literalExpectation("footerTotal", true); - var peg$e153 = peg$literalExpectation("footer-total", true); + var peg$e59 = peg$literalExpectation("anyApproval", true); + var peg$e60 = peg$literalExpectation("any-approval", true); + var peg$e61 = peg$literalExpectation("paid", true); + var peg$e62 = peg$literalExpectation("exported", true); + var peg$e63 = peg$literalExpectation("posted", true); + var peg$e64 = peg$literalExpectation("withdrawn", true); + var peg$e65 = peg$literalExpectation("groupBy", true); + var peg$e66 = peg$literalExpectation("group-by", true); + var peg$e67 = peg$literalExpectation("limit", true); + var peg$e68 = peg$literalExpectation("feed", true); + var peg$e69 = peg$literalExpectation("title", true); + var peg$e70 = peg$literalExpectation("submitterUserID", true); + var peg$e71 = peg$literalExpectation("submitter-user-id", true); + var peg$e72 = peg$literalExpectation("submitterPayrollID", true); + var peg$e73 = peg$literalExpectation("submitter-payroll-id", true); + var peg$e74 = peg$literalExpectation("orderDealNumbers", true); + var peg$e75 = peg$literalExpectation("order-deal-numbers", true); + var peg$e76 = peg$literalExpectation("assignee", true); + var peg$e77 = peg$literalExpectation("createdBy", true); + var peg$e78 = peg$literalExpectation("created-by", true); + var peg$e79 = peg$literalExpectation("action", true); + var peg$e80 = peg$literalExpectation("total", true); + var peg$e81 = peg$literalExpectation("has", true); + var peg$e82 = peg$literalExpectation("is", true); + var peg$e83 = peg$literalExpectation("purchaseAmount", true); + var peg$e84 = peg$literalExpectation("purchase-amount", true); + var peg$e85 = peg$literalExpectation("purchaseCurrency", true); + var peg$e86 = peg$literalExpectation("purchase-currency", true); + var peg$e87 = peg$literalExpectation("amountDebited", true); + var peg$e88 = peg$literalExpectation("amount-debited", true); + var peg$e89 = peg$literalExpectation("amountReimbursed", true); + var peg$e90 = peg$literalExpectation("amount-reimbursed", true); + var peg$e91 = peg$literalExpectation("columns", true); + var peg$e92 = peg$literalExpectation("view", true); + var peg$e93 = peg$literalExpectation("compare", true); + var peg$e94 = peg$literalExpectation("per-diem", true); + var peg$e95 = peg$literalExpectation("drafts", true); + var peg$e96 = peg$literalExpectation("draft", true); + var peg$e97 = peg$literalExpectation("tax", true); + var peg$e98 = peg$literalExpectation("policy-name", true); + var peg$e99 = peg$literalExpectation("long-report-id", true); + var peg$e100 = peg$literalExpectation("exported-to", true); + var peg$e101 = peg$classExpectation([":", "="], false, false); + var peg$e102 = peg$literalExpectation("exportedTo", true); + var peg$e103 = peg$literalExpectation("exchange-rate", true); + var peg$e104 = peg$literalExpectation("reimbursable-total", true); + var peg$e105 = peg$literalExpectation("non-reimbursable-total", true); + var peg$e106 = peg$literalExpectation("group-from", true); + var peg$e107 = peg$literalExpectation("group-expenses", true); + var peg$e108 = peg$literalExpectation("group-total", true); + var peg$e109 = peg$literalExpectation("group-card", true); + var peg$e110 = peg$literalExpectation("group-feed", true); + var peg$e111 = peg$literalExpectation("group-bank-account", true); + var peg$e112 = peg$literalExpectation("group-withdrawn", true); + var peg$e113 = peg$literalExpectation("group-withdrawal-id", true); + var peg$e114 = peg$literalExpectation("group-amount-debited", true); + var peg$e115 = peg$literalExpectation("group-amount-reimbursed", true); + var peg$e116 = peg$literalExpectation("group-category", true); + var peg$e117 = peg$literalExpectation("group-tag", true); + var peg$e118 = peg$literalExpectation("group-merchant", true); + var peg$e119 = peg$literalExpectation("group-day", true); + var peg$e120 = peg$literalExpectation("group-month", true); + var peg$e121 = peg$literalExpectation("group-week", true); + var peg$e122 = peg$literalExpectation("group-year", true); + var peg$e123 = peg$literalExpectation("group-quarter", true); + var peg$e124 = peg$otherExpectation("operator"); + var peg$e125 = peg$literalExpectation("*:", false); + var peg$e126 = peg$literalExpectation("!=", false); + var peg$e127 = peg$literalExpectation(">=", false); + var peg$e128 = peg$literalExpectation(">", false); + var peg$e129 = peg$literalExpectation("<=", false); + var peg$e130 = peg$literalExpectation("<", false); + var peg$e131 = peg$literalExpectation("\\", false); + var peg$e132 = peg$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); + var peg$e133 = peg$otherExpectation("word"); + var peg$e134 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e135 = peg$otherExpectation("whitespace"); + var peg$e136 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); + var peg$e137 = peg$otherExpectation("quote"); + var peg$e138 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e139 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); + var peg$e140 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); + var peg$e141 = peg$literalExpectation("\u201C", false); + var peg$e142 = peg$literalExpectation("\u201D", false); + var peg$e143 = peg$literalExpectation("\"", false); + var peg$e144 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e145 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e146 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); + var peg$e147 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); + var peg$e148 = peg$classExpectation([","], false, false); + var peg$e149 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); + var peg$e150 = peg$literalExpectation("footerCount", true); + var peg$e151 = peg$literalExpectation("footer-count", true); + var peg$e152 = peg$literalExpectation("footerCurrency", true); + var peg$e153 = peg$literalExpectation("footer-currency", true); + var peg$e154 = peg$literalExpectation("footerTotal", true); + var peg$e155 = peg$literalExpectation("footer-total", true); var peg$f0 = function(ranges) { return { autocomplete, ranges }; }; var peg$f1 = function(filters) { return filters.filter(Boolean).flat(); }; @@ -593,103 +597,105 @@ function peg$parse(input, options) { var peg$f41 = function() { return "policyID"; }; var peg$f42 = function() { return "submitted"; }; var peg$f43 = function() { return "approved"; }; - var peg$f44 = function() { return "paid"; }; - var peg$f45 = function() { return "exported"; }; - var peg$f46 = function() { return "posted"; }; - var peg$f47 = function() { return "withdrawn"; }; - var peg$f48 = function() { return "groupBy"; }; - var peg$f49 = function() { return "limit"; }; - var peg$f50 = function() { return "feed"; }; - var peg$f51 = function() { return "title"; }; - var peg$f52 = function() { return "submitterUserID"; }; - var peg$f53 = function() { return "submitterPayrollID"; }; - var peg$f54 = function() { return "orderDealNumbers"; }; - var peg$f55 = function() { return "assignee"; }; - var peg$f56 = function() { return "createdBy"; }; - var peg$f57 = function() { return "action"; }; - var peg$f58 = function() {return "total"; }; - var peg$f59 = function() {return "has"; }; - var peg$f60 = function() {return "is"; }; - var peg$f61 = function() {return "purchaseAmount"}; - var peg$f62 = function() {return "purchaseCurrency"}; - var peg$f63 = function() {return "amountDebited"}; - var peg$f64 = function() {return "amountReimbursed"}; - var peg$f65 = function() { + var peg$f44 = function() { return "anyApproval"; }; + var peg$f45 = function() { return "anyApproval"; }; + var peg$f46 = function() { return "paid"; }; + var peg$f47 = function() { return "exported"; }; + var peg$f48 = function() { return "posted"; }; + var peg$f49 = function() { return "withdrawn"; }; + var peg$f50 = function() { return "groupBy"; }; + var peg$f51 = function() { return "limit"; }; + var peg$f52 = function() { return "feed"; }; + var peg$f53 = function() { return "title"; }; + var peg$f54 = function() { return "submitterUserID"; }; + var peg$f55 = function() { return "submitterPayrollID"; }; + var peg$f56 = function() { return "orderDealNumbers"; }; + var peg$f57 = function() { return "assignee"; }; + var peg$f58 = function() { return "createdBy"; }; + var peg$f59 = function() { return "action"; }; + var peg$f60 = function() {return "total"; }; + var peg$f61 = function() {return "has"; }; + var peg$f62 = function() {return "is"; }; + var peg$f63 = function() {return "purchaseAmount"}; + var peg$f64 = function() {return "purchaseCurrency"}; + var peg$f65 = function() {return "amountDebited"}; + var peg$f66 = function() {return "amountReimbursed"}; + var peg$f67 = function() { isColumnsContext = true; return "columns"; }; - var peg$f66 = function() {return "view"}; - var peg$f67 = function() {return "compare"}; - var peg$f68 = function() { return isColumnsContext; }; - var peg$f69 = function() { return "perDiem"; }; - var peg$f70 = function() { return "drafts"; }; - var peg$f71 = function() { return "originalamount"; }; - var peg$f72 = function() { return "taxAmount"; }; - var peg$f73 = function() { return "taxrate"; }; - var peg$f74 = function() { return "policyname"; }; - var peg$f75 = function() { return "withdrawalID"; }; - var peg$f76 = function() { return "bankAccount"; }; - var peg$f77 = function() { return "reportID"; }; - var peg$f78 = function() { return "base62ReportID"; }; - var peg$f79 = function() { return "exportedto"; }; - var peg$f80 = function() { return "exportedTo"; }; - var peg$f81 = function() { return "exportedTo"; }; - var peg$f82 = function() { return "exchangeRate"; }; - var peg$f83 = function() { return "reimbursableTotal"; }; - var peg$f84 = function() { return "nonReimbursableTotal"; }; - var peg$f85 = function() { return "groupFrom"; }; - var peg$f86 = function() { return "groupExpenses"; }; - var peg$f87 = function() { return "groupTotal"; }; - var peg$f88 = function() { return "groupCard"; }; - var peg$f89 = function() { return "groupFeed"; }; - var peg$f90 = function() { return "groupBankAccount"; }; - var peg$f91 = function() { return "groupWithdrawn"; }; - var peg$f92 = function() { return "groupWithdrawalID"; }; - var peg$f93 = function() { return "groupAmountDebited"; }; - var peg$f94 = function() { return "groupAmountReimbursed"; }; - var peg$f95 = function() { return "amountDebited"; }; - var peg$f96 = function() { return "amountReimbursed"; }; - var peg$f97 = function() { return "groupCategory"; }; - var peg$f98 = function() { return "groupTag"; }; - var peg$f99 = function() { return "groupMerchant"; }; - var peg$f100 = function() { return "groupday"; }; - var peg$f101 = function() { return "groupmonth"; }; - var peg$f102 = function() { return "groupweek"; }; - var peg$f103 = function() { return "groupyear"; }; - var peg$f104 = function() { return "groupquarter"; }; - var peg$f105 = function() { return "contains"; }; - var peg$f106 = function() { return "eq"; }; - var peg$f107 = function() { return "neq"; }; - var peg$f108 = function() { return "gte"; }; - var peg$f109 = function() { return "gt"; }; - var peg$f110 = function() { return "lte"; }; - var peg$f111 = function() { return "lt"; }; - var peg$f112 = function(o) { + var peg$f68 = function() {return "view"}; + var peg$f69 = function() {return "compare"}; + var peg$f70 = function() { return isColumnsContext; }; + var peg$f71 = function() { return "perDiem"; }; + var peg$f72 = function() { return "drafts"; }; + var peg$f73 = function() { return "originalamount"; }; + var peg$f74 = function() { return "taxAmount"; }; + var peg$f75 = function() { return "taxrate"; }; + var peg$f76 = function() { return "policyname"; }; + var peg$f77 = function() { return "withdrawalID"; }; + var peg$f78 = function() { return "bankAccount"; }; + var peg$f79 = function() { return "reportID"; }; + var peg$f80 = function() { return "base62ReportID"; }; + var peg$f81 = function() { return "exportedto"; }; + var peg$f82 = function() { return "exportedTo"; }; + var peg$f83 = function() { return "exportedTo"; }; + var peg$f84 = function() { return "exchangeRate"; }; + var peg$f85 = function() { return "reimbursableTotal"; }; + var peg$f86 = function() { return "nonReimbursableTotal"; }; + var peg$f87 = function() { return "groupFrom"; }; + var peg$f88 = function() { return "groupExpenses"; }; + var peg$f89 = function() { return "groupTotal"; }; + var peg$f90 = function() { return "groupCard"; }; + var peg$f91 = function() { return "groupFeed"; }; + var peg$f92 = function() { return "groupBankAccount"; }; + var peg$f93 = function() { return "groupWithdrawn"; }; + var peg$f94 = function() { return "groupWithdrawalID"; }; + var peg$f95 = function() { return "groupAmountDebited"; }; + var peg$f96 = function() { return "groupAmountReimbursed"; }; + var peg$f97 = function() { return "amountDebited"; }; + var peg$f98 = function() { return "amountReimbursed"; }; + var peg$f99 = function() { return "groupCategory"; }; + var peg$f100 = function() { return "groupTag"; }; + var peg$f101 = function() { return "groupMerchant"; }; + var peg$f102 = function() { return "groupday"; }; + var peg$f103 = function() { return "groupmonth"; }; + var peg$f104 = function() { return "groupweek"; }; + var peg$f105 = function() { return "groupyear"; }; + var peg$f106 = function() { return "groupquarter"; }; + var peg$f107 = function() { return "contains"; }; + var peg$f108 = function() { return "eq"; }; + var peg$f109 = function() { return "neq"; }; + var peg$f110 = function() { return "gte"; }; + var peg$f111 = function() { return "gt"; }; + var peg$f112 = function() { return "lte"; }; + var peg$f113 = function() { return "lt"; }; + var peg$f114 = function(o) { if (nameOperator) { expectingNestedQuote = (o === "eq" || o === "contains"); } isColumnsContext = false; return o; }; - var peg$f113 = function(c) { return c; }; - var peg$f114 = function(chars) { return chars.join("").trim(); }; - var peg$f115 = function() { + var peg$f115 = function(c) { return c; }; + var peg$f116 = function(chars) { return chars.join("").trim(); }; + var peg$f117 = function() { isColumnsContext = false; return "and"; }; - var peg$f116 = function() { return expectingNestedQuote; }; - var peg$f117 = function(start, inner, end) { //handle no-breaking space + var peg$f118 = function() { return expectingNestedQuote; }; + var peg$f119 = function(start, inner, end) { //handle no-breaking space return [...start, '"', ...inner, '"', ...end].join(""); }; - var peg$f118 = function(start) {return "“"}; - var peg$f119 = function(start) {return "”"}; - var peg$f120 = function(start) {return "\""}; - var peg$f121 = function(start, inner, end) { + var peg$f120 = function(start) {return "“"}; + var peg$f121 = function(start) {return "”"}; + var peg$f122 = function(start) {return "\""}; + var peg$f123 = function(start, inner, end) { return [...start, '"', ...inner, '"'].join(""); }; - var peg$f122 = function() { return "footerCount"; }; - var peg$f123 = function() { return "footerCurrency"; }; - var peg$f124 = function() { return "footerTotal"; }; + var peg$f124 = function() { return "footerCount"; }; + var peg$f125 = function() { return "footerCurrency"; }; + var peg$f126 = function() { return "footerTotal"; }; var peg$currPos = options.peg$currPos | 0; var peg$savedPos = peg$currPos; var peg$posDetailsCache = [{ line: 1, column: 1 }]; @@ -1168,59 +1174,62 @@ function peg$parse(input, options) { if (s1 === peg$FAILED) { s1 = peg$parsesubmitted(); if (s1 === peg$FAILED) { - s1 = peg$parseapproved(); + s1 = peg$parseanyApproval(); if (s1 === peg$FAILED) { - s1 = peg$parsepaid(); + s1 = peg$parseapproved(); if (s1 === peg$FAILED) { - s1 = peg$parseexportedTo(); + s1 = peg$parsepaid(); if (s1 === peg$FAILED) { - s1 = peg$parseexported(); + s1 = peg$parseexportedTo(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawn(); + s1 = peg$parseexported(); if (s1 === peg$FAILED) { - s1 = peg$parseposted(); + s1 = peg$parsewithdrawn(); if (s1 === peg$FAILED) { - s1 = peg$parsehas(); + s1 = peg$parseposted(); if (s1 === peg$FAILED) { - s1 = peg$parseis(); + s1 = peg$parsehas(); if (s1 === peg$FAILED) { - s1 = peg$parsepurchaseCurrency(); + s1 = peg$parseis(); if (s1 === peg$FAILED) { - s1 = peg$parsepurchaseAmount(); + s1 = peg$parsepurchaseCurrency(); if (s1 === peg$FAILED) { - s1 = peg$parseamountDebited(); + s1 = peg$parsepurchaseAmount(); if (s1 === peg$FAILED) { - s1 = peg$parseamountReimbursed(); + s1 = peg$parseamountDebited(); if (s1 === peg$FAILED) { - s1 = peg$parseamount(); + s1 = peg$parseamountReimbursed(); if (s1 === peg$FAILED) { - s1 = peg$parsemerchant(); + s1 = peg$parseamount(); if (s1 === peg$FAILED) { - s1 = peg$parsedescription(); + s1 = peg$parsemerchant(); if (s1 === peg$FAILED) { - s1 = peg$parsereportID(); + s1 = peg$parsedescription(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawalID(); + s1 = peg$parsereportID(); if (s1 === peg$FAILED) { - s1 = peg$parsetitle(); + s1 = peg$parsewithdrawalID(); if (s1 === peg$FAILED) { - s1 = peg$parsesubmitterUserID(); + s1 = peg$parsetitle(); if (s1 === peg$FAILED) { - s1 = peg$parsesubmitterPayrollID(); + s1 = peg$parsesubmitterUserID(); if (s1 === peg$FAILED) { - s1 = peg$parseorderDealNumbers(); + s1 = peg$parsesubmitterPayrollID(); if (s1 === peg$FAILED) { - s1 = peg$parsereportFieldDynamic(); + s1 = peg$parseorderDealNumbers(); if (s1 === peg$FAILED) { - s1 = peg$parsecolumns(); + s1 = peg$parsereportFieldDynamic(); if (s1 === peg$FAILED) { - s1 = peg$parselimit(); + s1 = peg$parsecolumns(); if (s1 === peg$FAILED) { - s1 = peg$parsefooterCount(); + s1 = peg$parselimit(); if (s1 === peg$FAILED) { - s1 = peg$parsefooterCurrency(); + s1 = peg$parsefooterCount(); if (s1 === peg$FAILED) { - s1 = peg$parsefooterTotal(); + s1 = peg$parsefooterCurrency(); + if (s1 === peg$FAILED) { + s1 = peg$parsefooterTotal(); + } } } } @@ -2247,13 +2256,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsepaid() { + function peg$parseanyApproval() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 4); + s1 = input.substr(peg$currPos, 11); if (s1.toLowerCase() === peg$c56) { - peg$currPos += 4; + peg$currPos += 11; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e59); } @@ -2263,6 +2272,41 @@ function peg$parse(input, options) { s1 = peg$f44(); } s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 12); + if (s1.toLowerCase() === peg$c57) { + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e60); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f45(); + } + s0 = s1; + } + + return s0; + } + + function peg$parsepaid() { + var s0, s1; + + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 4); + if (s1.toLowerCase() === peg$c58) { + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e61); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f46(); + } + s0 = s1; return s0; } @@ -2272,15 +2316,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c57) { + if (s1.toLowerCase() === peg$c59) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e60); } + if (peg$silentFails === 0) { peg$fail(peg$e62); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f45(); + s1 = peg$f47(); } s0 = s1; @@ -2292,15 +2336,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c58) { + if (s1.toLowerCase() === peg$c60) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e61); } + if (peg$silentFails === 0) { peg$fail(peg$e63); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f46(); + s1 = peg$f48(); } s0 = s1; @@ -2312,15 +2356,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c59) { + if (s1.toLowerCase() === peg$c61) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e62); } + if (peg$silentFails === 0) { peg$fail(peg$e64); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f47(); + s1 = peg$f49(); } s0 = s1; @@ -2331,24 +2375,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 7); - if (s0.toLowerCase() === peg$c60) { + if (s0.toLowerCase() === peg$c62) { peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e63); } + if (peg$silentFails === 0) { peg$fail(peg$e65); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c61) { + if (s1.toLowerCase() === peg$c63) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e64); } + if (peg$silentFails === 0) { peg$fail(peg$e66); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f48(); + s1 = peg$f50(); } s0 = s1; } @@ -2361,15 +2405,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c62) { + if (s1.toLowerCase() === peg$c64) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e65); } + if (peg$silentFails === 0) { peg$fail(peg$e67); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f49(); + s1 = peg$f51(); } s0 = s1; @@ -2381,15 +2425,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c63) { + if (s1.toLowerCase() === peg$c65) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e66); } + if (peg$silentFails === 0) { peg$fail(peg$e68); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f50(); + s1 = peg$f52(); } s0 = s1; @@ -2401,15 +2445,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c64) { + if (s1.toLowerCase() === peg$c66) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e67); } + if (peg$silentFails === 0) { peg$fail(peg$e69); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f51(); + s1 = peg$f53(); } s0 = s1; @@ -2420,24 +2464,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 15); - if (s0.toLowerCase() === peg$c65) { + if (s0.toLowerCase() === peg$c67) { peg$currPos += 15; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e68); } + if (peg$silentFails === 0) { peg$fail(peg$e70); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c66) { + if (s1.toLowerCase() === peg$c68) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e69); } + if (peg$silentFails === 0) { peg$fail(peg$e71); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f52(); + s1 = peg$f54(); } s0 = s1; } @@ -2449,24 +2493,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 18); - if (s0.toLowerCase() === peg$c67) { + if (s0.toLowerCase() === peg$c69) { peg$currPos += 18; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e70); } + if (peg$silentFails === 0) { peg$fail(peg$e72); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c68) { + if (s1.toLowerCase() === peg$c70) { peg$currPos += 20; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e71); } + if (peg$silentFails === 0) { peg$fail(peg$e73); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f53(); + s1 = peg$f55(); } s0 = s1; } @@ -2478,24 +2522,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c69) { + if (s0.toLowerCase() === peg$c71) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e72); } + if (peg$silentFails === 0) { peg$fail(peg$e74); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c70) { + if (s1.toLowerCase() === peg$c72) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e73); } + if (peg$silentFails === 0) { peg$fail(peg$e75); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f54(); + s1 = peg$f56(); } s0 = s1; } @@ -2508,15 +2552,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c71) { + if (s1.toLowerCase() === peg$c73) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e74); } + if (peg$silentFails === 0) { peg$fail(peg$e76); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f55(); + s1 = peg$f57(); } s0 = s1; @@ -2527,24 +2571,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 9); - if (s0.toLowerCase() === peg$c72) { + if (s0.toLowerCase() === peg$c74) { peg$currPos += 9; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e75); } + if (peg$silentFails === 0) { peg$fail(peg$e77); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c73) { + if (s1.toLowerCase() === peg$c75) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e76); } + if (peg$silentFails === 0) { peg$fail(peg$e78); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f56(); + s1 = peg$f58(); } s0 = s1; } @@ -2557,15 +2601,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c74) { + if (s1.toLowerCase() === peg$c76) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e77); } + if (peg$silentFails === 0) { peg$fail(peg$e79); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f57(); + s1 = peg$f59(); } s0 = s1; @@ -2577,15 +2621,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c75) { + if (s1.toLowerCase() === peg$c77) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e78); } + if (peg$silentFails === 0) { peg$fail(peg$e80); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f58(); + s1 = peg$f60(); } s0 = s1; @@ -2597,15 +2641,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c76) { + if (s1.toLowerCase() === peg$c78) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e79); } + if (peg$silentFails === 0) { peg$fail(peg$e81); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f59(); + s1 = peg$f61(); } s0 = s1; @@ -2617,15 +2661,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 2); - if (s1.toLowerCase() === peg$c77) { + if (s1.toLowerCase() === peg$c79) { peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e80); } + if (peg$silentFails === 0) { peg$fail(peg$e82); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f60(); + s1 = peg$f62(); } s0 = s1; @@ -2636,24 +2680,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 14); - if (s0.toLowerCase() === peg$c78) { + if (s0.toLowerCase() === peg$c80) { peg$currPos += 14; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e81); } + if (peg$silentFails === 0) { peg$fail(peg$e83); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c81) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e82); } + if (peg$silentFails === 0) { peg$fail(peg$e84); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f61(); + s1 = peg$f63(); } s0 = s1; } @@ -2665,24 +2709,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c80) { + if (s0.toLowerCase() === peg$c82) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e83); } + if (peg$silentFails === 0) { peg$fail(peg$e85); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c83) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e84); } + if (peg$silentFails === 0) { peg$fail(peg$e86); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f62(); + s1 = peg$f64(); } s0 = s1; } @@ -2694,24 +2738,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 13); - if (s0.toLowerCase() === peg$c82) { + if (s0.toLowerCase() === peg$c84) { peg$currPos += 13; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e85); } + if (peg$silentFails === 0) { peg$fail(peg$e87); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c85) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e86); } + if (peg$silentFails === 0) { peg$fail(peg$e88); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f63(); + s1 = peg$f65(); } s0 = s1; } @@ -2723,24 +2767,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c84) { + if (s0.toLowerCase() === peg$c86) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e87); } + if (peg$silentFails === 0) { peg$fail(peg$e89); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e90); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f64(); + s1 = peg$f66(); } s0 = s1; } @@ -2753,15 +2797,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c86) { + if (s1.toLowerCase() === peg$c88) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e89); } + if (peg$silentFails === 0) { peg$fail(peg$e91); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f65(); + s1 = peg$f67(); } s0 = s1; @@ -2773,15 +2817,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c87) { + if (s1.toLowerCase() === peg$c89) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e90); } + if (peg$silentFails === 0) { peg$fail(peg$e92); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f66(); + s1 = peg$f68(); } s0 = s1; @@ -2793,15 +2837,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c88) { + if (s1.toLowerCase() === peg$c90) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e91); } + if (peg$silentFails === 0) { peg$fail(peg$e93); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f67(); + s1 = peg$f69(); } s0 = s1; @@ -2813,7 +2857,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f68(); + s1 = peg$f70(); if (s1) { s1 = undefined; } else { @@ -2948,11 +2992,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c89) { + if (s1.toLowerCase() === peg$c91) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e92); } + if (peg$silentFails === 0) { peg$fail(peg$e94); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -2967,7 +3011,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f69(); + s0 = peg$f71(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -2985,19 +3029,19 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c90) { + if (s1.toLowerCase() === peg$c92) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e93); } + if (peg$silentFails === 0) { peg$fail(peg$e95); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c91) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e94); } + if (peg$silentFails === 0) { peg$fail(peg$e96); } } } if (s1 !== peg$FAILED) { @@ -3013,7 +3057,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f70(); + s0 = peg$f72(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3031,11 +3075,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c81) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e82); } + if (peg$silentFails === 0) { peg$fail(peg$e84); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3050,7 +3094,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f71(); + s0 = peg$f73(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3068,11 +3112,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c94) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e95); } + if (peg$silentFails === 0) { peg$fail(peg$e97); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3087,7 +3131,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f72(); + s0 = peg$f74(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3124,7 +3168,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f73(); + s0 = peg$f75(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3142,11 +3186,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c93) { + if (s1.toLowerCase() === peg$c95) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e96); } + if (peg$silentFails === 0) { peg$fail(peg$e98); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3161,7 +3205,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f74(); + s0 = peg$f76(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3198,7 +3242,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f75(); + s0 = peg$f77(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3235,7 +3279,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f76(); + s0 = peg$f78(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3253,11 +3297,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c94) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e97); } + if (peg$silentFails === 0) { peg$fail(peg$e99); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3272,7 +3316,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f77(); + s0 = peg$f79(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3309,7 +3353,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f78(); + s0 = peg$f80(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3327,11 +3371,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e100); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3346,7 +3390,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f79(); + s0 = peg$f81(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3371,7 +3415,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e99); } + if (peg$silentFails === 0) { peg$fail(peg$e101); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; @@ -3390,11 +3434,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c96) { + if (s1.toLowerCase() === peg$c98) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e100); } + if (peg$silentFails === 0) { peg$fail(peg$e102); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3409,7 +3453,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f80(); + s0 = peg$f82(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3421,11 +3465,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e100); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3440,7 +3484,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f81(); + s0 = peg$f83(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3459,11 +3503,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c97) { + if (s1.toLowerCase() === peg$c99) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e101); } + if (peg$silentFails === 0) { peg$fail(peg$e103); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3478,7 +3522,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f82(); + s0 = peg$f84(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3496,11 +3540,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c98) { + if (s1.toLowerCase() === peg$c100) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e102); } + if (peg$silentFails === 0) { peg$fail(peg$e104); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3515,7 +3559,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f83(); + s0 = peg$f85(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3533,11 +3577,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 22); - if (s1.toLowerCase() === peg$c99) { + if (s1.toLowerCase() === peg$c101) { peg$currPos += 22; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e103); } + if (peg$silentFails === 0) { peg$fail(peg$e105); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3552,7 +3596,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f84(); + s0 = peg$f86(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3570,11 +3614,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c100) { + if (s1.toLowerCase() === peg$c102) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e104); } + if (peg$silentFails === 0) { peg$fail(peg$e106); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3589,7 +3633,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f85(); + s0 = peg$f87(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3607,11 +3651,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c101) { + if (s1.toLowerCase() === peg$c103) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e105); } + if (peg$silentFails === 0) { peg$fail(peg$e107); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3626,7 +3670,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f86(); + s0 = peg$f88(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3644,11 +3688,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c102) { + if (s1.toLowerCase() === peg$c104) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e106); } + if (peg$silentFails === 0) { peg$fail(peg$e108); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3663,7 +3707,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f87(); + s0 = peg$f89(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3681,11 +3725,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c103) { + if (s1.toLowerCase() === peg$c105) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e107); } + if (peg$silentFails === 0) { peg$fail(peg$e109); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3700,7 +3744,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f88(); + s0 = peg$f90(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3718,11 +3762,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c104) { + if (s1.toLowerCase() === peg$c106) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e108); } + if (peg$silentFails === 0) { peg$fail(peg$e110); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3737,7 +3781,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f89(); + s0 = peg$f91(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3755,11 +3799,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c105) { + if (s1.toLowerCase() === peg$c107) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e109); } + if (peg$silentFails === 0) { peg$fail(peg$e111); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3774,7 +3818,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f90(); + s0 = peg$f92(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3792,11 +3836,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c106) { + if (s1.toLowerCase() === peg$c108) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e110); } + if (peg$silentFails === 0) { peg$fail(peg$e112); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3811,7 +3855,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f91(); + s0 = peg$f93(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3829,11 +3873,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 19); - if (s1.toLowerCase() === peg$c107) { + if (s1.toLowerCase() === peg$c109) { peg$currPos += 19; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e111); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3848,7 +3892,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f92(); + s0 = peg$f94(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3866,11 +3910,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c108) { + if (s1.toLowerCase() === peg$c110) { peg$currPos += 20; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e112); } + if (peg$silentFails === 0) { peg$fail(peg$e114); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3885,7 +3929,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f93(); + s0 = peg$f95(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3903,11 +3947,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 23); - if (s1.toLowerCase() === peg$c109) { + if (s1.toLowerCase() === peg$c111) { peg$currPos += 23; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e113); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3922,7 +3966,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f94(); + s0 = peg$f96(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3940,11 +3984,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c85) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e86); } + if (peg$silentFails === 0) { peg$fail(peg$e88); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3959,7 +4003,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f95(); + s0 = peg$f97(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3977,11 +4021,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e90); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3996,7 +4040,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f96(); + s0 = peg$f98(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4014,11 +4058,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c110) { + if (s1.toLowerCase() === peg$c112) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4033,7 +4077,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f97(); + s0 = peg$f99(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4051,11 +4095,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c111) { + if (s1.toLowerCase() === peg$c113) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e115); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4070,7 +4114,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f98(); + s0 = peg$f100(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4088,11 +4132,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c112) { + if (s1.toLowerCase() === peg$c114) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4107,7 +4151,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f99(); + s0 = peg$f101(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4125,11 +4169,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c113) { + if (s1.toLowerCase() === peg$c115) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4144,7 +4188,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f100(); + s0 = peg$f102(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4162,11 +4206,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c114) { + if (s1.toLowerCase() === peg$c116) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e120); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4181,7 +4225,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f101(); + s0 = peg$f103(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4199,11 +4243,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c115) { + if (s1.toLowerCase() === peg$c117) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e121); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4218,7 +4262,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f102(); + s0 = peg$f104(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4236,11 +4280,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c116) { + if (s1.toLowerCase() === peg$c118) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4255,7 +4299,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f103(); + s0 = peg$f105(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4273,11 +4317,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c117) { + if (s1.toLowerCase() === peg$c119) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4292,7 +4336,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f104(); + s0 = peg$f106(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4310,16 +4354,16 @@ function peg$parse(input, options) { peg$silentFails++; s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c118) { - s1 = peg$c118; + if (input.substr(peg$currPos, 2) === peg$c120) { + s1 = peg$c120; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e123); } + if (peg$silentFails === 0) { peg$fail(peg$e125); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f105(); + s1 = peg$f107(); } s0 = s1; if (s0 === peg$FAILED) { @@ -4329,81 +4373,81 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e99); } + if (peg$silentFails === 0) { peg$fail(peg$e101); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f106(); + s1 = peg$f108(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c119) { - s1 = peg$c119; + if (input.substr(peg$currPos, 2) === peg$c121) { + s1 = peg$c121; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e124); } + if (peg$silentFails === 0) { peg$fail(peg$e126); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f107(); + s1 = peg$f109(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c120) { - s1 = peg$c120; + if (input.substr(peg$currPos, 2) === peg$c122) { + s1 = peg$c122; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e125); } + if (peg$silentFails === 0) { peg$fail(peg$e127); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f108(); + s1 = peg$f110(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 62) { - s1 = peg$c121; + s1 = peg$c123; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e126); } + if (peg$silentFails === 0) { peg$fail(peg$e128); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f109(); + s1 = peg$f111(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c122) { - s1 = peg$c122; + if (input.substr(peg$currPos, 2) === peg$c124) { + s1 = peg$c124; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e127); } + if (peg$silentFails === 0) { peg$fail(peg$e129); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f110(); + s1 = peg$f112(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 60) { - s1 = peg$c123; + s1 = peg$c125; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e130); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f111(); + s1 = peg$f113(); } s0 = s1; } @@ -4415,7 +4459,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e124); } } return s0; @@ -4428,7 +4472,7 @@ function peg$parse(input, options) { s1 = peg$parseoperator(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f112(s1); + s1 = peg$f114(s1); } s0 = s1; @@ -4440,11 +4484,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c124; + s1 = peg$c126; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e129); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } if (s1 !== peg$FAILED) { s2 = input.charAt(peg$currPos); @@ -4452,11 +4496,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f113(s2); + s0 = peg$f115(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4482,7 +4526,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } } if (s2 !== peg$FAILED) { @@ -4495,7 +4539,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } } } @@ -4504,13 +4548,13 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f114(s1); + s1 = peg$f116(s1); } s0 = s1; peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } } return s0; @@ -4522,7 +4566,7 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parse_(); peg$savedPos = s0; - s1 = peg$f115(); + s1 = peg$f117(); s0 = s1; return s0; @@ -4538,7 +4582,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } while (s1 !== peg$FAILED) { s0.push(s1); @@ -4547,12 +4591,12 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } } peg$silentFails--; s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } return s0; } @@ -4562,7 +4606,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f116(); + s1 = peg$f118(); if (s1) { s1 = undefined; } else { @@ -4599,7 +4643,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4608,7 +4652,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } } s2 = input.charAt(peg$currPos); @@ -4616,7 +4660,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4627,7 +4671,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } } while (s4 !== peg$FAILED) { @@ -4639,7 +4683,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } } } @@ -4648,7 +4692,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s4 !== peg$FAILED) { s5 = []; @@ -4657,7 +4701,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } while (s6 !== peg$FAILED) { s5.push(s6); @@ -4666,11 +4710,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } } peg$savedPos = s0; - s0 = peg$f117(s1, s3, s5); + s0 = peg$f119(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4682,7 +4726,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } return s0; @@ -4699,7 +4743,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4708,7 +4752,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } } s2 = input.charAt(peg$currPos); @@ -4716,7 +4760,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4727,7 +4771,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4743,15 +4787,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c125; + s6 = peg$c127; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f118(s1); + s4 = peg$f120(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4774,15 +4818,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c126; + s6 = peg$c128; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f119(s1); + s4 = peg$f121(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4805,15 +4849,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c127; + s6 = peg$c129; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f120(s1); + s4 = peg$f122(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4835,7 +4879,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4851,15 +4895,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c125; + s6 = peg$c127; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f118(s1); + s4 = peg$f120(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4882,15 +4926,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c126; + s6 = peg$c128; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f119(s1); + s4 = peg$f121(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4913,15 +4957,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c127; + s6 = peg$c129; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f120(s1); + s4 = peg$f122(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4938,7 +4982,7 @@ function peg$parse(input, options) { s4 = peg$parseclosingQuote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f121(s1, s3, s4); + s0 = peg$f123(s1, s3, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4950,7 +4994,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } } return s0; @@ -4965,7 +5009,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -5003,7 +5047,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e144); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -5012,7 +5056,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e144); } } } s2 = []; @@ -5021,7 +5065,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e143); } + if (peg$silentFails === 0) { peg$fail(peg$e145); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -5030,7 +5074,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e143); } + if (peg$silentFails === 0) { peg$fail(peg$e145); } } } s3 = []; @@ -5039,7 +5083,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e144); } + if (peg$silentFails === 0) { peg$fail(peg$e146); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -5048,7 +5092,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e144); } + if (peg$silentFails === 0) { peg$fail(peg$e146); } } } s4 = peg$parseoperator(); @@ -5067,7 +5111,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e145); } + if (peg$silentFails === 0) { peg$fail(peg$e147); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -5076,7 +5120,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e145); } + if (peg$silentFails === 0) { peg$fail(peg$e147); } } } s2 = peg$currPos; @@ -5123,7 +5167,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e146); } + if (peg$silentFails === 0) { peg$fail(peg$e148); } } } } @@ -5139,7 +5183,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e147); } + if (peg$silentFails === 0) { peg$fail(peg$e149); } } if (s0 === peg$FAILED) { s0 = peg$currPos; @@ -5168,24 +5212,24 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c128) { + if (s1.toLowerCase() === peg$c130) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e148); } + if (peg$silentFails === 0) { peg$fail(peg$e150); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c129) { + if (s1.toLowerCase() === peg$c131) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e149); } + if (peg$silentFails === 0) { peg$fail(peg$e151); } } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f122(); + s1 = peg$f124(); } s0 = s1; @@ -5197,24 +5241,24 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c130) { + if (s1.toLowerCase() === peg$c132) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e150); } + if (peg$silentFails === 0) { peg$fail(peg$e152); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c131) { + if (s1.toLowerCase() === peg$c133) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e151); } + if (peg$silentFails === 0) { peg$fail(peg$e153); } } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f123(); + s1 = peg$f125(); } s0 = s1; @@ -5226,24 +5270,24 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c132) { + if (s1.toLowerCase() === peg$c134) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e152); } + if (peg$silentFails === 0) { peg$fail(peg$e154); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c133) { + if (s1.toLowerCase() === peg$c135) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e153); } + if (peg$silentFails === 0) { peg$fail(peg$e155); } } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f124(); + s1 = peg$f126(); } s0 = s1; diff --git a/src/libs/SearchParser/autocompleteParser.peggy b/src/libs/SearchParser/autocompleteParser.peggy index faedf94501c3..c85bf26ec469 100644 --- a/src/libs/SearchParser/autocompleteParser.peggy +++ b/src/libs/SearchParser/autocompleteParser.peggy @@ -115,6 +115,7 @@ autocompleteKey "key" / action / date / submitted + / anyApproval / approved / paid / exportedTo diff --git a/src/libs/SearchParser/baseRules.peggy b/src/libs/SearchParser/baseRules.peggy index 1abb9f1bb854..58e8db687330 100644 --- a/src/libs/SearchParser/baseRules.peggy +++ b/src/libs/SearchParser/baseRules.peggy @@ -82,6 +82,9 @@ policyID / "workspace"i { return "policyID"; } submitted = "submitted"i { return "submitted"; } approved = "approved"i { return "approved"; } +anyApproval + = "anyApproval"i { return "anyApproval"; } + / "any-approval"i { return "anyApproval"; } paid = "paid"i { return "paid"; } exported = "exported"i { return "exported"; } posted = "posted"i { return "posted"; } diff --git a/src/libs/SearchParser/searchParser.js b/src/libs/SearchParser/searchParser.js index 1a9f6d7b71be..e847d7ed3815 100644 --- a/src/libs/SearchParser/searchParser.js +++ b/src/libs/SearchParser/searchParser.js @@ -240,84 +240,86 @@ function peg$parse(input, options) { var peg$c53 = "workspace"; var peg$c54 = "submitted"; var peg$c55 = "approved"; - var peg$c56 = "paid"; - var peg$c57 = "exported"; - var peg$c58 = "posted"; - var peg$c59 = "withdrawn"; - var peg$c60 = "groupby"; - var peg$c61 = "group-by"; - var peg$c62 = "limit"; - var peg$c63 = "feed"; - var peg$c64 = "title"; - var peg$c65 = "submitteruserid"; - var peg$c66 = "submitter-user-id"; - var peg$c67 = "submitterpayrollid"; - var peg$c68 = "submitter-payroll-id"; - var peg$c69 = "orderdealnumbers"; - var peg$c70 = "order-deal-numbers"; - var peg$c71 = "assignee"; - var peg$c72 = "createdby"; - var peg$c73 = "created-by"; - var peg$c74 = "action"; - var peg$c75 = "total"; - var peg$c76 = "has"; - var peg$c77 = "is"; - var peg$c78 = "purchaseamount"; - var peg$c79 = "purchase-amount"; - var peg$c80 = "purchasecurrency"; - var peg$c81 = "purchase-currency"; - var peg$c82 = "amountdebited"; - var peg$c83 = "amount-debited"; - var peg$c84 = "amountreimbursed"; - var peg$c85 = "amount-reimbursed"; - var peg$c86 = "columns"; - var peg$c87 = "view"; - var peg$c88 = "compare"; - var peg$c89 = "per-diem"; - var peg$c90 = "drafts"; - var peg$c91 = "draft"; - var peg$c92 = "tax"; - var peg$c93 = "policy-name"; - var peg$c94 = "long-report-id"; - var peg$c95 = "exported-to"; - var peg$c96 = "exportedto"; - var peg$c97 = "exchange-rate"; - var peg$c98 = "reimbursable-total"; - var peg$c99 = "non-reimbursable-total"; - var peg$c100 = "group-from"; - var peg$c101 = "group-expenses"; - var peg$c102 = "group-total"; - var peg$c103 = "group-card"; - var peg$c104 = "group-feed"; - var peg$c105 = "group-bank-account"; - var peg$c106 = "group-withdrawn"; - var peg$c107 = "group-withdrawal-id"; - var peg$c108 = "group-amount-debited"; - var peg$c109 = "group-amount-reimbursed"; - var peg$c110 = "group-category"; - var peg$c111 = "group-tag"; - var peg$c112 = "group-merchant"; - var peg$c113 = "group-day"; - var peg$c114 = "group-month"; - var peg$c115 = "group-week"; - var peg$c116 = "group-year"; - var peg$c117 = "group-quarter"; - var peg$c118 = "*:"; - var peg$c119 = "!="; - var peg$c120 = ">="; - var peg$c121 = ">"; - var peg$c122 = "<="; - var peg$c123 = "<"; - var peg$c124 = "\\"; - var peg$c125 = "\u201C"; - var peg$c126 = "\u201D"; - var peg$c127 = "\""; - var peg$c128 = "footercount"; - var peg$c129 = "footer-count"; - var peg$c130 = "footercurrency"; - var peg$c131 = "footer-currency"; - var peg$c132 = "footertotal"; - var peg$c133 = "footer-total"; + var peg$c56 = "anyapproval"; + var peg$c57 = "any-approval"; + var peg$c58 = "paid"; + var peg$c59 = "exported"; + var peg$c60 = "posted"; + var peg$c61 = "withdrawn"; + var peg$c62 = "groupby"; + var peg$c63 = "group-by"; + var peg$c64 = "limit"; + var peg$c65 = "feed"; + var peg$c66 = "title"; + var peg$c67 = "submitteruserid"; + var peg$c68 = "submitter-user-id"; + var peg$c69 = "submitterpayrollid"; + var peg$c70 = "submitter-payroll-id"; + var peg$c71 = "orderdealnumbers"; + var peg$c72 = "order-deal-numbers"; + var peg$c73 = "assignee"; + var peg$c74 = "createdby"; + var peg$c75 = "created-by"; + var peg$c76 = "action"; + var peg$c77 = "total"; + var peg$c78 = "has"; + var peg$c79 = "is"; + var peg$c80 = "purchaseamount"; + var peg$c81 = "purchase-amount"; + var peg$c82 = "purchasecurrency"; + var peg$c83 = "purchase-currency"; + var peg$c84 = "amountdebited"; + var peg$c85 = "amount-debited"; + var peg$c86 = "amountreimbursed"; + var peg$c87 = "amount-reimbursed"; + var peg$c88 = "columns"; + var peg$c89 = "view"; + var peg$c90 = "compare"; + var peg$c91 = "per-diem"; + var peg$c92 = "drafts"; + var peg$c93 = "draft"; + var peg$c94 = "tax"; + var peg$c95 = "policy-name"; + var peg$c96 = "long-report-id"; + var peg$c97 = "exported-to"; + var peg$c98 = "exportedto"; + var peg$c99 = "exchange-rate"; + var peg$c100 = "reimbursable-total"; + var peg$c101 = "non-reimbursable-total"; + var peg$c102 = "group-from"; + var peg$c103 = "group-expenses"; + var peg$c104 = "group-total"; + var peg$c105 = "group-card"; + var peg$c106 = "group-feed"; + var peg$c107 = "group-bank-account"; + var peg$c108 = "group-withdrawn"; + var peg$c109 = "group-withdrawal-id"; + var peg$c110 = "group-amount-debited"; + var peg$c111 = "group-amount-reimbursed"; + var peg$c112 = "group-category"; + var peg$c113 = "group-tag"; + var peg$c114 = "group-merchant"; + var peg$c115 = "group-day"; + var peg$c116 = "group-month"; + var peg$c117 = "group-week"; + var peg$c118 = "group-year"; + var peg$c119 = "group-quarter"; + var peg$c120 = "*:"; + var peg$c121 = "!="; + var peg$c122 = ">="; + var peg$c123 = ">"; + var peg$c124 = "<="; + var peg$c125 = "<"; + var peg$c126 = "\\"; + var peg$c127 = "\u201C"; + var peg$c128 = "\u201D"; + var peg$c129 = "\""; + var peg$c130 = "footercount"; + var peg$c131 = "footer-count"; + var peg$c132 = "footercurrency"; + var peg$c133 = "footer-currency"; + var peg$c134 = "footertotal"; + var peg$c135 = "footer-total"; var peg$r0 = /^[^ \t\r\n\xA0]/; var peg$r1 = /^[ \t\r\n\xA0,:=<>!]/; @@ -396,101 +398,103 @@ function peg$parse(input, options) { var peg$e58 = peg$literalExpectation("workspace", true); var peg$e59 = peg$literalExpectation("submitted", true); var peg$e60 = peg$literalExpectation("approved", true); - var peg$e61 = peg$literalExpectation("paid", true); - var peg$e62 = peg$literalExpectation("exported", true); - var peg$e63 = peg$literalExpectation("posted", true); - var peg$e64 = peg$literalExpectation("withdrawn", true); - var peg$e65 = peg$literalExpectation("groupBy", true); - var peg$e66 = peg$literalExpectation("group-by", true); - var peg$e67 = peg$literalExpectation("limit", true); - var peg$e68 = peg$literalExpectation("feed", true); - var peg$e69 = peg$literalExpectation("title", true); - var peg$e70 = peg$literalExpectation("submitterUserID", true); - var peg$e71 = peg$literalExpectation("submitter-user-id", true); - var peg$e72 = peg$literalExpectation("submitterPayrollID", true); - var peg$e73 = peg$literalExpectation("submitter-payroll-id", true); - var peg$e74 = peg$literalExpectation("orderDealNumbers", true); - var peg$e75 = peg$literalExpectation("order-deal-numbers", true); - var peg$e76 = peg$literalExpectation("assignee", true); - var peg$e77 = peg$literalExpectation("createdBy", true); - var peg$e78 = peg$literalExpectation("created-by", true); - var peg$e79 = peg$literalExpectation("action", true); - var peg$e80 = peg$literalExpectation("total", true); - var peg$e81 = peg$literalExpectation("has", true); - var peg$e82 = peg$literalExpectation("is", true); - var peg$e83 = peg$literalExpectation("purchaseAmount", true); - var peg$e84 = peg$literalExpectation("purchase-amount", true); - var peg$e85 = peg$literalExpectation("purchaseCurrency", true); - var peg$e86 = peg$literalExpectation("purchase-currency", true); - var peg$e87 = peg$literalExpectation("amountDebited", true); - var peg$e88 = peg$literalExpectation("amount-debited", true); - var peg$e89 = peg$literalExpectation("amountReimbursed", true); - var peg$e90 = peg$literalExpectation("amount-reimbursed", true); - var peg$e91 = peg$literalExpectation("columns", true); - var peg$e92 = peg$literalExpectation("view", true); - var peg$e93 = peg$literalExpectation("compare", true); - var peg$e94 = peg$literalExpectation("per-diem", true); - var peg$e95 = peg$literalExpectation("drafts", true); - var peg$e96 = peg$literalExpectation("draft", true); - var peg$e97 = peg$literalExpectation("tax", true); - var peg$e98 = peg$literalExpectation("policy-name", true); - var peg$e99 = peg$literalExpectation("long-report-id", true); - var peg$e100 = peg$literalExpectation("exported-to", true); - var peg$e101 = peg$classExpectation([":", "="], false, false); - var peg$e102 = peg$literalExpectation("exportedTo", true); - var peg$e103 = peg$literalExpectation("exchange-rate", true); - var peg$e104 = peg$literalExpectation("reimbursable-total", true); - var peg$e105 = peg$literalExpectation("non-reimbursable-total", true); - var peg$e106 = peg$literalExpectation("group-from", true); - var peg$e107 = peg$literalExpectation("group-expenses", true); - var peg$e108 = peg$literalExpectation("group-total", true); - var peg$e109 = peg$literalExpectation("group-card", true); - var peg$e110 = peg$literalExpectation("group-feed", true); - var peg$e111 = peg$literalExpectation("group-bank-account", true); - var peg$e112 = peg$literalExpectation("group-withdrawn", true); - var peg$e113 = peg$literalExpectation("group-withdrawal-id", true); - var peg$e114 = peg$literalExpectation("group-amount-debited", true); - var peg$e115 = peg$literalExpectation("group-amount-reimbursed", true); - var peg$e116 = peg$literalExpectation("group-category", true); - var peg$e117 = peg$literalExpectation("group-tag", true); - var peg$e118 = peg$literalExpectation("group-merchant", true); - var peg$e119 = peg$literalExpectation("group-day", true); - var peg$e120 = peg$literalExpectation("group-month", true); - var peg$e121 = peg$literalExpectation("group-week", true); - var peg$e122 = peg$literalExpectation("group-year", true); - var peg$e123 = peg$literalExpectation("group-quarter", true); - var peg$e124 = peg$otherExpectation("operator"); - var peg$e125 = peg$literalExpectation("*:", false); - var peg$e126 = peg$literalExpectation("!=", false); - var peg$e127 = peg$literalExpectation(">=", false); - var peg$e128 = peg$literalExpectation(">", false); - var peg$e129 = peg$literalExpectation("<=", false); - var peg$e130 = peg$literalExpectation("<", false); - var peg$e131 = peg$literalExpectation("\\", false); - var peg$e132 = peg$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); - var peg$e133 = peg$otherExpectation("word"); - var peg$e134 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e135 = peg$otherExpectation("whitespace"); - var peg$e136 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); - var peg$e137 = peg$otherExpectation("quote"); - var peg$e138 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); - var peg$e139 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); - var peg$e140 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); - var peg$e141 = peg$literalExpectation("\u201C", false); - var peg$e142 = peg$literalExpectation("\u201D", false); - var peg$e143 = peg$literalExpectation("\"", false); - var peg$e144 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e145 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); - var peg$e146 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); - var peg$e147 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); - var peg$e148 = peg$classExpectation([","], false, false); - var peg$e149 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); - var peg$e150 = peg$literalExpectation("footerCount", true); - var peg$e151 = peg$literalExpectation("footer-count", true); - var peg$e152 = peg$literalExpectation("footerCurrency", true); - var peg$e153 = peg$literalExpectation("footer-currency", true); - var peg$e154 = peg$literalExpectation("footerTotal", true); - var peg$e155 = peg$literalExpectation("footer-total", true); + var peg$e61 = peg$literalExpectation("anyApproval", true); + var peg$e62 = peg$literalExpectation("any-approval", true); + var peg$e63 = peg$literalExpectation("paid", true); + var peg$e64 = peg$literalExpectation("exported", true); + var peg$e65 = peg$literalExpectation("posted", true); + var peg$e66 = peg$literalExpectation("withdrawn", true); + var peg$e67 = peg$literalExpectation("groupBy", true); + var peg$e68 = peg$literalExpectation("group-by", true); + var peg$e69 = peg$literalExpectation("limit", true); + var peg$e70 = peg$literalExpectation("feed", true); + var peg$e71 = peg$literalExpectation("title", true); + var peg$e72 = peg$literalExpectation("submitterUserID", true); + var peg$e73 = peg$literalExpectation("submitter-user-id", true); + var peg$e74 = peg$literalExpectation("submitterPayrollID", true); + var peg$e75 = peg$literalExpectation("submitter-payroll-id", true); + var peg$e76 = peg$literalExpectation("orderDealNumbers", true); + var peg$e77 = peg$literalExpectation("order-deal-numbers", true); + var peg$e78 = peg$literalExpectation("assignee", true); + var peg$e79 = peg$literalExpectation("createdBy", true); + var peg$e80 = peg$literalExpectation("created-by", true); + var peg$e81 = peg$literalExpectation("action", true); + var peg$e82 = peg$literalExpectation("total", true); + var peg$e83 = peg$literalExpectation("has", true); + var peg$e84 = peg$literalExpectation("is", true); + var peg$e85 = peg$literalExpectation("purchaseAmount", true); + var peg$e86 = peg$literalExpectation("purchase-amount", true); + var peg$e87 = peg$literalExpectation("purchaseCurrency", true); + var peg$e88 = peg$literalExpectation("purchase-currency", true); + var peg$e89 = peg$literalExpectation("amountDebited", true); + var peg$e90 = peg$literalExpectation("amount-debited", true); + var peg$e91 = peg$literalExpectation("amountReimbursed", true); + var peg$e92 = peg$literalExpectation("amount-reimbursed", true); + var peg$e93 = peg$literalExpectation("columns", true); + var peg$e94 = peg$literalExpectation("view", true); + var peg$e95 = peg$literalExpectation("compare", true); + var peg$e96 = peg$literalExpectation("per-diem", true); + var peg$e97 = peg$literalExpectation("drafts", true); + var peg$e98 = peg$literalExpectation("draft", true); + var peg$e99 = peg$literalExpectation("tax", true); + var peg$e100 = peg$literalExpectation("policy-name", true); + var peg$e101 = peg$literalExpectation("long-report-id", true); + var peg$e102 = peg$literalExpectation("exported-to", true); + var peg$e103 = peg$classExpectation([":", "="], false, false); + var peg$e104 = peg$literalExpectation("exportedTo", true); + var peg$e105 = peg$literalExpectation("exchange-rate", true); + var peg$e106 = peg$literalExpectation("reimbursable-total", true); + var peg$e107 = peg$literalExpectation("non-reimbursable-total", true); + var peg$e108 = peg$literalExpectation("group-from", true); + var peg$e109 = peg$literalExpectation("group-expenses", true); + var peg$e110 = peg$literalExpectation("group-total", true); + var peg$e111 = peg$literalExpectation("group-card", true); + var peg$e112 = peg$literalExpectation("group-feed", true); + var peg$e113 = peg$literalExpectation("group-bank-account", true); + var peg$e114 = peg$literalExpectation("group-withdrawn", true); + var peg$e115 = peg$literalExpectation("group-withdrawal-id", true); + var peg$e116 = peg$literalExpectation("group-amount-debited", true); + var peg$e117 = peg$literalExpectation("group-amount-reimbursed", true); + var peg$e118 = peg$literalExpectation("group-category", true); + var peg$e119 = peg$literalExpectation("group-tag", true); + var peg$e120 = peg$literalExpectation("group-merchant", true); + var peg$e121 = peg$literalExpectation("group-day", true); + var peg$e122 = peg$literalExpectation("group-month", true); + var peg$e123 = peg$literalExpectation("group-week", true); + var peg$e124 = peg$literalExpectation("group-year", true); + var peg$e125 = peg$literalExpectation("group-quarter", true); + var peg$e126 = peg$otherExpectation("operator"); + var peg$e127 = peg$literalExpectation("*:", false); + var peg$e128 = peg$literalExpectation("!=", false); + var peg$e129 = peg$literalExpectation(">=", false); + var peg$e130 = peg$literalExpectation(">", false); + var peg$e131 = peg$literalExpectation("<=", false); + var peg$e132 = peg$literalExpectation("<", false); + var peg$e133 = peg$literalExpectation("\\", false); + var peg$e134 = peg$classExpectation([",", "\"", "\u201D", "\u201C", "\\"], false, false); + var peg$e135 = peg$otherExpectation("word"); + var peg$e136 = peg$classExpectation([" ", ",", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e137 = peg$otherExpectation("whitespace"); + var peg$e138 = peg$classExpectation([" ", "\t", "\r", "\n", "\xA0"], false, false); + var peg$e139 = peg$otherExpectation("quote"); + var peg$e140 = peg$classExpectation([" ", ",", "\"", "\u201D", "\u201C", "\t", "\n", "\r", "\xA0"], true, false); + var peg$e141 = peg$classExpectation(["\"", ["\u201C", "\u201D"]], false, false); + var peg$e142 = peg$classExpectation(["\"", "\u201D", "\u201C", "\r", "\n"], true, false); + var peg$e143 = peg$literalExpectation("\u201C", false); + var peg$e144 = peg$literalExpectation("\u201D", false); + var peg$e145 = peg$literalExpectation("\"", false); + var peg$e146 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e147 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false); + var peg$e148 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0"], false, false); + var peg$e149 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ["a", "z"], ["A", "Z"]], false, false); + var peg$e150 = peg$classExpectation([","], false, false); + var peg$e151 = peg$classExpectation([" ", "\t", "\n", "\r", "\xA0", ","], false, false); + var peg$e152 = peg$literalExpectation("footerCount", true); + var peg$e153 = peg$literalExpectation("footer-count", true); + var peg$e154 = peg$literalExpectation("footerCurrency", true); + var peg$e155 = peg$literalExpectation("footer-currency", true); + var peg$e156 = peg$literalExpectation("footerTotal", true); + var peg$e157 = peg$literalExpectation("footer-total", true); var peg$f0 = function(filters) { return applyDefaults(filters); }; var peg$f1 = function(head, tail) { @@ -628,103 +632,105 @@ function peg$parse(input, options) { var peg$f42 = function() { return "policyID"; }; var peg$f43 = function() { return "submitted"; }; var peg$f44 = function() { return "approved"; }; - var peg$f45 = function() { return "paid"; }; - var peg$f46 = function() { return "exported"; }; - var peg$f47 = function() { return "posted"; }; - var peg$f48 = function() { return "withdrawn"; }; - var peg$f49 = function() { return "groupBy"; }; - var peg$f50 = function() { return "limit"; }; - var peg$f51 = function() { return "feed"; }; - var peg$f52 = function() { return "title"; }; - var peg$f53 = function() { return "submitterUserID"; }; - var peg$f54 = function() { return "submitterPayrollID"; }; - var peg$f55 = function() { return "orderDealNumbers"; }; - var peg$f56 = function() { return "assignee"; }; - var peg$f57 = function() { return "createdBy"; }; - var peg$f58 = function() { return "action"; }; - var peg$f59 = function() {return "total"; }; - var peg$f60 = function() {return "has"; }; - var peg$f61 = function() {return "is"; }; - var peg$f62 = function() {return "purchaseAmount"}; - var peg$f63 = function() {return "purchaseCurrency"}; - var peg$f64 = function() {return "amountDebited"}; - var peg$f65 = function() {return "amountReimbursed"}; - var peg$f66 = function() { + var peg$f45 = function() { return "anyApproval"; }; + var peg$f46 = function() { return "anyApproval"; }; + var peg$f47 = function() { return "paid"; }; + var peg$f48 = function() { return "exported"; }; + var peg$f49 = function() { return "posted"; }; + var peg$f50 = function() { return "withdrawn"; }; + var peg$f51 = function() { return "groupBy"; }; + var peg$f52 = function() { return "limit"; }; + var peg$f53 = function() { return "feed"; }; + var peg$f54 = function() { return "title"; }; + var peg$f55 = function() { return "submitterUserID"; }; + var peg$f56 = function() { return "submitterPayrollID"; }; + var peg$f57 = function() { return "orderDealNumbers"; }; + var peg$f58 = function() { return "assignee"; }; + var peg$f59 = function() { return "createdBy"; }; + var peg$f60 = function() { return "action"; }; + var peg$f61 = function() {return "total"; }; + var peg$f62 = function() {return "has"; }; + var peg$f63 = function() {return "is"; }; + var peg$f64 = function() {return "purchaseAmount"}; + var peg$f65 = function() {return "purchaseCurrency"}; + var peg$f66 = function() {return "amountDebited"}; + var peg$f67 = function() {return "amountReimbursed"}; + var peg$f68 = function() { isColumnsContext = true; return "columns"; }; - var peg$f67 = function() {return "view"}; - var peg$f68 = function() {return "compare"}; - var peg$f69 = function() { return isColumnsContext; }; - var peg$f70 = function() { return "perDiem"; }; - var peg$f71 = function() { return "drafts"; }; - var peg$f72 = function() { return "originalamount"; }; - var peg$f73 = function() { return "taxAmount"; }; - var peg$f74 = function() { return "taxrate"; }; - var peg$f75 = function() { return "policyname"; }; - var peg$f76 = function() { return "withdrawalID"; }; - var peg$f77 = function() { return "bankAccount"; }; - var peg$f78 = function() { return "reportID"; }; - var peg$f79 = function() { return "base62ReportID"; }; - var peg$f80 = function() { return "exportedto"; }; - var peg$f81 = function() { return "exportedTo"; }; - var peg$f82 = function() { return "exportedTo"; }; - var peg$f83 = function() { return "exchangeRate"; }; - var peg$f84 = function() { return "reimbursableTotal"; }; - var peg$f85 = function() { return "nonReimbursableTotal"; }; - var peg$f86 = function() { return "groupFrom"; }; - var peg$f87 = function() { return "groupExpenses"; }; - var peg$f88 = function() { return "groupTotal"; }; - var peg$f89 = function() { return "groupCard"; }; - var peg$f90 = function() { return "groupFeed"; }; - var peg$f91 = function() { return "groupBankAccount"; }; - var peg$f92 = function() { return "groupWithdrawn"; }; - var peg$f93 = function() { return "groupWithdrawalID"; }; - var peg$f94 = function() { return "groupAmountDebited"; }; - var peg$f95 = function() { return "groupAmountReimbursed"; }; - var peg$f96 = function() { return "amountDebited"; }; - var peg$f97 = function() { return "amountReimbursed"; }; - var peg$f98 = function() { return "groupCategory"; }; - var peg$f99 = function() { return "groupTag"; }; - var peg$f100 = function() { return "groupMerchant"; }; - var peg$f101 = function() { return "groupday"; }; - var peg$f102 = function() { return "groupmonth"; }; - var peg$f103 = function() { return "groupweek"; }; - var peg$f104 = function() { return "groupyear"; }; - var peg$f105 = function() { return "groupquarter"; }; - var peg$f106 = function() { return "contains"; }; - var peg$f107 = function() { return "eq"; }; - var peg$f108 = function() { return "neq"; }; - var peg$f109 = function() { return "gte"; }; - var peg$f110 = function() { return "gt"; }; - var peg$f111 = function() { return "lte"; }; - var peg$f112 = function() { return "lt"; }; - var peg$f113 = function(o) { + var peg$f69 = function() {return "view"}; + var peg$f70 = function() {return "compare"}; + var peg$f71 = function() { return isColumnsContext; }; + var peg$f72 = function() { return "perDiem"; }; + var peg$f73 = function() { return "drafts"; }; + var peg$f74 = function() { return "originalamount"; }; + var peg$f75 = function() { return "taxAmount"; }; + var peg$f76 = function() { return "taxrate"; }; + var peg$f77 = function() { return "policyname"; }; + var peg$f78 = function() { return "withdrawalID"; }; + var peg$f79 = function() { return "bankAccount"; }; + var peg$f80 = function() { return "reportID"; }; + var peg$f81 = function() { return "base62ReportID"; }; + var peg$f82 = function() { return "exportedto"; }; + var peg$f83 = function() { return "exportedTo"; }; + var peg$f84 = function() { return "exportedTo"; }; + var peg$f85 = function() { return "exchangeRate"; }; + var peg$f86 = function() { return "reimbursableTotal"; }; + var peg$f87 = function() { return "nonReimbursableTotal"; }; + var peg$f88 = function() { return "groupFrom"; }; + var peg$f89 = function() { return "groupExpenses"; }; + var peg$f90 = function() { return "groupTotal"; }; + var peg$f91 = function() { return "groupCard"; }; + var peg$f92 = function() { return "groupFeed"; }; + var peg$f93 = function() { return "groupBankAccount"; }; + var peg$f94 = function() { return "groupWithdrawn"; }; + var peg$f95 = function() { return "groupWithdrawalID"; }; + var peg$f96 = function() { return "groupAmountDebited"; }; + var peg$f97 = function() { return "groupAmountReimbursed"; }; + var peg$f98 = function() { return "amountDebited"; }; + var peg$f99 = function() { return "amountReimbursed"; }; + var peg$f100 = function() { return "groupCategory"; }; + var peg$f101 = function() { return "groupTag"; }; + var peg$f102 = function() { return "groupMerchant"; }; + var peg$f103 = function() { return "groupday"; }; + var peg$f104 = function() { return "groupmonth"; }; + var peg$f105 = function() { return "groupweek"; }; + var peg$f106 = function() { return "groupyear"; }; + var peg$f107 = function() { return "groupquarter"; }; + var peg$f108 = function() { return "contains"; }; + var peg$f109 = function() { return "eq"; }; + var peg$f110 = function() { return "neq"; }; + var peg$f111 = function() { return "gte"; }; + var peg$f112 = function() { return "gt"; }; + var peg$f113 = function() { return "lte"; }; + var peg$f114 = function() { return "lt"; }; + var peg$f115 = function(o) { if (nameOperator) { expectingNestedQuote = (o === "eq" || o === "contains"); } isColumnsContext = false; return o; }; - var peg$f114 = function(c) { return c; }; - var peg$f115 = function(chars) { return chars.join("").trim(); }; - var peg$f116 = function() { + var peg$f116 = function(c) { return c; }; + var peg$f117 = function(chars) { return chars.join("").trim(); }; + var peg$f118 = function() { isColumnsContext = false; return "and"; }; - var peg$f117 = function() { return expectingNestedQuote; }; - var peg$f118 = function(start, inner, end) { //handle no-breaking space + var peg$f119 = function() { return expectingNestedQuote; }; + var peg$f120 = function(start, inner, end) { //handle no-breaking space return [...start, '"', ...inner, '"', ...end].join(""); }; - var peg$f119 = function(start) {return "“"}; - var peg$f120 = function(start) {return "”"}; - var peg$f121 = function(start) {return "\""}; - var peg$f122 = function(start, inner, end) { + var peg$f121 = function(start) {return "“"}; + var peg$f122 = function(start) {return "”"}; + var peg$f123 = function(start) {return "\""}; + var peg$f124 = function(start, inner, end) { return [...start, '"', ...inner, '"'].join(""); }; - var peg$f123 = function() { return "footerCount"; }; - var peg$f124 = function() { return "footerCurrency"; }; - var peg$f125 = function() { return "footerTotal"; }; + var peg$f125 = function() { return "footerCount"; }; + var peg$f126 = function() { return "footerCurrency"; }; + var peg$f127 = function() { return "footerTotal"; }; var peg$currPos = options.peg$currPos | 0; var peg$savedPos = peg$currPos; var peg$posDetailsCache = [{ line: 1, column: 1 }]; @@ -1286,57 +1292,60 @@ function peg$parse(input, options) { if (s1 === peg$FAILED) { s1 = peg$parsesubmitted(); if (s1 === peg$FAILED) { - s1 = peg$parseapproved(); + s1 = peg$parseanyApproval(); if (s1 === peg$FAILED) { - s1 = peg$parsepaid(); + s1 = peg$parseapproved(); if (s1 === peg$FAILED) { - s1 = peg$parseexportedTo(); + s1 = peg$parsepaid(); if (s1 === peg$FAILED) { - s1 = peg$parseexported(); + s1 = peg$parseexportedTo(); if (s1 === peg$FAILED) { - s1 = peg$parseposted(); + s1 = peg$parseexported(); if (s1 === peg$FAILED) { - s1 = peg$parsewithdrawn(); + s1 = peg$parseposted(); if (s1 === peg$FAILED) { - s1 = peg$parsefeed(); + s1 = peg$parsewithdrawn(); if (s1 === peg$FAILED) { - s1 = peg$parsetitle(); + s1 = peg$parsefeed(); if (s1 === peg$FAILED) { - s1 = peg$parsesubmitterUserID(); + s1 = peg$parsetitle(); if (s1 === peg$FAILED) { - s1 = peg$parsesubmitterPayrollID(); + s1 = peg$parsesubmitterUserID(); if (s1 === peg$FAILED) { - s1 = peg$parseorderDealNumbers(); + s1 = peg$parsesubmitterPayrollID(); if (s1 === peg$FAILED) { - s1 = peg$parseassignee(); + s1 = peg$parseorderDealNumbers(); if (s1 === peg$FAILED) { - s1 = peg$parsecreatedBy(); + s1 = peg$parseassignee(); if (s1 === peg$FAILED) { - s1 = peg$parsereimbursable(); + s1 = peg$parsecreatedBy(); if (s1 === peg$FAILED) { - s1 = peg$parsebillable(); + s1 = peg$parsereimbursable(); if (s1 === peg$FAILED) { - s1 = peg$parseaction(); + s1 = peg$parsebillable(); if (s1 === peg$FAILED) { - s1 = peg$parsehas(); + s1 = peg$parseaction(); if (s1 === peg$FAILED) { - s1 = peg$parseis(); + s1 = peg$parsehas(); if (s1 === peg$FAILED) { - s1 = peg$parsepurchaseCurrency(); + s1 = peg$parseis(); if (s1 === peg$FAILED) { - s1 = peg$parsepurchaseAmount(); + s1 = peg$parsepurchaseCurrency(); if (s1 === peg$FAILED) { - s1 = peg$parsepolicyID(); + s1 = peg$parsepurchaseAmount(); if (s1 === peg$FAILED) { - s1 = peg$parsestatus(); + s1 = peg$parsepolicyID(); if (s1 === peg$FAILED) { - s1 = peg$parsefooterCount(); + s1 = peg$parsestatus(); if (s1 === peg$FAILED) { - s1 = peg$parsefooterCurrency(); + s1 = peg$parsefooterCount(); if (s1 === peg$FAILED) { - s1 = peg$parsefooterTotal(); + s1 = peg$parsefooterCurrency(); if (s1 === peg$FAILED) { - s1 = peg$parsereportFieldDynamic(); + s1 = peg$parsefooterTotal(); + if (s1 === peg$FAILED) { + s1 = peg$parsereportFieldDynamic(); + } } } } @@ -2451,13 +2460,13 @@ function peg$parse(input, options) { return s0; } - function peg$parsepaid() { + function peg$parseanyApproval() { var s0, s1; s0 = peg$currPos; - s1 = input.substr(peg$currPos, 4); + s1 = input.substr(peg$currPos, 11); if (s1.toLowerCase() === peg$c56) { - peg$currPos += 4; + peg$currPos += 11; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$e61); } @@ -2467,6 +2476,41 @@ function peg$parse(input, options) { s1 = peg$f45(); } s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 12); + if (s1.toLowerCase() === peg$c57) { + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e62); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f46(); + } + s0 = s1; + } + + return s0; + } + + function peg$parsepaid() { + var s0, s1; + + s0 = peg$currPos; + s1 = input.substr(peg$currPos, 4); + if (s1.toLowerCase() === peg$c58) { + peg$currPos += 4; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e63); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f47(); + } + s0 = s1; return s0; } @@ -2476,15 +2520,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c57) { + if (s1.toLowerCase() === peg$c59) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e62); } + if (peg$silentFails === 0) { peg$fail(peg$e64); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f46(); + s1 = peg$f48(); } s0 = s1; @@ -2496,15 +2540,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c58) { + if (s1.toLowerCase() === peg$c60) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e63); } + if (peg$silentFails === 0) { peg$fail(peg$e65); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f47(); + s1 = peg$f49(); } s0 = s1; @@ -2516,15 +2560,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c59) { + if (s1.toLowerCase() === peg$c61) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e64); } + if (peg$silentFails === 0) { peg$fail(peg$e66); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f48(); + s1 = peg$f50(); } s0 = s1; @@ -2535,24 +2579,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 7); - if (s0.toLowerCase() === peg$c60) { + if (s0.toLowerCase() === peg$c62) { peg$currPos += 7; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e65); } + if (peg$silentFails === 0) { peg$fail(peg$e67); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c61) { + if (s1.toLowerCase() === peg$c63) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e66); } + if (peg$silentFails === 0) { peg$fail(peg$e68); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f49(); + s1 = peg$f51(); } s0 = s1; } @@ -2565,15 +2609,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c62) { + if (s1.toLowerCase() === peg$c64) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e67); } + if (peg$silentFails === 0) { peg$fail(peg$e69); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f50(); + s1 = peg$f52(); } s0 = s1; @@ -2585,15 +2629,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c63) { + if (s1.toLowerCase() === peg$c65) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e68); } + if (peg$silentFails === 0) { peg$fail(peg$e70); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f51(); + s1 = peg$f53(); } s0 = s1; @@ -2605,15 +2649,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c64) { + if (s1.toLowerCase() === peg$c66) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e69); } + if (peg$silentFails === 0) { peg$fail(peg$e71); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f52(); + s1 = peg$f54(); } s0 = s1; @@ -2624,24 +2668,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 15); - if (s0.toLowerCase() === peg$c65) { + if (s0.toLowerCase() === peg$c67) { peg$currPos += 15; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e70); } + if (peg$silentFails === 0) { peg$fail(peg$e72); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c66) { + if (s1.toLowerCase() === peg$c68) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e71); } + if (peg$silentFails === 0) { peg$fail(peg$e73); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f53(); + s1 = peg$f55(); } s0 = s1; } @@ -2653,24 +2697,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 18); - if (s0.toLowerCase() === peg$c67) { + if (s0.toLowerCase() === peg$c69) { peg$currPos += 18; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e72); } + if (peg$silentFails === 0) { peg$fail(peg$e74); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c68) { + if (s1.toLowerCase() === peg$c70) { peg$currPos += 20; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e73); } + if (peg$silentFails === 0) { peg$fail(peg$e75); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f54(); + s1 = peg$f56(); } s0 = s1; } @@ -2682,24 +2726,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c69) { + if (s0.toLowerCase() === peg$c71) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e74); } + if (peg$silentFails === 0) { peg$fail(peg$e76); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c70) { + if (s1.toLowerCase() === peg$c72) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e75); } + if (peg$silentFails === 0) { peg$fail(peg$e77); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f55(); + s1 = peg$f57(); } s0 = s1; } @@ -2712,15 +2756,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c71) { + if (s1.toLowerCase() === peg$c73) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e76); } + if (peg$silentFails === 0) { peg$fail(peg$e78); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f56(); + s1 = peg$f58(); } s0 = s1; @@ -2731,24 +2775,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 9); - if (s0.toLowerCase() === peg$c72) { + if (s0.toLowerCase() === peg$c74) { peg$currPos += 9; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e77); } + if (peg$silentFails === 0) { peg$fail(peg$e79); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c73) { + if (s1.toLowerCase() === peg$c75) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e78); } + if (peg$silentFails === 0) { peg$fail(peg$e80); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f57(); + s1 = peg$f59(); } s0 = s1; } @@ -2761,15 +2805,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c74) { + if (s1.toLowerCase() === peg$c76) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e79); } + if (peg$silentFails === 0) { peg$fail(peg$e81); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f58(); + s1 = peg$f60(); } s0 = s1; @@ -2781,15 +2825,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c75) { + if (s1.toLowerCase() === peg$c77) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e80); } + if (peg$silentFails === 0) { peg$fail(peg$e82); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f59(); + s1 = peg$f61(); } s0 = s1; @@ -2801,15 +2845,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c76) { + if (s1.toLowerCase() === peg$c78) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e81); } + if (peg$silentFails === 0) { peg$fail(peg$e83); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f60(); + s1 = peg$f62(); } s0 = s1; @@ -2821,15 +2865,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 2); - if (s1.toLowerCase() === peg$c77) { + if (s1.toLowerCase() === peg$c79) { peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e82); } + if (peg$silentFails === 0) { peg$fail(peg$e84); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f61(); + s1 = peg$f63(); } s0 = s1; @@ -2840,24 +2884,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 14); - if (s0.toLowerCase() === peg$c78) { + if (s0.toLowerCase() === peg$c80) { peg$currPos += 14; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e83); } + if (peg$silentFails === 0) { peg$fail(peg$e85); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c81) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e84); } + if (peg$silentFails === 0) { peg$fail(peg$e86); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f62(); + s1 = peg$f64(); } s0 = s1; } @@ -2869,24 +2913,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c80) { + if (s0.toLowerCase() === peg$c82) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e85); } + if (peg$silentFails === 0) { peg$fail(peg$e87); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c81) { + if (s1.toLowerCase() === peg$c83) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e86); } + if (peg$silentFails === 0) { peg$fail(peg$e88); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f63(); + s1 = peg$f65(); } s0 = s1; } @@ -2898,24 +2942,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 13); - if (s0.toLowerCase() === peg$c82) { + if (s0.toLowerCase() === peg$c84) { peg$currPos += 13; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e87); } + if (peg$silentFails === 0) { peg$fail(peg$e89); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c85) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e90); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f64(); + s1 = peg$f66(); } s0 = s1; } @@ -2927,24 +2971,24 @@ function peg$parse(input, options) { var s0, s1; s0 = input.substr(peg$currPos, 16); - if (s0.toLowerCase() === peg$c84) { + if (s0.toLowerCase() === peg$c86) { peg$currPos += 16; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e89); } + if (peg$silentFails === 0) { peg$fail(peg$e91); } } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e90); } + if (peg$silentFails === 0) { peg$fail(peg$e92); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f65(); + s1 = peg$f67(); } s0 = s1; } @@ -2957,15 +3001,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c86) { + if (s1.toLowerCase() === peg$c88) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e91); } + if (peg$silentFails === 0) { peg$fail(peg$e93); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f66(); + s1 = peg$f68(); } s0 = s1; @@ -2977,15 +3021,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 4); - if (s1.toLowerCase() === peg$c87) { + if (s1.toLowerCase() === peg$c89) { peg$currPos += 4; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e92); } + if (peg$silentFails === 0) { peg$fail(peg$e94); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f67(); + s1 = peg$f69(); } s0 = s1; @@ -2997,15 +3041,15 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 7); - if (s1.toLowerCase() === peg$c88) { + if (s1.toLowerCase() === peg$c90) { peg$currPos += 7; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e93); } + if (peg$silentFails === 0) { peg$fail(peg$e95); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f68(); + s1 = peg$f70(); } s0 = s1; @@ -3017,7 +3061,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f69(); + s1 = peg$f71(); if (s1) { s1 = undefined; } else { @@ -3152,11 +3196,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 8); - if (s1.toLowerCase() === peg$c89) { + if (s1.toLowerCase() === peg$c91) { peg$currPos += 8; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e94); } + if (peg$silentFails === 0) { peg$fail(peg$e96); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3171,7 +3215,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f70(); + s0 = peg$f72(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3189,19 +3233,19 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 6); - if (s1.toLowerCase() === peg$c90) { + if (s1.toLowerCase() === peg$c92) { peg$currPos += 6; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e95); } + if (peg$silentFails === 0) { peg$fail(peg$e97); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 5); - if (s1.toLowerCase() === peg$c91) { + if (s1.toLowerCase() === peg$c93) { peg$currPos += 5; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e96); } + if (peg$silentFails === 0) { peg$fail(peg$e98); } } } if (s1 !== peg$FAILED) { @@ -3217,7 +3261,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f71(); + s0 = peg$f73(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3235,11 +3279,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c79) { + if (s1.toLowerCase() === peg$c81) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e84); } + if (peg$silentFails === 0) { peg$fail(peg$e86); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3254,7 +3298,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f72(); + s0 = peg$f74(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3272,11 +3316,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 3); - if (s1.toLowerCase() === peg$c92) { + if (s1.toLowerCase() === peg$c94) { peg$currPos += 3; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e97); } + if (peg$silentFails === 0) { peg$fail(peg$e99); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3291,7 +3335,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f73(); + s0 = peg$f75(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3328,7 +3372,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f74(); + s0 = peg$f76(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3346,11 +3390,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c93) { + if (s1.toLowerCase() === peg$c95) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e98); } + if (peg$silentFails === 0) { peg$fail(peg$e100); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3365,7 +3409,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f75(); + s0 = peg$f77(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3402,7 +3446,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f76(); + s0 = peg$f78(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3439,7 +3483,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f77(); + s0 = peg$f79(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3457,11 +3501,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c94) { + if (s1.toLowerCase() === peg$c96) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e99); } + if (peg$silentFails === 0) { peg$fail(peg$e101); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3476,7 +3520,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f78(); + s0 = peg$f80(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3513,7 +3557,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f79(); + s0 = peg$f81(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3531,11 +3575,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e100); } + if (peg$silentFails === 0) { peg$fail(peg$e102); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3550,7 +3594,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f80(); + s0 = peg$f82(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3575,7 +3619,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e101); } + if (peg$silentFails === 0) { peg$fail(peg$e103); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; @@ -3594,11 +3638,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c96) { + if (s1.toLowerCase() === peg$c98) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e102); } + if (peg$silentFails === 0) { peg$fail(peg$e104); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3613,7 +3657,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f81(); + s0 = peg$f83(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3625,11 +3669,11 @@ function peg$parse(input, options) { if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c95) { + if (s1.toLowerCase() === peg$c97) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e100); } + if (peg$silentFails === 0) { peg$fail(peg$e102); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3644,7 +3688,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f82(); + s0 = peg$f84(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3663,11 +3707,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c97) { + if (s1.toLowerCase() === peg$c99) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e103); } + if (peg$silentFails === 0) { peg$fail(peg$e105); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3682,7 +3726,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f83(); + s0 = peg$f85(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3700,11 +3744,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c98) { + if (s1.toLowerCase() === peg$c100) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e104); } + if (peg$silentFails === 0) { peg$fail(peg$e106); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3719,7 +3763,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f84(); + s0 = peg$f86(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3737,11 +3781,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 22); - if (s1.toLowerCase() === peg$c99) { + if (s1.toLowerCase() === peg$c101) { peg$currPos += 22; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e105); } + if (peg$silentFails === 0) { peg$fail(peg$e107); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3756,7 +3800,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f85(); + s0 = peg$f87(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3774,11 +3818,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c100) { + if (s1.toLowerCase() === peg$c102) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e106); } + if (peg$silentFails === 0) { peg$fail(peg$e108); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3793,7 +3837,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f86(); + s0 = peg$f88(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3811,11 +3855,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c101) { + if (s1.toLowerCase() === peg$c103) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e107); } + if (peg$silentFails === 0) { peg$fail(peg$e109); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3830,7 +3874,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f87(); + s0 = peg$f89(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3848,11 +3892,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c102) { + if (s1.toLowerCase() === peg$c104) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e108); } + if (peg$silentFails === 0) { peg$fail(peg$e110); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3867,7 +3911,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f88(); + s0 = peg$f90(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3885,11 +3929,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c103) { + if (s1.toLowerCase() === peg$c105) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e109); } + if (peg$silentFails === 0) { peg$fail(peg$e111); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3904,7 +3948,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f89(); + s0 = peg$f91(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3922,11 +3966,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c104) { + if (s1.toLowerCase() === peg$c106) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e110); } + if (peg$silentFails === 0) { peg$fail(peg$e112); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3941,7 +3985,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f90(); + s0 = peg$f92(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3959,11 +4003,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 18); - if (s1.toLowerCase() === peg$c105) { + if (s1.toLowerCase() === peg$c107) { peg$currPos += 18; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e111); } + if (peg$silentFails === 0) { peg$fail(peg$e113); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -3978,7 +4022,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f91(); + s0 = peg$f93(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -3996,11 +4040,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c106) { + if (s1.toLowerCase() === peg$c108) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e112); } + if (peg$silentFails === 0) { peg$fail(peg$e114); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4015,7 +4059,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f92(); + s0 = peg$f94(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4033,11 +4077,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 19); - if (s1.toLowerCase() === peg$c107) { + if (s1.toLowerCase() === peg$c109) { peg$currPos += 19; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e113); } + if (peg$silentFails === 0) { peg$fail(peg$e115); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4052,7 +4096,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f93(); + s0 = peg$f95(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4070,11 +4114,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 20); - if (s1.toLowerCase() === peg$c108) { + if (s1.toLowerCase() === peg$c110) { peg$currPos += 20; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e114); } + if (peg$silentFails === 0) { peg$fail(peg$e116); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4089,7 +4133,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f94(); + s0 = peg$f96(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4107,11 +4151,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 23); - if (s1.toLowerCase() === peg$c109) { + if (s1.toLowerCase() === peg$c111) { peg$currPos += 23; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e115); } + if (peg$silentFails === 0) { peg$fail(peg$e117); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4126,7 +4170,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f95(); + s0 = peg$f97(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4144,11 +4188,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c83) { + if (s1.toLowerCase() === peg$c85) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e88); } + if (peg$silentFails === 0) { peg$fail(peg$e90); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4163,7 +4207,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f96(); + s0 = peg$f98(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4181,11 +4225,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 17); - if (s1.toLowerCase() === peg$c85) { + if (s1.toLowerCase() === peg$c87) { peg$currPos += 17; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e90); } + if (peg$silentFails === 0) { peg$fail(peg$e92); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4200,7 +4244,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f97(); + s0 = peg$f99(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4218,11 +4262,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c110) { + if (s1.toLowerCase() === peg$c112) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e116); } + if (peg$silentFails === 0) { peg$fail(peg$e118); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4237,7 +4281,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f98(); + s0 = peg$f100(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4255,11 +4299,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c111) { + if (s1.toLowerCase() === peg$c113) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e117); } + if (peg$silentFails === 0) { peg$fail(peg$e119); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4274,7 +4318,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f99(); + s0 = peg$f101(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4292,11 +4336,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c112) { + if (s1.toLowerCase() === peg$c114) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e118); } + if (peg$silentFails === 0) { peg$fail(peg$e120); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4311,7 +4355,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f100(); + s0 = peg$f102(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4329,11 +4373,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 9); - if (s1.toLowerCase() === peg$c113) { + if (s1.toLowerCase() === peg$c115) { peg$currPos += 9; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e119); } + if (peg$silentFails === 0) { peg$fail(peg$e121); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4348,7 +4392,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f101(); + s0 = peg$f103(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4366,11 +4410,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c114) { + if (s1.toLowerCase() === peg$c116) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e120); } + if (peg$silentFails === 0) { peg$fail(peg$e122); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4385,7 +4429,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f102(); + s0 = peg$f104(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4403,11 +4447,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c115) { + if (s1.toLowerCase() === peg$c117) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e121); } + if (peg$silentFails === 0) { peg$fail(peg$e123); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4422,7 +4466,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f103(); + s0 = peg$f105(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4440,11 +4484,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 10); - if (s1.toLowerCase() === peg$c116) { + if (s1.toLowerCase() === peg$c118) { peg$currPos += 10; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e122); } + if (peg$silentFails === 0) { peg$fail(peg$e124); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4459,7 +4503,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f104(); + s0 = peg$f106(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4477,11 +4521,11 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 13); - if (s1.toLowerCase() === peg$c117) { + if (s1.toLowerCase() === peg$c119) { peg$currPos += 13; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e123); } + if (peg$silentFails === 0) { peg$fail(peg$e125); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -4496,7 +4540,7 @@ function peg$parse(input, options) { } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f105(); + s0 = peg$f107(); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4514,16 +4558,16 @@ function peg$parse(input, options) { peg$silentFails++; s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c118) { - s1 = peg$c118; + if (input.substr(peg$currPos, 2) === peg$c120) { + s1 = peg$c120; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e125); } + if (peg$silentFails === 0) { peg$fail(peg$e127); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f106(); + s1 = peg$f108(); } s0 = s1; if (s0 === peg$FAILED) { @@ -4533,81 +4577,81 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e101); } + if (peg$silentFails === 0) { peg$fail(peg$e103); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f107(); + s1 = peg$f109(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c119) { - s1 = peg$c119; + if (input.substr(peg$currPos, 2) === peg$c121) { + s1 = peg$c121; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e126); } + if (peg$silentFails === 0) { peg$fail(peg$e128); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f108(); + s1 = peg$f110(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c120) { - s1 = peg$c120; + if (input.substr(peg$currPos, 2) === peg$c122) { + s1 = peg$c122; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e127); } + if (peg$silentFails === 0) { peg$fail(peg$e129); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f109(); + s1 = peg$f111(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 62) { - s1 = peg$c121; + s1 = peg$c123; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e128); } + if (peg$silentFails === 0) { peg$fail(peg$e130); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f110(); + s1 = peg$f112(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c122) { - s1 = peg$c122; + if (input.substr(peg$currPos, 2) === peg$c124) { + s1 = peg$c124; peg$currPos += 2; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e129); } + if (peg$silentFails === 0) { peg$fail(peg$e131); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f111(); + s1 = peg$f113(); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 60) { - s1 = peg$c123; + s1 = peg$c125; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e130); } + if (peg$silentFails === 0) { peg$fail(peg$e132); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f112(); + s1 = peg$f114(); } s0 = s1; } @@ -4619,7 +4663,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e124); } + if (peg$silentFails === 0) { peg$fail(peg$e126); } } return s0; @@ -4632,7 +4676,7 @@ function peg$parse(input, options) { s1 = peg$parseoperator(); if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f113(s1); + s1 = peg$f115(s1); } s0 = s1; @@ -4644,11 +4688,11 @@ function peg$parse(input, options) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c124; + s1 = peg$c126; peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e131); } + if (peg$silentFails === 0) { peg$fail(peg$e133); } } if (s1 !== peg$FAILED) { s2 = input.charAt(peg$currPos); @@ -4656,11 +4700,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e132); } + if (peg$silentFails === 0) { peg$fail(peg$e134); } } if (s2 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f114(s2); + s0 = peg$f116(s2); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4686,7 +4730,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } } if (s2 !== peg$FAILED) { @@ -4699,7 +4743,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } } } @@ -4708,13 +4752,13 @@ function peg$parse(input, options) { } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f115(s1); + s1 = peg$f117(s1); } s0 = s1; peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e133); } + if (peg$silentFails === 0) { peg$fail(peg$e135); } } return s0; @@ -4726,7 +4770,7 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = peg$parse_(); peg$savedPos = s0; - s1 = peg$f116(); + s1 = peg$f118(); s0 = s1; return s0; @@ -4742,7 +4786,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } while (s1 !== peg$FAILED) { s0.push(s1); @@ -4751,12 +4795,12 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e136); } + if (peg$silentFails === 0) { peg$fail(peg$e138); } } } peg$silentFails--; s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e135); } + if (peg$silentFails === 0) { peg$fail(peg$e137); } return s0; } @@ -4766,7 +4810,7 @@ function peg$parse(input, options) { s0 = peg$currPos; peg$savedPos = peg$currPos; - s1 = peg$f117(); + s1 = peg$f119(); if (s1) { s1 = undefined; } else { @@ -4803,7 +4847,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4812,7 +4856,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } } s2 = input.charAt(peg$currPos); @@ -4820,7 +4864,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4831,7 +4875,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } } while (s4 !== peg$FAILED) { @@ -4843,7 +4887,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } } } @@ -4852,7 +4896,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s4 !== peg$FAILED) { s5 = []; @@ -4861,7 +4905,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } while (s6 !== peg$FAILED) { s5.push(s6); @@ -4870,11 +4914,11 @@ function peg$parse(input, options) { peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e134); } + if (peg$silentFails === 0) { peg$fail(peg$e136); } } } peg$savedPos = s0; - s0 = peg$f118(s1, s3, s5); + s0 = peg$f120(s1, s3, s5); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -4886,7 +4930,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } return s0; @@ -4903,7 +4947,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -4912,7 +4956,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e138); } + if (peg$silentFails === 0) { peg$fail(peg$e140); } } } s2 = input.charAt(peg$currPos); @@ -4920,7 +4964,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s2 !== peg$FAILED) { s3 = []; @@ -4931,7 +4975,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -4947,15 +4991,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c125; + s6 = peg$c127; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f119(s1); + s4 = peg$f121(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -4978,15 +5022,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c126; + s6 = peg$c128; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e144); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f120(s1); + s4 = peg$f122(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -5009,15 +5053,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c127; + s6 = peg$c129; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e143); } + if (peg$silentFails === 0) { peg$fail(peg$e145); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f121(s1); + s4 = peg$f123(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -5039,7 +5083,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e140); } + if (peg$silentFails === 0) { peg$fail(peg$e142); } } if (s4 === peg$FAILED) { s4 = peg$currPos; @@ -5055,15 +5099,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8220) { - s6 = peg$c125; + s6 = peg$c127; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e141); } + if (peg$silentFails === 0) { peg$fail(peg$e143); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f119(s1); + s4 = peg$f121(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -5086,15 +5130,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8221) { - s6 = peg$c126; + s6 = peg$c128; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e142); } + if (peg$silentFails === 0) { peg$fail(peg$e144); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f120(s1); + s4 = peg$f122(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -5117,15 +5161,15 @@ function peg$parse(input, options) { } if (s5 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 34) { - s6 = peg$c127; + s6 = peg$c129; peg$currPos++; } else { s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e143); } + if (peg$silentFails === 0) { peg$fail(peg$e145); } } if (s6 !== peg$FAILED) { peg$savedPos = s4; - s4 = peg$f121(s1); + s4 = peg$f123(s1); } else { peg$currPos = s4; s4 = peg$FAILED; @@ -5142,7 +5186,7 @@ function peg$parse(input, options) { s4 = peg$parseclosingQuote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; - s0 = peg$f122(s1, s3, s4); + s0 = peg$f124(s1, s3, s4); } else { peg$currPos = s0; s0 = peg$FAILED; @@ -5154,7 +5198,7 @@ function peg$parse(input, options) { peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e137); } + if (peg$silentFails === 0) { peg$fail(peg$e139); } } return s0; @@ -5169,7 +5213,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e139); } + if (peg$silentFails === 0) { peg$fail(peg$e141); } } if (s1 !== peg$FAILED) { s2 = peg$currPos; @@ -5207,7 +5251,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e144); } + if (peg$silentFails === 0) { peg$fail(peg$e146); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -5216,7 +5260,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e144); } + if (peg$silentFails === 0) { peg$fail(peg$e146); } } } s2 = []; @@ -5225,7 +5269,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e145); } + if (peg$silentFails === 0) { peg$fail(peg$e147); } } while (s3 !== peg$FAILED) { s2.push(s3); @@ -5234,7 +5278,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e145); } + if (peg$silentFails === 0) { peg$fail(peg$e147); } } } s3 = []; @@ -5243,7 +5287,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e146); } + if (peg$silentFails === 0) { peg$fail(peg$e148); } } while (s4 !== peg$FAILED) { s3.push(s4); @@ -5252,7 +5296,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e146); } + if (peg$silentFails === 0) { peg$fail(peg$e148); } } } s4 = peg$parseoperator(); @@ -5271,7 +5315,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e147); } + if (peg$silentFails === 0) { peg$fail(peg$e149); } } while (s2 !== peg$FAILED) { s1.push(s2); @@ -5280,7 +5324,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e147); } + if (peg$silentFails === 0) { peg$fail(peg$e149); } } } s2 = peg$currPos; @@ -5327,7 +5371,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e148); } + if (peg$silentFails === 0) { peg$fail(peg$e150); } } } } @@ -5343,7 +5387,7 @@ function peg$parse(input, options) { peg$currPos++; } else { s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e149); } + if (peg$silentFails === 0) { peg$fail(peg$e151); } } if (s0 === peg$FAILED) { s0 = peg$currPos; @@ -5372,24 +5416,24 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c128) { + if (s1.toLowerCase() === peg$c130) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e150); } + if (peg$silentFails === 0) { peg$fail(peg$e152); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c129) { + if (s1.toLowerCase() === peg$c131) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e151); } + if (peg$silentFails === 0) { peg$fail(peg$e153); } } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f123(); + s1 = peg$f125(); } s0 = s1; @@ -5401,24 +5445,24 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 14); - if (s1.toLowerCase() === peg$c130) { + if (s1.toLowerCase() === peg$c132) { peg$currPos += 14; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e152); } + if (peg$silentFails === 0) { peg$fail(peg$e154); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 15); - if (s1.toLowerCase() === peg$c131) { + if (s1.toLowerCase() === peg$c133) { peg$currPos += 15; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e153); } + if (peg$silentFails === 0) { peg$fail(peg$e155); } } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f124(); + s1 = peg$f126(); } s0 = s1; @@ -5430,24 +5474,24 @@ function peg$parse(input, options) { s0 = peg$currPos; s1 = input.substr(peg$currPos, 11); - if (s1.toLowerCase() === peg$c132) { + if (s1.toLowerCase() === peg$c134) { peg$currPos += 11; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e154); } + if (peg$silentFails === 0) { peg$fail(peg$e156); } } if (s1 === peg$FAILED) { s1 = input.substr(peg$currPos, 12); - if (s1.toLowerCase() === peg$c133) { + if (s1.toLowerCase() === peg$c135) { peg$currPos += 12; } else { s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$e155); } + if (peg$silentFails === 0) { peg$fail(peg$e157); } } } if (s1 !== peg$FAILED) { peg$savedPos = s0; - s1 = peg$f125(); + s1 = peg$f127(); } s0 = s1; diff --git a/src/libs/SearchParser/searchParser.peggy b/src/libs/SearchParser/searchParser.peggy index a0f8305422fb..021ea38ff849 100644 --- a/src/libs/SearchParser/searchParser.peggy +++ b/src/libs/SearchParser/searchParser.peggy @@ -306,6 +306,7 @@ key "key" / paidStatus / withdrawalID / submitted + / anyApproval / approved / paid / exportedTo diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index 7e529a2bbb8c..95917d0251e6 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -5454,6 +5454,7 @@ function getDatePresets(filterKey: SearchDateFilterKeys, hasFeed: boolean): Sear switch (filterKey) { case CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE: + case CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL: return commonPresets; case CONST.SEARCH.SYNTAX_FILTER_KEYS.POSTED: return [...commonPresets, CONST.SEARCH.DATE_PRESETS.NEVER, ...(hasFeed ? [CONST.SEARCH.DATE_PRESETS.LAST_STATEMENT] : [])]; @@ -5580,6 +5581,11 @@ const FILTER_TO_SYNTAX_KEY = { [FILTER_KEYS.APPROVED_BEFORE]: CONST.SEARCH.SYNTAX_FILTER_KEYS.APPROVED, [FILTER_KEYS.APPROVED_RANGE]: CONST.SEARCH.SYNTAX_FILTER_KEYS.APPROVED, + [FILTER_KEYS.ANY_APPROVAL_ON]: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + [FILTER_KEYS.ANY_APPROVAL_AFTER]: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + [FILTER_KEYS.ANY_APPROVAL_BEFORE]: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + [FILTER_KEYS.ANY_APPROVAL_RANGE]: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + [FILTER_KEYS.PAID_ON]: CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID, [FILTER_KEYS.PAID_AFTER]: CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID, [FILTER_KEYS.PAID_BEFORE]: CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID, @@ -5807,6 +5813,10 @@ const FILTER_VIEW_MAP = { labelKey: 'search.filters.approved', icon: 'ThumbsUp', }, + [CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL]: { + labelKey: 'search.filters.anyApproval', + icon: 'ThumbsUp', + }, [CONST.SEARCH.SYNTAX_FILTER_KEYS.SUBMITTED]: { labelKey: 'search.filters.submitted', icon: 'Send', diff --git a/src/types/form/SearchAdvancedFiltersForm.ts b/src/types/form/SearchAdvancedFiltersForm.ts index 36cbc8dfad26..aa752539196e 100644 --- a/src/types/form/SearchAdvancedFiltersForm.ts +++ b/src/types/form/SearchAdvancedFiltersForm.ts @@ -40,6 +40,7 @@ const DATE_FILTER_KEYS: SearchDateFilterKeys[] = [ CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE, CONST.SEARCH.SYNTAX_FILTER_KEYS.SUBMITTED, CONST.SEARCH.SYNTAX_FILTER_KEYS.APPROVED, + CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, CONST.SEARCH.SYNTAX_FILTER_KEYS.PAID, CONST.SEARCH.SYNTAX_FILTER_KEYS.EXPORTED, CONST.SEARCH.SYNTAX_FILTER_KEYS.POSTED, @@ -101,6 +102,12 @@ const FILTER_KEYS = { APPROVED_BEFORE: 'approvedBefore', APPROVED_RANGE: 'approvedRange', + ANY_APPROVAL_NOT: 'anyApprovalNot', + ANY_APPROVAL_ON: 'anyApprovalOn', + ANY_APPROVAL_AFTER: 'anyApprovalAfter', + ANY_APPROVAL_BEFORE: 'anyApprovalBefore', + ANY_APPROVAL_RANGE: 'anyApprovalRange', + PAID_NOT: 'paidNot', PAID_ON: 'paidOn', PAID_AFTER: 'paidAfter', @@ -359,6 +366,11 @@ const ALLOWED_TYPE_FILTERS: Record> = { FILTER_KEYS.APPROVED_AFTER, FILTER_KEYS.APPROVED_BEFORE, FILTER_KEYS.APPROVED_RANGE, + FILTER_KEYS.ANY_APPROVAL_ON, + FILTER_KEYS.ANY_APPROVAL_NOT, + FILTER_KEYS.ANY_APPROVAL_AFTER, + FILTER_KEYS.ANY_APPROVAL_BEFORE, + FILTER_KEYS.ANY_APPROVAL_RANGE, FILTER_KEYS.PAID_ON, FILTER_KEYS.PAID_NOT, FILTER_KEYS.PAID_AFTER, @@ -770,6 +782,12 @@ type SearchAdvancedFiltersForm = Form< [FILTER_KEYS.APPROVED_BEFORE]: string; [FILTER_KEYS.APPROVED_RANGE]: string; + [FILTER_KEYS.ANY_APPROVAL_ON]: string; + [FILTER_KEYS.ANY_APPROVAL_NOT]: string; + [FILTER_KEYS.ANY_APPROVAL_AFTER]: string; + [FILTER_KEYS.ANY_APPROVAL_BEFORE]: string; + [FILTER_KEYS.ANY_APPROVAL_RANGE]: string; + [FILTER_KEYS.PAID_ON]: string; [FILTER_KEYS.PAID_NOT]: string; [FILTER_KEYS.PAID_AFTER]: string; diff --git a/tests/unit/Search/SearchQueryUtilsTest.ts b/tests/unit/Search/SearchQueryUtilsTest.ts index 5492620b2e4f..d78d3021104e 100644 --- a/tests/unit/Search/SearchQueryUtilsTest.ts +++ b/tests/unit/Search/SearchQueryUtilsTest.ts @@ -2357,6 +2357,88 @@ describe('SearchQueryUtils', () => { }); }); + describe('anyApproval date filter', () => { + const anyApprovalFormKeys = [ + FILTER_KEYS.ANY_APPROVAL_ON, + FILTER_KEYS.ANY_APPROVAL_AFTER, + FILTER_KEYS.ANY_APPROVAL_BEFORE, + FILTER_KEYS.ANY_APPROVAL_RANGE, + FILTER_KEYS.ANY_APPROVAL_NOT, + ] as const; + + test.each([ + { + modifier: 'ON', + formKey: FILTER_KEYS.ANY_APPROVAL_ON, + formValue: CONST.SEARCH.DATE_PRESETS.LAST_MONTH, + expectedQuery: `type:expense ${CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL}:${CONST.SEARCH.DATE_PRESETS.LAST_MONTH}`, + }, + { + modifier: 'AFTER', + formKey: FILTER_KEYS.ANY_APPROVAL_AFTER, + formValue: '2026-04-01', + expectedQuery: `type:expense ${CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL}>2026-04-01`, + }, + { + modifier: 'BEFORE', + formKey: FILTER_KEYS.ANY_APPROVAL_BEFORE, + formValue: '2026-04-30', + expectedQuery: `type:expense ${CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL}<2026-04-30`, + }, + { + modifier: 'RANGE', + formKey: FILTER_KEYS.ANY_APPROVAL_RANGE, + formValue: '2026-04-01,2026-04-30', + expectedQuery: `type:expense ${CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL}>=2026-04-01 ${CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL}<=2026-04-30`, + }, + { + modifier: 'negated', + formKey: FILTER_KEYS.ANY_APPROVAL_NOT, + formValue: CONST.SEARCH.DATE_PRESETS.LAST_MONTH, + expectedQuery: `type:expense -${CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL}:${CONST.SEARCH.DATE_PRESETS.LAST_MONTH}`, + }, + ])('round-trips the $modifier form', ({formKey, formValue, expectedQuery}) => { + // Given an expense search with an anyApproval date filter + const filterValues: Partial = { + type: CONST.SEARCH.DATA_TYPES.EXPENSE, + [formKey]: formValue, + }; + + // When the form is converted to a query and back + const queryString = buildQueryStringFromFilterFormValues(filterValues); + expect(queryString).toBe(expectedQuery); + + const queryJSON = buildSearchQueryJSON(queryString); + if (!queryJSON) { + throw new Error('Failed to parse query string'); + } + + const result = buildFilterFormValuesFromQuery(queryJSON, {}, {}, {}, {}, {}, {}); + + // Then the original form key is preserved and the other anyApproval keys are empty + expect(result[formKey]).toBe(formValue); + for (const otherKey of anyApprovalFormKeys) { + if (otherKey !== formKey) { + expect(result[otherKey]).toBeUndefined(); + } + } + }); + + test('anyApproval date filters are dropped on an expense-report search', () => { + // Given an expense-report search with an anyApproval date filter + const filterValues: Partial = { + type: CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT, + [FILTER_KEYS.ANY_APPROVAL_ON]: CONST.SEARCH.DATE_PRESETS.LAST_MONTH, + }; + + // When the form is converted to a query + const result = buildQueryStringFromFilterFormValues(filterValues); + + // Then anyApproval is stripped because Auth only supports it for type:expense + expect(result).toBe(`type:${CONST.SEARCH.DATA_TYPES.EXPENSE_REPORT}`); + }); + }); + describe('shouldHighlight', () => { it('returns false if either input is empty', () => { expect(shouldHighlight('', 'test')).toBe(false); diff --git a/tests/unit/Search/SearchUIUtilsTest.ts b/tests/unit/Search/SearchUIUtilsTest.ts index 45f1871d8342..bdc39c1bf0fa 100644 --- a/tests/unit/Search/SearchUIUtilsTest.ts +++ b/tests/unit/Search/SearchUIUtilsTest.ts @@ -15492,3 +15492,20 @@ describe('hasFilterContentValuesChanged', () => { } }); }); + +describe('getDatePresets', () => { + it('does not offer never for anyApproval', () => { + // Given anyApproval, which always matches an approval action + // When presets are requested + const presets = SearchUIUtils.getDatePresets(CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, false); + + // Then only the common date presets are returned, without never + expect(presets).toEqual([ + CONST.SEARCH.DATE_PRESETS.THIS_MONTH, + CONST.SEARCH.DATE_PRESETS.LAST_MONTH, + CONST.SEARCH.DATE_PRESETS.YEAR_TO_DATE, + CONST.SEARCH.DATE_PRESETS.LAST_12_MONTHS, + ]); + expect(presets).not.toContain(CONST.SEARCH.DATE_PRESETS.NEVER); + }); +}); diff --git a/tests/unit/SearchAutocompleteParserTest.ts b/tests/unit/SearchAutocompleteParserTest.ts index 3346fad514c9..fe17d9a0c552 100644 --- a/tests/unit/SearchAutocompleteParserTest.ts +++ b/tests/unit/SearchAutocompleteParserTest.ts @@ -787,6 +787,48 @@ const nameFieldContinuationTests: Array<{query: string; expected: ExpectedAutoco }, description: 'Negates multiple from and has values', }, + { + query: 'anyApproval:last-month', + expected: { + autocomplete: { + key: 'anyApproval', + value: 'last-month', + negated: false, + start: 12, + length: 10, + }, + ranges: [{key: 'anyApproval', value: 'last-month', negated: false, start: 12, length: 10}], + }, + description: 'anyApproval date filter provides autocomplete', + }, + { + query: 'anyApproval:', + expected: { + autocomplete: { + key: 'anyApproval', + value: '', + negated: false, + start: 12, + length: 0, + }, + ranges: [], + }, + description: 'anyApproval with an empty value still identifies the filter key', + }, + { + query: 'any-approval:last-month', + expected: { + autocomplete: { + key: 'anyApproval', + value: 'last-month', + negated: false, + start: 13, + length: 10, + }, + ranges: [{key: 'anyApproval', value: 'last-month', negated: false, start: 13, length: 10}], + }, + description: 'any-approval user-friendly alias maps to anyApproval', + }, ]; describe('autocomplete parser', () => { @@ -799,8 +841,12 @@ describe('autocomplete parser', () => { describe('autocomplete parser - name field continuation detection', () => { test.each(nameFieldContinuationTests)(`$description: $query`, ({query, expected}) => { + // Given a partially typed search query, possibly using a user-friendly alias or an empty filter value + + // When the autocomplete parser processes it const result: unknown = parse(query); + // Then the active filter key/value and highlighted ranges are identified so the right suggestions can be shown expect(result).toEqual(expected); }); }); diff --git a/tests/unit/SearchParserTest.ts b/tests/unit/SearchParserTest.ts index 96b4cdc35431..dacf17412b7e 100644 --- a/tests/unit/SearchParserTest.ts +++ b/tests/unit/SearchParserTest.ts @@ -727,6 +727,98 @@ const tests = [ }, }, }, + { + query: 'type:expense anyApproval:last-month', + expected: { + type: CONST.SEARCH.DATA_TYPES.EXPENSE, + sortBy: CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE, + sortOrder: CONST.SEARCH.SORT_ORDER.DESC, + view: 'table', + filters: { + operator: CONST.SEARCH.SYNTAX_OPERATORS.EQUAL_TO, + left: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + right: CONST.SEARCH.DATE_PRESETS.LAST_MONTH, + }, + }, + }, + { + query: 'type:expense any-approval:last-month', + expected: { + type: CONST.SEARCH.DATA_TYPES.EXPENSE, + sortBy: CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE, + sortOrder: CONST.SEARCH.SORT_ORDER.DESC, + view: 'table', + filters: { + operator: CONST.SEARCH.SYNTAX_OPERATORS.EQUAL_TO, + left: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + right: CONST.SEARCH.DATE_PRESETS.LAST_MONTH, + }, + }, + }, + { + query: 'type:expense anyApproval>2026-04-01', + expected: { + type: CONST.SEARCH.DATA_TYPES.EXPENSE, + sortBy: CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE, + sortOrder: CONST.SEARCH.SORT_ORDER.DESC, + view: 'table', + filters: { + operator: CONST.SEARCH.SYNTAX_OPERATORS.GREATER_THAN, + left: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + right: '2026-04-01', + }, + }, + }, + { + query: 'type:expense anyApproval<2026-04-30', + expected: { + type: CONST.SEARCH.DATA_TYPES.EXPENSE, + sortBy: CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE, + sortOrder: CONST.SEARCH.SORT_ORDER.DESC, + view: 'table', + filters: { + operator: CONST.SEARCH.SYNTAX_OPERATORS.LOWER_THAN, + left: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + right: '2026-04-30', + }, + }, + }, + { + query: 'type:expense anyApproval>=2026-04-01 anyApproval<=2026-04-30', + expected: { + type: CONST.SEARCH.DATA_TYPES.EXPENSE, + sortBy: CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE, + sortOrder: CONST.SEARCH.SORT_ORDER.DESC, + view: 'table', + filters: { + operator: CONST.SEARCH.SYNTAX_OPERATORS.AND, + left: { + operator: CONST.SEARCH.SYNTAX_OPERATORS.GREATER_THAN_OR_EQUAL_TO, + left: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + right: '2026-04-01', + }, + right: { + operator: CONST.SEARCH.SYNTAX_OPERATORS.LOWER_THAN_OR_EQUAL_TO, + left: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + right: '2026-04-30', + }, + }, + }, + }, + { + query: 'type:expense -anyApproval:last-month', + expected: { + type: CONST.SEARCH.DATA_TYPES.EXPENSE, + sortBy: CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE, + sortOrder: CONST.SEARCH.SORT_ORDER.DESC, + view: 'table', + filters: { + operator: CONST.SEARCH.SYNTAX_OPERATORS.NOT_EQUAL_TO, + left: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, + right: CONST.SEARCH.DATE_PRESETS.LAST_MONTH, + }, + }, + }, { query: 'type:expense group-by:from', expected: { @@ -1835,7 +1927,13 @@ function parseSearchQueryWithoutRawFilters(query: string): Record { test.each(tests)(`parsing: $query`, ({query, expected}) => { - expect(parseSearchQueryWithoutRawFilters(query)).toEqual(expected); + // Given a raw search query string typed by the user (including filter aliases such as any-approval) + + // When the query is parsed into its structured representation + const result = parseSearchQueryWithoutRawFilters(query); + + // Then the parsed type, sort, view and filter tree match what the search API expects for that query + expect(result).toEqual(expected); }); }); diff --git a/tests/unit/hooks/useAutocompleteSuggestions.test.ts b/tests/unit/hooks/useAutocompleteSuggestions.test.ts index 689233186b42..8bfeb89e8f3e 100644 --- a/tests/unit/hooks/useAutocompleteSuggestions.test.ts +++ b/tests/unit/hooks/useAutocompleteSuggestions.test.ts @@ -114,6 +114,7 @@ jest.mock('@hooks/useExportedToFilterOptions', () => ({ })); const {parseForAutocomplete} = jest.requireMock<{parseForAutocomplete: jest.Mock}>('@libs/SearchAutocompleteUtils'); +const {getUserFriendlyKey} = jest.requireMock<{getUserFriendlyKey: jest.Mock}>('@libs/SearchQueryUtils'); const {getExpensifyTeamExclusions} = jest.requireMock<{getExpensifyTeamExclusions: jest.Mock}>('@libs/PolicyUtils'); const mockedUseNetwork = jest.mocked(useNetwork); const mockedOpenSearchCategoryFiltersPage = jest.mocked(openSearchCategoryFiltersPage); @@ -430,6 +431,23 @@ describe('useAutocompleteSuggestions', () => { expect(result.current.at(0)?.filterKey).toBe(CONST.SEARCH.SYNTAX_FILTER_KEYS.DATE); }); + it('suggests date presets after anyApproval:', () => { + // Given the user has typed the anyApproval filter key with no value yet + parseForAutocomplete.mockReturnValue({ + autocomplete: {key: CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL, value: ''}, + ranges: [], + }); + + // When the autocomplete suggestions are computed for that query + const {result} = renderHook(() => useAutocompleteSuggestions({...defaultParams, autocompleteQueryValue: 'anyApproval:'})); + + // Then the date presets are suggested for the anyApproval key, since it is a date filter like the other date keys + expect(result.current.length).toBeGreaterThan(0); + expect(result.current.at(0)?.filterKey).toBe(CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL); + expect(result.current.map((item) => item.text)).toEqual(['today', 'yesterday', 'lastWeek', 'lastMonth'].sort()); + expect(getUserFriendlyKey).toHaveBeenCalledWith(CONST.SEARCH.SYNTAX_FILTER_KEYS.ANY_APPROVAL); + }); + it('returns boolean suggestions for reimbursable key', () => { parseForAutocomplete.mockReturnValue({ autocomplete: {key: CONST.SEARCH.SYNTAX_FILTER_KEYS.REIMBURSABLE, value: ''},