From 74d88580a5e3d24c6421942f2c96a8dfd56d39d1 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Tue, 13 Aug 2024 11:30:19 -0400 Subject: [PATCH] Migrate codebase to use Object.hasOwn instead of Object.hasOwnProperty (#186829) ## Summary This PR has breadth, but not depth. This adds 3 new `eslint` rules. The first two protect against the use of code generated from strings (`eval` and friends), which will not work client-side due to our CSP, and is not something we wish to support server-side. The last rule aims to prevent a subtle class of bugs, and to defend against a subset of prototype pollution exploits: - `no-new-func` to be compliant with our CSP, and to prevent code execution from strings server-side: https://eslint.org/docs/latest/rules/no-new-func - `no-implied-eval` to be compliant with our CSP, and to prevent code execution from strings server-side: https://eslint.org/docs/latest/rules/no-implied-eval. Note that this function implies that it prevents no-new-func, but I don't see [test cases](https://github.com/eslint/eslint/blob/main/tests/lib/rules/no-implied-eval.js) covering this behavior, so I think we should play it safe and enable both rules. - `no-prototype-builtins` to prevent accessing shadowed properties: https://eslint.org/docs/latest/rules/no-prototype-builtins In order to be compliant with `no-prototype-builtins`, I've migrated all usages and variants of `Object.hasOwnProperty` to use the newer [`Object.hasOwn`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn). --- .../search/search_react_embeddable.tsx | 4 +- .../public/trigger_context_example.tsx | 2 +- .../src/client_config.test.ts | 2 +- .../src/core/build_active_mappings.ts | 2 +- .../src/core/build_index_map.ts | 2 +- .../src/core/build_types_mappings.ts | 2 +- .../src/clients/base_ui_settings_client.ts | 2 +- .../src/clients/ui_settings_client_common.ts | 4 +- .../src/ui_settings_service.ts | 2 +- .../modes/x_json/worker/x_json.ace.worker.js | 8 ++-- packages/kbn-cli-dev-mode/src/optimizer.ts | 2 +- .../src/search/tabify/tabify_docs.ts | 4 +- .../src/lib/indices/__mocks__/stubs.ts | 2 +- packages/kbn-eslint-config/.eslintrc.js | 4 ++ packages/kbn-expect/expect.js | 4 +- packages/kbn-flot-charts/lib/jquery_flot.js | 2 +- .../src/spec/index.regressions.test.ts | 2 +- packages/kbn-handlebars/src/utils.ts | 1 + packages/kbn-handlebars/src/visitor.ts | 2 +- .../src/update_vscode_config.ts | 2 +- .../field_input/input/select_input.tsx | 2 +- .../settings/components/form/use_save.ts | 2 +- .../public/role_switcher.tsx | 2 +- packages/kbn-safer-lodash-set/README.md | 2 +- .../test/fp_patch_test.js | 2 +- .../kbn-safer-lodash-set/test/patch_test.js | 2 +- .../src/default_validation_error_handler.ts | 2 +- packages/kbn-std/src/ensure_deep_object.ts | 2 +- .../src/ensure_no_unsafe_properties.ts | 10 +--- .../lib/providers/async_instance.ts | 6 +-- .../lib/providers/verbose_instance.ts | 2 +- .../src/jest/setup/polyfills.jsdom.js | 10 ++-- .../src/kbn_client/kbn_client_ui_settings.ts | 2 +- .../src/tooling_log_text_writer.ts | 2 +- .../field_examples_calculator.ts | 2 +- .../interfaces/has_execution_context.ts | 2 +- .../shared-ux/chrome/navigation/src/utils.ts | 2 +- src/dev/storybook/run_storybook_cli.ts | 2 +- .../metric_trendline_function.ts | 2 +- .../public/utils/layers/get_color.ts | 6 +-- .../convert_mapbox_vector_tile_to_json.ts | 2 +- .../legacy_core_editor/mode/worker/worker.js | 5 +- .../server/custom_integration_registry.ts | 2 +- .../lib/dashboard_panel_converters.test.ts | 6 +-- .../search_source/search_source.test.ts | 2 +- .../search/search_source/search_source.ts | 4 +- .../common/search/tabify/response_writer.ts | 2 +- .../data/public/utils/shallow_equal.ts | 2 +- .../server/search/session/session_service.ts | 2 +- .../lib/field_capabilities/overrides.ts | 2 +- .../expressions/common/ast/build_function.ts | 6 +-- .../field_formats/common/converters/url.ts | 2 +- .../public/management_sections_service.ts | 4 +- .../objects_table/components/table.test.tsx | 2 +- .../filter_editor/phrase_suggestor.tsx | 3 +- .../query_string_input/query_string_input.tsx | 6 ++- .../public/utils/shallow_equal.ts | 2 +- .../public/components/agg_params.tsx | 4 +- .../utils/table_vis_response_handler.ts | 2 +- .../timelion/server/series_functions/props.js | 2 +- .../components/inspector_data_grid.tsx | 2 +- .../vislib/public/vislib/lib/data.js | 2 +- .../vislib/public/vislib/response_handler.js | 2 +- .../dev-tools/api_debug/request_from_api.js | 2 +- x-pack/packages/ml/data_grid/lib/common.ts | 4 +- .../packages/ml/url_state/src/url_state.tsx | 2 +- x-pack/plugins/actions/server/index.ts | 8 ++-- .../actions/server/lib/mustache_renderer.ts | 2 +- .../saved_objects/actions_migrations.ts | 10 ++-- .../public/application/utils/search_utils.ts | 2 +- ...log_rate_analysis_results_table_groups.tsx | 2 +- .../use_columns.tsx | 2 +- .../server/alerts_client/alerts_client.ts | 4 +- .../alerts_client/legacy_alerts_client.ts | 2 +- .../alerting/server/lib/process_alerts.ts | 8 ++-- .../index.ts | 4 +- .../server/rules_client/lib/update_meta.ts | 2 +- .../lib/update_meta_attributes.ts | 2 +- .../saved_objects/migrations/7.11/index.ts | 2 +- .../public/components/user_actions/status.tsx | 3 +- .../cloud_defend/public/common/utils.ts | 2 +- .../control_general_view_selector/index.tsx | 8 ++-- .../server/assets/fullstory_library.js | 2 +- .../components/fleet_extensions/utils.ts | 2 +- .../follower_index_pause_provider.js | 1 - .../common/types/field_vis_config.ts | 4 +- .../combined_fields/combined_fields_form.tsx | 2 +- .../results_links/results_links.tsx | 2 +- .../common/components/utils/utils.ts | 2 +- .../hooks/use_overall_stats.ts | 2 +- .../index_data_visualizer.tsx | 2 +- .../search_strategy/requests/overall_stats.ts | 10 ++-- .../utils/saved_search_utils.ts | 2 +- .../curations/curation/results/utils.ts | 2 +- .../curation_suggestion_logic.ts | 2 +- .../ignored_queries_logic.ts | 2 +- .../components/relevance_tuning/utils.ts | 2 +- .../result_settings/result_settings_logic.ts | 2 +- .../components/schema/schema_logic.ts | 2 +- .../docs_explorer/convert_results.ts | 2 +- .../pipelines_json_configurations_logic.ts | 2 +- .../shared/pipelines/is_managed.ts | 2 +- .../get_ml_inference_pipeline_processors.ts | 4 +- .../fields_metadata_client.test.ts | 48 +++++++++---------- .../integration_fields_repository.ts | 4 +- .../fleet/public/applications/fleet/app.tsx | 2 - .../public/applications/integrations/app.tsx | 2 - .../cloud_security_posture/to_v8_11_0.ts | 5 +- .../services/api_keys/transform_api_keys.ts | 4 +- .../epm/elasticsearch/template/install.ts | 2 +- .../epm/elasticsearch/template/template.ts | 8 ++-- .../transform/transform_utils.ts | 2 +- .../workspace/graph_client_workspace.js | 8 ++-- .../shared_fields/index_priority_field.tsx | 9 ++-- .../server/graphs/ecs/validate.ts | 2 +- .../form_based/dimension_panel/time_shift.tsx | 2 +- .../visualizations/xy/xy_suggestions.ts | 2 +- .../server/migrations/common_migrations.ts | 2 +- x-pack/plugins/licensing/common/license.ts | 2 +- .../elasticsearch_geo_utils.test.js | 6 +-- .../common/elasticsearch_util/es_agg_utils.ts | 4 +- .../ems_vector_tile_layer.tsx | 4 +- .../sources/es_agg_source/es_agg_source.ts | 2 +- .../process_distance_response.ts | 2 +- .../join_sources/table_source/table_source.ts | 4 +- .../mvt_single_layer_vector_source.tsx | 2 +- .../mb_map/remove_orphaned.ts | 2 +- .../lens/choropleth_chart/suggestions.ts | 2 +- .../maps/public/selectors/map_selectors.ts | 2 +- .../map_stats/map_stats_collector.ts | 6 +-- x-pack/plugins/ml/common/types/alerts.ts | 6 +-- x-pack/plugins/ml/common/util/es_utils.ts | 3 +- x-pack/plugins/ml/common/util/job_utils.ts | 4 +- .../ml/common/util/validation_utils.ts | 2 +- .../revert_model_snapshot_flyout.tsx | 2 - .../data_frame_analytics/common/analytics.ts | 2 +- .../action_clone/clone_action_name.tsx | 4 +- .../hooks/use_create_analytics_form/state.ts | 2 +- .../explorer_anomalies_container.tsx | 2 - .../explorer/swimlane_container.tsx | 2 +- .../group_selector/group_selector.js | 4 +- ...ference_properties_from_pipeline_config.ts | 4 +- .../model_management/models_list.tsx | 2 +- .../anomaly_detection_panel.tsx | 2 +- .../services/field_format_service.ts | 2 +- .../series_controls/series_controls.tsx | 4 +- .../application/util/custom_url_utils.ts | 5 +- .../plugins/ml/public/maps/anomaly_source.tsx | 2 +- x-pack/plugins/ml/public/maps/util.ts | 4 +- .../models/data_visualizer/data_visualizer.ts | 8 ++-- .../models/fields_service/fields_service.ts | 12 ++--- .../ml/server/models/job_service/jobs.ts | 2 +- .../job_validation/validate_cardinality.ts | 4 +- .../notifications_service_provider.ts | 2 +- .../contexts/global_state_context.tsx | 2 +- .../models/graph/plugin_vertex.js | 4 +- .../monitoring/public/lib/form_validation.ts | 2 +- .../server/lib/alerts/fetch_available_ccs.ts | 4 +- .../nodes/get_nodes/get_paginated_nodes.ts | 2 +- .../lib/elasticsearch_settings/cluster.ts | 2 +- .../lib/logstash/get_pipeline_vertex.ts | 2 +- .../telemetry_collection/get_beats_stats.ts | 8 ++-- .../logstash_agent_monitoring.ts | 4 +- .../logstash_metricbeat_monitoring.ts | 6 +-- .../logstash_self_monitoring.ts | 6 +-- .../monitoring_collection/server/plugin.ts | 4 +- .../settings_page/settings_page.tsx | 2 +- .../shared/stacktrace/stackframe.tsx | 2 +- .../entities/utils/calculate_avg_metrics.ts | 2 +- .../alerting/logs/log_threshold/types.ts | 2 +- .../asset_details/tabs/metadata/utils.ts | 2 +- .../metric_threshold/lib/metric_query.test.ts | 4 +- .../logs_explorer/public/utils/proxies.ts | 2 +- .../alerts_flyout/alerts_flyout.stories.tsx | 1 - .../custom_threshold/lib/metric_query.test.ts | 6 +-- .../public/utils/create_initialized_object.ts | 2 +- .../server/lib/get_fallback_urls.ts | 6 ++- .../grouped_slos/hooks/use_group_name.ts | 2 +- .../osquery/public/agents/agents_table.tsx | 3 +- .../server/lib/notebook_catalog.ts | 2 +- .../services/role_template_type.ts | 6 ++- .../users/edit_user/edit_user_page.tsx | 4 -- .../management/users/edit_user/user_form.tsx | 2 - .../authentication/can_redirect_request.ts | 4 +- .../authorization/disable_ui_capabilities.ts | 6 +-- .../routes/feature_check/feature_check.ts | 2 +- .../assistant/comment_actions/index.tsx | 3 -- .../body/renderers/suricata/suricata_links.ts | 4 +- .../scripts/run_cypress/utils.ts | 1 + .../logic/rule_actions/legacy_migrations.ts | 2 +- .../utils/filter_field_entries.ts | 3 +- .../capabilities/capabilities_switcher.ts | 8 ++-- .../migrations/space_migrations.ts | 2 +- .../server/spaces_client/spaces_client.ts | 8 ++-- .../es_query/lib/fetch_esql_query.ts | 34 ++++++++++++- .../geo_containment/lib/transform_results.ts | 2 +- .../common/slack_api/schema.ts | 2 +- .../connector_types/jira/jira_params.tsx | 8 ++-- .../connector_types/slack_api/slack_api.tsx | 2 +- .../transform/common/utils/es_utils.ts | 3 +- .../public/app/hooks/use_delete_transform.tsx | 2 +- .../app/hooks/use_reauthorize_transform.tsx | 2 +- .../public/app/hooks/use_reset_transform.tsx | 2 +- .../app/hooks/use_schedule_now_transform.tsx | 2 +- .../public/app/hooks/use_start_transform.tsx | 2 +- .../public/app/hooks/use_stop_transform.tsx | 2 +- .../app/hooks/use_transform_config_data.ts | 2 +- .../advanced_runtime_mappings_settings.tsx | 6 +-- .../filter_agg/components/filter_agg_form.tsx | 2 +- .../sections/rule_form/rule_conditions.tsx | 2 +- .../upgrade_assistant/public/plugin.ts | 2 +- .../watcher/public/legacy/time_buckets.js | 4 +- .../server/models/settings/settings.js | 4 +- .../apps/group2/ml_anomaly_detection.ts | 12 ++--- .../management/index_management/settings.ts | 2 +- .../apis/management/index_management/stats.ts | 2 +- .../apis/ml/job_validation/validate.ts | 2 +- .../apis/ml/modules/recognize_module.ts | 2 +- .../apis/ml/modules/setup_module.ts | 6 +-- .../apis/agents/delete.ts | 2 +- .../fleet_api_integration/apis/test_users.ts | 2 +- .../apps/maps/group2/es_geo_grid_source.js | 4 +- .../test/functional/apps/maps/group4/joins.js | 4 +- .../ml/anomaly_detection_jobs/advanced_job.ts | 48 +++++++++---------- .../convert_jobs_to_advanced_job.ts | 16 +++---- .../anomaly_detection_jobs/date_nanos_job.ts | 22 ++++----- .../page_objects/infra_logs_page.ts | 2 +- .../functional/page_objects/uptime_page.ts | 2 +- .../discover_timeline_state_integration.cy.ts | 4 +- .../common/index_management/settings.ts | 2 +- 230 files changed, 458 insertions(+), 437 deletions(-) diff --git a/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx index ef73c179b8f8e..eea33aff7bf5a 100644 --- a/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx +++ b/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx @@ -111,10 +111,10 @@ export const getSearchEmbeddableFactory = (services: Services) => { ) .subscribe((next) => { dataLoading$.next(false); - if (next && next.hasOwnProperty('count') && next.count !== undefined) { + if (next && Object.hasOwn(next, 'count') && next.count !== undefined) { count$.next(next.count); } - if (next && next.hasOwnProperty('error')) { + if (next && Object.hasOwn(next, 'error')) { blockingError$.next(next.error); } }); diff --git a/examples/ui_actions_explorer/public/trigger_context_example.tsx b/examples/ui_actions_explorer/public/trigger_context_example.tsx index 3e94cd253a215..5769c4c6c02b9 100644 --- a/examples/ui_actions_explorer/public/trigger_context_example.tsx +++ b/examples/ui_actions_explorer/public/trigger_context_example.tsx @@ -108,7 +108,7 @@ export function TriggerContextExample({ uiActionsApi }: Props) { const renderCellValue = useMemo(() => { return ({ rowIndex, columnId }: EuiDataGridCellValueElementProps) => { - return rows.hasOwnProperty(rowIndex) ? rows[rowIndex][columnId] : null; + return Object.hasOwn(rows, rowIndex) ? rows[rowIndex][columnId] : null; }; }, [rows]); diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts index de0702b62aa66..078287a9cb151 100644 --- a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts @@ -80,7 +80,7 @@ describe('parseClientOptions', () => { it('`customHeaders` take precedence to default kibana headers', () => { const customHeader: Record = {}; for (const header in defaultHeaders) { - if (defaultHeaders.hasOwnProperty(header)) { + if (Object.hasOwn(defaultHeaders, header)) { customHeader[header] = 'foo'; } } diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_active_mappings.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_active_mappings.ts index 5525814c07238..5fabc74d118d7 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_active_mappings.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_active_mappings.ts @@ -106,7 +106,7 @@ function validateAndMerge( if (k.startsWith('_')) { throw new Error(`Invalid mapping "${k}". Mappings cannot start with _.`); } - if (dest.hasOwnProperty(k)) { + if (Object.hasOwn(dest, k)) { throw new Error(`Cannot redefine core mapping "${k}".`); } }); diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_index_map.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_index_map.ts index 225b3bb422925..125eec08e52b3 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_index_map.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_index_map.ts @@ -32,7 +32,7 @@ export function createIndexMap({ kibanaIndexName, registry, indexMap }: CreateIn const script = typeDef?.convertToAliasScript; // Defaults to kibanaIndexName if indexPattern isn't defined const indexPattern = typeDef?.indexPattern || kibanaIndexName; - if (!map.hasOwnProperty(indexPattern as string)) { + if (!Object.hasOwn(map, indexPattern as string)) { map[indexPattern] = { typeMappings: {} }; } map[indexPattern].typeMappings[type] = indexMap[type]; diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_types_mappings.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_types_mappings.ts index 18aa689149c24..d5845c278273e 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_types_mappings.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_types_mappings.ts @@ -16,7 +16,7 @@ export const buildTypesMappings = ( types: SavedObjectsType[] ): SavedObjectsTypeMappingDefinitions => { return types.reduce((acc, { name: type, mappings }) => { - const duplicate = acc.hasOwnProperty(type); + const duplicate = Object.hasOwn(acc, type); if (duplicate) { throw new Error(`Type ${type} is already defined.`); } diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/base_ui_settings_client.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/base_ui_settings_client.ts index 04da5a75788ec..b82b1343b4688 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/base_ui_settings_client.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/base_ui_settings_client.ts @@ -66,7 +66,7 @@ export abstract class BaseUiSettingsClient implements IUiSettingsClient { } isOverridden(key: string) { - return this.overrides.hasOwnProperty(key); + return Object.hasOwn(this.overrides, key); } isSensitive(key: string): boolean { diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/ui_settings_client_common.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/ui_settings_client_common.ts index c923feaf9da92..e7b0db9e2394a 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/ui_settings_client_common.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/ui_settings_client_common.ts @@ -93,7 +93,7 @@ export abstract class UiSettingsClientCommon extends BaseUiSettingsClient { } private assertUpdateAllowed(key: string) { - if (this.overrides.hasOwnProperty(key)) { + if (Object.hasOwn(this.overrides, key)) { throw new CannotOverrideError(`Unable to update "${key}" because it is overridden`); } } @@ -113,7 +113,7 @@ export abstract class UiSettingsClientCommon extends BaseUiSettingsClient { // validate value read from saved objects as it can be changed via SO API const filteredValues: UserProvided = {}; for (const [key, userValue] of Object.entries(values)) { - if (userValue === null || this.overrides.hasOwnProperty(key)) continue; + if (userValue === null || Object.hasOwn(this.overrides, key)) continue; try { this.validateKey(key, userValue); filteredValues[key] = { diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts index 02dfd1562c3b3..cfd12e2432835 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts @@ -94,7 +94,7 @@ export class UiSettingsService registerInternalRoutes(router); // Register public routes by default unless the publicApiEnabled config setting is set to false - if (!config.hasOwnProperty('publicApiEnabled') || config.publicApiEnabled === true) { + if (!Object.hasOwn(config, 'publicApiEnabled') || config.publicApiEnabled === true) { registerRoutes(router); } diff --git a/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js b/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js index c27e96624a8b7..c3720e5546628 100644 --- a/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js +++ b/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js @@ -472,9 +472,9 @@ }, this.createAnchor = function(row, column) { return new Anchor(this, row, column) }, this.$split = 0 === "aaa".split(/a/).length ? function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n") + return text.replace(/\r\n|\r/g, "\n").split("\n"); } : function(text) { - return text.split(/\r\n|\r|\n/) + return text.split(/\r\n|\r|\n/); }, this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n", this._signal("changeNewLineMode") @@ -711,9 +711,9 @@ }, exports.arrayRemove = function(array, value) { for (var i = 0; array.length >= i; i++) value === array[i] && array.splice(i, 1) }, exports.escapeRegExp = function(str) { - return str.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1") + return str.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1"); }, exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/(obj: T, x: any): x is keyof T => obj.hasOwnProperty(x); + const has = (obj: T, x: any): x is keyof T => Object.hasOwn(obj, x); log.setWriters([ { diff --git a/packages/kbn-data-service/src/search/tabify/tabify_docs.ts b/packages/kbn-data-service/src/search/tabify/tabify_docs.ts index ceb60b7492d92..5f8912c32ae20 100644 --- a/packages/kbn-data-service/src/search/tabify/tabify_docs.ts +++ b/packages/kbn-data-service/src/search/tabify/tabify_docs.ts @@ -48,7 +48,7 @@ function flattenAccum( params?: TabifyDocsOptions ) { for (const k in obj) { - if (!obj.hasOwnProperty(k)) { + if (!Object.hasOwn(obj, k)) { continue; } const val = obj[k]; @@ -114,7 +114,7 @@ export function flattenHit(hit: Hit, indexPattern?: DataView, params?: TabifyDoc // merged, since we would otherwise duplicate values, since ignore_field_values and _source // contain the same values. for (const fieldName in hit.ignored_field_values) { - if (!hit.ignored_field_values.hasOwnProperty(fieldName)) { + if (!Object.hasOwn(hit.ignored_field_values, fieldName)) { continue; } const fieldValue = hit.ignored_field_values[fieldName]; diff --git a/packages/kbn-es-archiver/src/lib/indices/__mocks__/stubs.ts b/packages/kbn-es-archiver/src/lib/indices/__mocks__/stubs.ts index 1bfbc80f52a19..f6b602b734bd0 100644 --- a/packages/kbn-es-archiver/src/lib/indices/__mocks__/stubs.ts +++ b/packages/kbn-es-archiver/src/lib/indices/__mocks__/stubs.ts @@ -121,7 +121,7 @@ export const createStubClient = ( return { body: { ok: true } }; }), create: sinon.spy(async ({ index }) => { - if (existingIndices.includes(index) || aliases.hasOwnProperty(index)) { + if (existingIndices.includes(index) || Object.hasOwn(aliases, index)) { throw createEsClientError('resource_already_exists_exception'); } else { existingIndices.push(index); diff --git a/packages/kbn-eslint-config/.eslintrc.js b/packages/kbn-eslint-config/.eslintrc.js index 1391c842b235a..028309aa05774 100644 --- a/packages/kbn-eslint-config/.eslintrc.js +++ b/packages/kbn-eslint-config/.eslintrc.js @@ -312,5 +312,9 @@ module.exports = { '@kbn/imports/uniform_imports': 'error', '@kbn/imports/no_unused_imports': 'error', '@kbn/imports/no_boundary_crossing': 'error', + + 'no-new-func': 'error', + 'no-implied-eval': 'error', + 'no-prototype-builtins': 'error', }, }; diff --git a/packages/kbn-expect/expect.js b/packages/kbn-expect/expect.js index 8a7d1802a7e0e..1a48d75a4615d 100644 --- a/packages/kbn-expect/expect.js +++ b/packages/kbn-expect/expect.js @@ -45,7 +45,7 @@ function Assertion (obj, flag, parent) { this.flags[flag] = true; for (var i in parent.flags) { - if (parent.flags.hasOwnProperty(i)) { + if (Object.hasOwn(parent.flags, i)) { this.flags[i] = true; } } @@ -70,7 +70,7 @@ function Assertion (obj, flag, parent) { }; for (var fn in Assertion.prototype) { - if (Assertion.prototype.hasOwnProperty(fn) && fn != name) { + if (Object.hasOwn(Assertion.prototype, fn) && fn != name) { if (typeof this[name] === 'function' && fn === 'length') { continue; } diff --git a/packages/kbn-flot-charts/lib/jquery_flot.js b/packages/kbn-flot-charts/lib/jquery_flot.js index 5252356279e51..3b13b317c616c 100644 --- a/packages/kbn-flot-charts/lib/jquery_flot.js +++ b/packages/kbn-flot-charts/lib/jquery_flot.js @@ -2750,7 +2750,7 @@ Licensed under the MIT license. var ascending = options.legend.sorted != "descending"; entries.sort(function(a, b) { return a.label == b.label ? 0 : ( - (a.label < b.label) != ascending ? 1 : -1 // Logical XOR + ((a.label < b.label) != ascending ? 1 : -1) // Logical XOR ); }); } diff --git a/packages/kbn-handlebars/src/spec/index.regressions.test.ts b/packages/kbn-handlebars/src/spec/index.regressions.test.ts index fc2065fe7585d..5ff37a3dd9849 100644 --- a/packages/kbn-handlebars/src/spec/index.regressions.test.ts +++ b/packages/kbn-handlebars/src/spec/index.regressions.test.ts @@ -231,7 +231,7 @@ describe('Regressions', () => { // It's valid to execute a block against an undefined context, but // helpers can not do so, so we expect to have an empty object here; for (const name in this) { - if (Object.prototype.hasOwnProperty.call(this, name)) { + if (Object.hasOwn(this, name)) { return 'found'; } } diff --git a/packages/kbn-handlebars/src/utils.ts b/packages/kbn-handlebars/src/utils.ts index b44f4a9791f02..d33bafcd0ef5e 100644 --- a/packages/kbn-handlebars/src/utils.ts +++ b/packages/kbn-handlebars/src/utils.ts @@ -63,6 +63,7 @@ export function allowUnsafeEval() { try { // Do not remove the `kbnUnsafeEvalTest` parameter. // It is used for filtering out expected CSP failures, and must be the first piece of content in this function. + // eslint-disable-next-line no-new-func new Function('kbnUnsafeEvalTest', 'return true;'); return true; } catch (e) { diff --git a/packages/kbn-handlebars/src/visitor.ts b/packages/kbn-handlebars/src/visitor.ts index 16dc151df8640..2195820bf46de 100644 --- a/packages/kbn-handlebars/src/visitor.ts +++ b/packages/kbn-handlebars/src/visitor.ts @@ -112,7 +112,7 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { if (result == null) { return result; } - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + if (Object.hasOwn(parent, propertyName)) { return result; } diff --git a/packages/kbn-managed-vscode-config/src/update_vscode_config.ts b/packages/kbn-managed-vscode-config/src/update_vscode_config.ts index d327ab98ae82c..2e3a3a5d25563 100644 --- a/packages/kbn-managed-vscode-config/src/update_vscode_config.ts +++ b/packages/kbn-managed-vscode-config/src/update_vscode_config.ts @@ -141,7 +141,7 @@ const mergeManagedProperties = ( if ( isBasicObjectProp(prop) && isManaged(prop) && - !Object.prototype.hasOwnProperty.call(managedValue, prop.key.value) + !Object.hasOwn(managedValue, prop.key.value) ) { remove(properties, prop); } diff --git a/packages/kbn-management/settings/components/field_input/input/select_input.tsx b/packages/kbn-management/settings/components/field_input/input/select_input.tsx index 9421d4d3e83b1..a02dbf61bd16f 100644 --- a/packages/kbn-management/settings/components/field_input/input/select_input.tsx +++ b/packages/kbn-management/settings/components/field_input/input/select_input.tsx @@ -42,7 +42,7 @@ export const SelectInput = ({ const options = useMemo( () => optionsProp?.map((option) => ({ - text: optionLabels.hasOwnProperty(option) ? optionLabels[option] : option, + text: Object.hasOwn(optionLabels, option) ? optionLabels[option] : option, value: option, })), [optionsProp, optionLabels] diff --git a/packages/kbn-management/settings/components/form/use_save.ts b/packages/kbn-management/settings/components/form/use_save.ts index 53af23e476d74..5268e6fcb9a5c 100644 --- a/packages/kbn-management/settings/components/form/use_save.ts +++ b/packages/kbn-management/settings/components/form/use_save.ts @@ -39,7 +39,7 @@ export const useSave = (params: UseSaveParameters) => { await saveChanges(changes, params.scope); params.clearChanges(); const requiresReload = params.fields.some( - (setting) => changes.hasOwnProperty(setting.id) && setting.requiresPageReload + (setting) => Object.hasOwn(changes, setting.id) && setting.requiresPageReload ); if (requiresReload) { showReloadPagePrompt(); diff --git a/packages/kbn-mock-idp-plugin/public/role_switcher.tsx b/packages/kbn-mock-idp-plugin/public/role_switcher.tsx index 7ef4e435e4e65..63bf43f4aa52e 100644 --- a/packages/kbn-mock-idp-plugin/public/role_switcher.tsx +++ b/packages/kbn-mock-idp-plugin/public/role_switcher.tsx @@ -145,7 +145,7 @@ const createForm = (url: string, fields: Record) => { form.setAttribute('action', url); for (const key in fields) { - if (!fields.hasOwnProperty(key)) { + if (!Object.hasOwn(fields, key)) { continue; } const input = document.createElement('input'); diff --git a/packages/kbn-safer-lodash-set/README.md b/packages/kbn-safer-lodash-set/README.md index 823b1acff3b01..110a06421e45e 100644 --- a/packages/kbn-safer-lodash-set/README.md +++ b/packages/kbn-safer-lodash-set/README.md @@ -78,7 +78,7 @@ set(child, 'foo', 3); // object and the `parent` object has not been modified: console.log(child.foo); // 3 console.log(parent.foo); // 1 -console.log(Object.prototype.hasOwnProperty.call(child, 'foo')); // true +console.log(Object.hasOwn(child, 'foo')); // true ``` ### The `path` must not access function prototypes diff --git a/packages/kbn-safer-lodash-set/test/fp_patch_test.js b/packages/kbn-safer-lodash-set/test/fp_patch_test.js index a7a900bd7601f..abc2ce348f5a7 100644 --- a/packages/kbn-safer-lodash-set/test/fp_patch_test.js +++ b/packages/kbn-safer-lodash-set/test/fp_patch_test.js @@ -190,7 +190,7 @@ setFunctions.forEach(([testPermutations, set, testName]) => { t.notStrictEqual(arr, result); t.ok(Array.isArray(result)); Object.keys(expected).forEach((key) => { - t.ok(Object.prototype.hasOwnProperty.call(result, key)); + t.ok(Object.hasOwn(result, key)); t.deepEqual(result[key], expected[key]); }); }); diff --git a/packages/kbn-safer-lodash-set/test/patch_test.js b/packages/kbn-safer-lodash-set/test/patch_test.js index f83cbe1e40b85..cbd2f879dd609 100644 --- a/packages/kbn-safer-lodash-set/test/patch_test.js +++ b/packages/kbn-safer-lodash-set/test/patch_test.js @@ -115,7 +115,7 @@ setAndSetWithFunctions.forEach(([set, testName]) => { const arr = []; set(arr, path, 'foo'); Object.keys(expected).forEach((key) => { - t.ok(Object.prototype.hasOwnProperty.call(arr, key)); + t.ok(Object.hasOwn(arr, key)); t.deepEqual(arr[key], expected[key]); }); t.end(); diff --git a/packages/kbn-server-http-tools/src/default_validation_error_handler.ts b/packages/kbn-server-http-tools/src/default_validation_error_handler.ts index d2f4e993f3e4b..9ee8bac238c44 100644 --- a/packages/kbn-server-http-tools/src/default_validation_error_handler.ts +++ b/packages/kbn-server-http-tools/src/default_validation_error_handler.ts @@ -43,7 +43,7 @@ export function defaultValidationErrorHandler( // // The Hapi code we're 'overwriting' can be found here: // https://github.com/hapijs/hapi/blob/master/lib/validation.js#L102 - if (err && err.name === 'ValidationError' && err.hasOwnProperty('output')) { + if (err && err.name === 'ValidationError' && Object.hasOwn(err, 'output')) { const validationError: HapiValidationError = err as HapiValidationError; const validationKeys: string[] = []; diff --git a/packages/kbn-std/src/ensure_deep_object.ts b/packages/kbn-std/src/ensure_deep_object.ts index 42550bd09436f..b815c16ac5c6e 100644 --- a/packages/kbn-std/src/ensure_deep_object.ts +++ b/packages/kbn-std/src/ensure_deep_object.ts @@ -49,7 +49,7 @@ function walk(obj: any, keys: string[], value: any, path: string[]) { return; } - if (!obj.hasOwnProperty(key)) { + if (!Object.hasOwn(obj, key)) { obj[key] = {}; } diff --git a/packages/kbn-std/src/ensure_no_unsafe_properties.ts b/packages/kbn-std/src/ensure_no_unsafe_properties.ts index b053a40d62530..cff9946d761fa 100644 --- a/packages/kbn-std/src/ensure_no_unsafe_properties.ts +++ b/packages/kbn-std/src/ensure_no_unsafe_properties.ts @@ -11,12 +11,6 @@ interface StackItem { previousKey: string | null; } -// we have to do Object.prototype.hasOwnProperty because when you create an object using -// Object.create(null), and I assume other methods, you get an object without a prototype, -// so you can't use current.hasOwnProperty -const hasOwnProperty = (obj: any, property: string) => - Object.prototype.hasOwnProperty.call(obj, property); - const isObject = (obj: any) => typeof obj === 'object' && obj !== null; // we're using a stack instead of recursion so we aren't limited by the call stack @@ -40,11 +34,11 @@ export function ensureNoUnsafeProperties(obj: any) { continue; } - if (hasOwnProperty(value, '__proto__')) { + if (Object.hasOwn(value, '__proto__')) { throw new Error(`'__proto__' is an invalid key`); } - if (hasOwnProperty(value, 'prototype') && previousKey === 'constructor') { + if (Object.hasOwn(value, 'prototype') && previousKey === 'constructor') { throw new Error(`'constructor.prototype' is an invalid key`); } diff --git a/packages/kbn-test/src/functional_test_runner/lib/providers/async_instance.ts b/packages/kbn-test/src/functional_test_runner/lib/providers/async_instance.ts index 1f0fb31ccd41d..c870a1538ec29 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/providers/async_instance.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/providers/async_instance.ts @@ -73,7 +73,7 @@ export const createAsyncInstance = ( }, get(_, prop, receiver) { - if (loadingTarget.hasOwnProperty(prop)) { + if (Object.hasOwn(loadingTarget, prop)) { return Reflect.get(loadingTarget as any, prop, receiver); } @@ -84,7 +84,7 @@ export const createAsyncInstance = ( }, getOwnPropertyDescriptor(_, prop) { - if (loadingTarget.hasOwnProperty(prop)) { + if (Object.hasOwn(loadingTarget, prop)) { return Reflect.getOwnPropertyDescriptor(loadingTarget, prop); } @@ -100,7 +100,7 @@ export const createAsyncInstance = ( }, has(_, prop) { - if (!loadingTarget.hasOwnProperty(prop)) { + if (!Object.hasOwn(loadingTarget, prop)) { return Reflect.has(loadingTarget, prop); } diff --git a/packages/kbn-test/src/functional_test_runner/lib/providers/verbose_instance.ts b/packages/kbn-test/src/functional_test_runner/lib/providers/verbose_instance.ts index ca4109961b51c..d4ed0b7099468 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/providers/verbose_instance.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/providers/verbose_instance.ts @@ -59,7 +59,7 @@ export function createVerboseInstance( }; } - if (result.hasOwnProperty('thrown')) { + if (Object.hasOwn(result, 'thrown')) { log.indent(-2); throw result.thrown; } diff --git a/packages/kbn-test/src/jest/setup/polyfills.jsdom.js b/packages/kbn-test/src/jest/setup/polyfills.jsdom.js index 0867862b2d4ca..80fc5185dc115 100644 --- a/packages/kbn-test/src/jest/setup/polyfills.jsdom.js +++ b/packages/kbn-test/src/jest/setup/polyfills.jsdom.js @@ -11,12 +11,12 @@ Object.defineProperty(window, 'MutationObserver', { value: MutationObserver }); require('whatwg-fetch'); -if (!global.URL.hasOwnProperty('createObjectURL')) { +if (!Object.hasOwn(global.URL, 'createObjectURL')) { Object.defineProperty(global.URL, 'createObjectURL', { value: () => '' }); } // https://github.com/jsdom/jsdom/issues/2524 -if (!global.hasOwnProperty('TextEncoder')) { +if (!Object.hasOwn(global, 'TextEncoder')) { const customTextEncoding = require('@kayahr/text-encoding'); global.TextEncoder = customTextEncoding.TextEncoder; global.TextDecoder = customTextEncoding.TextDecoder; @@ -29,11 +29,11 @@ if (!global.hasOwnProperty('TextEncoder')) { // https://github.com/jsdom/jsdom/issues/2555 global.Blob = require('blob-polyfill').Blob; -if (!global.hasOwnProperty('ResizeObserver')) { +if (!Object.hasOwn(global, 'ResizeObserver')) { global.ResizeObserver = require('resize-observer-polyfill'); } -if (!global.hasOwnProperty('Worker')) { +if (!Object.hasOwn(global, 'Worker')) { class Worker { constructor(stringUrl) { this.url = stringUrl; @@ -49,7 +49,7 @@ if (!global.hasOwnProperty('Worker')) { // Mocking matchMedia to resolve TypeError: window.matchMedia is not a function // For more info, see https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom - if (!global.hasOwnProperty('matchMedia')) { + if (!Object.hasOwn(global, 'matchMedia')) { Object.defineProperty(global, 'matchMedia', { writable: true, // eslint-disable-next-line no-undef diff --git a/packages/kbn-test/src/kbn_client/kbn_client_ui_settings.ts b/packages/kbn-test/src/kbn_client/kbn_client_ui_settings.ts index 599184b30a461..a5a1102a0d44e 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_ui_settings.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_ui_settings.ts @@ -69,7 +69,7 @@ export class KbnClientUiSettings { }; for (const [name, { isOverridden }] of Object.entries(await this.getAll())) { - if (!isOverridden && !changes.hasOwnProperty(name)) { + if (!isOverridden && !Object.hasOwn(changes, name)) { changes[name] = null; } } diff --git a/packages/kbn-tooling-log/src/tooling_log_text_writer.ts b/packages/kbn-tooling-log/src/tooling_log_text_writer.ts index 4fe33241cf77e..063edd75a14cb 100644 --- a/packages/kbn-tooling-log/src/tooling_log_text_writer.ts +++ b/packages/kbn-tooling-log/src/tooling_log_text_writer.ts @@ -25,7 +25,7 @@ const MSG_PREFIXES = { error: `${red('ERROR')} `, }; -const has = (obj: T, key: any): key is keyof T => obj.hasOwnProperty(key); +const has = (obj: T, key: any): key is keyof T => Object.hasOwn(obj, key); export interface ToolingLogTextWriterConfig { /** diff --git a/packages/kbn-unified-field-list/src/services/field_examples_calculator/field_examples_calculator.ts b/packages/kbn-unified-field-list/src/services/field_examples_calculator/field_examples_calculator.ts index ac03aff1387db..878bc24097151 100644 --- a/packages/kbn-unified-field-list/src/services/field_examples_calculator/field_examples_calculator.ts +++ b/packages/kbn-unified-field-list/src/services/field_examples_calculator/field_examples_calculator.ts @@ -97,7 +97,7 @@ export function groupValues( return; } - if (groups.hasOwnProperty(value)) { + if (Object.hasOwn(groups, value)) { groups[value].count++; } else { groups[value] = { diff --git a/packages/presentation/presentation_publishing/interfaces/has_execution_context.ts b/packages/presentation/presentation_publishing/interfaces/has_execution_context.ts index 8aa4d633e1a0e..aa002114b1b68 100644 --- a/packages/presentation/presentation_publishing/interfaces/has_execution_context.ts +++ b/packages/presentation/presentation_publishing/interfaces/has_execution_context.ts @@ -16,6 +16,6 @@ export const apiHasExecutionContext = ( unknownApi: null | unknown ): unknownApi is HasExecutionContext => { return Boolean( - unknownApi && typeof unknownApi === 'object' && unknownApi.hasOwnProperty('executionContext') + unknownApi && typeof unknownApi === 'object' && Object.hasOwn(unknownApi, 'executionContext') ); }; diff --git a/packages/shared-ux/chrome/navigation/src/utils.ts b/packages/shared-ux/chrome/navigation/src/utils.ts index f63ff518a18d4..e8ab1cb3eb689 100644 --- a/packages/shared-ux/chrome/navigation/src/utils.ts +++ b/packages/shared-ux/chrome/navigation/src/utils.ts @@ -44,4 +44,4 @@ export const isAccordionNode = ( node: Pick ) => node.renderAs === 'accordion' || - ['defaultIsCollapsed', 'isCollapsible'].some((prop) => node.hasOwnProperty(prop)); + ['defaultIsCollapsed', 'isCollapsible'].some((prop) => Object.hasOwn(node, prop)); diff --git a/src/dev/storybook/run_storybook_cli.ts b/src/dev/storybook/run_storybook_cli.ts index 7a6ea7f34d825..587dab475145f 100644 --- a/src/dev/storybook/run_storybook_cli.ts +++ b/src/dev/storybook/run_storybook_cli.ts @@ -32,7 +32,7 @@ run( throw createFlagError('Missing alias'); } - if (!storybookAliases.hasOwnProperty(alias)) { + if (!Object.hasOwn(storybookAliases, alias)) { throw createFlagError(`Unknown alias [${alias}]`); } diff --git a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.ts b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.ts index 4d980b85cf059..12bcab058d5d4 100644 --- a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.ts +++ b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.ts @@ -126,7 +126,7 @@ export const metricTrendlineFunction = (): TrendlineExpressionFunctionDefinition }); for (const breakdownTerm in rowsByBreakdown) { - if (!rowsByBreakdown.hasOwnProperty(breakdownTerm)) continue; + if (!Object.hasOwn(rowsByBreakdown, breakdownTerm)) continue; trends[breakdownTerm] = rowsByBreakdown[breakdownTerm].map((row) => ({ x: row[timeColId] !== null ? row[timeColId] : NaN, y: row[metricColId] !== null ? row[metricColId] : NaN, diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.ts b/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.ts index b7cd7349880b1..7d4ff89a027cc 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.ts @@ -79,13 +79,13 @@ const getDistinctColor = ( formattedCategoricalKey: string ) => { // TODO move away from Record to a Map to avoid issues with reserved JS keywords - if (overwriteColors.hasOwnProperty(categoricalKey)) { + if (Object.hasOwn(overwriteColors, categoricalKey)) { return overwriteColors[categoricalKey]; } // this is for supporting old visualizations (created by vislib plugin) // it seems that there for some aggs, the uiState saved from vislib is // different from how es-charts handles it - if (overwriteColors.hasOwnProperty(formattedCategoricalKey)) { + if (Object.hasOwn(overwriteColors, formattedCategoricalKey)) { return overwriteColors[formattedCategoricalKey]; } @@ -181,7 +181,7 @@ const overrideColors = ( ) => { let overwriteColor; - if (overwriteColors.hasOwnProperty(name)) { + if (Object.hasOwn(overwriteColors, name)) { overwriteColor = overwriteColors[name]; } diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/mapbox_vector_tile/convert_mapbox_vector_tile_to_json.ts b/src/plugins/console/public/application/containers/editor/legacy/console_editor/mapbox_vector_tile/convert_mapbox_vector_tile_to_json.ts index 5a64dd98fe160..37c97c08bb998 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/mapbox_vector_tile/convert_mapbox_vector_tile_to_json.ts +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/mapbox_vector_tile/convert_mapbox_vector_tile_to_json.ts @@ -16,7 +16,7 @@ export function convertMapboxVectorTileToJson(response: VectorTile) { const output: MapboxVectorTileJson = {}; for (const property in data) { - if (data.hasOwnProperty(property)) { + if (Object.hasOwn(data, property)) { const propertyObject: VectorTileLayer = data[property]; const featuresArray = []; diff --git a/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js b/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js index e8953152a5932..307d7403125fa 100644 --- a/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js +++ b/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js @@ -53,10 +53,7 @@ function init(window) { let alias = paths[testPath]; if ('string' === typeof alias) return alias + tail; if (alias) - {return ( - alias.location.replace(/\/*$/, '/') + - (tail || alias.main || alias.name) - );} + {return (alias.location.replace(/\/*$/, '/') + (tail || alias.main || alias.name));} if (alias === !1) return ''; let i = testPath.lastIndexOf('/'); if (-1 === i) break; diff --git a/src/plugins/custom_integrations/server/custom_integration_registry.ts b/src/plugins/custom_integrations/server/custom_integration_registry.ts index e594a2ed514fd..3bf0b4a75f1a6 100644 --- a/src/plugins/custom_integrations/server/custom_integration_registry.ts +++ b/src/plugins/custom_integrations/server/custom_integration_registry.ts @@ -45,7 +45,7 @@ export class CustomIntegrationRegistry { const allowedCategories: IntegrationCategory[] = (customIntegration.categories ?? []).filter( (category) => { - return INTEGRATION_CATEGORY_DISPLAY.hasOwnProperty(category); + return Object.hasOwn(INTEGRATION_CATEGORY_DISPLAY, category); } ) as IntegrationCategory[]; diff --git a/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts b/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts index b1865571e42b9..1e5f24f36691f 100644 --- a/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts +++ b/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts @@ -69,7 +69,7 @@ test('convertSavedDashboardPanelToPanelState does not include undefined id', () }; const converted = convertSavedDashboardPanelToPanelState(savedDashboardPanel); - expect(converted.hasOwnProperty('savedObjectId')).toBe(false); + expect(Object.hasOwn(converted, 'savedObjectId')).toBe(false); }); test('convertPanelStateToSavedDashboardPanel', () => { @@ -123,7 +123,7 @@ test('convertPanelStateToSavedDashboardPanel will not add an undefined id when n }; const converted = convertPanelStateToSavedDashboardPanel(dashboardPanel); - expect(converted.hasOwnProperty('id')).toBe(false); + expect(Object.hasOwn(converted, 'id')).toBe(false); }); test('convertPanelStateToSavedDashboardPanel will not leave title as part of embeddable config', () => { @@ -143,7 +143,7 @@ test('convertPanelStateToSavedDashboardPanel will not leave title as part of emb }; const converted = convertPanelStateToSavedDashboardPanel(dashboardPanel); - expect(converted.embeddableConfig.hasOwnProperty('title')).toBe(false); + expect(Object.hasOwn(converted.embeddableConfig, 'title')).toBe(false); expect(converted.title).toBe('title'); }); diff --git a/src/plugins/data/common/search/search_source/search_source.test.ts b/src/plugins/data/common/search/search_source/search_source.test.ts index ef8341c3d2c5d..703e66ca7d657 100644 --- a/src/plugins/data/common/search/search_source/search_source.test.ts +++ b/src/plugins/data/common/search/search_source/search_source.test.ts @@ -841,7 +841,7 @@ describe('SearchSource', () => { searchSource.setField('fields', ['*']); const request = searchSource.getSearchRequestBody(); - expect(request.hasOwnProperty('docvalue_fields')).toBe(false); + expect(Object.hasOwn(request, 'docvalue_fields')).toBe(false); expect(request.fields).toEqual([ { field: 'foo-bar' }, { field: 'field1' }, diff --git a/src/plugins/data/common/search/search_source/search_source.ts b/src/plugins/data/common/search/search_source/search_source.ts index c0dc5598e9067..3c91160a01636 100644 --- a/src/plugins/data/common/search/search_source/search_source.ts +++ b/src/plugins/data/common/search/search_source/search_source.ts @@ -808,7 +808,7 @@ export class SearchSource { // set defaults const _source = - index && !body.hasOwnProperty('_source') ? dataView?.getSourceFiltering() : body._source; + index && !Object.hasOwn(body, '_source') ? dataView?.getSourceFiltering() : body._source; // get filter if data view specified, otherwise null filter const filter = this.getFieldFilter({ bodySourceExcludes: _source?.excludes, metaFields }); @@ -962,7 +962,7 @@ export class SearchSource { private getBuiltEsQuery({ index, query = [], filters = [], getConfig, sort }: SearchRequest) { // If sorting by _score, build queries in the "must" clause instead of "filter" clause to enable scoring const filtersInMustClause = (sort ?? []).some((srt: EsQuerySortValue[]) => - srt.hasOwnProperty('_score') + Object.hasOwn(srt, '_score') ); const esQueryConfigs = { ...getEsQueryConfig({ get: getConfig }), diff --git a/src/plugins/data/common/search/tabify/response_writer.ts b/src/plugins/data/common/search/tabify/response_writer.ts index bbaab641e82f4..57d3ed7773f4b 100644 --- a/src/plugins/data/common/search/tabify/response_writer.ts +++ b/src/plugins/data/common/search/tabify/response_writer.ts @@ -63,7 +63,7 @@ export class TabbedAggResponseWriter { let isPartialRow = false; for (let i = 0; i < this.columns.length; i++) { const column = this.columns[i]; - if (!rowBuffer.hasOwnProperty(column.id)) { + if (!Object.hasOwn(rowBuffer, column.id)) { isPartialRow = true; break; } diff --git a/src/plugins/data/public/utils/shallow_equal.ts b/src/plugins/data/public/utils/shallow_equal.ts index e0387e07a163c..557c2e961c4dd 100644 --- a/src/plugins/data/public/utils/shallow_equal.ts +++ b/src/plugins/data/public/utils/shallow_equal.ts @@ -24,7 +24,7 @@ export function shallowEqual(objA: unknown, objB: unknown): boolean { for (let i = 0; i < keysA.length; i++) { if ( - !Object.prototype.hasOwnProperty.call(objB, keysA[i]) || + !Object.hasOwn(objB, keysA[i]) || // @ts-ignore !Object.is(objA[keysA[i]], objB[keysA[i]]) ) { diff --git a/src/plugins/data/server/search/session/session_service.ts b/src/plugins/data/server/search/session/session_service.ts index d729795d4f8fe..efd41990493b3 100644 --- a/src/plugins/data/server/search/session/session_service.ts +++ b/src/plugins/data/server/search/session/session_service.ts @@ -400,7 +400,7 @@ export class SearchSessionService implements ISearchSessionService { const session = await this.get(deps, user, sessionId); const requestHash = createRequestHash(searchRequest.params); - if (!session.attributes.idMapping.hasOwnProperty(requestHash)) { + if (!Object.hasOwn(session.attributes.idMapping, requestHash)) { this.logger.error(`SearchSessionService: getId | ${sessionId} | ${requestHash} not found`); this.logger.debug( `SearchSessionService: getId not found search with params: ${JSON.stringify( diff --git a/src/plugins/data_views/server/fetcher/lib/field_capabilities/overrides.ts b/src/plugins/data_views/server/fetcher/lib/field_capabilities/overrides.ts index 87afa69a99e55..18f5c9c716e34 100644 --- a/src/plugins/data_views/server/fetcher/lib/field_capabilities/overrides.ts +++ b/src/plugins/data_views/server/fetcher/lib/field_capabilities/overrides.ts @@ -29,7 +29,7 @@ const OVERRIDES: Record> = { * @return {FieldDescriptor} */ export function mergeOverrides(field: FieldDescriptor): FieldDescriptor { - if (OVERRIDES.hasOwnProperty(field.name)) { + if (Object.hasOwn(OVERRIDES, field.name)) { return merge(field, OVERRIDES[field.name]); } else { return field; diff --git a/src/plugins/expressions/common/ast/build_function.ts b/src/plugins/expressions/common/ast/build_function.ts index 1ccd8d8795a86..eb93714fd35c3 100644 --- a/src/plugins/expressions/common/ast/build_function.ts +++ b/src/plugins/expressions/common/ast/build_function.ts @@ -190,7 +190,7 @@ export function buildExpressionFunction< addArgument(key, value) { if (value !== undefined) { - if (!args.hasOwnProperty(key)) { + if (!Object.hasOwn(args, key)) { args[key] = []; } args[key].push(value); @@ -199,14 +199,14 @@ export function buildExpressionFunction< }, getArgument(key) { - if (!args.hasOwnProperty(key)) { + if (!Object.hasOwn(args, key)) { return; } return args[key]; }, replaceArgument(key, values) { - if (!args.hasOwnProperty(key)) { + if (!Object.hasOwn(args, key)) { throw new Error('Argument to replace does not exist on this function'); } args[key] = values; diff --git a/src/plugins/field_formats/common/converters/url.ts b/src/plugins/field_formats/common/converters/url.ts index 5f7567bfc66a1..cdb760e820eed 100644 --- a/src/plugins/field_formats/common/converters/url.ts +++ b/src/plugins/field_formats/common/converters/url.ts @@ -108,7 +108,7 @@ export class UrlFormat extends FieldFormat { let i = -1; while (++i < parts.length) { if (i % 2) { - if (locals.hasOwnProperty(parts[i])) { + if (Object.hasOwn(locals, parts[i])) { const local = locals[parts[i]]; output += local == null ? '' : local; } diff --git a/src/plugins/management/public/management_sections_service.ts b/src/plugins/management/public/management_sections_service.ts index 7344057e2e993..b12c08dfb5936 100644 --- a/src/plugins/management/public/management_sections_service.ts +++ b/src/plugins/management/public/management_sections_service.ts @@ -71,12 +71,12 @@ export class ManagementSectionsService { start({ capabilities }: SectionsServiceStartDeps) { this.getAllSections().forEach((section) => { - if (capabilities.management.hasOwnProperty(section.id)) { + if (Object.hasOwn(capabilities.management, section.id)) { const sectionCapabilities = capabilities.management[section.id]; section.apps.forEach((app) => { const capabilitiesId = app.capabilitiesId || app.id; if ( - sectionCapabilities.hasOwnProperty(capabilitiesId) && + Object.hasOwn(sectionCapabilities, capabilitiesId) && sectionCapabilities[capabilitiesId] !== true ) { app.disable(); diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.test.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.test.tsx index 6d459c9029e27..fd98cffaae3f4 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.test.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.test.tsx @@ -147,7 +147,7 @@ describe('Table', () => { const table = component.find('EuiBasicTable'); const columns = table.prop('columns') as any[]; - const actionColumn = columns.find((x) => x.hasOwnProperty('actions')) as { actions: any[] }; + const actionColumn = columns.find((x) => Object.hasOwn(x, 'actions')) as { actions: any[] }; const someAction = actionColumn.actions.find( (x) => x['data-test-subj'] === 'savedObjectsTableAction-someAction' ); diff --git a/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx b/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx index 3f542be18d9f8..134c0bb72c89b 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx @@ -62,11 +62,12 @@ export class PhraseSuggestorUI extends React.Com const isVersionFieldType = field?.esTypes?.includes('version'); return ( + // suggestions don't work for version fields shouldSuggestValues && field && field.aggregatable && field.type === 'string' && - !isVersionFieldType // suggestions don't work for version fields + !isVersionFieldType ); } diff --git a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx index 04c1dab19c8a8..2720a13b1ff06 100644 --- a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx @@ -228,7 +228,11 @@ export default class QueryStringInputUI extends PureComponent(this.props.indexPatterns || [], (indexPattern): indexPattern is DataView => { - return indexPattern.hasOwnProperty('fields') && indexPattern.hasOwnProperty('title'); + return ( + typeof indexPattern === 'object' && + Object.hasOwn(indexPattern, 'fields') && + Object.hasOwn(indexPattern, 'title') + ); }); const idOrTitlePatterns = stringPatterns.map((sp) => typeof sp === 'string' ? { type: 'title', value: sp } : sp diff --git a/src/plugins/unified_search/public/utils/shallow_equal.ts b/src/plugins/unified_search/public/utils/shallow_equal.ts index e0387e07a163c..557c2e961c4dd 100644 --- a/src/plugins/unified_search/public/utils/shallow_equal.ts +++ b/src/plugins/unified_search/public/utils/shallow_equal.ts @@ -24,7 +24,7 @@ export function shallowEqual(objA: unknown, objB: unknown): boolean { for (let i = 0; i < keysA.length; i++) { if ( - !Object.prototype.hasOwnProperty.call(objB, keysA[i]) || + !Object.hasOwn(objB, keysA[i]) || // @ts-ignore !Object.is(objA[keysA[i]], objB[keysA[i]]) ) { diff --git a/src/plugins/vis_default_editor/public/components/agg_params.tsx b/src/plugins/vis_default_editor/public/components/agg_params.tsx index 8e5d04a277814..aa1fe36d797e4 100644 --- a/src/plugins/vis_default_editor/public/components/agg_params.tsx +++ b/src/plugins/vis_default_editor/public/components/agg_params.tsx @@ -141,8 +141,8 @@ function DefaultEditorAggParams({ Object.entries(editorConfig).forEach(([param, paramConfig]) => { const paramOptions = agg.type.params.find((paramOption) => paramOption.name === param); - const hasFixedValue = paramConfig.hasOwnProperty(FIXED_VALUE_PROP); - const hasDefault = paramConfig.hasOwnProperty(DEFAULT_PROP); + const hasFixedValue = Object.hasOwn(paramConfig, FIXED_VALUE_PROP); + const hasDefault = Object.hasOwn(paramConfig, DEFAULT_PROP); // If the parameter has a fixed value in the config, set this value. // Also for all supported configs we should freeze the editor for this param. if (hasFixedValue || hasDefault) { diff --git a/src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts b/src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts index be03295284c23..baee20a61930f 100644 --- a/src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts +++ b/src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts @@ -33,7 +33,7 @@ export function tableVisResponseHandler(input: Datatable, visConfig: TableVisCon input.rows.forEach((row) => { const splitValue: string | number = row[splitColumn.id]; - if (!splitMap.hasOwnProperty(splitValue)) { + if (!Object.hasOwn(splitMap, splitValue)) { splitMap[splitValue] = splitIndex++; const tableGroup: TableGroup = { title: `${splitColumnFormatter.convert(splitValue)}: ${splitColumn.name}`, diff --git a/src/plugins/vis_types/timelion/server/series_functions/props.js b/src/plugins/vis_types/timelion/server/series_functions/props.js index 938c7e470bb55..efbba6cfe30dc 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/props.js +++ b/src/plugins/vis_types/timelion/server/series_functions/props.js @@ -21,7 +21,7 @@ function unflatten(data) { let prop = ''; let m; while ((m = regex.exec(p))) { - cur = (cur.hasOwnProperty(prop) && cur[prop]) || (cur[prop] = m[2] ? [] : {}); + cur = (Object.hasOwn(cur, prop) && cur[prop]) || (cur[prop] = m[2] ? [] : {}); prop = m[2] || m[1]; } cur[prop] = data[p]; diff --git a/src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx b/src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx index 97890b3373cf8..688247c5eb6d5 100644 --- a/src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx +++ b/src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx @@ -75,7 +75,7 @@ export const InspectorDataGrid = ({ columns, data, dataGridAriaLabel }: Inspecto // then the row index must be adjusted as `data` has already been pruned to the page size adjustedRowIndex = rowIndex - pagination.pageIndex * pagination.pageSize; - return gridData.hasOwnProperty(adjustedRowIndex) + return Object.hasOwn(gridData, adjustedRowIndex) ? gridData[adjustedRowIndex][columnId] || null : null; }) as EuiDataGridProps['renderCellValue']; diff --git a/src/plugins/vis_types/vislib/public/vislib/lib/data.js b/src/plugins/vis_types/vislib/public/vislib/lib/data.js index 6b6bcb6101595..5ca9e7257ef62 100644 --- a/src/plugins/vis_types/vislib/public/vislib/lib/data.js +++ b/src/plugins/vis_types/vislib/public/vislib/lib/data.js @@ -23,7 +23,7 @@ import { getFormatService } from '../../services'; class D3MappableObject { constructor(data) { for (const key in data) { - if (data.hasOwnProperty(key)) { + if (Object.hasOwn(data, key)) { this[key] = data[key]; } } diff --git a/src/plugins/vis_types/vislib/public/vislib/response_handler.js b/src/plugins/vis_types/vislib/public/vislib/response_handler.js index cba5cdc5c5b70..3b7da6b3ea548 100644 --- a/src/plugins/vis_types/vislib/public/vislib/response_handler.js +++ b/src/plugins/vis_types/vislib/public/vislib/response_handler.js @@ -25,7 +25,7 @@ function tableResponseHandler(table, dimensions) { const splitValue = row[splitColumn.id]; const formattedValue = splitColumnFormatter.convert(splitValue); - if (!splitMap.hasOwnProperty(splitValue)) { + if (!Object.hasOwn(splitMap, splitValue)) { splitMap[splitValue] = splitIndex++; const tableGroup = { $parent: converted, diff --git a/x-pack/dev-tools/api_debug/request_from_api.js b/x-pack/dev-tools/api_debug/request_from_api.js index 1363a6a3b244d..ba5cb79ecf471 100644 --- a/x-pack/dev-tools/api_debug/request_from_api.js +++ b/x-pack/dev-tools/api_debug/request_from_api.js @@ -45,7 +45,7 @@ function logHeaders(res) { // use `--headers` to print the response headers const headers = res.headers.raw(); for (const key in headers) { - if (headers.hasOwnProperty(key)) { + if (Object.hasOwn(headers, key)) { console.log(`${key}: ${headers[key]}`); } } diff --git a/x-pack/packages/ml/data_grid/lib/common.ts b/x-pack/packages/ml/data_grid/lib/common.ts index 54a1f08ef6242..82c6cfa618174 100644 --- a/x-pack/packages/ml/data_grid/lib/common.ts +++ b/x-pack/packages/ml/data_grid/lib/common.ts @@ -368,11 +368,11 @@ export const useRenderCellValue = ( } function getCellValue(cId: string) { - if (tableItems.hasOwnProperty(adjustedRowIndex)) { + if (Object.hasOwn(tableItems, adjustedRowIndex)) { const item = tableItems[adjustedRowIndex]; // Try if the field name is available as is. - if (item.hasOwnProperty(cId)) { + if (Object.hasOwn(item, cId)) { return item[cId]; } diff --git a/x-pack/packages/ml/url_state/src/url_state.tsx b/x-pack/packages/ml/url_state/src/url_state.tsx index 585761b93cce3..4fd5dfe6e0538 100644 --- a/x-pack/packages/ml/url_state/src/url_state.tsx +++ b/x-pack/packages/ml/url_state/src/url_state.tsx @@ -124,7 +124,7 @@ export const UrlStateProvider: FC> = ({ children }) = const urlState = parseUrlState(prevSearchString); const parsedQueryString = parse(prevSearchString, { sort: false }); - if (!Object.prototype.hasOwnProperty.call(urlState, accessor)) { + if (!Object.hasOwn(urlState, accessor)) { urlState[accessor] = {}; } diff --git a/x-pack/plugins/actions/server/index.ts b/x-pack/plugins/actions/server/index.ts index ef1c277ff049b..1d5aa22ba07cf 100644 --- a/x-pack/plugins/actions/server/index.ts +++ b/x-pack/plugins/actions/server/index.ts @@ -61,8 +61,8 @@ export const config: PluginConfigDescriptor = { if ( customHostSettings.find( (customHostSchema: CustomHostSettings) => - customHostSchema.hasOwnProperty('ssl') && - customHostSchema.ssl?.hasOwnProperty('rejectUnauthorized') + Object.hasOwn(customHostSchema, 'ssl') && + Object.hasOwn(customHostSchema.ssl ?? {}, 'rejectUnauthorized') ) ) { addDeprecation({ @@ -93,7 +93,7 @@ export const config: PluginConfigDescriptor = { }, (settings, fromPath, addDeprecation) => { const actions = get(settings, fromPath); - if (actions?.hasOwnProperty('rejectUnauthorized')) { + if (Object.hasOwn(actions ?? {}, 'rejectUnauthorized')) { addDeprecation({ level: 'warning', configPath: `${fromPath}.rejectUnauthorized`, @@ -121,7 +121,7 @@ export const config: PluginConfigDescriptor = { }, (settings, fromPath, addDeprecation) => { const actions = get(settings, fromPath); - if (actions?.hasOwnProperty('proxyRejectUnauthorizedCertificates')) { + if (Object.hasOwn(actions ?? {}, 'proxyRejectUnauthorizedCertificates')) { addDeprecation({ level: 'warning', configPath: `${fromPath}.proxyRejectUnauthorizedCertificates`, diff --git a/x-pack/plugins/actions/server/lib/mustache_renderer.ts b/x-pack/plugins/actions/server/lib/mustache_renderer.ts index bd35e499fb426..06f067493468b 100644 --- a/x-pack/plugins/actions/server/lib/mustache_renderer.ts +++ b/x-pack/plugins/actions/server/lib/mustache_renderer.ts @@ -104,7 +104,7 @@ function buildObject(key: string, value: unknown) { function addToStringDeep(object: unknown): void { // for objects, add a toString method, and then walk if (isNonNullObject(object)) { - if (!object.hasOwnProperty('toString')) { + if (!Object.hasOwn(object, 'toString')) { object.toString = () => JSON.stringify(object); } Object.values(object).forEach((value) => addToStringDeep(value)); diff --git a/x-pack/plugins/actions/server/saved_objects/actions_migrations.ts b/x-pack/plugins/actions/server/saved_objects/actions_migrations.ts index f785fa9ee4ac9..77eef6457e0e5 100644 --- a/x-pack/plugins/actions/server/saved_objects/actions_migrations.ts +++ b/x-pack/plugins/actions/server/saved_objects/actions_migrations.ts @@ -42,7 +42,7 @@ export function getActionsMigrations( const migrationActionsTen = createEsoMigration( encryptedSavedObjects, (doc): doc is SavedObjectUnsanitizedDoc => - doc.attributes.config?.hasOwnProperty('casesConfiguration') || + Object.hasOwn(doc.attributes.config ?? {}, 'casesConfiguration') || doc.attributes.actionTypeId === '.email', pipeMigrations(renameCasesConfigurationObject, addHasAuthConfigurationObject) ); @@ -50,8 +50,8 @@ export function getActionsMigrations( const migrationActionsEleven = createEsoMigration( encryptedSavedObjects, (doc): doc is SavedObjectUnsanitizedDoc => - doc.attributes.config?.hasOwnProperty('isCaseOwned') || - doc.attributes.config?.hasOwnProperty('incidentConfiguration') || + Object.hasOwn(doc.attributes.config ?? {}, 'isCaseOwned') || + Object.hasOwn(doc.attributes.config ?? {}, 'incidentConfiguration') || doc.attributes.actionTypeId === '.webhook', pipeMigrations(removeCasesFieldMappings, addHasAuthConfigurationObject) ); @@ -142,8 +142,8 @@ function removeCasesFieldMappings( doc: SavedObjectUnsanitizedDoc ): SavedObjectUnsanitizedDoc { if ( - !doc.attributes.config?.hasOwnProperty('isCaseOwned') && - !doc.attributes.config?.hasOwnProperty('incidentConfiguration') + !Object.hasOwn(doc.attributes.config ?? {}, 'isCaseOwned') && + !Object.hasOwn(doc.attributes.config ?? {}, 'incidentConfiguration') ) { return doc; } diff --git a/x-pack/plugins/aiops/public/application/utils/search_utils.ts b/x-pack/plugins/aiops/public/application/utils/search_utils.ts index a561fbbca4864..533303436fa92 100644 --- a/x-pack/plugins/aiops/public/application/utils/search_utils.ts +++ b/x-pack/plugins/aiops/public/application/utils/search_utils.ts @@ -160,7 +160,7 @@ export function getEsQueryFromSavedSearch({ if (Array.isArray(savedQuery.bool.filter) && timeField !== undefined) { savedQuery.bool.filter = savedQuery.bool.filter.filter( (c: QueryDslQueryContainer) => - !(c.hasOwnProperty('range') && c.range?.hasOwnProperty(timeField)) + !(Object.hasOwn(c, 'range') && Object.hasOwn(c.range ?? {}, timeField)) ); } return { diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx index 7f9df2468acf7..905ac53b149ca 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx @@ -345,7 +345,7 @@ export const LogRateAnalysisResultsGroupsTable: FC diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx index 9de3e25cf2576..637aa0dc69b39 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx @@ -596,7 +596,7 @@ export const useColumns = ( for (const columnName in columnNamesToReturn) { if ( - columnNamesToReturn.hasOwnProperty(columnName) === false || + Object.hasOwn(columnNamesToReturn, columnName) === false || skippedColumns.includes(columnNamesToReturn[columnName as ColumnNames] as string) || ((columnName === 'p-value' || columnName === 'Impact') && zeroDocsFallback) ) diff --git a/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts index 42031c9ceeeac..162cdb3cd21fb 100644 --- a/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts @@ -429,7 +429,7 @@ export class AlertsClient< // See if there's an existing active alert document if (!!activeAlerts[id]) { if ( - this.fetchedAlerts.data.hasOwnProperty(id) && + Object.hasOwn(this.fetchedAlerts.data, id) && get(this.fetchedAlerts.data[id], ALERT_STATUS) === 'active' ) { const isImproving = isAlertImproving< @@ -491,7 +491,7 @@ export class AlertsClient< for (const id of keys(recoveredAlertsToReturn)) { // See if there's an existing alert document // If there is not, log an error because there should be - if (this.fetchedAlerts.data.hasOwnProperty(id)) { + if (Object.hasOwn(this.fetchedAlerts.data, id)) { recoveredAlertsToIndex.push( currentRecoveredAlerts[id] ? buildRecoveredAlert< diff --git a/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts index c3ff97c645520..3a1838342c5d6 100644 --- a/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts @@ -229,7 +229,7 @@ export class LegacyAlertsClient< public getProcessedAlerts( type: 'new' | 'active' | 'activeCurrent' | 'recovered' | 'recoveredCurrent' ) { - if (this.processedAlerts.hasOwnProperty(type)) { + if (Object.hasOwn(this.processedAlerts, type)) { return this.processedAlerts[type]; } diff --git a/x-pack/plugins/alerting/server/lib/process_alerts.ts b/x-pack/plugins/alerting/server/lib/process_alerts.ts index 628beebbe772e..2fef33636441d 100644 --- a/x-pack/plugins/alerting/server/lib/process_alerts.ts +++ b/x-pack/plugins/alerting/server/lib/process_alerts.ts @@ -105,7 +105,7 @@ function processAlertsHelper< const recoveredAlerts: Record> = {}; for (const id in alerts) { - if (alerts.hasOwnProperty(id)) { + if (Object.hasOwn(alerts, id)) { // alerts with scheduled actions are considered "active" if (alerts[id].hasScheduledActions()) { activeAlerts[id] = alerts[id]; @@ -209,8 +209,8 @@ function processAlertsLimitReached< // update duration for existing alerts for (const id in activeAlerts) { - if (activeAlerts.hasOwnProperty(id)) { - if (alerts.hasOwnProperty(id)) { + if (Object.hasOwn(activeAlerts, id)) { + if (Object.hasOwn(alerts, id)) { activeAlerts[id] = alerts[id]; } const state = existingAlerts[id].getState(); @@ -241,7 +241,7 @@ function processAlertsLimitReached< // look for new alerts and add until we hit capacity for (const id in alerts) { - if (alerts.hasOwnProperty(id) && alerts[id].hasScheduledActions()) { + if (Object.hasOwn(alerts, id) && alerts[id].hasScheduledActions()) { // if this alert did not exist in previous run, it is considered "new" if (!existingAlertIds.has(id)) { activeAlerts[id] = alerts[id]; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/format_default_aggregation_result/index.ts b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/format_default_aggregation_result/index.ts index d751875e104d7..1f8635e9351e6 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/format_default_aggregation_result/index.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/format_default_aggregation_result/index.ts @@ -72,12 +72,12 @@ export const formatDefaultAggregationResult = ( // Fill missing keys with zeroes for (const key of RuleExecutionStatusValues) { - if (!result.ruleExecutionStatus.hasOwnProperty(key)) { + if (!Object.hasOwn(result.ruleExecutionStatus, key)) { result.ruleExecutionStatus[key] = 0; } } for (const key of RuleLastRunOutcomeValues) { - if (!result.ruleLastRunOutcome.hasOwnProperty(key)) { + if (!Object.hasOwn(result.ruleLastRunOutcome, key)) { result.ruleLastRunOutcome[key] = 0; } } diff --git a/x-pack/plugins/alerting/server/rules_client/lib/update_meta.ts b/x-pack/plugins/alerting/server/rules_client/lib/update_meta.ts index 278a6ac267df5..635778b5a5a1a 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/update_meta.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/update_meta.ts @@ -15,7 +15,7 @@ export function updateMeta>( context: RulesClientContext, alertAttributes: T ): T { - if (alertAttributes.hasOwnProperty('apiKey') || alertAttributes.hasOwnProperty('apiKeyOwner')) { + if (Object.hasOwn(alertAttributes, 'apiKey') || Object.hasOwn(alertAttributes, 'apiKeyOwner')) { alertAttributes.meta = alertAttributes.meta ?? {}; alertAttributes.meta.versionApiKeyLastmodified = context.kibanaVersion; } diff --git a/x-pack/plugins/alerting/server/rules_client/lib/update_meta_attributes.ts b/x-pack/plugins/alerting/server/rules_client/lib/update_meta_attributes.ts index 716e0a8beacb9..9570539b24046 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/update_meta_attributes.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/update_meta_attributes.ts @@ -12,7 +12,7 @@ export function updateMetaAttributes>( context: RulesClientContext, alertAttributes: T ): T { - if (alertAttributes.hasOwnProperty('apiKey') || alertAttributes.hasOwnProperty('apiKeyOwner')) { + if (Object.hasOwn(alertAttributes, 'apiKey') || Object.hasOwn(alertAttributes, 'apiKeyOwner')) { return { ...alertAttributes, meta: { diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts index 0a4dc41390f2b..29d86b2b2d860 100644 --- a/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts @@ -19,7 +19,7 @@ export const isAnyActionSupportIncidents = (doc: SavedObjectUnsanitizedDoc - Object.prototype.hasOwnProperty.call(statuses, status); +const isStatusValid = (status: string): status is CaseStatuses => Object.hasOwn(statuses, status); const getLabelTitle = (userAction: SnakeToCamelCase) => { const status = userAction.payload.status ?? ''; diff --git a/x-pack/plugins/cloud_defend/public/common/utils.ts b/x-pack/plugins/cloud_defend/public/common/utils.ts index 633302dcf7705..c86ae3c32fe04 100644 --- a/x-pack/plugins/cloud_defend/public/common/utils.ts +++ b/x-pack/plugins/cloud_defend/public/common/utils.ts @@ -91,7 +91,7 @@ function selectorsIncludeConditionsForFIMOperations( !!( selector && conditions.reduce((p, c) => { - return p && selector.hasOwnProperty(c); + return p && Object.hasOwn(selector, c); }, true) ); diff --git a/x-pack/plugins/cloud_defend/public/components/control_general_view_selector/index.tsx b/x-pack/plugins/cloud_defend/public/components/control_general_view_selector/index.tsx index 04033509fbe7f..4511aa71f056c 100644 --- a/x-pack/plugins/cloud_defend/public/components/control_general_view_selector/index.tsx +++ b/x-pack/plugins/cloud_defend/public/components/control_general_view_selector/index.tsx @@ -141,7 +141,7 @@ const StringArrayCondition = ({ label={label} fullWidth={true} key={prop} - isInvalid={!!errorMap.hasOwnProperty(prop)} + isInvalid={!!Object.hasOwn(errorMap, prop)} > @@ -216,7 +216,7 @@ export const ControlGeneralViewSelector = ({ const availableConditions = useMemo(() => getSelectorConditions(selector.type), [selector]); const remainingConditions = useMemo(() => { - return availableConditions.filter((condition) => !selector.hasOwnProperty(condition)); + return availableConditions.filter((condition) => !Object.hasOwn(selector, condition)); }, [availableConditions, selector]); const conditionsAdded = useMemo(() => { @@ -462,14 +462,14 @@ export const ControlGeneralViewSelector = ({ diff --git a/x-pack/plugins/cloud_integrations/cloud_full_story/server/assets/fullstory_library.js b/x-pack/plugins/cloud_integrations/cloud_full_story/server/assets/fullstory_library.js index bfe2af8d44668..b522ae7e4cbcc 100644 --- a/x-pack/plugins/cloud_integrations/cloud_full_story/server/assets/fullstory_library.js +++ b/x-pack/plugins/cloud_integrations/cloud_full_story/server/assets/fullstory_library.js @@ -6,4 +6,4 @@ /* eslint-disable prettier/prettier,no-var,eqeqeq,new-cap,no-nested-ternary,no-use-before-define,no-sequences,block-scoped-var,one-var, dot-notation,no-script-url,no-restricted-globals,no-unused-vars,guard-for-in,no-proto,camelcase,no-empty,no-redeclare,no-caller, strict,no-extend-native,no-undef,no-loop-func */ -!function(){"use strict";var t={248:function(t,n,i){var r,e=i(940);function s(t){}!function(t){t[t.Unknown=0]="Unknown",t[t.Clean=1]="Clean",t[t.UnrecoverableFailure=2]="UnrecoverableFailure"}(r||(r={}));var o=new(function(){function t(t){this.rebuildFromSnapshot(t)}return t.prototype.rebuildFromSnapshot=function(t){var n=this.snapshot;if(this.snapshot=t,!n||n.functions!==t.functions){var i=t.functions;this.arrayIsArray=i.arrayIsArray,this.clearWindowInterval=a(i.clearWindowInterval),this.clearWindowTimeout=a(i.clearWindowTimeout),this.dateGetTime=a(i.dateGetTime),this.dateNow=i.dateNow,this.docFragQuerySelectorAll=a(i.docFragQuerySelectorAll),this.docQuerySelectorAll=a(i.docQuerySelectorAll),this.elMatches=a(i.elMatches),this.elQuerySelectorAll=a(i.elQuerySelectorAll),this.jsonParse=i.jsonParse,this.jsonStringify=i.jsonStringify,this.matchMedia=c(i.matchMedia),this.mathAbs=i.mathAbs,this.mathFloor=i.mathFloor,this.mathMax=i.mathMax,this.mathMin=i.mathMin,this.mathPow=i.mathPow,this.mathRandom=i.mathRandom,this.mathRound=i.mathRound,this.objectHasOwnProp=a(i.objectHasOwnProp),this.objectKeys=i.objectKeys,this.objectValues=i.objectValues||null,this.requestWindowAnimationFrame=c(i.requestWindowAnimationFrame),this.requestWindowIdleCallback=c(i.requestWindowIdleCallback),this.setWindowInterval=a(i.setWindowInterval),this.setWindowTimeout=a(i.setWindowTimeout)}},t}())(u(window));function u(t,n){void 0===n&&(n=r.Unknown);var i=n,e=[],s=function(t){return i=r.UnrecoverableFailure,e.push("Snapshot failed: "+t),function(){throw new Error("Invoked failed snapshot")}},o=function(t){try{return t()}catch(t){return s(t.message)}},u=function(t){try{return t()||s("snapshot not found")}catch(t){return s(t.message)}},a={arrayIsArray:o(function(){return t.Array.isArray}),clearWindowInterval:o(function(){return t.clearInterval}),clearWindowTimeout:o(function(){return t.clearTimeout}),dateGetTime:o(function(){return t.Date.prototype.getTime}),dateNow:o(function(){return t.Date.now}),docFragQuerySelectorAll:u(function(){var n;return null===(n=t.DocumentFragment)||void 0===n?void 0:n.prototype.querySelectorAll}),docQuerySelectorAll:u(function(){var n;return null!==(n=t.Document.prototype.querySelectorAll)&&void 0!==n?n:t.document.querySelectorAll}),elMatches:u(function(){return v(t,h)}),elQuerySelectorAll:u(function(){return v(t,f)}),jsonParse:o(function(){return t.JSON.parse}),jsonStringify:o(function(){return t.JSON.stringify}),matchMedia:o(function(){return t.matchMedia}),mathAbs:o(function(){return t.Math.abs}),mathFloor:o(function(){return t.Math.floor}),mathMax:o(function(){return t.Math.max}),mathMin:o(function(){return t.Math.min}),mathPow:o(function(){return t.Math.pow}),mathRandom:o(function(){return t.Math.random}),mathRound:o(function(){return t.Math.round}),objectHasOwnProp:o(function(){return t.Object.prototype.hasOwnProperty}),objectKeys:o(function(){return t.Object.keys}),objectValues:o(function(){return t.Object.values}),requestWindowAnimationFrame:o(function(){return t.requestAnimationFrame}),requestWindowIdleCallback:o(function(){return t.requestIdleCallback}),setWindowInterval:o(function(){return t.setInterval}),setWindowTimeout:o(function(){return t.setTimeout})},c={functionToString:o(function(){return t.Function.prototype.toString}),objectToString:o(function(){return t.Object.prototype.toString})};return{status:i,functions:a,helpers:c,errors:e}}function a(t){return function(n){for(var i=[],r=1;r=0){var s=e.split("/"),o=s[0],u=s[1];i[r]=o,n=u;break}}var a=function(t){var n=parseInt(null!=t?t:"",10),i=E(),r=S();return isNaN(n)?r:n<=i?void 0:n>r?r:n}(n);if(!a)return null;i[0];var c=i[1],h=i[2],f=i[3],v="";f&&(v=decodeURIComponent(f),(y.indexOf(v)>=0||b.indexOf(v)>=0)&&(v=""));var l=(null!=h?h:"").split(":"),d=l[0],p=l[1],w=l[2];return l[3],{appKeyHash:v,expirationAbsTimeSeconds:a,userId:d,orgId:c,pageCount:_(l[4]),sessionId:null!=p?p:"",sessionStartTime:_(w)}}function k(t){var n={};try{for(var i=t.cookie.split(";"),r=0;r1))return s}}(t);if(!i||!K(n))return n;var r="";return 0===n.indexOf("www.")&&(n=n.slice(4),r="www."),0===n.indexOf(i+".")&&(n=n.slice((i+".").length)),""+r+i+"."+n}}function $(t){return t?C(function(t){var n=t,i=n.indexOf(":");return i>=0&&(n=n.slice(0,i)),n}(t))?t:0==t.indexOf("www.")?"app."+t.slice(4):"app."+t:t}function G(t){var n=j(t);if(n)return n+"/s/fs.js"}function X(t,n){return function(){for(var i=[],r=0;rn)return!1;return i==n}function ot(t,n){var i=0;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&++i>n)return!0;return!1}function ut(t){var n=t.nextSibling;return n&&t.parentNode&&n===t.parentNode.firstChild?null:n}function at(t){var n=t.previousSibling;return n&&t.parentNode&&n===t.parentNode.lastChild?null:n}function ct(t){return function(){for(var n=this,i=[],r=0;r"}function pt(t){return o.jsonParse(t)}var wt=function(){function t(t,n,i){void 0===i&&(i=!1),this.i=t,this.u=n,this.l=i,this.g=J,this.m=J,this.S=J,this.k=!1}return t.prototype.before=function(t){return this.g=ft(t),this},t.prototype.afterSync=function(t){return this.m=ft(t),this},t.prototype.afterAsync=function(t){return this.S=ft(function(n){o.setWindowTimeout(window,X(function(){t(n)}),0)}),this},t.prototype.disable=function(){if(this.k=!1,this._){var t=this._,n=t.override,i=t["native"];this.i[this.u]===n&&(this.i[this.u]=i,this._=void 0)}},t.prototype.enable=function(){if(this.k=!0,this._)return!0;this._=this.A();try{this.i[this.u]=this._.override}catch(t){return!1}return!0},t.prototype.getTarget=function(){return this.i},t.prototype.A=function(){var t=this,n=this,i=this.i[this.u],r=function(){for(var t=[],r=0;r\n";var i=[];try{for(var r=arguments.callee.caller.caller;r&&i.length<10;){var e=kt.test(r.toString())&&RegExp.$1||xt;i.push(e),r=r.caller}}catch(t){t.toString()}n=i.join("\n")}return t+n}function It(){try{return window.self!==window.top}catch(t){return!0}}var Tt=function(){function t(){}return t.wrap=function(n,i){return void 0===i&&(i="error"),X(n,function(n){return t.sendToBugsnag(n,i)})},t.I=15,t.sendToBugsnag=function(n,i,r){if(!(t.I<=0)){t.I--;var e=n;"string"==typeof e&&(e=new Error(e));var s=k(document).fs_uid,o=s?x(s):void 0;o&&o.orgId!=F(window)&&(o=void 0);var u=new Date(1678707725e3).toISOString(),a={projectRoot:window.location.origin,deviceTime:p(),inIframe:It(),CompiledVersion:"11aa377d19",CompiledTimestamp:1678707725,CompiledTime:u,orgId:F(window),"userId:sessionId":o?o.userId+":"+o.sessionId:"NA",context:document.location&&document.location.pathname,message:e.message,name:"Recording Error",releaseStage:"production "+u,severity:i,language:Et(window),stacktrace:_t(e)||At()},c=function(t,n,i){var r=encodeURIComponent(n)+"="+encodeURIComponent(i);t.push(r)},h=[];for(var f in a)c(h,f,a[f]||"");if(r)for(var f in r)c(h,"aux_"+f,Ct(r[f]));new Image().src="https://"+L(window)+"/rec/except?"+h.join("&")}},t}();function Ct(t){try{var n=typeof t+": "+vt(t);return"function"==typeof t.toString&&(n+=" (toString: "+t.toString()+")"),n}catch(t){return"failed to serialize \""+(null==t?void 0:t.message)+"\""}}var Pt={};function jt(t,n,i){if(void 0===i&&(i=1),t)return!0;if(Pt[n]=Pt[n]||0,Pt[n]++,Pt[n]>i)return!1;var r=new Error("Assertion failed: "+n);return Tt.sendToBugsnag(r,"error"),t}var Ot,Mt,Kt,Rt,Ht,Nt,Lt={};function Ut(t,n,i){var r;Lt[t]=null!==(r=Lt[t])&&void 0!==r?r:0,Lt[t]++,Lt[t]>1||Tt.sendToBugsnag(n,"error",i)}!function(t){t.MUT_INSERT=2,t.MUT_REMOVE=3,t.MUT_ATTR=4,t.MUT_TEXT=6,t.MOUSEMOVE=8,t.MOUSEMOVE_CURVE=9,t.SCROLL_LAYOUT=10,t.SCROLL_LAYOUT_CURVE=11,t.MOUSEDOWN=12,t.MOUSEUP=13,t.CLICK=16,t.FOCUS=17,t.VALUECHANGE=18,t.RESIZE_LAYOUT=19,t.DOMLOADED=20,t.LOAD=21,t.PLACEHOLDER_SIZE=22,t.UNLOAD=23,t.BLUR=24,t.SET_FRAME_BASE=25,t.TOUCHSTART=32,t.TOUCHEND=33,t.TOUCHCANCEL=34,t.TOUCHMOVE=35,t.TOUCHMOVE_CURVE=36,t.NAVIGATE=37,t.PLAY=38,t.PAUSE=39,t.RESIZE_VISUAL=40,t.RESIZE_VISUAL_CURVE=41,t.RESIZE_DOCUMENT_CONTENT=42,t.RESIZE_SCROLLABLE_ELEMENT_CONTENT=43,t.LOG=48,t.ERROR=49,t.DBL_CLICK=50,t.FORM_SUBMIT=51,t.WINDOW_FOCUS=52,t.WINDOW_BLUR=53,t.HEARTBEAT=54,t.WATCHED_ELEM=56,t.PERF_ENTRY=57,t.REC_FEAT_SUPPORTED=58,t.SELECT=59,t.CSSRULE_INSERT=60,t.CSSRULE_DELETE=61,t.FAIL_THROTTLED=62,t.AJAX_REQUEST=63,t.SCROLL_VISUAL_OFFSET=64,t.SCROLL_VISUAL_OFFSET_CURVE=65,t.MEDIA_QUERY_CHANGE=66,t.RESOURCE_TIMING_BUFFER_FULL=67,t.MUT_SHADOW=68,t.DISABLE_STYLESHEET=69,t.FULLSCREEN=70,t.FULLSCREEN_ERROR=71,t.ADOPTED_STYLESHEETS=72,t.CUSTOM_ELEMENT_DEFINED=73,t.MODAL_OPEN=74,t.MODAL_CLOSE=75,t.SLOW_INTERACTION=76,t.LONG_FRAME=77,t.TIMING=78,t.STORAGE_WRITE_FAILURE=79,t.DOCUMENT_PROPERTIES=80,t.ENTRY_NAVIGATE=81,t.STATS=82,t.VIEWPORT_INTERSECTION=83,t.COPY=84,t.PASTE=85,t.URL_SALT=86,t.URL_ID=87,t.FRAME_STATUS=88,t.SCRIPT_COMPILED_VERSION=89,t.RESET_CSS_SHEET=90,t.ANIMATION_CREATED=91,t.ANIMATION_METHOD_CALLED=92,t.ANIMATION_PROPERTY_SET=93,t.DOCUMENT_TIMELINE_CREATED=94,t.KEYFRAME_EFFECT_CREATED=95,t.KEYFRAME_EFFECT_METHOD_CALLED=96,t.KEYFRAME_EFFECT_PROPERTY_SET=97,t.CAPTURE_SOURCE=98,t.PAGE_DATA=99,t.VISIBILITY_STATE=100,t.DIALOG=101,t.CSSRULE_UPDATE=102,t.CANVAS=103,t.CANVAS_DETACHED_DIMENSION=104,t.INIT_API=105,t.DEFERRED_RESOLVED=106,t.KEEP_ELEMENT=2e3,t.KEEP_URL=2001,t.KEEP_BOUNCE=2002,t.SYS_SETVAR=8193,t.SYS_RESOURCEHASH=8195,t.SYS_SETCONSENT=8196,t.SYS_CUSTOM=8197,t.SYS_REPORTCONSENT=8198,t.SYS_LETHE_MOBILE_BUNDLE_SEQ=8199}(Ot||(Ot={})),function(t){t.Animation=0,t.CSSAnimation=1,t.CSSTransition=2}(Mt||(Mt={})),function(t){t.Unknown=0,t.Serialization=1}(Kt||(Kt={})),function(t){t.Unknown=0,t.Successful=1,t.BlocklistedFrame=2,t.PartiallyLoaded=3,t.MissingWindowOrDocument=4,t.MissingDocumentHead=5,t.MissingBodyOrChildren=6,t.AlreadyDefined=7,t.NoNonScriptElement=8,t.Exception=9}(Rt||(Rt={})),function(t){t.Unknown=0,t.DomSnapshot=1,t.NodeEncoding=2,t.LzEncoding=3}(Ht||(Ht={})),function(t){t.Internal=0,t.Public=1}(Nt||(Nt={}));var Ft,Dt,Bt,Wt,qt,Qt,Vt,zt,$t,Gt,Xt,Jt,Zt,Yt,tn,nn,rn,en,sn,on,un,an,cn,hn=["print","alert","confirm"];function fn(t){switch(t){case Ot.MOUSEDOWN:case Ot.MOUSEMOVE:case Ot.MOUSEMOVE_CURVE:case Ot.MOUSEUP:case Ot.TOUCHSTART:case Ot.TOUCHEND:case Ot.TOUCHMOVE:case Ot.TOUCHMOVE_CURVE:case Ot.TOUCHCANCEL:case Ot.CLICK:case Ot.SCROLL_LAYOUT:case Ot.SCROLL_LAYOUT_CURVE:case Ot.SCROLL_VISUAL_OFFSET:case Ot.SCROLL_VISUAL_OFFSET_CURVE:case Ot.NAVIGATE:return!0;}return!1}!function(t){t[t.Index=1]="Index",t[t.Cached=2]="Cached"}(Ft||(Ft={})),function(t){t.GrantConsent=!0,t.RevokeConsent=!1}(Dt||(Dt={})),function(t){t.Page=0,t.Document=1}(Bt||(Bt={})),function(t){t.Unknown=0,t.Api=1,t.FsShutdownFrame=2,t.Hibernation=3,t.Reidentify=4,t.SettingsBlocked=5,t.Size=6,t.Unload=7,t.Hidden=8}(Wt||(Wt={})),function(t){t.Unknown=0,t.NotEmpty=1,t.EmptyBody=2}(qt||(qt={})),function(t){t.Timing=0,t.Navigation=1,t.Resource=2,t.Paint=3,t.Mark=4,t.Measure=5,t.Memory=6,t.TimeOrigin=7,t.LayoutShift=8,t.FirstInput=9,t.LargestContentfulPaint=10,t.LongTask=11}(Qt||(Qt={})),function(t){t.Timing=["navigationStart","unloadEventStart","unloadEventEnd","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"],t.Navigation=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","unloadEventStart","unloadEventEnd","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd","type","redirectCount","decodedBodySize","encodedBodySize","transferSize"],t.Resource=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"],t.Measure=["name","startTime","duration"],t.Memory=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"],t.TimeOrigin=["timeOrigin"],t.LayoutShift=["startTime","value","hadRecentInput"],t.FirstInput=["name","startTime","duration","processingStart"],t.LargestContentfulPaint=["name","startTime","duration","renderTime","loadTime","size"]}(Vt||(Vt={})),function(t){t.Performance=0,t.PerformanceEntries=1,t.PerformanceMemory=2,t.Console=3,t.Ajax=4,t.PerformanceObserver=5,t.PerformanceTimeOrigin=7,t.WebAnimation=8,t.LayoutShift=9,t.FirstInput=10,t.LargestContentfulPaint=11,t.LongTask=12,t.HTMLDialogElement=13,t.CaptureOnStartEnabled=14,t.CanvasWatcherEnabled=15}(zt||(zt={})),function(t){t.Node=1,t.Sheet=2}($t||($t={})),function(t){t.StyleSheetHooks=0,t.SetPropertyHooks=1}(Gt||(Gt={})),function(t){t.Document="document",t.Event="evt",t.Page="page",t.User="user"}(Xt||(Xt={})),function(t){t.FsId="fsidentity",t.NewUid="newuid"}(Jt||(Jt={})),function(t){t.Elide=0,t.Record=1,t.Allowlist=2}(Zt||(Zt={})),function(t){t.Any=0,t.Exclude=1,t.Mask=2}(Yt||(Yt={})),function(t){t.Erase=0,t.MaskText=1,t.ScrubUrl=2,t.ScrubCss=3}(tn||(tn={})),function(t){t.Static=0,t.Prefix=1}(nn||(nn={})),function(t){t.SignalInvalid=0,t.SignalDeadClick=1,t.SignalRageClick=2}(rn||(rn={})),function(t){t.ReasonNoSuchOrg=1,t.ReasonOrgDisabled=2,t.ReasonOrgOverQuota=3,t.ReasonBlockedDomain=4,t.ReasonBlockedIp=5,t.ReasonBlockedUserAgent=6,t.ReasonBlockedGeo=7,t.ReasonBlockedTrafficRamping=8,t.ReasonInvalidURL=9,t.ReasonUserOptOut=10,t.ReasonInvalidRecScript=11,t.ReasonDeletingUser=12,t.ReasonNativeHookFailure=13}(en||(en={})),function(t){t.Unset=0,t.Exclude=1,t.Mask=2,t.Unmask=3,t.Watch=4,t.Keep=5,t.Defer=6}(sn||(sn={})),function(t){t.Unset=0,t.Click=1}(on||(on={})),function(t){t[t.Page=1]="Page",t[t.Bundle=2]="Bundle"}(un||(un={})),function(t){t[t.Error=3]="Error",t[t.Page=4]="Page",t[t.Bundle=5]="Bundle",t[t.Settings=6]="Settings"}(an||(an={})),function(t){t.MaxPerfMarksPerPage=16384,t.MaxLogsPerPage=1024,t.MaxUrlLength=2048,t.MutationProcessingInterval=250,t.CurveSamplingInterval=142,t.DefaultBundleUploadInterval=5e3,t.HeartbeatInitial=4e3,t.HeartbeatMax=256200,t.PageInactivityTimeout=18e5,t.BackoffMax=3e5,t.ScrollSampleInterval=t.MutationProcessingInterval/5,t.InactivityThreshold=4e3,t.MaxAjaxPayloadLength=16384,t.DefaultOrgSettings={MaxPerfMarksPerPage:t.MaxPerfMarksPerPage,MaxConsoleLogPerPage:t.MaxLogsPerPage,MaxAjaxPayloadLength:t.MaxAjaxPayloadLength,MaxUrlLength:t.MaxUrlLength,RecordPerformanceResourceImg:!0,RecordPerformanceResourceTiming:!0,HttpRequestHeadersAllowlist:[],HttpResponseHeadersAllowlist:[],UrlPrivacyConfig:[{Exclude:{Hash:[{Expression:"#.*"}],QueryParam:[{Expression:"(=)(.*)"}]}}],AttributeBlocklist:[{Target:Yt.Any,Tag:"*",Name:"",Type:nn.Prefix,Action:tn.Erase}]},t.DefaultStatsSettings={MaxPayloadLength:8192,MaxEventTypeLength:1024},t.BlockedFieldValue="__fs__redacted"}(cn||(cn={}));var vn,ln,dn,pn="_fs_uid",wn="_fs_cid",gn="_fs_lua";function mn(t,n,i,r){void 0!==i&&("function"==typeof t.addEventListener?t.addEventListener(n,i,r):"function"==typeof t.addListener&&t.addListener(i))}function yn(t,n,i,r){void 0!==i&&("function"==typeof t.removeEventListener?t.removeEventListener(n,i,r):"function"==typeof t.removeListener&&t.removeListener(i))}!function(t){t[t.Shutdown=1]="Shutdown",t[t.Starting=2]="Starting",t[t.Started=3]="Started"}(vn||(vn={})),function(t){t.Set=0,t.Function=1}(ln||(ln={})),function(t){t[t.Disabled=0]="Disabled",t[t.CaptureCanvasOps=1]="CaptureCanvasOps",t[t.ScreenshotCanvas=2]="ScreenshotCanvas"}(dn||(dn={}));var bn=function(){function t(){var t=this;this.T=[],this.C=[],this.P=!0,this.j=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t.P={capture:!0,passive:!0},t.j={capture:!1,passive:!0}}});window.addEventListener("test",J,n)}catch(t){}}return t.prototype.add=function(t,n,i,r,e){return void 0===e&&(e=!1),this.addCustom(t,n,i,r,e)},t.prototype.addCustom=function(t,n,i,r,e){void 0===e&&(e=!1);var s={target:t,type:n,fn:Tt.wrap(function(t){(e||!1!==t.isTrusted||"message"==n||t._fs_trust_event)&&r(t)}),options:i?this.P:this.j,index:this.T.length};return this.T.push(s),mn(t,n,s.fn,s.options),s},t.prototype.remove=function(t){t.target&&(yn(t.target,t.type,t.fn,t.options),t.target=null,t.fn=void 0)},t.prototype.clear=function(){for(var t=0;ti){n.Z||(n.Z=!0,Tt.sendToBugsnag("Out of time for remaining measurement tasks.","warning",{totalRunningTimeMs:a-t}));break t}}n.G=null}finally{n.X=!1,n.wnd}}}),this.wnd=t}return t.create=function(t){return t.ResizeObserver?new ai(t,t.ResizeObserver):new ci(t)},t.prototype.requestMeasureTask=function(t,n){var i,r=this;if(this.J>16)Tt.sendToBugsnag("Too much synchronous recursion in requestMeasureTask","error");else{var e=this.X?this.J:0,s=Tt.wrap(function(){var t=r.J;r.J=e+1;try{n()}finally{r.J=t}});this.G?this.G[t].push(s):(this.G=((i={})[ii.Essential]=[],i[ii.High]=[],i[ii.Medium]=[],i[ii.Low]=[],i[t]=[s],i),this.schedule())}},t.prototype.performMeasurementsNow=function(){this.performMeasurements()},t}(),ai=function(t){function n(n,i){var r=t.call(this,n)||this;return r.Y=i,r}return(0,e.__extends)(n,t),n.prototype.schedule=function(){var t=this,n=this.Y,i=this.wnd.document,r=i.documentElement||i.body||i.head,e=new n(function(){e.unobserve(r),t.performMeasurements()});e.observe(r)},n}(ui),ci=function(t){function n(n){return t.call(this,n)||this}return(0,e.__extends)(n,t),n.prototype.schedule=function(){(0,e.__awaiter)(void 0,void 0,Yn,function(){var t;return(0,e.__generator)(this,function(n){switch(n.label){case 0:return(t=o.requestWindowAnimationFrame)?[4,new Yn(function(n){return t(window,n)})]:[3,2];case 1:n.sent(),n.label=2;case 2:return[4,ei()];case 3:return n.sent(),[2];}})}).then(this.performMeasurements)},n}(ui);function hi(t,n){return n&&t.pageLeft==n.pageLeft&&t.pageTop==n.pageTop}function fi(t,n){return n&&t.width==n.width&&t.height==n.height}function vi(t){return{pageLeft:t.pageLeft,pageTop:t.pageTop,width:t.width,height:t.height}}var li=[["@import\\s+\"","\""],["@import\\s+'","'"]].concat([["url\\(\\s*\"","\"\\s*\\)"],["url\\(\\s*'","'\\s*\\)"],["url\\(\\s*","\\s*\\)"]]),di=".*?"+/(?:[^\\](?:\\\\)*)/.source,pi=new RegExp(li.map(function(t){var n=t[0],i=t[1];return"("+n+")("+di+")("+i+")"}).join("|"),"g"),wi=/url\(["']?(.+?)["']?\)/g,gi=/^\s*\/\//;function mi(t){return"BackCompat"==t.compatMode}function yi(t){return t&&t.body&&t.documentElement?mi(t)?[t.body.clientWidth,t.body.clientHeight]:[t.documentElement.clientWidth,t.documentElement.clientHeight]:[0,0]}var bi=function(){function t(t,n){var i,r,e,s;this.hasKnownPosition=!1,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.clientWidth=0,this.clientHeight=0;var o=t.document;if(o&&o.documentElement&&o.body){i=yi(o),this.clientWidth=i[0],this.clientHeight=i[1];var u=t.visualViewport;if(u){this.hasKnownPosition=!0,this.pageTop=u.pageTop-u.offsetTop,this.pageLeft=u.pageLeft-u.offsetLeft,0==this.pageTop&&(this.pageTop=0),0==this.pageLeft&&(this.pageLeft=0);var a=null!==(e=xi(t,"innerWidth"))&&void 0!==e?e:0,c=null!==(s=xi(t,"innerHeight"))&&void 0!==s?s:0;if(a>0&&c>0)return this.width=a,void(this.height=c)}if(void 0!==n&&this.clientWidth==n.clientWidth&&this.clientHeight==n.clientHeight&&n.width>0&&n.height>0)return this.width=n.width,void(this.height=n.height);r=this.tt(t),this.width=r[0],this.height=r[1]}}return t.prototype.tt=function(t){var n=this.it(t,"width",this.clientWidth,this.clientWidth+128);void 0===n&&(n=xi(t,"innerWidth")),void 0===n&&(n=this.clientWidth);var i=this.it(t,"height",this.clientHeight,this.clientHeight+128);return void 0===i&&(i=xi(t,"innerHeight")),void 0===i&&(i=this.clientHeight),[n,i]},t.prototype.it=function(t,n,i,r){if(o.matchMedia){var e=i,s=r,u=o.matchMedia(t,"(min-"+n+": "+e+"px)");if(null!=u){if(u.matches&&o.matchMedia(t,"(max-"+n+": "+e+"px)").matches)return e;for(;e<=s;){var a=o.mathFloor((e+s)/2);if(o.matchMedia(t,"(min-"+n+": "+a+"px)").matches){if(o.matchMedia(t,"(max-"+n+": "+a+"px)").matches)return a;e=a+1}else s=a-1}}}},t}();function Ei(t,n){return new bi(t,n)}var Si=function(t,n){this.offsetLeft=0,this.offsetTop=0,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.scale=0;var i=t.document;if(i.body){"pageXOffset"in t?(this.pageLeft=t.pageXOffset,this.pageTop=t.pageYOffset):i.scrollingElement?(this.pageLeft=i.scrollingElement.scrollLeft,this.pageTop=i.scrollingElement.scrollTop):mi(i)?(this.pageLeft=i.body.scrollLeft,this.pageTop=i.body.scrollTop):i.documentElement&&(i.documentElement.scrollLeft>0||i.documentElement.scrollTop>0)?(this.pageLeft=i.documentElement.scrollLeft,this.pageTop=i.documentElement.scrollTop):(this.pageLeft=i.body.scrollLeft||0,this.pageTop=i.body.scrollTop||0),this.offsetLeft=this.pageLeft-n.pageLeft,this.offsetTop=this.pageTop-n.pageTop;var r=0,e=0;try{r=t.innerWidth,e=t.innerHeight}catch(t){return}if(0!=r&&0!=e){this.scale=n.width/r,this.scale<1&&(this.scale=1);var s=n.width-n.clientWidth,o=n.height-n.clientHeight;this.width=r-s/this.scale,this.height=e-o/this.scale}}};function xi(t,n){try{return t[n]}catch(t){return}}function ki(t){var n=t;return n.tagName?"object"==typeof n.tagName?"form":n.tagName.toLowerCase():null}var _i,Ai,Ii=new RegExp("[^\\s]"),Ti=new RegExp("[\\s]*$");function Ci(t){var n=Ii.exec(t);if(!n)return t;for(var i=n.index,r=(n=Ti.exec(t))?t.length-n.index:0,e="\uFFFF",s=t.slice(i,t.length-r).split(/\r\n?|\n/g),o=0;o0&&n.length<1e4;){var i=n.pop();delete Mi[i.id],i.node._fs==i.id&&(i.node._fs=0),i.id=0,i.next&&n.push(i.next),i.child&&n.push(i.child)}jt(n.length<1e4,"clearIds is fast")}function Qi(t,n){void 0===n&&(n=1024);try{var i={tokens:[],opath:[],cyclic:Vi(t,n/4)};return $i(t,n,0,i),i.tokens.join("")}catch(t){return lt(t)}}function Vi(t,n){var i=0;try{o.jsonStringify(t,function(t,r){if(i++>n)throw"break";if("object"==typeof r)return r})}catch(t){return"break"!=t}return!1}var zi=function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.length<=i.length||n<=i.length?t.substring(0,n):t.substring(0,n-i.length)+i};function $i(t,n,i,r){if(n<1)return 0;var e=function(t){switch(!0){case function(t){return!(!t||t.constructor!=Date)}(t):return n=t,isNaN(n)?"Invalid Date":n.toUTCString();case function(t){return"object"==typeof Node?t instanceof Node:t&&"object"==typeof t&&t.nodeType>0&&"string"==typeof t.nodeName}(t):return function(t){return t.toString()}(t);case void 0===t:return"undefined";case"object"!=typeof t||null==t:return t;case t instanceof Error:return[t.toString(),t.stack].filter(Boolean).join(",");}var n}(t);if(void 0!==e){var s=function(t,n){var i=o.jsonStringify(t);return i&&"\""==i[0]?zi(i,n,"...\""):i}(e,n);return"string"==typeof s&&s.length<=n?(r.tokens.push(s),s.length):0}if(r.cyclic){r.opath.splice(i);var u=r.opath.lastIndexOf(t);if(u>-1){var a="";return a="\""+zi(a,n-2)+"\"",r.tokens.push(a),a.length}r.opath.push(t)}var c=n,h=function(t){return c>=t.length&&(c-=t.length,r.tokens.push(t),!0)},f=function(t){var n=r.tokens.length-1;","===r.tokens[n]?r.tokens[n]=t:h(t)};if(c<2)return 0;if(tt(t)){h("[");for(var v=0;v0;v++){var l=$i(t[v],c-1,i+1,r);if(c-=l,0==l&&!h("null"))break;h(",")}f("]")}else{h("{");var d=nt(t);for(v=0;v0;v++){var p=d[v],w=t[p];if(!h("\""+p+"\":"))break;if(0==(l=$i(w,c-1,i+1,r))){r.tokens.pop();break}c-=l,h(",")}f("}")}return n==1/0?1:n-c}var Gi,Xi,Ji=function(){function t(){var n=this;this.rt=Tt.wrap(function(){n.unregister(),n.et&&n.et()}),this.st=0,this.ot=t.ut++}return t.ct=function(){t.checkedAlready=!1,t.ht=0},t.checkForBrokenSchedulers=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i;return(0,e.__generator)(this,function(r){switch(r.label){case 0:return!o.requestWindowAnimationFrame||t.checkedAlready||(n=p())-t.ht<100?[2,!1]:(t.ht=n,t.checkedAlready=!0,[4,new Yn(function(t){return o.requestWindowAnimationFrame(window,t)})]);case 1:return r.sent(),i=[],rt(t.ft,function(t){var r=t.vt(n);r&&i.push(r)}),[4,Yn.all(i)];case 2:return r.sent(),o.requestWindowAnimationFrame(window,Tt.wrap(function(){t.checkedAlready=!1})),[2,!0];}})})},t.stopAll=function(){rt(this.ft,function(t){return t.stop()})},t.prototype.setTick=function(t){this.et=t},t.prototype.stop=function(){this.cancel(),delete t.ft[this.ot]},t.prototype.register=function(n){this.st=p()+100+1.5*n,t.ft[this.ot]=this},t.prototype.timerIsRunning=function(){return null!=t.ft[this.ot]},t.prototype.unregister=function(){delete t.ft[this.ot]},t.prototype.vt=function(t){if(t>this.st)return Yn.resolve().then(this.rt)["catch"](function(){})},t.ft={},t.ut=0,t.checkedAlready=!1,t.ht=0,t}(),Zi=function(t){function n(n){var i=t.call(this)||this;return i.lt=n,i.dt=-1,i}return(0,e.__extends)(n,t),n.prototype.start=function(t){var n=this;-1==this.dt&&(this.setTick(function(){t(),n.register(n.lt)}),this.dt=o.setWindowInterval(window,this.rt,this.lt),this.register(this.lt))},n.prototype.cancel=function(){-1!=this.dt&&(o.clearWindowInterval(window,this.dt),this.dt=-1,this.setTick(function(){}))},n}(Ji),Yi=function(t){function n(n,i,r){void 0===i&&(i=0);for(var e=[],s=3;sn&&(this.St=t-n,this.St>1e3&&this.kt("timekeeper set with future ts"))},t.prototype.kt=function(t){Qi({msg:t,skew:this.St,startTime:this.xt,wallTime:this.wallTime()},1024)},t}(),ir=function(){function t(t,n){this._t=t,this.At=n,this.It=!1,this.Tt={},this.Ct={},this.Pt={},this.jt=!1,this.Ot=!1,Gi=this,this.Mt=t.window.document}return t.prototype.start=function(){var t;(t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))&&t.set&&(rr||(yt(HTMLInputElement,"value",ar),yt(HTMLInputElement,"checked",ar),yt(HTMLSelectElement,"value",ar),yt(HTMLTextAreaElement,"value",ar),yt(HTMLSelectElement,"selectedIndex",ar),yt(HTMLOptionElement,"selected",ar),rr=!0),1)||(this.It=!0)},t.prototype.hookInstance=function(t){if("input"===ki(t))switch(t.type){case"checkbox":case"radio":bt(t,"checked",ar);break;default:bt(t,"value",ar);}},t.prototype.addInput=function(t){if(t){var n=Bi(t);if(n){"input"===ki(t)&&this.Kt(t);var i=!1;if(function(t){switch(t.type){case"checkbox":case"radio":return t.checked!=t.hasAttribute("checked");default:return(t.value||"")!=function(t){if("select"!=ki(t))return t.getAttribute("value")||"";var n=t,i=n.querySelector("option[selected]")||n.querySelector("option");return i&&i.value||""}(t);}}(t)&&(this.Rt(t),i=!0),this.It&&(this.Tt[n]={elem:t}),!i)if(hr(t)){var r=or(t);t.checked&&(this.Pt[r]=n)}else this.Ct[n]=cr(t)}}},t.prototype.Kt=function(t){if(this.jt)this.Ot&&this.hookInstance(t);else{var n="checkbox"===t.type||"radio"===t.type?"checked":"value",i=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,n),r=Object.getOwnPropertyDescriptor(t,n);i&&r&&i!==r&&(this.Ot=!0,this.hookInstance(t)),this.jt=!0}},t.prototype.diffValue=function(t,n){void 0===n&&(n=cr(t));var i=Bi(t);if(!t||!i)return!1;if(hr(t)){var r=or(t);return this.Pt[r]===i!=("true"===n)}return this.Ct[i]!==n},t.prototype.onChange=function(t,n,i){void 0===i&&(i=cr(t));var r=Bi(t);t&&r&&(n||this.diffValue(t,i))&&this.Rt(t,n)},t.prototype.onKeyboardChange=function(t){var n,i=function(t){for(var n=t.activeElement;n&&n.shadowRoot;){var i=n.shadowRoot.activeElement;if(!i)return n;n=i}return n}(this.Mt);i&&("value"in(n=i)||"checked"in n)&&!Hi(i)&&this.diffValue(i)&&this.Rt(i,t)},t.prototype.tick=function(){for(var t in this.Tt){var n=this.Tt[t],i=n.elem;if(Bi(i))try{delete this.Tt[t];var r=cr(i);if(this.diffValue(i,r))this.Rt(i);else if(n.noFsIdInOption){var e=i;Array.prototype.slice.call(e.options).every(function(t){return Bi(t)})&&(n.noFsIdInOption=!1,this.Rt(i))}}finally{this.It&&(this.Tt[t]=n)}else delete this.Tt[t],delete this.Ct[t],hr(i)&&delete this.Pt[or(i)]}},t.prototype.stop=function(){Gi=void 0},t.prototype.Rt=function(t,n){var i=this;void 0===n&&(n=!1);var r=Bi(t);if(t&&r&&!this.Ht(r,t)){var e=cr(t);if(hr(t)){var s=or(t);"false"===e&&this.Pt[s]===r?delete this.Pt[s]:"true"===e&&(this.Pt[s]=r)}else this.Ct[r]=e;this._t.measurer.requestMeasureTask(ii.Medium,function(){var s=t.getBoundingClientRect(),o=s.width>0&&s.height>0,u=Ni(t)?Ci(e):e;i.At.enqueue({Kind:Ot.VALUECHANGE,Args:[r,u,n,o]})})}},t.prototype.Ht=function(t,n){if(this.Tt[t])return!0;if("select"!==ki(n))return!1;for(var i=n.options,r=0;r-1||wr.indexOf("Trident/")>-1,mr=(gr&&wr.indexOf("Trident/5"),gr&&wr.indexOf("Trident/6"),gr&&wr.indexOf("rv:11")>-1),yr=wr.indexOf("Edge/")>-1,br=(wr.indexOf("CriOS"),wr.indexOf("Snapchat")>-1),Er=/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);function Sr(){var t=window.navigator.userAgent.match(/Version\/(\d+)/);return t&&t[1]?parseInt(t[1],10):-1}function xr(t){if(!Er)return!1;var n=Sr();return n>=0&&n===t}function kr(t){if(!Er)return!1;var n=Sr();return n>=0&&nne?(Tt.sendToBugsnag("Ignoring huge text node","warning",{length:s}),""):t.parentNode&&"style"==ki(t.parentNode)?r:e.mask?Ci(r):r}function re(t){return Kr[t]||t.toLowerCase()}var ee=/^\s*((prefetch|preload|prerender)\s*)+$/i,se=/^\s*.*((worklet|script|worker|font|fetch)\s*)+$/i;function oe(t,n,i,r,e){var s,u;if(void 0===r&&(r=ki(t)),void 0===e&&(e=Ui(t)),null===r||""===n)return null;if("link"===r&&ee.test(null!==(s=t.getAttribute("rel"))&&void 0!==s?s:"")&&!se.test(null!==(u=t.getAttribute("as"))&&void 0!==u?u:""))return null;var a,c="style"===n?ae(i):i,h=function(t,n,i){var r,e,s,u,a,c,h,f,v,l,d,p,w,g=void 0;(null===(r=null==n?void 0:n.watchKind)||void 0===r?void 0:r.has(_i.Exclude))?g=Yt.Exclude:(null==n?void 0:n.mask)&&(g=Yt.Mask);var m=[null===(u=null===(s=null===(e=Ee.blocklist[Yt.Any])||void 0===e?void 0:e[t])||void 0===s?void 0:s["static"])||void 0===u?void 0:u[i],null===(h=null===(c=null===(a=Ee.blocklist[Yt.Any])||void 0===a?void 0:a["*"])||void 0===c?void 0:c["static"])||void 0===h?void 0:h[i],g?null===(l=null===(v=null===(f=Ee.blocklist[g])||void 0===f?void 0:f[t])||void 0===v?void 0:v["static"])||void 0===l?void 0:l[i]:void 0,g?null===(w=null===(p=null===(d=Ee.blocklist[g])||void 0===d?void 0:d["*"])||void 0===p?void 0:p["static"])||void 0===w?void 0:w[i]:void 0];return Ee.hasPrefix&&m.push(ke(Yt.Any,t,i),ke(Yt.Any,"*",i),g?ke(g,t,i):void 0,g?ke(g,"*",i):void 0),function(t){var n=t.filter(function(t){return void 0!==t});if(0!==n.length)return o.mathMin.apply(o,n)}(m)}(r,e,n);if(void 0===h&&!e)return null;switch(h){case void 0:return c;case tn.Erase:return null;case tn.MaskText:return Ci(c);case tn.ScrubCss:return a=function(t,n,i){return""+t+Se+i},c.replace(pi,function(t){for(var n=[],i=1;i-1)return f.substring(v)}return f;default:return(0,Ir.nt)(h);}}var ue={},ae=function(t,n){void 0===n&&(n=window);try{var i=n.location,r=""+i.origin+i.pathname+i.search,e=ue[r];return e?e.lastIndex=0:(e=new RegExp((s=r,($r.test(s)?s.replace(zr,"\\$&"):s)+"/?(#)"),"g"),ue[r]=e),t.replace(e,"https://fs-currenturl.invalid$1")}catch(n){return Ut("cleanCSS",n),t}var s},ce=/^data:/i;function he(t,n){if(ce.test(t))return t;switch(n.source){case"dom":switch(i=n.type){case"frame":case"iframe":return we(t);default:return fe(t);}case"event":switch(i=n.type){case Ot.AJAX_REQUEST:case Ot.NAVIGATE:return fe(t);case Ot.SET_FRAME_BASE:return we(t);default:return(0,Ir.nt)(i);}case"log":return we(t);case"page":var i;switch(i=n.type){case"base":return we(t);case"referrer":case"url":return fe(t);default:return(0,Ir.nt)(i);}case"perfEntry":switch(n.type){case"frame":case"iframe":case"navigation":case"other":return we(t);default:return fe(t);}default:return(0,Ir.nt)(n);}}function fe(t){return ge(de,t)}var ve=cn.DefaultOrgSettings.MaxUrlLength,le=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig),de=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig);function pe(t,n){le=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig.concat(t)),de=Rr(t),ve=n||cn.DefaultOrgSettings.MaxUrlLength}function we(t){return ge(le,t)}function ge(t,n){return function(t,n,i){void 0===i&&(i=Lr);for(var r={Hash:[],Host:[],Path:[],QueryParam:[],Query:[]},e=0,s=t;e").replace(ye,function(t){return he(t,{source:"log",type:"debug"})})}var Ee,Se="https://fs-excluded.invalid";function xe(t){var n,i,r,e,s,o,u,a,c,h,f,v,l,d,p,w;try{for(var g=(Ee={blocklist:{},hasPrefix:!1}).blocklist,m=(null!==(r=null==t?void 0:t.length)&&void 0!==r?r:0)>0?t:cn.DefaultOrgSettings.AttributeBlocklist,y={},b=0,E=m;b-1;var n}var Te="#polyfillshadow";function Ce(t){var n;return(null===(n=t.childNodes)||void 0===n?void 0:n.length)>0}function Pe(t,n){Oe(t.childNodes,n)}function je(t,n){Oe(t.childNodes,n,!0)}function Oe(t,n,i){void 0===i&&(i=!1);for(var r=i?t.length-1:0,e=i?-1:t.length;r!==e;){var s=t[r];s&&"frag"in s&&!St(s)&&Array.isArray(s.frag)?s.frag.length&&Oe(s.childNodes,n,i):n(s),i?--r:++r}}var Me={INPUT:!0,TEXTAREA:!0,NOSCRIPT:!0},Ke=function(){function t(t,n,i){this.Xt=t,this.Jt=n,this.Zt=i,Mi={},Ki=1}return t.prototype.tokenizeNode=function(t,n,i,r,e,s,o){var u=this,a=Ui(n),c=Ui(i),h=[];return function(n){var i=Ki;try{return u.Yt(t,a,c,r,h,e,s,o),!0}catch(t){return Ki=i,!1}}()||(h=[]),h},t.prototype.Yt=function(t,n,i,r,s,o,u,a){for(var c,h,f=[{parentMirror:n,nextMirror:i,node:r}],v=function(t,n){return function(i){i&&t.push({parentMirror:n,nextMirror:null,node:i})}};f.length;){var l=f.pop();if(l)if("string"!=typeof l){var d=l.node,p=ki(d),w=this.tn(t,p,l,s,o,u);if(null!=w&&!(null===(c=w.watchKind)||void 0===c?void 0:c.has(_i.Exclude))){var g=1===d.nodeType?d.shadowRoot:null,m=w.shadowRootType===Te&&window.HTMLSlotElement&&"slot"===p&&d.assignedNodes();if(g||m||Ce(d))if(null===(h=w.watchKind)||void 0===h?void 0:h.has(_i.Defer))a(w.node,Ai.Deferred);else{if(f.push("]"),je(d,v(f,w)),g)f.push({parentMirror:w,nextMirror:null,node:g});else if(m&&m.length>0){for(var y=[],b=!1,E=0,S=m;E1e3)return null;if(!i||1!=i.nodeType)return null;var r=i;if(getComputedStyle(r).display.indexOf("inline")<0)return r;i=i.parentNode}},n}(Ze),ts=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,e.__extends)(n,t),n.prototype.observe=function(t){var n=this;if(t&&1==t.nodeType){var i=t;this.Tn(Ui(t)),this._t.measurer.requestMeasureTask(ii.Medium,function(){n.addEntry(i)})}},n.prototype.unobserveSubtree=function(t){var n=Ui(t);n&&this.Cn(n)},n.prototype.nodeChanged=function(t){var n=this,i=this.Pn(t);this._t.measurer.requestMeasureTask(ii.Medium,function(){for(var t=0,r=i;t0||this.Hn.length>0){var r={},s={};for(var o in this.Gn(t,i,s,r),s){var u=o.split("\t");i.push({Kind:Ot.MUT_ATTR,Args:[parseInt(u[0],10),u[1],s[o]],When:t})}for(var o in r)i.push({Kind:Ot.MUT_TEXT,Args:[parseInt(o,10),r[o]],When:t})}var a=this.Rn;this.Rn=[];for(var c=0;c0&&(i.push({Kind:Ot.DEFERRED_RESOLVED,Args:(0,e.__spreadArray)([],this.Ln),When:t}),this.Ln=[]),this.Nn.length>0){for(var f=0,v=this.Nn;f0&&this.Un.push(es(l))}this.Nn=[]}return i},t.prototype.recordingIsDetached=function(){return!!this.Wn&&this.Wn!=this.Dn.document},t.prototype.$n=function(t,n){if(!this.Kn&&this.Wn){window;var i=this.Xt.allWatchedElements(this.Wn);this.Zn(i,t,n,null,this.Wn,null),this.Jt.nodeChanged(this.Wn),this.qn&&this.Xn(this.Wn),this.Kn=!0,this.Yn(),window}},t.prototype.Yn=function(){var t=this;this.zn=mt(Element.prototype,"attachShadow",!0),this.zn&&this.zn.before(function(n){n.that.shadowRoot||t.Rn.push(n.that)})},t.prototype.Xn=function(t){var n;try{null===(n=this.qn)||void 0===n||n.observe(t,{childList:!0,attributes:!0,characterData:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}catch(t){}},t.prototype.Gn=function(t,n,i,r){for(var e,s,o,u,a=this,c={},h={},f=function(i){if(Ui(i)){a.ti(t,n,Ui(i));var r=Ui(i.parentNode);r&&(h[r.id]=r.node)}},v=0;v0)for(var m=0;m0){h[g]=l.target;var y=!(null==(T=l.target)?void 0:T.shadowRoot)||Ie(T.shadowRoot)?null:Ui(T.shadowRoot);y&&(h[y.id]=y.node)}break;case"characterData":Hi(l.target)||l.oldValue!=l.target.textContent&&(r[g]=ie(l.target));break;case"attributes":var b=ki(j=l.target);if("link"===b&&"rel"===l.attributeName&&ee.test(null!==(o=l.oldValue)&&void 0!==o?o:"")){f(j);break}var E,S=Li(j),x=this.Xt.isWatched(j);if($e(x)>$e(S)){f(j);break}De.needsToObserve(S,x)&&(this.Jt.observe(j),(null==x?void 0:x.has(_i.Watch))&&(null===(u=this.Zt)||void 0===u||u.observe(j)),(E=Ui(j))&&(E.watchKind=De.combineKindsPreservePrivacy(S,x)));var k=(void 0===(I=l.attributeNamespace)&&(I=""),(null===I?"":{"http://www.w3.org/1999/xlink":"xlink:","http://www.w3.org/XML/1998/namespace":"xml:","http://www.w3.org/2000/xmlns/":"xmlns:"}[I]||"")+(l.attributeName||"")),_=re(k);if("dialog"===b&&"open"===k)break;if(j.hasAttribute(k)){var A=l.target.getAttribute(k);l.oldValue!=A&&(A=oe(l.target,_,A||"",b),this.Mn(b,l.target,((e={})[_]=A||"",e)),null!==A&&(i[g+"\t"+_]=A))}else i[g+"\t"+_]=null;}}catch(t){}for(var I,T,C=0,P=this.Hn;C0&&i.push({Kind:Ot.MUT_SHADOW,Args:[s,u],When:n},{Kind:Ot.TIMING,Args:[[Nt.Internal,Kt.Serialization,Ht.NodeEncoding,n,a]],When:n})},t.prototype.Zn=function(t,n,i,r,e,s){var o=Di(r)||-1,u=Di(s)||-1,a=-1===o&&-1===u,c=p();window;var h=this.ei(t,r,e,s);window;var f=p()-c;h.length>0&&i.push({Kind:Ot.MUT_INSERT,Args:[o,u,h],When:n},{Kind:Ot.TIMING,Args:[[Nt.Internal,Kt.Serialization,a?Ht.DomSnapshot:Ht.NodeEncoding,n,f]],When:n})},t.prototype.ei=function(t,n,i,r){var e=this;if(n&&Hi(n))return[];for(var s=[],o=this.Bn.tokenizeNode(t,n,r,i,function(t){if(1==t.nodeType){var n=t;if(n.shadowRoot&&e.Xn(n.shadowRoot),"SLOT"===t.nodeName){var i=Ui(t);(null==i?void 0:i.shadowRootType)===Te&&t.addEventListener("slotchange",Tt.wrap(function(n){var i;e.Hn.push(null!==(i=n.target)&&void 0!==i?i:t)}))}}e.jn(t,s)},this.Mn,function(t,n){switch(n){case Ai.Immediate:e.refreshElement(t);break;case Ai.Deferred:e.Nn.push(t);}}),u=0,a=s;u0){var e=n[n.length-1];if(e.Kind==Ot.MUT_REMOVE)return void e.Args.push(r)}n.push({Kind:Ot.MUT_REMOVE,Args:[r],When:t})},t.prototype.setUpIEWorkarounds=function(){var n=this;if(mr){var i=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"),r=i&&i.set;if(!i||!r)throw new Error("Missing textContent setter -- not safe to record mutations.");Object.defineProperty(Element.prototype,"textContent",(0,e.__assign)((0,e.__assign)({},i),{set:function(t){try{for(var n=void 0;n=this.firstChild;)this.removeChild(n);if(null===t||""==t)return;var i=(this.ownerDocument||document).createTextNode(t);this.appendChild(i)}catch(n){r&&r.call(this,t)}}}))}this.si=new tr(t.ThrottleMax,t.ThrottleInterval,function(){return new Yi(function(){n.Fn=!0,n.tearDownIEWorkarounds()}).start()});var s=this.si.guard(function(t){var n=t.cssText;t.cssText=n});this.si.open(),this.oi=mt(CSSStyleDeclaration.prototype,"setProperty"),this.oi&&this.oi.afterSync(function(t){s(t.that)}),this.ui=mt(CSSStyleDeclaration.prototype,"removeProperty"),this.ui&&this.ui.afterSync(function(t){s(t.that)})},t.prototype.tearDownIEWorkarounds=function(){this.si&&this.si.close(),this.oi&&this.oi.disable(),this.ui&&this.ui.disable()},t.prototype.updateConsent=function(){var t=this;this.Wn&&Pe(this.Wn,function(n){return t.refreshElement(n)})},t.prototype.refreshElement=function(t){Di(t)&&this.Hn.push(t)},t.ThrottleMax=1024,t.ThrottleInterval=1e4,t}();function os(t){for(var n=new WeakMap,i=t;i;i=i.parentNode){if(n.has(i))return null;if(n.set(i,!0),11===i.nodeType)break}if(!i)return null;var r=Ui(i);return(null==r?void 0:r.shadowRootType)===Te&&(null==r?void 0:r.parent)?[r.parent.id,r.parent.node]:null}var us="navigation",as="resource",cs="paint",hs="measure",fs="mark",vs="layout-shift",ls="first-input",ds="largest-contentful-paint",ps="longtask",ws=function(){function t(t,n,i,r){var e=this;this._t=t,this.At=n,this.ai=r,this.ci=!1,this.hi=!1,this.fi=!1,this.vi=!1,this.li=!1,this.di=!1,this.pi=!1,this.wi=cn.DefaultOrgSettings.MaxPerfMarksPerPage,this.gi=0,this.mi=!1,this.yi=!1,this.bi=!1,this.Ei=!1,this.Si=0,this.xi=!1,this.qn=null,this.ki=[],this._i=new Yn(function(t){e.Ai=function(){t({timeRemaining:function(){return Number.POSITIVE_INFINITY},didTimeout:!1}),e.Ai=void 0}}),this.Ii=!1;var s=window.performance;s&&(this.fi=!0,s.timing&&(this.vi=!0),s.memory&&(this.di=!0),s.timeOrigin&&(this.pi=!0),"function"==typeof s.getEntries&&(this.li=!0),this.mi=gs(window,vs),this.yi=gs(window,ls),this.bi=gs(window,ds),this.Ei=gs(window,ps),this.T=i.createChild())}return t.prototype.initialize=function(t){var n=t.resourceUploader,i=t.recTimings,r=t.recImgs,e=t.maxPerfMarksPerPage;this.Ti=n,this.hi=i,this.ci=r,this.wi=e||cn.DefaultOrgSettings.MaxPerfMarksPerPage},t.prototype.start=function(){var t=this;this.gi=0;var n=window.performance;n&&(this._t.recording.inFrame||this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Performance,this.vi,zt.PerformanceEntries,this.li,zt.PerformanceMemory,this.di,zt.PerformanceObserver,!!window.PerformanceObserver,zt.PerformanceTimeOrigin,this.pi,zt.LayoutShift,this.mi,zt.FirstInput,this.yi,zt.LargestContentfulPaint,this.bi,zt.LongTask,this.Ei]}),this.Xn(),!this.qn&&n.addEventListener&&n.removeEventListener&&this.T&&this.T.add(n,"resourcetimingbufferfull",!0,function(){t.At.enqueue({Kind:Ot.RESOURCE_TIMING_BUFFER_FULL,Args:[]})}),this.Ci(),this.Pi())},t.prototype.ji=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(t){switch(t.label){case 0:if(!this.fi||!this.li||0==this.ki.length)return[2];if(this.Ii)return[2];this.Ii=!0,t.label=1;case 1:return t.trys.push([1,,3,4]),[4,this.Oi()];case 2:return t.sent(),[3,4];case 3:return this.Ii=!1,this.ki=[],[7];case 4:return[2];}})})},t.prototype.Mi=function(){return this.Ai?Yn.race([this._i,si(250,1e3)]):this._i},t.prototype.Oi=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t,n,i,r,s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t=0,n=0,i=this.ki,e.label=1;case 1:if(!(nt?[4,this.Mi()]:[3,4]):[3,6];case 3:a=e.sent(),t=p()+Math.max(a.timeRemaining(),15),e.label=4;case 4:this.Ki(u),e.label=5;case 5:return s++,[3,2];case 6:return n++,[3,1];case 7:return[2];}})})},t.prototype.onLoad=function(){this.xi||(this.xi=!0,this.vi&&(this.Ri(performance.timing),this.ji()))},t.prototype.tick=function(){this.Ci()},t.prototype.stop=function(){var t;this.T&&this.T.clear(),this.Ti=void 0;var n=[];this.qn?(this.qn.takeRecords&&(n=this.qn.takeRecords()),this.qn.disconnect()):window.performance&&window.performance.getEntries&&(n=window.performance.getEntries()),n.length>300&&(n=n.slice(0,300),this.At.enqueue({Kind:Ot.RESOURCE_TIMING_BUFFER_FULL,Args:[]})),this.Ci(),null===(t=this.Ai)||void 0===t||t.call(this),this.ki.push(n),this.ji()},t.prototype.Xn=function(){var t=this;if(!this.qn&&this.li&&window.PerformanceObserver){this.ki.push(performance.getEntries()),this.ji(),this.qn=new window.PerformanceObserver(function(n){var i=n.getEntries();t.ki.push(i),t.ji()});var n=[us,as,hs,fs];window.PerformancePaintTiming&&n.push(cs),this.mi&&n.push(vs),this.yi&&n.push(ls),this.bi&&n.push(ds),this.Ei&&n.push(ps),this.qn.observe({entryTypes:n})}},t.prototype.Ci=function(){if(this.di&&!this._t.recording.inFrame){var t=performance.memory;if(t){var n=t.usedJSHeapSize-this.Si;(0==this.Si||o.mathAbs(n/this.Si)>.2)&&(this.Hi(Qt.Memory,t,Vt.Memory),this.Si=t.usedJSHeapSize)}}},t.prototype.Pi=function(){var t={timeOrigin:d.timeOrigin};this.Hi(Qt.TimeOrigin,t,Vt.TimeOrigin)},t.prototype.Ki=function(t){switch(t.entryType){case us:this.Ni(t);break;case as:this.Li(t);break;case cs:this.Ui(t);break;case hs:this.Fi(t);break;case fs:this.Di(t);break;case vs:this.Bi(t);break;case ls:this.Wi(t);break;case ds:this.qi(t);break;case ps:this.Qi(t);}},t.prototype.Ri=function(t){this.Hi(Qt.Timing,t,Vt.Timing)},t.prototype.Ni=function(t){this.Hi(Qt.Navigation,t,Vt.Navigation,{name:us})},t.prototype.Li=function(t){if(this.hi){var n=t.initiatorType;(this.ci||"img"!==n&&"image"!==n)&&this.Hi(Qt.Resource,t,Vt.Resource,{name:n})}},t.prototype.Ui=function(t){this.Hi(Qt.Paint,t,Vt.Measure)},t.prototype.Di=function(t){this.Hi(Qt.Mark,t,Vt.Measure)},t.prototype.Fi=function(t){this.Hi(Qt.Measure,t,Vt.Measure)},t.prototype.Bi=function(t){this.Hi(Qt.LayoutShift,t,Vt.LayoutShift)},t.prototype.Wi=function(t){this.Hi(Qt.FirstInput,t,Vt.FirstInput)},t.prototype.qi=function(t){this.Hi(Qt.LargestContentfulPaint,t,Vt.LargestContentfulPaint)},t.prototype.Qi=function(t){this.Hi(Qt.LongTask,t,Vt.Measure)},t.prototype.Hi=function(t,n,i,r){if(void 0===r&&(r={}),!this.atLimit(t)){for(var e=[t],s=0,o=i;s=this.wi)return!0;this.gi++;}return!1},t}();function gs(t,n){var i,r;return(null!==(r=null===(i=t.PerformanceObserver)||void 0===i?void 0:i.supportedEntryTypes)&&void 0!==r?r:[]).indexOf(n)>-1}function ms(t){var n=0,i={id:n++,edges:{}};return t.split("\n").forEach(function(t){var r=t.trim();if(""!=r){if(0==r.indexOf("/")||r.lastIndexOf("/")==r.length-1)throw new Error("Leading and trailing slashes are not supported");var e=i,s=r.split("/");s.forEach(function(t,i){var r=t.trim();if(""===r)throw new Error("Empty elements are not allowed");if("**"!=r&&"*"!=r&&-1!=r.indexOf("*"))throw new Error("Embedded wildcards are not supported");var o=null;r in e.edges&&(o=e.edges[r]),o||(o={id:n++,edges:{}},e.edges[r]=o),i==s.length-1&&(o.term=!0),e=o})}}),i}var ys=ms("**");function bs(t,n,i){if(!js(i)){try{for(var r=[],e=0,s=i;e=n&&(v?e=void 0:(e="_fs_trimmed_values",v=!0)),f[f.length-1]--,e&&e!==cn.BlockedFieldValue&&s?f.push(o.objectKeys(e).length):c.pop();f[f.length-1]<=0;)f.pop(),c.pop();for(var u=0,a=r;u0&&l!==f.length-1)throw new Error("Property matcher depth out of sync")}return e})}catch(t){Tt.sendToBugsnag(t,"error")}return"[error serializing "+t.constructor.name+"]"}}var Es=function(){function t(t){this.zi=1;var n=[t];t.edges["**"]&&n.push(t.edges["**"]),this.$i=[n]}return t.prototype.Gi=function(){if(this.$i.length<=0)return[];var t=this.$i.length-1,n=this.$i[t];return"number"==typeof n?this.$i[t-1]:n},t.prototype.depth=function(){return this.zi},t.prototype.isRedacted=function(t){var n=this.Gi();return 0===n.length||t&&!n.some(function(t){return t.term})},t.prototype.push=function(t){var n;this.zi++;var i=this.Gi(),r=[];function e(n){n.edges["**"]&&(r.push(n.edges["**"],Ss(n)),e(n.edges["**"])),n.edges["*"]&&r.push(n.edges["*"]),n.edges[t]&&r.push(n.edges[t])}for(var s=0,o=i;s0&&this.zi--;var t=this.$i[this.$i.length-1];"number"==typeof t&&t>1?this.$i[this.$i.length-1]--:this.$i.pop()},t}();function Ss(t){var n=t.edges["**"];if(!n)throw new Error("Node must have double-wildcard edge.");return ot(t.edges,1)?{id:-n.id,edges:{"**":n}}:t}var xs,ks,_s,As=function(){function t(t){this.Xi=t,this.Ji=null}return t.prototype.disable=function(){this.Ji&&(this.Ji.disable(),this.Ji=null)},t.prototype.enable=function(t){var n,i=this,r=T(t),s=null===(n=null==r?void 0:r._w)||void 0===n?void 0:n.fetch;(s||t.fetch)&&(this.Ji=mt(s?r._w:t,"fetch"),this.Ji&&this.Ji.afterSync(function(t){var n=t.result;t.result=(0,e.__awaiter)(i,void 0,void 0,function(){return(0,e.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.Zi(n,t.args[0],t.args[1])];case 1:case 2:return i.sent(),[3,3];case 3:return[2,n];}})})}))},t.prototype.Zi=function(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u,a,c;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return r="GET",s="",a=!1,"string"==typeof n?s=n:"url"in n?(s=n.url,r=n.method,o=n.body,u=n.headers,a=!!n.signal):s=""+n,s?(i&&(r=i.method||r,u=Ds(i.headers),o=i.body||o,a=!!i.signal||a),c=this.Yi(t),a&&s.search(/\/(graphql|gql)/i)>-1?[4,Yn.race([c,ni(5e3)])]:[3,2]):[2];case 1:e.sent(),e.label=2;case 2:return this.Xi.startRequest(r,s,{body:function(){return o},headers:u},c),[2];}})})},t.prototype.Yi=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i,r,s;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return[4,t];case 1:if(n=e.sent(),i=n.headers,r=(i.get("content-type")||"default").split(";")[0],!(["default","text/plain","text/json","application/json"].indexOf(r)>-1))return[2,{status:n.status,data:{headers:i,body:null}}];s=null,e.label=2;case 2:return e.trys.push([2,4,,5]),[4,n.clone().text()];case 3:return s=e.sent(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,{status:n.status,data:{headers:i,body:s}}];}})})},t}(),Is=function(){function t(t){this.Xi=t,this.tr=new WeakMap}return t.prototype.disable=function(){this.nr&&(this.nr.disable(),this.nr=null),this.ir&&(this.ir.disable(),this.ir=null),this.rr&&(this.rr.disable(),this.rr=null)},t.prototype.er=function(t){var n=this.tr.get(t);if(n)return n;var i={};return this.tr.set(t,i),i},t.prototype.enable=function(t){var n,i,r,s,o=this,u=T(t),a=(null===(n=null==u?void 0:u._w)||void 0===n?void 0:n.XMLHttpRequest)||t.XMLHttpRequest;if(a){var c=a.prototype;this.nr=null===(i=mt(c,"open"))||void 0===i?void 0:i.before(function(t){var n=o.er(t.that);n.method=t.args[0],n.url=t.args[1]}),this.rr=null===(r=mt(c,"setRequestHeader"))||void 0===r?void 0:r.before(function(t){var n=t.that,i=t.args[0],r=t.args[1],e=o.er(n);e.headers||(e.headers=[]),e.headers.push([i,r])}),this.ir=null===(s=mt(c,"send"))||void 0===s?void 0:s.before(function(t){var n=t.that,i=t.args[0],r=o.er(n),s=r.url,u=r.method,a=r.headers;void 0!==s&&void 0!==u&&(o.tr["delete"](n),o.Xi.startRequest(u,s,{headers:Ds(a),body:i},function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n;return(0,e.__generator)(this,function(i){switch(i.label){case 0:return[4,new Yn(function(n){t.addEventListener("readystatechange",function(){t.readyState===XMLHttpRequest.DONE&&n()}),t.addEventListener("load",n),t.addEventListener("error",n)})];case 1:return i.sent(),n=function(t){if(t)return{forEach:function(n){for(var i,r=/([^:]*):\s+(.*)(?:\r\n|$)/g;i=r.exec(t);)n(i[2],i[1])}}}(t.getAllResponseHeaders()),[2,{status:t.status,data:{headers:n,body:function(){return"text"===t.responseType?t.responseText:t.response}}}];}})})}(n)))})}},t}(),Ts=/^data:/i,Cs=function(){function t(t,n){this._t=t,this.At=n,this.sr=!1,this.ur=new Ps(t,n),this.ar=new Is(this.ur),this.cr=new As(this.ur)}return t.prototype.isEnabled=function(){return this.sr},t.prototype.start=function(t){t.AjaxWatcher&&(this.sr||(this.sr=!0,this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Ajax,!0]}),this.ar.enable(this._t.window),this.cr.enable(this._t.window)))},t.prototype.stop=function(){this.sr&&(this.sr=!1,this.ar.disable(),this.cr.disable())},t.prototype.tick=function(){this.ur.tick()},t.prototype.setWatches=function(t){this.ur.setWatches(t)},t.prototype.initialize=function(t){this.ur.initialize(t)},t}(),Ps=function(){function t(t,n){this._t=t,this.At=n,this.hr=[],this.vr={},this.lr={},this.dr=[],this.pr=0;var i=cn.DefaultOrgSettings;this.initialize({requests:i.HttpRequestHeadersAllowlist,responses:i.HttpResponseHeadersAllowlist,maxAjaxPayloadLength:i.MaxAjaxPayloadLength})}return t.prototype.wr=function(t){for(var n=!1,i=!1,r=[],e=[],s=0,o=this.hr;s-1}function Os(t,n,i){return[t.length,Ns(t,n,i)]}function Ms(t,n,i){var r=void 0;return js(n)||(r=bs(t,i,n)),[Hs(t),r]}function Ks(t,n){var i=t.byteLength,r=void 0;return js(n)||(r="[ArrayBuffer]"),[i,r]}function Rs(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:if(s=(r=t).size,js(n))return[2,[s,void 0]];switch(r.type){case"application/json":case"application/vnd.api+json":case"text/plain":return[3,1];}return[3,4];case 1:return e.trys.push([1,3,,4]),[4,r.text()["catch"](function(t){Tt.sendToBugsnag(t,"warning")})];case 2:return(o=e.sent())&&(u=Ns(o,n,i))?[2,[s,u]]:[3,4];case 3:return a=e.sent(),Tt.sendToBugsnag(a,"warning"),[3,4];case 4:return[2,[s,"[Blob]"]];}})})}function Hs(t){try{return o.jsonStringify(t).length}catch(t){}return 0}function Ns(t,n,i){if(!js(n))try{return bs(o.jsonParse(t),i,n)}catch(r){return n.length>0&&n.every(function(t){return!0===t})?t.slice(0,i):void 0}}function Ls(t,n){switch(t){default:case Zt.Elide:return!1;case Zt.Record:return!0;case Zt.Allowlist:try{return ms(n)}catch(t){return!1}}}function Us(t,n,i,r){var s;return(0,e.__awaiter)(this,void 0,Yn,function(){var o,u,a,c,h,f,v;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return o="",null===(s=r.headers)||void 0===s||s.forEach(function(n,i){var r=i.toLowerCase(),e=t[r];o+=r+(e?": "+n:"")+"\r\n"}),"function"!=typeof(u=null==r?void 0:r.body)?[3,2]:[4,u()];case 1:return a=e.sent(),[3,3];case 2:a=u,e.label=3;case 3:return[4,Fs(n,a,i)];case 4:return c=e.sent(),h=c[0],f=c[1],v=0!==h||f?qt.NotEmpty:qt.Unknown,[2,{headers:o,text:f,size:h,legibility:v}];}})})}function Fs(t,n,i){return void 0===i&&(i=cn.DefaultOrgSettings.MaxAjaxPayloadLength),(0,e.__awaiter)(this,void 0,Yn,function(){var r;return(0,e.__generator)(this,function(e){if(null==n)return[2,[0,void 0]];switch(typeof n){default:return[2,[-1,js(t)?void 0:"[unknown]"]];case"string":return[2,Os(n,t,i)];case"object":switch(r=n.constructor){case Object:default:return[2,Ms(n,t,i)];case Blob:return[2,Rs(n,t,i)];case ArrayBuffer:return[2,Ks(n,t)];case Document:case FormData:case URLSearchParams:case ReadableStream:return[2,[-1,js(t)?void 0:""+r.name]];}}return[2]})})}function Ds(t){return t?tt(t)?{forEach:function(n){for(var i=0,r=t;i-1){if(n.unshift(e),r instanceof CSSStyleSheet)break;i=r}else Tt.sendToBugsnag("Could not find intermediate rule in parent","warning")}return n},t.prototype.Wr=function(t,n){for(var i=0;i=t?(this.oe-=t,[!0,0]):[!1,(t-this.oe)/this.ne]},t}())(2,2e5),ho=new Set(["measureText","getImageData","getError","getTransform","isContextLost","isEnabled","isFramebuffer","isProgram","isRenderbuffer","isShader","isTexture"]),fo=new Set(["fillText"]),vo=function(){function t(t,n,i,r){this.At=n,this.Ti=i,this.ai=r,this.ue=dn.CaptureCanvasOps,this.ae=[],this.ce=[],this.he=new WeakMap,this.fe=new WeakMap,this.ve=new Set,this.le=0,this.de=new WeakMap,this.pe=!1,this.we=new WeakMap,this.ge=new Set,this.me=new WeakMap,this.ye=1,this.be=new WeakMap,this.Ee=1,this.Se=0,this.xe=!1}return t.prototype.start=function(t){var n,i=this;if(t.CanvasWatcherMode&&(this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.CanvasWatcherEnabled,!0]}),this.pe=!0,this.ue=null!==(n=t.CanvasWatcherMode)&&void 0!==n?n:dn.CaptureCanvasOps,this.Ji("2d",CanvasRenderingContext2D),this.Ji("webgl",WebGLRenderingContext),this.ue===dn.ScreenshotCanvas)){if(!HTMLCanvasElement.prototype.toDataURL)return;this.le=setInterval(function(){return i.screenshotConnectedCanvases()},1e3)}},t.prototype.ke=function(t,n){return"object"!=typeof n?[void 0,0]:(this.be.has(n)||this.be.set(n,[t,this.Ee++]),this.be.get(n))},t.prototype.Ji=function(t,n){var i=this;if(n)for(var r=n.prototype,e=function(e){if(ho.has(e))return"continue";var o=Object.getOwnPropertyDescriptor(r,e);if("function"==typeof(null==o?void 0:o.value)){var u=mt(r,e);u&&(u.afterSync(function(n){return i._e(t,e,n.that,n.args,n.result)}),s.ae.push(u))}else"function"==typeof(null==o?void 0:o.set)&&s.ce.push(yt(n,e,s.Ae(t,e)))},s=this,o=0,u=Object.keys(r);o0){var o=n;if(!o){var u=t instanceof HTMLCanvasElement?Ui(t):void 0,a=t instanceof HTMLCanvasElement&&St(t);o=null!==(r=null==u?void 0:u.mask)&&void 0!==r?r:a}this.Pe(t,e,s,o)}return e}},t.prototype.je=function(t,n,i,r,e,s,o){var u;switch(typeof r){case"string":return e?Ci(r):r;case"number":case"boolean":case"bigint":return r;case"undefined":return{undef:!0};case"object":if(!r)return r;try{o.set(r,!0)}catch(t){}var a=null===(u=Object.getPrototypeOf(r))||void 0===u?void 0:u.constructor,c=(null==a?void 0:a.name)||function(t){var n;if(t){var i=t.toString(),r=po.exec(i);return r||(r=wo.exec(i)),null===(n=null==r?void 0:r[1])||void 0===n?void 0:n.trim()}}(a),h={ctor:c};if(r instanceof Node&&(l=Di(r)))return h.id=l,h;switch(c){case"Array":return this.Se+=r.length,this.Oe(t,n,i,r,e,s,o);case"CanvasGradient":return h;case"HTMLImageElement":var f=he(r.src,{source:"dom",type:"canvas"});return this.ai.record(f),h.src=f,h;case"HTMLCanvasElement":var v=r,l=this.flush(v,e);return h.srcId=l,h;}if(function(t){var n;return!!(null===(n=Object.prototype.toString.call(t))||void 0===n?void 0:n.match(lo))}(r))return this.be.has(r)?this.Me(r,h,e):(h.typedArray="["+r.toString()+"]",this.Se+=r.length,h);if("object"==typeof r&&this.be.has(r))return this.Me(r,h,e);if(r instanceof WebGLBuffer||r instanceof WebGLTexture){var d=void 0;switch(s){case"bindTexture":d=this.Ke(t,"createTexture",n,i,r);break;case"bindBuffer":d=this.Ke(t,"createBuffer",n,i,r);}if(void 0!==d)return this.Me(r,h,e)}var p=r;for(var w in h.obj={},p){try{switch(typeof p[w]){case"function":continue;case"object":if(p[w]&&o.has(p[w]))continue;}}catch(t){continue}++this.Se,h.obj[w]=this.je(t,n,i,p[w],e,s,o)}return h;default:return null;}},t.prototype.Me=function(t,n,i){var r=this.be.get(t),e=r[0],s=r[1];return this.flush(e,i),n.ref=s,delete n.ctor,n},t.prototype.Ke=function(t,n,i,r,e){var s=this.ke(i,e),o=(s[0],s[1]);return this.Re(r,[[t,ln.Function,n,[],o]]),o},t.prototype.Oe=function(t,n,i,r,e,s,o){var u=this;return void 0===o&&(o=new WeakMap),this.Se+=r.length+1,r.map(function(r){return u.je(t,n,i,r,e,s,o)})},t.prototype.Pe=function(t,n,i,r){var e=this;if(void 0===r&&(r=!1),!this.xe){var s=i.map(function(i){var s=i[0],o=i[1],u=i[2],a=i[3],c=i[4];return[s,o,u,e.Oe(s,t,n,a,r&&fo.has(u),u),c]});if(!this.he.has(t)&&(this.he.set(t,!0),i.some(function(t){return"2d"===t[0]}))){var o=this.He(t);if(o.length>0)return o.push.apply(o,s),void this.Re(n,o)}this.Re(n,s)}},t.prototype.Re=function(t,n){if(!this.xe){var i=co.hasCapacityFor(this.Se),r=i[0];i[1],this.Se=0,r?this.At.enqueue({Kind:Ot.CANVAS,Args:[t,n]}):this.xe=!0}},t.prototype.He=function(t){var n=t.getContext("2d");if(!n)return[];var i=[];if((n instanceof CanvasRenderingContext2D||n instanceof OffscreenCanvasRenderingContext2D)&&"function"==typeof n.getTransform){var r=n.getTransform();if(!r.isIdentity){var e=r.a,s=r.b,o=r.c,u=r.d,a=r.e,c=r.f;i.push(["2d",ln.Function,"transform",[e,s,o,u,a,c],-1])}}return i},t.prototype.Ne=function(t,n){t instanceof HTMLCanvasElement&&(this.ue===dn.ScreenshotCanvas?(this.fe.set(t,!0),this.ve.add(t)):(this.ge.add(t),this.Ie(t,n)))},t.prototype._e=function(t,n,i,r,e){for(var s=[],o=0;o))/m,mo=/^(eval@)?(\[native code\])?$/;function yo(t){if(!t||"string"!=typeof t.stack)return[];var n=t;return n.stack.match(go)?n.stack.split("\n").filter(function(t){return!!t.match(go)}).map(function(t){var n=t;n.indexOf("(eval ")>-1&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var i=n.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/\(native code\)/,"").split(/\s+/).slice(1),r=Eo(i.pop());return bo(i.join(" "),["eval",""].indexOf(r[0])>-1?"":r[0],r[1],r[2])}):n.stack.split("\n").filter(function(t){return!t.match(mo)}).map(function(t){var n=t;if(n.indexOf(" > eval")>-1&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===n.indexOf("@")&&-1===n.indexOf(":"))return[n,"",-1,-1];var i=n.split("@"),r=Eo(i.pop());return bo(i.join("@"),r[0],r[1],r[2])})}function bo(t,n,i,r){return[t||"",n||"",parseInt(i||"-1",10),parseInt(r||"-1",10)]}function Eo(t){if(!t||-1===t.indexOf(":"))return["","",""];var n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return n?[n[1]||"",n[2]||"",n[3]||""]:["","",""]}var So,xo,ko=["log","info","warn","error","debug","_fs_debug","assert","trace"],_o=ko.filter(function(t){return!/debug/.test(t)}),Ao=function(t,n,i){void 0===i&&(i=!0);var r=Qi(t,n);return i?be(r):r},Io=function(){function t(t,n,i){this.At=n,this.sr=!1,this.Fe=!1,this.De=0,this.Dt=[],this.Be=cn.DefaultOrgSettings.MaxConsoleLogPerPage,this.Dn=t.window,this.T=i.createChild()}return t.prototype.initializeMaxLogsPerPage=function(t){this.Be=t||cn.DefaultOrgSettings.MaxConsoleLogPerPage},t.prototype.We=function(){return"\"[received more than "+this.Be+" messages]\""},t.prototype.start=function(t){var n=this;if(t.ConsoleWatcher&&(this.T.add(this.Dn,"error",!0,function(t){return n.addError(t)}),this.T.add(this.Dn,"unhandledrejection",!0,function(t){n.addError({error:t.reason,message:"Uncaught (in promise)",filename:"",lineno:0,colno:0})},!0),!this.sr))if(this.sr=!0,this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Console,!0]}),this.Dn.console)for(var i=function(t){var i=mt(r.Dn.console,t);if(!i)return"continue";"assert"===t?i.before(function(i){var r=i.args;r[0]||n.qe(t,Array.prototype.slice.apply(r,[1]))}):i.before(function(i){var r=i.args;return n.qe(t,r)}),r.Dt.push(i)},r=this,e=0,s=_o;e5e5)return!1;var i=Ws(Bs(t));return!!i&&(!!("style"===ki(t)&&i.length>0&&Xs.test(n))||function(t){var n;try{if((null===(n=t.classList)||void 0===n?void 0:n.contains("fs-css-in-js"))||t.hasAttribute("data-fela-type")||t.hasAttribute("data-aphrodite"))return!0}catch(t){Tt.sendToBugsnag(t,"error")}return!1}(t))}(s)&&(null==n||n.push(function(){u.snapshotEl(s),"link"===ki(s)&&i.T.add(s,"load",!1,function(){u.snapshotEl(s)})}));break;case"CANVAS":this._t.measurer.requestMeasureTask(ii.Low,function(){return i.us[So.Canvas].flush(t)});break;default:t.nodeName&&"#"!==t.nodeName[0]&&t.nodeName.indexOf("-")>-1&&this.us[So.CustomElement].onCustomNodeVisited(t);}if("scrollLeft"in t&&"scrollTop"in t){var a=t;this._t.measurer.requestMeasureTask(ii.Low,function(){0==a.scrollLeft&&0==a.scrollTop||i.Ps(a)})}null==n||n.push(function(){i._t.measurer.requestMeasureTask(ii.Low,function(){i.us[So.Animation].snapshot(t)})})},t.prototype.On=function(t){var n,i=t.node,r=ki(t.node);if("iframe"===r)this.$e(t.node);else if("function"==typeof i.getElementsByTagName)for(var e=null!==(n=i.getElementsByTagName("iframe"))&&void 0!==n?n:[],s=0;s-1&&s.push(i.href),("img"===t||"source"===t)&&(e=i.srcset)&&null==e.match(/^\s*$/))for(var c=0,h=e.split(",");c0)return i[0]}}return t.target}function Mo(t){var n;return!!(null!==(n=t._fs_trust_event)&&void 0!==n&&n||t.isTrusted)}var Ko,Ro=function(){function t(t,n){this.Vr=t,this.Gs=n,this.Xs=[],this.Js=0}return t.prototype.add=function(t){this.Xs.length>0&&this.Xs[this.Xs.length-1].When===t.When&&this.Xs.pop(),0===this.Xs.length?(this.Vr.push(t),this.Js=t.When):t.When>this.Js&&(this.Js=t.When),this.Xs.push(t)},t.prototype.finish=function(t,n){void 0===n&&(n=[]);var i=this.Xs.length;if(i<=1)return!1;for(var r=[],s=this.Xs[0].When,o=this.Xs[i-1].When,u=o-s!=0?o-s:1,a=0;a0&&this.Zs--,Lo(this.Wn.prev)},t.prototype.shift=function(){return this.Zs>0&&this.Zs--,Lo(this.Wn.next)},t}();function No(t,n){var i=t.next;n.next=i,n.prev=t,t.next=i.prev=n}function Lo(t){var n=t.prev,i=t.next;return n.next=i,i.prev=n,t.value}!function(t){t[t.rageWindowMillis=2e3]="rageWindowMillis",t[t.defaultRageThreshold=5]="defaultRageThreshold",t[t.rageThresholdIfPageChanges=8]="rageThresholdIfPageChanges",t[t.thresholdChangeQuiescenceMillis=2e3]="thresholdChangeQuiescenceMillis"}(Ko||(Ko={}));var Uo=function(){function t(t,n){var i,r;void 0===n&&(n=w),this._t=t,this.Ys=n,this.no=new Ho,this.io=Ko.defaultRageThreshold,this.ro=-1,this.eo=new WeakMap;var e=t.recording.pageResponse();if(!e)throw new Error("Attempt to construct EasyBake before rec/page response is set.");for(var s=[".fs-ignore-rage-clicks",".fs-ignore-rage-clicks *"],o=0,u=null!==(r=null===(i=e.BehaviorSignalSettings)||void 0===i?void 0:i.ElementBlocks)&&void 0!==r?r:[];o-1&&(s.push(a.Selector),s.push(a.Selector+" *"))}var c=s.join(", ");Be(c)?this.so=[c]:this.so=s}return t.prototype.oo=function(t){var n=this.eo.get(t);if(void 0!==n)return n;for(var i=0,r=this.so;i=this.io){var a=this._t.recording.getCurrentSessionURL,c={eventStartTimeStamp:this.no.first(),eventEndTimeStamp:i,eventReplayUrlAtStart:a(),eventReplayUrlAtCurrentTime:a(!0)};this.dispatchRageClickEvent(r,c),this.io=Ko.defaultRageThreshold,this.no=new Ho}}}}}},t.prototype.dispatchRageClickEvent=function(t,n){var i,r="fullstory/rageclick";try{i=new CustomEvent(r,{detail:n,bubbles:!0,cancelable:!0})}catch(t){(i=document.createEvent("customevent")).initCustomEvent(r,!0,!0,n)}o.setWindowTimeout(window,Tt.wrap(function(){t.dispatchEvent(i)}),0)},t}(),Fo=function(){function t(t){this._t=t,this.uo=this._t.time.wallTime(),this.ao=!1}return t.prototype.getLastUserAcitivityTS=function(){return this.uo},t.prototype.getMsSinceLastUserAcivity=function(){return o.mathFloor(this._t.time.wallTime()-this.uo)},t.prototype.resetUserActivity=function(){this.uo=this._t.time.wallTime()},t.prototype.isHibernating=function(){return this.ao},t.prototype.setHibernating=function(){this.ao=!0},t}(),Do=function(){function t(t,n,i,r){void 0===r&&(r=Yi),this._t=t,this.co=n,this.At=i,this.ho=!1,this.fo=!1,this.vo=cn.HeartbeatInitial,this.lo=cn.PageInactivityTimeout,this.heartbeatTimeout=new r(this["do"].bind(this)),this.hibernationTimeout=new r(this.po.bind(this),this.lo)}return t.prototype.getUserActivityModel=function(){return this.co},t.prototype.manualHibernateCheck=function(){this.co.isHibernating()||this.co.getMsSinceLastUserAcivity()>=cn.PageInactivityTimeout+5e3&&this.po()},t.prototype.scanEvents=function(t){if(!this.ho){this.manualHibernateCheck();for(var n=!1,i=0,r=t;icn.HeartbeatMax&&(this.vo=cn.HeartbeatMax),this.heartbeatTimeout.start(this.vo)},t.prototype.po=function(){if(!this.co.isHibernating()){var t=!1;this.co.getMsSinceLastUserAcivity()<=2*cn.PageInactivityTimeout?this.At.enqueue({Kind:Ot.UNLOAD,Args:[Wt.Hibernation]}):t=!0;try{this.ho=!0,this.co.setHibernating(),this.shutdown(),this.At.onHibernate(t)}finally{this.ho=!1}}},t.prototype.wo=function(){this.fo||(this.fo=!0,this._t.recording.splitPage(Wt.Hibernation))},t}(),Bo=function(){function t(t,n,i,r,e,s){void 0===r&&(r=function(){return[]}),void 0===e&&(e=Zi),void 0===s&&(s=Yi),this._t=t,this.mo=n,this.yo=r,this.bo=e,this.Eo=0,this.So=[],this.xo=!1,this.ko=!1,this._o=0,this.Ao=-1,this.Io=!1,this.Qt=[],this.To=new this.bo(cn.CurveSamplingInterval),this.Co=new this.bo(cn.MutationProcessingInterval),i&&(this.Po=new Do(this._t,i,this,s))}return t.prototype.startPipeline=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r=this;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return this.ko||this.xo?[2]:(this.xo=!0,t.frameId&&(this.Eo=t.frameId),t.parentIds&&(this.So=t.parentIds),i=!0,[4,ei()]);case 1:return e.sent(),this.processEvents(),[4,ei()];case 2:return e.sent(),window,this.Co.start(function(){window,r.processEvents(),window}),this.To.start(function(){window,r.processEvents(i),window}),null===(n=this.Po)||void 0===n||n.start(),this.mo.startPipeline(t),window,[2];}})})},t.prototype.enableEasyBake=function(){this.jo=new Uo(this._t)},t.prototype.enqueueSimultaneousEventsIn=function(t){if(0===this._o){var n=this._t.time.now();this.Ao=n>this.Ao?n:this.Ao}try{return this._o++,t(this.Ao)}finally{this._o--,this._o<0&&(this._o=0)}},t.prototype.enqueue=function(t){var n=this._o>0?this.Ao:this._t.time.now();this.Oo(n,t),Ji.checkForBrokenSchedulers()},t.prototype.Oo=function(t,n){var i;if(!this.ko){var r=t;r0){var n=t;n.When=this.Qt[0].When,this.Qt.unshift(n)}else this.enqueue(t)},t.prototype.addUnload=function(t){this.Io||(this.Io=!0,this.enqueue({Kind:Ot.UNLOAD,Args:[t]}),this.singSwanSong(t))},t.prototype.shutdown=function(t){this.addUnload(t),this.Mo(),this.ko=!0,this.Ko()},t.prototype.Mo=function(){this.processEvents(),this.mo.flush()},t.prototype.singSwanSong=function(t){this.ko||(window,this.Mo(),t===Wt.Hidden&&this.Io||this.mo.singSwanSong(),window)},t.prototype.rebaseIframe=function(t,n){for(var i=Math.max(0,n),r=this._t.time.startTime(),e=function(n){var e=r+n-t;return e>=i?e:i},s=0,o=this.Qt;s0){var f=h[h.length-1].Args[2];f&&(h[0].Args[9]=f)}}for(var v in s)s[l=parseInt(v,10)].finish(Ot.SCROLL_LAYOUT_CURVE,[l]);for(var v in o)o[l=parseInt(v,10)].finish(Ot.SCROLL_VISUAL_OFFSET_CURVE,[l]);for(var v in e){var l;e[l=parseInt(v,10)].finish(Ot.TOUCHMOVE_CURVE,[l])}return n&&n.finish(Ot.RESIZE_VISUAL_CURVE),i}(n);t||(i=i.concat(this.yo())),this.Ro(i),this.sendEvents(this._t.recording.pageSignature(),i)}},t.prototype.sendEvents=function(t,n){var i;0!=n.length&&(null===(i=this.Po)||void 0===i||i.scanEvents(n),this.mo.enqueueEvents(t,n))},t.prototype.onHibernate=function(t){t||this.Mo(),this.mo.singSwanSong(),this.mo.stopPipeline()},t.prototype.Ro=function(t){if(this.Eo)for(var n=this.So,i=n&&n.length>0,r=0;r>>0).toString(16)).slice(-8);return t},t}();function qo(t){var n=new Wo(1);return n.writeAscii(t),n.sumAsHex()}function Qo(t){var n=new Uint8Array(t);return Vo(String.fromCharCode.apply(null,n))}function Vo(t){var n;return(null!==(n=window.btoa)&&void 0!==n?n:zo)(t).replace(/\+/g,"-").replace(/\//g,"_")}function zo(t){for(var n=String(t),i=[],r=0,e=0,s=0,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.charAt(0|s)||(o="=",s%1);i.push(o.charAt(63&r>>8-s%1*8))){if((e=n.charCodeAt(s+=3/4))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|e}return i.join("")}function $o(t,n,i,r){return void 0===r&&(r=new Wo),(0,e.__awaiter)(this,void 0,Yn,function(){var s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:s=t.now(),o=i.byteLength,u=0,e.label=1;case 1:return u25?[4,n(100)]:[3,3]:[3,5];case 2:e.sent(),s=t.now(),e.label=3;case 3:a=new Uint8Array(i,u,Math.min(o-u,1e4)),r.write(a),e.label=4;case 4:return u+=1e4,[3,1];case 5:return[2,{hash:r.sum(),hasher:r}];}})})}var Go=6e6,Xo="resource-uploader",Jo=function(){function t(t,n,i,r,e){void 0===r&&(r=window.FormData),void 0===e&&(e=Yi),this._t=t,this.At=n,this.Ho=i,this.No=r,this.Lo=e,this.pe={},this.Uo={},this.Fo=!1,this.Do=[]}return t.prototype.init=function(){this.No&&this.Bo()["catch"](function(t){Tt.sendToBugsnag(t,"error")})},t.prototype.Bo=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t,n,i,r,s,o,u,a,c,h,f,v,l,d,p,w,g,m,y,b,E,S,x,k,_;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t=this._t.options.orgId,e.label=1;case 1:return[4,this.Wo()];case 2:for(n=e.sent(),i={fsnv:{},sha1:{}},r={},s=0,o=n;sGo){var r=he(t,{source:"log",type:"bugsnag"});return Tt.sendToBugsnag("Size of blob resource exceeds limit","warning",{url:r,MaxResourceSizeBytes:Go}),void i(null)}(function(t){var n=ti(),i=n.resolve,r=n.promise,e=new FileReader;return e.readAsArrayBuffer(t),e.onload=function(){i(e.result)},e.onerror=function(t){Tt.sendToBugsnag(t,"error"),i(null)},r})(n).then(function(t){i(t?{buffer:t,blob:n,contentType:n.type}:null)})},e.send(),r)}function Yo(t,n){var i,r;return(0,e.__awaiter)(this,void 0,Yn,function(){var s;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return s=t.window,(null===(r=null===(i=s.crypto)||void 0===i?void 0:i.subtle)||void 0===r?void 0:r.digest)?[4,s.crypto.subtle.digest({name:"sha-1"},n)]:[3,2];case 1:return[2,{hash:Qo(e.sent()),algorithm:"sha1"}];case 2:return[4,$o(t.time,ni,n)];case 3:return[2,{hash:e.sent().hash,algorithm:"fsnv"}];}})})}var tu=/^data:([^;,]*)(;?charset=[^;]+)?(?:;base64)?$/i,nu="Could not parse data url",iu=function(t,n,i){this.name="ProtocolError",this.message=n,this.status=t,this.data=i};function ru(t){return t>=400&&502!==t||202==t||206==t}var eu=function(){function t(t){this.Vo=0,this.zo=t.options.scheme,this.$o=t.options.cdnHost,this._t=t}return t.prototype.page=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/page",vt(t))];case 1:return[2,pt(n.sent().text)];}})})},t.prototype.settings=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n;return(0,e.__generator)(this,function(i){return n=t.previewMode||t.fallback?vu(this._t):this.$o,[2,fu(this.zo,n,t)]})})},t.prototype.bundle=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return[4,ei()];case 1:return e.sent(),window,i=vt(t.bundle),this.Vo+=i.length,this.Vo,window,i.length>2e6?[4,ei()]:[3,3];case 2:e.sent(),e.label=3;case 3:return window,r=ou(t.bundle.Seq,t),[4,uu(this.zo,null!==(n=t.recHost)&&void 0!==n?n:vu(this._t),r,i)];case 4:return s=e.sent().text,o=pt(s),window,[2,[this.Vo,o]];}})})},t.prototype.bundleBeacon=function(t){var n;return hu(this.zo,null!==(n=t.recHost)&&void 0!==n?n:vu(this._t),t)},t.prototype.exponentialBackoffMs=function(t,n){var i=o.mathMin(cn.BackoffMax,5e3*o.mathPow(2,t));return n?i+.25*o.mathRandom()*i:i},t}(),su=function(){function t(t){this.zo=t.options.scheme,this._t=t}return t.prototype.uploadResource=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/uploadResource",t)];case 1:return[2,n.sent().text];}})})},t.prototype.queryResources=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/queryResources",vt(t))];case 1:return[2,pt(n.sent().text)];}})})},t}();function ou(t,n){var i="/rec/bundle"+("v2"===n.version?"/v2":"")+"?OrgId="+n.orgId+"&UserId="+n.userId+"&SessionId="+n.sessionId+"&PageId="+n.pageId+"&Seq="+t;return null!=n.serverPageStart&&(i+="&PageStart="+n.serverPageStart),null!=n.serverBundleTime&&(i+="&PrevBundleTime="+n.serverBundleTime),null!=n.lastUserActivity&&(i+="&LastActivity="+n.lastUserActivity),n.isNewSession&&(i+="&IsNewSession=true"),null!=n.deltaT&&(i+="&DeltaT="+n.deltaT),i}function uu(t,n,i,r){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(e){return[2,cu("POST",t,n,lu(i),!0,r)]})})}function au(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(r){return[2,cu("GET",t,n,lu(i),!1)]})})}function cu(t,n,i,r,s,o){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(e){return[2,new Yn(function(e,u){var a="//"+i+r,c=!1,h=new XMLHttpRequest,f=("withCredentials"in h);jt(f,"XHR missing CORS support"),f&&(h.onreadystatechange=function(){if(4==h.readyState){if(c)return;c=!0;try{var t={text:h.responseText};if(200==h.status)return void e(t);var n=void 0;try{n=pt(t.text)}catch(t){}u(new iu(h.status,t.text,n))}catch(t){Tt.sendToBugsnag(t,"error"),u(t)}}},h.open(t,n+a,!0),h.withCredentials=s,o&&"function"!=typeof o.append&&h.setRequestHeader("Content-Type","text/plain"),h.send(o))})]})})}function hu(t,n,i){if("function"==typeof navigator.sendBeacon){var r=t+"//"+n+ou(i.bundle.Seq,i)+"&SkipResponseBody=true",e=vt(i.bundle);try{return navigator.sendBeacon.bind(navigator)(r,e)}catch(t){}}return!1}function fu(t,n,i){var r;return(0,e.__awaiter)(this,void 0,Yn,function(){var s,o;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return s=null!==(r=i.version)&&void 0!==r?r:"v1",o=i.previewMode?"?previewMode=true":"",[4,au(t,n,"/s/settings/"+i.orgId+"/"+s+"/web"+o)];case 1:return[2,pt(e.sent().text)];}})})}function vu(t){var n,i=null===(n=t.recording.pageResponse())||void 0===n?void 0:n.GCLBSubdomain,r=t.options.recHost;return i&&K(r)?r.replace(/^rs\./,i+"."):r}function lu(t){if(!window.Zone)return t;var n="?";return t.indexOf(n)>-1&&(n="&"),""+t+n+"ngsw-bypass=true"}var du,pu=function(){function t(t,n,i){void 0===i&&(i=new wu),this._t=t,this.Vr=n,this.Go=i}return t.prototype.initialize=function(t){var n;if(t){this.Xo(t);var i=null===(n=this._t.window.location)||void 0===n?void 0:n.href;this.onNavigate(i)}},t.prototype.onNavigate=function(t){return!!this.Go.matches(t)&&(this.Vr.enqueue({Kind:Ot.KEEP_URL,Args:[this.Jo(t)]}),!0)},t.prototype.onClick=function(t){var n;return!!(null===(n=null==t?void 0:t.watchKind)||void 0===n?void 0:n.has(_i.Keep))&&(this.Vr.enqueue({Kind:Ot.KEEP_ELEMENT,Args:[t.id]}),!0)},t.prototype.urlMatches=function(t){return this.Go.matches(t)},t.prototype.Xo=function(t){this.Go.setRules(t)},t.prototype.Jo=function(t){return he(t,{source:"page",type:"base"})},t}(),wu=function(){function t(){this.Zo=null}return t.prototype.setRules=function(t){var n=t.map(function(t){return t.Regex}).filter(this.Yo);n.length>0&&(this.Zo=this.tu(n))},t.prototype.matches=function(t){return!!this.Zo&&this.Zo.test(t)},t.prototype.Yo=function(t){try{return new RegExp(t),!0}catch(n){return Tt.sendToBugsnag("Browser rejected UrlKeep.Regex","error",{expr:t,error:n.toString()}),!1}},t.prototype.tu=function(t){try{return new RegExp("("+t.join(")|(")+")","i")}catch(n){return Tt.sendToBugsnag("Browser rejected joining UrlKeep.Regexs","error",{exprs:t,error:n.toString()}),null}},t}(),gu=function(t){var n=(void 0===t?{}:t).wnd,i=void 0===n?window:n;!function(t,n,i,r,e,s,o,u){var a,c;function h(t){var n,i=[];function r(){n&&(i.forEach(function(t){var i;try{i=t[n[0]]&&t[n[0]](n[1])}catch(n){return void(t[3]&&t[3](n))}i&&i.then?i.then(t[2],t[3]):t[2]&&t[2](i)}),i.length=0)}function e(t){return function(i){n||(n=[t,i],r())}}return t(e(0),e(1)),{then:function(t,n){return h(function(e,s){i.push([t,n,e,s]),r()})}}}(!(i in t)||(t.console&&t.console.log&&t.console.log("FullStory namespace conflict. Please set window[\"_fs_namespace\"]."),0))&&(u=t[i]=function(){var t=function(t,i,r){function e(e,s){n(t,i,r,e,s)}var s=/Async$/;return s.test(t)?(t=t.replace(s,""),"function"==typeof Promise?new Promise(e):h(e)):n(t,i,r)};function n(n,i,r,e,s){return t._api?t._api(n,i,r,e,s):(t.q&&t.q.push([n,i,r,e,s]),null)}return t.q=[],t}(),function(){function t(){}function n(t,n,i){u("setProperties",{type:t,properties:n},i)}function i(t,i){n("user",t,i)}function r(t,n,r){i({uid:t},r),n&&i(n,r)}u.identify=r,u.setUserVars=i,u.identifyAccount=t,u.clearUserCookie=t,u.setVars=n,u.event=function(t,n,i){u("trackEvent",{name:t,properties:n},i)},u.anonymize=function(){r(!1)},u.shutdown=function(){u("shutdown")},u.restart=function(){u("restart")},u.log=function(t,n){u("log",{level:t,msg:n})},u.consent=function(t){u("setIdentity",{consent:!arguments.length||t})}}(),a="fetch",c="XMLHttpRequest",u._w={},u._w[c]=t[c],u._w[a]=t[a],t[a]&&(t[a]=function(){return u._w[a].apply(this,arguments)}),u._v="2.0.0")}(i,i.document,i._fs_namespace,0,0,i._fs_script)};function mu(t,n){if(t&&t.postMessage)try{t.postMessage(function(t){var n;return vt(((n={}).__fs=t,n))}(n),"*")}catch(t){Ut("postMessage",t)}}function yu(t){try{var n=pt(t);if("__fs"in n)return n.__fs}catch(t){}return[du.Unknown]}function bu(t,n,i,r){var e=W(t);if(!e)return!1;try{e.send(n,i,r)}catch(t){e.send(n,i)}return!0}!function(t){t.EndPreviewMode="EndPreviewMode",t.EvtBundle="EvtBundle",t.GreetFrame="GreetFrame",t.InitFrameMobile="InitFrameMobile",t.RequestFrameId="RequestFrameId",t.RestartFrame="RestartFrame",t.SetConsent="SetConsent",t.SetFrameId="SetFrameId",t.ShutdownFrame="ShutdownFrame",t.Unknown="Unknown"}(du||(du={}));var Eu=new RegExp(/^\s+$/),Su=/^fb\d{18}$/,xu=function(t){var n=t.frame,i=t.orgId,r=t.scheme,e=t.script,s=t.recHost,u=t.cdnHost,a=t.appHost,c=t.namespace,h=(t.desc,t.snippetVersion);try{if(function(t){return t.id==t.name&&Su.test(t.id)}(n))return Rt.BlocklistedFrame;if(function(t){return!(t.contentDocument&&t.contentWindow&&t.contentWindow.location)||function(t){return!!t.src&&"about:blank"!=t.src&&t.src.indexOf("javascript:")<0}(t)&&t.src!=t.contentWindow.location.href&&"loading"==t.contentDocument.readyState}(n))return Rt.PartiallyLoaded;var f=n.contentWindow,v=n.contentDocument;if(!f||!v)return Rt.MissingWindowOrDocument;if(!v.head)return Rt.MissingDocumentHead;if(!v.body||0===v.body.childNodes.length)return Rt.MissingBodyOrChildren;for(var l=!1,d=v.body.childNodes,p=0;p0&&(null!==(s=null===(e=null===(r=t.OrgSettings)||void 0===r?void 0:r.UrlPrivacyConfig)||void 0===e?void 0:e.length)&&void 0!==s?s:0)>0&&(null!==(a=null===(u=null===(o=t.OrgSettings)||void 0===o?void 0:o.AttributeBlocklist)||void 0===u?void 0:u.length)&&void 0!==a?a:0)>0;return c||Tt.sendToBugsnag("Invalid page response","error",{rsp:t}),c},t.prototype.handleResponse=function(t,n){var i,r,e,s,o=t.Flags,u=o.AjaxWatcher,a=o.ClientSideRageClick,c=o.GetCurrentSession,h=o.ResourceUploading,f=o.UseClientSideId;this.ku=t,this.Pu=t.UserIntId,this.ju=t.SessionIntId,this.Ou=t.PageIntId,this.Mu=t.PageStart,this.pu=c?_u.Enabled:_u.Disabled,this.cu=t.OrgSettings,pe(null!==(i=this.cu.UrlPrivacyConfig)&&void 0!==i?i:cn.DefaultOrgSettings.UrlPrivacyConfig,this.cu.MaxUrlLength);var v=null!==(r=this.cu.AttributeBlocklist)&&void 0!==r?r:[];(null===(s=null===(e=this._u)||void 0===e?void 0:e.privacy)||void 0===s?void 0:s.attributeBlocklist)&&(this._u.privacy.attributeBlocklist.length,v.push.apply(v,this._u.privacy.attributeBlocklist.map(Ae))),xe(v),this.yu.consoleWatcher().initializeMaxLogsPerPage(this.cu.MaxConsoleLogPerPage),this.yu.ajaxWatcher().initialize({requests:this.cu.HttpRequestHeadersAllowlist,responses:this.cu.HttpResponseHeadersAllowlist,maxAjaxPayloadLength:this.cu.MaxAjaxPayloadLength}),this.yu.perfWatcher().initialize({resourceUploader:this.yu.getResourceUploader(),recTimings:!!this.cu.RecordPerformanceResourceTiming,recImgs:!!this.cu.RecordPerformanceResourceImg,maxPerfMarksPerPage:this.cu.MaxPerfMarksPerPage}),this.Xt.initialize({canvasWatcherMode:t.Flags.CanvasWatcherMode,blocks:t.ElementBlocks,deferreds:t.ElementDeferreds,keeps:t.ElementKeeps,watches:t.ElementWatches}),this.Ve.initialize(t.UrlKeeps),this.Xt.initializeConsent(null!=n?n:!!t.Consented),"number"==typeof t.BundleUploadInterval&&(this.fu=t.BundleUploadInterval),h&&this.enableResourceUploading(),u&&t.AjaxWatches&&this.yu.ajaxWatcher().setWatches(t.AjaxWatches),a&&this.At.enableEasyBake(),f&&(this.hu=!0),this.yu.start(t.Flags)},t.prototype.fullyStarted=function(){this.Au&&this.Au()},t.prototype.enableResourceUploading=function(){this.wu=!0,this.yu.initResourceUploading()},t.prototype.flushPendingChildFrameInits=function(){if(this.du.length>0){for(var t=0;t0&&this.At.sendEvents(e,i);break;case du.RequestFrameId:if(!t)return;var s=this.Nu(t);void 0===s||(this.mu[s]=!1,this.Lu(t,s));case du.Unknown:}},t.prototype.Nu=function(t){for(var n=0,i=this.vu;n2e6))try{localStorage._fs_swan_song=i}catch(t){}},t.prototype.sing=function(){try{var t=this.purge();if(void 0===t)return;if(!(t.Bundles&&t.UserId&&t.SessionId&&t.PageId))return;t.OrgId||(t.OrgId=this.Uu.getOrgId()),t.Bundles.length>0&&(t.Bundles.length,this.Du(t))}catch(t){}},t.prototype.purge=function(){try{if("_fs_swan_song"in localStorage){var t=localStorage._fs_swan_song;return delete localStorage._fs_swan_song,pt(t)}}catch(t){}},t.prototype.Du=function(t,n){return void 0===n&&(n=0),(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o;return(0,e.__generator)(this,function(u){switch(u.label){case 0:if(i=null,!tt(t.Bundles)||0===t.Bundles.length||void 0===t.Bundles[0])return[2];1==t.Bundles.length&&(i=this._t.time.wallTime()-(t.LastBundleTime||0)),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.Ho.bundle({bundle:t.Bundles[0],deltaT:i,isNewSession:t.IsNewSession,orgId:t.OrgId,pageId:t.PageId,recHost:t.RecHost,serverBundleTime:t.ServerBundleTime,serverPageStart:t.ServerPageStart,sessionId:t.SessionId,userId:t.UserId,version:t.Version})];case 2:return r=u.sent(),s=r[1],t.Bundles[0].Evts.length,t.Bundles[0].Seq,t.Bundles.shift(),t.Bundles.length>0&&this.Du((0,e.__assign)((0,e.__assign)({},t),{ServerBundleTime:s.BundleTime})),[3,4];case 3:return(o=u.sent())instanceof iu&&ru(o.status)?[2]:(this.Bu=new this.Fu(this.Du,this.Ho.exponentialBackoffMs(n,!0),this,t,n+1).start(),[3,4]);case 4:return[2];}})})},t}(),ju=function(){function t(){}return t.prototype.encode=function(t){return t},t}(),Ou=function(){function t(){this.dict={idx:-1,map:{}},this.nodeCount=1,this.startIdx=0}return t.prototype.encode=function(n){if(0==n.length)return[];var i,r,e=n[0],s=Object.prototype.hasOwnProperty.call(this.dict.map,e)?this.dict.map[e]:void 0,o=[],u=1;function a(){s?u>1?o.push([s.idx,u]):o.push(s.idx):o.push(e)}for(i=1;ithis._t.recording.bundleUploadInterval()?[4,this.aa()]:[3,4]):[2];case 3:e.sent(),e.label=4;case 4:return[3,6];case 5:if((r=e.sent())instanceof iu){if(ru(r.status))return 206==r.status?Tt.sendToBugsnag("Failed to send bundle, probably because of its large size","error"):r.status>=500&&Tt.sendToBugsnag("Failed to send bundle, recording outage likely","error"),this.ea&&this.ea(),[2]}else Tt.sendToBugsnag("Failed to send bundle, unknown err","error",{err:r});return this.qu=!0,this.Vu=this.$u+this.Ho.exponentialBackoffMs(this.Qu++,!1),[3,6];case 6:return[2];}})})},t.prototype.va=function(t){var n,i;return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return this.Ou?(window,r=this.co.getMsSinceLastUserAcivity(),[4,this.Ho.bundle({bundle:t,deltaT:null,lastUserActivity:r,orgId:this.Uu.getOrgId(),pageId:this.Ou,serverBundleTime:this.Zu,serverPageStart:this.Mu,isNewSession:this.Gu,sessionId:null!==(n=this.Uu.getSessionId())&&void 0!==n?n:"",userId:this.Uu.getUserId(),version:this._t.recording.bundleApiVersion()})]):[2];case 1:return s=e.sent(),o=s[0],u=s[1],null===(i=this._t.recording.observer)||void 0===i||i.onBundleSent(o),o>this.Ju&&this.zu>16&&this._t.recording.splitPage(Wt.Size),window,[2,u];}})})},t.prototype.fa=function(t){if(0===t.Evts.length)return t;for(var n=[],i=0,r=t.Evts;i0},t.prototype.hasActiveEvents=function(){return this.da},t.prototype.pushEvent=function(t){Mu[t.Kind]||(this.da=!0),this.pa.When<0&&(this.pa.When=t.When),this.pa.Evts.push(t)},t}();function Hu(t,n){void 0===t&&(t=[]),void 0===n&&(n=0);for(var i="",r=0,e=t;r-1},t.prototype.ba=function(){return this.Dn.document.location.search.indexOf("_fs_preview=false")>-1},t.prototype.ya=function(){return!!this.wa.getValue(this.ga)},t}();function Uu(t){var n,i,r;return{Kind:Ot.CAPTURE_SOURCE,Args:[t.type,t.entrypoint,"dom",null===(i=null===(n=t.source)||void 0===n?void 0:n.integration)||void 0===i?void 0:i.slice(0,1024),!!(null===(r=t.source)||void 0===r?void 0:r.userInitiated)]}}function Fu(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i,r,s;return(0,e.__generator)(this,function(e){if(n=function(t){return"msCrypto"in t?t.msCrypto:t.crypto}(t),"function"==typeof(null==n?void 0:n.randomUUID))return[2,n.randomUUID()];for(i=new Uint8Array(16),n.getRandomValues(i),i[6]=15&i[6]|64,i[8]=63&i[8]|128,r=[],s=0;s=864e5)return Wu;var c=null!==(n=this.Sa.getLastUserActivityTimeMS())&&void 0!==n?n:u;return o.mathAbs(s-c)>=qu||(null!==(i=this.Sa.getPageCount())&&void 0!==i?i:0)>=250?Wu:e},t.prototype.start=function(){this.lastUserActivityTimeout.start(3e5)},t.prototype.stop=function(){this.lastUserActivityTimeout.stop()},t.prototype.ka=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t;return(0,e.__generator)(this,function(n){return(t=this.Sa.getUserId())&&Bu(t)?[2,t]:[2,Fu(this._t.window)]})})},t.prototype.xa=function(){var t=this.co.getLastUserAcitivityTS();t!==this.lastUserActivityTS&&(this.lastUserActivityTS=t,this.Sa.setLastUserActivityTimeMS(t),this.start())},t}(),Vu=function(t){function n(n,i,r,e,s,o,u){void 0===r&&(r=!0),void 0===e&&(e=new Fo(n)),void 0===s&&(s=new Ku(n,i,e,r)),void 0===o&&(o=Zi),void 0===u&&(u=xu);var a,c=t.call(this,n,o,e,s,u)||this;return c.Ho=i,c.mo=s,c._a=!1,c.ko=!1,c.Aa=!1,s.onShutdown(function(){return c.shutdown(Wt.SettingsBlocked)}),c.Mt=c.Dn.document,c.Eo=0,c.Uu=n.recording.identity,c.Ia=new Lu(c.xu,c.Dn,c.Uu.getClientStore()),c.pu=_u.NoInfoYet,c.Ta=new Qu(n,e,c.Uu),a=function(t){if(c.yu.stop(Wt.Api),t){var n=c.Mt.getElementById(t);n&&c.Ca&&n.setAttribute("_fs_embed_token",c.Ca)}},c.Dn._fs_shutdown=a,c}return(0,e.__extends)(n,t),n.prototype.onDomLoad=function(){var n=this;t.prototype.onDomLoad.call(this),this._a=!0,this.Pa(function(){n.fireFsReady(n.ko)})},n.prototype.ja=function(){var t=R(this.Dn,"_fs_replay_flags");if(/[?&]_fs_force_session=true(&|#|$)/.test(location.search)&&(t+=",forceSession",this.Dn.history)){var n=location.search.replace(/(^\?|&)_fs_force_session=true(&|$)/,function(t,n,i){return i?n:""});this.Dn.history.replaceState({},"",this.Dn.location.href.replace(location.search,n))}return t},n.prototype.start=function(n,i,r){var s,o,u;return(0,e.__awaiter)(this,void 0,Yn,function(){var a,c,h,f,v,l,d,p,w,g,m,y,b,E,S,x,k,_,A,I,T,C,P,j=this;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t.prototype.start.call(this,n,i,r),a=this.ja(),c=yi(this.Mt),h=c[0],f=c[1],O=this.Dn,M=0,K=0,v=null==O.screen?[M,K]:(M=parseInt(String(O.screen.width),10),K=parseInt(String(O.screen.height),10),[M=isNaN(M)?0:M,K=isNaN(K)?0:K]),l=v[0],d=v[1],p="",n||(p=this.Uu.getUserId()),w=null!==(u=null===(o=null===(s=this._t)||void 0===s?void 0:s.recording)||void 0===o?void 0:o.preroll)&&void 0!==u?u:-1,g=function(){return he(Mr(j.Dn),{source:"page",type:"base"})},m=function(){return he(j.Dn.location.href,{source:"page",type:"url"})},y=function(){return""===j.Mt.referrer?"":he(j.Mt.referrer,{source:"page",type:"referrer"})},b=function(t){var n,i="_fs_tab_id";try{var r=t.sessionStorage.getItem(i);if(r)return r;var e=Math.floor(1e17*Math.random()).toString(16);return t.sessionStorage.setItem(i,e),null!==(n=t.sessionStorage.getItem(i))&&void 0!==n?n:void 0}catch(t){return}}(this.Dn),E={OrgId:this.xu,UserId:p,Url:m(),Base:g(),Width:h,Height:f,ScreenWidth:l,ScreenHeight:d,SnippetVersion:V(this.Dn),Referrer:y(),Preroll:w,Doctype:dt(this.Mt),CompiledVersion:"11aa377d19",CompiledTimestamp:1678707725,AppId:this.Uu.getAppId(),TabId:b,PreviewMode:this.Ia.isPreviewMode()||void 0},a&&(E.ReplayFlags=a),e.label=1;case 1:return e.trys.push([1,5,,6]),S=this.Oa,[4,this.Ho.page(E)];case 2:return[4,S.apply(this,[e.sent()])];case 3:return P=e.sent(),this.isSafeResponse(P)?this.gu?[2]:(window,this.handleResponse(P),window,this.Ma(P.CookieDomain,P.UserIntId,P.SessionIntId,P.PageIntId,P.EmbedToken),P.Flags.UseStatelessConsent||this.Uu.getConsentStore().setConsentState(!!P.Consented),this.Ka(),P.PreviewMode&&this.Ra(),x=function(t){return R(t,"_fs_pagestart","function")}(this.Dn),x&&x(),this.At.enqueueFirst(this.yu.getNavigateEvent(this.Dn.location.href,Ot.ENTRY_NAVIGATE)),k=!!P.Consented,this.At.enqueueFirst({Kind:Ot.SYS_REPORTCONSENT,Args:[k,Bt.Document]}),_=dt(this.Mt),A=m(),I=y(),T=g(),this.At.enqueueFirst({Kind:Ot.SET_FRAME_BASE,Args:[he(Mr(this.Dn),{source:"event",type:Ot.SET_FRAME_BASE}),_,A,I]}),this.mo.setPageData({Kind:Ot.PAGE_DATA,Args:[A,T,h,f,l,d,V(this.Dn),I,_,w,p,P.PageStart,Et(this.Dn),this.Dn.navigator.userAgent,b,!!P.IsNewSession]}),this.At.enqueue({Kind:Ot.SCRIPT_COMPILED_VERSION,Args:["11aa377d19"]}),this.At.enqueue(Uu({type:"default"})),this.yu.addVisibilityChangeEvent(),this.addInitEvent(),[4,this.At.startPipeline({pageId:P.PageIntId,serverPageStart:P.PageStart,isNewSession:!!P.IsNewSession})]):[2,this.Ha()];case 4:return e.sent(),this.enqueueDocumentProperties(this.Mt),this.fullyStarted(),[3,6];case 5:return(C=e.sent())instanceof iu&&(P=C.data)&&P.user_id&&P.cookie_domain&&P.reason_code===en.ReasonBlockedTrafficRamping&&p!==P.user_id&&this.Ma(P.cookie_domain,P.user_id,"","",""),this.Ha(),[3,6];case 6:return[2];}var O,M,K})})},n.prototype.Ka=function(){var t=this;this.Aa=!0,this.Pa(function(){t.fireFsReady(t.ko)})},n.prototype.Ma=function(t,n,i,r,e){var s=this.Uu;s.setIds(this.Dn,t,n,i),this.Ca=e,this.Ia.write(),s.getUserId(),s.getSessionId()},n.prototype.Pa=function(t){var n,i;if(this._a&&this.Aa)if(null===(i=null===(n=this.ku)||void 0===n?void 0:n.Flags)||void 0===i?void 0:i.FetchIntegrations){var r=this.Mt.createElement("script");r.addEventListener("load",t),r.addEventListener("error",t),r.async=!0,r.src=this.zo+"//"+this.Eu+"/rec/integrations?OrgId="+this.xu,this.Mt.head.appendChild(r)}else t()},n.prototype.Ra=function(){var t="FullStory-preview-script";if(!this.Mt.getElementById(t)){var n=this.Mt.createElement("script");n.id=t,n.async=!0,n.src=this.zo+"//"+this.Su+"/s/fspreview.js",this.Mt.head.appendChild(n)}},n.prototype.Ha=function(){this.Iu&&this.Iu(),this.shutdown(Wt.SettingsBlocked),this.ko=!0,this.fireFsReady(this.ko)},n.prototype.Oa=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o,u;return(0,e.__generator)(this,function(a){switch(a.label){case 0:return(i=(0,e.__assign)({},t)).Flags.UseStaticSettings?(r=this.Ia.isPreviewMode(),[4,this.Ho.settings({orgId:this.xu,previewMode:r,fallback:!1})["catch"](function(t){Tt.sendToBugsnag("Edge Rec settings error","error",{err:t})})]):[3,4];case 1:return(s=a.sent())?[3,3]:[4,this.Ho.settings({orgId:this.xu,previewMode:r,fallback:!0})["catch"](function(t){Tt.sendToBugsnag("Rs Rec settings error","error",{err:t})})];case 2:s=a.sent(),a.label=3;case 3:s&&(i=(0,e.__assign)((0,e.__assign)({},i),s)),a.label=4;case 4:return i.Flags.UseClientSideId?(this.Uu.setCookieDomain(this.Dn,i.CookieDomain),Bu(o=null!==(n=t.UserUUID)&&void 0!==n?n:"")&&this.Uu.setUserId(o),[4,this.Ta.createUserSessionPage()]):[3,6];case 5:u=a.sent(),this.Ta.start(),i=(0,e.__assign)((0,e.__assign)({},i),{UserIntId:u.userId,SessionIntId:u.sessionId,PageIntId:u.pageId,IsNewSession:u.isNewSession,PageStart:p()}),a.label=6;case 6:return i.Flags.UseStatelessConsent&&(i=(0,e.__assign)((0,e.__assign)({},i),{Consented:this.Uu.getConsentStore().getConsentState()})),[2,i];}})})},n.prototype.onMessageReceived=function(n,i){t.prototype.onMessageReceived.call(this,n,i),(null==n?void 0:n.parent)==this.Dn&&i[0]===du.EndPreviewMode&&this.Ia.clear()},n}(Cu),zu=function(){function t(t,n){void 0===n&&(n=new $u(t)),this.Dn=t,this.Na=n}return t.prototype.enqueueEvents=function(t,n){var i=null!=t?t:void 0;this.Na.postMessage(this.Dn.parent,[du.EvtBundle,n,i],i)},t.prototype.startPipeline=function(){},t.prototype.stopPipeline=function(){},t.prototype.flush=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(t){return[2]})})},t.prototype.singSwanSong=function(){},t.prototype.onShutdown=function(t){},t.prototype.setPageData=function(t){},t}(),$u=function(){function t(t){this.Dn=t}return t.prototype.postMessage=function(t,n,i){switch(n[0]){case du.EvtBundle:bu(this.Dn,n[0],vt(n[1]),i)||mu(t,n);break;case du.RequestFrameId:bu(this.Dn,n[0],"[]",i)||mu(t,n);break;default:n[0];}},t}(),Gu=function(t){function n(n,i,r,e,s){void 0===i&&(i=new $u(n.window)),void 0===r&&(r=new zu(n.window,i)),void 0===e&&(e=Zi),void 0===s&&(s=xu);var o=t.call(this,n,e,void 0,r,s)||this;return o.Na=i,o}return(0,e.__extends)(n,t),n.prototype.start=function(n,i,r){var e=this;t.prototype.start.call(this,n,i,r),this.La(),this.T.add(this.Dn,"load",!1,function(){e.yu.recordingIsDetached()&&e._t.recording.splitPage(Wt.FsShutdownFrame)}),this.yu.addVisibilityChangeEvent()},n.prototype.onMessageReceived=function(n,i){if(t.prototype.onMessageReceived.call(this,n,i),n===this.Dn.parent||n===this.Dn)switch(i[0]){case du.GreetFrame:this.La(i[1]);break;case du.SetFrameId:try{var r=i[1];if(!r)return void he(location.href,{source:"log",type:"debug"});this.Ua({frameId:r,parentIds:i[2],outerStartTime:i[3],scheme:i[4],script:i[5],appHost:i[6],orgId:i[7],initConfig:i[8],pageRsp:i[9],consentOverride:i[10],minimumWhen:i[11]})}catch(t){vt(i)}break;case du.SetConsent:this.setConsent(i[1]);break;case du.InitFrameMobile:try{var e=JSON.parse(i[1]),s=e.StartTime;if(i.length>2&&i[2]){var o=i[2];Object.prototype.hasOwnProperty.call(o,"ProtocolVersion")&&o.ProtocolVersion>=20180723&&Object.prototype.hasOwnProperty.call(o,"OuterStartTime")&&(s=o.OuterStartTime)}var u=e.Host;this.Ua({frameId:0,parentIds:[],outerStartTime:s,scheme:"https:",script:G(u),appHost:$(u),orgId:e.OrgId,initConfig:void 0,pageRsp:e.PageResponse,consentOverride:this.Xt.getConsent()})}catch(t){vt(i)}}},n.prototype.La=function(t){this.Eo&&this.Eo===t||0!=this.Eo&&this.Dn.parent&&this.Na.postMessage(this.Dn.parent,[du.RequestFrameId])},n.prototype.Ua=function(t){var n,i,r=this;if(this.Eo)this.Eo!==t.frameId?(this.Eo,t.frameId,this._t.recording.splitPage(Wt.FsShutdownFrame)):this.Eo;else if(he(location.href,{source:"log",type:"debug"}),t.frameId,this.zo=t.scheme,this.bu=t.script,this.Su=t.appHost,this.xu=t.orgId,this._u=t.initConfig,this.Eo=t.frameId,this.So=t.parentIds,t.pageRsp&&this.isSafeResponse(t.pageRsp)){if(!this.gu){var e=null!==(n=t.consentOverride)&&void 0!==n?n:!!t.pageRsp.Consented;this.handleResponse(t.pageRsp,e),this.fireFsReady(),this.At.enqueueFirst({Kind:Ot.SYS_REPORTCONSENT,Args:[e,Bt.Document]}),this.At.enqueueFirst({Kind:Ot.SET_FRAME_BASE,Args:[he(Mr(this.Dn),{source:"event",type:Ot.SET_FRAME_BASE}),dt(this.Dn.document)]}),this.At.enqueue({Kind:Ot.SCRIPT_COMPILED_VERSION,Args:["11aa377d19"]}),this.At.enqueue(Uu({type:"default"})),this.addInitEvent(),this.At.rebaseIframe(t.outerStartTime,null!==(i=t.minimumWhen)&&void 0!==i?i:0),this._t.time.setStartTime(t.outerStartTime),this.Ou&&this.At.startPipeline({pageId:this.Ou,serverPageStart:t.pageRsp.PageStart,isNewSession:!!t.pageRsp.IsNewSession,frameId:t.frameId,parentIds:t.parentIds}).then(function(){r.flushPendingChildFrameInits(),r.enqueueDocumentProperties(r.Dn.document),r.fullyStarted()})}}else this.shutdown(Wt.FsShutdownFrame)},n}(Cu),Xu=function(){function t(t,n,i){void 0===n&&(n=function(){}),void 0===i&&(i=!1),this.Mt=t,this.Fa=n,this.Da=i,this._cookies={},this._cookies=k(this.Mt)}return t.prototype.setDomain=function(t){this.Ba=t},t.prototype.getValue=function(t,n){var i=this._cookies[t];if(!i)try{i=localStorage[null!=n?n:t]}catch(t){}return i},t.prototype.setValue=function(t,n,i,r){if(null!=this.Ba&&!this.Da){var e=[];this._setCookie(t,n,i,e),this.Wa(null!=r?r:t,n,e,t),e.length>0&&this.Fa(e)}},t.prototype.setCookie=function(t,n,i){this._setCookie(t,n,i,[])},Object.defineProperty(t.prototype,"cookies",{get:function(){return this._cookies},enumerable:!1,configurable:!0}),t.prototype.clearCookie=function(t,n){if(this._cookies[t]&&(this.Mt.cookie=Ju(this.Ba,t,"","Thu, 01 Jan 1970 00:00:01 GMT"),delete this._cookies[t]),n)try{delete localStorage[n]}catch(t){}},t.prototype._setCookie=function(t,n,i,r){try{this.Mt.cookie=Ju(this.Ba,t,n,i),-1===this.Mt.cookie.indexOf(n)&&r.push([t,"cookie"])}finally{this._cookies=k(this.Mt)}},t.prototype.Wa=function(t,n,i,r){try{localStorage[t]=n,localStorage[t]!==n&&i.push([null!=r?r:t,"localStorage"])}catch(n){i.push([null!=r?r:t,"localStorage",String(n)])}},t}();function Ju(t,n,i,r){var e=n+"="+i;return e+="; domain="+function(t){return t?"."+encodeURIComponent(t):""}(t),e+="; Expires="+r+"; path=/; SameSite=Strict","https:"===location.protocol&&(e+="; Secure"),e}var Zu,Yu="fs_cid",ta=function(){function t(t){this.Sa=t,this.qa=1;var n=this.Sa.getValue(Yu,wn);this.Qa=function(t){var n={consent:Dt.RevokeConsent};if(!t)return n;var i=t.split(".");return i.length<1?n:(i[0],"1"===i[1]?{consent:Dt.GrantConsent}:n)}(n)}return t.prototype.getConsentState=function(){return this.Qa.consent},t.prototype.setConsentState=function(t){if(this.Qa.consent=t,t!==Dt.RevokeConsent){var n=this.Va(),i=this.za();this.Sa.setValue(Yu,n,i,wn)}else this.Sa.clearCookie(Yu,wn)},t.prototype.Va=function(){return[this.qa,this.Qa.consent===Dt.GrantConsent?1:0].join(".")},t.prototype.za=function(){return new Date(1e3*S()).toUTCString()},t}(),na="fs_lua",ia=function(){function t(t){this.qa=1,this.Sa=t;var n=this.Sa.getValue(na,gn);this.Qa=function(t){var n={lastUserActivityTime:void 0};if(!t)return n;var i=t.split(".");return i.length<1?n:(i[0],{lastUserActivityTime:_(i[1])})}(n)}return t.prototype.getLastUserActivityTimeMS=function(){return this.Qa.lastUserActivityTime},t.prototype.setLastUserActivityTimeMS=function(t){this.Qa.lastUserActivityTime=t;var n=this.Va(),i=this.za();this.Sa.setValue(na,n,i,gn)},t.prototype.Va=function(){var t;return[this.qa,null!==(t=this.Qa.lastUserActivityTime)&&void 0!==t?t:""].join(".")},t.prototype.za=function(){return new Date(p()+qu).toUTCString()},t}(),ra="fs_uid",ea=function(){function t(t,n,i,r){void 0===n&&(n=document),void 0===i&&(i=function(){}),void 0===r&&(r=!1),this.$a=void 0,this.wa=new Xu(n,i,r),this.Ga=new ta(this.wa),this.Xa=new ia(this.wa),this.Qa=this.Ja(t)}return t.prototype.Ja=function(t){var n=x(this.wa.getValue(ra,pn));return n&&n.orgId==t?n:{expirationAbsTimeSeconds:S(),orgId:t,userId:"",sessionId:"",appKeyHash:""}},t.prototype.getConsentStore=function(){return this.Ga},t.prototype.clear=function(){this.Xa.setLastUserActivityTimeMS(void 0),this.Qa.sessionStartTime=this.Qa.pageCount=void 0,this.Qa.userId=this.Qa.sessionId=this.Qa.appKeyHash=this.$a="",this.Qa.expirationAbsTimeSeconds=S(),this.Za()},t.prototype.create=function(t){this.Xa.setLastUserActivityTimeMS(t.lastUserActivityTime),this.Qa=(0,e.__assign)((0,e.__assign)({},this.Qa),t),this.Za()},t.prototype.getOrgId=function(){return this.Qa.orgId},t.prototype.getUserId=function(){return this.Qa.userId},t.prototype.setUserId=function(t){this.Qa.userId=t,this.Za()},t.prototype.getSessionId=function(){return this.Qa.sessionId},t.prototype.getAppKeyHash=function(){return this.Qa.appKeyHash},t.prototype.getCookies=function(){return this.wa.cookies},t.prototype.setAppId=function(t){this.$a=t,this.Qa.appKeyHash=qo(t),this.Za()},t.prototype.getAppId=function(){return this.$a},t.prototype.setSessionStartTimeMS=function(t){this.Qa.sessionStartTime=t,this.Za()},t.prototype.getSessionStartTimeMS=function(){return this.Qa.sessionStartTime},t.prototype.setLastUserActivityTimeMS=function(t){this.Xa.setLastUserActivityTimeMS(t)},t.prototype.getLastUserActivityTimeMS=function(){return this.Xa.getLastUserActivityTimeMS()},t.prototype.setPageCount=function(t){this.Qa.pageCount=t,this.Za()},t.prototype.getPageCount=function(){return this.Qa.pageCount},t.prototype.getClientStore=function(){return this.wa},t.prototype.setCookie=function(t,n,i){void 0===i&&(i=new Date(p()+6048e5).toUTCString()),this.wa.setCookie(t,n,i)},t.prototype.setCookieDomain=function(t,n){var i=n;(C(i)||i.match(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/g))&&(i="");var r=function(t){return R(t,"_fs_cookie_domain")}(t);"string"==typeof r&&(i=r),this.wa.setDomain(i)},t.prototype.setIds=function(t,n,i,r){this.setCookieDomain(t,n),this.Qa.userId=i,this.Qa.sessionId=r,this.Za()},t.prototype.clearAppId=function(){return!!this.Qa.appKeyHash&&(this.$a="",this.Qa.appKeyHash="",this.Za(),!0)},t.prototype.encode=function(){var t,n,i,r=[this.Qa.userId,null!==(t=this.Qa.sessionId)&&void 0!==t?t:"",""+(null!==(n=this.Qa.sessionStartTime)&&void 0!==n?n:""),"",""+(null!==(i=this.Qa.pageCount)&&void 0!==i?i:"")].join(":"),e=["",this.Qa.orgId,r];return this.Qa.appKeyHash&&e.push(encodeURIComponent(this.Qa.appKeyHash)),e.push("/"+this.Qa.expirationAbsTimeSeconds),e.join("#")},t.prototype.Za=function(){var t=this.encode(),n=new Date(1e3*this.Qa.expirationAbsTimeSeconds).toUTCString();this.wa.setValue(ra,t,n,pn)},t}(),sa=((Zu={})[Xt.Document]={assetMapId:"str",releaseDatetime:"date",releaseVersion:"str"},Zu[Xt.Event]={},Zu[Xt.Page]={pageName:"str",releaseVersion:"str",releaseDatetime:"str"},Zu[Xt.User]={uid:"str",displayName:"str",email:"str"},Zu),oa={str:ua,bool:aa,real:ca,"int":ha,date:fa,strs:va(ua),bools:va(aa),reals:va(ca),ints:va(ha),dates:va(fa),objs:va(la),obj:la};function ua(t){return"string"==typeof t}function aa(t){return"boolean"==typeof t}function ca(t){return"number"==typeof t}function ha(t){return"number"==typeof t&&t-o.mathFloor(t)==0}function fa(t){return!(!t||(t.constructor===Date?isNaN(t):"number"!=typeof t&&"string"!=typeof t||isNaN(new Date(t))))}function va(t){return function(n){if(!(n instanceof Array))return!1;for(var i=0;i=0)return[void 0,Jt.FsId];var e=qo(r),s=void 0;return n&&n.Qa.appKeyHash&&n.Qa.appKeyHash!==e&&n.Qa.appKeyHash!==r&&(n.Qa.appKeyHash,s=Jt.NewUid),[r,s]}(f,this.Uu),l=v[0],d=v[1];if(!l)return Jt.FsId,{events:r};a.properties.uid=l,this.Uu.setAppId(l),d===Jt.NewUid&&(i=!0)}}Ea(t.source,"setVars",e),e(this.nc(s,wa(s,a.properties),u));break;default:(0,Ir.nt)(s,"Unsupported");}}catch(n){t.operation,n.message}return{events:r,reidentify:i}},t.prototype.nc=function(t,n,i,r){var e=vt(n.PayloadToSend),s=!!i&&"fs"!==i;switch(t){case Xt.Event:return{When:0,Kind:Ot.SYS_CUSTOM,Args:s?[r,e,i]:[r,e]};case Xt.Document:case Xt.Page:case Xt.User:return{When:0,Kind:Ot.SYS_SETVAR,Args:s?[t,e,i]:[t,e]};default:(0,Ir.nt)(t,"Unsupported");}},t.prototype.ic=function(t,n){var i=t.PayloadToSend;if(i&&"object"==typeof i){var r=0,e={};for(var s in i)if(!(s in this.Ya)){var o=i[s];this.Ya[s]={value:o,apiSource:n},e[s]=o,r++}if(0!==r)return{PayloadToSend:e,ValidationErrors:t.ValidationErrors}}},t}();function wa(t,n){var i=1500;return ga(function(){return--i},t,n)}var ga=function(t,n,i){var r,e,s={PayloadToSend:{},ValidationErrors:[]},u=function(i){var r=ga(t,n,i);return s.ValidationErrors=s.ValidationErrors.concat(r.ValidationErrors),r.PayloadToSend};for(var a in i)if(o.objectHasOwnProp(i,a)){if(t()<=0)break;var c=i[a],h=ya(n,a,c,s.ValidationErrors);if(h){var f=h.name;if("obj"!==h.type){if("objs"!==h.type)s.PayloadToSend[f]=ma(h.type,h.value);else{n!=Xt.Event&&s.ValidationErrors.push({Type:"vartype",FieldName:f,ValueType:"Array (unsupported)"});for(var v=[],l=0;l0&&(s.PayloadToSend[f]=v)}}else{var d=u(h.value),p=(e="_obj").length>(r=a).length||r.substring(r.length-e.length)!=e?f.substring(0,f.length-"_obj".length):f;s.PayloadToSend[p]=d}}else s.PayloadToSend[a]=ma("str",c)}return s};function ma(t,n){var i=n;return"str"==t&&"string"==typeof i&&(i=i.trim()),null==i||"date"!=t&&i.constructor!=Date||(i=function(t){var n=t.constructor===Date?t:new Date(t);try{return n.toISOString()}catch(t){return null}}(i)),i}function ya(t,n,i,r){var e=n,s=e,u=typeof i;if("undefined"===u)return r.push({Type:"vartype",FieldName:e,ValueType:u+" (unsupported)"}),null;var a=sa[t];if(o.objectHasOwnProp(a,e))return{name:e,type:a[e],value:i};var c=e.lastIndexOf("_");if(-1==c||!ba(e.substring(c+1))){var h=function(t){for(var n in oa)if(oa[n](t))return n;return null}(i);if(null==h)return i?r.push({Type:"vartype",FieldName:e}):r.push({Type:"vartype",FieldName:e,ValueType:"null (unsupported)"}),null;c=e.length,e=e+"_"+h}var f=e.substring(0,c),v=e.substring(c+1);if("object"===u&&!i)return r.push({Type:"vartype",FieldName:s,ValueType:"null (unsupported)"}),null;if(!da.test(f)){f=f.replace(/[^a-zA-Z0-9_]/g,"").replace(/^[0-9]+/,""),/[0-9]/.test(f[0])&&(f=f.substring(1)),r.push({Type:"varname",FieldName:s});var l=f+"_"+v;if(da.source,""==f)return null;e=l}return ba(v)?function(t,n){return oa[t](n)}(v,i)?{name:e,type:v,value:i}:(vt(i),"number"===u?u=i%1==0?"integer":"real":"object"==u&&null!=i&&i.constructor==Date&&(u=isNaN(i)?"invalid date":"date"),r.push({Type:"vartype",FieldName:s,ValueType:u}),null):(r.push({Type:"varname",FieldName:s}),null)}function ba(t){return!!oa[t]}function Ea(t,n,i){var r=Uu({source:t,type:"api",entrypoint:n});r&&i({When:0,Kind:r.Kind,Args:r.Args})}function Sa(t,n){return(0,e.__awaiter)(this,void 0,Yn,function(){var i,s,o,a,c;return(0,e.__generator)(this,function(h){switch(h.label){case 0:if(h.trys.push([0,2,,3]),gr||yr||function(t){return!!R(t,"_fs_use_polyfilled_apis","boolean")}(t))return[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];if(!t.document||n.status!==r.Unknown)return[2,n];if(i=function(t,n){var i=n.functions,s={},o=(0,e.__assign)({},n.helpers);if(o.functionToString=function(t,n){var i,r,e=null===(i=t["__core-js_shared__"])||void 0===i?void 0:i.inspectSource;if(e){var s=function(){return e(this)};if(ka(s,2))return s}var o=null===(r=t["__core-js_shared__"])||void 0===r?void 0:r["native-function-to-string"];if(ka(o))return o;var u=n.__zone_symbol__OriginalDelegate;return ka(u)?u:ka(n)?n:void 0}(t,o.functionToString),!o.functionToString)return n;var u=!1;for(var a in i)if(i[a]){if(s[a]=Ia(o.functionToString,i[a]),s[a]||(s[a]=Ta(o.functionToString,o,a)),!s[a])return n;s[a]!==i[a]&&(u=!0)}else s[a]=void 0;return{status:r.Clean,functions:u?s:i,helpers:o,errors:[]}}(t,n),i.status===r.Clean)return[2,i];(s=t.document.createElement("iframe")).id="FullStory-iframe",s.className="fs-hide",s.style.display="none",o=t.document.body||t.document.head||t.document.documentElement||t.document;try{o.appendChild(s)}catch(t){return[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})]}return s.contentWindow?(a=u(s.contentWindow,r.Clean),s.parentNode&&s.parentNode.removeChild(s),a.status===r.UnrecoverableFailure?[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})]:[4,xa(a,n)]):[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];case 1:return[2,h.sent()];case 2:return c=h.sent(),Tt.sendToBugsnag(c,"error"),[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];case 3:return[2];}})})}function xa(t,n){var i,s=new Yn(function(t){return i=t});return setTimeout(function(){try{t.functions.jsonParse("[]").push(0)}catch(t){i((0,e.__assign)((0,e.__assign)({},n),{status:r.Clean}))}i(t)}),s}function ka(t,n){var i;if(void 0===n&&(n=0),!t)return!1;try{t.call(function(){})}catch(t){return!1}var r=function(t){try{return void t.call(null)}catch(t){return(t.stack||"").replace(/__fs_nomangle_check_stack(.|\n)*$/,"")}},e=void 0;0!==n&&"number"==typeof Error.stackTraceLimit&&(e=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY);var s=[function(){throw new Error("")},t],o=function __fs_nomangle_check_stack(){return s.map(r)}(),u=o[0],a=o[1];if(void 0!==e&&(Error.stackTraceLimit=e),!u||!a)return!1;for(var c="\n".charCodeAt(0),h=u.length>a.length?a.length:u.length,f=1,v=f;v=0}var Aa=["__zone_symbol__OriginalDelegate","nr@original"];function Ia(t,n){if(n){for(var i=0,r=Aa;i0&&this.lc[t].some(function(t){return!t.disconnected})},t.prototype.takeRecords=function(t){var n,i=null!==(n=this.lc[t.type])&&void 0!==n?n:[];if(0!==i.length)for(var r=0,e=i;r-1,!!ja.userAgent.match("CriOS")||"Google Inc."===Oa&&!Ma&&!Ka),Fa=/Firefox/.test(window.navigator.userAgent);function Da(t){if(!Fa)return!1;var n=window.navigator.userAgent.match(/Firefox\/(\d+)/);return!(!n||!n[1])&&parseInt(n[1],10)0||null===H){n="Init config rejected: "+R.unrecoverable.join(",\n"),k(t,new Error(n));break}R.recoverable.length>0&&(n="Init config partially rejected: "+R.recoverable.join(",\n")),a=H,x(t);break;default:(0,Ir.nt)(t,"invalid operation");}}catch(n){Tt.sendToBugsnag(n,"error"),k(t,n)}},A=0,I=p;A=0;u--)(e=t[u])&&(o=(s<3?e(o):s>3?e(n,i,o):e(n,i))||o);return s>3&&o&&Object.defineProperty(n,i,o),o}function a(t,n){return function(i,r){n(i,r,t)}}function c(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function h(t,n,i,r){return new(i||(i=Promise))(function(e,s){function o(t){try{a(r.next(t))}catch(t){s(t)}}function u(t){try{a(r["throw"](t))}catch(t){s(t)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i(function(t){t(n)})).then(o,u)}a((r=r.apply(t,n||[])).next())})}function f(t,n){var i,r,e,s,o={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return s={next:u(0),"throw":u(1),"return":u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(s){return function(u){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(e=2&s[0]?r["return"]:s[0]?r["throw"]||((e=r["return"])&&e.call(r),0):r.next)&&!(e=e.call(r,s[1])).done)return e;switch(r=0,e&&(s=[2&s[0],e.value]),s[0]){case 0:case 1:e=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((e=(e=o.trys).length>0&&e[e.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!e||s[1]>e[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(t,n){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var r,e,s=i.call(t),o=[];try{for(;(void 0===n||n-->0)&&!(r=s.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=s["return"])&&i.call(s)}finally{if(e)throw e.error}}return o}function w(){for(var t=[],n=0;n1||u(t,n)})})}function u(t,n){try{(i=e[t](n)).value instanceof y?Promise.resolve(i.value.v).then(a,c):h(s[0][2],i)}catch(t){h(s[0][3],t)}var i}function a(t){u("next",t)}function c(t){u("throw",t)}function h(t,n){t(n),s.shift(),s.length&&u(s[0][0],s[0][1])}}function E(t){var n,i;return n={},r("next"),r("throw",function(t){throw t}),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,e){n[r]=t[r]?function(n){return(i=!i)?{value:y(t[r](n)),done:"return"===r}:e?e(n):n}:e}}function S(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=t[Symbol.asyncIterator];return i?i.call(t):(t=d(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=t[i]&&function(n){return new Promise(function(r,e){!function(t,n,i,r){Promise.resolve(r).then(function(n){t({value:n,done:i})},n)}(r,e,(n=t[i](n)).done,n.value)})}}}function x(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t}var k=Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t["default"]=n};function _(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&v(n,t,i);return k(n,t),n}function A(t){return t&&t.__esModule?t:{"default":t}}function I(t,n,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:n.get(t)}function T(t,n,i,r,e){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!e:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?e.call(t,i):e?e.value=i:n.set(t,i),i}function C(t,n){if(null===n||"object"!=typeof n&&"function"!=typeof n)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?n===t:t.has(n)}}},n={};function i(r){var e=n[r];if(void 0!==e)return e.exports;var s=n[r]={exports:{}};return t[r](s,s.exports,i),s.exports}i.d=function(t,n){for(var r in n)i.o(n,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(248)}(); +!function(){"use strict";var t={248:function(t,n,i){var r,e=i(940);function s(t){}!function(t){t[t.Unknown=0]="Unknown",t[t.Clean=1]="Clean",t[t.UnrecoverableFailure=2]="UnrecoverableFailure"}(r||(r={}));var o=new(function(){function t(t){this.rebuildFromSnapshot(t)}return t.prototype.rebuildFromSnapshot=function(t){var n=this.snapshot;if(this.snapshot=t,!n||n.functions!==t.functions){var i=t.functions;this.arrayIsArray=i.arrayIsArray,this.clearWindowInterval=a(i.clearWindowInterval),this.clearWindowTimeout=a(i.clearWindowTimeout),this.dateGetTime=a(i.dateGetTime),this.dateNow=i.dateNow,this.docFragQuerySelectorAll=a(i.docFragQuerySelectorAll),this.docQuerySelectorAll=a(i.docQuerySelectorAll),this.elMatches=a(i.elMatches),this.elQuerySelectorAll=a(i.elQuerySelectorAll),this.jsonParse=i.jsonParse,this.jsonStringify=i.jsonStringify,this.matchMedia=c(i.matchMedia),this.mathAbs=i.mathAbs,this.mathFloor=i.mathFloor,this.mathMax=i.mathMax,this.mathMin=i.mathMin,this.mathPow=i.mathPow,this.mathRandom=i.mathRandom,this.mathRound=i.mathRound,this.objectHasOwnProp=a(i.objectHasOwnProp),this.objectKeys=i.objectKeys,this.objectValues=i.objectValues||null,this.requestWindowAnimationFrame=c(i.requestWindowAnimationFrame),this.requestWindowIdleCallback=c(i.requestWindowIdleCallback),this.setWindowInterval=a(i.setWindowInterval),this.setWindowTimeout=a(i.setWindowTimeout)}},t}())(u(window));function u(t,n){void 0===n&&(n=r.Unknown);var i=n,e=[],s=function(t){return i=r.UnrecoverableFailure,e.push("Snapshot failed: "+t),function(){throw new Error("Invoked failed snapshot")}},o=function(t){try{return t()}catch(t){return s(t.message)}},u=function(t){try{return t()||s("snapshot not found")}catch(t){return s(t.message)}},a={arrayIsArray:o(function(){return t.Array.isArray}),clearWindowInterval:o(function(){return t.clearInterval}),clearWindowTimeout:o(function(){return t.clearTimeout}),dateGetTime:o(function(){return t.Date.prototype.getTime}),dateNow:o(function(){return t.Date.now}),docFragQuerySelectorAll:u(function(){var n;return null===(n=t.DocumentFragment)||void 0===n?void 0:n.prototype.querySelectorAll}),docQuerySelectorAll:u(function(){var n;return null!==(n=t.Document.prototype.querySelectorAll)&&void 0!==n?n:t.document.querySelectorAll}),elMatches:u(function(){return v(t,h)}),elQuerySelectorAll:u(function(){return v(t,f)}),jsonParse:o(function(){return t.JSON.parse}),jsonStringify:o(function(){return t.JSON.stringify}),matchMedia:o(function(){return t.matchMedia}),mathAbs:o(function(){return t.Math.abs}),mathFloor:o(function(){return t.Math.floor}),mathMax:o(function(){return t.Math.max}),mathMin:o(function(){return t.Math.min}),mathPow:o(function(){return t.Math.pow}),mathRandom:o(function(){return t.Math.random}),mathRound:o(function(){return t.Math.round}),objectHasOwnProp:o(function(){return t.Object.prototype.hasOwnProperty}),objectKeys:o(function(){return t.Object.keys}),objectValues:o(function(){return t.Object.values}),requestWindowAnimationFrame:o(function(){return t.requestAnimationFrame}),requestWindowIdleCallback:o(function(){return t.requestIdleCallback}),setWindowInterval:o(function(){return t.setInterval}),setWindowTimeout:o(function(){return t.setTimeout})},c={functionToString:o(function(){return t.Function.prototype.toString}),objectToString:o(function(){return t.Object.prototype.toString})};return{status:i,functions:a,helpers:c,errors:e}}function a(t){return function(n){for(var i=[],r=1;r=0){var s=e.split("/"),o=s[0],u=s[1];i[r]=o,n=u;break}}var a=function(t){var n=parseInt(null!=t?t:"",10),i=E(),r=S();return isNaN(n)?r:n<=i?void 0:n>r?r:n}(n);if(!a)return null;i[0];var c=i[1],h=i[2],f=i[3],v="";f&&(v=decodeURIComponent(f),(y.indexOf(v)>=0||b.indexOf(v)>=0)&&(v=""));var l=(null!=h?h:"").split(":"),d=l[0],p=l[1],w=l[2];return l[3],{appKeyHash:v,expirationAbsTimeSeconds:a,userId:d,orgId:c,pageCount:_(l[4]),sessionId:null!=p?p:"",sessionStartTime:_(w)}}function k(t){var n={};try{for(var i=t.cookie.split(";"),r=0;r1))return s}}(t);if(!i||!K(n))return n;var r="";return 0===n.indexOf("www.")&&(n=n.slice(4),r="www."),0===n.indexOf(i+".")&&(n=n.slice((i+".").length)),""+r+i+"."+n}}function $(t){return t?C(function(t){var n=t,i=n.indexOf(":");return i>=0&&(n=n.slice(0,i)),n}(t))?t:0==t.indexOf("www.")?"app."+t.slice(4):"app."+t:t}function G(t){var n=j(t);if(n)return n+"/s/fs.js"}function X(t,n){return function(){for(var i=[],r=0;rn)return!1;return i==n}function ot(t,n){var i=0;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&++i>n)return!0;return!1}function ut(t){var n=t.nextSibling;return n&&t.parentNode&&n===t.parentNode.firstChild?null:n}function at(t){var n=t.previousSibling;return n&&t.parentNode&&n===t.parentNode.lastChild?null:n}function ct(t){return function(){for(var n=this,i=[],r=0;r"}function pt(t){return o.jsonParse(t)}var wt=function(){function t(t,n,i){void 0===i&&(i=!1),this.i=t,this.u=n,this.l=i,this.g=J,this.m=J,this.S=J,this.k=!1}return t.prototype.before=function(t){return this.g=ft(t),this},t.prototype.afterSync=function(t){return this.m=ft(t),this},t.prototype.afterAsync=function(t){return this.S=ft(function(n){o.setWindowTimeout(window,X(function(){t(n)}),0)}),this},t.prototype.disable=function(){if(this.k=!1,this._){var t=this._,n=t.override,i=t["native"];this.i[this.u]===n&&(this.i[this.u]=i,this._=void 0)}},t.prototype.enable=function(){if(this.k=!0,this._)return!0;this._=this.A();try{this.i[this.u]=this._.override}catch(t){return!1}return!0},t.prototype.getTarget=function(){return this.i},t.prototype.A=function(){var t=this,n=this,i=this.i[this.u],r=function(){for(var t=[],r=0;r\n";var i=[];try{for(var r=arguments.callee.caller.caller;r&&i.length<10;){var e=kt.test(r.toString())&&RegExp.$1||xt;i.push(e),r=r.caller}}catch(t){t.toString()}n=i.join("\n")}return t+n}function It(){try{return window.self!==window.top}catch(t){return!0}}var Tt=function(){function t(){}return t.wrap=function(n,i){return void 0===i&&(i="error"),X(n,function(n){return t.sendToBugsnag(n,i)})},t.I=15,t.sendToBugsnag=function(n,i,r){if(!(t.I<=0)){t.I--;var e=n;"string"==typeof e&&(e=new Error(e));var s=k(document).fs_uid,o=s?x(s):void 0;o&&o.orgId!=F(window)&&(o=void 0);var u=new Date(1678707725e3).toISOString(),a={projectRoot:window.location.origin,deviceTime:p(),inIframe:It(),CompiledVersion:"11aa377d19",CompiledTimestamp:1678707725,CompiledTime:u,orgId:F(window),"userId:sessionId":o?o.userId+":"+o.sessionId:"NA",context:document.location&&document.location.pathname,message:e.message,name:"Recording Error",releaseStage:"production "+u,severity:i,language:Et(window),stacktrace:_t(e)||At()},c=function(t,n,i){var r=encodeURIComponent(n)+"="+encodeURIComponent(i);t.push(r)},h=[];for(var f in a)c(h,f,a[f]||"");if(r)for(var f in r)c(h,"aux_"+f,Ct(r[f]));new Image().src="https://"+L(window)+"/rec/except?"+h.join("&")}},t}();function Ct(t){try{var n=typeof t+": "+vt(t);return"function"==typeof t.toString&&(n+=" (toString: "+t.toString()+")"),n}catch(t){return"failed to serialize \""+(null==t?void 0:t.message)+"\""}}var Pt={};function jt(t,n,i){if(void 0===i&&(i=1),t)return!0;if(Pt[n]=Pt[n]||0,Pt[n]++,Pt[n]>i)return!1;var r=new Error("Assertion failed: "+n);return Tt.sendToBugsnag(r,"error"),t}var Ot,Mt,Kt,Rt,Ht,Nt,Lt={};function Ut(t,n,i){var r;Lt[t]=null!==(r=Lt[t])&&void 0!==r?r:0,Lt[t]++,Lt[t]>1||Tt.sendToBugsnag(n,"error",i)}!function(t){t.MUT_INSERT=2,t.MUT_REMOVE=3,t.MUT_ATTR=4,t.MUT_TEXT=6,t.MOUSEMOVE=8,t.MOUSEMOVE_CURVE=9,t.SCROLL_LAYOUT=10,t.SCROLL_LAYOUT_CURVE=11,t.MOUSEDOWN=12,t.MOUSEUP=13,t.CLICK=16,t.FOCUS=17,t.VALUECHANGE=18,t.RESIZE_LAYOUT=19,t.DOMLOADED=20,t.LOAD=21,t.PLACEHOLDER_SIZE=22,t.UNLOAD=23,t.BLUR=24,t.SET_FRAME_BASE=25,t.TOUCHSTART=32,t.TOUCHEND=33,t.TOUCHCANCEL=34,t.TOUCHMOVE=35,t.TOUCHMOVE_CURVE=36,t.NAVIGATE=37,t.PLAY=38,t.PAUSE=39,t.RESIZE_VISUAL=40,t.RESIZE_VISUAL_CURVE=41,t.RESIZE_DOCUMENT_CONTENT=42,t.RESIZE_SCROLLABLE_ELEMENT_CONTENT=43,t.LOG=48,t.ERROR=49,t.DBL_CLICK=50,t.FORM_SUBMIT=51,t.WINDOW_FOCUS=52,t.WINDOW_BLUR=53,t.HEARTBEAT=54,t.WATCHED_ELEM=56,t.PERF_ENTRY=57,t.REC_FEAT_SUPPORTED=58,t.SELECT=59,t.CSSRULE_INSERT=60,t.CSSRULE_DELETE=61,t.FAIL_THROTTLED=62,t.AJAX_REQUEST=63,t.SCROLL_VISUAL_OFFSET=64,t.SCROLL_VISUAL_OFFSET_CURVE=65,t.MEDIA_QUERY_CHANGE=66,t.RESOURCE_TIMING_BUFFER_FULL=67,t.MUT_SHADOW=68,t.DISABLE_STYLESHEET=69,t.FULLSCREEN=70,t.FULLSCREEN_ERROR=71,t.ADOPTED_STYLESHEETS=72,t.CUSTOM_ELEMENT_DEFINED=73,t.MODAL_OPEN=74,t.MODAL_CLOSE=75,t.SLOW_INTERACTION=76,t.LONG_FRAME=77,t.TIMING=78,t.STORAGE_WRITE_FAILURE=79,t.DOCUMENT_PROPERTIES=80,t.ENTRY_NAVIGATE=81,t.STATS=82,t.VIEWPORT_INTERSECTION=83,t.COPY=84,t.PASTE=85,t.URL_SALT=86,t.URL_ID=87,t.FRAME_STATUS=88,t.SCRIPT_COMPILED_VERSION=89,t.RESET_CSS_SHEET=90,t.ANIMATION_CREATED=91,t.ANIMATION_METHOD_CALLED=92,t.ANIMATION_PROPERTY_SET=93,t.DOCUMENT_TIMELINE_CREATED=94,t.KEYFRAME_EFFECT_CREATED=95,t.KEYFRAME_EFFECT_METHOD_CALLED=96,t.KEYFRAME_EFFECT_PROPERTY_SET=97,t.CAPTURE_SOURCE=98,t.PAGE_DATA=99,t.VISIBILITY_STATE=100,t.DIALOG=101,t.CSSRULE_UPDATE=102,t.CANVAS=103,t.CANVAS_DETACHED_DIMENSION=104,t.INIT_API=105,t.DEFERRED_RESOLVED=106,t.KEEP_ELEMENT=2e3,t.KEEP_URL=2001,t.KEEP_BOUNCE=2002,t.SYS_SETVAR=8193,t.SYS_RESOURCEHASH=8195,t.SYS_SETCONSENT=8196,t.SYS_CUSTOM=8197,t.SYS_REPORTCONSENT=8198,t.SYS_LETHE_MOBILE_BUNDLE_SEQ=8199}(Ot||(Ot={})),function(t){t.Animation=0,t.CSSAnimation=1,t.CSSTransition=2}(Mt||(Mt={})),function(t){t.Unknown=0,t.Serialization=1}(Kt||(Kt={})),function(t){t.Unknown=0,t.Successful=1,t.BlocklistedFrame=2,t.PartiallyLoaded=3,t.MissingWindowOrDocument=4,t.MissingDocumentHead=5,t.MissingBodyOrChildren=6,t.AlreadyDefined=7,t.NoNonScriptElement=8,t.Exception=9}(Rt||(Rt={})),function(t){t.Unknown=0,t.DomSnapshot=1,t.NodeEncoding=2,t.LzEncoding=3}(Ht||(Ht={})),function(t){t.Internal=0,t.Public=1}(Nt||(Nt={}));var Ft,Dt,Bt,Wt,qt,Qt,Vt,zt,$t,Gt,Xt,Jt,Zt,Yt,tn,nn,rn,en,sn,on,un,an,cn,hn=["print","alert","confirm"];function fn(t){switch(t){case Ot.MOUSEDOWN:case Ot.MOUSEMOVE:case Ot.MOUSEMOVE_CURVE:case Ot.MOUSEUP:case Ot.TOUCHSTART:case Ot.TOUCHEND:case Ot.TOUCHMOVE:case Ot.TOUCHMOVE_CURVE:case Ot.TOUCHCANCEL:case Ot.CLICK:case Ot.SCROLL_LAYOUT:case Ot.SCROLL_LAYOUT_CURVE:case Ot.SCROLL_VISUAL_OFFSET:case Ot.SCROLL_VISUAL_OFFSET_CURVE:case Ot.NAVIGATE:return!0;}return!1}!function(t){t[t.Index=1]="Index",t[t.Cached=2]="Cached"}(Ft||(Ft={})),function(t){t.GrantConsent=!0,t.RevokeConsent=!1}(Dt||(Dt={})),function(t){t.Page=0,t.Document=1}(Bt||(Bt={})),function(t){t.Unknown=0,t.Api=1,t.FsShutdownFrame=2,t.Hibernation=3,t.Reidentify=4,t.SettingsBlocked=5,t.Size=6,t.Unload=7,t.Hidden=8}(Wt||(Wt={})),function(t){t.Unknown=0,t.NotEmpty=1,t.EmptyBody=2}(qt||(qt={})),function(t){t.Timing=0,t.Navigation=1,t.Resource=2,t.Paint=3,t.Mark=4,t.Measure=5,t.Memory=6,t.TimeOrigin=7,t.LayoutShift=8,t.FirstInput=9,t.LargestContentfulPaint=10,t.LongTask=11}(Qt||(Qt={})),function(t){t.Timing=["navigationStart","unloadEventStart","unloadEventEnd","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"],t.Navigation=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","unloadEventStart","unloadEventEnd","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd","type","redirectCount","decodedBodySize","encodedBodySize","transferSize"],t.Resource=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"],t.Measure=["name","startTime","duration"],t.Memory=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"],t.TimeOrigin=["timeOrigin"],t.LayoutShift=["startTime","value","hadRecentInput"],t.FirstInput=["name","startTime","duration","processingStart"],t.LargestContentfulPaint=["name","startTime","duration","renderTime","loadTime","size"]}(Vt||(Vt={})),function(t){t.Performance=0,t.PerformanceEntries=1,t.PerformanceMemory=2,t.Console=3,t.Ajax=4,t.PerformanceObserver=5,t.PerformanceTimeOrigin=7,t.WebAnimation=8,t.LayoutShift=9,t.FirstInput=10,t.LargestContentfulPaint=11,t.LongTask=12,t.HTMLDialogElement=13,t.CaptureOnStartEnabled=14,t.CanvasWatcherEnabled=15}(zt||(zt={})),function(t){t.Node=1,t.Sheet=2}($t||($t={})),function(t){t.StyleSheetHooks=0,t.SetPropertyHooks=1}(Gt||(Gt={})),function(t){t.Document="document",t.Event="evt",t.Page="page",t.User="user"}(Xt||(Xt={})),function(t){t.FsId="fsidentity",t.NewUid="newuid"}(Jt||(Jt={})),function(t){t.Elide=0,t.Record=1,t.Allowlist=2}(Zt||(Zt={})),function(t){t.Any=0,t.Exclude=1,t.Mask=2}(Yt||(Yt={})),function(t){t.Erase=0,t.MaskText=1,t.ScrubUrl=2,t.ScrubCss=3}(tn||(tn={})),function(t){t.Static=0,t.Prefix=1}(nn||(nn={})),function(t){t.SignalInvalid=0,t.SignalDeadClick=1,t.SignalRageClick=2}(rn||(rn={})),function(t){t.ReasonNoSuchOrg=1,t.ReasonOrgDisabled=2,t.ReasonOrgOverQuota=3,t.ReasonBlockedDomain=4,t.ReasonBlockedIp=5,t.ReasonBlockedUserAgent=6,t.ReasonBlockedGeo=7,t.ReasonBlockedTrafficRamping=8,t.ReasonInvalidURL=9,t.ReasonUserOptOut=10,t.ReasonInvalidRecScript=11,t.ReasonDeletingUser=12,t.ReasonNativeHookFailure=13}(en||(en={})),function(t){t.Unset=0,t.Exclude=1,t.Mask=2,t.Unmask=3,t.Watch=4,t.Keep=5,t.Defer=6}(sn||(sn={})),function(t){t.Unset=0,t.Click=1}(on||(on={})),function(t){t[t.Page=1]="Page",t[t.Bundle=2]="Bundle"}(un||(un={})),function(t){t[t.Error=3]="Error",t[t.Page=4]="Page",t[t.Bundle=5]="Bundle",t[t.Settings=6]="Settings"}(an||(an={})),function(t){t.MaxPerfMarksPerPage=16384,t.MaxLogsPerPage=1024,t.MaxUrlLength=2048,t.MutationProcessingInterval=250,t.CurveSamplingInterval=142,t.DefaultBundleUploadInterval=5e3,t.HeartbeatInitial=4e3,t.HeartbeatMax=256200,t.PageInactivityTimeout=18e5,t.BackoffMax=3e5,t.ScrollSampleInterval=t.MutationProcessingInterval/5,t.InactivityThreshold=4e3,t.MaxAjaxPayloadLength=16384,t.DefaultOrgSettings={MaxPerfMarksPerPage:t.MaxPerfMarksPerPage,MaxConsoleLogPerPage:t.MaxLogsPerPage,MaxAjaxPayloadLength:t.MaxAjaxPayloadLength,MaxUrlLength:t.MaxUrlLength,RecordPerformanceResourceImg:!0,RecordPerformanceResourceTiming:!0,HttpRequestHeadersAllowlist:[],HttpResponseHeadersAllowlist:[],UrlPrivacyConfig:[{Exclude:{Hash:[{Expression:"#.*"}],QueryParam:[{Expression:"(=)(.*)"}]}}],AttributeBlocklist:[{Target:Yt.Any,Tag:"*",Name:"",Type:nn.Prefix,Action:tn.Erase}]},t.DefaultStatsSettings={MaxPayloadLength:8192,MaxEventTypeLength:1024},t.BlockedFieldValue="__fs__redacted"}(cn||(cn={}));var vn,ln,dn,pn="_fs_uid",wn="_fs_cid",gn="_fs_lua";function mn(t,n,i,r){void 0!==i&&("function"==typeof t.addEventListener?t.addEventListener(n,i,r):"function"==typeof t.addListener&&t.addListener(i))}function yn(t,n,i,r){void 0!==i&&("function"==typeof t.removeEventListener?t.removeEventListener(n,i,r):"function"==typeof t.removeListener&&t.removeListener(i))}!function(t){t[t.Shutdown=1]="Shutdown",t[t.Starting=2]="Starting",t[t.Started=3]="Started"}(vn||(vn={})),function(t){t.Set=0,t.Function=1}(ln||(ln={})),function(t){t[t.Disabled=0]="Disabled",t[t.CaptureCanvasOps=1]="CaptureCanvasOps",t[t.ScreenshotCanvas=2]="ScreenshotCanvas"}(dn||(dn={}));var bn=function(){function t(){var t=this;this.T=[],this.C=[],this.P=!0,this.j=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t.P={capture:!0,passive:!0},t.j={capture:!1,passive:!0}}});window.addEventListener("test",J,n)}catch(t){}}return t.prototype.add=function(t,n,i,r,e){return void 0===e&&(e=!1),this.addCustom(t,n,i,r,e)},t.prototype.addCustom=function(t,n,i,r,e){void 0===e&&(e=!1);var s={target:t,type:n,fn:Tt.wrap(function(t){(e||!1!==t.isTrusted||"message"==n||t._fs_trust_event)&&r(t)}),options:i?this.P:this.j,index:this.T.length};return this.T.push(s),mn(t,n,s.fn,s.options),s},t.prototype.remove=function(t){t.target&&(yn(t.target,t.type,t.fn,t.options),t.target=null,t.fn=void 0)},t.prototype.clear=function(){for(var t=0;ti){n.Z||(n.Z=!0,Tt.sendToBugsnag("Out of time for remaining measurement tasks.","warning",{totalRunningTimeMs:a-t}));break t}}n.G=null}finally{n.X=!1,n.wnd}}}),this.wnd=t}return t.create=function(t){return t.ResizeObserver?new ai(t,t.ResizeObserver):new ci(t)},t.prototype.requestMeasureTask=function(t,n){var i,r=this;if(this.J>16)Tt.sendToBugsnag("Too much synchronous recursion in requestMeasureTask","error");else{var e=this.X?this.J:0,s=Tt.wrap(function(){var t=r.J;r.J=e+1;try{n()}finally{r.J=t}});this.G?this.G[t].push(s):(this.G=((i={})[ii.Essential]=[],i[ii.High]=[],i[ii.Medium]=[],i[ii.Low]=[],i[t]=[s],i),this.schedule())}},t.prototype.performMeasurementsNow=function(){this.performMeasurements()},t}(),ai=function(t){function n(n,i){var r=t.call(this,n)||this;return r.Y=i,r}return(0,e.__extends)(n,t),n.prototype.schedule=function(){var t=this,n=this.Y,i=this.wnd.document,r=i.documentElement||i.body||i.head,e=new n(function(){e.unobserve(r),t.performMeasurements()});e.observe(r)},n}(ui),ci=function(t){function n(n){return t.call(this,n)||this}return(0,e.__extends)(n,t),n.prototype.schedule=function(){(0,e.__awaiter)(void 0,void 0,Yn,function(){var t;return(0,e.__generator)(this,function(n){switch(n.label){case 0:return(t=o.requestWindowAnimationFrame)?[4,new Yn(function(n){return t(window,n)})]:[3,2];case 1:n.sent(),n.label=2;case 2:return[4,ei()];case 3:return n.sent(),[2];}})}).then(this.performMeasurements)},n}(ui);function hi(t,n){return n&&t.pageLeft==n.pageLeft&&t.pageTop==n.pageTop}function fi(t,n){return n&&t.width==n.width&&t.height==n.height}function vi(t){return{pageLeft:t.pageLeft,pageTop:t.pageTop,width:t.width,height:t.height}}var li=[["@import\\s+\"","\""],["@import\\s+'","'"]].concat([["url\\(\\s*\"","\"\\s*\\)"],["url\\(\\s*'","'\\s*\\)"],["url\\(\\s*","\\s*\\)"]]),di=".*?"+/(?:[^\\](?:\\\\)*)/.source,pi=new RegExp(li.map(function(t){var n=t[0],i=t[1];return"("+n+")("+di+")("+i+")"}).join("|"),"g"),wi=/url\(["']?(.+?)["']?\)/g,gi=/^\s*\/\//;function mi(t){return"BackCompat"==t.compatMode}function yi(t){return t&&t.body&&t.documentElement?mi(t)?[t.body.clientWidth,t.body.clientHeight]:[t.documentElement.clientWidth,t.documentElement.clientHeight]:[0,0]}var bi=function(){function t(t,n){var i,r,e,s;this.hasKnownPosition=!1,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.clientWidth=0,this.clientHeight=0;var o=t.document;if(o&&o.documentElement&&o.body){i=yi(o),this.clientWidth=i[0],this.clientHeight=i[1];var u=t.visualViewport;if(u){this.hasKnownPosition=!0,this.pageTop=u.pageTop-u.offsetTop,this.pageLeft=u.pageLeft-u.offsetLeft,0==this.pageTop&&(this.pageTop=0),0==this.pageLeft&&(this.pageLeft=0);var a=null!==(e=xi(t,"innerWidth"))&&void 0!==e?e:0,c=null!==(s=xi(t,"innerHeight"))&&void 0!==s?s:0;if(a>0&&c>0)return this.width=a,void(this.height=c)}if(void 0!==n&&this.clientWidth==n.clientWidth&&this.clientHeight==n.clientHeight&&n.width>0&&n.height>0)return this.width=n.width,void(this.height=n.height);r=this.tt(t),this.width=r[0],this.height=r[1]}}return t.prototype.tt=function(t){var n=this.it(t,"width",this.clientWidth,this.clientWidth+128);void 0===n&&(n=xi(t,"innerWidth")),void 0===n&&(n=this.clientWidth);var i=this.it(t,"height",this.clientHeight,this.clientHeight+128);return void 0===i&&(i=xi(t,"innerHeight")),void 0===i&&(i=this.clientHeight),[n,i]},t.prototype.it=function(t,n,i,r){if(o.matchMedia){var e=i,s=r,u=o.matchMedia(t,"(min-"+n+": "+e+"px)");if(null!=u){if(u.matches&&o.matchMedia(t,"(max-"+n+": "+e+"px)").matches)return e;for(;e<=s;){var a=o.mathFloor((e+s)/2);if(o.matchMedia(t,"(min-"+n+": "+a+"px)").matches){if(o.matchMedia(t,"(max-"+n+": "+a+"px)").matches)return a;e=a+1}else s=a-1}}}},t}();function Ei(t,n){return new bi(t,n)}var Si=function(t,n){this.offsetLeft=0,this.offsetTop=0,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.scale=0;var i=t.document;if(i.body){"pageXOffset"in t?(this.pageLeft=t.pageXOffset,this.pageTop=t.pageYOffset):i.scrollingElement?(this.pageLeft=i.scrollingElement.scrollLeft,this.pageTop=i.scrollingElement.scrollTop):mi(i)?(this.pageLeft=i.body.scrollLeft,this.pageTop=i.body.scrollTop):i.documentElement&&(i.documentElement.scrollLeft>0||i.documentElement.scrollTop>0)?(this.pageLeft=i.documentElement.scrollLeft,this.pageTop=i.documentElement.scrollTop):(this.pageLeft=i.body.scrollLeft||0,this.pageTop=i.body.scrollTop||0),this.offsetLeft=this.pageLeft-n.pageLeft,this.offsetTop=this.pageTop-n.pageTop;var r=0,e=0;try{r=t.innerWidth,e=t.innerHeight}catch(t){return}if(0!=r&&0!=e){this.scale=n.width/r,this.scale<1&&(this.scale=1);var s=n.width-n.clientWidth,o=n.height-n.clientHeight;this.width=r-s/this.scale,this.height=e-o/this.scale}}};function xi(t,n){try{return t[n]}catch(t){return}}function ki(t){var n=t;return n.tagName?"object"==typeof n.tagName?"form":n.tagName.toLowerCase():null}var _i,Ai,Ii=new RegExp("[^\\s]"),Ti=new RegExp("[\\s]*$");function Ci(t){var n=Ii.exec(t);if(!n)return t;for(var i=n.index,r=(n=Ti.exec(t))?t.length-n.index:0,e="\uFFFF",s=t.slice(i,t.length-r).split(/\r\n?|\n/g),o=0;o0&&n.length<1e4;){var i=n.pop();delete Mi[i.id],i.node._fs==i.id&&(i.node._fs=0),i.id=0,i.next&&n.push(i.next),i.child&&n.push(i.child)}jt(n.length<1e4,"clearIds is fast")}function Qi(t,n){void 0===n&&(n=1024);try{var i={tokens:[],opath:[],cyclic:Vi(t,n/4)};return $i(t,n,0,i),i.tokens.join("")}catch(t){return lt(t)}}function Vi(t,n){var i=0;try{o.jsonStringify(t,function(t,r){if(i++>n)throw"break";if("object"==typeof r)return r})}catch(t){return"break"!=t}return!1}var zi=function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.length<=i.length||n<=i.length?t.substring(0,n):t.substring(0,n-i.length)+i};function $i(t,n,i,r){if(n<1)return 0;var e=function(t){switch(!0){case function(t){return!(!t||t.constructor!=Date)}(t):return n=t,isNaN(n)?"Invalid Date":n.toUTCString();case function(t){return"object"==typeof Node?t instanceof Node:t&&"object"==typeof t&&t.nodeType>0&&"string"==typeof t.nodeName}(t):return function(t){return t.toString()}(t);case void 0===t:return"undefined";case"object"!=typeof t||null==t:return t;case t instanceof Error:return[t.toString(),t.stack].filter(Boolean).join(",");}var n}(t);if(void 0!==e){var s=function(t,n){var i=o.jsonStringify(t);return i&&"\""==i[0]?zi(i,n,"...\""):i}(e,n);return"string"==typeof s&&s.length<=n?(r.tokens.push(s),s.length):0}if(r.cyclic){r.opath.splice(i);var u=r.opath.lastIndexOf(t);if(u>-1){var a="";return a="\""+zi(a,n-2)+"\"",r.tokens.push(a),a.length}r.opath.push(t)}var c=n,h=function(t){return c>=t.length&&(c-=t.length,r.tokens.push(t),!0)},f=function(t){var n=r.tokens.length-1;","===r.tokens[n]?r.tokens[n]=t:h(t)};if(c<2)return 0;if(tt(t)){h("[");for(var v=0;v0;v++){var l=$i(t[v],c-1,i+1,r);if(c-=l,0==l&&!h("null"))break;h(",")}f("]")}else{h("{");var d=nt(t);for(v=0;v0;v++){var p=d[v],w=t[p];if(!h("\""+p+"\":"))break;if(0==(l=$i(w,c-1,i+1,r))){r.tokens.pop();break}c-=l,h(",")}f("}")}return n==1/0?1:n-c}var Gi,Xi,Ji=function(){function t(){var n=this;this.rt=Tt.wrap(function(){n.unregister(),n.et&&n.et()}),this.st=0,this.ot=t.ut++}return t.ct=function(){t.checkedAlready=!1,t.ht=0},t.checkForBrokenSchedulers=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i;return(0,e.__generator)(this,function(r){switch(r.label){case 0:return!o.requestWindowAnimationFrame||t.checkedAlready||(n=p())-t.ht<100?[2,!1]:(t.ht=n,t.checkedAlready=!0,[4,new Yn(function(t){return o.requestWindowAnimationFrame(window,t)})]);case 1:return r.sent(),i=[],rt(t.ft,function(t){var r=t.vt(n);r&&i.push(r)}),[4,Yn.all(i)];case 2:return r.sent(),o.requestWindowAnimationFrame(window,Tt.wrap(function(){t.checkedAlready=!1})),[2,!0];}})})},t.stopAll=function(){rt(this.ft,function(t){return t.stop()})},t.prototype.setTick=function(t){this.et=t},t.prototype.stop=function(){this.cancel(),delete t.ft[this.ot]},t.prototype.register=function(n){this.st=p()+100+1.5*n,t.ft[this.ot]=this},t.prototype.timerIsRunning=function(){return null!=t.ft[this.ot]},t.prototype.unregister=function(){delete t.ft[this.ot]},t.prototype.vt=function(t){if(t>this.st)return Yn.resolve().then(this.rt)["catch"](function(){})},t.ft={},t.ut=0,t.checkedAlready=!1,t.ht=0,t}(),Zi=function(t){function n(n){var i=t.call(this)||this;return i.lt=n,i.dt=-1,i}return(0,e.__extends)(n,t),n.prototype.start=function(t){var n=this;-1==this.dt&&(this.setTick(function(){t(),n.register(n.lt)}),this.dt=o.setWindowInterval(window,this.rt,this.lt),this.register(this.lt))},n.prototype.cancel=function(){-1!=this.dt&&(o.clearWindowInterval(window,this.dt),this.dt=-1,this.setTick(function(){}))},n}(Ji),Yi=function(t){function n(n,i,r){void 0===i&&(i=0);for(var e=[],s=3;sn&&(this.St=t-n,this.St>1e3&&this.kt("timekeeper set with future ts"))},t.prototype.kt=function(t){Qi({msg:t,skew:this.St,startTime:this.xt,wallTime:this.wallTime()},1024)},t}(),ir=function(){function t(t,n){this._t=t,this.At=n,this.It=!1,this.Tt={},this.Ct={},this.Pt={},this.jt=!1,this.Ot=!1,Gi=this,this.Mt=t.window.document}return t.prototype.start=function(){var t;(t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))&&t.set&&(rr||(yt(HTMLInputElement,"value",ar),yt(HTMLInputElement,"checked",ar),yt(HTMLSelectElement,"value",ar),yt(HTMLTextAreaElement,"value",ar),yt(HTMLSelectElement,"selectedIndex",ar),yt(HTMLOptionElement,"selected",ar),rr=!0),1)||(this.It=!0)},t.prototype.hookInstance=function(t){if("input"===ki(t))switch(t.type){case"checkbox":case"radio":bt(t,"checked",ar);break;default:bt(t,"value",ar);}},t.prototype.addInput=function(t){if(t){var n=Bi(t);if(n){"input"===ki(t)&&this.Kt(t);var i=!1;if(function(t){switch(t.type){case"checkbox":case"radio":return t.checked!=t.hasAttribute("checked");default:return(t.value||"")!=function(t){if("select"!=ki(t))return t.getAttribute("value")||"";var n=t,i=n.querySelector("option[selected]")||n.querySelector("option");return i&&i.value||""}(t);}}(t)&&(this.Rt(t),i=!0),this.It&&(this.Tt[n]={elem:t}),!i)if(hr(t)){var r=or(t);t.checked&&(this.Pt[r]=n)}else this.Ct[n]=cr(t)}}},t.prototype.Kt=function(t){if(this.jt)this.Ot&&this.hookInstance(t);else{var n="checkbox"===t.type||"radio"===t.type?"checked":"value",i=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,n),r=Object.getOwnPropertyDescriptor(t,n);i&&r&&i!==r&&(this.Ot=!0,this.hookInstance(t)),this.jt=!0}},t.prototype.diffValue=function(t,n){void 0===n&&(n=cr(t));var i=Bi(t);if(!t||!i)return!1;if(hr(t)){var r=or(t);return this.Pt[r]===i!=("true"===n)}return this.Ct[i]!==n},t.prototype.onChange=function(t,n,i){void 0===i&&(i=cr(t));var r=Bi(t);t&&r&&(n||this.diffValue(t,i))&&this.Rt(t,n)},t.prototype.onKeyboardChange=function(t){var n,i=function(t){for(var n=t.activeElement;n&&n.shadowRoot;){var i=n.shadowRoot.activeElement;if(!i)return n;n=i}return n}(this.Mt);i&&("value"in(n=i)||"checked"in n)&&!Hi(i)&&this.diffValue(i)&&this.Rt(i,t)},t.prototype.tick=function(){for(var t in this.Tt){var n=this.Tt[t],i=n.elem;if(Bi(i))try{delete this.Tt[t];var r=cr(i);if(this.diffValue(i,r))this.Rt(i);else if(n.noFsIdInOption){var e=i;Array.prototype.slice.call(e.options).every(function(t){return Bi(t)})&&(n.noFsIdInOption=!1,this.Rt(i))}}finally{this.It&&(this.Tt[t]=n)}else delete this.Tt[t],delete this.Ct[t],hr(i)&&delete this.Pt[or(i)]}},t.prototype.stop=function(){Gi=void 0},t.prototype.Rt=function(t,n){var i=this;void 0===n&&(n=!1);var r=Bi(t);if(t&&r&&!this.Ht(r,t)){var e=cr(t);if(hr(t)){var s=or(t);"false"===e&&this.Pt[s]===r?delete this.Pt[s]:"true"===e&&(this.Pt[s]=r)}else this.Ct[r]=e;this._t.measurer.requestMeasureTask(ii.Medium,function(){var s=t.getBoundingClientRect(),o=s.width>0&&s.height>0,u=Ni(t)?Ci(e):e;i.At.enqueue({Kind:Ot.VALUECHANGE,Args:[r,u,n,o]})})}},t.prototype.Ht=function(t,n){if(this.Tt[t])return!0;if("select"!==ki(n))return!1;for(var i=n.options,r=0;r-1||wr.indexOf("Trident/")>-1,mr=(gr&&wr.indexOf("Trident/5"),gr&&wr.indexOf("Trident/6"),gr&&wr.indexOf("rv:11")>-1),yr=wr.indexOf("Edge/")>-1,br=(wr.indexOf("CriOS"),wr.indexOf("Snapchat")>-1),Er=/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);function Sr(){var t=window.navigator.userAgent.match(/Version\/(\d+)/);return t&&t[1]?parseInt(t[1],10):-1}function xr(t){if(!Er)return!1;var n=Sr();return n>=0&&n===t}function kr(t){if(!Er)return!1;var n=Sr();return n>=0&&nne?(Tt.sendToBugsnag("Ignoring huge text node","warning",{length:s}),""):t.parentNode&&"style"==ki(t.parentNode)?r:e.mask?Ci(r):r}function re(t){return Kr[t]||t.toLowerCase()}var ee=/^\s*((prefetch|preload|prerender)\s*)+$/i,se=/^\s*.*((worklet|script|worker|font|fetch)\s*)+$/i;function oe(t,n,i,r,e){var s,u;if(void 0===r&&(r=ki(t)),void 0===e&&(e=Ui(t)),null===r||""===n)return null;if("link"===r&&ee.test(null!==(s=t.getAttribute("rel"))&&void 0!==s?s:"")&&!se.test(null!==(u=t.getAttribute("as"))&&void 0!==u?u:""))return null;var a,c="style"===n?ae(i):i,h=function(t,n,i){var r,e,s,u,a,c,h,f,v,l,d,p,w,g=void 0;(null===(r=null==n?void 0:n.watchKind)||void 0===r?void 0:r.has(_i.Exclude))?g=Yt.Exclude:(null==n?void 0:n.mask)&&(g=Yt.Mask);var m=[null===(u=null===(s=null===(e=Ee.blocklist[Yt.Any])||void 0===e?void 0:e[t])||void 0===s?void 0:s["static"])||void 0===u?void 0:u[i],null===(h=null===(c=null===(a=Ee.blocklist[Yt.Any])||void 0===a?void 0:a["*"])||void 0===c?void 0:c["static"])||void 0===h?void 0:h[i],g?null===(l=null===(v=null===(f=Ee.blocklist[g])||void 0===f?void 0:f[t])||void 0===v?void 0:v["static"])||void 0===l?void 0:l[i]:void 0,g?null===(w=null===(p=null===(d=Ee.blocklist[g])||void 0===d?void 0:d["*"])||void 0===p?void 0:p["static"])||void 0===w?void 0:w[i]:void 0];return Ee.hasPrefix&&m.push(ke(Yt.Any,t,i),ke(Yt.Any,"*",i),g?ke(g,t,i):void 0,g?ke(g,"*",i):void 0),function(t){var n=t.filter(function(t){return void 0!==t});if(0!==n.length)return o.mathMin.apply(o,n)}(m)}(r,e,n);if(void 0===h&&!e)return null;switch(h){case void 0:return c;case tn.Erase:return null;case tn.MaskText:return Ci(c);case tn.ScrubCss:return a=function(t,n,i){return""+t+Se+i},c.replace(pi,function(t){for(var n=[],i=1;i-1)return f.substring(v)}return f;default:return(0,Ir.nt)(h);}}var ue={},ae=function(t,n){void 0===n&&(n=window);try{var i=n.location,r=""+i.origin+i.pathname+i.search,e=ue[r];return e?e.lastIndex=0:(e=new RegExp((s=r,($r.test(s)?s.replace(zr,"\\$&"):s)+"/?(#)"),"g"),ue[r]=e),t.replace(e,"https://fs-currenturl.invalid$1")}catch(n){return Ut("cleanCSS",n),t}var s},ce=/^data:/i;function he(t,n){if(ce.test(t))return t;switch(n.source){case"dom":switch(i=n.type){case"frame":case"iframe":return we(t);default:return fe(t);}case"event":switch(i=n.type){case Ot.AJAX_REQUEST:case Ot.NAVIGATE:return fe(t);case Ot.SET_FRAME_BASE:return we(t);default:return(0,Ir.nt)(i);}case"log":return we(t);case"page":var i;switch(i=n.type){case"base":return we(t);case"referrer":case"url":return fe(t);default:return(0,Ir.nt)(i);}case"perfEntry":switch(n.type){case"frame":case"iframe":case"navigation":case"other":return we(t);default:return fe(t);}default:return(0,Ir.nt)(n);}}function fe(t){return ge(de,t)}var ve=cn.DefaultOrgSettings.MaxUrlLength,le=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig),de=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig);function pe(t,n){le=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig.concat(t)),de=Rr(t),ve=n||cn.DefaultOrgSettings.MaxUrlLength}function we(t){return ge(le,t)}function ge(t,n){return function(t,n,i){void 0===i&&(i=Lr);for(var r={Hash:[],Host:[],Path:[],QueryParam:[],Query:[]},e=0,s=t;e").replace(ye,function(t){return he(t,{source:"log",type:"debug"})})}var Ee,Se="https://fs-excluded.invalid";function xe(t){var n,i,r,e,s,o,u,a,c,h,f,v,l,d,p,w;try{for(var g=(Ee={blocklist:{},hasPrefix:!1}).blocklist,m=(null!==(r=null==t?void 0:t.length)&&void 0!==r?r:0)>0?t:cn.DefaultOrgSettings.AttributeBlocklist,y={},b=0,E=m;b-1;var n}var Te="#polyfillshadow";function Ce(t){var n;return(null===(n=t.childNodes)||void 0===n?void 0:n.length)>0}function Pe(t,n){Oe(t.childNodes,n)}function je(t,n){Oe(t.childNodes,n,!0)}function Oe(t,n,i){void 0===i&&(i=!1);for(var r=i?t.length-1:0,e=i?-1:t.length;r!==e;){var s=t[r];s&&"frag"in s&&!St(s)&&Array.isArray(s.frag)?s.frag.length&&Oe(s.childNodes,n,i):n(s),i?--r:++r}}var Me={INPUT:!0,TEXTAREA:!0,NOSCRIPT:!0},Ke=function(){function t(t,n,i){this.Xt=t,this.Jt=n,this.Zt=i,Mi={},Ki=1}return t.prototype.tokenizeNode=function(t,n,i,r,e,s,o){var u=this,a=Ui(n),c=Ui(i),h=[];return function(n){var i=Ki;try{return u.Yt(t,a,c,r,h,e,s,o),!0}catch(t){return Ki=i,!1}}()||(h=[]),h},t.prototype.Yt=function(t,n,i,r,s,o,u,a){for(var c,h,f=[{parentMirror:n,nextMirror:i,node:r}],v=function(t,n){return function(i){i&&t.push({parentMirror:n,nextMirror:null,node:i})}};f.length;){var l=f.pop();if(l)if("string"!=typeof l){var d=l.node,p=ki(d),w=this.tn(t,p,l,s,o,u);if(null!=w&&!(null===(c=w.watchKind)||void 0===c?void 0:c.has(_i.Exclude))){var g=1===d.nodeType?d.shadowRoot:null,m=w.shadowRootType===Te&&window.HTMLSlotElement&&"slot"===p&&d.assignedNodes();if(g||m||Ce(d))if(null===(h=w.watchKind)||void 0===h?void 0:h.has(_i.Defer))a(w.node,Ai.Deferred);else{if(f.push("]"),je(d,v(f,w)),g)f.push({parentMirror:w,nextMirror:null,node:g});else if(m&&m.length>0){for(var y=[],b=!1,E=0,S=m;E1e3)return null;if(!i||1!=i.nodeType)return null;var r=i;if(getComputedStyle(r).display.indexOf("inline")<0)return r;i=i.parentNode}},n}(Ze),ts=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,e.__extends)(n,t),n.prototype.observe=function(t){var n=this;if(t&&1==t.nodeType){var i=t;this.Tn(Ui(t)),this._t.measurer.requestMeasureTask(ii.Medium,function(){n.addEntry(i)})}},n.prototype.unobserveSubtree=function(t){var n=Ui(t);n&&this.Cn(n)},n.prototype.nodeChanged=function(t){var n=this,i=this.Pn(t);this._t.measurer.requestMeasureTask(ii.Medium,function(){for(var t=0,r=i;t0||this.Hn.length>0){var r={},s={};for(var o in (this.Gn(t,i,s,r), s)){var u=o.split("\t");i.push({Kind:Ot.MUT_ATTR,Args:[parseInt(u[0],10),u[1],s[o]],When:t})}for(var o in r)i.push({Kind:Ot.MUT_TEXT,Args:[parseInt(o,10),r[o]],When:t})}var a=this.Rn;this.Rn=[];for(var c=0;c0&&(i.push({Kind:Ot.DEFERRED_RESOLVED,Args:(0,e.__spreadArray)([],this.Ln),When:t}),this.Ln=[]),this.Nn.length>0){for(var f=0,v=this.Nn;f0&&this.Un.push(es(l))}this.Nn=[]}return i},t.prototype.recordingIsDetached=function(){return!!this.Wn&&this.Wn!=this.Dn.document},t.prototype.$n=function(t,n){if(!this.Kn&&this.Wn){window;var i=this.Xt.allWatchedElements(this.Wn);this.Zn(i,t,n,null,this.Wn,null),this.Jt.nodeChanged(this.Wn),this.qn&&this.Xn(this.Wn),this.Kn=!0,this.Yn(),window}},t.prototype.Yn=function(){var t=this;this.zn=mt(Element.prototype,"attachShadow",!0),this.zn&&this.zn.before(function(n){n.that.shadowRoot||t.Rn.push(n.that)})},t.prototype.Xn=function(t){var n;try{null===(n=this.qn)||void 0===n||n.observe(t,{childList:!0,attributes:!0,characterData:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}catch(t){}},t.prototype.Gn=function(t,n,i,r){for(var e,s,o,u,a=this,c={},h={},f=function(i){if(Ui(i)){a.ti(t,n,Ui(i));var r=Ui(i.parentNode);r&&(h[r.id]=r.node)}},v=0;v0)for(var m=0;m0){h[g]=l.target;var y=!(null==(T=l.target)?void 0:T.shadowRoot)||Ie(T.shadowRoot)?null:Ui(T.shadowRoot);y&&(h[y.id]=y.node)}break;case"characterData":Hi(l.target)||l.oldValue!=l.target.textContent&&(r[g]=ie(l.target));break;case"attributes":var b=ki(j=l.target);if("link"===b&&"rel"===l.attributeName&&ee.test(null!==(o=l.oldValue)&&void 0!==o?o:"")){f(j);break}var E,S=Li(j),x=this.Xt.isWatched(j);if($e(x)>$e(S)){f(j);break}De.needsToObserve(S,x)&&(this.Jt.observe(j),(null==x?void 0:x.has(_i.Watch))&&(null===(u=this.Zt)||void 0===u||u.observe(j)),(E=Ui(j))&&(E.watchKind=De.combineKindsPreservePrivacy(S,x)));var k=(void 0===(I=l.attributeNamespace)&&(I=""),(null===I?"":{"http://www.w3.org/1999/xlink":"xlink:","http://www.w3.org/XML/1998/namespace":"xml:","http://www.w3.org/2000/xmlns/":"xmlns:"}[I]||"")+(l.attributeName||"")),_=re(k);if("dialog"===b&&"open"===k)break;if(j.hasAttribute(k)){var A=l.target.getAttribute(k);l.oldValue!=A&&(A=oe(l.target,_,A||"",b),this.Mn(b,l.target,((e={})[_]=A||"",e)),null!==A&&(i[g+"\t"+_]=A))}else i[g+"\t"+_]=null;}}catch(t){}for(var I,T,C=0,P=this.Hn;C0&&i.push({Kind:Ot.MUT_SHADOW,Args:[s,u],When:n},{Kind:Ot.TIMING,Args:[[Nt.Internal,Kt.Serialization,Ht.NodeEncoding,n,a]],When:n})},t.prototype.Zn=function(t,n,i,r,e,s){var o=Di(r)||-1,u=Di(s)||-1,a=-1===o&&-1===u,c=p();window;var h=this.ei(t,r,e,s);window;var f=p()-c;h.length>0&&i.push({Kind:Ot.MUT_INSERT,Args:[o,u,h],When:n},{Kind:Ot.TIMING,Args:[[Nt.Internal,Kt.Serialization,a?Ht.DomSnapshot:Ht.NodeEncoding,n,f]],When:n})},t.prototype.ei=function(t,n,i,r){var e=this;if(n&&Hi(n))return[];for(var s=[],o=this.Bn.tokenizeNode(t,n,r,i,function(t){if(1==t.nodeType){var n=t;if(n.shadowRoot&&e.Xn(n.shadowRoot),"SLOT"===t.nodeName){var i=Ui(t);(null==i?void 0:i.shadowRootType)===Te&&t.addEventListener("slotchange",Tt.wrap(function(n){var i;e.Hn.push(null!==(i=n.target)&&void 0!==i?i:t)}))}}e.jn(t,s)},this.Mn,function(t,n){switch(n){case Ai.Immediate:e.refreshElement(t);break;case Ai.Deferred:e.Nn.push(t);}}),u=0,a=s;u0){var e=n[n.length-1];if(e.Kind==Ot.MUT_REMOVE)return void e.Args.push(r)}n.push({Kind:Ot.MUT_REMOVE,Args:[r],When:t})},t.prototype.setUpIEWorkarounds=function(){var n=this;if(mr){var i=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"),r=i&&i.set;if(!i||!r)throw new Error("Missing textContent setter -- not safe to record mutations.");Object.defineProperty(Element.prototype,"textContent",(0,e.__assign)((0,e.__assign)({},i),{set:function(t){try{for(var n=void 0;n=this.firstChild;)this.removeChild(n);if(null===t||""==t)return;var i=(this.ownerDocument||document).createTextNode(t);this.appendChild(i)}catch(n){r&&r.call(this,t)}}}))}this.si=new tr(t.ThrottleMax,t.ThrottleInterval,function(){return new Yi(function(){n.Fn=!0,n.tearDownIEWorkarounds()}).start()});var s=this.si.guard(function(t){var n=t.cssText;t.cssText=n});this.si.open(),this.oi=mt(CSSStyleDeclaration.prototype,"setProperty"),this.oi&&this.oi.afterSync(function(t){s(t.that)}),this.ui=mt(CSSStyleDeclaration.prototype,"removeProperty"),this.ui&&this.ui.afterSync(function(t){s(t.that)})},t.prototype.tearDownIEWorkarounds=function(){this.si&&this.si.close(),this.oi&&this.oi.disable(),this.ui&&this.ui.disable()},t.prototype.updateConsent=function(){var t=this;this.Wn&&Pe(this.Wn,function(n){return t.refreshElement(n)})},t.prototype.refreshElement=function(t){Di(t)&&this.Hn.push(t)},t.ThrottleMax=1024,t.ThrottleInterval=1e4,t;}();function os(t){for(var n=new WeakMap,i=t;i;i=i.parentNode){if(n.has(i))return null;if(n.set(i,!0),11===i.nodeType)break}if(!i)return null;var r=Ui(i);return(null==r?void 0:r.shadowRootType)===Te&&(null==r?void 0:r.parent)?[r.parent.id,r.parent.node]:null}var us="navigation",as="resource",cs="paint",hs="measure",fs="mark",vs="layout-shift",ls="first-input",ds="largest-contentful-paint",ps="longtask",ws=function(){function t(t,n,i,r){var e=this;this._t=t,this.At=n,this.ai=r,this.ci=!1,this.hi=!1,this.fi=!1,this.vi=!1,this.li=!1,this.di=!1,this.pi=!1,this.wi=cn.DefaultOrgSettings.MaxPerfMarksPerPage,this.gi=0,this.mi=!1,this.yi=!1,this.bi=!1,this.Ei=!1,this.Si=0,this.xi=!1,this.qn=null,this.ki=[],this._i=new Yn(function(t){e.Ai=function(){t({timeRemaining:function(){return Number.POSITIVE_INFINITY},didTimeout:!1}),e.Ai=void 0}}),this.Ii=!1;var s=window.performance;s&&(this.fi=!0,s.timing&&(this.vi=!0),s.memory&&(this.di=!0),s.timeOrigin&&(this.pi=!0),"function"==typeof s.getEntries&&(this.li=!0),this.mi=gs(window,vs),this.yi=gs(window,ls),this.bi=gs(window,ds),this.Ei=gs(window,ps),this.T=i.createChild())}return t.prototype.initialize=function(t){var n=t.resourceUploader,i=t.recTimings,r=t.recImgs,e=t.maxPerfMarksPerPage;this.Ti=n,this.hi=i,this.ci=r,this.wi=e||cn.DefaultOrgSettings.MaxPerfMarksPerPage},t.prototype.start=function(){var t=this;this.gi=0;var n=window.performance;n&&(this._t.recording.inFrame||this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Performance,this.vi,zt.PerformanceEntries,this.li,zt.PerformanceMemory,this.di,zt.PerformanceObserver,!!window.PerformanceObserver,zt.PerformanceTimeOrigin,this.pi,zt.LayoutShift,this.mi,zt.FirstInput,this.yi,zt.LargestContentfulPaint,this.bi,zt.LongTask,this.Ei]}),this.Xn(),!this.qn&&n.addEventListener&&n.removeEventListener&&this.T&&this.T.add(n,"resourcetimingbufferfull",!0,function(){t.At.enqueue({Kind:Ot.RESOURCE_TIMING_BUFFER_FULL,Args:[]})}),this.Ci(),this.Pi())},t.prototype.ji=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(t){switch(t.label){case 0:if(!this.fi||!this.li||0==this.ki.length)return[2];if(this.Ii)return[2];this.Ii=!0,t.label=1;case 1:return t.trys.push([1,,3,4]),[4,this.Oi()];case 2:return t.sent(),[3,4];case 3:return this.Ii=!1,this.ki=[],[7];case 4:return[2];}})})},t.prototype.Mi=function(){return this.Ai?Yn.race([this._i,si(250,1e3)]):this._i},t.prototype.Oi=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t,n,i,r,s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t=0,n=0,i=this.ki,e.label=1;case 1:if(!(nt?[4,this.Mi()]:[3,4]):[3,6];case 3:a=e.sent(),t=p()+Math.max(a.timeRemaining(),15),e.label=4;case 4:this.Ki(u),e.label=5;case 5:return s++,[3,2];case 6:return n++,[3,1];case 7:return[2];}})})},t.prototype.onLoad=function(){this.xi||(this.xi=!0,this.vi&&(this.Ri(performance.timing),this.ji()))},t.prototype.tick=function(){this.Ci()},t.prototype.stop=function(){var t;this.T&&this.T.clear(),this.Ti=void 0;var n=[];this.qn?(this.qn.takeRecords&&(n=this.qn.takeRecords()),this.qn.disconnect()):window.performance&&window.performance.getEntries&&(n=window.performance.getEntries()),n.length>300&&(n=n.slice(0,300),this.At.enqueue({Kind:Ot.RESOURCE_TIMING_BUFFER_FULL,Args:[]})),this.Ci(),null===(t=this.Ai)||void 0===t||t.call(this),this.ki.push(n),this.ji()},t.prototype.Xn=function(){var t=this;if(!this.qn&&this.li&&window.PerformanceObserver){this.ki.push(performance.getEntries()),this.ji(),this.qn=new window.PerformanceObserver(function(n){var i=n.getEntries();t.ki.push(i),t.ji()});var n=[us,as,hs,fs];window.PerformancePaintTiming&&n.push(cs),this.mi&&n.push(vs),this.yi&&n.push(ls),this.bi&&n.push(ds),this.Ei&&n.push(ps),this.qn.observe({entryTypes:n})}},t.prototype.Ci=function(){if(this.di&&!this._t.recording.inFrame){var t=performance.memory;if(t){var n=t.usedJSHeapSize-this.Si;(0==this.Si||o.mathAbs(n/this.Si)>.2)&&(this.Hi(Qt.Memory,t,Vt.Memory),this.Si=t.usedJSHeapSize)}}},t.prototype.Pi=function(){var t={timeOrigin:d.timeOrigin};this.Hi(Qt.TimeOrigin,t,Vt.TimeOrigin)},t.prototype.Ki=function(t){switch(t.entryType){case us:this.Ni(t);break;case as:this.Li(t);break;case cs:this.Ui(t);break;case hs:this.Fi(t);break;case fs:this.Di(t);break;case vs:this.Bi(t);break;case ls:this.Wi(t);break;case ds:this.qi(t);break;case ps:this.Qi(t);}},t.prototype.Ri=function(t){this.Hi(Qt.Timing,t,Vt.Timing)},t.prototype.Ni=function(t){this.Hi(Qt.Navigation,t,Vt.Navigation,{name:us})},t.prototype.Li=function(t){if(this.hi){var n=t.initiatorType;(this.ci||"img"!==n&&"image"!==n)&&this.Hi(Qt.Resource,t,Vt.Resource,{name:n})}},t.prototype.Ui=function(t){this.Hi(Qt.Paint,t,Vt.Measure)},t.prototype.Di=function(t){this.Hi(Qt.Mark,t,Vt.Measure)},t.prototype.Fi=function(t){this.Hi(Qt.Measure,t,Vt.Measure)},t.prototype.Bi=function(t){this.Hi(Qt.LayoutShift,t,Vt.LayoutShift)},t.prototype.Wi=function(t){this.Hi(Qt.FirstInput,t,Vt.FirstInput)},t.prototype.qi=function(t){this.Hi(Qt.LargestContentfulPaint,t,Vt.LargestContentfulPaint)},t.prototype.Qi=function(t){this.Hi(Qt.LongTask,t,Vt.Measure)},t.prototype.Hi=function(t,n,i,r){if(void 0===r&&(r={}),!this.atLimit(t)){for(var e=[t],s=0,o=i;s=this.wi)return!0;this.gi++;}return!1},t}();function gs(t,n){var i,r;return(null!==(r=null===(i=t.PerformanceObserver)||void 0===i?void 0:i.supportedEntryTypes)&&void 0!==r?r:[]).indexOf(n)>-1}function ms(t){var n=0,i={id:n++,edges:{}};return t.split("\n").forEach(function(t){var r=t.trim();if(""!=r){if(0==r.indexOf("/")||r.lastIndexOf("/")==r.length-1)throw new Error("Leading and trailing slashes are not supported");var e=i,s=r.split("/");s.forEach(function(t,i){var r=t.trim();if(""===r)throw new Error("Empty elements are not allowed");if("**"!=r&&"*"!=r&&-1!=r.indexOf("*"))throw new Error("Embedded wildcards are not supported");var o=null;r in e.edges&&(o=e.edges[r]),o||(o={id:n++,edges:{}},e.edges[r]=o),i==s.length-1&&(o.term=!0),e=o})}}),i}var ys=ms("**");function bs(t,n,i){if(!js(i)){try{for(var r=[],e=0,s=i;e=n&&(v?e=void 0:(e="_fs_trimmed_values",v=!0)),f[f.length-1]--,e&&e!==cn.BlockedFieldValue&&s?f.push(o.objectKeys(e).length):c.pop();f[f.length-1]<=0;)f.pop(),c.pop();for(var u=0,a=r;u0&&l!==f.length-1)throw new Error("Property matcher depth out of sync")}return e})}catch(t){Tt.sendToBugsnag(t,"error")}return"[error serializing "+t.constructor.name+"]"}}var Es=function(){function t(t){this.zi=1;var n=[t];t.edges["**"]&&n.push(t.edges["**"]),this.$i=[n]}return t.prototype.Gi=function(){if(this.$i.length<=0)return[];var t=this.$i.length-1,n=this.$i[t];return"number"==typeof n?this.$i[t-1]:n},t.prototype.depth=function(){return this.zi},t.prototype.isRedacted=function(t){var n=this.Gi();return 0===n.length||t&&!n.some(function(t){return t.term})},t.prototype.push=function(t){var n;this.zi++;var i=this.Gi(),r=[];function e(n){n.edges["**"]&&(r.push(n.edges["**"],Ss(n)),e(n.edges["**"])),n.edges["*"]&&r.push(n.edges["*"]),n.edges[t]&&r.push(n.edges[t])}for(var s=0,o=i;s0&&this.zi--;var t=this.$i[this.$i.length-1];"number"==typeof t&&t>1?this.$i[this.$i.length-1]--:this.$i.pop()},t}();function Ss(t){var n=t.edges["**"];if(!n)throw new Error("Node must have double-wildcard edge.");return ot(t.edges,1)?{id:-n.id,edges:{"**":n}}:t}var xs,ks,_s,As=function(){function t(t){this.Xi=t,this.Ji=null}return t.prototype.disable=function(){this.Ji&&(this.Ji.disable(),this.Ji=null)},t.prototype.enable=function(t){var n,i=this,r=T(t),s=null===(n=null==r?void 0:r._w)||void 0===n?void 0:n.fetch;(s||t.fetch)&&(this.Ji=mt(s?r._w:t,"fetch"),this.Ji&&this.Ji.afterSync(function(t){var n=t.result;t.result=(0,e.__awaiter)(i,void 0,void 0,function(){return(0,e.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.Zi(n,t.args[0],t.args[1])];case 1:case 2:return i.sent(),[3,3];case 3:return[2,n];}})})}))},t.prototype.Zi=function(t,n,i){return (0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u,a,c;return (0,e.__generator)(this,function(e){switch(e.label){case 0:return r="GET",s="",a=!1,"string"==typeof n?s=n:"url"in n?(s=n.url,r=n.method,o=n.body,u=n.headers,a=!!n.signal):s=""+n,s?(i&&(r=i.method||r,u=Ds(i.headers),o=i.body||o,a=!!i.signal||a),c=this.Yi(t),a&&s.search(/\/(graphql|gql)/i)>-1?[4,Yn.race([c,ni(5e3)])]:[3,2]):[2];case 1:e.sent(),e.label=2;case 2:return this.Xi.startRequest(r,s,{body:function(){return o},headers:u},c),[2];}});});},t.prototype.Yi=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i,r,s;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return[4,t];case 1:if(n=e.sent(),i=n.headers,r=(i.get("content-type")||"default").split(";")[0],!(["default","text/plain","text/json","application/json"].indexOf(r)>-1))return[2,{status:n.status,data:{headers:i,body:null}}];s=null,e.label=2;case 2:return e.trys.push([2,4,,5]),[4,n.clone().text()];case 3:return s=e.sent(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,{status:n.status,data:{headers:i,body:s}}];}})})},t;}(),Is=function(){function t(t){this.Xi=t,this.tr=new WeakMap}return t.prototype.disable=function(){this.nr&&(this.nr.disable(),this.nr=null),this.ir&&(this.ir.disable(),this.ir=null),this.rr&&(this.rr.disable(),this.rr=null)},t.prototype.er=function(t){var n=this.tr.get(t);if(n)return n;var i={};return this.tr.set(t,i),i},t.prototype.enable=function(t){var n,i,r,s,o=this,u=T(t),a=(null===(n=null==u?void 0:u._w)||void 0===n?void 0:n.XMLHttpRequest)||t.XMLHttpRequest;if(a){var c=a.prototype;this.nr=null===(i=mt(c,"open"))||void 0===i?void 0:i.before(function(t){var n=o.er(t.that);n.method=t.args[0],n.url=t.args[1]}),this.rr=null===(r=mt(c,"setRequestHeader"))||void 0===r?void 0:r.before(function(t){var n=t.that,i=t.args[0],r=t.args[1],e=o.er(n);e.headers||(e.headers=[]),e.headers.push([i,r])}),this.ir=null===(s=mt(c,"send"))||void 0===s?void 0:s.before(function(t){var n=t.that,i=t.args[0],r=o.er(n),s=r.url,u=r.method,a=r.headers;void 0!==s&&void 0!==u&&(o.tr["delete"](n),o.Xi.startRequest(u,s,{headers:Ds(a),body:i},function(t){return (0,e.__awaiter)(this,void 0,Yn,function(){var n;return (0,e.__generator)(this,function(i){switch(i.label){case 0:return[4,new Yn(function(n){t.addEventListener("readystatechange",function(){t.readyState===XMLHttpRequest.DONE&&n()}),t.addEventListener("load",n),t.addEventListener("error",n)})];case 1:return i.sent(),n=function(t){if(t)return {forEach:function(n){for(var i,r=/([^:]*):\s+(.*)(?:\r\n|$)/g;i=r.exec(t);)n(i[2],i[1])}};}(t.getAllResponseHeaders()),[2,{status:t.status,data:{headers:n,body:function(){return"text"===t.responseType?t.responseText:t.response}}}];}});});}(n)))})}},t;}(),Ts=/^data:/i,Cs=function(){function t(t,n){this._t=t,this.At=n,this.sr=!1,this.ur=new Ps(t,n),this.ar=new Is(this.ur),this.cr=new As(this.ur)}return t.prototype.isEnabled=function(){return this.sr},t.prototype.start=function(t){t.AjaxWatcher&&(this.sr||(this.sr=!0,this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Ajax,!0]}),this.ar.enable(this._t.window),this.cr.enable(this._t.window)))},t.prototype.stop=function(){this.sr&&(this.sr=!1,this.ar.disable(),this.cr.disable())},t.prototype.tick=function(){this.ur.tick()},t.prototype.setWatches=function(t){this.ur.setWatches(t)},t.prototype.initialize=function(t){this.ur.initialize(t)},t}(),Ps=function(){function t(t,n){this._t=t,this.At=n,this.hr=[],this.vr={},this.lr={},this.dr=[],this.pr=0;var i=cn.DefaultOrgSettings;this.initialize({requests:i.HttpRequestHeadersAllowlist,responses:i.HttpResponseHeadersAllowlist,maxAjaxPayloadLength:i.MaxAjaxPayloadLength})}return t.prototype.wr=function(t){for(var n=!1,i=!1,r=[],e=[],s=0,o=this.hr;s-1}function Os(t,n,i){return[t.length,Ns(t,n,i)]}function Ms(t,n,i){var r=void 0;return js(n)||(r=bs(t,i,n)),[Hs(t),r]}function Ks(t,n){var i=t.byteLength,r=void 0;return js(n)||(r="[ArrayBuffer]"),[i,r]}function Rs(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:if(s=(r=t).size,js(n))return[2,[s,void 0]];switch(r.type){case"application/json":case"application/vnd.api+json":case"text/plain":return[3,1];}return[3,4];case 1:return e.trys.push([1,3,,4]),[4,r.text()["catch"](function(t){Tt.sendToBugsnag(t,"warning")})];case 2:return(o=e.sent())&&(u=Ns(o,n,i))?[2,[s,u]]:[3,4];case 3:return a=e.sent(),Tt.sendToBugsnag(a,"warning"),[3,4];case 4:return[2,[s,"[Blob]"]];}})})}function Hs(t){try{return o.jsonStringify(t).length}catch(t){}return 0}function Ns(t,n,i){if(!js(n))try{return bs(o.jsonParse(t),i,n)}catch(r){return n.length>0&&n.every(function(t){return!0===t})?t.slice(0,i):void 0}}function Ls(t,n){switch(t){default:case Zt.Elide:return!1;case Zt.Record:return!0;case Zt.Allowlist:try{return ms(n)}catch(t){return!1}}}function Us(t,n,i,r){var s;return(0,e.__awaiter)(this,void 0,Yn,function(){var o,u,a,c,h,f,v;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return o="",null===(s=r.headers)||void 0===s||s.forEach(function(n,i){var r=i.toLowerCase(),e=t[r];o+=r+(e?": "+n:"")+"\r\n"}),"function"!=typeof(u=null==r?void 0:r.body)?[3,2]:[4,u()];case 1:return a=e.sent(),[3,3];case 2:a=u,e.label=3;case 3:return[4,Fs(n,a,i)];case 4:return c=e.sent(),h=c[0],f=c[1],v=0!==h||f?qt.NotEmpty:qt.Unknown,[2,{headers:o,text:f,size:h,legibility:v}];}})})}function Fs(t,n,i){return void 0===i&&(i=cn.DefaultOrgSettings.MaxAjaxPayloadLength),(0,e.__awaiter)(this,void 0,Yn,function(){var r;return(0,e.__generator)(this,function(e){if(null==n)return[2,[0,void 0]];switch(typeof n){default:return[2,[-1,js(t)?void 0:"[unknown]"]];case"string":return[2,Os(n,t,i)];case"object":switch(r=n.constructor){case Object:default:return[2,Ms(n,t,i)];case Blob:return[2,Rs(n,t,i)];case ArrayBuffer:return[2,Ks(n,t)];case Document:case FormData:case URLSearchParams:case ReadableStream:return[2,[-1,js(t)?void 0:""+r.name]];}}return[2]})})}function Ds(t){return t?tt(t)?{forEach:function(n){for(var i=0,r=t;i-1){if(n.unshift(e),r instanceof CSSStyleSheet)break;i=r}else Tt.sendToBugsnag("Could not find intermediate rule in parent","warning")}return n},t.prototype.Wr=function(t,n){for(var i=0;i=t?(this.oe-=t,[!0,0]):[!1,(t-this.oe)/this.ne]},t}())(2,2e5),ho=new Set(["measureText","getImageData","getError","getTransform","isContextLost","isEnabled","isFramebuffer","isProgram","isRenderbuffer","isShader","isTexture"]),fo=new Set(["fillText"]),vo=function(){function t(t,n,i,r){this.At=n,this.Ti=i,this.ai=r,this.ue=dn.CaptureCanvasOps,this.ae=[],this.ce=[],this.he=new WeakMap,this.fe=new WeakMap,this.ve=new Set,this.le=0,this.de=new WeakMap,this.pe=!1,this.we=new WeakMap,this.ge=new Set,this.me=new WeakMap,this.ye=1,this.be=new WeakMap,this.Ee=1,this.Se=0,this.xe=!1}return t.prototype.start=function(t){var n,i=this;if(t.CanvasWatcherMode&&(this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.CanvasWatcherEnabled,!0]}),this.pe=!0,this.ue=null!==(n=t.CanvasWatcherMode)&&void 0!==n?n:dn.CaptureCanvasOps,this.Ji("2d",CanvasRenderingContext2D),this.Ji("webgl",WebGLRenderingContext),this.ue===dn.ScreenshotCanvas)){if(!HTMLCanvasElement.prototype.toDataURL)return;this.le=setInterval(function(){return i.screenshotConnectedCanvases()},1e3)}},t.prototype.ke=function(t,n){return"object"!=typeof n?[void 0,0]:(this.be.has(n)||this.be.set(n,[t,this.Ee++]),this.be.get(n))},t.prototype.Ji=function(t,n){var i=this;if(n)for(var r=n.prototype,e=function(e){if(ho.has(e))return"continue";var o=Object.getOwnPropertyDescriptor(r,e);if("function"==typeof(null==o?void 0:o.value)){var u=mt(r,e);u&&(u.afterSync(function(n){return i._e(t,e,n.that,n.args,n.result)}),s.ae.push(u))}else"function"==typeof(null==o?void 0:o.set)&&s.ce.push(yt(n,e,s.Ae(t,e)))},s=this,o=0,u=Object.keys(r);o0){var o=n;if(!o){var u=t instanceof HTMLCanvasElement?Ui(t):void 0,a=t instanceof HTMLCanvasElement&&St(t);o=null!==(r=null==u?void 0:u.mask)&&void 0!==r?r:a}this.Pe(t,e,s,o)}return e}},t.prototype.je=function(t,n,i,r,e,s,o){var u;switch(typeof r){case"string":return e?Ci(r):r;case"number":case"boolean":case"bigint":return r;case"undefined":return{undef:!0};case"object":if(!r)return r;try{o.set(r,!0)}catch(t){}var a=null===(u=Object.getPrototypeOf(r))||void 0===u?void 0:u.constructor,c=(null==a?void 0:a.name)||function(t){var n;if(t){var i=t.toString(),r=po.exec(i);return r||(r=wo.exec(i)),null===(n=null==r?void 0:r[1])||void 0===n?void 0:n.trim()}}(a),h={ctor:c};if(r instanceof Node&&(l=Di(r)))return h.id=l,h;switch(c){case"Array":return this.Se+=r.length,this.Oe(t,n,i,r,e,s,o);case"CanvasGradient":return h;case"HTMLImageElement":var f=he(r.src,{source:"dom",type:"canvas"});return this.ai.record(f),h.src=f,h;case"HTMLCanvasElement":var v=r,l=this.flush(v,e);return h.srcId=l,h;}if(function(t){var n;return!!(null===(n=Object.prototype.toString.call(t))||void 0===n?void 0:n.match(lo))}(r))return this.be.has(r)?this.Me(r,h,e):(h.typedArray="["+r.toString()+"]",this.Se+=r.length,h);if("object"==typeof r&&this.be.has(r))return this.Me(r,h,e);if(r instanceof WebGLBuffer||r instanceof WebGLTexture){var d=void 0;switch(s){case"bindTexture":d=this.Ke(t,"createTexture",n,i,r);break;case"bindBuffer":d=this.Ke(t,"createBuffer",n,i,r);}if(void 0!==d)return this.Me(r,h,e)}var p=r;for(var w in (h.obj={}, p)){try{switch(typeof p[w]){case"function":continue;case"object":if(p[w]&&o.has(p[w]))continue;}}catch(t){continue}++this.Se,h.obj[w]=this.je(t,n,i,p[w],e,s,o)}return h;default:return null;}},t.prototype.Me=function(t,n,i){var r=this.be.get(t),e=r[0],s=r[1];return this.flush(e,i),n.ref=s,delete n.ctor,n},t.prototype.Ke=function(t,n,i,r,e){var s=this.ke(i,e),o=(s[0],s[1]);return this.Re(r,[[t,ln.Function,n,[],o]]),o},t.prototype.Oe=function(t,n,i,r,e,s,o){var u=this;return void 0===o&&(o=new WeakMap),this.Se+=r.length+1,r.map(function(r){return u.je(t,n,i,r,e,s,o)})},t.prototype.Pe=function(t,n,i,r){var e=this;if(void 0===r&&(r=!1),!this.xe){var s=i.map(function(i){var s=i[0],o=i[1],u=i[2],a=i[3],c=i[4];return[s,o,u,e.Oe(s,t,n,a,r&&fo.has(u),u),c]});if(!this.he.has(t)&&(this.he.set(t,!0),i.some(function(t){return"2d"===t[0]}))){var o=this.He(t);if(o.length>0)return o.push.apply(o,s),void this.Re(n,o)}this.Re(n,s)}},t.prototype.Re=function(t,n){if(!this.xe){var i=co.hasCapacityFor(this.Se),r=i[0];i[1],this.Se=0,r?this.At.enqueue({Kind:Ot.CANVAS,Args:[t,n]}):this.xe=!0}},t.prototype.He=function(t){var n=t.getContext("2d");if(!n)return[];var i=[];if((n instanceof CanvasRenderingContext2D||n instanceof OffscreenCanvasRenderingContext2D)&&"function"==typeof n.getTransform){var r=n.getTransform();if(!r.isIdentity){var e=r.a,s=r.b,o=r.c,u=r.d,a=r.e,c=r.f;i.push(["2d",ln.Function,"transform",[e,s,o,u,a,c],-1])}}return i},t.prototype.Ne=function(t,n){t instanceof HTMLCanvasElement&&(this.ue===dn.ScreenshotCanvas?(this.fe.set(t,!0),this.ve.add(t)):(this.ge.add(t),this.Ie(t,n)))},t.prototype._e=function(t,n,i,r,e){for(var s=[],o=0;o))/m,mo=/^(eval@)?(\[native code\])?$/;function yo(t){if(!t||"string"!=typeof t.stack)return[];var n=t;return n.stack.match(go)?n.stack.split("\n").filter(function(t){return!!t.match(go)}).map(function(t){var n=t;n.indexOf("(eval ")>-1&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var i=n.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/\(native code\)/,"").split(/\s+/).slice(1),r=Eo(i.pop());return bo(i.join(" "),["eval",""].indexOf(r[0])>-1?"":r[0],r[1],r[2])}):n.stack.split("\n").filter(function(t){return!t.match(mo)}).map(function(t){var n=t;if(n.indexOf(" > eval")>-1&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===n.indexOf("@")&&-1===n.indexOf(":"))return[n,"",-1,-1];var i=n.split("@"),r=Eo(i.pop());return bo(i.join("@"),r[0],r[1],r[2])});}function bo(t,n,i,r){return[t||"",n||"",parseInt(i||"-1",10),parseInt(r||"-1",10)]}function Eo(t){if(!t||-1===t.indexOf(":"))return["","",""];var n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return n?[n[1]||"",n[2]||"",n[3]||""]:["","",""]}var So,xo,ko=["log","info","warn","error","debug","_fs_debug","assert","trace"],_o=ko.filter(function(t){return !/debug/.test(t);}),Ao=function(t,n,i){void 0===i&&(i=!0);var r=Qi(t,n);return i?be(r):r},Io=function(){function t(t,n,i){this.At=n,this.sr=!1,this.Fe=!1,this.De=0,this.Dt=[],this.Be=cn.DefaultOrgSettings.MaxConsoleLogPerPage,this.Dn=t.window,this.T=i.createChild()}return t.prototype.initializeMaxLogsPerPage=function(t){this.Be=t||cn.DefaultOrgSettings.MaxConsoleLogPerPage},t.prototype.We=function(){return"\"[received more than "+this.Be+" messages]\""},t.prototype.start=function(t){var n=this;if(t.ConsoleWatcher&&(this.T.add(this.Dn,"error",!0,function(t){return n.addError(t)}),this.T.add(this.Dn,"unhandledrejection",!0,function(t){n.addError({error:t.reason,message:"Uncaught (in promise)",filename:"",lineno:0,colno:0})},!0),!this.sr))if(this.sr=!0,this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Console,!0]}),this.Dn.console)for(var i=function(t){var i=mt(r.Dn.console,t);if(!i)return"continue";"assert"===t?i.before(function(i){var r=i.args;r[0]||n.qe(t,Array.prototype.slice.apply(r,[1]))}):i.before(function(i){var r=i.args;return n.qe(t,r)}),r.Dt.push(i)},r=this,e=0,s=_o;e5e5)return!1;var i=Ws(Bs(t));return!!i&&(!!("style"===ki(t)&&i.length>0&&Xs.test(n))||function(t){var n;try{if((null===(n=t.classList)||void 0===n?void 0:n.contains("fs-css-in-js"))||t.hasAttribute("data-fela-type")||t.hasAttribute("data-aphrodite"))return!0}catch(t){Tt.sendToBugsnag(t,"error")}return!1}(t))}(s)&&(null==n||n.push(function(){u.snapshotEl(s),"link"===ki(s)&&i.T.add(s,"load",!1,function(){u.snapshotEl(s)})}));break;case"CANVAS":this._t.measurer.requestMeasureTask(ii.Low,function(){return i.us[So.Canvas].flush(t)});break;default:t.nodeName&&"#"!==t.nodeName[0]&&t.nodeName.indexOf("-")>-1&&this.us[So.CustomElement].onCustomNodeVisited(t);}if("scrollLeft"in t&&"scrollTop"in t){var a=t;this._t.measurer.requestMeasureTask(ii.Low,function(){0==a.scrollLeft&&0==a.scrollTop||i.Ps(a)})}null==n||n.push(function(){i._t.measurer.requestMeasureTask(ii.Low,function(){i.us[So.Animation].snapshot(t)})})},t.prototype.On=function(t){var n,i=t.node,r=ki(t.node);if("iframe"===r)this.$e(t.node);else if("function"==typeof i.getElementsByTagName)for(var e=null!==(n=i.getElementsByTagName("iframe"))&&void 0!==n?n:[],s=0;s-1&&s.push(i.href),("img"===t||"source"===t)&&(e=i.srcset)&&null==e.match(/^\s*$/))for(var c=0,h=e.split(",");c0)return i[0]}}return t.target}function Mo(t){var n;return!!(null!==(n=t._fs_trust_event)&&void 0!==n&&n||t.isTrusted)}var Ko,Ro=function(){function t(t,n){this.Vr=t,this.Gs=n,this.Xs=[],this.Js=0}return t.prototype.add=function(t){this.Xs.length>0&&this.Xs[this.Xs.length-1].When===t.When&&this.Xs.pop(),0===this.Xs.length?(this.Vr.push(t),this.Js=t.When):t.When>this.Js&&(this.Js=t.When),this.Xs.push(t)},t.prototype.finish=function(t,n){void 0===n&&(n=[]);var i=this.Xs.length;if(i<=1)return!1;for(var r=[],s=this.Xs[0].When,o=this.Xs[i-1].When,u=o-s!=0?o-s:1,a=0;a0&&this.Zs--,Lo(this.Wn.prev)},t.prototype.shift=function(){return this.Zs>0&&this.Zs--,Lo(this.Wn.next)},t}();function No(t,n){var i=t.next;n.next=i,n.prev=t,t.next=i.prev=n}function Lo(t){var n=t.prev,i=t.next;return n.next=i,i.prev=n,t.value}!function(t){t[t.rageWindowMillis=2e3]="rageWindowMillis",t[t.defaultRageThreshold=5]="defaultRageThreshold",t[t.rageThresholdIfPageChanges=8]="rageThresholdIfPageChanges",t[t.thresholdChangeQuiescenceMillis=2e3]="thresholdChangeQuiescenceMillis"}(Ko||(Ko={}));var Uo=function(){function t(t,n){var i,r;void 0===n&&(n=w),this._t=t,this.Ys=n,this.no=new Ho,this.io=Ko.defaultRageThreshold,this.ro=-1,this.eo=new WeakMap;var e=t.recording.pageResponse();if(!e)throw new Error("Attempt to construct EasyBake before rec/page response is set.");for(var s=[".fs-ignore-rage-clicks",".fs-ignore-rage-clicks *"],o=0,u=null!==(r=null===(i=e.BehaviorSignalSettings)||void 0===i?void 0:i.ElementBlocks)&&void 0!==r?r:[];o-1&&(s.push(a.Selector),s.push(a.Selector+" *"))}var c=s.join(", ");Be(c)?this.so=[c]:this.so=s}return t.prototype.oo=function(t){var n=this.eo.get(t);if(void 0!==n)return n;for(var i=0,r=this.so;i=this.io){var a=this._t.recording.getCurrentSessionURL,c={eventStartTimeStamp:this.no.first(),eventEndTimeStamp:i,eventReplayUrlAtStart:a(),eventReplayUrlAtCurrentTime:a(!0)};this.dispatchRageClickEvent(r,c),this.io=Ko.defaultRageThreshold,this.no=new Ho}}}}}},t.prototype.dispatchRageClickEvent=function(t,n){var i,r="fullstory/rageclick";try{i=new CustomEvent(r,{detail:n,bubbles:!0,cancelable:!0})}catch(t){(i=document.createEvent("customevent")).initCustomEvent(r,!0,!0,n)}o.setWindowTimeout(window,Tt.wrap(function(){t.dispatchEvent(i)}),0)},t}(),Fo=function(){function t(t){this._t=t,this.uo=this._t.time.wallTime(),this.ao=!1}return t.prototype.getLastUserAcitivityTS=function(){return this.uo},t.prototype.getMsSinceLastUserAcivity=function(){return o.mathFloor(this._t.time.wallTime()-this.uo)},t.prototype.resetUserActivity=function(){this.uo=this._t.time.wallTime()},t.prototype.isHibernating=function(){return this.ao},t.prototype.setHibernating=function(){this.ao=!0},t}(),Do=function(){function t(t,n,i,r){void 0===r&&(r=Yi),this._t=t,this.co=n,this.At=i,this.ho=!1,this.fo=!1,this.vo=cn.HeartbeatInitial,this.lo=cn.PageInactivityTimeout,this.heartbeatTimeout=new r(this["do"].bind(this)),this.hibernationTimeout=new r(this.po.bind(this),this.lo)}return t.prototype.getUserActivityModel=function(){return this.co},t.prototype.manualHibernateCheck=function(){this.co.isHibernating()||this.co.getMsSinceLastUserAcivity()>=cn.PageInactivityTimeout+5e3&&this.po()},t.prototype.scanEvents=function(t){if(!this.ho){this.manualHibernateCheck();for(var n=!1,i=0,r=t;icn.HeartbeatMax&&(this.vo=cn.HeartbeatMax),this.heartbeatTimeout.start(this.vo)},t.prototype.po=function(){if(!this.co.isHibernating()){var t=!1;this.co.getMsSinceLastUserAcivity()<=2*cn.PageInactivityTimeout?this.At.enqueue({Kind:Ot.UNLOAD,Args:[Wt.Hibernation]}):t=!0;try{this.ho=!0,this.co.setHibernating(),this.shutdown(),this.At.onHibernate(t)}finally{this.ho=!1}}},t.prototype.wo=function(){this.fo||(this.fo=!0,this._t.recording.splitPage(Wt.Hibernation))},t}(),Bo=function(){function t(t,n,i,r,e,s){void 0===r&&(r=function(){return[]}),void 0===e&&(e=Zi),void 0===s&&(s=Yi),this._t=t,this.mo=n,this.yo=r,this.bo=e,this.Eo=0,this.So=[],this.xo=!1,this.ko=!1,this._o=0,this.Ao=-1,this.Io=!1,this.Qt=[],this.To=new this.bo(cn.CurveSamplingInterval),this.Co=new this.bo(cn.MutationProcessingInterval),i&&(this.Po=new Do(this._t,i,this,s))}return t.prototype.startPipeline=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r=this;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return this.ko||this.xo?[2]:(this.xo=!0,t.frameId&&(this.Eo=t.frameId),t.parentIds&&(this.So=t.parentIds),i=!0,[4,ei()]);case 1:return e.sent(),this.processEvents(),[4,ei()];case 2:return e.sent(),window,this.Co.start(function(){window,r.processEvents(),window}),this.To.start(function(){window,r.processEvents(i),window}),null===(n=this.Po)||void 0===n||n.start(),this.mo.startPipeline(t),window,[2];}})})},t.prototype.enableEasyBake=function(){this.jo=new Uo(this._t)},t.prototype.enqueueSimultaneousEventsIn=function(t){if(0===this._o){var n=this._t.time.now();this.Ao=n>this.Ao?n:this.Ao}try{return this._o++,t(this.Ao)}finally{this._o--,this._o<0&&(this._o=0)}},t.prototype.enqueue=function(t){var n=this._o>0?this.Ao:this._t.time.now();this.Oo(n,t),Ji.checkForBrokenSchedulers()},t.prototype.Oo=function(t,n){var i;if(!this.ko){var r=t;r0){var n=t;n.When=this.Qt[0].When,this.Qt.unshift(n)}else this.enqueue(t)},t.prototype.addUnload=function(t){this.Io||(this.Io=!0,this.enqueue({Kind:Ot.UNLOAD,Args:[t]}),this.singSwanSong(t))},t.prototype.shutdown=function(t){this.addUnload(t),this.Mo(),this.ko=!0,this.Ko()},t.prototype.Mo=function(){this.processEvents(),this.mo.flush()},t.prototype.singSwanSong=function(t){this.ko||(window,this.Mo(),t===Wt.Hidden&&this.Io||this.mo.singSwanSong(),window)},t.prototype.rebaseIframe=function(t,n){for(var i=Math.max(0,n),r=this._t.time.startTime(),e=function(n){var e=r+n-t;return e>=i?e:i},s=0,o=this.Qt;s0){var f=h[h.length-1].Args[2];f&&(h[0].Args[9]=f)}}for(var v in s)s[l=parseInt(v,10)].finish(Ot.SCROLL_LAYOUT_CURVE,[l]);for(var v in o)o[l=parseInt(v,10)].finish(Ot.SCROLL_VISUAL_OFFSET_CURVE,[l]);for(var v in e){var l;e[l=parseInt(v,10)].finish(Ot.TOUCHMOVE_CURVE,[l])}return n&&n.finish(Ot.RESIZE_VISUAL_CURVE),i}(n);t||(i=i.concat(this.yo())),this.Ro(i),this.sendEvents(this._t.recording.pageSignature(),i)}},t.prototype.sendEvents=function(t,n){var i;0!=n.length&&(null===(i=this.Po)||void 0===i||i.scanEvents(n),this.mo.enqueueEvents(t,n))},t.prototype.onHibernate=function(t){t||this.Mo(),this.mo.singSwanSong(),this.mo.stopPipeline()},t.prototype.Ro=function(t){if(this.Eo)for(var n=this.So,i=n&&n.length>0,r=0;r>>0).toString(16)).slice(-8);return t},t;}();function qo(t){var n=new Wo(1);return n.writeAscii(t),n.sumAsHex()}function Qo(t){var n=new Uint8Array(t);return Vo(String.fromCharCode.apply(null,n))}function Vo(t){var n;return (null!==(n=window.btoa)&&void 0!==n?n:zo)(t).replace(/\+/g,"-").replace(/\//g,"_");}function zo(t){for(var n=String(t),i=[],r=0,e=0,s=0,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.charAt(0|s)||(o="=",s%1);i.push(o.charAt(63&r>>8-s%1*8))){if((e=n.charCodeAt(s+=3/4))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|e}return i.join("")}function $o(t,n,i,r){return void 0===r&&(r=new Wo),(0,e.__awaiter)(this,void 0,Yn,function(){var s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:s=t.now(),o=i.byteLength,u=0,e.label=1;case 1:return u25?[4,n(100)]:[3,3]:[3,5];case 2:e.sent(),s=t.now(),e.label=3;case 3:a=new Uint8Array(i,u,Math.min(o-u,1e4)),r.write(a),e.label=4;case 4:return u+=1e4,[3,1];case 5:return[2,{hash:r.sum(),hasher:r}];}})})}var Go=6e6,Xo="resource-uploader",Jo=function(){function t(t,n,i,r,e){void 0===r&&(r=window.FormData),void 0===e&&(e=Yi),this._t=t,this.At=n,this.Ho=i,this.No=r,this.Lo=e,this.pe={},this.Uo={},this.Fo=!1,this.Do=[]}return t.prototype.init=function(){this.No&&this.Bo()["catch"](function(t){Tt.sendToBugsnag(t,"error")})},t.prototype.Bo=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t,n,i,r,s,o,u,a,c,h,f,v,l,d,p,w,g,m,y,b,E,S,x,k,_;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t=this._t.options.orgId,e.label=1;case 1:return[4,this.Wo()];case 2:for(n=e.sent(),i={fsnv:{},sha1:{}},r={},s=0,o=n;sGo){var r=he(t,{source:"log",type:"bugsnag"});return Tt.sendToBugsnag("Size of blob resource exceeds limit","warning",{url:r,MaxResourceSizeBytes:Go}),void i(null)}(function(t){var n=ti(),i=n.resolve,r=n.promise,e=new FileReader;return e.readAsArrayBuffer(t),e.onload=function(){i(e.result)},e.onerror=function(t){Tt.sendToBugsnag(t,"error"),i(null)},r})(n).then(function(t){i(t?{buffer:t,blob:n,contentType:n.type}:null)})},e.send(),r)}function Yo(t,n){var i,r;return(0,e.__awaiter)(this,void 0,Yn,function(){var s;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return s=t.window,(null===(r=null===(i=s.crypto)||void 0===i?void 0:i.subtle)||void 0===r?void 0:r.digest)?[4,s.crypto.subtle.digest({name:"sha-1"},n)]:[3,2];case 1:return[2,{hash:Qo(e.sent()),algorithm:"sha1"}];case 2:return[4,$o(t.time,ni,n)];case 3:return[2,{hash:e.sent().hash,algorithm:"fsnv"}];}})})}var tu=/^data:([^;,]*)(;?charset=[^;]+)?(?:;base64)?$/i,nu="Could not parse data url",iu=function(t,n,i){this.name="ProtocolError",this.message=n,this.status=t,this.data=i};function ru(t){return t>=400&&502!==t||202==t||206==t}var eu=function(){function t(t){this.Vo=0,this.zo=t.options.scheme,this.$o=t.options.cdnHost,this._t=t}return t.prototype.page=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/page",vt(t))];case 1:return[2,pt(n.sent().text)];}})})},t.prototype.settings=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n;return(0,e.__generator)(this,function(i){return n=t.previewMode||t.fallback?vu(this._t):this.$o,[2,fu(this.zo,n,t)]})})},t.prototype.bundle=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return[4,ei()];case 1:return e.sent(),window,i=vt(t.bundle),this.Vo+=i.length,this.Vo,window,i.length>2e6?[4,ei()]:[3,3];case 2:e.sent(),e.label=3;case 3:return window,r=ou(t.bundle.Seq,t),[4,uu(this.zo,null!==(n=t.recHost)&&void 0!==n?n:vu(this._t),r,i)];case 4:return s=e.sent().text,o=pt(s),window,[2,[this.Vo,o]];}})})},t.prototype.bundleBeacon=function(t){var n;return hu(this.zo,null!==(n=t.recHost)&&void 0!==n?n:vu(this._t),t)},t.prototype.exponentialBackoffMs=function(t,n){var i=o.mathMin(cn.BackoffMax,5e3*o.mathPow(2,t));return n?i+.25*o.mathRandom()*i:i},t}(),su=function(){function t(t){this.zo=t.options.scheme,this._t=t}return t.prototype.uploadResource=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/uploadResource",t)];case 1:return[2,n.sent().text];}})})},t.prototype.queryResources=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/queryResources",vt(t))];case 1:return[2,pt(n.sent().text)];}})})},t}();function ou(t,n){var i="/rec/bundle"+("v2"===n.version?"/v2":"")+"?OrgId="+n.orgId+"&UserId="+n.userId+"&SessionId="+n.sessionId+"&PageId="+n.pageId+"&Seq="+t;return null!=n.serverPageStart&&(i+="&PageStart="+n.serverPageStart),null!=n.serverBundleTime&&(i+="&PrevBundleTime="+n.serverBundleTime),null!=n.lastUserActivity&&(i+="&LastActivity="+n.lastUserActivity),n.isNewSession&&(i+="&IsNewSession=true"),null!=n.deltaT&&(i+="&DeltaT="+n.deltaT),i}function uu(t,n,i,r){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(e){return[2,cu("POST",t,n,lu(i),!0,r)]})})}function au(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(r){return[2,cu("GET",t,n,lu(i),!1)]})})}function cu(t,n,i,r,s,o){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(e){return[2,new Yn(function(e,u){var a="//"+i+r,c=!1,h=new XMLHttpRequest,f=("withCredentials"in h);jt(f,"XHR missing CORS support"),f&&(h.onreadystatechange=function(){if(4==h.readyState){if(c)return;c=!0;try{var t={text:h.responseText};if(200==h.status)return void e(t);var n=void 0;try{n=pt(t.text)}catch(t){}u(new iu(h.status,t.text,n))}catch(t){Tt.sendToBugsnag(t,"error"),u(t)}}},h.open(t,n+a,!0),h.withCredentials=s,o&&"function"!=typeof o.append&&h.setRequestHeader("Content-Type","text/plain"),h.send(o))})]})})}function hu(t,n,i){if("function"==typeof navigator.sendBeacon){var r=t+"//"+n+ou(i.bundle.Seq,i)+"&SkipResponseBody=true",e=vt(i.bundle);try{return navigator.sendBeacon.bind(navigator)(r,e)}catch(t){}}return!1}function fu(t,n,i){var r;return(0,e.__awaiter)(this,void 0,Yn,function(){var s,o;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return s=null!==(r=i.version)&&void 0!==r?r:"v1",o=i.previewMode?"?previewMode=true":"",[4,au(t,n,"/s/settings/"+i.orgId+"/"+s+"/web"+o)];case 1:return[2,pt(e.sent().text)];}})})}function vu(t){var n,i=null===(n=t.recording.pageResponse())||void 0===n?void 0:n.GCLBSubdomain,r=t.options.recHost;return i&&K(r)?r.replace(/^rs\./,i+"."):r;}function lu(t){if(!window.Zone)return t;var n="?";return t.indexOf(n)>-1&&(n="&"),""+t+n+"ngsw-bypass=true"}var du,pu=function(){function t(t,n,i){void 0===i&&(i=new wu),this._t=t,this.Vr=n,this.Go=i}return t.prototype.initialize=function(t){var n;if(t){this.Xo(t);var i=null===(n=this._t.window.location)||void 0===n?void 0:n.href;this.onNavigate(i)}},t.prototype.onNavigate=function(t){return!!this.Go.matches(t)&&(this.Vr.enqueue({Kind:Ot.KEEP_URL,Args:[this.Jo(t)]}),!0)},t.prototype.onClick=function(t){var n;return!!(null===(n=null==t?void 0:t.watchKind)||void 0===n?void 0:n.has(_i.Keep))&&(this.Vr.enqueue({Kind:Ot.KEEP_ELEMENT,Args:[t.id]}),!0)},t.prototype.urlMatches=function(t){return this.Go.matches(t)},t.prototype.Xo=function(t){this.Go.setRules(t)},t.prototype.Jo=function(t){return he(t,{source:"page",type:"base"})},t}(),wu=function(){function t(){this.Zo=null}return t.prototype.setRules=function(t){var n=t.map(function(t){return t.Regex}).filter(this.Yo);n.length>0&&(this.Zo=this.tu(n))},t.prototype.matches=function(t){return!!this.Zo&&this.Zo.test(t)},t.prototype.Yo=function(t){try{return new RegExp(t),!0}catch(n){return Tt.sendToBugsnag("Browser rejected UrlKeep.Regex","error",{expr:t,error:n.toString()}),!1}},t.prototype.tu=function(t){try{return new RegExp("("+t.join(")|(")+")","i")}catch(n){return Tt.sendToBugsnag("Browser rejected joining UrlKeep.Regexs","error",{exprs:t,error:n.toString()}),null}},t}(),gu=function(t){var n=(void 0===t?{}:t).wnd,i=void 0===n?window:n;!function(t,n,i,r,e,s,o,u){var a,c;function h(t){var n,i=[];function r(){n&&(i.forEach(function(t){var i;try{i=t[n[0]]&&t[n[0]](n[1])}catch(n){return void(t[3]&&t[3](n))}i&&i.then?i.then(t[2],t[3]):t[2]&&t[2](i)}),i.length=0)}function e(t){return function(i){n||(n=[t,i],r())}}return t(e(0),e(1)),{then:function(t,n){return h(function(e,s){i.push([t,n,e,s]),r()})}}}(!(i in t)||(t.console&&t.console.log&&t.console.log("FullStory namespace conflict. Please set window[\"_fs_namespace\"]."),0))&&(u=t[i]=function(){var t=function(t,i,r){function e(e,s){n(t,i,r,e,s)}var s=/Async$/;return s.test(t)?(t=t.replace(s,""),"function"==typeof Promise?new Promise(e):h(e)):n(t,i,r)};function n(n,i,r,e,s){return t._api?t._api(n,i,r,e,s):(t.q&&t.q.push([n,i,r,e,s]),null)}return t.q=[],t}(),function(){function t(){}function n(t,n,i){u("setProperties",{type:t,properties:n},i)}function i(t,i){n("user",t,i)}function r(t,n,r){i({uid:t},r),n&&i(n,r)}u.identify=r,u.setUserVars=i,u.identifyAccount=t,u.clearUserCookie=t,u.setVars=n,u.event=function(t,n,i){u("trackEvent",{name:t,properties:n},i)},u.anonymize=function(){r(!1)},u.shutdown=function(){u("shutdown")},u.restart=function(){u("restart")},u.log=function(t,n){u("log",{level:t,msg:n})},u.consent=function(t){u("setIdentity",{consent:!arguments.length||t})}}(),a="fetch",c="XMLHttpRequest",u._w={},u._w[c]=t[c],u._w[a]=t[a],t[a]&&(t[a]=function(){return u._w[a].apply(this,arguments)}),u._v="2.0.0")}(i,i.document,i._fs_namespace,0,0,i._fs_script)};function mu(t,n){if(t&&t.postMessage)try{t.postMessage(function(t){var n;return vt(((n={}).__fs=t,n))}(n),"*")}catch(t){Ut("postMessage",t)}}function yu(t){try{var n=pt(t);if("__fs"in n)return n.__fs}catch(t){}return[du.Unknown]}function bu(t,n,i,r){var e=W(t);if(!e)return!1;try{e.send(n,i,r)}catch(t){e.send(n,i)}return!0}!function(t){t.EndPreviewMode="EndPreviewMode",t.EvtBundle="EvtBundle",t.GreetFrame="GreetFrame",t.InitFrameMobile="InitFrameMobile",t.RequestFrameId="RequestFrameId",t.RestartFrame="RestartFrame",t.SetConsent="SetConsent",t.SetFrameId="SetFrameId",t.ShutdownFrame="ShutdownFrame",t.Unknown="Unknown"}(du||(du={}));var Eu=new RegExp(/^\s+$/),Su=/^fb\d{18}$/,xu=function(t){var n=t.frame,i=t.orgId,r=t.scheme,e=t.script,s=t.recHost,u=t.cdnHost,a=t.appHost,c=t.namespace,h=(t.desc,t.snippetVersion);try{if(function(t){return t.id==t.name&&Su.test(t.id)}(n))return Rt.BlocklistedFrame;if(function(t){return!(t.contentDocument&&t.contentWindow&&t.contentWindow.location)||function(t){return!!t.src&&"about:blank"!=t.src&&t.src.indexOf("javascript:")<0}(t)&&t.src!=t.contentWindow.location.href&&"loading"==t.contentDocument.readyState}(n))return Rt.PartiallyLoaded;var f=n.contentWindow,v=n.contentDocument;if(!f||!v)return Rt.MissingWindowOrDocument;if(!v.head)return Rt.MissingDocumentHead;if(!v.body||0===v.body.childNodes.length)return Rt.MissingBodyOrChildren;for(var l=!1,d=v.body.childNodes,p=0;p0&&(null!==(s=null===(e=null===(r=t.OrgSettings)||void 0===r?void 0:r.UrlPrivacyConfig)||void 0===e?void 0:e.length)&&void 0!==s?s:0)>0&&(null!==(a=null===(u=null===(o=t.OrgSettings)||void 0===o?void 0:o.AttributeBlocklist)||void 0===u?void 0:u.length)&&void 0!==a?a:0)>0;return c||Tt.sendToBugsnag("Invalid page response","error",{rsp:t}),c},t.prototype.handleResponse=function(t,n){var i,r,e,s,o=t.Flags,u=o.AjaxWatcher,a=o.ClientSideRageClick,c=o.GetCurrentSession,h=o.ResourceUploading,f=o.UseClientSideId;this.ku=t,this.Pu=t.UserIntId,this.ju=t.SessionIntId,this.Ou=t.PageIntId,this.Mu=t.PageStart,this.pu=c?_u.Enabled:_u.Disabled,this.cu=t.OrgSettings,pe(null!==(i=this.cu.UrlPrivacyConfig)&&void 0!==i?i:cn.DefaultOrgSettings.UrlPrivacyConfig,this.cu.MaxUrlLength);var v=null!==(r=this.cu.AttributeBlocklist)&&void 0!==r?r:[];(null===(s=null===(e=this._u)||void 0===e?void 0:e.privacy)||void 0===s?void 0:s.attributeBlocklist)&&(this._u.privacy.attributeBlocklist.length,v.push.apply(v,this._u.privacy.attributeBlocklist.map(Ae))),xe(v),this.yu.consoleWatcher().initializeMaxLogsPerPage(this.cu.MaxConsoleLogPerPage),this.yu.ajaxWatcher().initialize({requests:this.cu.HttpRequestHeadersAllowlist,responses:this.cu.HttpResponseHeadersAllowlist,maxAjaxPayloadLength:this.cu.MaxAjaxPayloadLength}),this.yu.perfWatcher().initialize({resourceUploader:this.yu.getResourceUploader(),recTimings:!!this.cu.RecordPerformanceResourceTiming,recImgs:!!this.cu.RecordPerformanceResourceImg,maxPerfMarksPerPage:this.cu.MaxPerfMarksPerPage}),this.Xt.initialize({canvasWatcherMode:t.Flags.CanvasWatcherMode,blocks:t.ElementBlocks,deferreds:t.ElementDeferreds,keeps:t.ElementKeeps,watches:t.ElementWatches}),this.Ve.initialize(t.UrlKeeps),this.Xt.initializeConsent(null!=n?n:!!t.Consented),"number"==typeof t.BundleUploadInterval&&(this.fu=t.BundleUploadInterval),h&&this.enableResourceUploading(),u&&t.AjaxWatches&&this.yu.ajaxWatcher().setWatches(t.AjaxWatches),a&&this.At.enableEasyBake(),f&&(this.hu=!0),this.yu.start(t.Flags)},t.prototype.fullyStarted=function(){this.Au&&this.Au()},t.prototype.enableResourceUploading=function(){this.wu=!0,this.yu.initResourceUploading()},t.prototype.flushPendingChildFrameInits=function(){if(this.du.length>0){for(var t=0;t0&&this.At.sendEvents(e,i);break;case du.RequestFrameId:if(!t)return;var s=this.Nu(t);void 0===s||(this.mu[s]=!1,this.Lu(t,s));case du.Unknown:}},t.prototype.Nu=function(t){for(var n=0,i=this.vu;n2e6))try{localStorage._fs_swan_song=i}catch(t){}},t.prototype.sing=function(){try{var t=this.purge();if(void 0===t)return;if(!(t.Bundles&&t.UserId&&t.SessionId&&t.PageId))return;t.OrgId||(t.OrgId=this.Uu.getOrgId()),t.Bundles.length>0&&(t.Bundles.length,this.Du(t))}catch(t){}},t.prototype.purge=function(){try{if("_fs_swan_song"in localStorage){var t=localStorage._fs_swan_song;return delete localStorage._fs_swan_song,pt(t)}}catch(t){}},t.prototype.Du=function(t,n){return void 0===n&&(n=0),(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o;return(0,e.__generator)(this,function(u){switch(u.label){case 0:if(i=null,!tt(t.Bundles)||0===t.Bundles.length||void 0===t.Bundles[0])return[2];1==t.Bundles.length&&(i=this._t.time.wallTime()-(t.LastBundleTime||0)),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.Ho.bundle({bundle:t.Bundles[0],deltaT:i,isNewSession:t.IsNewSession,orgId:t.OrgId,pageId:t.PageId,recHost:t.RecHost,serverBundleTime:t.ServerBundleTime,serverPageStart:t.ServerPageStart,sessionId:t.SessionId,userId:t.UserId,version:t.Version})];case 2:return r=u.sent(),s=r[1],t.Bundles[0].Evts.length,t.Bundles[0].Seq,t.Bundles.shift(),t.Bundles.length>0&&this.Du((0,e.__assign)((0,e.__assign)({},t),{ServerBundleTime:s.BundleTime})),[3,4];case 3:return(o=u.sent())instanceof iu&&ru(o.status)?[2]:(this.Bu=new this.Fu(this.Du,this.Ho.exponentialBackoffMs(n,!0),this,t,n+1).start(),[3,4]);case 4:return[2];}})})},t}(),ju=function(){function t(){}return t.prototype.encode=function(t){return t},t}(),Ou=function(){function t(){this.dict={idx:-1,map:{}},this.nodeCount=1,this.startIdx=0}return t.prototype.encode=function(n){if(0==n.length)return[];var i,r,e=n[0],s=Object.prototype.hasOwnProperty.call(this.dict.map,e)?this.dict.map[e]:void 0,o=[],u=1;function a(){s?u>1?o.push([s.idx,u]):o.push(s.idx):o.push(e)}for(i=1;ithis._t.recording.bundleUploadInterval()?[4,this.aa()]:[3,4]):[2];case 3:e.sent(),e.label=4;case 4:return[3,6];case 5:if((r=e.sent())instanceof iu){if(ru(r.status))return 206==r.status?Tt.sendToBugsnag("Failed to send bundle, probably because of its large size","error"):r.status>=500&&Tt.sendToBugsnag("Failed to send bundle, recording outage likely","error"),this.ea&&this.ea(),[2]}else Tt.sendToBugsnag("Failed to send bundle, unknown err","error",{err:r});return this.qu=!0,this.Vu=this.$u+this.Ho.exponentialBackoffMs(this.Qu++,!1),[3,6];case 6:return[2];}})})},t.prototype.va=function(t){var n,i;return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return this.Ou?(window,r=this.co.getMsSinceLastUserAcivity(),[4,this.Ho.bundle({bundle:t,deltaT:null,lastUserActivity:r,orgId:this.Uu.getOrgId(),pageId:this.Ou,serverBundleTime:this.Zu,serverPageStart:this.Mu,isNewSession:this.Gu,sessionId:null!==(n=this.Uu.getSessionId())&&void 0!==n?n:"",userId:this.Uu.getUserId(),version:this._t.recording.bundleApiVersion()})]):[2];case 1:return s=e.sent(),o=s[0],u=s[1],null===(i=this._t.recording.observer)||void 0===i||i.onBundleSent(o),o>this.Ju&&this.zu>16&&this._t.recording.splitPage(Wt.Size),window,[2,u];}})})},t.prototype.fa=function(t){if(0===t.Evts.length)return t;for(var n=[],i=0,r=t.Evts;i0},t.prototype.hasActiveEvents=function(){return this.da},t.prototype.pushEvent=function(t){Mu[t.Kind]||(this.da=!0),this.pa.When<0&&(this.pa.When=t.When),this.pa.Evts.push(t)},t}();function Hu(t,n){void 0===t&&(t=[]),void 0===n&&(n=0);for(var i="",r=0,e=t;r-1},t.prototype.ba=function(){return this.Dn.document.location.search.indexOf("_fs_preview=false")>-1},t.prototype.ya=function(){return!!this.wa.getValue(this.ga)},t}();function Uu(t){var n,i,r;return{Kind:Ot.CAPTURE_SOURCE,Args:[t.type,t.entrypoint,"dom",null===(i=null===(n=t.source)||void 0===n?void 0:n.integration)||void 0===i?void 0:i.slice(0,1024),!!(null===(r=t.source)||void 0===r?void 0:r.userInitiated)]}}function Fu(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i,r,s;return(0,e.__generator)(this,function(e){if(n=function(t){return"msCrypto"in t?t.msCrypto:t.crypto}(t),"function"==typeof(null==n?void 0:n.randomUUID))return[2,n.randomUUID()];for(i=new Uint8Array(16),n.getRandomValues(i),i[6]=15&i[6]|64,i[8]=63&i[8]|128,r=[],s=0;s=864e5)return Wu;var c=null!==(n=this.Sa.getLastUserActivityTimeMS())&&void 0!==n?n:u;return o.mathAbs(s-c)>=qu||(null!==(i=this.Sa.getPageCount())&&void 0!==i?i:0)>=250?Wu:e},t.prototype.start=function(){this.lastUserActivityTimeout.start(3e5)},t.prototype.stop=function(){this.lastUserActivityTimeout.stop()},t.prototype.ka=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t;return(0,e.__generator)(this,function(n){return(t=this.Sa.getUserId())&&Bu(t)?[2,t]:[2,Fu(this._t.window)]})})},t.prototype.xa=function(){var t=this.co.getLastUserAcitivityTS();t!==this.lastUserActivityTS&&(this.lastUserActivityTS=t,this.Sa.setLastUserActivityTimeMS(t),this.start())},t}(),Vu=function(t){function n(n,i,r,e,s,o,u){void 0===r&&(r=!0),void 0===e&&(e=new Fo(n)),void 0===s&&(s=new Ku(n,i,e,r)),void 0===o&&(o=Zi),void 0===u&&(u=xu);var a,c=t.call(this,n,o,e,s,u)||this;return c.Ho=i,c.mo=s,c._a=!1,c.ko=!1,c.Aa=!1,s.onShutdown(function(){return c.shutdown(Wt.SettingsBlocked)}),c.Mt=c.Dn.document,c.Eo=0,c.Uu=n.recording.identity,c.Ia=new Lu(c.xu,c.Dn,c.Uu.getClientStore()),c.pu=_u.NoInfoYet,c.Ta=new Qu(n,e,c.Uu),a=function(t){if(c.yu.stop(Wt.Api),t){var n=c.Mt.getElementById(t);n&&c.Ca&&n.setAttribute("_fs_embed_token",c.Ca)}},c.Dn._fs_shutdown=a,c}return (0,e.__extends)(n,t),n.prototype.onDomLoad=function(){var n=this;t.prototype.onDomLoad.call(this),this._a=!0,this.Pa(function(){n.fireFsReady(n.ko)})},n.prototype.ja=function(){var t=R(this.Dn,"_fs_replay_flags");if(/[?&]_fs_force_session=true(&|#|$)/.test(location.search)&&(t+=",forceSession",this.Dn.history)){var n=location.search.replace(/(^\?|&)_fs_force_session=true(&|$)/,function(t,n,i){return i?n:""});this.Dn.history.replaceState({},"",this.Dn.location.href.replace(location.search,n))}return t},n.prototype.start=function(n,i,r){var s,o,u;return(0,e.__awaiter)(this,void 0,Yn,function(){var a,c,h,f,v,l,d,p,w,g,m,y,b,E,S,x,k,_,A,I,T,C,P,j=this;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t.prototype.start.call(this,n,i,r),a=this.ja(),c=yi(this.Mt),h=c[0],f=c[1],O=this.Dn,M=0,K=0,v=null==O.screen?[M,K]:(M=parseInt(String(O.screen.width),10),K=parseInt(String(O.screen.height),10),[M=isNaN(M)?0:M,K=isNaN(K)?0:K]),l=v[0],d=v[1],p="",n||(p=this.Uu.getUserId()),w=null!==(u=null===(o=null===(s=this._t)||void 0===s?void 0:s.recording)||void 0===o?void 0:o.preroll)&&void 0!==u?u:-1,g=function(){return he(Mr(j.Dn),{source:"page",type:"base"})},m=function(){return he(j.Dn.location.href,{source:"page",type:"url"})},y=function(){return""===j.Mt.referrer?"":he(j.Mt.referrer,{source:"page",type:"referrer"})},b=function(t){var n,i="_fs_tab_id";try{var r=t.sessionStorage.getItem(i);if(r)return r;var e=Math.floor(1e17*Math.random()).toString(16);return t.sessionStorage.setItem(i,e),null!==(n=t.sessionStorage.getItem(i))&&void 0!==n?n:void 0}catch(t){return}}(this.Dn),E={OrgId:this.xu,UserId:p,Url:m(),Base:g(),Width:h,Height:f,ScreenWidth:l,ScreenHeight:d,SnippetVersion:V(this.Dn),Referrer:y(),Preroll:w,Doctype:dt(this.Mt),CompiledVersion:"11aa377d19",CompiledTimestamp:1678707725,AppId:this.Uu.getAppId(),TabId:b,PreviewMode:this.Ia.isPreviewMode()||void 0},a&&(E.ReplayFlags=a),e.label=1;case 1:return e.trys.push([1,5,,6]),S=this.Oa,[4,this.Ho.page(E)];case 2:return[4,S.apply(this,[e.sent()])];case 3:return P=e.sent(),this.isSafeResponse(P)?this.gu?[2]:(window,this.handleResponse(P),window,this.Ma(P.CookieDomain,P.UserIntId,P.SessionIntId,P.PageIntId,P.EmbedToken),P.Flags.UseStatelessConsent||this.Uu.getConsentStore().setConsentState(!!P.Consented),this.Ka(),P.PreviewMode&&this.Ra(),x=function(t){return R(t,"_fs_pagestart","function")}(this.Dn),x&&x(),this.At.enqueueFirst(this.yu.getNavigateEvent(this.Dn.location.href,Ot.ENTRY_NAVIGATE)),k=!!P.Consented,this.At.enqueueFirst({Kind:Ot.SYS_REPORTCONSENT,Args:[k,Bt.Document]}),_=dt(this.Mt),A=m(),I=y(),T=g(),this.At.enqueueFirst({Kind:Ot.SET_FRAME_BASE,Args:[he(Mr(this.Dn),{source:"event",type:Ot.SET_FRAME_BASE}),_,A,I]}),this.mo.setPageData({Kind:Ot.PAGE_DATA,Args:[A,T,h,f,l,d,V(this.Dn),I,_,w,p,P.PageStart,Et(this.Dn),this.Dn.navigator.userAgent,b,!!P.IsNewSession]}),this.At.enqueue({Kind:Ot.SCRIPT_COMPILED_VERSION,Args:["11aa377d19"]}),this.At.enqueue(Uu({type:"default"})),this.yu.addVisibilityChangeEvent(),this.addInitEvent(),[4,this.At.startPipeline({pageId:P.PageIntId,serverPageStart:P.PageStart,isNewSession:!!P.IsNewSession})]):[2,this.Ha()];case 4:return e.sent(),this.enqueueDocumentProperties(this.Mt),this.fullyStarted(),[3,6];case 5:return(C=e.sent())instanceof iu&&(P=C.data)&&P.user_id&&P.cookie_domain&&P.reason_code===en.ReasonBlockedTrafficRamping&&p!==P.user_id&&this.Ma(P.cookie_domain,P.user_id,"","",""),this.Ha(),[3,6];case 6:return[2];}var O,M,K})})},n.prototype.Ka=function(){var t=this;this.Aa=!0,this.Pa(function(){t.fireFsReady(t.ko)})},n.prototype.Ma=function(t,n,i,r,e){var s=this.Uu;s.setIds(this.Dn,t,n,i),this.Ca=e,this.Ia.write(),s.getUserId(),s.getSessionId()},n.prototype.Pa=function(t){var n,i;if(this._a&&this.Aa)if(null===(i=null===(n=this.ku)||void 0===n?void 0:n.Flags)||void 0===i?void 0:i.FetchIntegrations){var r=this.Mt.createElement("script");r.addEventListener("load",t),r.addEventListener("error",t),r.async=!0,r.src=this.zo+"//"+this.Eu+"/rec/integrations?OrgId="+this.xu,this.Mt.head.appendChild(r)}else t()},n.prototype.Ra=function(){var t="FullStory-preview-script";if(!this.Mt.getElementById(t)){var n=this.Mt.createElement("script");n.id=t,n.async=!0,n.src=this.zo+"//"+this.Su+"/s/fspreview.js",this.Mt.head.appendChild(n)}},n.prototype.Ha=function(){this.Iu&&this.Iu(),this.shutdown(Wt.SettingsBlocked),this.ko=!0,this.fireFsReady(this.ko)},n.prototype.Oa=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o,u;return(0,e.__generator)(this,function(a){switch(a.label){case 0:return(i=(0,e.__assign)({},t)).Flags.UseStaticSettings?(r=this.Ia.isPreviewMode(),[4,this.Ho.settings({orgId:this.xu,previewMode:r,fallback:!1})["catch"](function(t){Tt.sendToBugsnag("Edge Rec settings error","error",{err:t})})]):[3,4];case 1:return(s=a.sent())?[3,3]:[4,this.Ho.settings({orgId:this.xu,previewMode:r,fallback:!0})["catch"](function(t){Tt.sendToBugsnag("Rs Rec settings error","error",{err:t})})];case 2:s=a.sent(),a.label=3;case 3:s&&(i=(0,e.__assign)((0,e.__assign)({},i),s)),a.label=4;case 4:return i.Flags.UseClientSideId?(this.Uu.setCookieDomain(this.Dn,i.CookieDomain),Bu(o=null!==(n=t.UserUUID)&&void 0!==n?n:"")&&this.Uu.setUserId(o),[4,this.Ta.createUserSessionPage()]):[3,6];case 5:u=a.sent(),this.Ta.start(),i=(0,e.__assign)((0,e.__assign)({},i),{UserIntId:u.userId,SessionIntId:u.sessionId,PageIntId:u.pageId,IsNewSession:u.isNewSession,PageStart:p()}),a.label=6;case 6:return i.Flags.UseStatelessConsent&&(i=(0,e.__assign)((0,e.__assign)({},i),{Consented:this.Uu.getConsentStore().getConsentState()})),[2,i];}})})},n.prototype.onMessageReceived=function(n,i){t.prototype.onMessageReceived.call(this,n,i),(null==n?void 0:n.parent)==this.Dn&&i[0]===du.EndPreviewMode&&this.Ia.clear()},n;}(Cu),zu=function(){function t(t,n){void 0===n&&(n=new $u(t)),this.Dn=t,this.Na=n}return t.prototype.enqueueEvents=function(t,n){var i=null!=t?t:void 0;this.Na.postMessage(this.Dn.parent,[du.EvtBundle,n,i],i)},t.prototype.startPipeline=function(){},t.prototype.stopPipeline=function(){},t.prototype.flush=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(t){return[2]})})},t.prototype.singSwanSong=function(){},t.prototype.onShutdown=function(t){},t.prototype.setPageData=function(t){},t}(),$u=function(){function t(t){this.Dn=t}return t.prototype.postMessage=function(t,n,i){switch(n[0]){case du.EvtBundle:bu(this.Dn,n[0],vt(n[1]),i)||mu(t,n);break;case du.RequestFrameId:bu(this.Dn,n[0],"[]",i)||mu(t,n);break;default:n[0];}},t}(),Gu=function(t){function n(n,i,r,e,s){void 0===i&&(i=new $u(n.window)),void 0===r&&(r=new zu(n.window,i)),void 0===e&&(e=Zi),void 0===s&&(s=xu);var o=t.call(this,n,e,void 0,r,s)||this;return o.Na=i,o}return(0,e.__extends)(n,t),n.prototype.start=function(n,i,r){var e=this;t.prototype.start.call(this,n,i,r),this.La(),this.T.add(this.Dn,"load",!1,function(){e.yu.recordingIsDetached()&&e._t.recording.splitPage(Wt.FsShutdownFrame)}),this.yu.addVisibilityChangeEvent()},n.prototype.onMessageReceived=function(n,i){if(t.prototype.onMessageReceived.call(this,n,i),n===this.Dn.parent||n===this.Dn)switch(i[0]){case du.GreetFrame:this.La(i[1]);break;case du.SetFrameId:try{var r=i[1];if(!r)return void he(location.href,{source:"log",type:"debug"});this.Ua({frameId:r,parentIds:i[2],outerStartTime:i[3],scheme:i[4],script:i[5],appHost:i[6],orgId:i[7],initConfig:i[8],pageRsp:i[9],consentOverride:i[10],minimumWhen:i[11]})}catch(t){vt(i)}break;case du.SetConsent:this.setConsent(i[1]);break;case du.InitFrameMobile:try{var e=JSON.parse(i[1]),s=e.StartTime;if(i.length>2&&i[2]){var o=i[2];Object.prototype.hasOwnProperty.call(o,"ProtocolVersion")&&o.ProtocolVersion>=20180723&&Object.prototype.hasOwnProperty.call(o,"OuterStartTime")&&(s=o.OuterStartTime)}var u=e.Host;this.Ua({frameId:0,parentIds:[],outerStartTime:s,scheme:"https:",script:G(u),appHost:$(u),orgId:e.OrgId,initConfig:void 0,pageRsp:e.PageResponse,consentOverride:this.Xt.getConsent()})}catch(t){vt(i)}}},n.prototype.La=function(t){this.Eo&&this.Eo===t||0!=this.Eo&&this.Dn.parent&&this.Na.postMessage(this.Dn.parent,[du.RequestFrameId])},n.prototype.Ua=function(t){var n,i,r=this;if(this.Eo)this.Eo!==t.frameId?(this.Eo,t.frameId,this._t.recording.splitPage(Wt.FsShutdownFrame)):this.Eo;else if(he(location.href,{source:"log",type:"debug"}),t.frameId,this.zo=t.scheme,this.bu=t.script,this.Su=t.appHost,this.xu=t.orgId,this._u=t.initConfig,this.Eo=t.frameId,this.So=t.parentIds,t.pageRsp&&this.isSafeResponse(t.pageRsp)){if(!this.gu){var e=null!==(n=t.consentOverride)&&void 0!==n?n:!!t.pageRsp.Consented;this.handleResponse(t.pageRsp,e),this.fireFsReady(),this.At.enqueueFirst({Kind:Ot.SYS_REPORTCONSENT,Args:[e,Bt.Document]}),this.At.enqueueFirst({Kind:Ot.SET_FRAME_BASE,Args:[he(Mr(this.Dn),{source:"event",type:Ot.SET_FRAME_BASE}),dt(this.Dn.document)]}),this.At.enqueue({Kind:Ot.SCRIPT_COMPILED_VERSION,Args:["11aa377d19"]}),this.At.enqueue(Uu({type:"default"})),this.addInitEvent(),this.At.rebaseIframe(t.outerStartTime,null!==(i=t.minimumWhen)&&void 0!==i?i:0),this._t.time.setStartTime(t.outerStartTime),this.Ou&&this.At.startPipeline({pageId:this.Ou,serverPageStart:t.pageRsp.PageStart,isNewSession:!!t.pageRsp.IsNewSession,frameId:t.frameId,parentIds:t.parentIds}).then(function(){r.flushPendingChildFrameInits(),r.enqueueDocumentProperties(r.Dn.document),r.fullyStarted()})}}else this.shutdown(Wt.FsShutdownFrame)},n}(Cu),Xu=function(){function t(t,n,i){void 0===n&&(n=function(){}),void 0===i&&(i=!1),this.Mt=t,this.Fa=n,this.Da=i,this._cookies={},this._cookies=k(this.Mt)}return t.prototype.setDomain=function(t){this.Ba=t},t.prototype.getValue=function(t,n){var i=this._cookies[t];if(!i)try{i=localStorage[null!=n?n:t]}catch(t){}return i},t.prototype.setValue=function(t,n,i,r){if(null!=this.Ba&&!this.Da){var e=[];this._setCookie(t,n,i,e),this.Wa(null!=r?r:t,n,e,t),e.length>0&&this.Fa(e)}},t.prototype.setCookie=function(t,n,i){this._setCookie(t,n,i,[])},Object.defineProperty(t.prototype,"cookies",{get:function(){return this._cookies},enumerable:!1,configurable:!0}),t.prototype.clearCookie=function(t,n){if(this._cookies[t]&&(this.Mt.cookie=Ju(this.Ba,t,"","Thu, 01 Jan 1970 00:00:01 GMT"),delete this._cookies[t]),n)try{delete localStorage[n]}catch(t){}},t.prototype._setCookie=function(t,n,i,r){try{this.Mt.cookie=Ju(this.Ba,t,n,i),-1===this.Mt.cookie.indexOf(n)&&r.push([t,"cookie"])}finally{this._cookies=k(this.Mt)}},t.prototype.Wa=function(t,n,i,r){try{localStorage[t]=n,localStorage[t]!==n&&i.push([null!=r?r:t,"localStorage"])}catch(n){i.push([null!=r?r:t,"localStorage",String(n)])}},t}();function Ju(t,n,i,r){var e=n+"="+i;return e+="; domain="+function(t){return t?"."+encodeURIComponent(t):""}(t),e+="; Expires="+r+"; path=/; SameSite=Strict","https:"===location.protocol&&(e+="; Secure"),e}var Zu,Yu="fs_cid",ta=function(){function t(t){this.Sa=t,this.qa=1;var n=this.Sa.getValue(Yu,wn);this.Qa=function(t){var n={consent:Dt.RevokeConsent};if(!t)return n;var i=t.split(".");return i.length<1?n:(i[0],"1"===i[1]?{consent:Dt.GrantConsent}:n)}(n)}return t.prototype.getConsentState=function(){return this.Qa.consent},t.prototype.setConsentState=function(t){if(this.Qa.consent=t,t!==Dt.RevokeConsent){var n=this.Va(),i=this.za();this.Sa.setValue(Yu,n,i,wn)}else this.Sa.clearCookie(Yu,wn)},t.prototype.Va=function(){return[this.qa,this.Qa.consent===Dt.GrantConsent?1:0].join(".")},t.prototype.za=function(){return new Date(1e3*S()).toUTCString()},t}(),na="fs_lua",ia=function(){function t(t){this.qa=1,this.Sa=t;var n=this.Sa.getValue(na,gn);this.Qa=function(t){var n={lastUserActivityTime:void 0};if(!t)return n;var i=t.split(".");return i.length<1?n:(i[0],{lastUserActivityTime:_(i[1])})}(n)}return t.prototype.getLastUserActivityTimeMS=function(){return this.Qa.lastUserActivityTime},t.prototype.setLastUserActivityTimeMS=function(t){this.Qa.lastUserActivityTime=t;var n=this.Va(),i=this.za();this.Sa.setValue(na,n,i,gn)},t.prototype.Va=function(){var t;return[this.qa,null!==(t=this.Qa.lastUserActivityTime)&&void 0!==t?t:""].join(".")},t.prototype.za=function(){return new Date(p()+qu).toUTCString()},t}(),ra="fs_uid",ea=function(){function t(t,n,i,r){void 0===n&&(n=document),void 0===i&&(i=function(){}),void 0===r&&(r=!1),this.$a=void 0,this.wa=new Xu(n,i,r),this.Ga=new ta(this.wa),this.Xa=new ia(this.wa),this.Qa=this.Ja(t)}return t.prototype.Ja=function(t){var n=x(this.wa.getValue(ra,pn));return n&&n.orgId==t?n:{expirationAbsTimeSeconds:S(),orgId:t,userId:"",sessionId:"",appKeyHash:""}},t.prototype.getConsentStore=function(){return this.Ga},t.prototype.clear=function(){this.Xa.setLastUserActivityTimeMS(void 0),this.Qa.sessionStartTime=this.Qa.pageCount=void 0,this.Qa.userId=this.Qa.sessionId=this.Qa.appKeyHash=this.$a="",this.Qa.expirationAbsTimeSeconds=S(),this.Za()},t.prototype.create=function(t){this.Xa.setLastUserActivityTimeMS(t.lastUserActivityTime),this.Qa=(0,e.__assign)((0,e.__assign)({},this.Qa),t),this.Za()},t.prototype.getOrgId=function(){return this.Qa.orgId},t.prototype.getUserId=function(){return this.Qa.userId},t.prototype.setUserId=function(t){this.Qa.userId=t,this.Za()},t.prototype.getSessionId=function(){return this.Qa.sessionId},t.prototype.getAppKeyHash=function(){return this.Qa.appKeyHash},t.prototype.getCookies=function(){return this.wa.cookies},t.prototype.setAppId=function(t){this.$a=t,this.Qa.appKeyHash=qo(t),this.Za()},t.prototype.getAppId=function(){return this.$a},t.prototype.setSessionStartTimeMS=function(t){this.Qa.sessionStartTime=t,this.Za()},t.prototype.getSessionStartTimeMS=function(){return this.Qa.sessionStartTime},t.prototype.setLastUserActivityTimeMS=function(t){this.Xa.setLastUserActivityTimeMS(t)},t.prototype.getLastUserActivityTimeMS=function(){return this.Xa.getLastUserActivityTimeMS()},t.prototype.setPageCount=function(t){this.Qa.pageCount=t,this.Za()},t.prototype.getPageCount=function(){return this.Qa.pageCount},t.prototype.getClientStore=function(){return this.wa},t.prototype.setCookie=function(t,n,i){void 0===i&&(i=new Date(p()+6048e5).toUTCString()),this.wa.setCookie(t,n,i)},t.prototype.setCookieDomain=function(t,n){var i=n;(C(i)||i.match(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/g))&&(i="");var r=function(t){return R(t,"_fs_cookie_domain")}(t);"string"==typeof r&&(i=r),this.wa.setDomain(i)},t.prototype.setIds=function(t,n,i,r){this.setCookieDomain(t,n),this.Qa.userId=i,this.Qa.sessionId=r,this.Za()},t.prototype.clearAppId=function(){return!!this.Qa.appKeyHash&&(this.$a="",this.Qa.appKeyHash="",this.Za(),!0)},t.prototype.encode=function(){var t,n,i,r=[this.Qa.userId,null!==(t=this.Qa.sessionId)&&void 0!==t?t:"",""+(null!==(n=this.Qa.sessionStartTime)&&void 0!==n?n:""),"",""+(null!==(i=this.Qa.pageCount)&&void 0!==i?i:"")].join(":"),e=["",this.Qa.orgId,r];return this.Qa.appKeyHash&&e.push(encodeURIComponent(this.Qa.appKeyHash)),e.push("/"+this.Qa.expirationAbsTimeSeconds),e.join("#")},t.prototype.Za=function(){var t=this.encode(),n=new Date(1e3*this.Qa.expirationAbsTimeSeconds).toUTCString();this.wa.setValue(ra,t,n,pn)},t;}(),sa=((Zu={})[Xt.Document]={assetMapId:"str",releaseDatetime:"date",releaseVersion:"str"},Zu[Xt.Event]={},Zu[Xt.Page]={pageName:"str",releaseVersion:"str",releaseDatetime:"str"},Zu[Xt.User]={uid:"str",displayName:"str",email:"str"},Zu),oa={str:ua,bool:aa,real:ca,"int":ha,date:fa,strs:va(ua),bools:va(aa),reals:va(ca),ints:va(ha),dates:va(fa),objs:va(la),obj:la};function ua(t){return"string"==typeof t}function aa(t){return"boolean"==typeof t}function ca(t){return"number"==typeof t}function ha(t){return"number"==typeof t&&t-o.mathFloor(t)==0}function fa(t){return!(!t||(t.constructor===Date?isNaN(t):"number"!=typeof t&&"string"!=typeof t||isNaN(new Date(t))))}function va(t){return function(n){if(!(n instanceof Array))return!1;for(var i=0;i=0)return[void 0,Jt.FsId];var e=qo(r),s=void 0;return n&&n.Qa.appKeyHash&&n.Qa.appKeyHash!==e&&n.Qa.appKeyHash!==r&&(n.Qa.appKeyHash,s=Jt.NewUid),[r,s]}(f,this.Uu),l=v[0],d=v[1];if(!l)return Jt.FsId,{events:r};a.properties.uid=l,this.Uu.setAppId(l),d===Jt.NewUid&&(i=!0)}}Ea(t.source,"setVars",e),e(this.nc(s,wa(s,a.properties),u));break;default:(0,Ir.nt)(s,"Unsupported");}}catch(n){t.operation,n.message}return{events:r,reidentify:i}},t.prototype.nc=function(t,n,i,r){var e=vt(n.PayloadToSend),s=!!i&&"fs"!==i;switch(t){case Xt.Event:return{When:0,Kind:Ot.SYS_CUSTOM,Args:s?[r,e,i]:[r,e]};case Xt.Document:case Xt.Page:case Xt.User:return{When:0,Kind:Ot.SYS_SETVAR,Args:s?[t,e,i]:[t,e]};default:(0,Ir.nt)(t,"Unsupported");}},t.prototype.ic=function(t,n){var i=t.PayloadToSend;if(i&&"object"==typeof i){var r=0,e={};for(var s in i)if(!(s in this.Ya)){var o=i[s];this.Ya[s]={value:o,apiSource:n},e[s]=o,r++}if(0!==r)return{PayloadToSend:e,ValidationErrors:t.ValidationErrors}}},t;}();function wa(t,n){var i=1500;return ga(function(){return--i},t,n)}var ga=function(t,n,i){var r,e,s={PayloadToSend:{},ValidationErrors:[]},u=function(i){var r=ga(t,n,i);return s.ValidationErrors=s.ValidationErrors.concat(r.ValidationErrors),r.PayloadToSend};for(var a in i)if(o.objectHasOwnProp(i,a)){if(t()<=0)break;var c=i[a],h=ya(n,a,c,s.ValidationErrors);if(h){var f=h.name;if("obj"!==h.type){if("objs"!==h.type)s.PayloadToSend[f]=ma(h.type,h.value);else{n!=Xt.Event&&s.ValidationErrors.push({Type:"vartype",FieldName:f,ValueType:"Array (unsupported)"});for(var v=[],l=0;l0&&(s.PayloadToSend[f]=v)}}else{var d=u(h.value),p=(e="_obj").length>(r=a).length||r.substring(r.length-e.length)!=e?f.substring(0,f.length-"_obj".length):f;s.PayloadToSend[p]=d}}else s.PayloadToSend[a]=ma("str",c)}return s};function ma(t,n){var i=n;return"str"==t&&"string"==typeof i&&(i=i.trim()),null==i||"date"!=t&&i.constructor!=Date||(i=function(t){var n=t.constructor===Date?t:new Date(t);try{return n.toISOString()}catch(t){return null}}(i)),i}function ya(t,n,i,r){var e=n,s=e,u=typeof i;if("undefined"===u)return r.push({Type:"vartype",FieldName:e,ValueType:u+" (unsupported)"}),null;var a=sa[t];if(o.objectHasOwnProp(a,e))return{name:e,type:a[e],value:i};var c=e.lastIndexOf("_");if(-1==c||!ba(e.substring(c+1))){var h=function(t){for(var n in oa)if(oa[n](t))return n;return null}(i);if(null==h)return i?r.push({Type:"vartype",FieldName:e}):r.push({Type:"vartype",FieldName:e,ValueType:"null (unsupported)"}),null;c=e.length,e=e+"_"+h}var f=e.substring(0,c),v=e.substring(c+1);if("object"===u&&!i)return r.push({Type:"vartype",FieldName:s,ValueType:"null (unsupported)"}),null;if(!da.test(f)){f=f.replace(/[^a-zA-Z0-9_]/g,"").replace(/^[0-9]+/,""),/[0-9]/.test(f[0])&&(f=f.substring(1)),r.push({Type:"varname",FieldName:s});var l=f+"_"+v;if(da.source,""==f)return null;e=l}return ba(v)?function(t,n){return oa[t](n)}(v,i)?{name:e,type:v,value:i}:(vt(i),"number"===u?u=i%1==0?"integer":"real":"object"==u&&null!=i&&i.constructor==Date&&(u=isNaN(i)?"invalid date":"date"),r.push({Type:"vartype",FieldName:s,ValueType:u}),null):(r.push({Type:"varname",FieldName:s}),null)}function ba(t){return!!oa[t]}function Ea(t,n,i){var r=Uu({source:t,type:"api",entrypoint:n});r&&i({When:0,Kind:r.Kind,Args:r.Args})}function Sa(t,n){return(0,e.__awaiter)(this,void 0,Yn,function(){var i,s,o,a,c;return(0,e.__generator)(this,function(h){switch(h.label){case 0:if(h.trys.push([0,2,,3]),gr||yr||function(t){return!!R(t,"_fs_use_polyfilled_apis","boolean")}(t))return[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];if(!t.document||n.status!==r.Unknown)return[2,n];if(i=function(t,n){var i=n.functions,s={},o=(0,e.__assign)({},n.helpers);if(o.functionToString=function(t,n){var i,r,e=null===(i=t["__core-js_shared__"])||void 0===i?void 0:i.inspectSource;if(e){var s=function(){return e(this)};if(ka(s,2))return s}var o=null===(r=t["__core-js_shared__"])||void 0===r?void 0:r["native-function-to-string"];if(ka(o))return o;var u=n.__zone_symbol__OriginalDelegate;return ka(u)?u:ka(n)?n:void 0}(t,o.functionToString),!o.functionToString)return n;var u=!1;for(var a in i)if(i[a]){if(s[a]=Ia(o.functionToString,i[a]),s[a]||(s[a]=Ta(o.functionToString,o,a)),!s[a])return n;s[a]!==i[a]&&(u=!0)}else s[a]=void 0;return{status:r.Clean,functions:u?s:i,helpers:o,errors:[]}}(t,n),i.status===r.Clean)return[2,i];(s=t.document.createElement("iframe")).id="FullStory-iframe",s.className="fs-hide",s.style.display="none",o=t.document.body||t.document.head||t.document.documentElement||t.document;try{o.appendChild(s)}catch(t){return[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})]}return s.contentWindow?(a=u(s.contentWindow,r.Clean),s.parentNode&&s.parentNode.removeChild(s),a.status===r.UnrecoverableFailure?[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})]:[4,xa(a,n)]):[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];case 1:return[2,h.sent()];case 2:return c=h.sent(),Tt.sendToBugsnag(c,"error"),[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];case 3:return[2];}})})}function xa(t,n){var i,s=new Yn(function(t){return i=t});return setTimeout(function(){try{t.functions.jsonParse("[]").push(0)}catch(t){i((0,e.__assign)((0,e.__assign)({},n),{status:r.Clean}))}i(t)}),s}function ka(t,n){var i;if(void 0===n&&(n=0),!t)return!1;try{t.call(function(){})}catch(t){return!1}var r=function(t){try{return void t.call(null)}catch(t){return (t.stack||"").replace(/__fs_nomangle_check_stack(.|\n)*$/,"");}},e=void 0;0!==n&&"number"==typeof Error.stackTraceLimit&&(e=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY);var s=[function(){throw new Error("")},t],o=function __fs_nomangle_check_stack(){return s.map(r)}(),u=o[0],a=o[1];if(void 0!==e&&(Error.stackTraceLimit=e),!u||!a)return!1;for(var c="\n".charCodeAt(0),h=u.length>a.length?a.length:u.length,f=1,v=f;v=0}var Aa=["__zone_symbol__OriginalDelegate","nr@original"];function Ia(t,n){if(n){for(var i=0,r=Aa;i0&&this.lc[t].some(function(t){return!t.disconnected})},t.prototype.takeRecords=function(t){var n,i=null!==(n=this.lc[t.type])&&void 0!==n?n:[];if(0!==i.length)for(var r=0,e=i;r-1,!!ja.userAgent.match("CriOS")||"Google Inc."===Oa&&!Ma&&!Ka),Fa=/Firefox/.test(window.navigator.userAgent);function Da(t){if(!Fa)return!1;var n=window.navigator.userAgent.match(/Firefox\/(\d+)/);return!(!n||!n[1])&&parseInt(n[1],10)0||null===H){n="Init config rejected: "+R.unrecoverable.join(",\n"),k(t,new Error(n));break}R.recoverable.length>0&&(n="Init config partially rejected: "+R.recoverable.join(",\n")),a=H,x(t);break;default:(0,Ir.nt)(t,"invalid operation");}}catch(n){Tt.sendToBugsnag(n,"error"),k(t,n)}},A=0,I=p;A=0;u--)(e=t[u])&&(o=(s<3?e(o):s>3?e(n,i,o):e(n,i))||o);return s>3&&o&&Object.defineProperty(n,i,o),o}function a(t,n){return function(i,r){n(i,r,t)}}function c(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function h(t,n,i,r){return new(i||(i=Promise))(function(e,s){function o(t){try{a(r.next(t))}catch(t){s(t)}}function u(t){try{a(r["throw"](t))}catch(t){s(t)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i(function(t){t(n)})).then(o,u)}a((r=r.apply(t,n||[])).next())})}function f(t,n){var i,r,e,s,o={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return s={next:u(0),"throw":u(1),"return":u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(s){return function(u){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(e=2&s[0]?r["return"]:s[0]?r["throw"]||((e=r["return"])&&e.call(r),0):r.next)&&!(e=e.call(r,s[1])).done)return e;switch(r=0,e&&(s=[2&s[0],e.value]),s[0]){case 0:case 1:e=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((e=(e=o.trys).length>0&&e[e.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!e||s[1]>e[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(t,n){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var r,e,s=i.call(t),o=[];try{for(;(void 0===n||n-->0)&&!(r=s.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=s["return"])&&i.call(s)}finally{if(e)throw e.error}}return o}function w(){for(var t=[],n=0;n1||u(t,n)})})}function u(t,n){try{(i=e[t](n)).value instanceof y?Promise.resolve(i.value.v).then(a,c):h(s[0][2],i)}catch(t){h(s[0][3],t)}var i}function a(t){u("next",t)}function c(t){u("throw",t)}function h(t,n){t(n),s.shift(),s.length&&u(s[0][0],s[0][1])}}function E(t){var n,i;return n={},r("next"),r("throw",function(t){throw t}),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,e){n[r]=t[r]?function(n){return(i=!i)?{value:y(t[r](n)),done:"return"===r}:e?e(n):n}:e}}function S(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=t[Symbol.asyncIterator];return i?i.call(t):(t=d(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=t[i]&&function(n){return new Promise(function(r,e){!function(t,n,i,r){Promise.resolve(r).then(function(n){t({value:n,done:i})},n)}(r,e,(n=t[i](n)).done,n.value)})}}}function x(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t}var k=Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t["default"]=n};function _(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&v(n,t,i);return k(n,t),n}function A(t){return t&&t.__esModule?t:{"default":t}}function I(t,n,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:n.get(t)}function T(t,n,i,r,e){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!e:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?e.call(t,i):e?e.value=i:n.set(t,i),i}function C(t,n){if(null===n||"object"!=typeof n&&"function"!=typeof n)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?n===t:t.has(n)}}},n={};function i(r){var e=n[r];if(void 0!==e)return e.exports;var s=n[r]={exports:{}};return t[r](s,s.exports,i),s.exports}i.d=function(t,n){for(var r in n)i.o(n,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(248)}(); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts index 8090117ad5df2..656c70a0dcbfd 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts @@ -152,7 +152,7 @@ type RegistryPolicyTemplateWithInputs = RegistryPolicyTemplate & { export const hasPolicyTemplateInputs = ( policyTemplate: RegistryPolicyTemplate ): policyTemplate is RegistryPolicyTemplateWithInputs => { - return policyTemplate.hasOwnProperty('inputs'); + return Object.hasOwn(policyTemplate, 'inputs'); }; export const getVulnMgmtCloudFormationDefaultValue = (packageInfo: PackageInfo): string => { diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_actions_providers/follower_index_pause_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_actions_providers/follower_index_pause_provider.js index ea67df7b4fb6d..7211c6e1425a2 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_actions_providers/follower_index_pause_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_actions_providers/follower_index_pause_provider.js @@ -107,7 +107,6 @@ class FollowerIndexPauseProviderUi extends PureComponent { )}

)} - {!isSingle && (

diff --git a/x-pack/plugins/data_visualizer/common/types/field_vis_config.ts b/x-pack/plugins/data_visualizer/common/types/field_vis_config.ts index 8d46ca6c2d3c1..73b228ff454ef 100644 --- a/x-pack/plugins/data_visualizer/common/types/field_vis_config.ts +++ b/x-pack/plugins/data_visualizer/common/types/field_vis_config.ts @@ -54,11 +54,11 @@ export interface FileBasedUnknownFieldVisConfig { export function isFileBasedFieldVisConfig( field: FieldVisConfig | FileBasedFieldVisConfig ): field is FileBasedFieldVisConfig { - return !field.hasOwnProperty('existsInDocs'); + return !Object.hasOwn(field, 'existsInDocs'); } export function isIndexBasedFieldVisConfig( field: FieldVisConfig | FileBasedFieldVisConfig ): field is FieldVisConfig { - return field.hasOwnProperty('existsInDocs'); + return Object.hasOwn(field, 'existsInDocs'); } diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/combined_fields_form.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/combined_fields_form.tsx index 6f9f481a70a50..8676be744cb53 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/combined_fields_form.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/combined_fields_form.tsx @@ -145,7 +145,7 @@ export class CombinedFieldsForm extends Component { } const mappings = this.parseMappings(); - return mappings.properties.hasOwnProperty(name); + return Object.hasOwn(mappings.properties, name); }; render() { diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx index 2f3dabec566c1..259b45d4e297b 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx @@ -180,7 +180,7 @@ export const ResultsLinks: FC = ({ fieldStats && typeof fieldStats === 'object' && timeFieldName !== undefined && - fieldStats.hasOwnProperty(timeFieldName) && + Object.hasOwn(fieldStats, timeFieldName) && fieldStats[timeFieldName].earliest !== undefined && fieldStats[timeFieldName].latest !== undefined ) { diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts b/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts index f8d299f9e0ec7..0aca4f9260b7d 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts @@ -58,7 +58,7 @@ export function readFile(file: File) { export function createUrlOverrides(overrides: InputOverrides, originalSettings: InputOverrides) { const formattedOverrides: InputOverrides = {}; for (const o in overrideDefaults) { - if (overrideDefaults.hasOwnProperty(o)) { + if (Object.hasOwn(overrideDefaults, o)) { let value = overrides[o]; if ( (Array.isArray(value) && isEqual(value, originalSettings[o])) || diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts index 6e3f4ae33fa3f..6cfa569fdeafd 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts @@ -354,7 +354,7 @@ export function useOverallStats { nonAggregatableFields.forEach((field, fieldIdx) => { - if (doc.hasOwnProperty(field)) { + if (Object.hasOwn(doc, field)) { nonAggregatableFieldsCount[fieldIdx] += 1; nonAggregatableFieldsUniqueCount[fieldIdx].add(doc[field]!); } diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx index 9412f08172c48..745e03da10d09 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx @@ -229,7 +229,7 @@ const DataVisualizerStateContextProvider: FC> { return ( isPopulatedObject(arg, ['rawResponse']) && - (arg.rawResponse as estypes.SearchResponse).hasOwnProperty('hits') + Object.hasOwn(arg.rawResponse as estypes.SearchResponse, 'hits') ); } @@ -179,8 +179,8 @@ export const processAggregatableFieldsExistResponse = ( }); } else { if ( - datafeedConfig?.script_fields?.hasOwnProperty(field) || - datafeedConfig?.runtime_mappings?.hasOwnProperty(field) + Object.hasOwn(datafeedConfig?.script_fields ?? {}, field) || + Object.hasOwn(datafeedConfig?.runtime_mappings ?? {}, field) ) { const cardinality = get(aggregations, [ ...aggsPath, diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts index 0e0efb057706c..87235a7d14570 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts @@ -110,7 +110,7 @@ export function getEsQueryFromSavedSearch({ if (Array.isArray(savedQuery.bool.filter) && timeField !== undefined) { savedQuery.bool.filter = savedQuery.bool.filter.filter( (c: QueryDslQueryContainer) => - !(c.hasOwnProperty('range') && c.range?.hasOwnProperty(timeField)) + !(Object.hasOwn(c, 'range') && Object.hasOwn(c.range ?? {}, timeField)) ); } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curation/results/utils.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curation/results/utils.ts index aebc84e41896a..fd5b98a02ff08 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curation/results/utils.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curation/results/utils.ts @@ -43,7 +43,7 @@ export const convertToResultFormat = (document: CurationResult): SearchResult => // Convert `key: 'value'` into `key: { raw: 'value' }` const result = Object.entries(document).reduce((acc, [key, value]) => { acc[key] = - isNestedObject(value) || Object.prototype.hasOwnProperty.call(value, 'raw') + isNestedObject(value) || (typeof value === 'object' && Object.hasOwn(value, 'raw')) ? value : { raw: value }; return acc; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion_logic.ts index 907961c142fb5..a05e952573781 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion_logic.ts @@ -282,7 +282,7 @@ const updateSuggestion = async ( } ); - if (response.results[0].hasOwnProperty('error')) { + if (Object.hasOwn(response.results[0], 'error')) { throw new Error((response.results[0] as APIResponseError).error); } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_queries_panel/ignored_queries_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_queries_panel/ignored_queries_logic.ts index 3f4e1eb2318e6..5062c933d9f29 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_queries_panel/ignored_queries_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_queries_panel/ignored_queries_logic.ts @@ -130,7 +130,7 @@ export const IgnoredQueriesLogic = kea(v: T | T[]): T[] => (Array.isArray(v) ? v : [v]); const toString = (v1: T) => String(v1); const normalizeBoostValue = (boost: RawBoost): Boost => { - if (!boost.hasOwnProperty('value')) { + if (!Object.hasOwn(boost, 'value')) { // Can't simply do `return boost` here as TS can't infer the correct type return omit(boost, 'value'); } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts index 288600eea8aa0..481baca5e35d4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts @@ -151,7 +151,7 @@ export const ResultSettingsLogic = kea resetAllFields(resultFields), // @ts-expect-error upgrade typescript v5.1.6 updateField: (resultFields, { fieldName, settings }) => - resultFields.hasOwnProperty(fieldName) + Object.hasOwn(resultFields, fieldName) ? { ...resultFields, [fieldName]: settings } : resultFields, }, diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/schema_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/schema_logic.ts index f679e34dec56e..418cfa66471f7 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/schema_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/schema_logic.ts @@ -140,7 +140,7 @@ export const SchemaLogic = kea>({ }, listeners: ({ actions, values }) => ({ addSchemaField: ({ fieldName, fieldType }) => { - if (values.schema.hasOwnProperty(fieldName)) { + if (Object.hasOwn(values.schema, fieldName)) { setErrorMessage(ADD_SCHEMA_ERROR(fieldName)); actions.closeModal(); } else { diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/docs_explorer/convert_results.ts b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/docs_explorer/convert_results.ts index 96ab127870a34..ff8e67817f86e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/docs_explorer/convert_results.ts +++ b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/docs_explorer/convert_results.ts @@ -49,7 +49,7 @@ export const getIndex = (result: SearchResult): string => { export const isFieldValue = (value: unknown): value is FieldValue => { if (value === null || typeof value !== 'object') return false; - return value.hasOwnProperty('raw') || value.hasOwnProperty('snippet'); + return Object.hasOwn(value, 'raw') || Object.hasOwn(value, 'snippet'); }; export const flattenObjectPreservingValues = ( diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts index ddefe7e1b0d55..864bfa5a34fa2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts @@ -98,7 +98,7 @@ export const IndexPipelinesConfigurationsLogic = kea< selectedPipeline: [ () => [selectors.selectedPipelineId, selectors.pipelines], (selectedPipelineId: string, pipelines: Record) => { - if (pipelines.hasOwnProperty(selectedPipelineId)) { + if (Object.hasOwn(pipelines, selectedPipelineId)) { return pipelines[selectedPipelineId]; } return undefined; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/pipelines/is_managed.ts b/x-pack/plugins/enterprise_search/public/applications/shared/pipelines/is_managed.ts index 30cf5ac145c87..a5bb8b23a77c3 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/pipelines/is_managed.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/pipelines/is_managed.ts @@ -17,7 +17,7 @@ interface IngestPipelineWithMetadata extends IngestPipeline { const isIngestPipelineWithMetadata = ( pipeline: IngestPipeline ): pipeline is IngestPipelineWithMetadata => { - return pipeline.hasOwnProperty('_meta'); + return Object.hasOwn(pipeline, '_meta'); }; export const isManagedPipeline = (pipeline: IngestPipeline): boolean => { diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts b/x-pack/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts index e6abf4ccd5464..33b97bf030954 100644 --- a/x-pack/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts +++ b/x-pack/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts @@ -91,7 +91,7 @@ export const fetchPipelineProcessorInferenceData = async ( // Get the inference processors; there is one per configured field, but they share the same model ID const inferenceProcessors = subProcessors.filter((processor) => - processor.hasOwnProperty('inference') + Object.hasOwn(processor, 'inference') ); const trainedModelName = inferenceProcessors[0]?.inference?.model_id; @@ -153,7 +153,7 @@ export const getMlModelConfigsForModelIds = async ( trainedModelsStats.trained_model_stats.forEach((trainedModelStats) => { const trainedModelName = trainedModelStats.model_id; - if (modelConfigs.hasOwnProperty(trainedModelName)) { + if (Object.hasOwn(modelConfigs, trainedModelName)) { modelConfigs[trainedModelName].modelState = parseModelStateFromStats( trainedModelStats, modelConfigs[trainedModelName].types diff --git a/x-pack/plugins/fields_metadata/server/services/fields_metadata/fields_metadata_client.test.ts b/x-pack/plugins/fields_metadata/server/services/fields_metadata/fields_metadata_client.test.ts index e693725a93d89..93c43fa69e5c8 100644 --- a/x-pack/plugins/fields_metadata/server/services/fields_metadata/fields_metadata_client.test.ts +++ b/x-pack/plugins/fields_metadata/server/services/fields_metadata/fields_metadata_client.test.ts @@ -93,16 +93,16 @@ describe('FieldsMetadataClient class', () => { const timestampField = timestampFieldInstance.toPlain(); - expect(timestampField.hasOwnProperty('dashed_name')).toBeTruthy(); - expect(timestampField.hasOwnProperty('description')).toBeTruthy(); - expect(timestampField.hasOwnProperty('example')).toBeTruthy(); - expect(timestampField.hasOwnProperty('flat_name')).toBeTruthy(); - expect(timestampField.hasOwnProperty('level')).toBeTruthy(); - expect(timestampField.hasOwnProperty('name')).toBeTruthy(); - expect(timestampField.hasOwnProperty('normalize')).toBeTruthy(); - expect(timestampField.hasOwnProperty('required')).toBeTruthy(); - expect(timestampField.hasOwnProperty('short')).toBeTruthy(); - expect(timestampField.hasOwnProperty('type')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'dashed_name')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'description')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'example')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'flat_name')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'level')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'name')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'normalize')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'required')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'short')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'type')).toBeTruthy(); }); it('should attempt resolving the field from an integration if it does not exist in ECS/Metadata and the integration and dataset params are provided', async () => { @@ -118,14 +118,14 @@ describe('FieldsMetadataClient class', () => { const onePasswordField = onePasswordFieldInstance.toPlain(); - expect(onePasswordField.hasOwnProperty('name')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('type')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('description')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('flat_name')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('source')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('dashed_name')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('normalize')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('short')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'name')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'type')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'description')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'flat_name')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'source')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'dashed_name')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'normalize')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'short')).toBeTruthy(); }); it('should not resolve the field from an integration if the integration and dataset params are not provided', async () => { @@ -148,7 +148,7 @@ describe('FieldsMetadataClient class', () => { const fields = fieldsDictionaryInstance.toPlain(); - expect(fields.hasOwnProperty('@timestamp')).toBeTruthy(); + expect(Object.hasOwn(fields, '@timestamp')).toBeTruthy(); }); it('should resolve a FieldsMetadataDictionary of matching fields, including integration fields when integration and dataset params are provided', async () => { @@ -162,8 +162,8 @@ describe('FieldsMetadataClient class', () => { const fields = fieldsDictionaryInstance.toPlain(); - expect(fields.hasOwnProperty('@timestamp')).toBeTruthy(); - expect(fields.hasOwnProperty('onepassword.client.platform_version')).toBeTruthy(); + expect(Object.hasOwn(fields, '@timestamp')).toBeTruthy(); + expect(Object.hasOwn(fields, 'onepassword.client.platform_version')).toBeTruthy(); }); it('should resolve a FieldsMetadataDictionary of matching fields, skipping unmatched fields', async () => { @@ -177,9 +177,9 @@ describe('FieldsMetadataClient class', () => { const fields = fieldsDictionaryInstance.toPlain(); - expect(fields.hasOwnProperty('@timestamp')).toBeTruthy(); - expect(fields.hasOwnProperty('onepassword.client.platform_version')).toBeTruthy(); - expect(fields.hasOwnProperty('not-existing-field')).toBeFalsy(); + expect(Object.hasOwn(fields, '@timestamp')).toBeTruthy(); + expect(Object.hasOwn(fields, 'onepassword.client.platform_version')).toBeTruthy(); + expect(Object.hasOwn(fields, 'not-existing-field')).toBeFalsy(); }); }); }); diff --git a/x-pack/plugins/fields_metadata/server/services/fields_metadata/repositories/integration_fields_repository.ts b/x-pack/plugins/fields_metadata/server/services/fields_metadata/repositories/integration_fields_repository.ts index 0f25d9357855e..cf3c2b0454c7d 100644 --- a/x-pack/plugins/fields_metadata/server/services/fields_metadata/repositories/integration_fields_repository.ts +++ b/x-pack/plugins/fields_metadata/server/services/fields_metadata/repositories/integration_fields_repository.ts @@ -82,12 +82,12 @@ export class IntegrationFieldsRepository { } // 2. Dataset is passed but was never fetched before - if (datasetName && !cachedIntegration.hasOwnProperty(datasetName)) { + if (datasetName && !Object.hasOwn(cachedIntegration, datasetName)) { return undefined; } // 3. Dataset is passed and it was previously fetched, should return the field - if (datasetName && cachedIntegration.hasOwnProperty(datasetName)) { + if (datasetName && Object.hasOwn(cachedIntegration, datasetName)) { const targetDataset = cachedIntegration[datasetName]; return targetDataset[fieldName]; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/app.tsx b/x-pack/plugins/fleet/public/applications/fleet/app.tsx index 65a57cc81523b..ae4bbdf49747a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/app.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/app.tsx @@ -433,7 +433,6 @@ export const AppRoutes = memo( }} /> - {flyoutContext.isEnrollmentFlyoutOpen && ( )} - {flyoutContext.isFleetServerFlyoutOpen && ( flyoutContext.closeFleetServerFlyout()} /> diff --git a/x-pack/plugins/fleet/public/applications/integrations/app.tsx b/x-pack/plugins/fleet/public/applications/integrations/app.tsx index 992ecff3e49a3..8527dbc4c6c69 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/app.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/app.tsx @@ -169,7 +169,6 @@ export const AppRoutes = memo(() => { }} /> - {flyoutContext.isEnrollmentFlyoutOpen && ( { /> )} - {flyoutContext.isFleetServerFlyoutOpen && ( flyoutContext.closeFleetServerFlyout()} /> diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/cloud_security_posture/to_v8_11_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/cloud_security_posture/to_v8_11_0.ts index dd6760a9dc4ac..d866e998b2886 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/cloud_security_posture/to_v8_11_0.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/cloud_security_posture/to_v8_11_0.ts @@ -22,7 +22,10 @@ export const migrateCspPackagePolicyToV8110: SavedObjectModelDataBackfillFn< const gcpPackage = updatedAttributes.inputs.find((input) => input.type === 'cloudbeat/cis_gcp'); if (gcpPackage) { - const isGcpAccountTypeExists = gcpPackage.streams[0]?.vars?.hasOwnProperty('gcp.account_type'); + const isGcpAccountTypeExists = Object.hasOwn( + gcpPackage.streams[0]?.vars ?? {}, + 'gcp.account_type' + ); if (!isGcpAccountTypeExists) { const migratedPolicy = { 'gcp.account_type': { value: 'single-account', type: 'text' } }; diff --git a/x-pack/plugins/fleet/server/services/api_keys/transform_api_keys.ts b/x-pack/plugins/fleet/server/services/api_keys/transform_api_keys.ts index ab17eeaac7921..8888ae75e4699 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/transform_api_keys.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/transform_api_keys.ts @@ -26,8 +26,8 @@ import type { export function isTransformApiKey(arg: any): arg is TransformAPIKey { return ( arg && - arg.hasOwnProperty('api_key') && - arg.hasOwnProperty('encoded') && + Object.hasOwn(arg, 'api_key') && + Object.hasOwn(arg, 'encoded') && typeof arg.encoded === 'string' ); } diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts index 58dde5d714886..2ee8477e04f42 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts @@ -135,7 +135,7 @@ const installPreBuiltTemplates = async ( const esClientParams = { name: templateName, body: content }; const esClientRequestOptions = { ignore: [404] }; - if (content.hasOwnProperty('template') || content.hasOwnProperty('composed_of')) { + if (Object.hasOwn(content, 'template') || Object.hasOwn(content, 'composed_of')) { // Template is v2 return retryTransientEsErrors( () => esClient.indices.putIndexTemplate(esClientParams, esClientRequestOptions), diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts index e44e70b85efe0..795c7418b3b70 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts @@ -651,10 +651,10 @@ function _generateMappings( function generateDynamicAndEnabled(field: Field) { const props: Properties = {}; - if (field.hasOwnProperty('enabled')) { + if (Object.hasOwn(field, 'enabled')) { props.enabled = field.enabled; } - if (field.hasOwnProperty('dynamic')) { + if (Object.hasOwn(field, 'dynamic')) { props.dynamic = field.dynamic; } return props; @@ -663,10 +663,10 @@ function generateDynamicAndEnabled(field: Field) { function generateNestedProps(field: Field) { const props = generateDynamicAndEnabled(field); - if (field.hasOwnProperty('include_in_parent')) { + if (Object.hasOwn(field, 'include_in_parent')) { props.include_in_parent = field.include_in_parent; } - if (field.hasOwnProperty('include_in_root')) { + if (Object.hasOwn(field, 'include_in_root')) { props.include_in_root = field.include_in_root; } return props; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform_utils.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform_utils.ts index 8a24e6fb78149..16ff62acc1f74 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform_utils.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform_utils.ts @@ -24,7 +24,7 @@ export const getDestinationIndexAliases = (aliasSettings: unknown): TransformAli if (isPopulatedObject(aliasSettings)) { Object.keys(aliasSettings).forEach((alias) => { - if (aliasSettings.hasOwnProperty(alias) && typeof alias === 'string') { + if (Object.hasOwn(aliasSettings, alias) && typeof alias === 'string') { const moveOnCreation = aliasSettings[alias]?.move_on_creation === true; aliases.push({ alias, move_on_creation: moveOnCreation }); } diff --git a/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js b/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js index 81e1d9ce232d5..99eb2a63ee43b 100644 --- a/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js +++ b/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js @@ -469,7 +469,7 @@ function GraphWorkspace(options) { }, }; for (const field in termsByField) { - if (termsByField.hasOwnProperty(field)) { + if (Object.hasOwn(termsByField, field)) { const tq = {}; tq[field] = termsByField[field]; q.bool.should.push({ @@ -529,7 +529,7 @@ function GraphWorkspace(options) { }); for (const n in allNodes) { - if (!allNodes.hasOwnProperty(n)) { + if (!Object.hasOwn(allNodes, n)) { continue; } let node = allNodes[n]; @@ -994,7 +994,7 @@ function GraphWorkspace(options) { const primaryVertices = []; const secondaryVertices = []; for (const fieldName in nodesByField) { - if (nodesByField.hasOwnProperty(fieldName)) { + if (Object.hasOwn(nodesByField, fieldName)) { primaryVertices.push({ field: fieldName, include: nodesByField[fieldName], @@ -1327,7 +1327,7 @@ function GraphWorkspace(options) { txtsByFieldType[node.data.field] = txt; }); for (const field in txtsByFieldType) { - if (txtsByFieldType.hasOwnProperty(field)) { + if (Object.hasOwn(txtsByFieldType, field)) { likeQueries.push({ more_like_this: { like: txtsByFieldType[field], diff --git a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/index_priority_field.tsx b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/index_priority_field.tsx index 309e283c14d7c..e0989adf44e4f 100644 --- a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/index_priority_field.tsx +++ b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/index_priority_field.tsx @@ -28,9 +28,12 @@ export const IndexPriorityField: FunctionComponent = ({ phase }) => { const initialToggleValue = useMemo(() => { return ( - isNewPolicy || // enable index priority for new policies - !policy.phases[phase]?.actions || // enable index priority for new phases - policy.phases[phase]?.actions?.set_priority != null // enable index priority if it's set + // enable index priority for new policies + isNewPolicy || + // enable index priority for new phases: + !policy.phases[phase]?.actions || + // enable index priority if it's set: + policy.phases[phase]?.actions?.set_priority != null ); }, [isNewPolicy, policy.phases, phase]); diff --git a/x-pack/plugins/integration_assistant/server/graphs/ecs/validate.ts b/x-pack/plugins/integration_assistant/server/graphs/ecs/validate.ts index 34f4f520243c9..c5fee772e133a 100644 --- a/x-pack/plugins/integration_assistant/server/graphs/ecs/validate.ts +++ b/x-pack/plugins/integration_assistant/server/graphs/ecs/validate.ts @@ -140,7 +140,7 @@ export function findInvalidEcsFields(ecsMapping: AnyObject): string[] { ); for (const [ecsValue, paths] of Object.entries(filteredOutput)) { - if (!Object.prototype.hasOwnProperty.call(ecsDict, ecsValue)) { + if (!Object.hasOwn(ecsDict, ecsValue)) { const field = paths.map((p) => p.join('.')); results.push(`Invalid ECS field mapping identified for ${ecsValue} : ${field.join(', ')}`); } diff --git a/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx index 82da59b38cc27..f02a2897f825f 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx @@ -151,7 +151,7 @@ export function TimeShift({ options={timeShiftOptions.filter(({ value }) => { const parsedValue = parseTimeShift(value); return ( - parsedValue && !isValueTooSmall(parsedValue) && !isValueNotMultiple(parsedValue) // && + parsedValue && !isValueTooSmall(parsedValue) && !isValueNotMultiple(parsedValue) ); })} selectedOptions={getSelectedOption()} diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts b/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts index 92029e34f856c..847876f5c0ebd 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts @@ -61,7 +61,7 @@ export function getSuggestions({ !table.isMultiRow || table.columns.length <= 1 || table.columns.every((col) => col.operation.dataType !== 'number') || - table.columns.some((col) => !columnSortOrder.hasOwnProperty(col.operation.dataType)); + table.columns.some((col) => !Object.hasOwn(columnSortOrder, col.operation.dataType)); if ( (incompleteTable && state && !subVisualizationId) || diff --git a/x-pack/plugins/lens/server/migrations/common_migrations.ts b/x-pack/plugins/lens/server/migrations/common_migrations.ts index 0018f892b8b8e..0943ba2f0da53 100644 --- a/x-pack/plugins/lens/server/migrations/common_migrations.ts +++ b/x-pack/plugins/lens/server/migrations/common_migrations.ts @@ -323,7 +323,7 @@ export const getLensCustomVisualizationMigrations = ( const migrationMap: MigrateFunctionsObject = {}; const currentMigrations = migrationGetter(); for (const version in currentMigrations) { - if (currentMigrations.hasOwnProperty(version)) { + if (Object.hasOwn(currentMigrations, version)) { migrationMap[version] = getApplyCustomVisualizationMigrationToLens( id, currentMigrations[version] diff --git a/x-pack/plugins/licensing/common/license.ts b/x-pack/plugins/licensing/common/license.ts index 7231eeb4c1049..2f43af4bef49f 100644 --- a/x-pack/plugins/licensing/common/license.ts +++ b/x-pack/plugins/licensing/common/license.ts @@ -137,7 +137,7 @@ export class License implements ILicense { } getFeature(name: string) { - if (this.isAvailable && this.features && this.features.hasOwnProperty(name)) { + if (this.isAvailable && this.features && Object.hasOwn(this.features, name)) { return { ...this.features[name] }; } diff --git a/x-pack/plugins/maps/common/elasticsearch_util/elasticsearch_geo_utils.test.js b/x-pack/plugins/maps/common/elasticsearch_util/elasticsearch_geo_utils.test.js index 096f5370ca3b9..079df81fdf1f8 100644 --- a/x-pack/plugins/maps/common/elasticsearch_util/elasticsearch_geo_utils.test.js +++ b/x-pack/plugins/maps/common/elasticsearch_util/elasticsearch_geo_utils.test.js @@ -20,12 +20,12 @@ const geoFieldName = 'location'; const flattenHitMock = (hit) => { const properties = {}; for (const fieldName in hit._source) { - if (hit._source.hasOwnProperty(fieldName)) { + if (Object.hasOwn(hit._source, fieldName)) { properties[fieldName] = hit._source[fieldName]; } } for (const fieldName in hit.fields) { - if (hit.fields.hasOwnProperty(fieldName)) { + if (Object.hasOwn(hit.fields, fieldName)) { properties[fieldName] = hit.fields[fieldName]; } } @@ -338,7 +338,7 @@ describe('hitsToGeoJson', () => { }, ]; const geojson = hitsToGeoJson(hits, cachedFlattenHit, geoFieldName, 'geo_point', []); - expect(cachedProperities.hasOwnProperty('location')).toBe(true); + expect(Object.hasOwn(cachedProperities, 'location')).toBe(true); expect(geojson.features[0].properties).toEqual({}); }); }); diff --git a/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts b/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts index 393b30fb5feb2..7756a76159bc5 100644 --- a/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts +++ b/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts @@ -44,7 +44,7 @@ export function extractPropertiesFromBucket( ): BucketProperties { const properties: BucketProperties = {}; for (const key in bucket) { - if (ignoreKeys.includes(key) || !bucket.hasOwnProperty(key)) { + if (ignoreKeys.includes(key) || !Object.hasOwn(bucket, key)) { continue; } @@ -72,7 +72,7 @@ export function extractPropertiesFromBucket( ) { const values = bucket[key].values; for (const k in values) { - if (values.hasOwnProperty(k)) { + if (Object.hasOwn(values, k)) { properties[key] = values[k]; break; } diff --git a/x-pack/plugins/maps/public/classes/layers/ems_vector_tile_layer/ems_vector_tile_layer.tsx b/x-pack/plugins/maps/public/classes/layers/ems_vector_tile_layer/ems_vector_tile_layer.tsx index 78f0297a0f38d..93e665b7af187 100644 --- a/x-pack/plugins/maps/public/classes/layers/ems_vector_tile_layer/ems_vector_tile_layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/ems_vector_tile_layer/ems_vector_tile_layer.tsx @@ -261,7 +261,7 @@ export class EmsVectorTileLayer extends AbstractLayer { _addSpriteSheetToMapFromImageData(json: EmsSpriteSheet, imgData: ImageData, mbMap: MbMap) { for (const imageId in json) { - if (!(json.hasOwnProperty(imageId) && !mbMap.hasImage(imageId))) { + if (!(Object.hasOwn(json, imageId) && !mbMap.hasImage(imageId))) { continue; } const { width, height, x, y, sdf, pixelRatio } = json[imageId]; @@ -310,7 +310,7 @@ export class EmsVectorTileLayer extends AbstractLayer { } const newJson: EmsSpriteSheet = {}; for (const imageId in spriteMeta.json) { - if (spriteMeta.json.hasOwnProperty(imageId)) { + if (Object.hasOwn(spriteMeta.json, imageId)) { const namespacedImageId = this._makeNamespacedImageId(imageId); newJson[namespacedImageId] = spriteMeta.json[imageId]; } diff --git a/x-pack/plugins/maps/public/classes/sources/es_agg_source/es_agg_source.ts b/x-pack/plugins/maps/public/classes/sources/es_agg_source/es_agg_source.ts index b4330ce9a0f9b..08a0d5c4c5e3e 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_agg_source/es_agg_source.ts +++ b/x-pack/plugins/maps/public/classes/sources/es_agg_source/es_agg_source.ts @@ -129,7 +129,7 @@ export abstract class AbstractESAggSource extends AbstractESSource implements IE metricFields.forEach((metricField) => { let value; for (const key in mbProperties) { - if (mbProperties.hasOwnProperty(key) && metricField.getMbFieldName() === key) { + if (Object.hasOwn(mbProperties, key) && metricField.getMbFieldName() === key) { value = mbProperties[key]; break; } diff --git a/x-pack/plugins/maps/public/classes/sources/join_sources/es_distance_source/process_distance_response.ts b/x-pack/plugins/maps/public/classes/sources/join_sources/es_distance_source/process_distance_response.ts index 9f18195cb2f84..49b106a017a67 100644 --- a/x-pack/plugins/maps/public/classes/sources/join_sources/es_distance_source/process_distance_response.ts +++ b/x-pack/plugins/maps/public/classes/sources/join_sources/es_distance_source/process_distance_response.ts @@ -15,7 +15,7 @@ export function processDistanceResponse(response: any, countPropertyName: string const propertiesMap: PropertiesMap = new Map(); const buckets: any = response?.aggregations?.distance?.buckets ?? {}; for (const docId in buckets) { - if (buckets.hasOwnProperty(docId)) { + if (Object.hasOwn(buckets, docId)) { const bucket = buckets[docId]; // skip empty buckets diff --git a/x-pack/plugins/maps/public/classes/sources/join_sources/table_source/table_source.ts b/x-pack/plugins/maps/public/classes/sources/join_sources/table_source/table_source.ts index 0fb24d198bf78..06395af80bf30 100644 --- a/x-pack/plugins/maps/public/classes/sources/join_sources/table_source/table_source.ts +++ b/x-pack/plugins/maps/public/classes/sources/join_sources/table_source/table_source.ts @@ -70,7 +70,7 @@ export class TableSource extends AbstractVectorSource implements ITermJoinSource let propKey: string | number | undefined; const props: { [key: string]: string | number } = {}; for (const key in row) { - if (row.hasOwnProperty(key)) { + if (Object.hasOwn(row, key)) { if (key === this._descriptor.term && row[key]) { propKey = row[key]; } @@ -200,7 +200,7 @@ export class TableSource extends AbstractVectorSource implements ITermJoinSource async getTooltipProperties(properties: GeoJsonProperties): Promise { const tooltipProperties: ITooltipProperty[] = []; for (const key in properties) { - if (properties.hasOwnProperty(key)) { + if (Object.hasOwn(properties, key)) { const field = this.getFieldByName(key); if (field) { tooltipProperties.push(new TooltipProperty(key, await field.getLabel(), properties[key])); diff --git a/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source.tsx b/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source.tsx index ee7e46c06ca0b..9424e8dc34c9e 100644 --- a/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source.tsx +++ b/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source.tsx @@ -199,7 +199,7 @@ export class MVTSingleLayerVectorSource extends AbstractSource implements IMvtVe async getTooltipProperties(properties: GeoJsonProperties): Promise { const tooltips = []; for (const key in properties) { - if (properties.hasOwnProperty(key)) { + if (Object.hasOwn(properties, key)) { for (let i = 0; i < this._tooltipFields.length; i++) { const mvtField = this._tooltipFields[i]; if (mvtField.getName() === key) { diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/remove_orphaned.ts b/x-pack/plugins/maps/public/connected_components/mb_map/remove_orphaned.ts index db5ff3d22e6e3..4b6e8031f9e00 100644 --- a/x-pack/plugins/maps/public/connected_components/mb_map/remove_orphaned.ts +++ b/x-pack/plugins/maps/public/connected_components/mb_map/remove_orphaned.ts @@ -39,7 +39,7 @@ export function removeOrphanedSourcesAndLayers( }); for (const mbSourceId in mbStyle.sources) { - if (mbStyle.sources.hasOwnProperty(mbSourceId)) { + if (Object.hasOwn(mbStyle.sources, mbSourceId)) { // ignore mapbox sources from spatial filter layer if (spatialFilterLayer.ownsMbSourceId(mbSourceId)) { continue; diff --git a/x-pack/plugins/maps/public/lens/choropleth_chart/suggestions.ts b/x-pack/plugins/maps/public/lens/choropleth_chart/suggestions.ts index 68a17b4a0da67..d22dec0ee4b79 100644 --- a/x-pack/plugins/maps/public/lens/choropleth_chart/suggestions.ts +++ b/x-pack/plugins/maps/public/lens/choropleth_chart/suggestions.ts @@ -49,7 +49,7 @@ export function getSuggestions( }) .forEach((bucket) => { for (const tableId in activeData) { - if (activeData.hasOwnProperty(tableId)) { + if (Object.hasOwn(activeData, tableId)) { const emsSuggestion = getEmsSuggestion( emsFileLayers, activeData[tableId], diff --git a/x-pack/plugins/maps/public/selectors/map_selectors.ts b/x-pack/plugins/maps/public/selectors/map_selectors.ts index ff47c2ccfa874..3d00bcf4fee5b 100644 --- a/x-pack/plugins/maps/public/selectors/map_selectors.ts +++ b/x-pack/plugins/maps/public/selectors/map_selectors.ts @@ -443,7 +443,7 @@ export const getMostCommonDataViewId = createSelector( const counts: { [key: string]: number } = {}; function incrementCount(ids: string[]) { ids.forEach((id) => { - const count = counts.hasOwnProperty(id) ? counts[id] : 0; + const count = Object.hasOwn(counts, id) ? counts[id] : 0; counts[id] = count + 1; }); } diff --git a/x-pack/plugins/maps/server/maps_telemetry/map_stats/map_stats_collector.ts b/x-pack/plugins/maps/server/maps_telemetry/map_stats/map_stats_collector.ts index e300c2a584873..8a3cacf1821ae 100644 --- a/x-pack/plugins/maps/server/maps_telemetry/map_stats/map_stats_collector.ts +++ b/x-pack/plugins/maps/server/maps_telemetry/map_stats/map_stats_collector.ts @@ -155,7 +155,7 @@ export class MapStatsCollector { counts: { [key: string]: number } ) { for (const key in counts) { - if (!counts.hasOwnProperty(key)) { + if (!Object.hasOwn(counts, key)) { continue; } @@ -174,7 +174,7 @@ export class MapStatsCollector { } for (const key in clusterStats) { - if (clusterStats.hasOwnProperty(key)) { + if (Object.hasOwn(clusterStats, key)) { clusterStats[key].avg = clusterStats[key].total / this._mapCount; } } @@ -186,7 +186,7 @@ export class MapStatsCollector { } { const results: { [key: string]: Omit } = {}; for (const key in clusterStats) { - if (clusterStats.hasOwnProperty(key)) { + if (Object.hasOwn(clusterStats, key)) { results[key] = this._excludeTotal(clusterStats[key]); } } diff --git a/x-pack/plugins/ml/common/types/alerts.ts b/x-pack/plugins/ml/common/types/alerts.ts index 12bae1a9d3d16..dd49f4fa272ec 100644 --- a/x-pack/plugins/ml/common/types/alerts.ts +++ b/x-pack/plugins/ml/common/types/alerts.ts @@ -105,15 +105,15 @@ export interface InfluencerAnomalyAlertDoc extends BaseAnomalyAlertDoc { export type AlertHitDoc = RecordAnomalyAlertDoc | BucketAnomalyAlertDoc | InfluencerAnomalyAlertDoc; export function isRecordAnomalyAlertDoc(arg: any): arg is RecordAnomalyAlertDoc { - return arg.hasOwnProperty('result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.RECORD; + return Object.hasOwn(arg, 'result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.RECORD; } export function isBucketAnomalyAlertDoc(arg: any): arg is BucketAnomalyAlertDoc { - return arg.hasOwnProperty('result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.BUCKET; + return Object.hasOwn(arg, 'result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.BUCKET; } export function isInfluencerAnomalyAlertDoc(arg: any): arg is InfluencerAnomalyAlertDoc { - return arg.hasOwnProperty('result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.INFLUENCER; + return Object.hasOwn(arg, 'result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.INFLUENCER; } export type MlAnomalyDetectionAlertParams = { diff --git a/x-pack/plugins/ml/common/util/es_utils.ts b/x-pack/plugins/ml/common/util/es_utils.ts index 44623dbd74ec6..f2ccd5980bcdc 100644 --- a/x-pack/plugins/ml/common/util/es_utils.ts +++ b/x-pack/plugins/ml/common/util/es_utils.ts @@ -36,8 +36,7 @@ export function isValidIndexName(indexName: string) { /^[^-_\+]+$/.test(indexName.charAt(0)) && // Cannot be . or .. indexName !== '.' && - indexName !== '..' && - // Cannot be longer than 255 bytes (note it is bytes, + indexName !== '..' && // Cannot be longer than 255 bytes (note it is bytes, // so multi-byte characters will count towards the 255 limit faster) isValidIndexNameLength(indexName) ); diff --git a/x-pack/plugins/ml/common/util/job_utils.ts b/x-pack/plugins/ml/common/util/job_utils.ts index 73c8cc927e5c7..eb89fe695522f 100644 --- a/x-pack/plugins/ml/common/util/job_utils.ts +++ b/x-pack/plugins/ml/common/util/job_utils.ts @@ -301,8 +301,8 @@ export function isModelPlotEnabled( // 'partition' field values even though this is supported on the back-end. // If supplied, check both the by and partition entities are in the terms. const detector = job.analysis_config.detectors[detectorIndex]; - const detectorHasPartitionField = detector.hasOwnProperty('partition_field_name'); - const detectorHasByField = detector.hasOwnProperty('by_field_name'); + const detectorHasPartitionField = Object.hasOwn(detector, 'partition_field_name'); + const detectorHasByField = Object.hasOwn(detector, 'by_field_name'); const terms = termsStr.split(','); if (detectorHasPartitionField) { diff --git a/x-pack/plugins/ml/common/util/validation_utils.ts b/x-pack/plugins/ml/common/util/validation_utils.ts index 66084f83ea87d..b31431cdb7d0d 100644 --- a/x-pack/plugins/ml/common/util/validation_utils.ts +++ b/x-pack/plugins/ml/common/util/validation_utils.ts @@ -45,7 +45,7 @@ export function findAggField( value = returnParent === true ? aggs : aggs[k]; return true; } - if (aggs.hasOwnProperty(k) && aggs[k] !== null && typeof aggs[k] === 'object') { + if (Object.hasOwn(aggs, k) && aggs[k] !== null && typeof aggs[k] === 'object') { value = findAggField(aggs[k], fieldName, returnParent); return value !== undefined; } diff --git a/x-pack/plugins/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/revert_model_snapshot_flyout.tsx b/x-pack/plugins/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/revert_model_snapshot_flyout.tsx index 8d7f1cc1649da..ac1e31ced032c 100644 --- a/x-pack/plugins/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/revert_model_snapshot_flyout.tsx +++ b/x-pack/plugins/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/revert_model_snapshot_flyout.tsx @@ -192,7 +192,6 @@ export const RevertModelSnapshotFlyout: FC = ({ {false && ( // disabled for now <> - = ({ - {revertModalVisible && ( = ( - {Array.isArray(chartsData.seriesToPlot) && chartsData.seriesToPlot.length === 0 && @@ -84,7 +83,6 @@ export const ExplorerAnomaliesContainer: FC = ( )} - {showCharts && ( { if (group.partial === false || (group.partial === true && j.oldGroups.includes(gId))) { @@ -159,7 +159,7 @@ export class GroupSelector extends Component { let success = true; for (const jobId in resp) { // check success of each job update - if (resp.hasOwnProperty(jobId)) { + if (Object.hasOwn(resp, jobId)) { if (resp[jobId].success === false) { getToastNotificationService().displayErrorToast(resp[jobId].error); success = false; diff --git a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/get_inference_properties_from_pipeline_config.ts b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/get_inference_properties_from_pipeline_config.ts index 6baa258d9f624..ce77b21a3bd34 100644 --- a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/get_inference_properties_from_pipeline_config.ts +++ b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/get_inference_properties_from_pipeline_config.ts @@ -63,7 +63,7 @@ export function isMlInferencePipelineInferenceConfig( export function isMlIngestInferenceProcessor(arg: unknown): arg is MLIngestInferenceProcessor { return ( isPopulatedObject(arg) && - arg.hasOwnProperty('inference_config') && + Object.hasOwn(arg, 'inference_config') && (isPopulatedObject(arg.inference_config, [SUPPORTED_PYTORCH_TASKS.QUESTION_ANSWERING]) || isPopulatedObject(arg.inference_config, [SUPPORTED_PYTORCH_TASKS.ZERO_SHOT_CLASSIFICATION])) ); @@ -105,7 +105,7 @@ export function getInferencePropertiesFromPipelineConfig( const configSettings = propertiesToReturn.inferenceConfig && propertiesToReturn.inferenceConfig[type]; propertiesToReturn[property] = - configSettings && configSettings.hasOwnProperty(property) + configSettings && Object.hasOwn(configSettings, property) ? // @ts-ignore configSettings[property] : undefined; diff --git a/x-pack/plugins/ml/public/application/model_management/models_list.tsx b/x-pack/plugins/ml/public/application/model_management/models_list.tsx index bc5c2450ebacf..c7622501d072b 100644 --- a/x-pack/plugins/ml/public/application/model_management/models_list.tsx +++ b/x-pack/plugins/ml/public/application/model_management/models_list.tsx @@ -401,7 +401,7 @@ export const ModelsList: FC = ({ }); const elasticModels = models.filter((model) => - ELASTIC_MODEL_DEFINITIONS.hasOwnProperty(model.model_id) + Object.hasOwn(ELASTIC_MODEL_DEFINITIONS, model.model_id) ); if (elasticModels.length > 0) { for (const model of elasticModels) { diff --git a/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx b/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx index 0ceea014110a8..dba7581577058 100644 --- a/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx +++ b/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx @@ -138,7 +138,7 @@ export const AnomalyDetectionPanel: FC = ({ anomalyTimelineService, setLa const tempGroups = { ...groupsObject }; for (const groupId in tempGroups) { - if (tempGroups.hasOwnProperty(groupId)) { + if (Object.hasOwn(tempGroups, groupId)) { tempGroups[groupId].overallSwimLane = groupsOverallScoreData[groupId]; } } diff --git a/x-pack/plugins/ml/public/application/services/field_format_service.ts b/x-pack/plugins/ml/public/application/services/field_format_service.ts index de4885861d331..d01a7294d9c0a 100644 --- a/x-pack/plugins/ml/public/application/services/field_format_service.ts +++ b/x-pack/plugins/ml/public/application/services/field_format_service.ts @@ -74,7 +74,7 @@ export class FieldFormatService { // Return the FieldFormat to use for formatting values from // the detector from the job with the specified ID. getFieldFormat(jobId: string, detectorIndex: number) { - if (this.formatsByJob.hasOwnProperty(jobId)) { + if (Object.hasOwn(this.formatsByJob, jobId)) { return this.formatsByJob[jobId][detectorIndex]; } } diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx index 06e57b138386c..ead36e4ffe3a4 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx @@ -268,7 +268,7 @@ export const SeriesControls: FC> = ({ // In case anomalous selector has been changed // we need to change it for all the other fields for (const c in updatedResultConfig) { - if (updatedResultConfig.hasOwnProperty(c)) { + if (Object.hasOwn(updatedResultConfig, c)) { updatedResultConfig[c as MlEntityFieldType]!.anomalousOnly = updatedFieldConfig.anomalousOnly; } @@ -279,7 +279,7 @@ export const SeriesControls: FC> = ({ // In case time range selector has been changed // we need to change it for all the other fields for (const c in updatedResultConfig) { - if (updatedResultConfig.hasOwnProperty(c)) { + if (Object.hasOwn(updatedResultConfig, c)) { updatedResultConfig[c as MlEntityFieldType]!.applyTimeRange = updatedFieldConfig.applyTimeRange; } diff --git a/x-pack/plugins/ml/public/application/util/custom_url_utils.ts b/x-pack/plugins/ml/public/application/util/custom_url_utils.ts index 6f5786e0eeb71..8e9279688e91f 100644 --- a/x-pack/plugins/ml/public/application/util/custom_url_utils.ts +++ b/x-pack/plugins/ml/public/application/util/custom_url_utils.ts @@ -141,8 +141,7 @@ function isKibanaUrl(urlConfig: MlUrlConfig) { urlValue.startsWith('apm#/') || // BrowserRouter based plugins urlValue.startsWith('metrics/') || - urlValue.startsWith('security/') || - // Legacy links + urlValue.startsWith('security/') || // Legacy links urlValue.startsWith('siem#/') ); } @@ -308,7 +307,7 @@ function buildKibanaUrl( const q = rison.decode(queryDef); - if (isRisonObject(q) && q.hasOwnProperty('query')) { + if (isRisonObject(q) && Object.hasOwn(q, 'query')) { const [resultPrefix, resultPostfix] = [prefix, postfix].map(replaceSingleTokenValues); const resultQuery = getQueryStringResult( resultPrefix, diff --git a/x-pack/plugins/ml/public/maps/anomaly_source.tsx b/x-pack/plugins/ml/public/maps/anomaly_source.tsx index 3c997cc98299c..780ecd3cc7352 100644 --- a/x-pack/plugins/ml/public/maps/anomaly_source.tsx +++ b/x-pack/plugins/ml/public/maps/anomaly_source.tsx @@ -284,7 +284,7 @@ export class AnomalySource implements IVectorSource { if (key === GEOJSON_FEATURE_ID_PROPERTY_NAME) { continue; } - if (properties.hasOwnProperty(key)) { + if (Object.hasOwn(properties, key)) { tooltipProperties.push(new AnomalySourceTooltipProperty(key, properties[key])); } } diff --git a/x-pack/plugins/ml/public/maps/util.ts b/x-pack/plugins/ml/public/maps/util.ts index 84f1b62314e1e..7666552e40e93 100644 --- a/x-pack/plugins/ml/public/maps/util.ts +++ b/x-pack/plugins/ml/public/maps/util.ts @@ -98,7 +98,7 @@ function getCoordinates(latLonString: string): number[] { export function getInitialAnomaliesLayers(jobId: string) { const initialLayers = []; for (const layer in ML_ANOMALY_LAYERS) { - if (ML_ANOMALY_LAYERS.hasOwnProperty(layer)) { + if (Object.hasOwn(ML_ANOMALY_LAYERS, layer)) { initialLayers.push({ id: htmlIdGenerator()(), type: LAYER_TYPE.GEOJSON_VECTOR, @@ -119,7 +119,7 @@ export function getInitialAnomaliesLayers(jobId: string) { export function getInitialSourceIndexFieldLayers(sourceIndexWithGeoFields: SourceIndexGeoFields) { const initialLayers = [] as unknown as LayerDescriptor[] & SerializableRecord; for (const index in sourceIndexWithGeoFields) { - if (sourceIndexWithGeoFields.hasOwnProperty(index)) { + if (Object.hasOwn(sourceIndexWithGeoFields, index)) { const { dataViewId, geoFields } = sourceIndexWithGeoFields[index]; geoFields.forEach((geoField) => { diff --git a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts index 04db54521680b..720a39193b9a7 100644 --- a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts +++ b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts @@ -409,9 +409,9 @@ export class DataVisualizer { }; let cardinalityField: AggCardinality; - if (datafeedConfig?.script_fields?.hasOwnProperty(field)) { + if (Object.hasOwn(datafeedConfig?.script_fields ?? {}, field)) { cardinalityField = aggs[`${safeFieldName}_cardinality`] = { - cardinality: { script: datafeedConfig?.script_fields[field].script }, + cardinality: { script: datafeedConfig?.script_fields![field].script }, }; } else { cardinalityField = { @@ -475,8 +475,8 @@ export class DataVisualizer { }); } else { if ( - datafeedConfig?.script_fields?.hasOwnProperty(field) || - datafeedConfig?.runtime_mappings?.hasOwnProperty(field) + Object.hasOwn(datafeedConfig?.script_fields ?? {}, field) || + Object.hasOwn(datafeedConfig?.runtime_mappings ?? {}, field) ) { const cardinality = get( aggregations, diff --git a/x-pack/plugins/ml/server/models/fields_service/fields_service.ts b/x-pack/plugins/ml/server/models/fields_service/fields_service.ts index 117dd7738d329..cba34e2cbb8e3 100644 --- a/x-pack/plugins/ml/server/models/fields_service/fields_service.ts +++ b/x-pack/plugins/ml/server/models/fields_service/fields_service.ts @@ -59,13 +59,13 @@ export function fieldsServiceProvider({ asCurrentUser }: IScopedClusterClient) { fieldNames.forEach((fieldName) => { if ( typeof datafeedConfig?.script_fields === 'object' && - datafeedConfig.script_fields.hasOwnProperty(fieldName) + Object.hasOwn(datafeedConfig.script_fields, fieldName) ) { aggregatableFields.push(fieldName); } if ( typeof datafeedConfig?.runtime_mappings === 'object' && - datafeedConfig.runtime_mappings.hasOwnProperty(fieldName) + Object.hasOwn(datafeedConfig.runtime_mappings, fieldName) ) { aggregatableFields.push(fieldName); } @@ -122,7 +122,7 @@ export function fieldsServiceProvider({ asCurrentUser }: IScopedClusterClient) { ) ?? {}; // No need to perform aggregation over the cached fields - const fieldsToAgg = aggregatableFields.filter((field) => !cachedValues.hasOwnProperty(field)); + const fieldsToAgg = aggregatableFields.filter((field) => !Object.hasOwn(cachedValues, field)); if (fieldsToAgg.length === 0) { return cachedValues; @@ -151,12 +151,12 @@ export function fieldsServiceProvider({ asCurrentUser }: IScopedClusterClient) { (obj, field) => { if ( typeof datafeedConfig?.script_fields === 'object' && - datafeedConfig.script_fields.hasOwnProperty(field) + Object.hasOwn(datafeedConfig.script_fields, field) ) { obj[field] = { cardinality: { script: datafeedConfig.script_fields[field].script } }; } else if ( typeof datafeedConfig?.runtime_mappings === 'object' && - datafeedConfig.runtime_mappings.hasOwnProperty(field) + Object.hasOwn(datafeedConfig.runtime_mappings, field) ) { obj[field] = { cardinality: { field } }; runtimeMappings.runtime_mappings = datafeedConfig.runtime_mappings; @@ -350,7 +350,7 @@ export function fieldsServiceProvider({ asCurrentUser }: IScopedClusterClient) { ) ?? {}; // No need to perform aggregation over the cached fields - const fieldsToAgg = aggregatableFields.filter((field) => !cachedValues.hasOwnProperty(field)); + const fieldsToAgg = aggregatableFields.filter((field) => !Object.hasOwn(cachedValues, field)); if (fieldsToAgg.length === 0) { return cachedValues; diff --git a/x-pack/plugins/ml/server/models/job_service/jobs.ts b/x-pack/plugins/ml/server/models/job_service/jobs.ts index d8a0557a90fd3..d9cebc84bb742 100644 --- a/x-pack/plugins/ml/server/models/job_service/jobs.ts +++ b/x-pack/plugins/ml/server/models/job_service/jobs.ts @@ -454,7 +454,7 @@ export function jobsProvider( // de-duplicate calendars for (const cal in calendarsByJobId) { - if (calendarsByJobId.hasOwnProperty(cal)) { + if (Object.hasOwn(calendarsByJobId, cal)) { calendarsByJobId[cal] = uniq(calendarsByJobId[cal]); } } diff --git a/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts b/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts index c2d9db3749375..de07daf5057e7 100644 --- a/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts +++ b/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts @@ -98,13 +98,13 @@ const validateFactory = (client: IScopedClusterClient, job: CombinedJob): Valida aggregatableFieldNames = uniqueFieldNames.filter((field) => { if ( typeof datafeedConfig?.script_fields === 'object' && - datafeedConfig?.script_fields.hasOwnProperty(field) + Object.hasOwn(datafeedConfig?.script_fields ?? {}, field) ) { return true; } if ( typeof datafeedConfig?.runtime_mappings === 'object' && - datafeedConfig?.runtime_mappings.hasOwnProperty(field) + Object.hasOwn(datafeedConfig?.runtime_mappings ?? {}, field) ) { return true; } diff --git a/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts b/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts index f5cf04915b536..5b6239d034527 100644 --- a/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts +++ b/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts @@ -273,7 +273,7 @@ export class NotificationsService { return res.reduce((acc, curr) => { for (const levelKey in curr) { - if (curr.hasOwnProperty(levelKey)) { + if (Object.hasOwn(curr, levelKey)) { acc[levelKey as MlNotificationMessageLevel] += curr[levelKey as MlNotificationMessageLevel]; } diff --git a/x-pack/plugins/monitoring/public/application/contexts/global_state_context.tsx b/x-pack/plugins/monitoring/public/application/contexts/global_state_context.tsx index 44b1fd9f53995..f853252bc69db 100644 --- a/x-pack/plugins/monitoring/public/application/contexts/global_state_context.tsx +++ b/x-pack/plugins/monitoring/public/application/contexts/global_state_context.tsx @@ -49,7 +49,7 @@ export const GlobalStateProvider: FC const initialState: any = globalState.getState(); for (const key in initialState) { - if (!initialState.hasOwnProperty(key)) { + if (!Object.hasOwn(initialState, key)) { continue; } localState[key] = initialState[key]; diff --git a/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/models/graph/plugin_vertex.js b/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/models/graph/plugin_vertex.js index 03d9fa747df13..4298408eeb657 100644 --- a/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/models/graph/plugin_vertex.js +++ b/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/models/graph/plugin_vertex.js @@ -59,7 +59,7 @@ export class PluginVertex extends Vertex { } get eventsPerSecond() { - if (!this.eventsPerMillisecond.hasOwnProperty('data')) { + if (!Object.hasOwn(this.eventsPerMillisecond, 'data')) { return this.eventsPerMillisecond * 1000; } @@ -72,7 +72,7 @@ export class PluginVertex extends Vertex { } get latestEventsPerSecond() { - if (!this.eventsPerSecond.hasOwnProperty('data')) { + if (!Object.hasOwn(this.eventsPerSecond, 'data')) { return this.eventsPerSecond; } diff --git a/x-pack/plugins/monitoring/public/lib/form_validation.ts b/x-pack/plugins/monitoring/public/lib/form_validation.ts index f09e9f6015074..4a3633db61f15 100644 --- a/x-pack/plugins/monitoring/public/lib/form_validation.ts +++ b/x-pack/plugins/monitoring/public/lib/form_validation.ts @@ -21,7 +21,7 @@ export function getMissingFieldErrors(data: any, defaultData: any) { const errors: any = {}; for (const key in data) { - if (!data.hasOwnProperty(key)) { + if (!Object.hasOwn(data, key)) { continue; } diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_available_ccs.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_available_ccs.ts index 8be48d16463d8..d65c71bab52bf 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_available_ccs.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_available_ccs.ts @@ -11,7 +11,7 @@ export async function fetchAvailableCcs(esClient: ElasticsearchClient): Promise< const availableCcs = []; const response = await esClient.cluster.remoteInfo(); for (const remoteName in response) { - if (!response.hasOwnProperty(remoteName)) { + if (!Object.hasOwn(response, remoteName)) { continue; } const remoteInfo = response[remoteName]; @@ -26,7 +26,7 @@ export async function fetchAvailableCcsLegacy(callCluster: any): Promise { if (vertex?.stats) { - if (!vertex.stats.hasOwnProperty(stat)) { + if (!Object.hasOwn(vertex.stats, stat)) { vertex.stats[stat] = { data: [] }; } vertex.stats[stat].data?.push([timestamp, vertexStats[stat]]); diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/get_beats_stats.ts b/x-pack/plugins/monitoring/server/telemetry_collection/get_beats_stats.ts index 6b23c04fe9ed6..9a0a8bba0153d 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/get_beats_stats.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/get_beats_stats.ts @@ -233,7 +233,7 @@ export function processResults( const heartbeatState = hit._source?.beats_state?.state?.heartbeat; if (heartbeatState !== undefined) { - if (!clusters[clusterUuid].hasOwnProperty('heartbeat')) { + if (!Object.hasOwn(clusters[clusterUuid], 'heartbeat')) { clusters[clusterUuid].heartbeat = { monitors: 0, endpoints: 0, @@ -244,7 +244,7 @@ export function processResults( clusterHb.monitors += heartbeatState.monitors; clusterHb.endpoints += heartbeatState.endpoints; for (const proto in heartbeatState) { - if (!heartbeatState.hasOwnProperty(proto)) { + if (!Object.hasOwn(heartbeatState, proto)) { continue; } const val = heartbeatState[proto]; @@ -252,7 +252,7 @@ export function processResults( continue; } - if (!clusterHb.hasOwnProperty(proto)) { + if (!Object.hasOwn(clusterHb, proto)) { clusterHb[proto] = { monitors: 0, endpoints: 0, @@ -265,7 +265,7 @@ export function processResults( const functionbeatState = hit._source?.beats_state?.state?.functionbeat; if (functionbeatState !== undefined) { - if (!clusters[clusterUuid].hasOwnProperty('functionbeat')) { + if (!Object.hasOwn(clusters[clusterUuid], 'functionbeat')) { clusters[clusterUuid].functionbeat = { functions: { count: 0, diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_agent_monitoring.ts b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_agent_monitoring.ts index eef7637f1b837..9c40bf11b67e5 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_agent_monitoring.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_agent_monitoring.ts @@ -121,14 +121,14 @@ export class LogstashAgentMonitoring implements LogstashMonitoring { } const thisCollectionType = hit._source?.agent?.type || 'agent'; - if (!clusterStats.hasOwnProperty('collection_types')) { + if (!Object.hasOwn(clusterStats, 'collection_types')) { clusterStats.collection_types = {}; } clusterStats.collection_types![thisCollectionType] = (clusterStats.collection_types![thisCollectionType] || 0) + 1; const pipelines = logstashStats?.logstash?.pipelines || []; - if (!clusterStats.hasOwnProperty('pipelines')) { + if (!Object.hasOwn(clusterStats, 'pipelines')) { clusterStats.pipelines = {}; } clusterStats.pipelines!.count = pipelines.length; diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_metricbeat_monitoring.ts b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_metricbeat_monitoring.ts index 387daa51a67c8..c00c37ad59784 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_metricbeat_monitoring.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_metricbeat_monitoring.ts @@ -118,7 +118,7 @@ export class LogstashMetricbeatMonitoring implements LogstashMonitoring { clusters[clusterUuid].versions = mapToList(a, 'version'); const thisCollectionType = hit._source?.agent?.type || 'metricbeat'; - if (!clusterStats.hasOwnProperty('collection_types')) { + if (!Object.hasOwn(clusterStats, 'collection_types')) { clusterStats.collection_types = {}; } clusterStats.collection_types![thisCollectionType] = @@ -128,7 +128,7 @@ export class LogstashMetricbeatMonitoring implements LogstashMonitoring { pipelines.forEach((pipeline) => { const thisQueueType = pipeline.queue?.type; if (thisQueueType !== undefined) { - if (!clusterStats.hasOwnProperty('queues')) { + if (!Object.hasOwn(clusterStats, 'queues')) { clusterStats.queues = {}; } clusterStats.queues![thisQueueType] = (clusterStats.queues![thisQueueType] || 0) + 1; @@ -220,7 +220,7 @@ export class LogstashMetricbeatMonitoring implements LogstashMonitoring { } else { pipelineConfig = 'file'; } - if (!pipelineStats.hasOwnProperty('sources')) { + if (!Object.hasOwn(pipelineStats, 'sources')) { pipelineStats.sources = {}; } pipelineStats.sources![pipelineConfig] = true; diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_self_monitoring.ts b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_self_monitoring.ts index bc31c576d154c..352f764186d39 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_self_monitoring.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_self_monitoring.ts @@ -104,7 +104,7 @@ export class LogstashSelfMonitoring implements LogstashMonitoring { // Internal Collection has no agent field, so default to 'internal_collection' const thisCollectionType = hit._source?.agent?.type || 'internal_collection'; - if (!clusterStats.hasOwnProperty('collection_types')) { + if (!Object.hasOwn(clusterStats, 'collection_types')) { clusterStats.collection_types = {}; } clusterStats.collection_types![thisCollectionType] = @@ -114,7 +114,7 @@ export class LogstashSelfMonitoring implements LogstashMonitoring { pipelines.forEach((pipeline) => { const thisQueueType = pipeline.queue?.type; if (thisQueueType !== undefined) { - if (!clusterStats.hasOwnProperty('queues')) { + if (!Object.hasOwn(clusterStats, 'queues')) { clusterStats.queues = {}; } clusterStats.queues![thisQueueType] = (clusterStats.queues![thisQueueType] || 0) + 1; @@ -206,7 +206,7 @@ export class LogstashSelfMonitoring implements LogstashMonitoring { } else { pipelineConfig = 'file'; } - if (!pipelineStats.hasOwnProperty('sources')) { + if (!Object.hasOwn(pipelineStats, 'sources')) { pipelineStats.sources = {}; } pipelineStats.sources![pipelineConfig] = true; diff --git a/x-pack/plugins/monitoring_collection/server/plugin.ts b/x-pack/plugins/monitoring_collection/server/plugin.ts index fdfe532ced5db..828a5e5fc49b2 100644 --- a/x-pack/plugins/monitoring_collection/server/plugin.ts +++ b/x-pack/plugins/monitoring_collection/server/plugin.ts @@ -63,7 +63,7 @@ export class MonitoringCollectionPlugin implements Plugin(metric: Metric) => { - if (this.metrics.hasOwnProperty(metric.type)) { + if (Object.hasOwn(this.metrics, metric.type)) { this.logger.warn( `Skipping registration of metric type '${metric.type}'. This type has already been registered.` ); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx index 706340fb32757..dcfbe3d365102 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx @@ -229,7 +229,7 @@ function renderSettings({ .filter(filterByAgent(newConfig.agent_name as AgentName)) .map((setting) => ( { for (const key in metric) { - if (metric.hasOwnProperty(key)) { + if (Object.hasOwn(metric, key)) { const metricsKey = key as MetricsKey; const value = metric[metricsKey]; diff --git a/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts b/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts index 4f5b977dd3b82..b8410a478b6f8 100644 --- a/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts +++ b/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts @@ -382,7 +382,7 @@ export const isOptimizedGroupedSearchQueryResponse = ( response: GroupedSearchQueryResponse['aggregations']['groups']['buckets'] ): response is OptimizedGroupedSearchQueryResponse['aggregations']['groups']['buckets'] => { const result = response[0]; - return result && !result.hasOwnProperty('filtered_results'); + return result && !Object.hasOwn(result, 'filtered_results'); }; export const isOptimizableGroupedThreshold = ( diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metadata/utils.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metadata/utils.ts index 4955f0fb5d497..495328e3714c9 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metadata/utils.ts +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metadata/utils.ts @@ -24,7 +24,7 @@ export const getAllFields = (metadata?: InfraMetadata) => { property: string ) => { const fieldsByCategory: FieldsByCategory = metadata?.info?.[`${category}`] ?? {}; - if (fieldsByCategory.hasOwnProperty(property)) { + if (Object.hasOwn(fieldsByCategory, property)) { const value = fieldsByCategory[property]; if (typeof value === 'boolean') { diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts index a32c924385dbc..8f1fa804e8d58 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts @@ -37,7 +37,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); @@ -65,7 +65,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/utils/proxies.ts b/x-pack/plugins/observability_solution/logs_explorer/public/utils/proxies.ts index cfe4c133ec328..487eab6241d17 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/utils/proxies.ts +++ b/x-pack/plugins/observability_solution/logs_explorer/public/utils/proxies.ts @@ -33,4 +33,4 @@ export const createPropertyGetProxy = ( obj: T, key: string | number | symbol -): key is K => obj.hasOwnProperty(key); +): key is K => Object.hasOwn(obj, key); diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/alerts_flyout.stories.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/alerts_flyout.stories.tsx index be78ce851053c..a6aa35ea8a468 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/alerts_flyout.stories.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/alerts_flyout.stories.tsx @@ -42,7 +42,6 @@ export default { - // ); }, ], diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/metric_query.test.ts b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/metric_query.test.ts index efaf7b36e3a0b..53955b7130c54 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/metric_query.test.ts +++ b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/metric_query.test.ts @@ -69,7 +69,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); @@ -126,7 +126,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); @@ -238,7 +238,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/utils/create_initialized_object.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/utils/create_initialized_object.ts index ecd3554e4923d..e06800aca07a0 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/utils/create_initialized_object.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/utils/create_initialized_object.ts @@ -14,7 +14,7 @@ export function createInitializedObject(parameters: Params) { function traverseProperties({ properties, required }: Params) { for (const propName in properties) { - if (properties.hasOwnProperty(propName)) { + if (Object.hasOwn(properties, propName)) { const prop = properties[propName] as Params; if (prop.type === 'object') { diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/lib/get_fallback_urls.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/lib/get_fallback_urls.ts index 15185521563a1..22cdcf34f99fe 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/server/lib/get_fallback_urls.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/lib/get_fallback_urls.ts @@ -11,9 +11,11 @@ import { EsLegacyConfigService } from '../services/es_legacy_config_service'; export function getKibanaUrl(coreSetup: CoreSetup, cloudSetup?: CloudSetup) { return ( + // falls back to local network binding + // then cloud id coreSetup.http.basePath.publicBaseUrl ?? // priority given to server.publicBaseUrl - cloudSetup?.kibanaUrl ?? // then cloud id - getFallbackKibanaUrl(coreSetup) // falls back to local network binding + cloudSetup?.kibanaUrl ?? + getFallbackKibanaUrl(coreSetup) ); } diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/hooks/use_group_name.ts b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/hooks/use_group_name.ts index ca6ddff88fb19..ba19459d4dded 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/hooks/use_group_name.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/hooks/use_group_name.ts @@ -54,7 +54,7 @@ export function useGroupName(groupBy: GroupByField, group: string, summary?: Gro function flattenObject(obj: Record, parentKey = '', result: Record = {}) { for (const key in obj) { - if (obj.hasOwnProperty(key)) { + if (Object.hasOwn(obj, key)) { const newKey = parentKey ? `${parentKey}.${key}` : key; if (typeof obj[key] === 'object' && obj[key] !== null) { flattenObject(obj[key], newKey, result); diff --git a/x-pack/plugins/osquery/public/agents/agents_table.tsx b/x-pack/plugins/osquery/public/agents/agents_table.tsx index c7b6fdd432fa3..ff9b89f73543b 100644 --- a/x-pack/plugins/osquery/public/agents/agents_table.tsx +++ b/x-pack/plugins/osquery/public/agents/agents_table.tsx @@ -95,8 +95,7 @@ const AgentsTableComponent: React.FC = ({ agentSelection, onCh // filter out all the agents counted by selected policies and platforms selectedAgents.filter(checkAgent).length + // add the number of agents added via policy and platform groups - getNumAgentsInGrouping(selectedGroups) - - // subtract the number of agents double counted by policy/platform selections + getNumAgentsInGrouping(selectedGroups) - // subtract the number of agents double counted by policy/platform selections getNumOverlapped(selectedGroups, agentList?.groups?.overlap ?? {}) ); } diff --git a/x-pack/plugins/search_notebooks/server/lib/notebook_catalog.ts b/x-pack/plugins/search_notebooks/server/lib/notebook_catalog.ts index 54d2a1acd055f..6bab7c28e85ca 100644 --- a/x-pack/plugins/search_notebooks/server/lib/notebook_catalog.ts +++ b/x-pack/plugins/search_notebooks/server/lib/notebook_catalog.ts @@ -180,7 +180,7 @@ export const getNotebookMetadata = (id: string, cache: NotebooksCache) => { const nbInfo = cache.catalog.notebooks.find((nb) => nb.id === id); return nbInfo ? cleanNotebookMetadata(nbInfo) : undefined; } - if (!NOTEBOOKS_MAP.hasOwnProperty(id)) { + if (!Object.hasOwn(NOTEBOOKS_MAP, id)) { return undefined; } diff --git a/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/services/role_template_type.ts b/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/services/role_template_type.ts index 97f464ce0494f..b98d2020649b8 100644 --- a/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/services/role_template_type.ts +++ b/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/services/role_template_type.ts @@ -17,7 +17,8 @@ export function isStoredRoleTemplate( ): roleMappingTemplate is StoredRoleTemplate { return ( roleMappingTemplate.template != null && - roleMappingTemplate.template.hasOwnProperty('id') && + typeof roleMappingTemplate.template === 'object' && + Object.hasOwn(roleMappingTemplate.template, 'id') && typeof (roleMappingTemplate as unknown as StoredRoleTemplate).template.id === 'string' ); } @@ -27,7 +28,8 @@ export function isInlineRoleTemplate( ): roleMappingTemplate is InlineRoleTemplate { return ( roleMappingTemplate.template != null && - roleMappingTemplate.template.hasOwnProperty('source') && + typeof roleMappingTemplate.template === 'object' && + Object.hasOwn(roleMappingTemplate.template, 'source') && typeof (roleMappingTemplate as unknown as InlineRoleTemplate).template.source === 'string' ); } diff --git a/x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx b/x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx index 9926fe49883eb..cb9587dd2971c 100644 --- a/x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx +++ b/x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx @@ -99,9 +99,7 @@ export const EditUserPage: FunctionComponent = ({ username }) } /> - - {isDeprecatedUser ? ( <> = ({ username }) ) : undefined} - = ({ username }) onSuccess={backToUsers} disabled={readOnly} /> - {readOnly ? undefined : ( <> {action === 'changePassword' ? ( diff --git a/x-pack/plugins/security/public/management/users/edit_user/user_form.tsx b/x-pack/plugins/security/public/management/users/edit_user/user_form.tsx index b9da87e14ea3d..d5cfc09819157 100644 --- a/x-pack/plugins/security/public/management/users/edit_user/user_form.tsx +++ b/x-pack/plugins/security/public/management/users/edit_user/user_form.tsx @@ -316,7 +316,6 @@ export const UserForm: FunctionComponent = ({ ) : undefined} - {isNewUser ? ( = ({ ) : null} - diff --git a/x-pack/plugins/security/server/authentication/can_redirect_request.ts b/x-pack/plugins/security/server/authentication/can_redirect_request.ts index 37e6d6b7061f7..d2c6c8cee341f 100644 --- a/x-pack/plugins/security/server/authentication/can_redirect_request.ts +++ b/x-pack/plugins/security/server/authentication/can_redirect_request.ts @@ -20,8 +20,8 @@ const KIBANA_VERSION_HEADER = 'kbn-version'; export function canRedirectRequest(request: KibanaRequest) { const headers = request.headers; const route = request.route; - const hasVersionHeader = headers.hasOwnProperty(KIBANA_VERSION_HEADER); - const hasXsrfHeader = headers.hasOwnProperty(KIBANA_XSRF_HEADER); + const hasVersionHeader = Object.hasOwn(headers, KIBANA_VERSION_HEADER); + const hasXsrfHeader = Object.hasOwn(headers, KIBANA_XSRF_HEADER); const isApiRoute = route.options.tags.includes(ROUTE_TAG_API) || diff --git a/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts b/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts index d9a83806abf51..262bc579c34c8 100644 --- a/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts +++ b/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts @@ -144,7 +144,7 @@ export function disableUICapabilitiesFactory( // Capabilities derived from Elasticsearch features should not be // included here, as the result is used to check authorization against // Kibana Privileges, rather than Elasticsearch Privileges. - if (elasticsearchFeatureMap.hasOwnProperty(featureId)) { + if (Object.hasOwn(elasticsearchFeatureMap, featureId)) { return []; } if (typeof value === 'boolean') { @@ -207,7 +207,7 @@ export function disableUICapabilitiesFactory( const action = authz.actions.ui.get(featureId, ...uiCapabilityParts); - const isElasticsearchFeature = elasticsearchFeatureMap.hasOwnProperty(featureId); + const isElasticsearchFeature = Object.hasOwn(elasticsearchFeatureMap, featureId); const isCatalogueFeature = featureId === 'catalogue'; const isManagementFeature = featureId === 'management'; @@ -238,7 +238,7 @@ export function disableUICapabilitiesFactory( } else if (isManagementFeature) { const [managementSectionId, managementEntryId] = uiCapabilityParts; const featureGrantsManagementEntry = - (esFeature.management ?? {}).hasOwnProperty(managementSectionId) && + Object.hasOwn(esFeature.management ?? {}, managementSectionId) && esFeature.management![managementSectionId].includes(managementEntryId); return ( diff --git a/x-pack/plugins/security/server/routes/feature_check/feature_check.ts b/x-pack/plugins/security/server/routes/feature_check/feature_check.ts index 46276957b6c83..b256ee77e55ff 100644 --- a/x-pack/plugins/security/server/routes/feature_check/feature_check.ts +++ b/x-pack/plugins/security/server/routes/feature_check/feature_check.ts @@ -142,5 +142,5 @@ async function getEnabledSecurityFeatures(esClient: ElasticsearchClient, logger: function usesCustomScriptSettings( nodeResponse: NodeSettingsResponse | {} ): nodeResponse is NodeSettingsResponse { - return nodeResponse.hasOwnProperty('nodes'); + return Object.hasOwn(nodeResponse, 'nodes'); } diff --git a/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx b/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx index baf36e278b71f..f145deb9febc7 100644 --- a/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx @@ -107,7 +107,6 @@ const CommentActionsComponent: React.FC = ({ message }) => { )} - = ({ message }) => { /> - = ({ message }) => { /> - diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts index a2bc62eb26807..808c779a0aed5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts @@ -18,8 +18,8 @@ const lazySuricataLibConfiguration = () => { ); }; -const has = (obj: T, key: string | number | symbol): key is keyof T => - Object.prototype.hasOwnProperty.call(obj, key); +const has = (obj: T, key: string | number | symbol): key is keyof T => + Object.hasOwn(obj, key); export const getLinksFromSignature = async (id: number): Promise => { const db = (await lazySuricataLibConfiguration()).db; diff --git a/x-pack/plugins/security_solution/scripts/run_cypress/utils.ts b/x-pack/plugins/security_solution/scripts/run_cypress/utils.ts index 857e29ab8d390..7d6e35bc48f74 100644 --- a/x-pack/plugins/security_solution/scripts/run_cypress/utils.ts +++ b/x-pack/plugins/security_solution/scripts/run_cypress/utils.ts @@ -99,6 +99,7 @@ export const parseTestFileConfig = (filePath: string): SecuritySolutionDescribeB try { // TODO:PT need to assess implication of using this approach to get the JSON back out + // eslint-disable-next-line no-new-func const ftrConfigJson = new Function(`return ${ftrConfigCode}`)(); return TestFileFtrConfigSchema.validate(ftrConfigJson); } catch (err) { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts index 1c5d1cc1a63b2..f802593c39121 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts @@ -31,7 +31,7 @@ import { */ function isEmptyObject(obj: {}) { for (const attr in obj) { - if (Object.prototype.hasOwnProperty.call(obj, attr)) { + if (Object.hasOwn(obj, attr)) { return false; } } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/filter_field_entries.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/filter_field_entries.ts index 383aa616603e6..581dd7ffbff1a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/filter_field_entries.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/filter_field_entries.ts @@ -29,11 +29,12 @@ export const filterFieldEntries = ( ): Array<[string, FieldsType]> => { return fieldEntries.filter(([fieldsKey, fieldsValue]: [string, FieldsType]) => { return ( + // TODO: Look at not filtering this and instead transform it so it can be inserted correctly in the strategies which does an overwrite of everything from fields !isEqlBug77152(fieldsKey) && !isIgnored(fieldsKey, ignoreFields) && !isInvalidKey(fieldsKey) && !isMultiField(fieldsKey, fieldEntries) && - !isTypeObject(fieldsValue) // TODO: Look at not filtering this and instead transform it so it can be inserted correctly in the strategies which does an overwrite of everything from fields + !isTypeObject(fieldsValue) ); }); }; diff --git a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts index b5d9be07d91af..d37337852b6b9 100644 --- a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts +++ b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts @@ -98,7 +98,7 @@ function toggleDisabledFeatures( for (const feature of disabledFeatures) { // Disable associated navLink, if one exists feature.app.forEach((app) => { - if (navLinks.hasOwnProperty(app) && !enabledAppEntries.has(app)) { + if (Object.hasOwn(navLinks, app) && !enabledAppEntries.has(app)) { navLinks[app] = false; } }); @@ -117,8 +117,8 @@ function toggleDisabledFeatures( sectionItems.forEach((item) => { const enabledManagementEntriesSection = enabledManagementEntries.get(sectionId); if ( - managementItems.hasOwnProperty(sectionId) && - managementItems[sectionId].hasOwnProperty(item) + Object.hasOwn(managementItems, sectionId) && + Object.hasOwn(managementItems[sectionId], item) ) { const isEnabledElsewhere = (enabledManagementEntriesSection ?? []).includes(item); if (!isEnabledElsewhere) { @@ -129,7 +129,7 @@ function toggleDisabledFeatures( }); // Disable "sub features" that match the disabled feature - if (capabilities.hasOwnProperty(feature.id)) { + if (Object.hasOwn(capabilities, feature.id)) { const capability = capabilities[feature.id]; Object.keys(capability).forEach((featureKey) => { capability[featureKey] = false; diff --git a/x-pack/plugins/spaces/server/saved_objects/migrations/space_migrations.ts b/x-pack/plugins/spaces/server/saved_objects/migrations/space_migrations.ts index 28d4e42cfb9cf..c060f8d36a09d 100644 --- a/x-pack/plugins/spaces/server/saved_objects/migrations/space_migrations.ts +++ b/x-pack/plugins/spaces/server/saved_objects/migrations/space_migrations.ts @@ -10,7 +10,7 @@ import type { SavedObjectUnsanitizedDoc } from '@kbn/core/server'; import type { Space } from '../../../common'; export const migrateTo660 = (doc: SavedObjectUnsanitizedDoc) => { - if (!doc.attributes.hasOwnProperty('disabledFeatures')) { + if (!Object.hasOwn(doc.attributes, 'disabledFeatures')) { doc.attributes.disabledFeatures = []; } return doc; diff --git a/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts b/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts index 7019520b9498c..e94918a62b26b 100644 --- a/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts +++ b/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts @@ -142,11 +142,11 @@ export class SpacesClient implements ISpacesClient { ); } - if (this.isServerless && space.hasOwnProperty('solution')) { + if (this.isServerless && Object.hasOwn(space, 'solution')) { throw Boom.badRequest('Unable to create Space, solution property is forbidden in serverless'); } - if (space.hasOwnProperty('solution') && !space.solution) { + if (Object.hasOwn(space, 'solution') && !space.solution) { throw Boom.badRequest('Unable to create Space, solution property cannot be empty'); } @@ -175,11 +175,11 @@ export class SpacesClient implements ISpacesClient { ); } - if (this.isServerless && space.hasOwnProperty('solution')) { + if (this.isServerless && Object.hasOwn(space, 'solution')) { throw Boom.badRequest('Unable to update Space, solution property is forbidden in serverless'); } - if (space.hasOwnProperty('solution') && !space.solution) { + if (Object.hasOwn(space, 'solution') && !space.solution) { throw Boom.badRequest('Unable to update Space, solution property cannot be empty'); } diff --git a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts index d6b8215bd2a37..f017ee0f63aed 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts @@ -11,8 +11,12 @@ import { SharePluginStart } from '@kbn/share-plugin/server'; import { IScopedClusterClient, Logger } from '@kbn/core/server'; import { ecsFieldMap, alertFieldMap } from '@kbn/alerts-as-data-utils'; import { createTaskRunError, TaskErrorSource } from '@kbn/task-manager-plugin/server'; -import { OnlyEsqlQueryRuleParams } from '../types'; +import { LocatorPublic } from '@kbn/share-plugin/common'; +import { DiscoverAppLocatorParams } from '@kbn/discover-plugin/common'; +import { DataViewsContract } from '@kbn/data-views-plugin/common'; +import { Filter, Query } from '@kbn/es-query'; import { EsqlTable, toEsQueryHits } from '../../../../common'; +import { OnlyEsqlQueryRuleParams } from '../types'; export interface FetchEsqlQueryOpts { ruleId: string; @@ -127,3 +131,31 @@ export const getSourceFields = (results: EsqlTable) => { return intersectionBy(resultFields, ecsFields, 'label'); }; + +export async function generateLink( + esqlQuery: Query, + discoverLocator: LocatorPublic, + dataViews: DataViewsContract, + dataViewToUpdate: DataView, + dateStart: string, + dateEnd: string, + spacePrefix: string, + filterToExcludeHitsFromPreviousRun: Filter | null +) { + const redirectUrlParams: DiscoverAppLocatorParams = { + filters: filterToExcludeHitsFromPreviousRun ? [filterToExcludeHitsFromPreviousRun] : [], + timeRange: { from: dateStart, to: dateEnd }, + isAlertResults: true, + query: { + language: 'esql', + query: esqlQuery, + }, + }; + + // use `lzCompress` flag for making the link readable during debugging/testing + // const redirectUrl = discoverLocator!.getRedirectUrl(redirectUrlParams, { lzCompress: false }); + const redirectUrl = discoverLocator!.getRedirectUrl(redirectUrlParams); + const [start, end] = redirectUrl.split('/app'); + + return start + spacePrefix + '/app' + end; +} diff --git a/x-pack/plugins/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts b/x-pack/plugins/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts index 6b457575b4029..47292ab82e195 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts @@ -17,7 +17,7 @@ export function transformResults( const resultsMap = new Map(); const boundarySplitBuckets = results?.aggregations?.shapes?.buckets ?? {}; for (const boundaryId in boundarySplitBuckets) { - if (!boundarySplitBuckets.hasOwnProperty(boundaryId)) { + if (!Object.hasOwn(boundarySplitBuckets, boundaryId)) { continue; } diff --git a/x-pack/plugins/stack_connectors/common/slack_api/schema.ts b/x-pack/plugins/stack_connectors/common/slack_api/schema.ts index 37ca6de1cf231..029b2fb0e81f0 100644 --- a/x-pack/plugins/stack_connectors/common/slack_api/schema.ts +++ b/x-pack/plugins/stack_connectors/common/slack_api/schema.ts @@ -42,7 +42,7 @@ export function validateBlockkit(text: string) { try { const parsedText = JSON.parse(text); - if (!parsedText.hasOwnProperty('blocks')) { + if (!Object.hasOwn(parsedText, 'blocks')) { return 'block kit body must contain field "blocks"'; } } catch (err) { diff --git a/x-pack/plugins/stack_connectors/public/connector_types/jira/jira_params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/jira/jira_params.tsx index 2163c822ee4a6..7ae1efbe13f38 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/jira/jira_params.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/jira/jira_params.tsx @@ -107,10 +107,10 @@ const JiraParamsFields: React.FunctionComponent fields != null ? { - hasLabels: Object.prototype.hasOwnProperty.call(fields, 'labels'), - hasDescription: Object.prototype.hasOwnProperty.call(fields, 'description'), - hasPriority: Object.prototype.hasOwnProperty.call(fields, 'priority'), - hasParent: Object.prototype.hasOwnProperty.call(fields, 'parent'), + hasLabels: Object.hasOwn(fields, 'labels'), + hasDescription: Object.hasOwn(fields, 'description'), + hasPriority: Object.hasOwn(fields, 'priority'), + hasParent: Object.hasOwn(fields, 'parent'), } : { hasLabels: false, hasDescription: false, hasPriority: false, hasParent: false }, [fields] diff --git a/x-pack/plugins/stack_connectors/public/connector_types/slack_api/slack_api.tsx b/x-pack/plugins/stack_connectors/public/connector_types/slack_api/slack_api.tsx index 5924a1feffc62..c44fd56612d20 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/slack_api/slack_api.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/slack_api/slack_api.tsx @@ -76,7 +76,7 @@ export const getConnectorType = (): ConnectorTypeModel< if (actionParams.subAction === 'postBlockkit' && actionParams.subActionParams.text) { try { const blockkitJson = JSON.parse(actionParams.subActionParams.text); - if (!blockkitJson.hasOwnProperty('blocks')) { + if (!Object.hasOwn(blockkitJson, 'blocks')) { errors.text.push(BLOCKS_REQUIRED); } } catch { diff --git a/x-pack/plugins/transform/common/utils/es_utils.ts b/x-pack/plugins/transform/common/utils/es_utils.ts index abe24ac017e2f..41513176076c6 100644 --- a/x-pack/plugins/transform/common/utils/es_utils.ts +++ b/x-pack/plugins/transform/common/utils/es_utils.ts @@ -35,8 +35,7 @@ export function isValidIndexName(indexName: string) { /^[^-_\+]+$/.test(indexName.charAt(0)) && // Cannot be . or .. indexName !== '.' && - indexName !== '..' && - // Cannot be longer than 255 bytes (note it is bytes, + indexName !== '..' && // Cannot be longer than 255 bytes (note it is bytes, // so multi-byte characters will count towards the 255 limit faster) isValidIndexNameLength(indexName) ); diff --git a/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx index c2549b0edad56..3a933dcc9e935 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx @@ -110,7 +110,7 @@ export const useDeleteTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const status = results[transformId]; const destinationIndex = status.destinationIndex; diff --git a/x-pack/plugins/transform/public/app/hooks/use_reauthorize_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_reauthorize_transform.tsx index 0465a178c09a3..65d98bbea0141 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_reauthorize_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_reauthorize_transform.tsx @@ -51,7 +51,7 @@ export const useReauthorizeTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const result = results[transformId]; if (!result.success) { toastNotifications.addError( diff --git a/x-pack/plugins/transform/public/app/hooks/use_reset_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_reset_transform.tsx index fafc26581fa09..212cb2e9b629f 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_reset_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_reset_transform.tsx @@ -47,7 +47,7 @@ export const useResetTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const status = results[transformId]; if (status.transformReset?.error) { diff --git a/x-pack/plugins/transform/public/app/hooks/use_schedule_now_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_schedule_now_transform.tsx index 22201b2806848..8511c2092e4ca 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_schedule_now_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_schedule_now_transform.tsx @@ -51,7 +51,7 @@ export const useScheduleNowTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const result = results[transformId]; if (!result.success) { toastNotifications.addError( diff --git a/x-pack/plugins/transform/public/app/hooks/use_start_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_start_transform.tsx index 2175ccffeea53..73790b09f3b1b 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_start_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_start_transform.tsx @@ -47,7 +47,7 @@ export const useStartTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const result = results[transformId]; if (!result.success) { toastNotifications.addError( diff --git a/x-pack/plugins/transform/public/app/hooks/use_stop_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_stop_transform.tsx index 439c654ded169..29939d9fcef7d 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_stop_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_stop_transform.tsx @@ -48,7 +48,7 @@ export const useStopTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { if (!results[transformId].success) { toastNotifications.addDanger( i18n.translate('xpack.transform.transformList.stopTransformErrorMessage', { diff --git a/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts b/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts index 4ecba4f66168b..f18b3778d6af3 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts @@ -270,7 +270,7 @@ export const useTransformConfigData = ( return ({ rowIndex, columnId }: { rowIndex: number; columnId: string }) => { const adjustedRowIndex = rowIndex - pagination.pageIndex * pagination.pageSize; - const cellValue = pageData.hasOwnProperty(adjustedRowIndex) + const cellValue = Object.hasOwn(pageData, adjustedRowIndex) ? pageData[adjustedRowIndex][columnId] ?? null : null; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx index b150fb0c4e7ca..b8924c2f44744 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx @@ -56,7 +56,7 @@ export const AdvancedRuntimeMappingsSettings: FC = (props) = const previousConfig = runtimeMappings; const isFieldDeleted = (field: string) => - previousConfig?.hasOwnProperty(field) && !nextConfig.hasOwnProperty(field); + Object.hasOwn(previousConfig ?? {}, field) && !Object.hasOwn(nextConfig, field); applyRuntimeMappingsEditorChanges(); @@ -66,8 +66,8 @@ export const AdvancedRuntimeMappingsSettings: FC = (props) = const groupBy = groupByList[groupByKey]; if ( isPivotGroupByConfigWithUiSupport(groupBy) && - previousConfig?.hasOwnProperty(groupBy.field) && - !nextConfig.hasOwnProperty(groupBy.field) + Object.hasOwn(previousConfig ?? {}, groupBy.field) && + !Object.hasOwn(nextConfig, groupBy.field) ) { deleteGroupBy(groupByKey); } diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx index 068da2a3567d8..2269f68f39840 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx @@ -31,7 +31,7 @@ export function getSupportedFilterAggs( if (dataViewField !== undefined) { return [...commonFilterAggs, ...filterAggsFieldSupport[dataViewField.type]]; } - if (isPopulatedObject(runtimeMappings) && runtimeMappings.hasOwnProperty(fieldName)) { + if (isPopulatedObject(runtimeMappings) && Object.hasOwn(runtimeMappings, fieldName)) { const runtimeField = runtimeMappings[fieldName]; return [ ...commonFilterAggs, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_conditions.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_conditions.tsx index 5828210d32598..c9e95118698a5 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_conditions.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_conditions.tsx @@ -54,7 +54,7 @@ export const RuleConditions = !BUILT_IN_ACTION_GROUPS.has(id)), - (actionGroup) => actionGroup.hasOwnProperty('conditions') + (actionGroup) => Object.hasOwn(actionGroup, 'conditions') ); return ( diff --git a/x-pack/plugins/upgrade_assistant/public/plugin.ts b/x-pack/plugins/upgrade_assistant/public/plugin.ts index 1fb1656079fc9..694e29cd7cee3 100644 --- a/x-pack/plugins/upgrade_assistant/public/plugin.ts +++ b/x-pack/plugins/upgrade_assistant/public/plugin.ts @@ -68,7 +68,7 @@ export class UpgradeAssistantUIPlugin // Infra plugin doesnt export anything as a public interface. So the only // way we have at this stage for checking if the plugin is available or not // is by checking if the startServices has the `infra` key. - infra: plugins.hasOwnProperty('infra') ? {} : undefined, + infra: Object.hasOwn(plugins, 'infra') ? {} : undefined, }, services: { core: coreStart, diff --git a/x-pack/plugins/watcher/public/legacy/time_buckets.js b/x-pack/plugins/watcher/public/legacy/time_buckets.js index a0804e07c4662..469927269af57 100644 --- a/x-pack/plugins/watcher/public/legacy/time_buckets.js +++ b/x-pack/plugins/watcher/public/legacy/time_buckets.js @@ -345,7 +345,7 @@ TimeBuckets.__cached__ = function (self) { function cachedGetter(prop) { return { value: function cachedGetter(...rest) { - if (cache.hasOwnProperty(prop)) { + if (Object.hasOwn(cache, prop)) { return cache[prop]; } @@ -385,7 +385,7 @@ TimeBuckets.__cached__ = function (self) { _.forOwn(TimeBuckets.prototype, function (fn, prop) { if (prop[0] === '_') return; - if (breakers.hasOwnProperty(prop)) { + if (Object.hasOwn(breakers, prop)) { desc[prop] = cacheBreaker(prop); } else { desc[prop] = cachedGetter(prop); diff --git a/x-pack/plugins/watcher/server/models/settings/settings.js b/x-pack/plugins/watcher/server/models/settings/settings.js index 8f41736e6a53d..d6fbec1068e7c 100644 --- a/x-pack/plugins/watcher/server/models/settings/settings.js +++ b/x-pack/plugins/watcher/server/models/settings/settings.js @@ -51,7 +51,7 @@ function getNotifications(json) { return {}; } return Object.values(json).reduce((accum, value) => { - if (value.hasOwnProperty('xpack') && value.xpack.hasOwnProperty('notification')) { + if (Object.hasOwn(value, 'xpack') && Object.hasOwn(value.xpack, 'notification')) { accum = merge(accum, value.xpack.notification); } return accum; @@ -75,7 +75,7 @@ function getActionTypesSettings(upstreamJson) { // For actions types requiring setup, mark them as enabled // if upstream response contains them, indicating that they // are setup - if (upstreamActionTypes.hasOwnProperty(actionType)) { + if (Object.hasOwn(upstreamActionTypes, actionType)) { // If it exists in the upstream response, it's enabled actionTypeData.enabled = true; diff --git a/x-pack/test/accessibility/apps/group2/ml_anomaly_detection.ts b/x-pack/test/accessibility/apps/group2/ml_anomaly_detection.ts index 33c7db9eb0b20..0667d2d3cddd4 100644 --- a/x-pack/test/accessibility/apps/group2/ml_anomaly_detection.ts +++ b/x-pack/test/accessibility/apps/group2/ml_anomaly_detection.ts @@ -372,22 +372,22 @@ export default function ({ getService }: FtrProviderContext) { await a11y.testAppSnapshot(); await ml.jobWizardAdvanced.selectDetectorFunction(detector.function); - if (detector.hasOwnProperty('field')) { + if (Object.hasOwn(detector, 'field')) { await ml.jobWizardAdvanced.selectDetectorField(detector.field!); } - if (detector.hasOwnProperty('byField')) { + if (Object.hasOwn(detector, 'byField')) { await ml.jobWizardAdvanced.selectDetectorByField(detector.byField!); } - if (detector.hasOwnProperty('overField')) { + if (Object.hasOwn(detector, 'overField')) { await ml.jobWizardAdvanced.selectDetectorOverField(detector.overField!); } - if (detector.hasOwnProperty('partitionField')) { + if (Object.hasOwn(detector, 'partitionField')) { await ml.jobWizardAdvanced.selectDetectorPartitionField(detector.partitionField!); } - if (detector.hasOwnProperty('excludeFrequent')) { + if (Object.hasOwn(detector, 'excludeFrequent')) { await ml.jobWizardAdvanced.selectDetectorExcludeFrequent(detector.excludeFrequent!); } - if (detector.hasOwnProperty('description')) { + if (Object.hasOwn(detector, 'description')) { await ml.jobWizardAdvanced.setDetectorDescription(detector.description!); } diff --git a/x-pack/test/api_integration/apis/management/index_management/settings.ts b/x-pack/test/api_integration/apis/management/index_management/settings.ts index e6986dfca8622..24819d177ccf0 100644 --- a/x-pack/test/api_integration/apis/management/index_management/settings.ts +++ b/x-pack/test/api_integration/apis/management/index_management/settings.ts @@ -84,7 +84,7 @@ export default function ({ getService }: FtrProviderContext) { // Make sure none of the settings have been removed from ES API expectedSettings.forEach((setting) => { try { - expect(body.defaults.index.hasOwnProperty(setting)).to.be(true); + expect(Object.hasOwn(body.defaults.index, setting)).to.be(true); } catch { throw new Error(`Expected setting "${setting}" not found.`); } diff --git a/x-pack/test/api_integration/apis/management/index_management/stats.ts b/x-pack/test/api_integration/apis/management/index_management/stats.ts index 28ef3083e3a4c..4ce10574c6361 100644 --- a/x-pack/test/api_integration/apis/management/index_management/stats.ts +++ b/x-pack/test/api_integration/apis/management/index_management/stats.ts @@ -48,7 +48,7 @@ export default function ({ getService }: FtrProviderContext) { // Make sure none of the stats have been removed from ES API expectedStats.forEach((stat) => { try { - expect(body.stats.total.hasOwnProperty(stat)).to.be(true); + expect(Object.hasOwn(body.stats.total, stat)).to.be(true); } catch { throw new Error(`Expected stat "${stat}" not found.`); } diff --git a/x-pack/test/api_integration/apis/ml/job_validation/validate.ts b/x-pack/test/api_integration/apis/ml/job_validation/validate.ts index 02088af0b12e1..b1481ffe183d5 100644 --- a/x-pack/test/api_integration/apis/ml/job_validation/validate.ts +++ b/x-pack/test/api_integration/apis/ml/job_validation/validate.ts @@ -175,7 +175,7 @@ export default ({ getService }: FtrProviderContext) => { // and may vary between test environments, e.g. cloud vs non-cloud, // so it should not be part of the validation body.forEach((element: any) => { - if (element.hasOwnProperty('maxModelMemoryLimit')) { + if (Object.hasOwn(element, 'maxModelMemoryLimit')) { delete element.maxModelMemoryLimit; } }); diff --git a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts index 0c03b65dcced0..31dd5f3354635 100644 --- a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts @@ -221,7 +221,7 @@ export default ({ getService }: FtrProviderContext) => { for (const testData of testDataList) { describe('lists matching modules', function () { before(async () => { - if (testData.hasOwnProperty('sourceDataArchive')) { + if (Object.hasOwn(testData, 'sourceDataArchive')) { await esArchiver.loadIfNeeded(testData.sourceDataArchive!); } }); diff --git a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts index 27d6d048e3f84..def9774a55ddc 100644 --- a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts @@ -860,10 +860,10 @@ export default ({ getService }: FtrProviderContext) => { for (const testData of testDataListNegative) { describe('rejects request', function () { before(async () => { - if (testData.hasOwnProperty('sourceDataArchive')) { + if (Object.hasOwn(testData, 'sourceDataArchive')) { await esArchiver.loadIfNeeded(testData.sourceDataArchive!); } - if (testData.hasOwnProperty('indexPattern')) { + if (Object.hasOwn(testData, 'indexPattern')) { await ml.testResources.createDataViewIfNeeded( testData.indexPattern!.name as string, testData.indexPattern!.timeField as string @@ -873,7 +873,7 @@ export default ({ getService }: FtrProviderContext) => { after(async () => { await ml.api.cleanMlIndices(); - if (testData.hasOwnProperty('indexPattern')) { + if (Object.hasOwn(testData, 'indexPattern')) { await ml.testResources.deleteDataViewByTitle(testData.indexPattern!.name); } }); diff --git a/x-pack/test/fleet_api_integration/apis/agents/delete.ts b/x-pack/test/fleet_api_integration/apis/agents/delete.ts index 43be03e3182a7..be07a16cee458 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/delete.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/delete.ts @@ -41,7 +41,7 @@ export default function ({ getService }: FtrProviderContext) { describe('fleet_delete_agent', () => { before(async () => { for (const roleName in users) { - if (users.hasOwnProperty(roleName)) { + if (Object.hasOwn(users, roleName)) { const user = users[roleName]; if (user.permissions) { diff --git a/x-pack/test/fleet_api_integration/apis/test_users.ts b/x-pack/test/fleet_api_integration/apis/test_users.ts index 2a89477e77b7f..5ae753585c0da 100644 --- a/x-pack/test/fleet_api_integration/apis/test_users.ts +++ b/x-pack/test/fleet_api_integration/apis/test_users.ts @@ -233,7 +233,7 @@ export const testUsers: { export const setupTestUsers = async (security: SecurityService) => { for (const roleName in testUsers) { - if (testUsers.hasOwnProperty(roleName)) { + if (Object.hasOwn(testUsers, roleName)) { const user = testUsers[roleName]; if (user.permissions) { diff --git a/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js b/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js index 8b8bec8a3b99c..d2440a5dd706b 100644 --- a/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js +++ b/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js @@ -124,8 +124,8 @@ export default function ({ getPageObjects, getService }) { expect(mapboxStyle.sources[LAYER_ID].data.features.length).to.equal(12); mapboxStyle.sources[LAYER_ID].data.features.forEach(({ properties }) => { - expect(properties.hasOwnProperty(MAX_OF_BYTES_PROP_NAME)).to.be(true); - expect(properties.hasOwnProperty(DOC_COUNT_PROP_NAME)).to.be(true); + expect(Object.hasOwn(properties, MAX_OF_BYTES_PROP_NAME)).to.be(true); + expect(Object.hasOwn(properties, DOC_COUNT_PROP_NAME)).to.be(true); }); }); diff --git a/x-pack/test/functional/apps/maps/group4/joins.js b/x-pack/test/functional/apps/maps/group4/joins.js index 74e68cb12c11a..b4846533b6a05 100644 --- a/x-pack/test/functional/apps/maps/group4/joins.js +++ b/x-pack/test/functional/apps/maps/group4/joins.js @@ -81,9 +81,9 @@ export default function ({ getPageObjects, getService }) { mapboxStyle.sources.n1t6f.data.features.forEach(({ properties }) => { if (properties.name === 'tango') { //left join, which means we won't rescale joins that do not match - expect(properties.hasOwnProperty(JOIN_PROPERTY_NAME)).to.be(false); + expect(Object.hasOwn(properties, JOIN_PROPERTY_NAME)).to.be(false); } else { - expect(properties.hasOwnProperty(JOIN_PROPERTY_NAME)).to.be(true); + expect(Object.hasOwn(properties, JOIN_PROPERTY_NAME)).to.be(true); } expect(properties[JOIN_PROPERTY_NAME]).to.be(EXPECTED_JOIN_VALUES[properties.name]); }); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/advanced_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/advanced_job.ts index 9ebc7d8ddc827..ea5d70fcbe069 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/advanced_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/advanced_job.ts @@ -243,21 +243,21 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation inputs the query delay'); await ml.jobWizardAdvanced.assertQueryDelayInputExists(); await ml.jobWizardAdvanced.assertQueryDelayValue(defaultValues.queryDelay); - if (testData.datafeedConfig.hasOwnProperty('queryDelay')) { + if (Object.hasOwn(testData.datafeedConfig, 'queryDelay')) { await ml.jobWizardAdvanced.setQueryDelay(testData.datafeedConfig.queryDelay!); } await ml.testExecution.logTestStep('job creation inputs the frequency'); await ml.jobWizardAdvanced.assertFrequencyInputExists(); await ml.jobWizardAdvanced.assertFrequencyValue(defaultValues.frequency); - if (testData.datafeedConfig.hasOwnProperty('frequency')) { + if (Object.hasOwn(testData.datafeedConfig, 'frequency')) { await ml.jobWizardAdvanced.setFrequency(testData.datafeedConfig.frequency!); } await ml.testExecution.logTestStep('job creation inputs the scroll size'); await ml.jobWizardAdvanced.assertScrollSizeInputExists(); await ml.jobWizardAdvanced.assertScrollSizeValue(defaultValues.scrollSize); - if (testData.datafeedConfig.hasOwnProperty('scrollSize')) { + if (Object.hasOwn(testData.datafeedConfig, 'scrollSize')) { await ml.jobWizardAdvanced.setScrollSize(testData.datafeedConfig.scrollSize!); } @@ -270,7 +270,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation selects the categorization field'); await ml.jobWizardAdvanced.assertCategorizationFieldInputExists(); - if (testData.pickFieldsConfig.hasOwnProperty('categorizationField')) { + if (Object.hasOwn(testData.pickFieldsConfig, 'categorizationField')) { await ml.jobWizardAdvanced.selectCategorizationField( testData.pickFieldsConfig.categorizationField! ); @@ -280,7 +280,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation selects the summary count field'); await ml.jobWizardAdvanced.assertSummaryCountFieldInputExists(); - if (testData.pickFieldsConfig.hasOwnProperty('summaryCountField')) { + if (Object.hasOwn(testData.pickFieldsConfig, 'summaryCountField')) { await ml.jobWizardAdvanced.selectSummaryCountField( testData.pickFieldsConfig.summaryCountField! ); @@ -307,22 +307,22 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorDescriptionValue(''); await ml.jobWizardAdvanced.selectDetectorFunction(detector.function); - if (detector.hasOwnProperty('field')) { + if (Object.hasOwn(detector, 'field')) { await ml.jobWizardAdvanced.selectDetectorField(detector.field!); } - if (detector.hasOwnProperty('byField')) { + if (Object.hasOwn(detector, 'byField')) { await ml.jobWizardAdvanced.selectDetectorByField(detector.byField!); } - if (detector.hasOwnProperty('overField')) { + if (Object.hasOwn(detector, 'overField')) { await ml.jobWizardAdvanced.selectDetectorOverField(detector.overField!); } - if (detector.hasOwnProperty('partitionField')) { + if (Object.hasOwn(detector, 'partitionField')) { await ml.jobWizardAdvanced.selectDetectorPartitionField(detector.partitionField!); } - if (detector.hasOwnProperty('excludeFrequent')) { + if (Object.hasOwn(detector, 'excludeFrequent')) { await ml.jobWizardAdvanced.selectDetectorExcludeFrequent(detector.excludeFrequent!); } - if (detector.hasOwnProperty('description')) { + if (Object.hasOwn(detector, 'description')) { await ml.jobWizardAdvanced.setDetectorDescription(detector.description!); } @@ -334,7 +334,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorEntryExists( index, detector.identifier, - detector.hasOwnProperty('description') ? detector.description! : undefined + Object.hasOwn(detector, 'description') ? detector.description! : undefined ); } @@ -459,20 +459,20 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job cloning pre-fills the query delay'); await ml.jobWizardAdvanced.assertQueryDelayInputExists(); - if (testData.datafeedConfig.hasOwnProperty('queryDelay')) { + if (Object.hasOwn(testData.datafeedConfig, 'queryDelay')) { await ml.jobWizardAdvanced.assertQueryDelayValue(testData.datafeedConfig.queryDelay!); } await ml.testExecution.logTestStep('job cloning pre-fills the frequency'); await ml.jobWizardAdvanced.assertFrequencyInputExists(); - if (testData.datafeedConfig.hasOwnProperty('frequency')) { + if (Object.hasOwn(testData.datafeedConfig, 'frequency')) { await ml.jobWizardAdvanced.assertFrequencyValue(testData.datafeedConfig.frequency!); } await ml.testExecution.logTestStep('job cloning pre-fills the scroll size'); await ml.jobWizardAdvanced.assertScrollSizeInputExists(); await ml.jobWizardAdvanced.assertScrollSizeValue( - testData.datafeedConfig.hasOwnProperty('scrollSize') + Object.hasOwn(testData.datafeedConfig, 'scrollSize') ? testData.datafeedConfig.scrollSize! : defaultValues.scrollSize ); @@ -487,7 +487,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job cloning pre-fills the categorization field'); await ml.jobWizardAdvanced.assertCategorizationFieldInputExists(); await ml.jobWizardAdvanced.assertCategorizationFieldSelection( - testData.pickFieldsConfig.hasOwnProperty('categorizationField') + Object.hasOwn(testData.pickFieldsConfig, 'categorizationField') ? [testData.pickFieldsConfig.categorizationField!] : [] ); @@ -495,7 +495,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job cloning pre-fills the summary count field'); await ml.jobWizardAdvanced.assertSummaryCountFieldInputExists(); await ml.jobWizardAdvanced.assertSummaryCountFieldSelection( - testData.pickFieldsConfig.hasOwnProperty('summaryCountField') + Object.hasOwn(testData.pickFieldsConfig, 'summaryCountField') ? [testData.pickFieldsConfig.summaryCountField!] : [] ); @@ -505,7 +505,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorEntryExists( index, detector.identifier, - detector.hasOwnProperty('description') ? detector.description! : undefined + Object.hasOwn(detector, 'description') ? detector.description! : undefined ); await ml.jobWizardAdvanced.clickEditDetector(index); @@ -519,23 +519,23 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorFunctionSelection([detector.function]); await ml.jobWizardAdvanced.assertDetectorFieldSelection( - detector.hasOwnProperty('field') ? [detector.field!] : [] + Object.hasOwn(detector, 'field') ? [detector.field!] : [] ); await ml.jobWizardAdvanced.assertDetectorByFieldSelection( - detector.hasOwnProperty('byField') ? [detector.byField!] : [] + Object.hasOwn(detector, 'byField') ? [detector.byField!] : [] ); await ml.jobWizardAdvanced.assertDetectorOverFieldSelection( - detector.hasOwnProperty('overField') ? [detector.overField!] : [] + Object.hasOwn(detector, 'overField') ? [detector.overField!] : [] ); await ml.jobWizardAdvanced.assertDetectorPartitionFieldSelection( - detector.hasOwnProperty('partitionField') ? [detector.partitionField!] : [] + Object.hasOwn(detector, 'partitionField') ? [detector.partitionField!] : [] ); await ml.jobWizardAdvanced.assertDetectorExcludeFrequentSelection( - detector.hasOwnProperty('excludeFrequent') ? [detector.excludeFrequent!] : [] + Object.hasOwn(detector, 'excludeFrequent') ? [detector.excludeFrequent!] : [] ); // Currently, a description different form the identifier is generated for detectors with partition field await ml.jobWizardAdvanced.assertDetectorDescriptionValue( - detector.hasOwnProperty('description') + Object.hasOwn(detector, 'description') ? detector.description! : detector.identifier.replace('partition_field_name', 'partitionfield') ); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/convert_jobs_to_advanced_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/convert_jobs_to_advanced_job.ts index 082ec7762bb98..08f3d91c15ecd 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/convert_jobs_to_advanced_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/convert_jobs_to_advanced_job.ts @@ -58,7 +58,7 @@ export default function ({ getService }: FtrProviderContext) { 'advanced job creation retains or inputs the summary count field' ); await ml.jobWizardAdvanced.assertSummaryCountFieldInputExists(); - if (testData.pickFieldsConfig.hasOwnProperty('summaryCountField')) { + if (Object.hasOwn(testData.pickFieldsConfig, 'summaryCountField')) { await ml.jobWizardAdvanced.selectSummaryCountField( testData.pickFieldsConfig.summaryCountField! ); @@ -92,22 +92,22 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorDescriptionValue(''); await ml.jobWizardAdvanced.selectDetectorFunction(detector.function); - if (detector.hasOwnProperty('field')) { + if (Object.hasOwn(detector, 'field')) { await ml.jobWizardAdvanced.selectDetectorField(detector.field!); } - if (detector.hasOwnProperty('byField')) { + if (Object.hasOwn(detector, 'byField')) { await ml.jobWizardAdvanced.selectDetectorByField(detector.byField!); } - if (detector.hasOwnProperty('overField')) { + if (Object.hasOwn(detector, 'overField')) { await ml.jobWizardAdvanced.selectDetectorOverField(detector.overField!); } - if (detector.hasOwnProperty('partitionField')) { + if (Object.hasOwn(detector, 'partitionField')) { await ml.jobWizardAdvanced.selectDetectorPartitionField(detector.partitionField!); } - if (detector.hasOwnProperty('excludeFrequent')) { + if (Object.hasOwn(detector, 'excludeFrequent')) { await ml.jobWizardAdvanced.selectDetectorExcludeFrequent(detector.excludeFrequent!); } - if (detector.hasOwnProperty('description')) { + if (Object.hasOwn(detector, 'description')) { await ml.jobWizardAdvanced.setDetectorDescription(detector.description!); } @@ -119,7 +119,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorEntryExists( index + previousDetectors.length, detector.identifier, - detector.hasOwnProperty('description') ? detector.description! : undefined + Object.hasOwn(detector, 'description') ? detector.description! : undefined ); } diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/date_nanos_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/date_nanos_job.ts index 864d89b2b08f3..e5ffd4c193949 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/date_nanos_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/date_nanos_job.ts @@ -134,21 +134,21 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation inputs the query delay'); await ml.jobWizardAdvanced.assertQueryDelayInputExists(); await ml.jobWizardAdvanced.assertQueryDelayValue(defaultValues.queryDelay); - if (testData.datafeedConfig.hasOwnProperty('queryDelay')) { + if (Object.hasOwn(testData.datafeedConfig, 'queryDelay')) { await ml.jobWizardAdvanced.setQueryDelay(testData.datafeedConfig.queryDelay!); } await ml.testExecution.logTestStep('job creation inputs the frequency'); await ml.jobWizardAdvanced.assertFrequencyInputExists(); await ml.jobWizardAdvanced.assertFrequencyValue(defaultValues.frequency); - if (testData.datafeedConfig.hasOwnProperty('frequency')) { + if (Object.hasOwn(testData.datafeedConfig, 'frequency')) { await ml.jobWizardAdvanced.setFrequency(testData.datafeedConfig.frequency!); } await ml.testExecution.logTestStep('job creation inputs the scroll size'); await ml.jobWizardAdvanced.assertScrollSizeInputExists(); await ml.jobWizardAdvanced.assertScrollSizeValue(defaultValues.scrollSize); - if (testData.datafeedConfig.hasOwnProperty('scrollSize')) { + if (Object.hasOwn(testData.datafeedConfig, 'scrollSize')) { await ml.jobWizardAdvanced.setScrollSize(testData.datafeedConfig.scrollSize!); } @@ -161,7 +161,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation selects the summary count field'); await ml.jobWizardAdvanced.assertSummaryCountFieldInputExists(); - if (testData.pickFieldsConfig.hasOwnProperty('summaryCountField')) { + if (Object.hasOwn(testData.pickFieldsConfig, 'summaryCountField')) { await ml.jobWizardAdvanced.selectSummaryCountField( testData.pickFieldsConfig.summaryCountField! ); @@ -188,22 +188,22 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorDescriptionValue(''); await ml.jobWizardAdvanced.selectDetectorFunction(detector.function); - if (detector.hasOwnProperty('field')) { + if (Object.hasOwn(detector, 'field')) { await ml.jobWizardAdvanced.selectDetectorField(detector.field!); } - if (detector.hasOwnProperty('byField')) { + if (Object.hasOwn(detector, 'byField')) { await ml.jobWizardAdvanced.selectDetectorByField(detector.byField!); } - if (detector.hasOwnProperty('overField')) { + if (Object.hasOwn(detector, 'overField')) { await ml.jobWizardAdvanced.selectDetectorOverField(detector.overField!); } - if (detector.hasOwnProperty('partitionField')) { + if (Object.hasOwn(detector, 'partitionField')) { await ml.jobWizardAdvanced.selectDetectorPartitionField(detector.partitionField!); } - if (detector.hasOwnProperty('excludeFrequent')) { + if (Object.hasOwn(detector, 'excludeFrequent')) { await ml.jobWizardAdvanced.selectDetectorExcludeFrequent(detector.excludeFrequent!); } - if (detector.hasOwnProperty('description')) { + if (Object.hasOwn(detector, 'description')) { await ml.jobWizardAdvanced.setDetectorDescription(detector.description!); } @@ -215,7 +215,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorEntryExists( index, detector.identifier, - detector.hasOwnProperty('description') ? detector.description! : undefined + Object.hasOwn(detector, 'description') ? detector.description! : undefined ); } diff --git a/x-pack/test/functional/page_objects/infra_logs_page.ts b/x-pack/test/functional/page_objects/infra_logs_page.ts index 8a39f01e4ae27..778acfc5fe480 100644 --- a/x-pack/test/functional/page_objects/infra_logs_page.ts +++ b/x-pack/test/functional/page_objects/infra_logs_page.ts @@ -38,7 +38,7 @@ export function InfraLogsPageProvider({ getPageObjects, getService }: FtrProvide const parsedParams: Record = {}; for (const key in params) { - if (params.hasOwnProperty(key)) { + if (Object.hasOwn(params, key)) { const value = params[key]; parsedParams[key] = encode(value); } diff --git a/x-pack/test/functional/page_objects/uptime_page.ts b/x-pack/test/functional/page_objects/uptime_page.ts index 531e0e5980255..07c7e25edd975 100644 --- a/x-pack/test/functional/page_objects/uptime_page.ts +++ b/x-pack/test/functional/page_objects/uptime_page.ts @@ -92,7 +92,7 @@ export class UptimePageObject extends FtrService { public async selectFilterItems(filters: Record) { for (const key in filters) { - if (filters.hasOwnProperty(key)) { + if (Object.hasOwn(filters, key)) { const values = filters[key]; for (let i = 0; i < values.length; i++) { await this.commonService.selectFilterItem(key, values[i]); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/esql/discover_timeline_state_integration.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/esql/discover_timeline_state_integration.cy.ts index f27502dcd2bad..8e45d23d35433 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/esql/discover_timeline_state_integration.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/esql/discover_timeline_state_integration.cy.ts @@ -58,12 +58,12 @@ const esqlQuery = 'from auditbeat-* | where ecs.version == "8.0.0"'; const handleIntercepts = () => { cy.intercept('PATCH', '/api/timeline', (req) => { - if (req.body.hasOwnProperty('timeline') && req.body.timeline.savedSearchId === null) { + if (Object.hasOwn(req.body, 'timeline') && req.body.timeline.savedSearchId === null) { req.alias = TIMELINE_PATCH_REQ; } }); cy.intercept('PATCH', '/api/timeline', (req) => { - if (req.body.hasOwnProperty('timeline') && req.body.timeline.savedSearchId !== null) { + if (Object.hasOwn(req.body, 'timeline') && req.body.timeline.savedSearchId !== null) { req.alias = TIMELINE_REQ_WITH_SAVED_SEARCH; } }); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts index b54393da6f6f7..a2c10a39a3859 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts @@ -49,7 +49,7 @@ export default function ({ getService }: FtrProviderContext) { // Make sure none of the settings have been removed from ES API expectedSettings.forEach((setting) => { try { - expect(body.defaults.index.hasOwnProperty(setting)).to.eql(true); + expect(Object.hasOwn(body.defaults.index, setting)).to.eql(true); } catch { throw new Error(`Expected setting "${setting}" not found.`); }