From 22eca92ec512180818ca1bbc8439dd616ca43150 Mon Sep 17 00:00:00 2001 From: "Qingyang(Abby) Hu" Date: Tue, 24 Sep 2024 13:38:35 -0700 Subject: [PATCH] Revert non-2.17.1 changes for 2.17 branch (#8323) --- changelogs/fragments/7178.yml | 2 - changelogs/fragments/7609.yml | 2 - changelogs/fragments/7891.yml | 2 - changelogs/fragments/8087.yml | 2 - changelogs/fragments/8100.yml | 2 - changelogs/fragments/8212.yml | 2 - changelogs/fragments/8226.yml | 2 - changelogs/fragments/8232.yml | 2 - changelogs/fragments/8246.yml | 2 - changelogs/fragments/8252.yml | 2 - package.json | 6 +- packages/osd-ui-framework/package.json | 2 +- packages/osd-ui-shared-deps/package.json | 2 +- .../header/__snapshots__/header.test.tsx.snap | 8552 ++++++----------- src/core/public/chrome/ui/header/header.scss | 8 - .../public/chrome/ui/header/header.test.tsx | 18 +- src/core/public/chrome/ui/header/header.tsx | 318 +- src/plugins/data/common/constants.ts | 2 +- src/plugins/data/common/datasets/types.ts | 4 - .../utils/as_pretty_string.test.ts | 6 +- .../field_formats/utils/as_pretty_string.ts | 4 +- .../search_source/fetch/get_search_params.ts | 5 +- .../.generated/OpenSearchPPLLexer.ts | 2 +- .../.generated/OpenSearchPPLParser.interp | 2 +- .../.generated/OpenSearchPPLParser.ts | 3285 ++++--- .../.generated/OpenSearchPPLParserVisitor.ts | 66 +- .../antlr/opensearch_ppl/code_completion.ts | 42 +- .../public/antlr/opensearch_ppl/constants.ts | 16 - .../grammar/OpenSearchPPLParser.g4 | 20 +- .../opensearch_ppl_autocomplete.ts | 29 +- .../data/public/antlr/shared/constants.ts | 1 - src/plugins/data/public/antlr/shared/types.ts | 1 - src/plugins/data/public/antlr/shared/utils.ts | 2 - .../providers/query_suggestion_provider.ts | 2 - .../dataset_service/lib/index_type.ts | 2 +- .../query_string/dataset_service/types.ts | 7 +- .../__snapshots__/query_result.test.tsx.snap | 62 - .../lib/query_result.test.tsx | 109 - .../language_service/lib/query_result.tsx | 81 +- .../language_service/lib/recent_query.tsx | 9 +- .../query_string/language_service/types.ts | 1 - .../query/query_string/query_history.ts | 2 - .../query_string/query_string_manager.mock.ts | 7 +- .../dataset_navigator/dataset_navigator.tsx | 59 +- .../public/ui/dataset_navigator/index.tsx | 1 + .../lib/catalog_cache/cache_loader.tsx | 45 +- .../lib/catalog_cache/cache_manager.ts | 86 +- .../ui/dataset_navigator/lib/constants.ts | 190 +- .../public/ui/dataset_navigator/lib/types.tsx | 2 +- .../lib/utils/fetch_external_data_sources.ts | 40 +- .../ui/dataset_navigator/lib/utils/index.ts | 1 + .../ui/dataset_navigator/lib/utils/shared.ts | 7 +- .../public/ui/query_editor/_query_editor.scss | 2 +- .../ui/query_editor/language_selector.tsx | 12 +- .../public/ui/query_editor/query_editor.tsx | 4 +- .../data/public/ui/settings/settings.ts | 16 - src/plugins/data/public/ui/types.ts | 1 + .../create_data_source_menu.tsx | 2 +- .../data_source_table.test.tsx.snap | 4 +- ...query_data_connections_table.test.tsx.snap | 8 +- .../default_discover_table/table_cell.tsx | 2 +- .../components/no_results/no_results.tsx | 304 +- .../view_components/utils/use_search.ts | 10 +- .../query_enhancements/common/constants.ts | 3 +- .../public/datasets/requests/index.tsx | 6 + .../public/datasets/requests/sql.ts | 60 + .../public/datasets/s3_type.ts | 29 +- .../datasets/utils/query_session_utils.ts | 25 + .../query_enhancements/public/plugin.tsx | 6 +- .../public/query_assist/_index.scss | 25 - .../query_assist_bar.test.tsx.snap | 47 - .../components/call_outs.test.tsx | 4 +- .../components/query_assist_bar.test.tsx | 218 - .../components/query_assist_bar.tsx | 9 +- .../components/query_assist_input.test.tsx | 13 +- .../components/query_assist_input.tsx | 18 +- .../components/warning_badge.test.tsx | 62 - .../query_assist/components/warning_badge.tsx | 145 - .../query_assist/utils/create_extension.tsx | 5 +- .../public/query_assist/utils/errors.test.ts | 20 +- .../public/query_assist/utils/errors.ts | 34 +- .../query_assist/utils/get_persisted_log.ts | 5 +- .../public/search/ppl_search_interceptor.ts | 23 +- .../public/search/sql_search_interceptor.ts | 13 +- .../public/services/connections_service.ts | 84 + .../public/services/index.ts | 8 +- .../query_enhancements/public/types.ts | 5 + .../query_enhancements/server/index.ts | 9 +- .../query_enhancements/server/plugin.ts | 14 +- .../routes/data_source_connection/routes.ts | 76 +- .../query_enhancements/server/routes/index.ts | 73 +- .../server/routes/query_assist/routes.ts | 15 +- .../query_enhancements/server/search/index.ts | 1 - .../server/search/ppl_raw_search_strategy.ts | 4 +- .../server/search/ppl_search_strategy.ts | 2 +- .../search/sql_async_search_strategy.ts | 8 +- .../query_enhancements/server/types.ts | 5 +- .../query_enhancements/server/utils/index.ts | 2 +- .../server/utils/plugins.ts | 43 +- .../utils/get_top_nav_config.test.tsx | 5 +- .../plugins/osd_tp_run_pipeline/package.json | 2 +- .../osd_sample_panel_action/package.json | 2 +- .../osd_tp_custom_visualizations/package.json | 2 +- yarn.lock | 21 +- 104 files changed, 5997 insertions(+), 8645 deletions(-) delete mode 100644 changelogs/fragments/7178.yml delete mode 100644 changelogs/fragments/7609.yml delete mode 100644 changelogs/fragments/7891.yml delete mode 100644 changelogs/fragments/8087.yml delete mode 100644 changelogs/fragments/8100.yml delete mode 100644 changelogs/fragments/8212.yml delete mode 100644 changelogs/fragments/8226.yml delete mode 100644 changelogs/fragments/8232.yml delete mode 100644 changelogs/fragments/8246.yml delete mode 100644 changelogs/fragments/8252.yml delete mode 100644 src/plugins/data/public/antlr/opensearch_ppl/constants.ts delete mode 100644 src/plugins/data/public/query/query_string/language_service/lib/__snapshots__/query_result.test.tsx.snap delete mode 100644 src/plugins/data/public/query/query_string/language_service/lib/query_result.test.tsx create mode 100644 src/plugins/query_enhancements/public/datasets/requests/index.tsx create mode 100644 src/plugins/query_enhancements/public/datasets/requests/sql.ts create mode 100644 src/plugins/query_enhancements/public/datasets/utils/query_session_utils.ts delete mode 100644 src/plugins/query_enhancements/public/query_assist/components/__snapshots__/query_assist_bar.test.tsx.snap delete mode 100644 src/plugins/query_enhancements/public/query_assist/components/query_assist_bar.test.tsx delete mode 100644 src/plugins/query_enhancements/public/query_assist/components/warning_badge.test.tsx delete mode 100644 src/plugins/query_enhancements/public/query_assist/components/warning_badge.tsx create mode 100644 src/plugins/query_enhancements/public/services/connections_service.ts diff --git a/changelogs/fragments/7178.yml b/changelogs/fragments/7178.yml deleted file mode 100644 index ebeadc63249a..000000000000 --- a/changelogs/fragments/7178.yml +++ /dev/null @@ -1,2 +0,0 @@ -fix: -- Truncate height of table cell in legacy discover ([#7178](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7178)) \ No newline at end of file diff --git a/changelogs/fragments/7609.yml b/changelogs/fragments/7609.yml deleted file mode 100644 index edb1d5a60c64..000000000000 --- a/changelogs/fragments/7609.yml +++ /dev/null @@ -1,2 +0,0 @@ -fix: -- Dataset nav to load external connections and update namespace ([#7609](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7609)) \ No newline at end of file diff --git a/changelogs/fragments/7891.yml b/changelogs/fragments/7891.yml deleted file mode 100644 index 6300c0905a55..000000000000 --- a/changelogs/fragments/7891.yml +++ /dev/null @@ -1,2 +0,0 @@ -refactor: -- [Look&Feel] Updated Discover No Results panel ([#7891](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7891)) \ No newline at end of file diff --git a/changelogs/fragments/8087.yml b/changelogs/fragments/8087.yml deleted file mode 100644 index 3c6a8fd9cafb..000000000000 --- a/changelogs/fragments/8087.yml +++ /dev/null @@ -1,2 +0,0 @@ -fix: -- PPL Autocomplete functions, fields, & table suggestion ([#8087](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8087)) \ No newline at end of file diff --git a/changelogs/fragments/8100.yml b/changelogs/fragments/8100.yml deleted file mode 100644 index 40b48e259a00..000000000000 --- a/changelogs/fragments/8100.yml +++ /dev/null @@ -1,2 +0,0 @@ -fix: -- Remove unsupported languages for dataset ([#8100](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8100)) \ No newline at end of file diff --git a/changelogs/fragments/8212.yml b/changelogs/fragments/8212.yml deleted file mode 100644 index 5a226348dc76..000000000000 --- a/changelogs/fragments/8212.yml +++ /dev/null @@ -1,2 +0,0 @@ -feat: -- Add loading indicator and counter to query result ([#8212](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8212)) \ No newline at end of file diff --git a/changelogs/fragments/8226.yml b/changelogs/fragments/8226.yml deleted file mode 100644 index 65fba83f932a..000000000000 --- a/changelogs/fragments/8226.yml +++ /dev/null @@ -1,2 +0,0 @@ -fix: -- Remove unused enhancements APIs, clean up, and error handling ([#8226](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8226)) \ No newline at end of file diff --git a/changelogs/fragments/8232.yml b/changelogs/fragments/8232.yml deleted file mode 100644 index 3c4766037b6d..000000000000 --- a/changelogs/fragments/8232.yml +++ /dev/null @@ -1,2 +0,0 @@ -fix: -- Use @osd/std to prettify objects for display ([#8232](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8232)) \ No newline at end of file diff --git a/changelogs/fragments/8246.yml b/changelogs/fragments/8246.yml deleted file mode 100644 index 21f8bf3c710a..000000000000 --- a/changelogs/fragments/8246.yml +++ /dev/null @@ -1,2 +0,0 @@ -chore: -- Update oui to 1.13 ([#8246](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8246)) \ No newline at end of file diff --git a/changelogs/fragments/8252.yml b/changelogs/fragments/8252.yml deleted file mode 100644 index f612ecc2b2f8..000000000000 --- a/changelogs/fragments/8252.yml +++ /dev/null @@ -1,2 +0,0 @@ -fix: -- Run recent query button work properly ([#8252](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8252)) \ No newline at end of file diff --git a/package.json b/package.json index edd143ee9de7..0737282c4d7c 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "dependencies": { "@aws-crypto/client-node": "^3.1.1", "@elastic/datemath": "5.0.3", - "@elastic/eui": "npm:@opensearch-project/oui@1.13.0", + "@elastic/eui": "npm:@opensearch-project/oui@1.12.0", "@elastic/good": "^9.0.1-kibana3", "@elastic/numeral": "npm:@amoo-miki/numeral@2.6.0", "@elastic/request-crypto": "2.0.0", @@ -163,7 +163,6 @@ "@hapi/podium": "^4.1.3", "@hapi/vision": "^6.1.0", "@hapi/wreck": "^17.1.0", - "@opensearch-dashboards-test/opensearch-dashboards-test-library": "https://github.com/opensearch-project/opensearch-dashboards-test-library/archive/refs/tags/1.0.6.tar.gz", "@opensearch-project/opensearch": "^1.1.0", "@opensearch-project/opensearch-next": "npm:@opensearch-project/opensearch@^2.9.0", "@opensearch/datemath": "5.0.3", @@ -252,7 +251,8 @@ "type-detect": "^4.0.8", "uuid": "3.3.2", "whatwg-fetch": "^3.0.0", - "yauzl": "^2.10.0" + "yauzl": "^2.10.0", + "@opensearch-dashboards-test/opensearch-dashboards-test-library": "https://github.com/opensearch-project/opensearch-dashboards-test-library/archive/refs/tags/1.0.6.tar.gz" }, "devDependencies": { "@babel/core": "^7.22.9", diff --git a/packages/osd-ui-framework/package.json b/packages/osd-ui-framework/package.json index c858a2d2fa4c..e3176f43656e 100644 --- a/packages/osd-ui-framework/package.json +++ b/packages/osd-ui-framework/package.json @@ -23,7 +23,7 @@ "enzyme-adapter-react-16": "^1.9.1" }, "devDependencies": { - "@elastic/eui": "npm:@opensearch-project/oui@1.13.0", + "@elastic/eui": "npm:@opensearch-project/oui@1.12.0", "@osd/babel-preset": "1.0.0", "@osd/optimizer": "1.0.0", "comment-stripper": "^0.0.4", diff --git a/packages/osd-ui-shared-deps/package.json b/packages/osd-ui-shared-deps/package.json index 082bffb21eb3..9162d4e4af31 100644 --- a/packages/osd-ui-shared-deps/package.json +++ b/packages/osd-ui-shared-deps/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@elastic/charts": "31.1.0", - "@elastic/eui": "npm:@opensearch-project/oui@1.13.0", + "@elastic/eui": "npm:@opensearch-project/oui@1.12.0", "@elastic/numeral": "npm:@amoo-miki/numeral@2.6.0", "@opensearch/datemath": "5.0.3", "@osd/i18n": "1.0.0", diff --git a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap index 8d002125bfe7..f5a8d1ce5f09 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/header.test.tsx.snap @@ -112,80 +112,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, }, @@ -244,82 +170,7 @@ exports[`Header handles visibility and lock changes 1`] = ` "closed": false, "hasError": false, "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], + "observers": Array [], "thrownError": null, }, "currentBottomControls$": BehaviorSubject { @@ -337,82 +188,7 @@ exports[`Header handles visibility and lock changes 1`] = ` "closed": false, "hasError": false, "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], + "observers": Array [], "thrownError": null, }, "currentDescriptionControls$": BehaviorSubject { @@ -430,82 +206,7 @@ exports[`Header handles visibility and lock changes 1`] = ` "closed": false, "hasError": false, "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], + "observers": Array [], "thrownError": null, }, "currentRightControls$": BehaviorSubject { @@ -514,82 +215,7 @@ exports[`Header handles visibility and lock changes 1`] = ` "closed": false, "hasError": false, "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], + "observers": Array [], "thrownError": null, }, "getComponent": [MockFunction], @@ -669,80 +295,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -2270,6 +1822,18 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, + ], + "thrownError": null, + } + } + navControlsExpandedCenter$={ + BehaviorSubject { + "_isScalar": false, + "_value": Array [], + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [ Subscriber { "_parentOrParents": null, "_subscriptions": Array [ @@ -2307,6 +1871,18 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, + ], + "thrownError": null, + } + } + navControlsExpandedRight$={ + BehaviorSubject { + "_isScalar": false, + "_value": Array [], + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [ Subscriber { "_parentOrParents": null, "_subscriptions": Array [ @@ -2348,7 +1924,7 @@ exports[`Header handles visibility and lock changes 1`] = ` "thrownError": null, } } - navControlsExpandedCenter$={ + navControlsLeft$={ BehaviorSubject { "_isScalar": false, "_value": Array [], @@ -2393,43 +1969,29 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, + ], + "thrownError": null, + } + } + navControlsLeftBottom$={ + BehaviorSubject { + "_isScalar": false, + "_value": Array [], + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + } + } + navControlsRight$={ + BehaviorSubject { + "_isScalar": false, + "_value": Array [], + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [ Subscriber { "_parentOrParents": null, "_subscriptions": Array [ @@ -2471,10 +2033,29 @@ exports[`Header handles visibility and lock changes 1`] = ` "thrownError": null, } } - navControlsExpandedRight$={ + navGroupEnabled={false} + navGroupsMap$={ BehaviorSubject { "_isScalar": false, - "_value": Array [], + "_value": Object {}, + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + } + } + navLinks$={ + BehaviorSubject { + "_isScalar": false, + "_value": Array [ + Object { + "baseUrl": "", + "href": "", + "id": "opensearchDashboards", + "title": "opensearchDashboards", + }, + ], "closed": false, "hasError": false, "isStopped": false, @@ -2594,10 +2175,19 @@ exports[`Header handles visibility and lock changes 1`] = ` "thrownError": null, } } - navControlsLeft$={ + onIsLockedUpdate={[Function]} + opensearchDashboardsDocLink="/docs" + opensearchDashboardsVersion="1.0.0" + recentlyAccessed$={ BehaviorSubject { "_isScalar": false, - "_value": Array [], + "_value": Array [ + Object { + "id": "dashboard", + "label": "dashboard", + "link": "", + }, + ], "closed": false, "hasError": false, "isStopped": false, @@ -2639,99 +2229,18 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } } - navControlsLeftBottom$={ - BehaviorSubject { - "_isScalar": false, - "_value": Array [], - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [], - "thrownError": null, - } - } - navControlsRight$={ + setCurrentNavGroup={[MockFunction]} + sidecarConfig$={ BehaviorSubject { "_isScalar": false, - "_value": Array [], + "_value": Object { + "dockedMode": "right", + "paddingSize": 640, + }, "closed": false, "hasError": false, "isStopped": false, @@ -2773,343 +2282,16 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } } - navGroupEnabled={false} - navGroupsMap$={ + survey="/" + useUpdatedHeader={false} + workspaceList$={ BehaviorSubject { "_isScalar": false, - "_value": Object {}, - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [], - "thrownError": null, - } - } - navLinks$={ - BehaviorSubject { - "_isScalar": false, - "_value": Array [ - Object { - "baseUrl": "", - "href": "", - "id": "opensearchDashboards", - "title": "opensearchDashboards", - }, - ], - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], - "thrownError": null, - } - } - onIsLockedUpdate={[Function]} - opensearchDashboardsDocLink="/docs" - opensearchDashboardsVersion="1.0.0" - recentlyAccessed$={ - BehaviorSubject { - "_isScalar": false, - "_value": Array [ - Object { - "id": "dashboard", - "label": "dashboard", - "link": "", - }, - ], - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], - "thrownError": null, - } - } - setCurrentNavGroup={[MockFunction]} - sidecarConfig$={ - BehaviorSubject { - "_isScalar": false, - "_value": Object { - "dockedMode": "right", - "paddingSize": 640, - }, - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], - "thrownError": null, - } - } - survey="/" - useUpdatedHeader={false} - workspaceList$={ - BehaviorSubject { - "_isScalar": false, - "_value": Array [], + "_value": Array [], "closed": false, "hasError": false, "isStopped": false, @@ -3480,80 +2662,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -3620,80 +2728,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -3746,80 +2780,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -4233,80 +3193,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -4394,80 +3280,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -4661,80 +3473,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -5734,80 +4472,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -5874,80 +4538,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -6012,80 +4602,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -6145,80 +4661,6 @@ exports[`Header handles visibility and lock changes 1`] = ` "syncErrorThrown": false, "syncErrorValue": null, }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, ], "thrownError": null, } @@ -8902,165 +7344,51 @@ exports[`Header renders application header without title and breadcrumbs 1`] = ` }, }, "currentBadgeControls$": BehaviorSubject { - "_isScalar": false, - "_value": undefined, - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], - "thrownError": null, - }, - "currentBottomControls$": BehaviorSubject { - "_isScalar": false, - "_value": undefined, - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [], - "thrownError": null, - }, - "currentCenterControls$": BehaviorSubject { - "_isScalar": false, - "_value": undefined, - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], - "thrownError": null, - }, - "currentDescriptionControls$": BehaviorSubject { - "_isScalar": false, - "_value": undefined, - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [], - "thrownError": null, - }, - "currentLeftControls$": BehaviorSubject { - "_isScalar": false, - "_value": undefined, - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], - "thrownError": null, - }, - "currentRightControls$": BehaviorSubject { + "_isScalar": false, + "_value": undefined, + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + }, + "currentBottomControls$": BehaviorSubject { + "_isScalar": false, + "_value": undefined, + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + }, + "currentCenterControls$": BehaviorSubject { + "_isScalar": false, + "_value": undefined, + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + }, + "currentDescriptionControls$": BehaviorSubject { + "_isScalar": false, + "_value": undefined, + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + }, + "currentLeftControls$": BehaviorSubject { + "_isScalar": false, + "_value": undefined, + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + }, + "currentRightControls$": BehaviorSubject { "_isScalar": false, "_value": undefined, "closed": false, @@ -9146,45 +7474,7 @@ exports[`Header renders application header without title and breadcrumbs 1`] = ` "closed": false, "hasError": false, "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], + "observers": Array [], "thrownError": null, } } @@ -9768,6 +8058,28 @@ exports[`Header renders application header without title and breadcrumbs 1`] = ` } } navControlsCenter$={ + BehaviorSubject { + "_isScalar": false, + "_value": Array [], + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + } + } + navControlsExpandedCenter$={ + BehaviorSubject { + "_isScalar": false, + "_value": Array [], + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + } + } + navControlsExpandedRight$={ BehaviorSubject { "_isScalar": false, "_value": Array [], @@ -9816,7 +8128,29 @@ exports[`Header renders application header without title and breadcrumbs 1`] = ` "thrownError": null, } } - navControlsExpandedCenter$={ + navControlsLeft$={ + BehaviorSubject { + "_isScalar": false, + "_value": Array [], + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + } + } + navControlsLeftBottom$={ + BehaviorSubject { + "_isScalar": false, + "_value": Array [], + "closed": false, + "hasError": false, + "isStopped": false, + "observers": Array [], + "thrownError": null, + } + } + navControlsRight$={ BehaviorSubject { "_isScalar": false, "_value": Array [], @@ -9865,169 +8199,11 @@ exports[`Header renders application header without title and breadcrumbs 1`] = ` "thrownError": null, } } - navControlsExpandedRight$={ + navGroupEnabled={false} + navGroupsMap$={ BehaviorSubject { "_isScalar": false, - "_value": Array [], - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], - "thrownError": null, - } - } - navControlsLeft$={ - BehaviorSubject { - "_isScalar": false, - "_value": Array [], - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], - "thrownError": null, - } - } - navControlsLeftBottom$={ - BehaviorSubject { - "_isScalar": false, - "_value": Array [], - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [], - "thrownError": null, - } - } - navControlsRight$={ - BehaviorSubject { - "_isScalar": false, - "_value": Array [], - "closed": false, - "hasError": false, - "isStopped": false, - "observers": Array [ - Subscriber { - "_parentOrParents": null, - "_subscriptions": Array [ - SubjectSubscription { - "_parentOrParents": [Circular], - "_subscriptions": null, - "closed": false, - "subject": [Circular], - "subscriber": [Circular], - }, - ], - "closed": false, - "destination": SafeSubscriber { - "_complete": undefined, - "_context": [Circular], - "_error": undefined, - "_next": [Function], - "_parentOrParents": null, - "_parentSubscriber": [Circular], - "_subscriptions": null, - "closed": false, - "destination": Object { - "closed": true, - "complete": [Function], - "error": [Function], - "next": [Function], - }, - "isStopped": false, - "syncErrorThrowable": false, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - "isStopped": false, - "syncErrorThrowable": true, - "syncErrorThrown": false, - "syncErrorValue": null, - }, - ], - "thrownError": null, - } - } - navGroupEnabled={false} - navGroupsMap$={ - BehaviorSubject { - "_isScalar": false, - "_value": Object {}, + "_value": Object {}, "closed": false, "hasError": false, "isStopped": false, @@ -11027,6 +9203,71 @@ exports[`Header renders application header without title and breadcrumbs 1`] = ` + +
+ +
+ +
+
- -
- -
-
- - + +
+ +
+
+ +
+ +
+ +
+ + +
+ +
+
+
+
+ + +
+
+ + - - - test - - +
+ + + test + + +
- - - + /> @@ -20282,1434 +18106,1237 @@ exports[`Header renders page header with application title 1`] = `
-
-
- -
- -
- -
- -

- testTitle -

-
-
-
-
-
-
-
+ testTitle + +
-
- +
-
- +
- -
- -
- - -
- + +
+ -
- -
- - -
- +
+ + +
+ +
+ +
+ + +
+ +
+
+
+ +
- -
-
-
-
- - - - - -`; - -exports[`Header toggles primary navigation menu when clicked 1`] = ` -
+ +
+ +
+
+ +
+ +
+ +
+ + +
+ +
+
+ +
+ +
+ +
+ + +
+ +
+
+ +
+ +
+ +
+ + +
+ +
+
+
+ +
+ + +
+ +
+ +
+ + +
+ +
+ +
+ +
+
+ + + +
+ +`; + +exports[`Header toggles primary navigation menu when clicked 1`] = ` +
-
- - - test - - -
-
- - - - - -
- + + + test + + +
+ + + + + + +
+ { const component = mountWithIntl(
); expect(component.find('[data-test-subj="headerApplicationTitle"]').exists()).toBeTruthy(); expect(component.find('[data-test-subj="breadcrumb first"]').exists()).toBeTruthy(); - expect(component.find('[data-test-subj="headerBadgeControl"]').exists()).toBeFalsy(); - expect(component.find('HeaderBadge').exists()).toBeFalsy(); - expect(component.find('[data-test-subj="headerLeftControl"]').exists()).toBeFalsy(); - expect(component.find('HeaderNavControls').exists()).toBeFalsy(); - expect(component.find('[data-test-subj="headerCenterControl"]').exists()).toBeFalsy(); - expect(component.find('[data-test-subj="headerRightControl"]').exists()).toBeFalsy(); - expect(component.find('HeaderActionMenu').exists()).toBeFalsy(); + expect(component.find('[data-test-subj="headerBadgeControl"]').exists()).toBeTruthy(); + expect(component.find('HeaderBadge').exists()).toBeTruthy(); + expect(component.find('[data-test-subj="headerLeftControl"]').exists()).toBeTruthy(); + expect(component.find('HeaderNavControls').exists()).toBeTruthy(); + expect(component.find('[data-test-subj="headerCenterControl"]').exists()).toBeTruthy(); + expect(component.find('[data-test-subj="headerRightControl"]').exists()).toBeTruthy(); + expect(component.find('HeaderActionMenu').exists()).toBeTruthy(); expect(component.find('[data-test-subj="headerDescriptionControl"]').exists()).toBeTruthy(); expect(component.find('[data-test-subj="headerBottomControl"]').exists()).toBeTruthy(); expect(component).toMatchSnapshot(); @@ -252,9 +252,9 @@ describe('Header', () => { const component = mountWithIntl(
); expect(component.find('[data-test-subj="headerApplicationTitle"]').exists()).toBeFalsy(); expect(component.find('[data-test-subj="breadcrumb first"]').exists()).toBeFalsy(); - expect(component.find('HeaderActionMenu').exists()).toBeFalsy(); + expect(component.find('HeaderActionMenu').exists()).toBeTruthy(); expect(component.find('RecentItems').exists()).toBeTruthy(); - expect(component.find('[data-test-subj="headerRightControl"]').exists()).toBeFalsy(); + expect(component.find('[data-test-subj="headerRightControl"]').exists()).toBeTruthy(); expect(component).toMatchSnapshot(); }); }); diff --git a/src/core/public/chrome/ui/header/header.tsx b/src/core/public/chrome/ui/header/header.tsx index 556fb830a740..72d9ba6be3fc 100644 --- a/src/core/public/chrome/ui/header/header.tsx +++ b/src/core/public/chrome/ui/header/header.tsx @@ -29,8 +29,6 @@ */ import { EuiButtonIcon, - EuiFlexGroup, - EuiFlexItem, EuiHeader, EuiHeaderProps, EuiHeaderSection, @@ -124,14 +122,6 @@ export interface HeaderProps { useUpdatedHeader?: boolean; } -const hasValue = (value: any) => { - if (Array.isArray(value) && value.length === 0) { - return false; - } - - return Boolean(value); -}; - export function Header({ http, opensearchDashboardsVersion, @@ -291,186 +281,93 @@ export function Header({ ); }; - const renderLeftControls = () => { - let hasLeftControls; - let hasNavControlsLeft; - - application.currentLeftControls$.subscribe((value) => { - hasLeftControls = hasValue(value); - }); - observables.navControlsLeft$.subscribe((value) => { - hasNavControlsLeft = hasValue(value); - }); - - if (!hasLeftControls && !hasNavControlsLeft && useUpdatedHeader) { - return null; - } - - return ( - <> - {useUpdatedHeader && ( - - - - )} - - {/* Nav controls left */} - - - + const renderLeftControls = () => ( + <> + {useUpdatedHeader && ( + + - - ); - }; + )} - const renderCenterControls = () => { - let hasCenterControls; - let hasNavControlsExpandedCenter; - let hasNavControlsCenter; - - application.currentCenterControls$.subscribe((value) => { - hasCenterControls = hasValue(value); - }); - observables.navControlsExpandedCenter$.subscribe((value) => { - hasNavControlsExpandedCenter = hasValue(value); - }); - observables.navControlsCenter$.subscribe((value) => { - hasNavControlsCenter = hasValue(value); - }); - - if ( - !hasCenterControls && - !hasNavControlsExpandedCenter && - !hasNavControlsCenter && - useUpdatedHeader - ) { - return null; - } - - return ( - <> - {useUpdatedHeader && ( - - - - )} - - {useUpdatedHeader && ( - - - - )} + {/* Nav controls left */} + + + + + ); - - + const renderCenterControls = () => ( + <> + {useUpdatedHeader && ( + + - - ); - }; - - const renderRightControls = () => { - let hasNavControlsExpandedRight; - let hasRightControls; - let hasNavControlsRight; - - application.currentRightControls$.subscribe((value) => { - hasRightControls = hasValue(value); - }); - observables.navControlsExpandedRight$.subscribe((value) => { - hasNavControlsExpandedRight = hasValue(value); - }); - observables.navControlsRight$.subscribe((value) => { - hasNavControlsRight = hasValue(value); - }); - - if ( - !hasRightControls && - !hasNavControlsExpandedRight && - !hasNavControlsRight && - useUpdatedHeader - ) { - return null; - } - - return ( - <> - {useUpdatedHeader && ( - - - - )} + )} - {useUpdatedHeader && ( - - - - )} - - - + {useUpdatedHeader && ( + + - - ); - }; - const renderActionMenu = () => { - let hasActionMenu; - application.currentActionMenu$.subscribe((value) => { - hasActionMenu = hasValue(value); - }); - - if (!hasActionMenu && useUpdatedHeader) { - return null; - } - - return ( - - + )} + + + - ); - }; + + ); - const renderBadge = () => { - let hasBadge; - let hasCurrentBadgeControls; + const renderRightControls = () => ( + <> + {useUpdatedHeader && ( + + + + )} - application.currentBadgeControls$.subscribe((value) => { - hasBadge = hasValue(value); - }); - observables.badge$.subscribe((value) => { - hasCurrentBadgeControls = hasValue(value); - }); + {useUpdatedHeader && ( + + + + )} - if (!hasBadge && !hasCurrentBadgeControls && useUpdatedHeader) { - return null; - } + + + + + ); - return ( - <> - {useUpdatedHeader && ( - - - - )} + const renderActionMenu = () => ( + + + + ); - {/* Nav controls badge */} + const renderBadge = () => ( + <> + {useUpdatedHeader && ( - + - - ); - }; + )} + + {/* Nav controls badge */} + + + + + ); const renderHelp = () => ( @@ -499,12 +396,6 @@ export function Header({ ); - const leftControls = renderLeftControls(); - const centerControls = renderCenterControls(); - const rightControls = renderRightControls(); - const actionMenu = renderActionMenu(); - const badge = renderBadge(); - const renderLegacyHeader = () => ( @@ -512,7 +403,7 @@ export function Header({ {renderNavToggle()} - {leftControls} + {renderLeftControls()} {/* Home loader left */} @@ -529,12 +420,12 @@ export function Header({ {renderBreadcrumbs()} - {badge} + {renderBadge()} - {actionMenu} - {centerControls} - {rightControls} + {renderActionMenu()} + {renderCenterControls()} + {renderRightControls()} {renderHelp()} @@ -552,39 +443,22 @@ export function Header({ {/* Secondary header */} - - {/* Left Section */} - - - - - - {breadcrumbs &&

{breadcrumbs[breadcrumbs.length - 1]?.text}

} -
-
-
- - {badge && {badge}} - - {leftControls && {leftControls}} -
-
- - {/* Right Section */} - - - {centerControls && {centerControls}} - - {actionMenu && {actionMenu}} - - {rightControls && {rightControls}} - - -
+ + + + {breadcrumbs &&

{breadcrumbs[breadcrumbs.length - 1]?.text}

} +
+
+ + {renderBadge()} + {renderLeftControls()} +
+ + + {renderCenterControls()} + {renderActionMenu()} + {renderRightControls()} +
@@ -611,9 +485,9 @@ export function Header({ {renderNavToggle()} {renderRecentItems()} - {actionMenu} + {renderActionMenu()} - {rightControls} + {renderRightControls()}
diff --git a/src/plugins/data/common/constants.ts b/src/plugins/data/common/constants.ts index d612469cf035..199391630b25 100644 --- a/src/plugins/data/common/constants.ts +++ b/src/plugins/data/common/constants.ts @@ -44,7 +44,7 @@ export const DEFAULT_DATA = { } as DataStructure, LOCAL_DATASOURCE: { id: '', - title: 'Default Cluster', + title: 'Local Cluster', type: 'DATA_SOURCE', }, }, diff --git a/src/plugins/data/common/datasets/types.ts b/src/plugins/data/common/datasets/types.ts index b9dbcdc3173b..c98d277b7c77 100644 --- a/src/plugins/data/common/datasets/types.ts +++ b/src/plugins/data/common/datasets/types.ts @@ -251,7 +251,3 @@ export interface DatasetField { displayName?: string; // TODO: osdFieldType? } - -export interface DatasetSearchOptions { - strategy?: string; -} diff --git a/src/plugins/data/common/field_formats/utils/as_pretty_string.test.ts b/src/plugins/data/common/field_formats/utils/as_pretty_string.test.ts index d0461193178b..dba46aa51315 100644 --- a/src/plugins/data/common/field_formats/utils/as_pretty_string.test.ts +++ b/src/plugins/data/common/field_formats/utils/as_pretty_string.test.ts @@ -42,11 +42,7 @@ describe('asPrettyString', () => { }); test('Converts objects values into presentable strings', () => { - const longPositive = BigInt(Number.MAX_SAFE_INTEGER) * 2n; - const longNegative = BigInt(Number.MIN_SAFE_INTEGER) * 2n; - expect(asPrettyString({ key: 'value', longPositive, longNegative })).toBe( - `{\n "key": "value",\n "longPositive": ${longPositive.toString()},\n "longNegative": ${longNegative.toString()}\n}` - ); + expect(asPrettyString({ key: 'value' })).toBe('{\n "key": "value"\n}'); }); test('Converts other non-string values into strings', () => { diff --git a/src/plugins/data/common/field_formats/utils/as_pretty_string.ts b/src/plugins/data/common/field_formats/utils/as_pretty_string.ts index dd6a2e5e5e75..9696130fda2f 100644 --- a/src/plugins/data/common/field_formats/utils/as_pretty_string.ts +++ b/src/plugins/data/common/field_formats/utils/as_pretty_string.ts @@ -28,8 +28,6 @@ * under the License. */ -import { stringify } from '@osd/std'; - /** * Convert a value to a presentable string */ @@ -39,7 +37,7 @@ export function asPrettyString(val: any): string { case 'string': return val; case 'object': - return stringify(val, null, ' '); + return JSON.stringify(val, null, ' '); default: return '' + val; } diff --git a/src/plugins/data/common/search/search_source/fetch/get_search_params.ts b/src/plugins/data/common/search/search_source/fetch/get_search_params.ts index d4beab6e8c71..9bb01c4c6023 100644 --- a/src/plugins/data/common/search/search_source/fetch/get_search_params.ts +++ b/src/plugins/data/common/search/search_source/fetch/get_search_params.ts @@ -53,16 +53,19 @@ export function getExternalSearchParamsFromRequest( searchRequest: SearchRequest, dependencies: { getConfig: GetConfigFn; + getDataFrame: GetDataFrameFn; } ): ISearchRequestParams { - const { getConfig } = dependencies; + const { getConfig, getDataFrame } = dependencies; const searchParams = getSearchParams(getConfig); + const dataFrame = getDataFrame(); const indexTitle = searchRequest.index.title || searchRequest.index; return { index: indexTitle, body: { ...searchRequest.body, + ...(dataFrame && dataFrame?.name === indexTitle ? { df: dataFrame } : {}), }, ...searchParams, }; diff --git a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLLexer.ts b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLLexer.ts index 554bd90f22fd..d9fb44016e20 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLLexer.ts +++ b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLLexer.ts @@ -1,4 +1,4 @@ -// Generated from grammar/OpenSearchPPLLexer.g4 by ANTLR 4.13.1 +// Generated from ./src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLLexer.g4 by ANTLR 4.13.1 import * as antlr from "antlr4ng"; import { Token } from "antlr4ng"; 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 d7aef0145ffd..03d97e71ca14 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, 1111, 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, 109, 1, 109, 1, 109, 5, 109, 962, 8, 109, 10, 109, 12, 109, 965, 9, 109, 1, 110, 3, 110, 968, 8, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 3, 110, 977, 8, 110, 1, 111, 3, 111, 980, 8, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 5, 112, 987, 8, 112, 10, 112, 12, 112, 990, 9, 112, 1, 112, 3, 112, 993, 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, 1007, 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, 1109, 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, 1258, 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, 958, 1, 0, 0, 0, 220, 976, 1, 0, 0, 0, 222, 979, 1, 0, 0, 0, 224, 1006, 1, 0, 0, 0, 226, 1108, 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, 957, 5, 328, 0, 0, 957, 217, 1, 0, 0, 0, 958, 963, 3, 224, 112, 0, 959, 960, 5, 111, 0, 0, 960, 962, 3, 224, 112, 0, 961, 959, 1, 0, 0, 0, 962, 965, 1, 0, 0, 0, 963, 961, 1, 0, 0, 0, 963, 964, 1, 0, 0, 0, 964, 219, 1, 0, 0, 0, 965, 963, 1, 0, 0, 0, 966, 968, 5, 111, 0, 0, 967, 966, 1, 0, 0, 0, 967, 968, 1, 0, 0, 0, 968, 969, 1, 0, 0, 0, 969, 977, 5, 328, 0, 0, 970, 971, 5, 131, 0, 0, 971, 972, 3, 220, 110, 0, 972, 973, 5, 131, 0, 0, 973, 977, 1, 0, 0, 0, 974, 977, 5, 335, 0, 0, 975, 977, 3, 226, 113, 0, 976, 967, 1, 0, 0, 0, 976, 970, 1, 0, 0, 0, 976, 974, 1, 0, 0, 0, 976, 975, 1, 0, 0, 0, 977, 221, 1, 0, 0, 0, 978, 980, 5, 329, 0, 0, 979, 978, 1, 0, 0, 0, 979, 980, 1, 0, 0, 0, 980, 981, 1, 0, 0, 0, 981, 982, 3, 220, 110, 0, 982, 223, 1, 0, 0, 0, 983, 988, 3, 220, 110, 0, 984, 985, 5, 122, 0, 0, 985, 987, 3, 220, 110, 0, 986, 984, 1, 0, 0, 0, 987, 990, 1, 0, 0, 0, 988, 986, 1, 0, 0, 0, 988, 989, 1, 0, 0, 0, 989, 992, 1, 0, 0, 0, 990, 988, 1, 0, 0, 0, 991, 993, 5, 122, 0, 0, 992, 991, 1, 0, 0, 0, 992, 993, 1, 0, 0, 0, 993, 1007, 1, 0, 0, 0, 994, 995, 5, 129, 0, 0, 995, 996, 3, 224, 112, 0, 996, 997, 5, 129, 0, 0, 997, 1007, 1, 0, 0, 0, 998, 999, 5, 130, 0, 0, 999, 1000, 3, 224, 112, 0, 1000, 1001, 5, 130, 0, 0, 1001, 1007, 1, 0, 0, 0, 1002, 1003, 5, 131, 0, 0, 1003, 1004, 3, 224, 112, 0, 1004, 1005, 5, 131, 0, 0, 1005, 1007, 1, 0, 0, 0, 1006, 983, 1, 0, 0, 0, 1006, 994, 1, 0, 0, 0, 1006, 998, 1, 0, 0, 0, 1006, 1002, 1, 0, 0, 0, 1007, 225, 1, 0, 0, 0, 1008, 1109, 5, 31, 0, 0, 1009, 1109, 3, 210, 105, 0, 1010, 1109, 5, 320, 0, 0, 1011, 1109, 3, 132, 66, 0, 1012, 1109, 3, 140, 70, 0, 1013, 1109, 3, 208, 104, 0, 1014, 1109, 3, 156, 78, 0, 1015, 1109, 3, 178, 89, 0, 1016, 1109, 3, 152, 76, 0, 1017, 1109, 3, 180, 90, 0, 1018, 1109, 5, 2, 0, 0, 1019, 1109, 5, 3, 0, 0, 1020, 1109, 5, 4, 0, 0, 1021, 1109, 5, 5, 0, 0, 1022, 1109, 5, 6, 0, 0, 1023, 1109, 5, 7, 0, 0, 1024, 1109, 5, 8, 0, 0, 1025, 1109, 5, 9, 0, 0, 1026, 1109, 5, 10, 0, 0, 1027, 1109, 5, 11, 0, 0, 1028, 1109, 5, 12, 0, 0, 1029, 1109, 5, 13, 0, 0, 1030, 1109, 5, 14, 0, 0, 1031, 1109, 5, 15, 0, 0, 1032, 1109, 5, 16, 0, 0, 1033, 1109, 5, 17, 0, 0, 1034, 1109, 5, 18, 0, 0, 1035, 1109, 5, 19, 0, 0, 1036, 1109, 5, 20, 0, 0, 1037, 1109, 5, 21, 0, 0, 1038, 1109, 5, 22, 0, 0, 1039, 1109, 5, 23, 0, 0, 1040, 1109, 5, 24, 0, 0, 1041, 1109, 5, 25, 0, 0, 1042, 1109, 5, 26, 0, 0, 1043, 1109, 5, 29, 0, 0, 1044, 1109, 5, 30, 0, 0, 1045, 1109, 5, 32, 0, 0, 1046, 1109, 5, 33, 0, 0, 1047, 1109, 5, 34, 0, 0, 1048, 1109, 5, 36, 0, 0, 1049, 1109, 5, 37, 0, 0, 1050, 1109, 5, 38, 0, 0, 1051, 1109, 5, 39, 0, 0, 1052, 1109, 5, 40, 0, 0, 1053, 1109, 5, 41, 0, 0, 1054, 1109, 5, 42, 0, 0, 1055, 1109, 5, 43, 0, 0, 1056, 1109, 5, 44, 0, 0, 1057, 1109, 5, 45, 0, 0, 1058, 1109, 5, 46, 0, 0, 1059, 1109, 5, 47, 0, 0, 1060, 1109, 5, 48, 0, 0, 1061, 1109, 5, 49, 0, 0, 1062, 1109, 5, 50, 0, 0, 1063, 1109, 5, 51, 0, 0, 1064, 1109, 5, 52, 0, 0, 1065, 1109, 5, 53, 0, 0, 1066, 1109, 5, 54, 0, 0, 1067, 1109, 5, 55, 0, 0, 1068, 1109, 5, 56, 0, 0, 1069, 1109, 5, 57, 0, 0, 1070, 1109, 5, 58, 0, 0, 1071, 1109, 5, 135, 0, 0, 1072, 1109, 5, 136, 0, 0, 1073, 1109, 5, 137, 0, 0, 1074, 1109, 5, 138, 0, 0, 1075, 1109, 5, 139, 0, 0, 1076, 1109, 5, 140, 0, 0, 1077, 1109, 5, 141, 0, 0, 1078, 1109, 5, 142, 0, 0, 1079, 1109, 5, 143, 0, 0, 1080, 1109, 5, 144, 0, 0, 1081, 1109, 5, 145, 0, 0, 1082, 1109, 5, 146, 0, 0, 1083, 1109, 5, 147, 0, 0, 1084, 1109, 5, 148, 0, 0, 1085, 1109, 5, 149, 0, 0, 1086, 1109, 5, 150, 0, 0, 1087, 1109, 5, 151, 0, 0, 1088, 1109, 5, 152, 0, 0, 1089, 1109, 5, 153, 0, 0, 1090, 1109, 5, 154, 0, 0, 1091, 1109, 5, 155, 0, 0, 1092, 1109, 5, 156, 0, 0, 1093, 1109, 5, 157, 0, 0, 1094, 1109, 5, 158, 0, 0, 1095, 1109, 5, 159, 0, 0, 1096, 1109, 5, 160, 0, 0, 1097, 1109, 5, 161, 0, 0, 1098, 1109, 5, 162, 0, 0, 1099, 1109, 5, 163, 0, 0, 1100, 1109, 5, 164, 0, 0, 1101, 1109, 5, 165, 0, 0, 1102, 1109, 5, 166, 0, 0, 1103, 1109, 5, 167, 0, 0, 1104, 1109, 5, 168, 0, 0, 1105, 1109, 5, 169, 0, 0, 1106, 1109, 5, 170, 0, 0, 1107, 1109, 5, 171, 0, 0, 1108, 1008, 1, 0, 0, 0, 1108, 1009, 1, 0, 0, 0, 1108, 1010, 1, 0, 0, 0, 1108, 1011, 1, 0, 0, 0, 1108, 1012, 1, 0, 0, 0, 1108, 1013, 1, 0, 0, 0, 1108, 1014, 1, 0, 0, 0, 1108, 1015, 1, 0, 0, 0, 1108, 1016, 1, 0, 0, 0, 1108, 1017, 1, 0, 0, 0, 1108, 1018, 1, 0, 0, 0, 1108, 1019, 1, 0, 0, 0, 1108, 1020, 1, 0, 0, 0, 1108, 1021, 1, 0, 0, 0, 1108, 1022, 1, 0, 0, 0, 1108, 1023, 1, 0, 0, 0, 1108, 1024, 1, 0, 0, 0, 1108, 1025, 1, 0, 0, 0, 1108, 1026, 1, 0, 0, 0, 1108, 1027, 1, 0, 0, 0, 1108, 1028, 1, 0, 0, 0, 1108, 1029, 1, 0, 0, 0, 1108, 1030, 1, 0, 0, 0, 1108, 1031, 1, 0, 0, 0, 1108, 1032, 1, 0, 0, 0, 1108, 1033, 1, 0, 0, 0, 1108, 1034, 1, 0, 0, 0, 1108, 1035, 1, 0, 0, 0, 1108, 1036, 1, 0, 0, 0, 1108, 1037, 1, 0, 0, 0, 1108, 1038, 1, 0, 0, 0, 1108, 1039, 1, 0, 0, 0, 1108, 1040, 1, 0, 0, 0, 1108, 1041, 1, 0, 0, 0, 1108, 1042, 1, 0, 0, 0, 1108, 1043, 1, 0, 0, 0, 1108, 1044, 1, 0, 0, 0, 1108, 1045, 1, 0, 0, 0, 1108, 1046, 1, 0, 0, 0, 1108, 1047, 1, 0, 0, 0, 1108, 1048, 1, 0, 0, 0, 1108, 1049, 1, 0, 0, 0, 1108, 1050, 1, 0, 0, 0, 1108, 1051, 1, 0, 0, 0, 1108, 1052, 1, 0, 0, 0, 1108, 1053, 1, 0, 0, 0, 1108, 1054, 1, 0, 0, 0, 1108, 1055, 1, 0, 0, 0, 1108, 1056, 1, 0, 0, 0, 1108, 1057, 1, 0, 0, 0, 1108, 1058, 1, 0, 0, 0, 1108, 1059, 1, 0, 0, 0, 1108, 1060, 1, 0, 0, 0, 1108, 1061, 1, 0, 0, 0, 1108, 1062, 1, 0, 0, 0, 1108, 1063, 1, 0, 0, 0, 1108, 1064, 1, 0, 0, 0, 1108, 1065, 1, 0, 0, 0, 1108, 1066, 1, 0, 0, 0, 1108, 1067, 1, 0, 0, 0, 1108, 1068, 1, 0, 0, 0, 1108, 1069, 1, 0, 0, 0, 1108, 1070, 1, 0, 0, 0, 1108, 1071, 1, 0, 0, 0, 1108, 1072, 1, 0, 0, 0, 1108, 1073, 1, 0, 0, 0, 1108, 1074, 1, 0, 0, 0, 1108, 1075, 1, 0, 0, 0, 1108, 1076, 1, 0, 0, 0, 1108, 1077, 1, 0, 0, 0, 1108, 1078, 1, 0, 0, 0, 1108, 1079, 1, 0, 0, 0, 1108, 1080, 1, 0, 0, 0, 1108, 1081, 1, 0, 0, 0, 1108, 1082, 1, 0, 0, 0, 1108, 1083, 1, 0, 0, 0, 1108, 1084, 1, 0, 0, 0, 1108, 1085, 1, 0, 0, 0, 1108, 1086, 1, 0, 0, 0, 1108, 1087, 1, 0, 0, 0, 1108, 1088, 1, 0, 0, 0, 1108, 1089, 1, 0, 0, 0, 1108, 1090, 1, 0, 0, 0, 1108, 1091, 1, 0, 0, 0, 1108, 1092, 1, 0, 0, 0, 1108, 1093, 1, 0, 0, 0, 1108, 1094, 1, 0, 0, 0, 1108, 1095, 1, 0, 0, 0, 1108, 1096, 1, 0, 0, 0, 1108, 1097, 1, 0, 0, 0, 1108, 1098, 1, 0, 0, 0, 1108, 1099, 1, 0, 0, 0, 1108, 1100, 1, 0, 0, 0, 1108, 1101, 1, 0, 0, 0, 1108, 1102, 1, 0, 0, 0, 1108, 1103, 1, 0, 0, 0, 1108, 1104, 1, 0, 0, 0, 1108, 1105, 1, 0, 0, 0, 1108, 1106, 1, 0, 0, 0, 1108, 1107, 1, 0, 0, 0, 1109, 227, 1, 0, 0, 0, 78, 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, 963, 967, 976, 979, 988, 992, 1006, 1108] \ No newline at end of file +[4, 1, 336, 1160, 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, 3, 6, 274, 8, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 280, 8, 6, 1, 6, 1, 6, 1, 6, 3, 6, 285, 8, 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, 298, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 306, 8, 11, 10, 11, 12, 11, 309, 9, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 315, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 320, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 325, 8, 12, 1, 12, 1, 12, 1, 12, 5, 12, 330, 8, 12, 10, 12, 12, 12, 333, 9, 12, 1, 12, 3, 12, 336, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 341, 8, 12, 1, 13, 1, 13, 3, 13, 345, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 351, 8, 13, 1, 13, 1, 13, 1, 13, 3, 13, 356, 8, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 365, 8, 15, 10, 15, 12, 15, 368, 9, 15, 1, 16, 1, 16, 3, 16, 372, 8, 16, 1, 16, 1, 16, 3, 16, 376, 8, 16, 1, 17, 1, 17, 3, 17, 380, 8, 17, 1, 17, 1, 17, 3, 17, 384, 8, 17, 1, 18, 1, 18, 1, 18, 3, 18, 389, 8, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 5, 21, 401, 8, 21, 10, 21, 12, 21, 404, 9, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 414, 8, 22, 1, 23, 1, 23, 1, 24, 1, 24, 5, 24, 420, 8, 24, 10, 24, 12, 24, 423, 9, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 3, 25, 434, 8, 25, 1, 26, 1, 26, 5, 26, 438, 8, 26, 10, 26, 12, 26, 441, 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, 479, 8, 27, 1, 28, 1, 28, 5, 28, 483, 8, 28, 10, 28, 12, 28, 486, 9, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 3, 30, 504, 8, 30, 1, 31, 1, 31, 1, 31, 5, 31, 509, 8, 31, 10, 31, 12, 31, 512, 9, 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, 530, 8, 34, 1, 35, 1, 35, 1, 35, 3, 35, 535, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 543, 8, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 5, 37, 550, 8, 37, 10, 37, 12, 37, 553, 9, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 3, 39, 562, 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, 579, 8, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 588, 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, 603, 8, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 611, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 618, 8, 45, 1, 45, 1, 45, 1, 45, 1, 45, 5, 45, 624, 8, 45, 10, 45, 12, 45, 627, 9, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 637, 8, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 3, 47, 649, 8, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 5, 47, 657, 8, 47, 10, 47, 12, 47, 660, 9, 47, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 666, 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, 679, 8, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, 688, 8, 52, 10, 52, 12, 52, 691, 9, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 701, 8, 53, 10, 53, 12, 53, 704, 9, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 711, 8, 53, 10, 53, 12, 53, 714, 9, 53, 1, 53, 1, 53, 1, 54, 1, 54, 3, 54, 720, 8, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 5, 56, 730, 8, 56, 10, 56, 12, 56, 733, 9, 56, 1, 57, 1, 57, 1, 57, 5, 57, 738, 8, 57, 10, 57, 12, 57, 741, 9, 57, 1, 58, 3, 58, 744, 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, 769, 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, 802, 8, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 810, 8, 66, 1, 67, 1, 67, 1, 67, 5, 67, 815, 8, 67, 10, 67, 12, 67, 818, 9, 67, 3, 67, 820, 8, 67, 1, 68, 1, 68, 1, 68, 3, 68, 825, 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, 843, 8, 71, 1, 72, 1, 72, 3, 72, 847, 8, 72, 1, 73, 1, 73, 3, 73, 851, 8, 73, 1, 74, 1, 74, 1, 75, 1, 75, 3, 75, 857, 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, 882, 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, 910, 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, 943, 8, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 97, 3, 97, 952, 8, 97, 1, 97, 1, 97, 1, 98, 3, 98, 957, 8, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 3, 100, 966, 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, 985, 8, 106, 10, 106, 12, 106, 988, 9, 106, 1, 106, 1, 106, 1, 107, 1, 107, 1, 107, 5, 107, 995, 8, 107, 10, 107, 12, 107, 998, 9, 107, 1, 108, 1, 108, 1, 108, 5, 108, 1003, 8, 108, 10, 108, 12, 108, 1006, 9, 108, 1, 109, 1, 109, 1, 109, 5, 109, 1011, 8, 109, 10, 109, 12, 109, 1014, 9, 109, 1, 110, 3, 110, 1017, 8, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 1, 110, 3, 110, 1026, 8, 110, 1, 111, 3, 111, 1029, 8, 111, 1, 111, 1, 111, 1, 112, 1, 112, 1, 112, 5, 112, 1036, 8, 112, 10, 112, 12, 112, 1039, 9, 112, 1, 112, 3, 112, 1042, 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, 1056, 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, 1158, 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, 1318, 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, 284, 1, 0, 0, 0, 14, 286, 1, 0, 0, 0, 16, 289, 1, 0, 0, 0, 18, 292, 1, 0, 0, 0, 20, 295, 1, 0, 0, 0, 22, 301, 1, 0, 0, 0, 24, 310, 1, 0, 0, 0, 26, 342, 1, 0, 0, 0, 28, 357, 1, 0, 0, 0, 30, 360, 1, 0, 0, 0, 32, 369, 1, 0, 0, 0, 34, 377, 1, 0, 0, 0, 36, 385, 1, 0, 0, 0, 38, 390, 1, 0, 0, 0, 40, 394, 1, 0, 0, 0, 42, 398, 1, 0, 0, 0, 44, 413, 1, 0, 0, 0, 46, 415, 1, 0, 0, 0, 48, 417, 1, 0, 0, 0, 50, 433, 1, 0, 0, 0, 52, 435, 1, 0, 0, 0, 54, 478, 1, 0, 0, 0, 56, 480, 1, 0, 0, 0, 58, 487, 1, 0, 0, 0, 60, 503, 1, 0, 0, 0, 62, 505, 1, 0, 0, 0, 64, 513, 1, 0, 0, 0, 66, 517, 1, 0, 0, 0, 68, 529, 1, 0, 0, 0, 70, 531, 1, 0, 0, 0, 72, 536, 1, 0, 0, 0, 74, 546, 1, 0, 0, 0, 76, 554, 1, 0, 0, 0, 78, 558, 1, 0, 0, 0, 80, 578, 1, 0, 0, 0, 82, 580, 1, 0, 0, 0, 84, 582, 1, 0, 0, 0, 86, 591, 1, 0, 0, 0, 88, 602, 1, 0, 0, 0, 90, 610, 1, 0, 0, 0, 92, 636, 1, 0, 0, 0, 94, 648, 1, 0, 0, 0, 96, 665, 1, 0, 0, 0, 98, 667, 1, 0, 0, 0, 100, 674, 1, 0, 0, 0, 102, 678, 1, 0, 0, 0, 104, 680, 1, 0, 0, 0, 106, 694, 1, 0, 0, 0, 108, 719, 1, 0, 0, 0, 110, 721, 1, 0, 0, 0, 112, 726, 1, 0, 0, 0, 114, 734, 1, 0, 0, 0, 116, 743, 1, 0, 0, 0, 118, 768, 1, 0, 0, 0, 120, 770, 1, 0, 0, 0, 122, 772, 1, 0, 0, 0, 124, 774, 1, 0, 0, 0, 126, 779, 1, 0, 0, 0, 128, 786, 1, 0, 0, 0, 130, 801, 1, 0, 0, 0, 132, 809, 1, 0, 0, 0, 134, 819, 1, 0, 0, 0, 136, 824, 1, 0, 0, 0, 138, 828, 1, 0, 0, 0, 140, 832, 1, 0, 0, 0, 142, 842, 1, 0, 0, 0, 144, 846, 1, 0, 0, 0, 146, 850, 1, 0, 0, 0, 148, 852, 1, 0, 0, 0, 150, 856, 1, 0, 0, 0, 152, 881, 1, 0, 0, 0, 154, 883, 1, 0, 0, 0, 156, 885, 1, 0, 0, 0, 158, 887, 1, 0, 0, 0, 160, 894, 1, 0, 0, 0, 162, 896, 1, 0, 0, 0, 164, 903, 1, 0, 0, 0, 166, 905, 1, 0, 0, 0, 168, 909, 1, 0, 0, 0, 170, 911, 1, 0, 0, 0, 172, 920, 1, 0, 0, 0, 174, 922, 1, 0, 0, 0, 176, 924, 1, 0, 0, 0, 178, 926, 1, 0, 0, 0, 180, 928, 1, 0, 0, 0, 182, 930, 1, 0, 0, 0, 184, 932, 1, 0, 0, 0, 186, 934, 1, 0, 0, 0, 188, 942, 1, 0, 0, 0, 190, 944, 1, 0, 0, 0, 192, 948, 1, 0, 0, 0, 194, 951, 1, 0, 0, 0, 196, 956, 1, 0, 0, 0, 198, 960, 1, 0, 0, 0, 200, 965, 1, 0, 0, 0, 202, 967, 1, 0, 0, 0, 204, 970, 1, 0, 0, 0, 206, 973, 1, 0, 0, 0, 208, 976, 1, 0, 0, 0, 210, 978, 1, 0, 0, 0, 212, 980, 1, 0, 0, 0, 214, 991, 1, 0, 0, 0, 216, 999, 1, 0, 0, 0, 218, 1007, 1, 0, 0, 0, 220, 1025, 1, 0, 0, 0, 222, 1028, 1, 0, 0, 0, 224, 1055, 1, 0, 0, 0, 226, 1157, 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, 285, 3, 60, 30, 0, 272, 274, 5, 2, 0, 0, 273, 272, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, 275, 1, 0, 0, 0, 275, 276, 3, 60, 30, 0, 276, 277, 3, 90, 45, 0, 277, 285, 1, 0, 0, 0, 278, 280, 5, 2, 0, 0, 279, 278, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 282, 3, 90, 45, 0, 282, 283, 3, 60, 30, 0, 283, 285, 1, 0, 0, 0, 284, 269, 1, 0, 0, 0, 284, 273, 1, 0, 0, 0, 284, 279, 1, 0, 0, 0, 285, 13, 1, 0, 0, 0, 286, 287, 5, 3, 0, 0, 287, 288, 3, 62, 31, 0, 288, 15, 1, 0, 0, 0, 289, 290, 5, 4, 0, 0, 290, 291, 5, 33, 0, 0, 291, 17, 1, 0, 0, 0, 292, 293, 5, 6, 0, 0, 293, 294, 3, 90, 45, 0, 294, 19, 1, 0, 0, 0, 295, 297, 5, 7, 0, 0, 296, 298, 7, 0, 0, 0, 297, 296, 1, 0, 0, 0, 297, 298, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 300, 3, 112, 56, 0, 300, 21, 1, 0, 0, 0, 301, 302, 5, 8, 0, 0, 302, 307, 3, 64, 32, 0, 303, 304, 5, 110, 0, 0, 304, 306, 3, 64, 32, 0, 305, 303, 1, 0, 0, 0, 306, 309, 1, 0, 0, 0, 307, 305, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 23, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 310, 314, 5, 9, 0, 0, 311, 312, 5, 42, 0, 0, 312, 313, 5, 112, 0, 0, 313, 315, 3, 194, 97, 0, 314, 311, 1, 0, 0, 0, 314, 315, 1, 0, 0, 0, 315, 319, 1, 0, 0, 0, 316, 317, 5, 43, 0, 0, 317, 318, 5, 112, 0, 0, 318, 320, 3, 198, 99, 0, 319, 316, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 324, 1, 0, 0, 0, 321, 322, 5, 44, 0, 0, 322, 323, 5, 112, 0, 0, 323, 325, 3, 192, 96, 0, 324, 321, 1, 0, 0, 0, 324, 325, 1, 0, 0, 0, 325, 326, 1, 0, 0, 0, 326, 331, 3, 78, 39, 0, 327, 328, 5, 110, 0, 0, 328, 330, 3, 78, 39, 0, 329, 327, 1, 0, 0, 0, 330, 333, 1, 0, 0, 0, 331, 329, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, 335, 1, 0, 0, 0, 333, 331, 1, 0, 0, 0, 334, 336, 3, 68, 34, 0, 335, 334, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 340, 1, 0, 0, 0, 337, 338, 5, 41, 0, 0, 338, 339, 5, 112, 0, 0, 339, 341, 3, 198, 99, 0, 340, 337, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 25, 1, 0, 0, 0, 342, 344, 5, 10, 0, 0, 343, 345, 3, 194, 97, 0, 344, 343, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 350, 3, 112, 56, 0, 347, 348, 5, 39, 0, 0, 348, 349, 5, 112, 0, 0, 349, 351, 3, 198, 99, 0, 350, 347, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 355, 1, 0, 0, 0, 352, 353, 5, 40, 0, 0, 353, 354, 5, 112, 0, 0, 354, 356, 3, 198, 99, 0, 355, 352, 1, 0, 0, 0, 355, 356, 1, 0, 0, 0, 356, 27, 1, 0, 0, 0, 357, 358, 5, 11, 0, 0, 358, 359, 3, 74, 37, 0, 359, 29, 1, 0, 0, 0, 360, 361, 5, 12, 0, 0, 361, 366, 3, 76, 38, 0, 362, 363, 5, 110, 0, 0, 363, 365, 3, 76, 38, 0, 364, 362, 1, 0, 0, 0, 365, 368, 1, 0, 0, 0, 366, 364, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 31, 1, 0, 0, 0, 368, 366, 1, 0, 0, 0, 369, 371, 5, 13, 0, 0, 370, 372, 3, 194, 97, 0, 371, 370, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 375, 1, 0, 0, 0, 373, 374, 5, 5, 0, 0, 374, 376, 3, 194, 97, 0, 375, 373, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 33, 1, 0, 0, 0, 377, 379, 5, 14, 0, 0, 378, 380, 3, 194, 97, 0, 379, 378, 1, 0, 0, 0, 379, 380, 1, 0, 0, 0, 380, 381, 1, 0, 0, 0, 381, 383, 3, 112, 56, 0, 382, 384, 3, 66, 33, 0, 383, 382, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 35, 1, 0, 0, 0, 385, 386, 5, 15, 0, 0, 386, 388, 3, 112, 56, 0, 387, 389, 3, 66, 33, 0, 388, 387, 1, 0, 0, 0, 388, 389, 1, 0, 0, 0, 389, 37, 1, 0, 0, 0, 390, 391, 5, 20, 0, 0, 391, 392, 3, 88, 44, 0, 392, 393, 3, 192, 96, 0, 393, 39, 1, 0, 0, 0, 394, 395, 5, 16, 0, 0, 395, 396, 3, 88, 44, 0, 396, 397, 3, 192, 96, 0, 397, 41, 1, 0, 0, 0, 398, 402, 5, 22, 0, 0, 399, 401, 3, 44, 22, 0, 400, 399, 1, 0, 0, 0, 401, 404, 1, 0, 0, 0, 402, 400, 1, 0, 0, 0, 402, 403, 1, 0, 0, 0, 403, 405, 1, 0, 0, 0, 404, 402, 1, 0, 0, 0, 405, 406, 3, 88, 44, 0, 406, 43, 1, 0, 0, 0, 407, 408, 5, 23, 0, 0, 408, 409, 5, 112, 0, 0, 409, 414, 3, 192, 96, 0, 410, 411, 5, 21, 0, 0, 411, 412, 5, 112, 0, 0, 412, 414, 3, 192, 96, 0, 413, 407, 1, 0, 0, 0, 413, 410, 1, 0, 0, 0, 414, 45, 1, 0, 0, 0, 415, 416, 7, 1, 0, 0, 416, 47, 1, 0, 0, 0, 417, 421, 5, 24, 0, 0, 418, 420, 3, 50, 25, 0, 419, 418, 1, 0, 0, 0, 420, 423, 1, 0, 0, 0, 421, 419, 1, 0, 0, 0, 421, 422, 1, 0, 0, 0, 422, 49, 1, 0, 0, 0, 423, 421, 1, 0, 0, 0, 424, 425, 5, 45, 0, 0, 425, 426, 5, 112, 0, 0, 426, 434, 3, 194, 97, 0, 427, 428, 5, 46, 0, 0, 428, 429, 5, 112, 0, 0, 429, 434, 3, 194, 97, 0, 430, 431, 5, 47, 0, 0, 431, 432, 5, 112, 0, 0, 432, 434, 3, 192, 96, 0, 433, 424, 1, 0, 0, 0, 433, 427, 1, 0, 0, 0, 433, 430, 1, 0, 0, 0, 434, 51, 1, 0, 0, 0, 435, 439, 5, 25, 0, 0, 436, 438, 3, 54, 27, 0, 437, 436, 1, 0, 0, 0, 438, 441, 1, 0, 0, 0, 439, 437, 1, 0, 0, 0, 439, 440, 1, 0, 0, 0, 440, 53, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 442, 443, 5, 48, 0, 0, 443, 444, 5, 112, 0, 0, 444, 479, 3, 194, 97, 0, 445, 446, 5, 49, 0, 0, 446, 447, 5, 112, 0, 0, 447, 479, 3, 194, 97, 0, 448, 449, 5, 50, 0, 0, 449, 450, 5, 112, 0, 0, 450, 479, 3, 194, 97, 0, 451, 452, 5, 51, 0, 0, 452, 453, 5, 112, 0, 0, 453, 479, 3, 194, 97, 0, 454, 455, 5, 52, 0, 0, 455, 456, 5, 112, 0, 0, 456, 479, 3, 196, 98, 0, 457, 458, 5, 53, 0, 0, 458, 459, 5, 112, 0, 0, 459, 479, 3, 196, 98, 0, 460, 461, 5, 54, 0, 0, 461, 462, 5, 112, 0, 0, 462, 479, 3, 192, 96, 0, 463, 464, 5, 55, 0, 0, 464, 465, 5, 112, 0, 0, 465, 479, 3, 192, 96, 0, 466, 467, 5, 215, 0, 0, 467, 468, 5, 112, 0, 0, 468, 479, 3, 192, 96, 0, 469, 470, 5, 56, 0, 0, 470, 471, 5, 112, 0, 0, 471, 479, 3, 192, 96, 0, 472, 473, 5, 57, 0, 0, 473, 474, 5, 112, 0, 0, 474, 479, 3, 194, 97, 0, 475, 476, 5, 58, 0, 0, 476, 477, 5, 112, 0, 0, 477, 479, 3, 196, 98, 0, 478, 442, 1, 0, 0, 0, 478, 445, 1, 0, 0, 0, 478, 448, 1, 0, 0, 0, 478, 451, 1, 0, 0, 0, 478, 454, 1, 0, 0, 0, 478, 457, 1, 0, 0, 0, 478, 460, 1, 0, 0, 0, 478, 463, 1, 0, 0, 0, 478, 466, 1, 0, 0, 0, 478, 469, 1, 0, 0, 0, 478, 472, 1, 0, 0, 0, 478, 475, 1, 0, 0, 0, 479, 55, 1, 0, 0, 0, 480, 484, 5, 26, 0, 0, 481, 483, 3, 58, 29, 0, 482, 481, 1, 0, 0, 0, 483, 486, 1, 0, 0, 0, 484, 482, 1, 0, 0, 0, 484, 485, 1, 0, 0, 0, 485, 57, 1, 0, 0, 0, 486, 484, 1, 0, 0, 0, 487, 488, 3, 220, 110, 0, 488, 489, 5, 112, 0, 0, 489, 490, 3, 188, 94, 0, 490, 59, 1, 0, 0, 0, 491, 492, 5, 29, 0, 0, 492, 493, 5, 112, 0, 0, 493, 504, 3, 62, 31, 0, 494, 495, 5, 30, 0, 0, 495, 496, 5, 112, 0, 0, 496, 504, 3, 62, 31, 0, 497, 498, 5, 29, 0, 0, 498, 499, 5, 112, 0, 0, 499, 504, 3, 110, 55, 0, 500, 501, 5, 30, 0, 0, 501, 502, 5, 112, 0, 0, 502, 504, 3, 110, 55, 0, 503, 491, 1, 0, 0, 0, 503, 494, 1, 0, 0, 0, 503, 497, 1, 0, 0, 0, 503, 500, 1, 0, 0, 0, 504, 61, 1, 0, 0, 0, 505, 510, 3, 108, 54, 0, 506, 507, 5, 110, 0, 0, 507, 509, 3, 108, 54, 0, 508, 506, 1, 0, 0, 0, 509, 512, 1, 0, 0, 0, 510, 508, 1, 0, 0, 0, 510, 511, 1, 0, 0, 0, 511, 63, 1, 0, 0, 0, 512, 510, 1, 0, 0, 0, 513, 514, 3, 122, 61, 0, 514, 515, 5, 27, 0, 0, 515, 516, 3, 122, 61, 0, 516, 65, 1, 0, 0, 0, 517, 518, 5, 28, 0, 0, 518, 519, 3, 112, 56, 0, 519, 67, 1, 0, 0, 0, 520, 521, 5, 28, 0, 0, 521, 530, 3, 112, 56, 0, 522, 523, 5, 28, 0, 0, 523, 530, 3, 70, 35, 0, 524, 525, 5, 28, 0, 0, 525, 526, 3, 70, 35, 0, 526, 527, 5, 110, 0, 0, 527, 528, 3, 112, 56, 0, 528, 530, 1, 0, 0, 0, 529, 520, 1, 0, 0, 0, 529, 522, 1, 0, 0, 0, 529, 524, 1, 0, 0, 0, 530, 69, 1, 0, 0, 0, 531, 534, 3, 72, 36, 0, 532, 533, 5, 27, 0, 0, 533, 535, 3, 214, 107, 0, 534, 532, 1, 0, 0, 0, 534, 535, 1, 0, 0, 0, 535, 71, 1, 0, 0, 0, 536, 537, 5, 320, 0, 0, 537, 538, 5, 125, 0, 0, 538, 539, 3, 120, 60, 0, 539, 540, 5, 110, 0, 0, 540, 542, 3, 188, 94, 0, 541, 543, 3, 210, 105, 0, 542, 541, 1, 0, 0, 0, 542, 543, 1, 0, 0, 0, 543, 544, 1, 0, 0, 0, 544, 545, 5, 126, 0, 0, 545, 73, 1, 0, 0, 0, 546, 551, 3, 116, 58, 0, 547, 548, 5, 110, 0, 0, 548, 550, 3, 116, 58, 0, 549, 547, 1, 0, 0, 0, 550, 553, 1, 0, 0, 0, 551, 549, 1, 0, 0, 0, 551, 552, 1, 0, 0, 0, 552, 75, 1, 0, 0, 0, 553, 551, 1, 0, 0, 0, 554, 555, 3, 120, 60, 0, 555, 556, 5, 112, 0, 0, 556, 557, 3, 88, 44, 0, 557, 77, 1, 0, 0, 0, 558, 561, 3, 80, 40, 0, 559, 560, 5, 27, 0, 0, 560, 562, 3, 122, 61, 0, 561, 559, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 79, 1, 0, 0, 0, 563, 564, 3, 82, 41, 0, 564, 565, 5, 125, 0, 0, 565, 566, 3, 94, 47, 0, 566, 567, 5, 126, 0, 0, 567, 579, 1, 0, 0, 0, 568, 569, 5, 136, 0, 0, 569, 570, 5, 125, 0, 0, 570, 579, 5, 126, 0, 0, 571, 572, 7, 2, 0, 0, 572, 573, 5, 125, 0, 0, 573, 574, 3, 94, 47, 0, 574, 575, 5, 126, 0, 0, 575, 579, 1, 0, 0, 0, 576, 579, 3, 86, 43, 0, 577, 579, 3, 84, 42, 0, 578, 563, 1, 0, 0, 0, 578, 568, 1, 0, 0, 0, 578, 571, 1, 0, 0, 0, 578, 576, 1, 0, 0, 0, 578, 577, 1, 0, 0, 0, 579, 81, 1, 0, 0, 0, 580, 581, 7, 3, 0, 0, 581, 83, 1, 0, 0, 0, 582, 583, 5, 155, 0, 0, 583, 584, 5, 125, 0, 0, 584, 587, 3, 120, 60, 0, 585, 586, 5, 110, 0, 0, 586, 588, 3, 194, 97, 0, 587, 585, 1, 0, 0, 0, 587, 588, 1, 0, 0, 0, 588, 589, 1, 0, 0, 0, 589, 590, 5, 126, 0, 0, 590, 85, 1, 0, 0, 0, 591, 592, 5, 154, 0, 0, 592, 593, 5, 114, 0, 0, 593, 594, 3, 194, 97, 0, 594, 595, 5, 113, 0, 0, 595, 596, 5, 125, 0, 0, 596, 597, 3, 120, 60, 0, 597, 598, 5, 126, 0, 0, 598, 87, 1, 0, 0, 0, 599, 603, 3, 90, 45, 0, 600, 603, 3, 92, 46, 0, 601, 603, 3, 94, 47, 0, 602, 599, 1, 0, 0, 0, 602, 600, 1, 0, 0, 0, 602, 601, 1, 0, 0, 0, 603, 89, 1, 0, 0, 0, 604, 605, 6, 45, -1, 0, 605, 611, 3, 92, 46, 0, 606, 607, 5, 61, 0, 0, 607, 611, 3, 90, 45, 6, 608, 611, 3, 100, 50, 0, 609, 611, 3, 102, 51, 0, 610, 604, 1, 0, 0, 0, 610, 606, 1, 0, 0, 0, 610, 608, 1, 0, 0, 0, 610, 609, 1, 0, 0, 0, 611, 625, 1, 0, 0, 0, 612, 613, 10, 5, 0, 0, 613, 614, 5, 62, 0, 0, 614, 624, 3, 90, 45, 6, 615, 617, 10, 4, 0, 0, 616, 618, 5, 63, 0, 0, 617, 616, 1, 0, 0, 0, 617, 618, 1, 0, 0, 0, 618, 619, 1, 0, 0, 0, 619, 624, 3, 90, 45, 5, 620, 621, 10, 3, 0, 0, 621, 622, 5, 64, 0, 0, 622, 624, 3, 90, 45, 4, 623, 612, 1, 0, 0, 0, 623, 615, 1, 0, 0, 0, 623, 620, 1, 0, 0, 0, 624, 627, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 91, 1, 0, 0, 0, 627, 625, 1, 0, 0, 0, 628, 629, 3, 94, 47, 0, 629, 630, 3, 182, 91, 0, 630, 631, 3, 94, 47, 0, 631, 637, 1, 0, 0, 0, 632, 633, 3, 94, 47, 0, 633, 634, 5, 60, 0, 0, 634, 635, 3, 212, 106, 0, 635, 637, 1, 0, 0, 0, 636, 628, 1, 0, 0, 0, 636, 632, 1, 0, 0, 0, 637, 93, 1, 0, 0, 0, 638, 639, 6, 47, -1, 0, 639, 649, 3, 96, 48, 0, 640, 649, 3, 98, 49, 0, 641, 649, 3, 162, 81, 0, 642, 649, 3, 158, 79, 0, 643, 649, 3, 170, 85, 0, 644, 645, 5, 125, 0, 0, 645, 646, 3, 94, 47, 0, 646, 647, 5, 126, 0, 0, 647, 649, 1, 0, 0, 0, 648, 638, 1, 0, 0, 0, 648, 640, 1, 0, 0, 0, 648, 641, 1, 0, 0, 0, 648, 642, 1, 0, 0, 0, 648, 643, 1, 0, 0, 0, 648, 644, 1, 0, 0, 0, 649, 658, 1, 0, 0, 0, 650, 651, 10, 8, 0, 0, 651, 652, 7, 4, 0, 0, 652, 657, 3, 94, 47, 9, 653, 654, 10, 7, 0, 0, 654, 655, 7, 0, 0, 0, 655, 657, 3, 94, 47, 8, 656, 650, 1, 0, 0, 0, 656, 653, 1, 0, 0, 0, 657, 660, 1, 0, 0, 0, 658, 656, 1, 0, 0, 0, 658, 659, 1, 0, 0, 0, 659, 95, 1, 0, 0, 0, 660, 658, 1, 0, 0, 0, 661, 666, 3, 124, 62, 0, 662, 666, 3, 126, 63, 0, 663, 666, 3, 120, 60, 0, 664, 666, 3, 188, 94, 0, 665, 661, 1, 0, 0, 0, 665, 662, 1, 0, 0, 0, 665, 663, 1, 0, 0, 0, 665, 664, 1, 0, 0, 0, 666, 97, 1, 0, 0, 0, 667, 668, 3, 180, 90, 0, 668, 669, 5, 125, 0, 0, 669, 670, 3, 136, 68, 0, 670, 671, 5, 60, 0, 0, 671, 672, 3, 136, 68, 0, 672, 673, 5, 126, 0, 0, 673, 99, 1, 0, 0, 0, 674, 675, 3, 128, 64, 0, 675, 101, 1, 0, 0, 0, 676, 679, 3, 104, 52, 0, 677, 679, 3, 106, 53, 0, 678, 676, 1, 0, 0, 0, 678, 677, 1, 0, 0, 0, 679, 103, 1, 0, 0, 0, 680, 681, 3, 184, 92, 0, 681, 682, 5, 125, 0, 0, 682, 683, 3, 146, 73, 0, 683, 684, 5, 110, 0, 0, 684, 689, 3, 148, 74, 0, 685, 686, 5, 110, 0, 0, 686, 688, 3, 138, 69, 0, 687, 685, 1, 0, 0, 0, 688, 691, 1, 0, 0, 0, 689, 687, 1, 0, 0, 0, 689, 690, 1, 0, 0, 0, 690, 692, 1, 0, 0, 0, 691, 689, 1, 0, 0, 0, 692, 693, 5, 126, 0, 0, 693, 105, 1, 0, 0, 0, 694, 695, 3, 186, 93, 0, 695, 696, 5, 125, 0, 0, 696, 697, 5, 127, 0, 0, 697, 702, 3, 142, 71, 0, 698, 699, 5, 110, 0, 0, 699, 701, 3, 142, 71, 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, 705, 1, 0, 0, 0, 704, 702, 1, 0, 0, 0, 705, 706, 5, 128, 0, 0, 706, 707, 5, 110, 0, 0, 707, 712, 3, 148, 74, 0, 708, 709, 5, 110, 0, 0, 709, 711, 3, 138, 69, 0, 710, 708, 1, 0, 0, 0, 711, 714, 1, 0, 0, 0, 712, 710, 1, 0, 0, 0, 712, 713, 1, 0, 0, 0, 713, 715, 1, 0, 0, 0, 714, 712, 1, 0, 0, 0, 715, 716, 5, 126, 0, 0, 716, 107, 1, 0, 0, 0, 717, 720, 3, 216, 108, 0, 718, 720, 5, 332, 0, 0, 719, 717, 1, 0, 0, 0, 719, 718, 1, 0, 0, 0, 720, 109, 1, 0, 0, 0, 721, 722, 3, 214, 107, 0, 722, 723, 5, 125, 0, 0, 723, 724, 3, 134, 67, 0, 724, 725, 5, 126, 0, 0, 725, 111, 1, 0, 0, 0, 726, 731, 3, 120, 60, 0, 727, 728, 5, 110, 0, 0, 728, 730, 3, 120, 60, 0, 729, 727, 1, 0, 0, 0, 730, 733, 1, 0, 0, 0, 731, 729, 1, 0, 0, 0, 731, 732, 1, 0, 0, 0, 732, 113, 1, 0, 0, 0, 733, 731, 1, 0, 0, 0, 734, 739, 3, 122, 61, 0, 735, 736, 5, 110, 0, 0, 736, 738, 3, 122, 61, 0, 737, 735, 1, 0, 0, 0, 738, 741, 1, 0, 0, 0, 739, 737, 1, 0, 0, 0, 739, 740, 1, 0, 0, 0, 740, 115, 1, 0, 0, 0, 741, 739, 1, 0, 0, 0, 742, 744, 7, 0, 0, 0, 743, 742, 1, 0, 0, 0, 743, 744, 1, 0, 0, 0, 744, 745, 1, 0, 0, 0, 745, 746, 3, 118, 59, 0, 746, 117, 1, 0, 0, 0, 747, 769, 3, 120, 60, 0, 748, 749, 5, 35, 0, 0, 749, 750, 5, 125, 0, 0, 750, 751, 3, 120, 60, 0, 751, 752, 5, 126, 0, 0, 752, 769, 1, 0, 0, 0, 753, 754, 5, 36, 0, 0, 754, 755, 5, 125, 0, 0, 755, 756, 3, 120, 60, 0, 756, 757, 5, 126, 0, 0, 757, 769, 1, 0, 0, 0, 758, 759, 5, 37, 0, 0, 759, 760, 5, 125, 0, 0, 760, 761, 3, 120, 60, 0, 761, 762, 5, 126, 0, 0, 762, 769, 1, 0, 0, 0, 763, 764, 5, 38, 0, 0, 764, 765, 5, 125, 0, 0, 765, 766, 3, 120, 60, 0, 766, 767, 5, 126, 0, 0, 767, 769, 1, 0, 0, 0, 768, 747, 1, 0, 0, 0, 768, 748, 1, 0, 0, 0, 768, 753, 1, 0, 0, 0, 768, 758, 1, 0, 0, 0, 768, 763, 1, 0, 0, 0, 769, 119, 1, 0, 0, 0, 770, 771, 3, 214, 107, 0, 771, 121, 1, 0, 0, 0, 772, 773, 3, 218, 109, 0, 773, 123, 1, 0, 0, 0, 774, 775, 3, 132, 66, 0, 775, 776, 5, 125, 0, 0, 776, 777, 3, 134, 67, 0, 777, 778, 5, 126, 0, 0, 778, 125, 1, 0, 0, 0, 779, 780, 5, 274, 0, 0, 780, 781, 5, 125, 0, 0, 781, 782, 3, 88, 44, 0, 782, 783, 5, 27, 0, 0, 783, 784, 3, 130, 65, 0, 784, 785, 5, 126, 0, 0, 785, 127, 1, 0, 0, 0, 786, 787, 3, 174, 87, 0, 787, 788, 5, 125, 0, 0, 788, 789, 3, 134, 67, 0, 789, 790, 5, 126, 0, 0, 790, 129, 1, 0, 0, 0, 791, 802, 5, 212, 0, 0, 792, 802, 5, 241, 0, 0, 793, 802, 5, 243, 0, 0, 794, 802, 5, 102, 0, 0, 795, 802, 5, 103, 0, 0, 796, 802, 5, 104, 0, 0, 797, 802, 5, 105, 0, 0, 798, 802, 5, 106, 0, 0, 799, 802, 5, 107, 0, 0, 800, 802, 5, 108, 0, 0, 801, 791, 1, 0, 0, 0, 801, 792, 1, 0, 0, 0, 801, 793, 1, 0, 0, 0, 801, 794, 1, 0, 0, 0, 801, 795, 1, 0, 0, 0, 801, 796, 1, 0, 0, 0, 801, 797, 1, 0, 0, 0, 801, 798, 1, 0, 0, 0, 801, 799, 1, 0, 0, 0, 801, 800, 1, 0, 0, 0, 802, 131, 1, 0, 0, 0, 803, 810, 3, 152, 76, 0, 804, 810, 3, 156, 78, 0, 805, 810, 3, 178, 89, 0, 806, 810, 3, 174, 87, 0, 807, 810, 3, 176, 88, 0, 808, 810, 3, 180, 90, 0, 809, 803, 1, 0, 0, 0, 809, 804, 1, 0, 0, 0, 809, 805, 1, 0, 0, 0, 809, 806, 1, 0, 0, 0, 809, 807, 1, 0, 0, 0, 809, 808, 1, 0, 0, 0, 810, 133, 1, 0, 0, 0, 811, 816, 3, 136, 68, 0, 812, 813, 5, 110, 0, 0, 813, 815, 3, 136, 68, 0, 814, 812, 1, 0, 0, 0, 815, 818, 1, 0, 0, 0, 816, 814, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817, 820, 1, 0, 0, 0, 818, 816, 1, 0, 0, 0, 819, 811, 1, 0, 0, 0, 819, 820, 1, 0, 0, 0, 820, 135, 1, 0, 0, 0, 821, 822, 3, 220, 110, 0, 822, 823, 5, 112, 0, 0, 823, 825, 1, 0, 0, 0, 824, 821, 1, 0, 0, 0, 824, 825, 1, 0, 0, 0, 825, 826, 1, 0, 0, 0, 826, 827, 3, 94, 47, 0, 827, 137, 1, 0, 0, 0, 828, 829, 3, 140, 70, 0, 829, 830, 5, 112, 0, 0, 830, 831, 3, 150, 75, 0, 831, 139, 1, 0, 0, 0, 832, 833, 7, 5, 0, 0, 833, 141, 1, 0, 0, 0, 834, 843, 3, 146, 73, 0, 835, 836, 3, 146, 73, 0, 836, 837, 3, 144, 72, 0, 837, 843, 1, 0, 0, 0, 838, 839, 3, 146, 73, 0, 839, 840, 5, 134, 0, 0, 840, 841, 3, 144, 72, 0, 841, 843, 1, 0, 0, 0, 842, 834, 1, 0, 0, 0, 842, 835, 1, 0, 0, 0, 842, 838, 1, 0, 0, 0, 843, 143, 1, 0, 0, 0, 844, 847, 3, 194, 97, 0, 845, 847, 3, 196, 98, 0, 846, 844, 1, 0, 0, 0, 846, 845, 1, 0, 0, 0, 847, 145, 1, 0, 0, 0, 848, 851, 3, 214, 107, 0, 849, 851, 3, 192, 96, 0, 850, 848, 1, 0, 0, 0, 850, 849, 1, 0, 0, 0, 851, 147, 1, 0, 0, 0, 852, 853, 3, 150, 75, 0, 853, 149, 1, 0, 0, 0, 854, 857, 3, 214, 107, 0, 855, 857, 3, 188, 94, 0, 856, 854, 1, 0, 0, 0, 856, 855, 1, 0, 0, 0, 857, 151, 1, 0, 0, 0, 858, 882, 5, 172, 0, 0, 859, 882, 5, 173, 0, 0, 860, 882, 5, 174, 0, 0, 861, 882, 5, 175, 0, 0, 862, 882, 5, 176, 0, 0, 863, 882, 5, 177, 0, 0, 864, 882, 5, 178, 0, 0, 865, 882, 5, 179, 0, 0, 866, 882, 5, 180, 0, 0, 867, 882, 5, 181, 0, 0, 868, 882, 5, 182, 0, 0, 869, 882, 5, 183, 0, 0, 870, 882, 5, 184, 0, 0, 871, 882, 5, 185, 0, 0, 872, 882, 5, 186, 0, 0, 873, 882, 5, 188, 0, 0, 874, 882, 5, 189, 0, 0, 875, 882, 5, 190, 0, 0, 876, 882, 5, 191, 0, 0, 877, 882, 5, 192, 0, 0, 878, 882, 5, 193, 0, 0, 879, 882, 5, 194, 0, 0, 880, 882, 3, 154, 77, 0, 881, 858, 1, 0, 0, 0, 881, 859, 1, 0, 0, 0, 881, 860, 1, 0, 0, 0, 881, 861, 1, 0, 0, 0, 881, 862, 1, 0, 0, 0, 881, 863, 1, 0, 0, 0, 881, 864, 1, 0, 0, 0, 881, 865, 1, 0, 0, 0, 881, 866, 1, 0, 0, 0, 881, 867, 1, 0, 0, 0, 881, 868, 1, 0, 0, 0, 881, 869, 1, 0, 0, 0, 881, 870, 1, 0, 0, 0, 881, 871, 1, 0, 0, 0, 881, 872, 1, 0, 0, 0, 881, 873, 1, 0, 0, 0, 881, 874, 1, 0, 0, 0, 881, 875, 1, 0, 0, 0, 881, 876, 1, 0, 0, 0, 881, 877, 1, 0, 0, 0, 881, 878, 1, 0, 0, 0, 881, 879, 1, 0, 0, 0, 881, 880, 1, 0, 0, 0, 882, 153, 1, 0, 0, 0, 883, 884, 7, 6, 0, 0, 884, 155, 1, 0, 0, 0, 885, 886, 7, 7, 0, 0, 886, 157, 1, 0, 0, 0, 887, 888, 5, 226, 0, 0, 888, 889, 5, 125, 0, 0, 889, 890, 3, 160, 80, 0, 890, 891, 5, 110, 0, 0, 891, 892, 3, 136, 68, 0, 892, 893, 5, 126, 0, 0, 893, 159, 1, 0, 0, 0, 894, 895, 7, 8, 0, 0, 895, 161, 1, 0, 0, 0, 896, 897, 5, 223, 0, 0, 897, 898, 5, 125, 0, 0, 898, 899, 3, 168, 84, 0, 899, 900, 5, 5, 0, 0, 900, 901, 3, 136, 68, 0, 901, 902, 5, 126, 0, 0, 902, 163, 1, 0, 0, 0, 903, 904, 7, 9, 0, 0, 904, 165, 1, 0, 0, 0, 905, 906, 7, 10, 0, 0, 906, 167, 1, 0, 0, 0, 907, 910, 3, 164, 82, 0, 908, 910, 3, 166, 83, 0, 909, 907, 1, 0, 0, 0, 909, 908, 1, 0, 0, 0, 910, 169, 1, 0, 0, 0, 911, 912, 3, 172, 86, 0, 912, 913, 5, 125, 0, 0, 913, 914, 3, 164, 82, 0, 914, 915, 5, 110, 0, 0, 915, 916, 3, 136, 68, 0, 916, 917, 5, 110, 0, 0, 917, 918, 3, 136, 68, 0, 918, 919, 5, 126, 0, 0, 919, 171, 1, 0, 0, 0, 920, 921, 7, 11, 0, 0, 921, 173, 1, 0, 0, 0, 922, 923, 7, 12, 0, 0, 923, 175, 1, 0, 0, 0, 924, 925, 5, 281, 0, 0, 925, 177, 1, 0, 0, 0, 926, 927, 7, 13, 0, 0, 927, 179, 1, 0, 0, 0, 928, 929, 5, 187, 0, 0, 929, 181, 1, 0, 0, 0, 930, 931, 7, 14, 0, 0, 931, 183, 1, 0, 0, 0, 932, 933, 7, 15, 0, 0, 933, 185, 1, 0, 0, 0, 934, 935, 7, 16, 0, 0, 935, 187, 1, 0, 0, 0, 936, 943, 3, 190, 95, 0, 937, 943, 3, 192, 96, 0, 938, 943, 3, 194, 97, 0, 939, 943, 3, 196, 98, 0, 940, 943, 3, 198, 99, 0, 941, 943, 3, 200, 100, 0, 942, 936, 1, 0, 0, 0, 942, 937, 1, 0, 0, 0, 942, 938, 1, 0, 0, 0, 942, 939, 1, 0, 0, 0, 942, 940, 1, 0, 0, 0, 942, 941, 1, 0, 0, 0, 943, 189, 1, 0, 0, 0, 944, 945, 5, 81, 0, 0, 945, 946, 3, 94, 47, 0, 946, 947, 3, 208, 104, 0, 947, 191, 1, 0, 0, 0, 948, 949, 7, 17, 0, 0, 949, 193, 1, 0, 0, 0, 950, 952, 7, 0, 0, 0, 951, 950, 1, 0, 0, 0, 951, 952, 1, 0, 0, 0, 952, 953, 1, 0, 0, 0, 953, 954, 5, 330, 0, 0, 954, 195, 1, 0, 0, 0, 955, 957, 7, 0, 0, 0, 956, 955, 1, 0, 0, 0, 956, 957, 1, 0, 0, 0, 957, 958, 1, 0, 0, 0, 958, 959, 5, 331, 0, 0, 959, 197, 1, 0, 0, 0, 960, 961, 7, 18, 0, 0, 961, 199, 1, 0, 0, 0, 962, 966, 3, 202, 101, 0, 963, 966, 3, 204, 102, 0, 964, 966, 3, 206, 103, 0, 965, 962, 1, 0, 0, 0, 965, 963, 1, 0, 0, 0, 965, 964, 1, 0, 0, 0, 966, 201, 1, 0, 0, 0, 967, 968, 5, 212, 0, 0, 968, 969, 3, 192, 96, 0, 969, 203, 1, 0, 0, 0, 970, 971, 5, 241, 0, 0, 971, 972, 3, 192, 96, 0, 972, 205, 1, 0, 0, 0, 973, 974, 5, 243, 0, 0, 974, 975, 3, 192, 96, 0, 975, 207, 1, 0, 0, 0, 976, 977, 7, 19, 0, 0, 977, 209, 1, 0, 0, 0, 978, 979, 7, 20, 0, 0, 979, 211, 1, 0, 0, 0, 980, 981, 5, 125, 0, 0, 981, 986, 3, 188, 94, 0, 982, 983, 5, 110, 0, 0, 983, 985, 3, 188, 94, 0, 984, 982, 1, 0, 0, 0, 985, 988, 1, 0, 0, 0, 986, 984, 1, 0, 0, 0, 986, 987, 1, 0, 0, 0, 987, 989, 1, 0, 0, 0, 988, 986, 1, 0, 0, 0, 989, 990, 5, 126, 0, 0, 990, 213, 1, 0, 0, 0, 991, 996, 3, 220, 110, 0, 992, 993, 5, 111, 0, 0, 993, 995, 3, 220, 110, 0, 994, 992, 1, 0, 0, 0, 995, 998, 1, 0, 0, 0, 996, 994, 1, 0, 0, 0, 996, 997, 1, 0, 0, 0, 997, 215, 1, 0, 0, 0, 998, 996, 1, 0, 0, 0, 999, 1004, 3, 222, 111, 0, 1000, 1001, 5, 111, 0, 0, 1001, 1003, 3, 220, 110, 0, 1002, 1000, 1, 0, 0, 0, 1003, 1006, 1, 0, 0, 0, 1004, 1002, 1, 0, 0, 0, 1004, 1005, 1, 0, 0, 0, 1005, 217, 1, 0, 0, 0, 1006, 1004, 1, 0, 0, 0, 1007, 1012, 3, 224, 112, 0, 1008, 1009, 5, 111, 0, 0, 1009, 1011, 3, 224, 112, 0, 1010, 1008, 1, 0, 0, 0, 1011, 1014, 1, 0, 0, 0, 1012, 1010, 1, 0, 0, 0, 1012, 1013, 1, 0, 0, 0, 1013, 219, 1, 0, 0, 0, 1014, 1012, 1, 0, 0, 0, 1015, 1017, 5, 111, 0, 0, 1016, 1015, 1, 0, 0, 0, 1016, 1017, 1, 0, 0, 0, 1017, 1018, 1, 0, 0, 0, 1018, 1026, 5, 328, 0, 0, 1019, 1020, 5, 131, 0, 0, 1020, 1021, 3, 220, 110, 0, 1021, 1022, 5, 131, 0, 0, 1022, 1026, 1, 0, 0, 0, 1023, 1026, 5, 335, 0, 0, 1024, 1026, 3, 226, 113, 0, 1025, 1016, 1, 0, 0, 0, 1025, 1019, 1, 0, 0, 0, 1025, 1023, 1, 0, 0, 0, 1025, 1024, 1, 0, 0, 0, 1026, 221, 1, 0, 0, 0, 1027, 1029, 5, 329, 0, 0, 1028, 1027, 1, 0, 0, 0, 1028, 1029, 1, 0, 0, 0, 1029, 1030, 1, 0, 0, 0, 1030, 1031, 3, 220, 110, 0, 1031, 223, 1, 0, 0, 0, 1032, 1037, 3, 220, 110, 0, 1033, 1034, 5, 122, 0, 0, 1034, 1036, 3, 220, 110, 0, 1035, 1033, 1, 0, 0, 0, 1036, 1039, 1, 0, 0, 0, 1037, 1035, 1, 0, 0, 0, 1037, 1038, 1, 0, 0, 0, 1038, 1041, 1, 0, 0, 0, 1039, 1037, 1, 0, 0, 0, 1040, 1042, 5, 122, 0, 0, 1041, 1040, 1, 0, 0, 0, 1041, 1042, 1, 0, 0, 0, 1042, 1056, 1, 0, 0, 0, 1043, 1044, 5, 129, 0, 0, 1044, 1045, 3, 224, 112, 0, 1045, 1046, 5, 129, 0, 0, 1046, 1056, 1, 0, 0, 0, 1047, 1048, 5, 130, 0, 0, 1048, 1049, 3, 224, 112, 0, 1049, 1050, 5, 130, 0, 0, 1050, 1056, 1, 0, 0, 0, 1051, 1052, 5, 131, 0, 0, 1052, 1053, 3, 224, 112, 0, 1053, 1054, 5, 131, 0, 0, 1054, 1056, 1, 0, 0, 0, 1055, 1032, 1, 0, 0, 0, 1055, 1043, 1, 0, 0, 0, 1055, 1047, 1, 0, 0, 0, 1055, 1051, 1, 0, 0, 0, 1056, 225, 1, 0, 0, 0, 1057, 1158, 5, 31, 0, 0, 1058, 1158, 3, 210, 105, 0, 1059, 1158, 5, 320, 0, 0, 1060, 1158, 3, 132, 66, 0, 1061, 1158, 3, 140, 70, 0, 1062, 1158, 3, 208, 104, 0, 1063, 1158, 3, 156, 78, 0, 1064, 1158, 3, 178, 89, 0, 1065, 1158, 3, 152, 76, 0, 1066, 1158, 3, 180, 90, 0, 1067, 1158, 5, 2, 0, 0, 1068, 1158, 5, 3, 0, 0, 1069, 1158, 5, 4, 0, 0, 1070, 1158, 5, 5, 0, 0, 1071, 1158, 5, 6, 0, 0, 1072, 1158, 5, 7, 0, 0, 1073, 1158, 5, 8, 0, 0, 1074, 1158, 5, 9, 0, 0, 1075, 1158, 5, 10, 0, 0, 1076, 1158, 5, 11, 0, 0, 1077, 1158, 5, 12, 0, 0, 1078, 1158, 5, 13, 0, 0, 1079, 1158, 5, 14, 0, 0, 1080, 1158, 5, 15, 0, 0, 1081, 1158, 5, 16, 0, 0, 1082, 1158, 5, 17, 0, 0, 1083, 1158, 5, 18, 0, 0, 1084, 1158, 5, 19, 0, 0, 1085, 1158, 5, 20, 0, 0, 1086, 1158, 5, 21, 0, 0, 1087, 1158, 5, 22, 0, 0, 1088, 1158, 5, 23, 0, 0, 1089, 1158, 5, 24, 0, 0, 1090, 1158, 5, 25, 0, 0, 1091, 1158, 5, 26, 0, 0, 1092, 1158, 5, 29, 0, 0, 1093, 1158, 5, 30, 0, 0, 1094, 1158, 5, 32, 0, 0, 1095, 1158, 5, 33, 0, 0, 1096, 1158, 5, 34, 0, 0, 1097, 1158, 5, 36, 0, 0, 1098, 1158, 5, 37, 0, 0, 1099, 1158, 5, 38, 0, 0, 1100, 1158, 5, 39, 0, 0, 1101, 1158, 5, 40, 0, 0, 1102, 1158, 5, 41, 0, 0, 1103, 1158, 5, 42, 0, 0, 1104, 1158, 5, 43, 0, 0, 1105, 1158, 5, 44, 0, 0, 1106, 1158, 5, 45, 0, 0, 1107, 1158, 5, 46, 0, 0, 1108, 1158, 5, 47, 0, 0, 1109, 1158, 5, 48, 0, 0, 1110, 1158, 5, 49, 0, 0, 1111, 1158, 5, 50, 0, 0, 1112, 1158, 5, 51, 0, 0, 1113, 1158, 5, 52, 0, 0, 1114, 1158, 5, 53, 0, 0, 1115, 1158, 5, 54, 0, 0, 1116, 1158, 5, 55, 0, 0, 1117, 1158, 5, 56, 0, 0, 1118, 1158, 5, 57, 0, 0, 1119, 1158, 5, 58, 0, 0, 1120, 1158, 5, 135, 0, 0, 1121, 1158, 5, 136, 0, 0, 1122, 1158, 5, 137, 0, 0, 1123, 1158, 5, 138, 0, 0, 1124, 1158, 5, 139, 0, 0, 1125, 1158, 5, 140, 0, 0, 1126, 1158, 5, 141, 0, 0, 1127, 1158, 5, 142, 0, 0, 1128, 1158, 5, 143, 0, 0, 1129, 1158, 5, 144, 0, 0, 1130, 1158, 5, 145, 0, 0, 1131, 1158, 5, 146, 0, 0, 1132, 1158, 5, 147, 0, 0, 1133, 1158, 5, 148, 0, 0, 1134, 1158, 5, 149, 0, 0, 1135, 1158, 5, 150, 0, 0, 1136, 1158, 5, 151, 0, 0, 1137, 1158, 5, 152, 0, 0, 1138, 1158, 5, 153, 0, 0, 1139, 1158, 5, 154, 0, 0, 1140, 1158, 5, 155, 0, 0, 1141, 1158, 5, 156, 0, 0, 1142, 1158, 5, 157, 0, 0, 1143, 1158, 5, 158, 0, 0, 1144, 1158, 5, 159, 0, 0, 1145, 1158, 5, 160, 0, 0, 1146, 1158, 5, 161, 0, 0, 1147, 1158, 5, 162, 0, 0, 1148, 1158, 5, 163, 0, 0, 1149, 1158, 5, 164, 0, 0, 1150, 1158, 5, 165, 0, 0, 1151, 1158, 5, 166, 0, 0, 1152, 1158, 5, 167, 0, 0, 1153, 1158, 5, 168, 0, 0, 1154, 1158, 5, 169, 0, 0, 1155, 1158, 5, 170, 0, 0, 1156, 1158, 5, 171, 0, 0, 1157, 1057, 1, 0, 0, 0, 1157, 1058, 1, 0, 0, 0, 1157, 1059, 1, 0, 0, 0, 1157, 1060, 1, 0, 0, 0, 1157, 1061, 1, 0, 0, 0, 1157, 1062, 1, 0, 0, 0, 1157, 1063, 1, 0, 0, 0, 1157, 1064, 1, 0, 0, 0, 1157, 1065, 1, 0, 0, 0, 1157, 1066, 1, 0, 0, 0, 1157, 1067, 1, 0, 0, 0, 1157, 1068, 1, 0, 0, 0, 1157, 1069, 1, 0, 0, 0, 1157, 1070, 1, 0, 0, 0, 1157, 1071, 1, 0, 0, 0, 1157, 1072, 1, 0, 0, 0, 1157, 1073, 1, 0, 0, 0, 1157, 1074, 1, 0, 0, 0, 1157, 1075, 1, 0, 0, 0, 1157, 1076, 1, 0, 0, 0, 1157, 1077, 1, 0, 0, 0, 1157, 1078, 1, 0, 0, 0, 1157, 1079, 1, 0, 0, 0, 1157, 1080, 1, 0, 0, 0, 1157, 1081, 1, 0, 0, 0, 1157, 1082, 1, 0, 0, 0, 1157, 1083, 1, 0, 0, 0, 1157, 1084, 1, 0, 0, 0, 1157, 1085, 1, 0, 0, 0, 1157, 1086, 1, 0, 0, 0, 1157, 1087, 1, 0, 0, 0, 1157, 1088, 1, 0, 0, 0, 1157, 1089, 1, 0, 0, 0, 1157, 1090, 1, 0, 0, 0, 1157, 1091, 1, 0, 0, 0, 1157, 1092, 1, 0, 0, 0, 1157, 1093, 1, 0, 0, 0, 1157, 1094, 1, 0, 0, 0, 1157, 1095, 1, 0, 0, 0, 1157, 1096, 1, 0, 0, 0, 1157, 1097, 1, 0, 0, 0, 1157, 1098, 1, 0, 0, 0, 1157, 1099, 1, 0, 0, 0, 1157, 1100, 1, 0, 0, 0, 1157, 1101, 1, 0, 0, 0, 1157, 1102, 1, 0, 0, 0, 1157, 1103, 1, 0, 0, 0, 1157, 1104, 1, 0, 0, 0, 1157, 1105, 1, 0, 0, 0, 1157, 1106, 1, 0, 0, 0, 1157, 1107, 1, 0, 0, 0, 1157, 1108, 1, 0, 0, 0, 1157, 1109, 1, 0, 0, 0, 1157, 1110, 1, 0, 0, 0, 1157, 1111, 1, 0, 0, 0, 1157, 1112, 1, 0, 0, 0, 1157, 1113, 1, 0, 0, 0, 1157, 1114, 1, 0, 0, 0, 1157, 1115, 1, 0, 0, 0, 1157, 1116, 1, 0, 0, 0, 1157, 1117, 1, 0, 0, 0, 1157, 1118, 1, 0, 0, 0, 1157, 1119, 1, 0, 0, 0, 1157, 1120, 1, 0, 0, 0, 1157, 1121, 1, 0, 0, 0, 1157, 1122, 1, 0, 0, 0, 1157, 1123, 1, 0, 0, 0, 1157, 1124, 1, 0, 0, 0, 1157, 1125, 1, 0, 0, 0, 1157, 1126, 1, 0, 0, 0, 1157, 1127, 1, 0, 0, 0, 1157, 1128, 1, 0, 0, 0, 1157, 1129, 1, 0, 0, 0, 1157, 1130, 1, 0, 0, 0, 1157, 1131, 1, 0, 0, 0, 1157, 1132, 1, 0, 0, 0, 1157, 1133, 1, 0, 0, 0, 1157, 1134, 1, 0, 0, 0, 1157, 1135, 1, 0, 0, 0, 1157, 1136, 1, 0, 0, 0, 1157, 1137, 1, 0, 0, 0, 1157, 1138, 1, 0, 0, 0, 1157, 1139, 1, 0, 0, 0, 1157, 1140, 1, 0, 0, 0, 1157, 1141, 1, 0, 0, 0, 1157, 1142, 1, 0, 0, 0, 1157, 1143, 1, 0, 0, 0, 1157, 1144, 1, 0, 0, 0, 1157, 1145, 1, 0, 0, 0, 1157, 1146, 1, 0, 0, 0, 1157, 1147, 1, 0, 0, 0, 1157, 1148, 1, 0, 0, 0, 1157, 1149, 1, 0, 0, 0, 1157, 1150, 1, 0, 0, 0, 1157, 1151, 1, 0, 0, 0, 1157, 1152, 1, 0, 0, 0, 1157, 1153, 1, 0, 0, 0, 1157, 1154, 1, 0, 0, 0, 1157, 1155, 1, 0, 0, 0, 1157, 1156, 1, 0, 0, 0, 1158, 227, 1, 0, 0, 0, 86, 229, 242, 248, 266, 269, 273, 279, 284, 297, 307, 314, 319, 324, 331, 335, 340, 344, 350, 355, 366, 371, 375, 379, 383, 388, 402, 413, 421, 433, 439, 478, 484, 503, 510, 529, 534, 542, 551, 561, 578, 587, 602, 610, 617, 623, 625, 636, 648, 656, 658, 665, 678, 689, 702, 712, 719, 731, 739, 743, 768, 801, 809, 816, 819, 824, 842, 846, 850, 856, 881, 909, 942, 951, 956, 965, 986, 996, 1004, 1012, 1016, 1025, 1028, 1037, 1041, 1055, 1157] \ 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 d5c14af0840a..a3fa6b2219d1 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.ts +++ b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParser.ts @@ -1,4 +1,4 @@ -// Generated from grammar/OpenSearchPPLParser.g4 by ANTLR 4.13.1 +// Generated from ./src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4 by ANTLR 4.13.1 import * as antlr from "antlr4ng"; import { Token } from "antlr4ng"; @@ -643,7 +643,7 @@ export class OpenSearchPPLParser extends antlr.Parser { this.state = 229; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1610612764) !== 0)) { + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3892314108) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 671088631) !== 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)) & 4294967291) !== 0) || ((((_la - 291)) & ~0x1F) === 0 && ((1 << (_la - 291)) & 4294967295) !== 0) || ((((_la - 323)) & ~0x1F) === 0 && ((1 << (_la - 323)) & 7615) !== 0)) { { this.state = 228; this.pplStatement(); @@ -759,32 +759,28 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.state = 248; this.errorHandler.sync(this); - switch (this.tokenStream.LA(1)) { - case OpenSearchPPLParser.SEARCH: - case OpenSearchPPLParser.SOURCE: - case OpenSearchPPLParser.INDEX: + switch (this.interpreter.adaptivePredict(this.tokenStream, 2, this.context) ) { + case 1: this.enterOuterAlt(localContext, 1); { this.state = 245; this.searchCommand(); } break; - case OpenSearchPPLParser.DESCRIBE: + case 2: this.enterOuterAlt(localContext, 2); { this.state = 246; this.describeCommand(); } break; - case OpenSearchPPLParser.SHOW: + case 3: this.enterOuterAlt(localContext, 3); { this.state = 247; this.showDataSourcesCommand(); } break; - default: - throw new antlr.NoViableAltException(this); } } catch (re) { @@ -941,21 +937,67 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterRule(localContext, 12, OpenSearchPPLParser.RULE_searchCommand); let _la: number; try { - localContext = new SearchFromContext(localContext); - this.enterOuterAlt(localContext, 1); - { - this.state = 269; + this.state = 284; this.errorHandler.sync(this); - _la = this.tokenStream.LA(1); - if (_la === 2) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 7, this.context) ) { + case 1: + localContext = new SearchFromContext(localContext); + this.enterOuterAlt(localContext, 1); { - this.state = 268; - this.match(OpenSearchPPLParser.SEARCH); + this.state = 269; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 2) { + { + this.state = 268; + this.match(OpenSearchPPLParser.SEARCH); + } + } + + this.state = 271; + this.fromClause(); + } + break; + case 2: + localContext = new SearchFromFilterContext(localContext); + this.enterOuterAlt(localContext, 2); + { + this.state = 273; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + if (_la === 2) { + { + this.state = 272; + this.match(OpenSearchPPLParser.SEARCH); + } } - } - this.state = 271; - this.fromClause(); + this.state = 275; + this.fromClause(); + this.state = 276; + this.logicalExpression(0); + } + break; + case 3: + localContext = new SearchFilterFromContext(localContext); + this.enterOuterAlt(localContext, 3); + { + this.state = 279; + this.errorHandler.sync(this); + switch (this.interpreter.adaptivePredict(this.tokenStream, 6, this.context) ) { + case 1: + { + this.state = 278; + this.match(OpenSearchPPLParser.SEARCH); + } + break; + } + this.state = 281; + this.logicalExpression(0); + this.state = 282; + this.fromClause(); + } + break; } } catch (re) { @@ -977,9 +1019,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 273; + this.state = 286; this.match(OpenSearchPPLParser.DESCRIBE); - this.state = 274; + this.state = 287; this.tableSourceClause(); } } @@ -1002,9 +1044,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 276; + this.state = 289; this.match(OpenSearchPPLParser.SHOW); - this.state = 277; + this.state = 290; this.match(OpenSearchPPLParser.DATASOURCES); } } @@ -1027,9 +1069,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 279; + this.state = 292; this.match(OpenSearchPPLParser.WHERE); - this.state = 280; + this.state = 293; this.logicalExpression(0); } } @@ -1053,14 +1095,14 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 282; + this.state = 295; this.match(OpenSearchPPLParser.FIELDS); - this.state = 284; + this.state = 297; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119) { { - this.state = 283; + this.state = 296; _la = this.tokenStream.LA(1); if(!(_la === 118 || _la === 119)) { this.errorHandler.recoverInline(this); @@ -1072,7 +1114,7 @@ export class OpenSearchPPLParser extends antlr.Parser { } } - this.state = 286; + this.state = 299; this.fieldList(); } } @@ -1096,23 +1138,23 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 288; + this.state = 301; this.match(OpenSearchPPLParser.RENAME); - this.state = 289; + this.state = 302; this.renameClasue(); - this.state = 294; + this.state = 307; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 290; + this.state = 303; this.match(OpenSearchPPLParser.COMMA); - this.state = 291; + this.state = 304; this.renameClasue(); } } - this.state = 296; + this.state = 309; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -1138,88 +1180,88 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 297; + this.state = 310; this.match(OpenSearchPPLParser.STATS); - this.state = 301; + this.state = 314; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 42) { { - this.state = 298; + this.state = 311; this.match(OpenSearchPPLParser.PARTITIONS); - this.state = 299; + this.state = 312; this.match(OpenSearchPPLParser.EQUAL); - this.state = 300; + this.state = 313; localContext._partitions = this.integerLiteral(); } } - this.state = 306; + this.state = 319; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 43) { { - this.state = 303; + this.state = 316; this.match(OpenSearchPPLParser.ALLNUM); - this.state = 304; + this.state = 317; this.match(OpenSearchPPLParser.EQUAL); - this.state = 305; + this.state = 318; localContext._allnum = this.booleanLiteral(); } } - this.state = 311; + this.state = 324; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 44) { { - this.state = 308; + this.state = 321; this.match(OpenSearchPPLParser.DELIM); - this.state = 309; + this.state = 322; this.match(OpenSearchPPLParser.EQUAL); - this.state = 310; + this.state = 323; localContext._delim = this.stringLiteral(); } } - this.state = 313; + this.state = 326; this.statsAggTerm(); - this.state = 318; + this.state = 331; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 314; + this.state = 327; this.match(OpenSearchPPLParser.COMMA); - this.state = 315; + this.state = 328; this.statsAggTerm(); } } - this.state = 320; + this.state = 333; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 322; + this.state = 335; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 28) { { - this.state = 321; + this.state = 334; this.statsByClause(); } } - this.state = 327; + this.state = 340; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 41) { { - this.state = 324; + this.state = 337; this.match(OpenSearchPPLParser.DEDUP_SPLITVALUES); - this.state = 325; + this.state = 338; this.match(OpenSearchPPLParser.EQUAL); - this.state = 326; + this.state = 339; localContext._dedupsplit = this.booleanLiteral(); } } @@ -1246,44 +1288,44 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 329; + this.state = 342; this.match(OpenSearchPPLParser.DEDUP); - this.state = 331; + this.state = 344; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119 || _la === 330) { { - this.state = 330; + this.state = 343; localContext._number_ = this.integerLiteral(); } } - this.state = 333; + this.state = 346; this.fieldList(); - this.state = 337; + this.state = 350; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 39) { { - this.state = 334; + this.state = 347; this.match(OpenSearchPPLParser.KEEPEMPTY); - this.state = 335; + this.state = 348; this.match(OpenSearchPPLParser.EQUAL); - this.state = 336; + this.state = 349; localContext._keepempty = this.booleanLiteral(); } } - this.state = 342; + this.state = 355; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 40) { { - this.state = 339; + this.state = 352; this.match(OpenSearchPPLParser.CONSECUTIVE); - this.state = 340; + this.state = 353; this.match(OpenSearchPPLParser.EQUAL); - this.state = 341; + this.state = 354; localContext._consecutive = this.booleanLiteral(); } } @@ -1309,9 +1351,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 344; + this.state = 357; this.match(OpenSearchPPLParser.SORT); - this.state = 345; + this.state = 358; this.sortbyClause(); } } @@ -1335,23 +1377,23 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 347; + this.state = 360; this.match(OpenSearchPPLParser.EVAL); - this.state = 348; + this.state = 361; this.evalClause(); - this.state = 353; + this.state = 366; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 349; + this.state = 362; this.match(OpenSearchPPLParser.COMMA); - this.state = 350; + this.state = 363; this.evalClause(); } } - this.state = 355; + this.state = 368; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -1377,26 +1419,26 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 356; + this.state = 369; this.match(OpenSearchPPLParser.HEAD); - this.state = 358; + this.state = 371; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119 || _la === 330) { { - this.state = 357; + this.state = 370; localContext._number_ = this.integerLiteral(); } } - this.state = 362; + this.state = 375; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 5) { { - this.state = 360; + this.state = 373; this.match(OpenSearchPPLParser.FROM); - this.state = 361; + this.state = 374; localContext._from_ = this.integerLiteral(); } } @@ -1423,26 +1465,26 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 364; + this.state = 377; this.match(OpenSearchPPLParser.TOP); - this.state = 366; + this.state = 379; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119 || _la === 330) { { - this.state = 365; + this.state = 378; localContext._number_ = this.integerLiteral(); } } - this.state = 368; + this.state = 381; this.fieldList(); - this.state = 370; + this.state = 383; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 28) { { - this.state = 369; + this.state = 382; this.byClause(); } } @@ -1469,16 +1511,16 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 372; + this.state = 385; this.match(OpenSearchPPLParser.RARE); - this.state = 373; + this.state = 386; this.fieldList(); - this.state = 375; + this.state = 388; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 28) { { - this.state = 374; + this.state = 387; this.byClause(); } } @@ -1504,14 +1546,14 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 377; + this.state = 390; this.match(OpenSearchPPLParser.GROK); { - this.state = 378; + this.state = 391; localContext._source_field = this.expression(); } { - this.state = 379; + this.state = 392; localContext._pattern = this.stringLiteral(); } } @@ -1535,14 +1577,14 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 381; + this.state = 394; this.match(OpenSearchPPLParser.PARSE); { - this.state = 382; + this.state = 395; localContext._source_field = this.expression(); } { - this.state = 383; + this.state = 396; localContext._pattern = this.stringLiteral(); } } @@ -1563,28 +1605,30 @@ export class OpenSearchPPLParser extends antlr.Parser { public patternsCommand(): PatternsCommandContext { let localContext = new PatternsCommandContext(this.context, this.state); this.enterRule(localContext, 42, OpenSearchPPLParser.RULE_patternsCommand); - let _la: number; try { + let alternative: number; this.enterOuterAlt(localContext, 1); { - this.state = 385; + this.state = 398; this.match(OpenSearchPPLParser.PATTERNS); - this.state = 389; + this.state = 402; this.errorHandler.sync(this); - _la = this.tokenStream.LA(1); - while (_la === 21 || _la === 23) { - { - { - this.state = 386; - this.patternsParameter(); - } + alternative = this.interpreter.adaptivePredict(this.tokenStream, 25, this.context); + while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { + if (alternative === 1) { + { + { + this.state = 399; + this.patternsParameter(); + } + } } - this.state = 391; + this.state = 404; this.errorHandler.sync(this); - _la = this.tokenStream.LA(1); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 25, this.context); } { - this.state = 392; + this.state = 405; localContext._source_field = this.expression(); } } @@ -1606,18 +1650,18 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new PatternsParameterContext(this.context, this.state); this.enterRule(localContext, 44, OpenSearchPPLParser.RULE_patternsParameter); try { - this.state = 400; + this.state = 413; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.NEW_FIELD: this.enterOuterAlt(localContext, 1); { { - this.state = 394; + this.state = 407; this.match(OpenSearchPPLParser.NEW_FIELD); - this.state = 395; + this.state = 408; this.match(OpenSearchPPLParser.EQUAL); - this.state = 396; + this.state = 409; localContext._new_field = this.stringLiteral(); } } @@ -1626,11 +1670,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 2); { { - this.state = 397; + this.state = 410; this.match(OpenSearchPPLParser.PATTERN); - this.state = 398; + this.state = 411; this.match(OpenSearchPPLParser.EQUAL); - this.state = 399; + this.state = 412; localContext._pattern = this.stringLiteral(); } } @@ -1659,7 +1703,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 402; + this.state = 415; _la = this.tokenStream.LA(1); if(!(_la === 18 || _la === 19)) { this.errorHandler.recoverInline(this); @@ -1690,19 +1734,19 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 404; + this.state = 417; this.match(OpenSearchPPLParser.KMEANS); - this.state = 408; + this.state = 421; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (((((_la - 45)) & ~0x1F) === 0 && ((1 << (_la - 45)) & 7) !== 0)) { { { - this.state = 405; + this.state = 418; this.kmeansParameter(); } } - this.state = 410; + this.state = 423; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -1725,18 +1769,18 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new KmeansParameterContext(this.context, this.state); this.enterRule(localContext, 50, OpenSearchPPLParser.RULE_kmeansParameter); try { - this.state = 420; + this.state = 433; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.CENTROIDS: this.enterOuterAlt(localContext, 1); { { - this.state = 411; + this.state = 424; this.match(OpenSearchPPLParser.CENTROIDS); - this.state = 412; + this.state = 425; this.match(OpenSearchPPLParser.EQUAL); - this.state = 413; + this.state = 426; localContext._centroids = this.integerLiteral(); } } @@ -1745,11 +1789,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 2); { { - this.state = 414; + this.state = 427; this.match(OpenSearchPPLParser.ITERATIONS); - this.state = 415; + this.state = 428; this.match(OpenSearchPPLParser.EQUAL); - this.state = 416; + this.state = 429; localContext._iterations = this.integerLiteral(); } } @@ -1758,11 +1802,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 3); { { - this.state = 417; + this.state = 430; this.match(OpenSearchPPLParser.DISTANCE_TYPE); - this.state = 418; + this.state = 431; this.match(OpenSearchPPLParser.EQUAL); - this.state = 419; + this.state = 432; localContext._distance_type = this.stringLiteral(); } } @@ -1791,19 +1835,19 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 422; + this.state = 435; this.match(OpenSearchPPLParser.AD); - this.state = 426; + this.state = 439; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (((((_la - 48)) & ~0x1F) === 0 && ((1 << (_la - 48)) & 2047) !== 0) || _la === 215) { { { - this.state = 423; + this.state = 436; this.adParameter(); } } - this.state = 428; + this.state = 441; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -1826,18 +1870,18 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new AdParameterContext(this.context, this.state); this.enterRule(localContext, 54, OpenSearchPPLParser.RULE_adParameter); try { - this.state = 465; + this.state = 478; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.NUMBER_OF_TREES: this.enterOuterAlt(localContext, 1); { { - this.state = 429; + this.state = 442; this.match(OpenSearchPPLParser.NUMBER_OF_TREES); - this.state = 430; + this.state = 443; this.match(OpenSearchPPLParser.EQUAL); - this.state = 431; + this.state = 444; localContext._number_of_trees = this.integerLiteral(); } } @@ -1846,11 +1890,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 2); { { - this.state = 432; + this.state = 445; this.match(OpenSearchPPLParser.SHINGLE_SIZE); - this.state = 433; + this.state = 446; this.match(OpenSearchPPLParser.EQUAL); - this.state = 434; + this.state = 447; localContext._shingle_size = this.integerLiteral(); } } @@ -1859,11 +1903,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 3); { { - this.state = 435; + this.state = 448; this.match(OpenSearchPPLParser.SAMPLE_SIZE); - this.state = 436; + this.state = 449; this.match(OpenSearchPPLParser.EQUAL); - this.state = 437; + this.state = 450; localContext._sample_size = this.integerLiteral(); } } @@ -1872,11 +1916,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 4); { { - this.state = 438; + this.state = 451; this.match(OpenSearchPPLParser.OUTPUT_AFTER); - this.state = 439; + this.state = 452; this.match(OpenSearchPPLParser.EQUAL); - this.state = 440; + this.state = 453; localContext._output_after = this.integerLiteral(); } } @@ -1885,11 +1929,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 5); { { - this.state = 441; + this.state = 454; this.match(OpenSearchPPLParser.TIME_DECAY); - this.state = 442; + this.state = 455; this.match(OpenSearchPPLParser.EQUAL); - this.state = 443; + this.state = 456; localContext._time_decay = this.decimalLiteral(); } } @@ -1898,11 +1942,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 6); { { - this.state = 444; + this.state = 457; this.match(OpenSearchPPLParser.ANOMALY_RATE); - this.state = 445; + this.state = 458; this.match(OpenSearchPPLParser.EQUAL); - this.state = 446; + this.state = 459; localContext._anomaly_rate = this.decimalLiteral(); } } @@ -1911,11 +1955,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 7); { { - this.state = 447; + this.state = 460; this.match(OpenSearchPPLParser.CATEGORY_FIELD); - this.state = 448; + this.state = 461; this.match(OpenSearchPPLParser.EQUAL); - this.state = 449; + this.state = 462; localContext._category_field = this.stringLiteral(); } } @@ -1924,11 +1968,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 8); { { - this.state = 450; + this.state = 463; this.match(OpenSearchPPLParser.TIME_FIELD); - this.state = 451; + this.state = 464; this.match(OpenSearchPPLParser.EQUAL); - this.state = 452; + this.state = 465; localContext._time_field = this.stringLiteral(); } } @@ -1937,11 +1981,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 9); { { - this.state = 453; + this.state = 466; this.match(OpenSearchPPLParser.DATE_FORMAT); - this.state = 454; + this.state = 467; this.match(OpenSearchPPLParser.EQUAL); - this.state = 455; + this.state = 468; localContext._date_format = this.stringLiteral(); } } @@ -1950,11 +1994,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 10); { { - this.state = 456; + this.state = 469; this.match(OpenSearchPPLParser.TIME_ZONE); - this.state = 457; + this.state = 470; this.match(OpenSearchPPLParser.EQUAL); - this.state = 458; + this.state = 471; localContext._time_zone = this.stringLiteral(); } } @@ -1963,11 +2007,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 11); { { - this.state = 459; + this.state = 472; this.match(OpenSearchPPLParser.TRAINING_DATA_SIZE); - this.state = 460; + this.state = 473; this.match(OpenSearchPPLParser.EQUAL); - this.state = 461; + this.state = 474; localContext._training_data_size = this.integerLiteral(); } } @@ -1976,11 +2020,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 12); { { - this.state = 462; + this.state = 475; this.match(OpenSearchPPLParser.ANOMALY_SCORE_THRESHOLD); - this.state = 463; + this.state = 476; this.match(OpenSearchPPLParser.EQUAL); - this.state = 464; + this.state = 477; localContext._anomaly_score_threshold = this.decimalLiteral(); } } @@ -2009,19 +2053,19 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 467; + this.state = 480; this.match(OpenSearchPPLParser.ML); - this.state = 471; + this.state = 484; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 3892314108) !== 0) || ((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 134217719) !== 0) || ((((_la - 68)) & ~0x1F) === 0 && ((1 << (_la - 68)) & 2147475455) !== 0) || ((((_la - 111)) & ~0x1F) === 0 && ((1 << (_la - 111)) & 4279238657) !== 0) || ((((_la - 143)) & ~0x1F) === 0 && ((1 << (_la - 143)) & 4294967295) !== 0) || ((((_la - 175)) & ~0x1F) === 0 && ((1 << (_la - 175)) & 4294967295) !== 0) || ((((_la - 207)) & ~0x1F) === 0 && ((1 << (_la - 207)) & 4294377471) !== 0) || ((((_la - 239)) & ~0x1F) === 0 && ((1 << (_la - 239)) & 4290772895) !== 0) || ((((_la - 271)) & ~0x1F) === 0 && ((1 << (_la - 271)) & 4294707191) !== 0) || ((((_la - 303)) & ~0x1F) === 0 && ((1 << (_la - 303)) & 67108863) !== 0) || _la === 335) { { { - this.state = 468; + this.state = 481; this.mlArg(); } } - this.state = 473; + this.state = 486; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -2047,11 +2091,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterOuterAlt(localContext, 1); { { - this.state = 474; + this.state = 487; localContext._argName = this.ident(); - this.state = 475; + this.state = 488; this.match(OpenSearchPPLParser.EQUAL); - this.state = 476; + this.state = 489; localContext._argValue = this.literalValue(); } } @@ -2073,33 +2117,53 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new FromClauseContext(this.context, this.state); this.enterRule(localContext, 60, OpenSearchPPLParser.RULE_fromClause); try { - this.state = 484; + this.state = 503; this.errorHandler.sync(this); - switch (this.tokenStream.LA(1)) { - case OpenSearchPPLParser.SOURCE: + switch (this.interpreter.adaptivePredict(this.tokenStream, 32, this.context) ) { + case 1: this.enterOuterAlt(localContext, 1); { - this.state = 478; + this.state = 491; this.match(OpenSearchPPLParser.SOURCE); - this.state = 479; + this.state = 492; this.match(OpenSearchPPLParser.EQUAL); - this.state = 480; + this.state = 493; this.tableSourceClause(); } break; - case OpenSearchPPLParser.INDEX: + case 2: this.enterOuterAlt(localContext, 2); { - this.state = 481; + this.state = 494; this.match(OpenSearchPPLParser.INDEX); - this.state = 482; + this.state = 495; this.match(OpenSearchPPLParser.EQUAL); - this.state = 483; + this.state = 496; this.tableSourceClause(); } break; - default: - throw new antlr.NoViableAltException(this); + case 3: + this.enterOuterAlt(localContext, 3); + { + this.state = 497; + this.match(OpenSearchPPLParser.SOURCE); + this.state = 498; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 499; + this.tableFunction(); + } + break; + case 4: + this.enterOuterAlt(localContext, 4); + { + this.state = 500; + this.match(OpenSearchPPLParser.INDEX); + this.state = 501; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 502; + this.tableFunction(); + } + break; } } catch (re) { @@ -2118,11 +2182,28 @@ export class OpenSearchPPLParser extends antlr.Parser { public tableSourceClause(): TableSourceClauseContext { let localContext = new TableSourceClauseContext(this.context, this.state); this.enterRule(localContext, 62, OpenSearchPPLParser.RULE_tableSourceClause); + let _la: number; try { this.enterOuterAlt(localContext, 1); { - this.state = 486; + this.state = 505; this.tableSource(); + this.state = 510; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + while (_la === 110) { + { + { + this.state = 506; + this.match(OpenSearchPPLParser.COMMA); + this.state = 507; + this.tableSource(); + } + } + this.state = 512; + this.errorHandler.sync(this); + _la = this.tokenStream.LA(1); + } } } catch (re) { @@ -2144,11 +2225,11 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 488; + this.state = 513; localContext._orignalField = this.wcFieldExpression(); - this.state = 489; + this.state = 514; this.match(OpenSearchPPLParser.AS); - this.state = 490; + this.state = 515; localContext._renamedField = this.wcFieldExpression(); } } @@ -2171,9 +2252,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 492; + this.state = 517; this.match(OpenSearchPPLParser.BY); - this.state = 493; + this.state = 518; this.fieldList(); } } @@ -2194,37 +2275,37 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new StatsByClauseContext(this.context, this.state); this.enterRule(localContext, 68, OpenSearchPPLParser.RULE_statsByClause); try { - this.state = 504; + this.state = 529; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 30, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 34, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 495; + this.state = 520; this.match(OpenSearchPPLParser.BY); - this.state = 496; + this.state = 521; this.fieldList(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 497; + this.state = 522; this.match(OpenSearchPPLParser.BY); - this.state = 498; + this.state = 523; this.bySpanClause(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 499; + this.state = 524; this.match(OpenSearchPPLParser.BY); - this.state = 500; + this.state = 525; this.bySpanClause(); - this.state = 501; + this.state = 526; this.match(OpenSearchPPLParser.COMMA); - this.state = 502; + this.state = 527; this.fieldList(); } break; @@ -2250,16 +2331,16 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 506; + this.state = 531; this.spanClause(); - this.state = 509; + this.state = 534; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 27) { { - this.state = 507; + this.state = 532; this.match(OpenSearchPPLParser.AS); - this.state = 508; + this.state = 533; localContext._alias = this.qualifiedName(); } } @@ -2286,27 +2367,27 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 511; + this.state = 536; this.match(OpenSearchPPLParser.SPAN); - this.state = 512; + this.state = 537; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 513; + this.state = 538; this.fieldExpression(); - this.state = 514; + this.state = 539; this.match(OpenSearchPPLParser.COMMA); - this.state = 515; + this.state = 540; localContext._value = this.literalValue(); - this.state = 517; + this.state = 542; this.errorHandler.sync(this); _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.state = 516; + this.state = 541; localContext._unit = this.timespanUnit(); } } - this.state = 519; + this.state = 544; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -2330,21 +2411,21 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 521; + this.state = 546; this.sortField(); - this.state = 526; + this.state = 551; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 522; + this.state = 547; this.match(OpenSearchPPLParser.COMMA); - this.state = 523; + this.state = 548; this.sortField(); } } - this.state = 528; + this.state = 553; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -2369,11 +2450,11 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 529; + this.state = 554; this.fieldExpression(); - this.state = 530; + this.state = 555; this.match(OpenSearchPPLParser.EQUAL); - this.state = 531; + this.state = 556; this.expression(); } } @@ -2397,16 +2478,16 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 533; + this.state = 558; this.statsFunction(); - this.state = 536; + this.state = 561; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 27) { { - this.state = 534; + this.state = 559; this.match(OpenSearchPPLParser.AS); - this.state = 535; + this.state = 560; localContext._alias = this.wcFieldExpression(); } } @@ -2431,20 +2512,20 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterRule(localContext, 80, OpenSearchPPLParser.RULE_statsFunction); let _la: number; try { - this.state = 553; + this.state = 578; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 35, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 39, this.context) ) { case 1: localContext = new StatsFunctionCallContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 538; + this.state = 563; this.statsFunctionName(); - this.state = 539; + this.state = 564; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 540; - this.valueExpression(); - this.state = 541; + this.state = 565; + this.valueExpression(0); + this.state = 566; this.match(OpenSearchPPLParser.RT_PRTHS); } break; @@ -2452,11 +2533,11 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new CountAllFunctionCallContext(localContext); this.enterOuterAlt(localContext, 2); { - this.state = 543; + this.state = 568; this.match(OpenSearchPPLParser.COUNT); - this.state = 544; + this.state = 569; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 545; + this.state = 570; this.match(OpenSearchPPLParser.RT_PRTHS); } break; @@ -2464,7 +2545,7 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new DistinctCountFunctionCallContext(localContext); this.enterOuterAlt(localContext, 3); { - this.state = 546; + this.state = 571; _la = this.tokenStream.LA(1); if(!(_la === 137 || _la === 171)) { this.errorHandler.recoverInline(this); @@ -2473,11 +2554,11 @@ export class OpenSearchPPLParser extends antlr.Parser { this.errorHandler.reportMatch(this); this.consume(); } - this.state = 547; + this.state = 572; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 548; - this.valueExpression(); - this.state = 549; + this.state = 573; + this.valueExpression(0); + this.state = 574; this.match(OpenSearchPPLParser.RT_PRTHS); } break; @@ -2485,7 +2566,7 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new PercentileAggFunctionCallContext(localContext); this.enterOuterAlt(localContext, 4); { - this.state = 551; + this.state = 576; this.percentileAggFunction(); } break; @@ -2493,7 +2574,7 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new TakeAggFunctionCallContext(localContext); this.enterOuterAlt(localContext, 5); { - this.state = 552; + this.state = 577; this.takeAggFunction(); } break; @@ -2519,7 +2600,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 555; + this.state = 580; _la = this.tokenStream.LA(1); if(!(((((_la - 135)) & ~0x1F) === 0 && ((1 << (_la - 135)) & 500003) !== 0))) { this.errorHandler.recoverInline(this); @@ -2550,25 +2631,25 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 557; + this.state = 582; this.match(OpenSearchPPLParser.TAKE); - this.state = 558; + this.state = 583; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 559; + this.state = 584; this.fieldExpression(); - this.state = 562; + this.state = 587; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 110) { { - this.state = 560; + this.state = 585; this.match(OpenSearchPPLParser.COMMA); - this.state = 561; + this.state = 586; localContext._size = this.integerLiteral(); } } - this.state = 564; + this.state = 589; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -2591,19 +2672,19 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 566; + this.state = 591; this.match(OpenSearchPPLParser.PERCENTILE); - this.state = 567; + this.state = 592; this.match(OpenSearchPPLParser.LESS); - this.state = 568; + this.state = 593; localContext._value = this.integerLiteral(); - this.state = 569; + this.state = 594; this.match(OpenSearchPPLParser.GREATER); - this.state = 570; + this.state = 595; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 571; + this.state = 596; localContext._aggField = this.fieldExpression(); - this.state = 572; + this.state = 597; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -2624,28 +2705,28 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new ExpressionContext(this.context, this.state); this.enterRule(localContext, 88, OpenSearchPPLParser.RULE_expression); try { - this.state = 577; + this.state = 602; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 37, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 41, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 574; + this.state = 599; this.logicalExpression(0); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 575; + this.state = 600; this.comparisonExpression(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 576; - this.valueExpression(); + this.state = 601; + this.valueExpression(0); } break; } @@ -2682,16 +2763,16 @@ export class OpenSearchPPLParser extends antlr.Parser { let alternative: number; this.enterOuterAlt(localContext, 1); { - this.state = 585; + this.state = 610; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 38, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 42, this.context) ) { case 1: { localContext = new ComparsionContext(localContext); this.context = localContext; previousContext = localContext; - this.state = 580; + this.state = 605; this.comparisonExpression(); } break; @@ -2700,9 +2781,9 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new LogicalNotContext(localContext); this.context = localContext; previousContext = localContext; - this.state = 581; + this.state = 606; this.match(OpenSearchPPLParser.NOT); - this.state = 582; + this.state = 607; this.logicalExpression(6); } break; @@ -2711,7 +2792,7 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new BooleanExprContext(localContext); this.context = localContext; previousContext = localContext; - this.state = 583; + this.state = 608; this.booleanExpression(); } break; @@ -2720,15 +2801,15 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new RelevanceExprContext(localContext); this.context = localContext; previousContext = localContext; - this.state = 584; + this.state = 609; this.relevanceExpression(); } break; } this.context!.stop = this.tokenStream.LT(-1); - this.state = 600; + this.state = 625; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 41, this.context); + 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) { @@ -2736,21 +2817,21 @@ export class OpenSearchPPLParser extends antlr.Parser { } previousContext = localContext; { - this.state = 598; + this.state = 623; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 40, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 44, this.context) ) { case 1: { localContext = new LogicalOrContext(new LogicalExpressionContext(parentContext, parentState)); (localContext as LogicalOrContext)._left = previousContext; this.pushNewRecursionContext(localContext, _startState, OpenSearchPPLParser.RULE_logicalExpression); - this.state = 587; + this.state = 612; if (!(this.precpred(this.context, 5))) { throw this.createFailedPredicateException("this.precpred(this.context, 5)"); } - this.state = 588; + this.state = 613; this.match(OpenSearchPPLParser.OR); - this.state = 589; + this.state = 614; (localContext as LogicalOrContext)._right = this.logicalExpression(6); } break; @@ -2759,21 +2840,21 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new LogicalAndContext(new LogicalExpressionContext(parentContext, parentState)); (localContext as LogicalAndContext)._left = previousContext; this.pushNewRecursionContext(localContext, _startState, OpenSearchPPLParser.RULE_logicalExpression); - this.state = 590; + this.state = 615; if (!(this.precpred(this.context, 4))) { throw this.createFailedPredicateException("this.precpred(this.context, 4)"); } - this.state = 592; + this.state = 617; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 63) { { - this.state = 591; + this.state = 616; this.match(OpenSearchPPLParser.AND); } } - this.state = 594; + this.state = 619; (localContext as LogicalAndContext)._right = this.logicalExpression(5); } break; @@ -2782,22 +2863,22 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new LogicalXorContext(new LogicalExpressionContext(parentContext, parentState)); (localContext as LogicalXorContext)._left = previousContext; this.pushNewRecursionContext(localContext, _startState, OpenSearchPPLParser.RULE_logicalExpression); - this.state = 595; + this.state = 620; if (!(this.precpred(this.context, 3))) { throw this.createFailedPredicateException("this.precpred(this.context, 3)"); } - this.state = 596; + this.state = 621; this.match(OpenSearchPPLParser.XOR); - this.state = 597; + this.state = 622; (localContext as LogicalXorContext)._right = this.logicalExpression(4); } break; } } } - this.state = 602; + this.state = 627; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 41, this.context); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 45, this.context); } } } @@ -2818,30 +2899,30 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new ComparisonExpressionContext(this.context, this.state); this.enterRule(localContext, 92, OpenSearchPPLParser.RULE_comparisonExpression); try { - this.state = 611; + this.state = 636; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 42, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 46, this.context) ) { case 1: localContext = new CompareExprContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 603; - (localContext as CompareExprContext)._left = this.valueExpression(); - this.state = 604; + this.state = 628; + (localContext as CompareExprContext)._left = this.valueExpression(0); + this.state = 629; this.comparisonOperator(); - this.state = 605; - (localContext as CompareExprContext)._right = this.valueExpression(); + this.state = 630; + (localContext as CompareExprContext)._right = this.valueExpression(0); } break; case 2: localContext = new InExprContext(localContext); this.enterOuterAlt(localContext, 2); { - this.state = 607; - this.valueExpression(); - this.state = 608; + this.state = 632; + this.valueExpression(0); + this.state = 633; this.match(OpenSearchPPLParser.IN); - this.state = 609; + this.state = 634; this.valueList(); } break; @@ -2860,66 +2941,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 = 648; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 43, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 47, 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 = 639; 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 = 640; 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 = 641; 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 = 642; 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 = 643; this.timestampFunction(); } break; case 6: - localContext = new ParentheticValueExprContext(localContext); - this.enterOuterAlt(localContext, 6); { - this.state = 618; + localContext = new ParentheticValueExprContext(localContext); + this.context = localContext; + previousContext = localContext; + this.state = 644; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 619; - this.valueExpression(); - this.state = 620; + this.state = 645; + this.valueExpression(0); + this.state = 646; this.match(OpenSearchPPLParser.RT_PRTHS); } break; } + this.context!.stop = this.tokenStream.LT(-1); + this.state = 658; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 49, this.context); + while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { + if (alternative === 1) { + if (this.parseListeners != null) { + this.triggerExitRuleEvent(); + } + previousContext = localContext; + { + this.state = 656; + this.errorHandler.sync(this); + switch (this.interpreter.adaptivePredict(this.tokenStream, 48, 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 = 650; + if (!(this.precpred(this.context, 8))) { + throw this.createFailedPredicateException("this.precpred(this.context, 8)"); + } + this.state = 651; + (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 = 652; + (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 = 653; + if (!(this.precpred(this.context, 7))) { + throw this.createFailedPredicateException("this.precpred(this.context, 7)"); + } + this.state = 654; + (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 = 655; + (localContext as BinaryArithmeticContext)._right = this.valueExpression(8); + } + break; + } + } + } + this.state = 660; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 49, this.context); + } + } } catch (re) { if (re instanceof antlr.RecognitionException) { @@ -2930,7 +3101,7 @@ export class OpenSearchPPLParser extends antlr.Parser { } } finally { - this.exitRule(); + this.unrollRecursionContexts(parentContext); } return localContext; } @@ -2938,34 +3109,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 = 665; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 44, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 50, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 624; + this.state = 661; this.evalFunctionCall(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 625; + this.state = 662; this.dataTypeFunctionCall(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 626; + this.state = 663; this.fieldExpression(); } break; case 4: this.enterOuterAlt(localContext, 4); { - this.state = 627; + this.state = 664; this.literalValue(); } break; @@ -2990,17 +3161,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 630; + this.state = 667; this.positionFunctionName(); - this.state = 631; + this.state = 668; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 632; + this.state = 669; this.functionArg(); - this.state = 633; + this.state = 670; this.match(OpenSearchPPLParser.IN); - this.state = 634; + this.state = 671; this.functionArg(); - this.state = 635; + this.state = 672; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3023,7 +3194,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 637; + this.state = 674; this.booleanFunctionCall(); } } @@ -3044,7 +3215,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 = 678; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.MATCH: @@ -3053,7 +3224,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.MATCH_BOOL_PREFIX: this.enterOuterAlt(localContext, 1); { - this.state = 639; + this.state = 676; this.singleFieldRelevanceFunction(); } break; @@ -3062,7 +3233,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.QUERY_STRING: this.enterOuterAlt(localContext, 2); { - this.state = 640; + this.state = 677; this.multiFieldRelevanceFunction(); } break; @@ -3090,33 +3261,33 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 643; + this.state = 680; this.singleFieldRelevanceFunctionName(); - this.state = 644; + this.state = 681; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 645; + this.state = 682; localContext._field = this.relevanceField(); - this.state = 646; + this.state = 683; this.match(OpenSearchPPLParser.COMMA); - this.state = 647; + this.state = 684; localContext._query = this.relevanceQuery(); - this.state = 652; + this.state = 689; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 648; + this.state = 685; this.match(OpenSearchPPLParser.COMMA); - this.state = 649; + this.state = 686; this.relevanceArg(); } } - this.state = 654; + this.state = 691; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 655; + this.state = 692; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3140,53 +3311,53 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 657; + this.state = 694; this.multiFieldRelevanceFunctionName(); - this.state = 658; + this.state = 695; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 659; + this.state = 696; this.match(OpenSearchPPLParser.LT_SQR_PRTHS); - this.state = 660; + this.state = 697; localContext._field = this.relevanceFieldAndWeight(); - this.state = 665; + this.state = 702; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 661; + this.state = 698; this.match(OpenSearchPPLParser.COMMA); - this.state = 662; + this.state = 699; localContext._field = this.relevanceFieldAndWeight(); } } - this.state = 667; + this.state = 704; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 668; + this.state = 705; this.match(OpenSearchPPLParser.RT_SQR_PRTHS); - this.state = 669; + this.state = 706; this.match(OpenSearchPPLParser.COMMA); - this.state = 670; + this.state = 707; localContext._query = this.relevanceQuery(); - this.state = 675; + this.state = 712; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 671; + this.state = 708; this.match(OpenSearchPPLParser.COMMA); - this.state = 672; + this.state = 709; this.relevanceArg(); } } - this.state = 677; + this.state = 714; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 678; + this.state = 715; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3207,20 +3378,288 @@ 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 = 719; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { + case OpenSearchPPLParser.SEARCH: + case OpenSearchPPLParser.DESCRIBE: + case OpenSearchPPLParser.SHOW: + case OpenSearchPPLParser.FROM: + case OpenSearchPPLParser.WHERE: + case OpenSearchPPLParser.FIELDS: + case OpenSearchPPLParser.RENAME: + case OpenSearchPPLParser.STATS: + case OpenSearchPPLParser.DEDUP: + case OpenSearchPPLParser.SORT: + case OpenSearchPPLParser.EVAL: + case OpenSearchPPLParser.HEAD: + case OpenSearchPPLParser.TOP: + case OpenSearchPPLParser.RARE: + case OpenSearchPPLParser.PARSE: + case OpenSearchPPLParser.METHOD: + case OpenSearchPPLParser.REGEX: + case OpenSearchPPLParser.PUNCT: + case OpenSearchPPLParser.GROK: + case OpenSearchPPLParser.PATTERN: + case OpenSearchPPLParser.PATTERNS: + case OpenSearchPPLParser.NEW_FIELD: + case OpenSearchPPLParser.KMEANS: + case OpenSearchPPLParser.AD: + case OpenSearchPPLParser.ML: + case OpenSearchPPLParser.SOURCE: + case OpenSearchPPLParser.INDEX: + case OpenSearchPPLParser.D: + case OpenSearchPPLParser.DESC: + case OpenSearchPPLParser.DATASOURCES: + case OpenSearchPPLParser.SORTBY: + case OpenSearchPPLParser.STR: + case OpenSearchPPLParser.IP: + case OpenSearchPPLParser.NUM: + case OpenSearchPPLParser.KEEPEMPTY: + case OpenSearchPPLParser.CONSECUTIVE: + case OpenSearchPPLParser.DEDUP_SPLITVALUES: + case OpenSearchPPLParser.PARTITIONS: + case OpenSearchPPLParser.ALLNUM: + case OpenSearchPPLParser.DELIM: + case OpenSearchPPLParser.CENTROIDS: + case OpenSearchPPLParser.ITERATIONS: + case OpenSearchPPLParser.DISTANCE_TYPE: + case OpenSearchPPLParser.NUMBER_OF_TREES: + case OpenSearchPPLParser.SHINGLE_SIZE: + case OpenSearchPPLParser.SAMPLE_SIZE: + case OpenSearchPPLParser.OUTPUT_AFTER: + case OpenSearchPPLParser.TIME_DECAY: + case OpenSearchPPLParser.ANOMALY_RATE: + case OpenSearchPPLParser.CATEGORY_FIELD: + case OpenSearchPPLParser.TIME_FIELD: + case OpenSearchPPLParser.TIME_ZONE: + case OpenSearchPPLParser.TRAINING_DATA_SIZE: + case OpenSearchPPLParser.ANOMALY_SCORE_THRESHOLD: + case OpenSearchPPLParser.CONVERT_TZ: + case OpenSearchPPLParser.DATETIME: + case OpenSearchPPLParser.DAY: + case OpenSearchPPLParser.DAY_HOUR: + case OpenSearchPPLParser.DAY_MICROSECOND: + case OpenSearchPPLParser.DAY_MINUTE: + case OpenSearchPPLParser.DAY_OF_YEAR: + case OpenSearchPPLParser.DAY_SECOND: + case OpenSearchPPLParser.HOUR: + case OpenSearchPPLParser.HOUR_MICROSECOND: + case OpenSearchPPLParser.HOUR_MINUTE: + case OpenSearchPPLParser.HOUR_OF_DAY: + case OpenSearchPPLParser.HOUR_SECOND: + case OpenSearchPPLParser.MICROSECOND: + case OpenSearchPPLParser.MILLISECOND: + case OpenSearchPPLParser.MINUTE: + case OpenSearchPPLParser.MINUTE_MICROSECOND: + case OpenSearchPPLParser.MINUTE_OF_DAY: + case OpenSearchPPLParser.MINUTE_OF_HOUR: + case OpenSearchPPLParser.MINUTE_SECOND: + case OpenSearchPPLParser.MONTH: + case OpenSearchPPLParser.MONTH_OF_YEAR: + case OpenSearchPPLParser.QUARTER: + case OpenSearchPPLParser.SECOND: + case OpenSearchPPLParser.SECOND_MICROSECOND: + case OpenSearchPPLParser.SECOND_OF_MINUTE: + case OpenSearchPPLParser.WEEK: + case OpenSearchPPLParser.WEEK_OF_YEAR: + case OpenSearchPPLParser.YEAR: + case OpenSearchPPLParser.YEAR_MONTH: + case OpenSearchPPLParser.DOT: + case OpenSearchPPLParser.BACKTICK: + case OpenSearchPPLParser.AVG: + case OpenSearchPPLParser.COUNT: + case OpenSearchPPLParser.DISTINCT_COUNT: + case OpenSearchPPLParser.ESTDC: + case OpenSearchPPLParser.ESTDC_ERROR: + case OpenSearchPPLParser.MAX: + case OpenSearchPPLParser.MEAN: + case OpenSearchPPLParser.MEDIAN: + case OpenSearchPPLParser.MIN: + case OpenSearchPPLParser.MODE: + case OpenSearchPPLParser.RANGE: + case OpenSearchPPLParser.STDEV: + case OpenSearchPPLParser.STDEVP: + case OpenSearchPPLParser.SUM: + case OpenSearchPPLParser.SUMSQ: + case OpenSearchPPLParser.VAR_SAMP: + case OpenSearchPPLParser.VAR_POP: + case OpenSearchPPLParser.STDDEV_SAMP: + case OpenSearchPPLParser.STDDEV_POP: + case OpenSearchPPLParser.PERCENTILE: + case OpenSearchPPLParser.TAKE: + case OpenSearchPPLParser.FIRST: + case OpenSearchPPLParser.LAST: + case OpenSearchPPLParser.LIST: + case OpenSearchPPLParser.VALUES: + case OpenSearchPPLParser.EARLIEST: + case OpenSearchPPLParser.EARLIEST_TIME: + case OpenSearchPPLParser.LATEST: + case OpenSearchPPLParser.LATEST_TIME: + case OpenSearchPPLParser.PER_DAY: + case OpenSearchPPLParser.PER_HOUR: + case OpenSearchPPLParser.PER_MINUTE: + case OpenSearchPPLParser.PER_SECOND: + case OpenSearchPPLParser.RATE: + case OpenSearchPPLParser.SPARKLINE: + case OpenSearchPPLParser.C: + case OpenSearchPPLParser.DC: + case OpenSearchPPLParser.ABS: + case OpenSearchPPLParser.CBRT: + case OpenSearchPPLParser.CEIL: + case OpenSearchPPLParser.CEILING: + case OpenSearchPPLParser.CONV: + case OpenSearchPPLParser.CRC32: + case OpenSearchPPLParser.E: + case OpenSearchPPLParser.EXP: + case OpenSearchPPLParser.FLOOR: + case OpenSearchPPLParser.LN: + case OpenSearchPPLParser.LOG: + case OpenSearchPPLParser.LOG10: + case OpenSearchPPLParser.LOG2: + case OpenSearchPPLParser.MOD: + case OpenSearchPPLParser.PI: + case OpenSearchPPLParser.POSITION: + case OpenSearchPPLParser.POW: + case OpenSearchPPLParser.POWER: + case OpenSearchPPLParser.RAND: + case OpenSearchPPLParser.ROUND: + case OpenSearchPPLParser.SIGN: + case OpenSearchPPLParser.SQRT: + case OpenSearchPPLParser.TRUNCATE: + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + case OpenSearchPPLParser.ADDDATE: + case OpenSearchPPLParser.ADDTIME: + case OpenSearchPPLParser.CURDATE: + case OpenSearchPPLParser.CURRENT_DATE: + case OpenSearchPPLParser.CURRENT_TIME: + case OpenSearchPPLParser.CURRENT_TIMESTAMP: + case OpenSearchPPLParser.CURTIME: + case OpenSearchPPLParser.DATE: + case OpenSearchPPLParser.DATEDIFF: + case OpenSearchPPLParser.DATE_ADD: + case OpenSearchPPLParser.DATE_FORMAT: + case OpenSearchPPLParser.DATE_SUB: + case OpenSearchPPLParser.DAYNAME: + case OpenSearchPPLParser.DAYOFMONTH: + case OpenSearchPPLParser.DAYOFWEEK: + case OpenSearchPPLParser.DAYOFYEAR: + case OpenSearchPPLParser.DAY_OF_MONTH: + case OpenSearchPPLParser.DAY_OF_WEEK: + case OpenSearchPPLParser.FROM_DAYS: + case OpenSearchPPLParser.FROM_UNIXTIME: + case OpenSearchPPLParser.LAST_DAY: + case OpenSearchPPLParser.LOCALTIME: + case OpenSearchPPLParser.LOCALTIMESTAMP: + case OpenSearchPPLParser.MAKEDATE: + case OpenSearchPPLParser.MAKETIME: + case OpenSearchPPLParser.MONTHNAME: + case OpenSearchPPLParser.NOW: + case OpenSearchPPLParser.PERIOD_ADD: + case OpenSearchPPLParser.PERIOD_DIFF: + case OpenSearchPPLParser.SEC_TO_TIME: + case OpenSearchPPLParser.STR_TO_DATE: + case OpenSearchPPLParser.SUBDATE: + case OpenSearchPPLParser.SUBTIME: + case OpenSearchPPLParser.SYSDATE: + case OpenSearchPPLParser.TIME: + case OpenSearchPPLParser.TIMEDIFF: + case OpenSearchPPLParser.TIMESTAMP: + case OpenSearchPPLParser.TIME_FORMAT: + case OpenSearchPPLParser.TIME_TO_SEC: + case OpenSearchPPLParser.TO_DAYS: + case OpenSearchPPLParser.TO_SECONDS: + case OpenSearchPPLParser.UNIX_TIMESTAMP: + case OpenSearchPPLParser.UTC_DATE: + case OpenSearchPPLParser.UTC_TIME: + case OpenSearchPPLParser.UTC_TIMESTAMP: + case OpenSearchPPLParser.WEEKDAY: + case OpenSearchPPLParser.YEARWEEK: + case OpenSearchPPLParser.SUBSTR: + case OpenSearchPPLParser.SUBSTRING: + case OpenSearchPPLParser.LTRIM: + case OpenSearchPPLParser.RTRIM: + case OpenSearchPPLParser.TRIM: + case OpenSearchPPLParser.LOWER: + case OpenSearchPPLParser.UPPER: + case OpenSearchPPLParser.CONCAT: + case OpenSearchPPLParser.CONCAT_WS: + case OpenSearchPPLParser.LENGTH: + case OpenSearchPPLParser.STRCMP: + case OpenSearchPPLParser.RIGHT: + case OpenSearchPPLParser.LEFT: + case OpenSearchPPLParser.ASCII: + case OpenSearchPPLParser.LOCATE: + case OpenSearchPPLParser.REPLACE: + case OpenSearchPPLParser.REVERSE: + case OpenSearchPPLParser.LIKE: + case OpenSearchPPLParser.ISNULL: + case OpenSearchPPLParser.ISNOTNULL: + case OpenSearchPPLParser.IFNULL: + case OpenSearchPPLParser.NULLIF: + case OpenSearchPPLParser.IF: + case OpenSearchPPLParser.TYPEOF: + case OpenSearchPPLParser.ALLOW_LEADING_WILDCARD: + case OpenSearchPPLParser.ANALYZE_WILDCARD: + case OpenSearchPPLParser.ANALYZER: + case OpenSearchPPLParser.AUTO_GENERATE_SYNONYMS_PHRASE_QUERY: + case OpenSearchPPLParser.BOOST: + case OpenSearchPPLParser.CUTOFF_FREQUENCY: + case OpenSearchPPLParser.DEFAULT_FIELD: + case OpenSearchPPLParser.DEFAULT_OPERATOR: + case OpenSearchPPLParser.ENABLE_POSITION_INCREMENTS: + case OpenSearchPPLParser.ESCAPE: + case OpenSearchPPLParser.FLAGS: + case OpenSearchPPLParser.FUZZY_MAX_EXPANSIONS: + case OpenSearchPPLParser.FUZZY_PREFIX_LENGTH: + case OpenSearchPPLParser.FUZZY_TRANSPOSITIONS: + case OpenSearchPPLParser.FUZZY_REWRITE: + case OpenSearchPPLParser.FUZZINESS: + case OpenSearchPPLParser.LENIENT: + case OpenSearchPPLParser.LOW_FREQ_OPERATOR: + case OpenSearchPPLParser.MAX_DETERMINIZED_STATES: + case OpenSearchPPLParser.MAX_EXPANSIONS: + case OpenSearchPPLParser.MINIMUM_SHOULD_MATCH: + case OpenSearchPPLParser.OPERATOR: + case OpenSearchPPLParser.PHRASE_SLOP: + case OpenSearchPPLParser.PREFIX_LENGTH: + case OpenSearchPPLParser.QUOTE_ANALYZER: + case OpenSearchPPLParser.QUOTE_FIELD_SUFFIX: + case OpenSearchPPLParser.REWRITE: + case OpenSearchPPLParser.SLOP: + case OpenSearchPPLParser.TIE_BREAKER: + case OpenSearchPPLParser.TYPE: + case OpenSearchPPLParser.ZERO_TERMS_QUERY: + case OpenSearchPPLParser.SPAN: + case OpenSearchPPLParser.MS: + case OpenSearchPPLParser.S: + case OpenSearchPPLParser.M: + case OpenSearchPPLParser.H: + case OpenSearchPPLParser.W: + case OpenSearchPPLParser.Q: + case OpenSearchPPLParser.Y: case OpenSearchPPLParser.ID: + case OpenSearchPPLParser.CLUSTER: + case OpenSearchPPLParser.BQUOTA_STRING: this.enterOuterAlt(localContext, 1); { - this.state = 680; + this.state = 717; this.tableQualifiedName(); } break; case OpenSearchPPLParser.ID_DATE_SUFFIX: this.enterOuterAlt(localContext, 2); { - this.state = 681; + this.state = 718; this.match(OpenSearchPPLParser.ID_DATE_SUFFIX); } break; @@ -3247,13 +3686,13 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 684; + this.state = 721; this.qualifiedName(); - this.state = 685; + this.state = 722; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 686; + this.state = 723; this.functionArgs(); - this.state = 687; + this.state = 724; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3277,21 +3716,21 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 689; + this.state = 726; this.fieldExpression(); - this.state = 694; + this.state = 731; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 690; + this.state = 727; this.match(OpenSearchPPLParser.COMMA); - this.state = 691; + this.state = 728; this.fieldExpression(); } } - this.state = 696; + this.state = 733; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -3317,21 +3756,21 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 697; + this.state = 734; this.wcFieldExpression(); - this.state = 702; + this.state = 739; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 698; + this.state = 735; this.match(OpenSearchPPLParser.COMMA); - this.state = 699; + this.state = 736; this.wcFieldExpression(); } } - this.state = 704; + this.state = 741; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -3357,12 +3796,12 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 706; + this.state = 743; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119) { { - this.state = 705; + this.state = 742; _la = this.tokenStream.LA(1); if(!(_la === 118 || _la === 119)) { this.errorHandler.recoverInline(this); @@ -3374,7 +3813,7 @@ export class OpenSearchPPLParser extends antlr.Parser { } } - this.state = 708; + this.state = 745; this.sortFieldExpression(); } } @@ -3395,70 +3834,68 @@ 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 = 768; this.errorHandler.sync(this); - switch (this.tokenStream.LA(1)) { - case OpenSearchPPLParser.ID: + switch (this.interpreter.adaptivePredict(this.tokenStream, 59, this.context) ) { + case 1: this.enterOuterAlt(localContext, 1); { - this.state = 710; + this.state = 747; this.fieldExpression(); } break; - case OpenSearchPPLParser.AUTO: + case 2: this.enterOuterAlt(localContext, 2); { - this.state = 711; + this.state = 748; this.match(OpenSearchPPLParser.AUTO); - this.state = 712; + this.state = 749; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 713; + this.state = 750; this.fieldExpression(); - this.state = 714; + this.state = 751; this.match(OpenSearchPPLParser.RT_PRTHS); } break; - case OpenSearchPPLParser.STR: + case 3: this.enterOuterAlt(localContext, 3); { - this.state = 716; + this.state = 753; this.match(OpenSearchPPLParser.STR); - this.state = 717; + this.state = 754; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 718; + this.state = 755; this.fieldExpression(); - this.state = 719; + this.state = 756; this.match(OpenSearchPPLParser.RT_PRTHS); } break; - case OpenSearchPPLParser.IP: + case 4: this.enterOuterAlt(localContext, 4); { - this.state = 721; + this.state = 758; this.match(OpenSearchPPLParser.IP); - this.state = 722; + this.state = 759; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 723; + this.state = 760; this.fieldExpression(); - this.state = 724; + this.state = 761; this.match(OpenSearchPPLParser.RT_PRTHS); } break; - case OpenSearchPPLParser.NUM: + case 5: this.enterOuterAlt(localContext, 5); { - this.state = 726; + this.state = 763; this.match(OpenSearchPPLParser.NUM); - this.state = 727; + this.state = 764; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 728; + this.state = 765; this.fieldExpression(); - this.state = 729; + this.state = 766; this.match(OpenSearchPPLParser.RT_PRTHS); } break; - default: - throw new antlr.NoViableAltException(this); } } catch (re) { @@ -3480,7 +3917,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 733; + this.state = 770; this.qualifiedName(); } } @@ -3503,7 +3940,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 735; + this.state = 772; this.wcQualifiedName(); } } @@ -3526,13 +3963,13 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 737; + this.state = 774; this.evalFunctionName(); - this.state = 738; + this.state = 775; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 739; + this.state = 776; this.functionArgs(); - this.state = 740; + this.state = 777; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3555,17 +3992,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 742; + this.state = 779; this.match(OpenSearchPPLParser.CAST); - this.state = 743; + this.state = 780; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 744; + this.state = 781; this.expression(); - this.state = 745; + this.state = 782; this.match(OpenSearchPPLParser.AS); - this.state = 746; + this.state = 783; this.convertedDataType(); - this.state = 747; + this.state = 784; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3588,13 +4025,13 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 749; + this.state = 786; this.conditionFunctionBase(); - this.state = 750; + this.state = 787; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 751; + this.state = 788; this.functionArgs(); - this.state = 752; + this.state = 789; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -3615,76 +4052,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 = 801; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.DATE: this.enterOuterAlt(localContext, 1); { - this.state = 754; + this.state = 791; localContext._typeName = this.match(OpenSearchPPLParser.DATE); } break; case OpenSearchPPLParser.TIME: this.enterOuterAlt(localContext, 2); { - this.state = 755; + this.state = 792; localContext._typeName = this.match(OpenSearchPPLParser.TIME); } break; case OpenSearchPPLParser.TIMESTAMP: this.enterOuterAlt(localContext, 3); { - this.state = 756; + this.state = 793; localContext._typeName = this.match(OpenSearchPPLParser.TIMESTAMP); } break; case OpenSearchPPLParser.INT: this.enterOuterAlt(localContext, 4); { - this.state = 757; + this.state = 794; localContext._typeName = this.match(OpenSearchPPLParser.INT); } break; case OpenSearchPPLParser.INTEGER: this.enterOuterAlt(localContext, 5); { - this.state = 758; + this.state = 795; localContext._typeName = this.match(OpenSearchPPLParser.INTEGER); } break; case OpenSearchPPLParser.DOUBLE: this.enterOuterAlt(localContext, 6); { - this.state = 759; + this.state = 796; localContext._typeName = this.match(OpenSearchPPLParser.DOUBLE); } break; case OpenSearchPPLParser.LONG: this.enterOuterAlt(localContext, 7); { - this.state = 760; + this.state = 797; localContext._typeName = this.match(OpenSearchPPLParser.LONG); } break; case OpenSearchPPLParser.FLOAT: this.enterOuterAlt(localContext, 8); { - this.state = 761; + this.state = 798; localContext._typeName = this.match(OpenSearchPPLParser.FLOAT); } break; case OpenSearchPPLParser.STRING: this.enterOuterAlt(localContext, 9); { - this.state = 762; + this.state = 799; localContext._typeName = this.match(OpenSearchPPLParser.STRING); } break; case OpenSearchPPLParser.BOOLEAN: this.enterOuterAlt(localContext, 10); { - this.state = 763; + this.state = 800; localContext._typeName = this.match(OpenSearchPPLParser.BOOLEAN); } break; @@ -3709,7 +4146,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 = 809; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.ABS: @@ -3746,7 +4183,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.TAN: this.enterOuterAlt(localContext, 1); { - this.state = 766; + this.state = 803; this.mathematicalFunctionName(); } break; @@ -3817,7 +4254,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.YEARWEEK: this.enterOuterAlt(localContext, 2); { - this.state = 767; + this.state = 804; this.dateTimeFunctionName(); } break; @@ -3840,7 +4277,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.REVERSE: this.enterOuterAlt(localContext, 3); { - this.state = 768; + this.state = 805; this.textFunctionName(); } break; @@ -3852,21 +4289,21 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.IF: this.enterOuterAlt(localContext, 4); { - this.state = 769; + this.state = 806; this.conditionFunctionBase(); } break; case OpenSearchPPLParser.TYPEOF: this.enterOuterAlt(localContext, 5); { - this.state = 770; + this.state = 807; this.systemFunctionName(); } break; case OpenSearchPPLParser.POSITION: this.enterOuterAlt(localContext, 6); { - this.state = 771; + this.state = 808; this.positionFunctionName(); } break; @@ -3894,26 +4331,26 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 782; + this.state = 819; 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 = 811; this.functionArg(); - this.state = 779; + this.state = 816; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 775; + this.state = 812; this.match(OpenSearchPPLParser.COMMA); - this.state = 776; + this.state = 813; this.functionArg(); } } - this.state = 781; + this.state = 818; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -3941,20 +4378,20 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 787; + this.state = 824; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 58, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 64, this.context) ) { case 1: { - this.state = 784; + this.state = 821; this.ident(); - this.state = 785; + this.state = 822; this.match(OpenSearchPPLParser.EQUAL); } break; } - this.state = 789; - this.valueExpression(); + this.state = 826; + this.valueExpression(0); } } catch (re) { @@ -3976,11 +4413,11 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 791; + this.state = 828; this.relevanceArgName(); - this.state = 792; + this.state = 829; this.match(OpenSearchPPLParser.EQUAL); - this.state = 793; + this.state = 830; this.relevanceArgValue(); } } @@ -4004,7 +4441,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 795; + this.state = 832; _la = this.tokenStream.LA(1); if(!(_la === 7 || _la === 56 || ((((_la - 289)) & ~0x1F) === 0 && ((1 << (_la - 289)) & 2147483647) !== 0))) { this.errorHandler.recoverInline(this); @@ -4032,33 +4469,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 = 842; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 59, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 65, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 797; + this.state = 834; localContext._field = this.relevanceField(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 798; + this.state = 835; localContext._field = this.relevanceField(); - this.state = 799; + this.state = 836; localContext._weight = this.relevanceFieldWeight(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 801; + this.state = 838; localContext._field = this.relevanceField(); - this.state = 802; + this.state = 839; this.match(OpenSearchPPLParser.BIT_XOR_OP); - this.state = 803; + this.state = 840; localContext._weight = this.relevanceFieldWeight(); } break; @@ -4081,20 +4518,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 = 846; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 60, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 66, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 807; + this.state = 844; this.integerLiteral(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 808; + this.state = 845; this.decimalLiteral(); } break; @@ -4117,13 +4554,280 @@ 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 = 850; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { + case OpenSearchPPLParser.SEARCH: + case OpenSearchPPLParser.DESCRIBE: + case OpenSearchPPLParser.SHOW: + case OpenSearchPPLParser.FROM: + case OpenSearchPPLParser.WHERE: + case OpenSearchPPLParser.FIELDS: + case OpenSearchPPLParser.RENAME: + case OpenSearchPPLParser.STATS: + case OpenSearchPPLParser.DEDUP: + case OpenSearchPPLParser.SORT: + case OpenSearchPPLParser.EVAL: + case OpenSearchPPLParser.HEAD: + case OpenSearchPPLParser.TOP: + case OpenSearchPPLParser.RARE: + case OpenSearchPPLParser.PARSE: + case OpenSearchPPLParser.METHOD: + case OpenSearchPPLParser.REGEX: + case OpenSearchPPLParser.PUNCT: + case OpenSearchPPLParser.GROK: + case OpenSearchPPLParser.PATTERN: + case OpenSearchPPLParser.PATTERNS: + case OpenSearchPPLParser.NEW_FIELD: + case OpenSearchPPLParser.KMEANS: + case OpenSearchPPLParser.AD: + case OpenSearchPPLParser.ML: + case OpenSearchPPLParser.SOURCE: + case OpenSearchPPLParser.INDEX: + case OpenSearchPPLParser.D: + case OpenSearchPPLParser.DESC: + case OpenSearchPPLParser.DATASOURCES: + case OpenSearchPPLParser.SORTBY: + case OpenSearchPPLParser.STR: + case OpenSearchPPLParser.IP: + case OpenSearchPPLParser.NUM: + case OpenSearchPPLParser.KEEPEMPTY: + case OpenSearchPPLParser.CONSECUTIVE: + case OpenSearchPPLParser.DEDUP_SPLITVALUES: + case OpenSearchPPLParser.PARTITIONS: + case OpenSearchPPLParser.ALLNUM: + case OpenSearchPPLParser.DELIM: + case OpenSearchPPLParser.CENTROIDS: + case OpenSearchPPLParser.ITERATIONS: + case OpenSearchPPLParser.DISTANCE_TYPE: + case OpenSearchPPLParser.NUMBER_OF_TREES: + case OpenSearchPPLParser.SHINGLE_SIZE: + case OpenSearchPPLParser.SAMPLE_SIZE: + case OpenSearchPPLParser.OUTPUT_AFTER: + case OpenSearchPPLParser.TIME_DECAY: + case OpenSearchPPLParser.ANOMALY_RATE: + case OpenSearchPPLParser.CATEGORY_FIELD: + case OpenSearchPPLParser.TIME_FIELD: + case OpenSearchPPLParser.TIME_ZONE: + case OpenSearchPPLParser.TRAINING_DATA_SIZE: + case OpenSearchPPLParser.ANOMALY_SCORE_THRESHOLD: + case OpenSearchPPLParser.CONVERT_TZ: + case OpenSearchPPLParser.DATETIME: + case OpenSearchPPLParser.DAY: + case OpenSearchPPLParser.DAY_HOUR: + case OpenSearchPPLParser.DAY_MICROSECOND: + case OpenSearchPPLParser.DAY_MINUTE: + case OpenSearchPPLParser.DAY_OF_YEAR: + case OpenSearchPPLParser.DAY_SECOND: + case OpenSearchPPLParser.HOUR: + case OpenSearchPPLParser.HOUR_MICROSECOND: + case OpenSearchPPLParser.HOUR_MINUTE: + case OpenSearchPPLParser.HOUR_OF_DAY: + case OpenSearchPPLParser.HOUR_SECOND: + case OpenSearchPPLParser.MICROSECOND: + case OpenSearchPPLParser.MILLISECOND: + case OpenSearchPPLParser.MINUTE: + case OpenSearchPPLParser.MINUTE_MICROSECOND: + case OpenSearchPPLParser.MINUTE_OF_DAY: + case OpenSearchPPLParser.MINUTE_OF_HOUR: + case OpenSearchPPLParser.MINUTE_SECOND: + case OpenSearchPPLParser.MONTH: + case OpenSearchPPLParser.MONTH_OF_YEAR: + case OpenSearchPPLParser.QUARTER: + case OpenSearchPPLParser.SECOND: + case OpenSearchPPLParser.SECOND_MICROSECOND: + case OpenSearchPPLParser.SECOND_OF_MINUTE: + case OpenSearchPPLParser.WEEK: + case OpenSearchPPLParser.WEEK_OF_YEAR: + case OpenSearchPPLParser.YEAR: + case OpenSearchPPLParser.YEAR_MONTH: + case OpenSearchPPLParser.DOT: + case OpenSearchPPLParser.BACKTICK: + case OpenSearchPPLParser.AVG: + case OpenSearchPPLParser.COUNT: + case OpenSearchPPLParser.DISTINCT_COUNT: + case OpenSearchPPLParser.ESTDC: + case OpenSearchPPLParser.ESTDC_ERROR: + case OpenSearchPPLParser.MAX: + case OpenSearchPPLParser.MEAN: + case OpenSearchPPLParser.MEDIAN: + case OpenSearchPPLParser.MIN: + case OpenSearchPPLParser.MODE: + case OpenSearchPPLParser.RANGE: + case OpenSearchPPLParser.STDEV: + case OpenSearchPPLParser.STDEVP: + case OpenSearchPPLParser.SUM: + case OpenSearchPPLParser.SUMSQ: + case OpenSearchPPLParser.VAR_SAMP: + case OpenSearchPPLParser.VAR_POP: + case OpenSearchPPLParser.STDDEV_SAMP: + case OpenSearchPPLParser.STDDEV_POP: + case OpenSearchPPLParser.PERCENTILE: + case OpenSearchPPLParser.TAKE: + case OpenSearchPPLParser.FIRST: + case OpenSearchPPLParser.LAST: + case OpenSearchPPLParser.LIST: + case OpenSearchPPLParser.VALUES: + case OpenSearchPPLParser.EARLIEST: + case OpenSearchPPLParser.EARLIEST_TIME: + case OpenSearchPPLParser.LATEST: + case OpenSearchPPLParser.LATEST_TIME: + case OpenSearchPPLParser.PER_DAY: + case OpenSearchPPLParser.PER_HOUR: + case OpenSearchPPLParser.PER_MINUTE: + case OpenSearchPPLParser.PER_SECOND: + case OpenSearchPPLParser.RATE: + case OpenSearchPPLParser.SPARKLINE: + case OpenSearchPPLParser.C: + case OpenSearchPPLParser.DC: + case OpenSearchPPLParser.ABS: + case OpenSearchPPLParser.CBRT: + case OpenSearchPPLParser.CEIL: + case OpenSearchPPLParser.CEILING: + case OpenSearchPPLParser.CONV: + case OpenSearchPPLParser.CRC32: + case OpenSearchPPLParser.E: + case OpenSearchPPLParser.EXP: + case OpenSearchPPLParser.FLOOR: + case OpenSearchPPLParser.LN: + case OpenSearchPPLParser.LOG: + case OpenSearchPPLParser.LOG10: + case OpenSearchPPLParser.LOG2: + case OpenSearchPPLParser.MOD: + case OpenSearchPPLParser.PI: + case OpenSearchPPLParser.POSITION: + case OpenSearchPPLParser.POW: + case OpenSearchPPLParser.POWER: + case OpenSearchPPLParser.RAND: + case OpenSearchPPLParser.ROUND: + case OpenSearchPPLParser.SIGN: + case OpenSearchPPLParser.SQRT: + case OpenSearchPPLParser.TRUNCATE: + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + case OpenSearchPPLParser.ADDDATE: + case OpenSearchPPLParser.ADDTIME: + case OpenSearchPPLParser.CURDATE: + case OpenSearchPPLParser.CURRENT_DATE: + case OpenSearchPPLParser.CURRENT_TIME: + case OpenSearchPPLParser.CURRENT_TIMESTAMP: + case OpenSearchPPLParser.CURTIME: + case OpenSearchPPLParser.DATE: + case OpenSearchPPLParser.DATEDIFF: + case OpenSearchPPLParser.DATE_ADD: + case OpenSearchPPLParser.DATE_FORMAT: + case OpenSearchPPLParser.DATE_SUB: + case OpenSearchPPLParser.DAYNAME: + case OpenSearchPPLParser.DAYOFMONTH: + case OpenSearchPPLParser.DAYOFWEEK: + case OpenSearchPPLParser.DAYOFYEAR: + case OpenSearchPPLParser.DAY_OF_MONTH: + case OpenSearchPPLParser.DAY_OF_WEEK: + case OpenSearchPPLParser.FROM_DAYS: + case OpenSearchPPLParser.FROM_UNIXTIME: + case OpenSearchPPLParser.LAST_DAY: + case OpenSearchPPLParser.LOCALTIME: + case OpenSearchPPLParser.LOCALTIMESTAMP: + case OpenSearchPPLParser.MAKEDATE: + case OpenSearchPPLParser.MAKETIME: + case OpenSearchPPLParser.MONTHNAME: + case OpenSearchPPLParser.NOW: + case OpenSearchPPLParser.PERIOD_ADD: + case OpenSearchPPLParser.PERIOD_DIFF: + case OpenSearchPPLParser.SEC_TO_TIME: + case OpenSearchPPLParser.STR_TO_DATE: + case OpenSearchPPLParser.SUBDATE: + case OpenSearchPPLParser.SUBTIME: + case OpenSearchPPLParser.SYSDATE: + case OpenSearchPPLParser.TIME: + case OpenSearchPPLParser.TIMEDIFF: + case OpenSearchPPLParser.TIMESTAMP: + case OpenSearchPPLParser.TIME_FORMAT: + case OpenSearchPPLParser.TIME_TO_SEC: + case OpenSearchPPLParser.TO_DAYS: + case OpenSearchPPLParser.TO_SECONDS: + case OpenSearchPPLParser.UNIX_TIMESTAMP: + case OpenSearchPPLParser.UTC_DATE: + case OpenSearchPPLParser.UTC_TIME: + case OpenSearchPPLParser.UTC_TIMESTAMP: + case OpenSearchPPLParser.WEEKDAY: + case OpenSearchPPLParser.YEARWEEK: + case OpenSearchPPLParser.SUBSTR: + case OpenSearchPPLParser.SUBSTRING: + case OpenSearchPPLParser.LTRIM: + case OpenSearchPPLParser.RTRIM: + case OpenSearchPPLParser.TRIM: + case OpenSearchPPLParser.LOWER: + case OpenSearchPPLParser.UPPER: + case OpenSearchPPLParser.CONCAT: + case OpenSearchPPLParser.CONCAT_WS: + case OpenSearchPPLParser.LENGTH: + case OpenSearchPPLParser.STRCMP: + case OpenSearchPPLParser.RIGHT: + case OpenSearchPPLParser.LEFT: + case OpenSearchPPLParser.ASCII: + case OpenSearchPPLParser.LOCATE: + case OpenSearchPPLParser.REPLACE: + case OpenSearchPPLParser.REVERSE: + case OpenSearchPPLParser.LIKE: + case OpenSearchPPLParser.ISNULL: + case OpenSearchPPLParser.ISNOTNULL: + case OpenSearchPPLParser.IFNULL: + case OpenSearchPPLParser.NULLIF: + case OpenSearchPPLParser.IF: + case OpenSearchPPLParser.TYPEOF: + case OpenSearchPPLParser.ALLOW_LEADING_WILDCARD: + case OpenSearchPPLParser.ANALYZE_WILDCARD: + case OpenSearchPPLParser.ANALYZER: + case OpenSearchPPLParser.AUTO_GENERATE_SYNONYMS_PHRASE_QUERY: + case OpenSearchPPLParser.BOOST: + case OpenSearchPPLParser.CUTOFF_FREQUENCY: + case OpenSearchPPLParser.DEFAULT_FIELD: + case OpenSearchPPLParser.DEFAULT_OPERATOR: + case OpenSearchPPLParser.ENABLE_POSITION_INCREMENTS: + case OpenSearchPPLParser.ESCAPE: + case OpenSearchPPLParser.FLAGS: + case OpenSearchPPLParser.FUZZY_MAX_EXPANSIONS: + case OpenSearchPPLParser.FUZZY_PREFIX_LENGTH: + case OpenSearchPPLParser.FUZZY_TRANSPOSITIONS: + case OpenSearchPPLParser.FUZZY_REWRITE: + case OpenSearchPPLParser.FUZZINESS: + case OpenSearchPPLParser.LENIENT: + case OpenSearchPPLParser.LOW_FREQ_OPERATOR: + case OpenSearchPPLParser.MAX_DETERMINIZED_STATES: + case OpenSearchPPLParser.MAX_EXPANSIONS: + case OpenSearchPPLParser.MINIMUM_SHOULD_MATCH: + case OpenSearchPPLParser.OPERATOR: + case OpenSearchPPLParser.PHRASE_SLOP: + case OpenSearchPPLParser.PREFIX_LENGTH: + case OpenSearchPPLParser.QUOTE_ANALYZER: + case OpenSearchPPLParser.QUOTE_FIELD_SUFFIX: + case OpenSearchPPLParser.REWRITE: + case OpenSearchPPLParser.SLOP: + case OpenSearchPPLParser.TIE_BREAKER: + case OpenSearchPPLParser.TYPE: + case OpenSearchPPLParser.ZERO_TERMS_QUERY: + case OpenSearchPPLParser.SPAN: + case OpenSearchPPLParser.MS: + case OpenSearchPPLParser.S: + case OpenSearchPPLParser.M: + case OpenSearchPPLParser.H: + case OpenSearchPPLParser.W: + case OpenSearchPPLParser.Q: + case OpenSearchPPLParser.Y: case OpenSearchPPLParser.ID: + case OpenSearchPPLParser.BQUOTA_STRING: this.enterOuterAlt(localContext, 1); { - this.state = 811; + this.state = 848; this.qualifiedName(); } break; @@ -4131,7 +4835,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.SQUOTA_STRING: this.enterOuterAlt(localContext, 2); { - this.state = 812; + this.state = 849; this.stringLiteral(); } break; @@ -4158,7 +4862,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 815; + this.state = 852; this.relevanceArgValue(); } } @@ -4179,36 +4883,23 @@ 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 = 856; this.errorHandler.sync(this); - switch (this.tokenStream.LA(1)) { - case OpenSearchPPLParser.ID: + switch (this.interpreter.adaptivePredict(this.tokenStream, 68, this.context) ) { + case 1: this.enterOuterAlt(localContext, 1); { - this.state = 817; + this.state = 854; this.qualifiedName(); } break; - case OpenSearchPPLParser.TRUE: - case OpenSearchPPLParser.FALSE: - case OpenSearchPPLParser.INTERVAL: - case OpenSearchPPLParser.PLUS: - case OpenSearchPPLParser.MINUS: - case OpenSearchPPLParser.DATE: - case OpenSearchPPLParser.TIME: - case OpenSearchPPLParser.TIMESTAMP: - case OpenSearchPPLParser.INTEGER_LITERAL: - case OpenSearchPPLParser.DECIMAL_LITERAL: - case OpenSearchPPLParser.DQUOTA_STRING: - case OpenSearchPPLParser.SQUOTA_STRING: + case 2: this.enterOuterAlt(localContext, 2); { - this.state = 818; + this.state = 855; this.literalValue(); } break; - default: - throw new antlr.NoViableAltException(this); } } catch (re) { @@ -4228,160 +4919,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 = 881; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.ABS: this.enterOuterAlt(localContext, 1); { - this.state = 821; + this.state = 858; this.match(OpenSearchPPLParser.ABS); } break; case OpenSearchPPLParser.CBRT: this.enterOuterAlt(localContext, 2); { - this.state = 822; + this.state = 859; this.match(OpenSearchPPLParser.CBRT); } break; case OpenSearchPPLParser.CEIL: this.enterOuterAlt(localContext, 3); { - this.state = 823; + this.state = 860; this.match(OpenSearchPPLParser.CEIL); } break; case OpenSearchPPLParser.CEILING: this.enterOuterAlt(localContext, 4); { - this.state = 824; + this.state = 861; this.match(OpenSearchPPLParser.CEILING); } break; case OpenSearchPPLParser.CONV: this.enterOuterAlt(localContext, 5); { - this.state = 825; + this.state = 862; this.match(OpenSearchPPLParser.CONV); } break; case OpenSearchPPLParser.CRC32: this.enterOuterAlt(localContext, 6); { - this.state = 826; + this.state = 863; this.match(OpenSearchPPLParser.CRC32); } break; case OpenSearchPPLParser.E: this.enterOuterAlt(localContext, 7); { - this.state = 827; + this.state = 864; this.match(OpenSearchPPLParser.E); } break; case OpenSearchPPLParser.EXP: this.enterOuterAlt(localContext, 8); { - this.state = 828; + this.state = 865; this.match(OpenSearchPPLParser.EXP); } break; case OpenSearchPPLParser.FLOOR: this.enterOuterAlt(localContext, 9); { - this.state = 829; + this.state = 866; this.match(OpenSearchPPLParser.FLOOR); } break; case OpenSearchPPLParser.LN: this.enterOuterAlt(localContext, 10); { - this.state = 830; + this.state = 867; this.match(OpenSearchPPLParser.LN); } break; case OpenSearchPPLParser.LOG: this.enterOuterAlt(localContext, 11); { - this.state = 831; + this.state = 868; this.match(OpenSearchPPLParser.LOG); } break; case OpenSearchPPLParser.LOG10: this.enterOuterAlt(localContext, 12); { - this.state = 832; + this.state = 869; this.match(OpenSearchPPLParser.LOG10); } break; case OpenSearchPPLParser.LOG2: this.enterOuterAlt(localContext, 13); { - this.state = 833; + this.state = 870; this.match(OpenSearchPPLParser.LOG2); } break; case OpenSearchPPLParser.MOD: this.enterOuterAlt(localContext, 14); { - this.state = 834; + this.state = 871; this.match(OpenSearchPPLParser.MOD); } break; case OpenSearchPPLParser.PI: this.enterOuterAlt(localContext, 15); { - this.state = 835; + this.state = 872; this.match(OpenSearchPPLParser.PI); } break; case OpenSearchPPLParser.POW: this.enterOuterAlt(localContext, 16); { - this.state = 836; + this.state = 873; this.match(OpenSearchPPLParser.POW); } break; case OpenSearchPPLParser.POWER: this.enterOuterAlt(localContext, 17); { - this.state = 837; + this.state = 874; this.match(OpenSearchPPLParser.POWER); } break; case OpenSearchPPLParser.RAND: this.enterOuterAlt(localContext, 18); { - this.state = 838; + this.state = 875; this.match(OpenSearchPPLParser.RAND); } break; case OpenSearchPPLParser.ROUND: this.enterOuterAlt(localContext, 19); { - this.state = 839; + this.state = 876; this.match(OpenSearchPPLParser.ROUND); } break; case OpenSearchPPLParser.SIGN: this.enterOuterAlt(localContext, 20); { - this.state = 840; + this.state = 877; this.match(OpenSearchPPLParser.SIGN); } break; case OpenSearchPPLParser.SQRT: this.enterOuterAlt(localContext, 21); { - this.state = 841; + this.state = 878; this.match(OpenSearchPPLParser.SQRT); } break; case OpenSearchPPLParser.TRUNCATE: this.enterOuterAlt(localContext, 22); { - this.state = 842; + this.state = 879; this.match(OpenSearchPPLParser.TRUNCATE); } break; @@ -4397,7 +5088,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.TAN: this.enterOuterAlt(localContext, 23); { - this.state = 843; + this.state = 880; this.trigonometricFunctionName(); } break; @@ -4425,7 +5116,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 846; + this.state = 883; _la = this.tokenStream.LA(1); if(!(((((_la - 195)) & ~0x1F) === 0 && ((1 << (_la - 195)) & 1023) !== 0))) { this.errorHandler.recoverInline(this); @@ -4456,7 +5147,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 848; + this.state = 885; _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); @@ -4486,17 +5177,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 850; + this.state = 887; this.match(OpenSearchPPLParser.GET_FORMAT); - this.state = 851; + this.state = 888; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 852; + this.state = 889; this.getFormatType(); - this.state = 853; + this.state = 890; this.match(OpenSearchPPLParser.COMMA); - this.state = 854; + this.state = 891; this.functionArg(); - this.state = 855; + this.state = 892; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -4520,7 +5211,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 857; + this.state = 894; _la = this.tokenStream.LA(1); if(!(_la === 69 || ((((_la - 212)) & ~0x1F) === 0 && ((1 << (_la - 212)) & 2684354561) !== 0))) { this.errorHandler.recoverInline(this); @@ -4550,17 +5241,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 859; + this.state = 896; this.match(OpenSearchPPLParser.EXTRACT); - this.state = 860; + this.state = 897; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 861; + this.state = 898; this.datetimePart(); - this.state = 862; + this.state = 899; this.match(OpenSearchPPLParser.FROM); - this.state = 863; + this.state = 900; this.functionArg(); - this.state = 864; + this.state = 901; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -4584,7 +5275,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 866; + this.state = 903; _la = this.tokenStream.LA(1); if(!(((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 174608449) !== 0))) { this.errorHandler.recoverInline(this); @@ -4615,7 +5306,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 868; + this.state = 905; _la = this.tokenStream.LA(1); if(!(((((_la - 71)) & ~0x1F) === 0 && ((1 << (_la - 71)) & 138560215) !== 0))) { this.errorHandler.recoverInline(this); @@ -4643,7 +5334,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 = 909; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.DAY: @@ -4657,7 +5348,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.YEAR: this.enterOuterAlt(localContext, 1); { - this.state = 870; + this.state = 907; this.simpleDateTimePart(); } break; @@ -4674,7 +5365,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.YEAR_MONTH: this.enterOuterAlt(localContext, 2); { - this.state = 871; + this.state = 908; this.complexDateTimePart(); } break; @@ -4701,21 +5392,21 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 874; + this.state = 911; this.timestampFunctionName(); - this.state = 875; + this.state = 912; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 876; + this.state = 913; this.simpleDateTimePart(); - this.state = 877; + this.state = 914; this.match(OpenSearchPPLParser.COMMA); - this.state = 878; + this.state = 915; localContext._firstArg = this.functionArg(); - this.state = 879; + this.state = 916; this.match(OpenSearchPPLParser.COMMA); - this.state = 880; + this.state = 917; localContext._secondArg = this.functionArg(); - this.state = 881; + this.state = 918; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -4739,7 +5430,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 883; + this.state = 920; _la = this.tokenStream.LA(1); if(!(_la === 244 || _la === 245)) { this.errorHandler.recoverInline(this); @@ -4770,7 +5461,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 885; + this.state = 922; _la = this.tokenStream.LA(1); if(!(((((_la - 275)) & ~0x1F) === 0 && ((1 << (_la - 275)) & 63) !== 0))) { this.errorHandler.recoverInline(this); @@ -4800,7 +5491,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 887; + this.state = 924; this.match(OpenSearchPPLParser.TYPEOF); } } @@ -4824,7 +5515,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 889; + this.state = 926; _la = this.tokenStream.LA(1); if(!(((((_la - 256)) & ~0x1F) === 0 && ((1 << (_la - 256)) & 262111) !== 0))) { this.errorHandler.recoverInline(this); @@ -4854,7 +5545,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 891; + this.state = 928; this.match(OpenSearchPPLParser.POSITION); } } @@ -4878,7 +5569,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 893; + this.state = 930; _la = this.tokenStream.LA(1); if(!(_la === 67 || ((((_la - 112)) & ~0x1F) === 0 && ((1 << (_la - 112)) & 63) !== 0))) { this.errorHandler.recoverInline(this); @@ -4909,7 +5600,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 895; + this.state = 932; _la = this.tokenStream.LA(1); if(!(((((_la - 282)) & ~0x1F) === 0 && ((1 << (_la - 282)) & 15) !== 0))) { this.errorHandler.recoverInline(this); @@ -4940,7 +5631,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 897; + this.state = 934; _la = this.tokenStream.LA(1); if(!(((((_la - 286)) & ~0x1F) === 0 && ((1 << (_la - 286)) & 7) !== 0))) { this.errorHandler.recoverInline(this); @@ -4968,48 +5659,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 = 942; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 65, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 71, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 899; + this.state = 936; this.intervalLiteral(); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 900; + this.state = 937; this.stringLiteral(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 901; + this.state = 938; this.integerLiteral(); } break; case 4: this.enterOuterAlt(localContext, 4); { - this.state = 902; + this.state = 939; this.decimalLiteral(); } break; case 5: this.enterOuterAlt(localContext, 5); { - this.state = 903; + this.state = 940; this.booleanLiteral(); } break; case 6: this.enterOuterAlt(localContext, 6); { - this.state = 904; + this.state = 941; this.datetimeLiteral(); } break; @@ -5034,11 +5725,11 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 907; + this.state = 944; this.match(OpenSearchPPLParser.INTERVAL); - this.state = 908; - this.valueExpression(); - this.state = 909; + this.state = 945; + this.valueExpression(0); + this.state = 946; this.intervalUnit(); } } @@ -5062,7 +5753,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 911; + this.state = 948; _la = this.tokenStream.LA(1); if(!(_la === 333 || _la === 334)) { this.errorHandler.recoverInline(this); @@ -5093,12 +5784,12 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 914; + this.state = 951; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119) { { - this.state = 913; + this.state = 950; _la = this.tokenStream.LA(1); if(!(_la === 118 || _la === 119)) { this.errorHandler.recoverInline(this); @@ -5110,7 +5801,7 @@ export class OpenSearchPPLParser extends antlr.Parser { } } - this.state = 916; + this.state = 953; this.match(OpenSearchPPLParser.INTEGER_LITERAL); } } @@ -5134,12 +5825,12 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 919; + this.state = 956; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 118 || _la === 119) { { - this.state = 918; + this.state = 955; _la = this.tokenStream.LA(1); if(!(_la === 118 || _la === 119)) { this.errorHandler.recoverInline(this); @@ -5151,7 +5842,7 @@ export class OpenSearchPPLParser extends antlr.Parser { } } - this.state = 921; + this.state = 958; this.match(OpenSearchPPLParser.DECIMAL_LITERAL); } } @@ -5175,7 +5866,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 923; + this.state = 960; _la = this.tokenStream.LA(1); if(!(_la === 65 || _la === 66)) { this.errorHandler.recoverInline(this); @@ -5203,27 +5894,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 = 965; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.DATE: this.enterOuterAlt(localContext, 1); { - this.state = 925; + this.state = 962; this.dateLiteral(); } break; case OpenSearchPPLParser.TIME: this.enterOuterAlt(localContext, 2); { - this.state = 926; + this.state = 963; this.timeLiteral(); } break; case OpenSearchPPLParser.TIMESTAMP: this.enterOuterAlt(localContext, 3); { - this.state = 927; + this.state = 964; this.timestampLiteral(); } break; @@ -5250,9 +5941,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 930; + this.state = 967; this.match(OpenSearchPPLParser.DATE); - this.state = 931; + this.state = 968; localContext._date = this.stringLiteral(); } } @@ -5275,9 +5966,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 933; + this.state = 970; this.match(OpenSearchPPLParser.TIME); - this.state = 934; + this.state = 971; localContext._time = this.stringLiteral(); } } @@ -5300,9 +5991,9 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 936; + this.state = 973; this.match(OpenSearchPPLParser.TIMESTAMP); - this.state = 937; + this.state = 974; localContext._timestamp = this.stringLiteral(); } } @@ -5326,7 +6017,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 939; + this.state = 976; _la = this.tokenStream.LA(1); if(!(((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & 451728879) !== 0))) { this.errorHandler.recoverInline(this); @@ -5357,7 +6048,7 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 941; + this.state = 978; _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); @@ -5388,27 +6079,27 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 943; + this.state = 980; this.match(OpenSearchPPLParser.LT_PRTHS); - this.state = 944; + this.state = 981; this.literalValue(); - this.state = 949; + this.state = 986; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 110) { { { - this.state = 945; + this.state = 982; this.match(OpenSearchPPLParser.COMMA); - this.state = 946; + this.state = 983; this.literalValue(); } } - this.state = 951; + this.state = 988; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } - this.state = 952; + this.state = 989; this.match(OpenSearchPPLParser.RT_PRTHS); } } @@ -5429,10 +6120,30 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new QualifiedNameContext(this.context, this.state); this.enterRule(localContext, 214, OpenSearchPPLParser.RULE_qualifiedName); try { + let alternative: number; + localContext = new IdentsAsQualifiedNameContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 954; - this.match(OpenSearchPPLParser.ID); + this.state = 991; + this.ident(); + this.state = 996; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 76, this.context); + while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { + if (alternative === 1) { + { + { + this.state = 992; + this.match(OpenSearchPPLParser.DOT); + this.state = 993; + this.ident(); + } + } + } + this.state = 998; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 76, this.context); + } } } catch (re) { @@ -5452,10 +6163,30 @@ export class OpenSearchPPLParser extends antlr.Parser { let localContext = new TableQualifiedNameContext(this.context, this.state); this.enterRule(localContext, 216, OpenSearchPPLParser.RULE_tableQualifiedName); try { + let alternative: number; + localContext = new IdentsAsTableQualifiedNameContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 956; - this.match(OpenSearchPPLParser.ID); + this.state = 999; + this.tableIdent(); + this.state = 1004; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 77, this.context); + while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { + if (alternative === 1) { + { + { + this.state = 1000; + this.match(OpenSearchPPLParser.DOT); + this.state = 1001; + this.ident(); + } + } + } + this.state = 1006; + this.errorHandler.sync(this); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 77, this.context); + } } } catch (re) { @@ -5479,21 +6210,21 @@ export class OpenSearchPPLParser extends antlr.Parser { localContext = new IdentsAsWildcardQualifiedNameContext(localContext); this.enterOuterAlt(localContext, 1); { - this.state = 958; + this.state = 1007; this.wildcard(); - this.state = 963; + this.state = 1012; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); while (_la === 111) { { { - this.state = 959; + this.state = 1008; this.match(OpenSearchPPLParser.DOT); - this.state = 960; + this.state = 1009; this.wildcard(); } } - this.state = 965; + this.state = 1014; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); } @@ -5517,42 +6248,42 @@ export class OpenSearchPPLParser extends antlr.Parser { this.enterRule(localContext, 220, OpenSearchPPLParser.RULE_ident); let _la: number; try { - this.state = 976; + this.state = 1025; this.errorHandler.sync(this); switch (this.tokenStream.LA(1)) { case OpenSearchPPLParser.DOT: case OpenSearchPPLParser.ID: this.enterOuterAlt(localContext, 1); { - this.state = 967; + this.state = 1016; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 111) { { - this.state = 966; + this.state = 1015; this.match(OpenSearchPPLParser.DOT); } } - this.state = 969; + this.state = 1018; this.match(OpenSearchPPLParser.ID); } break; case OpenSearchPPLParser.BACKTICK: this.enterOuterAlt(localContext, 2); { - this.state = 970; + this.state = 1019; this.match(OpenSearchPPLParser.BACKTICK); - this.state = 971; + this.state = 1020; this.ident(); - this.state = 972; + this.state = 1021; this.match(OpenSearchPPLParser.BACKTICK); } break; case OpenSearchPPLParser.BQUOTA_STRING: this.enterOuterAlt(localContext, 3); { - this.state = 974; + this.state = 1023; this.match(OpenSearchPPLParser.BQUOTA_STRING); } break; @@ -5822,7 +6553,7 @@ export class OpenSearchPPLParser extends antlr.Parser { case OpenSearchPPLParser.Y: this.enterOuterAlt(localContext, 4); { - this.state = 975; + this.state = 1024; this.keywordsCanBeId(); } break; @@ -5850,17 +6581,17 @@ export class OpenSearchPPLParser extends antlr.Parser { try { this.enterOuterAlt(localContext, 1); { - this.state = 979; + this.state = 1028; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 329) { { - this.state = 978; + this.state = 1027; this.match(OpenSearchPPLParser.CLUSTER); } } - this.state = 981; + this.state = 1030; this.ident(); } } @@ -5883,38 +6614,38 @@ export class OpenSearchPPLParser extends antlr.Parser { let _la: number; try { let alternative: number; - this.state = 1006; + this.state = 1055; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 76, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 84, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 983; + this.state = 1032; this.ident(); - this.state = 988; + this.state = 1037; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 74, this.context); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 82, this.context); while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) { if (alternative === 1) { { { - this.state = 984; + this.state = 1033; this.match(OpenSearchPPLParser.MODULE); - this.state = 985; + this.state = 1034; this.ident(); } } } - this.state = 990; + this.state = 1039; this.errorHandler.sync(this); - alternative = this.interpreter.adaptivePredict(this.tokenStream, 74, this.context); + alternative = this.interpreter.adaptivePredict(this.tokenStream, 82, this.context); } - this.state = 992; + this.state = 1041; this.errorHandler.sync(this); _la = this.tokenStream.LA(1); if (_la === 122) { { - this.state = 991; + this.state = 1040; this.match(OpenSearchPPLParser.MODULE); } } @@ -5924,33 +6655,33 @@ export class OpenSearchPPLParser extends antlr.Parser { case 2: this.enterOuterAlt(localContext, 2); { - this.state = 994; + this.state = 1043; this.match(OpenSearchPPLParser.SINGLE_QUOTE); - this.state = 995; + this.state = 1044; this.wildcard(); - this.state = 996; + this.state = 1045; this.match(OpenSearchPPLParser.SINGLE_QUOTE); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 998; + this.state = 1047; this.match(OpenSearchPPLParser.DOUBLE_QUOTE); - this.state = 999; + this.state = 1048; this.wildcard(); - this.state = 1000; + this.state = 1049; this.match(OpenSearchPPLParser.DOUBLE_QUOTE); } break; case 4: this.enterOuterAlt(localContext, 4); { - this.state = 1002; + this.state = 1051; this.match(OpenSearchPPLParser.BACKTICK); - this.state = 1003; + this.state = 1052; this.wildcard(); - this.state = 1004; + this.state = 1053; this.match(OpenSearchPPLParser.BACKTICK); } break; @@ -5973,706 +6704,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 = 1108; + this.state = 1157; this.errorHandler.sync(this); - switch (this.interpreter.adaptivePredict(this.tokenStream, 77, this.context) ) { + switch (this.interpreter.adaptivePredict(this.tokenStream, 85, this.context) ) { case 1: this.enterOuterAlt(localContext, 1); { - this.state = 1008; + this.state = 1057; this.match(OpenSearchPPLParser.D); } break; case 2: this.enterOuterAlt(localContext, 2); { - this.state = 1009; + this.state = 1058; this.timespanUnit(); } break; case 3: this.enterOuterAlt(localContext, 3); { - this.state = 1010; + this.state = 1059; this.match(OpenSearchPPLParser.SPAN); } break; case 4: this.enterOuterAlt(localContext, 4); { - this.state = 1011; + this.state = 1060; this.evalFunctionName(); } break; case 5: this.enterOuterAlt(localContext, 5); { - this.state = 1012; + this.state = 1061; this.relevanceArgName(); } break; case 6: this.enterOuterAlt(localContext, 6); { - this.state = 1013; + this.state = 1062; this.intervalUnit(); } break; case 7: this.enterOuterAlt(localContext, 7); { - this.state = 1014; + this.state = 1063; this.dateTimeFunctionName(); } break; case 8: this.enterOuterAlt(localContext, 8); { - this.state = 1015; + this.state = 1064; this.textFunctionName(); } break; case 9: this.enterOuterAlt(localContext, 9); { - this.state = 1016; + this.state = 1065; this.mathematicalFunctionName(); } break; case 10: this.enterOuterAlt(localContext, 10); { - this.state = 1017; + this.state = 1066; this.positionFunctionName(); } break; case 11: this.enterOuterAlt(localContext, 11); { - this.state = 1018; + this.state = 1067; this.match(OpenSearchPPLParser.SEARCH); } break; case 12: this.enterOuterAlt(localContext, 12); { - this.state = 1019; + this.state = 1068; this.match(OpenSearchPPLParser.DESCRIBE); } break; case 13: this.enterOuterAlt(localContext, 13); { - this.state = 1020; + this.state = 1069; this.match(OpenSearchPPLParser.SHOW); } break; case 14: this.enterOuterAlt(localContext, 14); { - this.state = 1021; + this.state = 1070; this.match(OpenSearchPPLParser.FROM); } break; case 15: this.enterOuterAlt(localContext, 15); { - this.state = 1022; + this.state = 1071; this.match(OpenSearchPPLParser.WHERE); } break; case 16: this.enterOuterAlt(localContext, 16); { - this.state = 1023; + this.state = 1072; this.match(OpenSearchPPLParser.FIELDS); } break; case 17: this.enterOuterAlt(localContext, 17); { - this.state = 1024; + this.state = 1073; this.match(OpenSearchPPLParser.RENAME); } break; case 18: this.enterOuterAlt(localContext, 18); { - this.state = 1025; + this.state = 1074; this.match(OpenSearchPPLParser.STATS); } break; case 19: this.enterOuterAlt(localContext, 19); { - this.state = 1026; + this.state = 1075; this.match(OpenSearchPPLParser.DEDUP); } break; case 20: this.enterOuterAlt(localContext, 20); { - this.state = 1027; + this.state = 1076; this.match(OpenSearchPPLParser.SORT); } break; case 21: this.enterOuterAlt(localContext, 21); { - this.state = 1028; + this.state = 1077; this.match(OpenSearchPPLParser.EVAL); } break; case 22: this.enterOuterAlt(localContext, 22); { - this.state = 1029; + this.state = 1078; this.match(OpenSearchPPLParser.HEAD); } break; case 23: this.enterOuterAlt(localContext, 23); { - this.state = 1030; + this.state = 1079; this.match(OpenSearchPPLParser.TOP); } break; case 24: this.enterOuterAlt(localContext, 24); { - this.state = 1031; + this.state = 1080; this.match(OpenSearchPPLParser.RARE); } break; case 25: this.enterOuterAlt(localContext, 25); { - this.state = 1032; + this.state = 1081; this.match(OpenSearchPPLParser.PARSE); } break; case 26: this.enterOuterAlt(localContext, 26); { - this.state = 1033; + this.state = 1082; this.match(OpenSearchPPLParser.METHOD); } break; case 27: this.enterOuterAlt(localContext, 27); { - this.state = 1034; + this.state = 1083; this.match(OpenSearchPPLParser.REGEX); } break; case 28: this.enterOuterAlt(localContext, 28); { - this.state = 1035; + this.state = 1084; this.match(OpenSearchPPLParser.PUNCT); } break; case 29: this.enterOuterAlt(localContext, 29); { - this.state = 1036; + this.state = 1085; this.match(OpenSearchPPLParser.GROK); } break; case 30: this.enterOuterAlt(localContext, 30); { - this.state = 1037; + this.state = 1086; this.match(OpenSearchPPLParser.PATTERN); } break; case 31: this.enterOuterAlt(localContext, 31); { - this.state = 1038; + this.state = 1087; this.match(OpenSearchPPLParser.PATTERNS); } break; case 32: this.enterOuterAlt(localContext, 32); { - this.state = 1039; + this.state = 1088; this.match(OpenSearchPPLParser.NEW_FIELD); } break; case 33: this.enterOuterAlt(localContext, 33); { - this.state = 1040; + this.state = 1089; this.match(OpenSearchPPLParser.KMEANS); } break; case 34: this.enterOuterAlt(localContext, 34); { - this.state = 1041; + this.state = 1090; this.match(OpenSearchPPLParser.AD); } break; case 35: this.enterOuterAlt(localContext, 35); { - this.state = 1042; + this.state = 1091; this.match(OpenSearchPPLParser.ML); } break; case 36: this.enterOuterAlt(localContext, 36); { - this.state = 1043; + this.state = 1092; this.match(OpenSearchPPLParser.SOURCE); } break; case 37: this.enterOuterAlt(localContext, 37); { - this.state = 1044; + this.state = 1093; this.match(OpenSearchPPLParser.INDEX); } break; case 38: this.enterOuterAlt(localContext, 38); { - this.state = 1045; + this.state = 1094; this.match(OpenSearchPPLParser.DESC); } break; case 39: this.enterOuterAlt(localContext, 39); { - this.state = 1046; + this.state = 1095; this.match(OpenSearchPPLParser.DATASOURCES); } break; case 40: this.enterOuterAlt(localContext, 40); { - this.state = 1047; + this.state = 1096; this.match(OpenSearchPPLParser.SORTBY); } break; case 41: this.enterOuterAlt(localContext, 41); { - this.state = 1048; + this.state = 1097; this.match(OpenSearchPPLParser.STR); } break; case 42: this.enterOuterAlt(localContext, 42); { - this.state = 1049; + this.state = 1098; this.match(OpenSearchPPLParser.IP); } break; case 43: this.enterOuterAlt(localContext, 43); { - this.state = 1050; + this.state = 1099; this.match(OpenSearchPPLParser.NUM); } break; case 44: this.enterOuterAlt(localContext, 44); { - this.state = 1051; + this.state = 1100; this.match(OpenSearchPPLParser.KEEPEMPTY); } break; case 45: this.enterOuterAlt(localContext, 45); { - this.state = 1052; + this.state = 1101; this.match(OpenSearchPPLParser.CONSECUTIVE); } break; case 46: this.enterOuterAlt(localContext, 46); { - this.state = 1053; + this.state = 1102; this.match(OpenSearchPPLParser.DEDUP_SPLITVALUES); } break; case 47: this.enterOuterAlt(localContext, 47); { - this.state = 1054; + this.state = 1103; this.match(OpenSearchPPLParser.PARTITIONS); } break; case 48: this.enterOuterAlt(localContext, 48); { - this.state = 1055; + this.state = 1104; this.match(OpenSearchPPLParser.ALLNUM); } break; case 49: this.enterOuterAlt(localContext, 49); { - this.state = 1056; + this.state = 1105; this.match(OpenSearchPPLParser.DELIM); } break; case 50: this.enterOuterAlt(localContext, 50); { - this.state = 1057; + this.state = 1106; this.match(OpenSearchPPLParser.CENTROIDS); } break; case 51: this.enterOuterAlt(localContext, 51); { - this.state = 1058; + this.state = 1107; this.match(OpenSearchPPLParser.ITERATIONS); } break; case 52: this.enterOuterAlt(localContext, 52); { - this.state = 1059; + this.state = 1108; this.match(OpenSearchPPLParser.DISTANCE_TYPE); } break; case 53: this.enterOuterAlt(localContext, 53); { - this.state = 1060; + this.state = 1109; this.match(OpenSearchPPLParser.NUMBER_OF_TREES); } break; case 54: this.enterOuterAlt(localContext, 54); { - this.state = 1061; + this.state = 1110; this.match(OpenSearchPPLParser.SHINGLE_SIZE); } break; case 55: this.enterOuterAlt(localContext, 55); { - this.state = 1062; + this.state = 1111; this.match(OpenSearchPPLParser.SAMPLE_SIZE); } break; case 56: this.enterOuterAlt(localContext, 56); { - this.state = 1063; + this.state = 1112; this.match(OpenSearchPPLParser.OUTPUT_AFTER); } break; case 57: this.enterOuterAlt(localContext, 57); { - this.state = 1064; + this.state = 1113; this.match(OpenSearchPPLParser.TIME_DECAY); } break; case 58: this.enterOuterAlt(localContext, 58); { - this.state = 1065; + this.state = 1114; this.match(OpenSearchPPLParser.ANOMALY_RATE); } break; case 59: this.enterOuterAlt(localContext, 59); { - this.state = 1066; + this.state = 1115; this.match(OpenSearchPPLParser.CATEGORY_FIELD); } break; case 60: this.enterOuterAlt(localContext, 60); { - this.state = 1067; + this.state = 1116; this.match(OpenSearchPPLParser.TIME_FIELD); } break; case 61: this.enterOuterAlt(localContext, 61); { - this.state = 1068; + this.state = 1117; this.match(OpenSearchPPLParser.TIME_ZONE); } break; case 62: this.enterOuterAlt(localContext, 62); { - this.state = 1069; + this.state = 1118; this.match(OpenSearchPPLParser.TRAINING_DATA_SIZE); } break; case 63: this.enterOuterAlt(localContext, 63); { - this.state = 1070; + this.state = 1119; this.match(OpenSearchPPLParser.ANOMALY_SCORE_THRESHOLD); } break; case 64: this.enterOuterAlt(localContext, 64); { - this.state = 1071; + this.state = 1120; this.match(OpenSearchPPLParser.AVG); } break; case 65: this.enterOuterAlt(localContext, 65); { - this.state = 1072; + this.state = 1121; this.match(OpenSearchPPLParser.COUNT); } break; case 66: this.enterOuterAlt(localContext, 66); { - this.state = 1073; + this.state = 1122; this.match(OpenSearchPPLParser.DISTINCT_COUNT); } break; case 67: this.enterOuterAlt(localContext, 67); { - this.state = 1074; + this.state = 1123; this.match(OpenSearchPPLParser.ESTDC); } break; case 68: this.enterOuterAlt(localContext, 68); { - this.state = 1075; + this.state = 1124; this.match(OpenSearchPPLParser.ESTDC_ERROR); } break; case 69: this.enterOuterAlt(localContext, 69); { - this.state = 1076; + this.state = 1125; this.match(OpenSearchPPLParser.MAX); } break; case 70: this.enterOuterAlt(localContext, 70); { - this.state = 1077; + this.state = 1126; this.match(OpenSearchPPLParser.MEAN); } break; case 71: this.enterOuterAlt(localContext, 71); { - this.state = 1078; + this.state = 1127; this.match(OpenSearchPPLParser.MEDIAN); } break; case 72: this.enterOuterAlt(localContext, 72); { - this.state = 1079; + this.state = 1128; this.match(OpenSearchPPLParser.MIN); } break; case 73: this.enterOuterAlt(localContext, 73); { - this.state = 1080; + this.state = 1129; this.match(OpenSearchPPLParser.MODE); } break; case 74: this.enterOuterAlt(localContext, 74); { - this.state = 1081; + this.state = 1130; this.match(OpenSearchPPLParser.RANGE); } break; case 75: this.enterOuterAlt(localContext, 75); { - this.state = 1082; + this.state = 1131; this.match(OpenSearchPPLParser.STDEV); } break; case 76: this.enterOuterAlt(localContext, 76); { - this.state = 1083; + this.state = 1132; this.match(OpenSearchPPLParser.STDEVP); } break; case 77: this.enterOuterAlt(localContext, 77); { - this.state = 1084; + this.state = 1133; this.match(OpenSearchPPLParser.SUM); } break; case 78: this.enterOuterAlt(localContext, 78); { - this.state = 1085; + this.state = 1134; this.match(OpenSearchPPLParser.SUMSQ); } break; case 79: this.enterOuterAlt(localContext, 79); { - this.state = 1086; + this.state = 1135; this.match(OpenSearchPPLParser.VAR_SAMP); } break; case 80: this.enterOuterAlt(localContext, 80); { - this.state = 1087; + this.state = 1136; this.match(OpenSearchPPLParser.VAR_POP); } break; case 81: this.enterOuterAlt(localContext, 81); { - this.state = 1088; + this.state = 1137; this.match(OpenSearchPPLParser.STDDEV_SAMP); } break; case 82: this.enterOuterAlt(localContext, 82); { - this.state = 1089; + this.state = 1138; this.match(OpenSearchPPLParser.STDDEV_POP); } break; case 83: this.enterOuterAlt(localContext, 83); { - this.state = 1090; + this.state = 1139; this.match(OpenSearchPPLParser.PERCENTILE); } break; case 84: this.enterOuterAlt(localContext, 84); { - this.state = 1091; + this.state = 1140; this.match(OpenSearchPPLParser.TAKE); } break; case 85: this.enterOuterAlt(localContext, 85); { - this.state = 1092; + this.state = 1141; this.match(OpenSearchPPLParser.FIRST); } break; case 86: this.enterOuterAlt(localContext, 86); { - this.state = 1093; + this.state = 1142; this.match(OpenSearchPPLParser.LAST); } break; case 87: this.enterOuterAlt(localContext, 87); { - this.state = 1094; + this.state = 1143; this.match(OpenSearchPPLParser.LIST); } break; case 88: this.enterOuterAlt(localContext, 88); { - this.state = 1095; + this.state = 1144; this.match(OpenSearchPPLParser.VALUES); } break; case 89: this.enterOuterAlt(localContext, 89); { - this.state = 1096; + this.state = 1145; this.match(OpenSearchPPLParser.EARLIEST); } break; case 90: this.enterOuterAlt(localContext, 90); { - this.state = 1097; + this.state = 1146; this.match(OpenSearchPPLParser.EARLIEST_TIME); } break; case 91: this.enterOuterAlt(localContext, 91); { - this.state = 1098; + this.state = 1147; this.match(OpenSearchPPLParser.LATEST); } break; case 92: this.enterOuterAlt(localContext, 92); { - this.state = 1099; + this.state = 1148; this.match(OpenSearchPPLParser.LATEST_TIME); } break; case 93: this.enterOuterAlt(localContext, 93); { - this.state = 1100; + this.state = 1149; this.match(OpenSearchPPLParser.PER_DAY); } break; case 94: this.enterOuterAlt(localContext, 94); { - this.state = 1101; + this.state = 1150; this.match(OpenSearchPPLParser.PER_HOUR); } break; case 95: this.enterOuterAlt(localContext, 95); { - this.state = 1102; + this.state = 1151; this.match(OpenSearchPPLParser.PER_MINUTE); } break; case 96: this.enterOuterAlt(localContext, 96); { - this.state = 1103; + this.state = 1152; this.match(OpenSearchPPLParser.PER_SECOND); } break; case 97: this.enterOuterAlt(localContext, 97); { - this.state = 1104; + this.state = 1153; this.match(OpenSearchPPLParser.RATE); } break; case 98: this.enterOuterAlt(localContext, 98); { - this.state = 1105; + this.state = 1154; this.match(OpenSearchPPLParser.SPARKLINE); } break; case 99: this.enterOuterAlt(localContext, 99); { - this.state = 1106; + this.state = 1155; this.match(OpenSearchPPLParser.C); } break; case 100: this.enterOuterAlt(localContext, 100); { - this.state = 1107; + this.state = 1156; this.match(OpenSearchPPLParser.DC); } break; @@ -6696,6 +7427,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; } @@ -6710,9 +7443,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,1111,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,1160,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, @@ -6733,71 +7475,75 @@ export class OpenSearchPPLParser extends antlr.Parser { 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, + 3,6,274,8,6,1,6,1,6,1,6,1,6,3,6,280,8,6,1,6,1,6,1,6,3,6,285,8,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,298,8,10,1,10, + 1,10,1,11,1,11,1,11,1,11,5,11,306,8,11,10,11,12,11,309,9,11,1,12, + 1,12,1,12,1,12,3,12,315,8,12,1,12,1,12,1,12,3,12,320,8,12,1,12,1, + 12,1,12,3,12,325,8,12,1,12,1,12,1,12,5,12,330,8,12,10,12,12,12,333, + 9,12,1,12,3,12,336,8,12,1,12,1,12,1,12,3,12,341,8,12,1,13,1,13,3, + 13,345,8,13,1,13,1,13,1,13,1,13,3,13,351,8,13,1,13,1,13,1,13,3,13, + 356,8,13,1,14,1,14,1,14,1,15,1,15,1,15,1,15,5,15,365,8,15,10,15, + 12,15,368,9,15,1,16,1,16,3,16,372,8,16,1,16,1,16,3,16,376,8,16,1, + 17,1,17,3,17,380,8,17,1,17,1,17,3,17,384,8,17,1,18,1,18,1,18,3,18, + 389,8,18,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,21,1,21,5,21, + 401,8,21,10,21,12,21,404,9,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22, + 1,22,3,22,414,8,22,1,23,1,23,1,24,1,24,5,24,420,8,24,10,24,12,24, + 423,9,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,3,25,434,8, + 25,1,26,1,26,5,26,438,8,26,10,26,12,26,441,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,109,1,109,1,109,5,109,962, - 8,109,10,109,12,109,965,9,109,1,110,3,110,968,8,110,1,110,1,110, - 1,110,1,110,1,110,1,110,1,110,3,110,977,8,110,1,111,3,111,980,8, - 111,1,111,1,111,1,112,1,112,1,112,5,112,987,8,112,10,112,12,112, - 990,9,112,1,112,3,112,993,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,1007,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, + 27,1,27,1,27,1,27,1,27,1,27,1,27,3,27,479,8,27,1,28,1,28,5,28,483, + 8,28,10,28,12,28,486,9,28,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,3,30,504,8,30,1,31,1,31, + 1,31,5,31,509,8,31,10,31,12,31,512,9,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,530, + 8,34,1,35,1,35,1,35,3,35,535,8,35,1,36,1,36,1,36,1,36,1,36,1,36, + 3,36,543,8,36,1,36,1,36,1,37,1,37,1,37,5,37,550,8,37,10,37,12,37, + 553,9,37,1,38,1,38,1,38,1,38,1,39,1,39,1,39,3,39,562,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,579,8,40,1,41,1,41,1,42,1,42,1,42,1,42,1,42,3,42,588,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,603,8,44,1,45,1,45,1,45,1,45,1,45,1,45,3,45,611,8,45,1,45,1, + 45,1,45,1,45,1,45,3,45,618,8,45,1,45,1,45,1,45,1,45,5,45,624,8,45, + 10,45,12,45,627,9,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,3,46, + 637,8,46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,3,47, + 649,8,47,1,47,1,47,1,47,1,47,1,47,1,47,5,47,657,8,47,10,47,12,47, + 660,9,47,1,48,1,48,1,48,1,48,3,48,666,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,679,8,51,1,52,1,52,1,52,1, + 52,1,52,1,52,1,52,5,52,688,8,52,10,52,12,52,691,9,52,1,52,1,52,1, + 53,1,53,1,53,1,53,1,53,1,53,5,53,701,8,53,10,53,12,53,704,9,53,1, + 53,1,53,1,53,1,53,1,53,5,53,711,8,53,10,53,12,53,714,9,53,1,53,1, + 53,1,54,1,54,3,54,720,8,54,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1, + 56,5,56,730,8,56,10,56,12,56,733,9,56,1,57,1,57,1,57,5,57,738,8, + 57,10,57,12,57,741,9,57,1,58,3,58,744,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,769,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,802,8,65,1,66,1,66,1,66,1,66,1,66,1,66,3,66,810,8,66,1,67, + 1,67,1,67,5,67,815,8,67,10,67,12,67,818,9,67,3,67,820,8,67,1,68, + 1,68,1,68,3,68,825,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,843,8,71,1,72,1,72, + 3,72,847,8,72,1,73,1,73,3,73,851,8,73,1,74,1,74,1,75,1,75,3,75,857, + 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,882, + 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,910,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,943,8,94,1,95, + 1,95,1,95,1,95,1,96,1,96,1,97,3,97,952,8,97,1,97,1,97,1,98,3,98, + 957,8,98,1,98,1,98,1,99,1,99,1,100,1,100,1,100,3,100,966,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,985,8,106,10,106,12,106, + 988,9,106,1,106,1,106,1,107,1,107,1,107,5,107,995,8,107,10,107,12, + 107,998,9,107,1,108,1,108,1,108,5,108,1003,8,108,10,108,12,108,1006, + 9,108,1,109,1,109,1,109,5,109,1011,8,109,10,109,12,109,1014,9,109, + 1,110,3,110,1017,8,110,1,110,1,110,1,110,1,110,1,110,1,110,1,110, + 3,110,1026,8,110,1,111,3,111,1029,8,111,1,111,1,111,1,112,1,112, + 1,112,5,112,1036,8,112,10,112,12,112,1039,9,112,1,112,3,112,1042, + 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,1056,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, @@ -6806,360 +7552,378 @@ 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, - 3,113,1109,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,1258,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, - 958,1,0,0,0,220,976,1,0,0,0,222,979,1,0,0,0,224,1006,1,0,0,0,226, - 1108,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,957,5,328,0,0, - 957,217,1,0,0,0,958,963,3,224,112,0,959,960,5,111,0,0,960,962,3, - 224,112,0,961,959,1,0,0,0,962,965,1,0,0,0,963,961,1,0,0,0,963,964, - 1,0,0,0,964,219,1,0,0,0,965,963,1,0,0,0,966,968,5,111,0,0,967,966, - 1,0,0,0,967,968,1,0,0,0,968,969,1,0,0,0,969,977,5,328,0,0,970,971, - 5,131,0,0,971,972,3,220,110,0,972,973,5,131,0,0,973,977,1,0,0,0, - 974,977,5,335,0,0,975,977,3,226,113,0,976,967,1,0,0,0,976,970,1, - 0,0,0,976,974,1,0,0,0,976,975,1,0,0,0,977,221,1,0,0,0,978,980,5, - 329,0,0,979,978,1,0,0,0,979,980,1,0,0,0,980,981,1,0,0,0,981,982, - 3,220,110,0,982,223,1,0,0,0,983,988,3,220,110,0,984,985,5,122,0, - 0,985,987,3,220,110,0,986,984,1,0,0,0,987,990,1,0,0,0,988,986,1, - 0,0,0,988,989,1,0,0,0,989,992,1,0,0,0,990,988,1,0,0,0,991,993,5, - 122,0,0,992,991,1,0,0,0,992,993,1,0,0,0,993,1007,1,0,0,0,994,995, - 5,129,0,0,995,996,3,224,112,0,996,997,5,129,0,0,997,1007,1,0,0,0, - 998,999,5,130,0,0,999,1000,3,224,112,0,1000,1001,5,130,0,0,1001, - 1007,1,0,0,0,1002,1003,5,131,0,0,1003,1004,3,224,112,0,1004,1005, - 5,131,0,0,1005,1007,1,0,0,0,1006,983,1,0,0,0,1006,994,1,0,0,0,1006, - 998,1,0,0,0,1006,1002,1,0,0,0,1007,225,1,0,0,0,1008,1109,5,31,0, - 0,1009,1109,3,210,105,0,1010,1109,5,320,0,0,1011,1109,3,132,66,0, - 1012,1109,3,140,70,0,1013,1109,3,208,104,0,1014,1109,3,156,78,0, - 1015,1109,3,178,89,0,1016,1109,3,152,76,0,1017,1109,3,180,90,0,1018, - 1109,5,2,0,0,1019,1109,5,3,0,0,1020,1109,5,4,0,0,1021,1109,5,5,0, - 0,1022,1109,5,6,0,0,1023,1109,5,7,0,0,1024,1109,5,8,0,0,1025,1109, - 5,9,0,0,1026,1109,5,10,0,0,1027,1109,5,11,0,0,1028,1109,5,12,0,0, - 1029,1109,5,13,0,0,1030,1109,5,14,0,0,1031,1109,5,15,0,0,1032,1109, - 5,16,0,0,1033,1109,5,17,0,0,1034,1109,5,18,0,0,1035,1109,5,19,0, - 0,1036,1109,5,20,0,0,1037,1109,5,21,0,0,1038,1109,5,22,0,0,1039, - 1109,5,23,0,0,1040,1109,5,24,0,0,1041,1109,5,25,0,0,1042,1109,5, - 26,0,0,1043,1109,5,29,0,0,1044,1109,5,30,0,0,1045,1109,5,32,0,0, - 1046,1109,5,33,0,0,1047,1109,5,34,0,0,1048,1109,5,36,0,0,1049,1109, - 5,37,0,0,1050,1109,5,38,0,0,1051,1109,5,39,0,0,1052,1109,5,40,0, - 0,1053,1109,5,41,0,0,1054,1109,5,42,0,0,1055,1109,5,43,0,0,1056, - 1109,5,44,0,0,1057,1109,5,45,0,0,1058,1109,5,46,0,0,1059,1109,5, - 47,0,0,1060,1109,5,48,0,0,1061,1109,5,49,0,0,1062,1109,5,50,0,0, - 1063,1109,5,51,0,0,1064,1109,5,52,0,0,1065,1109,5,53,0,0,1066,1109, - 5,54,0,0,1067,1109,5,55,0,0,1068,1109,5,56,0,0,1069,1109,5,57,0, - 0,1070,1109,5,58,0,0,1071,1109,5,135,0,0,1072,1109,5,136,0,0,1073, - 1109,5,137,0,0,1074,1109,5,138,0,0,1075,1109,5,139,0,0,1076,1109, - 5,140,0,0,1077,1109,5,141,0,0,1078,1109,5,142,0,0,1079,1109,5,143, - 0,0,1080,1109,5,144,0,0,1081,1109,5,145,0,0,1082,1109,5,146,0,0, - 1083,1109,5,147,0,0,1084,1109,5,148,0,0,1085,1109,5,149,0,0,1086, - 1109,5,150,0,0,1087,1109,5,151,0,0,1088,1109,5,152,0,0,1089,1109, - 5,153,0,0,1090,1109,5,154,0,0,1091,1109,5,155,0,0,1092,1109,5,156, - 0,0,1093,1109,5,157,0,0,1094,1109,5,158,0,0,1095,1109,5,159,0,0, - 1096,1109,5,160,0,0,1097,1109,5,161,0,0,1098,1109,5,162,0,0,1099, - 1109,5,163,0,0,1100,1109,5,164,0,0,1101,1109,5,165,0,0,1102,1109, - 5,166,0,0,1103,1109,5,167,0,0,1104,1109,5,168,0,0,1105,1109,5,169, - 0,0,1106,1109,5,170,0,0,1107,1109,5,171,0,0,1108,1008,1,0,0,0,1108, - 1009,1,0,0,0,1108,1010,1,0,0,0,1108,1011,1,0,0,0,1108,1012,1,0,0, - 0,1108,1013,1,0,0,0,1108,1014,1,0,0,0,1108,1015,1,0,0,0,1108,1016, - 1,0,0,0,1108,1017,1,0,0,0,1108,1018,1,0,0,0,1108,1019,1,0,0,0,1108, - 1020,1,0,0,0,1108,1021,1,0,0,0,1108,1022,1,0,0,0,1108,1023,1,0,0, - 0,1108,1024,1,0,0,0,1108,1025,1,0,0,0,1108,1026,1,0,0,0,1108,1027, - 1,0,0,0,1108,1028,1,0,0,0,1108,1029,1,0,0,0,1108,1030,1,0,0,0,1108, - 1031,1,0,0,0,1108,1032,1,0,0,0,1108,1033,1,0,0,0,1108,1034,1,0,0, - 0,1108,1035,1,0,0,0,1108,1036,1,0,0,0,1108,1037,1,0,0,0,1108,1038, - 1,0,0,0,1108,1039,1,0,0,0,1108,1040,1,0,0,0,1108,1041,1,0,0,0,1108, - 1042,1,0,0,0,1108,1043,1,0,0,0,1108,1044,1,0,0,0,1108,1045,1,0,0, - 0,1108,1046,1,0,0,0,1108,1047,1,0,0,0,1108,1048,1,0,0,0,1108,1049, - 1,0,0,0,1108,1050,1,0,0,0,1108,1051,1,0,0,0,1108,1052,1,0,0,0,1108, - 1053,1,0,0,0,1108,1054,1,0,0,0,1108,1055,1,0,0,0,1108,1056,1,0,0, - 0,1108,1057,1,0,0,0,1108,1058,1,0,0,0,1108,1059,1,0,0,0,1108,1060, - 1,0,0,0,1108,1061,1,0,0,0,1108,1062,1,0,0,0,1108,1063,1,0,0,0,1108, - 1064,1,0,0,0,1108,1065,1,0,0,0,1108,1066,1,0,0,0,1108,1067,1,0,0, - 0,1108,1068,1,0,0,0,1108,1069,1,0,0,0,1108,1070,1,0,0,0,1108,1071, - 1,0,0,0,1108,1072,1,0,0,0,1108,1073,1,0,0,0,1108,1074,1,0,0,0,1108, - 1075,1,0,0,0,1108,1076,1,0,0,0,1108,1077,1,0,0,0,1108,1078,1,0,0, - 0,1108,1079,1,0,0,0,1108,1080,1,0,0,0,1108,1081,1,0,0,0,1108,1082, - 1,0,0,0,1108,1083,1,0,0,0,1108,1084,1,0,0,0,1108,1085,1,0,0,0,1108, - 1086,1,0,0,0,1108,1087,1,0,0,0,1108,1088,1,0,0,0,1108,1089,1,0,0, - 0,1108,1090,1,0,0,0,1108,1091,1,0,0,0,1108,1092,1,0,0,0,1108,1093, - 1,0,0,0,1108,1094,1,0,0,0,1108,1095,1,0,0,0,1108,1096,1,0,0,0,1108, - 1097,1,0,0,0,1108,1098,1,0,0,0,1108,1099,1,0,0,0,1108,1100,1,0,0, - 0,1108,1101,1,0,0,0,1108,1102,1,0,0,0,1108,1103,1,0,0,0,1108,1104, - 1,0,0,0,1108,1105,1,0,0,0,1108,1106,1,0,0,0,1108,1107,1,0,0,0,1109, - 227,1,0,0,0,78,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,963,967,976,979,988,992,1006, - 1108 + 1,113,1,113,1,113,1,113,1,113,1,113,3,113,1158,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,1318,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,284,1,0,0,0, + 14,286,1,0,0,0,16,289,1,0,0,0,18,292,1,0,0,0,20,295,1,0,0,0,22,301, + 1,0,0,0,24,310,1,0,0,0,26,342,1,0,0,0,28,357,1,0,0,0,30,360,1,0, + 0,0,32,369,1,0,0,0,34,377,1,0,0,0,36,385,1,0,0,0,38,390,1,0,0,0, + 40,394,1,0,0,0,42,398,1,0,0,0,44,413,1,0,0,0,46,415,1,0,0,0,48,417, + 1,0,0,0,50,433,1,0,0,0,52,435,1,0,0,0,54,478,1,0,0,0,56,480,1,0, + 0,0,58,487,1,0,0,0,60,503,1,0,0,0,62,505,1,0,0,0,64,513,1,0,0,0, + 66,517,1,0,0,0,68,529,1,0,0,0,70,531,1,0,0,0,72,536,1,0,0,0,74,546, + 1,0,0,0,76,554,1,0,0,0,78,558,1,0,0,0,80,578,1,0,0,0,82,580,1,0, + 0,0,84,582,1,0,0,0,86,591,1,0,0,0,88,602,1,0,0,0,90,610,1,0,0,0, + 92,636,1,0,0,0,94,648,1,0,0,0,96,665,1,0,0,0,98,667,1,0,0,0,100, + 674,1,0,0,0,102,678,1,0,0,0,104,680,1,0,0,0,106,694,1,0,0,0,108, + 719,1,0,0,0,110,721,1,0,0,0,112,726,1,0,0,0,114,734,1,0,0,0,116, + 743,1,0,0,0,118,768,1,0,0,0,120,770,1,0,0,0,122,772,1,0,0,0,124, + 774,1,0,0,0,126,779,1,0,0,0,128,786,1,0,0,0,130,801,1,0,0,0,132, + 809,1,0,0,0,134,819,1,0,0,0,136,824,1,0,0,0,138,828,1,0,0,0,140, + 832,1,0,0,0,142,842,1,0,0,0,144,846,1,0,0,0,146,850,1,0,0,0,148, + 852,1,0,0,0,150,856,1,0,0,0,152,881,1,0,0,0,154,883,1,0,0,0,156, + 885,1,0,0,0,158,887,1,0,0,0,160,894,1,0,0,0,162,896,1,0,0,0,164, + 903,1,0,0,0,166,905,1,0,0,0,168,909,1,0,0,0,170,911,1,0,0,0,172, + 920,1,0,0,0,174,922,1,0,0,0,176,924,1,0,0,0,178,926,1,0,0,0,180, + 928,1,0,0,0,182,930,1,0,0,0,184,932,1,0,0,0,186,934,1,0,0,0,188, + 942,1,0,0,0,190,944,1,0,0,0,192,948,1,0,0,0,194,951,1,0,0,0,196, + 956,1,0,0,0,198,960,1,0,0,0,200,965,1,0,0,0,202,967,1,0,0,0,204, + 970,1,0,0,0,206,973,1,0,0,0,208,976,1,0,0,0,210,978,1,0,0,0,212, + 980,1,0,0,0,214,991,1,0,0,0,216,999,1,0,0,0,218,1007,1,0,0,0,220, + 1025,1,0,0,0,222,1028,1,0,0,0,224,1055,1,0,0,0,226,1157,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,285,3,60,30,0,272,274,5,2,0,0,273,272,1,0,0,0,273,274,1,0,0, + 0,274,275,1,0,0,0,275,276,3,60,30,0,276,277,3,90,45,0,277,285,1, + 0,0,0,278,280,5,2,0,0,279,278,1,0,0,0,279,280,1,0,0,0,280,281,1, + 0,0,0,281,282,3,90,45,0,282,283,3,60,30,0,283,285,1,0,0,0,284,269, + 1,0,0,0,284,273,1,0,0,0,284,279,1,0,0,0,285,13,1,0,0,0,286,287,5, + 3,0,0,287,288,3,62,31,0,288,15,1,0,0,0,289,290,5,4,0,0,290,291,5, + 33,0,0,291,17,1,0,0,0,292,293,5,6,0,0,293,294,3,90,45,0,294,19,1, + 0,0,0,295,297,5,7,0,0,296,298,7,0,0,0,297,296,1,0,0,0,297,298,1, + 0,0,0,298,299,1,0,0,0,299,300,3,112,56,0,300,21,1,0,0,0,301,302, + 5,8,0,0,302,307,3,64,32,0,303,304,5,110,0,0,304,306,3,64,32,0,305, + 303,1,0,0,0,306,309,1,0,0,0,307,305,1,0,0,0,307,308,1,0,0,0,308, + 23,1,0,0,0,309,307,1,0,0,0,310,314,5,9,0,0,311,312,5,42,0,0,312, + 313,5,112,0,0,313,315,3,194,97,0,314,311,1,0,0,0,314,315,1,0,0,0, + 315,319,1,0,0,0,316,317,5,43,0,0,317,318,5,112,0,0,318,320,3,198, + 99,0,319,316,1,0,0,0,319,320,1,0,0,0,320,324,1,0,0,0,321,322,5,44, + 0,0,322,323,5,112,0,0,323,325,3,192,96,0,324,321,1,0,0,0,324,325, + 1,0,0,0,325,326,1,0,0,0,326,331,3,78,39,0,327,328,5,110,0,0,328, + 330,3,78,39,0,329,327,1,0,0,0,330,333,1,0,0,0,331,329,1,0,0,0,331, + 332,1,0,0,0,332,335,1,0,0,0,333,331,1,0,0,0,334,336,3,68,34,0,335, + 334,1,0,0,0,335,336,1,0,0,0,336,340,1,0,0,0,337,338,5,41,0,0,338, + 339,5,112,0,0,339,341,3,198,99,0,340,337,1,0,0,0,340,341,1,0,0,0, + 341,25,1,0,0,0,342,344,5,10,0,0,343,345,3,194,97,0,344,343,1,0,0, + 0,344,345,1,0,0,0,345,346,1,0,0,0,346,350,3,112,56,0,347,348,5,39, + 0,0,348,349,5,112,0,0,349,351,3,198,99,0,350,347,1,0,0,0,350,351, + 1,0,0,0,351,355,1,0,0,0,352,353,5,40,0,0,353,354,5,112,0,0,354,356, + 3,198,99,0,355,352,1,0,0,0,355,356,1,0,0,0,356,27,1,0,0,0,357,358, + 5,11,0,0,358,359,3,74,37,0,359,29,1,0,0,0,360,361,5,12,0,0,361,366, + 3,76,38,0,362,363,5,110,0,0,363,365,3,76,38,0,364,362,1,0,0,0,365, + 368,1,0,0,0,366,364,1,0,0,0,366,367,1,0,0,0,367,31,1,0,0,0,368,366, + 1,0,0,0,369,371,5,13,0,0,370,372,3,194,97,0,371,370,1,0,0,0,371, + 372,1,0,0,0,372,375,1,0,0,0,373,374,5,5,0,0,374,376,3,194,97,0,375, + 373,1,0,0,0,375,376,1,0,0,0,376,33,1,0,0,0,377,379,5,14,0,0,378, + 380,3,194,97,0,379,378,1,0,0,0,379,380,1,0,0,0,380,381,1,0,0,0,381, + 383,3,112,56,0,382,384,3,66,33,0,383,382,1,0,0,0,383,384,1,0,0,0, + 384,35,1,0,0,0,385,386,5,15,0,0,386,388,3,112,56,0,387,389,3,66, + 33,0,388,387,1,0,0,0,388,389,1,0,0,0,389,37,1,0,0,0,390,391,5,20, + 0,0,391,392,3,88,44,0,392,393,3,192,96,0,393,39,1,0,0,0,394,395, + 5,16,0,0,395,396,3,88,44,0,396,397,3,192,96,0,397,41,1,0,0,0,398, + 402,5,22,0,0,399,401,3,44,22,0,400,399,1,0,0,0,401,404,1,0,0,0,402, + 400,1,0,0,0,402,403,1,0,0,0,403,405,1,0,0,0,404,402,1,0,0,0,405, + 406,3,88,44,0,406,43,1,0,0,0,407,408,5,23,0,0,408,409,5,112,0,0, + 409,414,3,192,96,0,410,411,5,21,0,0,411,412,5,112,0,0,412,414,3, + 192,96,0,413,407,1,0,0,0,413,410,1,0,0,0,414,45,1,0,0,0,415,416, + 7,1,0,0,416,47,1,0,0,0,417,421,5,24,0,0,418,420,3,50,25,0,419,418, + 1,0,0,0,420,423,1,0,0,0,421,419,1,0,0,0,421,422,1,0,0,0,422,49,1, + 0,0,0,423,421,1,0,0,0,424,425,5,45,0,0,425,426,5,112,0,0,426,434, + 3,194,97,0,427,428,5,46,0,0,428,429,5,112,0,0,429,434,3,194,97,0, + 430,431,5,47,0,0,431,432,5,112,0,0,432,434,3,192,96,0,433,424,1, + 0,0,0,433,427,1,0,0,0,433,430,1,0,0,0,434,51,1,0,0,0,435,439,5,25, + 0,0,436,438,3,54,27,0,437,436,1,0,0,0,438,441,1,0,0,0,439,437,1, + 0,0,0,439,440,1,0,0,0,440,53,1,0,0,0,441,439,1,0,0,0,442,443,5,48, + 0,0,443,444,5,112,0,0,444,479,3,194,97,0,445,446,5,49,0,0,446,447, + 5,112,0,0,447,479,3,194,97,0,448,449,5,50,0,0,449,450,5,112,0,0, + 450,479,3,194,97,0,451,452,5,51,0,0,452,453,5,112,0,0,453,479,3, + 194,97,0,454,455,5,52,0,0,455,456,5,112,0,0,456,479,3,196,98,0,457, + 458,5,53,0,0,458,459,5,112,0,0,459,479,3,196,98,0,460,461,5,54,0, + 0,461,462,5,112,0,0,462,479,3,192,96,0,463,464,5,55,0,0,464,465, + 5,112,0,0,465,479,3,192,96,0,466,467,5,215,0,0,467,468,5,112,0,0, + 468,479,3,192,96,0,469,470,5,56,0,0,470,471,5,112,0,0,471,479,3, + 192,96,0,472,473,5,57,0,0,473,474,5,112,0,0,474,479,3,194,97,0,475, + 476,5,58,0,0,476,477,5,112,0,0,477,479,3,196,98,0,478,442,1,0,0, + 0,478,445,1,0,0,0,478,448,1,0,0,0,478,451,1,0,0,0,478,454,1,0,0, + 0,478,457,1,0,0,0,478,460,1,0,0,0,478,463,1,0,0,0,478,466,1,0,0, + 0,478,469,1,0,0,0,478,472,1,0,0,0,478,475,1,0,0,0,479,55,1,0,0,0, + 480,484,5,26,0,0,481,483,3,58,29,0,482,481,1,0,0,0,483,486,1,0,0, + 0,484,482,1,0,0,0,484,485,1,0,0,0,485,57,1,0,0,0,486,484,1,0,0,0, + 487,488,3,220,110,0,488,489,5,112,0,0,489,490,3,188,94,0,490,59, + 1,0,0,0,491,492,5,29,0,0,492,493,5,112,0,0,493,504,3,62,31,0,494, + 495,5,30,0,0,495,496,5,112,0,0,496,504,3,62,31,0,497,498,5,29,0, + 0,498,499,5,112,0,0,499,504,3,110,55,0,500,501,5,30,0,0,501,502, + 5,112,0,0,502,504,3,110,55,0,503,491,1,0,0,0,503,494,1,0,0,0,503, + 497,1,0,0,0,503,500,1,0,0,0,504,61,1,0,0,0,505,510,3,108,54,0,506, + 507,5,110,0,0,507,509,3,108,54,0,508,506,1,0,0,0,509,512,1,0,0,0, + 510,508,1,0,0,0,510,511,1,0,0,0,511,63,1,0,0,0,512,510,1,0,0,0,513, + 514,3,122,61,0,514,515,5,27,0,0,515,516,3,122,61,0,516,65,1,0,0, + 0,517,518,5,28,0,0,518,519,3,112,56,0,519,67,1,0,0,0,520,521,5,28, + 0,0,521,530,3,112,56,0,522,523,5,28,0,0,523,530,3,70,35,0,524,525, + 5,28,0,0,525,526,3,70,35,0,526,527,5,110,0,0,527,528,3,112,56,0, + 528,530,1,0,0,0,529,520,1,0,0,0,529,522,1,0,0,0,529,524,1,0,0,0, + 530,69,1,0,0,0,531,534,3,72,36,0,532,533,5,27,0,0,533,535,3,214, + 107,0,534,532,1,0,0,0,534,535,1,0,0,0,535,71,1,0,0,0,536,537,5,320, + 0,0,537,538,5,125,0,0,538,539,3,120,60,0,539,540,5,110,0,0,540,542, + 3,188,94,0,541,543,3,210,105,0,542,541,1,0,0,0,542,543,1,0,0,0,543, + 544,1,0,0,0,544,545,5,126,0,0,545,73,1,0,0,0,546,551,3,116,58,0, + 547,548,5,110,0,0,548,550,3,116,58,0,549,547,1,0,0,0,550,553,1,0, + 0,0,551,549,1,0,0,0,551,552,1,0,0,0,552,75,1,0,0,0,553,551,1,0,0, + 0,554,555,3,120,60,0,555,556,5,112,0,0,556,557,3,88,44,0,557,77, + 1,0,0,0,558,561,3,80,40,0,559,560,5,27,0,0,560,562,3,122,61,0,561, + 559,1,0,0,0,561,562,1,0,0,0,562,79,1,0,0,0,563,564,3,82,41,0,564, + 565,5,125,0,0,565,566,3,94,47,0,566,567,5,126,0,0,567,579,1,0,0, + 0,568,569,5,136,0,0,569,570,5,125,0,0,570,579,5,126,0,0,571,572, + 7,2,0,0,572,573,5,125,0,0,573,574,3,94,47,0,574,575,5,126,0,0,575, + 579,1,0,0,0,576,579,3,86,43,0,577,579,3,84,42,0,578,563,1,0,0,0, + 578,568,1,0,0,0,578,571,1,0,0,0,578,576,1,0,0,0,578,577,1,0,0,0, + 579,81,1,0,0,0,580,581,7,3,0,0,581,83,1,0,0,0,582,583,5,155,0,0, + 583,584,5,125,0,0,584,587,3,120,60,0,585,586,5,110,0,0,586,588,3, + 194,97,0,587,585,1,0,0,0,587,588,1,0,0,0,588,589,1,0,0,0,589,590, + 5,126,0,0,590,85,1,0,0,0,591,592,5,154,0,0,592,593,5,114,0,0,593, + 594,3,194,97,0,594,595,5,113,0,0,595,596,5,125,0,0,596,597,3,120, + 60,0,597,598,5,126,0,0,598,87,1,0,0,0,599,603,3,90,45,0,600,603, + 3,92,46,0,601,603,3,94,47,0,602,599,1,0,0,0,602,600,1,0,0,0,602, + 601,1,0,0,0,603,89,1,0,0,0,604,605,6,45,-1,0,605,611,3,92,46,0,606, + 607,5,61,0,0,607,611,3,90,45,6,608,611,3,100,50,0,609,611,3,102, + 51,0,610,604,1,0,0,0,610,606,1,0,0,0,610,608,1,0,0,0,610,609,1,0, + 0,0,611,625,1,0,0,0,612,613,10,5,0,0,613,614,5,62,0,0,614,624,3, + 90,45,6,615,617,10,4,0,0,616,618,5,63,0,0,617,616,1,0,0,0,617,618, + 1,0,0,0,618,619,1,0,0,0,619,624,3,90,45,5,620,621,10,3,0,0,621,622, + 5,64,0,0,622,624,3,90,45,4,623,612,1,0,0,0,623,615,1,0,0,0,623,620, + 1,0,0,0,624,627,1,0,0,0,625,623,1,0,0,0,625,626,1,0,0,0,626,91,1, + 0,0,0,627,625,1,0,0,0,628,629,3,94,47,0,629,630,3,182,91,0,630,631, + 3,94,47,0,631,637,1,0,0,0,632,633,3,94,47,0,633,634,5,60,0,0,634, + 635,3,212,106,0,635,637,1,0,0,0,636,628,1,0,0,0,636,632,1,0,0,0, + 637,93,1,0,0,0,638,639,6,47,-1,0,639,649,3,96,48,0,640,649,3,98, + 49,0,641,649,3,162,81,0,642,649,3,158,79,0,643,649,3,170,85,0,644, + 645,5,125,0,0,645,646,3,94,47,0,646,647,5,126,0,0,647,649,1,0,0, + 0,648,638,1,0,0,0,648,640,1,0,0,0,648,641,1,0,0,0,648,642,1,0,0, + 0,648,643,1,0,0,0,648,644,1,0,0,0,649,658,1,0,0,0,650,651,10,8,0, + 0,651,652,7,4,0,0,652,657,3,94,47,9,653,654,10,7,0,0,654,655,7,0, + 0,0,655,657,3,94,47,8,656,650,1,0,0,0,656,653,1,0,0,0,657,660,1, + 0,0,0,658,656,1,0,0,0,658,659,1,0,0,0,659,95,1,0,0,0,660,658,1,0, + 0,0,661,666,3,124,62,0,662,666,3,126,63,0,663,666,3,120,60,0,664, + 666,3,188,94,0,665,661,1,0,0,0,665,662,1,0,0,0,665,663,1,0,0,0,665, + 664,1,0,0,0,666,97,1,0,0,0,667,668,3,180,90,0,668,669,5,125,0,0, + 669,670,3,136,68,0,670,671,5,60,0,0,671,672,3,136,68,0,672,673,5, + 126,0,0,673,99,1,0,0,0,674,675,3,128,64,0,675,101,1,0,0,0,676,679, + 3,104,52,0,677,679,3,106,53,0,678,676,1,0,0,0,678,677,1,0,0,0,679, + 103,1,0,0,0,680,681,3,184,92,0,681,682,5,125,0,0,682,683,3,146,73, + 0,683,684,5,110,0,0,684,689,3,148,74,0,685,686,5,110,0,0,686,688, + 3,138,69,0,687,685,1,0,0,0,688,691,1,0,0,0,689,687,1,0,0,0,689,690, + 1,0,0,0,690,692,1,0,0,0,691,689,1,0,0,0,692,693,5,126,0,0,693,105, + 1,0,0,0,694,695,3,186,93,0,695,696,5,125,0,0,696,697,5,127,0,0,697, + 702,3,142,71,0,698,699,5,110,0,0,699,701,3,142,71,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,705,1,0, + 0,0,704,702,1,0,0,0,705,706,5,128,0,0,706,707,5,110,0,0,707,712, + 3,148,74,0,708,709,5,110,0,0,709,711,3,138,69,0,710,708,1,0,0,0, + 711,714,1,0,0,0,712,710,1,0,0,0,712,713,1,0,0,0,713,715,1,0,0,0, + 714,712,1,0,0,0,715,716,5,126,0,0,716,107,1,0,0,0,717,720,3,216, + 108,0,718,720,5,332,0,0,719,717,1,0,0,0,719,718,1,0,0,0,720,109, + 1,0,0,0,721,722,3,214,107,0,722,723,5,125,0,0,723,724,3,134,67,0, + 724,725,5,126,0,0,725,111,1,0,0,0,726,731,3,120,60,0,727,728,5,110, + 0,0,728,730,3,120,60,0,729,727,1,0,0,0,730,733,1,0,0,0,731,729,1, + 0,0,0,731,732,1,0,0,0,732,113,1,0,0,0,733,731,1,0,0,0,734,739,3, + 122,61,0,735,736,5,110,0,0,736,738,3,122,61,0,737,735,1,0,0,0,738, + 741,1,0,0,0,739,737,1,0,0,0,739,740,1,0,0,0,740,115,1,0,0,0,741, + 739,1,0,0,0,742,744,7,0,0,0,743,742,1,0,0,0,743,744,1,0,0,0,744, + 745,1,0,0,0,745,746,3,118,59,0,746,117,1,0,0,0,747,769,3,120,60, + 0,748,749,5,35,0,0,749,750,5,125,0,0,750,751,3,120,60,0,751,752, + 5,126,0,0,752,769,1,0,0,0,753,754,5,36,0,0,754,755,5,125,0,0,755, + 756,3,120,60,0,756,757,5,126,0,0,757,769,1,0,0,0,758,759,5,37,0, + 0,759,760,5,125,0,0,760,761,3,120,60,0,761,762,5,126,0,0,762,769, + 1,0,0,0,763,764,5,38,0,0,764,765,5,125,0,0,765,766,3,120,60,0,766, + 767,5,126,0,0,767,769,1,0,0,0,768,747,1,0,0,0,768,748,1,0,0,0,768, + 753,1,0,0,0,768,758,1,0,0,0,768,763,1,0,0,0,769,119,1,0,0,0,770, + 771,3,214,107,0,771,121,1,0,0,0,772,773,3,218,109,0,773,123,1,0, + 0,0,774,775,3,132,66,0,775,776,5,125,0,0,776,777,3,134,67,0,777, + 778,5,126,0,0,778,125,1,0,0,0,779,780,5,274,0,0,780,781,5,125,0, + 0,781,782,3,88,44,0,782,783,5,27,0,0,783,784,3,130,65,0,784,785, + 5,126,0,0,785,127,1,0,0,0,786,787,3,174,87,0,787,788,5,125,0,0,788, + 789,3,134,67,0,789,790,5,126,0,0,790,129,1,0,0,0,791,802,5,212,0, + 0,792,802,5,241,0,0,793,802,5,243,0,0,794,802,5,102,0,0,795,802, + 5,103,0,0,796,802,5,104,0,0,797,802,5,105,0,0,798,802,5,106,0,0, + 799,802,5,107,0,0,800,802,5,108,0,0,801,791,1,0,0,0,801,792,1,0, + 0,0,801,793,1,0,0,0,801,794,1,0,0,0,801,795,1,0,0,0,801,796,1,0, + 0,0,801,797,1,0,0,0,801,798,1,0,0,0,801,799,1,0,0,0,801,800,1,0, + 0,0,802,131,1,0,0,0,803,810,3,152,76,0,804,810,3,156,78,0,805,810, + 3,178,89,0,806,810,3,174,87,0,807,810,3,176,88,0,808,810,3,180,90, + 0,809,803,1,0,0,0,809,804,1,0,0,0,809,805,1,0,0,0,809,806,1,0,0, + 0,809,807,1,0,0,0,809,808,1,0,0,0,810,133,1,0,0,0,811,816,3,136, + 68,0,812,813,5,110,0,0,813,815,3,136,68,0,814,812,1,0,0,0,815,818, + 1,0,0,0,816,814,1,0,0,0,816,817,1,0,0,0,817,820,1,0,0,0,818,816, + 1,0,0,0,819,811,1,0,0,0,819,820,1,0,0,0,820,135,1,0,0,0,821,822, + 3,220,110,0,822,823,5,112,0,0,823,825,1,0,0,0,824,821,1,0,0,0,824, + 825,1,0,0,0,825,826,1,0,0,0,826,827,3,94,47,0,827,137,1,0,0,0,828, + 829,3,140,70,0,829,830,5,112,0,0,830,831,3,150,75,0,831,139,1,0, + 0,0,832,833,7,5,0,0,833,141,1,0,0,0,834,843,3,146,73,0,835,836,3, + 146,73,0,836,837,3,144,72,0,837,843,1,0,0,0,838,839,3,146,73,0,839, + 840,5,134,0,0,840,841,3,144,72,0,841,843,1,0,0,0,842,834,1,0,0,0, + 842,835,1,0,0,0,842,838,1,0,0,0,843,143,1,0,0,0,844,847,3,194,97, + 0,845,847,3,196,98,0,846,844,1,0,0,0,846,845,1,0,0,0,847,145,1,0, + 0,0,848,851,3,214,107,0,849,851,3,192,96,0,850,848,1,0,0,0,850,849, + 1,0,0,0,851,147,1,0,0,0,852,853,3,150,75,0,853,149,1,0,0,0,854,857, + 3,214,107,0,855,857,3,188,94,0,856,854,1,0,0,0,856,855,1,0,0,0,857, + 151,1,0,0,0,858,882,5,172,0,0,859,882,5,173,0,0,860,882,5,174,0, + 0,861,882,5,175,0,0,862,882,5,176,0,0,863,882,5,177,0,0,864,882, + 5,178,0,0,865,882,5,179,0,0,866,882,5,180,0,0,867,882,5,181,0,0, + 868,882,5,182,0,0,869,882,5,183,0,0,870,882,5,184,0,0,871,882,5, + 185,0,0,872,882,5,186,0,0,873,882,5,188,0,0,874,882,5,189,0,0,875, + 882,5,190,0,0,876,882,5,191,0,0,877,882,5,192,0,0,878,882,5,193, + 0,0,879,882,5,194,0,0,880,882,3,154,77,0,881,858,1,0,0,0,881,859, + 1,0,0,0,881,860,1,0,0,0,881,861,1,0,0,0,881,862,1,0,0,0,881,863, + 1,0,0,0,881,864,1,0,0,0,881,865,1,0,0,0,881,866,1,0,0,0,881,867, + 1,0,0,0,881,868,1,0,0,0,881,869,1,0,0,0,881,870,1,0,0,0,881,871, + 1,0,0,0,881,872,1,0,0,0,881,873,1,0,0,0,881,874,1,0,0,0,881,875, + 1,0,0,0,881,876,1,0,0,0,881,877,1,0,0,0,881,878,1,0,0,0,881,879, + 1,0,0,0,881,880,1,0,0,0,882,153,1,0,0,0,883,884,7,6,0,0,884,155, + 1,0,0,0,885,886,7,7,0,0,886,157,1,0,0,0,887,888,5,226,0,0,888,889, + 5,125,0,0,889,890,3,160,80,0,890,891,5,110,0,0,891,892,3,136,68, + 0,892,893,5,126,0,0,893,159,1,0,0,0,894,895,7,8,0,0,895,161,1,0, + 0,0,896,897,5,223,0,0,897,898,5,125,0,0,898,899,3,168,84,0,899,900, + 5,5,0,0,900,901,3,136,68,0,901,902,5,126,0,0,902,163,1,0,0,0,903, + 904,7,9,0,0,904,165,1,0,0,0,905,906,7,10,0,0,906,167,1,0,0,0,907, + 910,3,164,82,0,908,910,3,166,83,0,909,907,1,0,0,0,909,908,1,0,0, + 0,910,169,1,0,0,0,911,912,3,172,86,0,912,913,5,125,0,0,913,914,3, + 164,82,0,914,915,5,110,0,0,915,916,3,136,68,0,916,917,5,110,0,0, + 917,918,3,136,68,0,918,919,5,126,0,0,919,171,1,0,0,0,920,921,7,11, + 0,0,921,173,1,0,0,0,922,923,7,12,0,0,923,175,1,0,0,0,924,925,5,281, + 0,0,925,177,1,0,0,0,926,927,7,13,0,0,927,179,1,0,0,0,928,929,5,187, + 0,0,929,181,1,0,0,0,930,931,7,14,0,0,931,183,1,0,0,0,932,933,7,15, + 0,0,933,185,1,0,0,0,934,935,7,16,0,0,935,187,1,0,0,0,936,943,3,190, + 95,0,937,943,3,192,96,0,938,943,3,194,97,0,939,943,3,196,98,0,940, + 943,3,198,99,0,941,943,3,200,100,0,942,936,1,0,0,0,942,937,1,0,0, + 0,942,938,1,0,0,0,942,939,1,0,0,0,942,940,1,0,0,0,942,941,1,0,0, + 0,943,189,1,0,0,0,944,945,5,81,0,0,945,946,3,94,47,0,946,947,3,208, + 104,0,947,191,1,0,0,0,948,949,7,17,0,0,949,193,1,0,0,0,950,952,7, + 0,0,0,951,950,1,0,0,0,951,952,1,0,0,0,952,953,1,0,0,0,953,954,5, + 330,0,0,954,195,1,0,0,0,955,957,7,0,0,0,956,955,1,0,0,0,956,957, + 1,0,0,0,957,958,1,0,0,0,958,959,5,331,0,0,959,197,1,0,0,0,960,961, + 7,18,0,0,961,199,1,0,0,0,962,966,3,202,101,0,963,966,3,204,102,0, + 964,966,3,206,103,0,965,962,1,0,0,0,965,963,1,0,0,0,965,964,1,0, + 0,0,966,201,1,0,0,0,967,968,5,212,0,0,968,969,3,192,96,0,969,203, + 1,0,0,0,970,971,5,241,0,0,971,972,3,192,96,0,972,205,1,0,0,0,973, + 974,5,243,0,0,974,975,3,192,96,0,975,207,1,0,0,0,976,977,7,19,0, + 0,977,209,1,0,0,0,978,979,7,20,0,0,979,211,1,0,0,0,980,981,5,125, + 0,0,981,986,3,188,94,0,982,983,5,110,0,0,983,985,3,188,94,0,984, + 982,1,0,0,0,985,988,1,0,0,0,986,984,1,0,0,0,986,987,1,0,0,0,987, + 989,1,0,0,0,988,986,1,0,0,0,989,990,5,126,0,0,990,213,1,0,0,0,991, + 996,3,220,110,0,992,993,5,111,0,0,993,995,3,220,110,0,994,992,1, + 0,0,0,995,998,1,0,0,0,996,994,1,0,0,0,996,997,1,0,0,0,997,215,1, + 0,0,0,998,996,1,0,0,0,999,1004,3,222,111,0,1000,1001,5,111,0,0,1001, + 1003,3,220,110,0,1002,1000,1,0,0,0,1003,1006,1,0,0,0,1004,1002,1, + 0,0,0,1004,1005,1,0,0,0,1005,217,1,0,0,0,1006,1004,1,0,0,0,1007, + 1012,3,224,112,0,1008,1009,5,111,0,0,1009,1011,3,224,112,0,1010, + 1008,1,0,0,0,1011,1014,1,0,0,0,1012,1010,1,0,0,0,1012,1013,1,0,0, + 0,1013,219,1,0,0,0,1014,1012,1,0,0,0,1015,1017,5,111,0,0,1016,1015, + 1,0,0,0,1016,1017,1,0,0,0,1017,1018,1,0,0,0,1018,1026,5,328,0,0, + 1019,1020,5,131,0,0,1020,1021,3,220,110,0,1021,1022,5,131,0,0,1022, + 1026,1,0,0,0,1023,1026,5,335,0,0,1024,1026,3,226,113,0,1025,1016, + 1,0,0,0,1025,1019,1,0,0,0,1025,1023,1,0,0,0,1025,1024,1,0,0,0,1026, + 221,1,0,0,0,1027,1029,5,329,0,0,1028,1027,1,0,0,0,1028,1029,1,0, + 0,0,1029,1030,1,0,0,0,1030,1031,3,220,110,0,1031,223,1,0,0,0,1032, + 1037,3,220,110,0,1033,1034,5,122,0,0,1034,1036,3,220,110,0,1035, + 1033,1,0,0,0,1036,1039,1,0,0,0,1037,1035,1,0,0,0,1037,1038,1,0,0, + 0,1038,1041,1,0,0,0,1039,1037,1,0,0,0,1040,1042,5,122,0,0,1041,1040, + 1,0,0,0,1041,1042,1,0,0,0,1042,1056,1,0,0,0,1043,1044,5,129,0,0, + 1044,1045,3,224,112,0,1045,1046,5,129,0,0,1046,1056,1,0,0,0,1047, + 1048,5,130,0,0,1048,1049,3,224,112,0,1049,1050,5,130,0,0,1050,1056, + 1,0,0,0,1051,1052,5,131,0,0,1052,1053,3,224,112,0,1053,1054,5,131, + 0,0,1054,1056,1,0,0,0,1055,1032,1,0,0,0,1055,1043,1,0,0,0,1055,1047, + 1,0,0,0,1055,1051,1,0,0,0,1056,225,1,0,0,0,1057,1158,5,31,0,0,1058, + 1158,3,210,105,0,1059,1158,5,320,0,0,1060,1158,3,132,66,0,1061,1158, + 3,140,70,0,1062,1158,3,208,104,0,1063,1158,3,156,78,0,1064,1158, + 3,178,89,0,1065,1158,3,152,76,0,1066,1158,3,180,90,0,1067,1158,5, + 2,0,0,1068,1158,5,3,0,0,1069,1158,5,4,0,0,1070,1158,5,5,0,0,1071, + 1158,5,6,0,0,1072,1158,5,7,0,0,1073,1158,5,8,0,0,1074,1158,5,9,0, + 0,1075,1158,5,10,0,0,1076,1158,5,11,0,0,1077,1158,5,12,0,0,1078, + 1158,5,13,0,0,1079,1158,5,14,0,0,1080,1158,5,15,0,0,1081,1158,5, + 16,0,0,1082,1158,5,17,0,0,1083,1158,5,18,0,0,1084,1158,5,19,0,0, + 1085,1158,5,20,0,0,1086,1158,5,21,0,0,1087,1158,5,22,0,0,1088,1158, + 5,23,0,0,1089,1158,5,24,0,0,1090,1158,5,25,0,0,1091,1158,5,26,0, + 0,1092,1158,5,29,0,0,1093,1158,5,30,0,0,1094,1158,5,32,0,0,1095, + 1158,5,33,0,0,1096,1158,5,34,0,0,1097,1158,5,36,0,0,1098,1158,5, + 37,0,0,1099,1158,5,38,0,0,1100,1158,5,39,0,0,1101,1158,5,40,0,0, + 1102,1158,5,41,0,0,1103,1158,5,42,0,0,1104,1158,5,43,0,0,1105,1158, + 5,44,0,0,1106,1158,5,45,0,0,1107,1158,5,46,0,0,1108,1158,5,47,0, + 0,1109,1158,5,48,0,0,1110,1158,5,49,0,0,1111,1158,5,50,0,0,1112, + 1158,5,51,0,0,1113,1158,5,52,0,0,1114,1158,5,53,0,0,1115,1158,5, + 54,0,0,1116,1158,5,55,0,0,1117,1158,5,56,0,0,1118,1158,5,57,0,0, + 1119,1158,5,58,0,0,1120,1158,5,135,0,0,1121,1158,5,136,0,0,1122, + 1158,5,137,0,0,1123,1158,5,138,0,0,1124,1158,5,139,0,0,1125,1158, + 5,140,0,0,1126,1158,5,141,0,0,1127,1158,5,142,0,0,1128,1158,5,143, + 0,0,1129,1158,5,144,0,0,1130,1158,5,145,0,0,1131,1158,5,146,0,0, + 1132,1158,5,147,0,0,1133,1158,5,148,0,0,1134,1158,5,149,0,0,1135, + 1158,5,150,0,0,1136,1158,5,151,0,0,1137,1158,5,152,0,0,1138,1158, + 5,153,0,0,1139,1158,5,154,0,0,1140,1158,5,155,0,0,1141,1158,5,156, + 0,0,1142,1158,5,157,0,0,1143,1158,5,158,0,0,1144,1158,5,159,0,0, + 1145,1158,5,160,0,0,1146,1158,5,161,0,0,1147,1158,5,162,0,0,1148, + 1158,5,163,0,0,1149,1158,5,164,0,0,1150,1158,5,165,0,0,1151,1158, + 5,166,0,0,1152,1158,5,167,0,0,1153,1158,5,168,0,0,1154,1158,5,169, + 0,0,1155,1158,5,170,0,0,1156,1158,5,171,0,0,1157,1057,1,0,0,0,1157, + 1058,1,0,0,0,1157,1059,1,0,0,0,1157,1060,1,0,0,0,1157,1061,1,0,0, + 0,1157,1062,1,0,0,0,1157,1063,1,0,0,0,1157,1064,1,0,0,0,1157,1065, + 1,0,0,0,1157,1066,1,0,0,0,1157,1067,1,0,0,0,1157,1068,1,0,0,0,1157, + 1069,1,0,0,0,1157,1070,1,0,0,0,1157,1071,1,0,0,0,1157,1072,1,0,0, + 0,1157,1073,1,0,0,0,1157,1074,1,0,0,0,1157,1075,1,0,0,0,1157,1076, + 1,0,0,0,1157,1077,1,0,0,0,1157,1078,1,0,0,0,1157,1079,1,0,0,0,1157, + 1080,1,0,0,0,1157,1081,1,0,0,0,1157,1082,1,0,0,0,1157,1083,1,0,0, + 0,1157,1084,1,0,0,0,1157,1085,1,0,0,0,1157,1086,1,0,0,0,1157,1087, + 1,0,0,0,1157,1088,1,0,0,0,1157,1089,1,0,0,0,1157,1090,1,0,0,0,1157, + 1091,1,0,0,0,1157,1092,1,0,0,0,1157,1093,1,0,0,0,1157,1094,1,0,0, + 0,1157,1095,1,0,0,0,1157,1096,1,0,0,0,1157,1097,1,0,0,0,1157,1098, + 1,0,0,0,1157,1099,1,0,0,0,1157,1100,1,0,0,0,1157,1101,1,0,0,0,1157, + 1102,1,0,0,0,1157,1103,1,0,0,0,1157,1104,1,0,0,0,1157,1105,1,0,0, + 0,1157,1106,1,0,0,0,1157,1107,1,0,0,0,1157,1108,1,0,0,0,1157,1109, + 1,0,0,0,1157,1110,1,0,0,0,1157,1111,1,0,0,0,1157,1112,1,0,0,0,1157, + 1113,1,0,0,0,1157,1114,1,0,0,0,1157,1115,1,0,0,0,1157,1116,1,0,0, + 0,1157,1117,1,0,0,0,1157,1118,1,0,0,0,1157,1119,1,0,0,0,1157,1120, + 1,0,0,0,1157,1121,1,0,0,0,1157,1122,1,0,0,0,1157,1123,1,0,0,0,1157, + 1124,1,0,0,0,1157,1125,1,0,0,0,1157,1126,1,0,0,0,1157,1127,1,0,0, + 0,1157,1128,1,0,0,0,1157,1129,1,0,0,0,1157,1130,1,0,0,0,1157,1131, + 1,0,0,0,1157,1132,1,0,0,0,1157,1133,1,0,0,0,1157,1134,1,0,0,0,1157, + 1135,1,0,0,0,1157,1136,1,0,0,0,1157,1137,1,0,0,0,1157,1138,1,0,0, + 0,1157,1139,1,0,0,0,1157,1140,1,0,0,0,1157,1141,1,0,0,0,1157,1142, + 1,0,0,0,1157,1143,1,0,0,0,1157,1144,1,0,0,0,1157,1145,1,0,0,0,1157, + 1146,1,0,0,0,1157,1147,1,0,0,0,1157,1148,1,0,0,0,1157,1149,1,0,0, + 0,1157,1150,1,0,0,0,1157,1151,1,0,0,0,1157,1152,1,0,0,0,1157,1153, + 1,0,0,0,1157,1154,1,0,0,0,1157,1155,1,0,0,0,1157,1156,1,0,0,0,1158, + 227,1,0,0,0,86,229,242,248,266,269,273,279,284,297,307,314,319,324, + 331,335,340,344,350,355,366,371,375,379,383,388,402,413,421,433, + 439,478,484,503,510,529,534,542,551,561,578,587,602,610,617,623, + 625,636,648,656,658,665,678,689,702,712,719,731,739,743,768,801, + 809,816,819,824,842,846,850,856,881,909,942,951,956,965,986,996, + 1004,1012,1016,1025,1028,1037,1041,1055,1157 ]; private static __ATN: antlr.ATN; @@ -7384,6 +8148,28 @@ export class SearchCommandContext extends antlr.ParserRuleContext { super.copyFrom(ctx); } } +export class SearchFromFilterContext extends SearchCommandContext { + public constructor(ctx: SearchCommandContext) { + super(ctx.parent, ctx.invokingState); + super.copyFrom(ctx); + } + public fromClause(): FromClauseContext { + return this.getRuleContext(0, FromClauseContext)!; + } + public logicalExpression(): LogicalExpressionContext { + return this.getRuleContext(0, LogicalExpressionContext)!; + } + public SEARCH(): antlr.TerminalNode | null { + return this.getToken(OpenSearchPPLParser.SEARCH, 0); + } + public override accept(visitor: OpenSearchPPLParserVisitor): Result | null { + if (visitor.visitSearchFromFilter) { + return visitor.visitSearchFromFilter(this); + } else { + return visitor.visitChildren(this); + } + } +} export class SearchFromContext extends SearchCommandContext { public constructor(ctx: SearchCommandContext) { super(ctx.parent, ctx.invokingState); @@ -7403,6 +8189,28 @@ export class SearchFromContext extends SearchCommandContext { } } } +export class SearchFilterFromContext extends SearchCommandContext { + public constructor(ctx: SearchCommandContext) { + super(ctx.parent, ctx.invokingState); + super.copyFrom(ctx); + } + public logicalExpression(): LogicalExpressionContext { + return this.getRuleContext(0, LogicalExpressionContext)!; + } + public fromClause(): FromClauseContext { + return this.getRuleContext(0, FromClauseContext)!; + } + public SEARCH(): antlr.TerminalNode | null { + return this.getToken(OpenSearchPPLParser.SEARCH, 0); + } + public override accept(visitor: OpenSearchPPLParserVisitor): Result | null { + if (visitor.visitSearchFilterFrom) { + return visitor.visitSearchFilterFrom(this); + } else { + return visitor.visitChildren(this); + } + } +} export class DescribeCommandContext extends antlr.ParserRuleContext { @@ -8209,12 +9017,15 @@ export class FromClauseContext extends antlr.ParserRuleContext { public EQUAL(): antlr.TerminalNode { return this.getToken(OpenSearchPPLParser.EQUAL, 0)!; } - public tableSourceClause(): TableSourceClauseContext { - return this.getRuleContext(0, TableSourceClauseContext)!; + public tableSourceClause(): TableSourceClauseContext | null { + return this.getRuleContext(0, TableSourceClauseContext); } public INDEX(): antlr.TerminalNode | null { return this.getToken(OpenSearchPPLParser.INDEX, 0); } + public tableFunction(): TableFunctionContext | null { + return this.getRuleContext(0, TableFunctionContext); + } public override get ruleIndex(): number { return OpenSearchPPLParser.RULE_fromClause; } @@ -8232,8 +9043,23 @@ export class TableSourceClauseContext extends antlr.ParserRuleContext { public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { super(parent, invokingState); } - public tableSource(): TableSourceContext { - return this.getRuleContext(0, TableSourceContext)!; + public tableSource(): TableSourceContext[]; + public tableSource(i: number): TableSourceContext | null; + public tableSource(i?: number): TableSourceContext[] | TableSourceContext | null { + if (i === undefined) { + return this.getRuleContexts(TableSourceContext); + } + + return this.getRuleContext(i, TableSourceContext); + } + public COMMA(): antlr.TerminalNode[]; + public COMMA(i: number): antlr.TerminalNode | null; + public COMMA(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } } public override get ruleIndex(): number { return OpenSearchPPLParser.RULE_tableSourceClause; @@ -9072,6 +9898,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); @@ -11354,15 +12220,39 @@ export class QualifiedNameContext extends antlr.ParserRuleContext { public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { super(parent, invokingState); } - public ID(): antlr.TerminalNode { - return this.getToken(OpenSearchPPLParser.ID, 0)!; - } public override get ruleIndex(): number { return OpenSearchPPLParser.RULE_qualifiedName; } + public override copyFrom(ctx: QualifiedNameContext): void { + super.copyFrom(ctx); + } +} +export class IdentsAsQualifiedNameContext extends QualifiedNameContext { + public constructor(ctx: QualifiedNameContext) { + super(ctx.parent, ctx.invokingState); + super.copyFrom(ctx); + } + public ident(): IdentContext[]; + public ident(i: number): IdentContext | null; + public ident(i?: number): IdentContext[] | IdentContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentContext); + } + + return this.getRuleContext(i, IdentContext); + } + public DOT(): antlr.TerminalNode[]; + public DOT(i: number): antlr.TerminalNode | null; + public DOT(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.DOT); + } else { + return this.getToken(OpenSearchPPLParser.DOT, i); + } + } public override accept(visitor: OpenSearchPPLParserVisitor): Result | null { - if (visitor.visitQualifiedName) { - return visitor.visitQualifiedName(this); + if (visitor.visitIdentsAsQualifiedName) { + return visitor.visitIdentsAsQualifiedName(this); } else { return visitor.visitChildren(this); } @@ -11374,15 +12264,42 @@ export class TableQualifiedNameContext extends antlr.ParserRuleContext { public constructor(parent: antlr.ParserRuleContext | null, invokingState: number) { super(parent, invokingState); } - public ID(): antlr.TerminalNode { - return this.getToken(OpenSearchPPLParser.ID, 0)!; - } public override get ruleIndex(): number { return OpenSearchPPLParser.RULE_tableQualifiedName; } + public override copyFrom(ctx: TableQualifiedNameContext): void { + super.copyFrom(ctx); + } +} +export class IdentsAsTableQualifiedNameContext extends TableQualifiedNameContext { + public constructor(ctx: TableQualifiedNameContext) { + super(ctx.parent, ctx.invokingState); + super.copyFrom(ctx); + } + public tableIdent(): TableIdentContext { + return this.getRuleContext(0, TableIdentContext)!; + } + public DOT(): antlr.TerminalNode[]; + public DOT(i: number): antlr.TerminalNode | null; + public DOT(i?: number): antlr.TerminalNode | null | antlr.TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.DOT); + } else { + return this.getToken(OpenSearchPPLParser.DOT, i); + } + } + public ident(): IdentContext[]; + public ident(i: number): IdentContext | null; + public ident(i?: number): IdentContext[] | IdentContext | null { + if (i === undefined) { + return this.getRuleContexts(IdentContext); + } + + return this.getRuleContext(i, IdentContext); + } public override accept(visitor: OpenSearchPPLParserVisitor): Result | null { - if (visitor.visitTableQualifiedName) { - return visitor.visitTableQualifiedName(this); + if (visitor.visitIdentsAsTableQualifiedName) { + return visitor.visitIdentsAsTableQualifiedName(this); } else { return visitor.visitChildren(this); } 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 44088c262bd1..9ddb17bd038d 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParserVisitor.ts +++ b/src/plugins/data/public/antlr/opensearch_ppl/.generated/OpenSearchPPLParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from grammar/OpenSearchPPLParser.g4 by ANTLR 4.13.1 +// Generated from ./src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4 by ANTLR 4.13.1 import { AbstractParseTreeVisitor } from "antlr4ng"; @@ -10,6 +10,8 @@ import { QueryStatementContext } from "./OpenSearchPPLParser.js"; import { PplCommandsContext } from "./OpenSearchPPLParser.js"; import { CommandsContext } from "./OpenSearchPPLParser.js"; import { SearchFromContext } from "./OpenSearchPPLParser.js"; +import { SearchFromFilterContext } from "./OpenSearchPPLParser.js"; +import { SearchFilterFromContext } from "./OpenSearchPPLParser.js"; import { DescribeCommandContext } from "./OpenSearchPPLParser.js"; import { ShowDataSourcesCommandContext } from "./OpenSearchPPLParser.js"; import { WhereCommandContext } from "./OpenSearchPPLParser.js"; @@ -61,12 +63,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"; @@ -126,8 +129,8 @@ import { TimestampLiteralContext } from "./OpenSearchPPLParser.js"; import { IntervalUnitContext } from "./OpenSearchPPLParser.js"; import { TimespanUnitContext } from "./OpenSearchPPLParser.js"; import { ValueListContext } from "./OpenSearchPPLParser.js"; -import { QualifiedNameContext } from "./OpenSearchPPLParser.js"; -import { TableQualifiedNameContext } from "./OpenSearchPPLParser.js"; +import { IdentsAsQualifiedNameContext } from "./OpenSearchPPLParser.js"; +import { IdentsAsTableQualifiedNameContext } from "./OpenSearchPPLParser.js"; import { IdentsAsWildcardQualifiedNameContext } from "./OpenSearchPPLParser.js"; import { IdentContext } from "./OpenSearchPPLParser.js"; import { TableIdentContext } from "./OpenSearchPPLParser.js"; @@ -186,6 +189,20 @@ export class OpenSearchPPLParserVisitor extends AbstractParseTreeVisitor * @return the visitor result */ visitSearchFrom?: (ctx: SearchFromContext) => Result; + /** + * Visit a parse tree produced by the `searchFromFilter` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSearchFromFilter?: (ctx: SearchFromFilterContext) => Result; + /** + * Visit a parse tree produced by the `searchFilterFrom` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSearchFilterFrom?: (ctx: SearchFilterFromContext) => Result; /** * Visit a parse tree produced by `OpenSearchPPLParser.describeCommand`. * @param ctx the parse tree @@ -507,26 +524,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 +552,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 @@ -903,17 +927,19 @@ export class OpenSearchPPLParserVisitor extends AbstractParseTreeVisitor */ visitValueList?: (ctx: ValueListContext) => Result; /** - * Visit a parse tree produced by `OpenSearchPPLParser.qualifiedName`. + * Visit a parse tree produced by the `identsAsQualifiedName` + * labeled alternative in `OpenSearchPPLParser.qualifiedName`. * @param ctx the parse tree * @return the visitor result */ - visitQualifiedName?: (ctx: QualifiedNameContext) => Result; + visitIdentsAsQualifiedName?: (ctx: IdentsAsQualifiedNameContext) => Result; /** - * Visit a parse tree produced by `OpenSearchPPLParser.tableQualifiedName`. + * Visit a parse tree produced by the `identsAsTableQualifiedName` + * labeled alternative in `OpenSearchPPLParser.tableQualifiedName`. * @param ctx the parse tree * @return the visitor result */ - visitTableQualifiedName?: (ctx: TableQualifiedNameContext) => Result; + visitIdentsAsTableQualifiedName?: (ctx: IdentsAsTableQualifiedNameContext) => Result; /** * Visit a parse tree produced by the `identsAsWildcardQualifiedName` * labeled alternative in `OpenSearchPPLParser.wcQualifiedName`. 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..9ca2cf4f40fe 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/code_completion.ts +++ b/src/plugins/data/public/antlr/opensearch_ppl/code_completion.ts @@ -10,13 +10,11 @@ */ import { monaco } from '@osd/monaco'; -import { CursorPosition, OpenSearchPplAutocompleteResult } from '../shared/types'; +import { CursorPosition, AutocompleteResultBase } from '../shared/types'; import { fetchFieldSuggestions, 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'; export const getSuggestions = async ({ selectionStart, @@ -37,48 +35,16 @@ export const getSuggestions = async ({ const finalSuggestions: QuerySuggestion[] = []; if (suggestions.suggestColumns) { - finalSuggestions.push(...fetchFieldSuggestions(indexPattern, (f: any) => `${f} `)); + finalSuggestions.push(...fetchFieldSuggestions(indexPattern)); } - if (suggestions.suggestAggregateFunctions) { - finalSuggestions.push( - ...PPL_AGGREGATE_FUNTIONS.map((af) => ({ - text: `${af}()`, - type: monaco.languages.CompletionItemKind.Function, - insertText: af + '(${1:expr}) ', - detail: SuggestionItemDetailsTags.AggregateFunction, - insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, - })) - ); - } - - if (suggestions.suggestSourcesOrTables) { - finalSuggestions.push({ - text: indexPattern.title, - type: monaco.languages.CompletionItemKind.Struct, - insertText: `${indexPattern.title} `, - detail: SuggestionItemDetailsTags.Table, - }); - } - - // 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'); - // Fill in PPL keywords if (suggestions.suggestKeywords?.length) { finalSuggestions.push( ...suggestions.suggestKeywords.map((sk) => ({ - text: sk.value.toLowerCase(), - insertText: `${sk.value.toLowerCase()} `, + text: sk.value, type: monaco.languages.CompletionItemKind.Keyword, detail: SuggestionItemDetailsTags.Keyword, - sortText: suggestionImportance.get(sk.id) ?? sk.value.toLowerCase(), })) ); } @@ -91,7 +57,7 @@ export const getSuggestions = async ({ export const getOpenSearchPplAutoCompleteSuggestions = ( query: string, cursor: CursorPosition -): OpenSearchPplAutocompleteResult => { +): AutocompleteResultBase => { return parseQuery({ Lexer: openSearchPplAutocompleteData.Lexer, Parser: openSearchPplAutocompleteData.Parser, diff --git a/src/plugins/data/public/antlr/opensearch_ppl/constants.ts b/src/plugins/data/public/antlr/opensearch_ppl/constants.ts deleted file mode 100644 index 3f84ddd36cf5..000000000000 --- a/src/plugins/data/public/antlr/opensearch_ppl/constants.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -export const PPL_AGGREGATE_FUNTIONS = [ - 'avg', - 'count', - 'sum', - 'min', - 'max', - 'var_samp', - 'var_pop', - 'stddev_samp', - 'stddev_pop', -]; 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 1c75937f6f37..944e6309f7a0 100644 --- a/src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4 +++ b/src/plugins/data/public/antlr/opensearch_ppl/grammar/OpenSearchPPLParser.g4 @@ -53,8 +53,8 @@ commands searchCommand : (SEARCH)? fromClause # searchFrom - // | (SEARCH)? fromClause logicalExpression # searchFromFilter - // | (SEARCH)? logicalExpression fromClause # searchFilterFrom + | (SEARCH)? fromClause logicalExpression # searchFromFilter + | (SEARCH)? logicalExpression fromClause # searchFilterFrom ; describeCommand @@ -168,12 +168,12 @@ mlArg fromClause : SOURCE EQUAL tableSourceClause | INDEX EQUAL tableSourceClause - // | SOURCE EQUAL tableFunction - // | INDEX EQUAL tableFunction + | SOURCE EQUAL tableFunction + | INDEX EQUAL tableFunction ; tableSourceClause - : tableSource // (COMMA tableSource)* + : tableSource (COMMA tableSource)* ; renameClasue @@ -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 @@ -775,11 +775,11 @@ valueList ; qualifiedName - : ID // (DOT ident)* # identsAsQualifiedName + : ident (DOT ident)* # identsAsQualifiedName ; tableQualifiedName - : ID // tableIdent (DOT ident)* # identsAsTableQualifiedName + : tableIdent (DOT ident)* # identsAsTableQualifiedName ; wcQualifiedName 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 7b04ab685adf..db1cb320035d 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 @@ -11,16 +11,13 @@ import { CursorPosition, OpenSearchPplAutocompleteResult, ProcessVisitedRulesResult, - SourceOrTableSuggestion, - TableContextSuggestion, } from '../shared/types'; import { OpenSearchPPLLexer } from './.generated/OpenSearchPPLLexer'; import { OpenSearchPPLParser } from './.generated/OpenSearchPPLParser'; // These are keywords that we do not want to show in autocomplete export function getIgnoredTokens(): number[] { - // const tokens = [OpenSearchPPLParser.SPACE, OpenSearchPPLParser.EOF]; - const tokens = []; + const tokens = [OpenSearchPPLParser.SPACE, OpenSearchPPLParser.EOF]; const firstOperatorIndex = OpenSearchPPLParser.MATCH; const lastOperatorIndex = OpenSearchPPLParser.ERROR_RECOGNITION; @@ -34,18 +31,6 @@ export function getIgnoredTokens(): number[] { OpenSearchPPLParser.PIPE, OpenSearchPPLParser.EQUAL, 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, ]; for (let i = firstFunctionIndex; i <= lastFunctionIndex; i++) { if (!operatorsToInclude.includes(i)) { @@ -99,9 +84,6 @@ export function processVisitedRules( shouldSuggestColumns = true; break; } - case OpenSearchPPLParser.RULE_tableQualifiedName: { - suggestSourcesOrTables = SourceOrTableSuggestion.TABLES; - } } } @@ -112,10 +94,7 @@ export function processVisitedRules( }; } -export function getParseTree( - parser: OpenSearchPPLParser, - type?: 'from' | 'alter' | 'insert' | 'update' | 'select' -): ParseTree { +export function getParseTree(parser: OpenSearchPPLParser, type?: 'search' | 'from'): ParseTree { if (!type) { return parser.root(); } @@ -123,6 +102,8 @@ export function getParseTree( switch (type) { case 'from': return parser.fromClause(); + case 'search': + return parser.searchCommand(); default: return parser.root(); } @@ -145,7 +126,7 @@ export function enrichAutocompleteResult( const result: OpenSearchPplAutocompleteResult = { ...baseResult, ...suggestionsFromRules, - suggestColumns: shouldSuggestColumns ? ({ name: '' } as TableContextSuggestion) : undefined, + suggestColumns: shouldSuggestColumns ? shouldSuggestColumns : undefined, }; return result; } diff --git a/src/plugins/data/public/antlr/shared/constants.ts b/src/plugins/data/public/antlr/shared/constants.ts index 63d9a3a3451b..16fe97b737a0 100644 --- a/src/plugins/data/public/antlr/shared/constants.ts +++ b/src/plugins/data/public/antlr/shared/constants.ts @@ -9,6 +9,5 @@ export const enum SuggestionItemDetailsTags { AggregateFunction = 'Aggregate Function', Value = 'Value', Operator = 'Operator', - Table = 'Table', } export const quotesRegex = /^'(.*)'$/; diff --git a/src/plugins/data/public/antlr/shared/types.ts b/src/plugins/data/public/antlr/shared/types.ts index 36a9748bd719..8941a8469d4b 100644 --- a/src/plugins/data/public/antlr/shared/types.ts +++ b/src/plugins/data/public/antlr/shared/types.ts @@ -41,7 +41,6 @@ export interface TokenPosition { export interface KeywordSuggestion { value: string; - id: number; } export type ColumnSuggestion = TableContextSuggestion; diff --git a/src/plugins/data/public/antlr/shared/utils.ts b/src/plugins/data/public/antlr/shared/utils.ts index 80a8498c56b7..6136aa0f9ae9 100644 --- a/src/plugins/data/public/antlr/shared/utils.ts +++ b/src/plugins/data/public/antlr/shared/utils.ts @@ -41,7 +41,6 @@ export const getRawSuggestionData$ = ( } const dataSourceId = query.dataset?.dataSource?.id; const title = query.dataset?.dataSource?.title; - if (!dataSourceId || !title) throw new Error(); return from(dataSourceRequestHandler({ dataSourceId, title })); }) ); @@ -180,7 +179,6 @@ export const parseQuery = < suggestKeywords.push({ value: literalName, - id: tokenType, }); }); 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..aebb4087d9db 100644 --- a/src/plugins/data/public/autocomplete/providers/query_suggestion_provider.ts +++ b/src/plugins/data/public/autocomplete/providers/query_suggestion_provider.ts @@ -79,9 +79,7 @@ export interface MonacoCompatibleQuerySuggestion text: string; detail: string; insertText?: string; - insertTextRules?: monaco.languages.CompletionItemInsertTextRule; replacePosition?: monaco.Range; - sortText?: string; } /** @public **/ diff --git a/src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts b/src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts index 2c7f4bbffb2e..73df7b1af556 100644 --- a/src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts +++ b/src/plugins/data/public/query/query_string/dataset_service/lib/index_type.ts @@ -64,7 +64,7 @@ export const indexTypeConfig: DatasetTypeConfig = { const dataSources = await fetchDataSources(services.savedObjects.client); return { ...dataStructure, - columnHeader: 'Clusters', + columnHeader: 'Cluster', hasNext: true, children: dataSources, }; diff --git a/src/plugins/data/public/query/query_string/dataset_service/types.ts b/src/plugins/data/public/query/query_string/dataset_service/types.ts index c68aed8b6459..ad2b50aeb1cf 100644 --- a/src/plugins/data/public/query/query_string/dataset_service/types.ts +++ b/src/plugins/data/public/query/query_string/dataset_service/types.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ import { EuiIconProps } from '@elastic/eui'; -import { Dataset, DatasetField, DatasetSearchOptions, DataStructure } from '../../../../common'; +import { Dataset, DatasetField, DataStructure } from '../../../../common'; import { IDataPluginServices } from '../../../types'; /** @@ -44,9 +44,4 @@ export interface DatasetTypeConfig { * @returns {Promise} A promise that resolves to an array of supported language ids. */ supportedLanguages: (dataset: Dataset) => string[]; - /** - * Retrieves the search options to be used for running the query on the data connection associated - * with this Dataset - */ - getSearchOptions?: () => DatasetSearchOptions; } diff --git a/src/plugins/data/public/query/query_string/language_service/lib/__snapshots__/query_result.test.tsx.snap b/src/plugins/data/public/query/query_string/language_service/lib/__snapshots__/query_result.test.tsx.snap deleted file mode 100644 index cec14cdb7fa2..000000000000 --- a/src/plugins/data/public/query/query_string/language_service/lib/__snapshots__/query_result.test.tsx.snap +++ /dev/null @@ -1,62 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Query Result show error status with error message 2`] = ` - - - Error - - - } - closePopover={[Function]} - data-test-subj="queryResultError" - display="inlineBlock" - hasArrow={true} - isOpen={false} - ownFocus={true} - panelPaddingSize="s" -> - - ERRORS - -
- - - Reasons: - - error reason - - -

- - Details: - - error details -

-
-
-
-`; - -exports[`Query Result shows loading status 1`] = `""`; diff --git a/src/plugins/data/public/query/query_string/language_service/lib/query_result.test.tsx b/src/plugins/data/public/query/query_string/language_service/lib/query_result.test.tsx deleted file mode 100644 index 9e735cd02d64..000000000000 --- a/src/plugins/data/public/query/query_string/language_service/lib/query_result.test.tsx +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import React from 'react'; -import { mountWithIntl, shallowWithIntl } from 'test_utils/enzyme_helpers'; -import { QueryResult } from './query_result'; - -enum ResultStatus { - UNINITIALIZED = 'uninitialized', - LOADING = 'loading', // initial data load - READY = 'ready', // results came back - NO_RESULTS = 'none', // no results came back - ERROR = 'error', // error occurred -} - -describe('Query Result', () => { - it('shows loading status', () => { - const props = { - queryStatus: { - status: ResultStatus.LOADING, - startTime: Number.NEGATIVE_INFINITY, - }, - }; - const component = shallowWithIntl(); - expect(component).toMatchSnapshot(); - }); - - it('shows ready status with complete message', () => { - const props = { - queryStatus: { - status: ResultStatus.READY, - startTime: new Date().getTime(), - }, - }; - const component = mountWithIntl(); - const loadingIndicator = component.find(`[data-test-subj="queryResultLoading"]`); - expect(loadingIndicator.exists()).toBeFalsy(); - expect(component.find('EuiText').text()).toEqual('Completed'); - }); - - it('shows ready status with complete in miliseconds message', () => { - const props = { - queryStatus: { - status: ResultStatus.READY, - startTime: new Date().getTime(), - elapsedMs: 500, - }, - }; - const component = mountWithIntl(); - expect(component.find('EuiText').text()).toEqual('Completed in 500 ms'); - }); - - it('shows ready status with complete in seconds message', () => { - const props = { - queryStatus: { - status: ResultStatus.READY, - startTime: new Date().getTime(), - elapsedMs: 2000, - }, - }; - const component = mountWithIntl(); - expect(component.find('EuiText').text()).toEqual('Completed in 2.0 s'); - }); - - it('shows ready status with split seconds', () => { - const props = { - queryStatus: { - status: ResultStatus.READY, - startTime: new Date().getTime(), - elapsedMs: 2700, - }, - }; - const component = mountWithIntl(); - expect(component.find('EuiText').text()).toEqual('Completed in 2.7 s'); - }); - - it('show error status with error message', () => { - const props = { - queryStatus: { - status: ResultStatus.ERROR, - body: { - error: { - reason: 'error reason', - details: 'error details', - }, - statusCode: 400, - }, - }, - }; - const component = shallowWithIntl(); - expect(component.find(`[data-test-subj="queryResultError"]`).text()).toMatchInlineSnapshot( - `""` - ); - component.find(`[data-test-subj="queryResultError"]`).simulate('click'); - expect(component).toMatchSnapshot(); - }); - - it('returns null when error body is empty', () => { - const props = { - queryStatus: { - status: ResultStatus.ERROR, - }, - }; - const component = shallowWithIntl(); - expect(component).toEqual({}); - }); -}); diff --git a/src/plugins/data/public/query/query_string/language_service/lib/query_result.tsx b/src/plugins/data/public/query/query_string/language_service/lib/query_result.tsx index 3a8adb0675ca..9806b7cd55af 100644 --- a/src/plugins/data/public/query/query_string/language_service/lib/query_result.tsx +++ b/src/plugins/data/public/query/query_string/language_service/lib/query_result.tsx @@ -8,7 +8,7 @@ import { i18n } from '@osd/i18n'; import './_recent_query.scss'; import { EuiButtonEmpty, EuiPopover, EuiText, EuiPopoverTitle } from '@elastic/eui'; -import React, { useEffect, useState } from 'react'; +import React, { useState } from 'react'; export enum ResultStatus { UNINITIALIZED = 'uninitialized', @@ -28,77 +28,21 @@ export interface QueryStatus { statusCode?: number; }; elapsedMs?: number; - startTime?: number; } -// This is the time in milliseconds that the query will wait before showing the loading spinner -const BUFFER_TIME = 3000; - export function QueryResult(props: { queryStatus: QueryStatus }) { const [isPopoverOpen, setPopover] = useState(false); - const [elapsedTime, setElapsedTime] = useState(0); const onButtonClick = () => { setPopover(!isPopoverOpen); }; - const updateElapsedTime = () => { - const time = Date.now() - (props.queryStatus.startTime || 0); - if (time > BUFFER_TIME) { - setElapsedTime(time); - } else { - setElapsedTime(0); - } - }; - - useEffect(() => { - const interval = setInterval(updateElapsedTime, 1000); - - return () => clearInterval(interval); - }); - - if (props.queryStatus.status === ResultStatus.LOADING) { - if (elapsedTime < BUFFER_TIME) { - return null; - } - const time = Math.floor(elapsedTime / 1000); - return ( - {}} - isLoading - data-test-subj="queryResultLoading" - > - {i18n.translate('data.query.languageService.queryResults.completeTime', { - defaultMessage: `Loading ${time} s`, - })} - - ); - } - if (props.queryStatus.status === ResultStatus.READY) { - let message; - if (!props.queryStatus.elapsedMs) { - message = i18n.translate('data.query.languageService.queryResults.completeTime', { - defaultMessage: `Completed`, - }); - } else if (props.queryStatus.elapsedMs < 1000) { - message = i18n.translate( - 'data.query.languageService.queryResults.completeTimeInMiliseconds', - { - defaultMessage: `Completed in ${props.queryStatus.elapsedMs} ms`, - } - ); - } else { - message = i18n.translate('data.query.languageService.queryResults.completeTimeInSeconds', { - defaultMessage: `Completed in ${(props.queryStatus.elapsedMs / 1000).toFixed(1)} s`, - }); - } - return ( {}}> - - {message} + + {props.queryStatus.elapsedMs + ? `Completed in ${props.queryStatus.elapsedMs} ms` + : 'Completed'} ); @@ -111,17 +55,9 @@ export function QueryResult(props: { queryStatus: QueryStatus }) { return ( + - {i18n.translate('data.query.languageService.queryResults.error', { - defaultMessage: `Error`, - })} + {'Error'} } @@ -129,7 +65,6 @@ export function QueryResult(props: { queryStatus: QueryStatus }) { closePopover={() => setPopover(false)} panelPaddingSize="s" anchorPosition={'downRight'} - data-test-subj="queryResultError" > ERRORS
@@ -147,7 +82,7 @@ export function QueryResult(props: { queryStatus: QueryStatus }) { {i18n.translate('data.query.languageService.queryResults.details', { defaultMessage: `Details:`, })} - + {' '} {props.queryStatus.body.error.details}

diff --git a/src/plugins/data/public/query/query_string/language_service/lib/recent_query.tsx b/src/plugins/data/public/query/query_string/language_service/lib/recent_query.tsx index 0b58f0413966..2e3fdb7f55aa 100644 --- a/src/plugins/data/public/query/query_string/language_service/lib/recent_query.tsx +++ b/src/plugins/data/public/query/query_string/language_service/lib/recent_query.tsx @@ -51,10 +51,7 @@ export function RecentQueriesTable({ icon: 'play', type: 'icon', onClick: (item: RecentQueryTableItem) => { - onClickRecentQuery( - recentQueries.find((recentQuery) => recentQuery.id === item.id)?.query!, - recentQueries.find((recentQuery) => recentQuery.id === item.id)?.timeRange - ); + onClickRecentQuery(recentQueries[item.id].query, recentQueries[item.id].timeRange); }, 'data-test-subj': 'action-run', }, @@ -79,8 +76,8 @@ export function RecentQueriesTable({ const recentQueryItems: RecentQueryTableItem[] = recentQueries .filter((item, idx) => idx < MAX_RECENT_QUERY_SIZE) .filter((item) => item.query.language === currentLanguage) - .map((query) => ({ - id: query.id, + .map((query, idx) => ({ + id: idx, query: query.query.query, timeRange: query.timeRange, time: moment(query.time).format('MMM D, YYYY HH:mm:ss'), diff --git a/src/plugins/data/public/query/query_string/language_service/types.ts b/src/plugins/data/public/query/query_string/language_service/types.ts index dff25464db08..e82e12f95ec9 100644 --- a/src/plugins/data/public/query/query_string/language_service/types.ts +++ b/src/plugins/data/public/query/query_string/language_service/types.ts @@ -13,7 +13,6 @@ import { import { EditorInstance } from '../../../ui/query_editor/editors'; export interface RecentQueryItem { - id: number; query: Query; time: number; timeRange?: TimeRange; diff --git a/src/plugins/data/public/query/query_string/query_history.ts b/src/plugins/data/public/query/query_string/query_history.ts index 48dbf3511744..277287ee09d8 100644 --- a/src/plugins/data/public/query/query_string/query_history.ts +++ b/src/plugins/data/public/query/query_string/query_history.ts @@ -3,7 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -import uuid from 'uuid'; import { BehaviorSubject } from 'rxjs'; import { DataStorage } from '../../../common'; import { Query, TimeRange } from '../..'; @@ -62,7 +61,6 @@ export class QueryHistory { time: timestamp, query, dateRange, - id: uuid.v4(), }; this.storage.set(newKey, newItem); diff --git a/src/plugins/data/public/query/query_string/query_string_manager.mock.ts b/src/plugins/data/public/query/query_string/query_string_manager.mock.ts index 2fe1e7a7eff4..95374d1885f0 100644 --- a/src/plugins/data/public/query/query_string/query_string_manager.mock.ts +++ b/src/plugins/data/public/query/query_string/query_string_manager.mock.ts @@ -28,7 +28,6 @@ * under the License. */ -import { of } from 'rxjs'; import { QueryStringContract } from '.'; import { Query, Dataset } from '../../../common'; import { datasetServiceMock } from './dataset_service/dataset_service.mock'; @@ -45,10 +44,10 @@ const createSetupContractMock = (isEnhancementsEnabled: boolean = false) => { }; const queryStringManagerMock: jest.Mocked = { - getQuery: jest.fn().mockReturnValue(defaultQuery), + getQuery: jest.fn(), setQuery: jest.fn(), - getUpdates$: jest.fn().mockReturnValue(of(defaultQuery)), - getDefaultQuery: jest.fn().mockReturnValue(defaultQuery), + getUpdates$: jest.fn(), + getDefaultQuery: jest.fn(), formatQuery: jest.fn(), clearQuery: jest.fn(), addToQueryHistory: jest.fn(), diff --git a/src/plugins/data/public/ui/dataset_navigator/dataset_navigator.tsx b/src/plugins/data/public/ui/dataset_navigator/dataset_navigator.tsx index 4912abd92614..bfeaad00bd4e 100644 --- a/src/plugins/data/public/ui/dataset_navigator/dataset_navigator.tsx +++ b/src/plugins/data/public/ui/dataset_navigator/dataset_navigator.tsx @@ -40,7 +40,13 @@ import { getSearchService, getUiService, } from '../../services'; -import { fetchDataSources, fetchIndexPatterns, fetchIndices, isCatalogCacheFetching } from './lib'; +import { + fetchDataSources, + fetchIndexPatterns, + fetchIndices, + isCatalogCacheFetching, + fetchIfExternalDataSourcesEnabled, +} from './lib'; import { useDataSetManager } from '../search_bar/lib/use_dataset_manager'; import { DataSetContract } from '../../query'; @@ -70,6 +76,7 @@ export const DataSetNavigator: React.FC = ({ const isInitialized = useRef(false); const [isOpen, setIsOpen] = useState(false); const [isLoading, setIsLoading] = useState(false); + const [isExternalDataSourcesEnabled, setIsExternalDataSourcesEnabled] = useState(false); const [dataSources, setDataSources] = useState([]); const [externalDataSources, setExternalDataSources] = useState([]); const [indexPatterns, setIndexPatterns] = useState([]); @@ -78,7 +85,6 @@ export const DataSetNavigator: React.FC = ({ const [selectedDataSetState, setSelectedDataSetState] = useState< SelectedDataSetState | undefined >(undefined); - const isExternalDataSourcesEnabled = externalDataSources.length > 0; const { loadStatus: dataSourcesLoadStatus, @@ -98,7 +104,7 @@ export const DataSetNavigator: React.FC = ({ const onRefresh = useCallback(() => { if (!isCatalogCacheFetching(dataSourcesLoadStatus) && dataSources.length > 0) { - startLoadingDataSources(dataSources); + startLoadingDataSources(dataSources.map((dataSource) => dataSource.id)); } }, [dataSourcesLoadStatus, dataSources, startLoadingDataSources]); @@ -152,27 +158,19 @@ export const DataSetNavigator: React.FC = ({ setIsLoading(true); try { - const [fetchedIndexPatterns, fetchedDataSources] = await Promise.all([ + const [ + fetchedIndexPatterns, + fetchedDataSources, + fetchedIsExternalDataSourcesEnabled, + ] = await Promise.all([ fetchIndexPatterns(savedObjectsClient!, ''), fetchDataSources(savedObjectsClient!), + fetchIfExternalDataSourcesEnabled(http!), ]); - const externalDataSourcesCache = CatalogCacheManager.getExternalDataSourcesCache(); - if (externalDataSourcesCache.status === CachedDataSourceStatus.Updated) { - setExternalDataSources( - externalDataSourcesCache.dataSources.map((ds) => ({ - id: ds.dataSourceRef, - name: ds.name, - type: SIMPLE_DATA_SOURCE_TYPES.EXTERNAL, - })) - ); - } else if (fetchedDataSources.length > 0) { - setExternalDataSources(await startLoadingDataSources(fetchedDataSources)); - } - setIndexPatterns(fetchedIndexPatterns); setDataSources(fetchedDataSources); - + setIsExternalDataSourcesEnabled(fetchedIsExternalDataSourcesEnabled); if (dataSet) { setSelectedDataSetState({ id: dataSet.id, @@ -208,7 +206,7 @@ export const DataSetNavigator: React.FC = ({ const externalDataSourcesCache = CatalogCacheManager.getExternalDataSourcesCache(); if (status === DirectQueryLoadingStatus.SUCCESS) { setExternalDataSources( - externalDataSourcesCache.dataSources.map((ds) => ({ + externalDataSourcesCache.externalDataSources.map((ds) => ({ id: ds.dataSourceRef, name: ds.name, type: SIMPLE_DATA_SOURCE_TYPES.EXTERNAL, @@ -464,7 +462,25 @@ export const DataSetNavigator: React.FC = ({ { name: S3DataSourcesLabel, panel: 4, - onClick: () => {}, + onClick: () => { + const externalDataSourcesCache = CatalogCacheManager.getExternalDataSourcesCache(); + if ( + (externalDataSourcesCache.status === CachedDataSourceStatus.Empty || + externalDataSourcesCache.status === CachedDataSourceStatus.Failed) && + !isCatalogCacheFetching(dataSourcesLoadStatus) && + dataSources.length > 0 + ) { + startLoadingDataSources(dataSources.map((dataSource) => dataSource.id)); + } else if (externalDataSourcesCache.status === CachedDataSourceStatus.Updated) { + setExternalDataSources( + externalDataSourcesCache.externalDataSources.map((ds) => ({ + id: ds.dataSourceRef, + name: ds.name, + type: SIMPLE_DATA_SOURCE_TYPES.EXTERNAL, + })) + ); + } + }, }, ] : []), @@ -511,7 +527,7 @@ export const DataSetNavigator: React.FC = ({ ), items: externalDataSources.map((dataSource) => ({ name: dataSource.name, - onClick: async () => await handleSelectExternalDataSource(dataSource), + onClick: () => handleSelectExternalDataSource(dataSource), panel: 5, })), content: isCatalogCacheFetching(dataSourcesLoadStatus) && createLoadingSpinner(), @@ -636,6 +652,7 @@ export const DataSetNavigator: React.FC = ({ databasesLoadStatus, cachedTables, tablesLoadStatus, + startLoadingDataSources, handleSelectedDataSet, handleSelectedDataSource, handleSelectedObject, diff --git a/src/plugins/data/public/ui/dataset_navigator/index.tsx b/src/plugins/data/public/ui/dataset_navigator/index.tsx index e98e52c8421f..3167afad74d9 100644 --- a/src/plugins/data/public/ui/dataset_navigator/index.tsx +++ b/src/plugins/data/public/ui/dataset_navigator/index.tsx @@ -5,3 +5,4 @@ export { DataSetNavigator, DataSetNavigatorProps } from './dataset_navigator'; export { createDataSetNavigator } from './create_dataset_navigator'; +export { setAsyncSessionId, getAsyncSessionId, setAsyncSessionIdByObj } from './lib'; diff --git a/src/plugins/data/public/ui/dataset_navigator/lib/catalog_cache/cache_loader.tsx b/src/plugins/data/public/ui/dataset_navigator/lib/catalog_cache/cache_loader.tsx index f5a6aa8aece0..bae33f99a128 100644 --- a/src/plugins/data/public/ui/dataset_navigator/lib/catalog_cache/cache_loader.tsx +++ b/src/plugins/data/public/ui/dataset_navigator/lib/catalog_cache/cache_loader.tsx @@ -5,7 +5,7 @@ import { useEffect, useRef, useState } from 'react'; import { HttpStart, NotificationsStart } from 'opensearch-dashboards/public'; -import { ASYNC_QUERY, SPARK } from '../constants'; +import { ASYNC_POLLING_INTERVAL, SPARK_HIVE_TABLE_REGEX, SPARK_PARTITION_INFO } from '../constants'; import { AsyncPollingResult, CachedColumn, @@ -16,12 +16,12 @@ import { DirectQueryLoadingStatus, DirectQueryRequest, } from '../types'; -import { SIMPLE_DATA_SOURCE_TYPES, SimpleDataSource } from '../../../../../common'; +import { getAsyncSessionId, setAsyncSessionIdByObj } from '../utils/query_session_utils'; import { addBackticksIfNeeded, combineSchemaAndDatarows, formatError } from '../utils/shared'; import { usePolling } from '../utils/use_polling'; +import { SQLService } from '../requests/sql'; import { CatalogCacheManager } from './cache_manager'; import { fetchExternalDataSources } from '../utils'; -import { getUiService } from '../../../../services'; export const updateDatabasesToCache = ( dataSourceName: string, @@ -96,9 +96,10 @@ export const updateTablesToCache = ( ); return; } + const combinedData = combineSchemaAndDatarows(pollingResult.schema, pollingResult.datarows); const newTables = combinedData - .filter((row: any) => !SPARK.HIVE_TABLE_REGEX.test(row.information)) + .filter((row: any) => !SPARK_HIVE_TABLE_REGEX.test(row.information)) .map((row: any) => ({ name: row.tableName, })); @@ -183,7 +184,7 @@ export const updateTableColumnsToCache = ( const tableColumns: CachedColumn[] = []; for (const row of combinedData) { - if (row.col_name === SPARK.PARTITION_INFO) { + if (row.col_name === SPARK_PARTITION_INFO) { break; } tableColumns.push({ @@ -281,6 +282,7 @@ export const useLoadToCache = ( http: HttpStart, notifications: NotificationsStart ) => { + const sqlService = new SQLService(http); const [currentDataSourceName, setCurrentDataSourceName] = useState(''); const [currentDatabaseName, setCurrentDatabaseName] = useState(''); const [currentTableName, setCurrentTableName] = useState(''); @@ -296,13 +298,8 @@ export const useLoadToCache = ( startPolling, stopPolling: stopLoading, } = usePolling((params) => { - return http.fetch(`../../api/enhancements/datasource/jobs`, { - query: { - id: dataSourceMDSClientId.current, - queryId: params.queryId, - }, - }); - }, ASYNC_QUERY.POLLING_INTERVAL); + return sqlService.fetchWithJobId(params, dataSourceMDSClientId.current); + }, ASYNC_POLLING_INTERVAL); const onLoadingFailed = () => { setLoadStatus(DirectQueryLoadingStatus.FAILED); @@ -322,7 +319,6 @@ export const useLoadToCache = ( databaseName, tableName, }: StartLoadingParams) => { - const uiService = getUiService(); setLoadStatus(DirectQueryLoadingStatus.SCHEDULED); setCurrentDataSourceName(dataSourceName); setCurrentDatabaseName(databaseName); @@ -335,19 +331,14 @@ export const useLoadToCache = ( datasource: dataSourceName, }; - const sessionId = uiService.Settings.getUserQuerySessionId(dataSourceName); + const sessionId = getAsyncSessionId(dataSourceName); if (sessionId) { requestPayload = { ...requestPayload, sessionId }; } - await http - .post(`../../api/enhancements/datasource/jobs`, { - body: JSON.stringify(requestPayload), - query: { - id: dataSourceMDSClientId.current, - }, - }) + await sqlService + .fetch(requestPayload, dataSourceMDSId) .then((result) => { - uiService.Settings.setUserQuerySessionIdByObj(dataSourceName, result); + setAsyncSessionIdByObj(dataSourceName, result); if (result.queryId) { startPolling({ queryId: result.queryId, @@ -452,9 +443,7 @@ export const useLoadExternalDataSourcesToCache = ( DirectQueryLoadingStatus.INITIAL ); - const loadExternalDataSources = async ( - connectedClusters: SimpleDataSource[] - ): Promise => { + const loadExternalDataSources = async (connectedClusters: string[]) => { setLoadStatus(DirectQueryLoadingStatus.SCHEDULED); CatalogCacheManager.setExternalDataSourcesLoadingStatus(CachedDataSourceStatus.Empty); @@ -463,11 +452,6 @@ export const useLoadExternalDataSourcesToCache = ( CatalogCacheManager.updateExternalDataSources(externalDataSources); setLoadStatus(DirectQueryLoadingStatus.SUCCESS); CatalogCacheManager.setExternalDataSourcesLoadingStatus(CachedDataSourceStatus.Updated); - return externalDataSources.map((dataSource) => ({ - id: dataSource.dataSourceRef, - name: dataSource.name, - type: SIMPLE_DATA_SOURCE_TYPES.EXTERNAL, - })); } catch (error) { setLoadStatus(DirectQueryLoadingStatus.FAILED); CatalogCacheManager.setExternalDataSourcesLoadingStatus(CachedDataSourceStatus.Failed); @@ -475,7 +459,6 @@ export const useLoadExternalDataSourcesToCache = ( title: 'Failed to load external datasources', }); } - return []; }; return { loadStatus, loadExternalDataSources }; diff --git a/src/plugins/data/public/ui/dataset_navigator/lib/catalog_cache/cache_manager.ts b/src/plugins/data/public/ui/dataset_navigator/lib/catalog_cache/cache_manager.ts index 5496a8066c06..3d0a8e0c982d 100644 --- a/src/plugins/data/public/ui/dataset_navigator/lib/catalog_cache/cache_manager.ts +++ b/src/plugins/data/public/ui/dataset_navigator/lib/catalog_cache/cache_manager.ts @@ -3,13 +3,19 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ASYNC_QUERY, DATASET } from '../constants'; +import { + ASYNC_QUERY_EXTERNAL_DATASOURCES_CACHE, + CATALOG_CACHE_VERSION, + RECENT_DATASET_OPTIONS_CACHE, +} from '../constants'; +import { ASYNC_QUERY_ACCELERATIONS_CACHE, ASYNC_QUERY_DATASOURCE_CACHE } from '../utils/shared'; import { AccelerationsCacheData, CachedAccelerationByDataSource, CachedDataSource, CachedDataSourceStatus, CachedDatabase, + DataSetOption, DataSourceCacheData, ExternalDataSource, ExternalDataSourcesCacheData, @@ -21,6 +27,26 @@ import { SimpleDataSet, SimpleObject } from '../../../../../common'; * Manages caching for catalog data including data sources and accelerations. */ export class CatalogCacheManager { + /** + * Key for the data source cache in local storage. + */ + private static readonly datasourceCacheKey = ASYNC_QUERY_DATASOURCE_CACHE; + + /** + * Key for the accelerations cache in local storage. + */ + private static readonly accelerationsCacheKey = ASYNC_QUERY_ACCELERATIONS_CACHE; + + /** + * Key for external datasources cache in local storage + */ + private static readonly externalDataSourcesCacheKey = ASYNC_QUERY_EXTERNAL_DATASOURCES_CACHE; + + /** + * Key for recently selected datasets in local storage + */ + private static readonly recentDataSetCacheKey = RECENT_DATASET_OPTIONS_CACHE; + // TODO: make this an advanced setting private static readonly maxRecentDataSet = 4; @@ -29,7 +55,7 @@ export class CatalogCacheManager { * @param {DataSourceCacheData} cacheData - The data source cache data to save. */ static saveDataSourceCache(cacheData: DataSourceCacheData): void { - sessionStorage.setItem(ASYNC_QUERY.CATALOG_CACHE.KEY, JSON.stringify(cacheData)); + sessionStorage.setItem(this.datasourceCacheKey, JSON.stringify(cacheData)); } /** @@ -37,12 +63,12 @@ export class CatalogCacheManager { * @returns {DataSourceCacheData} The retrieved data source cache. */ static getDataSourceCache(): DataSourceCacheData { - const catalogData = sessionStorage.getItem(ASYNC_QUERY.CATALOG_CACHE.KEY); + const catalogData = sessionStorage.getItem(this.datasourceCacheKey); if (catalogData) { return JSON.parse(catalogData); } else { - const defaultCacheObject = { version: ASYNC_QUERY.CATALOG_CACHE.VERSION, dataSources: [] }; + const defaultCacheObject = { version: CATALOG_CACHE_VERSION, dataSources: [] }; this.saveDataSourceCache(defaultCacheObject); return defaultCacheObject; } @@ -53,7 +79,7 @@ export class CatalogCacheManager { * @param {AccelerationsCacheData} cacheData - The accelerations cache data to save. */ static saveAccelerationsCache(cacheData: AccelerationsCacheData): void { - sessionStorage.setItem(ASYNC_QUERY.ACCELERATIONS_CACHE, JSON.stringify(cacheData)); + sessionStorage.setItem(this.accelerationsCacheKey, JSON.stringify(cacheData)); } /** @@ -61,13 +87,13 @@ export class CatalogCacheManager { * @returns {AccelerationsCacheData} The retrieved accelerations cache. */ static getAccelerationsCache(): AccelerationsCacheData { - const accelerationCacheData = sessionStorage.getItem(ASYNC_QUERY.ACCELERATIONS_CACHE); + const accelerationCacheData = sessionStorage.getItem(this.accelerationsCacheKey); if (accelerationCacheData) { return JSON.parse(accelerationCacheData); } else { const defaultCacheObject = { - version: ASYNC_QUERY.CATALOG_CACHE.VERSION, + version: CATALOG_CACHE_VERSION, dataSources: [], }; this.saveAccelerationsCache(defaultCacheObject); @@ -145,11 +171,19 @@ export class CatalogCacheManager { */ static addOrUpdateDataSource(dataSource: CachedDataSource, dataSourceMDSId?: string): void { const cacheData = this.getDataSourceCache(); - const index = cacheData.dataSources.findIndex( - (ds) => - ds.name === dataSource.name && (!dataSourceMDSId || ds.dataSourceMDSId === dataSourceMDSId) - ); - cacheData.dataSources.splice(index, 1, dataSource); + let index; + if (dataSourceMDSId) { + index = cacheData.dataSources.findIndex( + (ds: CachedDataSource) => + ds.name === dataSource.name && ds.dataSourceMDSId === dataSourceMDSId + ); + } + index = cacheData.dataSources.findIndex((ds: CachedDataSource) => ds.name === dataSource.name); + if (index !== -1) { + cacheData.dataSources[index] = dataSource; + } else { + cacheData.dataSources.push(dataSource); + } this.saveDataSourceCache(cacheData); } @@ -236,11 +270,11 @@ export class CatalogCacheManager { ): SimpleObject { const cachedDatabase = this.getDatabase(dataSourceName, databaseName, dataSourceMDSId); - const cachedTable = cachedDatabase.tables!.find((table) => table.name === tableName); + const cachedTable = cachedDatabase.tables!.find((table) => table.title === tableName); if (!cachedTable) { throw new Error('Table not found exception: ' + tableName); } - return { id: cachedTable.name, ...cachedTable }; + return cachedTable; } /** @@ -282,7 +316,7 @@ export class CatalogCacheManager { * Clears the data source cache from local storage. */ static clearDataSourceCache(): void { - sessionStorage.removeItem(ASYNC_QUERY.CATALOG_CACHE.KEY); + sessionStorage.removeItem(this.datasourceCacheKey); this.clearExternalDataSourcesCache(); } @@ -290,22 +324,22 @@ export class CatalogCacheManager { * Clears the accelerations cache from local storage. */ static clearAccelerationsCache(): void { - sessionStorage.removeItem(ASYNC_QUERY.ACCELERATIONS_CACHE); + sessionStorage.removeItem(this.accelerationsCacheKey); } static saveExternalDataSourcesCache(cacheData: ExternalDataSourcesCacheData): void { - sessionStorage.setItem(ASYNC_QUERY.CATALOG_CACHE.KEY, JSON.stringify(cacheData)); + sessionStorage.setItem(this.externalDataSourcesCacheKey, JSON.stringify(cacheData)); } static getExternalDataSourcesCache(): ExternalDataSourcesCacheData { - const externalDataSourcesData = sessionStorage.getItem(ASYNC_QUERY.CATALOG_CACHE.KEY); + const externalDataSourcesData = sessionStorage.getItem(this.externalDataSourcesCacheKey); if (externalDataSourcesData) { return JSON.parse(externalDataSourcesData); } else { const defaultCacheObject: ExternalDataSourcesCacheData = { - version: ASYNC_QUERY.CATALOG_CACHE.VERSION, - dataSources: [], + version: CATALOG_CACHE_VERSION, + externalDataSources: [], lastUpdated: '', status: CachedDataSourceStatus.Empty, }; @@ -317,7 +351,7 @@ export class CatalogCacheManager { static updateExternalDataSources(externalDataSources: ExternalDataSource[]): void { const currentTime = new Date().toUTCString(); const cacheData = this.getExternalDataSourcesCache(); - cacheData.dataSources = externalDataSources; + cacheData.externalDataSources = externalDataSources; cacheData.lastUpdated = currentTime; cacheData.status = CachedDataSourceStatus.Updated; this.saveExternalDataSourcesCache(cacheData); @@ -328,7 +362,7 @@ export class CatalogCacheManager { } static clearExternalDataSourcesCache(): void { - sessionStorage.removeItem(ASYNC_QUERY.CATALOG_CACHE.KEY); + sessionStorage.removeItem(this.externalDataSourcesCacheKey); } static setExternalDataSourcesLoadingStatus(status: CachedDataSourceStatus): void { @@ -338,17 +372,17 @@ export class CatalogCacheManager { } static saveRecentDataSetsCache(cacheData: RecentDataSetOptionsCacheData): void { - sessionStorage.setItem(DATASET.OPTIONS_CACHE.KEY, JSON.stringify(cacheData)); + sessionStorage.setItem(this.recentDataSetCacheKey, JSON.stringify(cacheData)); } static getRecentDataSetsCache(): RecentDataSetOptionsCacheData { - const recentDataSetOptionsData = sessionStorage.getItem(DATASET.OPTIONS_CACHE.KEY); + const recentDataSetOptionsData = sessionStorage.getItem(this.recentDataSetCacheKey); if (recentDataSetOptionsData) { return JSON.parse(recentDataSetOptionsData); } else { const defaultCacheObject: RecentDataSetOptionsCacheData = { - version: ASYNC_QUERY.CATALOG_CACHE.VERSION, + version: CATALOG_CACHE_VERSION, recentDataSets: [], }; this.saveRecentDataSetsCache(defaultCacheObject); @@ -377,6 +411,6 @@ export class CatalogCacheManager { } static clearRecentDataSetsCache(): void { - sessionStorage.removeItem(DATASET.OPTIONS_CACHE.KEY); + sessionStorage.removeItem(this.recentDataSetCacheKey); } } diff --git a/src/plugins/data/public/ui/dataset_navigator/lib/constants.ts b/src/plugins/data/public/ui/dataset_navigator/lib/constants.ts index eb970b791b3c..e22da95ff4c6 100644 --- a/src/plugins/data/public/ui/dataset_navigator/lib/constants.ts +++ b/src/plugins/data/public/ui/dataset_navigator/lib/constants.ts @@ -3,115 +3,99 @@ * SPDX-License-Identifier: Apache-2.0 */ -export const ASYNC_QUERY = { - SEARCH_STRATEGY: 'sqlasyncraw', - SESSION_ID: { - KEY: 'async-query-session-id', - }, - CATALOG_CACHE: { - KEY: 'async-query-catalog-cache', - VERSION: '1.0', - }, - ACCELERATIONS_CACHE: 'async-query-acclerations-cache', - POLLING_INTERVAL: 2000, -}; +export const ASYNC_QUERY_SESSION_ID = 'async-query-session-id'; +export const ASYNC_QUERY_EXTERNAL_DATASOURCES_CACHE = 'async_query_external_datasources_cache'; +export const RECENT_DATASET_OPTIONS_CACHE = 'recent_dataset_options_cache'; -export const DATASET = { - OPTIONS_CACHE: { - KEY: 'recent_dataset_options_cache', - }, -}; +export const DATA_SOURCE_NAME_URL_PARAM_KEY = 'datasourceName'; +export const DATA_SOURCE_TYPE_URL_PARAM_KEY = 'datasourceType'; +export const OLLY_QUESTION_URL_PARAM_KEY = 'olly_q'; +export const INDEX_URL_PARAM_KEY = 'indexPattern'; +export const DEFAULT_DATA_SOURCE_TYPE = 'DEFAULT_INDEX_PATTERNS'; +export const DEFAULT_DATA_SOURCE_NAME = 'Default cluster'; +export const DEFAULT_DATA_SOURCE_OBSERVABILITY_DISPLAY_NAME = 'OpenSearch'; +export const DEFAULT_DATA_SOURCE_TYPE_NAME = 'Default Group'; +export const enum QUERY_LANGUAGE { + PPL = 'PPL', + SQL = 'SQL', + DQL = 'DQL', +} +export enum DATA_SOURCE_TYPES { + DEFAULT_CLUSTER_TYPE = DEFAULT_DATA_SOURCE_TYPE, + SPARK = 'spark', + S3Glue = 's3glue', +} +export const ASYNC_POLLING_INTERVAL = 2000; -export const DEFAULT_DATA_SOURCE = { - TYPE: 'DEFAULT_INDEX_PATTERNS', - NAME: 'Default cluster', - TITLE: 'Default Group', -}; +export const CATALOG_CACHE_VERSION = '1.0'; +export const ACCELERATION_DEFUALT_SKIPPING_INDEX_NAME = 'skipping'; +export const ACCELERATION_TIME_INTERVAL = [ + { text: 'millisecond(s)', value: 'millisecond' }, + { text: 'second(s)', value: 'second' }, + { text: 'minutes(s)', value: 'minute' }, + { text: 'hour(s)', value: 'hour' }, + { text: 'day(s)', value: 'day' }, + { text: 'week(s)', value: 'week' }, +]; +export const ACCELERATION_REFRESH_TIME_INTERVAL = [ + { text: 'minutes(s)', value: 'minute' }, + { text: 'hour(s)', value: 'hour' }, + { text: 'day(s)', value: 'day' }, + { text: 'week(s)', value: 'week' }, +]; -export const ACCELERATION = { - DEFUALT_SKIPPING_INDEX_NAME: 'skipping', - TIME_INTERVAL: [ - { text: 'millisecond(s)', value: 'millisecond' }, - { text: 'second(s)', value: 'second' }, - { text: 'minutes(s)', value: 'minute' }, - { text: 'hour(s)', value: 'hour' }, - { text: 'day(s)', value: 'day' }, - { text: 'week(s)', value: 'week' }, - ], - REFRESH_TIME_INTERVAL: [ - { text: 'minutes(s)', value: 'minute' }, - { text: 'hour(s)', value: 'hour' }, - { text: 'day(s)', value: 'day' }, - { text: 'week(s)', value: 'week' }, - ], - ADD_FIELDS_TEXT: '(add fields here)', - INDEX_NAME_REGEX: /^[a-z0-9_]+$/, - S3_URL_REGEX: /^(s3|s3a):\/\/[a-zA-Z0-9.\-]+/, - INDEX_TYPES: [ - { label: 'Skipping Index', value: 'skipping' }, - { label: 'Covering Index', value: 'covering' }, - { label: 'Materialized View', value: 'materialized' }, - ], - INDEX_NAME_INFO: `All OpenSearch acceleration indices have a naming format of pattern: \`prefix__suffix\`. They share a common prefix structure, which is \`flint____\`. Additionally, they may have a suffix that varies based on the index type. - ##### Skipping Index - - For 'Skipping' indices, a fixed index name 'skipping' is used, and this name cannot be modified by the user. The suffix added to this type is \`_index\`. - - An example of a 'Skipping' index name would be: \`flint_mydatasource_mydb_mytable_skipping_index\`. - ##### Covering Index - - 'Covering' indices allow users to specify their index name. The suffix added to this type is \`_index\`. - - For instance, a 'Covering' index name could be: \`flint_mydatasource_mydb_mytable_myindexname_index\`. - ##### Materialized View Index - - 'Materialized View' indices also enable users to define their index name, but they do not have a suffix. - - An example of a 'Materialized View' index name might look like: \`flint_mydatasource_mydb_mytable_myindexname\`. - ##### Note: - - All user given index names must be in lowercase letters, numbers and underscore. Spaces, commas, and characters -, :, ", *, +, /, \, |, ?, #, >, or < are not allowed. - `, - AGGREGRATION_FUNCTIONS: [ - { label: 'window.start' }, - { label: 'count' }, - { label: 'sum' }, - { label: 'avg' }, - { label: 'max' }, - { label: 'min' }, - ], -}; +export const ACCELERATION_ADD_FIELDS_TEXT = '(add fields here)'; +export const ACCELERATION_INDEX_NAME_REGEX = /^[a-z0-9_]+$/; +export const ACCELERATION_S3_URL_REGEX = /^(s3|s3a):\/\/[a-zA-Z0-9.\-]+/; +export const SPARK_HIVE_TABLE_REGEX = /Provider:\s*hive/; +export const SANITIZE_QUERY_REGEX = /\s+/g; +export const SPARK_TIMESTAMP_DATATYPE = 'timestamp'; +export const SPARK_STRING_DATATYPE = 'string'; -export const SKIPPING_INDEX = { - ACCELERATION_METHODS: [ - { value: 'PARTITION', text: 'Partition' }, - { value: 'VALUE_SET', text: 'Value Set' }, - { value: 'MIN_MAX', text: 'Min Max' }, - { value: 'BLOOM_FILTER', text: 'Bloom Filter' }, - ], -}; +export const ACCELERATION_INDEX_TYPES = [ + { label: 'Skipping Index', value: 'skipping' }, + { label: 'Covering Index', value: 'covering' }, + { label: 'Materialized View', value: 'materialized' }, +]; -export const SPARK = { - HIVE_TABLE_REGEX: /Provider:\s*hive/, - TIMESTAMP_DATATYPE: 'timestamp', - STRING_DATATYPE: 'string', - PARTITION_INFO: `# Partition Information`, -}; +export const ACC_INDEX_TYPE_DOCUMENTATION_URL = + 'https://github.com/opensearch-project/opensearch-spark/blob/main/docs/index.md'; +export const ACC_CHECKPOINT_DOCUMENTATION_URL = + 'https://github.com/opensearch-project/opensearch-spark/blob/main/docs/index.md#create-index-options'; -export const REGEX = { - SANITIZE_QUERY: /\s+/g, -}; +export const ACCELERATION_INDEX_NAME_INFO = `All OpenSearch acceleration indices have a naming format of pattern: \`prefix__suffix\`. They share a common prefix structure, which is \`flint___
_\`. Additionally, they may have a suffix that varies based on the index type. +##### Skipping Index +- For 'Skipping' indices, a fixed index name 'skipping' is used, and this name cannot be modified by the user. The suffix added to this type is \`_index\`. + - An example of a 'Skipping' index name would be: \`flint_mydatasource_mydb_mytable_skipping_index\`. +##### Covering Index +- 'Covering' indices allow users to specify their index name. The suffix added to this type is \`_index\`. + - For instance, a 'Covering' index name could be: \`flint_mydatasource_mydb_mytable_myindexname_index\`. +##### Materialized View Index +- 'Materialized View' indices also enable users to define their index name, but they do not have a suffix. + - An example of a 'Materialized View' index name might look like: \`flint_mydatasource_mydb_mytable_myindexname\`. +##### Note: +- All user given index names must be in lowercase letters, numbers and underscore. Spaces, commas, and characters -, :, ", *, +, /, \, |, ?, #, >, or < are not allowed. + `; -export const DOCUMENTATION = { - ACC_INDEX_TYPE_URL: - 'https://github.com/opensearch-project/opensearch-spark/blob/main/docs/index.md', - ACC_CHECKPOINT_URL: - 'https://github.com/opensearch-project/opensearch-spark/blob/main/docs/index.md#create-index-options', -}; +export const SKIPPING_INDEX_ACCELERATION_METHODS = [ + { value: 'PARTITION', text: 'Partition' }, + { value: 'VALUE_SET', text: 'Value Set' }, + { value: 'MIN_MAX', text: 'Min Max' }, + { value: 'BLOOM_FILTER', text: 'Bloom Filter' }, +]; -export const OBSERVABILITY = { - DEFAULT_CLUSTER: 'observability-default', - S3_DATA_SOURCE: 'observability-s3', -}; +export const ACCELERATION_AGGREGRATION_FUNCTIONS = [ + { label: 'window.start' }, + { label: 'count' }, + { label: 'sum' }, + { label: 'avg' }, + { label: 'max' }, + { label: 'min' }, +]; -export const S3_DATA_SOURCE = { - GROUP_DISPLAY_NAME: 'Amazon S3', - GROUP_SPARK_DISPLAY_NAME: 'Spark', -}; - -export const SECURITY = { - DASHBOARDS_LOGOUT_URL: '/logout', -}; +export const SPARK_PARTITION_INFO = `# Partition Information`; +export const OBS_DEFAULT_CLUSTER = 'observability-default'; // prefix key for generating data source id for default cluster in data selector +export const OBS_S3_DATA_SOURCE = 'observability-s3'; // prefix key for generating data source id for s3 data sources in data selector +export const S3_DATA_SOURCE_GROUP_DISPLAY_NAME = 'Amazon S3'; // display group name for Amazon-managed-s3 data sources in data selector +export const S3_DATA_SOURCE_GROUP_SPARK_DISPLAY_NAME = 'Spark'; // display group name for OpenSearch-spark-s3 data sources in data selector +export const SECURITY_DASHBOARDS_LOGOUT_URL = '/logout'; diff --git a/src/plugins/data/public/ui/dataset_navigator/lib/types.tsx b/src/plugins/data/public/ui/dataset_navigator/lib/types.tsx index 62b213933f73..6566b2ebe4a5 100644 --- a/src/plugins/data/public/ui/dataset_navigator/lib/types.tsx +++ b/src/plugins/data/public/ui/dataset_navigator/lib/types.tsx @@ -311,7 +311,7 @@ export interface ExternalDataSource { export interface ExternalDataSourcesCacheData { version: string; - dataSources: ExternalDataSource[]; + externalDataSources: ExternalDataSource[]; lastUpdated: string; status: CachedDataSourceStatus; } diff --git a/src/plugins/data/public/ui/dataset_navigator/lib/utils/fetch_external_data_sources.ts b/src/plugins/data/public/ui/dataset_navigator/lib/utils/fetch_external_data_sources.ts index 37a7d8bfad49..f64089b3b1ea 100644 --- a/src/plugins/data/public/ui/dataset_navigator/lib/utils/fetch_external_data_sources.ts +++ b/src/plugins/data/public/ui/dataset_navigator/lib/utils/fetch_external_data_sources.ts @@ -4,48 +4,32 @@ */ import { HttpStart } from 'opensearch-dashboards/public'; -import { CachedDataSourceStatus, DatasourceDetails, ExternalDataSource } from '../types'; -import { SimpleDataSource } from '../../../../../common'; +import { DatasourceDetails } from '../types'; export const fetchIfExternalDataSourcesEnabled = async (http: HttpStart) => { try { - await http.get('/api/enhancements/datasource/external'); + await http.get('/api/dataconnections'); return true; } catch (e) { return false; } }; -export const fetchExternalDataSources = async ( - http: HttpStart, - connectedClusters: SimpleDataSource[] -): Promise => { - let externalDataSources: ExternalDataSource[] = []; - - for (const cluster of connectedClusters) { - try { - const response = await http.fetch(`../../api/enhancements/datasource/external`, { - query: { - id: cluster.id, - }, - }); - - const clusterDataSources = response +export const fetchExternalDataSources = async (http: HttpStart, connectedClusters: string[]) => { + const results = await Promise.all( + connectedClusters.map(async (cluster) => { + const dataSources = await http.get(`/api/dataconnections/dataSourceMDSId=${cluster}`); + return dataSources .filter((dataSource: DatasourceDetails) => dataSource.connector === 'S3GLUE') .map((dataSource: DatasourceDetails) => ({ name: dataSource.name, - // status: dataSource.status, - dataSourceRef: cluster.id, - status: CachedDataSourceStatus.Empty, + status: dataSource.status, + dataSourceRef: cluster, })); + }) + ); - externalDataSources = externalDataSources.concat(clusterDataSources); - } catch (error) { - // Ignore error and continue with the next cluster - } - } - - const flattenedResults = externalDataSources.flat(); + const flattenedResults = results.flat(); const uniqueResults = Array.from( flattenedResults .reduce((map, ds) => { diff --git a/src/plugins/data/public/ui/dataset_navigator/lib/utils/index.ts b/src/plugins/data/public/ui/dataset_navigator/lib/utils/index.ts index 79e55007654c..7dbe7ec2d4f4 100644 --- a/src/plugins/data/public/ui/dataset_navigator/lib/utils/index.ts +++ b/src/plugins/data/public/ui/dataset_navigator/lib/utils/index.ts @@ -8,5 +8,6 @@ export * from './fetch_data_sources'; export * from './fetch_external_data_sources'; export * from './fetch_index_patterns'; export * from './fetch_indices'; +export * from './query_session_utils'; export * from './shared'; export * from './use_polling'; diff --git a/src/plugins/data/public/ui/dataset_navigator/lib/utils/shared.ts b/src/plugins/data/public/ui/dataset_navigator/lib/utils/shared.ts index 8077aa851051..3e4afc94e80b 100644 --- a/src/plugins/data/public/ui/dataset_navigator/lib/utils/shared.ts +++ b/src/plugins/data/public/ui/dataset_navigator/lib/utils/shared.ts @@ -73,7 +73,7 @@ export const DSL_SETTINGS = '/indices.getFieldSettings'; export const OBSERVABILITY_BASE = '/api/observability'; export const INTEGRATIONS_BASE = '/api/integrations'; export const JOBS_BASE = '/query/jobs'; -export const DATACONNECTIONS_BASE = '/api/directquery/dataconnections'; +export const DATACONNECTIONS_BASE = '/api/dataconnections'; export const EDIT = '/edit'; export const DATACONNECTIONS_UPDATE_STATUS = '/status'; export const SECURITY_ROLES = '/api/v1/configuration/roles'; @@ -88,6 +88,7 @@ export const SECURITY_PLUGIN_ACCOUNT_API = '/api/v1/configuration/account'; export const PPL_ENDPOINT = '/_plugins/_ppl'; export const SQL_ENDPOINT = '/_plugins/_sql'; export const DSL_ENDPOINT = '/_plugins/_dsl'; +export const DATACONNECTIONS_ENDPOINT = '/_plugins/_query/_datasources'; export const JOBS_ENDPOINT_BASE = '/_plugins/_async_query'; export const JOB_RESULT_ENDPOINT = '/result'; @@ -318,6 +319,10 @@ export const VISUALIZATION_ERROR = { export const S3_DATA_SOURCE_TYPE = 's3glue'; +export const ASYNC_QUERY_SESSION_ID = 'async-query-session-id'; +export const ASYNC_QUERY_DATASOURCE_CACHE = 'async-query-catalog-cache'; +export const ASYNC_QUERY_ACCELERATIONS_CACHE = 'async-query-acclerations-cache'; + export const DIRECT_DUMMY_QUERY = 'select 1'; export const DEFAULT_START_TIME = 'now-15m'; diff --git a/src/plugins/data/public/ui/query_editor/_query_editor.scss b/src/plugins/data/public/ui/query_editor/_query_editor.scss index e9655d245fde..897e9197da7c 100644 --- a/src/plugins/data/public/ui/query_editor/_query_editor.scss +++ b/src/plugins/data/public/ui/query_editor/_query_editor.scss @@ -212,7 +212,7 @@ &.visible::after { position: absolute; height: auto; - bottom: calc(-1 * ($euiFontSizeXS * 2 + $euiSizeXS) + 1px); + bottom: auto; left: 0; width: 100%; background-color: $euiColorLightestShade; diff --git a/src/plugins/data/public/ui/query_editor/language_selector.tsx b/src/plugins/data/public/ui/query_editor/language_selector.tsx index 2cdac637bc01..1965d9a3d46a 100644 --- a/src/plugins/data/public/ui/query_editor/language_selector.tsx +++ b/src/plugins/data/public/ui/query_editor/language_selector.tsx @@ -36,13 +36,6 @@ export const QueryLanguageSelector = (props: QueryLanguageSelectorProps) => { const queryString = getQueryService().queryString; const languageService = queryString.getLanguageService(); - const datasetSupportedLanguages = props.query.dataset - ? queryString - .getDatasetService() - .getType(props.query.dataset.type) - ?.supportedLanguages(props.query.dataset) - : undefined; - useEffect(() => { const subscription = queryString.getUpdates$().subscribe((query: Query) => { if (query.language !== currentLanguage) { @@ -64,11 +57,10 @@ export const QueryLanguageSelector = (props: QueryLanguageSelectorProps) => { languageService.getLanguages().forEach((language) => { if ( (language && props.appName && !language.editorSupportedAppNames?.includes(props.appName)) || - languageService.getUserQueryLanguageBlocklist().includes(language?.id) || - (datasetSupportedLanguages && !datasetSupportedLanguages.includes(language.id)) + languageService.getUserQueryLanguageBlocklist().includes(language?.id) ) return; - languageOptions.unshift(mapExternalLanguageToOptions(language)); + languageOptions.unshift(mapExternalLanguageToOptions(language!)); }); const selectedLanguage = { 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 f68c601db185..0abe9796bbf9 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor.tsx @@ -301,17 +301,15 @@ export default class QueryEditorUI extends Component { suggestions: suggestions && suggestions.length > 0 ? suggestions - .filter((s) => 'detail' in s) // designed to remove suggestion not of type MonacoCompatible + .filter((s) => 'detail' in s) // remove suggestion not of type MonacoCompatible .map((s: MonacoCompatibleQuerySuggestion) => { return { label: s.text, kind: s.type as monaco.languages.CompletionItemKind, insertText: s.insertText ?? s.text, - insertTextRules: s.insertTextRules ?? undefined, 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 }; }) : [], diff --git a/src/plugins/data/public/ui/settings/settings.ts b/src/plugins/data/public/ui/settings/settings.ts index 7fc758712ad2..006d9c522cc1 100644 --- a/src/plugins/data/public/ui/settings/settings.ts +++ b/src/plugins/data/public/ui/settings/settings.ts @@ -136,22 +136,6 @@ export class Settings { } } - setUserQuerySessionId(dataSourceName: string, sessionId: string | null) { - if (sessionId !== null) { - sessionStorage.setItem(`async-query-session-id_${dataSourceName}`, sessionId); - } - } - - setUserQuerySessionIdByObj = (dataSourceName: string, obj: Record) => { - const sessionId = - 'sessionId'.split('.').reduce((acc: any, part: string) => acc && acc[part], obj) || null; - this.setUserQuerySessionId(dataSourceName, sessionId); - }; - - getUserQuerySessionId = (dataSourceName: string) => { - return sessionStorage.getItem(`async-query-session-id_${dataSourceName}`); - }; - toJSON(): DataSettings { return { userQueryLanguage: this.getUserQueryLanguage(), diff --git a/src/plugins/data/public/ui/types.ts b/src/plugins/data/public/ui/types.ts index ec57cb2e8c2c..d9f656fabb03 100644 --- a/src/plugins/data/public/ui/types.ts +++ b/src/plugins/data/public/ui/types.ts @@ -3,6 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { QueryStatus } from '../query'; import { IndexPatternSelectProps } from './index_pattern_select'; import { StatefulSearchBarProps } from './search_bar'; import { SuggestionsComponentProps } from './typeahead/suggestions_component'; diff --git a/src/plugins/data_source_management/public/components/data_source_menu/create_data_source_menu.tsx b/src/plugins/data_source_management/public/components/data_source_menu/create_data_source_menu.tsx index 436d34466510..1d053c0449b7 100644 --- a/src/plugins/data_source_management/public/components/data_source_menu/create_data_source_menu.tsx +++ b/src/plugins/data_source_management/public/components/data_source_menu/create_data_source_menu.tsx @@ -20,7 +20,7 @@ export function createDataSourceMenu() { if (props.setMenuMountPoint) { return ( - +
-
{content}
+
{content}
); }; diff --git a/src/plugins/discover/public/application/components/no_results/no_results.tsx b/src/plugins/discover/public/application/components/no_results/no_results.tsx index 2c64bd6a0412..90804ba23260 100644 --- a/src/plugins/discover/public/application/components/no_results/no_results.tsx +++ b/src/plugins/discover/public/application/components/no_results/no_results.tsx @@ -28,11 +28,19 @@ * under the License. */ -import React from 'react'; -import { I18nProvider } from '@osd/i18n/react'; +import React, { Fragment } from 'react'; +import { FormattedMessage, I18nProvider } from '@osd/i18n/react'; -import { EuiEmptyPrompt, EuiPanel, EuiText } from '@elastic/eui'; -import { i18n } from '@osd/i18n'; +import { + EuiCallOut, + EuiCode, + EuiDescriptionList, + EuiLink, + EuiPanel, + EuiSpacer, + EuiText, +} from '@elastic/eui'; +import { getServices } from '../../../opensearch_dashboards_services'; interface Props { timeFieldName?: string; @@ -40,150 +48,164 @@ interface Props { } export const DiscoverNoResults = ({ timeFieldName, queryLanguage }: Props) => { - // Commented out due to no usage in code - // See: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/8149 - // - // let luceneQueryMessage; - // - // if (queryLanguage === 'lucene') { - // const searchExamples = [ - // { - // description: 200, - // title: ( - // - // - // - // - // - // ), - // }, - // { - // description: status:200, - // title: ( - // - // - // - // - // - // ), - // }, - // { - // description: status:[400 TO 499], - // title: ( - // - // - // - // - // - // ), - // }, - // { - // description: status:[400 TO 499] AND extension:PHP, - // title: ( - // - // - // - // - // - // ), - // }, - // { - // description: status:[400 TO 499] AND (extension:php OR extension:html), - // title: ( - // - // - // - // - // - // ), - // }, - // ]; - // - // luceneQueryMessage = ( - // - // - // - // - //

- // - //

- // - //

- // - // - // - // ), - // }} - // /> - //

- //
- // - // - // - // - // - // - //
- // ); - // } + let timeFieldMessage; + + if (timeFieldName) { + timeFieldMessage = ( + + + + +

+ +

+ +

+ +

+
+
+ ); + } + + let luceneQueryMessage; + + if (queryLanguage === 'lucene') { + const searchExamples = [ + { + description: 200, + title: ( + + + + + + ), + }, + { + description: status:200, + title: ( + + + + + + ), + }, + { + description: status:[400 TO 499], + title: ( + + + + + + ), + }, + { + description: status:[400 TO 499] AND extension:PHP, + title: ( + + + + + + ), + }, + { + description: status:[400 TO 499] AND (extension:php OR extension:html), + title: ( + + + + + + ), + }, + ]; + + luceneQueryMessage = ( + + + + +

+ +

+ +

+ + + + ), + }} + /> +

+
+ + + + + + +
+ ); + } return ( - -

- {i18n.translate('discover.emptyPrompt.title', { - defaultMessage: 'No Results', - })} -

- - } - body={ - -

- {i18n.translate('discover.emptyPrompt.body', { - defaultMessage: - 'Try selecting a different data source, expanding your time range or modifying the query & filters.', - })} -

-
+ } + color="warning" + iconType="help" + data-test-subj="discoverNoResults" /> + {timeFieldMessage} + {luceneQueryMessage}
); diff --git a/src/plugins/discover/public/application/view_components/utils/use_search.ts b/src/plugins/discover/public/application/view_components/utils/use_search.ts index 88300cc570fa..91b896f143f1 100644 --- a/src/plugins/discover/public/application/view_components/utils/use_search.ts +++ b/src/plugins/discover/public/application/view_components/utils/use_search.ts @@ -60,7 +60,6 @@ export interface SearchData { statusCode?: number; }; elapsedMs?: number; - startTime?: number; }; } @@ -120,14 +119,12 @@ export const useSearch = (services: DiscoverViewServices) => { ); }, [savedSearch, services.uiSettings, timefilter]); - const startTime = Date.now(); const data$ = useMemo( () => new BehaviorSubject({ status: shouldSearchOnPageLoad() ? ResultStatus.LOADING : ResultStatus.UNINITIALIZED, - queryStatus: { startTime }, }), - [shouldSearchOnPageLoad, startTime] + [shouldSearchOnPageLoad] ); const refetch$ = useMemo(() => new Subject(), []); @@ -164,6 +161,7 @@ export const useSearch = (services: DiscoverViewServices) => { dataset = searchSource.getField('index'); let elapsedMs; + try { // Only show loading indicator if we are fetching when the rows are empty if (fetchStateRef.current.rows?.length === 0) { @@ -269,14 +267,14 @@ export const useSearch = (services: DiscoverViewServices) => { } }, [ indexPattern, + interval, timefilter, toastNotifications, - interval, data, services, - sort, savedSearch?.searchSource, data$, + sort, shouldSearchOnPageLoad, inspectorAdapters.requests, ]); diff --git a/src/plugins/query_enhancements/common/constants.ts b/src/plugins/query_enhancements/common/constants.ts index 769a03e0c0d0..36dcd27ffa00 100644 --- a/src/plugins/query_enhancements/common/constants.ts +++ b/src/plugins/query_enhancements/common/constants.ts @@ -29,8 +29,7 @@ export const API = { GENERATE: `${BASE_API}/assist/generate`, }, DATA_SOURCE: { - ASYNC_JOBS: `${BASE_API}/jobs`, - CONNECTIONS: `${BASE_API}/connections`, + CONNECTIONS: `${BASE_API}/datasource/connections`, }, }; diff --git a/src/plugins/query_enhancements/public/datasets/requests/index.tsx b/src/plugins/query_enhancements/public/datasets/requests/index.tsx new file mode 100644 index 000000000000..3918a896bd0b --- /dev/null +++ b/src/plugins/query_enhancements/public/datasets/requests/index.tsx @@ -0,0 +1,6 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +export * from './sql'; diff --git a/src/plugins/query_enhancements/public/datasets/requests/sql.ts b/src/plugins/query_enhancements/public/datasets/requests/sql.ts new file mode 100644 index 000000000000..f2c9c30c79b9 --- /dev/null +++ b/src/plugins/query_enhancements/public/datasets/requests/sql.ts @@ -0,0 +1,60 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { HttpStart } from 'opensearch-dashboards/public'; +import { DirectQueryRequest } from '../types'; + +export class SQLService { + private http: HttpStart; + + constructor(http: HttpStart) { + this.http = http; + } + + fetch = async ( + params: DirectQueryRequest, + dataSourceMDSId?: string, + errorHandler?: (error: any) => void + ) => { + const query = { + dataSourceMDSId, + }; + return this.http + .post('/api/observability/query/jobs', { + body: JSON.stringify(params), + query, + }) + .catch((error) => { + // eslint-disable-next-line no-console + console.error('fetch error: ', error.body); + if (errorHandler) errorHandler(error); + throw error; + }); + }; + + fetchWithJobId = async ( + params: { queryId: string }, + dataSourceMDSId?: string, + errorHandler?: (error: any) => void + ) => { + return this.http + .get(`/api/observability/query/jobs/${params.queryId}/${dataSourceMDSId ?? ''}`) + .catch((error) => { + // eslint-disable-next-line no-console + console.error('fetch error: ', error.body); + if (errorHandler) errorHandler(error); + throw error; + }); + }; + + deleteWithJobId = async (params: { queryId: string }, errorHandler?: (error: any) => void) => { + return this.http.delete(`/api/observability/query/jobs/${params.queryId}`).catch((error) => { + // eslint-disable-next-line no-console + console.error('delete error: ', error.body); + if (errorHandler) errorHandler(error); + throw error; + }); + }; +} diff --git a/src/plugins/query_enhancements/public/datasets/s3_type.ts b/src/plugins/query_enhancements/public/datasets/s3_type.ts index bedb2efc78a6..3d0caf0e1245 100644 --- a/src/plugins/query_enhancements/public/datasets/s3_type.ts +++ b/src/plugins/query_enhancements/public/datasets/s3_type.ts @@ -4,7 +4,6 @@ */ import { HttpSetup, SavedObjectsClientContract } from 'opensearch-dashboards/public'; -import { trimEnd } from 'lodash'; import { DATA_STRUCTURE_META_TYPES, DEFAULT_DATA, @@ -15,7 +14,7 @@ import { DatasetField, } from '../../../data/common'; import { DatasetTypeConfig, IDataPluginServices } from '../../../data/public'; -import { API, DATASET, handleQueryStatus } from '../../common'; +import { DATASET, handleQueryStatus } from '../../common'; import S3_ICON from '../assets/s3_mark.svg'; export const s3TypeConfig: DatasetTypeConfig = { @@ -116,9 +115,7 @@ const fetch = async ( try { const response = await handleQueryStatus({ fetchStatus: () => - http.fetch({ - method: 'GET', - path: trimEnd(`${API.DATA_SOURCE.ASYNC_JOBS}`), + http.fetch('../../api/enhancements/datasource/jobs', { query: { id: dataSource?.id, queryId: meta.queryId, @@ -174,13 +171,9 @@ const fetchConnections = async ( http: HttpSetup, dataSource: DataStructure ): Promise => { - const abortController = new AbortController(); - const query = - dataSource.id !== '' ? (dataSource.meta as DataStructureCustomMeta).query : undefined; - const response = await http.fetch({ - method: 'GET', - path: trimEnd(`${API.DATA_SOURCE.CONNECTIONS}/${query?.id || ''}`), - signal: abortController.signal, + const query = (dataSource.meta as DataStructureCustomMeta).query; + const response = await http.fetch(`../../api/enhancements/datasource/external`, { + query, }); return response @@ -197,13 +190,10 @@ const fetchConnections = async ( }; const fetchDatabases = async (http: HttpSetup, path: DataStructure[]): Promise => { - const abortController = new AbortController(); const dataSource = path.find((ds) => ds.type === 'DATA_SOURCE'); const connection = path[path.length - 1]; const meta = connection.meta as DataStructureCustomMeta; - const response = await http.fetch({ - method: 'POST', - path: trimEnd(`${API.DATA_SOURCE.ASYNC_JOBS}`), + const response = await http.post(`../../api/enhancements/datasource/jobs`, { body: JSON.stringify({ lang: 'sql', query: `SHOW DATABASES in ${connection.title}`, @@ -213,7 +203,6 @@ const fetchDatabases = async (http: HttpSetup, path: DataStructure[]): Promise => { - const abortController = new AbortController(); const dataSource = path.find((ds) => ds.type === 'DATA_SOURCE'); const connection = path.find((ds) => ds.type === 'CONNECTION'); const sessionId = (connection?.meta as DataStructureCustomMeta).sessionId; const database = path[path.length - 1]; - const response = await http.fetch({ - method: 'POST', - path: trimEnd(`${API.DATA_SOURCE.ASYNC_JOBS}`), + const response = await http.post(`../../api/enhancements/datasource/jobs`, { body: JSON.stringify({ lang: 'sql', query: `SHOW TABLES in ${database.title}`, @@ -239,7 +225,6 @@ const fetchTables = async (http: HttpSetup, path: DataStructure[]): Promise(obj: Record, path: string, defaultValue?: T): T { + return path.split('.').reduce((acc: any, part: string) => acc && acc[part], obj) || defaultValue; +} + +export const setAsyncSessionId = (dataSource: string, sessionId: string | null) => { + if (sessionId !== null) { + sessionStorage.setItem(`${ASYNC_QUERY_SESSION_ID}_${dataSource}`, sessionId); + } +}; + +export const setAsyncSessionIdByObj = (dataSource: string, obj: Record) => { + const sessionId = get(obj, 'sessionId', null); + setAsyncSessionId(dataSource, sessionId); +}; + +export const getAsyncSessionId = (dataSource: string) => { + return sessionStorage.getItem(`${ASYNC_QUERY_SESSION_ID}_${dataSource}`); +}; diff --git a/src/plugins/query_enhancements/public/plugin.tsx b/src/plugins/query_enhancements/public/plugin.tsx index acd3e6f75109..b6578e1e8fc3 100644 --- a/src/plugins/query_enhancements/public/plugin.tsx +++ b/src/plugins/query_enhancements/public/plugin.tsx @@ -4,6 +4,7 @@ */ import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '../../../core/public'; +import { IStorageWrapper, Storage } from '../../opensearch_dashboards_utils/public'; import { ConfigSchema } from '../common/config'; import { setData, setStorage } from './services'; import { createQueryAssistExtension } from './query_assist'; @@ -18,7 +19,6 @@ import { LanguageConfig, Query } from '../../data/public'; import { s3TypeConfig } from './datasets'; import { createEditor, DefaultInput, SingleLineInput } from '../../data/public'; import { QueryLanguageReference } from './query_editor/query_language_reference'; -import { DataStorage } from '../../data/common'; export class QueryEnhancementsPlugin implements @@ -28,12 +28,12 @@ export class QueryEnhancementsPlugin QueryEnhancementsPluginSetupDependencies, QueryEnhancementsPluginStartDependencies > { - private readonly storage: DataStorage; + private readonly storage: IStorageWrapper; private readonly config: ConfigSchema; constructor(initializerContext: PluginInitializerContext) { this.config = initializerContext.config.get(); - this.storage = new DataStorage(window.localStorage, 'discover.queryAssist.'); + this.storage = new Storage(window.localStorage); } public setup( diff --git a/src/plugins/query_enhancements/public/query_assist/_index.scss b/src/plugins/query_enhancements/public/query_assist/_index.scss index 9094e54afa43..65ed6aa60884 100644 --- a/src/plugins/query_enhancements/public/query_assist/_index.scss +++ b/src/plugins/query_enhancements/public/query_assist/_index.scss @@ -7,31 +7,6 @@ &.queryAssist__callout { margin-top: $euiSizeXS; } - - .queryAssist__popoverWrapper { - display: flex; - align-items: center; - padding-right: $euiSizeS; - } - - // Hide the error badge when the input is focused - .queryAssist__inputWrapper:has(.queryAssist__input:focus) .queryAssist__popoverWrapper { - display: none; - } - - .queryAssist__input { - text-overflow: ellipsis; - } -} - -.queryAssist__popoverText { - padding: 0 $euiSizeM; -} - -#queryAssistErrorTitle { - // there is a medium size icon with two extra-small gutter between the icon - // and the title pushing to the left so title is aligned with other content - margin-left: -($euiSizeM + $euiSizeS); } .osdQueryEditorExtensionComponent__query-assist { diff --git a/src/plugins/query_enhancements/public/query_assist/components/__snapshots__/query_assist_bar.test.tsx.snap b/src/plugins/query_enhancements/public/query_assist/components/__snapshots__/query_assist_bar.test.tsx.snap deleted file mode 100644 index 5255a51f4b5b..000000000000 --- a/src/plugins/query_enhancements/public/query_assist/components/__snapshots__/query_assist_bar.test.tsx.snap +++ /dev/null @@ -1,47 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`QueryAssistBar matches snapshot 1`] = ` -
-
-
-
-
-
- -
-
-
- -
-
-
-
- -
-`; diff --git a/src/plugins/query_enhancements/public/query_assist/components/call_outs.test.tsx b/src/plugins/query_enhancements/public/query_assist/components/call_outs.test.tsx index 6cb2f55b5a29..4ac107d49c6b 100644 --- a/src/plugins/query_enhancements/public/query_assist/components/call_outs.test.tsx +++ b/src/plugins/query_enhancements/public/query_assist/components/call_outs.test.tsx @@ -4,13 +4,13 @@ */ import { render } from '@testing-library/react'; -import React, { ComponentProps, PropsWithChildren } from 'react'; +import React, { ComponentProps } from 'react'; import { IntlProvider } from 'react-intl'; import { QueryAssistCallOut } from './call_outs'; type Props = ComponentProps; -const IntlWrapper = ({ children }: PropsWithChildren) => ( +const IntlWrapper = ({ children }: { children: unknown }) => ( {children} ); diff --git a/src/plugins/query_enhancements/public/query_assist/components/query_assist_bar.test.tsx b/src/plugins/query_enhancements/public/query_assist/components/query_assist_bar.test.tsx deleted file mode 100644 index 44036a11c859..000000000000 --- a/src/plugins/query_enhancements/public/query_assist/components/query_assist_bar.test.tsx +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import { fireEvent, render, screen, waitFor } from '@testing-library/react'; -import React, { ComponentProps, PropsWithChildren } from 'react'; -import { IntlProvider } from 'react-intl'; -import { of } from 'rxjs'; -import { QueryAssistBar } from '.'; -import { notificationServiceMock, uiSettingsServiceMock } from '../../../../../core/public/mocks'; -import { DataStorage } from '../../../../data/common'; -import { QueryEditorExtensionDependencies, QueryStringContract } from '../../../../data/public'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { useOpenSearchDashboards } from '../../../../opensearch_dashboards_react/public'; -import { setData, setStorage } from '../../services'; -import { useGenerateQuery } from '../hooks'; -import { AgentError, ProhibitedQueryError } from '../utils'; -import { QueryAssistInput } from './query_assist_input'; - -jest.mock('../../../../opensearch_dashboards_react/public', () => ({ - useOpenSearchDashboards: jest.fn(), - withOpenSearchDashboards: jest.fn((component: React.Component) => component), -})); - -jest.mock('../hooks', () => ({ - useGenerateQuery: jest.fn().mockReturnValue({ generateQuery: jest.fn(), loading: false }), -})); - -jest.mock('./query_assist_input', () => ({ - QueryAssistInput: ({ inputRef, error }: ComponentProps) => ( - <> - -
{JSON.stringify(error)}
- - ), -})); - -const dataMock = dataPluginMock.createStartContract(true); -const queryStringMock = dataMock.query.queryString as jest.Mocked; -const uiSettingsMock = uiSettingsServiceMock.createStartContract(); -const notificationsMock = notificationServiceMock.createStartContract(); - -setData(dataMock); -setStorage(new DataStorage(window.localStorage, 'mock-prefix')); - -const dependencies: QueryEditorExtensionDependencies = { - language: 'PPL', - onSelectLanguage: jest.fn(), - isCollapsed: false, - setIsCollapsed: jest.fn(), -}; - -type Props = ComponentProps; - -const IntlWrapper = ({ children }: PropsWithChildren) => ( - {children} -); - -const renderQueryAssistBar = (overrideProps: Partial = {}) => { - const props: Props = Object.assign>({ dependencies }, overrideProps); - const component = render(, { - wrapper: IntlWrapper, - }); - return { component, props: props as jest.MockedObjectDeep }; -}; - -describe('QueryAssistBar', () => { - beforeEach(() => { - (useOpenSearchDashboards as jest.Mock).mockReturnValue({ - services: { - data: dataMock, - uiSettings: uiSettingsMock, - notifications: notificationsMock, - }, - }); - }); - afterEach(() => { - jest.clearAllMocks(); - }); - - it('renders null if collapsed', () => { - const { component } = renderQueryAssistBar({ - dependencies: { ...dependencies, isCollapsed: true }, - }); - expect(component.container).toBeEmptyDOMElement(); - }); - - it('matches snapshot', () => { - const { component } = renderQueryAssistBar(); - expect(component.container).toMatchSnapshot(); - }); - - it('displays callout when query input is empty on submit', async () => { - renderQueryAssistBar(); - - fireEvent.click(screen.getByRole('button')); - - await waitFor(() => { - expect(screen.getByTestId('query-assist-empty-query-callout')).toBeInTheDocument(); - }); - }); - - it('displays callout when dataset is not selected on submit', async () => { - queryStringMock.getQuery.mockReturnValueOnce({ query: '', language: 'kuery' }); - queryStringMock.getUpdates$.mockReturnValueOnce(of({ query: '', language: 'kuery' })); - renderQueryAssistBar(); - - fireEvent.change(screen.getByRole('textbox'), { target: { value: 'test query' } }); - fireEvent.click(screen.getByRole('button')); - - await waitFor(() => { - expect(screen.getByTestId('query-assist-empty-index-callout')).toBeInTheDocument(); - }); - }); - - it('displays callout for guardrail errors', async () => { - const generateQueryMock = jest.fn().mockResolvedValue({ error: new ProhibitedQueryError() }); - (useGenerateQuery as jest.Mock).mockReturnValue({ - generateQuery: generateQueryMock, - loading: false, - }); - - renderQueryAssistBar(); - - fireEvent.change(screen.getByRole('textbox'), { target: { value: 'test query' } }); - fireEvent.click(screen.getByRole('button')); - - await waitFor(() => { - expect(screen.getByTestId('query-assist-guard-callout')).toBeInTheDocument(); - }); - }); - - it('passes agent errors to input', async () => { - const generateQueryMock = jest.fn().mockResolvedValue({ - error: new AgentError({ - error: { type: 'mock-type', reason: 'mock-reason', details: 'mock-details' }, - status: 303, - }), - }); - (useGenerateQuery as jest.Mock).mockReturnValue({ - generateQuery: generateQueryMock, - loading: false, - }); - - renderQueryAssistBar(); - - fireEvent.change(screen.getByRole('textbox'), { target: { value: 'test query' } }); - fireEvent.click(screen.getByRole('button')); - - await waitFor(() => { - expect(screen.getByText(/mock-reason/)).toBeInTheDocument(); - }); - }); - - it('displays toast for other unknown errors', async () => { - const mockError = new Error('mock-error'); - const generateQueryMock = jest.fn().mockResolvedValue({ - error: mockError, - }); - (useGenerateQuery as jest.Mock).mockReturnValue({ - generateQuery: generateQueryMock, - loading: false, - }); - - renderQueryAssistBar(); - - fireEvent.change(screen.getByRole('textbox'), { target: { value: 'test query' } }); - fireEvent.click(screen.getByRole('button')); - - await waitFor(() => { - expect(notificationsMock.toasts.addError).toHaveBeenCalledWith(mockError, { - title: 'Failed to generate results', - }); - }); - }); - - it('submits a valid query and updates services', async () => { - const generateQueryMock = jest - .fn() - .mockResolvedValue({ response: { query: 'generated query' } }); - (useGenerateQuery as jest.Mock).mockReturnValue({ - generateQuery: generateQueryMock, - loading: false, - }); - - renderQueryAssistBar(); - - fireEvent.change(screen.getByRole('textbox'), { target: { value: 'test query' } }); - fireEvent.click(screen.getByRole('button')); - - await waitFor(() => { - expect(generateQueryMock).toHaveBeenCalledWith({ - question: 'test query', - index: 'Default Index Pattern', - language: 'PPL', - dataSourceId: 'mock-data-source-id', - }); - }); - - expect(queryStringMock.setQuery).toHaveBeenCalledWith({ - dataset: { - dataSource: { - id: 'mock-data-source-id', - title: 'Default Data Source', - type: 'OpenSearch', - }, - id: 'default-index-pattern', - timeFieldName: '@timestamp', - title: 'Default Index Pattern', - type: 'INDEX_PATTERN', - }, - language: 'PPL', - query: 'generated query', - }); - expect(screen.getByTestId('query-assist-query-generated-callout')).toBeInTheDocument(); - }); -}); diff --git a/src/plugins/query_enhancements/public/query_assist/components/query_assist_bar.tsx b/src/plugins/query_enhancements/public/query_assist/components/query_assist_bar.tsx index 884068070dab..85f951fc7515 100644 --- a/src/plugins/query_enhancements/public/query_assist/components/query_assist_bar.tsx +++ b/src/plugins/query_enhancements/public/query_assist/components/query_assist_bar.tsx @@ -15,7 +15,7 @@ import { useOpenSearchDashboards } from '../../../../opensearch_dashboards_react import { QueryAssistParameters } from '../../../common/query_assist'; import { getStorage } from '../../services'; import { useGenerateQuery } from '../hooks'; -import { getPersistedLog, AgentError, ProhibitedQueryError } from '../utils'; +import { getPersistedLog, ProhibitedQueryError } from '../utils'; import { QueryAssistCallOut, QueryAssistCallOutType } from './call_outs'; import { QueryAssistInput } from './query_assist_input'; import { QueryAssistSubmitButton } from './submit_button'; @@ -36,7 +36,6 @@ export const QueryAssistBar: React.FC = (props) => { const { generateQuery, loading } = useGenerateQuery(); const [callOutType, setCallOutType] = useState(); const dismissCallout = () => setCallOutType(undefined); - const [agentError, setAgentError] = useState(); const [selectedDataset, setSelectedDataset] = useState( queryString.getQuery().dataset ); @@ -61,7 +60,6 @@ export const QueryAssistBar: React.FC = (props) => { return; } dismissCallout(); - setAgentError(undefined); previousQuestionRef.current = inputRef.current.value; persistedLog.add(inputRef.current.value); const params: QueryAssistParameters = { @@ -74,8 +72,6 @@ export const QueryAssistBar: React.FC = (props) => { if (error) { if (error instanceof ProhibitedQueryError) { setCallOutType('invalid_query'); - } else if (error instanceof AgentError) { - setAgentError(error); } else { services.notifications.toasts.addError(error, { title: 'Failed to generate results' }); } @@ -95,7 +91,7 @@ export const QueryAssistBar: React.FC = (props) => { return ( - + = (props) => { isDisabled={loading} selectedIndex={selectedIndex} previousQuestion={previousQuestionRef.current} - error={agentError} /> diff --git a/src/plugins/query_enhancements/public/query_assist/components/query_assist_input.test.tsx b/src/plugins/query_enhancements/public/query_assist/components/query_assist_input.test.tsx index fa2c393e9b9a..1e6eb89da1f8 100644 --- a/src/plugins/query_enhancements/public/query_assist/components/query_assist_input.test.tsx +++ b/src/plugins/query_enhancements/public/query_assist/components/query_assist_input.test.tsx @@ -4,10 +4,9 @@ */ import { I18nProvider } from '@osd/i18n/react'; -import { fireEvent, render, screen } from '@testing-library/react'; +import { fireEvent, render } from '@testing-library/react'; import React, { ComponentProps } from 'react'; import { SuggestionsComponentProps } from '../../../../data/public/ui/typeahead/suggestions_component'; -import { AgentError } from '../utils'; import { QueryAssistInput } from './query_assist_input'; jest.mock('../../services', () => ({ @@ -74,14 +73,4 @@ describe(' spec', () => { fireEvent.click(suggestionButton); expect(inputElement.value).toBe('mock suggestion 1'); }); - - it('should show error badge if there is an error', async () => { - renderQueryAssistInput({ - error: new AgentError({ - error: { type: 'mock-type', reason: 'mock-reason', details: 'mock-details' }, - status: 303, - }), - }); - expect(screen.getByTestId('queryAssistErrorBadge')).toBeInTheDocument(); - }); }); diff --git a/src/plugins/query_enhancements/public/query_assist/components/query_assist_input.tsx b/src/plugins/query_enhancements/public/query_assist/components/query_assist_input.tsx index 26baec03c408..5ea5caaa5f49 100644 --- a/src/plugins/query_enhancements/public/query_assist/components/query_assist_input.tsx +++ b/src/plugins/query_enhancements/public/query_assist/components/query_assist_input.tsx @@ -4,13 +4,10 @@ */ import { EuiFieldText, EuiIcon, EuiOutsideClickDetector, EuiPortal } from '@elastic/eui'; -import { i18n } from '@osd/i18n'; import React, { useMemo, useState } from 'react'; import { PersistedLog, QuerySuggestionTypes } from '../../../../data/public'; import assistantMark from '../../assets/query_assist_mark.svg'; import { getData } from '../../services'; -import { AgentError } from '../utils'; -import { WarningBadge } from './warning_badge'; interface QueryAssistInputProps { inputRef: React.RefObject; @@ -19,7 +16,6 @@ interface QueryAssistInputProps { initialValue?: string; selectedIndex?: string; previousQuestion?: string; - error?: AgentError; } export const QueryAssistInput: React.FC = (props) => { @@ -76,9 +72,8 @@ export const QueryAssistInput: React.FC = (props) => { return ( setIsSuggestionsVisible(false)}> -
+
= (props) => { placeholder={ props.previousQuestion || (props.selectedIndex - ? i18n.translate('queryEnhancements.queryAssist.input.placeholderWithIndex', { - defaultMessage: - 'Ask a natural language question about {selectedIndex} to generate a query', - values: { selectedIndex: props.selectedIndex }, - }) - : i18n.translate('queryEnhancements.queryAssist.input.placeholderWithoutIndex', { - defaultMessage: 'Select an index to ask a question', - })) + ? `Ask a natural language question about ${props.selectedIndex} to generate a query` + : 'Select an index to ask a question') } prepend={} - append={} fullWidth /> diff --git a/src/plugins/query_enhancements/public/query_assist/components/warning_badge.test.tsx b/src/plugins/query_enhancements/public/query_assist/components/warning_badge.test.tsx deleted file mode 100644 index d9de2f824d92..000000000000 --- a/src/plugins/query_enhancements/public/query_assist/components/warning_badge.test.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import { fireEvent, render, waitFor } from '@testing-library/react'; -import React, { ComponentProps } from 'react'; -import { IntlProvider } from 'react-intl'; -import { WarningBadge } from './warning_badge'; - -type WarningBadgeProps = ComponentProps; - -const renderWarningBadge = (overrideProps: Partial = {}) => { - const props: WarningBadgeProps = Object.assign>( - { - error: { - error: { - error: { - details: 'mock-details', - reason: 'mock-reason', - type: 'mock-type', - }, - status: 303, - }, - name: 'mock-name', - message: 'mock-message', - }, - }, - overrideProps - ); - const component = render( - - - - ); - return { component, props: props as jest.MockedObjectDeep }; -}; - -describe(' spec', () => { - afterEach(() => { - jest.clearAllMocks(); - }); - - it('should render null if no error', () => { - const { component } = renderWarningBadge({ error: undefined }); - expect(component.container).toBeEmptyDOMElement(); - }); - - it('should render error details', async () => { - const { component } = renderWarningBadge(); - - fireEvent.click(component.getByTestId('queryAssistErrorBadge')); - await waitFor(() => { - expect(component.getByText(/mock-reason/)).toBeInTheDocument(); - }); - - fireEvent.click(component.getByTestId('queryAssistErrorMore')); - await waitFor(() => { - expect(component.getByText(/mock-details/)).toBeInTheDocument(); - }); - }); -}); diff --git a/src/plugins/query_enhancements/public/query_assist/components/warning_badge.tsx b/src/plugins/query_enhancements/public/query_assist/components/warning_badge.tsx deleted file mode 100644 index 53b1c5944480..000000000000 --- a/src/plugins/query_enhancements/public/query_assist/components/warning_badge.tsx +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import { - EuiBadge, - EuiFlexGroup, - EuiFlexItem, - EuiIcon, - EuiLink, - EuiPopover, - EuiText, -} from '@elastic/eui'; -import { i18n } from '@osd/i18n'; -import { FormattedMessage } from '@osd/i18n/react'; -import React, { SyntheticEvent, useEffect, useState } from 'react'; -import { AgentError } from '../utils'; - -interface WarningBadgeProps { - error: AgentError | undefined; -} - -export const WarningBadge: React.FC = (props) => { - const [isPopoverOpen, setIsPopoverOpen] = useState(false); - const [showMore, setShowMore] = useState(false); - - useEffect(() => { - const badgeContainer = document.querySelector('.queryAssist__badgeContainer'); - if (badgeContainer === null) return; - const elementsWithBadge = document.querySelectorAll('.queryAssist__withBadge'); - elementsWithBadge.forEach((element) => - element.style.setProperty('--badge-width', `${badgeContainer.offsetWidth}px`) - ); - }, [props.error]); - - if (!props.error) return null; - const { - error: { error, status }, - } = props.error; - - return ( -
- { - e.preventDefault(); - setIsPopoverOpen(!isPopoverOpen); - }} - onClickAriaLabel={i18n.translate('queryEnhancements.queryAssist.badge.ariaLabel', { - defaultMessage: 'Click to show details', - })} - data-test-subj="queryAssistErrorBadge" - > - - - } - isOpen={isPopoverOpen} - closePopover={() => setIsPopoverOpen(false)} - className="queryAssist__popover" - > - -
-
- - - - - - - - - - -
-
- - - - : {error.reason} -
- {showMore && ( - <> -
- - - - : {error.details} -
-
- - - - : {error.type} -
-
- - - - : {status} -
- - )} - setShowMore(!showMore)} data-test-subj="queryAssistErrorMore"> - {showMore ? ( - - ) : ( - - )} - -
-
-
-
- ); -}; diff --git a/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx b/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx index 701a7ca94e7e..2b86245cc43d 100644 --- a/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx +++ b/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx @@ -65,9 +65,8 @@ const getAvailableLanguages$ = (http: HttpSetup, data: DataPublicPluginSetup) => // currently query assist tool relies on opensearch API to get index // mappings, external data source types (e.g. s3) are not supported if ( - query.dataset?.dataSource?.type !== DEFAULT_DATA.SOURCE_TYPES.OPENSEARCH && // datasource is MDS OpenSearch - query.dataset?.dataSource?.type !== 'DATA_SOURCE' && // datasource is MDS OpenSearch when using indexes - query.dataset?.type !== DEFAULT_DATA.SET_TYPES.INDEX_PATTERN // dataset is index pattern + query.dataset?.dataSource?.type !== DEFAULT_DATA.SOURCE_TYPES.OPENSEARCH && + query.dataset?.dataSource?.type !== 'DATA_SOURCE' ) return []; diff --git a/src/plugins/query_enhancements/public/query_assist/utils/errors.test.ts b/src/plugins/query_enhancements/public/query_assist/utils/errors.test.ts index df34cea89829..1adbae11b462 100644 --- a/src/plugins/query_enhancements/public/query_assist/utils/errors.test.ts +++ b/src/plugins/query_enhancements/public/query_assist/utils/errors.test.ts @@ -5,7 +5,7 @@ import { ResponseError } from '@opensearch-project/opensearch/lib/errors'; import { ERROR_DETAILS } from '../../../common'; -import { AgentError, formatError, ProhibitedQueryError } from './errors'; +import { formatError, ProhibitedQueryError } from './errors'; describe('formatError', () => { it('should return an error with a custom message for status code 429', () => { @@ -42,24 +42,6 @@ describe('formatError', () => { expect(formattedError.message).toEqual(error.body.message); }); - it('should return an AgentError if possible', () => { - const error = new ResponseError({ - statusCode: 400, - body: { - statusCode: 400, - message: `{"error":{"reason":"Invalid Request","details":"PPLTool doesn't support searching indexes starting with '.' since it could be system index, current searching index name: .opensearch-sap-log-types-config","type":"IllegalArgumentException"},"status":400}`, - }, - warnings: [], - headers: null, - meta: {} as any, - }); - const formattedError = formatError(error); - expect(formattedError).toBeInstanceOf(AgentError); - expect((formattedError as AgentError).error.error.details).toEqual( - "PPLTool doesn't support searching indexes starting with '.' since it could be system index, current searching index name: .opensearch-sap-log-types-config" - ); - }); - it('should return the original error body for other errors', () => { const error = new ResponseError({ statusCode: 500, diff --git a/src/plugins/query_enhancements/public/query_assist/utils/errors.ts b/src/plugins/query_enhancements/public/query_assist/utils/errors.ts index f473395b336b..dbd0a9ef8fc7 100644 --- a/src/plugins/query_enhancements/public/query_assist/utils/errors.ts +++ b/src/plugins/query_enhancements/public/query_assist/utils/errors.ts @@ -3,7 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -// eslint-disable-next-line max-classes-per-file import { ResponseError } from '@opensearch-project/opensearch/lib/errors'; import { ERROR_DETAILS } from '../../../common'; @@ -13,33 +12,6 @@ export class ProhibitedQueryError extends Error { } } -interface IAgentError { - error: { - reason: string; - details: string; - type: string; - }; - status: number; -} - -export class AgentError extends Error { - public readonly error: IAgentError; - constructor(error: IAgentError) { - super(error.error.details); - if ( - !( - 'status' in error && - 'reason' in error.error && - 'details' in error.error && - 'type' in error.error - ) - ) { - throw new Error('Failed to parse error'); - } - this.error = error; - } -} - export const formatError = (error: ResponseError | Error): Error => { if ('body' in error) { if (error.body.statusCode === 429) @@ -52,11 +24,7 @@ export const formatError = (error: ResponseError | Error): Error => { error.body.message.includes(ERROR_DETAILS.GUARDRAILS_TRIGGERED) ) return new ProhibitedQueryError(error.body.message); - try { - return new AgentError(JSON.parse(error.body.message)); - } catch (parseError) { - return error.body as Error; - } + return error.body as Error; } return error; }; diff --git a/src/plugins/query_enhancements/public/query_assist/utils/get_persisted_log.ts b/src/plugins/query_enhancements/public/query_assist/utils/get_persisted_log.ts index 17a0f286f377..c86edcf125c0 100644 --- a/src/plugins/query_enhancements/public/query_assist/utils/get_persisted_log.ts +++ b/src/plugins/query_enhancements/public/query_assist/utils/get_persisted_log.ts @@ -4,12 +4,13 @@ */ import { IUiSettingsClient } from 'opensearch-dashboards/public'; -import { DataStorage, UI_SETTINGS } from '../../../../data/common'; +import { UI_SETTINGS } from '../../../../data/common'; import { PersistedLog } from '../../../../data/public'; +import { IStorageWrapper } from '../../../../opensearch_dashboards_utils/public'; export function getPersistedLog( uiSettings: IUiSettingsClient, - storage: DataStorage, + storage: IStorageWrapper, language: string ) { return new PersistedLog( diff --git a/src/plugins/query_enhancements/public/search/ppl_search_interceptor.ts b/src/plugins/query_enhancements/public/search/ppl_search_interceptor.ts index aecb7e32b009..c8a5165cb565 100644 --- a/src/plugins/query_enhancements/public/search/ppl_search_interceptor.ts +++ b/src/plugins/query_enhancements/public/search/ppl_search_interceptor.ts @@ -15,12 +15,12 @@ import { SearchInterceptorDeps, } from '../../../data/public'; import { + formatDate, + SEARCH_STRATEGY, API, EnhancedFetchContext, fetch, - formatDate, QueryAggConfig, - SEARCH_STRATEGY, } from '../../common'; import { QueryEnhancementsPluginStartDependencies } from '../types'; @@ -45,7 +45,7 @@ export class PPLSearchInterceptor extends SearchInterceptor { const { id, ...searchRequest } = request; const context: EnhancedFetchContext = { http: this.deps.http, - path: trimEnd(`${API.SEARCH}/${strategy}`), + path: trimEnd(API.PPL_SEARCH), signal, }; @@ -55,28 +55,15 @@ export class PPLSearchInterceptor extends SearchInterceptor { } public search(request: IOpenSearchDashboardsSearchRequest, options: ISearchOptions) { - const dataset = this.queryService.queryString.getQuery().dataset; - const datasetType = dataset?.type; - let strategy = SEARCH_STRATEGY.PPL; - - if (datasetType) { - const datasetTypeConfig = this.queryService.queryString - .getDatasetService() - .getType(datasetType); - strategy = datasetTypeConfig?.getSearchOptions?.().strategy ?? strategy; - } - - return this.runSearch(request, options.abortSignal, strategy); + return this.runSearch(request, options.abortSignal, SEARCH_STRATEGY.PPL); } private buildQuery() { const query: Query = this.queryService.queryString.getQuery(); const dataset = query.dataset; if (!dataset || !dataset.timeFieldName) return query; - const [baseQuery, ...afterPipeParts] = query.query.split('|'); - const afterPipe = afterPipeParts.length > 0 ? ` | ${afterPipeParts.join('|').trim()}` : ''; const timeFilter = this.getTimeFilter(dataset.timeFieldName); - return { ...query, query: baseQuery + timeFilter + afterPipe }; + return { ...query, query: query.query + timeFilter }; } private getAggConfig(request: IOpenSearchDashboardsSearchRequest, query: Query) { diff --git a/src/plugins/query_enhancements/public/search/sql_search_interceptor.ts b/src/plugins/query_enhancements/public/search/sql_search_interceptor.ts index a700724abe49..07f6ce7fce4a 100644 --- a/src/plugins/query_enhancements/public/search/sql_search_interceptor.ts +++ b/src/plugins/query_enhancements/public/search/sql_search_interceptor.ts @@ -39,7 +39,7 @@ export class SQLSearchInterceptor extends SearchInterceptor { const isAsync = strategy === SEARCH_STRATEGY.SQL_ASYNC; const context: EnhancedFetchContext = { http: this.deps.http, - path: trimEnd(`${API.SEARCH}/${strategy}`), + path: trimEnd(isAsync ? API.SQL_ASYNC_SEARCH : API.SQL_SEARCH), signal, }; @@ -54,16 +54,7 @@ export class SQLSearchInterceptor extends SearchInterceptor { public search(request: IOpenSearchDashboardsSearchRequest, options: ISearchOptions) { const dataset = this.queryService.queryString.getQuery().dataset; - const datasetType = dataset?.type; - let strategy = datasetType === DATASET.S3 ? SEARCH_STRATEGY.SQL_ASYNC : SEARCH_STRATEGY.SQL; - - if (datasetType) { - const datasetTypeConfig = this.queryService.queryString - .getDatasetService() - .getType(datasetType); - strategy = datasetTypeConfig?.getSearchOptions?.().strategy ?? strategy; - } - + const strategy = dataset?.type === DATASET.S3 ? SEARCH_STRATEGY.SQL_ASYNC : SEARCH_STRATEGY.SQL; return this.runSearch(request, options.abortSignal, strategy); } } diff --git a/src/plugins/query_enhancements/public/services/connections_service.ts b/src/plugins/query_enhancements/public/services/connections_service.ts new file mode 100644 index 000000000000..97a59c2cd94a --- /dev/null +++ b/src/plugins/query_enhancements/public/services/connections_service.ts @@ -0,0 +1,84 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { BehaviorSubject, Observable, from } from 'rxjs'; +import { DataPublicPluginStart } from 'src/plugins/data/public'; +import { CoreStart } from 'opensearch-dashboards/public'; +import { API } from '../../common'; +import { Connection, ConnectionsServiceDeps } from '../types'; + +export class ConnectionsService { + protected http!: ConnectionsServiceDeps['http']; + protected savedObjects!: CoreStart['savedObjects']; + private uiService$ = new BehaviorSubject(undefined); + private isDataSourceEnabled = false; + private isDataSourceEnabled$ = new BehaviorSubject(this.isDataSourceEnabled); + private selectedConnection: Connection | undefined = undefined; + private selectedConnection$ = new BehaviorSubject( + this.selectedConnection + ); + + constructor(deps: ConnectionsServiceDeps) { + deps.startServices.then(([coreStart, depsStart]) => { + this.http = deps.http; + this.savedObjects = coreStart.savedObjects; + this.uiService$.next(depsStart.data.ui); + this.setIsDataSourceEnabled$(depsStart.dataSource?.dataSourceEnabled || false); + }); + } + + getSavedObjects = () => { + return this.savedObjects; + }; + + getIsDataSourceEnabled = () => { + return this.isDataSourceEnabled; + }; + + setIsDataSourceEnabled$ = (isDataSourceEnabled: boolean) => { + this.isDataSourceEnabled = isDataSourceEnabled; + this.isDataSourceEnabled$.next(this.isDataSourceEnabled); + }; + + getIsDataSourceEnabled$ = () => { + return this.isDataSourceEnabled$.asObservable(); + }; + + getUiService = () => { + return this.uiService$.asObservable(); + }; + + getConnections = (): Observable => { + return from( + this.http.fetch({ + method: 'GET', + path: API.DATA_SOURCE.CONNECTIONS, + }) + ); + }; + + getConnectionById = (id: string): Observable => { + const path = `${API.DATA_SOURCE.CONNECTIONS}/${id}`; + return from( + this.http.fetch({ + method: 'GET', + path, + }) + ); + }; + + getSelectedConnection = () => { + return this.selectedConnection; + }; + + setSelectedConnection$ = (connection: Connection | undefined) => { + this.selectedConnection = connection; + this.selectedConnection$.next(this.selectedConnection); + }; + + getSelectedConnection$ = () => { + return this.selectedConnection$.asObservable(); + }; +} diff --git a/src/plugins/query_enhancements/public/services/index.ts b/src/plugins/query_enhancements/public/services/index.ts index 276270c72cbb..bb0284408faa 100644 --- a/src/plugins/query_enhancements/public/services/index.ts +++ b/src/plugins/query_enhancements/public/services/index.ts @@ -3,9 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { DataStorage } from '../../../data/common'; -import { DataPublicPluginStart } from '../../../data/public'; import { createGetterSetter } from '../../../opensearch_dashboards_utils/common'; +import { IStorageWrapper } from '../../../opensearch_dashboards_utils/public'; +import { DataPublicPluginStart } from '../../../data/public'; -export const [getStorage, setStorage] = createGetterSetter('storage'); +export const [getStorage, setStorage] = createGetterSetter('storage'); export const [getData, setData] = createGetterSetter('data'); + +export { ConnectionsService } from './connections_service'; diff --git a/src/plugins/query_enhancements/public/types.ts b/src/plugins/query_enhancements/public/types.ts index 365264ec11bd..c31da11e6b15 100644 --- a/src/plugins/query_enhancements/public/types.ts +++ b/src/plugins/query_enhancements/public/types.ts @@ -31,3 +31,8 @@ export interface Connection { auth?: any; }; } + +export interface ConnectionsServiceDeps { + http: CoreSetup['http']; + startServices: Promise<[CoreStart, QueryEnhancementsPluginStartDependencies, unknown]>; +} diff --git a/src/plugins/query_enhancements/server/index.ts b/src/plugins/query_enhancements/server/index.ts index 0efc8b66188a..4d72ff3eb278 100644 --- a/src/plugins/query_enhancements/server/index.ts +++ b/src/plugins/query_enhancements/server/index.ts @@ -18,5 +18,12 @@ export function plugin(initializerContext: PluginInitializerContext) { return new QueryEnhancementsPlugin(initializerContext); } -export { Facet, FacetProps, OpenSearchEnhancements, shimStats, shimSchemaRow } from './utils'; +export { + Facet, + FacetProps, + OpenSearchPPLPlugin, + OpenSearchObservabilityPlugin, + shimStats, + shimSchemaRow, +} from './utils'; export { QueryEnhancementsPluginSetup, QueryEnhancementsPluginStart } from './types'; diff --git a/src/plugins/query_enhancements/server/plugin.ts b/src/plugins/query_enhancements/server/plugin.ts index 789896961550..6c5357af70f1 100644 --- a/src/plugins/query_enhancements/server/plugin.ts +++ b/src/plugins/query_enhancements/server/plugin.ts @@ -18,7 +18,6 @@ import { ConfigSchema } from '../common/config'; import { defineRoutes } from './routes'; import { pplSearchStrategyProvider, - pplRawSearchStrategyProvider, sqlSearchStrategyProvider, sqlAsyncSearchStrategyProvider, } from './search'; @@ -26,8 +25,10 @@ import { QueryEnhancementsPluginSetup, QueryEnhancementsPluginSetupDependencies, QueryEnhancementsPluginStart, + QueryEnhancementsPluginStartDependencies, } from './types'; -import { OpenSearchEnhancements } from './utils'; +import { OpenSearchObservabilityPlugin, OpenSearchPPLPlugin } from './utils'; +import { pplRawSearchStrategyProvider } from './search/ppl_raw_search_strategy'; export class QueryEnhancementsPlugin implements Plugin { @@ -42,12 +43,13 @@ export class QueryEnhancementsPlugin this.logger.debug('queryEnhancements: Setup'); const router = core.http.createRouter(); // Register server side APIs - const client = core.opensearch.legacy.createClient('opensearch_enhancements', { - plugins: [OpenSearchEnhancements], + const client = core.opensearch.legacy.createClient('opensearch_observability', { + plugins: [OpenSearchPPLPlugin, OpenSearchObservabilityPlugin], }); if (dataSource) { - dataSource.registerCustomApiSchema(OpenSearchEnhancements); + dataSource.registerCustomApiSchema(OpenSearchPPLPlugin); + dataSource.registerCustomApiSchema(OpenSearchObservabilityPlugin); } const pplSearchStrategy = pplSearchStrategyProvider(this.config$, this.logger, client); @@ -82,7 +84,7 @@ export class QueryEnhancementsPlugin dataSourceEnabled: !!dataSource, })); - defineRoutes(this.logger, router, client, { + defineRoutes(this.logger, router, { ppl: pplSearchStrategy, sql: sqlSearchStrategy, sqlasync: sqlAsyncSearchStrategy, diff --git a/src/plugins/query_enhancements/server/routes/data_source_connection/routes.ts b/src/plugins/query_enhancements/server/routes/data_source_connection/routes.ts index 4084dcf1db8b..162cc7e8f103 100644 --- a/src/plugins/query_enhancements/server/routes/data_source_connection/routes.ts +++ b/src/plugins/query_enhancements/server/routes/data_source_connection/routes.ts @@ -4,81 +4,43 @@ */ import { schema } from '@osd/config-schema'; -import { IRouter, ILegacyClusterClient } from 'opensearch-dashboards/server'; +import { IRouter } from 'opensearch-dashboards/server'; import { API } from '../../../common'; -export function registerDataSourceConnectionsRoutes( - router: IRouter, - defaultClient: ILegacyClusterClient -) { +export function registerDataSourceConnectionsRoutes(router: IRouter) { router.get( { - path: `${API.DATA_SOURCE.CONNECTIONS}/{id?}`, + path: API.DATA_SOURCE.CONNECTIONS, validate: { - params: schema.object({ - id: schema.maybe(schema.string()), - }), + params: schema.object({}, { unknowns: 'allow' }), }, }, async (context, request, response) => { - const client = request.params.id - ? context.dataSource.opensearch.legacy.getClient(request.params.id).callAPI - : defaultClient.asScoped(request).callAsCurrentUser; - try { - const resp = await client('enhancements.getDataConnections'); - return response.ok({ body: resp }); - } catch (error) { - if (error.statusCode === 404 || error.statusCode === 400) { - return response.ok({ body: [] }); - } - return response.custom({ statusCode: error.statusCode || 500, body: error.message }); - } - } - ); - - router.get( - { - path: `${API.DATA_SOURCE.ASYNC_JOBS}`, - validate: { - query: schema.object({ - id: schema.string(), - queryId: schema.nullable(schema.string()), - }), - }, - }, - async (context, request, response) => { - const client = request.query.id - ? context.dataSource.opensearch.legacy.getClient(request.query.id).callAPI - : defaultClient.asScoped(request).callAsCurrentUser; - - const resp = await client('enhancements.getJobStatus', { - queryId: request.query.queryId, + const fields = ['id', 'title', 'auth.type']; + const resp = await context.core.savedObjects.client.find({ + type: 'data-source', + fields, + perPage: 10000, }); - return response.ok({ body: resp }); + + return response.ok({ body: { savedObjects: resp.saved_objects } }); } ); - router.post( + router.get( { - path: `${API.DATA_SOURCE.ASYNC_JOBS}`, + path: `${API.DATA_SOURCE.CONNECTIONS}/{dataSourceId}`, validate: { - query: schema.object({ - id: schema.string(), - }), - body: schema.object({ - query: schema.string(), - datasource: schema.string(), - lang: schema.string(), - sessionId: schema.nullable(schema.string()), + params: schema.object({ + dataSourceId: schema.string(), }), }, }, async (context, request, response) => { - const client = request.query.id - ? context.dataSource.opensearch.legacy.getClient(request.query.id).callAPI - : defaultClient.asScoped(request).callAsCurrentUser; - - const resp = await client('enhancements.runDirectQuery', { body: request.body }); + const resp = await context.core.savedObjects.client.get( + 'data-source', + request.params.dataSourceId + ); return response.ok({ body: resp }); } ); diff --git a/src/plugins/query_enhancements/server/routes/index.ts b/src/plugins/query_enhancements/server/routes/index.ts index 7d64e2c12b1a..721155ec8068 100644 --- a/src/plugins/query_enhancements/server/routes/index.ts +++ b/src/plugins/query_enhancements/server/routes/index.ts @@ -43,6 +43,10 @@ import { registerDataSourceConnectionsRoutes } from './data_source_connection'; * "aggConfig": { * // Optional aggregation configuration * }, + * @deprecated + * "df": { + * // Optional data frame configuration + * } * } * ``` */ @@ -68,6 +72,7 @@ function defineRoute( format: schema.string(), }), aggConfig: schema.nullable(schema.object({}, { unknowns: 'allow' })), + df: schema.nullable(schema.object({}, { unknowns: 'allow' })), }), }, }, @@ -87,6 +92,71 @@ function defineRoute( } } ); + + router.get( + { + path: `${path}/{queryId}`, + validate: { + params: schema.object({ + queryId: schema.string(), + }), + }, + }, + async (context, req, res): Promise => { + try { + const queryRes: IDataFrameResponse = await searchStrategies[searchStrategyId].search( + context, + req as any, + {} + ); + const result: any = { + body: { + ...queryRes, + }, + }; + return res.ok(result); + } catch (err) { + logger.error(err); + return res.custom({ + statusCode: 500, + body: err, + }); + } + } + ); + + router.get( + { + path: `${path}/{queryId}/{dataSourceId}`, + validate: { + params: schema.object({ + queryId: schema.string(), + dataSourceId: schema.string(), + }), + }, + }, + async (context, req, res): Promise => { + try { + const queryRes: IDataFrameResponse = await searchStrategies[searchStrategyId].search( + context, + req as any, + {} + ); + const result: any = { + body: { + ...queryRes, + }, + }; + return res.ok(result); + } catch (err) { + logger.error(err); + return res.custom({ + statusCode: 500, + body: err, + }); + } + } + ); } /** @@ -102,7 +172,6 @@ function defineRoute( export function defineRoutes( logger: Logger, router: IRouter, - client: any, searchStrategies: Record< string, ISearchStrategy @@ -111,6 +180,6 @@ export function defineRoutes( defineRoute(logger, router, searchStrategies, SEARCH_STRATEGY.PPL); defineRoute(logger, router, searchStrategies, SEARCH_STRATEGY.SQL); defineRoute(logger, router, searchStrategies, SEARCH_STRATEGY.SQL_ASYNC); - registerDataSourceConnectionsRoutes(router, client); + registerDataSourceConnectionsRoutes(router); registerQueryAssistRoutes(router); } diff --git a/src/plugins/query_enhancements/server/routes/query_assist/routes.ts b/src/plugins/query_enhancements/server/routes/query_assist/routes.ts index 07e48961dd81..d30396719533 100644 --- a/src/plugins/query_enhancements/server/routes/query_assist/routes.ts +++ b/src/plugins/query_enhancements/server/routes/query_assist/routes.ts @@ -78,16 +78,13 @@ export function registerQueryAssistRoutes(router: IRouter) { return response.ok({ body: responseBody }); } catch (error) { if (isResponseError(error)) { - if ( - error.statusCode === 400 && - // on opensearch >= 2.17, error.body is an object https://github.com/opensearch-project/ml-commons/pull/2858 - JSON.stringify(error.body).includes(ERROR_DETAILS.GUARDRAILS_TRIGGERED) - ) + if (error.statusCode === 400 && error.body.includes(ERROR_DETAILS.GUARDRAILS_TRIGGERED)) return response.badRequest({ body: ERROR_DETAILS.GUARDRAILS_TRIGGERED }); - return response.custom({ - statusCode: error.statusCode, - // for consistency, frontend will always receive the actual error in error.body.message as a JSON string - body: typeof error.body === 'string' ? error.body : JSON.stringify(error.body), + return response.badRequest({ + body: + typeof error.meta.body === 'string' + ? error.meta.body + : JSON.stringify(error.meta.body), }); } return response.custom({ statusCode: error.statusCode || 500, body: error.message }); diff --git a/src/plugins/query_enhancements/server/search/index.ts b/src/plugins/query_enhancements/server/search/index.ts index 129ce971662f..b3a528c57055 100644 --- a/src/plugins/query_enhancements/server/search/index.ts +++ b/src/plugins/query_enhancements/server/search/index.ts @@ -4,6 +4,5 @@ */ export { pplSearchStrategyProvider } from './ppl_search_strategy'; -export { pplRawSearchStrategyProvider } from './ppl_raw_search_strategy'; export { sqlSearchStrategyProvider } from './sql_search_strategy'; export { sqlAsyncSearchStrategyProvider } from './sql_async_search_strategy'; diff --git a/src/plugins/query_enhancements/server/search/ppl_raw_search_strategy.ts b/src/plugins/query_enhancements/server/search/ppl_raw_search_strategy.ts index 32643f621874..72508db5d7f6 100644 --- a/src/plugins/query_enhancements/server/search/ppl_raw_search_strategy.ts +++ b/src/plugins/query_enhancements/server/search/ppl_raw_search_strategy.ts @@ -21,9 +21,7 @@ export const pplRawSearchStrategyProvider = ( : client.asScoped(request.rawRequest).callAsCurrentUser; try { - const rawResponse: any = await runSearch('enhancements.pplQuery', { - body: request.params.body, - }); + const rawResponse: any = await runSearch('ppl.pplQuery', { body: request.params.body }); const data = shimSchemaRow(rawResponse); rawResponse.jsonData = data.jsonData; diff --git a/src/plugins/query_enhancements/server/search/ppl_search_strategy.ts b/src/plugins/query_enhancements/server/search/ppl_search_strategy.ts index 501e2287411b..65eb9da67ac6 100644 --- a/src/plugins/query_enhancements/server/search/ppl_search_strategy.ts +++ b/src/plugins/query_enhancements/server/search/ppl_search_strategy.ts @@ -27,7 +27,7 @@ export const pplSearchStrategyProvider = ( const pplFacet = new Facet({ client, logger, - endpoint: 'enhancements.pplQuery', + endpoint: 'ppl.pplQuery', useJobs: false, shimResponse: true, }); diff --git a/src/plugins/query_enhancements/server/search/sql_async_search_strategy.ts b/src/plugins/query_enhancements/server/search/sql_async_search_strategy.ts index fc2b8e774f65..6cf067d5614f 100644 --- a/src/plugins/query_enhancements/server/search/sql_async_search_strategy.ts +++ b/src/plugins/query_enhancements/server/search/sql_async_search_strategy.ts @@ -28,15 +28,11 @@ export const sqlAsyncSearchStrategyProvider = ( client: ILegacyClusterClient, usage?: SearchUsage ): ISearchStrategy => { - const sqlAsyncFacet = new Facet({ - client, - logger, - endpoint: 'enhancements.runDirectQuery', - }); + const sqlAsyncFacet = new Facet({ client, logger, endpoint: 'observability.runDirectQuery' }); const sqlAsyncJobsFacet = new Facet({ client, logger, - endpoint: 'enhancements.getJobStatus', + endpoint: 'observability.getJobStatus', useJobs: true, }); diff --git a/src/plugins/query_enhancements/server/types.ts b/src/plugins/query_enhancements/server/types.ts index 5e8ab7987de9..b6a03b672de9 100644 --- a/src/plugins/query_enhancements/server/types.ts +++ b/src/plugins/query_enhancements/server/types.ts @@ -5,6 +5,8 @@ import { PluginSetup } from 'src/plugins/data/server'; import { DataSourcePluginSetup } from 'src/plugins/data_source/server'; +import { Logger } from '../../../core/server'; +import { ConfigSchema } from '../common/config'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface QueryEnhancementsPluginSetup {} @@ -16,9 +18,6 @@ export interface QueryEnhancementsPluginSetupDependencies { dataSource?: DataSourcePluginSetup; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface QueryEnhancementsPluginStartDependencies {} - export interface ISchema { name: string; type: string; diff --git a/src/plugins/query_enhancements/server/utils/index.ts b/src/plugins/query_enhancements/server/utils/index.ts index 5cb088ed2fa3..86f216973771 100644 --- a/src/plugins/query_enhancements/server/utils/index.ts +++ b/src/plugins/query_enhancements/server/utils/index.ts @@ -4,6 +4,6 @@ */ export { Facet, FacetProps } from './facet'; -export { OpenSearchEnhancements } from './plugins'; +export { OpenSearchPPLPlugin, OpenSearchObservabilityPlugin } from './plugins'; export { shimStats } from './shim_stats'; export { shimSchemaRow } from './shim_schema_row'; diff --git a/src/plugins/query_enhancements/server/utils/plugins.ts b/src/plugins/query_enhancements/server/utils/plugins.ts index bef3bd52099b..e8d581bc42f2 100644 --- a/src/plugins/query_enhancements/server/utils/plugins.ts +++ b/src/plugins/query_enhancements/server/utils/plugins.ts @@ -45,46 +45,51 @@ const createAction = ( }); }; -export const OpenSearchEnhancements = (client: any, config: any, components: any) => { - client.prototype.enhancements = components.clientAction.namespaceFactory(); - const enhancements = client.prototype.enhancements.prototype; +export const OpenSearchPPLPlugin = (client: any, config: any, components: any) => { + client.prototype.ppl = components.clientAction.namespaceFactory(); + const ppl = client.prototype.ppl.prototype; - enhancements.pplQuery = createAction(client, components, { + ppl.pplQuery = createAction(client, components, { endpoint: URI.PPL, method: 'POST', needBody: true, }); - enhancements.sqlQuery = createAction(client, components, { + ppl.sqlQuery = createAction(client, components, { endpoint: URI.SQL, method: 'POST', needBody: true, }); - enhancements.getDataConnectionById = createAction(client, components, { + ppl.getDataConnectionById = createAction(client, components, { endpoint: OPENSEARCH_API.DATA_CONNECTIONS, method: 'GET', paramKey: 'dataconnection', }); - enhancements.deleteDataConnection = createAction(client, components, { + ppl.deleteDataConnection = createAction(client, components, { endpoint: OPENSEARCH_API.DATA_CONNECTIONS, method: 'DELETE', paramKey: 'dataconnection', }); - enhancements.createDataSource = createAction(client, components, { + ppl.createDataSource = createAction(client, components, { endpoint: OPENSEARCH_API.DATA_CONNECTIONS, method: 'POST', needBody: true, }); - enhancements.modifyDataConnection = createAction(client, components, { + ppl.modifyDataConnection = createAction(client, components, { endpoint: OPENSEARCH_API.DATA_CONNECTIONS, method: 'PATCH', needBody: true, }); - enhancements.getDataConnections = createAction(client, components, { + ppl.getDataConnections = createAction(client, components, { endpoint: OPENSEARCH_API.DATA_CONNECTIONS, method: 'GET', }); +}; + +export const OpenSearchObservabilityPlugin = (client: any, config: any, components: any) => { + client.prototype.observability = components.clientAction.namespaceFactory(); + const observability = client.prototype.observability.prototype; - enhancements.getObject = createAction(client, components, { + observability.getObject = createAction(client, components, { endpoint: OPENSEARCH_API.PANELS, method: 'GET', params: { @@ -101,32 +106,32 @@ export const OpenSearchEnhancements = (client: any, config: any, components: any }, }); - enhancements.getObjectById = createAction(client, components, { + observability.getObjectById = createAction(client, components, { endpoint: `${OPENSEARCH_API.PANELS}/<%=objectId%>`, method: 'GET', paramKey: 'objectId', }); - enhancements.createObject = createAction(client, components, { + observability.createObject = createAction(client, components, { endpoint: OPENSEARCH_API.PANELS, method: 'POST', needBody: true, }); - enhancements.updateObjectById = createAction(client, components, { + observability.updateObjectById = createAction(client, components, { endpoint: `${OPENSEARCH_API.PANELS}/<%=objectId%>`, method: 'PUT', paramKey: 'objectId', needBody: true, }); - enhancements.deleteObjectById = createAction(client, components, { + observability.deleteObjectById = createAction(client, components, { endpoint: `${OPENSEARCH_API.PANELS}/<%=objectId%>`, method: 'DELETE', paramKey: 'objectId', }); - enhancements.deleteObjectByIdList = createAction(client, components, { + observability.deleteObjectByIdList = createAction(client, components, { endpoint: OPENSEARCH_API.PANELS, method: 'DELETE', params: { @@ -134,19 +139,19 @@ export const OpenSearchEnhancements = (client: any, config: any, components: any }, }); - enhancements.getJobStatus = createAction(client, components, { + observability.getJobStatus = createAction(client, components, { endpoint: `${URI.ASYNC_QUERY}`, method: 'GET', paramKey: 'queryId', }); - enhancements.deleteJob = createAction(client, components, { + observability.deleteJob = createAction(client, components, { endpoint: `${URI.ASYNC_QUERY}/<%=queryId%>`, method: 'DELETE', paramKey: 'queryId', }); - enhancements.runDirectQuery = createAction(client, components, { + observability.runDirectQuery = createAction(client, components, { endpoint: URI.ASYNC_QUERY, method: 'POST', needBody: true, diff --git a/src/plugins/vis_builder/public/application/utils/get_top_nav_config.test.tsx b/src/plugins/vis_builder/public/application/utils/get_top_nav_config.test.tsx index a911982f638b..536596cc9e1f 100644 --- a/src/plugins/vis_builder/public/application/utils/get_top_nav_config.test.tsx +++ b/src/plugins/vis_builder/public/application/utils/get_top_nav_config.test.tsx @@ -97,10 +97,7 @@ describe('getOnSave', () => { }, "searchSourceFields": Object { "filter": null, - "query": Object { - "language": "kuery", - "query": "", - }, + "query": null, }, "styleState": "", "title": "new title", diff --git a/test/interpreter_functional/plugins/osd_tp_run_pipeline/package.json b/test/interpreter_functional/plugins/osd_tp_run_pipeline/package.json index b64f6f01a423..416c31d22b7c 100644 --- a/test/interpreter_functional/plugins/osd_tp_run_pipeline/package.json +++ b/test/interpreter_functional/plugins/osd_tp_run_pipeline/package.json @@ -12,7 +12,7 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "@elastic/eui": "npm:@opensearch-project/oui@1.13.0", + "@elastic/eui": "npm:@opensearch-project/oui@1.12.0", "@osd/plugin-helpers": "1.0.0", "react": "^16.14.0", "react-dom": "^16.12.0", diff --git a/test/plugin_functional/plugins/osd_sample_panel_action/package.json b/test/plugin_functional/plugins/osd_sample_panel_action/package.json index aee59fc63ecb..6a9567cb1967 100644 --- a/test/plugin_functional/plugins/osd_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/osd_sample_panel_action/package.json @@ -12,7 +12,7 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "@elastic/eui": "npm:@opensearch-project/oui@1.13.0", + "@elastic/eui": "npm:@opensearch-project/oui@1.12.0", "react": "^16.14.0", "typescript": "4.0.2" } diff --git a/test/plugin_functional/plugins/osd_tp_custom_visualizations/package.json b/test/plugin_functional/plugins/osd_tp_custom_visualizations/package.json index 766207f5f929..8b0b24a07f4b 100644 --- a/test/plugin_functional/plugins/osd_tp_custom_visualizations/package.json +++ b/test/plugin_functional/plugins/osd_tp_custom_visualizations/package.json @@ -12,7 +12,7 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "@elastic/eui": "npm:@opensearch-project/oui@1.13.0", + "@elastic/eui": "npm:@opensearch-project/oui@1.12.0", "@osd/plugin-helpers": "1.0.0", "react": "^16.14.0", "typescript": "4.0.2" diff --git a/yarn.lock b/yarn.lock index 5b0da8e8b881..ea1b9fee3128 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1431,10 +1431,10 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui@npm:@opensearch-project/oui@1.13.0": - version "1.13.0" - resolved "https://registry.yarnpkg.com/@opensearch-project/oui/-/oui-1.13.0.tgz#830de8bfbb9d0471288b9526ddcfd5fcbd45c420" - integrity sha512-5qVqb7OiiMxIttn7ByFzMySFuIImTqP664PtrjmjDgLsiLkah0f7s1RFT5jE4Os1CrWaTFXiSXzleYpuZyA4oA== +"@elastic/eui@npm:@opensearch-project/oui@1.12.0": + version "1.12.0" + resolved "https://registry.yarnpkg.com/@opensearch-project/oui/-/oui-1.12.0.tgz#dfb34669549fec2500e71f66e43868932178318c" + integrity sha512-0phXBR8OZneJr/TwIiqTMWL53e/2PqzEDzl/y7QYEc6xUofD+RQSNi/YZNw4OZgscogu/zTajWA5tdQdrxT2+g== dependencies: "@types/chroma-js" "^2.4.0" "@types/react-beautiful-dnd" "^13.1.3" @@ -5542,10 +5542,15 @@ camelize@^1.0.0: resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= -caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001640: - version "1.0.30001659" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001659.tgz" - integrity sha512-Qxxyfv3RdHAfJcXelgf0hU4DFUVXBGTjqrBUZLUh8AtlGnsDo+CnncYtTd95+ZKfnANUOzxyIQCuU/UeBZBYoA== +caniuse-lite@^1.0.30001464: + version "1.0.30001587" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001587.tgz" + integrity sha512-HMFNotUmLXn71BQxg8cijvqxnIAofforZOwGsxyXJ0qugTdspUF4sPSJ2vhgprHCB996tIDzEq1ubumPDV8ULA== + +caniuse-lite@^1.0.30001640: + version "1.0.30001643" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz#9c004caef315de9452ab970c3da71085f8241dbd" + integrity sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg== ccount@^1.0.0: version "1.1.0"