diff --git a/changelogs/fragments/8275.yml b/changelogs/fragments/8275.yml new file mode 100644 index 000000000000..9b827194b0b1 --- /dev/null +++ b/changelogs/fragments/8275.yml @@ -0,0 +1,2 @@ +feat: +- Autocomplete Value Suggestion ([#8275](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8275)) \ No newline at end of file diff --git a/src/plugins/data/common/constants.ts b/src/plugins/data/common/constants.ts index 9951eb6cc18e..c1bc6812129e 100644 --- a/src/plugins/data/common/constants.ts +++ b/src/plugins/data/common/constants.ts @@ -105,6 +105,8 @@ export const UI_SETTINGS = { FILTERS_PINNED_BY_DEFAULT: 'filters:pinnedByDefault', FILTERS_EDITOR_SUGGEST_VALUES: 'filterEditor:suggestValues', QUERY_ENHANCEMENTS_ENABLED: 'query:enhancements:enabled', + QUERY_ENHANCEMENTS_SUGGEST_VALUES: 'query:enhancements:suggestValues', + QUERY_ENHANCEMENTS_SUGGEST_VALUES_LIMIT: 'query:enhancements:suggestValuesLimit', QUERY_DATAFRAME_HYDRATION_STRATEGY: 'query:dataframe:hydrationStrategy', SEARCH_QUERY_LANGUAGE_BLOCKLIST: 'search:queryLanguageBlocklist', NEW_HOME_PAGE: 'home:useNewHomePage', diff --git a/src/plugins/data/public/antlr/dql/code_completion.test.ts b/src/plugins/data/public/antlr/dql/code_completion.test.ts index e504d850f2e4..e43fdd8576d3 100644 --- a/src/plugins/data/public/antlr/dql/code_completion.test.ts +++ b/src/plugins/data/public/antlr/dql/code_completion.test.ts @@ -6,176 +6,12 @@ import { monaco } from '@osd/monaco'; import { getSuggestions } from './code_completion'; import { DataPublicPluginStart, IDataPluginServices } from '../../types'; -import { IndexPattern } from '../../index_patterns'; +import { testingIndex } from '../shared/constants'; /** * Constants */ -const testingIndex = ({ - title: 'opensearch_dashboards_sample_data_flights', - fields: [ - { - count: 0, - name: 'Carrier', - displayName: 'Carrier', - type: 'string', - esTypes: ['keyword'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: true, - subType: undefined, - }, - { - count: 2, - name: 'DestCityName', - displayName: 'DestCityName', - type: 'string', - esTypes: ['keyword'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: true, - subType: undefined, - }, - { - count: 0, - name: 'DestCountry', - displayName: 'DestCountry', - type: 'string', - esTypes: ['keyword'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: true, - subType: undefined, - }, - { - count: 0, - name: 'DestWeather', - displayName: 'DestWeather', - type: 'string', - esTypes: ['keyword'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: true, - subType: undefined, - }, - { - count: 0, - name: 'DistanceMiles', - displayName: 'DistanceMiles', - type: 'number', - esTypes: ['float'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: true, - subType: undefined, - }, - { - count: 0, - name: 'FlightDelay', - displayName: 'FlightDelay', - type: 'boolean', - esTypes: ['boolean'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: true, - subType: undefined, - }, - { - count: 0, - name: 'FlightNum', - displayName: 'FlightNum', - type: 'string', - esTypes: ['keyword'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: true, - subType: undefined, - }, - { - count: 0, - name: 'OriginWeather', - displayName: 'OriginWeather', - type: 'string', - esTypes: ['keyword'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: true, - subType: undefined, - }, - { - count: 0, - name: '_id', - displayName: '_id', - type: 'string', - esTypes: ['_id'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: false, - subType: undefined, - }, - { - count: 0, - name: '_index', - displayName: '_index', - type: 'string', - esTypes: ['_index'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: false, - subType: undefined, - }, - { - count: 0, - name: '_score', - displayName: '_score', - type: 'number', - scripted: false, - searchable: false, - aggregatable: false, - readFromDocValues: false, - subType: undefined, - }, - { - count: 0, - name: '_source', - displayName: '_source', - type: '_source', - esTypes: ['_source'], - scripted: false, - searchable: false, - aggregatable: false, - readFromDocValues: false, - subType: undefined, - }, - { - count: 0, - name: '_type', - displayName: '_type', - type: 'string', - esTypes: ['_type'], - scripted: false, - searchable: true, - aggregatable: true, - readFromDocValues: false, - subType: undefined, - }, - ], - getFieldByName: jest.fn((fieldName: string) => { - return testingIndex.fields.find((field) => field.name === fieldName); - }), -} as unknown) as IndexPattern; - const booleanOperatorSuggestions = [ { text: 'or', type: 11, detail: 'Operator', insertText: 'or ' }, { text: 'and', type: 11, detail: 'Operator', insertText: 'and ' }, @@ -225,8 +61,6 @@ const allCarrierValueSuggestions = [ { text: 'OpenSearch-Air', type: 13, detail: 'Value', insertText: '"OpenSearch-Air" ' }, ]; -const carrierWithNotSuggestions = allCarrierValueSuggestions.concat(notOperatorSuggestion); - const logCarrierValueSuggestion = [ { text: 'Logstash Airways', type: 13, detail: 'Value', insertText: '"Logstash Airways" ' }, ]; diff --git a/src/plugins/data/public/antlr/dql/code_completion.ts b/src/plugins/data/public/antlr/dql/code_completion.ts index adec4596789a..caa77cbde171 100644 --- a/src/plugins/data/public/antlr/dql/code_completion.ts +++ b/src/plugins/data/public/antlr/dql/code_completion.ts @@ -18,7 +18,7 @@ import { IndexPattern, IndexPatternField } from '../../index_patterns'; import { QuerySuggestion, QuerySuggestionGetFnArgs } from '../../autocomplete'; import { DQLParserVisitor } from './.generated/DQLParserVisitor'; import { IDataPluginServices } from '../..'; -import { fetchFieldSuggestions } from '../shared/utils'; +import { formatFieldsToSuggestions } from '../shared/utils'; import { SuggestionItemDetailsTags } from '../shared/constants'; const findCursorIndex = ( @@ -128,7 +128,7 @@ export const getSuggestions = async ({ // check to see if field rule is a candidate. if so, suggest field names if (candidates.rules.has(DQLParser.RULE_field)) { completions.push( - ...fetchFieldSuggestions(indexPattern, (field: string) => { + ...formatFieldsToSuggestions(indexPattern, (field: string) => { const indexField = indexPattern.getFieldByName(field); if (indexField && ['boolean', 'string'].includes(indexField.type)) { return `${field} : `; diff --git a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.interp b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.interp index 5f9afe06d813..a52012d7715a 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.interp +++ b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.interp @@ -794,4 +794,4 @@ keywordsCanBeId atn: -[4, 1, 336, 1117, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 1, 0, 3, 0, 230, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 241, 8, 3, 10, 3, 12, 3, 244, 9, 3, 1, 4, 1, 4, 1, 4, 3, 4, 249, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 267, 8, 5, 1, 6, 3, 6, 270, 8, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 3, 10, 285, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 293, 8, 11, 10, 11, 12, 11, 296, 9, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 302, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 307, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 312, 8, 12, 1, 12, 1, 12, 1, 12, 5, 12, 317, 8, 12, 10, 12, 12, 12, 320, 9, 12, 1, 12, 3, 12, 323, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 328, 8, 12, 1, 13, 1, 13, 3, 13, 332, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 338, 8, 13, 1, 13, 1, 13, 1, 13, 3, 13, 343, 8, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 352, 8, 15, 10, 15, 12, 15, 355, 9, 15, 1, 16, 1, 16, 3, 16, 359, 8, 16, 1, 16, 1, 16, 3, 16, 363, 8, 16, 1, 17, 1, 17, 3, 17, 367, 8, 17, 1, 17, 1, 17, 3, 17, 371, 8, 17, 1, 18, 1, 18, 1, 18, 3, 18, 376, 8, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 5, 21, 388, 8, 21, 10, 21, 12, 21, 391, 9, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 401, 8, 22, 1, 23, 1, 23, 1, 24, 1, 24, 5, 24, 407, 8, 24, 10, 24, 12, 24, 410, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 421, 8, 25, 1, 26, 1, 26, 5, 26, 425, 8, 26, 10, 26, 12, 26, 428, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 466, 8, 27, 1, 28, 1, 28, 5, 28, 470, 8, 28, 10, 28, 12, 28, 473, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 485, 8, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 505, 8, 34, 1, 35, 1, 35, 1, 35, 3, 35, 510, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 518, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 5, 37, 525, 8, 37, 10, 37, 12, 37, 528, 9, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 3, 39, 537, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 554, 8, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 563, 8, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 3, 44, 578, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 586, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 593, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 599, 8, 45, 10, 45, 12, 45, 602, 9, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 612, 8, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 623, 8, 47, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 629, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 3, 51, 642, 8, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, 651, 8, 52, 10, 52, 12, 52, 654, 9, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 664, 8, 53, 10, 53, 12, 53, 667, 9, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 674, 8, 53, 10, 53, 12, 53, 677, 9, 53, 1, 53, 1, 53, 1, 54, 1, 54, 3, 54, 683, 8, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 5, 56, 693, 8, 56, 10, 56, 12, 56, 696, 9, 56, 1, 57, 1, 57, 1, 57, 5, 57, 701, 8, 57, 10, 57, 12, 57, 704, 9, 57, 1, 58, 3, 58, 707, 8, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 732, 8, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 765, 8, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 773, 8, 66, 1, 67, 1, 67, 1, 67, 5, 67, 778, 8, 67, 10, 67, 12, 67, 781, 9, 67, 3, 67, 783, 8, 67, 1, 68, 1, 68, 1, 68, 3, 68, 788, 8, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 806, 8, 71, 1, 72, 1, 72, 3, 72, 810, 8, 72, 1, 73, 1, 73, 3, 73, 814, 8, 73, 1, 74, 1, 74, 1, 75, 1, 75, 3, 75, 820, 8, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 3, 76, 845, 8, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 3, 84, 873, 8, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, 1, 89, 1, 90, 1, 90, 1, 91, 1, 91, 1, 92, 1, 92, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 3, 94, 906, 8, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 3, 97, 915, 8, 97, 1, 97, 1, 97, 1, 98, 3, 98, 920, 8, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 3, 100, 929, 8, 100, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 5, 106, 948, 8, 106, 10, 106, 12, 106, 951, 9, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 5, 108, 960, 8, 108, 10, 108, 12, 108, 963, 9, 108, 1, 109, 1, 109, 1, 109, 5, 109, 968, 8, 109, 10, 109, 12, 109, 971, 9, 109, 1, 110, 3, 110, 974, 8, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 3, 110, 983, 8, 110, 1, 111, 3, 111, 986, 8, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 5, 112, 993, 8, 112, 10, 112, 12, 112, 996, 9, 112, 1, 112, 3, 112, 999, 8, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 3, 112, 1013, 8, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 3, 113, 1115, 8, 113, 1, 113, 0, 1, 90, 114, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 0, 20, 1, 0, 118, 119, 1, 0, 18, 19, 2, 0, 137, 137, 171, 171, 5, 0, 135, 136, 140, 140, 143, 143, 148, 148, 150, 153, 3, 0, 7, 7, 56, 56, 289, 319, 1, 0, 195, 204, 13, 0, 68, 70, 74, 74, 76, 76, 79, 79, 82, 82, 84, 84, 86, 87, 89, 92, 94, 97, 205, 222, 224, 225, 227, 243, 246, 255, 4, 0, 69, 69, 212, 212, 241, 241, 243, 243, 8, 0, 70, 70, 76, 76, 82, 82, 84, 84, 89, 89, 91, 92, 95, 95, 97, 97, 8, 0, 71, 73, 75, 75, 77, 78, 80, 80, 85, 85, 88, 88, 93, 93, 98, 98, 1, 0, 244, 245, 1, 0, 275, 280, 2, 0, 256, 260, 262, 273, 2, 0, 67, 67, 112, 117, 1, 0, 282, 285, 1, 0, 286, 288, 1, 0, 333, 334, 1, 0, 65, 66, 9, 0, 70, 73, 75, 78, 80, 80, 82, 82, 84, 85, 88, 89, 91, 93, 95, 95, 97, 98, 9, 0, 31, 31, 70, 70, 76, 76, 83, 84, 89, 89, 91, 92, 95, 95, 97, 97, 321, 327, 1265, 0, 229, 1, 0, 0, 0, 2, 233, 1, 0, 0, 0, 4, 235, 1, 0, 0, 0, 6, 237, 1, 0, 0, 0, 8, 248, 1, 0, 0, 0, 10, 266, 1, 0, 0, 0, 12, 269, 1, 0, 0, 0, 14, 273, 1, 0, 0, 0, 16, 276, 1, 0, 0, 0, 18, 279, 1, 0, 0, 0, 20, 282, 1, 0, 0, 0, 22, 288, 1, 0, 0, 0, 24, 297, 1, 0, 0, 0, 26, 329, 1, 0, 0, 0, 28, 344, 1, 0, 0, 0, 30, 347, 1, 0, 0, 0, 32, 356, 1, 0, 0, 0, 34, 364, 1, 0, 0, 0, 36, 372, 1, 0, 0, 0, 38, 377, 1, 0, 0, 0, 40, 381, 1, 0, 0, 0, 42, 385, 1, 0, 0, 0, 44, 400, 1, 0, 0, 0, 46, 402, 1, 0, 0, 0, 48, 404, 1, 0, 0, 0, 50, 420, 1, 0, 0, 0, 52, 422, 1, 0, 0, 0, 54, 465, 1, 0, 0, 0, 56, 467, 1, 0, 0, 0, 58, 474, 1, 0, 0, 0, 60, 484, 1, 0, 0, 0, 62, 486, 1, 0, 0, 0, 64, 488, 1, 0, 0, 0, 66, 492, 1, 0, 0, 0, 68, 504, 1, 0, 0, 0, 70, 506, 1, 0, 0, 0, 72, 511, 1, 0, 0, 0, 74, 521, 1, 0, 0, 0, 76, 529, 1, 0, 0, 0, 78, 533, 1, 0, 0, 0, 80, 553, 1, 0, 0, 0, 82, 555, 1, 0, 0, 0, 84, 557, 1, 0, 0, 0, 86, 566, 1, 0, 0, 0, 88, 577, 1, 0, 0, 0, 90, 585, 1, 0, 0, 0, 92, 611, 1, 0, 0, 0, 94, 622, 1, 0, 0, 0, 96, 628, 1, 0, 0, 0, 98, 630, 1, 0, 0, 0, 100, 637, 1, 0, 0, 0, 102, 641, 1, 0, 0, 0, 104, 643, 1, 0, 0, 0, 106, 657, 1, 0, 0, 0, 108, 682, 1, 0, 0, 0, 110, 684, 1, 0, 0, 0, 112, 689, 1, 0, 0, 0, 114, 697, 1, 0, 0, 0, 116, 706, 1, 0, 0, 0, 118, 731, 1, 0, 0, 0, 120, 733, 1, 0, 0, 0, 122, 735, 1, 0, 0, 0, 124, 737, 1, 0, 0, 0, 126, 742, 1, 0, 0, 0, 128, 749, 1, 0, 0, 0, 130, 764, 1, 0, 0, 0, 132, 772, 1, 0, 0, 0, 134, 782, 1, 0, 0, 0, 136, 787, 1, 0, 0, 0, 138, 791, 1, 0, 0, 0, 140, 795, 1, 0, 0, 0, 142, 805, 1, 0, 0, 0, 144, 809, 1, 0, 0, 0, 146, 813, 1, 0, 0, 0, 148, 815, 1, 0, 0, 0, 150, 819, 1, 0, 0, 0, 152, 844, 1, 0, 0, 0, 154, 846, 1, 0, 0, 0, 156, 848, 1, 0, 0, 0, 158, 850, 1, 0, 0, 0, 160, 857, 1, 0, 0, 0, 162, 859, 1, 0, 0, 0, 164, 866, 1, 0, 0, 0, 166, 868, 1, 0, 0, 0, 168, 872, 1, 0, 0, 0, 170, 874, 1, 0, 0, 0, 172, 883, 1, 0, 0, 0, 174, 885, 1, 0, 0, 0, 176, 887, 1, 0, 0, 0, 178, 889, 1, 0, 0, 0, 180, 891, 1, 0, 0, 0, 182, 893, 1, 0, 0, 0, 184, 895, 1, 0, 0, 0, 186, 897, 1, 0, 0, 0, 188, 905, 1, 0, 0, 0, 190, 907, 1, 0, 0, 0, 192, 911, 1, 0, 0, 0, 194, 914, 1, 0, 0, 0, 196, 919, 1, 0, 0, 0, 198, 923, 1, 0, 0, 0, 200, 928, 1, 0, 0, 0, 202, 930, 1, 0, 0, 0, 204, 933, 1, 0, 0, 0, 206, 936, 1, 0, 0, 0, 208, 939, 1, 0, 0, 0, 210, 941, 1, 0, 0, 0, 212, 943, 1, 0, 0, 0, 214, 954, 1, 0, 0, 0, 216, 956, 1, 0, 0, 0, 218, 964, 1, 0, 0, 0, 220, 982, 1, 0, 0, 0, 222, 985, 1, 0, 0, 0, 224, 1012, 1, 0, 0, 0, 226, 1114, 1, 0, 0, 0, 228, 230, 3, 2, 1, 0, 229, 228, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 5, 0, 0, 1, 232, 1, 1, 0, 0, 0, 233, 234, 3, 4, 2, 0, 234, 3, 1, 0, 0, 0, 235, 236, 3, 6, 3, 0, 236, 5, 1, 0, 0, 0, 237, 242, 3, 8, 4, 0, 238, 239, 5, 109, 0, 0, 239, 241, 3, 10, 5, 0, 240, 238, 1, 0, 0, 0, 241, 244, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 7, 1, 0, 0, 0, 244, 242, 1, 0, 0, 0, 245, 249, 3, 12, 6, 0, 246, 249, 3, 14, 7, 0, 247, 249, 3, 16, 8, 0, 248, 245, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 247, 1, 0, 0, 0, 249, 9, 1, 0, 0, 0, 250, 267, 3, 18, 9, 0, 251, 267, 3, 20, 10, 0, 252, 267, 3, 22, 11, 0, 253, 267, 3, 24, 12, 0, 254, 267, 3, 26, 13, 0, 255, 267, 3, 28, 14, 0, 256, 267, 3, 30, 15, 0, 257, 267, 3, 32, 16, 0, 258, 267, 3, 34, 17, 0, 259, 267, 3, 36, 18, 0, 260, 267, 3, 38, 19, 0, 261, 267, 3, 40, 20, 0, 262, 267, 3, 42, 21, 0, 263, 267, 3, 48, 24, 0, 264, 267, 3, 52, 26, 0, 265, 267, 3, 56, 28, 0, 266, 250, 1, 0, 0, 0, 266, 251, 1, 0, 0, 0, 266, 252, 1, 0, 0, 0, 266, 253, 1, 0, 0, 0, 266, 254, 1, 0, 0, 0, 266, 255, 1, 0, 0, 0, 266, 256, 1, 0, 0, 0, 266, 257, 1, 0, 0, 0, 266, 258, 1, 0, 0, 0, 266, 259, 1, 0, 0, 0, 266, 260, 1, 0, 0, 0, 266, 261, 1, 0, 0, 0, 266, 262, 1, 0, 0, 0, 266, 263, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 266, 265, 1, 0, 0, 0, 267, 11, 1, 0, 0, 0, 268, 270, 5, 2, 0, 0, 269, 268, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 271, 1, 0, 0, 0, 271, 272, 3, 60, 30, 0, 272, 13, 1, 0, 0, 0, 273, 274, 5, 3, 0, 0, 274, 275, 3, 62, 31, 0, 275, 15, 1, 0, 0, 0, 276, 277, 5, 4, 0, 0, 277, 278, 5, 33, 0, 0, 278, 17, 1, 0, 0, 0, 279, 280, 5, 6, 0, 0, 280, 281, 3, 90, 45, 0, 281, 19, 1, 0, 0, 0, 282, 284, 5, 7, 0, 0, 283, 285, 7, 0, 0, 0, 284, 283, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 286, 1, 0, 0, 0, 286, 287, 3, 112, 56, 0, 287, 21, 1, 0, 0, 0, 288, 289, 5, 8, 0, 0, 289, 294, 3, 64, 32, 0, 290, 291, 5, 110, 0, 0, 291, 293, 3, 64, 32, 0, 292, 290, 1, 0, 0, 0, 293, 296, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 23, 1, 0, 0, 0, 296, 294, 1, 0, 0, 0, 297, 301, 5, 9, 0, 0, 298, 299, 5, 42, 0, 0, 299, 300, 5, 112, 0, 0, 300, 302, 3, 194, 97, 0, 301, 298, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 306, 1, 0, 0, 0, 303, 304, 5, 43, 0, 0, 304, 305, 5, 112, 0, 0, 305, 307, 3, 198, 99, 0, 306, 303, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 311, 1, 0, 0, 0, 308, 309, 5, 44, 0, 0, 309, 310, 5, 112, 0, 0, 310, 312, 3, 192, 96, 0, 311, 308, 1, 0, 0, 0, 311, 312, 1, 0, 0, 0, 312, 313, 1, 0, 0, 0, 313, 318, 3, 78, 39, 0, 314, 315, 5, 110, 0, 0, 315, 317, 3, 78, 39, 0, 316, 314, 1, 0, 0, 0, 317, 320, 1, 0, 0, 0, 318, 316, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 322, 1, 0, 0, 0, 320, 318, 1, 0, 0, 0, 321, 323, 3, 68, 34, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 327, 1, 0, 0, 0, 324, 325, 5, 41, 0, 0, 325, 326, 5, 112, 0, 0, 326, 328, 3, 198, 99, 0, 327, 324, 1, 0, 0, 0, 327, 328, 1, 0, 0, 0, 328, 25, 1, 0, 0, 0, 329, 331, 5, 10, 0, 0, 330, 332, 3, 194, 97, 0, 331, 330, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 337, 3, 112, 56, 0, 334, 335, 5, 39, 0, 0, 335, 336, 5, 112, 0, 0, 336, 338, 3, 198, 99, 0, 337, 334, 1, 0, 0, 0, 337, 338, 1, 0, 0, 0, 338, 342, 1, 0, 0, 0, 339, 340, 5, 40, 0, 0, 340, 341, 5, 112, 0, 0, 341, 343, 3, 198, 99, 0, 342, 339, 1, 0, 0, 0, 342, 343, 1, 0, 0, 0, 343, 27, 1, 0, 0, 0, 344, 345, 5, 11, 0, 0, 345, 346, 3, 74, 37, 0, 346, 29, 1, 0, 0, 0, 347, 348, 5, 12, 0, 0, 348, 353, 3, 76, 38, 0, 349, 350, 5, 110, 0, 0, 350, 352, 3, 76, 38, 0, 351, 349, 1, 0, 0, 0, 352, 355, 1, 0, 0, 0, 353, 351, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 31, 1, 0, 0, 0, 355, 353, 1, 0, 0, 0, 356, 358, 5, 13, 0, 0, 357, 359, 3, 194, 97, 0, 358, 357, 1, 0, 0, 0, 358, 359, 1, 0, 0, 0, 359, 362, 1, 0, 0, 0, 360, 361, 5, 5, 0, 0, 361, 363, 3, 194, 97, 0, 362, 360, 1, 0, 0, 0, 362, 363, 1, 0, 0, 0, 363, 33, 1, 0, 0, 0, 364, 366, 5, 14, 0, 0, 365, 367, 3, 194, 97, 0, 366, 365, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 370, 3, 112, 56, 0, 369, 371, 3, 66, 33, 0, 370, 369, 1, 0, 0, 0, 370, 371, 1, 0, 0, 0, 371, 35, 1, 0, 0, 0, 372, 373, 5, 15, 0, 0, 373, 375, 3, 112, 56, 0, 374, 376, 3, 66, 33, 0, 375, 374, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 37, 1, 0, 0, 0, 377, 378, 5, 20, 0, 0, 378, 379, 3, 88, 44, 0, 379, 380, 3, 192, 96, 0, 380, 39, 1, 0, 0, 0, 381, 382, 5, 16, 0, 0, 382, 383, 3, 88, 44, 0, 383, 384, 3, 192, 96, 0, 384, 41, 1, 0, 0, 0, 385, 389, 5, 22, 0, 0, 386, 388, 3, 44, 22, 0, 387, 386, 1, 0, 0, 0, 388, 391, 1, 0, 0, 0, 389, 387, 1, 0, 0, 0, 389, 390, 1, 0, 0, 0, 390, 392, 1, 0, 0, 0, 391, 389, 1, 0, 0, 0, 392, 393, 3, 88, 44, 0, 393, 43, 1, 0, 0, 0, 394, 395, 5, 23, 0, 0, 395, 396, 5, 112, 0, 0, 396, 401, 3, 192, 96, 0, 397, 398, 5, 21, 0, 0, 398, 399, 5, 112, 0, 0, 399, 401, 3, 192, 96, 0, 400, 394, 1, 0, 0, 0, 400, 397, 1, 0, 0, 0, 401, 45, 1, 0, 0, 0, 402, 403, 7, 1, 0, 0, 403, 47, 1, 0, 0, 0, 404, 408, 5, 24, 0, 0, 405, 407, 3, 50, 25, 0, 406, 405, 1, 0, 0, 0, 407, 410, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 49, 1, 0, 0, 0, 410, 408, 1, 0, 0, 0, 411, 412, 5, 45, 0, 0, 412, 413, 5, 112, 0, 0, 413, 421, 3, 194, 97, 0, 414, 415, 5, 46, 0, 0, 415, 416, 5, 112, 0, 0, 416, 421, 3, 194, 97, 0, 417, 418, 5, 47, 0, 0, 418, 419, 5, 112, 0, 0, 419, 421, 3, 192, 96, 0, 420, 411, 1, 0, 0, 0, 420, 414, 1, 0, 0, 0, 420, 417, 1, 0, 0, 0, 421, 51, 1, 0, 0, 0, 422, 426, 5, 25, 0, 0, 423, 425, 3, 54, 27, 0, 424, 423, 1, 0, 0, 0, 425, 428, 1, 0, 0, 0, 426, 424, 1, 0, 0, 0, 426, 427, 1, 0, 0, 0, 427, 53, 1, 0, 0, 0, 428, 426, 1, 0, 0, 0, 429, 430, 5, 48, 0, 0, 430, 431, 5, 112, 0, 0, 431, 466, 3, 194, 97, 0, 432, 433, 5, 49, 0, 0, 433, 434, 5, 112, 0, 0, 434, 466, 3, 194, 97, 0, 435, 436, 5, 50, 0, 0, 436, 437, 5, 112, 0, 0, 437, 466, 3, 194, 97, 0, 438, 439, 5, 51, 0, 0, 439, 440, 5, 112, 0, 0, 440, 466, 3, 194, 97, 0, 441, 442, 5, 52, 0, 0, 442, 443, 5, 112, 0, 0, 443, 466, 3, 196, 98, 0, 444, 445, 5, 53, 0, 0, 445, 446, 5, 112, 0, 0, 446, 466, 3, 196, 98, 0, 447, 448, 5, 54, 0, 0, 448, 449, 5, 112, 0, 0, 449, 466, 3, 192, 96, 0, 450, 451, 5, 55, 0, 0, 451, 452, 5, 112, 0, 0, 452, 466, 3, 192, 96, 0, 453, 454, 5, 215, 0, 0, 454, 455, 5, 112, 0, 0, 455, 466, 3, 192, 96, 0, 456, 457, 5, 56, 0, 0, 457, 458, 5, 112, 0, 0, 458, 466, 3, 192, 96, 0, 459, 460, 5, 57, 0, 0, 460, 461, 5, 112, 0, 0, 461, 466, 3, 194, 97, 0, 462, 463, 5, 58, 0, 0, 463, 464, 5, 112, 0, 0, 464, 466, 3, 196, 98, 0, 465, 429, 1, 0, 0, 0, 465, 432, 1, 0, 0, 0, 465, 435, 1, 0, 0, 0, 465, 438, 1, 0, 0, 0, 465, 441, 1, 0, 0, 0, 465, 444, 1, 0, 0, 0, 465, 447, 1, 0, 0, 0, 465, 450, 1, 0, 0, 0, 465, 453, 1, 0, 0, 0, 465, 456, 1, 0, 0, 0, 465, 459, 1, 0, 0, 0, 465, 462, 1, 0, 0, 0, 466, 55, 1, 0, 0, 0, 467, 471, 5, 26, 0, 0, 468, 470, 3, 58, 29, 0, 469, 468, 1, 0, 0, 0, 470, 473, 1, 0, 0, 0, 471, 469, 1, 0, 0, 0, 471, 472, 1, 0, 0, 0, 472, 57, 1, 0, 0, 0, 473, 471, 1, 0, 0, 0, 474, 475, 3, 220, 110, 0, 475, 476, 5, 112, 0, 0, 476, 477, 3, 188, 94, 0, 477, 59, 1, 0, 0, 0, 478, 479, 5, 29, 0, 0, 479, 480, 5, 112, 0, 0, 480, 485, 3, 62, 31, 0, 481, 482, 5, 30, 0, 0, 482, 483, 5, 112, 0, 0, 483, 485, 3, 62, 31, 0, 484, 478, 1, 0, 0, 0, 484, 481, 1, 0, 0, 0, 485, 61, 1, 0, 0, 0, 486, 487, 3, 108, 54, 0, 487, 63, 1, 0, 0, 0, 488, 489, 3, 122, 61, 0, 489, 490, 5, 27, 0, 0, 490, 491, 3, 122, 61, 0, 491, 65, 1, 0, 0, 0, 492, 493, 5, 28, 0, 0, 493, 494, 3, 112, 56, 0, 494, 67, 1, 0, 0, 0, 495, 496, 5, 28, 0, 0, 496, 505, 3, 112, 56, 0, 497, 498, 5, 28, 0, 0, 498, 505, 3, 70, 35, 0, 499, 500, 5, 28, 0, 0, 500, 501, 3, 70, 35, 0, 501, 502, 5, 110, 0, 0, 502, 503, 3, 112, 56, 0, 503, 505, 1, 0, 0, 0, 504, 495, 1, 0, 0, 0, 504, 497, 1, 0, 0, 0, 504, 499, 1, 0, 0, 0, 505, 69, 1, 0, 0, 0, 506, 509, 3, 72, 36, 0, 507, 508, 5, 27, 0, 0, 508, 510, 3, 214, 107, 0, 509, 507, 1, 0, 0, 0, 509, 510, 1, 0, 0, 0, 510, 71, 1, 0, 0, 0, 511, 512, 5, 320, 0, 0, 512, 513, 5, 125, 0, 0, 513, 514, 3, 120, 60, 0, 514, 515, 5, 110, 0, 0, 515, 517, 3, 188, 94, 0, 516, 518, 3, 210, 105, 0, 517, 516, 1, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, 519, 1, 0, 0, 0, 519, 520, 5, 126, 0, 0, 520, 73, 1, 0, 0, 0, 521, 526, 3, 116, 58, 0, 522, 523, 5, 110, 0, 0, 523, 525, 3, 116, 58, 0, 524, 522, 1, 0, 0, 0, 525, 528, 1, 0, 0, 0, 526, 524, 1, 0, 0, 0, 526, 527, 1, 0, 0, 0, 527, 75, 1, 0, 0, 0, 528, 526, 1, 0, 0, 0, 529, 530, 3, 120, 60, 0, 530, 531, 5, 112, 0, 0, 531, 532, 3, 88, 44, 0, 532, 77, 1, 0, 0, 0, 533, 536, 3, 80, 40, 0, 534, 535, 5, 27, 0, 0, 535, 537, 3, 122, 61, 0, 536, 534, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 79, 1, 0, 0, 0, 538, 539, 3, 82, 41, 0, 539, 540, 5, 125, 0, 0, 540, 541, 3, 94, 47, 0, 541, 542, 5, 126, 0, 0, 542, 554, 1, 0, 0, 0, 543, 544, 5, 136, 0, 0, 544, 545, 5, 125, 0, 0, 545, 554, 5, 126, 0, 0, 546, 547, 7, 2, 0, 0, 547, 548, 5, 125, 0, 0, 548, 549, 3, 94, 47, 0, 549, 550, 5, 126, 0, 0, 550, 554, 1, 0, 0, 0, 551, 554, 3, 86, 43, 0, 552, 554, 3, 84, 42, 0, 553, 538, 1, 0, 0, 0, 553, 543, 1, 0, 0, 0, 553, 546, 1, 0, 0, 0, 553, 551, 1, 0, 0, 0, 553, 552, 1, 0, 0, 0, 554, 81, 1, 0, 0, 0, 555, 556, 7, 3, 0, 0, 556, 83, 1, 0, 0, 0, 557, 558, 5, 155, 0, 0, 558, 559, 5, 125, 0, 0, 559, 562, 3, 120, 60, 0, 560, 561, 5, 110, 0, 0, 561, 563, 3, 194, 97, 0, 562, 560, 1, 0, 0, 0, 562, 563, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 565, 5, 126, 0, 0, 565, 85, 1, 0, 0, 0, 566, 567, 5, 154, 0, 0, 567, 568, 5, 114, 0, 0, 568, 569, 3, 194, 97, 0, 569, 570, 5, 113, 0, 0, 570, 571, 5, 125, 0, 0, 571, 572, 3, 120, 60, 0, 572, 573, 5, 126, 0, 0, 573, 87, 1, 0, 0, 0, 574, 578, 3, 90, 45, 0, 575, 578, 3, 92, 46, 0, 576, 578, 3, 94, 47, 0, 577, 574, 1, 0, 0, 0, 577, 575, 1, 0, 0, 0, 577, 576, 1, 0, 0, 0, 578, 89, 1, 0, 0, 0, 579, 580, 6, 45, -1, 0, 580, 586, 3, 92, 46, 0, 581, 582, 5, 61, 0, 0, 582, 586, 3, 90, 45, 6, 583, 586, 3, 100, 50, 0, 584, 586, 3, 102, 51, 0, 585, 579, 1, 0, 0, 0, 585, 581, 1, 0, 0, 0, 585, 583, 1, 0, 0, 0, 585, 584, 1, 0, 0, 0, 586, 600, 1, 0, 0, 0, 587, 588, 10, 5, 0, 0, 588, 589, 5, 62, 0, 0, 589, 599, 3, 90, 45, 6, 590, 592, 10, 4, 0, 0, 591, 593, 5, 63, 0, 0, 592, 591, 1, 0, 0, 0, 592, 593, 1, 0, 0, 0, 593, 594, 1, 0, 0, 0, 594, 599, 3, 90, 45, 5, 595, 596, 10, 3, 0, 0, 596, 597, 5, 64, 0, 0, 597, 599, 3, 90, 45, 4, 598, 587, 1, 0, 0, 0, 598, 590, 1, 0, 0, 0, 598, 595, 1, 0, 0, 0, 599, 602, 1, 0, 0, 0, 600, 598, 1, 0, 0, 0, 600, 601, 1, 0, 0, 0, 601, 91, 1, 0, 0, 0, 602, 600, 1, 0, 0, 0, 603, 604, 3, 94, 47, 0, 604, 605, 3, 182, 91, 0, 605, 606, 3, 94, 47, 0, 606, 612, 1, 0, 0, 0, 607, 608, 3, 94, 47, 0, 608, 609, 5, 60, 0, 0, 609, 610, 3, 212, 106, 0, 610, 612, 1, 0, 0, 0, 611, 603, 1, 0, 0, 0, 611, 607, 1, 0, 0, 0, 612, 93, 1, 0, 0, 0, 613, 623, 3, 96, 48, 0, 614, 623, 3, 98, 49, 0, 615, 623, 3, 162, 81, 0, 616, 623, 3, 158, 79, 0, 617, 623, 3, 170, 85, 0, 618, 619, 5, 125, 0, 0, 619, 620, 3, 94, 47, 0, 620, 621, 5, 126, 0, 0, 621, 623, 1, 0, 0, 0, 622, 613, 1, 0, 0, 0, 622, 614, 1, 0, 0, 0, 622, 615, 1, 0, 0, 0, 622, 616, 1, 0, 0, 0, 622, 617, 1, 0, 0, 0, 622, 618, 1, 0, 0, 0, 623, 95, 1, 0, 0, 0, 624, 629, 3, 124, 62, 0, 625, 629, 3, 126, 63, 0, 626, 629, 3, 120, 60, 0, 627, 629, 3, 188, 94, 0, 628, 624, 1, 0, 0, 0, 628, 625, 1, 0, 0, 0, 628, 626, 1, 0, 0, 0, 628, 627, 1, 0, 0, 0, 629, 97, 1, 0, 0, 0, 630, 631, 3, 180, 90, 0, 631, 632, 5, 125, 0, 0, 632, 633, 3, 136, 68, 0, 633, 634, 5, 60, 0, 0, 634, 635, 3, 136, 68, 0, 635, 636, 5, 126, 0, 0, 636, 99, 1, 0, 0, 0, 637, 638, 3, 128, 64, 0, 638, 101, 1, 0, 0, 0, 639, 642, 3, 104, 52, 0, 640, 642, 3, 106, 53, 0, 641, 639, 1, 0, 0, 0, 641, 640, 1, 0, 0, 0, 642, 103, 1, 0, 0, 0, 643, 644, 3, 184, 92, 0, 644, 645, 5, 125, 0, 0, 645, 646, 3, 146, 73, 0, 646, 647, 5, 110, 0, 0, 647, 652, 3, 148, 74, 0, 648, 649, 5, 110, 0, 0, 649, 651, 3, 138, 69, 0, 650, 648, 1, 0, 0, 0, 651, 654, 1, 0, 0, 0, 652, 650, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 655, 1, 0, 0, 0, 654, 652, 1, 0, 0, 0, 655, 656, 5, 126, 0, 0, 656, 105, 1, 0, 0, 0, 657, 658, 3, 186, 93, 0, 658, 659, 5, 125, 0, 0, 659, 660, 5, 127, 0, 0, 660, 665, 3, 142, 71, 0, 661, 662, 5, 110, 0, 0, 662, 664, 3, 142, 71, 0, 663, 661, 1, 0, 0, 0, 664, 667, 1, 0, 0, 0, 665, 663, 1, 0, 0, 0, 665, 666, 1, 0, 0, 0, 666, 668, 1, 0, 0, 0, 667, 665, 1, 0, 0, 0, 668, 669, 5, 128, 0, 0, 669, 670, 5, 110, 0, 0, 670, 675, 3, 148, 74, 0, 671, 672, 5, 110, 0, 0, 672, 674, 3, 138, 69, 0, 673, 671, 1, 0, 0, 0, 674, 677, 1, 0, 0, 0, 675, 673, 1, 0, 0, 0, 675, 676, 1, 0, 0, 0, 676, 678, 1, 0, 0, 0, 677, 675, 1, 0, 0, 0, 678, 679, 5, 126, 0, 0, 679, 107, 1, 0, 0, 0, 680, 683, 3, 216, 108, 0, 681, 683, 5, 332, 0, 0, 682, 680, 1, 0, 0, 0, 682, 681, 1, 0, 0, 0, 683, 109, 1, 0, 0, 0, 684, 685, 3, 214, 107, 0, 685, 686, 5, 125, 0, 0, 686, 687, 3, 134, 67, 0, 687, 688, 5, 126, 0, 0, 688, 111, 1, 0, 0, 0, 689, 694, 3, 120, 60, 0, 690, 691, 5, 110, 0, 0, 691, 693, 3, 120, 60, 0, 692, 690, 1, 0, 0, 0, 693, 696, 1, 0, 0, 0, 694, 692, 1, 0, 0, 0, 694, 695, 1, 0, 0, 0, 695, 113, 1, 0, 0, 0, 696, 694, 1, 0, 0, 0, 697, 702, 3, 122, 61, 0, 698, 699, 5, 110, 0, 0, 699, 701, 3, 122, 61, 0, 700, 698, 1, 0, 0, 0, 701, 704, 1, 0, 0, 0, 702, 700, 1, 0, 0, 0, 702, 703, 1, 0, 0, 0, 703, 115, 1, 0, 0, 0, 704, 702, 1, 0, 0, 0, 705, 707, 7, 0, 0, 0, 706, 705, 1, 0, 0, 0, 706, 707, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 709, 3, 118, 59, 0, 709, 117, 1, 0, 0, 0, 710, 732, 3, 120, 60, 0, 711, 712, 5, 35, 0, 0, 712, 713, 5, 125, 0, 0, 713, 714, 3, 120, 60, 0, 714, 715, 5, 126, 0, 0, 715, 732, 1, 0, 0, 0, 716, 717, 5, 36, 0, 0, 717, 718, 5, 125, 0, 0, 718, 719, 3, 120, 60, 0, 719, 720, 5, 126, 0, 0, 720, 732, 1, 0, 0, 0, 721, 722, 5, 37, 0, 0, 722, 723, 5, 125, 0, 0, 723, 724, 3, 120, 60, 0, 724, 725, 5, 126, 0, 0, 725, 732, 1, 0, 0, 0, 726, 727, 5, 38, 0, 0, 727, 728, 5, 125, 0, 0, 728, 729, 3, 120, 60, 0, 729, 730, 5, 126, 0, 0, 730, 732, 1, 0, 0, 0, 731, 710, 1, 0, 0, 0, 731, 711, 1, 0, 0, 0, 731, 716, 1, 0, 0, 0, 731, 721, 1, 0, 0, 0, 731, 726, 1, 0, 0, 0, 732, 119, 1, 0, 0, 0, 733, 734, 3, 214, 107, 0, 734, 121, 1, 0, 0, 0, 735, 736, 3, 218, 109, 0, 736, 123, 1, 0, 0, 0, 737, 738, 3, 132, 66, 0, 738, 739, 5, 125, 0, 0, 739, 740, 3, 134, 67, 0, 740, 741, 5, 126, 0, 0, 741, 125, 1, 0, 0, 0, 742, 743, 5, 274, 0, 0, 743, 744, 5, 125, 0, 0, 744, 745, 3, 88, 44, 0, 745, 746, 5, 27, 0, 0, 746, 747, 3, 130, 65, 0, 747, 748, 5, 126, 0, 0, 748, 127, 1, 0, 0, 0, 749, 750, 3, 174, 87, 0, 750, 751, 5, 125, 0, 0, 751, 752, 3, 134, 67, 0, 752, 753, 5, 126, 0, 0, 753, 129, 1, 0, 0, 0, 754, 765, 5, 212, 0, 0, 755, 765, 5, 241, 0, 0, 756, 765, 5, 243, 0, 0, 757, 765, 5, 102, 0, 0, 758, 765, 5, 103, 0, 0, 759, 765, 5, 104, 0, 0, 760, 765, 5, 105, 0, 0, 761, 765, 5, 106, 0, 0, 762, 765, 5, 107, 0, 0, 763, 765, 5, 108, 0, 0, 764, 754, 1, 0, 0, 0, 764, 755, 1, 0, 0, 0, 764, 756, 1, 0, 0, 0, 764, 757, 1, 0, 0, 0, 764, 758, 1, 0, 0, 0, 764, 759, 1, 0, 0, 0, 764, 760, 1, 0, 0, 0, 764, 761, 1, 0, 0, 0, 764, 762, 1, 0, 0, 0, 764, 763, 1, 0, 0, 0, 765, 131, 1, 0, 0, 0, 766, 773, 3, 152, 76, 0, 767, 773, 3, 156, 78, 0, 768, 773, 3, 178, 89, 0, 769, 773, 3, 174, 87, 0, 770, 773, 3, 176, 88, 0, 771, 773, 3, 180, 90, 0, 772, 766, 1, 0, 0, 0, 772, 767, 1, 0, 0, 0, 772, 768, 1, 0, 0, 0, 772, 769, 1, 0, 0, 0, 772, 770, 1, 0, 0, 0, 772, 771, 1, 0, 0, 0, 773, 133, 1, 0, 0, 0, 774, 779, 3, 136, 68, 0, 775, 776, 5, 110, 0, 0, 776, 778, 3, 136, 68, 0, 777, 775, 1, 0, 0, 0, 778, 781, 1, 0, 0, 0, 779, 777, 1, 0, 0, 0, 779, 780, 1, 0, 0, 0, 780, 783, 1, 0, 0, 0, 781, 779, 1, 0, 0, 0, 782, 774, 1, 0, 0, 0, 782, 783, 1, 0, 0, 0, 783, 135, 1, 0, 0, 0, 784, 785, 3, 220, 110, 0, 785, 786, 5, 112, 0, 0, 786, 788, 1, 0, 0, 0, 787, 784, 1, 0, 0, 0, 787, 788, 1, 0, 0, 0, 788, 789, 1, 0, 0, 0, 789, 790, 3, 94, 47, 0, 790, 137, 1, 0, 0, 0, 791, 792, 3, 140, 70, 0, 792, 793, 5, 112, 0, 0, 793, 794, 3, 150, 75, 0, 794, 139, 1, 0, 0, 0, 795, 796, 7, 4, 0, 0, 796, 141, 1, 0, 0, 0, 797, 806, 3, 146, 73, 0, 798, 799, 3, 146, 73, 0, 799, 800, 3, 144, 72, 0, 800, 806, 1, 0, 0, 0, 801, 802, 3, 146, 73, 0, 802, 803, 5, 134, 0, 0, 803, 804, 3, 144, 72, 0, 804, 806, 1, 0, 0, 0, 805, 797, 1, 0, 0, 0, 805, 798, 1, 0, 0, 0, 805, 801, 1, 0, 0, 0, 806, 143, 1, 0, 0, 0, 807, 810, 3, 194, 97, 0, 808, 810, 3, 196, 98, 0, 809, 807, 1, 0, 0, 0, 809, 808, 1, 0, 0, 0, 810, 145, 1, 0, 0, 0, 811, 814, 3, 214, 107, 0, 812, 814, 3, 192, 96, 0, 813, 811, 1, 0, 0, 0, 813, 812, 1, 0, 0, 0, 814, 147, 1, 0, 0, 0, 815, 816, 3, 150, 75, 0, 816, 149, 1, 0, 0, 0, 817, 820, 3, 214, 107, 0, 818, 820, 3, 188, 94, 0, 819, 817, 1, 0, 0, 0, 819, 818, 1, 0, 0, 0, 820, 151, 1, 0, 0, 0, 821, 845, 5, 172, 0, 0, 822, 845, 5, 173, 0, 0, 823, 845, 5, 174, 0, 0, 824, 845, 5, 175, 0, 0, 825, 845, 5, 176, 0, 0, 826, 845, 5, 177, 0, 0, 827, 845, 5, 178, 0, 0, 828, 845, 5, 179, 0, 0, 829, 845, 5, 180, 0, 0, 830, 845, 5, 181, 0, 0, 831, 845, 5, 182, 0, 0, 832, 845, 5, 183, 0, 0, 833, 845, 5, 184, 0, 0, 834, 845, 5, 185, 0, 0, 835, 845, 5, 186, 0, 0, 836, 845, 5, 188, 0, 0, 837, 845, 5, 189, 0, 0, 838, 845, 5, 190, 0, 0, 839, 845, 5, 191, 0, 0, 840, 845, 5, 192, 0, 0, 841, 845, 5, 193, 0, 0, 842, 845, 5, 194, 0, 0, 843, 845, 3, 154, 77, 0, 844, 821, 1, 0, 0, 0, 844, 822, 1, 0, 0, 0, 844, 823, 1, 0, 0, 0, 844, 824, 1, 0, 0, 0, 844, 825, 1, 0, 0, 0, 844, 826, 1, 0, 0, 0, 844, 827, 1, 0, 0, 0, 844, 828, 1, 0, 0, 0, 844, 829, 1, 0, 0, 0, 844, 830, 1, 0, 0, 0, 844, 831, 1, 0, 0, 0, 844, 832, 1, 0, 0, 0, 844, 833, 1, 0, 0, 0, 844, 834, 1, 0, 0, 0, 844, 835, 1, 0, 0, 0, 844, 836, 1, 0, 0, 0, 844, 837, 1, 0, 0, 0, 844, 838, 1, 0, 0, 0, 844, 839, 1, 0, 0, 0, 844, 840, 1, 0, 0, 0, 844, 841, 1, 0, 0, 0, 844, 842, 1, 0, 0, 0, 844, 843, 1, 0, 0, 0, 845, 153, 1, 0, 0, 0, 846, 847, 7, 5, 0, 0, 847, 155, 1, 0, 0, 0, 848, 849, 7, 6, 0, 0, 849, 157, 1, 0, 0, 0, 850, 851, 5, 226, 0, 0, 851, 852, 5, 125, 0, 0, 852, 853, 3, 160, 80, 0, 853, 854, 5, 110, 0, 0, 854, 855, 3, 136, 68, 0, 855, 856, 5, 126, 0, 0, 856, 159, 1, 0, 0, 0, 857, 858, 7, 7, 0, 0, 858, 161, 1, 0, 0, 0, 859, 860, 5, 223, 0, 0, 860, 861, 5, 125, 0, 0, 861, 862, 3, 168, 84, 0, 862, 863, 5, 5, 0, 0, 863, 864, 3, 136, 68, 0, 864, 865, 5, 126, 0, 0, 865, 163, 1, 0, 0, 0, 866, 867, 7, 8, 0, 0, 867, 165, 1, 0, 0, 0, 868, 869, 7, 9, 0, 0, 869, 167, 1, 0, 0, 0, 870, 873, 3, 164, 82, 0, 871, 873, 3, 166, 83, 0, 872, 870, 1, 0, 0, 0, 872, 871, 1, 0, 0, 0, 873, 169, 1, 0, 0, 0, 874, 875, 3, 172, 86, 0, 875, 876, 5, 125, 0, 0, 876, 877, 3, 164, 82, 0, 877, 878, 5, 110, 0, 0, 878, 879, 3, 136, 68, 0, 879, 880, 5, 110, 0, 0, 880, 881, 3, 136, 68, 0, 881, 882, 5, 126, 0, 0, 882, 171, 1, 0, 0, 0, 883, 884, 7, 10, 0, 0, 884, 173, 1, 0, 0, 0, 885, 886, 7, 11, 0, 0, 886, 175, 1, 0, 0, 0, 887, 888, 5, 281, 0, 0, 888, 177, 1, 0, 0, 0, 889, 890, 7, 12, 0, 0, 890, 179, 1, 0, 0, 0, 891, 892, 5, 187, 0, 0, 892, 181, 1, 0, 0, 0, 893, 894, 7, 13, 0, 0, 894, 183, 1, 0, 0, 0, 895, 896, 7, 14, 0, 0, 896, 185, 1, 0, 0, 0, 897, 898, 7, 15, 0, 0, 898, 187, 1, 0, 0, 0, 899, 906, 3, 190, 95, 0, 900, 906, 3, 192, 96, 0, 901, 906, 3, 194, 97, 0, 902, 906, 3, 196, 98, 0, 903, 906, 3, 198, 99, 0, 904, 906, 3, 200, 100, 0, 905, 899, 1, 0, 0, 0, 905, 900, 1, 0, 0, 0, 905, 901, 1, 0, 0, 0, 905, 902, 1, 0, 0, 0, 905, 903, 1, 0, 0, 0, 905, 904, 1, 0, 0, 0, 906, 189, 1, 0, 0, 0, 907, 908, 5, 81, 0, 0, 908, 909, 3, 94, 47, 0, 909, 910, 3, 208, 104, 0, 910, 191, 1, 0, 0, 0, 911, 912, 7, 16, 0, 0, 912, 193, 1, 0, 0, 0, 913, 915, 7, 0, 0, 0, 914, 913, 1, 0, 0, 0, 914, 915, 1, 0, 0, 0, 915, 916, 1, 0, 0, 0, 916, 917, 5, 330, 0, 0, 917, 195, 1, 0, 0, 0, 918, 920, 7, 0, 0, 0, 919, 918, 1, 0, 0, 0, 919, 920, 1, 0, 0, 0, 920, 921, 1, 0, 0, 0, 921, 922, 5, 331, 0, 0, 922, 197, 1, 0, 0, 0, 923, 924, 7, 17, 0, 0, 924, 199, 1, 0, 0, 0, 925, 929, 3, 202, 101, 0, 926, 929, 3, 204, 102, 0, 927, 929, 3, 206, 103, 0, 928, 925, 1, 0, 0, 0, 928, 926, 1, 0, 0, 0, 928, 927, 1, 0, 0, 0, 929, 201, 1, 0, 0, 0, 930, 931, 5, 212, 0, 0, 931, 932, 3, 192, 96, 0, 932, 203, 1, 0, 0, 0, 933, 934, 5, 241, 0, 0, 934, 935, 3, 192, 96, 0, 935, 205, 1, 0, 0, 0, 936, 937, 5, 243, 0, 0, 937, 938, 3, 192, 96, 0, 938, 207, 1, 0, 0, 0, 939, 940, 7, 18, 0, 0, 940, 209, 1, 0, 0, 0, 941, 942, 7, 19, 0, 0, 942, 211, 1, 0, 0, 0, 943, 944, 5, 125, 0, 0, 944, 949, 3, 188, 94, 0, 945, 946, 5, 110, 0, 0, 946, 948, 3, 188, 94, 0, 947, 945, 1, 0, 0, 0, 948, 951, 1, 0, 0, 0, 949, 947, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 952, 1, 0, 0, 0, 951, 949, 1, 0, 0, 0, 952, 953, 5, 126, 0, 0, 953, 213, 1, 0, 0, 0, 954, 955, 5, 328, 0, 0, 955, 215, 1, 0, 0, 0, 956, 961, 3, 222, 111, 0, 957, 958, 5, 111, 0, 0, 958, 960, 3, 220, 110, 0, 959, 957, 1, 0, 0, 0, 960, 963, 1, 0, 0, 0, 961, 959, 1, 0, 0, 0, 961, 962, 1, 0, 0, 0, 962, 217, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 964, 969, 3, 224, 112, 0, 965, 966, 5, 111, 0, 0, 966, 968, 3, 224, 112, 0, 967, 965, 1, 0, 0, 0, 968, 971, 1, 0, 0, 0, 969, 967, 1, 0, 0, 0, 969, 970, 1, 0, 0, 0, 970, 219, 1, 0, 0, 0, 971, 969, 1, 0, 0, 0, 972, 974, 5, 111, 0, 0, 973, 972, 1, 0, 0, 0, 973, 974, 1, 0, 0, 0, 974, 975, 1, 0, 0, 0, 975, 983, 5, 328, 0, 0, 976, 977, 5, 131, 0, 0, 977, 978, 3, 220, 110, 0, 978, 979, 5, 131, 0, 0, 979, 983, 1, 0, 0, 0, 980, 983, 5, 335, 0, 0, 981, 983, 3, 226, 113, 0, 982, 973, 1, 0, 0, 0, 982, 976, 1, 0, 0, 0, 982, 980, 1, 0, 0, 0, 982, 981, 1, 0, 0, 0, 983, 221, 1, 0, 0, 0, 984, 986, 5, 329, 0, 0, 985, 984, 1, 0, 0, 0, 985, 986, 1, 0, 0, 0, 986, 987, 1, 0, 0, 0, 987, 988, 3, 220, 110, 0, 988, 223, 1, 0, 0, 0, 989, 994, 3, 220, 110, 0, 990, 991, 5, 122, 0, 0, 991, 993, 3, 220, 110, 0, 992, 990, 1, 0, 0, 0, 993, 996, 1, 0, 0, 0, 994, 992, 1, 0, 0, 0, 994, 995, 1, 0, 0, 0, 995, 998, 1, 0, 0, 0, 996, 994, 1, 0, 0, 0, 997, 999, 5, 122, 0, 0, 998, 997, 1, 0, 0, 0, 998, 999, 1, 0, 0, 0, 999, 1013, 1, 0, 0, 0, 1000, 1001, 5, 129, 0, 0, 1001, 1002, 3, 224, 112, 0, 1002, 1003, 5, 129, 0, 0, 1003, 1013, 1, 0, 0, 0, 1004, 1005, 5, 130, 0, 0, 1005, 1006, 3, 224, 112, 0, 1006, 1007, 5, 130, 0, 0, 1007, 1013, 1, 0, 0, 0, 1008, 1009, 5, 131, 0, 0, 1009, 1010, 3, 224, 112, 0, 1010, 1011, 5, 131, 0, 0, 1011, 1013, 1, 0, 0, 0, 1012, 989, 1, 0, 0, 0, 1012, 1000, 1, 0, 0, 0, 1012, 1004, 1, 0, 0, 0, 1012, 1008, 1, 0, 0, 0, 1013, 225, 1, 0, 0, 0, 1014, 1115, 5, 31, 0, 0, 1015, 1115, 3, 210, 105, 0, 1016, 1115, 5, 320, 0, 0, 1017, 1115, 3, 132, 66, 0, 1018, 1115, 3, 140, 70, 0, 1019, 1115, 3, 208, 104, 0, 1020, 1115, 3, 156, 78, 0, 1021, 1115, 3, 178, 89, 0, 1022, 1115, 3, 152, 76, 0, 1023, 1115, 3, 180, 90, 0, 1024, 1115, 5, 2, 0, 0, 1025, 1115, 5, 3, 0, 0, 1026, 1115, 5, 4, 0, 0, 1027, 1115, 5, 5, 0, 0, 1028, 1115, 5, 6, 0, 0, 1029, 1115, 5, 7, 0, 0, 1030, 1115, 5, 8, 0, 0, 1031, 1115, 5, 9, 0, 0, 1032, 1115, 5, 10, 0, 0, 1033, 1115, 5, 11, 0, 0, 1034, 1115, 5, 12, 0, 0, 1035, 1115, 5, 13, 0, 0, 1036, 1115, 5, 14, 0, 0, 1037, 1115, 5, 15, 0, 0, 1038, 1115, 5, 16, 0, 0, 1039, 1115, 5, 17, 0, 0, 1040, 1115, 5, 18, 0, 0, 1041, 1115, 5, 19, 0, 0, 1042, 1115, 5, 20, 0, 0, 1043, 1115, 5, 21, 0, 0, 1044, 1115, 5, 22, 0, 0, 1045, 1115, 5, 23, 0, 0, 1046, 1115, 5, 24, 0, 0, 1047, 1115, 5, 25, 0, 0, 1048, 1115, 5, 26, 0, 0, 1049, 1115, 5, 29, 0, 0, 1050, 1115, 5, 30, 0, 0, 1051, 1115, 5, 32, 0, 0, 1052, 1115, 5, 33, 0, 0, 1053, 1115, 5, 34, 0, 0, 1054, 1115, 5, 36, 0, 0, 1055, 1115, 5, 37, 0, 0, 1056, 1115, 5, 38, 0, 0, 1057, 1115, 5, 39, 0, 0, 1058, 1115, 5, 40, 0, 0, 1059, 1115, 5, 41, 0, 0, 1060, 1115, 5, 42, 0, 0, 1061, 1115, 5, 43, 0, 0, 1062, 1115, 5, 44, 0, 0, 1063, 1115, 5, 45, 0, 0, 1064, 1115, 5, 46, 0, 0, 1065, 1115, 5, 47, 0, 0, 1066, 1115, 5, 48, 0, 0, 1067, 1115, 5, 49, 0, 0, 1068, 1115, 5, 50, 0, 0, 1069, 1115, 5, 51, 0, 0, 1070, 1115, 5, 52, 0, 0, 1071, 1115, 5, 53, 0, 0, 1072, 1115, 5, 54, 0, 0, 1073, 1115, 5, 55, 0, 0, 1074, 1115, 5, 56, 0, 0, 1075, 1115, 5, 57, 0, 0, 1076, 1115, 5, 58, 0, 0, 1077, 1115, 5, 135, 0, 0, 1078, 1115, 5, 136, 0, 0, 1079, 1115, 5, 137, 0, 0, 1080, 1115, 5, 138, 0, 0, 1081, 1115, 5, 139, 0, 0, 1082, 1115, 5, 140, 0, 0, 1083, 1115, 5, 141, 0, 0, 1084, 1115, 5, 142, 0, 0, 1085, 1115, 5, 143, 0, 0, 1086, 1115, 5, 144, 0, 0, 1087, 1115, 5, 145, 0, 0, 1088, 1115, 5, 146, 0, 0, 1089, 1115, 5, 147, 0, 0, 1090, 1115, 5, 148, 0, 0, 1091, 1115, 5, 149, 0, 0, 1092, 1115, 5, 150, 0, 0, 1093, 1115, 5, 151, 0, 0, 1094, 1115, 5, 152, 0, 0, 1095, 1115, 5, 153, 0, 0, 1096, 1115, 5, 154, 0, 0, 1097, 1115, 5, 155, 0, 0, 1098, 1115, 5, 156, 0, 0, 1099, 1115, 5, 157, 0, 0, 1100, 1115, 5, 158, 0, 0, 1101, 1115, 5, 159, 0, 0, 1102, 1115, 5, 160, 0, 0, 1103, 1115, 5, 161, 0, 0, 1104, 1115, 5, 162, 0, 0, 1105, 1115, 5, 163, 0, 0, 1106, 1115, 5, 164, 0, 0, 1107, 1115, 5, 165, 0, 0, 1108, 1115, 5, 166, 0, 0, 1109, 1115, 5, 167, 0, 0, 1110, 1115, 5, 168, 0, 0, 1111, 1115, 5, 169, 0, 0, 1112, 1115, 5, 170, 0, 0, 1113, 1115, 5, 171, 0, 0, 1114, 1014, 1, 0, 0, 0, 1114, 1015, 1, 0, 0, 0, 1114, 1016, 1, 0, 0, 0, 1114, 1017, 1, 0, 0, 0, 1114, 1018, 1, 0, 0, 0, 1114, 1019, 1, 0, 0, 0, 1114, 1020, 1, 0, 0, 0, 1114, 1021, 1, 0, 0, 0, 1114, 1022, 1, 0, 0, 0, 1114, 1023, 1, 0, 0, 0, 1114, 1024, 1, 0, 0, 0, 1114, 1025, 1, 0, 0, 0, 1114, 1026, 1, 0, 0, 0, 1114, 1027, 1, 0, 0, 0, 1114, 1028, 1, 0, 0, 0, 1114, 1029, 1, 0, 0, 0, 1114, 1030, 1, 0, 0, 0, 1114, 1031, 1, 0, 0, 0, 1114, 1032, 1, 0, 0, 0, 1114, 1033, 1, 0, 0, 0, 1114, 1034, 1, 0, 0, 0, 1114, 1035, 1, 0, 0, 0, 1114, 1036, 1, 0, 0, 0, 1114, 1037, 1, 0, 0, 0, 1114, 1038, 1, 0, 0, 0, 1114, 1039, 1, 0, 0, 0, 1114, 1040, 1, 0, 0, 0, 1114, 1041, 1, 0, 0, 0, 1114, 1042, 1, 0, 0, 0, 1114, 1043, 1, 0, 0, 0, 1114, 1044, 1, 0, 0, 0, 1114, 1045, 1, 0, 0, 0, 1114, 1046, 1, 0, 0, 0, 1114, 1047, 1, 0, 0, 0, 1114, 1048, 1, 0, 0, 0, 1114, 1049, 1, 0, 0, 0, 1114, 1050, 1, 0, 0, 0, 1114, 1051, 1, 0, 0, 0, 1114, 1052, 1, 0, 0, 0, 1114, 1053, 1, 0, 0, 0, 1114, 1054, 1, 0, 0, 0, 1114, 1055, 1, 0, 0, 0, 1114, 1056, 1, 0, 0, 0, 1114, 1057, 1, 0, 0, 0, 1114, 1058, 1, 0, 0, 0, 1114, 1059, 1, 0, 0, 0, 1114, 1060, 1, 0, 0, 0, 1114, 1061, 1, 0, 0, 0, 1114, 1062, 1, 0, 0, 0, 1114, 1063, 1, 0, 0, 0, 1114, 1064, 1, 0, 0, 0, 1114, 1065, 1, 0, 0, 0, 1114, 1066, 1, 0, 0, 0, 1114, 1067, 1, 0, 0, 0, 1114, 1068, 1, 0, 0, 0, 1114, 1069, 1, 0, 0, 0, 1114, 1070, 1, 0, 0, 0, 1114, 1071, 1, 0, 0, 0, 1114, 1072, 1, 0, 0, 0, 1114, 1073, 1, 0, 0, 0, 1114, 1074, 1, 0, 0, 0, 1114, 1075, 1, 0, 0, 0, 1114, 1076, 1, 0, 0, 0, 1114, 1077, 1, 0, 0, 0, 1114, 1078, 1, 0, 0, 0, 1114, 1079, 1, 0, 0, 0, 1114, 1080, 1, 0, 0, 0, 1114, 1081, 1, 0, 0, 0, 1114, 1082, 1, 0, 0, 0, 1114, 1083, 1, 0, 0, 0, 1114, 1084, 1, 0, 0, 0, 1114, 1085, 1, 0, 0, 0, 1114, 1086, 1, 0, 0, 0, 1114, 1087, 1, 0, 0, 0, 1114, 1088, 1, 0, 0, 0, 1114, 1089, 1, 0, 0, 0, 1114, 1090, 1, 0, 0, 0, 1114, 1091, 1, 0, 0, 0, 1114, 1092, 1, 0, 0, 0, 1114, 1093, 1, 0, 0, 0, 1114, 1094, 1, 0, 0, 0, 1114, 1095, 1, 0, 0, 0, 1114, 1096, 1, 0, 0, 0, 1114, 1097, 1, 0, 0, 0, 1114, 1098, 1, 0, 0, 0, 1114, 1099, 1, 0, 0, 0, 1114, 1100, 1, 0, 0, 0, 1114, 1101, 1, 0, 0, 0, 1114, 1102, 1, 0, 0, 0, 1114, 1103, 1, 0, 0, 0, 1114, 1104, 1, 0, 0, 0, 1114, 1105, 1, 0, 0, 0, 1114, 1106, 1, 0, 0, 0, 1114, 1107, 1, 0, 0, 0, 1114, 1108, 1, 0, 0, 0, 1114, 1109, 1, 0, 0, 0, 1114, 1110, 1, 0, 0, 0, 1114, 1111, 1, 0, 0, 0, 1114, 1112, 1, 0, 0, 0, 1114, 1113, 1, 0, 0, 0, 1115, 227, 1, 0, 0, 0, 79, 229, 242, 248, 266, 269, 284, 294, 301, 306, 311, 318, 322, 327, 331, 337, 342, 353, 358, 362, 366, 370, 375, 389, 400, 408, 420, 426, 465, 471, 484, 504, 509, 517, 526, 536, 553, 562, 577, 585, 592, 598, 600, 611, 622, 628, 641, 652, 665, 675, 682, 694, 702, 706, 731, 764, 772, 779, 782, 787, 805, 809, 813, 819, 844, 872, 905, 914, 919, 928, 949, 961, 969, 973, 982, 985, 994, 998, 1012, 1114] \ No newline at end of file +[4, 1, 336, 1129, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 1, 0, 3, 0, 230, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 241, 8, 3, 10, 3, 12, 3, 244, 9, 3, 1, 4, 1, 4, 1, 4, 3, 4, 249, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 267, 8, 5, 1, 6, 3, 6, 270, 8, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 3, 10, 285, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 293, 8, 11, 10, 11, 12, 11, 296, 9, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 302, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 307, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 312, 8, 12, 1, 12, 1, 12, 1, 12, 5, 12, 317, 8, 12, 10, 12, 12, 12, 320, 9, 12, 1, 12, 3, 12, 323, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 328, 8, 12, 1, 13, 1, 13, 3, 13, 332, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 338, 8, 13, 1, 13, 1, 13, 1, 13, 3, 13, 343, 8, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 352, 8, 15, 10, 15, 12, 15, 355, 9, 15, 1, 16, 1, 16, 3, 16, 359, 8, 16, 1, 16, 1, 16, 3, 16, 363, 8, 16, 1, 17, 1, 17, 3, 17, 367, 8, 17, 1, 17, 1, 17, 3, 17, 371, 8, 17, 1, 18, 1, 18, 1, 18, 3, 18, 376, 8, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 5, 21, 388, 8, 21, 10, 21, 12, 21, 391, 9, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 401, 8, 22, 1, 23, 1, 23, 1, 24, 1, 24, 5, 24, 407, 8, 24, 10, 24, 12, 24, 410, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 421, 8, 25, 1, 26, 1, 26, 5, 26, 425, 8, 26, 10, 26, 12, 26, 428, 9, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 466, 8, 27, 1, 28, 1, 28, 5, 28, 470, 8, 28, 10, 28, 12, 28, 473, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 485, 8, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 505, 8, 34, 1, 35, 1, 35, 1, 35, 3, 35, 510, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 518, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 5, 37, 525, 8, 37, 10, 37, 12, 37, 528, 9, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 3, 39, 537, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 554, 8, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 563, 8, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 3, 44, 578, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 586, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 593, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 599, 8, 45, 10, 45, 12, 45, 602, 9, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 612, 8, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 624, 8, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 5, 47, 632, 8, 47, 10, 47, 12, 47, 635, 9, 47, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 641, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 3, 51, 654, 8, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, 663, 8, 52, 10, 52, 12, 52, 666, 9, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 676, 8, 53, 10, 53, 12, 53, 679, 9, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 686, 8, 53, 10, 53, 12, 53, 689, 9, 53, 1, 53, 1, 53, 1, 54, 1, 54, 3, 54, 695, 8, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 5, 56, 705, 8, 56, 10, 56, 12, 56, 708, 9, 56, 1, 57, 1, 57, 1, 57, 5, 57, 713, 8, 57, 10, 57, 12, 57, 716, 9, 57, 1, 58, 3, 58, 719, 8, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 744, 8, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 777, 8, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 785, 8, 66, 1, 67, 1, 67, 1, 67, 5, 67, 790, 8, 67, 10, 67, 12, 67, 793, 9, 67, 3, 67, 795, 8, 67, 1, 68, 1, 68, 1, 68, 3, 68, 800, 8, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 818, 8, 71, 1, 72, 1, 72, 3, 72, 822, 8, 72, 1, 73, 1, 73, 3, 73, 826, 8, 73, 1, 74, 1, 74, 1, 75, 1, 75, 3, 75, 832, 8, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 3, 76, 857, 8, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 3, 84, 885, 8, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 1, 88, 1, 89, 1, 89, 1, 90, 1, 90, 1, 91, 1, 91, 1, 92, 1, 92, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 3, 94, 918, 8, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 3, 97, 927, 8, 97, 1, 97, 1, 97, 1, 98, 3, 98, 932, 8, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 3, 100, 941, 8, 100, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 103, 1, 103, 1, 103, 1, 104, 1, 104, 1, 105, 1, 105, 1, 106, 1, 106, 1, 106, 1, 106, 5, 106, 960, 8, 106, 10, 106, 12, 106, 963, 9, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 108, 5, 108, 972, 8, 108, 10, 108, 12, 108, 975, 9, 108, 1, 109, 1, 109, 1, 109, 5, 109, 980, 8, 109, 10, 109, 12, 109, 983, 9, 109, 1, 110, 3, 110, 986, 8, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 3, 110, 995, 8, 110, 1, 111, 3, 111, 998, 8, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 5, 112, 1005, 8, 112, 10, 112, 12, 112, 1008, 9, 112, 1, 112, 3, 112, 1011, 8, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 1, 112, 3, 112, 1025, 8, 112, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 1, 113, 3, 113, 1127, 8, 113, 1, 113, 0, 2, 90, 94, 114, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 0, 21, 1, 0, 118, 119, 1, 0, 18, 19, 2, 0, 137, 137, 171, 171, 5, 0, 135, 136, 140, 140, 143, 143, 148, 148, 150, 153, 1, 0, 120, 122, 3, 0, 7, 7, 56, 56, 289, 319, 1, 0, 195, 204, 13, 0, 68, 70, 74, 74, 76, 76, 79, 79, 82, 82, 84, 84, 86, 87, 89, 92, 94, 97, 205, 222, 224, 225, 227, 243, 246, 255, 4, 0, 69, 69, 212, 212, 241, 241, 243, 243, 8, 0, 70, 70, 76, 76, 82, 82, 84, 84, 89, 89, 91, 92, 95, 95, 97, 97, 8, 0, 71, 73, 75, 75, 77, 78, 80, 80, 85, 85, 88, 88, 93, 93, 98, 98, 1, 0, 244, 245, 1, 0, 275, 280, 2, 0, 256, 260, 262, 273, 2, 0, 67, 67, 112, 117, 1, 0, 282, 285, 1, 0, 286, 288, 1, 0, 333, 334, 1, 0, 65, 66, 9, 0, 70, 73, 75, 78, 80, 80, 82, 82, 84, 85, 88, 89, 91, 93, 95, 95, 97, 98, 9, 0, 31, 31, 70, 70, 76, 76, 83, 84, 89, 89, 91, 92, 95, 95, 97, 97, 321, 327, 1279, 0, 229, 1, 0, 0, 0, 2, 233, 1, 0, 0, 0, 4, 235, 1, 0, 0, 0, 6, 237, 1, 0, 0, 0, 8, 248, 1, 0, 0, 0, 10, 266, 1, 0, 0, 0, 12, 269, 1, 0, 0, 0, 14, 273, 1, 0, 0, 0, 16, 276, 1, 0, 0, 0, 18, 279, 1, 0, 0, 0, 20, 282, 1, 0, 0, 0, 22, 288, 1, 0, 0, 0, 24, 297, 1, 0, 0, 0, 26, 329, 1, 0, 0, 0, 28, 344, 1, 0, 0, 0, 30, 347, 1, 0, 0, 0, 32, 356, 1, 0, 0, 0, 34, 364, 1, 0, 0, 0, 36, 372, 1, 0, 0, 0, 38, 377, 1, 0, 0, 0, 40, 381, 1, 0, 0, 0, 42, 385, 1, 0, 0, 0, 44, 400, 1, 0, 0, 0, 46, 402, 1, 0, 0, 0, 48, 404, 1, 0, 0, 0, 50, 420, 1, 0, 0, 0, 52, 422, 1, 0, 0, 0, 54, 465, 1, 0, 0, 0, 56, 467, 1, 0, 0, 0, 58, 474, 1, 0, 0, 0, 60, 484, 1, 0, 0, 0, 62, 486, 1, 0, 0, 0, 64, 488, 1, 0, 0, 0, 66, 492, 1, 0, 0, 0, 68, 504, 1, 0, 0, 0, 70, 506, 1, 0, 0, 0, 72, 511, 1, 0, 0, 0, 74, 521, 1, 0, 0, 0, 76, 529, 1, 0, 0, 0, 78, 533, 1, 0, 0, 0, 80, 553, 1, 0, 0, 0, 82, 555, 1, 0, 0, 0, 84, 557, 1, 0, 0, 0, 86, 566, 1, 0, 0, 0, 88, 577, 1, 0, 0, 0, 90, 585, 1, 0, 0, 0, 92, 611, 1, 0, 0, 0, 94, 623, 1, 0, 0, 0, 96, 640, 1, 0, 0, 0, 98, 642, 1, 0, 0, 0, 100, 649, 1, 0, 0, 0, 102, 653, 1, 0, 0, 0, 104, 655, 1, 0, 0, 0, 106, 669, 1, 0, 0, 0, 108, 694, 1, 0, 0, 0, 110, 696, 1, 0, 0, 0, 112, 701, 1, 0, 0, 0, 114, 709, 1, 0, 0, 0, 116, 718, 1, 0, 0, 0, 118, 743, 1, 0, 0, 0, 120, 745, 1, 0, 0, 0, 122, 747, 1, 0, 0, 0, 124, 749, 1, 0, 0, 0, 126, 754, 1, 0, 0, 0, 128, 761, 1, 0, 0, 0, 130, 776, 1, 0, 0, 0, 132, 784, 1, 0, 0, 0, 134, 794, 1, 0, 0, 0, 136, 799, 1, 0, 0, 0, 138, 803, 1, 0, 0, 0, 140, 807, 1, 0, 0, 0, 142, 817, 1, 0, 0, 0, 144, 821, 1, 0, 0, 0, 146, 825, 1, 0, 0, 0, 148, 827, 1, 0, 0, 0, 150, 831, 1, 0, 0, 0, 152, 856, 1, 0, 0, 0, 154, 858, 1, 0, 0, 0, 156, 860, 1, 0, 0, 0, 158, 862, 1, 0, 0, 0, 160, 869, 1, 0, 0, 0, 162, 871, 1, 0, 0, 0, 164, 878, 1, 0, 0, 0, 166, 880, 1, 0, 0, 0, 168, 884, 1, 0, 0, 0, 170, 886, 1, 0, 0, 0, 172, 895, 1, 0, 0, 0, 174, 897, 1, 0, 0, 0, 176, 899, 1, 0, 0, 0, 178, 901, 1, 0, 0, 0, 180, 903, 1, 0, 0, 0, 182, 905, 1, 0, 0, 0, 184, 907, 1, 0, 0, 0, 186, 909, 1, 0, 0, 0, 188, 917, 1, 0, 0, 0, 190, 919, 1, 0, 0, 0, 192, 923, 1, 0, 0, 0, 194, 926, 1, 0, 0, 0, 196, 931, 1, 0, 0, 0, 198, 935, 1, 0, 0, 0, 200, 940, 1, 0, 0, 0, 202, 942, 1, 0, 0, 0, 204, 945, 1, 0, 0, 0, 206, 948, 1, 0, 0, 0, 208, 951, 1, 0, 0, 0, 210, 953, 1, 0, 0, 0, 212, 955, 1, 0, 0, 0, 214, 966, 1, 0, 0, 0, 216, 968, 1, 0, 0, 0, 218, 976, 1, 0, 0, 0, 220, 994, 1, 0, 0, 0, 222, 997, 1, 0, 0, 0, 224, 1024, 1, 0, 0, 0, 226, 1126, 1, 0, 0, 0, 228, 230, 3, 2, 1, 0, 229, 228, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 5, 0, 0, 1, 232, 1, 1, 0, 0, 0, 233, 234, 3, 4, 2, 0, 234, 3, 1, 0, 0, 0, 235, 236, 3, 6, 3, 0, 236, 5, 1, 0, 0, 0, 237, 242, 3, 8, 4, 0, 238, 239, 5, 109, 0, 0, 239, 241, 3, 10, 5, 0, 240, 238, 1, 0, 0, 0, 241, 244, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 7, 1, 0, 0, 0, 244, 242, 1, 0, 0, 0, 245, 249, 3, 12, 6, 0, 246, 249, 3, 14, 7, 0, 247, 249, 3, 16, 8, 0, 248, 245, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 247, 1, 0, 0, 0, 249, 9, 1, 0, 0, 0, 250, 267, 3, 18, 9, 0, 251, 267, 3, 20, 10, 0, 252, 267, 3, 22, 11, 0, 253, 267, 3, 24, 12, 0, 254, 267, 3, 26, 13, 0, 255, 267, 3, 28, 14, 0, 256, 267, 3, 30, 15, 0, 257, 267, 3, 32, 16, 0, 258, 267, 3, 34, 17, 0, 259, 267, 3, 36, 18, 0, 260, 267, 3, 38, 19, 0, 261, 267, 3, 40, 20, 0, 262, 267, 3, 42, 21, 0, 263, 267, 3, 48, 24, 0, 264, 267, 3, 52, 26, 0, 265, 267, 3, 56, 28, 0, 266, 250, 1, 0, 0, 0, 266, 251, 1, 0, 0, 0, 266, 252, 1, 0, 0, 0, 266, 253, 1, 0, 0, 0, 266, 254, 1, 0, 0, 0, 266, 255, 1, 0, 0, 0, 266, 256, 1, 0, 0, 0, 266, 257, 1, 0, 0, 0, 266, 258, 1, 0, 0, 0, 266, 259, 1, 0, 0, 0, 266, 260, 1, 0, 0, 0, 266, 261, 1, 0, 0, 0, 266, 262, 1, 0, 0, 0, 266, 263, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 266, 265, 1, 0, 0, 0, 267, 11, 1, 0, 0, 0, 268, 270, 5, 2, 0, 0, 269, 268, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 271, 1, 0, 0, 0, 271, 272, 3, 60, 30, 0, 272, 13, 1, 0, 0, 0, 273, 274, 5, 3, 0, 0, 274, 275, 3, 62, 31, 0, 275, 15, 1, 0, 0, 0, 276, 277, 5, 4, 0, 0, 277, 278, 5, 33, 0, 0, 278, 17, 1, 0, 0, 0, 279, 280, 5, 6, 0, 0, 280, 281, 3, 90, 45, 0, 281, 19, 1, 0, 0, 0, 282, 284, 5, 7, 0, 0, 283, 285, 7, 0, 0, 0, 284, 283, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 286, 1, 0, 0, 0, 286, 287, 3, 112, 56, 0, 287, 21, 1, 0, 0, 0, 288, 289, 5, 8, 0, 0, 289, 294, 3, 64, 32, 0, 290, 291, 5, 110, 0, 0, 291, 293, 3, 64, 32, 0, 292, 290, 1, 0, 0, 0, 293, 296, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 23, 1, 0, 0, 0, 296, 294, 1, 0, 0, 0, 297, 301, 5, 9, 0, 0, 298, 299, 5, 42, 0, 0, 299, 300, 5, 112, 0, 0, 300, 302, 3, 194, 97, 0, 301, 298, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 306, 1, 0, 0, 0, 303, 304, 5, 43, 0, 0, 304, 305, 5, 112, 0, 0, 305, 307, 3, 198, 99, 0, 306, 303, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 311, 1, 0, 0, 0, 308, 309, 5, 44, 0, 0, 309, 310, 5, 112, 0, 0, 310, 312, 3, 192, 96, 0, 311, 308, 1, 0, 0, 0, 311, 312, 1, 0, 0, 0, 312, 313, 1, 0, 0, 0, 313, 318, 3, 78, 39, 0, 314, 315, 5, 110, 0, 0, 315, 317, 3, 78, 39, 0, 316, 314, 1, 0, 0, 0, 317, 320, 1, 0, 0, 0, 318, 316, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 322, 1, 0, 0, 0, 320, 318, 1, 0, 0, 0, 321, 323, 3, 68, 34, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 327, 1, 0, 0, 0, 324, 325, 5, 41, 0, 0, 325, 326, 5, 112, 0, 0, 326, 328, 3, 198, 99, 0, 327, 324, 1, 0, 0, 0, 327, 328, 1, 0, 0, 0, 328, 25, 1, 0, 0, 0, 329, 331, 5, 10, 0, 0, 330, 332, 3, 194, 97, 0, 331, 330, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 337, 3, 112, 56, 0, 334, 335, 5, 39, 0, 0, 335, 336, 5, 112, 0, 0, 336, 338, 3, 198, 99, 0, 337, 334, 1, 0, 0, 0, 337, 338, 1, 0, 0, 0, 338, 342, 1, 0, 0, 0, 339, 340, 5, 40, 0, 0, 340, 341, 5, 112, 0, 0, 341, 343, 3, 198, 99, 0, 342, 339, 1, 0, 0, 0, 342, 343, 1, 0, 0, 0, 343, 27, 1, 0, 0, 0, 344, 345, 5, 11, 0, 0, 345, 346, 3, 74, 37, 0, 346, 29, 1, 0, 0, 0, 347, 348, 5, 12, 0, 0, 348, 353, 3, 76, 38, 0, 349, 350, 5, 110, 0, 0, 350, 352, 3, 76, 38, 0, 351, 349, 1, 0, 0, 0, 352, 355, 1, 0, 0, 0, 353, 351, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 31, 1, 0, 0, 0, 355, 353, 1, 0, 0, 0, 356, 358, 5, 13, 0, 0, 357, 359, 3, 194, 97, 0, 358, 357, 1, 0, 0, 0, 358, 359, 1, 0, 0, 0, 359, 362, 1, 0, 0, 0, 360, 361, 5, 5, 0, 0, 361, 363, 3, 194, 97, 0, 362, 360, 1, 0, 0, 0, 362, 363, 1, 0, 0, 0, 363, 33, 1, 0, 0, 0, 364, 366, 5, 14, 0, 0, 365, 367, 3, 194, 97, 0, 366, 365, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 370, 3, 112, 56, 0, 369, 371, 3, 66, 33, 0, 370, 369, 1, 0, 0, 0, 370, 371, 1, 0, 0, 0, 371, 35, 1, 0, 0, 0, 372, 373, 5, 15, 0, 0, 373, 375, 3, 112, 56, 0, 374, 376, 3, 66, 33, 0, 375, 374, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 37, 1, 0, 0, 0, 377, 378, 5, 20, 0, 0, 378, 379, 3, 88, 44, 0, 379, 380, 3, 192, 96, 0, 380, 39, 1, 0, 0, 0, 381, 382, 5, 16, 0, 0, 382, 383, 3, 88, 44, 0, 383, 384, 3, 192, 96, 0, 384, 41, 1, 0, 0, 0, 385, 389, 5, 22, 0, 0, 386, 388, 3, 44, 22, 0, 387, 386, 1, 0, 0, 0, 388, 391, 1, 0, 0, 0, 389, 387, 1, 0, 0, 0, 389, 390, 1, 0, 0, 0, 390, 392, 1, 0, 0, 0, 391, 389, 1, 0, 0, 0, 392, 393, 3, 88, 44, 0, 393, 43, 1, 0, 0, 0, 394, 395, 5, 23, 0, 0, 395, 396, 5, 112, 0, 0, 396, 401, 3, 192, 96, 0, 397, 398, 5, 21, 0, 0, 398, 399, 5, 112, 0, 0, 399, 401, 3, 192, 96, 0, 400, 394, 1, 0, 0, 0, 400, 397, 1, 0, 0, 0, 401, 45, 1, 0, 0, 0, 402, 403, 7, 1, 0, 0, 403, 47, 1, 0, 0, 0, 404, 408, 5, 24, 0, 0, 405, 407, 3, 50, 25, 0, 406, 405, 1, 0, 0, 0, 407, 410, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 49, 1, 0, 0, 0, 410, 408, 1, 0, 0, 0, 411, 412, 5, 45, 0, 0, 412, 413, 5, 112, 0, 0, 413, 421, 3, 194, 97, 0, 414, 415, 5, 46, 0, 0, 415, 416, 5, 112, 0, 0, 416, 421, 3, 194, 97, 0, 417, 418, 5, 47, 0, 0, 418, 419, 5, 112, 0, 0, 419, 421, 3, 192, 96, 0, 420, 411, 1, 0, 0, 0, 420, 414, 1, 0, 0, 0, 420, 417, 1, 0, 0, 0, 421, 51, 1, 0, 0, 0, 422, 426, 5, 25, 0, 0, 423, 425, 3, 54, 27, 0, 424, 423, 1, 0, 0, 0, 425, 428, 1, 0, 0, 0, 426, 424, 1, 0, 0, 0, 426, 427, 1, 0, 0, 0, 427, 53, 1, 0, 0, 0, 428, 426, 1, 0, 0, 0, 429, 430, 5, 48, 0, 0, 430, 431, 5, 112, 0, 0, 431, 466, 3, 194, 97, 0, 432, 433, 5, 49, 0, 0, 433, 434, 5, 112, 0, 0, 434, 466, 3, 194, 97, 0, 435, 436, 5, 50, 0, 0, 436, 437, 5, 112, 0, 0, 437, 466, 3, 194, 97, 0, 438, 439, 5, 51, 0, 0, 439, 440, 5, 112, 0, 0, 440, 466, 3, 194, 97, 0, 441, 442, 5, 52, 0, 0, 442, 443, 5, 112, 0, 0, 443, 466, 3, 196, 98, 0, 444, 445, 5, 53, 0, 0, 445, 446, 5, 112, 0, 0, 446, 466, 3, 196, 98, 0, 447, 448, 5, 54, 0, 0, 448, 449, 5, 112, 0, 0, 449, 466, 3, 192, 96, 0, 450, 451, 5, 55, 0, 0, 451, 452, 5, 112, 0, 0, 452, 466, 3, 192, 96, 0, 453, 454, 5, 215, 0, 0, 454, 455, 5, 112, 0, 0, 455, 466, 3, 192, 96, 0, 456, 457, 5, 56, 0, 0, 457, 458, 5, 112, 0, 0, 458, 466, 3, 192, 96, 0, 459, 460, 5, 57, 0, 0, 460, 461, 5, 112, 0, 0, 461, 466, 3, 194, 97, 0, 462, 463, 5, 58, 0, 0, 463, 464, 5, 112, 0, 0, 464, 466, 3, 196, 98, 0, 465, 429, 1, 0, 0, 0, 465, 432, 1, 0, 0, 0, 465, 435, 1, 0, 0, 0, 465, 438, 1, 0, 0, 0, 465, 441, 1, 0, 0, 0, 465, 444, 1, 0, 0, 0, 465, 447, 1, 0, 0, 0, 465, 450, 1, 0, 0, 0, 465, 453, 1, 0, 0, 0, 465, 456, 1, 0, 0, 0, 465, 459, 1, 0, 0, 0, 465, 462, 1, 0, 0, 0, 466, 55, 1, 0, 0, 0, 467, 471, 5, 26, 0, 0, 468, 470, 3, 58, 29, 0, 469, 468, 1, 0, 0, 0, 470, 473, 1, 0, 0, 0, 471, 469, 1, 0, 0, 0, 471, 472, 1, 0, 0, 0, 472, 57, 1, 0, 0, 0, 473, 471, 1, 0, 0, 0, 474, 475, 3, 220, 110, 0, 475, 476, 5, 112, 0, 0, 476, 477, 3, 188, 94, 0, 477, 59, 1, 0, 0, 0, 478, 479, 5, 29, 0, 0, 479, 480, 5, 112, 0, 0, 480, 485, 3, 62, 31, 0, 481, 482, 5, 30, 0, 0, 482, 483, 5, 112, 0, 0, 483, 485, 3, 62, 31, 0, 484, 478, 1, 0, 0, 0, 484, 481, 1, 0, 0, 0, 485, 61, 1, 0, 0, 0, 486, 487, 3, 108, 54, 0, 487, 63, 1, 0, 0, 0, 488, 489, 3, 122, 61, 0, 489, 490, 5, 27, 0, 0, 490, 491, 3, 122, 61, 0, 491, 65, 1, 0, 0, 0, 492, 493, 5, 28, 0, 0, 493, 494, 3, 112, 56, 0, 494, 67, 1, 0, 0, 0, 495, 496, 5, 28, 0, 0, 496, 505, 3, 112, 56, 0, 497, 498, 5, 28, 0, 0, 498, 505, 3, 70, 35, 0, 499, 500, 5, 28, 0, 0, 500, 501, 3, 70, 35, 0, 501, 502, 5, 110, 0, 0, 502, 503, 3, 112, 56, 0, 503, 505, 1, 0, 0, 0, 504, 495, 1, 0, 0, 0, 504, 497, 1, 0, 0, 0, 504, 499, 1, 0, 0, 0, 505, 69, 1, 0, 0, 0, 506, 509, 3, 72, 36, 0, 507, 508, 5, 27, 0, 0, 508, 510, 3, 214, 107, 0, 509, 507, 1, 0, 0, 0, 509, 510, 1, 0, 0, 0, 510, 71, 1, 0, 0, 0, 511, 512, 5, 320, 0, 0, 512, 513, 5, 125, 0, 0, 513, 514, 3, 120, 60, 0, 514, 515, 5, 110, 0, 0, 515, 517, 3, 188, 94, 0, 516, 518, 3, 210, 105, 0, 517, 516, 1, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, 519, 1, 0, 0, 0, 519, 520, 5, 126, 0, 0, 520, 73, 1, 0, 0, 0, 521, 526, 3, 116, 58, 0, 522, 523, 5, 110, 0, 0, 523, 525, 3, 116, 58, 0, 524, 522, 1, 0, 0, 0, 525, 528, 1, 0, 0, 0, 526, 524, 1, 0, 0, 0, 526, 527, 1, 0, 0, 0, 527, 75, 1, 0, 0, 0, 528, 526, 1, 0, 0, 0, 529, 530, 3, 120, 60, 0, 530, 531, 5, 112, 0, 0, 531, 532, 3, 88, 44, 0, 532, 77, 1, 0, 0, 0, 533, 536, 3, 80, 40, 0, 534, 535, 5, 27, 0, 0, 535, 537, 3, 122, 61, 0, 536, 534, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 79, 1, 0, 0, 0, 538, 539, 3, 82, 41, 0, 539, 540, 5, 125, 0, 0, 540, 541, 3, 94, 47, 0, 541, 542, 5, 126, 0, 0, 542, 554, 1, 0, 0, 0, 543, 544, 5, 136, 0, 0, 544, 545, 5, 125, 0, 0, 545, 554, 5, 126, 0, 0, 546, 547, 7, 2, 0, 0, 547, 548, 5, 125, 0, 0, 548, 549, 3, 94, 47, 0, 549, 550, 5, 126, 0, 0, 550, 554, 1, 0, 0, 0, 551, 554, 3, 86, 43, 0, 552, 554, 3, 84, 42, 0, 553, 538, 1, 0, 0, 0, 553, 543, 1, 0, 0, 0, 553, 546, 1, 0, 0, 0, 553, 551, 1, 0, 0, 0, 553, 552, 1, 0, 0, 0, 554, 81, 1, 0, 0, 0, 555, 556, 7, 3, 0, 0, 556, 83, 1, 0, 0, 0, 557, 558, 5, 155, 0, 0, 558, 559, 5, 125, 0, 0, 559, 562, 3, 120, 60, 0, 560, 561, 5, 110, 0, 0, 561, 563, 3, 194, 97, 0, 562, 560, 1, 0, 0, 0, 562, 563, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 565, 5, 126, 0, 0, 565, 85, 1, 0, 0, 0, 566, 567, 5, 154, 0, 0, 567, 568, 5, 114, 0, 0, 568, 569, 3, 194, 97, 0, 569, 570, 5, 113, 0, 0, 570, 571, 5, 125, 0, 0, 571, 572, 3, 120, 60, 0, 572, 573, 5, 126, 0, 0, 573, 87, 1, 0, 0, 0, 574, 578, 3, 90, 45, 0, 575, 578, 3, 92, 46, 0, 576, 578, 3, 94, 47, 0, 577, 574, 1, 0, 0, 0, 577, 575, 1, 0, 0, 0, 577, 576, 1, 0, 0, 0, 578, 89, 1, 0, 0, 0, 579, 580, 6, 45, -1, 0, 580, 586, 3, 92, 46, 0, 581, 582, 5, 61, 0, 0, 582, 586, 3, 90, 45, 6, 583, 586, 3, 100, 50, 0, 584, 586, 3, 102, 51, 0, 585, 579, 1, 0, 0, 0, 585, 581, 1, 0, 0, 0, 585, 583, 1, 0, 0, 0, 585, 584, 1, 0, 0, 0, 586, 600, 1, 0, 0, 0, 587, 588, 10, 5, 0, 0, 588, 589, 5, 62, 0, 0, 589, 599, 3, 90, 45, 6, 590, 592, 10, 4, 0, 0, 591, 593, 5, 63, 0, 0, 592, 591, 1, 0, 0, 0, 592, 593, 1, 0, 0, 0, 593, 594, 1, 0, 0, 0, 594, 599, 3, 90, 45, 5, 595, 596, 10, 3, 0, 0, 596, 597, 5, 64, 0, 0, 597, 599, 3, 90, 45, 4, 598, 587, 1, 0, 0, 0, 598, 590, 1, 0, 0, 0, 598, 595, 1, 0, 0, 0, 599, 602, 1, 0, 0, 0, 600, 598, 1, 0, 0, 0, 600, 601, 1, 0, 0, 0, 601, 91, 1, 0, 0, 0, 602, 600, 1, 0, 0, 0, 603, 604, 3, 94, 47, 0, 604, 605, 3, 182, 91, 0, 605, 606, 3, 94, 47, 0, 606, 612, 1, 0, 0, 0, 607, 608, 3, 94, 47, 0, 608, 609, 5, 60, 0, 0, 609, 610, 3, 212, 106, 0, 610, 612, 1, 0, 0, 0, 611, 603, 1, 0, 0, 0, 611, 607, 1, 0, 0, 0, 612, 93, 1, 0, 0, 0, 613, 614, 6, 47, -1, 0, 614, 624, 3, 96, 48, 0, 615, 624, 3, 98, 49, 0, 616, 624, 3, 162, 81, 0, 617, 624, 3, 158, 79, 0, 618, 624, 3, 170, 85, 0, 619, 620, 5, 125, 0, 0, 620, 621, 3, 94, 47, 0, 621, 622, 5, 126, 0, 0, 622, 624, 1, 0, 0, 0, 623, 613, 1, 0, 0, 0, 623, 615, 1, 0, 0, 0, 623, 616, 1, 0, 0, 0, 623, 617, 1, 0, 0, 0, 623, 618, 1, 0, 0, 0, 623, 619, 1, 0, 0, 0, 624, 633, 1, 0, 0, 0, 625, 626, 10, 8, 0, 0, 626, 627, 7, 4, 0, 0, 627, 632, 3, 94, 47, 9, 628, 629, 10, 7, 0, 0, 629, 630, 7, 0, 0, 0, 630, 632, 3, 94, 47, 8, 631, 625, 1, 0, 0, 0, 631, 628, 1, 0, 0, 0, 632, 635, 1, 0, 0, 0, 633, 631, 1, 0, 0, 0, 633, 634, 1, 0, 0, 0, 634, 95, 1, 0, 0, 0, 635, 633, 1, 0, 0, 0, 636, 641, 3, 124, 62, 0, 637, 641, 3, 126, 63, 0, 638, 641, 3, 120, 60, 0, 639, 641, 3, 188, 94, 0, 640, 636, 1, 0, 0, 0, 640, 637, 1, 0, 0, 0, 640, 638, 1, 0, 0, 0, 640, 639, 1, 0, 0, 0, 641, 97, 1, 0, 0, 0, 642, 643, 3, 180, 90, 0, 643, 644, 5, 125, 0, 0, 644, 645, 3, 136, 68, 0, 645, 646, 5, 60, 0, 0, 646, 647, 3, 136, 68, 0, 647, 648, 5, 126, 0, 0, 648, 99, 1, 0, 0, 0, 649, 650, 3, 128, 64, 0, 650, 101, 1, 0, 0, 0, 651, 654, 3, 104, 52, 0, 652, 654, 3, 106, 53, 0, 653, 651, 1, 0, 0, 0, 653, 652, 1, 0, 0, 0, 654, 103, 1, 0, 0, 0, 655, 656, 3, 184, 92, 0, 656, 657, 5, 125, 0, 0, 657, 658, 3, 146, 73, 0, 658, 659, 5, 110, 0, 0, 659, 664, 3, 148, 74, 0, 660, 661, 5, 110, 0, 0, 661, 663, 3, 138, 69, 0, 662, 660, 1, 0, 0, 0, 663, 666, 1, 0, 0, 0, 664, 662, 1, 0, 0, 0, 664, 665, 1, 0, 0, 0, 665, 667, 1, 0, 0, 0, 666, 664, 1, 0, 0, 0, 667, 668, 5, 126, 0, 0, 668, 105, 1, 0, 0, 0, 669, 670, 3, 186, 93, 0, 670, 671, 5, 125, 0, 0, 671, 672, 5, 127, 0, 0, 672, 677, 3, 142, 71, 0, 673, 674, 5, 110, 0, 0, 674, 676, 3, 142, 71, 0, 675, 673, 1, 0, 0, 0, 676, 679, 1, 0, 0, 0, 677, 675, 1, 0, 0, 0, 677, 678, 1, 0, 0, 0, 678, 680, 1, 0, 0, 0, 679, 677, 1, 0, 0, 0, 680, 681, 5, 128, 0, 0, 681, 682, 5, 110, 0, 0, 682, 687, 3, 148, 74, 0, 683, 684, 5, 110, 0, 0, 684, 686, 3, 138, 69, 0, 685, 683, 1, 0, 0, 0, 686, 689, 1, 0, 0, 0, 687, 685, 1, 0, 0, 0, 687, 688, 1, 0, 0, 0, 688, 690, 1, 0, 0, 0, 689, 687, 1, 0, 0, 0, 690, 691, 5, 126, 0, 0, 691, 107, 1, 0, 0, 0, 692, 695, 3, 216, 108, 0, 693, 695, 5, 332, 0, 0, 694, 692, 1, 0, 0, 0, 694, 693, 1, 0, 0, 0, 695, 109, 1, 0, 0, 0, 696, 697, 3, 214, 107, 0, 697, 698, 5, 125, 0, 0, 698, 699, 3, 134, 67, 0, 699, 700, 5, 126, 0, 0, 700, 111, 1, 0, 0, 0, 701, 706, 3, 120, 60, 0, 702, 703, 5, 110, 0, 0, 703, 705, 3, 120, 60, 0, 704, 702, 1, 0, 0, 0, 705, 708, 1, 0, 0, 0, 706, 704, 1, 0, 0, 0, 706, 707, 1, 0, 0, 0, 707, 113, 1, 0, 0, 0, 708, 706, 1, 0, 0, 0, 709, 714, 3, 122, 61, 0, 710, 711, 5, 110, 0, 0, 711, 713, 3, 122, 61, 0, 712, 710, 1, 0, 0, 0, 713, 716, 1, 0, 0, 0, 714, 712, 1, 0, 0, 0, 714, 715, 1, 0, 0, 0, 715, 115, 1, 0, 0, 0, 716, 714, 1, 0, 0, 0, 717, 719, 7, 0, 0, 0, 718, 717, 1, 0, 0, 0, 718, 719, 1, 0, 0, 0, 719, 720, 1, 0, 0, 0, 720, 721, 3, 118, 59, 0, 721, 117, 1, 0, 0, 0, 722, 744, 3, 120, 60, 0, 723, 724, 5, 35, 0, 0, 724, 725, 5, 125, 0, 0, 725, 726, 3, 120, 60, 0, 726, 727, 5, 126, 0, 0, 727, 744, 1, 0, 0, 0, 728, 729, 5, 36, 0, 0, 729, 730, 5, 125, 0, 0, 730, 731, 3, 120, 60, 0, 731, 732, 5, 126, 0, 0, 732, 744, 1, 0, 0, 0, 733, 734, 5, 37, 0, 0, 734, 735, 5, 125, 0, 0, 735, 736, 3, 120, 60, 0, 736, 737, 5, 126, 0, 0, 737, 744, 1, 0, 0, 0, 738, 739, 5, 38, 0, 0, 739, 740, 5, 125, 0, 0, 740, 741, 3, 120, 60, 0, 741, 742, 5, 126, 0, 0, 742, 744, 1, 0, 0, 0, 743, 722, 1, 0, 0, 0, 743, 723, 1, 0, 0, 0, 743, 728, 1, 0, 0, 0, 743, 733, 1, 0, 0, 0, 743, 738, 1, 0, 0, 0, 744, 119, 1, 0, 0, 0, 745, 746, 3, 214, 107, 0, 746, 121, 1, 0, 0, 0, 747, 748, 3, 218, 109, 0, 748, 123, 1, 0, 0, 0, 749, 750, 3, 132, 66, 0, 750, 751, 5, 125, 0, 0, 751, 752, 3, 134, 67, 0, 752, 753, 5, 126, 0, 0, 753, 125, 1, 0, 0, 0, 754, 755, 5, 274, 0, 0, 755, 756, 5, 125, 0, 0, 756, 757, 3, 88, 44, 0, 757, 758, 5, 27, 0, 0, 758, 759, 3, 130, 65, 0, 759, 760, 5, 126, 0, 0, 760, 127, 1, 0, 0, 0, 761, 762, 3, 174, 87, 0, 762, 763, 5, 125, 0, 0, 763, 764, 3, 134, 67, 0, 764, 765, 5, 126, 0, 0, 765, 129, 1, 0, 0, 0, 766, 777, 5, 212, 0, 0, 767, 777, 5, 241, 0, 0, 768, 777, 5, 243, 0, 0, 769, 777, 5, 102, 0, 0, 770, 777, 5, 103, 0, 0, 771, 777, 5, 104, 0, 0, 772, 777, 5, 105, 0, 0, 773, 777, 5, 106, 0, 0, 774, 777, 5, 107, 0, 0, 775, 777, 5, 108, 0, 0, 776, 766, 1, 0, 0, 0, 776, 767, 1, 0, 0, 0, 776, 768, 1, 0, 0, 0, 776, 769, 1, 0, 0, 0, 776, 770, 1, 0, 0, 0, 776, 771, 1, 0, 0, 0, 776, 772, 1, 0, 0, 0, 776, 773, 1, 0, 0, 0, 776, 774, 1, 0, 0, 0, 776, 775, 1, 0, 0, 0, 777, 131, 1, 0, 0, 0, 778, 785, 3, 152, 76, 0, 779, 785, 3, 156, 78, 0, 780, 785, 3, 178, 89, 0, 781, 785, 3, 174, 87, 0, 782, 785, 3, 176, 88, 0, 783, 785, 3, 180, 90, 0, 784, 778, 1, 0, 0, 0, 784, 779, 1, 0, 0, 0, 784, 780, 1, 0, 0, 0, 784, 781, 1, 0, 0, 0, 784, 782, 1, 0, 0, 0, 784, 783, 1, 0, 0, 0, 785, 133, 1, 0, 0, 0, 786, 791, 3, 136, 68, 0, 787, 788, 5, 110, 0, 0, 788, 790, 3, 136, 68, 0, 789, 787, 1, 0, 0, 0, 790, 793, 1, 0, 0, 0, 791, 789, 1, 0, 0, 0, 791, 792, 1, 0, 0, 0, 792, 795, 1, 0, 0, 0, 793, 791, 1, 0, 0, 0, 794, 786, 1, 0, 0, 0, 794, 795, 1, 0, 0, 0, 795, 135, 1, 0, 0, 0, 796, 797, 3, 220, 110, 0, 797, 798, 5, 112, 0, 0, 798, 800, 1, 0, 0, 0, 799, 796, 1, 0, 0, 0, 799, 800, 1, 0, 0, 0, 800, 801, 1, 0, 0, 0, 801, 802, 3, 94, 47, 0, 802, 137, 1, 0, 0, 0, 803, 804, 3, 140, 70, 0, 804, 805, 5, 112, 0, 0, 805, 806, 3, 150, 75, 0, 806, 139, 1, 0, 0, 0, 807, 808, 7, 5, 0, 0, 808, 141, 1, 0, 0, 0, 809, 818, 3, 146, 73, 0, 810, 811, 3, 146, 73, 0, 811, 812, 3, 144, 72, 0, 812, 818, 1, 0, 0, 0, 813, 814, 3, 146, 73, 0, 814, 815, 5, 134, 0, 0, 815, 816, 3, 144, 72, 0, 816, 818, 1, 0, 0, 0, 817, 809, 1, 0, 0, 0, 817, 810, 1, 0, 0, 0, 817, 813, 1, 0, 0, 0, 818, 143, 1, 0, 0, 0, 819, 822, 3, 194, 97, 0, 820, 822, 3, 196, 98, 0, 821, 819, 1, 0, 0, 0, 821, 820, 1, 0, 0, 0, 822, 145, 1, 0, 0, 0, 823, 826, 3, 214, 107, 0, 824, 826, 3, 192, 96, 0, 825, 823, 1, 0, 0, 0, 825, 824, 1, 0, 0, 0, 826, 147, 1, 0, 0, 0, 827, 828, 3, 150, 75, 0, 828, 149, 1, 0, 0, 0, 829, 832, 3, 214, 107, 0, 830, 832, 3, 188, 94, 0, 831, 829, 1, 0, 0, 0, 831, 830, 1, 0, 0, 0, 832, 151, 1, 0, 0, 0, 833, 857, 5, 172, 0, 0, 834, 857, 5, 173, 0, 0, 835, 857, 5, 174, 0, 0, 836, 857, 5, 175, 0, 0, 837, 857, 5, 176, 0, 0, 838, 857, 5, 177, 0, 0, 839, 857, 5, 178, 0, 0, 840, 857, 5, 179, 0, 0, 841, 857, 5, 180, 0, 0, 842, 857, 5, 181, 0, 0, 843, 857, 5, 182, 0, 0, 844, 857, 5, 183, 0, 0, 845, 857, 5, 184, 0, 0, 846, 857, 5, 185, 0, 0, 847, 857, 5, 186, 0, 0, 848, 857, 5, 188, 0, 0, 849, 857, 5, 189, 0, 0, 850, 857, 5, 190, 0, 0, 851, 857, 5, 191, 0, 0, 852, 857, 5, 192, 0, 0, 853, 857, 5, 193, 0, 0, 854, 857, 5, 194, 0, 0, 855, 857, 3, 154, 77, 0, 856, 833, 1, 0, 0, 0, 856, 834, 1, 0, 0, 0, 856, 835, 1, 0, 0, 0, 856, 836, 1, 0, 0, 0, 856, 837, 1, 0, 0, 0, 856, 838, 1, 0, 0, 0, 856, 839, 1, 0, 0, 0, 856, 840, 1, 0, 0, 0, 856, 841, 1, 0, 0, 0, 856, 842, 1, 0, 0, 0, 856, 843, 1, 0, 0, 0, 856, 844, 1, 0, 0, 0, 856, 845, 1, 0, 0, 0, 856, 846, 1, 0, 0, 0, 856, 847, 1, 0, 0, 0, 856, 848, 1, 0, 0, 0, 856, 849, 1, 0, 0, 0, 856, 850, 1, 0, 0, 0, 856, 851, 1, 0, 0, 0, 856, 852, 1, 0, 0, 0, 856, 853, 1, 0, 0, 0, 856, 854, 1, 0, 0, 0, 856, 855, 1, 0, 0, 0, 857, 153, 1, 0, 0, 0, 858, 859, 7, 6, 0, 0, 859, 155, 1, 0, 0, 0, 860, 861, 7, 7, 0, 0, 861, 157, 1, 0, 0, 0, 862, 863, 5, 226, 0, 0, 863, 864, 5, 125, 0, 0, 864, 865, 3, 160, 80, 0, 865, 866, 5, 110, 0, 0, 866, 867, 3, 136, 68, 0, 867, 868, 5, 126, 0, 0, 868, 159, 1, 0, 0, 0, 869, 870, 7, 8, 0, 0, 870, 161, 1, 0, 0, 0, 871, 872, 5, 223, 0, 0, 872, 873, 5, 125, 0, 0, 873, 874, 3, 168, 84, 0, 874, 875, 5, 5, 0, 0, 875, 876, 3, 136, 68, 0, 876, 877, 5, 126, 0, 0, 877, 163, 1, 0, 0, 0, 878, 879, 7, 9, 0, 0, 879, 165, 1, 0, 0, 0, 880, 881, 7, 10, 0, 0, 881, 167, 1, 0, 0, 0, 882, 885, 3, 164, 82, 0, 883, 885, 3, 166, 83, 0, 884, 882, 1, 0, 0, 0, 884, 883, 1, 0, 0, 0, 885, 169, 1, 0, 0, 0, 886, 887, 3, 172, 86, 0, 887, 888, 5, 125, 0, 0, 888, 889, 3, 164, 82, 0, 889, 890, 5, 110, 0, 0, 890, 891, 3, 136, 68, 0, 891, 892, 5, 110, 0, 0, 892, 893, 3, 136, 68, 0, 893, 894, 5, 126, 0, 0, 894, 171, 1, 0, 0, 0, 895, 896, 7, 11, 0, 0, 896, 173, 1, 0, 0, 0, 897, 898, 7, 12, 0, 0, 898, 175, 1, 0, 0, 0, 899, 900, 5, 281, 0, 0, 900, 177, 1, 0, 0, 0, 901, 902, 7, 13, 0, 0, 902, 179, 1, 0, 0, 0, 903, 904, 5, 187, 0, 0, 904, 181, 1, 0, 0, 0, 905, 906, 7, 14, 0, 0, 906, 183, 1, 0, 0, 0, 907, 908, 7, 15, 0, 0, 908, 185, 1, 0, 0, 0, 909, 910, 7, 16, 0, 0, 910, 187, 1, 0, 0, 0, 911, 918, 3, 190, 95, 0, 912, 918, 3, 192, 96, 0, 913, 918, 3, 194, 97, 0, 914, 918, 3, 196, 98, 0, 915, 918, 3, 198, 99, 0, 916, 918, 3, 200, 100, 0, 917, 911, 1, 0, 0, 0, 917, 912, 1, 0, 0, 0, 917, 913, 1, 0, 0, 0, 917, 914, 1, 0, 0, 0, 917, 915, 1, 0, 0, 0, 917, 916, 1, 0, 0, 0, 918, 189, 1, 0, 0, 0, 919, 920, 5, 81, 0, 0, 920, 921, 3, 94, 47, 0, 921, 922, 3, 208, 104, 0, 922, 191, 1, 0, 0, 0, 923, 924, 7, 17, 0, 0, 924, 193, 1, 0, 0, 0, 925, 927, 7, 0, 0, 0, 926, 925, 1, 0, 0, 0, 926, 927, 1, 0, 0, 0, 927, 928, 1, 0, 0, 0, 928, 929, 5, 330, 0, 0, 929, 195, 1, 0, 0, 0, 930, 932, 7, 0, 0, 0, 931, 930, 1, 0, 0, 0, 931, 932, 1, 0, 0, 0, 932, 933, 1, 0, 0, 0, 933, 934, 5, 331, 0, 0, 934, 197, 1, 0, 0, 0, 935, 936, 7, 18, 0, 0, 936, 199, 1, 0, 0, 0, 937, 941, 3, 202, 101, 0, 938, 941, 3, 204, 102, 0, 939, 941, 3, 206, 103, 0, 940, 937, 1, 0, 0, 0, 940, 938, 1, 0, 0, 0, 940, 939, 1, 0, 0, 0, 941, 201, 1, 0, 0, 0, 942, 943, 5, 212, 0, 0, 943, 944, 3, 192, 96, 0, 944, 203, 1, 0, 0, 0, 945, 946, 5, 241, 0, 0, 946, 947, 3, 192, 96, 0, 947, 205, 1, 0, 0, 0, 948, 949, 5, 243, 0, 0, 949, 950, 3, 192, 96, 0, 950, 207, 1, 0, 0, 0, 951, 952, 7, 19, 0, 0, 952, 209, 1, 0, 0, 0, 953, 954, 7, 20, 0, 0, 954, 211, 1, 0, 0, 0, 955, 956, 5, 125, 0, 0, 956, 961, 3, 188, 94, 0, 957, 958, 5, 110, 0, 0, 958, 960, 3, 188, 94, 0, 959, 957, 1, 0, 0, 0, 960, 963, 1, 0, 0, 0, 961, 959, 1, 0, 0, 0, 961, 962, 1, 0, 0, 0, 962, 964, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 964, 965, 5, 126, 0, 0, 965, 213, 1, 0, 0, 0, 966, 967, 5, 328, 0, 0, 967, 215, 1, 0, 0, 0, 968, 973, 3, 222, 111, 0, 969, 970, 5, 111, 0, 0, 970, 972, 3, 220, 110, 0, 971, 969, 1, 0, 0, 0, 972, 975, 1, 0, 0, 0, 973, 971, 1, 0, 0, 0, 973, 974, 1, 0, 0, 0, 974, 217, 1, 0, 0, 0, 975, 973, 1, 0, 0, 0, 976, 981, 3, 224, 112, 0, 977, 978, 5, 111, 0, 0, 978, 980, 3, 224, 112, 0, 979, 977, 1, 0, 0, 0, 980, 983, 1, 0, 0, 0, 981, 979, 1, 0, 0, 0, 981, 982, 1, 0, 0, 0, 982, 219, 1, 0, 0, 0, 983, 981, 1, 0, 0, 0, 984, 986, 5, 111, 0, 0, 985, 984, 1, 0, 0, 0, 985, 986, 1, 0, 0, 0, 986, 987, 1, 0, 0, 0, 987, 995, 5, 328, 0, 0, 988, 989, 5, 131, 0, 0, 989, 990, 3, 220, 110, 0, 990, 991, 5, 131, 0, 0, 991, 995, 1, 0, 0, 0, 992, 995, 5, 335, 0, 0, 993, 995, 3, 226, 113, 0, 994, 985, 1, 0, 0, 0, 994, 988, 1, 0, 0, 0, 994, 992, 1, 0, 0, 0, 994, 993, 1, 0, 0, 0, 995, 221, 1, 0, 0, 0, 996, 998, 5, 329, 0, 0, 997, 996, 1, 0, 0, 0, 997, 998, 1, 0, 0, 0, 998, 999, 1, 0, 0, 0, 999, 1000, 3, 220, 110, 0, 1000, 223, 1, 0, 0, 0, 1001, 1006, 3, 220, 110, 0, 1002, 1003, 5, 122, 0, 0, 1003, 1005, 3, 220, 110, 0, 1004, 1002, 1, 0, 0, 0, 1005, 1008, 1, 0, 0, 0, 1006, 1004, 1, 0, 0, 0, 1006, 1007, 1, 0, 0, 0, 1007, 1010, 1, 0, 0, 0, 1008, 1006, 1, 0, 0, 0, 1009, 1011, 5, 122, 0, 0, 1010, 1009, 1, 0, 0, 0, 1010, 1011, 1, 0, 0, 0, 1011, 1025, 1, 0, 0, 0, 1012, 1013, 5, 129, 0, 0, 1013, 1014, 3, 224, 112, 0, 1014, 1015, 5, 129, 0, 0, 1015, 1025, 1, 0, 0, 0, 1016, 1017, 5, 130, 0, 0, 1017, 1018, 3, 224, 112, 0, 1018, 1019, 5, 130, 0, 0, 1019, 1025, 1, 0, 0, 0, 1020, 1021, 5, 131, 0, 0, 1021, 1022, 3, 224, 112, 0, 1022, 1023, 5, 131, 0, 0, 1023, 1025, 1, 0, 0, 0, 1024, 1001, 1, 0, 0, 0, 1024, 1012, 1, 0, 0, 0, 1024, 1016, 1, 0, 0, 0, 1024, 1020, 1, 0, 0, 0, 1025, 225, 1, 0, 0, 0, 1026, 1127, 5, 31, 0, 0, 1027, 1127, 3, 210, 105, 0, 1028, 1127, 5, 320, 0, 0, 1029, 1127, 3, 132, 66, 0, 1030, 1127, 3, 140, 70, 0, 1031, 1127, 3, 208, 104, 0, 1032, 1127, 3, 156, 78, 0, 1033, 1127, 3, 178, 89, 0, 1034, 1127, 3, 152, 76, 0, 1035, 1127, 3, 180, 90, 0, 1036, 1127, 5, 2, 0, 0, 1037, 1127, 5, 3, 0, 0, 1038, 1127, 5, 4, 0, 0, 1039, 1127, 5, 5, 0, 0, 1040, 1127, 5, 6, 0, 0, 1041, 1127, 5, 7, 0, 0, 1042, 1127, 5, 8, 0, 0, 1043, 1127, 5, 9, 0, 0, 1044, 1127, 5, 10, 0, 0, 1045, 1127, 5, 11, 0, 0, 1046, 1127, 5, 12, 0, 0, 1047, 1127, 5, 13, 0, 0, 1048, 1127, 5, 14, 0, 0, 1049, 1127, 5, 15, 0, 0, 1050, 1127, 5, 16, 0, 0, 1051, 1127, 5, 17, 0, 0, 1052, 1127, 5, 18, 0, 0, 1053, 1127, 5, 19, 0, 0, 1054, 1127, 5, 20, 0, 0, 1055, 1127, 5, 21, 0, 0, 1056, 1127, 5, 22, 0, 0, 1057, 1127, 5, 23, 0, 0, 1058, 1127, 5, 24, 0, 0, 1059, 1127, 5, 25, 0, 0, 1060, 1127, 5, 26, 0, 0, 1061, 1127, 5, 29, 0, 0, 1062, 1127, 5, 30, 0, 0, 1063, 1127, 5, 32, 0, 0, 1064, 1127, 5, 33, 0, 0, 1065, 1127, 5, 34, 0, 0, 1066, 1127, 5, 36, 0, 0, 1067, 1127, 5, 37, 0, 0, 1068, 1127, 5, 38, 0, 0, 1069, 1127, 5, 39, 0, 0, 1070, 1127, 5, 40, 0, 0, 1071, 1127, 5, 41, 0, 0, 1072, 1127, 5, 42, 0, 0, 1073, 1127, 5, 43, 0, 0, 1074, 1127, 5, 44, 0, 0, 1075, 1127, 5, 45, 0, 0, 1076, 1127, 5, 46, 0, 0, 1077, 1127, 5, 47, 0, 0, 1078, 1127, 5, 48, 0, 0, 1079, 1127, 5, 49, 0, 0, 1080, 1127, 5, 50, 0, 0, 1081, 1127, 5, 51, 0, 0, 1082, 1127, 5, 52, 0, 0, 1083, 1127, 5, 53, 0, 0, 1084, 1127, 5, 54, 0, 0, 1085, 1127, 5, 55, 0, 0, 1086, 1127, 5, 56, 0, 0, 1087, 1127, 5, 57, 0, 0, 1088, 1127, 5, 58, 0, 0, 1089, 1127, 5, 135, 0, 0, 1090, 1127, 5, 136, 0, 0, 1091, 1127, 5, 137, 0, 0, 1092, 1127, 5, 138, 0, 0, 1093, 1127, 5, 139, 0, 0, 1094, 1127, 5, 140, 0, 0, 1095, 1127, 5, 141, 0, 0, 1096, 1127, 5, 142, 0, 0, 1097, 1127, 5, 143, 0, 0, 1098, 1127, 5, 144, 0, 0, 1099, 1127, 5, 145, 0, 0, 1100, 1127, 5, 146, 0, 0, 1101, 1127, 5, 147, 0, 0, 1102, 1127, 5, 148, 0, 0, 1103, 1127, 5, 149, 0, 0, 1104, 1127, 5, 150, 0, 0, 1105, 1127, 5, 151, 0, 0, 1106, 1127, 5, 152, 0, 0, 1107, 1127, 5, 153, 0, 0, 1108, 1127, 5, 154, 0, 0, 1109, 1127, 5, 155, 0, 0, 1110, 1127, 5, 156, 0, 0, 1111, 1127, 5, 157, 0, 0, 1112, 1127, 5, 158, 0, 0, 1113, 1127, 5, 159, 0, 0, 1114, 1127, 5, 160, 0, 0, 1115, 1127, 5, 161, 0, 0, 1116, 1127, 5, 162, 0, 0, 1117, 1127, 5, 163, 0, 0, 1118, 1127, 5, 164, 0, 0, 1119, 1127, 5, 165, 0, 0, 1120, 1127, 5, 166, 0, 0, 1121, 1127, 5, 167, 0, 0, 1122, 1127, 5, 168, 0, 0, 1123, 1127, 5, 169, 0, 0, 1124, 1127, 5, 170, 0, 0, 1125, 1127, 5, 171, 0, 0, 1126, 1026, 1, 0, 0, 0, 1126, 1027, 1, 0, 0, 0, 1126, 1028, 1, 0, 0, 0, 1126, 1029, 1, 0, 0, 0, 1126, 1030, 1, 0, 0, 0, 1126, 1031, 1, 0, 0, 0, 1126, 1032, 1, 0, 0, 0, 1126, 1033, 1, 0, 0, 0, 1126, 1034, 1, 0, 0, 0, 1126, 1035, 1, 0, 0, 0, 1126, 1036, 1, 0, 0, 0, 1126, 1037, 1, 0, 0, 0, 1126, 1038, 1, 0, 0, 0, 1126, 1039, 1, 0, 0, 0, 1126, 1040, 1, 0, 0, 0, 1126, 1041, 1, 0, 0, 0, 1126, 1042, 1, 0, 0, 0, 1126, 1043, 1, 0, 0, 0, 1126, 1044, 1, 0, 0, 0, 1126, 1045, 1, 0, 0, 0, 1126, 1046, 1, 0, 0, 0, 1126, 1047, 1, 0, 0, 0, 1126, 1048, 1, 0, 0, 0, 1126, 1049, 1, 0, 0, 0, 1126, 1050, 1, 0, 0, 0, 1126, 1051, 1, 0, 0, 0, 1126, 1052, 1, 0, 0, 0, 1126, 1053, 1, 0, 0, 0, 1126, 1054, 1, 0, 0, 0, 1126, 1055, 1, 0, 0, 0, 1126, 1056, 1, 0, 0, 0, 1126, 1057, 1, 0, 0, 0, 1126, 1058, 1, 0, 0, 0, 1126, 1059, 1, 0, 0, 0, 1126, 1060, 1, 0, 0, 0, 1126, 1061, 1, 0, 0, 0, 1126, 1062, 1, 0, 0, 0, 1126, 1063, 1, 0, 0, 0, 1126, 1064, 1, 0, 0, 0, 1126, 1065, 1, 0, 0, 0, 1126, 1066, 1, 0, 0, 0, 1126, 1067, 1, 0, 0, 0, 1126, 1068, 1, 0, 0, 0, 1126, 1069, 1, 0, 0, 0, 1126, 1070, 1, 0, 0, 0, 1126, 1071, 1, 0, 0, 0, 1126, 1072, 1, 0, 0, 0, 1126, 1073, 1, 0, 0, 0, 1126, 1074, 1, 0, 0, 0, 1126, 1075, 1, 0, 0, 0, 1126, 1076, 1, 0, 0, 0, 1126, 1077, 1, 0, 0, 0, 1126, 1078, 1, 0, 0, 0, 1126, 1079, 1, 0, 0, 0, 1126, 1080, 1, 0, 0, 0, 1126, 1081, 1, 0, 0, 0, 1126, 1082, 1, 0, 0, 0, 1126, 1083, 1, 0, 0, 0, 1126, 1084, 1, 0, 0, 0, 1126, 1085, 1, 0, 0, 0, 1126, 1086, 1, 0, 0, 0, 1126, 1087, 1, 0, 0, 0, 1126, 1088, 1, 0, 0, 0, 1126, 1089, 1, 0, 0, 0, 1126, 1090, 1, 0, 0, 0, 1126, 1091, 1, 0, 0, 0, 1126, 1092, 1, 0, 0, 0, 1126, 1093, 1, 0, 0, 0, 1126, 1094, 1, 0, 0, 0, 1126, 1095, 1, 0, 0, 0, 1126, 1096, 1, 0, 0, 0, 1126, 1097, 1, 0, 0, 0, 1126, 1098, 1, 0, 0, 0, 1126, 1099, 1, 0, 0, 0, 1126, 1100, 1, 0, 0, 0, 1126, 1101, 1, 0, 0, 0, 1126, 1102, 1, 0, 0, 0, 1126, 1103, 1, 0, 0, 0, 1126, 1104, 1, 0, 0, 0, 1126, 1105, 1, 0, 0, 0, 1126, 1106, 1, 0, 0, 0, 1126, 1107, 1, 0, 0, 0, 1126, 1108, 1, 0, 0, 0, 1126, 1109, 1, 0, 0, 0, 1126, 1110, 1, 0, 0, 0, 1126, 1111, 1, 0, 0, 0, 1126, 1112, 1, 0, 0, 0, 1126, 1113, 1, 0, 0, 0, 1126, 1114, 1, 0, 0, 0, 1126, 1115, 1, 0, 0, 0, 1126, 1116, 1, 0, 0, 0, 1126, 1117, 1, 0, 0, 0, 1126, 1118, 1, 0, 0, 0, 1126, 1119, 1, 0, 0, 0, 1126, 1120, 1, 0, 0, 0, 1126, 1121, 1, 0, 0, 0, 1126, 1122, 1, 0, 0, 0, 1126, 1123, 1, 0, 0, 0, 1126, 1124, 1, 0, 0, 0, 1126, 1125, 1, 0, 0, 0, 1127, 227, 1, 0, 0, 0, 81, 229, 242, 248, 266, 269, 284, 294, 301, 306, 311, 318, 322, 327, 331, 337, 342, 353, 358, 362, 366, 370, 375, 389, 400, 408, 420, 426, 465, 471, 484, 504, 509, 517, 526, 536, 553, 562, 577, 585, 592, 598, 600, 611, 623, 631, 633, 640, 653, 664, 677, 687, 694, 706, 714, 718, 743, 776, 784, 791, 794, 799, 817, 821, 825, 831, 856, 884, 917, 926, 931, 940, 961, 973, 981, 985, 994, 997, 1006, 1010, 1024, 1126] \ No newline at end of file diff --git a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.ts b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.ts index 811481d0f918..16bc322e9d2d 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.ts +++ b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.ts @@ -2443,7 +2443,7 @@ export class OpenSearchPPLParser extends antlr.Parser { this.state = 539; this.match(OpenSearchPPLParser.LT_PRTHS); this.state = 540; - this.valueExpression(); + this.valueExpression(0); this.state = 541; this.match(OpenSearchPPLParser.RT_PRTHS); } @@ -2476,7 +2476,7 @@ export class OpenSearchPPLParser extends antlr.Parser { this.state = 547; this.match(OpenSearchPPLParser.LT_PRTHS); this.state = 548; - this.valueExpression(); + this.valueExpression(0); this.state = 549; this.match(OpenSearchPPLParser.RT_PRTHS); } @@ -2645,7 +2645,7 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 3); { this.state = 576; - this.valueExpression(); + this.valueExpression(0); } break; } @@ -2826,11 +2826,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 1); { this.state = 603; - (localContext as CompareExprContext)._left = this.valueExpression(); + (localContext as CompareExprContext)._left = this.valueExpression(0); this.state = 604; this.comparisonOperator(); this.state = 605; - (localContext as CompareExprContext)._right = this.valueExpression(); + (localContext as CompareExprContext)._right = this.valueExpression(0); } break; case 2: @@ -2838,7 +2838,7 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 2); { this.state = 607; - this.valueExpression(); + this.valueExpression(0); this.state = 608; this.match(OpenSearchPPLParser.IN); this.state = 609; @@ -2860,66 +2860,156 @@ export class OpenSearchPPLParser extends antlr.Parser { } return localContext; } - public valueExpression(): ValueExpressionContext { - let localContext = new ValueExpressionContext(this.context, this.state); - this.enterRule(localContext, 94, OpenSearchPPLParser.RULE_valueExpression); + + public valueExpression(): ValueExpressionContext; + public valueExpression(_p: number): ValueExpressionContext; + public valueExpression(_p?: number): ValueExpressionContext { + if (_p === undefined) { + _p = 0; + } + + let parentContext = this.context; + let parentState = this.state; + let localContext = new ValueExpressionContext(this.context, parentState); + let previousContext = localContext; + let _startState = 94; + this.enterRecursionRule(localContext, 94, OpenSearchPPLParser.RULE_valueExpression, _p); + let _la: number; try { - this.state = 622; + let alternative: number; + this.enterOuterAlt(localContext, 1); + { + this.state = 623; this.errorHandler.sync(this); switch (this.interpreter.adaptivePredict(this.tokenStream, 43, this.context) ) { case 1: - localContext = new ValueExpressionDefaultContext(localContext); - this.enterOuterAlt(localContext, 1); { - this.state = 613; + localContext = new ValueExpressionDefaultContext(localContext); + this.context = localContext; + previousContext = localContext; + + this.state = 614; this.primaryExpression(); } break; case 2: - localContext = new PositionFunctionCallContext(localContext); - this.enterOuterAlt(localContext, 2); { - this.state = 614; + localContext = new PositionFunctionCallContext(localContext); + this.context = localContext; + previousContext = localContext; + this.state = 615; this.positionFunction(); } break; case 3: - localContext = new ExtractFunctionCallContext(localContext); - this.enterOuterAlt(localContext, 3); { - this.state = 615; + localContext = new ExtractFunctionCallContext(localContext); + this.context = localContext; + previousContext = localContext; + this.state = 616; this.extractFunction(); } break; case 4: - localContext = new GetFormatFunctionCallContext(localContext); - this.enterOuterAlt(localContext, 4); { - this.state = 616; + localContext = new GetFormatFunctionCallContext(localContext); + this.context = localContext; + previousContext = localContext; + this.state = 617; this.getFormatFunction(); } break; case 5: - localContext = new TimestampFunctionCallContext(localContext); - this.enterOuterAlt(localContext, 5); { - this.state = 617; + localContext = new TimestampFunctionCallContext(localContext); + this.context = localContext; + previousContext = localContext; + this.state = 618; this.timestampFunction(); } break; case 6: - localContext = new ParentheticValueExprContext(localContext); - this.enterOuterAlt(localContext, 6); { - this.state = 618; - this.match(OpenSearchPPLParser.LT_PRTHS); + localContext = new ParentheticValueExprContext(localContext); + this.context = localContext; + previousContext = localContext; this.state = 619; - this.valueExpression(); + this.match(OpenSearchPPLParser.LT_PRTHS); this.state = 620; + this.valueExpression(0); + this.state = 621; this.match(OpenSearchPPLParser.RT_PRTHS); } break; } + this.context!.stop = this.tokenStream.LT(-1); + this.state = 633; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 45, this.context); + while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { + if (alternative === 1) { + if (this.parseListeners != null) { + this.triggerExitRuleEvent(); + } + previousContext = localContext; + { + this.state = 631; + this.errorHandler.sync(this); + switch (this.interpreter.adaptivePredict(this.tokenStream, 44, this.context) ) { + case 1: + { + localContext = new BinaryArithmeticContext(new ValueExpressionContext(parentContext, parentState)); + (localContext as BinaryArithmeticContext)._left = previousContext; + this.pushNewRecursionContext(localContext, _startState, OpenSearchPPLParser.RULE_valueExpression); + this.state = 625; + if (!(this.precpred(this.context, 8))) { + throw this.createFailedPredicateException("this.precpred(this.context, 8)"); + } + this.state = 626; + (localContext as BinaryArithmeticContext)._binaryOperator = this.tokenStream.LT(1); + _la = this.tokenStream.LA(1); + if(!(((((_la - 120)) & ~0x1F) === 0 && ((1 << (_la - 120)) & 7) !== 0))) { + (localContext as BinaryArithmeticContext)._binaryOperator = this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + this.state = 627; + (localContext as BinaryArithmeticContext)._right = this.valueExpression(9); + } + break; + case 2: + { + localContext = new BinaryArithmeticContext(new ValueExpressionContext(parentContext, parentState)); + (localContext as BinaryArithmeticContext)._left = previousContext; + this.pushNewRecursionContext(localContext, _startState, OpenSearchPPLParser.RULE_valueExpression); + this.state = 628; + if (!(this.precpred(this.context, 7))) { + throw this.createFailedPredicateException("this.precpred(this.context, 7)"); + } + this.state = 629; + (localContext as BinaryArithmeticContext)._binaryOperator = this.tokenStream.LT(1); + _la = this.tokenStream.LA(1); + if(!(_la === 118 || _la === 119)) { + (localContext as BinaryArithmeticContext)._binaryOperator = this.errorHandler.recoverInline(this); + } + else { + this.errorHandler.reportMatch(this); + this.consume(); + } + this.state = 630; + (localContext as BinaryArithmeticContext)._right = this.valueExpression(8); + } + break; + } + } + } + this.state = 635; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 45, this.context); + } + } } catch (re) { if (re instanceof antlr.RecognitionException) { @@ -2930,7 +3020,7 @@ export class OpenSearchPPLParser extends antlr.Parser { } } finally { - this.exitRule(); + this.unrollRecursionContexts(parentContext); } return localContext; } @@ -2938,34 +3028,34 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new PrimaryExpressionContext(this.context, this.state); this.enterRule(localContext, 96, OpenSearchPPLParser.RULE_primaryExpression); try { - this.state = 628; + this.state = 640; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 44, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 46, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 624; + this.state = 636; this.evalFunctionCall(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 625; + this.state = 637; this.dataTypeFunctionCall(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 626; + this.state = 638; this.fieldExpression(); } break; case 4: this.enterOuterAlt(localContext, 4); { - this.state = 627; + this.state = 639; this.literalValue(); } break; @@ -2990,17 +3080,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 630; + this.state = 642; this.positionFunctionName(); - this.state = 631; + this.state = 643; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 632; + this.state = 644; this.functionArg(); - this.state = 633; + this.state = 645; this.match(OpenSearchPPLParser.IN); - this.state = 634; + this.state = 646; this.functionArg(); - this.state = 635; + this.state = 647; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3023,7 +3113,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 637; + this.state = 649; this.booleanFunctionCall(); } } @@ -3044,7 +3134,7 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new RelevanceExpressionContext(this.context, this.state); this.enterRule(localContext, 102, OpenSearchPPLParser.RULE_relevanceExpression); try { - this.state = 641; + this.state = 653; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.MATCH: @@ -3053,7 +3143,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.MATCH_BOOL_PREFIX: this.enterOuterAlt(localContext, 1); { - this.state = 639; + this.state = 651; this.singleFieldRelevanceFunction(); } break; @@ -3062,7 +3152,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.QUERY_STRING: this.enterOuterAlt(localContext, 2); { - this.state = 640; + this.state = 652; this.multiFieldRelevanceFunction(); } break; @@ -3090,33 +3180,33 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 643; + this.state = 655; this.singleFieldRelevanceFunctionName(); - this.state = 644; + this.state = 656; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 645; + this.state = 657; localContext._field = this.relevanceField(); - this.state = 646; + this.state = 658; this.match(OpenSearchPPLParser.COMMA); - this.state = 647; + this.state = 659; localContext._query = this.relevanceQuery(); - this.state = 652; + this.state = 664; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 648; + this.state = 660; this.match(OpenSearchPPLParser.COMMA); - this.state = 649; + this.state = 661; this.relevanceArg(); } } - this.state = 654; + this.state = 666; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 655; + this.state = 667; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3140,53 +3230,53 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 657; + this.state = 669; this.multiFieldRelevanceFunctionName(); - this.state = 658; + this.state = 670; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 659; + this.state = 671; this.match(OpenSearchPPLParser.LT_SQR_PRTHS); - this.state = 660; + this.state = 672; localContext._field = this.relevanceFieldAndWeight(); - this.state = 665; + this.state = 677; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 661; + this.state = 673; this.match(OpenSearchPPLParser.COMMA); - this.state = 662; + this.state = 674; localContext._field = this.relevanceFieldAndWeight(); } } - this.state = 667; + this.state = 679; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 668; + this.state = 680; this.match(OpenSearchPPLParser.RT_SQR_PRTHS); - this.state = 669; + this.state = 681; this.match(OpenSearchPPLParser.COMMA); - this.state = 670; + this.state = 682; localContext._query = this.relevanceQuery(); - this.state = 675; + this.state = 687; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 671; + this.state = 683; this.match(OpenSearchPPLParser.COMMA); - this.state = 672; + this.state = 684; this.relevanceArg(); } } - this.state = 677; + this.state = 689; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 678; + this.state = 690; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3207,7 +3297,7 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new TableSourceContext(this.context, this.state); this.enterRule(localContext, 108, OpenSearchPPLParser.RULE_tableSource); try { - this.state = 682; + this.state = 694; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.SEARCH: @@ -3481,14 +3571,14 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.BQUOTA_STRING: this.enterOuterAlt(localContext, 1); { - this.state = 680; + this.state = 692; this.tableQualifiedName(); } break; case OpenSearchPPLParser.ID_DATE_SUFFIX: this.enterOuterAlt(localContext, 2); { - this.state = 681; + this.state = 693; this.match(OpenSearchPPLParser.ID_DATE_SUFFIX); } break; @@ -3515,13 +3605,13 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 684; + this.state = 696; this.qualifiedName(); - this.state = 685; + this.state = 697; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 686; + this.state = 698; this.functionArgs(); - this.state = 687; + this.state = 699; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3545,21 +3635,21 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 689; + this.state = 701; this.fieldExpression(); - this.state = 694; + this.state = 706; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 690; + this.state = 702; this.match(OpenSearchPPLParser.COMMA); - this.state = 691; + this.state = 703; this.fieldExpression(); } } - this.state = 696; + this.state = 708; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -3585,21 +3675,21 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 697; + this.state = 709; this.wcFieldExpression(); - this.state = 702; + this.state = 714; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 698; + this.state = 710; this.match(OpenSearchPPLParser.COMMA); - this.state = 699; + this.state = 711; this.wcFieldExpression(); } } - this.state = 704; + this.state = 716; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -3625,12 +3715,12 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 706; + this.state = 718; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119) { { - this.state = 705; + this.state = 717; _la = this.tokenStream.LA(1); if(!(_la === 118 || _la === 119)) { this.errorHandler.recoverInline(this); @@ -3642,7 +3732,7 @@ export class OpenSearchPPLParser extends antlr.Parser { } } - this.state = 708; + this.state = 720; this.sortFieldExpression(); } } @@ -3663,65 +3753,65 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new SortFieldExpressionContext(this.context, this.state); this.enterRule(localContext, 118, OpenSearchPPLParser.RULE_sortFieldExpression); try { - this.state = 731; + this.state = 743; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.ID: this.enterOuterAlt(localContext, 1); { - this.state = 710; + this.state = 722; this.fieldExpression(); } break; case OpenSearchPPLParser.AUTO: this.enterOuterAlt(localContext, 2); { - this.state = 711; + this.state = 723; this.match(OpenSearchPPLParser.AUTO); - this.state = 712; + this.state = 724; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 713; + this.state = 725; this.fieldExpression(); - this.state = 714; + this.state = 726; this.match(OpenSearchPPLParser.RT_PRTHS); } break; case OpenSearchPPLParser.STR: this.enterOuterAlt(localContext, 3); { - this.state = 716; + this.state = 728; this.match(OpenSearchPPLParser.STR); - this.state = 717; + this.state = 729; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 718; + this.state = 730; this.fieldExpression(); - this.state = 719; + this.state = 731; this.match(OpenSearchPPLParser.RT_PRTHS); } break; case OpenSearchPPLParser.IP: this.enterOuterAlt(localContext, 4); { - this.state = 721; + this.state = 733; this.match(OpenSearchPPLParser.IP); - this.state = 722; + this.state = 734; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 723; + this.state = 735; this.fieldExpression(); - this.state = 724; + this.state = 736; this.match(OpenSearchPPLParser.RT_PRTHS); } break; case OpenSearchPPLParser.NUM: this.enterOuterAlt(localContext, 5); { - this.state = 726; + this.state = 738; this.match(OpenSearchPPLParser.NUM); - this.state = 727; + this.state = 739; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 728; + this.state = 740; this.fieldExpression(); - this.state = 729; + this.state = 741; this.match(OpenSearchPPLParser.RT_PRTHS); } break; @@ -3748,7 +3838,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 733; + this.state = 745; this.qualifiedName(); } } @@ -3771,7 +3861,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 735; + this.state = 747; this.wcQualifiedName(); } } @@ -3794,13 +3884,13 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 737; + this.state = 749; this.evalFunctionName(); - this.state = 738; + this.state = 750; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 739; + this.state = 751; this.functionArgs(); - this.state = 740; + this.state = 752; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3823,17 +3913,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 742; + this.state = 754; this.match(OpenSearchPPLParser.CAST); - this.state = 743; + this.state = 755; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 744; + this.state = 756; this.expression(); - this.state = 745; + this.state = 757; this.match(OpenSearchPPLParser.AS); - this.state = 746; + this.state = 758; this.convertedDataType(); - this.state = 747; + this.state = 759; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3856,13 +3946,13 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 749; + this.state = 761; this.conditionFunctionBase(); - this.state = 750; + this.state = 762; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 751; + this.state = 763; this.functionArgs(); - this.state = 752; + this.state = 764; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3883,76 +3973,76 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new ConvertedDataTypeContext(this.context, this.state); this.enterRule(localContext, 130, OpenSearchPPLParser.RULE_convertedDataType); try { - this.state = 764; + this.state = 776; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.DATE: this.enterOuterAlt(localContext, 1); { - this.state = 754; + this.state = 766; localContext._typeName = this.match(OpenSearchPPLParser.DATE); } break; case OpenSearchPPLParser.TIME: this.enterOuterAlt(localContext, 2); { - this.state = 755; + this.state = 767; localContext._typeName = this.match(OpenSearchPPLParser.TIME); } break; case OpenSearchPPLParser.TIMESTAMP: this.enterOuterAlt(localContext, 3); { - this.state = 756; + this.state = 768; localContext._typeName = this.match(OpenSearchPPLParser.TIMESTAMP); } break; case OpenSearchPPLParser.INT: this.enterOuterAlt(localContext, 4); { - this.state = 757; + this.state = 769; localContext._typeName = this.match(OpenSearchPPLParser.INT); } break; case OpenSearchPPLParser.INTEGER: this.enterOuterAlt(localContext, 5); { - this.state = 758; + this.state = 770; localContext._typeName = this.match(OpenSearchPPLParser.INTEGER); } break; case OpenSearchPPLParser.DOUBLE: this.enterOuterAlt(localContext, 6); { - this.state = 759; + this.state = 771; localContext._typeName = this.match(OpenSearchPPLParser.DOUBLE); } break; case OpenSearchPPLParser.LONG: this.enterOuterAlt(localContext, 7); { - this.state = 760; + this.state = 772; localContext._typeName = this.match(OpenSearchPPLParser.LONG); } break; case OpenSearchPPLParser.FLOAT: this.enterOuterAlt(localContext, 8); { - this.state = 761; + this.state = 773; localContext._typeName = this.match(OpenSearchPPLParser.FLOAT); } break; case OpenSearchPPLParser.STRING: this.enterOuterAlt(localContext, 9); { - this.state = 762; + this.state = 774; localContext._typeName = this.match(OpenSearchPPLParser.STRING); } break; case OpenSearchPPLParser.BOOLEAN: this.enterOuterAlt(localContext, 10); { - this.state = 763; + this.state = 775; localContext._typeName = this.match(OpenSearchPPLParser.BOOLEAN); } break; @@ -3977,7 +4067,7 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new EvalFunctionNameContext(this.context, this.state); this.enterRule(localContext, 132, OpenSearchPPLParser.RULE_evalFunctionName); try { - this.state = 772; + this.state = 784; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.ABS: @@ -4014,7 +4104,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.TAN: this.enterOuterAlt(localContext, 1); { - this.state = 766; + this.state = 778; this.mathematicalFunctionName(); } break; @@ -4085,7 +4175,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.YEARWEEK: this.enterOuterAlt(localContext, 2); { - this.state = 767; + this.state = 779; this.dateTimeFunctionName(); } break; @@ -4108,7 +4198,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.REVERSE: this.enterOuterAlt(localContext, 3); { - this.state = 768; + this.state = 780; this.textFunctionName(); } break; @@ -4120,21 +4210,21 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.IF: this.enterOuterAlt(localContext, 4); { - this.state = 769; + this.state = 781; this.conditionFunctionBase(); } break; case OpenSearchPPLParser.TYPEOF: this.enterOuterAlt(localContext, 5); { - this.state = 770; + this.state = 782; this.systemFunctionName(); } break; case OpenSearchPPLParser.POSITION: this.enterOuterAlt(localContext, 6); { - this.state = 771; + this.state = 783; this.positionFunctionName(); } break; @@ -4162,26 +4252,26 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 782; + this.state = 794; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3892314108) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 134217719) !== 0) || ((((_la - 65)) & ~0x1F) === 0 && ((1 << (_la - 65)) & 4294967291) !== 0) || ((((_la - 97)) & ~0x1F) === 0 && ((1 << (_la - 97)) & 274743299) !== 0) || ((((_la - 131)) & ~0x1F) === 0 && ((1 << (_la - 131)) & 4294967281) !== 0) || ((((_la - 163)) & ~0x1F) === 0 && ((1 << (_la - 163)) & 4294967295) !== 0) || ((((_la - 195)) & ~0x1F) === 0 && ((1 << (_la - 195)) & 4294967295) !== 0) || ((((_la - 227)) & ~0x1F) === 0 && ((1 << (_la - 227)) & 4294967295) !== 0) || ((((_la - 259)) & ~0x1F) === 0 && ((1 << (_la - 259)) & 3229614075) !== 0) || ((((_la - 291)) & ~0x1F) === 0 && ((1 << (_la - 291)) & 4294967295) !== 0) || ((((_la - 323)) & ~0x1F) === 0 && ((1 << (_la - 323)) & 7615) !== 0)) { { - this.state = 774; + this.state = 786; this.functionArg(); - this.state = 779; + this.state = 791; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 775; + this.state = 787; this.match(OpenSearchPPLParser.COMMA); - this.state = 776; + this.state = 788; this.functionArg(); } } - this.state = 781; + this.state = 793; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -4209,20 +4299,20 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 787; + this.state = 799; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 58, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 60, this.context) ) { case 1: { - this.state = 784; + this.state = 796; this.ident(); - this.state = 785; + this.state = 797; this.match(OpenSearchPPLParser.EQUAL); } break; } - this.state = 789; - this.valueExpression(); + this.state = 801; + this.valueExpression(0); } } catch (re) { @@ -4244,11 +4334,11 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 791; + this.state = 803; this.relevanceArgName(); - this.state = 792; + this.state = 804; this.match(OpenSearchPPLParser.EQUAL); - this.state = 793; + this.state = 805; this.relevanceArgValue(); } } @@ -4272,7 +4362,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 795; + this.state = 807; _la = this.tokenStream.LA(1); if(!(_la === 7 || _la === 56 || ((((_la - 289)) & ~0x1F) === 0 && ((1 << (_la - 289)) & 2147483647) !== 0))) { this.errorHandler.recoverInline(this); @@ -4300,33 +4390,33 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new RelevanceFieldAndWeightContext(this.context, this.state); this.enterRule(localContext, 142, OpenSearchPPLParser.RULE_relevanceFieldAndWeight); try { - this.state = 805; + this.state = 817; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 59, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 61, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 797; + this.state = 809; localContext._field = this.relevanceField(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 798; + this.state = 810; localContext._field = this.relevanceField(); - this.state = 799; + this.state = 811; localContext._weight = this.relevanceFieldWeight(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 801; + this.state = 813; localContext._field = this.relevanceField(); - this.state = 802; + this.state = 814; this.match(OpenSearchPPLParser.BIT_XOR_OP); - this.state = 803; + this.state = 815; localContext._weight = this.relevanceFieldWeight(); } break; @@ -4349,20 +4439,20 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new RelevanceFieldWeightContext(this.context, this.state); this.enterRule(localContext, 144, OpenSearchPPLParser.RULE_relevanceFieldWeight); try { - this.state = 809; + this.state = 821; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 60, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 62, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 807; + this.state = 819; this.integerLiteral(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 808; + this.state = 820; this.decimalLiteral(); } break; @@ -4385,13 +4475,13 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new RelevanceFieldContext(this.context, this.state); this.enterRule(localContext, 146, OpenSearchPPLParser.RULE_relevanceField); try { - this.state = 813; + this.state = 825; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.ID: this.enterOuterAlt(localContext, 1); { - this.state = 811; + this.state = 823; this.qualifiedName(); } break; @@ -4399,7 +4489,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.SQUOTA_STRING: this.enterOuterAlt(localContext, 2); { - this.state = 812; + this.state = 824; this.stringLiteral(); } break; @@ -4426,7 +4516,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 815; + this.state = 827; this.relevanceArgValue(); } } @@ -4447,13 +4537,13 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new RelevanceArgValueContext(this.context, this.state); this.enterRule(localContext, 150, OpenSearchPPLParser.RULE_relevanceArgValue); try { - this.state = 819; + this.state = 831; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.ID: this.enterOuterAlt(localContext, 1); { - this.state = 817; + this.state = 829; this.qualifiedName(); } break; @@ -4471,7 +4561,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.SQUOTA_STRING: this.enterOuterAlt(localContext, 2); { - this.state = 818; + this.state = 830; this.literalValue(); } break; @@ -4496,160 +4586,160 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new MathematicalFunctionNameContext(this.context, this.state); this.enterRule(localContext, 152, OpenSearchPPLParser.RULE_mathematicalFunctionName); try { - this.state = 844; + this.state = 856; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.ABS: this.enterOuterAlt(localContext, 1); { - this.state = 821; + this.state = 833; this.match(OpenSearchPPLParser.ABS); } break; case OpenSearchPPLParser.CBRT: this.enterOuterAlt(localContext, 2); { - this.state = 822; + this.state = 834; this.match(OpenSearchPPLParser.CBRT); } break; case OpenSearchPPLParser.CEIL: this.enterOuterAlt(localContext, 3); { - this.state = 823; + this.state = 835; this.match(OpenSearchPPLParser.CEIL); } break; case OpenSearchPPLParser.CEILING: this.enterOuterAlt(localContext, 4); { - this.state = 824; + this.state = 836; this.match(OpenSearchPPLParser.CEILING); } break; case OpenSearchPPLParser.CONV: this.enterOuterAlt(localContext, 5); { - this.state = 825; + this.state = 837; this.match(OpenSearchPPLParser.CONV); } break; case OpenSearchPPLParser.CRC32: this.enterOuterAlt(localContext, 6); { - this.state = 826; + this.state = 838; this.match(OpenSearchPPLParser.CRC32); } break; case OpenSearchPPLParser.E: this.enterOuterAlt(localContext, 7); { - this.state = 827; + this.state = 839; this.match(OpenSearchPPLParser.E); } break; case OpenSearchPPLParser.EXP: this.enterOuterAlt(localContext, 8); { - this.state = 828; + this.state = 840; this.match(OpenSearchPPLParser.EXP); } break; case OpenSearchPPLParser.FLOOR: this.enterOuterAlt(localContext, 9); { - this.state = 829; + this.state = 841; this.match(OpenSearchPPLParser.FLOOR); } break; case OpenSearchPPLParser.LN: this.enterOuterAlt(localContext, 10); { - this.state = 830; + this.state = 842; this.match(OpenSearchPPLParser.LN); } break; case OpenSearchPPLParser.LOG: this.enterOuterAlt(localContext, 11); { - this.state = 831; + this.state = 843; this.match(OpenSearchPPLParser.LOG); } break; case OpenSearchPPLParser.LOG10: this.enterOuterAlt(localContext, 12); { - this.state = 832; + this.state = 844; this.match(OpenSearchPPLParser.LOG10); } break; case OpenSearchPPLParser.LOG2: this.enterOuterAlt(localContext, 13); { - this.state = 833; + this.state = 845; this.match(OpenSearchPPLParser.LOG2); } break; case OpenSearchPPLParser.MOD: this.enterOuterAlt(localContext, 14); { - this.state = 834; + this.state = 846; this.match(OpenSearchPPLParser.MOD); } break; case OpenSearchPPLParser.PI: this.enterOuterAlt(localContext, 15); { - this.state = 835; + this.state = 847; this.match(OpenSearchPPLParser.PI); } break; case OpenSearchPPLParser.POW: this.enterOuterAlt(localContext, 16); { - this.state = 836; + this.state = 848; this.match(OpenSearchPPLParser.POW); } break; case OpenSearchPPLParser.POWER: this.enterOuterAlt(localContext, 17); { - this.state = 837; + this.state = 849; this.match(OpenSearchPPLParser.POWER); } break; case OpenSearchPPLParser.RAND: this.enterOuterAlt(localContext, 18); { - this.state = 838; + this.state = 850; this.match(OpenSearchPPLParser.RAND); } break; case OpenSearchPPLParser.ROUND: this.enterOuterAlt(localContext, 19); { - this.state = 839; + this.state = 851; this.match(OpenSearchPPLParser.ROUND); } break; case OpenSearchPPLParser.SIGN: this.enterOuterAlt(localContext, 20); { - this.state = 840; + this.state = 852; this.match(OpenSearchPPLParser.SIGN); } break; case OpenSearchPPLParser.SQRT: this.enterOuterAlt(localContext, 21); { - this.state = 841; + this.state = 853; this.match(OpenSearchPPLParser.SQRT); } break; case OpenSearchPPLParser.TRUNCATE: this.enterOuterAlt(localContext, 22); { - this.state = 842; + this.state = 854; this.match(OpenSearchPPLParser.TRUNCATE); } break; @@ -4665,7 +4755,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.TAN: this.enterOuterAlt(localContext, 23); { - this.state = 843; + this.state = 855; this.trigonometricFunctionName(); } break; @@ -4693,7 +4783,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 846; + this.state = 858; _la = this.tokenStream.LA(1); if(!(((((_la - 195)) & ~0x1F) === 0 && ((1 << (_la - 195)) & 1023) !== 0))) { this.errorHandler.recoverInline(this); @@ -4724,7 +4814,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 848; + this.state = 860; _la = this.tokenStream.LA(1); if(!(((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 1038960967) !== 0) || ((((_la - 205)) & ~0x1F) === 0 && ((1 << (_la - 205)) & 4292607999) !== 0) || ((((_la - 237)) & ~0x1F) === 0 && ((1 << (_la - 237)) & 523903) !== 0))) { this.errorHandler.recoverInline(this); @@ -4754,17 +4844,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 850; + this.state = 862; this.match(OpenSearchPPLParser.GET_FORMAT); - this.state = 851; + this.state = 863; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 852; + this.state = 864; this.getFormatType(); - this.state = 853; + this.state = 865; this.match(OpenSearchPPLParser.COMMA); - this.state = 854; + this.state = 866; this.functionArg(); - this.state = 855; + this.state = 867; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -4788,7 +4878,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 857; + this.state = 869; _la = this.tokenStream.LA(1); if(!(_la === 69 || ((((_la - 212)) & ~0x1F) === 0 && ((1 << (_la - 212)) & 2684354561) !== 0))) { this.errorHandler.recoverInline(this); @@ -4818,17 +4908,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 859; + this.state = 871; this.match(OpenSearchPPLParser.EXTRACT); - this.state = 860; + this.state = 872; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 861; + this.state = 873; this.datetimePart(); - this.state = 862; + this.state = 874; this.match(OpenSearchPPLParser.FROM); - this.state = 863; + this.state = 875; this.functionArg(); - this.state = 864; + this.state = 876; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -4852,7 +4942,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 866; + this.state = 878; _la = this.tokenStream.LA(1); if(!(((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 174608449) !== 0))) { this.errorHandler.recoverInline(this); @@ -4883,7 +4973,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 868; + this.state = 880; _la = this.tokenStream.LA(1); if(!(((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 138560215) !== 0))) { this.errorHandler.recoverInline(this); @@ -4911,7 +5001,7 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new DatetimePartContext(this.context, this.state); this.enterRule(localContext, 168, OpenSearchPPLParser.RULE_datetimePart); try { - this.state = 872; + this.state = 884; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.DAY: @@ -4925,7 +5015,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.YEAR: this.enterOuterAlt(localContext, 1); { - this.state = 870; + this.state = 882; this.simpleDateTimePart(); } break; @@ -4942,7 +5032,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.YEAR_MONTH: this.enterOuterAlt(localContext, 2); { - this.state = 871; + this.state = 883; this.complexDateTimePart(); } break; @@ -4969,21 +5059,21 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 874; + this.state = 886; this.timestampFunctionName(); - this.state = 875; + this.state = 887; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 876; + this.state = 888; this.simpleDateTimePart(); - this.state = 877; + this.state = 889; this.match(OpenSearchPPLParser.COMMA); - this.state = 878; + this.state = 890; localContext._firstArg = this.functionArg(); - this.state = 879; + this.state = 891; this.match(OpenSearchPPLParser.COMMA); - this.state = 880; + this.state = 892; localContext._secondArg = this.functionArg(); - this.state = 881; + this.state = 893; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -5007,7 +5097,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 883; + this.state = 895; _la = this.tokenStream.LA(1); if(!(_la === 244 || _la === 245)) { this.errorHandler.recoverInline(this); @@ -5038,7 +5128,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 885; + this.state = 897; _la = this.tokenStream.LA(1); if(!(((((_la - 275)) & ~0x1F) === 0 && ((1 << (_la - 275)) & 63) !== 0))) { this.errorHandler.recoverInline(this); @@ -5068,7 +5158,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 887; + this.state = 899; this.match(OpenSearchPPLParser.TYPEOF); } } @@ -5092,7 +5182,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 889; + this.state = 901; _la = this.tokenStream.LA(1); if(!(((((_la - 256)) & ~0x1F) === 0 && ((1 << (_la - 256)) & 262111) !== 0))) { this.errorHandler.recoverInline(this); @@ -5122,7 +5212,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 891; + this.state = 903; this.match(OpenSearchPPLParser.POSITION); } } @@ -5146,7 +5236,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 893; + this.state = 905; _la = this.tokenStream.LA(1); if(!(_la === 67 || ((((_la - 112)) & ~0x1F) === 0 && ((1 << (_la - 112)) & 63) !== 0))) { this.errorHandler.recoverInline(this); @@ -5177,7 +5267,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 895; + this.state = 907; _la = this.tokenStream.LA(1); if(!(((((_la - 282)) & ~0x1F) === 0 && ((1 << (_la - 282)) & 15) !== 0))) { this.errorHandler.recoverInline(this); @@ -5208,7 +5298,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 897; + this.state = 909; _la = this.tokenStream.LA(1); if(!(((((_la - 286)) & ~0x1F) === 0 && ((1 << (_la - 286)) & 7) !== 0))) { this.errorHandler.recoverInline(this); @@ -5236,48 +5326,48 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new LiteralValueContext(this.context, this.state); this.enterRule(localContext, 188, OpenSearchPPLParser.RULE_literalValue); try { - this.state = 905; + this.state = 917; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 65, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 67, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 899; + this.state = 911; this.intervalLiteral(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 900; + this.state = 912; this.stringLiteral(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 901; + this.state = 913; this.integerLiteral(); } break; case 4: this.enterOuterAlt(localContext, 4); { - this.state = 902; + this.state = 914; this.decimalLiteral(); } break; case 5: this.enterOuterAlt(localContext, 5); { - this.state = 903; + this.state = 915; this.booleanLiteral(); } break; case 6: this.enterOuterAlt(localContext, 6); { - this.state = 904; + this.state = 916; this.datetimeLiteral(); } break; @@ -5302,11 +5392,11 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 907; + this.state = 919; this.match(OpenSearchPPLParser.INTERVAL); - this.state = 908; - this.valueExpression(); - this.state = 909; + this.state = 920; + this.valueExpression(0); + this.state = 921; this.intervalUnit(); } } @@ -5330,7 +5420,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 911; + this.state = 923; _la = this.tokenStream.LA(1); if(!(_la === 333 || _la === 334)) { this.errorHandler.recoverInline(this); @@ -5361,12 +5451,12 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 914; + this.state = 926; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119) { { - this.state = 913; + this.state = 925; _la = this.tokenStream.LA(1); if(!(_la === 118 || _la === 119)) { this.errorHandler.recoverInline(this); @@ -5378,7 +5468,7 @@ export class OpenSearchPPLParser extends antlr.Parser { } } - this.state = 916; + this.state = 928; this.match(OpenSearchPPLParser.INTEGER_LITERAL); } } @@ -5402,12 +5492,12 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 919; + this.state = 931; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119) { { - this.state = 918; + this.state = 930; _la = this.tokenStream.LA(1); if(!(_la === 118 || _la === 119)) { this.errorHandler.recoverInline(this); @@ -5419,7 +5509,7 @@ export class OpenSearchPPLParser extends antlr.Parser { } } - this.state = 921; + this.state = 933; this.match(OpenSearchPPLParser.DECIMAL_LITERAL); } } @@ -5443,7 +5533,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 923; + this.state = 935; _la = this.tokenStream.LA(1); if(!(_la === 65 || _la === 66)) { this.errorHandler.recoverInline(this); @@ -5471,27 +5561,27 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new DatetimeLiteralContext(this.context, this.state); this.enterRule(localContext, 200, OpenSearchPPLParser.RULE_datetimeLiteral); try { - this.state = 928; + this.state = 940; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.DATE: this.enterOuterAlt(localContext, 1); { - this.state = 925; + this.state = 937; this.dateLiteral(); } break; case OpenSearchPPLParser.TIME: this.enterOuterAlt(localContext, 2); { - this.state = 926; + this.state = 938; this.timeLiteral(); } break; case OpenSearchPPLParser.TIMESTAMP: this.enterOuterAlt(localContext, 3); { - this.state = 927; + this.state = 939; this.timestampLiteral(); } break; @@ -5518,9 +5608,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 930; + this.state = 942; this.match(OpenSearchPPLParser.DATE); - this.state = 931; + this.state = 943; localContext._date = this.stringLiteral(); } } @@ -5543,9 +5633,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 933; + this.state = 945; this.match(OpenSearchPPLParser.TIME); - this.state = 934; + this.state = 946; localContext._time = this.stringLiteral(); } } @@ -5568,9 +5658,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 936; + this.state = 948; this.match(OpenSearchPPLParser.TIMESTAMP); - this.state = 937; + this.state = 949; localContext._timestamp = this.stringLiteral(); } } @@ -5594,7 +5684,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 939; + this.state = 951; _la = this.tokenStream.LA(1); if(!(((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 451728879) !== 0))) { this.errorHandler.recoverInline(this); @@ -5625,7 +5715,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 941; + this.state = 953; _la = this.tokenStream.LA(1); if(!(_la === 31 || ((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 174612545) !== 0) || ((((_la - 321)) & ~0x1F) === 0 && ((1 << (_la - 321)) & 127) !== 0))) { this.errorHandler.recoverInline(this); @@ -5656,27 +5746,27 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 943; + this.state = 955; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 944; + this.state = 956; this.literalValue(); - this.state = 949; + this.state = 961; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 945; + this.state = 957; this.match(OpenSearchPPLParser.COMMA); - this.state = 946; + this.state = 958; this.literalValue(); } } - this.state = 951; + this.state = 963; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 952; + this.state = 964; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -5699,7 +5789,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 954; + this.state = 966; this.match(OpenSearchPPLParser.ID); } } @@ -5724,21 +5814,21 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new IdentsAsTableQualifiedNameContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 956; + this.state = 968; this.tableIdent(); - this.state = 961; + this.state = 973; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 111) { { { - this.state = 957; + this.state = 969; this.match(OpenSearchPPLParser.DOT); - this.state = 958; + this.state = 970; this.ident(); } } - this.state = 963; + this.state = 975; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -5765,21 +5855,21 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new IdentsAsWildcardQualifiedNameContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 964; + this.state = 976; this.wildcard(); - this.state = 969; + this.state = 981; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 111) { { { - this.state = 965; + this.state = 977; this.match(OpenSearchPPLParser.DOT); - this.state = 966; + this.state = 978; this.wildcard(); } } - this.state = 971; + this.state = 983; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -5803,42 +5893,42 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterRule(localContext, 220, OpenSearchPPLParser.RULE_ident); let _la: number; try { - this.state = 982; + this.state = 994; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.DOT: case OpenSearchPPLParser.ID: this.enterOuterAlt(localContext, 1); { - this.state = 973; + this.state = 985; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 111) { { - this.state = 972; + this.state = 984; this.match(OpenSearchPPLParser.DOT); } } - this.state = 975; + this.state = 987; this.match(OpenSearchPPLParser.ID); } break; case OpenSearchPPLParser.BACKTICK: this.enterOuterAlt(localContext, 2); { - this.state = 976; + this.state = 988; this.match(OpenSearchPPLParser.BACKTICK); - this.state = 977; + this.state = 989; this.ident(); - this.state = 978; + this.state = 990; this.match(OpenSearchPPLParser.BACKTICK); } break; case OpenSearchPPLParser.BQUOTA_STRING: this.enterOuterAlt(localContext, 3); { - this.state = 980; + this.state = 992; this.match(OpenSearchPPLParser.BQUOTA_STRING); } break; @@ -6108,7 +6198,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.Y: this.enterOuterAlt(localContext, 4); { - this.state = 981; + this.state = 993; this.keywordsCanBeId(); } break; @@ -6136,17 +6226,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 985; + this.state = 997; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 329) { { - this.state = 984; + this.state = 996; this.match(OpenSearchPPLParser.CLUSTER); } } - this.state = 987; + this.state = 999; this.ident(); } } @@ -6169,38 +6259,38 @@ export class OpenSearchPPLParser extends antlr.Parser { let _la: number; try { let alternative: number; - this.state = 1012; + this.state = 1024; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 77, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 79, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 989; + this.state = 1001; this.ident(); - this.state = 994; + this.state = 1006; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 75, this.context); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 77, this.context); while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { if (alternative === 1) { { { - this.state = 990; + this.state = 1002; this.match(OpenSearchPPLParser.MODULE); - this.state = 991; + this.state = 1003; this.ident(); } } } - this.state = 996; + this.state = 1008; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 75, this.context); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 77, this.context); } - this.state = 998; + this.state = 1010; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 122) { { - this.state = 997; + this.state = 1009; this.match(OpenSearchPPLParser.MODULE); } } @@ -6210,33 +6300,33 @@ export class OpenSearchPPLParser extends antlr.Parser { case 2: this.enterOuterAlt(localContext, 2); { - this.state = 1000; + this.state = 1012; this.match(OpenSearchPPLParser.SINGLE_QUOTE); - this.state = 1001; + this.state = 1013; this.wildcard(); - this.state = 1002; + this.state = 1014; this.match(OpenSearchPPLParser.SINGLE_QUOTE); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 1004; + this.state = 1016; this.match(OpenSearchPPLParser.DOUBLE_QUOTE); - this.state = 1005; + this.state = 1017; this.wildcard(); - this.state = 1006; + this.state = 1018; this.match(OpenSearchPPLParser.DOUBLE_QUOTE); } break; case 4: this.enterOuterAlt(localContext, 4); { - this.state = 1008; + this.state = 1020; this.match(OpenSearchPPLParser.BACKTICK); - this.state = 1009; + this.state = 1021; this.wildcard(); - this.state = 1010; + this.state = 1022; this.match(OpenSearchPPLParser.BACKTICK); } break; @@ -6259,706 +6349,706 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new KeywordsCanBeIdContext(this.context, this.state); this.enterRule(localContext, 226, OpenSearchPPLParser.RULE_keywordsCanBeId); try { - this.state = 1114; + this.state = 1126; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 78, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 80, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 1014; + this.state = 1026; this.match(OpenSearchPPLParser.D); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 1015; + this.state = 1027; this.timespanUnit(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 1016; + this.state = 1028; this.match(OpenSearchPPLParser.SPAN); } break; case 4: this.enterOuterAlt(localContext, 4); { - this.state = 1017; + this.state = 1029; this.evalFunctionName(); } break; case 5: this.enterOuterAlt(localContext, 5); { - this.state = 1018; + this.state = 1030; this.relevanceArgName(); } break; case 6: this.enterOuterAlt(localContext, 6); { - this.state = 1019; + this.state = 1031; this.intervalUnit(); } break; case 7: this.enterOuterAlt(localContext, 7); { - this.state = 1020; + this.state = 1032; this.dateTimeFunctionName(); } break; case 8: this.enterOuterAlt(localContext, 8); { - this.state = 1021; + this.state = 1033; this.textFunctionName(); } break; case 9: this.enterOuterAlt(localContext, 9); { - this.state = 1022; + this.state = 1034; this.mathematicalFunctionName(); } break; case 10: this.enterOuterAlt(localContext, 10); { - this.state = 1023; + this.state = 1035; this.positionFunctionName(); } break; case 11: this.enterOuterAlt(localContext, 11); { - this.state = 1024; + this.state = 1036; this.match(OpenSearchPPLParser.SEARCH); } break; case 12: this.enterOuterAlt(localContext, 12); { - this.state = 1025; + this.state = 1037; this.match(OpenSearchPPLParser.DESCRIBE); } break; case 13: this.enterOuterAlt(localContext, 13); { - this.state = 1026; + this.state = 1038; this.match(OpenSearchPPLParser.SHOW); } break; case 14: this.enterOuterAlt(localContext, 14); { - this.state = 1027; + this.state = 1039; this.match(OpenSearchPPLParser.FROM); } break; case 15: this.enterOuterAlt(localContext, 15); { - this.state = 1028; + this.state = 1040; this.match(OpenSearchPPLParser.WHERE); } break; case 16: this.enterOuterAlt(localContext, 16); { - this.state = 1029; + this.state = 1041; this.match(OpenSearchPPLParser.FIELDS); } break; case 17: this.enterOuterAlt(localContext, 17); { - this.state = 1030; + this.state = 1042; this.match(OpenSearchPPLParser.RENAME); } break; case 18: this.enterOuterAlt(localContext, 18); { - this.state = 1031; + this.state = 1043; this.match(OpenSearchPPLParser.STATS); } break; case 19: this.enterOuterAlt(localContext, 19); { - this.state = 1032; + this.state = 1044; this.match(OpenSearchPPLParser.DEDUP); } break; case 20: this.enterOuterAlt(localContext, 20); { - this.state = 1033; + this.state = 1045; this.match(OpenSearchPPLParser.SORT); } break; case 21: this.enterOuterAlt(localContext, 21); { - this.state = 1034; + this.state = 1046; this.match(OpenSearchPPLParser.EVAL); } break; case 22: this.enterOuterAlt(localContext, 22); { - this.state = 1035; + this.state = 1047; this.match(OpenSearchPPLParser.HEAD); } break; case 23: this.enterOuterAlt(localContext, 23); { - this.state = 1036; + this.state = 1048; this.match(OpenSearchPPLParser.TOP); } break; case 24: this.enterOuterAlt(localContext, 24); { - this.state = 1037; + this.state = 1049; this.match(OpenSearchPPLParser.RARE); } break; case 25: this.enterOuterAlt(localContext, 25); { - this.state = 1038; + this.state = 1050; this.match(OpenSearchPPLParser.PARSE); } break; case 26: this.enterOuterAlt(localContext, 26); { - this.state = 1039; + this.state = 1051; this.match(OpenSearchPPLParser.METHOD); } break; case 27: this.enterOuterAlt(localContext, 27); { - this.state = 1040; + this.state = 1052; this.match(OpenSearchPPLParser.REGEX); } break; case 28: this.enterOuterAlt(localContext, 28); { - this.state = 1041; + this.state = 1053; this.match(OpenSearchPPLParser.PUNCT); } break; case 29: this.enterOuterAlt(localContext, 29); { - this.state = 1042; + this.state = 1054; this.match(OpenSearchPPLParser.GROK); } break; case 30: this.enterOuterAlt(localContext, 30); { - this.state = 1043; + this.state = 1055; this.match(OpenSearchPPLParser.PATTERN); } break; case 31: this.enterOuterAlt(localContext, 31); { - this.state = 1044; + this.state = 1056; this.match(OpenSearchPPLParser.PATTERNS); } break; case 32: this.enterOuterAlt(localContext, 32); { - this.state = 1045; + this.state = 1057; this.match(OpenSearchPPLParser.NEW_FIELD); } break; case 33: this.enterOuterAlt(localContext, 33); { - this.state = 1046; + this.state = 1058; this.match(OpenSearchPPLParser.KMEANS); } break; case 34: this.enterOuterAlt(localContext, 34); { - this.state = 1047; + this.state = 1059; this.match(OpenSearchPPLParser.AD); } break; case 35: this.enterOuterAlt(localContext, 35); { - this.state = 1048; + this.state = 1060; this.match(OpenSearchPPLParser.ML); } break; case 36: this.enterOuterAlt(localContext, 36); { - this.state = 1049; + this.state = 1061; this.match(OpenSearchPPLParser.SOURCE); } break; case 37: this.enterOuterAlt(localContext, 37); { - this.state = 1050; + this.state = 1062; this.match(OpenSearchPPLParser.INDEX); } break; case 38: this.enterOuterAlt(localContext, 38); { - this.state = 1051; + this.state = 1063; this.match(OpenSearchPPLParser.DESC); } break; case 39: this.enterOuterAlt(localContext, 39); { - this.state = 1052; + this.state = 1064; this.match(OpenSearchPPLParser.DATASOURCES); } break; case 40: this.enterOuterAlt(localContext, 40); { - this.state = 1053; + this.state = 1065; this.match(OpenSearchPPLParser.SORTBY); } break; case 41: this.enterOuterAlt(localContext, 41); { - this.state = 1054; + this.state = 1066; this.match(OpenSearchPPLParser.STR); } break; case 42: this.enterOuterAlt(localContext, 42); { - this.state = 1055; + this.state = 1067; this.match(OpenSearchPPLParser.IP); } break; case 43: this.enterOuterAlt(localContext, 43); { - this.state = 1056; + this.state = 1068; this.match(OpenSearchPPLParser.NUM); } break; case 44: this.enterOuterAlt(localContext, 44); { - this.state = 1057; + this.state = 1069; this.match(OpenSearchPPLParser.KEEPEMPTY); } break; case 45: this.enterOuterAlt(localContext, 45); { - this.state = 1058; + this.state = 1070; this.match(OpenSearchPPLParser.CONSECUTIVE); } break; case 46: this.enterOuterAlt(localContext, 46); { - this.state = 1059; + this.state = 1071; this.match(OpenSearchPPLParser.DEDUP_SPLITVALUES); } break; case 47: this.enterOuterAlt(localContext, 47); { - this.state = 1060; + this.state = 1072; this.match(OpenSearchPPLParser.PARTITIONS); } break; case 48: this.enterOuterAlt(localContext, 48); { - this.state = 1061; + this.state = 1073; this.match(OpenSearchPPLParser.ALLNUM); } break; case 49: this.enterOuterAlt(localContext, 49); { - this.state = 1062; + this.state = 1074; this.match(OpenSearchPPLParser.DELIM); } break; case 50: this.enterOuterAlt(localContext, 50); { - this.state = 1063; + this.state = 1075; this.match(OpenSearchPPLParser.CENTROIDS); } break; case 51: this.enterOuterAlt(localContext, 51); { - this.state = 1064; + this.state = 1076; this.match(OpenSearchPPLParser.ITERATIONS); } break; case 52: this.enterOuterAlt(localContext, 52); { - this.state = 1065; + this.state = 1077; this.match(OpenSearchPPLParser.DISTANCE_TYPE); } break; case 53: this.enterOuterAlt(localContext, 53); { - this.state = 1066; + this.state = 1078; this.match(OpenSearchPPLParser.NUMBER_OF_TREES); } break; case 54: this.enterOuterAlt(localContext, 54); { - this.state = 1067; + this.state = 1079; this.match(OpenSearchPPLParser.SHINGLE_SIZE); } break; case 55: this.enterOuterAlt(localContext, 55); { - this.state = 1068; + this.state = 1080; this.match(OpenSearchPPLParser.SAMPLE_SIZE); } break; case 56: this.enterOuterAlt(localContext, 56); { - this.state = 1069; + this.state = 1081; this.match(OpenSearchPPLParser.OUTPUT_AFTER); } break; case 57: this.enterOuterAlt(localContext, 57); { - this.state = 1070; + this.state = 1082; this.match(OpenSearchPPLParser.TIME_DECAY); } break; case 58: this.enterOuterAlt(localContext, 58); { - this.state = 1071; + this.state = 1083; this.match(OpenSearchPPLParser.ANOMALY_RATE); } break; case 59: this.enterOuterAlt(localContext, 59); { - this.state = 1072; + this.state = 1084; this.match(OpenSearchPPLParser.CATEGORY_FIELD); } break; case 60: this.enterOuterAlt(localContext, 60); { - this.state = 1073; + this.state = 1085; this.match(OpenSearchPPLParser.TIME_FIELD); } break; case 61: this.enterOuterAlt(localContext, 61); { - this.state = 1074; + this.state = 1086; this.match(OpenSearchPPLParser.TIME_ZONE); } break; case 62: this.enterOuterAlt(localContext, 62); { - this.state = 1075; + this.state = 1087; this.match(OpenSearchPPLParser.TRAINING_DATA_SIZE); } break; case 63: this.enterOuterAlt(localContext, 63); { - this.state = 1076; + this.state = 1088; this.match(OpenSearchPPLParser.ANOMALY_SCORE_THRESHOLD); } break; case 64: this.enterOuterAlt(localContext, 64); { - this.state = 1077; + this.state = 1089; this.match(OpenSearchPPLParser.AVG); } break; case 65: this.enterOuterAlt(localContext, 65); { - this.state = 1078; + this.state = 1090; this.match(OpenSearchPPLParser.COUNT); } break; case 66: this.enterOuterAlt(localContext, 66); { - this.state = 1079; + this.state = 1091; this.match(OpenSearchPPLParser.DISTINCT_COUNT); } break; case 67: this.enterOuterAlt(localContext, 67); { - this.state = 1080; + this.state = 1092; this.match(OpenSearchPPLParser.ESTDC); } break; case 68: this.enterOuterAlt(localContext, 68); { - this.state = 1081; + this.state = 1093; this.match(OpenSearchPPLParser.ESTDC_ERROR); } break; case 69: this.enterOuterAlt(localContext, 69); { - this.state = 1082; + this.state = 1094; this.match(OpenSearchPPLParser.MAX); } break; case 70: this.enterOuterAlt(localContext, 70); { - this.state = 1083; + this.state = 1095; this.match(OpenSearchPPLParser.MEAN); } break; case 71: this.enterOuterAlt(localContext, 71); { - this.state = 1084; + this.state = 1096; this.match(OpenSearchPPLParser.MEDIAN); } break; case 72: this.enterOuterAlt(localContext, 72); { - this.state = 1085; + this.state = 1097; this.match(OpenSearchPPLParser.MIN); } break; case 73: this.enterOuterAlt(localContext, 73); { - this.state = 1086; + this.state = 1098; this.match(OpenSearchPPLParser.MODE); } break; case 74: this.enterOuterAlt(localContext, 74); { - this.state = 1087; + this.state = 1099; this.match(OpenSearchPPLParser.RANGE); } break; case 75: this.enterOuterAlt(localContext, 75); { - this.state = 1088; + this.state = 1100; this.match(OpenSearchPPLParser.STDEV); } break; case 76: this.enterOuterAlt(localContext, 76); { - this.state = 1089; + this.state = 1101; this.match(OpenSearchPPLParser.STDEVP); } break; case 77: this.enterOuterAlt(localContext, 77); { - this.state = 1090; + this.state = 1102; this.match(OpenSearchPPLParser.SUM); } break; case 78: this.enterOuterAlt(localContext, 78); { - this.state = 1091; + this.state = 1103; this.match(OpenSearchPPLParser.SUMSQ); } break; case 79: this.enterOuterAlt(localContext, 79); { - this.state = 1092; + this.state = 1104; this.match(OpenSearchPPLParser.VAR_SAMP); } break; case 80: this.enterOuterAlt(localContext, 80); { - this.state = 1093; + this.state = 1105; this.match(OpenSearchPPLParser.VAR_POP); } break; case 81: this.enterOuterAlt(localContext, 81); { - this.state = 1094; + this.state = 1106; this.match(OpenSearchPPLParser.STDDEV_SAMP); } break; case 82: this.enterOuterAlt(localContext, 82); { - this.state = 1095; + this.state = 1107; this.match(OpenSearchPPLParser.STDDEV_POP); } break; case 83: this.enterOuterAlt(localContext, 83); { - this.state = 1096; + this.state = 1108; this.match(OpenSearchPPLParser.PERCENTILE); } break; case 84: this.enterOuterAlt(localContext, 84); { - this.state = 1097; + this.state = 1109; this.match(OpenSearchPPLParser.TAKE); } break; case 85: this.enterOuterAlt(localContext, 85); { - this.state = 1098; + this.state = 1110; this.match(OpenSearchPPLParser.FIRST); } break; case 86: this.enterOuterAlt(localContext, 86); { - this.state = 1099; + this.state = 1111; this.match(OpenSearchPPLParser.LAST); } break; case 87: this.enterOuterAlt(localContext, 87); { - this.state = 1100; + this.state = 1112; this.match(OpenSearchPPLParser.LIST); } break; case 88: this.enterOuterAlt(localContext, 88); { - this.state = 1101; + this.state = 1113; this.match(OpenSearchPPLParser.VALUES); } break; case 89: this.enterOuterAlt(localContext, 89); { - this.state = 1102; + this.state = 1114; this.match(OpenSearchPPLParser.EARLIEST); } break; case 90: this.enterOuterAlt(localContext, 90); { - this.state = 1103; + this.state = 1115; this.match(OpenSearchPPLParser.EARLIEST_TIME); } break; case 91: this.enterOuterAlt(localContext, 91); { - this.state = 1104; + this.state = 1116; this.match(OpenSearchPPLParser.LATEST); } break; case 92: this.enterOuterAlt(localContext, 92); { - this.state = 1105; + this.state = 1117; this.match(OpenSearchPPLParser.LATEST_TIME); } break; case 93: this.enterOuterAlt(localContext, 93); { - this.state = 1106; + this.state = 1118; this.match(OpenSearchPPLParser.PER_DAY); } break; case 94: this.enterOuterAlt(localContext, 94); { - this.state = 1107; + this.state = 1119; this.match(OpenSearchPPLParser.PER_HOUR); } break; case 95: this.enterOuterAlt(localContext, 95); { - this.state = 1108; + this.state = 1120; this.match(OpenSearchPPLParser.PER_MINUTE); } break; case 96: this.enterOuterAlt(localContext, 96); { - this.state = 1109; + this.state = 1121; this.match(OpenSearchPPLParser.PER_SECOND); } break; case 97: this.enterOuterAlt(localContext, 97); { - this.state = 1110; + this.state = 1122; this.match(OpenSearchPPLParser.RATE); } break; case 98: this.enterOuterAlt(localContext, 98); { - this.state = 1111; + this.state = 1123; this.match(OpenSearchPPLParser.SPARKLINE); } break; case 99: this.enterOuterAlt(localContext, 99); { - this.state = 1112; + this.state = 1124; this.match(OpenSearchPPLParser.C); } break; case 100: this.enterOuterAlt(localContext, 100); { - this.state = 1113; + this.state = 1125; this.match(OpenSearchPPLParser.DC); } break; @@ -6982,6 +7072,8 @@ export class OpenSearchPPLParser extends antlr.Parser { switch (ruleIndex) { case 45: return this.logicalExpression_sempred(localContext as LogicalExpressionContext, predIndex); + case 47: + return this.valueExpression_sempred(localContext as ValueExpressionContext, predIndex); } return true; } @@ -6996,9 +7088,18 @@ export class OpenSearchPPLParser extends antlr.Parser { } return true; } + private valueExpression_sempred(localContext: ValueExpressionContext | null, predIndex: number): boolean { + switch (predIndex) { + case 3: + return this.precpred(this.context, 8); + case 4: + return this.precpred(this.context, 7); + } + return true; + } public static readonly _serializedATN: number[] = [ - 4,1,336,1117,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, + 4,1,336,1129,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6, 7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7, 13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, 20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7, @@ -7048,42 +7149,43 @@ export class OpenSearchPPLParser extends antlr.Parser { 44,578,8,44,1,45,1,45,1,45,1,45,1,45,1,45,3,45,586,8,45,1,45,1,45, 1,45,1,45,1,45,3,45,593,8,45,1,45,1,45,1,45,1,45,5,45,599,8,45,10, 45,12,45,602,9,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,3,46,612, - 8,46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,3,47,623,8,47, - 1,48,1,48,1,48,1,48,3,48,629,8,48,1,49,1,49,1,49,1,49,1,49,1,49, - 1,49,1,50,1,50,1,51,1,51,3,51,642,8,51,1,52,1,52,1,52,1,52,1,52, - 1,52,1,52,5,52,651,8,52,10,52,12,52,654,9,52,1,52,1,52,1,53,1,53, - 1,53,1,53,1,53,1,53,5,53,664,8,53,10,53,12,53,667,9,53,1,53,1,53, - 1,53,1,53,1,53,5,53,674,8,53,10,53,12,53,677,9,53,1,53,1,53,1,54, - 1,54,3,54,683,8,54,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,5,56, - 693,8,56,10,56,12,56,696,9,56,1,57,1,57,1,57,5,57,701,8,57,10,57, - 12,57,704,9,57,1,58,3,58,707,8,58,1,58,1,58,1,59,1,59,1,59,1,59, + 8,46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,3,47,624, + 8,47,1,47,1,47,1,47,1,47,1,47,1,47,5,47,632,8,47,10,47,12,47,635, + 9,47,1,48,1,48,1,48,1,48,3,48,641,8,48,1,49,1,49,1,49,1,49,1,49, + 1,49,1,49,1,50,1,50,1,51,1,51,3,51,654,8,51,1,52,1,52,1,52,1,52, + 1,52,1,52,1,52,5,52,663,8,52,10,52,12,52,666,9,52,1,52,1,52,1,53, + 1,53,1,53,1,53,1,53,1,53,5,53,676,8,53,10,53,12,53,679,9,53,1,53, + 1,53,1,53,1,53,1,53,5,53,686,8,53,10,53,12,53,689,9,53,1,53,1,53, + 1,54,1,54,3,54,695,8,54,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56, + 5,56,705,8,56,10,56,12,56,708,9,56,1,57,1,57,1,57,5,57,713,8,57, + 10,57,12,57,716,9,57,1,58,3,58,719,8,58,1,58,1,58,1,59,1,59,1,59, 1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59, - 1,59,1,59,1,59,1,59,3,59,732,8,59,1,60,1,60,1,61,1,61,1,62,1,62, - 1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64, - 1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,3,65, - 765,8,65,1,66,1,66,1,66,1,66,1,66,1,66,3,66,773,8,66,1,67,1,67,1, - 67,5,67,778,8,67,10,67,12,67,781,9,67,3,67,783,8,67,1,68,1,68,1, - 68,3,68,788,8,68,1,68,1,68,1,69,1,69,1,69,1,69,1,70,1,70,1,71,1, - 71,1,71,1,71,1,71,1,71,1,71,1,71,3,71,806,8,71,1,72,1,72,3,72,810, - 8,72,1,73,1,73,3,73,814,8,73,1,74,1,74,1,75,1,75,3,75,820,8,75,1, - 76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1, - 76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,3,76,845,8,76,1, - 77,1,77,1,78,1,78,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1, - 81,1,81,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,83,1,83,1,84,1,84,3, - 84,873,8,84,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,86,1, - 86,1,87,1,87,1,88,1,88,1,89,1,89,1,90,1,90,1,91,1,91,1,92,1,92,1, - 93,1,93,1,94,1,94,1,94,1,94,1,94,1,94,3,94,906,8,94,1,95,1,95,1, - 95,1,95,1,96,1,96,1,97,3,97,915,8,97,1,97,1,97,1,98,3,98,920,8,98, - 1,98,1,98,1,99,1,99,1,100,1,100,1,100,3,100,929,8,100,1,101,1,101, - 1,101,1,102,1,102,1,102,1,103,1,103,1,103,1,104,1,104,1,105,1,105, - 1,106,1,106,1,106,1,106,5,106,948,8,106,10,106,12,106,951,9,106, - 1,106,1,106,1,107,1,107,1,108,1,108,1,108,5,108,960,8,108,10,108, - 12,108,963,9,108,1,109,1,109,1,109,5,109,968,8,109,10,109,12,109, - 971,9,109,1,110,3,110,974,8,110,1,110,1,110,1,110,1,110,1,110,1, - 110,1,110,3,110,983,8,110,1,111,3,111,986,8,111,1,111,1,111,1,112, - 1,112,1,112,5,112,993,8,112,10,112,12,112,996,9,112,1,112,3,112, - 999,8,112,1,112,1,112,1,112,1,112,1,112,1,112,1,112,1,112,1,112, - 1,112,1,112,1,112,3,112,1013,8,112,1,113,1,113,1,113,1,113,1,113, + 1,59,1,59,1,59,1,59,1,59,3,59,744,8,59,1,60,1,60,1,61,1,61,1,62, + 1,62,1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64, + 1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65, + 3,65,777,8,65,1,66,1,66,1,66,1,66,1,66,1,66,3,66,785,8,66,1,67,1, + 67,1,67,5,67,790,8,67,10,67,12,67,793,9,67,3,67,795,8,67,1,68,1, + 68,1,68,3,68,800,8,68,1,68,1,68,1,69,1,69,1,69,1,69,1,70,1,70,1, + 71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,3,71,818,8,71,1,72,1,72,3, + 72,822,8,72,1,73,1,73,3,73,826,8,73,1,74,1,74,1,75,1,75,3,75,832, + 8,75,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76, + 1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,76,3,76,857, + 8,76,1,77,1,77,1,78,1,78,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,80, + 1,80,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,83,1,83,1,84, + 1,84,3,84,885,8,84,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85, + 1,86,1,86,1,87,1,87,1,88,1,88,1,89,1,89,1,90,1,90,1,91,1,91,1,92, + 1,92,1,93,1,93,1,94,1,94,1,94,1,94,1,94,1,94,3,94,918,8,94,1,95, + 1,95,1,95,1,95,1,96,1,96,1,97,3,97,927,8,97,1,97,1,97,1,98,3,98, + 932,8,98,1,98,1,98,1,99,1,99,1,100,1,100,1,100,3,100,941,8,100,1, + 101,1,101,1,101,1,102,1,102,1,102,1,103,1,103,1,103,1,104,1,104, + 1,105,1,105,1,106,1,106,1,106,1,106,5,106,960,8,106,10,106,12,106, + 963,9,106,1,106,1,106,1,107,1,107,1,108,1,108,1,108,5,108,972,8, + 108,10,108,12,108,975,9,108,1,109,1,109,1,109,5,109,980,8,109,10, + 109,12,109,983,9,109,1,110,3,110,986,8,110,1,110,1,110,1,110,1,110, + 1,110,1,110,1,110,3,110,995,8,110,1,111,3,111,998,8,111,1,111,1, + 111,1,112,1,112,1,112,5,112,1005,8,112,10,112,12,112,1008,9,112, + 1,112,3,112,1011,8,112,1,112,1,112,1,112,1,112,1,112,1,112,1,112, + 1,112,1,112,1,112,1,112,1,112,3,112,1025,8,112,1,113,1,113,1,113, 1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113, 1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113, 1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113, @@ -7092,362 +7194,367 @@ export class OpenSearchPPLParser extends antlr.Parser { 1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113, 1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113, 1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113, - 1,113,1,113,1,113,1,113,1,113,1,113,1,113,3,113,1115,8,113,1,113, - 0,1,90,114,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38, - 40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82, - 84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118, - 120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150, - 152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182, - 184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214, - 216,218,220,222,224,226,0,20,1,0,118,119,1,0,18,19,2,0,137,137,171, - 171,5,0,135,136,140,140,143,143,148,148,150,153,3,0,7,7,56,56,289, - 319,1,0,195,204,13,0,68,70,74,74,76,76,79,79,82,82,84,84,86,87,89, - 92,94,97,205,222,224,225,227,243,246,255,4,0,69,69,212,212,241,241, - 243,243,8,0,70,70,76,76,82,82,84,84,89,89,91,92,95,95,97,97,8,0, - 71,73,75,75,77,78,80,80,85,85,88,88,93,93,98,98,1,0,244,245,1,0, - 275,280,2,0,256,260,262,273,2,0,67,67,112,117,1,0,282,285,1,0,286, - 288,1,0,333,334,1,0,65,66,9,0,70,73,75,78,80,80,82,82,84,85,88,89, - 91,93,95,95,97,98,9,0,31,31,70,70,76,76,83,84,89,89,91,92,95,95, - 97,97,321,327,1265,0,229,1,0,0,0,2,233,1,0,0,0,4,235,1,0,0,0,6,237, - 1,0,0,0,8,248,1,0,0,0,10,266,1,0,0,0,12,269,1,0,0,0,14,273,1,0,0, - 0,16,276,1,0,0,0,18,279,1,0,0,0,20,282,1,0,0,0,22,288,1,0,0,0,24, - 297,1,0,0,0,26,329,1,0,0,0,28,344,1,0,0,0,30,347,1,0,0,0,32,356, - 1,0,0,0,34,364,1,0,0,0,36,372,1,0,0,0,38,377,1,0,0,0,40,381,1,0, - 0,0,42,385,1,0,0,0,44,400,1,0,0,0,46,402,1,0,0,0,48,404,1,0,0,0, - 50,420,1,0,0,0,52,422,1,0,0,0,54,465,1,0,0,0,56,467,1,0,0,0,58,474, - 1,0,0,0,60,484,1,0,0,0,62,486,1,0,0,0,64,488,1,0,0,0,66,492,1,0, - 0,0,68,504,1,0,0,0,70,506,1,0,0,0,72,511,1,0,0,0,74,521,1,0,0,0, - 76,529,1,0,0,0,78,533,1,0,0,0,80,553,1,0,0,0,82,555,1,0,0,0,84,557, - 1,0,0,0,86,566,1,0,0,0,88,577,1,0,0,0,90,585,1,0,0,0,92,611,1,0, - 0,0,94,622,1,0,0,0,96,628,1,0,0,0,98,630,1,0,0,0,100,637,1,0,0,0, - 102,641,1,0,0,0,104,643,1,0,0,0,106,657,1,0,0,0,108,682,1,0,0,0, - 110,684,1,0,0,0,112,689,1,0,0,0,114,697,1,0,0,0,116,706,1,0,0,0, - 118,731,1,0,0,0,120,733,1,0,0,0,122,735,1,0,0,0,124,737,1,0,0,0, - 126,742,1,0,0,0,128,749,1,0,0,0,130,764,1,0,0,0,132,772,1,0,0,0, - 134,782,1,0,0,0,136,787,1,0,0,0,138,791,1,0,0,0,140,795,1,0,0,0, - 142,805,1,0,0,0,144,809,1,0,0,0,146,813,1,0,0,0,148,815,1,0,0,0, - 150,819,1,0,0,0,152,844,1,0,0,0,154,846,1,0,0,0,156,848,1,0,0,0, - 158,850,1,0,0,0,160,857,1,0,0,0,162,859,1,0,0,0,164,866,1,0,0,0, - 166,868,1,0,0,0,168,872,1,0,0,0,170,874,1,0,0,0,172,883,1,0,0,0, - 174,885,1,0,0,0,176,887,1,0,0,0,178,889,1,0,0,0,180,891,1,0,0,0, - 182,893,1,0,0,0,184,895,1,0,0,0,186,897,1,0,0,0,188,905,1,0,0,0, - 190,907,1,0,0,0,192,911,1,0,0,0,194,914,1,0,0,0,196,919,1,0,0,0, - 198,923,1,0,0,0,200,928,1,0,0,0,202,930,1,0,0,0,204,933,1,0,0,0, - 206,936,1,0,0,0,208,939,1,0,0,0,210,941,1,0,0,0,212,943,1,0,0,0, - 214,954,1,0,0,0,216,956,1,0,0,0,218,964,1,0,0,0,220,982,1,0,0,0, - 222,985,1,0,0,0,224,1012,1,0,0,0,226,1114,1,0,0,0,228,230,3,2,1, - 0,229,228,1,0,0,0,229,230,1,0,0,0,230,231,1,0,0,0,231,232,5,0,0, - 1,232,1,1,0,0,0,233,234,3,4,2,0,234,3,1,0,0,0,235,236,3,6,3,0,236, - 5,1,0,0,0,237,242,3,8,4,0,238,239,5,109,0,0,239,241,3,10,5,0,240, - 238,1,0,0,0,241,244,1,0,0,0,242,240,1,0,0,0,242,243,1,0,0,0,243, - 7,1,0,0,0,244,242,1,0,0,0,245,249,3,12,6,0,246,249,3,14,7,0,247, - 249,3,16,8,0,248,245,1,0,0,0,248,246,1,0,0,0,248,247,1,0,0,0,249, - 9,1,0,0,0,250,267,3,18,9,0,251,267,3,20,10,0,252,267,3,22,11,0,253, - 267,3,24,12,0,254,267,3,26,13,0,255,267,3,28,14,0,256,267,3,30,15, - 0,257,267,3,32,16,0,258,267,3,34,17,0,259,267,3,36,18,0,260,267, - 3,38,19,0,261,267,3,40,20,0,262,267,3,42,21,0,263,267,3,48,24,0, - 264,267,3,52,26,0,265,267,3,56,28,0,266,250,1,0,0,0,266,251,1,0, - 0,0,266,252,1,0,0,0,266,253,1,0,0,0,266,254,1,0,0,0,266,255,1,0, - 0,0,266,256,1,0,0,0,266,257,1,0,0,0,266,258,1,0,0,0,266,259,1,0, - 0,0,266,260,1,0,0,0,266,261,1,0,0,0,266,262,1,0,0,0,266,263,1,0, - 0,0,266,264,1,0,0,0,266,265,1,0,0,0,267,11,1,0,0,0,268,270,5,2,0, - 0,269,268,1,0,0,0,269,270,1,0,0,0,270,271,1,0,0,0,271,272,3,60,30, - 0,272,13,1,0,0,0,273,274,5,3,0,0,274,275,3,62,31,0,275,15,1,0,0, - 0,276,277,5,4,0,0,277,278,5,33,0,0,278,17,1,0,0,0,279,280,5,6,0, - 0,280,281,3,90,45,0,281,19,1,0,0,0,282,284,5,7,0,0,283,285,7,0,0, - 0,284,283,1,0,0,0,284,285,1,0,0,0,285,286,1,0,0,0,286,287,3,112, - 56,0,287,21,1,0,0,0,288,289,5,8,0,0,289,294,3,64,32,0,290,291,5, - 110,0,0,291,293,3,64,32,0,292,290,1,0,0,0,293,296,1,0,0,0,294,292, - 1,0,0,0,294,295,1,0,0,0,295,23,1,0,0,0,296,294,1,0,0,0,297,301,5, - 9,0,0,298,299,5,42,0,0,299,300,5,112,0,0,300,302,3,194,97,0,301, - 298,1,0,0,0,301,302,1,0,0,0,302,306,1,0,0,0,303,304,5,43,0,0,304, - 305,5,112,0,0,305,307,3,198,99,0,306,303,1,0,0,0,306,307,1,0,0,0, - 307,311,1,0,0,0,308,309,5,44,0,0,309,310,5,112,0,0,310,312,3,192, - 96,0,311,308,1,0,0,0,311,312,1,0,0,0,312,313,1,0,0,0,313,318,3,78, - 39,0,314,315,5,110,0,0,315,317,3,78,39,0,316,314,1,0,0,0,317,320, - 1,0,0,0,318,316,1,0,0,0,318,319,1,0,0,0,319,322,1,0,0,0,320,318, - 1,0,0,0,321,323,3,68,34,0,322,321,1,0,0,0,322,323,1,0,0,0,323,327, - 1,0,0,0,324,325,5,41,0,0,325,326,5,112,0,0,326,328,3,198,99,0,327, - 324,1,0,0,0,327,328,1,0,0,0,328,25,1,0,0,0,329,331,5,10,0,0,330, - 332,3,194,97,0,331,330,1,0,0,0,331,332,1,0,0,0,332,333,1,0,0,0,333, - 337,3,112,56,0,334,335,5,39,0,0,335,336,5,112,0,0,336,338,3,198, - 99,0,337,334,1,0,0,0,337,338,1,0,0,0,338,342,1,0,0,0,339,340,5,40, - 0,0,340,341,5,112,0,0,341,343,3,198,99,0,342,339,1,0,0,0,342,343, - 1,0,0,0,343,27,1,0,0,0,344,345,5,11,0,0,345,346,3,74,37,0,346,29, - 1,0,0,0,347,348,5,12,0,0,348,353,3,76,38,0,349,350,5,110,0,0,350, - 352,3,76,38,0,351,349,1,0,0,0,352,355,1,0,0,0,353,351,1,0,0,0,353, - 354,1,0,0,0,354,31,1,0,0,0,355,353,1,0,0,0,356,358,5,13,0,0,357, - 359,3,194,97,0,358,357,1,0,0,0,358,359,1,0,0,0,359,362,1,0,0,0,360, - 361,5,5,0,0,361,363,3,194,97,0,362,360,1,0,0,0,362,363,1,0,0,0,363, - 33,1,0,0,0,364,366,5,14,0,0,365,367,3,194,97,0,366,365,1,0,0,0,366, - 367,1,0,0,0,367,368,1,0,0,0,368,370,3,112,56,0,369,371,3,66,33,0, - 370,369,1,0,0,0,370,371,1,0,0,0,371,35,1,0,0,0,372,373,5,15,0,0, - 373,375,3,112,56,0,374,376,3,66,33,0,375,374,1,0,0,0,375,376,1,0, - 0,0,376,37,1,0,0,0,377,378,5,20,0,0,378,379,3,88,44,0,379,380,3, - 192,96,0,380,39,1,0,0,0,381,382,5,16,0,0,382,383,3,88,44,0,383,384, - 3,192,96,0,384,41,1,0,0,0,385,389,5,22,0,0,386,388,3,44,22,0,387, - 386,1,0,0,0,388,391,1,0,0,0,389,387,1,0,0,0,389,390,1,0,0,0,390, - 392,1,0,0,0,391,389,1,0,0,0,392,393,3,88,44,0,393,43,1,0,0,0,394, - 395,5,23,0,0,395,396,5,112,0,0,396,401,3,192,96,0,397,398,5,21,0, - 0,398,399,5,112,0,0,399,401,3,192,96,0,400,394,1,0,0,0,400,397,1, - 0,0,0,401,45,1,0,0,0,402,403,7,1,0,0,403,47,1,0,0,0,404,408,5,24, - 0,0,405,407,3,50,25,0,406,405,1,0,0,0,407,410,1,0,0,0,408,406,1, - 0,0,0,408,409,1,0,0,0,409,49,1,0,0,0,410,408,1,0,0,0,411,412,5,45, - 0,0,412,413,5,112,0,0,413,421,3,194,97,0,414,415,5,46,0,0,415,416, - 5,112,0,0,416,421,3,194,97,0,417,418,5,47,0,0,418,419,5,112,0,0, - 419,421,3,192,96,0,420,411,1,0,0,0,420,414,1,0,0,0,420,417,1,0,0, - 0,421,51,1,0,0,0,422,426,5,25,0,0,423,425,3,54,27,0,424,423,1,0, - 0,0,425,428,1,0,0,0,426,424,1,0,0,0,426,427,1,0,0,0,427,53,1,0,0, - 0,428,426,1,0,0,0,429,430,5,48,0,0,430,431,5,112,0,0,431,466,3,194, - 97,0,432,433,5,49,0,0,433,434,5,112,0,0,434,466,3,194,97,0,435,436, - 5,50,0,0,436,437,5,112,0,0,437,466,3,194,97,0,438,439,5,51,0,0,439, - 440,5,112,0,0,440,466,3,194,97,0,441,442,5,52,0,0,442,443,5,112, - 0,0,443,466,3,196,98,0,444,445,5,53,0,0,445,446,5,112,0,0,446,466, - 3,196,98,0,447,448,5,54,0,0,448,449,5,112,0,0,449,466,3,192,96,0, - 450,451,5,55,0,0,451,452,5,112,0,0,452,466,3,192,96,0,453,454,5, - 215,0,0,454,455,5,112,0,0,455,466,3,192,96,0,456,457,5,56,0,0,457, - 458,5,112,0,0,458,466,3,192,96,0,459,460,5,57,0,0,460,461,5,112, - 0,0,461,466,3,194,97,0,462,463,5,58,0,0,463,464,5,112,0,0,464,466, - 3,196,98,0,465,429,1,0,0,0,465,432,1,0,0,0,465,435,1,0,0,0,465,438, - 1,0,0,0,465,441,1,0,0,0,465,444,1,0,0,0,465,447,1,0,0,0,465,450, - 1,0,0,0,465,453,1,0,0,0,465,456,1,0,0,0,465,459,1,0,0,0,465,462, - 1,0,0,0,466,55,1,0,0,0,467,471,5,26,0,0,468,470,3,58,29,0,469,468, - 1,0,0,0,470,473,1,0,0,0,471,469,1,0,0,0,471,472,1,0,0,0,472,57,1, - 0,0,0,473,471,1,0,0,0,474,475,3,220,110,0,475,476,5,112,0,0,476, - 477,3,188,94,0,477,59,1,0,0,0,478,479,5,29,0,0,479,480,5,112,0,0, - 480,485,3,62,31,0,481,482,5,30,0,0,482,483,5,112,0,0,483,485,3,62, - 31,0,484,478,1,0,0,0,484,481,1,0,0,0,485,61,1,0,0,0,486,487,3,108, - 54,0,487,63,1,0,0,0,488,489,3,122,61,0,489,490,5,27,0,0,490,491, - 3,122,61,0,491,65,1,0,0,0,492,493,5,28,0,0,493,494,3,112,56,0,494, - 67,1,0,0,0,495,496,5,28,0,0,496,505,3,112,56,0,497,498,5,28,0,0, - 498,505,3,70,35,0,499,500,5,28,0,0,500,501,3,70,35,0,501,502,5,110, - 0,0,502,503,3,112,56,0,503,505,1,0,0,0,504,495,1,0,0,0,504,497,1, - 0,0,0,504,499,1,0,0,0,505,69,1,0,0,0,506,509,3,72,36,0,507,508,5, - 27,0,0,508,510,3,214,107,0,509,507,1,0,0,0,509,510,1,0,0,0,510,71, - 1,0,0,0,511,512,5,320,0,0,512,513,5,125,0,0,513,514,3,120,60,0,514, - 515,5,110,0,0,515,517,3,188,94,0,516,518,3,210,105,0,517,516,1,0, - 0,0,517,518,1,0,0,0,518,519,1,0,0,0,519,520,5,126,0,0,520,73,1,0, - 0,0,521,526,3,116,58,0,522,523,5,110,0,0,523,525,3,116,58,0,524, - 522,1,0,0,0,525,528,1,0,0,0,526,524,1,0,0,0,526,527,1,0,0,0,527, - 75,1,0,0,0,528,526,1,0,0,0,529,530,3,120,60,0,530,531,5,112,0,0, - 531,532,3,88,44,0,532,77,1,0,0,0,533,536,3,80,40,0,534,535,5,27, - 0,0,535,537,3,122,61,0,536,534,1,0,0,0,536,537,1,0,0,0,537,79,1, - 0,0,0,538,539,3,82,41,0,539,540,5,125,0,0,540,541,3,94,47,0,541, - 542,5,126,0,0,542,554,1,0,0,0,543,544,5,136,0,0,544,545,5,125,0, - 0,545,554,5,126,0,0,546,547,7,2,0,0,547,548,5,125,0,0,548,549,3, - 94,47,0,549,550,5,126,0,0,550,554,1,0,0,0,551,554,3,86,43,0,552, - 554,3,84,42,0,553,538,1,0,0,0,553,543,1,0,0,0,553,546,1,0,0,0,553, - 551,1,0,0,0,553,552,1,0,0,0,554,81,1,0,0,0,555,556,7,3,0,0,556,83, - 1,0,0,0,557,558,5,155,0,0,558,559,5,125,0,0,559,562,3,120,60,0,560, - 561,5,110,0,0,561,563,3,194,97,0,562,560,1,0,0,0,562,563,1,0,0,0, - 563,564,1,0,0,0,564,565,5,126,0,0,565,85,1,0,0,0,566,567,5,154,0, - 0,567,568,5,114,0,0,568,569,3,194,97,0,569,570,5,113,0,0,570,571, - 5,125,0,0,571,572,3,120,60,0,572,573,5,126,0,0,573,87,1,0,0,0,574, - 578,3,90,45,0,575,578,3,92,46,0,576,578,3,94,47,0,577,574,1,0,0, - 0,577,575,1,0,0,0,577,576,1,0,0,0,578,89,1,0,0,0,579,580,6,45,-1, - 0,580,586,3,92,46,0,581,582,5,61,0,0,582,586,3,90,45,6,583,586,3, - 100,50,0,584,586,3,102,51,0,585,579,1,0,0,0,585,581,1,0,0,0,585, - 583,1,0,0,0,585,584,1,0,0,0,586,600,1,0,0,0,587,588,10,5,0,0,588, - 589,5,62,0,0,589,599,3,90,45,6,590,592,10,4,0,0,591,593,5,63,0,0, - 592,591,1,0,0,0,592,593,1,0,0,0,593,594,1,0,0,0,594,599,3,90,45, - 5,595,596,10,3,0,0,596,597,5,64,0,0,597,599,3,90,45,4,598,587,1, - 0,0,0,598,590,1,0,0,0,598,595,1,0,0,0,599,602,1,0,0,0,600,598,1, - 0,0,0,600,601,1,0,0,0,601,91,1,0,0,0,602,600,1,0,0,0,603,604,3,94, - 47,0,604,605,3,182,91,0,605,606,3,94,47,0,606,612,1,0,0,0,607,608, - 3,94,47,0,608,609,5,60,0,0,609,610,3,212,106,0,610,612,1,0,0,0,611, - 603,1,0,0,0,611,607,1,0,0,0,612,93,1,0,0,0,613,623,3,96,48,0,614, - 623,3,98,49,0,615,623,3,162,81,0,616,623,3,158,79,0,617,623,3,170, - 85,0,618,619,5,125,0,0,619,620,3,94,47,0,620,621,5,126,0,0,621,623, - 1,0,0,0,622,613,1,0,0,0,622,614,1,0,0,0,622,615,1,0,0,0,622,616, - 1,0,0,0,622,617,1,0,0,0,622,618,1,0,0,0,623,95,1,0,0,0,624,629,3, - 124,62,0,625,629,3,126,63,0,626,629,3,120,60,0,627,629,3,188,94, - 0,628,624,1,0,0,0,628,625,1,0,0,0,628,626,1,0,0,0,628,627,1,0,0, - 0,629,97,1,0,0,0,630,631,3,180,90,0,631,632,5,125,0,0,632,633,3, - 136,68,0,633,634,5,60,0,0,634,635,3,136,68,0,635,636,5,126,0,0,636, - 99,1,0,0,0,637,638,3,128,64,0,638,101,1,0,0,0,639,642,3,104,52,0, - 640,642,3,106,53,0,641,639,1,0,0,0,641,640,1,0,0,0,642,103,1,0,0, - 0,643,644,3,184,92,0,644,645,5,125,0,0,645,646,3,146,73,0,646,647, - 5,110,0,0,647,652,3,148,74,0,648,649,5,110,0,0,649,651,3,138,69, - 0,650,648,1,0,0,0,651,654,1,0,0,0,652,650,1,0,0,0,652,653,1,0,0, - 0,653,655,1,0,0,0,654,652,1,0,0,0,655,656,5,126,0,0,656,105,1,0, - 0,0,657,658,3,186,93,0,658,659,5,125,0,0,659,660,5,127,0,0,660,665, - 3,142,71,0,661,662,5,110,0,0,662,664,3,142,71,0,663,661,1,0,0,0, - 664,667,1,0,0,0,665,663,1,0,0,0,665,666,1,0,0,0,666,668,1,0,0,0, - 667,665,1,0,0,0,668,669,5,128,0,0,669,670,5,110,0,0,670,675,3,148, - 74,0,671,672,5,110,0,0,672,674,3,138,69,0,673,671,1,0,0,0,674,677, - 1,0,0,0,675,673,1,0,0,0,675,676,1,0,0,0,676,678,1,0,0,0,677,675, - 1,0,0,0,678,679,5,126,0,0,679,107,1,0,0,0,680,683,3,216,108,0,681, - 683,5,332,0,0,682,680,1,0,0,0,682,681,1,0,0,0,683,109,1,0,0,0,684, - 685,3,214,107,0,685,686,5,125,0,0,686,687,3,134,67,0,687,688,5,126, - 0,0,688,111,1,0,0,0,689,694,3,120,60,0,690,691,5,110,0,0,691,693, - 3,120,60,0,692,690,1,0,0,0,693,696,1,0,0,0,694,692,1,0,0,0,694,695, - 1,0,0,0,695,113,1,0,0,0,696,694,1,0,0,0,697,702,3,122,61,0,698,699, - 5,110,0,0,699,701,3,122,61,0,700,698,1,0,0,0,701,704,1,0,0,0,702, - 700,1,0,0,0,702,703,1,0,0,0,703,115,1,0,0,0,704,702,1,0,0,0,705, - 707,7,0,0,0,706,705,1,0,0,0,706,707,1,0,0,0,707,708,1,0,0,0,708, - 709,3,118,59,0,709,117,1,0,0,0,710,732,3,120,60,0,711,712,5,35,0, - 0,712,713,5,125,0,0,713,714,3,120,60,0,714,715,5,126,0,0,715,732, - 1,0,0,0,716,717,5,36,0,0,717,718,5,125,0,0,718,719,3,120,60,0,719, - 720,5,126,0,0,720,732,1,0,0,0,721,722,5,37,0,0,722,723,5,125,0,0, - 723,724,3,120,60,0,724,725,5,126,0,0,725,732,1,0,0,0,726,727,5,38, - 0,0,727,728,5,125,0,0,728,729,3,120,60,0,729,730,5,126,0,0,730,732, - 1,0,0,0,731,710,1,0,0,0,731,711,1,0,0,0,731,716,1,0,0,0,731,721, - 1,0,0,0,731,726,1,0,0,0,732,119,1,0,0,0,733,734,3,214,107,0,734, - 121,1,0,0,0,735,736,3,218,109,0,736,123,1,0,0,0,737,738,3,132,66, - 0,738,739,5,125,0,0,739,740,3,134,67,0,740,741,5,126,0,0,741,125, - 1,0,0,0,742,743,5,274,0,0,743,744,5,125,0,0,744,745,3,88,44,0,745, - 746,5,27,0,0,746,747,3,130,65,0,747,748,5,126,0,0,748,127,1,0,0, - 0,749,750,3,174,87,0,750,751,5,125,0,0,751,752,3,134,67,0,752,753, - 5,126,0,0,753,129,1,0,0,0,754,765,5,212,0,0,755,765,5,241,0,0,756, - 765,5,243,0,0,757,765,5,102,0,0,758,765,5,103,0,0,759,765,5,104, - 0,0,760,765,5,105,0,0,761,765,5,106,0,0,762,765,5,107,0,0,763,765, - 5,108,0,0,764,754,1,0,0,0,764,755,1,0,0,0,764,756,1,0,0,0,764,757, - 1,0,0,0,764,758,1,0,0,0,764,759,1,0,0,0,764,760,1,0,0,0,764,761, - 1,0,0,0,764,762,1,0,0,0,764,763,1,0,0,0,765,131,1,0,0,0,766,773, - 3,152,76,0,767,773,3,156,78,0,768,773,3,178,89,0,769,773,3,174,87, - 0,770,773,3,176,88,0,771,773,3,180,90,0,772,766,1,0,0,0,772,767, - 1,0,0,0,772,768,1,0,0,0,772,769,1,0,0,0,772,770,1,0,0,0,772,771, - 1,0,0,0,773,133,1,0,0,0,774,779,3,136,68,0,775,776,5,110,0,0,776, - 778,3,136,68,0,777,775,1,0,0,0,778,781,1,0,0,0,779,777,1,0,0,0,779, - 780,1,0,0,0,780,783,1,0,0,0,781,779,1,0,0,0,782,774,1,0,0,0,782, - 783,1,0,0,0,783,135,1,0,0,0,784,785,3,220,110,0,785,786,5,112,0, - 0,786,788,1,0,0,0,787,784,1,0,0,0,787,788,1,0,0,0,788,789,1,0,0, - 0,789,790,3,94,47,0,790,137,1,0,0,0,791,792,3,140,70,0,792,793,5, - 112,0,0,793,794,3,150,75,0,794,139,1,0,0,0,795,796,7,4,0,0,796,141, - 1,0,0,0,797,806,3,146,73,0,798,799,3,146,73,0,799,800,3,144,72,0, - 800,806,1,0,0,0,801,802,3,146,73,0,802,803,5,134,0,0,803,804,3,144, - 72,0,804,806,1,0,0,0,805,797,1,0,0,0,805,798,1,0,0,0,805,801,1,0, - 0,0,806,143,1,0,0,0,807,810,3,194,97,0,808,810,3,196,98,0,809,807, - 1,0,0,0,809,808,1,0,0,0,810,145,1,0,0,0,811,814,3,214,107,0,812, - 814,3,192,96,0,813,811,1,0,0,0,813,812,1,0,0,0,814,147,1,0,0,0,815, - 816,3,150,75,0,816,149,1,0,0,0,817,820,3,214,107,0,818,820,3,188, - 94,0,819,817,1,0,0,0,819,818,1,0,0,0,820,151,1,0,0,0,821,845,5,172, - 0,0,822,845,5,173,0,0,823,845,5,174,0,0,824,845,5,175,0,0,825,845, - 5,176,0,0,826,845,5,177,0,0,827,845,5,178,0,0,828,845,5,179,0,0, - 829,845,5,180,0,0,830,845,5,181,0,0,831,845,5,182,0,0,832,845,5, - 183,0,0,833,845,5,184,0,0,834,845,5,185,0,0,835,845,5,186,0,0,836, - 845,5,188,0,0,837,845,5,189,0,0,838,845,5,190,0,0,839,845,5,191, - 0,0,840,845,5,192,0,0,841,845,5,193,0,0,842,845,5,194,0,0,843,845, - 3,154,77,0,844,821,1,0,0,0,844,822,1,0,0,0,844,823,1,0,0,0,844,824, - 1,0,0,0,844,825,1,0,0,0,844,826,1,0,0,0,844,827,1,0,0,0,844,828, - 1,0,0,0,844,829,1,0,0,0,844,830,1,0,0,0,844,831,1,0,0,0,844,832, - 1,0,0,0,844,833,1,0,0,0,844,834,1,0,0,0,844,835,1,0,0,0,844,836, - 1,0,0,0,844,837,1,0,0,0,844,838,1,0,0,0,844,839,1,0,0,0,844,840, - 1,0,0,0,844,841,1,0,0,0,844,842,1,0,0,0,844,843,1,0,0,0,845,153, - 1,0,0,0,846,847,7,5,0,0,847,155,1,0,0,0,848,849,7,6,0,0,849,157, - 1,0,0,0,850,851,5,226,0,0,851,852,5,125,0,0,852,853,3,160,80,0,853, - 854,5,110,0,0,854,855,3,136,68,0,855,856,5,126,0,0,856,159,1,0,0, - 0,857,858,7,7,0,0,858,161,1,0,0,0,859,860,5,223,0,0,860,861,5,125, - 0,0,861,862,3,168,84,0,862,863,5,5,0,0,863,864,3,136,68,0,864,865, - 5,126,0,0,865,163,1,0,0,0,866,867,7,8,0,0,867,165,1,0,0,0,868,869, - 7,9,0,0,869,167,1,0,0,0,870,873,3,164,82,0,871,873,3,166,83,0,872, - 870,1,0,0,0,872,871,1,0,0,0,873,169,1,0,0,0,874,875,3,172,86,0,875, - 876,5,125,0,0,876,877,3,164,82,0,877,878,5,110,0,0,878,879,3,136, - 68,0,879,880,5,110,0,0,880,881,3,136,68,0,881,882,5,126,0,0,882, - 171,1,0,0,0,883,884,7,10,0,0,884,173,1,0,0,0,885,886,7,11,0,0,886, - 175,1,0,0,0,887,888,5,281,0,0,888,177,1,0,0,0,889,890,7,12,0,0,890, - 179,1,0,0,0,891,892,5,187,0,0,892,181,1,0,0,0,893,894,7,13,0,0,894, - 183,1,0,0,0,895,896,7,14,0,0,896,185,1,0,0,0,897,898,7,15,0,0,898, - 187,1,0,0,0,899,906,3,190,95,0,900,906,3,192,96,0,901,906,3,194, - 97,0,902,906,3,196,98,0,903,906,3,198,99,0,904,906,3,200,100,0,905, - 899,1,0,0,0,905,900,1,0,0,0,905,901,1,0,0,0,905,902,1,0,0,0,905, - 903,1,0,0,0,905,904,1,0,0,0,906,189,1,0,0,0,907,908,5,81,0,0,908, - 909,3,94,47,0,909,910,3,208,104,0,910,191,1,0,0,0,911,912,7,16,0, - 0,912,193,1,0,0,0,913,915,7,0,0,0,914,913,1,0,0,0,914,915,1,0,0, - 0,915,916,1,0,0,0,916,917,5,330,0,0,917,195,1,0,0,0,918,920,7,0, - 0,0,919,918,1,0,0,0,919,920,1,0,0,0,920,921,1,0,0,0,921,922,5,331, - 0,0,922,197,1,0,0,0,923,924,7,17,0,0,924,199,1,0,0,0,925,929,3,202, - 101,0,926,929,3,204,102,0,927,929,3,206,103,0,928,925,1,0,0,0,928, - 926,1,0,0,0,928,927,1,0,0,0,929,201,1,0,0,0,930,931,5,212,0,0,931, - 932,3,192,96,0,932,203,1,0,0,0,933,934,5,241,0,0,934,935,3,192,96, - 0,935,205,1,0,0,0,936,937,5,243,0,0,937,938,3,192,96,0,938,207,1, - 0,0,0,939,940,7,18,0,0,940,209,1,0,0,0,941,942,7,19,0,0,942,211, - 1,0,0,0,943,944,5,125,0,0,944,949,3,188,94,0,945,946,5,110,0,0,946, - 948,3,188,94,0,947,945,1,0,0,0,948,951,1,0,0,0,949,947,1,0,0,0,949, - 950,1,0,0,0,950,952,1,0,0,0,951,949,1,0,0,0,952,953,5,126,0,0,953, - 213,1,0,0,0,954,955,5,328,0,0,955,215,1,0,0,0,956,961,3,222,111, - 0,957,958,5,111,0,0,958,960,3,220,110,0,959,957,1,0,0,0,960,963, - 1,0,0,0,961,959,1,0,0,0,961,962,1,0,0,0,962,217,1,0,0,0,963,961, - 1,0,0,0,964,969,3,224,112,0,965,966,5,111,0,0,966,968,3,224,112, - 0,967,965,1,0,0,0,968,971,1,0,0,0,969,967,1,0,0,0,969,970,1,0,0, - 0,970,219,1,0,0,0,971,969,1,0,0,0,972,974,5,111,0,0,973,972,1,0, - 0,0,973,974,1,0,0,0,974,975,1,0,0,0,975,983,5,328,0,0,976,977,5, - 131,0,0,977,978,3,220,110,0,978,979,5,131,0,0,979,983,1,0,0,0,980, - 983,5,335,0,0,981,983,3,226,113,0,982,973,1,0,0,0,982,976,1,0,0, - 0,982,980,1,0,0,0,982,981,1,0,0,0,983,221,1,0,0,0,984,986,5,329, - 0,0,985,984,1,0,0,0,985,986,1,0,0,0,986,987,1,0,0,0,987,988,3,220, - 110,0,988,223,1,0,0,0,989,994,3,220,110,0,990,991,5,122,0,0,991, - 993,3,220,110,0,992,990,1,0,0,0,993,996,1,0,0,0,994,992,1,0,0,0, - 994,995,1,0,0,0,995,998,1,0,0,0,996,994,1,0,0,0,997,999,5,122,0, - 0,998,997,1,0,0,0,998,999,1,0,0,0,999,1013,1,0,0,0,1000,1001,5,129, - 0,0,1001,1002,3,224,112,0,1002,1003,5,129,0,0,1003,1013,1,0,0,0, - 1004,1005,5,130,0,0,1005,1006,3,224,112,0,1006,1007,5,130,0,0,1007, - 1013,1,0,0,0,1008,1009,5,131,0,0,1009,1010,3,224,112,0,1010,1011, - 5,131,0,0,1011,1013,1,0,0,0,1012,989,1,0,0,0,1012,1000,1,0,0,0,1012, - 1004,1,0,0,0,1012,1008,1,0,0,0,1013,225,1,0,0,0,1014,1115,5,31,0, - 0,1015,1115,3,210,105,0,1016,1115,5,320,0,0,1017,1115,3,132,66,0, - 1018,1115,3,140,70,0,1019,1115,3,208,104,0,1020,1115,3,156,78,0, - 1021,1115,3,178,89,0,1022,1115,3,152,76,0,1023,1115,3,180,90,0,1024, - 1115,5,2,0,0,1025,1115,5,3,0,0,1026,1115,5,4,0,0,1027,1115,5,5,0, - 0,1028,1115,5,6,0,0,1029,1115,5,7,0,0,1030,1115,5,8,0,0,1031,1115, - 5,9,0,0,1032,1115,5,10,0,0,1033,1115,5,11,0,0,1034,1115,5,12,0,0, - 1035,1115,5,13,0,0,1036,1115,5,14,0,0,1037,1115,5,15,0,0,1038,1115, - 5,16,0,0,1039,1115,5,17,0,0,1040,1115,5,18,0,0,1041,1115,5,19,0, - 0,1042,1115,5,20,0,0,1043,1115,5,21,0,0,1044,1115,5,22,0,0,1045, - 1115,5,23,0,0,1046,1115,5,24,0,0,1047,1115,5,25,0,0,1048,1115,5, - 26,0,0,1049,1115,5,29,0,0,1050,1115,5,30,0,0,1051,1115,5,32,0,0, - 1052,1115,5,33,0,0,1053,1115,5,34,0,0,1054,1115,5,36,0,0,1055,1115, - 5,37,0,0,1056,1115,5,38,0,0,1057,1115,5,39,0,0,1058,1115,5,40,0, - 0,1059,1115,5,41,0,0,1060,1115,5,42,0,0,1061,1115,5,43,0,0,1062, - 1115,5,44,0,0,1063,1115,5,45,0,0,1064,1115,5,46,0,0,1065,1115,5, - 47,0,0,1066,1115,5,48,0,0,1067,1115,5,49,0,0,1068,1115,5,50,0,0, - 1069,1115,5,51,0,0,1070,1115,5,52,0,0,1071,1115,5,53,0,0,1072,1115, - 5,54,0,0,1073,1115,5,55,0,0,1074,1115,5,56,0,0,1075,1115,5,57,0, - 0,1076,1115,5,58,0,0,1077,1115,5,135,0,0,1078,1115,5,136,0,0,1079, - 1115,5,137,0,0,1080,1115,5,138,0,0,1081,1115,5,139,0,0,1082,1115, - 5,140,0,0,1083,1115,5,141,0,0,1084,1115,5,142,0,0,1085,1115,5,143, - 0,0,1086,1115,5,144,0,0,1087,1115,5,145,0,0,1088,1115,5,146,0,0, - 1089,1115,5,147,0,0,1090,1115,5,148,0,0,1091,1115,5,149,0,0,1092, - 1115,5,150,0,0,1093,1115,5,151,0,0,1094,1115,5,152,0,0,1095,1115, - 5,153,0,0,1096,1115,5,154,0,0,1097,1115,5,155,0,0,1098,1115,5,156, - 0,0,1099,1115,5,157,0,0,1100,1115,5,158,0,0,1101,1115,5,159,0,0, - 1102,1115,5,160,0,0,1103,1115,5,161,0,0,1104,1115,5,162,0,0,1105, - 1115,5,163,0,0,1106,1115,5,164,0,0,1107,1115,5,165,0,0,1108,1115, - 5,166,0,0,1109,1115,5,167,0,0,1110,1115,5,168,0,0,1111,1115,5,169, - 0,0,1112,1115,5,170,0,0,1113,1115,5,171,0,0,1114,1014,1,0,0,0,1114, - 1015,1,0,0,0,1114,1016,1,0,0,0,1114,1017,1,0,0,0,1114,1018,1,0,0, - 0,1114,1019,1,0,0,0,1114,1020,1,0,0,0,1114,1021,1,0,0,0,1114,1022, - 1,0,0,0,1114,1023,1,0,0,0,1114,1024,1,0,0,0,1114,1025,1,0,0,0,1114, - 1026,1,0,0,0,1114,1027,1,0,0,0,1114,1028,1,0,0,0,1114,1029,1,0,0, - 0,1114,1030,1,0,0,0,1114,1031,1,0,0,0,1114,1032,1,0,0,0,1114,1033, - 1,0,0,0,1114,1034,1,0,0,0,1114,1035,1,0,0,0,1114,1036,1,0,0,0,1114, - 1037,1,0,0,0,1114,1038,1,0,0,0,1114,1039,1,0,0,0,1114,1040,1,0,0, - 0,1114,1041,1,0,0,0,1114,1042,1,0,0,0,1114,1043,1,0,0,0,1114,1044, - 1,0,0,0,1114,1045,1,0,0,0,1114,1046,1,0,0,0,1114,1047,1,0,0,0,1114, - 1048,1,0,0,0,1114,1049,1,0,0,0,1114,1050,1,0,0,0,1114,1051,1,0,0, - 0,1114,1052,1,0,0,0,1114,1053,1,0,0,0,1114,1054,1,0,0,0,1114,1055, - 1,0,0,0,1114,1056,1,0,0,0,1114,1057,1,0,0,0,1114,1058,1,0,0,0,1114, - 1059,1,0,0,0,1114,1060,1,0,0,0,1114,1061,1,0,0,0,1114,1062,1,0,0, - 0,1114,1063,1,0,0,0,1114,1064,1,0,0,0,1114,1065,1,0,0,0,1114,1066, - 1,0,0,0,1114,1067,1,0,0,0,1114,1068,1,0,0,0,1114,1069,1,0,0,0,1114, - 1070,1,0,0,0,1114,1071,1,0,0,0,1114,1072,1,0,0,0,1114,1073,1,0,0, - 0,1114,1074,1,0,0,0,1114,1075,1,0,0,0,1114,1076,1,0,0,0,1114,1077, - 1,0,0,0,1114,1078,1,0,0,0,1114,1079,1,0,0,0,1114,1080,1,0,0,0,1114, - 1081,1,0,0,0,1114,1082,1,0,0,0,1114,1083,1,0,0,0,1114,1084,1,0,0, - 0,1114,1085,1,0,0,0,1114,1086,1,0,0,0,1114,1087,1,0,0,0,1114,1088, - 1,0,0,0,1114,1089,1,0,0,0,1114,1090,1,0,0,0,1114,1091,1,0,0,0,1114, - 1092,1,0,0,0,1114,1093,1,0,0,0,1114,1094,1,0,0,0,1114,1095,1,0,0, - 0,1114,1096,1,0,0,0,1114,1097,1,0,0,0,1114,1098,1,0,0,0,1114,1099, - 1,0,0,0,1114,1100,1,0,0,0,1114,1101,1,0,0,0,1114,1102,1,0,0,0,1114, - 1103,1,0,0,0,1114,1104,1,0,0,0,1114,1105,1,0,0,0,1114,1106,1,0,0, - 0,1114,1107,1,0,0,0,1114,1108,1,0,0,0,1114,1109,1,0,0,0,1114,1110, - 1,0,0,0,1114,1111,1,0,0,0,1114,1112,1,0,0,0,1114,1113,1,0,0,0,1115, - 227,1,0,0,0,79,229,242,248,266,269,284,294,301,306,311,318,322,327, - 331,337,342,353,358,362,366,370,375,389,400,408,420,426,465,471, - 484,504,509,517,526,536,553,562,577,585,592,598,600,611,622,628, - 641,652,665,675,682,694,702,706,731,764,772,779,782,787,805,809, - 813,819,844,872,905,914,919,928,949,961,969,973,982,985,994,998, - 1012,1114 + 1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,1,113,3,113,1127, + 8,113,1,113,0,2,90,94,114,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28, + 30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72, + 74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112, + 114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144, + 146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176, + 178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208, + 210,212,214,216,218,220,222,224,226,0,21,1,0,118,119,1,0,18,19,2, + 0,137,137,171,171,5,0,135,136,140,140,143,143,148,148,150,153,1, + 0,120,122,3,0,7,7,56,56,289,319,1,0,195,204,13,0,68,70,74,74,76, + 76,79,79,82,82,84,84,86,87,89,92,94,97,205,222,224,225,227,243,246, + 255,4,0,69,69,212,212,241,241,243,243,8,0,70,70,76,76,82,82,84,84, + 89,89,91,92,95,95,97,97,8,0,71,73,75,75,77,78,80,80,85,85,88,88, + 93,93,98,98,1,0,244,245,1,0,275,280,2,0,256,260,262,273,2,0,67,67, + 112,117,1,0,282,285,1,0,286,288,1,0,333,334,1,0,65,66,9,0,70,73, + 75,78,80,80,82,82,84,85,88,89,91,93,95,95,97,98,9,0,31,31,70,70, + 76,76,83,84,89,89,91,92,95,95,97,97,321,327,1279,0,229,1,0,0,0,2, + 233,1,0,0,0,4,235,1,0,0,0,6,237,1,0,0,0,8,248,1,0,0,0,10,266,1,0, + 0,0,12,269,1,0,0,0,14,273,1,0,0,0,16,276,1,0,0,0,18,279,1,0,0,0, + 20,282,1,0,0,0,22,288,1,0,0,0,24,297,1,0,0,0,26,329,1,0,0,0,28,344, + 1,0,0,0,30,347,1,0,0,0,32,356,1,0,0,0,34,364,1,0,0,0,36,372,1,0, + 0,0,38,377,1,0,0,0,40,381,1,0,0,0,42,385,1,0,0,0,44,400,1,0,0,0, + 46,402,1,0,0,0,48,404,1,0,0,0,50,420,1,0,0,0,52,422,1,0,0,0,54,465, + 1,0,0,0,56,467,1,0,0,0,58,474,1,0,0,0,60,484,1,0,0,0,62,486,1,0, + 0,0,64,488,1,0,0,0,66,492,1,0,0,0,68,504,1,0,0,0,70,506,1,0,0,0, + 72,511,1,0,0,0,74,521,1,0,0,0,76,529,1,0,0,0,78,533,1,0,0,0,80,553, + 1,0,0,0,82,555,1,0,0,0,84,557,1,0,0,0,86,566,1,0,0,0,88,577,1,0, + 0,0,90,585,1,0,0,0,92,611,1,0,0,0,94,623,1,0,0,0,96,640,1,0,0,0, + 98,642,1,0,0,0,100,649,1,0,0,0,102,653,1,0,0,0,104,655,1,0,0,0,106, + 669,1,0,0,0,108,694,1,0,0,0,110,696,1,0,0,0,112,701,1,0,0,0,114, + 709,1,0,0,0,116,718,1,0,0,0,118,743,1,0,0,0,120,745,1,0,0,0,122, + 747,1,0,0,0,124,749,1,0,0,0,126,754,1,0,0,0,128,761,1,0,0,0,130, + 776,1,0,0,0,132,784,1,0,0,0,134,794,1,0,0,0,136,799,1,0,0,0,138, + 803,1,0,0,0,140,807,1,0,0,0,142,817,1,0,0,0,144,821,1,0,0,0,146, + 825,1,0,0,0,148,827,1,0,0,0,150,831,1,0,0,0,152,856,1,0,0,0,154, + 858,1,0,0,0,156,860,1,0,0,0,158,862,1,0,0,0,160,869,1,0,0,0,162, + 871,1,0,0,0,164,878,1,0,0,0,166,880,1,0,0,0,168,884,1,0,0,0,170, + 886,1,0,0,0,172,895,1,0,0,0,174,897,1,0,0,0,176,899,1,0,0,0,178, + 901,1,0,0,0,180,903,1,0,0,0,182,905,1,0,0,0,184,907,1,0,0,0,186, + 909,1,0,0,0,188,917,1,0,0,0,190,919,1,0,0,0,192,923,1,0,0,0,194, + 926,1,0,0,0,196,931,1,0,0,0,198,935,1,0,0,0,200,940,1,0,0,0,202, + 942,1,0,0,0,204,945,1,0,0,0,206,948,1,0,0,0,208,951,1,0,0,0,210, + 953,1,0,0,0,212,955,1,0,0,0,214,966,1,0,0,0,216,968,1,0,0,0,218, + 976,1,0,0,0,220,994,1,0,0,0,222,997,1,0,0,0,224,1024,1,0,0,0,226, + 1126,1,0,0,0,228,230,3,2,1,0,229,228,1,0,0,0,229,230,1,0,0,0,230, + 231,1,0,0,0,231,232,5,0,0,1,232,1,1,0,0,0,233,234,3,4,2,0,234,3, + 1,0,0,0,235,236,3,6,3,0,236,5,1,0,0,0,237,242,3,8,4,0,238,239,5, + 109,0,0,239,241,3,10,5,0,240,238,1,0,0,0,241,244,1,0,0,0,242,240, + 1,0,0,0,242,243,1,0,0,0,243,7,1,0,0,0,244,242,1,0,0,0,245,249,3, + 12,6,0,246,249,3,14,7,0,247,249,3,16,8,0,248,245,1,0,0,0,248,246, + 1,0,0,0,248,247,1,0,0,0,249,9,1,0,0,0,250,267,3,18,9,0,251,267,3, + 20,10,0,252,267,3,22,11,0,253,267,3,24,12,0,254,267,3,26,13,0,255, + 267,3,28,14,0,256,267,3,30,15,0,257,267,3,32,16,0,258,267,3,34,17, + 0,259,267,3,36,18,0,260,267,3,38,19,0,261,267,3,40,20,0,262,267, + 3,42,21,0,263,267,3,48,24,0,264,267,3,52,26,0,265,267,3,56,28,0, + 266,250,1,0,0,0,266,251,1,0,0,0,266,252,1,0,0,0,266,253,1,0,0,0, + 266,254,1,0,0,0,266,255,1,0,0,0,266,256,1,0,0,0,266,257,1,0,0,0, + 266,258,1,0,0,0,266,259,1,0,0,0,266,260,1,0,0,0,266,261,1,0,0,0, + 266,262,1,0,0,0,266,263,1,0,0,0,266,264,1,0,0,0,266,265,1,0,0,0, + 267,11,1,0,0,0,268,270,5,2,0,0,269,268,1,0,0,0,269,270,1,0,0,0,270, + 271,1,0,0,0,271,272,3,60,30,0,272,13,1,0,0,0,273,274,5,3,0,0,274, + 275,3,62,31,0,275,15,1,0,0,0,276,277,5,4,0,0,277,278,5,33,0,0,278, + 17,1,0,0,0,279,280,5,6,0,0,280,281,3,90,45,0,281,19,1,0,0,0,282, + 284,5,7,0,0,283,285,7,0,0,0,284,283,1,0,0,0,284,285,1,0,0,0,285, + 286,1,0,0,0,286,287,3,112,56,0,287,21,1,0,0,0,288,289,5,8,0,0,289, + 294,3,64,32,0,290,291,5,110,0,0,291,293,3,64,32,0,292,290,1,0,0, + 0,293,296,1,0,0,0,294,292,1,0,0,0,294,295,1,0,0,0,295,23,1,0,0,0, + 296,294,1,0,0,0,297,301,5,9,0,0,298,299,5,42,0,0,299,300,5,112,0, + 0,300,302,3,194,97,0,301,298,1,0,0,0,301,302,1,0,0,0,302,306,1,0, + 0,0,303,304,5,43,0,0,304,305,5,112,0,0,305,307,3,198,99,0,306,303, + 1,0,0,0,306,307,1,0,0,0,307,311,1,0,0,0,308,309,5,44,0,0,309,310, + 5,112,0,0,310,312,3,192,96,0,311,308,1,0,0,0,311,312,1,0,0,0,312, + 313,1,0,0,0,313,318,3,78,39,0,314,315,5,110,0,0,315,317,3,78,39, + 0,316,314,1,0,0,0,317,320,1,0,0,0,318,316,1,0,0,0,318,319,1,0,0, + 0,319,322,1,0,0,0,320,318,1,0,0,0,321,323,3,68,34,0,322,321,1,0, + 0,0,322,323,1,0,0,0,323,327,1,0,0,0,324,325,5,41,0,0,325,326,5,112, + 0,0,326,328,3,198,99,0,327,324,1,0,0,0,327,328,1,0,0,0,328,25,1, + 0,0,0,329,331,5,10,0,0,330,332,3,194,97,0,331,330,1,0,0,0,331,332, + 1,0,0,0,332,333,1,0,0,0,333,337,3,112,56,0,334,335,5,39,0,0,335, + 336,5,112,0,0,336,338,3,198,99,0,337,334,1,0,0,0,337,338,1,0,0,0, + 338,342,1,0,0,0,339,340,5,40,0,0,340,341,5,112,0,0,341,343,3,198, + 99,0,342,339,1,0,0,0,342,343,1,0,0,0,343,27,1,0,0,0,344,345,5,11, + 0,0,345,346,3,74,37,0,346,29,1,0,0,0,347,348,5,12,0,0,348,353,3, + 76,38,0,349,350,5,110,0,0,350,352,3,76,38,0,351,349,1,0,0,0,352, + 355,1,0,0,0,353,351,1,0,0,0,353,354,1,0,0,0,354,31,1,0,0,0,355,353, + 1,0,0,0,356,358,5,13,0,0,357,359,3,194,97,0,358,357,1,0,0,0,358, + 359,1,0,0,0,359,362,1,0,0,0,360,361,5,5,0,0,361,363,3,194,97,0,362, + 360,1,0,0,0,362,363,1,0,0,0,363,33,1,0,0,0,364,366,5,14,0,0,365, + 367,3,194,97,0,366,365,1,0,0,0,366,367,1,0,0,0,367,368,1,0,0,0,368, + 370,3,112,56,0,369,371,3,66,33,0,370,369,1,0,0,0,370,371,1,0,0,0, + 371,35,1,0,0,0,372,373,5,15,0,0,373,375,3,112,56,0,374,376,3,66, + 33,0,375,374,1,0,0,0,375,376,1,0,0,0,376,37,1,0,0,0,377,378,5,20, + 0,0,378,379,3,88,44,0,379,380,3,192,96,0,380,39,1,0,0,0,381,382, + 5,16,0,0,382,383,3,88,44,0,383,384,3,192,96,0,384,41,1,0,0,0,385, + 389,5,22,0,0,386,388,3,44,22,0,387,386,1,0,0,0,388,391,1,0,0,0,389, + 387,1,0,0,0,389,390,1,0,0,0,390,392,1,0,0,0,391,389,1,0,0,0,392, + 393,3,88,44,0,393,43,1,0,0,0,394,395,5,23,0,0,395,396,5,112,0,0, + 396,401,3,192,96,0,397,398,5,21,0,0,398,399,5,112,0,0,399,401,3, + 192,96,0,400,394,1,0,0,0,400,397,1,0,0,0,401,45,1,0,0,0,402,403, + 7,1,0,0,403,47,1,0,0,0,404,408,5,24,0,0,405,407,3,50,25,0,406,405, + 1,0,0,0,407,410,1,0,0,0,408,406,1,0,0,0,408,409,1,0,0,0,409,49,1, + 0,0,0,410,408,1,0,0,0,411,412,5,45,0,0,412,413,5,112,0,0,413,421, + 3,194,97,0,414,415,5,46,0,0,415,416,5,112,0,0,416,421,3,194,97,0, + 417,418,5,47,0,0,418,419,5,112,0,0,419,421,3,192,96,0,420,411,1, + 0,0,0,420,414,1,0,0,0,420,417,1,0,0,0,421,51,1,0,0,0,422,426,5,25, + 0,0,423,425,3,54,27,0,424,423,1,0,0,0,425,428,1,0,0,0,426,424,1, + 0,0,0,426,427,1,0,0,0,427,53,1,0,0,0,428,426,1,0,0,0,429,430,5,48, + 0,0,430,431,5,112,0,0,431,466,3,194,97,0,432,433,5,49,0,0,433,434, + 5,112,0,0,434,466,3,194,97,0,435,436,5,50,0,0,436,437,5,112,0,0, + 437,466,3,194,97,0,438,439,5,51,0,0,439,440,5,112,0,0,440,466,3, + 194,97,0,441,442,5,52,0,0,442,443,5,112,0,0,443,466,3,196,98,0,444, + 445,5,53,0,0,445,446,5,112,0,0,446,466,3,196,98,0,447,448,5,54,0, + 0,448,449,5,112,0,0,449,466,3,192,96,0,450,451,5,55,0,0,451,452, + 5,112,0,0,452,466,3,192,96,0,453,454,5,215,0,0,454,455,5,112,0,0, + 455,466,3,192,96,0,456,457,5,56,0,0,457,458,5,112,0,0,458,466,3, + 192,96,0,459,460,5,57,0,0,460,461,5,112,0,0,461,466,3,194,97,0,462, + 463,5,58,0,0,463,464,5,112,0,0,464,466,3,196,98,0,465,429,1,0,0, + 0,465,432,1,0,0,0,465,435,1,0,0,0,465,438,1,0,0,0,465,441,1,0,0, + 0,465,444,1,0,0,0,465,447,1,0,0,0,465,450,1,0,0,0,465,453,1,0,0, + 0,465,456,1,0,0,0,465,459,1,0,0,0,465,462,1,0,0,0,466,55,1,0,0,0, + 467,471,5,26,0,0,468,470,3,58,29,0,469,468,1,0,0,0,470,473,1,0,0, + 0,471,469,1,0,0,0,471,472,1,0,0,0,472,57,1,0,0,0,473,471,1,0,0,0, + 474,475,3,220,110,0,475,476,5,112,0,0,476,477,3,188,94,0,477,59, + 1,0,0,0,478,479,5,29,0,0,479,480,5,112,0,0,480,485,3,62,31,0,481, + 482,5,30,0,0,482,483,5,112,0,0,483,485,3,62,31,0,484,478,1,0,0,0, + 484,481,1,0,0,0,485,61,1,0,0,0,486,487,3,108,54,0,487,63,1,0,0,0, + 488,489,3,122,61,0,489,490,5,27,0,0,490,491,3,122,61,0,491,65,1, + 0,0,0,492,493,5,28,0,0,493,494,3,112,56,0,494,67,1,0,0,0,495,496, + 5,28,0,0,496,505,3,112,56,0,497,498,5,28,0,0,498,505,3,70,35,0,499, + 500,5,28,0,0,500,501,3,70,35,0,501,502,5,110,0,0,502,503,3,112,56, + 0,503,505,1,0,0,0,504,495,1,0,0,0,504,497,1,0,0,0,504,499,1,0,0, + 0,505,69,1,0,0,0,506,509,3,72,36,0,507,508,5,27,0,0,508,510,3,214, + 107,0,509,507,1,0,0,0,509,510,1,0,0,0,510,71,1,0,0,0,511,512,5,320, + 0,0,512,513,5,125,0,0,513,514,3,120,60,0,514,515,5,110,0,0,515,517, + 3,188,94,0,516,518,3,210,105,0,517,516,1,0,0,0,517,518,1,0,0,0,518, + 519,1,0,0,0,519,520,5,126,0,0,520,73,1,0,0,0,521,526,3,116,58,0, + 522,523,5,110,0,0,523,525,3,116,58,0,524,522,1,0,0,0,525,528,1,0, + 0,0,526,524,1,0,0,0,526,527,1,0,0,0,527,75,1,0,0,0,528,526,1,0,0, + 0,529,530,3,120,60,0,530,531,5,112,0,0,531,532,3,88,44,0,532,77, + 1,0,0,0,533,536,3,80,40,0,534,535,5,27,0,0,535,537,3,122,61,0,536, + 534,1,0,0,0,536,537,1,0,0,0,537,79,1,0,0,0,538,539,3,82,41,0,539, + 540,5,125,0,0,540,541,3,94,47,0,541,542,5,126,0,0,542,554,1,0,0, + 0,543,544,5,136,0,0,544,545,5,125,0,0,545,554,5,126,0,0,546,547, + 7,2,0,0,547,548,5,125,0,0,548,549,3,94,47,0,549,550,5,126,0,0,550, + 554,1,0,0,0,551,554,3,86,43,0,552,554,3,84,42,0,553,538,1,0,0,0, + 553,543,1,0,0,0,553,546,1,0,0,0,553,551,1,0,0,0,553,552,1,0,0,0, + 554,81,1,0,0,0,555,556,7,3,0,0,556,83,1,0,0,0,557,558,5,155,0,0, + 558,559,5,125,0,0,559,562,3,120,60,0,560,561,5,110,0,0,561,563,3, + 194,97,0,562,560,1,0,0,0,562,563,1,0,0,0,563,564,1,0,0,0,564,565, + 5,126,0,0,565,85,1,0,0,0,566,567,5,154,0,0,567,568,5,114,0,0,568, + 569,3,194,97,0,569,570,5,113,0,0,570,571,5,125,0,0,571,572,3,120, + 60,0,572,573,5,126,0,0,573,87,1,0,0,0,574,578,3,90,45,0,575,578, + 3,92,46,0,576,578,3,94,47,0,577,574,1,0,0,0,577,575,1,0,0,0,577, + 576,1,0,0,0,578,89,1,0,0,0,579,580,6,45,-1,0,580,586,3,92,46,0,581, + 582,5,61,0,0,582,586,3,90,45,6,583,586,3,100,50,0,584,586,3,102, + 51,0,585,579,1,0,0,0,585,581,1,0,0,0,585,583,1,0,0,0,585,584,1,0, + 0,0,586,600,1,0,0,0,587,588,10,5,0,0,588,589,5,62,0,0,589,599,3, + 90,45,6,590,592,10,4,0,0,591,593,5,63,0,0,592,591,1,0,0,0,592,593, + 1,0,0,0,593,594,1,0,0,0,594,599,3,90,45,5,595,596,10,3,0,0,596,597, + 5,64,0,0,597,599,3,90,45,4,598,587,1,0,0,0,598,590,1,0,0,0,598,595, + 1,0,0,0,599,602,1,0,0,0,600,598,1,0,0,0,600,601,1,0,0,0,601,91,1, + 0,0,0,602,600,1,0,0,0,603,604,3,94,47,0,604,605,3,182,91,0,605,606, + 3,94,47,0,606,612,1,0,0,0,607,608,3,94,47,0,608,609,5,60,0,0,609, + 610,3,212,106,0,610,612,1,0,0,0,611,603,1,0,0,0,611,607,1,0,0,0, + 612,93,1,0,0,0,613,614,6,47,-1,0,614,624,3,96,48,0,615,624,3,98, + 49,0,616,624,3,162,81,0,617,624,3,158,79,0,618,624,3,170,85,0,619, + 620,5,125,0,0,620,621,3,94,47,0,621,622,5,126,0,0,622,624,1,0,0, + 0,623,613,1,0,0,0,623,615,1,0,0,0,623,616,1,0,0,0,623,617,1,0,0, + 0,623,618,1,0,0,0,623,619,1,0,0,0,624,633,1,0,0,0,625,626,10,8,0, + 0,626,627,7,4,0,0,627,632,3,94,47,9,628,629,10,7,0,0,629,630,7,0, + 0,0,630,632,3,94,47,8,631,625,1,0,0,0,631,628,1,0,0,0,632,635,1, + 0,0,0,633,631,1,0,0,0,633,634,1,0,0,0,634,95,1,0,0,0,635,633,1,0, + 0,0,636,641,3,124,62,0,637,641,3,126,63,0,638,641,3,120,60,0,639, + 641,3,188,94,0,640,636,1,0,0,0,640,637,1,0,0,0,640,638,1,0,0,0,640, + 639,1,0,0,0,641,97,1,0,0,0,642,643,3,180,90,0,643,644,5,125,0,0, + 644,645,3,136,68,0,645,646,5,60,0,0,646,647,3,136,68,0,647,648,5, + 126,0,0,648,99,1,0,0,0,649,650,3,128,64,0,650,101,1,0,0,0,651,654, + 3,104,52,0,652,654,3,106,53,0,653,651,1,0,0,0,653,652,1,0,0,0,654, + 103,1,0,0,0,655,656,3,184,92,0,656,657,5,125,0,0,657,658,3,146,73, + 0,658,659,5,110,0,0,659,664,3,148,74,0,660,661,5,110,0,0,661,663, + 3,138,69,0,662,660,1,0,0,0,663,666,1,0,0,0,664,662,1,0,0,0,664,665, + 1,0,0,0,665,667,1,0,0,0,666,664,1,0,0,0,667,668,5,126,0,0,668,105, + 1,0,0,0,669,670,3,186,93,0,670,671,5,125,0,0,671,672,5,127,0,0,672, + 677,3,142,71,0,673,674,5,110,0,0,674,676,3,142,71,0,675,673,1,0, + 0,0,676,679,1,0,0,0,677,675,1,0,0,0,677,678,1,0,0,0,678,680,1,0, + 0,0,679,677,1,0,0,0,680,681,5,128,0,0,681,682,5,110,0,0,682,687, + 3,148,74,0,683,684,5,110,0,0,684,686,3,138,69,0,685,683,1,0,0,0, + 686,689,1,0,0,0,687,685,1,0,0,0,687,688,1,0,0,0,688,690,1,0,0,0, + 689,687,1,0,0,0,690,691,5,126,0,0,691,107,1,0,0,0,692,695,3,216, + 108,0,693,695,5,332,0,0,694,692,1,0,0,0,694,693,1,0,0,0,695,109, + 1,0,0,0,696,697,3,214,107,0,697,698,5,125,0,0,698,699,3,134,67,0, + 699,700,5,126,0,0,700,111,1,0,0,0,701,706,3,120,60,0,702,703,5,110, + 0,0,703,705,3,120,60,0,704,702,1,0,0,0,705,708,1,0,0,0,706,704,1, + 0,0,0,706,707,1,0,0,0,707,113,1,0,0,0,708,706,1,0,0,0,709,714,3, + 122,61,0,710,711,5,110,0,0,711,713,3,122,61,0,712,710,1,0,0,0,713, + 716,1,0,0,0,714,712,1,0,0,0,714,715,1,0,0,0,715,115,1,0,0,0,716, + 714,1,0,0,0,717,719,7,0,0,0,718,717,1,0,0,0,718,719,1,0,0,0,719, + 720,1,0,0,0,720,721,3,118,59,0,721,117,1,0,0,0,722,744,3,120,60, + 0,723,724,5,35,0,0,724,725,5,125,0,0,725,726,3,120,60,0,726,727, + 5,126,0,0,727,744,1,0,0,0,728,729,5,36,0,0,729,730,5,125,0,0,730, + 731,3,120,60,0,731,732,5,126,0,0,732,744,1,0,0,0,733,734,5,37,0, + 0,734,735,5,125,0,0,735,736,3,120,60,0,736,737,5,126,0,0,737,744, + 1,0,0,0,738,739,5,38,0,0,739,740,5,125,0,0,740,741,3,120,60,0,741, + 742,5,126,0,0,742,744,1,0,0,0,743,722,1,0,0,0,743,723,1,0,0,0,743, + 728,1,0,0,0,743,733,1,0,0,0,743,738,1,0,0,0,744,119,1,0,0,0,745, + 746,3,214,107,0,746,121,1,0,0,0,747,748,3,218,109,0,748,123,1,0, + 0,0,749,750,3,132,66,0,750,751,5,125,0,0,751,752,3,134,67,0,752, + 753,5,126,0,0,753,125,1,0,0,0,754,755,5,274,0,0,755,756,5,125,0, + 0,756,757,3,88,44,0,757,758,5,27,0,0,758,759,3,130,65,0,759,760, + 5,126,0,0,760,127,1,0,0,0,761,762,3,174,87,0,762,763,5,125,0,0,763, + 764,3,134,67,0,764,765,5,126,0,0,765,129,1,0,0,0,766,777,5,212,0, + 0,767,777,5,241,0,0,768,777,5,243,0,0,769,777,5,102,0,0,770,777, + 5,103,0,0,771,777,5,104,0,0,772,777,5,105,0,0,773,777,5,106,0,0, + 774,777,5,107,0,0,775,777,5,108,0,0,776,766,1,0,0,0,776,767,1,0, + 0,0,776,768,1,0,0,0,776,769,1,0,0,0,776,770,1,0,0,0,776,771,1,0, + 0,0,776,772,1,0,0,0,776,773,1,0,0,0,776,774,1,0,0,0,776,775,1,0, + 0,0,777,131,1,0,0,0,778,785,3,152,76,0,779,785,3,156,78,0,780,785, + 3,178,89,0,781,785,3,174,87,0,782,785,3,176,88,0,783,785,3,180,90, + 0,784,778,1,0,0,0,784,779,1,0,0,0,784,780,1,0,0,0,784,781,1,0,0, + 0,784,782,1,0,0,0,784,783,1,0,0,0,785,133,1,0,0,0,786,791,3,136, + 68,0,787,788,5,110,0,0,788,790,3,136,68,0,789,787,1,0,0,0,790,793, + 1,0,0,0,791,789,1,0,0,0,791,792,1,0,0,0,792,795,1,0,0,0,793,791, + 1,0,0,0,794,786,1,0,0,0,794,795,1,0,0,0,795,135,1,0,0,0,796,797, + 3,220,110,0,797,798,5,112,0,0,798,800,1,0,0,0,799,796,1,0,0,0,799, + 800,1,0,0,0,800,801,1,0,0,0,801,802,3,94,47,0,802,137,1,0,0,0,803, + 804,3,140,70,0,804,805,5,112,0,0,805,806,3,150,75,0,806,139,1,0, + 0,0,807,808,7,5,0,0,808,141,1,0,0,0,809,818,3,146,73,0,810,811,3, + 146,73,0,811,812,3,144,72,0,812,818,1,0,0,0,813,814,3,146,73,0,814, + 815,5,134,0,0,815,816,3,144,72,0,816,818,1,0,0,0,817,809,1,0,0,0, + 817,810,1,0,0,0,817,813,1,0,0,0,818,143,1,0,0,0,819,822,3,194,97, + 0,820,822,3,196,98,0,821,819,1,0,0,0,821,820,1,0,0,0,822,145,1,0, + 0,0,823,826,3,214,107,0,824,826,3,192,96,0,825,823,1,0,0,0,825,824, + 1,0,0,0,826,147,1,0,0,0,827,828,3,150,75,0,828,149,1,0,0,0,829,832, + 3,214,107,0,830,832,3,188,94,0,831,829,1,0,0,0,831,830,1,0,0,0,832, + 151,1,0,0,0,833,857,5,172,0,0,834,857,5,173,0,0,835,857,5,174,0, + 0,836,857,5,175,0,0,837,857,5,176,0,0,838,857,5,177,0,0,839,857, + 5,178,0,0,840,857,5,179,0,0,841,857,5,180,0,0,842,857,5,181,0,0, + 843,857,5,182,0,0,844,857,5,183,0,0,845,857,5,184,0,0,846,857,5, + 185,0,0,847,857,5,186,0,0,848,857,5,188,0,0,849,857,5,189,0,0,850, + 857,5,190,0,0,851,857,5,191,0,0,852,857,5,192,0,0,853,857,5,193, + 0,0,854,857,5,194,0,0,855,857,3,154,77,0,856,833,1,0,0,0,856,834, + 1,0,0,0,856,835,1,0,0,0,856,836,1,0,0,0,856,837,1,0,0,0,856,838, + 1,0,0,0,856,839,1,0,0,0,856,840,1,0,0,0,856,841,1,0,0,0,856,842, + 1,0,0,0,856,843,1,0,0,0,856,844,1,0,0,0,856,845,1,0,0,0,856,846, + 1,0,0,0,856,847,1,0,0,0,856,848,1,0,0,0,856,849,1,0,0,0,856,850, + 1,0,0,0,856,851,1,0,0,0,856,852,1,0,0,0,856,853,1,0,0,0,856,854, + 1,0,0,0,856,855,1,0,0,0,857,153,1,0,0,0,858,859,7,6,0,0,859,155, + 1,0,0,0,860,861,7,7,0,0,861,157,1,0,0,0,862,863,5,226,0,0,863,864, + 5,125,0,0,864,865,3,160,80,0,865,866,5,110,0,0,866,867,3,136,68, + 0,867,868,5,126,0,0,868,159,1,0,0,0,869,870,7,8,0,0,870,161,1,0, + 0,0,871,872,5,223,0,0,872,873,5,125,0,0,873,874,3,168,84,0,874,875, + 5,5,0,0,875,876,3,136,68,0,876,877,5,126,0,0,877,163,1,0,0,0,878, + 879,7,9,0,0,879,165,1,0,0,0,880,881,7,10,0,0,881,167,1,0,0,0,882, + 885,3,164,82,0,883,885,3,166,83,0,884,882,1,0,0,0,884,883,1,0,0, + 0,885,169,1,0,0,0,886,887,3,172,86,0,887,888,5,125,0,0,888,889,3, + 164,82,0,889,890,5,110,0,0,890,891,3,136,68,0,891,892,5,110,0,0, + 892,893,3,136,68,0,893,894,5,126,0,0,894,171,1,0,0,0,895,896,7,11, + 0,0,896,173,1,0,0,0,897,898,7,12,0,0,898,175,1,0,0,0,899,900,5,281, + 0,0,900,177,1,0,0,0,901,902,7,13,0,0,902,179,1,0,0,0,903,904,5,187, + 0,0,904,181,1,0,0,0,905,906,7,14,0,0,906,183,1,0,0,0,907,908,7,15, + 0,0,908,185,1,0,0,0,909,910,7,16,0,0,910,187,1,0,0,0,911,918,3,190, + 95,0,912,918,3,192,96,0,913,918,3,194,97,0,914,918,3,196,98,0,915, + 918,3,198,99,0,916,918,3,200,100,0,917,911,1,0,0,0,917,912,1,0,0, + 0,917,913,1,0,0,0,917,914,1,0,0,0,917,915,1,0,0,0,917,916,1,0,0, + 0,918,189,1,0,0,0,919,920,5,81,0,0,920,921,3,94,47,0,921,922,3,208, + 104,0,922,191,1,0,0,0,923,924,7,17,0,0,924,193,1,0,0,0,925,927,7, + 0,0,0,926,925,1,0,0,0,926,927,1,0,0,0,927,928,1,0,0,0,928,929,5, + 330,0,0,929,195,1,0,0,0,930,932,7,0,0,0,931,930,1,0,0,0,931,932, + 1,0,0,0,932,933,1,0,0,0,933,934,5,331,0,0,934,197,1,0,0,0,935,936, + 7,18,0,0,936,199,1,0,0,0,937,941,3,202,101,0,938,941,3,204,102,0, + 939,941,3,206,103,0,940,937,1,0,0,0,940,938,1,0,0,0,940,939,1,0, + 0,0,941,201,1,0,0,0,942,943,5,212,0,0,943,944,3,192,96,0,944,203, + 1,0,0,0,945,946,5,241,0,0,946,947,3,192,96,0,947,205,1,0,0,0,948, + 949,5,243,0,0,949,950,3,192,96,0,950,207,1,0,0,0,951,952,7,19,0, + 0,952,209,1,0,0,0,953,954,7,20,0,0,954,211,1,0,0,0,955,956,5,125, + 0,0,956,961,3,188,94,0,957,958,5,110,0,0,958,960,3,188,94,0,959, + 957,1,0,0,0,960,963,1,0,0,0,961,959,1,0,0,0,961,962,1,0,0,0,962, + 964,1,0,0,0,963,961,1,0,0,0,964,965,5,126,0,0,965,213,1,0,0,0,966, + 967,5,328,0,0,967,215,1,0,0,0,968,973,3,222,111,0,969,970,5,111, + 0,0,970,972,3,220,110,0,971,969,1,0,0,0,972,975,1,0,0,0,973,971, + 1,0,0,0,973,974,1,0,0,0,974,217,1,0,0,0,975,973,1,0,0,0,976,981, + 3,224,112,0,977,978,5,111,0,0,978,980,3,224,112,0,979,977,1,0,0, + 0,980,983,1,0,0,0,981,979,1,0,0,0,981,982,1,0,0,0,982,219,1,0,0, + 0,983,981,1,0,0,0,984,986,5,111,0,0,985,984,1,0,0,0,985,986,1,0, + 0,0,986,987,1,0,0,0,987,995,5,328,0,0,988,989,5,131,0,0,989,990, + 3,220,110,0,990,991,5,131,0,0,991,995,1,0,0,0,992,995,5,335,0,0, + 993,995,3,226,113,0,994,985,1,0,0,0,994,988,1,0,0,0,994,992,1,0, + 0,0,994,993,1,0,0,0,995,221,1,0,0,0,996,998,5,329,0,0,997,996,1, + 0,0,0,997,998,1,0,0,0,998,999,1,0,0,0,999,1000,3,220,110,0,1000, + 223,1,0,0,0,1001,1006,3,220,110,0,1002,1003,5,122,0,0,1003,1005, + 3,220,110,0,1004,1002,1,0,0,0,1005,1008,1,0,0,0,1006,1004,1,0,0, + 0,1006,1007,1,0,0,0,1007,1010,1,0,0,0,1008,1006,1,0,0,0,1009,1011, + 5,122,0,0,1010,1009,1,0,0,0,1010,1011,1,0,0,0,1011,1025,1,0,0,0, + 1012,1013,5,129,0,0,1013,1014,3,224,112,0,1014,1015,5,129,0,0,1015, + 1025,1,0,0,0,1016,1017,5,130,0,0,1017,1018,3,224,112,0,1018,1019, + 5,130,0,0,1019,1025,1,0,0,0,1020,1021,5,131,0,0,1021,1022,3,224, + 112,0,1022,1023,5,131,0,0,1023,1025,1,0,0,0,1024,1001,1,0,0,0,1024, + 1012,1,0,0,0,1024,1016,1,0,0,0,1024,1020,1,0,0,0,1025,225,1,0,0, + 0,1026,1127,5,31,0,0,1027,1127,3,210,105,0,1028,1127,5,320,0,0,1029, + 1127,3,132,66,0,1030,1127,3,140,70,0,1031,1127,3,208,104,0,1032, + 1127,3,156,78,0,1033,1127,3,178,89,0,1034,1127,3,152,76,0,1035,1127, + 3,180,90,0,1036,1127,5,2,0,0,1037,1127,5,3,0,0,1038,1127,5,4,0,0, + 1039,1127,5,5,0,0,1040,1127,5,6,0,0,1041,1127,5,7,0,0,1042,1127, + 5,8,0,0,1043,1127,5,9,0,0,1044,1127,5,10,0,0,1045,1127,5,11,0,0, + 1046,1127,5,12,0,0,1047,1127,5,13,0,0,1048,1127,5,14,0,0,1049,1127, + 5,15,0,0,1050,1127,5,16,0,0,1051,1127,5,17,0,0,1052,1127,5,18,0, + 0,1053,1127,5,19,0,0,1054,1127,5,20,0,0,1055,1127,5,21,0,0,1056, + 1127,5,22,0,0,1057,1127,5,23,0,0,1058,1127,5,24,0,0,1059,1127,5, + 25,0,0,1060,1127,5,26,0,0,1061,1127,5,29,0,0,1062,1127,5,30,0,0, + 1063,1127,5,32,0,0,1064,1127,5,33,0,0,1065,1127,5,34,0,0,1066,1127, + 5,36,0,0,1067,1127,5,37,0,0,1068,1127,5,38,0,0,1069,1127,5,39,0, + 0,1070,1127,5,40,0,0,1071,1127,5,41,0,0,1072,1127,5,42,0,0,1073, + 1127,5,43,0,0,1074,1127,5,44,0,0,1075,1127,5,45,0,0,1076,1127,5, + 46,0,0,1077,1127,5,47,0,0,1078,1127,5,48,0,0,1079,1127,5,49,0,0, + 1080,1127,5,50,0,0,1081,1127,5,51,0,0,1082,1127,5,52,0,0,1083,1127, + 5,53,0,0,1084,1127,5,54,0,0,1085,1127,5,55,0,0,1086,1127,5,56,0, + 0,1087,1127,5,57,0,0,1088,1127,5,58,0,0,1089,1127,5,135,0,0,1090, + 1127,5,136,0,0,1091,1127,5,137,0,0,1092,1127,5,138,0,0,1093,1127, + 5,139,0,0,1094,1127,5,140,0,0,1095,1127,5,141,0,0,1096,1127,5,142, + 0,0,1097,1127,5,143,0,0,1098,1127,5,144,0,0,1099,1127,5,145,0,0, + 1100,1127,5,146,0,0,1101,1127,5,147,0,0,1102,1127,5,148,0,0,1103, + 1127,5,149,0,0,1104,1127,5,150,0,0,1105,1127,5,151,0,0,1106,1127, + 5,152,0,0,1107,1127,5,153,0,0,1108,1127,5,154,0,0,1109,1127,5,155, + 0,0,1110,1127,5,156,0,0,1111,1127,5,157,0,0,1112,1127,5,158,0,0, + 1113,1127,5,159,0,0,1114,1127,5,160,0,0,1115,1127,5,161,0,0,1116, + 1127,5,162,0,0,1117,1127,5,163,0,0,1118,1127,5,164,0,0,1119,1127, + 5,165,0,0,1120,1127,5,166,0,0,1121,1127,5,167,0,0,1122,1127,5,168, + 0,0,1123,1127,5,169,0,0,1124,1127,5,170,0,0,1125,1127,5,171,0,0, + 1126,1026,1,0,0,0,1126,1027,1,0,0,0,1126,1028,1,0,0,0,1126,1029, + 1,0,0,0,1126,1030,1,0,0,0,1126,1031,1,0,0,0,1126,1032,1,0,0,0,1126, + 1033,1,0,0,0,1126,1034,1,0,0,0,1126,1035,1,0,0,0,1126,1036,1,0,0, + 0,1126,1037,1,0,0,0,1126,1038,1,0,0,0,1126,1039,1,0,0,0,1126,1040, + 1,0,0,0,1126,1041,1,0,0,0,1126,1042,1,0,0,0,1126,1043,1,0,0,0,1126, + 1044,1,0,0,0,1126,1045,1,0,0,0,1126,1046,1,0,0,0,1126,1047,1,0,0, + 0,1126,1048,1,0,0,0,1126,1049,1,0,0,0,1126,1050,1,0,0,0,1126,1051, + 1,0,0,0,1126,1052,1,0,0,0,1126,1053,1,0,0,0,1126,1054,1,0,0,0,1126, + 1055,1,0,0,0,1126,1056,1,0,0,0,1126,1057,1,0,0,0,1126,1058,1,0,0, + 0,1126,1059,1,0,0,0,1126,1060,1,0,0,0,1126,1061,1,0,0,0,1126,1062, + 1,0,0,0,1126,1063,1,0,0,0,1126,1064,1,0,0,0,1126,1065,1,0,0,0,1126, + 1066,1,0,0,0,1126,1067,1,0,0,0,1126,1068,1,0,0,0,1126,1069,1,0,0, + 0,1126,1070,1,0,0,0,1126,1071,1,0,0,0,1126,1072,1,0,0,0,1126,1073, + 1,0,0,0,1126,1074,1,0,0,0,1126,1075,1,0,0,0,1126,1076,1,0,0,0,1126, + 1077,1,0,0,0,1126,1078,1,0,0,0,1126,1079,1,0,0,0,1126,1080,1,0,0, + 0,1126,1081,1,0,0,0,1126,1082,1,0,0,0,1126,1083,1,0,0,0,1126,1084, + 1,0,0,0,1126,1085,1,0,0,0,1126,1086,1,0,0,0,1126,1087,1,0,0,0,1126, + 1088,1,0,0,0,1126,1089,1,0,0,0,1126,1090,1,0,0,0,1126,1091,1,0,0, + 0,1126,1092,1,0,0,0,1126,1093,1,0,0,0,1126,1094,1,0,0,0,1126,1095, + 1,0,0,0,1126,1096,1,0,0,0,1126,1097,1,0,0,0,1126,1098,1,0,0,0,1126, + 1099,1,0,0,0,1126,1100,1,0,0,0,1126,1101,1,0,0,0,1126,1102,1,0,0, + 0,1126,1103,1,0,0,0,1126,1104,1,0,0,0,1126,1105,1,0,0,0,1126,1106, + 1,0,0,0,1126,1107,1,0,0,0,1126,1108,1,0,0,0,1126,1109,1,0,0,0,1126, + 1110,1,0,0,0,1126,1111,1,0,0,0,1126,1112,1,0,0,0,1126,1113,1,0,0, + 0,1126,1114,1,0,0,0,1126,1115,1,0,0,0,1126,1116,1,0,0,0,1126,1117, + 1,0,0,0,1126,1118,1,0,0,0,1126,1119,1,0,0,0,1126,1120,1,0,0,0,1126, + 1121,1,0,0,0,1126,1122,1,0,0,0,1126,1123,1,0,0,0,1126,1124,1,0,0, + 0,1126,1125,1,0,0,0,1127,227,1,0,0,0,81,229,242,248,266,269,284, + 294,301,306,311,318,322,327,331,337,342,353,358,362,366,370,375, + 389,400,408,420,426,465,471,484,504,509,517,526,536,553,562,577, + 585,592,598,600,611,623,631,633,640,653,664,677,687,694,706,714, + 718,743,776,784,791,794,799,817,821,825,831,856,884,917,926,931, + 940,961,973,981,985,994,997,1006,1010,1024,1126 ]; private static __ATN: antlr.ATN; @@ -9360,6 +9467,46 @@ export class ExtractFunctionCallContext extends ValueExpressionContext { } } } +export class BinaryArithmeticContext extends ValueExpressionContext { + public _left?: ValueExpressionContext; + public _binaryOperator?: Token | null; + public _right?: ValueExpressionContext; + public constructor(ctx: ValueExpressionContext) { + super(ctx.parent, ctx.invokingState); + super.copyFrom(ctx); + } + public valueExpression(): ValueExpressionContext[]; + public valueExpression(i: number): ValueExpressionContext | null; + public valueExpression(i?: number): ValueExpressionContext[] | ValueExpressionContext | null { + if (i === undefined) { + return this.getRuleContexts(ValueExpressionContext); + } + + return this.getRuleContext(i, ValueExpressionContext); + } + public STAR(): antlr.TerminalNode | null { + return this.getToken(OpenSearchPPLParser.STAR, 0); + } + public DIVIDE(): antlr.TerminalNode | null { + return this.getToken(OpenSearchPPLParser.DIVIDE, 0); + } + public MODULE(): antlr.TerminalNode | null { + return this.getToken(OpenSearchPPLParser.MODULE, 0); + } + public PLUS(): antlr.TerminalNode | null { + return this.getToken(OpenSearchPPLParser.PLUS, 0); + } + public MINUS(): antlr.TerminalNode | null { + return this.getToken(OpenSearchPPLParser.MINUS, 0); + } + public override accept(visitor: OpenSearchPPLParserVisitor): Result | null { + if (visitor.visitBinaryArithmetic) { + return visitor.visitBinaryArithmetic(this); + } else { + return visitor.visitChildren(this); + } + } +} export class TimestampFunctionCallContext extends ValueExpressionContext { public constructor(ctx: ValueExpressionContext) { super(ctx.parent, ctx.invokingState); diff --git a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParserVisitor.ts b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParserVisitor.ts index 31ef0e269056..d64335be75fe 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParserVisitor.ts +++ b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParserVisitor.ts @@ -61,12 +61,13 @@ import { LogicalXorContext } from "./OpenSearchPPLParser.js"; import { LogicalOrContext } from "./OpenSearchPPLParser.js"; import { CompareExprContext } from "./OpenSearchPPLParser.js"; import { InExprContext } from "./OpenSearchPPLParser.js"; -import { ValueExpressionDefaultContext } from "./OpenSearchPPLParser.js"; import { PositionFunctionCallContext } from "./OpenSearchPPLParser.js"; -import { ExtractFunctionCallContext } from "./OpenSearchPPLParser.js"; +import { ValueExpressionDefaultContext } from "./OpenSearchPPLParser.js"; +import { ParentheticValueExprContext } from "./OpenSearchPPLParser.js"; import { GetFormatFunctionCallContext } from "./OpenSearchPPLParser.js"; +import { ExtractFunctionCallContext } from "./OpenSearchPPLParser.js"; +import { BinaryArithmeticContext } from "./OpenSearchPPLParser.js"; import { TimestampFunctionCallContext } from "./OpenSearchPPLParser.js"; -import { ParentheticValueExprContext } from "./OpenSearchPPLParser.js"; import { PrimaryExpressionContext } from "./OpenSearchPPLParser.js"; import { PositionFunctionContext } from "./OpenSearchPPLParser.js"; import { BooleanExpressionContext } from "./OpenSearchPPLParser.js"; @@ -507,26 +508,26 @@ export class OpenSearchPPLParserVisitor extends AbstractParseTreeVisitor */ visitInExpr?: (ctx: InExprContext) => Result; /** - * Visit a parse tree produced by the `valueExpressionDefault` + * Visit a parse tree produced by the `positionFunctionCall` * labeled alternative in `OpenSearchPPLParser.valueExpression`. * @param ctx the parse tree * @return the visitor result */ - visitValueExpressionDefault?: (ctx: ValueExpressionDefaultContext) => Result; + visitPositionFunctionCall?: (ctx: PositionFunctionCallContext) => Result; /** - * Visit a parse tree produced by the `positionFunctionCall` + * Visit a parse tree produced by the `valueExpressionDefault` * labeled alternative in `OpenSearchPPLParser.valueExpression`. * @param ctx the parse tree * @return the visitor result */ - visitPositionFunctionCall?: (ctx: PositionFunctionCallContext) => Result; + visitValueExpressionDefault?: (ctx: ValueExpressionDefaultContext) => Result; /** - * Visit a parse tree produced by the `extractFunctionCall` + * Visit a parse tree produced by the `parentheticValueExpr` * labeled alternative in `OpenSearchPPLParser.valueExpression`. * @param ctx the parse tree * @return the visitor result */ - visitExtractFunctionCall?: (ctx: ExtractFunctionCallContext) => Result; + visitParentheticValueExpr?: (ctx: ParentheticValueExprContext) => Result; /** * Visit a parse tree produced by the `getFormatFunctionCall` * labeled alternative in `OpenSearchPPLParser.valueExpression`. @@ -535,19 +536,26 @@ export class OpenSearchPPLParserVisitor extends AbstractParseTreeVisitor */ visitGetFormatFunctionCall?: (ctx: GetFormatFunctionCallContext) => Result; /** - * Visit a parse tree produced by the `timestampFunctionCall` + * Visit a parse tree produced by the `extractFunctionCall` * labeled alternative in `OpenSearchPPLParser.valueExpression`. * @param ctx the parse tree * @return the visitor result */ - visitTimestampFunctionCall?: (ctx: TimestampFunctionCallContext) => Result; + visitExtractFunctionCall?: (ctx: ExtractFunctionCallContext) => Result; /** - * Visit a parse tree produced by the `parentheticValueExpr` + * Visit a parse tree produced by the `binaryArithmetic` * labeled alternative in `OpenSearchPPLParser.valueExpression`. * @param ctx the parse tree * @return the visitor result */ - visitParentheticValueExpr?: (ctx: ParentheticValueExprContext) => Result; + visitBinaryArithmetic?: (ctx: BinaryArithmeticContext) => Result; + /** + * Visit a parse tree produced by the `timestampFunctionCall` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTimestampFunctionCall?: (ctx: TimestampFunctionCallContext) => Result; /** * Visit a parse tree produced by `OpenSearchPPLParser.primaryExpression`. * @param ctx the parse tree diff --git a/src/plugins/data/public/antlr/opensearch_ppl/code_completion.test.ts b/src/plugins/data/public/antlr/opensearch_ppl/code_completion.test.ts new file mode 100644 index 000000000000..aafed67a7213 --- /dev/null +++ b/src/plugins/data/public/antlr/opensearch_ppl/code_completion.test.ts @@ -0,0 +1,127 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { monaco } from '@osd/monaco'; +import { getSuggestions } from './code_completion'; +import { IndexPattern } from '../../index_patterns'; +import { IDataPluginServices } from '../../types'; +import { QuerySuggestion } from '../../autocomplete'; +import * as utils from '../shared/utils'; +import { PPL_AGGREGATE_FUNCTIONS } from './constants'; + +describe('ppl code_completion', () => { + describe('getSuggestions', () => { + const mockIndexPattern = { + title: 'test-index', + fields: [ + { name: 'field1', type: 'string' }, + { name: 'field2', type: 'number' }, + { name: 'field3', type: 'boolean' }, + ], + } as IndexPattern; + + const mockServices = { + appName: 'test-app', + } as IDataPluginServices; + + const mockPosition = { + lineNumber: 1, + column: 1, + } as monaco.Position; + + const getSimpleSuggestions = async ( + query: string, + position: monaco.Position = new monaco.Position(1, query.length + 1) + ) => { + return getSuggestions({ + query, + indexPattern: mockIndexPattern, + position, + language: 'PPL', + selectionStart: 0, + selectionEnd: 0, + services: mockServices, + }); + }; + + const checkSuggestionsContain = ( + result: QuerySuggestion[], + expected: Partial + ) => { + expect( + result.some( + (suggestion) => suggestion.text === expected.text && suggestion.type === expected.type + ) + ).toBeTruthy(); + }; + + it('should return empty array when required parameters are missing', async () => { + const result = await getSuggestions({ + query: '', + indexPattern: (null as unknown) as IndexPattern, + position: mockPosition, + language: 'PPL', + selectionStart: 0, + selectionEnd: 0, + services: (null as unknown) as IDataPluginServices, + }); + + expect(result).toEqual([]); + }); + + it('should suggest table name when suggestSourcesOrTables is true', async () => { + const result = await getSimpleSuggestions('source = '); + + checkSuggestionsContain(result, { + text: 'test-index', + type: monaco.languages.CompletionItemKind.Struct, + }); + }); + + it('should suggest columns when suggestColumns is true', async () => { + const result = await getSimpleSuggestions('source = test-index | where '); + + checkSuggestionsContain(result, { + text: 'field1', + type: monaco.languages.CompletionItemKind.Field, + }); + }); + + it('should suggest values after column names', async () => { + const mockedValues = ['value1', 'value2']; + jest.spyOn(utils, 'fetchColumnValues').mockResolvedValue(mockedValues); + + const result = await getSimpleSuggestions('source = test-index | where field1 = '); + + expect(utils.fetchColumnValues).toHaveBeenCalled(); + mockedValues.forEach((val) => { + checkSuggestionsContain(result, { + text: val, + type: monaco.languages.CompletionItemKind.Value, + }); + }); + }); + + it('should suggest aggregate functions for stats', async () => { + const result = await getSimpleSuggestions('source = test-index | stats '); + + [...PPL_AGGREGATE_FUNCTIONS, 'count'].forEach((af) => { + checkSuggestionsContain(result, { + text: `${af}()`, + type: monaco.languages.CompletionItemKind.Function, + }); + }); + }); + + it('should suggest "as" for rename command', async () => { + const result = await getSimpleSuggestions('source = test-index | rename field1 '); + + checkSuggestionsContain(result, { + text: 'as', + type: monaco.languages.CompletionItemKind.Keyword, + }); + }); + }); +}); diff --git a/src/plugins/data/public/antlr/opensearch_ppl/code_completion.ts b/src/plugins/data/public/antlr/opensearch_ppl/code_completion.ts index eda46d0d66b6..756f9c5d2e50 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/code_completion.ts +++ b/src/plugins/data/public/antlr/opensearch_ppl/code_completion.ts @@ -11,17 +11,22 @@ import { monaco } from '@osd/monaco'; import { CursorPosition, OpenSearchPplAutocompleteResult } from '../shared/types'; -import { fetchFieldSuggestions, parseQuery } from '../shared/utils'; +import { + fetchColumnValues, + formatFieldsToSuggestions, + formatValuesToSuggestions, + parseQuery, +} from '../shared/utils'; import { openSearchPplAutocompleteData } from './opensearch_ppl_autocomplete'; import { QuerySuggestion, QuerySuggestionGetFnArgs } from '../../autocomplete'; import { SuggestionItemDetailsTags } from '../shared/constants'; -import { PPL_AGGREGATE_FUNTIONS } from './constants'; -import { OpenSearchPPLParser } from './.generated/OpenSearchPPLParser'; +import { PPL_AGGREGATE_FUNCTIONS, PPL_SUGGESTION_IMPORTANCE } from './constants'; export const getSuggestions = async ({ selectionStart, selectionEnd, indexPattern, + datasetType, position, query, services, @@ -37,12 +42,27 @@ export const getSuggestions = async ({ const finalSuggestions: QuerySuggestion[] = []; if (suggestions.suggestColumns) { - finalSuggestions.push(...fetchFieldSuggestions(indexPattern, (f: any) => `${f} `)); + finalSuggestions.push(...formatFieldsToSuggestions(indexPattern, (f: any) => `${f} `, '3')); + } + + if (suggestions.suggestValuesForColumn) { + finalSuggestions.push( + ...formatValuesToSuggestions( + await fetchColumnValues( + indexPattern.title, + suggestions.suggestValuesForColumn, + services, + indexPattern.fields.find((field) => field.name === suggestions.suggestValuesForColumn), + datasetType + ).catch(() => []), + (val: any) => (typeof val === 'string' ? `"${val}" ` : `${val} `) + ) + ); } if (suggestions.suggestAggregateFunctions) { finalSuggestions.push( - ...PPL_AGGREGATE_FUNTIONS.map((af) => ({ + ...PPL_AGGREGATE_FUNCTIONS.map((af) => ({ text: `${af}()`, type: monaco.languages.CompletionItemKind.Function, insertText: af + '(${1:expr}) ', @@ -50,6 +70,13 @@ export const getSuggestions = async ({ insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, })) ); + // separately include count as there will be nothing within the parens + finalSuggestions.push({ + text: `count()`, + type: monaco.languages.CompletionItemKind.Function, + insertText: 'count() ', + detail: SuggestionItemDetailsTags.AggregateFunction, + }); } if (suggestions.suggestSourcesOrTables) { @@ -61,14 +88,14 @@ export const getSuggestions = async ({ }); } - // create the sortlist - const suggestionImportance = new Map(); - suggestionImportance.set(OpenSearchPPLParser.PIPE, '0'); - suggestionImportance.set(OpenSearchPPLParser.COMMA, '1'); - suggestionImportance.set(OpenSearchPPLParser.PLUS, '2'); - suggestionImportance.set(OpenSearchPPLParser.MINUS, '2'); - suggestionImportance.set(OpenSearchPPLParser.EQUAL, '2'); - suggestionImportance.set(OpenSearchPPLParser.SOURCE, '2'); + if (suggestions.suggestRenameAs) { + finalSuggestions.push({ + text: 'as', + insertText: 'as ', + type: monaco.languages.CompletionItemKind.Keyword, + detail: SuggestionItemDetailsTags.Keyword, + }); + } // Fill in PPL keywords if (suggestions.suggestKeywords?.length) { @@ -78,10 +105,12 @@ export const getSuggestions = async ({ insertText: `${sk.value.toLowerCase()} `, type: monaco.languages.CompletionItemKind.Keyword, detail: SuggestionItemDetailsTags.Keyword, - sortText: suggestionImportance.get(sk.id) ?? sk.value.toLowerCase(), + // sortText is the only option to sort suggestions, compares strings + sortText: PPL_SUGGESTION_IMPORTANCE.get(sk.id) ?? '9' + sk.value.toLowerCase(), // '9' used to devalue every other suggestion })) ); } + return finalSuggestions; } catch (e) { return []; diff --git a/src/plugins/data/public/antlr/opensearch_ppl/constants.ts b/src/plugins/data/public/antlr/opensearch_ppl/constants.ts index 3f84ddd36cf5..ea9d36d9e692 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/constants.ts +++ b/src/plugins/data/public/antlr/opensearch_ppl/constants.ts @@ -3,9 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -export const PPL_AGGREGATE_FUNTIONS = [ +import { OpenSearchPPLParser } from './.generated/OpenSearchPPLParser'; + +export const PPL_AGGREGATE_FUNCTIONS = [ 'avg', - 'count', 'sum', 'min', 'max', @@ -14,3 +15,12 @@ export const PPL_AGGREGATE_FUNTIONS = [ 'stddev_samp', 'stddev_pop', ]; + +export const PPL_SUGGESTION_IMPORTANCE = new Map([ + [OpenSearchPPLParser.PIPE, '0'], + [OpenSearchPPLParser.COMMA, '1'], + [OpenSearchPPLParser.EQUAL, '1'], + [OpenSearchPPLParser.PLUS, '2'], + [OpenSearchPPLParser.MINUS, '2'], + [OpenSearchPPLParser.SOURCE, '2'], +]); diff --git a/src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4 b/src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4 index 337952c12098..b6f219d5bcbe 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4 +++ b/src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4 @@ -263,9 +263,9 @@ comparisonExpression ; valueExpression - // : left = valueExpression binaryOperator = (STAR | DIVIDE | MODULE) right = valueExpression # binaryArithmetic - // | left = valueExpression binaryOperator = (PLUS | MINUS) right = valueExpression # binaryArithmetic - : primaryExpression # valueExpressionDefault + : left = valueExpression binaryOperator = (STAR | DIVIDE | MODULE) right = valueExpression # binaryArithmetic + | left = valueExpression binaryOperator = (PLUS | MINUS) right = valueExpression # binaryArithmetic + | primaryExpression # valueExpressionDefault | positionFunction # positionFunctionCall | extractFunction # extractFunctionCall | getFormatFunction # getFormatFunctionCall diff --git a/src/plugins/data/public/antlr/opensearch_ppl/opensearch_ppl_autocomplete.test.ts b/src/plugins/data/public/antlr/opensearch_ppl/opensearch_ppl_autocomplete.test.ts new file mode 100644 index 000000000000..746e7307f409 --- /dev/null +++ b/src/plugins/data/public/antlr/opensearch_ppl/opensearch_ppl_autocomplete.test.ts @@ -0,0 +1,121 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { TokenStream } from 'antlr4ng'; +import { OpenSearchPPLParser } from './.generated/OpenSearchPPLParser'; +import { + enrichAutocompleteResult, + getParseTree, + openSearchPplAutocompleteData, + processVisitedRules, +} from './opensearch_ppl_autocomplete'; + +describe('Token Dictionary and Ignored Tokens', () => { + it('should correctly set the token dictionary', () => { + expect(openSearchPplAutocompleteData.tokenDictionary.SPACE).toBe(OpenSearchPPLParser.SPACE); + expect(openSearchPplAutocompleteData.tokenDictionary.ID).toBe(OpenSearchPPLParser.ID); + }); + + it('should correctly generate ignored tokens', () => { + const ignoredTokens = new Set(openSearchPplAutocompleteData.ignoredTokens); + expect(ignoredTokens.has(OpenSearchPPLParser.CASE)).toBe(true); + expect(ignoredTokens.has(OpenSearchPPLParser.CAST)).toBe(true); + }); +}); + +describe('processVisitedRules', () => { + // createTokenStream takes a list of 'tokens' defined only by its type or an actual object to be returned as the Token + const createTokenStream = (list: Array) => + (({ + get: jest.fn((num: number) => + typeof list[num] === 'number' ? { type: list[num] } : list[num] + ), + } as unknown) as TokenStream); + + it('should set the correct suggestions based on the rules visited', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchPPLParser.RULE_statsFunctionName, {}); + const tokenStream = createTokenStream([1]); + + const result = processVisitedRules(mockRules, 2, tokenStream); + expect(result.suggestAggregateFunctions).toBeDefined(); + expect(result.shouldSuggestColumns).toBe(false); + }); + + it('should handle multiple rules correctly', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchPPLParser.RULE_statsFunctionName, {}); + mockRules.set(OpenSearchPPLParser.RULE_fieldExpression, {}); + const tokenStream = createTokenStream([1]); + + const result = processVisitedRules(mockRules, 2, tokenStream); + expect(result.suggestAggregateFunctions).toBeDefined(); + expect(result.shouldSuggestColumns).toBe(true); + }); +}); + +describe('getParseTree', () => { + it('should return the correct parse tree based on the type', () => { + const mockParser = { + fromClause: jest.fn().mockReturnValue('fromTree'), + }; + + expect(getParseTree((mockParser as unknown) as OpenSearchPPLParser, 'from')).toBe('fromTree'); + }); + + it('should return root parse tree if no type is provided', () => { + const mockParser = { + root: jest.fn().mockReturnValue('rootTree'), + }; + + expect(getParseTree((mockParser as unknown) as OpenSearchPPLParser)).toBe('rootTree'); + expect(mockParser.root).toHaveBeenCalled(); + }); +}); + +describe('enrichAutocompleteResult', () => { + it('should correctly enrich the autocomplete result with additional suggestions', () => { + const baseResult = { errors: [], suggestKeywords: [] }; + const rules = new Map(); + const tokenStream = null; + const cursorTokenIndex = 0; + const cursor = { line: 1, column: 1 }; + const query = 'source = sample-index | '; + + const result = enrichAutocompleteResult( + baseResult, + rules, + (tokenStream as unknown) as TokenStream, + cursorTokenIndex, + cursor, + query + ); + + expect(result.suggestKeywords).toBeDefined(); + expect(result.suggestColumns).toBeUndefined(); + }); + + it('should handle errors gracefully and return base result', () => { + const baseResult = { errors: [], suggestKeywords: [] }; + const rules = new Map(); + const tokenStream = null; + const cursorTokenIndex = 0; + const cursor = { line: 1, column: 1 }; + const query = 'SELECT * FROM table'; + + jest.spyOn(console, 'error').mockImplementation(() => {}); + + const result = enrichAutocompleteResult( + baseResult, + rules, + (tokenStream as unknown) as TokenStream, + cursorTokenIndex, + cursor, + query + ); + + expect(result).toMatchObject(baseResult); + }); +}); diff --git a/src/plugins/data/public/antlr/opensearch_ppl/opensearch_ppl_autocomplete.ts b/src/plugins/data/public/antlr/opensearch_ppl/opensearch_ppl_autocomplete.ts index 99d74a2e7b62..c1260151ae38 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/opensearch_ppl_autocomplete.ts +++ b/src/plugins/data/public/antlr/opensearch_ppl/opensearch_ppl_autocomplete.ts @@ -4,7 +4,7 @@ */ import * as c3 from 'antlr4-c3'; -import { ParseTree, TokenStream } from 'antlr4ng'; +import { ParseTree, Token, TokenStream } from 'antlr4ng'; import { AutocompleteData, AutocompleteResultBase, @@ -16,6 +16,7 @@ import { } from '../shared/types'; import { OpenSearchPPLLexer } from './.generated/OpenSearchPPLLexer'; import { OpenSearchPPLParser } from './.generated/OpenSearchPPLParser'; +import { removePotentialBackticks } from '../shared/utils'; // These are keywords that we do not want to show in autocomplete export function getIgnoredTokens(): number[] { @@ -36,16 +37,19 @@ export function getIgnoredTokens(): number[] { OpenSearchPPLParser.COMMA, OpenSearchPPLParser.PLUS, OpenSearchPPLParser.MINUS, - // OpenSearchPPLParser.EQUAL, - // OpenSearchPPLParser.NOT_EQUAL, - // OpenSearchPPLParser.LESS, - // OpenSearchPPLParser.NOT_LESS, - // OpenSearchPPLParser.GREATER, - // OpenSearchPPLParser.NOT_GREATER, - // OpenSearchPPLParser.OR, - // OpenSearchPPLParser.AND, - // OpenSearchPPLParser.XOR, - // OpenSearchPPLParser.NOT, + OpenSearchPPLParser.EQUAL, + OpenSearchPPLParser.NOT_EQUAL, + OpenSearchPPLParser.LESS, + OpenSearchPPLParser.NOT_LESS, + OpenSearchPPLParser.GREATER, + OpenSearchPPLParser.NOT_GREATER, + OpenSearchPPLParser.OR, + OpenSearchPPLParser.AND, + OpenSearchPPLParser.XOR, + OpenSearchPPLParser.NOT, + OpenSearchPPLParser.LT_PRTHS, + OpenSearchPPLParser.RT_PRTHS, + OpenSearchPPLParser.IN, ]; for (let i = firstFunctionIndex; i <= lastFunctionIndex; i++) { if (!operatorsToInclude.includes(i)) { @@ -64,6 +68,13 @@ const tokenDictionary: any = { CLOSING_BRACKET: OpenSearchPPLParser.RT_PRTHS, SEARCH: OpenSearchPPLParser.SEARCH, SOURCE: OpenSearchPPLParser.SOURCE, + PIPE: OpenSearchPPLParser.PIPE, + ID: OpenSearchPPLParser.ID, + EQUAL: OpenSearchPPLParser.EQUAL, + IN: OpenSearchPPLParser.IN, + COMMA: OpenSearchPPLParser.COMMA, + BACKTICK_QUOTE: OpenSearchPPLParser.BQUOTA_STRING, + DOT: OpenSearchPPLParser.DOT, }; const rulesToVisit = new Set([ @@ -78,6 +89,11 @@ const rulesToVisit = new Set([ OpenSearchPPLParser.RULE_multiFieldRelevanceFunctionName, OpenSearchPPLParser.RULE_positionFunctionName, OpenSearchPPLParser.RULE_evalFunctionName, + OpenSearchPPLParser.RULE_literalValue, + OpenSearchPPLParser.RULE_integerLiteral, + OpenSearchPPLParser.RULE_decimalLiteral, + OpenSearchPPLParser.RULE_keywordsCanBeId, + OpenSearchPPLParser.RULE_renameClasue, ]); export function processVisitedRules( @@ -88,9 +104,16 @@ export function processVisitedRules( let suggestSourcesOrTables: OpenSearchPplAutocompleteResult['suggestSourcesOrTables']; let suggestAggregateFunctions = false; let shouldSuggestColumns = false; + let suggestValuesForColumn: string | undefined; + let suggestRenameAs = false; for (const [ruleId, rule] of rules) { switch (ruleId) { + case OpenSearchPPLParser.RULE_integerLiteral: + case OpenSearchPPLParser.RULE_decimalLiteral: + case OpenSearchPPLParser.RULE_keywordsCanBeId: { + break; + } case OpenSearchPPLParser.RULE_statsFunctionName: { suggestAggregateFunctions = true; break; @@ -101,6 +124,84 @@ export function processVisitedRules( } case OpenSearchPPLParser.RULE_tableIdent: { suggestSourcesOrTables = SourceOrTableSuggestion.TABLES; + break; + } + case OpenSearchPPLParser.RULE_renameClasue: { + // if we're in the rename rule, we're either suggesting + // field first token + // 'as' second token + // nothing third token, because it should be user specified + + const expressionStart = rule.startTokenIndex; + if (expressionStart === cursorTokenIndex) { + shouldSuggestColumns = true; + break; + } + + if (expressionStart + 2 === cursorTokenIndex) { + suggestRenameAs = true; + break; + } + + break; + } + case OpenSearchPPLParser.RULE_literalValue: { + // on its own, this rule would be triggered for relevance expressions and span. span + // has its own rule, and relevance .... + // todo: create span rule + // todo: check if relevance expressions have incorrect behavior here + let currentIndex = cursorTokenIndex - 1; + + // get the last token that appears other than whitespace + const lastToken = + tokenStream.get(currentIndex).type === tokenDictionary.SPACE + ? tokenStream.get(currentIndex - 1) + : tokenStream.get(currentIndex); + + // we only want to get the value if the very last token before WS is =, or + // if its paren/comma and we pass by IN later. we don't need to check that we pass IN + // because there is no valid syntax that will encounter the literal value rule with the + // tokens '(' or ',' + if ( + ![tokenDictionary.EQUAL, tokenDictionary.OPENING_BRACKET, tokenDictionary.COMMA].includes( + lastToken.type + ) + ) { + break; + } + + const validIDToken = (token: Token) => { + return token.type === tokenDictionary.ID || token.type === tokenDictionary.BACKTICK_QUOTE; + }; + + while (currentIndex > -1) { + const token = tokenStream.get(currentIndex); + if (!token || token.type === tokenDictionary.PIPE) { + break; + } + + // NOTE: according to grammar, backticks in PPL are only possible for fields + if (validIDToken(token)) { + let combinedText = token.text ?? ''; + + // stitch together IDs separated by DOTs + let lookBehindIndex = currentIndex; + while (lookBehindIndex > -1) { + lookBehindIndex--; + const prevToken = tokenStream.get(lookBehindIndex); + if (!prevToken || prevToken.type !== tokenDictionary.DOT) { + break; + } + lookBehindIndex--; + combinedText = `${tokenStream.get(lookBehindIndex).text ?? ''}.${combinedText}`; + } + + suggestValuesForColumn = removePotentialBackticks(combinedText); + break; + } + currentIndex--; + } + break; } } } @@ -109,6 +210,8 @@ export function processVisitedRules( suggestSourcesOrTables, suggestAggregateFunctions, shouldSuggestColumns, + suggestValuesForColumn, + suggestRenameAs, }; } @@ -145,7 +248,7 @@ export function enrichAutocompleteResult( const result: OpenSearchPplAutocompleteResult = { ...baseResult, ...suggestionsFromRules, - suggestColumns: shouldSuggestColumns ? ({ name: '' } as TableContextSuggestion) : undefined, + suggestColumns: shouldSuggestColumns ? ({} as TableContextSuggestion) : undefined, }; return result; } diff --git a/src/plugins/data/public/antlr/opensearch_sql/code_completion.test.ts b/src/plugins/data/public/antlr/opensearch_sql/code_completion.test.ts new file mode 100644 index 000000000000..d059d3c344a4 --- /dev/null +++ b/src/plugins/data/public/antlr/opensearch_sql/code_completion.test.ts @@ -0,0 +1,149 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { monaco } from '@osd/monaco'; +import { getSuggestions } from './code_completion'; +import { SQL_SYMBOLS } from './constants'; +import { IndexPattern } from '../../index_patterns'; +import { IDataPluginServices } from '../../types'; +import { QuerySuggestion } from '../../autocomplete'; +import * as utils from '../shared/utils'; + +describe('sql code_completion', () => { + describe('getSuggestions', () => { + const mockIndexPattern = { + title: 'test-index', + fields: [ + { name: 'field1', type: 'string' }, + { name: 'field2', type: 'number' }, + { name: 'field2', type: 'boolean' }, + ], + } as IndexPattern; + + const mockServices = { + appName: 'test-app', + } as IDataPluginServices; + + const mockPosition = { + lineNumber: 1, + column: 1, + } as monaco.Position; + + const getSimpleSuggestions = async ( + query: string, + position: monaco.Position = new monaco.Position(1, query.length + 1) + ) => { + return getSuggestions({ + query, + indexPattern: mockIndexPattern, + position, + language: 'SQL', + selectionStart: 0, + selectionEnd: 0, + services: mockServices, + }); + }; + + const checkSuggestionsContain = ( + result: QuerySuggestion[], + expected: Partial + ) => { + expect( + result.some( + (suggestion) => suggestion.text === expected.text && suggestion.type === expected.type + ) + ).toBeTruthy(); + }; + + it('should return empty array when required parameters are missing', async () => { + const result = await getSuggestions({ + query: '', + indexPattern: (null as unknown) as IndexPattern, + position: mockPosition, + language: 'SQL', + selectionStart: 0, + selectionEnd: 0, + services: (null as unknown) as IDataPluginServices, + }); + + expect(result).toEqual([]); + }); + + it('should suggest table name when suggestViewsOrTables is true', async () => { + const result = await getSimpleSuggestions('SELECT * FROM '); + + checkSuggestionsContain(result, { + text: 'test-index', + type: monaco.languages.CompletionItemKind.Struct, + }); + }); + + it('should suggest columns when suggestColumns is true', async () => { + const result = await getSimpleSuggestions('SELECT * FROM test-index WHERE '); + + checkSuggestionsContain(result, { + text: 'field1', + type: monaco.languages.CompletionItemKind.Field, + }); + }); + + it('should suggest EQ for column value predicate', async () => { + const result = await getSimpleSuggestions('SELECT * FROM test-index WHERE field1 '); + + checkSuggestionsContain(result, { + text: '=', + type: monaco.languages.CompletionItemKind.Operator, + }); + }); + + it('should suggest LPAREN for column value predicate', async () => { + const result = await getSimpleSuggestions('SELECT * FROM test-index WHERE field1 IN '); + + checkSuggestionsContain(result, { + text: '(', + type: monaco.languages.CompletionItemKind.Keyword, + }); + }); + + it('should suggest END_IN_TERMs for column value predicate', async () => { + const result = await getSimpleSuggestions( + "SELECT * FROM test-index WHERE field1 IN ( 'value' " + ); + + [',', ')'].forEach((term) => { + checkSuggestionsContain(result, { + text: term, + type: monaco.languages.CompletionItemKind.Keyword, + }); + }); + }); + + it.skip('should suggest aggregate functions when appropriate', async () => { + const result = await getSimpleSuggestions('SELECT * FROM test-index WHERE '); + + SQL_SYMBOLS.AGREGATE_FUNCTIONS.forEach((func) => { + checkSuggestionsContain(result, { + text: func, + type: monaco.languages.CompletionItemKind.Function, + }); + }); + }); + + it('should suggest values after column names', async () => { + const mockedValues = ['value1', 'value2']; + jest.spyOn(utils, 'fetchColumnValues').mockResolvedValue(mockedValues); + + const result = await getSimpleSuggestions('SELECT * FROM test-index WHERE field1 = '); + + expect(utils.fetchColumnValues).toHaveBeenCalled(); + mockedValues.forEach((val) => { + checkSuggestionsContain(result, { + text: val, + type: monaco.languages.CompletionItemKind.Value, + }); + }); + }); + }); +}); diff --git a/src/plugins/data/public/antlr/opensearch_sql/code_completion.ts b/src/plugins/data/public/antlr/opensearch_sql/code_completion.ts index a0695a424393..e4858e0c7da2 100644 --- a/src/plugins/data/public/antlr/opensearch_sql/code_completion.ts +++ b/src/plugins/data/public/antlr/opensearch_sql/code_completion.ts @@ -4,11 +4,20 @@ */ import { monaco } from '@osd/monaco'; -import { CursorPosition, OpenSearchSqlAutocompleteResult } from '../shared/types'; +import { + ColumnValuePredicate, + CursorPosition, + OpenSearchSqlAutocompleteResult, +} from '../shared/types'; import { openSearchSqlAutocompleteData } from './opensearch_sql_autocomplete'; -import { SQL_SYMBOLS } from './constants'; +import { SQL_SUGGESTION_IMPORTANCE, SQL_SYMBOLS } from './constants'; import { QuerySuggestion, QuerySuggestionGetFnArgs } from '../../autocomplete'; -import { fetchFieldSuggestions, parseQuery } from '../shared/utils'; +import { + fetchColumnValues, + formatFieldsToSuggestions, + formatValuesToSuggestions, + parseQuery, +} from '../shared/utils'; import { SuggestionItemDetailsTags } from '../shared/constants'; export interface SuggestionParams { @@ -26,6 +35,7 @@ export const getSuggestions = async ({ selectionStart, selectionEnd, indexPattern, + datasetType, position, query, services, @@ -42,9 +52,74 @@ export const getSuggestions = async ({ // Fetch columns and values if (suggestions.suggestColumns?.tables?.length) { - // NOTE: currently the suggestions return the table present in the query, but since the - // parameters already provide that, it may not be needed anymore - finalSuggestions.push(...fetchFieldSuggestions(indexPattern)); + finalSuggestions.push(...formatFieldsToSuggestions(indexPattern, (f: any) => `${f} `, '2')); + } + + if (suggestions.suggestColumnValuePredicate) { + switch (suggestions.suggestColumnValuePredicate) { + case ColumnValuePredicate.COLUMN: { + finalSuggestions.push( + ...formatFieldsToSuggestions(indexPattern, (f: any) => `${f} `, '2') + ); + break; + } + case ColumnValuePredicate.OPERATOR: { + finalSuggestions.push({ + text: '=', + insertText: '= ', + type: monaco.languages.CompletionItemKind.Operator, + detail: SuggestionItemDetailsTags.Operator, + sortText: '0', + }); + break; + } + case ColumnValuePredicate.LPAREN: { + finalSuggestions.push({ + text: '(', + insertText: '( ', + type: monaco.languages.CompletionItemKind.Keyword, + detail: SuggestionItemDetailsTags.Keyword, + sortText: '0', + }); + break; + } + case ColumnValuePredicate.END_IN_TERM: { + finalSuggestions.push({ + text: ',', + insertText: ', ', + type: monaco.languages.CompletionItemKind.Keyword, + detail: SuggestionItemDetailsTags.Keyword, + sortText: '0', + }); + finalSuggestions.push({ + text: ')', + insertText: ') ', + type: monaco.languages.CompletionItemKind.Keyword, + detail: SuggestionItemDetailsTags.Keyword, + sortText: '08', + }); + break; + } + case ColumnValuePredicate.VALUE: { + if (suggestions.suggestValuesForColumn) { + finalSuggestions.push( + ...formatValuesToSuggestions( + await fetchColumnValues( + indexPattern.title, + suggestions.suggestValuesForColumn, + services, + indexPattern.fields.find( + (field) => field.name === suggestions.suggestValuesForColumn + ), + datasetType + ).catch(() => []), + (val: any) => (typeof val === 'string' ? `'${val}' ` : `${val} `) + ) + ); + } + break; + } + } } // Fill in aggregate functions @@ -59,17 +134,28 @@ export const getSuggestions = async ({ ); } + if (suggestions.suggestViewsOrTables) { + finalSuggestions.push({ + text: indexPattern.title, + type: monaco.languages.CompletionItemKind.Struct, + insertText: `${indexPattern.title} `, + detail: SuggestionItemDetailsTags.Table, + }); + } + // Fill in SQL keywords if (suggestions.suggestKeywords?.length) { finalSuggestions.push( ...suggestions.suggestKeywords.map((sk) => ({ text: sk.value, type: monaco.languages.CompletionItemKind.Keyword, - insertText: sk.value, + insertText: `${sk.value} `, detail: SuggestionItemDetailsTags.Keyword, + sortText: SQL_SUGGESTION_IMPORTANCE.get(sk.id) ?? '9' + sk.value.toLowerCase(), })) ); } + return finalSuggestions; } catch (error) { // TODO: Handle errors appropriately, possibly logging or displaying a message to the user @@ -81,7 +167,7 @@ export const getOpenSearchSqlAutoCompleteSuggestions = ( query: string, cursor: CursorPosition ): OpenSearchSqlAutocompleteResult => { - return parseQuery({ + const initialResult = parseQuery({ Lexer: openSearchSqlAutocompleteData.Lexer, Parser: openSearchSqlAutocompleteData.Parser, tokenDictionary: openSearchSqlAutocompleteData.tokenDictionary, @@ -92,4 +178,39 @@ export const getOpenSearchSqlAutoCompleteSuggestions = ( query, cursor, }); + + if (!initialResult?.rerunAndCombine) { + return initialResult; + } + + // rerun with no preferred rules and specified context to grab missing lexer tokens + const contextResult = parseQuery({ + Lexer: openSearchSqlAutocompleteData.Lexer, + Parser: openSearchSqlAutocompleteData.Parser, + tokenDictionary: openSearchSqlAutocompleteData.tokenDictionary, + ignoredTokens: openSearchSqlAutocompleteData.ignoredTokens, + rulesToVisit: new Set(), + getParseTree: openSearchSqlAutocompleteData.getParseTree, + enrichAutocompleteResult: openSearchSqlAutocompleteData.enrichAutocompleteResult, + query, + cursor, + }); + + // only need to modify initial results if there are context keywords + if (contextResult?.suggestKeywords) { + if (!initialResult?.suggestKeywords) { + // set initial keywords to be context keywords + initialResult.suggestKeywords = contextResult.suggestKeywords; + } else { + // merge initial and context keywords + const combined = [...initialResult.suggestKeywords, ...contextResult.suggestKeywords]; + + // ES6 magic to filter out duplicate objects based on id field + initialResult.suggestKeywords = combined.filter( + (item, index, self) => index === self.findIndex((other) => other.id === item.id) + ); + } + } + + return initialResult; }; diff --git a/src/plugins/data/public/antlr/opensearch_sql/constants.ts b/src/plugins/data/public/antlr/opensearch_sql/constants.ts index 30ab55a35aa9..15e717fbd8f0 100644 --- a/src/plugins/data/public/antlr/opensearch_sql/constants.ts +++ b/src/plugins/data/public/antlr/opensearch_sql/constants.ts @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { OpenSearchSQLParser } from './.generated/OpenSearchSQLParser'; + export const SQL_SYMBOLS = { AGREGATE_FUNCTIONS: [ 'AVG', @@ -19,3 +21,8 @@ export const SQL_SYMBOLS = { 'STDDEV_SAMP', ], }; + +export const SQL_SUGGESTION_IMPORTANCE = new Map([ + [OpenSearchSQLParser.STAR, '1'], + [OpenSearchSQLParser.IN, '09'], +]); diff --git a/src/plugins/data/public/antlr/opensearch_sql/opensearch_sql_autocomplete.test.ts b/src/plugins/data/public/antlr/opensearch_sql/opensearch_sql_autocomplete.test.ts index 2bb7d27add86..6ccc002c6fbb 100644 --- a/src/plugins/data/public/antlr/opensearch_sql/opensearch_sql_autocomplete.test.ts +++ b/src/plugins/data/public/antlr/opensearch_sql/opensearch_sql_autocomplete.test.ts @@ -10,8 +10,8 @@ import { processVisitedRules, } from './opensearch_sql_autocomplete'; import { OpenSearchSQLParser } from './.generated/OpenSearchSQLParser'; -import { getPreviousToken } from './table'; import { TokenStream } from 'antlr4ng'; +import { ColumnValuePredicate } from '../shared/types'; jest.mock('./table'); describe('Token Dictionary and Ignored Tokens', () => { @@ -29,11 +29,20 @@ describe('Token Dictionary and Ignored Tokens', () => { }); describe('processVisitedRules', () => { + // createTokenStream takes a list of 'tokens' defined only by its type or an actual object to be returned as the Token + const createTokenStream = (list: Array) => + (({ + get: jest.fn((num: number) => + typeof list[num] === 'number' ? { type: list[num] } : list[num] + ), + } as unknown) as TokenStream); + it('should set the correct suggestions based on the rules visited', () => { const mockRules = new Map(); mockRules.set(OpenSearchSQLParser.RULE_tableName, {}); + const tokenStream = createTokenStream([1]); - const result = processVisitedRules(mockRules, 0, null); + const result = processVisitedRules(mockRules, 2, tokenStream); expect(result.suggestViewsOrTables).toBeDefined(); expect(result.suggestAggregateFunctions).toBe(false); }); @@ -42,27 +51,199 @@ describe('processVisitedRules', () => { const mockRules = new Map(); mockRules.set(OpenSearchSQLParser.RULE_tableName, {}); mockRules.set(OpenSearchSQLParser.RULE_aggregateFunction, {}); + const tokenStream = createTokenStream([1]); - const result = processVisitedRules(mockRules, 0, null); + const result = processVisitedRules(mockRules, 2, tokenStream); expect(result.suggestViewsOrTables).toBeDefined(); expect(result.suggestAggregateFunctions).toBe(true); }); - describe('processVisitedRules', () => { - it('should suggest values for column when RULE_constant is present', () => { + describe('Test Specific Rules', () => { + it('RULE_columnName - should suggest values for column when rule is present', () => { const mockRules = new Map(); - mockRules.set(OpenSearchSQLParser.RULE_constant, { ruleList: [] }); + mockRules.set(OpenSearchSQLParser.RULE_columnName, { ruleList: [] }); + const tokenStream = createTokenStream([1]); - const tokenStream = ({ - getText: jest.fn((start, stop) => 'column_name'), - } as unknown) as TokenStream; + const result = processVisitedRules(mockRules, 0, tokenStream); + expect(result.shouldSuggestColumns).toBe(true); + }); - (getPreviousToken as jest.Mock).mockReturnValue({ text: 'column_name' }); + it('RULE_columnName - suggests column aliases', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_columnName, { + ruleList: [ + OpenSearchSQLParser.RULE_groupByElements, + OpenSearchSQLParser.RULE_orderByElement, + ], + }); + const tokenStream = createTokenStream([1]); const result = processVisitedRules(mockRules, 0, tokenStream); + expect(result.shouldSuggestColumns).toBe(true); + expect(result.shouldSuggestColumnAliases).toBe(true); + }); + + it('RULE_predicate - should suggest columns when predicate rule is present', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([1]); - expect(result.suggestValuesForColumn).toBe('column_name'); + const result = processVisitedRules(mockRules, 0, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.COLUMN); + }); + + it('RULE_predicate - should suggest operators after ID', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([OpenSearchSQLParser.ID, OpenSearchSQLParser.SPACE]); + + const result = processVisitedRules(mockRules, 2, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.OPERATOR); }); + + it('RULE_predicate - should suggest values after comparison operator EQ', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([ + { type: OpenSearchSQLParser.ID, text: 'columnName' }, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.EQUAL_SYMBOL, + OpenSearchSQLParser.SPACE, + ]); + + const result = processVisitedRules(mockRules, 4, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.VALUE); + expect(result.suggestValuesForColumn).toBe('columnName'); + }); + + it('RULE_predicate - should suggest left parenthesis after IN operator', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([ + OpenSearchSQLParser.ID, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.IN, + OpenSearchSQLParser.SPACE, + ]); + + const result = processVisitedRules(mockRules, 4, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.LPAREN); + expect(result.suggestValuesForColumn).toBeUndefined(); + }); + + it('RULE_predicate - should suggest values after opening parenthesis in IN clause', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([ + { type: OpenSearchSQLParser.ID, text: 'columnName' }, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.IN, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.LR_BRACKET, + OpenSearchSQLParser.SPACE, + ]); + + const result = processVisitedRules(mockRules, 6, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.VALUE); + expect(result.suggestValuesForColumn).toBe('columnName'); + }); + + it('RULE_predicate - should suggest comma or closing parenthesis after value in IN clause', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([ + OpenSearchSQLParser.ID, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.IN, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.LR_BRACKET, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.STRING_LITERAL, + OpenSearchSQLParser.SPACE, + ]); + + const result = processVisitedRules(mockRules, 8, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.END_IN_TERM); + expect(result.suggestValuesForColumn).toBeUndefined(); + }); + + it('RULE_predicate - should suggest values after comma in IN clause', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([ + { type: OpenSearchSQLParser.ID, text: 'columnName' }, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.IN, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.LR_BRACKET, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.STRING_LITERAL, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.COMMA, + OpenSearchSQLParser.SPACE, + ]); + + const result = processVisitedRules(mockRules, 10, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.VALUE); + expect(result.suggestValuesForColumn).toBe('columnName'); + }); + + it('RULE_predicate - should handle invalid token sequence', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([OpenSearchSQLParser.EQUAL_SYMBOL]); + + const result = processVisitedRules(mockRules, 1, tokenStream); + expect(result.suggestColumnValuePredicate).toBeUndefined(); + }); + + it('RULE_predicate - should suggest value with no spaces', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([ + OpenSearchSQLParser.ID, + OpenSearchSQLParser.EQUAL_SYMBOL, + ]); + + const result = processVisitedRules(mockRules, 2, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.VALUE); + }); + + it('RULE_predicate - should suggest value with too many spaces', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([ + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.ID, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.EQUAL_SYMBOL, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.SPACE, + ]); + + const result = processVisitedRules(mockRules, 9, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.VALUE); + }); + + it('RULE_predicate - returns the columnName', () => { + const mockRules = new Map(); + mockRules.set(OpenSearchSQLParser.RULE_predicate, { startTokenIndex: 0 }); + const tokenStream = createTokenStream([ + { type: OpenSearchSQLParser.ID, text: 'columnName' }, + OpenSearchSQLParser.SPACE, + OpenSearchSQLParser.EQUAL_SYMBOL, + OpenSearchSQLParser.SPACE, + ]); + + const result = processVisitedRules(mockRules, 4, tokenStream); + expect(result.suggestColumnValuePredicate).toBe(ColumnValuePredicate.VALUE); + expect(result.suggestValuesForColumn).toBe('columnName'); + }); + + // NOTE: nested predicates don't need to be tested because nothing nested is suggested }); }); @@ -101,7 +282,7 @@ describe('enrichAutocompleteResult', () => { const result = enrichAutocompleteResult( baseResult, rules, - tokenStream, + (tokenStream as unknown) as TokenStream, cursorTokenIndex, cursor, query @@ -124,7 +305,7 @@ describe('enrichAutocompleteResult', () => { const result = enrichAutocompleteResult( baseResult, rules, - tokenStream, + (tokenStream as unknown) as TokenStream, cursorTokenIndex, cursor, query @@ -147,7 +328,7 @@ describe('enrichAutocompleteResult', () => { const result = enrichAutocompleteResult( baseResult, rules, - tokenStream, + (tokenStream as unknown) as TokenStream, cursorTokenIndex, cursor, query diff --git a/src/plugins/data/public/antlr/opensearch_sql/opensearch_sql_autocomplete.ts b/src/plugins/data/public/antlr/opensearch_sql/opensearch_sql_autocomplete.ts index caaca73a5814..a9301d3316f5 100644 --- a/src/plugins/data/public/antlr/opensearch_sql/opensearch_sql_autocomplete.ts +++ b/src/plugins/data/public/antlr/opensearch_sql/opensearch_sql_autocomplete.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ParseTree, TokenStream } from 'antlr4ng'; +import { ParseTree, Token, TokenStream } from 'antlr4ng'; import * as c3 from 'antlr4-c3'; import { ColumnAliasSymbol, TableSymbol } from './symbol_table'; import { @@ -14,6 +14,7 @@ import { ProcessVisitedRulesResult, TableOrViewSuggestion, OpenSearchSqlAutocompleteResult, + ColumnValuePredicate, } from '../shared/types'; import { OpenSearchSQLLexer } from './.generated/OpenSearchSQLLexer'; import { @@ -29,6 +30,7 @@ import { getPreviousToken, } from './table'; import { shouldSuggestTemplates } from './parse'; +import { removePotentialBackticks } from '../shared/utils'; const tokenDictionary: TokenDictionary = { SPACE: OpenSearchSQLParser.SPACE, @@ -38,6 +40,7 @@ const tokenDictionary: TokenDictionary = { JOIN: OpenSearchSQLParser.JOIN, SEMICOLON: OpenSearchSQLParser.SEMI, SELECT: OpenSearchSQLParser.SELECT, + ID: OpenSearchSQLParser.ID, }; // These are keywords that we do not want to show in autocomplete @@ -47,7 +50,6 @@ export function getIgnoredTokens(): number[] { const firstOperatorIndex = OpenSearchSQLParser.SLASH; const lastOperatorIndex = OpenSearchSQLParser.ERROR_RECOGNITION; for (let i = firstOperatorIndex; i <= lastOperatorIndex; i++) { - // We actually want Star to appear in autocomplete tokens.push(i); } @@ -80,6 +82,7 @@ const rulesToVisit = new Set([ OpenSearchSQLParser.RULE_specificFunction, OpenSearchSQLParser.RULE_windowFunctionClause, OpenSearchSQLParser.RULE_comparisonOperator, + OpenSearchSQLParser.RULE_predicate, ]); class OpenSearchSqlSymbolTableVisitor @@ -108,7 +111,7 @@ class OpenSearchSqlSymbolTableVisitor visitSelectElementAlias = (context: SelectElementsContext): {} => { try { - this.symbolTable.addNewSymbolOfType(ColumnAliasSymbol, this.scope, context.uid().getText()); + this.symbolTable.addNewSymbolOfType(ColumnAliasSymbol, this.scope, context.getText()); } catch (error) { if (!(error instanceof c3.DuplicateSymbolError)) { throw error; @@ -130,10 +133,17 @@ export function processVisitedRules( let shouldSuggestColumns = false; let shouldSuggestColumnAliases = false; let suggestValuesForColumn: string | undefined; + let suggestColumnValuePredicate: ColumnValuePredicate | undefined; + let rerunAndCombine = false; for (const [ruleId, rule] of rules) { switch (ruleId) { case OpenSearchSQLParser.RULE_tableName: { + // prevent table suggestion if the previous token is an ID (before WS) + if (tokenStream.get(cursorTokenIndex - 2).type === OpenSearchSQLParser.ID) { + break; + } + if ( getPreviousToken( tokenStream, @@ -143,9 +153,10 @@ export function processVisitedRules( ) ) { suggestViewsOrTables = TableOrViewSuggestion.TABLES; - } else { - suggestViewsOrTables = TableOrViewSuggestion.ALL; } + // we cannot stop a table suggestion if there exists an identifier because that is common within select clauses + suggestViewsOrTables = TableOrViewSuggestion.ALL; + break; } case OpenSearchSQLParser.RULE_aggregateFunction: { @@ -167,28 +178,127 @@ export function processVisitedRules( } break; } - case OpenSearchSQLParser.RULE_constant: { - const previousToken = getPreviousToken( - tokenStream, - tokenDictionary, - cursorTokenIndex, - OpenSearchSQLLexer.ID - ); - if (previousToken) { - suggestValuesForColumn = previousToken.text; + case OpenSearchSQLParser.RULE_predicate: { + rerunAndCombine = true; + + const validIDToken = (token: Token) => { + return ( + token.type === OpenSearchSQLParser.ID || + token.type === OpenSearchSQLParser.BACKTICK_QUOTE_ID + ); + }; + + /** + * creates a list of the tokens from the start of the pedicate to the end + * intentionally omit all tokens with type SPACE + * now we know we only have "significant tokens" + */ + + const expressionStart = rule.startTokenIndex; + + // from expressionStart to cursorTokenIndex, grab all the tokens and put them in a list. + // ignore whitespace tokens, and wrap up IDs into one token if dot separated + const sigTokens = []; + for (let i = expressionStart; i < cursorTokenIndex; i++) { + const token = tokenStream.get(i); + // remove spaces + if (token.type === OpenSearchSQLParser.SPACE) { + continue; + } + // remove NOT, because it is irrelevant for suggestions and prevents IN suggestions + if (token.type === OpenSearchSQLParser.NOT) { + continue; + } + // chain together IDs on DOT + if (token.type === OpenSearchSQLParser.DOT) { + if (sigTokens.length < 1 || !validIDToken(sigTokens[sigTokens.length - 1])) { + continue; + } + i++; + const nextToken = tokenStream.get(i); + if (!validIDToken(nextToken)) { + continue; + } + sigTokens[sigTokens.length - 1].text += + '.' + removePotentialBackticks(nextToken?.text ?? ''); + continue; + } + sigTokens.push(token); } + + // catch columnName rule so try to match with it to suggest beyond it. + // this means it can include DOTs, be ID, or be BACKTICK_QUOTE_ID. we'll avoid + // matching with keywordsCanBeId and scalarFunctionName for now + + // if we don't have any tokens so far, suggest fields + if (sigTokens.length === 0) { + suggestColumnValuePredicate = ColumnValuePredicate.COLUMN; + break; + } + + // if we have one token that is an ID, we have to suggest operators + if (sigTokens.length === 1 && validIDToken(sigTokens[0])) { + suggestColumnValuePredicate = ColumnValuePredicate.OPERATOR; + break; + } + + // if our second token is an EQUAL, and we have no other tokens, we're in a binaryComparisonPredicate + // and should suggest values + if ( + sigTokens.length === 2 && + validIDToken(sigTokens[0]) && + sigTokens[1].type === OpenSearchSQLParser.EQUAL_SYMBOL + ) { + suggestColumnValuePredicate = ColumnValuePredicate.VALUE; + suggestValuesForColumn = removePotentialBackticks(sigTokens[0].text ?? ''); + break; + } + + // if our second token is an IN, and we have no other tokens, we're in an inPredicate and should + // suggest LPAREN + if ( + sigTokens.length === 2 && + validIDToken(sigTokens[0]) && + sigTokens[1].type === OpenSearchSQLParser.IN + ) { + suggestColumnValuePredicate = ColumnValuePredicate.LPAREN; + break; + } + + // if we're in an inPredicate and the syntax is right, we should suggest values or a post + // value-term suggestion (comma/RPAREN) + if ( + sigTokens.length >= 3 && + validIDToken(sigTokens[0]) && + sigTokens[1].type === OpenSearchSQLParser.IN && + sigTokens[2].type === OpenSearchSQLParser.LR_BRACKET && + sigTokens[sigTokens.length - 1].type !== OpenSearchSQLParser.RR_BRACKET + ) { + if (sigTokens[sigTokens.length - 1].type === OpenSearchSQLParser.STRING_LITERAL) { + suggestColumnValuePredicate = ColumnValuePredicate.END_IN_TERM; + } else { + suggestColumnValuePredicate = ColumnValuePredicate.VALUE; + suggestValuesForColumn = removePotentialBackticks( + tokenStream.get(expressionStart).text ?? '' + ); + } + break; + } + break; } } } return { + rerunAndCombine, suggestViewsOrTables, suggestAggregateFunctions, suggestScalarFunctions, shouldSuggestColumns, shouldSuggestColumnAliases, suggestValuesForColumn, + suggestColumnValuePredicate, }; } diff --git a/src/plugins/data/public/antlr/opensearch_sql/table.ts b/src/plugins/data/public/antlr/opensearch_sql/table.ts index 976400728aa3..5bb02596ea6c 100644 --- a/src/plugins/data/public/antlr/opensearch_sql/table.ts +++ b/src/plugins/data/public/antlr/opensearch_sql/table.ts @@ -25,6 +25,7 @@ export interface TokenDictionary { JOIN: number; SEMICOLON: number; SELECT: number; + ID: number; } export interface TableQueryPosition extends TableQueryPositionBase { diff --git a/src/plugins/data/public/antlr/shared/constants.ts b/src/plugins/data/public/antlr/shared/constants.ts index 63d9a3a3451b..27ca4252b95c 100644 --- a/src/plugins/data/public/antlr/shared/constants.ts +++ b/src/plugins/data/public/antlr/shared/constants.ts @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { IndexPattern } from '../../index_patterns'; + // suggestion item details tags export const enum SuggestionItemDetailsTags { Keyword = 'Keyword', @@ -10,5 +12,170 @@ export const enum SuggestionItemDetailsTags { Value = 'Value', Operator = 'Operator', Table = 'Table', + Command = 'Command', } export const quotesRegex = /^'(.*)'$/; + +export const testingIndex = ({ + title: 'opensearch_dashboards_sample_data_flights', + fields: [ + { + count: 0, + name: 'Carrier', + displayName: 'Carrier', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: undefined, + }, + { + count: 2, + name: 'DestCityName', + displayName: 'DestCityName', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: undefined, + }, + { + count: 0, + name: 'DestCountry', + displayName: 'DestCountry', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: undefined, + }, + { + count: 0, + name: 'DestWeather', + displayName: 'DestWeather', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: undefined, + }, + { + count: 0, + name: 'DistanceMiles', + displayName: 'DistanceMiles', + type: 'number', + esTypes: ['float'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: undefined, + }, + { + count: 0, + name: 'FlightDelay', + displayName: 'FlightDelay', + type: 'boolean', + esTypes: ['boolean'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: undefined, + }, + { + count: 0, + name: 'FlightNum', + displayName: 'FlightNum', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: undefined, + }, + { + count: 0, + name: 'OriginWeather', + displayName: 'OriginWeather', + type: 'string', + esTypes: ['keyword'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: true, + subType: undefined, + }, + { + count: 0, + name: '_id', + displayName: '_id', + type: 'string', + esTypes: ['_id'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: false, + subType: undefined, + }, + { + count: 0, + name: '_index', + displayName: '_index', + type: 'string', + esTypes: ['_index'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: false, + subType: undefined, + }, + { + count: 0, + name: '_score', + displayName: '_score', + type: 'number', + scripted: false, + searchable: false, + aggregatable: false, + readFromDocValues: false, + subType: undefined, + }, + { + count: 0, + name: '_source', + displayName: '_source', + type: '_source', + esTypes: ['_source'], + scripted: false, + searchable: false, + aggregatable: false, + readFromDocValues: false, + subType: undefined, + }, + { + count: 0, + name: '_type', + displayName: '_type', + type: 'string', + esTypes: ['_type'], + scripted: false, + searchable: true, + aggregatable: true, + readFromDocValues: false, + subType: undefined, + }, + ], + getFieldByName: (fieldName: string) => { + return testingIndex.fields.find((field) => field.name === fieldName); + }, +} as unknown) as IndexPattern; diff --git a/src/plugins/data/public/antlr/shared/types.ts b/src/plugins/data/public/antlr/shared/types.ts index 36a9748bd719..0643459746b6 100644 --- a/src/plugins/data/public/antlr/shared/types.ts +++ b/src/plugins/data/public/antlr/shared/types.ts @@ -59,6 +59,14 @@ export interface ColumnAliasSuggestion { name: string; } +export enum ColumnValuePredicate { + COLUMN = 'COLUMN', + VALUE = 'VALUE', + OPERATOR = 'OPERATOR', + LPAREN = 'LPAREN', + END_IN_TERM = 'END_IN_TERM', +} + export type LexerConstructor = new (input: CharStream) => T; export type ParserConstructor = new (input: CommonTokenStream) => T; @@ -86,10 +94,13 @@ export interface CursorPosition { export interface OpenSearchSqlAutocompleteResult extends AutocompleteResultBase { suggestViewsOrTables?: TableOrViewSuggestion; + suggestColumnValuePredicate?: ColumnValuePredicate; + rerunAndCombine?: boolean; } export interface OpenSearchPplAutocompleteResult extends AutocompleteResultBase { suggestSourcesOrTables?: SourceOrTableSuggestion; + suggestRenameAs?: boolean; } export enum TableOrViewSuggestion { diff --git a/src/plugins/data/public/antlr/shared/utils.test.ts b/src/plugins/data/public/antlr/shared/utils.test.ts index c9f53cb3de0a..a2001b7d4c4c 100644 --- a/src/plugins/data/public/antlr/shared/utils.test.ts +++ b/src/plugins/data/public/antlr/shared/utils.test.ts @@ -4,8 +4,20 @@ */ import { of } from 'rxjs'; -import { fetchData } from './utils'; -import { QueryStringManager } from '../../query'; +import { + fetchColumnValues, + fetchData, + formatFieldsToSuggestions, + formatValuesToSuggestions, +} from './utils'; +import { IQueryStart, QueryStringContract, QueryStringManager } from '../../query'; +import { IndexPattern, IndexPatternField } from '../../index_patterns'; +import { monaco } from '@osd/monaco'; +import { SuggestionItemDetailsTags } from './constants'; +import { DataPublicPluginStart, IDataPluginServices } from '../../types'; +import { HttpSetup } from 'opensearch-dashboards/public'; +import { IUiSettingsClient } from 'opensearch-dashboards/public'; +import { UI_SETTINGS } from '../../../common'; describe('fetchData', () => { it('should fetch data using the dataSourceRequestHandler', async () => { @@ -21,10 +33,8 @@ describe('fetchData', () => { ...mockQuery, }, })); - const mockApi = { - http: { - fetch: jest.fn().mockResolvedValue('fetchedData'), - }, + const mockApi: any = { + fetch: jest.fn().mockResolvedValue('fetchedData'), }; const mockQueryString: Partial = { getUpdates$: jest.fn().mockReturnValue(of(mockQuery)), @@ -51,10 +61,8 @@ describe('fetchData', () => { const mockQueryFormatter = jest.fn((table) => ({ query: { qs: `formatted ${table}`, format: 'jdbc', ...mockQuery }, })); - const mockApi = { - http: { - fetch: jest.fn().mockResolvedValue('fetchedData'), - }, + const mockApi: any = { + fetch: jest.fn().mockResolvedValue('fetchedData'), }; const mockQueryString: Partial = { getUpdates$: jest.fn().mockReturnValue(of(undefined)), @@ -72,3 +80,386 @@ describe('fetchData', () => { expect(mockQueryFormatter).toHaveBeenCalledWith('table2'); }); }); + +describe('formatFieldsToSuggestions', () => { + let mockIndexPattern: IndexPattern; + + beforeEach(() => { + // Setup mock index pattern + mockIndexPattern = { + fields: [ + { name: 'timestamp', type: 'date' }, + { name: 'message', type: 'text' }, + { name: 'status', type: 'keyword' }, + ], + } as IndexPattern; + }); + + test('should fetch field suggestions from index pattern', async () => { + const result = formatFieldsToSuggestions(mockIndexPattern); + + expect(result).toHaveLength(3); + expect(result).toEqual([ + { + detail: 'Field: date', + text: 'timestamp', + type: monaco.languages.CompletionItemKind.Field, + }, + { detail: 'Field: text', text: 'message', type: monaco.languages.CompletionItemKind.Field }, + { + detail: 'Field: keyword', + text: 'status', + type: monaco.languages.CompletionItemKind.Field, + }, + ]); + }); + + test('should fetch suggestions with modified insert text', async () => { + const result = formatFieldsToSuggestions(mockIndexPattern, (f: any) => `${f} : `); + + expect(result).toHaveLength(3); + expect(result).toEqual([ + { + detail: 'Field: date', + insertText: 'timestamp : ', + text: 'timestamp', + type: monaco.languages.CompletionItemKind.Field, + }, + { + detail: 'Field: text', + insertText: 'message : ', + text: 'message', + type: monaco.languages.CompletionItemKind.Field, + }, + { + detail: 'Field: keyword', + insertText: 'status : ', + text: 'status', + type: monaco.languages.CompletionItemKind.Field, + }, + ]); + }); + + test('should fetch suggestions with sort importance', async () => { + const result = formatFieldsToSuggestions(mockIndexPattern, (f: any) => `${f} = `, '01'); + + expect(result).toHaveLength(3); + expect(result).toEqual([ + { + detail: 'Field: date', + insertText: 'timestamp = ', + text: 'timestamp', + type: monaco.languages.CompletionItemKind.Field, + sortText: '01', + }, + { + detail: 'Field: text', + insertText: 'message = ', + text: 'message', + type: monaco.languages.CompletionItemKind.Field, + sortText: '01', + }, + { + detail: 'Field: keyword', + insertText: 'status = ', + text: 'status', + type: monaco.languages.CompletionItemKind.Field, + sortText: '01', + }, + ]); + }); +}); + +describe('formatValuesToSuggestions', () => { + const stringQuoter = (val: any) => (typeof val === 'string' ? `"${val}" ` : `${val} `); + + it('should format string values correctly', () => { + const values = ['apple', 'banana', 'cherry']; + const result = formatValuesToSuggestions(values, stringQuoter); + + expect(result).toEqual([ + { + text: 'apple', + insertText: '"apple" ', + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: '01', + }, + { + text: 'banana', + insertText: '"banana" ', + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: '02', + }, + { + text: 'cherry', + insertText: '"cherry" ', + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: '03', + }, + ]); + }); + + it('should format numeric values correctly', () => { + const values = [1, 2, 3]; + const result = formatValuesToSuggestions(values); + + expect(result).toEqual([ + { + text: '1', + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: '01', + }, + { + text: '2', + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: '02', + }, + { + text: '3', + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: '03', + }, + ]); + }); + + it('should handle empty array', () => { + const values: string[] = []; + const result = formatValuesToSuggestions(values); + + expect(result).toEqual([]); + }); + + it('should handle mixed type values', () => { + const values = ['apple', 42, true]; + const result = formatValuesToSuggestions(values, stringQuoter); + + expect(result).toEqual([ + { + text: 'apple', + insertText: '"apple" ', + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: '01', + }, + { + text: '42', + insertText: '42 ', + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: '02', + }, + { + text: 'true', + insertText: 'true ', + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: '03', + }, + ]); + }); + + it('should pad sortText correctly for larger arrays', () => { + const values = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']; + const result = formatValuesToSuggestions(values, stringQuoter); + + expect(result[0].sortText).toBe('001'); + expect(result[9].sortText).toBe('010'); + }); +}); + +describe('fetchColumnValues', () => { + let mockServices: IDataPluginServices; + let mockHttp: HttpSetup; + let mockUiSettings: IUiSettingsClient; + + beforeEach(() => { + mockHttp = ({ + fetch: jest.fn(), + } as unknown) as HttpSetup; + + mockUiSettings = ({ + get: jest.fn().mockImplementation((setting) => { + if (setting === UI_SETTINGS.QUERY_ENHANCEMENTS_SUGGEST_VALUES) { + return true; + } + if (setting === UI_SETTINGS.QUERY_ENHANCEMENTS_SUGGEST_VALUES_LIMIT) { + return 10; + } + }), + } as unknown) as IUiSettingsClient; + + mockServices = ({ + http: mockHttp, + uiSettings: mockUiSettings, + data: ({ + query: ({ + queryString: ({ + getQuery: jest.fn().mockReturnValue({ dataset: { dataSource: { id: 'test-id' } } }), + } as unknown) as QueryStringContract, + } as unknown) as IQueryStart, + } as unknown) as DataPublicPluginStart, + } as unknown) as IDataPluginServices; + }); + + it('should return boolean values for boolean fields', async () => { + const result = await fetchColumnValues( + 'test-table', + 'boolean-column', + mockServices, + { + type: 'boolean', + } as IndexPatternField, + 'INDEX_PATTERN' + ); + + expect(result).toEqual(['true', 'false']); + }); + + it('should return empty array when value suggestions are disabled', async () => { + (mockUiSettings.get as jest.Mock).mockImplementationOnce((setting) => { + if (setting === UI_SETTINGS.QUERY_ENHANCEMENTS_SUGGEST_VALUES) { + return false; + } + }); + + const result = await fetchColumnValues( + 'test-table', + 'test-column', + mockServices, + { + type: 'string', + } as IndexPatternField, + 'INDEX_PATTERN' + ); + + expect(result).toEqual([]); + }); + + it('should return empty array for unsupported field types', async () => { + const result = await fetchColumnValues( + 'test-table', + 'number-column', + mockServices, + { + type: 'number', + } as IndexPatternField, + 'INDEX_PATTERN' + ); + + expect(result).toEqual([]); + }); + + it('should fetch and return column values for string fields', async () => { + const mockResponse = { + body: { + fields: [ + { + values: ['value1', 'value2', 'value3'], + }, + ], + }, + }; + + (mockHttp.fetch as jest.Mock).mockResolvedValue(mockResponse); + + const result = await fetchColumnValues( + 'test-table', + 'string-column', + mockServices, + { + type: 'string', + } as IndexPatternField, + 'INDEX_PATTERN' + ); + + expect(mockHttp.fetch).toHaveBeenCalledWith({ + method: 'POST', + path: '/api/enhancements/search/sql', + body: JSON.stringify({ + query: { + query: + 'SELECT string-column FROM test-table GROUP BY string-column ORDER BY COUNT(string-column) DESC LIMIT 10', + language: 'SQL', + format: 'jdbc', + dataset: { dataSource: { id: 'test-id' } }, + }, + }), + }); + + expect(result).toEqual(['value1', 'value2', 'value3']); + }); + + it('should handle API errors', async () => { + (mockHttp.fetch as jest.Mock).mockRejectedValue(new Error('SQL API Error')); + + await expect( + fetchColumnValues( + 'test-table', + 'string-column', + mockServices, + { + type: 'string', + } as IndexPatternField, + 'INDEX_PATTERN' + ) + ).rejects.toThrow('SQL API Error'); + }); + + it('should return empty array when field is undefined', async () => { + const result = await fetchColumnValues( + 'test-table', + 'string-column', + mockServices, + undefined, + 'INDEX_PATTERN' + ); + + expect(result).toEqual([]); + }); + + it('should fetch values when datasetType is INDEXES', async () => { + const mockResponse = { + body: { + fields: [ + { + values: ['value1', 'value2'], + }, + ], + }, + }; + + (mockHttp.fetch as jest.Mock).mockResolvedValue(mockResponse); + + const result = await fetchColumnValues( + 'test-table', + 'string-column', + mockServices, + { + type: 'string', + } as IndexPatternField, + 'INDEXES' + ); + + expect(result).toEqual(['value1', 'value2']); + }); + + it('should return empty array when datasetType is unsupported', async () => { + const result = await fetchColumnValues( + 'test-table', + 'string-column', + mockServices, + { + type: 'string', + } as IndexPatternField, + 'S3' + ); + + expect(result).toEqual([]); + }); +}); diff --git a/src/plugins/data/public/antlr/shared/utils.ts b/src/plugins/data/public/antlr/shared/utils.ts index 80a8498c56b7..4b82c55af7bb 100644 --- a/src/plugins/data/public/antlr/shared/utils.ts +++ b/src/plugins/data/public/antlr/shared/utils.ts @@ -8,21 +8,28 @@ import { distinctUntilChanged, startWith, switchMap } from 'rxjs/operators'; import { CodeCompletionCore } from 'antlr4-c3'; import { Lexer as LexerType, Parser as ParserType } from 'antlr4ng'; import { monaco } from '@osd/monaco'; +import { HttpSetup } from 'opensearch-dashboards/public'; import { QueryStringContract } from '../../query'; import { findCursorTokenIndex } from './cursor'; import { GeneralErrorListener } from './general_error_listerner'; import { createParser } from '../opensearch_sql/parse'; import { AutocompleteResultBase, KeywordSuggestion } from './types'; import { ParsingSubject } from './types'; -import { quotesRegex } from './constants'; +import { quotesRegex, SuggestionItemDetailsTags } from './constants'; import { IndexPattern, IndexPatternField } from '../../index_patterns'; -import { QuerySuggestion } from '../../autocomplete'; +import { IDataPluginServices } from '../../types'; +import { DEFAULT_DATA, UI_SETTINGS } from '../../../common'; +import { MonacoCompatibleQuerySuggestion } from '../../autocomplete/providers/query_suggestion_provider'; export interface IDataSourceRequestHandlerParams { dataSourceId: string; title: string; } +export const removePotentialBackticks = (str: string): string => { + return str.replace(/^`?|\`?$/g, ''); // removes backticks only if they exist at the beginning and end +}; + // Function to get raw suggestion data export const getRawSuggestionData$ = ( queryString: QueryStringContract, @@ -46,9 +53,9 @@ export const getRawSuggestionData$ = ( }) ); -const fetchFromAPI = async (api: any, body: string) => { +const fetchFromAPI = async (http: HttpSetup, body: string) => { try { - return await api.http.fetch({ + return await http.fetch({ method: 'POST', path: '/api/enhancements/search/sql', body, @@ -63,7 +70,7 @@ const fetchFromAPI = async (api: any, body: string) => { export const fetchData = ( tables: string[], queryFormatter: (table: string, dataSourceId?: string, title?: string) => any, - api: any, + http: HttpSetup, queryString: QueryStringContract ) => { return new Promise((resolve, reject) => { @@ -72,14 +79,14 @@ export const fetchData = ( ({ dataSourceId, title }) => { const requests = tables.map(async (table) => { const body = JSON.stringify(queryFormatter(table, dataSourceId, title)); - return fetchFromAPI(api, body); + return fetchFromAPI(http, body); }); return Promise.all(requests); }, () => { const requests = tables.map(async (table) => { const body = JSON.stringify(queryFormatter(table)); - return fetchFromAPI(api, body); + return fetchFromAPI(http, body); }); return Promise.all(requests); } @@ -93,41 +100,87 @@ export const fetchData = ( }); }; -// Specific fetch function for table schemas -// TODO: remove this after using data set table schema fetcher -export const fetchTableSchemas = (tables: string[], api: any, queryString: QueryStringContract) => { - return fetchData( - tables, - (table, dataSourceId, title) => ({ - query: { query: `DESCRIBE TABLES LIKE ${table}`, format: 'jdbc' }, - df: { - meta: { - queryConfig: { - dataSourceId: dataSourceId || undefined, - title: title || undefined, - }, +export const fetchColumnValues = async ( + table: string, + column: string, + services: IDataPluginServices, + fieldInOsd: IndexPatternField | undefined, + datasetType: string | undefined +): Promise => { + if (!datasetType || !Object.values(DEFAULT_DATA.SET_TYPES).includes(datasetType)) { + return []; + } + + // default to true/false values for type boolean + if (fieldInOsd?.type === 'boolean') { + return ['true', 'false']; + } + + const allowedType = ['string']; + // don't return values if ui settings prevent it or the field type isn't allowed + if ( + !services.uiSettings.get(UI_SETTINGS.QUERY_ENHANCEMENTS_SUGGEST_VALUES) || + !fieldInOsd || + !allowedType.includes(fieldInOsd.type) + ) { + return []; + } + const limit = services.uiSettings.get(UI_SETTINGS.QUERY_ENHANCEMENTS_SUGGEST_VALUES_LIMIT); + + // get dataset for connecting to the cluster currently engaged + const dataset = services.data.query.queryString.getQuery().dataset; + + return ( + await fetchFromAPI( + services.http, + JSON.stringify({ + query: { + query: `SELECT ${column} FROM ${table} GROUP BY ${column} ORDER BY COUNT(${column}) DESC LIMIT ${limit}`, + language: 'SQL', + format: 'jdbc', + dataset, }, - }, - }), - api, - queryString - ); + }) + ) + ).body.fields[0].values; +}; + +export const formatValuesToSuggestions = ( + values: T[], // generic for any value type + modifyInsertText?: (input: T) => string +) => { + let i = 0; + + const valueSuggestions: MonacoCompatibleQuerySuggestion[] = values.map((val: T) => { + i++; + return { + text: val.toString(), + type: monaco.languages.CompletionItemKind.Value, + detail: SuggestionItemDetailsTags.Value, + sortText: i.toString().padStart(values.length.toString().length + 1, '0'), // keeps the order of sorted values + ...(modifyInsertText && { insertText: modifyInsertText(val) }), + }; + }); + + return valueSuggestions; }; -export const fetchFieldSuggestions = ( +export const formatFieldsToSuggestions = ( indexPattern: IndexPattern, - modifyInsertText?: (input: string) => string + modifyInsertText?: (input: string) => string, + sortTextImportance?: string ) => { const filteredFields = indexPattern.fields.filter( (idxField: IndexPatternField) => !idxField?.subType ); // filter removed .keyword fields - const fieldSuggestions: QuerySuggestion[] = filteredFields.map((field) => { + const fieldSuggestions: MonacoCompatibleQuerySuggestion[] = filteredFields.map((field) => { return { text: field.name, type: monaco.languages.CompletionItemKind.Field, detail: `Field: ${field.esTypes?.[0] ?? field.type}`, ...(modifyInsertText && { insertText: modifyInsertText(field.name) }), // optionally include insert text if fn exists + ...(sortTextImportance && { sortText: sortTextImportance }), }; }); diff --git a/src/plugins/data/public/autocomplete/providers/query_suggestion_provider.ts b/src/plugins/data/public/autocomplete/providers/query_suggestion_provider.ts index 64485c60cb0d..6cd13a99bf32 100644 --- a/src/plugins/data/public/autocomplete/providers/query_suggestion_provider.ts +++ b/src/plugins/data/public/autocomplete/providers/query_suggestion_provider.ts @@ -48,6 +48,7 @@ export type QuerySuggestionGetFn = ( export interface QuerySuggestionGetFnArgs { language: string; indexPattern: IndexPattern | undefined; + datasetType?: string; query: string; selectionStart: number; selectionEnd: number; diff --git a/src/plugins/data/public/plugin.ts b/src/plugins/data/public/plugin.ts index 0354c33796fc..163e050fdcd0 100644 --- a/src/plugins/data/public/plugin.ts +++ b/src/plugins/data/public/plugin.ts @@ -187,8 +187,7 @@ export class DataPublicPlugin setUseNewSavedQueriesUI(useNewSavedQueriesUI); return { - // TODO: MQL - autocomplete: this.autocomplete.setup(core), + autocomplete: autoComplete, search: searchService, fieldFormats: this.fieldFormatsService.setup(core), query: queryService, diff --git a/src/plugins/data/public/ui/query_editor/query_editor.tsx b/src/plugins/data/public/ui/query_editor/query_editor.tsx index 37b1f56565a3..739814ff5611 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor.tsx @@ -220,24 +220,20 @@ export const QueryEditorUI: React.FC = (props) => { return ; }; - const fetchIndexPattern = async () => { - const dataset = queryString.getQuery().dataset; - if (!dataset) return undefined; - const indexPattern = await getIndexPatterns().get(dataset.id); - return indexPattern; - }; - const provideCompletionItems = async ( model: monaco.editor.ITextModel, position: monaco.Position ): Promise => { - const indexPattern = await fetchIndexPattern(); + const dataset = queryString.getQuery().dataset; + const indexPattern = dataset ? await getIndexPatterns().get(dataset.id) : undefined; + const suggestions = await services.data.autocomplete.getQuerySuggestions({ query: inputRef.current?.getValue() ?? '', - selectionStart: model.getOffsetAt(position), + selectionStart: model.getOffsetAt(position), // not needed, position handles same thing. remove selectionEnd: model.getOffsetAt(position), language: queryRef.current.language, indexPattern, + datasetType: dataset?.type, position, services, }); @@ -265,7 +261,7 @@ export const QueryEditorUI: React.FC = (props) => { range: s.replacePosition ?? defaultRange, detail: s.detail, command: { id: 'editor.action.triggerSuggest', title: 'Trigger Next Suggestion' }, - sortText: s.sortText, // when undefined, the falsy value will default to the label + sortText: s.sortText ?? s.text, // when undefined, the falsy value will default to the label }; }) : [], diff --git a/src/plugins/data/server/ui_settings.ts b/src/plugins/data/server/ui_settings.ts index 13cee79cb450..3b616197b4ca 100644 --- a/src/plugins/data/server/ui_settings.ts +++ b/src/plugins/data/server/ui_settings.ts @@ -738,6 +738,37 @@ export function getUiSettings( requiresPageReload: true, schema: schema.boolean(), }, + [UI_SETTINGS.QUERY_ENHANCEMENTS_SUGGEST_VALUES]: { + name: i18n.translate('data.advancedSettings.query.enhancements.suggestValuesTitle', { + defaultMessage: 'Allow for Value Suggestion through the enhancements APIs', + }), + value: true, + description: i18n.translate('data.advancedSettings.query.enhancements.suggestValuesText', { + defaultMessage: ` + Value Suggestion will be done through a SQL query to the enhancements APIs, sorted by the most frequent options + Experimental: Requires query enhancements enabled.`, + }), + category: ['search'], + requiresPageReload: true, + schema: schema.boolean(), + }, + [UI_SETTINGS.QUERY_ENHANCEMENTS_SUGGEST_VALUES_LIMIT]: { + name: i18n.translate('data.advancedSettings.query.enhancements.suggestValuesLimitTitle', { + defaultMessage: 'Enhancements Value Suggestion Limit', + }), + value: 200, + description: i18n.translate( + 'data.advancedSettings.query.enhancements.suggestValuesLimitText', + { + defaultMessage: ` + The limit on number of values fetched + Experimental: Requires query enhancements enabled.`, + } + ), + category: ['search'], + requiresPageReload: true, + schema: schema.number(), + }, [UI_SETTINGS.QUERY_DATAFRAME_HYDRATION_STRATEGY]: { name: i18n.translate('data.advancedSettings.query.dataFrameHydrationStrategyTitle', { defaultMessage: 'Data frame hydration strategy',