/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { hashArray, hashObject, hashValue } from '@finos/legend-shared';
import { SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX } from './MetaModelConst.js';
/**
 * The main point of maintaining this enum is to keep lessen magic string in hash computation
 * so that we are less error-prone in the process of defining hash.
 *
 * These tokens will be used in the definition of the hash as marker for the type of the strucure
 * arguably some of these can be redundant since this information is encoded in the resulting hash
 * code anyway, but sometimes when polymorphism manifests, such as when we have an array of structure
 * which are subclasses of an abstract stucture, hashing the marker is sometimes the only way to
 * discern between instances of different sub-structures
 *
 * TODO: when we refactor hashing, we could potentially move this to graphManager/changeDetection/
 */
export var CORE_HASH_STRUCTURE;
(function (CORE_HASH_STRUCTURE) {
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_ELEMENT"] = "INTERNAL__UNKNOWN_ELEMENT";
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT"] = "INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT";
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR"] = "INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR";
    CORE_HASH_STRUCTURE["PACKAGE"] = "PACKAGE";
    CORE_HASH_STRUCTURE["PACKAGEABLE_ELEMENT"] = "PACKAGEABLE_ELEMENT";
    CORE_HASH_STRUCTURE["PACKAGEABLE_ELEMENT_POINTER"] = "PACKAGEABLE_ELEMENT_POINTER";
    // domain
    CORE_HASH_STRUCTURE["PROFILE"] = "PROFILE";
    CORE_HASH_STRUCTURE["TAG_POINTER"] = "TAG_POINTER";
    CORE_HASH_STRUCTURE["STEREOTYPE_POINTER"] = "STEREOTYPE_POINTER";
    CORE_HASH_STRUCTURE["TAGGED_VALUE"] = "TAGGED_VALUE";
    CORE_HASH_STRUCTURE["ENUMERATION"] = "ENUMERATION";
    CORE_HASH_STRUCTURE["ENUM_VALUE"] = "ENUM_VALUE";
    CORE_HASH_STRUCTURE["CLASS"] = "CLASS";
    CORE_HASH_STRUCTURE["PROPERTY"] = "PROPERTY";
    CORE_HASH_STRUCTURE["PROPERTY_DEFAULT_VALUE"] = "PROPERTY_DEFAULT_VALUE";
    CORE_HASH_STRUCTURE["PROPERTY_POINTER"] = "PROPERTY_POINTER";
    CORE_HASH_STRUCTURE["MULTIPLICITY"] = "MULTIPLICITY";
    CORE_HASH_STRUCTURE["CONSTRAINT"] = "CONSTRAINT";
    CORE_HASH_STRUCTURE["DERIVED_PROPERTY"] = "DERIVED_PROPERTY";
    CORE_HASH_STRUCTURE["ASSOCIATION"] = "ASSOCIATION";
    CORE_HASH_STRUCTURE["FUNCTION"] = "FUNCTION";
    CORE_HASH_STRUCTURE["MEASURE"] = "MEASURE";
    CORE_HASH_STRUCTURE["UNIT"] = "UNIT";
    // function test
    CORE_HASH_STRUCTURE["FUNCTION_TEST_SUITE"] = "FUNCTION_TEST_SUITE";
    CORE_HASH_STRUCTURE["FUNCTION_TEST"] = "FUNCTION_TEST";
    CORE_HASH_STRUCTURE["FUNCTION_STORE_TEST_DATA"] = "FUNCTION_STORE_TEST_DATA";
    CORE_HASH_STRUCTURE["FUNCTION_PARAMETER_VALUE"] = "FUNCTION_PARAMETER_VALUE";
    // Function Activator
    CORE_HASH_STRUCTURE["FUNCTION_ACTIVATOR_POST_DEPLOYMENT_PROPERTIES"] = "FUNCTION_ACTIVATOR_POST_DEPLOYMENT_PROPERTIES";
    // testable
    CORE_HASH_STRUCTURE["ASSERT_FAIL"] = "ASSERT_FAIL";
    CORE_HASH_STRUCTURE["ASSERT_PASS"] = "ASSERT_PASS";
    CORE_HASH_STRUCTURE["EQUAL_TO_JSON_ASSERT_FAIL"] = "EQUAL_TO_JSON_ASSERT_FAIL";
    CORE_HASH_STRUCTURE["EQUAL_TO"] = "EQUAL_TO";
    CORE_HASH_STRUCTURE["EQUAL_TO_JSON"] = "EQUAL_TO_JSON";
    CORE_HASH_STRUCTURE["EQUAL_TO_TDS"] = "EQUAL_TO_TDS";
    // section index
    CORE_HASH_STRUCTURE["SECTION_INDEX"] = "SECTION_INDEX";
    CORE_HASH_STRUCTURE["SECTION"] = "SECTION";
    CORE_HASH_STRUCTURE["IMPORT_AWARE_CODE_SECTION"] = "IMPORT_AWARE_CODE_SECTION";
    CORE_HASH_STRUCTURE["DEFAULT_CODE_SECTION"] = "DEFAULT_CODE_SECTION";
    // raw value specification
    CORE_HASH_STRUCTURE["RAW_LAMBDA"] = "RAW_LAMBDA";
    CORE_HASH_STRUCTURE["RAW_VARIABLE"] = "RAW_VARIABLE";
    CORE_HASH_STRUCTURE["RAW_INSTANCE_VALUE"] = "RAW_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["BINDING_TRANSFORMER"] = "BINDING_TRANSFORMER";
    // value specification
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_VALUE_SPECIFICATION"] = "INTERNAL__UNKNOWN_VALUE_SPECIFICATION";
    CORE_HASH_STRUCTURE["INTERNAL__PROPAGATED_VALUE"] = "INTERNAL__PROPAGATED_VALUE";
    CORE_HASH_STRUCTURE["VARIABLE_EXPRESSION"] = "VARIABLE_EXPRESSION";
    CORE_HASH_STRUCTURE["EXPRESSION"] = "EXPRESSION";
    CORE_HASH_STRUCTURE["FUNCTION_EXPRESSION"] = "FUNCTION_EXPRESSION";
    CORE_HASH_STRUCTURE["SIMPLE_FUNCTION_EXPRESSION"] = "SIMPLE_FUNCTION_EXPRESSION";
    CORE_HASH_STRUCTURE["ABSTRACT_PROPERTY_EXPRESSION"] = "ABSTRACT_PROPERTY_EXPRESSION";
    CORE_HASH_STRUCTURE["INSTANCE_VALUE"] = "INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["PRIMITIVE_INSTANCE_VALUE"] = "PRIMITIVE_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["ENUM_INSTANCE_VALUE"] = "ENUM_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["KEY_EXPRESSION_INSTANCE_VALUE"] = "KEY_EXPRESSION_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["KEY_EXPRESSION_VALUE"] = "KEY_EXPRESSION_VALUE";
    CORE_HASH_STRUCTURE["RUNTIME_INSTANCE_VALUE"] = "RUNTIME_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["PAIR_INSTANCE_VALUE"] = "PAIR_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["MAPPING_INSTANCE_VALUE"] = "MAPPING_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["PURE_LIST_INSTANCE_VALUE"] = "PURE_LIST_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["COLLECTION_INSTANCE_VALUE"] = "COLLECTION_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["LAMBDA_FUNCTION_INSTANCE_VALUE"] = "LAMBDA_FUNCTION_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["FUNCTION_TYPE"] = "FUNCTION_TYPE";
    CORE_HASH_STRUCTURE["LAMBDA_FUNCTION"] = "LAMBDA_FUNCTION";
    CORE_HASH_STRUCTURE["ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE"] = "ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["ALLOY_SERIALIZATION_CONFIG"] = "ALLOY_SERIALIZATION_CONFIG";
    CORE_HASH_STRUCTURE["ROOT_GRAPH_FETCH_TREE"] = "ROOT_GRAPH_FETCH_TREE";
    CORE_HASH_STRUCTURE["PROPERTY_GRAPH_FETCH_TREE"] = "PROPERTY_GRAPH_FETCH_TREE";
    CORE_HASH_STRUCTURE["SUBTYPE_GRAPH_FETCH_TREE"] = "SUBTYPE_GRAPH_FETCH_TREE";
    CORE_HASH_STRUCTURE["SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE"] = "SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["PROPERTY_GRAPH_FETCH_TREE_INSTANCE_VALUE"] = "PROEPRTY_GRAPH_FETCH_TREE_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE"] = "ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE";
    CORE_HASH_STRUCTURE["RELATION_COL_SPEC_ARRAY"] = "RELATION_COL_SPEC_ARRAY";
    CORE_HASH_STRUCTURE["RELATION_COL_SPEC"] = "RELATION_COL_SPEC";
    // ---------------------------------- DSL Mapping --------------------------------------
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_STORE"] = "INTERNAL__UNKNOWN_STORE";
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_CONNECTION"] = "INTERNAL__UNKNOWN_CONNECTION";
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_PROPERTY_MAPPING"] = "INTERNAL__UNKNOWN_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_CLASS_MAPPING"] = "INTERNAL__UNKNOWN_CLASS_MAPPING";
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_MAPPING_INCLUDE"] = "INTERNAL__UNKNOWN_MAPPING_INCLUDE";
    CORE_HASH_STRUCTURE["MAPPING"] = "MAPPING";
    CORE_HASH_STRUCTURE["MAPPING_INCLUDE_MAPPING"] = "MAPPING_INCLUDE_MAPPING";
    CORE_HASH_STRUCTURE["ASSOCIATION_IMPLEMENTATION"] = "ASSOCIATION_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["RELATIONAL_ASSOCIATION_IMPLEMENTATION"] = "RELATIONAL_ASSOCIATION_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["XSTORE_ASSOCIATION_IMPLEMENTATION"] = "XSTORE_ASSOCIATION_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["ENUMERATION_MAPPING"] = "ENUMERATION_MAPPING";
    CORE_HASH_STRUCTURE["ENUM_VALUE_MAPPING"] = "ENUM_VALUE_MAPPING";
    CORE_HASH_STRUCTURE["SET_IMPLEMENTATION"] = "SET_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["OPERATION_SET_IMPLEMENTATION"] = "OPERATION_SET_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["PURE_INSTANCE_SET_IMPLEMENTATION"] = "PURE_INSTANCE_SET_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["PROPERTY_MAPPING"] = "PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["LOCAL_MAPPING_PROPERTY"] = "LOCAL_MAPPING_PROPERTY";
    CORE_HASH_STRUCTURE["PURE_PROPERTY_MAPPING"] = "PURE_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["XSTORE_PROPERTY_MAPPING"] = "XSTORE_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["MAPPING_TEST_LEGACY"] = "MAPPING_TEST_LEGACY";
    CORE_HASH_STRUCTURE["MAPPING_TEST_SUITE"] = "MAPPING_TEST_SUITE";
    CORE_HASH_STRUCTURE["MAPPING_TEST"] = "MAPPING_TEST";
    CORE_HASH_STRUCTURE["STORE_TEST_DATA"] = "STORE_TEST_DATA";
    CORE_HASH_STRUCTURE["INPUT_DATA"] = "INPUT_DATA";
    CORE_HASH_STRUCTURE["FLAT_DATA_INPUT_DATA"] = "FLAT_DATA_INPUT_DATA";
    CORE_HASH_STRUCTURE["RELATIONAL_INPUT_DATA"] = "RELATIONAL_INPUT_DATA";
    CORE_HASH_STRUCTURE["OBJECT_INPUT_DATA"] = "OBJECT_INPUT_DATA";
    CORE_HASH_STRUCTURE["MAPPING_TEST_ASSERT"] = "MAPPING_TEST_ASSERT";
    CORE_HASH_STRUCTURE["EXPECTED_OUTPUT_MAPPING_TEST_ASSERT"] = "EXPECTED_OUTPUT_MAPPING_TEST_ASSERT";
    CORE_HASH_STRUCTURE["FILTER_MAPPING"] = "FILTER_MAPPING";
    CORE_HASH_STRUCTURE["COLUMN_MAPPING"] = "COLUMN_MAPPING";
    CORE_HASH_STRUCTURE["GROUP_BY_MAPPING"] = "GROUP_BY_MAPPING";
    // runtime
    CORE_HASH_STRUCTURE["RUNTIME"] = "RUNTIME";
    CORE_HASH_STRUCTURE["PACKAGEABLE_RUNTIME"] = "PACKAGEABLE_RUNTIME";
    CORE_HASH_STRUCTURE["ENGINE_RUNTIME"] = "ENGINE_RUNTIME";
    CORE_HASH_STRUCTURE["SINGLE_ENGINE_RUNTIME"] = "SINGLE_ENGINE_RUNTIME";
    CORE_HASH_STRUCTURE["LEGACY_RUNTIME"] = "LEGACY_RUNTIME";
    CORE_HASH_STRUCTURE["LAKEHOUSE_RUNTIME"] = "LAKEHOUSE_RUNTIME";
    CORE_HASH_STRUCTURE["RUNTIME_POINTER"] = "RUNTIME_POINTER";
    CORE_HASH_STRUCTURE["STORE_CONNECTIONS"] = "STORE_CONNECTIONS";
    CORE_HASH_STRUCTURE["IDENTIFIED_CONNECTION"] = "IDENTIFIED_CONNECTION";
    // connection
    CORE_HASH_STRUCTURE["PACKAGEABLE_CONNECTION"] = "PACKAGEABLE_CONNECTION";
    CORE_HASH_STRUCTURE["CONNECTION_POINTER"] = "CONNECTION_POINTER";
    CORE_HASH_STRUCTURE["XML_MODEL_CONNECTION"] = "XML_MODEL_CONNECTION";
    CORE_HASH_STRUCTURE["JSON_MODEL_CONNECTION"] = "JSON_MODEL_CONNECTION";
    CORE_HASH_STRUCTURE["MODEL_CHAIN_CONNECTION"] = "MODEL_CHAIN_CONNECTION";
    CORE_HASH_STRUCTURE["FLAT_DATA_CONNECTION"] = "FLAT_DATA_CONNECTION";
    // aggregation aware mapping
    CORE_HASH_STRUCTURE["AGGREGATION_AWARE_MAPPING"] = "AGGREGATION_AWARE_MAPPING";
    CORE_HASH_STRUCTURE["AGGREGATION_AWARE_SPECIFICATION"] = "AGGREGATION_AWARE_SPECIFICATION";
    CORE_HASH_STRUCTURE["AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER"] = "AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER";
    CORE_HASH_STRUCTURE["AGGREGATE_FUNCTION"] = "AGGREGATE_FUNCTION";
    CORE_HASH_STRUCTURE["GROUP_BY_FUNCTION"] = "GROUP_BY_FUNCTION";
    // ---------------------------------- DSL Generation --------------------------------------
    CORE_HASH_STRUCTURE["GENERATION_TREE"] = "GENERATION_TREE";
    CORE_HASH_STRUCTURE["GENERATION_TREE_NODE"] = "GENERATION_TREE_NODE";
    CORE_HASH_STRUCTURE["FILE_GENERATION"] = "FILE_GENERATION";
    CORE_HASH_STRUCTURE["CONFIGURATION_PROPERTY"] = "CONFIGURATION_PROPERTY";
    // ---------------------------------- DSL Data --------------------------------------
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_EMBEDDED_DATA"] = "INTERNAL__UNKNOWN_EMBEDDED_DATA";
    CORE_HASH_STRUCTURE["EXTERNAL_FORMAT_DATA"] = "EXTERNAL_FORMAT_DATA";
    CORE_HASH_STRUCTURE["MODEL_STORE_DATA"] = "MODEL_STORE_DATA";
    CORE_HASH_STRUCTURE["MODEL_DATA"] = "MODEL_DATA";
    CORE_HASH_STRUCTURE["MODEL_EMBEDDED_DATA"] = "MODEL_EMBEDDED_DATA";
    CORE_HASH_STRUCTURE["MODEL_INSTANCE_DATA"] = "MODEL_INSTANCE_DATA";
    CORE_HASH_STRUCTURE["RELATION_ELEMENTS_DATA"] = "RELATION_ELEMENTS_DATA";
    CORE_HASH_STRUCTURE["RELATION_ELEMENT"] = "RELATION_ELEMENT";
    CORE_HASH_STRUCTURE["RELATION_ROW_TEST_DATA"] = "RELATION_ROW_TEST_DATA";
    CORE_HASH_STRUCTURE["DATA_ELEMENT_REFERENCE"] = "DATA_ELEMENT_REFERENCE";
    CORE_HASH_STRUCTURE["DATA_ELEMENT"] = "DATA_ELEMENT";
    CORE_HASH_STRUCTURE["RELATIONAL_CSV_DATA"] = "RELATIONAL_CSV_DATA";
    CORE_HASH_STRUCTURE["RELATIONAL_TDS"] = "RELATIONAL_TDS";
    CORE_HASH_STRUCTURE["RELATIONAL_CSV_DATA_TABLE"] = "RELATIONAL_CSV_DATA_TABLE";
    // ---------------------------------- DSL External Format --------------------------------------
    CORE_HASH_STRUCTURE["BINDING"] = "BINDING";
    CORE_HASH_STRUCTURE["SCHEMA_SET"] = "SCHEMA_SET";
    CORE_HASH_STRUCTURE["SCHEMA"] = "SCHEMA";
    CORE_HASH_STRUCTURE["MODEL_UNIT"] = "MODEL_UNIT";
    CORE_HASH_STRUCTURE["URL_STREAM"] = "URL_STREAM";
    CORE_HASH_STRUCTURE["EXTERNAL_FORMAT_CONNECTION"] = "EXTERNAL_FORMAT_CONNECTION";
    // ---------------------------------- DSL Service --------------------------------------
    CORE_HASH_STRUCTURE["SERVICE"] = "SERVICE";
    CORE_HASH_STRUCTURE["SERVICE_OWNER"] = "SERVICE_OWNER";
    CORE_HASH_STRUCTURE["SERVICE_PURE_EXECUTION"] = "SERVICE_PURE_EXECUTION";
    CORE_HASH_STRUCTURE["SERVICE_PURE_SINGLE_EXECUTION"] = "SERVICE_PURE_SINGLE_EXECUTION";
    CORE_HASH_STRUCTURE["SERVICE_KEYED_EXECUTION_PARAMETER"] = "SERVICE_KEYED_EXECUTION_PARAMETER";
    CORE_HASH_STRUCTURE["SERVICE_PURE_MULTI_EXECUTION"] = "SERVICE_PURE_MULTI_EXECUTION";
    CORE_HASH_STRUCTURE["SERVICE_TEST_CONTAINER"] = "SERVICE_TEST_CONTAINER";
    CORE_HASH_STRUCTURE["SERVICE_LEGACY_SINGLE_EXECUTION_TEST"] = "SERVICE_LEGACY_SINGLE_EXECUTION_TEST";
    CORE_HASH_STRUCTURE["SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST"] = "SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST";
    CORE_HASH_STRUCTURE["SERVICE_LEGACY_MULTI_EXECUTION_TEST"] = "SERVICE_LEGACY_MULTI_EXECUTION_TEST";
    CORE_HASH_STRUCTURE["SERVICE_CONNECTION_TEST_DATA"] = "SERVICE_CONNECTION_TEST_DATA";
    CORE_HASH_STRUCTURE["SERVICE_TEST_DATA"] = "SERVICE_TEST_DATA";
    CORE_HASH_STRUCTURE["SERVICE_TEST_SUITE"] = "SERVICE_TEST_SUITE";
    CORE_HASH_STRUCTURE["SERVICE_TEST"] = "SERVICE_TEST";
    CORE_HASH_STRUCTURE["SERVICE_PARAMETER_VALUE"] = "SERVICE_PARAMETER_VALUE";
    CORE_HASH_STRUCTURE["SERVICE_POST_VALIDATION"] = "SERVICE_POST_VALIDATION";
    CORE_HASH_STRUCTURE["SERVICE_POST_VALIDATION_ASSERTION"] = "SERVICE_POST_VALIDATION_ASSERTION";
    // execution environment instance
    CORE_HASH_STRUCTURE["EXECUTION_ENVIRONMENT_INSTANCE"] = "EXECUTION_ENVIRONMENT_INSTANCE";
    CORE_HASH_STRUCTURE["SINGLE_EXECUTION_PARAMETER"] = "SINGLE_EXECUTION_PARAMETER";
    CORE_HASH_STRUCTURE["MULTI_EXECUTION_PARAMETER"] = "MULTI_EXECUTION_PARAMETER";
    CORE_HASH_STRUCTURE["RUNTIME_COMPONENTS"] = "RUNTIME_COMPONENTS";
    // ---------------------------------- STO Relational --------------------------------------
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION"] = "INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY"] = "INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_POST_PROCESSOR"] = "INTERNAL__UNKNOWN_POST_PROCESSOR";
    // database
    CORE_HASH_STRUCTURE["DATABASE"] = "DATABASE";
    CORE_HASH_STRUCTURE["DATABASE_SCHEMA"] = "DATABASE_SCHEMA";
    CORE_HASH_STRUCTURE["DATABASE_JOIN"] = "DATABASE_JOIN";
    CORE_HASH_STRUCTURE["DATABASE_FILTER"] = "DATABASE_FILTER";
    CORE_HASH_STRUCTURE["DATBASE_VIEW"] = "DATBASE_VIEW";
    CORE_HASH_STRUCTURE["DATABASE_SCHEMA_TABLE"] = "DATABASE_SCHEMA_TABLE";
    CORE_HASH_STRUCTURE["DATABASE_SCHEMA_TABULARFUNCTION"] = "DATABASE_SCHEMA_TABULARFUNCTION";
    CORE_HASH_STRUCTURE["DATABASE_TABLE_COLUMN"] = "DATABASE_TABLE_COLUMN";
    CORE_HASH_STRUCTURE["DATABASE_INCLUDE_STORE"] = "DATABASE_INCLUDE_STORE";
    // relational operation element
    CORE_HASH_STRUCTURE["RELATIONAL"] = "RELATIONAL";
    CORE_HASH_STRUCTURE["RELATIONAL_OPERATION_DYNA_FUNC"] = "RELATIONAL_OPERATION_DYNA_FUNC";
    CORE_HASH_STRUCTURE["RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS"] = "RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS";
    CORE_HASH_STRUCTURE["RELATIONAL_OPERATION_LITERAL"] = "RELATIONAL_OPERATION_LITERAL";
    CORE_HASH_STRUCTURE["RELATIONAL_OPERATION_LITERAL_LIST"] = "RELATIONAL_OPERATION_LITERAL_LIST";
    CORE_HASH_STRUCTURE["RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN"] = "RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN";
    CORE_HASH_STRUCTURE["RELATIONAL_OPERATION_TABLE_POINTER"] = "RELATIONAL_OPERATION_TABLE_POINTER";
    CORE_HASH_STRUCTURE["RELATIONAL_OPERATION_JOIN_POINTER"] = "RELATIONAL_OPERATION_JOIN_POINTER";
    // relational data type
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_VARCHAR"] = "RELATIONAL_DATATYPE_VARCHAR";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_CHAR"] = "RELATIONAL_DATATYPE_CHAR";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_VARBINARY"] = "RELATIONAL_DATATYPE_VARBINARY";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_BINARY"] = "RELATIONAL_DATATYPE_BINARY";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_BIT"] = "RELATIONAL_DATATYPE_BIT";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_INTEGER"] = "RELATIONAL_DATATYPE_INTEGER";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_BIGINT"] = "RELATIONAL_DATATYPE_BIGINT";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_SMALLINT"] = "RELATIONAL_DATATYPE_SMALLINT";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_TINYINT"] = "RELATIONAL_DATATYPE_TINYINT";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_NUMERIC"] = "RELATIONAL_DATATYPE_NUMERIC";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_DECIMAL"] = "RELATIONAL_DATATYPE_DECIMAL";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_DOUBLE"] = "RELATIONAL_DATATYPE_DOUBLE";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_FLOAT"] = "RELATIONAL_DATATYPE_FLOAT";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_REAL"] = "RELATIONAL_DATATYPE_REAL";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_DATE"] = "RELATIONAL_DATATYPE_DATE";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_TIMESTAMP"] = "RELATIONAL_DATATYPE_TIMESTAMP";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_OTHER"] = "RELATIONAL_DATATYPE_OTHER";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_SEMISTRUCTURED"] = "RELATIONAL_DATATYPE_SEMISTRUCTURED";
    CORE_HASH_STRUCTURE["RELATIONAL_DATATYPE_JSON"] = "RELATIONAL_DATATYPE_JSON";
    // relational mapping
    CORE_HASH_STRUCTURE["ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION"] = "ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["RELATIONAL_INSTANCE_SET_IMPLEMENTATION"] = "RELATIONAL_INSTANCE_SET_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["REALTIONAL_PROPERTY_MAPPING"] = "REALTIONAL_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["EMBEDDED_REALTIONAL_PROPERTY_MAPPING"] = "EMBEDDED_REALTIONAL_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING"] = "INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING"] = "OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["RELATION_FUNCTION_INSTANCE_SET_IMPLEMENTATION"] = "RELATION_FUNCTION_INSTANCE_SET_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["RELATION_FUNCTION_PROPERTY_MAPPING"] = "RELATION_FUNCTION_PROPERTY_MAPPING";
    // milestoning
    CORE_HASH_STRUCTURE["BUSINESS_MILESTONING"] = "BUSINESS_MILESTONING";
    CORE_HASH_STRUCTURE["BUSINESS_SNAPSHOT_MILESTONING"] = "BUSINESS_SNAPSHOT_MILESTONING";
    CORE_HASH_STRUCTURE["PROCESSING_MILESTONING"] = "PROCESSING_MILESTONING";
    CORE_HASH_STRUCTURE["PROCESSING_SNAPSHOT_MILESTONING"] = "PROCESSING_SNAPSHOT_MILESTONING";
    // relational database connection
    CORE_HASH_STRUCTURE["RELATIONAL_DATABASE_CONNECTION"] = "RELATIONAL_DATABASE_CONNECTION";
    // relational database connection datasource specification
    CORE_HASH_STRUCTURE["STATIC_DATASOURCE_SPECIFICATION"] = "STATIC_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["LOCAL_H2_DATASOURCE_SPECIFICATION"] = "LOCAL_H2_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["EMBEDDED_H2_DATASOURCE_SPECIFICATION"] = "EMBEDDED_H2_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["SNOWFLAKE_DATASOURCE_SPECIFICATION"] = "SNOWFLAKE_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["REDSHIFT_DATASOURCE_SPECIFICATION"] = "REDSHIFT_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["BIGQUERY_DATASOURCE_SPECIFICATION"] = "BIGQUERY_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["DATABRICKS_DATASOURCE_SPECIFICATION"] = "DATABRICKS_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["SPANNER_DATASOURCE_SPECIFICATION"] = "SPANNER_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["TRINO_DATASOURCE_SPECIFICATION"] = "TRINO_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["DUCKDB_DATASOURCE_SPECIFICATION"] = "DUCKDB_DATASOURCE_SPECIFICATION";
    CORE_HASH_STRUCTURE["TRINO_SSL_SPECIFICATION"] = "TRINO_SSL_SPECIFICATION";
    // relational database connection authentication strategy
    CORE_HASH_STRUCTURE["DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY"] = "DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["DEFAULT_H2_AUTHENTICATION_STRATEGY"] = "DEFAULT_H2_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["TEST_AUTHENTICATION_STRATEGY"] = "TEST_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY"] = "SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["API_TOKEN_AUTHENTICATION_STRATEGY"] = "API_TOKEN_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY"] = "GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["USERNAME_PASSWORD_AUTHENTICATION_STRATEGY"] = "USERNAME_PASSWORD_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["OAUTH_AUTHENTICATION_STRATEGY"] = "OAUTH_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY"] = "GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY"] = "MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY";
    CORE_HASH_STRUCTURE["TRINO_DELEGATED_KERBEROS_AUTHENTICATION_STRATEGY"] = "TRINO_KEREBEROS_AUTHENTICATION_STRATEGY";
    // relational database connection post-processors
    CORE_HASH_STRUCTURE["MAPPER_POST_PROCESSOR"] = "MAPPER_POST_PROCESSOR";
    CORE_HASH_STRUCTURE["SCHEMA_MAPPER"] = "SCHEMA_MAPPER";
    CORE_HASH_STRUCTURE["TABLE_MAPPER"] = "TABLE_MAPPER";
    // relational database connection query generation config
    CORE_HASH_STRUCTURE["GENERATION_FEATURES_CONFIG"] = "GENERATION_FEATURES_CONFIG";
    // ---------------------------------- STO Flat-Data --------------------------------------
    CORE_HASH_STRUCTURE["FLAT_DATA"] = "FLAT_DATA";
    CORE_HASH_STRUCTURE["FLAT_DATA_SECTION"] = "FLAT_DATA_SECTION";
    CORE_HASH_STRUCTURE["FLAT_DATA_PROPERTY"] = "FLAT_DATA_PROPERTY";
    CORE_HASH_STRUCTURE["FLAT_DATA_ROOT_RECORD_TYPE"] = "FLAT_DATA_ROOT_RECORD_TYPE";
    CORE_HASH_STRUCTURE["FLAT_DATA_RECORD_TYPE"] = "FLAT_DATA_RECORD_TYPE";
    CORE_HASH_STRUCTURE["FLAT_DATA_RECORD_FIELD"] = "FLAT_DATA_RECORD_FIELD";
    CORE_HASH_STRUCTURE["FLAT_DATA_STRING"] = "FLAT_DATA_STRING";
    CORE_HASH_STRUCTURE["FLAT_DATA_BOOLEAN"] = "FLAT_DATA_BOOLEAN";
    CORE_HASH_STRUCTURE["FLAT_DATA_NUMBER"] = "FLAT_DATA_NUMBER";
    CORE_HASH_STRUCTURE["FLAT_DATA_INTEGER"] = "FLAT_DATA_INTEGER";
    CORE_HASH_STRUCTURE["FLAT_DATA_FLOAT"] = "FLAT_DATA_FLOAT";
    CORE_HASH_STRUCTURE["FLAT_DATA_DECIMAL"] = "FLAT_DATA_DECIMAL";
    CORE_HASH_STRUCTURE["FLAT_DATA_DATE"] = "FLAT_DATA_DATE";
    CORE_HASH_STRUCTURE["FLAT_DATA_DATE_TIME"] = "FLAT_DATA_DATE_TIME";
    CORE_HASH_STRUCTURE["FLAT_DATA_STRICT_DATE"] = "FLAT_DATA_STRICT_DATE";
    CORE_HASH_STRUCTURE["FLAT_DATA_INSTANCE_SET_IMPLEMENTATION"] = "FLAT_DATA_INSTANCE_SET_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["FLAT_DATA_PROPERTY_MAPPING"] = "FLAT_DATA_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["FLAT_DATA_ASSOCIATION_IMPLEMENTATION"] = "FLAT_DATA_ASSOCIATION_IMPLEMENTATION";
    CORE_HASH_STRUCTURE["FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING"] = "FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["EMBEDDED_FLAT_DATA_PROPERTY_MAPPING"] = "EMBEDDED_FLAT_DATA_PROPERTY_MAPPING";
    CORE_HASH_STRUCTURE["FLAT_DATA_SECTION_POINTER"] = "FLAT_DATA_SECTION_POINTER";
    // -------------------------------------- Function Activator --------------------------------------
    CORE_HASH_STRUCTURE["SNOWFLAKE_APP"] = "SNOWFLAKE_APP";
    CORE_HASH_STRUCTURE["SNOWFLAKE_M2M_UDF"] = "SNOWFLAKE_M2M_UDF";
    CORE_HASH_STRUCTURE["HOSTED_SERVICE"] = "HOSTED_SERVICE";
    CORE_HASH_STRUCTURE["HOSTED_SERVICE_OWNER"] = "HOSTED_SERVICE_OWNER";
    CORE_HASH_STRUCTURE["MEM_SQL_FUNCTION"] = "MEM_SQL_FUNCTION";
    // ---------------------------------- Relation --------------------------------------
    CORE_HASH_STRUCTURE["RELATION_TYPE"] = "RELATION_TYPE";
    CORE_HASH_STRUCTURE["RELATION_COLUMN"] = "RELATION_COLUMN";
    // ---------------------------------- Data Product --------------------------------------
    CORE_HASH_STRUCTURE["DATA_PRODUCT"] = "DATA_PRODUCT";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_ACCESS_POINT_GROUP"] = "DATA_PRODUCT_ACCESS_POINT_GROUP";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_DEFAULT_ACCESS_POINT_GROUP"] = "DATA_PRODUCT_DEFAULT_ACCESS_POINT_GROUP";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_MODEL_ACCESS_POINT_GROUP"] = "DATA_PRODUCT_MODEL_ACCESS_POINT_GROUP";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_NATIVE_MODEL_EXECUTION_CONTEXT"] = "DATA_PRODUCT_NATIVE_MODEL_EXECUTION_CONTEXT";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_NATIVE_MODEL_ACCESS"] = "DATA_PRODUCT_NATIVE_MODEL_ACCESS";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_SAMPLE_QUERY"] = "DATA_PRODUCT_SAMPLE_QUERY";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_PACKAGEABLE_ELEMENT_SAMPLE_QUERY"] = "DATA_PRODUCT_PACKAGEABLE_ELEMENT_SAMPLE_QUERY";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_INLINE_SAMPLE_QUERY"] = "DATA_PRODUCT_INLINE_SAMPLE_QUERY";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_ACCESS_POINT"] = "DATA_PRODUCT_ACCESS_POINT";
    CORE_HASH_STRUCTURE["SUPPORT_INFO"] = "SUPPORT_INFO";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_RUNTIME_INFO"] = "DATA_PRODUCT_RUNTIME_INFO";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_ELEMENT_SCOPE"] = "DATA_PRODUCT_ELEMENT_SCOPE";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_DIAGRAM"] = "DATA_PRODUCT_DIAGRAM";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_LINK"] = "DATA_PRODUCT_LINK";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_ICON_EMBEDDED_IMAGE"] = "DATA_PRODUCT_ICON_EMBEDDED_IMAGE";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_ICON_LIBRARY"] = "DATA_PRODUCT_ICON_LIBRARY";
    CORE_HASH_STRUCTURE["INTERNAL__UNKNOWN_DATA_PRODUCT_ICON"] = "INTERNAL__UNKNOWN_DATA_PRODUCT_ICON";
    CORE_HASH_STRUCTURE["EMAIL"] = "EMAIL";
    CORE_HASH_STRUCTURE["LAKEHOUSE_ACCESS_POINT"] = "LAKEHOUSE_ACCESS_POINT";
    CORE_HASH_STRUCTURE["UNKNOWN_ACCESS_POINT"] = "UNKNOWN_ACCESS_POINT";
    CORE_HASH_STRUCTURE["FUNCTION_ACCESS_POINT"] = "FUNCTION_ACCESS_POINT";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_TYPE"] = "DATA_PRODUCT_TYPE";
    CORE_HASH_STRUCTURE["MAPPING_INCLUDE_DATAPRODUCT"] = "MAPPING_INCLUDE_DATAPRODUCT";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_EXPERTISE"] = "DATA_PRODUCT_EXPERTISE";
    CORE_HASH_STRUCTURE["DATA_PRODUCT_OPERATIONAL_METADATA"] = "DATA_PRODUCT_OPERATIONAL_METADATA";
})(CORE_HASH_STRUCTURE || (CORE_HASH_STRUCTURE = {}));
export const hashObjectWithoutSourceInformation = (val) => hashObject(val, {
    /**
     * NOTE: this is over-simplification as there could be source information fields with other names
     * see note in {@link pruneSourceInformation}
     */
    excludeKeys: (propKey) => propKey
        .toLowerCase()
        .endsWith(SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX.toLowerCase()),
});
export const hashRawLambda = (parameters, body) => hashArray([
    parameters ? hashObjectWithoutSourceInformation(parameters) : '',
    body ? hashObjectWithoutSourceInformation(body) : '',
]);
export const hashElementPointer = (pointerType, path) => [CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT_POINTER, pointerType ?? '', path]
    .map(hashValue)
    .join(',');
//# sourceMappingURL=Core_HashUtils.js.map