streamlit-nightly 1.52.3.dev20251231__py3-none-any.whl → 1.52.3.dev20260102__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/__init__.py +1 -1
- streamlit/__main__.py +1 -1
- streamlit/auth_util.py +1 -1
- streamlit/cli_util.py +1 -1
- streamlit/column_config.py +1 -1
- streamlit/commands/__init__.py +1 -1
- streamlit/commands/echo.py +1 -1
- streamlit/commands/execution_control.py +1 -1
- streamlit/commands/experimental_query_params.py +1 -1
- streamlit/commands/logo.py +1 -1
- streamlit/commands/navigation.py +1 -1
- streamlit/commands/page_config.py +1 -1
- streamlit/components/__init__.py +1 -1
- streamlit/components/lib/__init__.py +1 -1
- streamlit/components/lib/local_component_registry.py +1 -1
- streamlit/components/types/__init__.py +1 -1
- streamlit/components/types/base_component_registry.py +1 -1
- streamlit/components/types/base_custom_component.py +1 -1
- streamlit/components/v1/__init__.py +1 -1
- streamlit/components/v1/component_arrow.py +1 -1
- streamlit/components/v1/component_registry.py +1 -1
- streamlit/components/v1/components.py +1 -1
- streamlit/components/v1/custom_component.py +1 -1
- streamlit/components/v2/__init__.py +1 -1
- streamlit/components/v2/bidi_component/__init__.py +1 -1
- streamlit/components/v2/bidi_component/constants.py +1 -1
- streamlit/components/v2/bidi_component/main.py +1 -1
- streamlit/components/v2/bidi_component/serialization.py +1 -1
- streamlit/components/v2/bidi_component/state.py +1 -1
- streamlit/components/v2/component_definition_resolver.py +1 -1
- streamlit/components/v2/component_file_watcher.py +1 -1
- streamlit/components/v2/component_manager.py +1 -1
- streamlit/components/v2/component_manifest_handler.py +1 -1
- streamlit/components/v2/component_path_utils.py +1 -1
- streamlit/components/v2/component_registry.py +1 -1
- streamlit/components/v2/get_bidi_component_manager.py +1 -1
- streamlit/components/v2/manifest_scanner.py +1 -1
- streamlit/components/v2/presentation.py +1 -1
- streamlit/components/v2/types.py +1 -1
- streamlit/config.py +1 -1
- streamlit/config_option.py +1 -1
- streamlit/config_util.py +1 -1
- streamlit/connections/__init__.py +1 -1
- streamlit/connections/base_connection.py +1 -1
- streamlit/connections/snowflake_connection.py +1 -1
- streamlit/connections/snowpark_connection.py +1 -1
- streamlit/connections/sql_connection.py +1 -1
- streamlit/connections/util.py +1 -1
- streamlit/cursor.py +1 -1
- streamlit/dataframe_util.py +1 -1
- streamlit/delta_generator.py +1 -1
- streamlit/delta_generator_singletons.py +1 -1
- streamlit/deprecation_util.py +1 -1
- streamlit/development.py +1 -1
- streamlit/elements/__init__.py +1 -1
- streamlit/elements/alert.py +1 -1
- streamlit/elements/arrow.py +1 -1
- streamlit/elements/balloons.py +1 -1
- streamlit/elements/bokeh_chart.py +1 -1
- streamlit/elements/code.py +1 -1
- streamlit/elements/deck_gl_json_chart.py +1 -1
- streamlit/elements/dialog_decorator.py +1 -1
- streamlit/elements/doc_string.py +1 -1
- streamlit/elements/empty.py +1 -1
- streamlit/elements/exception.py +1 -1
- streamlit/elements/form.py +1 -1
- streamlit/elements/graphviz_chart.py +1 -1
- streamlit/elements/heading.py +1 -1
- streamlit/elements/html.py +1 -1
- streamlit/elements/iframe.py +1 -1
- streamlit/elements/image.py +1 -1
- streamlit/elements/json.py +1 -1
- streamlit/elements/layouts.py +1 -1
- streamlit/elements/lib/__init__.py +1 -1
- streamlit/elements/lib/built_in_chart_utils.py +1 -1
- streamlit/elements/lib/color_util.py +1 -1
- streamlit/elements/lib/column_config_utils.py +1 -1
- streamlit/elements/lib/column_types.py +1 -1
- streamlit/elements/lib/dialog.py +1 -1
- streamlit/elements/lib/dicttools.py +1 -1
- streamlit/elements/lib/file_uploader_utils.py +1 -1
- streamlit/elements/lib/form_utils.py +1 -1
- streamlit/elements/lib/image_utils.py +1 -1
- streamlit/elements/lib/js_number.py +1 -1
- streamlit/elements/lib/layout_utils.py +1 -1
- streamlit/elements/lib/mutable_status_container.py +1 -1
- streamlit/elements/lib/options_selector_utils.py +1 -1
- streamlit/elements/lib/pandas_styler_utils.py +1 -1
- streamlit/elements/lib/policies.py +1 -1
- streamlit/elements/lib/shortcut_utils.py +1 -1
- streamlit/elements/lib/streamlit_plotly_theme.py +1 -1
- streamlit/elements/lib/subtitle_utils.py +1 -1
- streamlit/elements/lib/utils.py +1 -1
- streamlit/elements/map.py +1 -1
- streamlit/elements/markdown.py +1 -1
- streamlit/elements/media.py +1 -1
- streamlit/elements/metric.py +1 -1
- streamlit/elements/pdf.py +1 -1
- streamlit/elements/plotly_chart.py +1 -1
- streamlit/elements/progress.py +1 -1
- streamlit/elements/pyplot.py +1 -1
- streamlit/elements/snow.py +1 -1
- streamlit/elements/space.py +1 -1
- streamlit/elements/spinner.py +1 -1
- streamlit/elements/text.py +1 -1
- streamlit/elements/toast.py +1 -1
- streamlit/elements/vega_charts.py +1 -1
- streamlit/elements/widgets/__init__.py +1 -1
- streamlit/elements/widgets/audio_input.py +1 -1
- streamlit/elements/widgets/button.py +1 -1
- streamlit/elements/widgets/button_group.py +1 -1
- streamlit/elements/widgets/camera_input.py +1 -1
- streamlit/elements/widgets/chat.py +1 -1
- streamlit/elements/widgets/checkbox.py +1 -1
- streamlit/elements/widgets/color_picker.py +1 -1
- streamlit/elements/widgets/data_editor.py +1 -1
- streamlit/elements/widgets/file_uploader.py +1 -1
- streamlit/elements/widgets/multiselect.py +1 -1
- streamlit/elements/widgets/number_input.py +1 -1
- streamlit/elements/widgets/radio.py +1 -1
- streamlit/elements/widgets/select_slider.py +1 -1
- streamlit/elements/widgets/selectbox.py +1 -1
- streamlit/elements/widgets/slider.py +1 -1
- streamlit/elements/widgets/text_widgets.py +1 -1
- streamlit/elements/widgets/time_widgets.py +1 -1
- streamlit/elements/write.py +1 -1
- streamlit/emojis.py +1 -1
- streamlit/env_util.py +1 -1
- streamlit/error_util.py +1 -1
- streamlit/errors.py +1 -1
- streamlit/external/__init__.py +1 -1
- streamlit/external/langchain/__init__.py +1 -1
- streamlit/external/langchain/streamlit_callback_handler.py +1 -1
- streamlit/file_util.py +1 -1
- streamlit/git_util.py +1 -1
- streamlit/hello/__init__.py +1 -1
- streamlit/hello/animation_demo.py +1 -1
- streamlit/hello/dataframe_demo.py +1 -1
- streamlit/hello/hello.py +1 -1
- streamlit/hello/mapping_demo.py +1 -1
- streamlit/hello/plotting_demo.py +1 -1
- streamlit/hello/streamlit_app.py +1 -1
- streamlit/hello/utils.py +1 -1
- streamlit/logger.py +1 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/navigation/__init__.py +1 -1
- streamlit/navigation/page.py +1 -1
- streamlit/net_util.py +1 -1
- streamlit/platform.py +1 -1
- streamlit/proto/Alert_pb2.pyi +1 -1
- streamlit/proto/AppPage_pb2.pyi +1 -1
- streamlit/proto/ArrowData_pb2.pyi +1 -1
- streamlit/proto/ArrowNamedDataSet_pb2.pyi +1 -1
- streamlit/proto/ArrowVegaLiteChart_pb2.pyi +1 -1
- streamlit/proto/Arrow_pb2.pyi +1 -1
- streamlit/proto/AudioInput_pb2.pyi +1 -1
- streamlit/proto/Audio_pb2.pyi +1 -1
- streamlit/proto/AuthRedirect_pb2.pyi +1 -1
- streamlit/proto/AutoRerun_pb2.pyi +1 -1
- streamlit/proto/BackMsg_pb2.pyi +1 -1
- streamlit/proto/Balloons_pb2.pyi +1 -1
- streamlit/proto/BidiComponent_pb2.pyi +1 -1
- streamlit/proto/Block_pb2.pyi +1 -1
- streamlit/proto/BokehChart_pb2.pyi +1 -1
- streamlit/proto/ButtonGroup_pb2.pyi +1 -1
- streamlit/proto/ButtonLikeIconPosition_pb2.pyi +1 -1
- streamlit/proto/Button_pb2.pyi +1 -1
- streamlit/proto/CameraInput_pb2.pyi +1 -1
- streamlit/proto/ChatInput_pb2.pyi +1 -1
- streamlit/proto/Checkbox_pb2.pyi +1 -1
- streamlit/proto/ClientState_pb2.pyi +1 -1
- streamlit/proto/Code_pb2.pyi +1 -1
- streamlit/proto/ColorPicker_pb2.pyi +1 -1
- streamlit/proto/Common_pb2.pyi +1 -1
- streamlit/proto/Components_pb2.pyi +1 -1
- streamlit/proto/DataFrame_pb2.pyi +1 -1
- streamlit/proto/DateInput_pb2.pyi +1 -1
- streamlit/proto/DateTimeInput_pb2.pyi +1 -1
- streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -1
- streamlit/proto/Delta_pb2.pyi +1 -1
- streamlit/proto/DocString_pb2.pyi +1 -1
- streamlit/proto/DownloadButton_pb2.pyi +1 -1
- streamlit/proto/Element_pb2.pyi +1 -1
- streamlit/proto/Empty_pb2.pyi +1 -1
- streamlit/proto/Exception_pb2.pyi +1 -1
- streamlit/proto/Favicon_pb2.pyi +1 -1
- streamlit/proto/FileUploader_pb2.pyi +1 -1
- streamlit/proto/ForwardMsg_pb2.pyi +1 -1
- streamlit/proto/GapSize_pb2.pyi +1 -1
- streamlit/proto/GitInfo_pb2.pyi +1 -1
- streamlit/proto/GraphVizChart_pb2.pyi +1 -1
- streamlit/proto/Heading_pb2.pyi +1 -1
- streamlit/proto/HeightConfig_pb2.pyi +1 -1
- streamlit/proto/Html_pb2.pyi +1 -1
- streamlit/proto/IFrame_pb2.pyi +1 -1
- streamlit/proto/Image_pb2.pyi +1 -1
- streamlit/proto/Json_pb2.pyi +1 -1
- streamlit/proto/LabelVisibilityMessage_pb2.pyi +1 -1
- streamlit/proto/LinkButton_pb2.pyi +1 -1
- streamlit/proto/Logo_pb2.pyi +1 -1
- streamlit/proto/Markdown_pb2.pyi +1 -1
- streamlit/proto/Metric_pb2.pyi +1 -1
- streamlit/proto/MetricsEvent_pb2.pyi +1 -1
- streamlit/proto/MultiSelect_pb2.pyi +1 -1
- streamlit/proto/NamedDataSet_pb2.pyi +1 -1
- streamlit/proto/Navigation_pb2.pyi +1 -1
- streamlit/proto/NewSession_pb2.pyi +1 -1
- streamlit/proto/NumberInput_pb2.pyi +1 -1
- streamlit/proto/PageConfig_pb2.pyi +1 -1
- streamlit/proto/PageInfo_pb2.pyi +1 -1
- streamlit/proto/PageLink_pb2.pyi +1 -1
- streamlit/proto/PageNotFound_pb2.pyi +1 -1
- streamlit/proto/PageProfile_pb2.pyi +1 -1
- streamlit/proto/PagesChanged_pb2.pyi +1 -1
- streamlit/proto/ParentMessage_pb2.pyi +1 -1
- streamlit/proto/PlotlyChart_pb2.pyi +1 -1
- streamlit/proto/Progress_pb2.pyi +1 -1
- streamlit/proto/Radio_pb2.pyi +1 -1
- streamlit/proto/RootContainer_pb2.pyi +1 -1
- streamlit/proto/Selectbox_pb2.pyi +1 -1
- streamlit/proto/SessionEvent_pb2.pyi +1 -1
- streamlit/proto/SessionStatus_pb2.pyi +1 -1
- streamlit/proto/Skeleton_pb2.pyi +1 -1
- streamlit/proto/Slider_pb2.pyi +1 -1
- streamlit/proto/Snow_pb2.pyi +1 -1
- streamlit/proto/Space_pb2.pyi +1 -1
- streamlit/proto/Spinner_pb2.pyi +1 -1
- streamlit/proto/TextAlignmentConfig_pb2.pyi +1 -1
- streamlit/proto/TextArea_pb2.pyi +1 -1
- streamlit/proto/TextInput_pb2.pyi +1 -1
- streamlit/proto/Text_pb2.pyi +1 -1
- streamlit/proto/TimeInput_pb2.pyi +1 -1
- streamlit/proto/Toast_pb2.pyi +1 -1
- streamlit/proto/Transient_pb2.pyi +1 -1
- streamlit/proto/VegaLiteChart_pb2.pyi +1 -1
- streamlit/proto/Video_pb2.pyi +1 -1
- streamlit/proto/WidgetStates_pb2.pyi +1 -1
- streamlit/proto/WidthConfig_pb2.pyi +1 -1
- streamlit/proto/__init__.py +1 -1
- streamlit/runtime/__init__.py +1 -1
- streamlit/runtime/app_session.py +1 -1
- streamlit/runtime/caching/__init__.py +1 -1
- streamlit/runtime/caching/cache_data_api.py +1 -1
- streamlit/runtime/caching/cache_errors.py +1 -1
- streamlit/runtime/caching/cache_resource_api.py +1 -1
- streamlit/runtime/caching/cache_type.py +1 -1
- streamlit/runtime/caching/cache_utils.py +1 -1
- streamlit/runtime/caching/cached_message_replay.py +1 -1
- streamlit/runtime/caching/hashing.py +1 -1
- streamlit/runtime/caching/legacy_cache_api.py +1 -1
- streamlit/runtime/caching/storage/__init__.py +1 -1
- streamlit/runtime/caching/storage/cache_storage_protocol.py +1 -1
- streamlit/runtime/caching/storage/dummy_cache_storage.py +1 -1
- streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +1 -1
- streamlit/runtime/caching/storage/local_disk_cache_storage.py +1 -1
- streamlit/runtime/caching/ttl_cleanup_cache.py +1 -1
- streamlit/runtime/connection_factory.py +1 -1
- streamlit/runtime/context.py +1 -1
- streamlit/runtime/context_util.py +1 -1
- streamlit/runtime/credentials.py +1 -1
- streamlit/runtime/download_data_util.py +1 -1
- streamlit/runtime/forward_msg_cache.py +1 -1
- streamlit/runtime/forward_msg_queue.py +1 -1
- streamlit/runtime/fragment.py +1 -1
- streamlit/runtime/media_file_manager.py +1 -1
- streamlit/runtime/media_file_storage.py +1 -1
- streamlit/runtime/memory_media_file_storage.py +1 -1
- streamlit/runtime/memory_session_storage.py +1 -1
- streamlit/runtime/memory_uploaded_file_manager.py +1 -1
- streamlit/runtime/metrics_util.py +1 -1
- streamlit/runtime/pages_manager.py +1 -1
- streamlit/runtime/runtime.py +1 -1
- streamlit/runtime/runtime_util.py +1 -1
- streamlit/runtime/script_data.py +1 -1
- streamlit/runtime/scriptrunner/__init__.py +1 -1
- streamlit/runtime/scriptrunner/exec_code.py +1 -1
- streamlit/runtime/scriptrunner/magic.py +1 -1
- streamlit/runtime/scriptrunner/magic_funcs.py +1 -1
- streamlit/runtime/scriptrunner/script_cache.py +1 -1
- streamlit/runtime/scriptrunner/script_runner.py +1 -1
- streamlit/runtime/scriptrunner_utils/__init__.py +1 -1
- streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
- streamlit/runtime/scriptrunner_utils/script_requests.py +1 -1
- streamlit/runtime/scriptrunner_utils/script_run_context.py +1 -1
- streamlit/runtime/secrets.py +1 -1
- streamlit/runtime/session_manager.py +1 -1
- streamlit/runtime/state/__init__.py +1 -1
- streamlit/runtime/state/common.py +1 -1
- streamlit/runtime/state/presentation.py +1 -1
- streamlit/runtime/state/query_params.py +1 -1
- streamlit/runtime/state/query_params_proxy.py +1 -1
- streamlit/runtime/state/safe_session_state.py +1 -1
- streamlit/runtime/state/session_state.py +1 -1
- streamlit/runtime/state/session_state_proxy.py +1 -1
- streamlit/runtime/state/widgets.py +1 -1
- streamlit/runtime/stats.py +1 -1
- streamlit/runtime/theme_util.py +1 -1
- streamlit/runtime/uploaded_file_manager.py +1 -1
- streamlit/runtime/websocket_session_manager.py +1 -1
- streamlit/source_util.py +1 -1
- streamlit/static/index.html +2 -2
- streamlit/static/manifest.json +299 -299
- streamlit/static/static/js/{ErrorOutline.esm.bKqSjdNS.js → ErrorOutline.esm.0yuPC2le.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.DYcl0HsS.js → FileDownload.esm.3-xCz5Dn.js} +1 -1
- streamlit/static/static/js/{FileHelper.BG4elCiu.js → FileHelper.B7p1stfH.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.CcrsaZUN.js → FormClearHelper.2gb34MMC.js} +1 -1
- streamlit/static/static/js/InputInstructions.CMaz--YN.js +1 -0
- streamlit/static/static/js/Particles.DD6E7DiG.js +1 -0
- streamlit/static/static/js/{ProgressBar.D54tj-jr.js → ProgressBar.CBHvskJx.js} +1 -1
- streamlit/static/static/js/{StreamlitSyntaxHighlighter.D6tqIUNe.js → StreamlitSyntaxHighlighter.Cbd0Ng31.js} +1 -1
- streamlit/static/static/js/{TableChart.esm.BsEqAKaW.js → TableChart.esm.DkPOnPiP.js} +1 -1
- streamlit/static/static/js/Toolbar.uViLYWIL.js +1 -0
- streamlit/static/static/js/{WidgetLabelHelpIconInline.tetiwgyt.js → WidgetLabelHelpIconInline.DrQP-jZR.js} +1 -1
- streamlit/static/static/js/{base-input.bCQ8S-FY.js → base-input.CWLDgMIQ.js} +1 -1
- streamlit/static/static/js/{checkbox.SvhUmEPl.js → checkbox.lSnX8MiZ.js} +1 -1
- streamlit/static/static/js/{createDownloadLinkElement.mdzy2wqu.js → createDownloadLinkElement.qE-XPzHd.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BRpG6UuQ.js → data-grid-overlay-editor.CixSgiOW.js} +1 -1
- streamlit/static/static/js/{downloader.BFho_Alx.js → downloader.BR9PJ-pW.js} +1 -1
- streamlit/static/static/js/{embed.CjSf3HQ8.js → embed.C4scQ-hW.js} +1 -1
- streamlit/static/static/js/{es6.DnRofDlD.js → es6.NjGX1Pno.js} +2 -2
- streamlit/static/static/js/{formatNumber.CtWVEKkt.js → formatNumber.DwAT32vb.js} +1 -1
- streamlit/static/static/js/{iconPosition.Docx9KVT.js → iconPosition.BF4yacmi.js} +1 -1
- streamlit/static/static/js/{iframeResizer.contentWindow.DPJjr14X.js → iframeResizer.contentWindow.BGF3G8-a.js} +1 -1
- streamlit/static/static/js/{index.-Uw_gjRk.js → index.-zR4Ojkd.js} +1 -1
- streamlit/static/static/js/{index.BkQCUqLQ.js → index.47QtlXbw.js} +2 -2
- streamlit/static/static/js/{index.D9DEa36h.js → index.AbRqTgeF.js} +1 -1
- streamlit/static/static/js/{index.BWwP9fh8.js → index.B2FiJl2X.js} +1 -1
- streamlit/static/static/js/{index.C40Nq5m8.js → index.BD8Aa49F.js} +1 -1
- streamlit/static/static/js/{index.8C-cS-O4.js → index.BDI5MuEQ.js} +2 -2
- streamlit/static/static/js/index.BMEupOtG.js +1 -0
- streamlit/static/static/js/index.BMxizVm_.js +1 -0
- streamlit/static/static/js/{index.CqMzbjp5.js → index.BO_-eOf-.js} +1 -1
- streamlit/static/static/js/{index.zN5Ficl0.js → index.BQm1_d2O.js} +2 -2
- streamlit/static/static/js/{index.DYR3j5ZF.js → index.B_rx628n.js} +1 -1
- streamlit/static/static/js/index.BdVxH2a1.js +2 -0
- streamlit/static/static/js/index.BduCcO_U.js +1 -0
- streamlit/static/static/js/{index.B4jgy50K.js → index.Bh-DEB0O.js} +1 -1
- streamlit/static/static/js/index.BibdADOD.js +1 -0
- streamlit/static/static/js/index.BsbD_ZbU.js +1 -0
- streamlit/static/static/js/{index.BZFLbiyp.js → index.Bu9qeYdI.js} +1 -1
- streamlit/static/static/js/index.BxQj1n_M.js +1 -0
- streamlit/static/static/js/{index.CggOKbv5.js → index.C1zhyjFt.js} +1 -1
- streamlit/static/static/js/{index.B-k1aQD6.js → index.C3Czde8V.js} +1 -1
- streamlit/static/static/js/{index.DzWfLgsQ.js → index.C4N9_AWk.js} +1 -1
- streamlit/static/static/js/{index.CNXi20U2.js → index.CSPw4GmF.js} +1 -1
- streamlit/static/static/js/{index.C8fg6FO8.js → index.CU6HHyYl.js} +2 -2
- streamlit/static/static/js/{index.D5m5f2G-.js → index.CW9ezGuy.js} +1 -1
- streamlit/static/static/js/{index.2hZ1_TTv.js → index.CYAiwpaf.js} +1 -1
- streamlit/static/static/js/{index.C3MpZoqE.js → index.Cd-5Vmzk.js} +1 -1
- streamlit/static/static/js/index.Ce0tmU7o.js +1 -0
- streamlit/static/static/js/index.Cio1dNsf.js +1 -0
- streamlit/static/static/js/index.CrqhxXJA.js +1 -0
- streamlit/static/static/js/{index.BakUx9hH.js → index.CsbjfvSm.js} +1 -1
- streamlit/static/static/js/{index.8I6SAQDm.js → index.D1JGP_72.js} +1 -1
- streamlit/static/static/js/{index.qg9M6uCh.js → index.DD6jbP16.js} +1 -1
- streamlit/static/static/js/{index.s88CwlpG.js → index.DEF4aL6h.js} +8 -8
- streamlit/static/static/js/{index.Dodgg4y_.js → index.DLYqRljk.js} +1 -1
- streamlit/static/static/js/index.DPeqx79l.js +7 -0
- streamlit/static/static/js/{index.Zx7pc4Ib.js → index.DPn1549d.js} +1 -1
- streamlit/static/static/js/{index.Bd9Ju7cE.js → index.DUS_Khvb.js} +1 -1
- streamlit/static/static/js/{index.CTdvJfB7.js → index.D_zZYX-F.js} +2 -2
- streamlit/static/static/js/index.DgxjQf8D.js +1 -0
- streamlit/static/static/js/{index.3BdSdx9Q.js → index.DkQIXYcv.js} +1 -1
- streamlit/static/static/js/{index.DF31ixLt.js → index.Duio3diQ.js} +2 -2
- streamlit/static/static/js/index.DwRMR_Ao.js +1 -0
- streamlit/static/static/js/index.Es18h2ap.js +1 -0
- streamlit/static/static/js/{index.BE-_bdmf.js → index.L46XQsIY.js} +2 -2
- streamlit/static/static/js/{index.DQm9mE0T.js → index.ayxJkxJS.js} +24 -24
- streamlit/static/static/js/index.dPnBpGLy.js +1 -0
- streamlit/static/static/js/{index.HrvNEmn1.js → index.iV4zN5GV.js} +1 -1
- streamlit/static/static/js/index.x9TEvcRW.js +1 -0
- streamlit/static/static/js/{input.DnsJ8I9O.js → input.BViGVyAy.js} +1 -1
- streamlit/static/static/js/{main.Cs9yv8mP.js → main.DCurQa2X.js} +1 -1
- streamlit/static/static/js/{memory.CnMAyKwP.js → memory.CeqRSVmL.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CMfbFJmW.js → number-overlay-editor.BNei35vX.js} +1 -1
- streamlit/static/static/js/{pandasStylerUtils.pLaEIPZw.js → pandasStylerUtils.BQNPcCRH.js} +1 -1
- streamlit/static/static/js/{sandbox.BcdOGz3D.js → sandbox.Bkc6ExUI.js} +1 -1
- streamlit/static/static/js/styled-components.C0Ar4ws1.js +1 -0
- streamlit/static/static/js/{throttle.DM63_0Ui.js → throttle.DpJVqfiM.js} +1 -1
- streamlit/static/static/js/{timepicker.pd9YKJun.js → timepicker.plxFjD2l.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.C-vxP4eC.js → toConsumableArray.nocm-m15.js} +1 -1
- streamlit/static/static/js/uniqueId.BgdRqRrS.js +1 -0
- streamlit/static/static/js/{useBasicWidgetState.S1_DeDAF.js → useBasicWidgetState.CD1aG6-a.js} +1 -1
- streamlit/static/static/js/{useIntlLocale.BwbkZTj-.js → useIntlLocale.DLuHgCFO.js} +1 -1
- streamlit/static/static/js/{useTextInputAutoExpand.DJy7lTuU.js → useTextInputAutoExpand.5E_gpUfB.js} +1 -1
- streamlit/static/static/js/{useUpdateUiValue.KsXqwLCs.js → useUpdateUiValue.DWX5Hfxx.js} +1 -1
- streamlit/static/static/js/{useWaveformController.DQSftrKy.js → useWaveformController.B3tf7xqQ.js} +1 -1
- streamlit/static/static/js/{withCalculatedWidth.Cf1aBuuB.js → withCalculatedWidth.kZou334h.js} +1 -1
- streamlit/static/static/js/withFullScreenWrapper.DGTtbbLe.js +1 -0
- streamlit/string_util.py +1 -1
- streamlit/temporary_directory.py +1 -1
- streamlit/testing/__init__.py +1 -1
- streamlit/testing/v1/__init__.py +1 -1
- streamlit/testing/v1/app_test.py +1 -1
- streamlit/testing/v1/element_tree.py +1 -1
- streamlit/testing/v1/local_script_runner.py +1 -1
- streamlit/testing/v1/util.py +1 -1
- streamlit/time_util.py +1 -1
- streamlit/type_util.py +1 -1
- streamlit/url_util.py +1 -1
- streamlit/user_info.py +1 -1
- streamlit/util.py +1 -1
- streamlit/version.py +1 -1
- streamlit/watcher/__init__.py +1 -1
- streamlit/watcher/event_based_path_watcher.py +1 -1
- streamlit/watcher/folder_black_list.py +1 -1
- streamlit/watcher/local_sources_watcher.py +1 -1
- streamlit/watcher/path_watcher.py +1 -1
- streamlit/watcher/polling_path_watcher.py +1 -1
- streamlit/watcher/util.py +1 -1
- streamlit/web/__init__.py +1 -1
- streamlit/web/bootstrap.py +1 -1
- streamlit/web/cache_storage_manager_config.py +1 -1
- streamlit/web/cli.py +1 -1
- streamlit/web/server/__init__.py +1 -1
- streamlit/web/server/app_static_file_handler.py +1 -1
- streamlit/web/server/authlib_tornado_integration.py +1 -1
- streamlit/web/server/bidi_component_request_handler.py +1 -1
- streamlit/web/server/browser_websocket_handler.py +1 -1
- streamlit/web/server/component_file_utils.py +1 -1
- streamlit/web/server/component_request_handler.py +1 -1
- streamlit/web/server/media_file_handler.py +1 -1
- streamlit/web/server/oauth_authlib_routes.py +1 -1
- streamlit/web/server/oidc_mixin.py +1 -1
- streamlit/web/server/routes.py +1 -1
- streamlit/web/server/server.py +1 -1
- streamlit/web/server/server_util.py +1 -1
- streamlit/web/server/stats_request_handler.py +1 -1
- streamlit/web/server/upload_file_request_handler.py +1 -1
- streamlit/web/server/websocket_headers.py +1 -1
- {streamlit_nightly-1.52.3.dev20251231.data → streamlit_nightly-1.52.3.dev20260102.data}/scripts/streamlit.cmd +1 -1
- {streamlit_nightly-1.52.3.dev20251231.dist-info → streamlit_nightly-1.52.3.dev20260102.dist-info}/METADATA +1 -1
- streamlit_nightly-1.52.3.dev20260102.dist-info/RECORD +630 -0
- streamlit/static/static/js/InputInstructions.B-hrhnKS.js +0 -1
- streamlit/static/static/js/Particles.C1lQDBme.js +0 -1
- streamlit/static/static/js/Toolbar.COFccaTT.js +0 -1
- streamlit/static/static/js/index.B-2OnxuC.js +0 -1
- streamlit/static/static/js/index.BPDinT9W.js +0 -1
- streamlit/static/static/js/index.BWYs56td.js +0 -1
- streamlit/static/static/js/index.Bt-J_LLo.js +0 -1
- streamlit/static/static/js/index.BukrvZZ2.js +0 -1
- streamlit/static/static/js/index.CFRlw_Q4.js +0 -1
- streamlit/static/static/js/index.CoOQHuCm.js +0 -1
- streamlit/static/static/js/index.D3xfIqy_.js +0 -1
- streamlit/static/static/js/index.D67NXgZL.js +0 -1
- streamlit/static/static/js/index.DEUimtV1.js +0 -1
- streamlit/static/static/js/index.DK27W5ov.js +0 -1
- streamlit/static/static/js/index.DWUM7LrZ.js +0 -1
- streamlit/static/static/js/index.DaxZAmvz.js +0 -2
- streamlit/static/static/js/index.Dq9InAZx.js +0 -1
- streamlit/static/static/js/index.DtZbhbEr.js +0 -7
- streamlit/static/static/js/index.f-UZuoZE.js +0 -1
- streamlit/static/static/js/styled-components.571s8DEN.js +0 -1
- streamlit/static/static/js/uniqueId.Cx7-DRlG.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.BBQ6--wm.js +0 -1
- streamlit_nightly-1.52.3.dev20251231.dist-info/RECORD +0 -630
- {streamlit_nightly-1.52.3.dev20251231.dist-info → streamlit_nightly-1.52.3.dev20260102.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.52.3.dev20251231.dist-info → streamlit_nightly-1.52.3.dev20260102.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.52.3.dev20251231.dist-info → streamlit_nightly-1.52.3.dev20260102.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{am as JD,bE as QD,ag as e7,F as t7,W as r7,aM as a7,bF as rA,bG as n7,bH as i7,bI as o7,bJ as qv,bK as yh,bL as aA,bM as s7,aR as Wf,n as K5,bN as l7,bO as Kg,r as Gv,X as nA,j as cb,l as u7,k as c7}from"./index.DQm9mE0T.js";import{w as f7,E as iA}from"./withFullScreenWrapper.BBQ6--wm.js";import{F as h7}from"./FormClearHelper.CcrsaZUN.js";var lb={},ub={},$5;function v7(){return $5||($5=1,(function(en){function qi(ws){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Os){return typeof Os}:function(Os){return Os&&typeof Symbol=="function"&&Os.constructor===Symbol&&Os!==Symbol.prototype?"symbol":typeof Os},qi(ws)}Object.defineProperty(en,"__esModule",{value:!0}),en.default=Hv;var Ms=Xu(JD()),Fo=zs(QD());function zs(ws){return ws&&ws.__esModule?ws:{default:ws}}function rc(ws){if(typeof WeakMap!="function")return null;var Os=new WeakMap,ac=new WeakMap;return(rc=function(_i){return _i?ac:Os})(ws)}function Xu(ws,Os){if(ws&&ws.__esModule)return ws;if(ws===null||qi(ws)!=="object"&&typeof ws!="function")return{default:ws};var ac=rc(Os);if(ac&&ac.has(ws))return ac.get(ws);var Sc={},_i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Jo in ws)if(Jo!=="default"&&Object.prototype.hasOwnProperty.call(ws,Jo)){var Ni=_i?Object.getOwnPropertyDescriptor(ws,Jo):null;Ni&&(Ni.get||Ni.set)?Object.defineProperty(Sc,Jo,Ni):Sc[Jo]=ws[Jo]}return Sc.default=ws,ac&&ac.set(ws,Sc),Sc}function Xf(ws,Os){if(!(ws instanceof Os))throw new TypeError("Cannot call a class as a function")}function wf(ws,Os){for(var ac=0;ac<Os.length;ac++){var Sc=Os[ac];Sc.enumerable=Sc.enumerable||!1,Sc.configurable=!0,"value"in Sc&&(Sc.writable=!0),Object.defineProperty(ws,Sc.key,Sc)}}function Hc(ws,Os,ac){return Os&&wf(ws.prototype,Os),Object.defineProperty(ws,"prototype",{writable:!1}),ws}function Tf(ws,Os){if(typeof Os!="function"&&Os!==null)throw new TypeError("Super expression must either be null or a function");ws.prototype=Object.create(Os&&Os.prototype,{constructor:{value:ws,writable:!0,configurable:!0}}),Object.defineProperty(ws,"prototype",{writable:!1}),Os&&Af(ws,Os)}function Af(ws,Os){return Af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Sc,_i){return Sc.__proto__=_i,Sc},Af(ws,Os)}function ah(ws){var Os=Wc();return function(){var Sc=Kh(ws),_i;if(Os){var Jo=Kh(this).constructor;_i=Reflect.construct(Sc,arguments,Jo)}else _i=Sc.apply(this,arguments);return js(this,_i)}}function js(ws,Os){if(Os&&(qi(Os)==="object"||typeof Os=="function"))return Os;if(Os!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fl(ws)}function fl(ws){if(ws===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ws}function Wc(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kh(ws){return Kh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ac){return ac.__proto__||Object.getPrototypeOf(ac)},Kh(ws)}var Fs=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],He=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],uv=typeof window<"u";function Hv(ws){var Os=(function(ac){Tf(_i,ac);var Sc=ah(_i);function _i(Jo){var Ni;return Xf(this,_i),Ni=Sc.call(this,Jo),Ni.p=Promise.resolve(),Ni.resizeHandler=null,Ni.handlers={},Ni.syncWindowResize=Ni.syncWindowResize.bind(fl(Ni)),Ni.syncEventHandlers=Ni.syncEventHandlers.bind(fl(Ni)),Ni.attachUpdateEvents=Ni.attachUpdateEvents.bind(fl(Ni)),Ni.getRef=Ni.getRef.bind(fl(Ni)),Ni.handleUpdate=Ni.handleUpdate.bind(fl(Ni)),Ni.figureCallback=Ni.figureCallback.bind(fl(Ni)),Ni.updatePlotly=Ni.updatePlotly.bind(fl(Ni)),Ni}return Hc(_i,[{key:"updatePlotly",value:function(Ni,iu,Sf){var Ui=this;this.p=this.p.then(function(){if(!Ui.unmounting){if(!Ui.el)throw new Error("Missing element reference");return ws.react(Ui.el,{data:Ui.props.data,layout:Ui.props.layout,config:Ui.props.config,frames:Ui.props.frames})}}).then(function(){Ui.unmounting||(Ui.syncWindowResize(Ni),Ui.syncEventHandlers(),Ui.figureCallback(iu),Sf&&Ui.attachUpdateEvents())}).catch(function(Qo){Ui.props.onError&&Ui.props.onError(Qo)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(Ni){this.unmounting=!1;var iu=Ni.frames&&Ni.frames.length?Ni.frames.length:0,Sf=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Ui=!(Ni.layout===this.props.layout&&Ni.data===this.props.data&&Ni.config===this.props.config&&Sf===iu),Qo=Ni.revision!==void 0,Cp=Ni.revision!==this.props.revision;!Ui&&(!Qo||Qo&&!Cp)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&uv&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),ws.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var Ni=this;!this.el||!this.el.removeListener||He.forEach(function(iu){Ni.el.on(iu,Ni.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var Ni=this;!this.el||!this.el.removeListener||He.forEach(function(iu){Ni.el.removeListener(iu,Ni.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(Ni){if(typeof Ni=="function"){var iu=this.el,Sf=iu.data,Ui=iu.layout,Qo=this.el._transitionData?this.el._transitionData._frames:null,Cp={data:Sf,layout:Ui,frames:Qo};Ni(Cp,this.el)}}},{key:"syncWindowResize",value:function(Ni){var iu=this;uv&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return ws.Plots.resize(iu.el)},window.addEventListener("resize",this.resizeHandler),Ni&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(Ni){this.el=Ni,this.props.debug&&uv&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var Ni=this;Fs.forEach(function(iu){var Sf=Ni.props["on"+iu],Ui=Ni.handlers[iu],Qo=!!Ui;Sf&&!Qo?Ni.addEventHandler(iu,Sf):!Sf&&Qo?Ni.removeEventHandler(iu):Sf&&Qo&&Sf!==Ui&&(Ni.removeEventHandler(iu),Ni.addEventHandler(iu,Sf))})}},{key:"addEventHandler",value:function(Ni,iu){this.handlers[Ni]=iu,this.el.on(this.getPlotlyEventName(Ni),this.handlers[Ni])}},{key:"removeEventHandler",value:function(Ni){this.el.removeListener(this.getPlotlyEventName(Ni),this.handlers[Ni]),delete this.handlers[Ni]}},{key:"getPlotlyEventName",value:function(Ni){return"plotly_"+Ni.toLowerCase()}},{key:"render",value:function(){return Ms.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),_i})(Ms.Component);return Os.propTypes={data:Fo.default.arrayOf(Fo.default.object),config:Fo.default.object,layout:Fo.default.object,frames:Fo.default.arrayOf(Fo.default.object),revision:Fo.default.number,onInitialized:Fo.default.func,onPurge:Fo.default.func,onError:Fo.default.func,onUpdate:Fo.default.func,debug:Fo.default.bool,style:Fo.default.object,className:Fo.default.string,useResizeHandler:Fo.default.bool,divId:Fo.default.string},Fs.forEach(function(ac){Os.propTypes["on"+ac]=Fo.default.func}),Os.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Os}})(ub)),ub}var $y={exports:{}},d7=$y.exports,J5;function p7(){return J5||(J5=1,(function(en){var qi={};(function(Ms,Fo){en.exports?en.exports=Fo():Ms.moduleName=Fo()})(typeof self<"u"?self:d7,()=>{var Ms=(()=>{var Fo=Object.create,zs=Object.defineProperty,rc=Object.defineProperties,Xu=Object.getOwnPropertyDescriptor,Xf=Object.getOwnPropertyDescriptors,wf=Object.getOwnPropertyNames,Hc=Object.getOwnPropertySymbols,Tf=Object.getPrototypeOf,Af=Object.prototype.hasOwnProperty,ah=Object.prototype.propertyIsEnumerable,js=(Y,G,h)=>G in Y?zs(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:h}):Y[G]=h,fl=(Y,G)=>{for(var h in G||(G={}))Af.call(G,h)&&js(Y,h,G[h]);if(Hc)for(var h of Hc(G))ah.call(G,h)&&js(Y,h,G[h]);return Y},Wc=(Y,G)=>rc(Y,Xf(G)),Kh=(Y,G)=>{var h={};for(var b in Y)Af.call(Y,b)&&G.indexOf(b)<0&&(h[b]=Y[b]);if(Y!=null&&Hc)for(var b of Hc(Y))G.indexOf(b)<0&&ah.call(Y,b)&&(h[b]=Y[b]);return h},Fs=(Y,G)=>function(){return Y&&(G=(0,Y[wf(Y)[0]])(Y=0)),G},He=(Y,G)=>function(){return G||(0,Y[wf(Y)[0]])((G={exports:{}}).exports,G),G.exports},uv=(Y,G)=>{for(var h in G)zs(Y,h,{get:G[h],enumerable:!0})},Hv=(Y,G,h,b)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of wf(G))!Af.call(Y,S)&&S!==h&&zs(Y,S,{get:()=>G[S],enumerable:!(b=Xu(G,S))||b.enumerable});return Y},ws=(Y,G,h)=>(h=Y!=null?Fo(Tf(Y)):{},Hv(zs(h,"default",{value:Y,enumerable:!0}),Y)),Os=Y=>Hv(zs({},"__esModule",{value:!0}),Y),ac=He({"src/version.js"(Y){Y.version="3.3.1"}}),Sc=He({"node_modules/native-promise-only/lib/npo.src.js"(Y,G){(function(b,S,E){S[b]=S[b]||E(),typeof G<"u"&&G.exports&&(G.exports=S[b])})("Promise",typeof window<"u"?window:Y,function(){var b,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(m){return setImmediate(m)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(m,x,A,M){return Object.defineProperty(m,x,{value:A,writable:!0,configurable:M!==!1})}}catch{b=function(x,A,M){return x[A]=M,x}}E=(function(){var m,x,A;function M(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,g){A=new M(w,g),x?x.next=A:m=A,x=A,A=void 0},drain:function(){var w=m;for(m=x=S=void 0;w;)w.fn.call(w.self),w=w.next}}})();function r(l,m){E.add(l,m),S||(S=t(E.drain))}function o(l){var m,x=typeof l;return l!=null&&(x=="object"||x=="function")&&(m=l.then),typeof m=="function"?m:!1}function a(){for(var l=0;l<this.chain.length;l++)i(this,this.state===1?this.chain[l].success:this.chain[l].failure,this.chain[l]);this.chain.length=0}function i(l,m,x){var A,M;try{m===!1?x.reject(l.msg):(m===!0?A=l.msg:A=m.call(void 0,l.msg),A===x.promise?x.reject(TypeError("Promise-chain cycle")):(M=o(A))?M.call(A,x.resolve,x.reject):x.resolve(A))}catch(_){x.reject(_)}}function n(l){var m,x=this;if(!x.triggered){x.triggered=!0,x.def&&(x=x.def);try{(m=o(l))?r(function(){var A=new c(x);try{m.call(l,function(){n.apply(A,arguments)},function(){s.apply(A,arguments)})}catch(M){s.call(A,M)}}):(x.msg=l,x.state=1,x.chain.length>0&&r(a,x))}catch(A){s.call(new c(x),A)}}}function s(l){var m=this;m.triggered||(m.triggered=!0,m.def&&(m=m.def),m.msg=l,m.state=2,m.chain.length>0&&r(a,m))}function f(l,m,x,A){for(var M=0;M<m.length;M++)(function(w){l.resolve(m[w]).then(function(u){x(w,u)},A)})(M)}function c(l){this.def=l,this.triggered=!1}function p(l){this.promise=l,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function d(l){if(typeof l!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var m=new p(this);this.then=function(A,M){var _={success:typeof A=="function"?A:!0,failure:typeof M=="function"?M:!1};return _.promise=new this.constructor(function(g,u){if(typeof g!="function"||typeof u!="function")throw TypeError("Not a function");_.resolve=g,_.reject=u}),m.chain.push(_),m.state!==0&&r(a,m),_.promise},this.catch=function(A){return this.then(void 0,A)};try{l.call(void 0,function(A){n.call(m,A)},function(A){s.call(m,A)})}catch(x){s.call(m,x)}}var T=b({},"constructor",d,!1);return d.prototype=T,b(T,"__NPO__",0,!1),b(d,"resolve",function(m){var x=this;return m&&typeof m=="object"&&m.__NPO__===1?m:new x(function(M,_){if(typeof M!="function"||typeof _!="function")throw TypeError("Not a function");M(m)})}),b(d,"reject",function(m){return new this(function(A,M){if(typeof A!="function"||typeof M!="function")throw TypeError("Not a function");M(m)})}),b(d,"all",function(m){var x=this;return e.call(m)!="[object Array]"?x.reject(TypeError("Not an array")):m.length===0?x.resolve([]):new x(function(M,_){if(typeof M!="function"||typeof _!="function")throw TypeError("Not a function");var w=m.length,g=Array(w),u=0;f(x,m,function(y,R){g[y]=R,++u===w&&M(g)},_)})}),b(d,"race",function(m){var x=this;return e.call(m)!="[object Array]"?x.reject(TypeError("Not an array")):new x(function(M,_){if(typeof M!="function"||typeof _!="function")throw TypeError("Not a function");f(x,m,function(g,u){M(u)},_)})}),d})}}),_i=He({"node_modules/@plotly/d3/d3.js"(Y,G){(function(){var h={version:"3.8.2"},b=[].slice,S=function(de){return b.call(de)},E=self.document;function e(de){return de&&(de.ownerDocument||de.document||de).documentElement}function t(de){return de&&(de.ownerDocument&&de.ownerDocument.defaultView||de.document&&de||de.defaultView)}if(E)try{S(E.documentElement.childNodes)[0].nodeType}catch{S=function(Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=Pe[Ke];return vt}}if(Date.now||(Date.now=function(){return+new Date}),E)try{E.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,o=r.setAttribute,a=r.setAttributeNS,i=this.CSSStyleDeclaration.prototype,n=i.setProperty;r.setAttribute=function(Pe,Ke){o.call(this,Pe,Ke+"")},r.setAttributeNS=function(Pe,Ke,vt){a.call(this,Pe,Ke,vt+"")},i.setProperty=function(Pe,Ke,vt){n.call(this,Pe,Ke+"",vt)}}h.ascending=s;function s(de,Pe){return de<Pe?-1:de>Pe?1:de>=Pe?0:NaN}h.descending=function(de,Pe){return Pe<de?-1:Pe>de?1:Pe>=de?0:NaN},h.min=function(de,Pe){var Ke=-1,vt=de.length,gt,Tt;if(arguments.length===1){for(;++Ke<vt;)if((Tt=de[Ke])!=null&&Tt>=Tt){gt=Tt;break}for(;++Ke<vt;)(Tt=de[Ke])!=null&>>Tt&&(gt=Tt)}else{for(;++Ke<vt;)if((Tt=Pe.call(de,de[Ke],Ke))!=null&&Tt>=Tt){gt=Tt;break}for(;++Ke<vt;)(Tt=Pe.call(de,de[Ke],Ke))!=null&>>Tt&&(gt=Tt)}return gt},h.max=function(de,Pe){var Ke=-1,vt=de.length,gt,Tt;if(arguments.length===1){for(;++Ke<vt;)if((Tt=de[Ke])!=null&&Tt>=Tt){gt=Tt;break}for(;++Ke<vt;)(Tt=de[Ke])!=null&&Tt>gt&&(gt=Tt)}else{for(;++Ke<vt;)if((Tt=Pe.call(de,de[Ke],Ke))!=null&&Tt>=Tt){gt=Tt;break}for(;++Ke<vt;)(Tt=Pe.call(de,de[Ke],Ke))!=null&&Tt>gt&&(gt=Tt)}return gt},h.extent=function(de,Pe){var Ke=-1,vt=de.length,gt,Tt,qt;if(arguments.length===1){for(;++Ke<vt;)if((Tt=de[Ke])!=null&&Tt>=Tt){gt=qt=Tt;break}for(;++Ke<vt;)(Tt=de[Ke])!=null&&(gt>Tt&&(gt=Tt),qt<Tt&&(qt=Tt))}else{for(;++Ke<vt;)if((Tt=Pe.call(de,de[Ke],Ke))!=null&&Tt>=Tt){gt=qt=Tt;break}for(;++Ke<vt;)(Tt=Pe.call(de,de[Ke],Ke))!=null&&(gt>Tt&&(gt=Tt),qt<Tt&&(qt=Tt))}return[gt,qt]};function f(de){return de===null?NaN:+de}function c(de){return!isNaN(de)}h.sum=function(de,Pe){var Ke=0,vt=de.length,gt,Tt=-1;if(arguments.length===1)for(;++Tt<vt;)c(gt=+de[Tt])&&(Ke+=gt);else for(;++Tt<vt;)c(gt=+Pe.call(de,de[Tt],Tt))&&(Ke+=gt);return Ke},h.mean=function(de,Pe){var Ke=0,vt=de.length,gt,Tt=-1,qt=vt;if(arguments.length===1)for(;++Tt<vt;)c(gt=f(de[Tt]))?Ke+=gt:--qt;else for(;++Tt<vt;)c(gt=f(Pe.call(de,de[Tt],Tt)))?Ke+=gt:--qt;if(qt)return Ke/qt},h.quantile=function(de,Pe){var Ke=(de.length-1)*Pe+1,vt=Math.floor(Ke),gt=+de[vt-1],Tt=Ke-vt;return Tt?gt+Tt*(de[vt]-gt):gt},h.median=function(de,Pe){var Ke=[],vt=de.length,gt,Tt=-1;if(arguments.length===1)for(;++Tt<vt;)c(gt=f(de[Tt]))&&Ke.push(gt);else for(;++Tt<vt;)c(gt=f(Pe.call(de,de[Tt],Tt)))&&Ke.push(gt);if(Ke.length)return h.quantile(Ke.sort(s),.5)},h.variance=function(de,Pe){var Ke=de.length,vt=0,gt,Tt,qt=0,Vt=-1,or=0;if(arguments.length===1)for(;++Vt<Ke;)c(gt=f(de[Vt]))&&(Tt=gt-vt,vt+=Tt/++or,qt+=Tt*(gt-vt));else for(;++Vt<Ke;)c(gt=f(Pe.call(de,de[Vt],Vt)))&&(Tt=gt-vt,vt+=Tt/++or,qt+=Tt*(gt-vt));if(or>1)return qt/(or-1)},h.deviation=function(){var de=h.variance.apply(this,arguments);return de&&Math.sqrt(de)};function p(de){return{left:function(Pe,Ke,vt,gt){for(arguments.length<3&&(vt=0),arguments.length<4&&(gt=Pe.length);vt<gt;){var Tt=vt+gt>>>1;de(Pe[Tt],Ke)<0?vt=Tt+1:gt=Tt}return vt},right:function(Pe,Ke,vt,gt){for(arguments.length<3&&(vt=0),arguments.length<4&&(gt=Pe.length);vt<gt;){var Tt=vt+gt>>>1;de(Pe[Tt],Ke)>0?gt=Tt:vt=Tt+1}return vt}}}var d=p(s);h.bisectLeft=d.left,h.bisect=h.bisectRight=d.right,h.bisector=function(de){return p(de.length===1?function(Pe,Ke){return s(de(Pe),Ke)}:de)},h.shuffle=function(de,Pe,Ke){(vt=arguments.length)<3&&(Ke=de.length,vt<2&&(Pe=0));for(var vt=Ke-Pe,gt,Tt;vt;)Tt=Math.random()*vt--|0,gt=de[vt+Pe],de[vt+Pe]=de[Tt+Pe],de[Tt+Pe]=gt;return de},h.permute=function(de,Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=de[Pe[Ke]];return vt},h.pairs=function(de){for(var Pe=0,Ke=de.length-1,vt=de[0],gt=new Array(Ke<0?0:Ke);Pe<Ke;)gt[Pe]=[vt,vt=de[++Pe]];return gt},h.transpose=function(de){if(!(Tt=de.length))return[];for(var Pe=-1,Ke=h.min(de,T),vt=new Array(Ke);++Pe<Ke;)for(var gt=-1,Tt,qt=vt[Pe]=new Array(Tt);++gt<Tt;)qt[gt]=de[gt][Pe];return vt};function T(de){return de.length}h.zip=function(){return h.transpose(arguments)},h.keys=function(de){var Pe=[];for(var Ke in de)Pe.push(Ke);return Pe},h.values=function(de){var Pe=[];for(var Ke in de)Pe.push(de[Ke]);return Pe},h.entries=function(de){var Pe=[];for(var Ke in de)Pe.push({key:Ke,value:de[Ke]});return Pe},h.merge=function(de){for(var Pe=de.length,Ke,vt=-1,gt=0,Tt,qt;++vt<Pe;)gt+=de[vt].length;for(Tt=new Array(gt);--Pe>=0;)for(qt=de[Pe],Ke=qt.length;--Ke>=0;)Tt[--gt]=qt[Ke];return Tt};var l=Math.abs;h.range=function(de,Pe,Ke){if(arguments.length<3&&(Ke=1,arguments.length<2&&(Pe=de,de=0)),(Pe-de)/Ke===1/0)throw new Error("infinite range");var vt=[],gt=m(l(Ke)),Tt=-1,qt;if(de*=gt,Pe*=gt,Ke*=gt,Ke<0)for(;(qt=de+Ke*++Tt)>Pe;)vt.push(qt/gt);else for(;(qt=de+Ke*++Tt)<Pe;)vt.push(qt/gt);return vt};function m(de){for(var Pe=1;de*Pe%1;)Pe*=10;return Pe}function x(de,Pe){for(var Ke in Pe)Object.defineProperty(de.prototype,Ke,{value:Pe[Ke],enumerable:!1})}h.map=function(de,Pe){var Ke=new A;if(de instanceof A)de.forEach(function(Vt,or){Ke.set(Vt,or)});else if(Array.isArray(de)){var vt=-1,gt=de.length,Tt;if(arguments.length===1)for(;++vt<gt;)Ke.set(vt,de[vt]);else for(;++vt<gt;)Ke.set(Pe.call(de,Tt=de[vt],vt),Tt)}else for(var qt in de)Ke.set(qt,de[qt]);return Ke};function A(){this._=Object.create(null)}var M="__proto__",_="\0";x(A,{has:u,get:function(de){return this._[w(de)]},set:function(de,Pe){return this._[w(de)]=Pe},remove:v,keys:y,values:function(){var de=[];for(var Pe in this._)de.push(this._[Pe]);return de},entries:function(){var de=[];for(var Pe in this._)de.push({key:g(Pe),value:this._[Pe]});return de},size:R,empty:L,forEach:function(de){for(var Pe in this._)de.call(this,g(Pe),this._[Pe])}});function w(de){return(de+="")===M||de[0]===_?_+de:de}function g(de){return(de+="")[0]===_?de.slice(1):de}function u(de){return w(de)in this._}function v(de){return(de=w(de))in this._&&delete this._[de]}function y(){var de=[];for(var Pe in this._)de.push(g(Pe));return de}function R(){var de=0;for(var Pe in this._)++de;return de}function L(){for(var de in this._)return!1;return!0}h.nest=function(){var de={},Pe=[],Ke=[],vt,gt;function Tt(Vt,or,Ir){if(Ir>=Pe.length)return gt?gt.call(de,or):vt?or.sort(vt):or;for(var Lr=-1,Zr=or.length,ia=Pe[Ir++],la,nn,da,La=new A,Oa;++Lr<Zr;)(Oa=La.get(la=ia(nn=or[Lr])))?Oa.push(nn):La.set(la,[nn]);return Vt?(nn=Vt(),da=function(Qa,sn){nn.set(Qa,Tt(Vt,sn,Ir))}):(nn={},da=function(Qa,sn){nn[Qa]=Tt(Vt,sn,Ir)}),La.forEach(da),nn}function qt(Vt,or){if(or>=Pe.length)return Vt;var Ir=[],Lr=Ke[or++];return Vt.forEach(function(Zr,ia){Ir.push({key:Zr,values:qt(ia,or)})}),Lr?Ir.sort(function(Zr,ia){return Lr(Zr.key,ia.key)}):Ir}return de.map=function(Vt,or){return Tt(or,Vt,0)},de.entries=function(Vt){return qt(Tt(h.map,Vt,0),0)},de.key=function(Vt){return Pe.push(Vt),de},de.sortKeys=function(Vt){return Ke[Pe.length-1]=Vt,de},de.sortValues=function(Vt){return vt=Vt,de},de.rollup=function(Vt){return gt=Vt,de},de},h.set=function(de){var Pe=new z;if(de)for(var Ke=0,vt=de.length;Ke<vt;++Ke)Pe.add(de[Ke]);return Pe};function z(){this._=Object.create(null)}x(z,{has:u,add:function(de){return this._[w(de+="")]=!0,de},remove:v,values:y,size:R,empty:L,forEach:function(de){for(var Pe in this._)de.call(this,g(Pe))}}),h.behavior={};function F(de){return de}h.rebind=function(de,Pe){for(var Ke=1,vt=arguments.length,gt;++Ke<vt;)de[gt=arguments[Ke]]=B(de,Pe,Pe[gt]);return de};function B(de,Pe,Ke){return function(){var vt=Ke.apply(Pe,arguments);return vt===Pe?de:vt}}function O(de,Pe){if(Pe in de)return Pe;Pe=Pe.charAt(0).toUpperCase()+Pe.slice(1);for(var Ke=0,vt=I.length;Ke<vt;++Ke){var gt=I[Ke]+Pe;if(gt in de)return gt}}var I=["webkit","ms","moz","Moz","o","O"];function N(){}h.dispatch=function(){for(var de=new U,Pe=-1,Ke=arguments.length;++Pe<Ke;)de[arguments[Pe]]=X(de);return de};function U(){}U.prototype.on=function(de,Pe){var Ke=de.indexOf("."),vt="";if(Ke>=0&&(vt=de.slice(Ke+1),de=de.slice(0,Ke)),de)return arguments.length<2?this[de].on(vt):this[de].on(vt,Pe);if(arguments.length===2){if(Pe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(vt,null);return this}};function X(de){var Pe=[],Ke=new A;function vt(){for(var gt=Pe,Tt=-1,qt=gt.length,Vt;++Tt<qt;)(Vt=gt[Tt].on)&&Vt.apply(this,arguments);return de}return vt.on=function(gt,Tt){var qt=Ke.get(gt),Vt;return arguments.length<2?qt&&qt.on:(qt&&(qt.on=null,Pe=Pe.slice(0,Vt=Pe.indexOf(qt)).concat(Pe.slice(Vt+1)),Ke.remove(gt)),Tt&&Pe.push(Ke.set(gt,{on:Tt})),de)},vt}h.event=null;function ee(){h.event.preventDefault()}function ue(){for(var de=h.event,Pe;Pe=de.sourceEvent;)de=Pe;return de}function oe(de){for(var Pe=new U,Ke=0,vt=arguments.length;++Ke<vt;)Pe[arguments[Ke]]=X(Pe);return Pe.of=function(gt,Tt){return function(qt){try{var Vt=qt.sourceEvent=h.event;qt.target=de,h.event=qt,Pe[qt.type].apply(gt,Tt)}finally{h.event=Vt}}},Pe}h.requote=function(de){return de.replace(le,"\\$&")};var le=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(de,Pe){de.__proto__=Pe}:function(de,Pe){for(var Ke in Pe)de[Ke]=Pe[Ke]};function J(de){return V(de,Q),de}var te=function(de,Pe){return Pe.querySelector(de)},Z=function(de,Pe){return Pe.querySelectorAll(de)},se=function(de,Pe){var Ke=de.matches||de[O(de,"matchesSelector")];return se=function(vt,gt){return Ke.call(vt,gt)},se(de,Pe)};typeof Sizzle=="function"&&(te=function(de,Pe){return Sizzle(de,Pe)[0]||null},Z=Sizzle,se=Sizzle.matchesSelector),h.selection=function(){return h.select(E.documentElement)};var Q=h.selection.prototype=[];Q.select=function(de){var Pe=[],Ke,vt,gt,Tt;de=q(de);for(var qt=-1,Vt=this.length;++qt<Vt;){Pe.push(Ke=[]),Ke.parentNode=(gt=this[qt]).parentNode;for(var or=-1,Ir=gt.length;++or<Ir;)(Tt=gt[or])?(Ke.push(vt=de.call(Tt,Tt.__data__,or,qt)),vt&&"__data__"in Tt&&(vt.__data__=Tt.__data__)):Ke.push(null)}return J(Pe)};function q(de){return typeof de=="function"?de:function(){return te(de,this)}}Q.selectAll=function(de){var Pe=[],Ke,vt;de=re(de);for(var gt=-1,Tt=this.length;++gt<Tt;)for(var qt=this[gt],Vt=-1,or=qt.length;++Vt<or;)(vt=qt[Vt])&&(Pe.push(Ke=S(de.call(vt,vt.__data__,Vt,gt))),Ke.parentNode=vt);return J(Pe)};function re(de){return typeof de=="function"?de:function(){return Z(de,this)}}var ae="http://www.w3.org/1999/xhtml",fe={svg:"http://www.w3.org/2000/svg",xhtml:ae,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};h.ns={prefix:fe,qualify:function(de){var Pe=de.indexOf(":"),Ke=de;return Pe>=0&&(Ke=de.slice(0,Pe))!=="xmlns"&&(de=de.slice(Pe+1)),fe.hasOwnProperty(Ke)?{space:fe[Ke],local:de}:de}},Q.attr=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node();return de=h.ns.qualify(de),de.local?Ke.getAttributeNS(de.space,de.local):Ke.getAttribute(de)}for(Pe in de)this.each(be(Pe,de[Pe]));return this}return this.each(be(de,Pe))};function be(de,Pe){de=h.ns.qualify(de);function Ke(){this.removeAttribute(de)}function vt(){this.removeAttributeNS(de.space,de.local)}function gt(){this.setAttribute(de,Pe)}function Tt(){this.setAttributeNS(de.space,de.local,Pe)}function qt(){var or=Pe.apply(this,arguments);or==null?this.removeAttribute(de):this.setAttribute(de,or)}function Vt(){var or=Pe.apply(this,arguments);or==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,or)}return Pe==null?de.local?vt:Ke:typeof Pe=="function"?de.local?Vt:qt:de.local?Tt:gt}function Me(de){return de.trim().replace(/\s+/g," ")}Q.classed=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node(),vt=(de=Le(de)).length,gt=-1;if(Pe=Ke.classList){for(;++gt<vt;)if(!Pe.contains(de[gt]))return!1}else for(Pe=Ke.getAttribute("class");++gt<vt;)if(!Ie(de[gt]).test(Pe))return!1;return!0}for(Pe in de)this.each(je(Pe,de[Pe]));return this}return this.each(je(de,Pe))};function Ie(de){return new RegExp("(?:^|\\s+)"+h.requote(de)+"(?:\\s+|$)","g")}function Le(de){return(de+"").trim().split(/^|\s+/)}function je(de,Pe){de=Le(de).map(et);var Ke=de.length;function vt(){for(var Tt=-1;++Tt<Ke;)de[Tt](this,Pe)}function gt(){for(var Tt=-1,qt=Pe.apply(this,arguments);++Tt<Ke;)de[Tt](this,qt)}return typeof Pe=="function"?gt:vt}function et(de){var Pe=Ie(de);return function(Ke,vt){if(gt=Ke.classList)return vt?gt.add(de):gt.remove(de);var gt=Ke.getAttribute("class")||"";vt?(Pe.lastIndex=0,Pe.test(gt)||Ke.setAttribute("class",Me(gt+" "+de))):Ke.setAttribute("class",Me(gt.replace(Pe," ")))}}Q.style=function(de,Pe,Ke){var vt=arguments.length;if(vt<3){if(typeof de!="string"){vt<2&&(Pe="");for(Ke in de)this.each(rt(Ke,de[Ke],Pe));return this}if(vt<2){var gt=this.node();return t(gt).getComputedStyle(gt,null).getPropertyValue(de)}Ke=""}return this.each(rt(de,Pe,Ke))};function rt(de,Pe,Ke){function vt(){this.style.removeProperty(de)}function gt(){this.style.setProperty(de,Pe,Ke)}function Tt(){var qt=Pe.apply(this,arguments);qt==null?this.style.removeProperty(de):this.style.setProperty(de,qt,Ke)}return Pe==null?vt:typeof Pe=="function"?Tt:gt}Q.property=function(de,Pe){if(arguments.length<2){if(typeof de=="string")return this.node()[de];for(Pe in de)this.each(Je(Pe,de[Pe]));return this}return this.each(Je(de,Pe))};function Je(de,Pe){function Ke(){delete this[de]}function vt(){this[de]=Pe}function gt(){var Tt=Pe.apply(this,arguments);Tt==null?delete this[de]:this[de]=Tt}return Pe==null?Ke:typeof Pe=="function"?gt:vt}Q.text=function(de){return arguments.length?this.each(typeof de=="function"?function(){var Pe=de.apply(this,arguments);this.textContent=Pe??""}:de==null?function(){this.textContent=""}:function(){this.textContent=de}):this.node().textContent},Q.html=function(de){return arguments.length?this.each(typeof de=="function"?function(){var Pe=de.apply(this,arguments);this.innerHTML=Pe??""}:de==null?function(){this.innerHTML=""}:function(){this.innerHTML=de}):this.node().innerHTML},Q.append=function(de){return de=Ze(de),this.select(function(){return this.appendChild(de.apply(this,arguments))})};function Ze(de){function Pe(){var vt=this.ownerDocument,gt=this.namespaceURI;return gt===ae&&vt.documentElement.namespaceURI===ae?vt.createElement(de):vt.createElementNS(gt,de)}function Ke(){return this.ownerDocument.createElementNS(de.space,de.local)}return typeof de=="function"?de:(de=h.ns.qualify(de)).local?Ke:Pe}Q.insert=function(de,Pe){return de=Ze(de),Pe=q(Pe),this.select(function(){return this.insertBefore(de.apply(this,arguments),Pe.apply(this,arguments)||null)})},Q.remove=function(){return this.each(Ee)};function Ee(){var de=this.parentNode;de&&de.removeChild(this)}Q.data=function(de,Pe){var Ke=-1,vt=this.length,gt,Tt;if(!arguments.length){for(de=new Array(vt=(gt=this[0]).length);++Ke<vt;)(Tt=gt[Ke])&&(de[Ke]=Tt.__data__);return de}function qt(Lr,Zr){var ia,la=Lr.length,nn=Zr.length,da=Math.min(la,nn),La=new Array(nn),Oa=new Array(nn),Qa=new Array(la),sn,Fa;if(Pe){var Pn=new A,si=new Array(la),$n;for(ia=-1;++ia<la;)(sn=Lr[ia])&&(Pn.has($n=Pe.call(sn,sn.__data__,ia))?Qa[ia]=sn:Pn.set($n,sn),si[ia]=$n);for(ia=-1;++ia<nn;)(sn=Pn.get($n=Pe.call(Zr,Fa=Zr[ia],ia)))?sn!==!0&&(La[ia]=sn,sn.__data__=Fa):Oa[ia]=xe(Fa),Pn.set($n,!0);for(ia=-1;++ia<la;)ia in si&&Pn.get(si[ia])!==!0&&(Qa[ia]=Lr[ia])}else{for(ia=-1;++ia<da;)sn=Lr[ia],Fa=Zr[ia],sn?(sn.__data__=Fa,La[ia]=sn):Oa[ia]=xe(Fa);for(;ia<nn;++ia)Oa[ia]=xe(Zr[ia]);for(;ia<la;++ia)Qa[ia]=Lr[ia]}Oa.update=La,Oa.parentNode=La.parentNode=Qa.parentNode=Lr.parentNode,Vt.push(Oa),or.push(La),Ir.push(Qa)}var Vt=nt([]),or=J([]),Ir=J([]);if(typeof de=="function")for(;++Ke<vt;)qt(gt=this[Ke],de.call(gt,gt.parentNode.__data__,Ke));else for(;++Ke<vt;)qt(gt=this[Ke],de);return or.enter=function(){return Vt},or.exit=function(){return Ir},or};function xe(de){return{__data__:de}}Q.datum=function(de){return arguments.length?this.property("__data__",de):this.property("__data__")},Q.filter=function(de){var Pe=[],Ke,vt,gt;typeof de!="function"&&(de=he(de));for(var Tt=0,qt=this.length;Tt<qt;Tt++){Pe.push(Ke=[]),Ke.parentNode=(vt=this[Tt]).parentNode;for(var Vt=0,or=vt.length;Vt<or;Vt++)(gt=vt[Vt])&&de.call(gt,gt.__data__,Vt,Tt)&&Ke.push(gt)}return J(Pe)};function he(de){return function(){return se(this,de)}}Q.order=function(){for(var de=-1,Pe=this.length;++de<Pe;)for(var Ke=this[de],vt=Ke.length-1,gt=Ke[vt],Tt;--vt>=0;)(Tt=Ke[vt])&&(gt&>!==Tt.nextSibling&>.parentNode.insertBefore(Tt,gt),gt=Tt);return this},Q.sort=function(de){de=De.apply(this,arguments);for(var Pe=-1,Ke=this.length;++Pe<Ke;)this[Pe].sort(de);return this.order()};function De(de){return arguments.length||(de=s),function(Pe,Ke){return Pe&&Ke?de(Pe.__data__,Ke.__data__):!Pe-!Ke}}Q.each=function(de){return tt(this,function(Pe,Ke,vt){de.call(Pe,Pe.__data__,Ke,vt)})};function tt(de,Pe){for(var Ke=0,vt=de.length;Ke<vt;Ke++)for(var gt=de[Ke],Tt=0,qt=gt.length,Vt;Tt<qt;Tt++)(Vt=gt[Tt])&&Pe(Vt,Tt,Ke);return de}Q.call=function(de){var Pe=S(arguments);return de.apply(Pe[0]=this,Pe),this},Q.empty=function(){return!this.node()},Q.node=function(){for(var de=0,Pe=this.length;de<Pe;de++)for(var Ke=this[de],vt=0,gt=Ke.length;vt<gt;vt++){var Tt=Ke[vt];if(Tt)return Tt}return null},Q.size=function(){var de=0;return tt(this,function(){++de}),de};function nt(de){return V(de,$e),de}var $e=[];h.selection.enter=nt,h.selection.enter.prototype=$e,$e.append=Q.append,$e.empty=Q.empty,$e.node=Q.node,$e.call=Q.call,$e.size=Q.size,$e.select=function(de){for(var Pe=[],Ke,vt,gt,Tt,qt,Vt=-1,or=this.length;++Vt<or;){gt=(Tt=this[Vt]).update,Pe.push(Ke=[]),Ke.parentNode=Tt.parentNode;for(var Ir=-1,Lr=Tt.length;++Ir<Lr;)(qt=Tt[Ir])?(Ke.push(gt[Ir]=vt=de.call(Tt.parentNode,qt.__data__,Ir,Vt)),vt.__data__=qt.__data__):Ke.push(null)}return J(Pe)},$e.insert=function(de,Pe){return arguments.length<2&&(Pe=Et(this)),Q.insert.call(this,de,Pe)};function Et(de){var Pe,Ke;return function(vt,gt,Tt){var qt=de[Tt].update,Vt=qt.length,or;for(Tt!=Ke&&(Ke=Tt,Pe=0),gt>=Pe&&(Pe=gt+1);!(or=qt[Pe])&&++Pe<Vt;);return or}}h.select=function(de){var Pe;return typeof de=="string"?(Pe=[te(de,E)],Pe.parentNode=E.documentElement):(Pe=[de],Pe.parentNode=e(de)),J([Pe])},h.selectAll=function(de){var Pe;return typeof de=="string"?(Pe=S(Z(de,E)),Pe.parentNode=E.documentElement):(Pe=S(de),Pe.parentNode=null),J([Pe])},Q.on=function(de,Pe,Ke){var vt=arguments.length;if(vt<3){if(typeof de!="string"){vt<2&&(Pe=!1);for(Ke in de)this.each(Ct(Ke,de[Ke],Pe));return this}if(vt<2)return(vt=this.node()["__on"+de])&&vt._;Ke=!1}return this.each(Ct(de,Pe,Ke))};function Ct(de,Pe,Ke){var vt="__on"+de,gt=de.indexOf("."),Tt=Wt;gt>0&&(de=de.slice(0,gt));var qt=jt.get(de);qt&&(de=qt,Tt=dr);function Vt(){var Lr=this[vt];Lr&&(this.removeEventListener(de,Lr,Lr.$),delete this[vt])}function or(){var Lr=Tt(Pe,S(arguments));Vt.call(this),this.addEventListener(de,this[vt]=Lr,Lr.$=Ke),Lr._=Pe}function Ir(){var Lr=new RegExp("^__on([^.]+)"+h.requote(de)+"$"),Zr;for(var ia in this)if(Zr=ia.match(Lr)){var la=this[ia];this.removeEventListener(Zr[1],la,la.$),delete this[ia]}}return gt?Pe?or:Vt:Pe?N:Ir}var jt=h.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&jt.forEach(function(de){"on"+de in E&&jt.remove(de)});function Wt(de,Pe){return function(Ke){var vt=h.event;h.event=Ke,Pe[0]=this.__data__;try{de.apply(this,Pe)}finally{h.event=vt}}}function dr(de,Pe){var Ke=Wt(de,Pe);return function(vt){var gt=this,Tt=vt.relatedTarget;(!Tt||Tt!==gt&&!(Tt.compareDocumentPosition(gt)&8))&&Ke.call(gt,vt)}}var vr,Dr=0;function hr(de){var Pe=".dragsuppress-"+ ++Dr,Ke="click"+Pe,vt=h.select(t(de)).on("touchmove"+Pe,ee).on("dragstart"+Pe,ee).on("selectstart"+Pe,ee);if(vr==null&&(vr="onselectstart"in de?!1:O(de.style,"userSelect")),vr){var gt=e(de).style,Tt=gt[vr];gt[vr]="none"}return function(qt){if(vt.on(Pe,null),vr&&(gt[vr]=Tt),qt){var Vt=function(){vt.on(Ke,null)};vt.on(Ke,function(){ee(),Vt()},!0),setTimeout(Vt,0)}}}h.mouse=function(de){return mt(de,ue())};var Ar=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function mt(de,Pe){Pe.changedTouches&&(Pe=Pe.changedTouches[0]);var Ke=de.ownerSVGElement||de;if(Ke.createSVGPoint){var vt=Ke.createSVGPoint();if(Ar<0){var gt=t(de);if(gt.scrollX||gt.scrollY){Ke=h.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=Ke[0][0].getScreenCTM();Ar=!(Tt.f||Tt.e),Ke.remove()}}return Ar?(vt.x=Pe.pageX,vt.y=Pe.pageY):(vt.x=Pe.clientX,vt.y=Pe.clientY),vt=vt.matrixTransform(de.getScreenCTM().inverse()),[vt.x,vt.y]}var qt=de.getBoundingClientRect();return[Pe.clientX-qt.left-de.clientLeft,Pe.clientY-qt.top-de.clientTop]}h.touch=function(de,Pe,Ke){if(arguments.length<3&&(Ke=Pe,Pe=ue().changedTouches),Pe){for(var vt=0,gt=Pe.length,Tt;vt<gt;++vt)if((Tt=Pe[vt]).identifier===Ke)return mt(de,Tt)}},h.behavior.drag=function(){var de=oe(gt,"drag","dragstart","dragend"),Pe=null,Ke=Tt(N,h.mouse,t,"mousemove","mouseup"),vt=Tt(Fe,h.touch,F,"touchmove","touchend");function gt(){this.on("mousedown.drag",Ke).on("touchstart.drag",vt)}function Tt(qt,Vt,or,Ir,Lr){return function(){var Zr=this,ia=h.event.target.correspondingElement||h.event.target,la=Zr.parentNode,nn=de.of(Zr,arguments),da=0,La=qt(),Oa=".drag"+(La==null?"":"-"+La),Qa,sn=h.select(or(ia)).on(Ir+Oa,si).on(Lr+Oa,$n),Fa=hr(ia),Pn=Vt(la,La);Pe?(Qa=Pe.apply(Zr,arguments),Qa=[Qa.x-Pn[0],Qa.y-Pn[1]]):Qa=[0,0],nn({type:"dragstart"});function si(){var ni=Vt(la,La),Ai,Ci;ni&&(Ai=ni[0]-Pn[0],Ci=ni[1]-Pn[1],da|=Ai|Ci,Pn=ni,nn({type:"drag",x:ni[0]+Qa[0],y:ni[1]+Qa[1],dx:Ai,dy:Ci}))}function $n(){Vt(la,La)&&(sn.on(Ir+Oa,null).on(Lr+Oa,null),Fa(da),nn({type:"dragend"}))}}}return gt.origin=function(qt){return arguments.length?(Pe=qt,gt):Pe},h.rebind(gt,de,"on")};function Fe(){return h.event.changedTouches[0].identifier}h.touches=function(de,Pe){return arguments.length<2&&(Pe=ue().touches),Pe?S(Pe).map(function(Ke){var vt=mt(de,Ke);return vt.identifier=Ke.identifier,vt}):[]};var We=1e-6,Ae=We*We,me=Math.PI,pe=2*me,Te=pe-We,Ue=me/2,Xe=me/180,bt=180/me;function xt(de,Pe,Ke){return(Pe[0]-de[0])*(Ke[1]-de[1])-(Pe[1]-de[1])*(Ke[0]-de[0])}function Mt(de){return de>1?Ue:de<-1?-Ue:Math.asin(de)}function Nt(de){return((de=Math.exp(de))-1/de)/2}function sr(de){return((de=Math.exp(de))+1/de)/2}function ar(de){return((de=Math.exp(2*de))-1)/(de+1)}var tr=Math.SQRT2,Tr=2,sa=4;h.interpolateZoom=function(de,Pe){var Ke=de[0],vt=de[1],gt=de[2],Tt=Pe[0],qt=Pe[1],Vt=Pe[2],or=Tt-Ke,Ir=qt-vt,Lr=or*or+Ir*Ir,Zr,ia;if(Lr<Ae)ia=Math.log(Vt/gt)/tr,Zr=function(Qa){return[Ke+Qa*or,vt+Qa*Ir,gt*Math.exp(tr*Qa*ia)]};else{var la=Math.sqrt(Lr),nn=(Vt*Vt-gt*gt+sa*Lr)/(2*gt*Tr*la),da=(Vt*Vt-gt*gt-sa*Lr)/(2*Vt*Tr*la),La=Math.log(Math.sqrt(nn*nn+1)-nn),Oa=Math.log(Math.sqrt(da*da+1)-da);ia=(Oa-La)/tr,Zr=function(Qa){var sn=Qa*ia,Fa=sr(La),Pn=gt/(Tr*la)*(Fa*ar(tr*sn+La)-Nt(La));return[Ke+Pn*or,vt+Pn*Ir,gt*Fa/sr(tr*sn+La)]}}return Zr.duration=ia*1e3,Zr},h.behavior.zoom=function(){var de={x:0,y:0,k:1},Pe,Ke,vt,gt=[960,500],Tt=Ea,qt=250,Vt=0,or="mousedown.zoom",Ir="mousemove.zoom",Lr="mouseup.zoom",Zr,ia="touchstart.zoom",la,nn=oe(sn,"zoomstart","zoom","zoomend"),da,La,Oa,Qa;Ia||(Ia="onwheel"in E?(ba=function(){return-h.event.deltaY*(h.event.deltaMode?120:1)},"wheel"):"onmousewheel"in E?(ba=function(){return h.event.wheelDelta},"mousewheel"):(ba=function(){return-h.event.detail},"MozMousePixelScroll"));function sn(gi){gi.on(or,uo).on(Ia+".zoom",wl).on("dblclick.zoom",Ks).on(ia,ts)}sn.event=function(gi){gi.each(function(){var Lo=nn.of(this,arguments),Ko=de;Mi?h.select(this).transition().each("start.zoom",function(){de=this.__chart__||{x:0,y:0,k:1},Ci(Lo)}).tween("zoom:zoom",function(){var Ws=gt[0],Ps=gt[1],ru=Ke?Ke[0]:Ws/2,bs=Ke?Ke[1]:Ps/2,Xs=h.interpolateZoom([(ru-de.x)/de.k,(bs-de.y)/de.k,Ws/de.k],[(ru-Ko.x)/Ko.k,(bs-Ko.y)/Ko.k,Ws/Ko.k]);return function(Tu){var _l=Xs(Tu),st=Ws/_l[2];this.__chart__=de={x:ru-_l[0]*st,y:bs-_l[1]*st,k:st},Xo(Lo)}}).each("interrupt.zoom",function(){Ii(Lo)}).each("end.zoom",function(){Ii(Lo)}):(this.__chart__=de,Ci(Lo),Xo(Lo),Ii(Lo))})},sn.translate=function(gi){return arguments.length?(de={x:+gi[0],y:+gi[1],k:de.k},Ai(),sn):[de.x,de.y]},sn.scale=function(gi){return arguments.length?(de={x:de.x,y:de.y,k:null},si(+gi),Ai(),sn):de.k},sn.scaleExtent=function(gi){return arguments.length?(Tt=gi==null?Ea:[+gi[0],+gi[1]],sn):Tt},sn.center=function(gi){return arguments.length?(vt=gi&&[+gi[0],+gi[1]],sn):vt},sn.size=function(gi){return arguments.length?(gt=gi&&[+gi[0],+gi[1]],sn):gt},sn.duration=function(gi){return arguments.length?(qt=+gi,sn):qt},sn.x=function(gi){return arguments.length?(La=gi,da=gi.copy(),de={x:0,y:0,k:1},sn):La},sn.y=function(gi){return arguments.length?(Qa=gi,Oa=gi.copy(),de={x:0,y:0,k:1},sn):Qa};function Fa(gi){return[(gi[0]-de.x)/de.k,(gi[1]-de.y)/de.k]}function Pn(gi){return[gi[0]*de.k+de.x,gi[1]*de.k+de.y]}function si(gi){de.k=Math.max(Tt[0],Math.min(Tt[1],gi))}function $n(gi,Lo){Lo=Pn(Lo),de.x+=gi[0]-Lo[0],de.y+=gi[1]-Lo[1]}function ni(gi,Lo,Ko,Ws){gi.__chart__={x:de.x,y:de.y,k:de.k},si(Math.pow(2,Ws)),$n(Ke=Lo,Ko),gi=h.select(gi),qt>0&&(gi=gi.transition().duration(qt)),gi.call(sn.event)}function Ai(){La&&La.domain(da.range().map(function(gi){return(gi-de.x)/de.k}).map(da.invert)),Qa&&Qa.domain(Oa.range().map(function(gi){return(gi-de.y)/de.k}).map(Oa.invert))}function Ci(gi){Vt++||gi({type:"zoomstart"})}function Xo(gi){Ai(),gi({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function Ii(gi){--Vt||(gi({type:"zoomend"}),Ke=null)}function uo(){var gi=this,Lo=nn.of(gi,arguments),Ko=0,Ws=h.select(t(gi)).on(Ir,bs).on(Lr,Xs),Ps=Fa(h.mouse(gi)),ru=hr(gi);$a.call(gi),Ci(Lo);function bs(){Ko=1,$n(h.mouse(gi),Ps),Xo(Lo)}function Xs(){Ws.on(Ir,null).on(Lr,null),ru(Ko),Ii(Lo)}}function ts(){var gi=this,Lo=nn.of(gi,arguments),Ko={},Ws=0,Ps,ru=".zoom-"+h.event.changedTouches[0].identifier,bs="touchmove"+ru,Xs="touchend"+ru,Tu=[],_l=h.select(gi),st=hr(gi);ur(),Ci(Lo),_l.on(or,null).on(ia,ur);function ir(){var Qr=h.touches(gi);return Ps=de.k,Qr.forEach(function($r){$r.identifier in Ko&&(Ko[$r.identifier]=Fa($r))}),Qr}function ur(){var Qr=h.event.target;h.select(Qr).on(bs,ua).on(Xs,Ua),Tu.push(Qr);for(var $r=h.event.changedTouches,cn=0,ln=$r.length;cn<ln;++cn)Ko[$r[cn].identifier]=null;var un=ir(),bn=Date.now();if(un.length===1){if(bn-la<500){var ei=un[0];ni(gi,ei,Ko[ei.identifier],Math.floor(Math.log(de.k)/Math.LN2)+1),ee()}la=bn}else if(un.length>1){var ei=un[0],Vn=un[1],_n=ei[0]-Vn[0],Wa=ei[1]-Vn[1];Ws=_n*_n+Wa*Wa}}function ua(){var Qr=h.touches(gi),$r,cn,ln,un;$a.call(gi);for(var bn=0,ei=Qr.length;bn<ei;++bn,un=null)if(ln=Qr[bn],un=Ko[ln.identifier]){if(cn)break;$r=ln,cn=un}if(un){var Vn=(Vn=ln[0]-$r[0])*Vn+(Vn=ln[1]-$r[1])*Vn,_n=Ws&&Math.sqrt(Vn/Ws);$r=[($r[0]+ln[0])/2,($r[1]+ln[1])/2],cn=[(cn[0]+un[0])/2,(cn[1]+un[1])/2],si(_n*Ps)}la=null,$n($r,cn),Xo(Lo)}function Ua(){if(h.event.touches.length){for(var Qr=h.event.changedTouches,$r=0,cn=Qr.length;$r<cn;++$r)delete Ko[Qr[$r].identifier];for(var ln in Ko)return void ir()}h.selectAll(Tu).on(ru,null),_l.on(or,uo).on(ia,ts),st(),Ii(Lo)}}function wl(){var gi=nn.of(this,arguments);Zr?clearTimeout(Zr):($a.call(this),Pe=Fa(Ke=vt||h.mouse(this)),Ci(gi)),Zr=setTimeout(function(){Zr=null,Ii(gi)},50),ee(),si(Math.pow(2,ba()*.002)*de.k),$n(Ke,Pe),Xo(gi)}function Ks(){var gi=h.mouse(this),Lo=Math.log(de.k)/Math.LN2;ni(this,gi,Fa(gi),h.event.shiftKey?Math.ceil(Lo)-1:Math.floor(Lo)+1)}return h.rebind(sn,nn,"on")};var Ea=[0,1/0],ba,Ia;h.color=Ra;function Ra(){}Ra.prototype.toString=function(){return this.rgb()+""},h.hsl=ya;function ya(de,Pe,Ke){return this instanceof ya?(this.h=+de,this.s=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof ya?new ya(de.h,de.s,de.l):Sr(""+de,Er,ya):new ya(de,Pe,Ke)}var rn=ya.prototype=new Ra;rn.brighter=function(de){return de=Math.pow(.7,arguments.length?de:1),new ya(this.h,this.s,this.l/de)},rn.darker=function(de){return de=Math.pow(.7,arguments.length?de:1),new ya(this.h,this.s,de*this.l)},rn.rgb=function(){return mn(this.h,this.s,this.l)};function mn(de,Pe,Ke){var vt,gt;de=isNaN(de)?0:(de%=360)<0?de+360:de,Pe=isNaN(Pe)||Pe<0?0:Pe>1?1:Pe,Ke=Ke<0?0:Ke>1?1:Ke,gt=Ke<=.5?Ke*(1+Pe):Ke+Pe-Ke*Pe,vt=2*Ke-gt;function Tt(Vt){return Vt>360?Vt-=360:Vt<0&&(Vt+=360),Vt<60?vt+(gt-vt)*Vt/60:Vt<180?gt:Vt<240?vt+(gt-vt)*(240-Vt)/60:vt}function qt(Vt){return Math.round(Tt(Vt)*255)}return new Nn(qt(de+120),qt(de),qt(de-120))}h.hcl=Yt;function Yt(de,Pe,Ke){return this instanceof Yt?(this.h=+de,this.c=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof Yt?new Yt(de.h,de.c,de.l):de instanceof $t?Va(de.l,de.a,de.b):Va((de=_r((de=h.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Yt(de,Pe,Ke)}var It=Yt.prototype=new Ra;It.brighter=function(de){return new Yt(this.h,this.c,Math.min(100,this.l+Cr*(arguments.length?de:1)))},It.darker=function(de){return new Yt(this.h,this.c,Math.max(0,this.l-Cr*(arguments.length?de:1)))},It.rgb=function(){return Zt(this.h,this.c,this.l).rgb()};function Zt(de,Pe,Ke){return isNaN(de)&&(de=0),isNaN(Pe)&&(Pe=0),new $t(Ke,Math.cos(de*=Xe)*Pe,Math.sin(de)*Pe)}h.lab=$t;function $t(de,Pe,Ke){return this instanceof $t?(this.l=+de,this.a=+Pe,void(this.b=+Ke)):arguments.length<2?de instanceof $t?new $t(de.l,de.a,de.b):de instanceof Yt?Zt(de.h,de.c,de.l):_r((de=Nn(de)).r,de.g,de.b):new $t(de,Pe,Ke)}var Cr=18,qr=.95047,Jr=1,aa=1.08883,Ca=$t.prototype=new Ra;Ca.brighter=function(de){return new $t(Math.min(100,this.l+Cr*(arguments.length?de:1)),this.a,this.b)},Ca.darker=function(de){return new $t(Math.max(0,this.l-Cr*(arguments.length?de:1)),this.a,this.b)},Ca.rgb=function(){return Ha(this.l,this.a,this.b)};function Ha(de,Pe,Ke){var vt=(de+16)/116,gt=vt+Pe/500,Tt=vt-Ke/200;return gt=Za(gt)*qr,vt=Za(vt)*Jr,Tt=Za(Tt)*aa,new Nn(wa(3.2404542*gt-1.5371385*vt-.4985314*Tt),wa(-.969266*gt+1.8760108*vt+.041556*Tt),wa(.0556434*gt-.2040259*vt+1.0572252*Tt))}function Va(de,Pe,Ke){return de>0?new Yt(Math.atan2(Ke,Pe)*bt,Math.sqrt(Pe*Pe+Ke*Ke),de):new Yt(NaN,NaN,de)}function Za(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function an(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function wa(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}h.rgb=Nn;function Nn(de,Pe,Ke){return this instanceof Nn?(this.r=~~de,this.g=~~Pe,void(this.b=~~Ke)):arguments.length<2?de instanceof Nn?new Nn(de.r,de.g,de.b):Sr(""+de,Nn,mn):new Nn(de,Pe,Ke)}function Wn(de){return new Nn(de>>16,de>>8&255,de&255)}function At(de){return Wn(de)+""}var ft=Nn.prototype=new Ra;ft.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Pe=this.r,Ke=this.g,vt=this.b,gt=30;return!Pe&&!Ke&&!vt?new Nn(gt,gt,gt):(Pe&&Pe<gt&&(Pe=gt),Ke&&Ke<gt&&(Ke=gt),vt&&vt<gt&&(vt=gt),new Nn(Math.min(255,Pe/de),Math.min(255,Ke/de),Math.min(255,vt/de)))},ft.darker=function(de){return de=Math.pow(.7,arguments.length?de:1),new Nn(de*this.r,de*this.g,de*this.b)},ft.hsl=function(){return Er(this.r,this.g,this.b)},ft.toString=function(){return"#"+pr(this.r)+pr(this.g)+pr(this.b)};function pr(de){return de<16?"0"+Math.max(0,de).toString(16):Math.min(255,de).toString(16)}function Sr(de,Pe,Ke){var vt=0,gt=0,Tt=0,qt,Vt,or;if(qt=/([a-z]+)\((.*)\)/.exec(de=de.toLowerCase()),qt)switch(Vt=qt[2].split(","),qt[1]){case"hsl":return Ke(parseFloat(Vt[0]),parseFloat(Vt[1])/100,parseFloat(Vt[2])/100);case"rgb":return Pe(Gr(Vt[0]),Gr(Vt[1]),Gr(Vt[2]))}return(or=Fr.get(de))?Pe(or.r,or.g,or.b):(de!=null&&de.charAt(0)==="#"&&!isNaN(or=parseInt(de.slice(1),16))&&(de.length===4?(vt=(or&3840)>>4,vt=vt>>4|vt,gt=or&240,gt=gt>>4|gt,Tt=or&15,Tt=Tt<<4|Tt):de.length===7&&(vt=(or&16711680)>>16,gt=(or&65280)>>8,Tt=or&255)),Pe(vt,gt,Tt))}function Er(de,Pe,Ke){var vt=Math.min(de/=255,Pe/=255,Ke/=255),gt=Math.max(de,Pe,Ke),Tt=gt-vt,qt,Vt,or=(gt+vt)/2;return Tt?(Vt=or<.5?Tt/(gt+vt):Tt/(2-gt-vt),de==gt?qt=(Pe-Ke)/Tt+(Pe<Ke?6:0):Pe==gt?qt=(Ke-de)/Tt+2:qt=(de-Pe)/Tt+4,qt*=60):(qt=NaN,Vt=or>0&&or<1?0:qt),new ya(qt,Vt,or)}function _r(de,Pe,Ke){de=Mr(de),Pe=Mr(Pe),Ke=Mr(Ke);var vt=an((.4124564*de+.3575761*Pe+.1804375*Ke)/qr),gt=an((.2126729*de+.7151522*Pe+.072175*Ke)/Jr),Tt=an((.0193339*de+.119192*Pe+.9503041*Ke)/aa);return $t(116*gt-16,500*(vt-gt),200*(gt-Tt))}function Mr(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Gr(de){var Pe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Pe*2.55):Pe}var Fr=h.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Fr.forEach(function(de,Pe){Fr.set(de,Wn(Pe))});function pt(de){return typeof de=="function"?de:function(){return de}}h.functor=pt,h.xhr=Kt(F);function Kt(de){return function(Pe,Ke,vt){return arguments.length===2&&typeof Ke=="function"&&(vt=Ke,Ke=null),xr(Pe,Ke,de,vt)}}function xr(de,Pe,Ke,vt){var gt={},Tt=h.dispatch("beforesend","progress","load","error"),qt={},Vt=new XMLHttpRequest,or=null;self.XDomainRequest&&!("withCredentials"in Vt)&&/^(http(s)?:)?\/\//.test(de)&&(Vt=new XDomainRequest),"onload"in Vt?Vt.onload=Vt.onerror=Ir:Vt.onreadystatechange=function(){Vt.readyState>3&&Ir()};function Ir(){var Lr=Vt.status,Zr;if(!Lr&&fa(Vt)||Lr>=200&&Lr<300||Lr===304){try{Zr=Ke.call(gt,Vt)}catch(ia){Tt.error.call(gt,ia);return}Tt.load.call(gt,Zr)}else Tt.error.call(gt,Vt)}return Vt.onprogress=function(Lr){var Zr=h.event;h.event=Lr;try{Tt.progress.call(gt,Vt)}finally{h.event=Zr}},gt.header=function(Lr,Zr){return Lr=(Lr+"").toLowerCase(),arguments.length<2?qt[Lr]:(Zr==null?delete qt[Lr]:qt[Lr]=Zr+"",gt)},gt.mimeType=function(Lr){return arguments.length?(Pe=Lr==null?null:Lr+"",gt):Pe},gt.responseType=function(Lr){return arguments.length?(or=Lr,gt):or},gt.response=function(Lr){return Ke=Lr,gt},["get","post"].forEach(function(Lr){gt[Lr]=function(){return gt.send.apply(gt,[Lr].concat(S(arguments)))}}),gt.send=function(Lr,Zr,ia){if(arguments.length===2&&typeof Zr=="function"&&(ia=Zr,Zr=null),Vt.open(Lr,de,!0),Pe!=null&&!("accept"in qt)&&(qt.accept=Pe+",*/*"),Vt.setRequestHeader)for(var la in qt)Vt.setRequestHeader(la,qt[la]);return Pe!=null&&Vt.overrideMimeType&&Vt.overrideMimeType(Pe),or!=null&&(Vt.responseType=or),ia!=null&>.on("error",ia).on("load",function(nn){ia(null,nn)}),Tt.beforesend.call(gt,Vt),Vt.send(Zr??null),gt},gt.abort=function(){return Vt.abort(),gt},h.rebind(gt,Tt,"on"),vt==null?gt:gt.get(Hr(vt))}function Hr(de){return de.length===1?function(Pe,Ke){de(Pe==null?Ke:null)}:de}function fa(de){var Pe=de.responseType;return Pe&&Pe!=="text"?de.response:de.responseText}h.dsv=function(de,Pe){var Ke=new RegExp('["'+de+`
|
|
1
|
+
import{am as JD,bE as QD,ag as e7,F as t7,W as r7,aM as a7,bF as rA,bG as n7,bH as i7,bI as o7,bJ as qv,bK as yh,bL as aA,bM as s7,aR as Wf,n as K5,bN as l7,bO as Kg,r as Gv,X as nA,j as cb,l as u7,k as c7}from"./index.ayxJkxJS.js";import{w as f7,E as iA}from"./withFullScreenWrapper.DGTtbbLe.js";import{F as h7}from"./FormClearHelper.2gb34MMC.js";var lb={},ub={},$5;function v7(){return $5||($5=1,(function(en){function qi(ws){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Os){return typeof Os}:function(Os){return Os&&typeof Symbol=="function"&&Os.constructor===Symbol&&Os!==Symbol.prototype?"symbol":typeof Os},qi(ws)}Object.defineProperty(en,"__esModule",{value:!0}),en.default=Hv;var Ms=Xu(JD()),Fo=zs(QD());function zs(ws){return ws&&ws.__esModule?ws:{default:ws}}function rc(ws){if(typeof WeakMap!="function")return null;var Os=new WeakMap,ac=new WeakMap;return(rc=function(_i){return _i?ac:Os})(ws)}function Xu(ws,Os){if(ws&&ws.__esModule)return ws;if(ws===null||qi(ws)!=="object"&&typeof ws!="function")return{default:ws};var ac=rc(Os);if(ac&&ac.has(ws))return ac.get(ws);var Sc={},_i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Jo in ws)if(Jo!=="default"&&Object.prototype.hasOwnProperty.call(ws,Jo)){var Ni=_i?Object.getOwnPropertyDescriptor(ws,Jo):null;Ni&&(Ni.get||Ni.set)?Object.defineProperty(Sc,Jo,Ni):Sc[Jo]=ws[Jo]}return Sc.default=ws,ac&&ac.set(ws,Sc),Sc}function Xf(ws,Os){if(!(ws instanceof Os))throw new TypeError("Cannot call a class as a function")}function wf(ws,Os){for(var ac=0;ac<Os.length;ac++){var Sc=Os[ac];Sc.enumerable=Sc.enumerable||!1,Sc.configurable=!0,"value"in Sc&&(Sc.writable=!0),Object.defineProperty(ws,Sc.key,Sc)}}function Hc(ws,Os,ac){return Os&&wf(ws.prototype,Os),Object.defineProperty(ws,"prototype",{writable:!1}),ws}function Tf(ws,Os){if(typeof Os!="function"&&Os!==null)throw new TypeError("Super expression must either be null or a function");ws.prototype=Object.create(Os&&Os.prototype,{constructor:{value:ws,writable:!0,configurable:!0}}),Object.defineProperty(ws,"prototype",{writable:!1}),Os&&Af(ws,Os)}function Af(ws,Os){return Af=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Sc,_i){return Sc.__proto__=_i,Sc},Af(ws,Os)}function ah(ws){var Os=Wc();return function(){var Sc=Kh(ws),_i;if(Os){var Jo=Kh(this).constructor;_i=Reflect.construct(Sc,arguments,Jo)}else _i=Sc.apply(this,arguments);return js(this,_i)}}function js(ws,Os){if(Os&&(qi(Os)==="object"||typeof Os=="function"))return Os;if(Os!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fl(ws)}function fl(ws){if(ws===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ws}function Wc(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kh(ws){return Kh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ac){return ac.__proto__||Object.getPrototypeOf(ac)},Kh(ws)}var Fs=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],He=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],uv=typeof window<"u";function Hv(ws){var Os=(function(ac){Tf(_i,ac);var Sc=ah(_i);function _i(Jo){var Ni;return Xf(this,_i),Ni=Sc.call(this,Jo),Ni.p=Promise.resolve(),Ni.resizeHandler=null,Ni.handlers={},Ni.syncWindowResize=Ni.syncWindowResize.bind(fl(Ni)),Ni.syncEventHandlers=Ni.syncEventHandlers.bind(fl(Ni)),Ni.attachUpdateEvents=Ni.attachUpdateEvents.bind(fl(Ni)),Ni.getRef=Ni.getRef.bind(fl(Ni)),Ni.handleUpdate=Ni.handleUpdate.bind(fl(Ni)),Ni.figureCallback=Ni.figureCallback.bind(fl(Ni)),Ni.updatePlotly=Ni.updatePlotly.bind(fl(Ni)),Ni}return Hc(_i,[{key:"updatePlotly",value:function(Ni,iu,Sf){var Ui=this;this.p=this.p.then(function(){if(!Ui.unmounting){if(!Ui.el)throw new Error("Missing element reference");return ws.react(Ui.el,{data:Ui.props.data,layout:Ui.props.layout,config:Ui.props.config,frames:Ui.props.frames})}}).then(function(){Ui.unmounting||(Ui.syncWindowResize(Ni),Ui.syncEventHandlers(),Ui.figureCallback(iu),Sf&&Ui.attachUpdateEvents())}).catch(function(Qo){Ui.props.onError&&Ui.props.onError(Qo)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(Ni){this.unmounting=!1;var iu=Ni.frames&&Ni.frames.length?Ni.frames.length:0,Sf=this.props.frames&&this.props.frames.length?this.props.frames.length:0,Ui=!(Ni.layout===this.props.layout&&Ni.data===this.props.data&&Ni.config===this.props.config&&Sf===iu),Qo=Ni.revision!==void 0,Cp=Ni.revision!==this.props.revision;!Ui&&(!Qo||Qo&&!Cp)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&uv&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),ws.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var Ni=this;!this.el||!this.el.removeListener||He.forEach(function(iu){Ni.el.on(iu,Ni.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var Ni=this;!this.el||!this.el.removeListener||He.forEach(function(iu){Ni.el.removeListener(iu,Ni.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(Ni){if(typeof Ni=="function"){var iu=this.el,Sf=iu.data,Ui=iu.layout,Qo=this.el._transitionData?this.el._transitionData._frames:null,Cp={data:Sf,layout:Ui,frames:Qo};Ni(Cp,this.el)}}},{key:"syncWindowResize",value:function(Ni){var iu=this;uv&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return ws.Plots.resize(iu.el)},window.addEventListener("resize",this.resizeHandler),Ni&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(Ni){this.el=Ni,this.props.debug&&uv&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var Ni=this;Fs.forEach(function(iu){var Sf=Ni.props["on"+iu],Ui=Ni.handlers[iu],Qo=!!Ui;Sf&&!Qo?Ni.addEventHandler(iu,Sf):!Sf&&Qo?Ni.removeEventHandler(iu):Sf&&Qo&&Sf!==Ui&&(Ni.removeEventHandler(iu),Ni.addEventHandler(iu,Sf))})}},{key:"addEventHandler",value:function(Ni,iu){this.handlers[Ni]=iu,this.el.on(this.getPlotlyEventName(Ni),this.handlers[Ni])}},{key:"removeEventHandler",value:function(Ni){this.el.removeListener(this.getPlotlyEventName(Ni),this.handlers[Ni]),delete this.handlers[Ni]}},{key:"getPlotlyEventName",value:function(Ni){return"plotly_"+Ni.toLowerCase()}},{key:"render",value:function(){return Ms.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),_i})(Ms.Component);return Os.propTypes={data:Fo.default.arrayOf(Fo.default.object),config:Fo.default.object,layout:Fo.default.object,frames:Fo.default.arrayOf(Fo.default.object),revision:Fo.default.number,onInitialized:Fo.default.func,onPurge:Fo.default.func,onError:Fo.default.func,onUpdate:Fo.default.func,debug:Fo.default.bool,style:Fo.default.object,className:Fo.default.string,useResizeHandler:Fo.default.bool,divId:Fo.default.string},Fs.forEach(function(ac){Os.propTypes["on"+ac]=Fo.default.func}),Os.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},Os}})(ub)),ub}var $y={exports:{}},d7=$y.exports,J5;function p7(){return J5||(J5=1,(function(en){var qi={};(function(Ms,Fo){en.exports?en.exports=Fo():Ms.moduleName=Fo()})(typeof self<"u"?self:d7,()=>{var Ms=(()=>{var Fo=Object.create,zs=Object.defineProperty,rc=Object.defineProperties,Xu=Object.getOwnPropertyDescriptor,Xf=Object.getOwnPropertyDescriptors,wf=Object.getOwnPropertyNames,Hc=Object.getOwnPropertySymbols,Tf=Object.getPrototypeOf,Af=Object.prototype.hasOwnProperty,ah=Object.prototype.propertyIsEnumerable,js=(Y,G,h)=>G in Y?zs(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:h}):Y[G]=h,fl=(Y,G)=>{for(var h in G||(G={}))Af.call(G,h)&&js(Y,h,G[h]);if(Hc)for(var h of Hc(G))ah.call(G,h)&&js(Y,h,G[h]);return Y},Wc=(Y,G)=>rc(Y,Xf(G)),Kh=(Y,G)=>{var h={};for(var b in Y)Af.call(Y,b)&&G.indexOf(b)<0&&(h[b]=Y[b]);if(Y!=null&&Hc)for(var b of Hc(Y))G.indexOf(b)<0&&ah.call(Y,b)&&(h[b]=Y[b]);return h},Fs=(Y,G)=>function(){return Y&&(G=(0,Y[wf(Y)[0]])(Y=0)),G},He=(Y,G)=>function(){return G||(0,Y[wf(Y)[0]])((G={exports:{}}).exports,G),G.exports},uv=(Y,G)=>{for(var h in G)zs(Y,h,{get:G[h],enumerable:!0})},Hv=(Y,G,h,b)=>{if(G&&typeof G=="object"||typeof G=="function")for(let S of wf(G))!Af.call(Y,S)&&S!==h&&zs(Y,S,{get:()=>G[S],enumerable:!(b=Xu(G,S))||b.enumerable});return Y},ws=(Y,G,h)=>(h=Y!=null?Fo(Tf(Y)):{},Hv(zs(h,"default",{value:Y,enumerable:!0}),Y)),Os=Y=>Hv(zs({},"__esModule",{value:!0}),Y),ac=He({"src/version.js"(Y){Y.version="3.3.1"}}),Sc=He({"node_modules/native-promise-only/lib/npo.src.js"(Y,G){(function(b,S,E){S[b]=S[b]||E(),typeof G<"u"&&G.exports&&(G.exports=S[b])})("Promise",typeof window<"u"?window:Y,function(){var b,S,E,e=Object.prototype.toString,t=typeof setImmediate<"u"?function(m){return setImmediate(m)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(m,x,A,M){return Object.defineProperty(m,x,{value:A,writable:!0,configurable:M!==!1})}}catch{b=function(x,A,M){return x[A]=M,x}}E=(function(){var m,x,A;function M(_,w){this.fn=_,this.self=w,this.next=void 0}return{add:function(w,g){A=new M(w,g),x?x.next=A:m=A,x=A,A=void 0},drain:function(){var w=m;for(m=x=S=void 0;w;)w.fn.call(w.self),w=w.next}}})();function r(l,m){E.add(l,m),S||(S=t(E.drain))}function o(l){var m,x=typeof l;return l!=null&&(x=="object"||x=="function")&&(m=l.then),typeof m=="function"?m:!1}function a(){for(var l=0;l<this.chain.length;l++)i(this,this.state===1?this.chain[l].success:this.chain[l].failure,this.chain[l]);this.chain.length=0}function i(l,m,x){var A,M;try{m===!1?x.reject(l.msg):(m===!0?A=l.msg:A=m.call(void 0,l.msg),A===x.promise?x.reject(TypeError("Promise-chain cycle")):(M=o(A))?M.call(A,x.resolve,x.reject):x.resolve(A))}catch(_){x.reject(_)}}function n(l){var m,x=this;if(!x.triggered){x.triggered=!0,x.def&&(x=x.def);try{(m=o(l))?r(function(){var A=new c(x);try{m.call(l,function(){n.apply(A,arguments)},function(){s.apply(A,arguments)})}catch(M){s.call(A,M)}}):(x.msg=l,x.state=1,x.chain.length>0&&r(a,x))}catch(A){s.call(new c(x),A)}}}function s(l){var m=this;m.triggered||(m.triggered=!0,m.def&&(m=m.def),m.msg=l,m.state=2,m.chain.length>0&&r(a,m))}function f(l,m,x,A){for(var M=0;M<m.length;M++)(function(w){l.resolve(m[w]).then(function(u){x(w,u)},A)})(M)}function c(l){this.def=l,this.triggered=!1}function p(l){this.promise=l,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function d(l){if(typeof l!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var m=new p(this);this.then=function(A,M){var _={success:typeof A=="function"?A:!0,failure:typeof M=="function"?M:!1};return _.promise=new this.constructor(function(g,u){if(typeof g!="function"||typeof u!="function")throw TypeError("Not a function");_.resolve=g,_.reject=u}),m.chain.push(_),m.state!==0&&r(a,m),_.promise},this.catch=function(A){return this.then(void 0,A)};try{l.call(void 0,function(A){n.call(m,A)},function(A){s.call(m,A)})}catch(x){s.call(m,x)}}var T=b({},"constructor",d,!1);return d.prototype=T,b(T,"__NPO__",0,!1),b(d,"resolve",function(m){var x=this;return m&&typeof m=="object"&&m.__NPO__===1?m:new x(function(M,_){if(typeof M!="function"||typeof _!="function")throw TypeError("Not a function");M(m)})}),b(d,"reject",function(m){return new this(function(A,M){if(typeof A!="function"||typeof M!="function")throw TypeError("Not a function");M(m)})}),b(d,"all",function(m){var x=this;return e.call(m)!="[object Array]"?x.reject(TypeError("Not an array")):m.length===0?x.resolve([]):new x(function(M,_){if(typeof M!="function"||typeof _!="function")throw TypeError("Not a function");var w=m.length,g=Array(w),u=0;f(x,m,function(y,R){g[y]=R,++u===w&&M(g)},_)})}),b(d,"race",function(m){var x=this;return e.call(m)!="[object Array]"?x.reject(TypeError("Not an array")):new x(function(M,_){if(typeof M!="function"||typeof _!="function")throw TypeError("Not a function");f(x,m,function(g,u){M(u)},_)})}),d})}}),_i=He({"node_modules/@plotly/d3/d3.js"(Y,G){(function(){var h={version:"3.8.2"},b=[].slice,S=function(de){return b.call(de)},E=self.document;function e(de){return de&&(de.ownerDocument||de.document||de).documentElement}function t(de){return de&&(de.ownerDocument&&de.ownerDocument.defaultView||de.document&&de||de.defaultView)}if(E)try{S(E.documentElement.childNodes)[0].nodeType}catch{S=function(Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=Pe[Ke];return vt}}if(Date.now||(Date.now=function(){return+new Date}),E)try{E.createElement("DIV").style.setProperty("opacity",0,"")}catch{var r=this.Element.prototype,o=r.setAttribute,a=r.setAttributeNS,i=this.CSSStyleDeclaration.prototype,n=i.setProperty;r.setAttribute=function(Pe,Ke){o.call(this,Pe,Ke+"")},r.setAttributeNS=function(Pe,Ke,vt){a.call(this,Pe,Ke,vt+"")},i.setProperty=function(Pe,Ke,vt){n.call(this,Pe,Ke+"",vt)}}h.ascending=s;function s(de,Pe){return de<Pe?-1:de>Pe?1:de>=Pe?0:NaN}h.descending=function(de,Pe){return Pe<de?-1:Pe>de?1:Pe>=de?0:NaN},h.min=function(de,Pe){var Ke=-1,vt=de.length,gt,Tt;if(arguments.length===1){for(;++Ke<vt;)if((Tt=de[Ke])!=null&&Tt>=Tt){gt=Tt;break}for(;++Ke<vt;)(Tt=de[Ke])!=null&>>Tt&&(gt=Tt)}else{for(;++Ke<vt;)if((Tt=Pe.call(de,de[Ke],Ke))!=null&&Tt>=Tt){gt=Tt;break}for(;++Ke<vt;)(Tt=Pe.call(de,de[Ke],Ke))!=null&>>Tt&&(gt=Tt)}return gt},h.max=function(de,Pe){var Ke=-1,vt=de.length,gt,Tt;if(arguments.length===1){for(;++Ke<vt;)if((Tt=de[Ke])!=null&&Tt>=Tt){gt=Tt;break}for(;++Ke<vt;)(Tt=de[Ke])!=null&&Tt>gt&&(gt=Tt)}else{for(;++Ke<vt;)if((Tt=Pe.call(de,de[Ke],Ke))!=null&&Tt>=Tt){gt=Tt;break}for(;++Ke<vt;)(Tt=Pe.call(de,de[Ke],Ke))!=null&&Tt>gt&&(gt=Tt)}return gt},h.extent=function(de,Pe){var Ke=-1,vt=de.length,gt,Tt,qt;if(arguments.length===1){for(;++Ke<vt;)if((Tt=de[Ke])!=null&&Tt>=Tt){gt=qt=Tt;break}for(;++Ke<vt;)(Tt=de[Ke])!=null&&(gt>Tt&&(gt=Tt),qt<Tt&&(qt=Tt))}else{for(;++Ke<vt;)if((Tt=Pe.call(de,de[Ke],Ke))!=null&&Tt>=Tt){gt=qt=Tt;break}for(;++Ke<vt;)(Tt=Pe.call(de,de[Ke],Ke))!=null&&(gt>Tt&&(gt=Tt),qt<Tt&&(qt=Tt))}return[gt,qt]};function f(de){return de===null?NaN:+de}function c(de){return!isNaN(de)}h.sum=function(de,Pe){var Ke=0,vt=de.length,gt,Tt=-1;if(arguments.length===1)for(;++Tt<vt;)c(gt=+de[Tt])&&(Ke+=gt);else for(;++Tt<vt;)c(gt=+Pe.call(de,de[Tt],Tt))&&(Ke+=gt);return Ke},h.mean=function(de,Pe){var Ke=0,vt=de.length,gt,Tt=-1,qt=vt;if(arguments.length===1)for(;++Tt<vt;)c(gt=f(de[Tt]))?Ke+=gt:--qt;else for(;++Tt<vt;)c(gt=f(Pe.call(de,de[Tt],Tt)))?Ke+=gt:--qt;if(qt)return Ke/qt},h.quantile=function(de,Pe){var Ke=(de.length-1)*Pe+1,vt=Math.floor(Ke),gt=+de[vt-1],Tt=Ke-vt;return Tt?gt+Tt*(de[vt]-gt):gt},h.median=function(de,Pe){var Ke=[],vt=de.length,gt,Tt=-1;if(arguments.length===1)for(;++Tt<vt;)c(gt=f(de[Tt]))&&Ke.push(gt);else for(;++Tt<vt;)c(gt=f(Pe.call(de,de[Tt],Tt)))&&Ke.push(gt);if(Ke.length)return h.quantile(Ke.sort(s),.5)},h.variance=function(de,Pe){var Ke=de.length,vt=0,gt,Tt,qt=0,Vt=-1,or=0;if(arguments.length===1)for(;++Vt<Ke;)c(gt=f(de[Vt]))&&(Tt=gt-vt,vt+=Tt/++or,qt+=Tt*(gt-vt));else for(;++Vt<Ke;)c(gt=f(Pe.call(de,de[Vt],Vt)))&&(Tt=gt-vt,vt+=Tt/++or,qt+=Tt*(gt-vt));if(or>1)return qt/(or-1)},h.deviation=function(){var de=h.variance.apply(this,arguments);return de&&Math.sqrt(de)};function p(de){return{left:function(Pe,Ke,vt,gt){for(arguments.length<3&&(vt=0),arguments.length<4&&(gt=Pe.length);vt<gt;){var Tt=vt+gt>>>1;de(Pe[Tt],Ke)<0?vt=Tt+1:gt=Tt}return vt},right:function(Pe,Ke,vt,gt){for(arguments.length<3&&(vt=0),arguments.length<4&&(gt=Pe.length);vt<gt;){var Tt=vt+gt>>>1;de(Pe[Tt],Ke)>0?gt=Tt:vt=Tt+1}return vt}}}var d=p(s);h.bisectLeft=d.left,h.bisect=h.bisectRight=d.right,h.bisector=function(de){return p(de.length===1?function(Pe,Ke){return s(de(Pe),Ke)}:de)},h.shuffle=function(de,Pe,Ke){(vt=arguments.length)<3&&(Ke=de.length,vt<2&&(Pe=0));for(var vt=Ke-Pe,gt,Tt;vt;)Tt=Math.random()*vt--|0,gt=de[vt+Pe],de[vt+Pe]=de[Tt+Pe],de[Tt+Pe]=gt;return de},h.permute=function(de,Pe){for(var Ke=Pe.length,vt=new Array(Ke);Ke--;)vt[Ke]=de[Pe[Ke]];return vt},h.pairs=function(de){for(var Pe=0,Ke=de.length-1,vt=de[0],gt=new Array(Ke<0?0:Ke);Pe<Ke;)gt[Pe]=[vt,vt=de[++Pe]];return gt},h.transpose=function(de){if(!(Tt=de.length))return[];for(var Pe=-1,Ke=h.min(de,T),vt=new Array(Ke);++Pe<Ke;)for(var gt=-1,Tt,qt=vt[Pe]=new Array(Tt);++gt<Tt;)qt[gt]=de[gt][Pe];return vt};function T(de){return de.length}h.zip=function(){return h.transpose(arguments)},h.keys=function(de){var Pe=[];for(var Ke in de)Pe.push(Ke);return Pe},h.values=function(de){var Pe=[];for(var Ke in de)Pe.push(de[Ke]);return Pe},h.entries=function(de){var Pe=[];for(var Ke in de)Pe.push({key:Ke,value:de[Ke]});return Pe},h.merge=function(de){for(var Pe=de.length,Ke,vt=-1,gt=0,Tt,qt;++vt<Pe;)gt+=de[vt].length;for(Tt=new Array(gt);--Pe>=0;)for(qt=de[Pe],Ke=qt.length;--Ke>=0;)Tt[--gt]=qt[Ke];return Tt};var l=Math.abs;h.range=function(de,Pe,Ke){if(arguments.length<3&&(Ke=1,arguments.length<2&&(Pe=de,de=0)),(Pe-de)/Ke===1/0)throw new Error("infinite range");var vt=[],gt=m(l(Ke)),Tt=-1,qt;if(de*=gt,Pe*=gt,Ke*=gt,Ke<0)for(;(qt=de+Ke*++Tt)>Pe;)vt.push(qt/gt);else for(;(qt=de+Ke*++Tt)<Pe;)vt.push(qt/gt);return vt};function m(de){for(var Pe=1;de*Pe%1;)Pe*=10;return Pe}function x(de,Pe){for(var Ke in Pe)Object.defineProperty(de.prototype,Ke,{value:Pe[Ke],enumerable:!1})}h.map=function(de,Pe){var Ke=new A;if(de instanceof A)de.forEach(function(Vt,or){Ke.set(Vt,or)});else if(Array.isArray(de)){var vt=-1,gt=de.length,Tt;if(arguments.length===1)for(;++vt<gt;)Ke.set(vt,de[vt]);else for(;++vt<gt;)Ke.set(Pe.call(de,Tt=de[vt],vt),Tt)}else for(var qt in de)Ke.set(qt,de[qt]);return Ke};function A(){this._=Object.create(null)}var M="__proto__",_="\0";x(A,{has:u,get:function(de){return this._[w(de)]},set:function(de,Pe){return this._[w(de)]=Pe},remove:v,keys:y,values:function(){var de=[];for(var Pe in this._)de.push(this._[Pe]);return de},entries:function(){var de=[];for(var Pe in this._)de.push({key:g(Pe),value:this._[Pe]});return de},size:R,empty:L,forEach:function(de){for(var Pe in this._)de.call(this,g(Pe),this._[Pe])}});function w(de){return(de+="")===M||de[0]===_?_+de:de}function g(de){return(de+="")[0]===_?de.slice(1):de}function u(de){return w(de)in this._}function v(de){return(de=w(de))in this._&&delete this._[de]}function y(){var de=[];for(var Pe in this._)de.push(g(Pe));return de}function R(){var de=0;for(var Pe in this._)++de;return de}function L(){for(var de in this._)return!1;return!0}h.nest=function(){var de={},Pe=[],Ke=[],vt,gt;function Tt(Vt,or,Ir){if(Ir>=Pe.length)return gt?gt.call(de,or):vt?or.sort(vt):or;for(var Lr=-1,Zr=or.length,ia=Pe[Ir++],la,nn,da,La=new A,Oa;++Lr<Zr;)(Oa=La.get(la=ia(nn=or[Lr])))?Oa.push(nn):La.set(la,[nn]);return Vt?(nn=Vt(),da=function(Qa,sn){nn.set(Qa,Tt(Vt,sn,Ir))}):(nn={},da=function(Qa,sn){nn[Qa]=Tt(Vt,sn,Ir)}),La.forEach(da),nn}function qt(Vt,or){if(or>=Pe.length)return Vt;var Ir=[],Lr=Ke[or++];return Vt.forEach(function(Zr,ia){Ir.push({key:Zr,values:qt(ia,or)})}),Lr?Ir.sort(function(Zr,ia){return Lr(Zr.key,ia.key)}):Ir}return de.map=function(Vt,or){return Tt(or,Vt,0)},de.entries=function(Vt){return qt(Tt(h.map,Vt,0),0)},de.key=function(Vt){return Pe.push(Vt),de},de.sortKeys=function(Vt){return Ke[Pe.length-1]=Vt,de},de.sortValues=function(Vt){return vt=Vt,de},de.rollup=function(Vt){return gt=Vt,de},de},h.set=function(de){var Pe=new z;if(de)for(var Ke=0,vt=de.length;Ke<vt;++Ke)Pe.add(de[Ke]);return Pe};function z(){this._=Object.create(null)}x(z,{has:u,add:function(de){return this._[w(de+="")]=!0,de},remove:v,values:y,size:R,empty:L,forEach:function(de){for(var Pe in this._)de.call(this,g(Pe))}}),h.behavior={};function F(de){return de}h.rebind=function(de,Pe){for(var Ke=1,vt=arguments.length,gt;++Ke<vt;)de[gt=arguments[Ke]]=B(de,Pe,Pe[gt]);return de};function B(de,Pe,Ke){return function(){var vt=Ke.apply(Pe,arguments);return vt===Pe?de:vt}}function O(de,Pe){if(Pe in de)return Pe;Pe=Pe.charAt(0).toUpperCase()+Pe.slice(1);for(var Ke=0,vt=I.length;Ke<vt;++Ke){var gt=I[Ke]+Pe;if(gt in de)return gt}}var I=["webkit","ms","moz","Moz","o","O"];function N(){}h.dispatch=function(){for(var de=new U,Pe=-1,Ke=arguments.length;++Pe<Ke;)de[arguments[Pe]]=X(de);return de};function U(){}U.prototype.on=function(de,Pe){var Ke=de.indexOf("."),vt="";if(Ke>=0&&(vt=de.slice(Ke+1),de=de.slice(0,Ke)),de)return arguments.length<2?this[de].on(vt):this[de].on(vt,Pe);if(arguments.length===2){if(Pe==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(vt,null);return this}};function X(de){var Pe=[],Ke=new A;function vt(){for(var gt=Pe,Tt=-1,qt=gt.length,Vt;++Tt<qt;)(Vt=gt[Tt].on)&&Vt.apply(this,arguments);return de}return vt.on=function(gt,Tt){var qt=Ke.get(gt),Vt;return arguments.length<2?qt&&qt.on:(qt&&(qt.on=null,Pe=Pe.slice(0,Vt=Pe.indexOf(qt)).concat(Pe.slice(Vt+1)),Ke.remove(gt)),Tt&&Pe.push(Ke.set(gt,{on:Tt})),de)},vt}h.event=null;function ee(){h.event.preventDefault()}function ue(){for(var de=h.event,Pe;Pe=de.sourceEvent;)de=Pe;return de}function oe(de){for(var Pe=new U,Ke=0,vt=arguments.length;++Ke<vt;)Pe[arguments[Ke]]=X(Pe);return Pe.of=function(gt,Tt){return function(qt){try{var Vt=qt.sourceEvent=h.event;qt.target=de,h.event=qt,Pe[qt.type].apply(gt,Tt)}finally{h.event=Vt}}},Pe}h.requote=function(de){return de.replace(le,"\\$&")};var le=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(de,Pe){de.__proto__=Pe}:function(de,Pe){for(var Ke in Pe)de[Ke]=Pe[Ke]};function J(de){return V(de,Q),de}var te=function(de,Pe){return Pe.querySelector(de)},Z=function(de,Pe){return Pe.querySelectorAll(de)},se=function(de,Pe){var Ke=de.matches||de[O(de,"matchesSelector")];return se=function(vt,gt){return Ke.call(vt,gt)},se(de,Pe)};typeof Sizzle=="function"&&(te=function(de,Pe){return Sizzle(de,Pe)[0]||null},Z=Sizzle,se=Sizzle.matchesSelector),h.selection=function(){return h.select(E.documentElement)};var Q=h.selection.prototype=[];Q.select=function(de){var Pe=[],Ke,vt,gt,Tt;de=q(de);for(var qt=-1,Vt=this.length;++qt<Vt;){Pe.push(Ke=[]),Ke.parentNode=(gt=this[qt]).parentNode;for(var or=-1,Ir=gt.length;++or<Ir;)(Tt=gt[or])?(Ke.push(vt=de.call(Tt,Tt.__data__,or,qt)),vt&&"__data__"in Tt&&(vt.__data__=Tt.__data__)):Ke.push(null)}return J(Pe)};function q(de){return typeof de=="function"?de:function(){return te(de,this)}}Q.selectAll=function(de){var Pe=[],Ke,vt;de=re(de);for(var gt=-1,Tt=this.length;++gt<Tt;)for(var qt=this[gt],Vt=-1,or=qt.length;++Vt<or;)(vt=qt[Vt])&&(Pe.push(Ke=S(de.call(vt,vt.__data__,Vt,gt))),Ke.parentNode=vt);return J(Pe)};function re(de){return typeof de=="function"?de:function(){return Z(de,this)}}var ae="http://www.w3.org/1999/xhtml",fe={svg:"http://www.w3.org/2000/svg",xhtml:ae,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};h.ns={prefix:fe,qualify:function(de){var Pe=de.indexOf(":"),Ke=de;return Pe>=0&&(Ke=de.slice(0,Pe))!=="xmlns"&&(de=de.slice(Pe+1)),fe.hasOwnProperty(Ke)?{space:fe[Ke],local:de}:de}},Q.attr=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node();return de=h.ns.qualify(de),de.local?Ke.getAttributeNS(de.space,de.local):Ke.getAttribute(de)}for(Pe in de)this.each(be(Pe,de[Pe]));return this}return this.each(be(de,Pe))};function be(de,Pe){de=h.ns.qualify(de);function Ke(){this.removeAttribute(de)}function vt(){this.removeAttributeNS(de.space,de.local)}function gt(){this.setAttribute(de,Pe)}function Tt(){this.setAttributeNS(de.space,de.local,Pe)}function qt(){var or=Pe.apply(this,arguments);or==null?this.removeAttribute(de):this.setAttribute(de,or)}function Vt(){var or=Pe.apply(this,arguments);or==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,or)}return Pe==null?de.local?vt:Ke:typeof Pe=="function"?de.local?Vt:qt:de.local?Tt:gt}function Me(de){return de.trim().replace(/\s+/g," ")}Q.classed=function(de,Pe){if(arguments.length<2){if(typeof de=="string"){var Ke=this.node(),vt=(de=Le(de)).length,gt=-1;if(Pe=Ke.classList){for(;++gt<vt;)if(!Pe.contains(de[gt]))return!1}else for(Pe=Ke.getAttribute("class");++gt<vt;)if(!Ie(de[gt]).test(Pe))return!1;return!0}for(Pe in de)this.each(je(Pe,de[Pe]));return this}return this.each(je(de,Pe))};function Ie(de){return new RegExp("(?:^|\\s+)"+h.requote(de)+"(?:\\s+|$)","g")}function Le(de){return(de+"").trim().split(/^|\s+/)}function je(de,Pe){de=Le(de).map(et);var Ke=de.length;function vt(){for(var Tt=-1;++Tt<Ke;)de[Tt](this,Pe)}function gt(){for(var Tt=-1,qt=Pe.apply(this,arguments);++Tt<Ke;)de[Tt](this,qt)}return typeof Pe=="function"?gt:vt}function et(de){var Pe=Ie(de);return function(Ke,vt){if(gt=Ke.classList)return vt?gt.add(de):gt.remove(de);var gt=Ke.getAttribute("class")||"";vt?(Pe.lastIndex=0,Pe.test(gt)||Ke.setAttribute("class",Me(gt+" "+de))):Ke.setAttribute("class",Me(gt.replace(Pe," ")))}}Q.style=function(de,Pe,Ke){var vt=arguments.length;if(vt<3){if(typeof de!="string"){vt<2&&(Pe="");for(Ke in de)this.each(rt(Ke,de[Ke],Pe));return this}if(vt<2){var gt=this.node();return t(gt).getComputedStyle(gt,null).getPropertyValue(de)}Ke=""}return this.each(rt(de,Pe,Ke))};function rt(de,Pe,Ke){function vt(){this.style.removeProperty(de)}function gt(){this.style.setProperty(de,Pe,Ke)}function Tt(){var qt=Pe.apply(this,arguments);qt==null?this.style.removeProperty(de):this.style.setProperty(de,qt,Ke)}return Pe==null?vt:typeof Pe=="function"?Tt:gt}Q.property=function(de,Pe){if(arguments.length<2){if(typeof de=="string")return this.node()[de];for(Pe in de)this.each(Je(Pe,de[Pe]));return this}return this.each(Je(de,Pe))};function Je(de,Pe){function Ke(){delete this[de]}function vt(){this[de]=Pe}function gt(){var Tt=Pe.apply(this,arguments);Tt==null?delete this[de]:this[de]=Tt}return Pe==null?Ke:typeof Pe=="function"?gt:vt}Q.text=function(de){return arguments.length?this.each(typeof de=="function"?function(){var Pe=de.apply(this,arguments);this.textContent=Pe??""}:de==null?function(){this.textContent=""}:function(){this.textContent=de}):this.node().textContent},Q.html=function(de){return arguments.length?this.each(typeof de=="function"?function(){var Pe=de.apply(this,arguments);this.innerHTML=Pe??""}:de==null?function(){this.innerHTML=""}:function(){this.innerHTML=de}):this.node().innerHTML},Q.append=function(de){return de=Ze(de),this.select(function(){return this.appendChild(de.apply(this,arguments))})};function Ze(de){function Pe(){var vt=this.ownerDocument,gt=this.namespaceURI;return gt===ae&&vt.documentElement.namespaceURI===ae?vt.createElement(de):vt.createElementNS(gt,de)}function Ke(){return this.ownerDocument.createElementNS(de.space,de.local)}return typeof de=="function"?de:(de=h.ns.qualify(de)).local?Ke:Pe}Q.insert=function(de,Pe){return de=Ze(de),Pe=q(Pe),this.select(function(){return this.insertBefore(de.apply(this,arguments),Pe.apply(this,arguments)||null)})},Q.remove=function(){return this.each(Ee)};function Ee(){var de=this.parentNode;de&&de.removeChild(this)}Q.data=function(de,Pe){var Ke=-1,vt=this.length,gt,Tt;if(!arguments.length){for(de=new Array(vt=(gt=this[0]).length);++Ke<vt;)(Tt=gt[Ke])&&(de[Ke]=Tt.__data__);return de}function qt(Lr,Zr){var ia,la=Lr.length,nn=Zr.length,da=Math.min(la,nn),La=new Array(nn),Oa=new Array(nn),Qa=new Array(la),sn,Fa;if(Pe){var Pn=new A,si=new Array(la),$n;for(ia=-1;++ia<la;)(sn=Lr[ia])&&(Pn.has($n=Pe.call(sn,sn.__data__,ia))?Qa[ia]=sn:Pn.set($n,sn),si[ia]=$n);for(ia=-1;++ia<nn;)(sn=Pn.get($n=Pe.call(Zr,Fa=Zr[ia],ia)))?sn!==!0&&(La[ia]=sn,sn.__data__=Fa):Oa[ia]=xe(Fa),Pn.set($n,!0);for(ia=-1;++ia<la;)ia in si&&Pn.get(si[ia])!==!0&&(Qa[ia]=Lr[ia])}else{for(ia=-1;++ia<da;)sn=Lr[ia],Fa=Zr[ia],sn?(sn.__data__=Fa,La[ia]=sn):Oa[ia]=xe(Fa);for(;ia<nn;++ia)Oa[ia]=xe(Zr[ia]);for(;ia<la;++ia)Qa[ia]=Lr[ia]}Oa.update=La,Oa.parentNode=La.parentNode=Qa.parentNode=Lr.parentNode,Vt.push(Oa),or.push(La),Ir.push(Qa)}var Vt=nt([]),or=J([]),Ir=J([]);if(typeof de=="function")for(;++Ke<vt;)qt(gt=this[Ke],de.call(gt,gt.parentNode.__data__,Ke));else for(;++Ke<vt;)qt(gt=this[Ke],de);return or.enter=function(){return Vt},or.exit=function(){return Ir},or};function xe(de){return{__data__:de}}Q.datum=function(de){return arguments.length?this.property("__data__",de):this.property("__data__")},Q.filter=function(de){var Pe=[],Ke,vt,gt;typeof de!="function"&&(de=he(de));for(var Tt=0,qt=this.length;Tt<qt;Tt++){Pe.push(Ke=[]),Ke.parentNode=(vt=this[Tt]).parentNode;for(var Vt=0,or=vt.length;Vt<or;Vt++)(gt=vt[Vt])&&de.call(gt,gt.__data__,Vt,Tt)&&Ke.push(gt)}return J(Pe)};function he(de){return function(){return se(this,de)}}Q.order=function(){for(var de=-1,Pe=this.length;++de<Pe;)for(var Ke=this[de],vt=Ke.length-1,gt=Ke[vt],Tt;--vt>=0;)(Tt=Ke[vt])&&(gt&>!==Tt.nextSibling&>.parentNode.insertBefore(Tt,gt),gt=Tt);return this},Q.sort=function(de){de=De.apply(this,arguments);for(var Pe=-1,Ke=this.length;++Pe<Ke;)this[Pe].sort(de);return this.order()};function De(de){return arguments.length||(de=s),function(Pe,Ke){return Pe&&Ke?de(Pe.__data__,Ke.__data__):!Pe-!Ke}}Q.each=function(de){return tt(this,function(Pe,Ke,vt){de.call(Pe,Pe.__data__,Ke,vt)})};function tt(de,Pe){for(var Ke=0,vt=de.length;Ke<vt;Ke++)for(var gt=de[Ke],Tt=0,qt=gt.length,Vt;Tt<qt;Tt++)(Vt=gt[Tt])&&Pe(Vt,Tt,Ke);return de}Q.call=function(de){var Pe=S(arguments);return de.apply(Pe[0]=this,Pe),this},Q.empty=function(){return!this.node()},Q.node=function(){for(var de=0,Pe=this.length;de<Pe;de++)for(var Ke=this[de],vt=0,gt=Ke.length;vt<gt;vt++){var Tt=Ke[vt];if(Tt)return Tt}return null},Q.size=function(){var de=0;return tt(this,function(){++de}),de};function nt(de){return V(de,$e),de}var $e=[];h.selection.enter=nt,h.selection.enter.prototype=$e,$e.append=Q.append,$e.empty=Q.empty,$e.node=Q.node,$e.call=Q.call,$e.size=Q.size,$e.select=function(de){for(var Pe=[],Ke,vt,gt,Tt,qt,Vt=-1,or=this.length;++Vt<or;){gt=(Tt=this[Vt]).update,Pe.push(Ke=[]),Ke.parentNode=Tt.parentNode;for(var Ir=-1,Lr=Tt.length;++Ir<Lr;)(qt=Tt[Ir])?(Ke.push(gt[Ir]=vt=de.call(Tt.parentNode,qt.__data__,Ir,Vt)),vt.__data__=qt.__data__):Ke.push(null)}return J(Pe)},$e.insert=function(de,Pe){return arguments.length<2&&(Pe=Et(this)),Q.insert.call(this,de,Pe)};function Et(de){var Pe,Ke;return function(vt,gt,Tt){var qt=de[Tt].update,Vt=qt.length,or;for(Tt!=Ke&&(Ke=Tt,Pe=0),gt>=Pe&&(Pe=gt+1);!(or=qt[Pe])&&++Pe<Vt;);return or}}h.select=function(de){var Pe;return typeof de=="string"?(Pe=[te(de,E)],Pe.parentNode=E.documentElement):(Pe=[de],Pe.parentNode=e(de)),J([Pe])},h.selectAll=function(de){var Pe;return typeof de=="string"?(Pe=S(Z(de,E)),Pe.parentNode=E.documentElement):(Pe=S(de),Pe.parentNode=null),J([Pe])},Q.on=function(de,Pe,Ke){var vt=arguments.length;if(vt<3){if(typeof de!="string"){vt<2&&(Pe=!1);for(Ke in de)this.each(Ct(Ke,de[Ke],Pe));return this}if(vt<2)return(vt=this.node()["__on"+de])&&vt._;Ke=!1}return this.each(Ct(de,Pe,Ke))};function Ct(de,Pe,Ke){var vt="__on"+de,gt=de.indexOf("."),Tt=Wt;gt>0&&(de=de.slice(0,gt));var qt=jt.get(de);qt&&(de=qt,Tt=dr);function Vt(){var Lr=this[vt];Lr&&(this.removeEventListener(de,Lr,Lr.$),delete this[vt])}function or(){var Lr=Tt(Pe,S(arguments));Vt.call(this),this.addEventListener(de,this[vt]=Lr,Lr.$=Ke),Lr._=Pe}function Ir(){var Lr=new RegExp("^__on([^.]+)"+h.requote(de)+"$"),Zr;for(var ia in this)if(Zr=ia.match(Lr)){var la=this[ia];this.removeEventListener(Zr[1],la,la.$),delete this[ia]}}return gt?Pe?or:Vt:Pe?N:Ir}var jt=h.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&jt.forEach(function(de){"on"+de in E&&jt.remove(de)});function Wt(de,Pe){return function(Ke){var vt=h.event;h.event=Ke,Pe[0]=this.__data__;try{de.apply(this,Pe)}finally{h.event=vt}}}function dr(de,Pe){var Ke=Wt(de,Pe);return function(vt){var gt=this,Tt=vt.relatedTarget;(!Tt||Tt!==gt&&!(Tt.compareDocumentPosition(gt)&8))&&Ke.call(gt,vt)}}var vr,Dr=0;function hr(de){var Pe=".dragsuppress-"+ ++Dr,Ke="click"+Pe,vt=h.select(t(de)).on("touchmove"+Pe,ee).on("dragstart"+Pe,ee).on("selectstart"+Pe,ee);if(vr==null&&(vr="onselectstart"in de?!1:O(de.style,"userSelect")),vr){var gt=e(de).style,Tt=gt[vr];gt[vr]="none"}return function(qt){if(vt.on(Pe,null),vr&&(gt[vr]=Tt),qt){var Vt=function(){vt.on(Ke,null)};vt.on(Ke,function(){ee(),Vt()},!0),setTimeout(Vt,0)}}}h.mouse=function(de){return mt(de,ue())};var Ar=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function mt(de,Pe){Pe.changedTouches&&(Pe=Pe.changedTouches[0]);var Ke=de.ownerSVGElement||de;if(Ke.createSVGPoint){var vt=Ke.createSVGPoint();if(Ar<0){var gt=t(de);if(gt.scrollX||gt.scrollY){Ke=h.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Tt=Ke[0][0].getScreenCTM();Ar=!(Tt.f||Tt.e),Ke.remove()}}return Ar?(vt.x=Pe.pageX,vt.y=Pe.pageY):(vt.x=Pe.clientX,vt.y=Pe.clientY),vt=vt.matrixTransform(de.getScreenCTM().inverse()),[vt.x,vt.y]}var qt=de.getBoundingClientRect();return[Pe.clientX-qt.left-de.clientLeft,Pe.clientY-qt.top-de.clientTop]}h.touch=function(de,Pe,Ke){if(arguments.length<3&&(Ke=Pe,Pe=ue().changedTouches),Pe){for(var vt=0,gt=Pe.length,Tt;vt<gt;++vt)if((Tt=Pe[vt]).identifier===Ke)return mt(de,Tt)}},h.behavior.drag=function(){var de=oe(gt,"drag","dragstart","dragend"),Pe=null,Ke=Tt(N,h.mouse,t,"mousemove","mouseup"),vt=Tt(Fe,h.touch,F,"touchmove","touchend");function gt(){this.on("mousedown.drag",Ke).on("touchstart.drag",vt)}function Tt(qt,Vt,or,Ir,Lr){return function(){var Zr=this,ia=h.event.target.correspondingElement||h.event.target,la=Zr.parentNode,nn=de.of(Zr,arguments),da=0,La=qt(),Oa=".drag"+(La==null?"":"-"+La),Qa,sn=h.select(or(ia)).on(Ir+Oa,si).on(Lr+Oa,$n),Fa=hr(ia),Pn=Vt(la,La);Pe?(Qa=Pe.apply(Zr,arguments),Qa=[Qa.x-Pn[0],Qa.y-Pn[1]]):Qa=[0,0],nn({type:"dragstart"});function si(){var ni=Vt(la,La),Ai,Ci;ni&&(Ai=ni[0]-Pn[0],Ci=ni[1]-Pn[1],da|=Ai|Ci,Pn=ni,nn({type:"drag",x:ni[0]+Qa[0],y:ni[1]+Qa[1],dx:Ai,dy:Ci}))}function $n(){Vt(la,La)&&(sn.on(Ir+Oa,null).on(Lr+Oa,null),Fa(da),nn({type:"dragend"}))}}}return gt.origin=function(qt){return arguments.length?(Pe=qt,gt):Pe},h.rebind(gt,de,"on")};function Fe(){return h.event.changedTouches[0].identifier}h.touches=function(de,Pe){return arguments.length<2&&(Pe=ue().touches),Pe?S(Pe).map(function(Ke){var vt=mt(de,Ke);return vt.identifier=Ke.identifier,vt}):[]};var We=1e-6,Ae=We*We,me=Math.PI,pe=2*me,Te=pe-We,Ue=me/2,Xe=me/180,bt=180/me;function xt(de,Pe,Ke){return(Pe[0]-de[0])*(Ke[1]-de[1])-(Pe[1]-de[1])*(Ke[0]-de[0])}function Mt(de){return de>1?Ue:de<-1?-Ue:Math.asin(de)}function Nt(de){return((de=Math.exp(de))-1/de)/2}function sr(de){return((de=Math.exp(de))+1/de)/2}function ar(de){return((de=Math.exp(2*de))-1)/(de+1)}var tr=Math.SQRT2,Tr=2,sa=4;h.interpolateZoom=function(de,Pe){var Ke=de[0],vt=de[1],gt=de[2],Tt=Pe[0],qt=Pe[1],Vt=Pe[2],or=Tt-Ke,Ir=qt-vt,Lr=or*or+Ir*Ir,Zr,ia;if(Lr<Ae)ia=Math.log(Vt/gt)/tr,Zr=function(Qa){return[Ke+Qa*or,vt+Qa*Ir,gt*Math.exp(tr*Qa*ia)]};else{var la=Math.sqrt(Lr),nn=(Vt*Vt-gt*gt+sa*Lr)/(2*gt*Tr*la),da=(Vt*Vt-gt*gt-sa*Lr)/(2*Vt*Tr*la),La=Math.log(Math.sqrt(nn*nn+1)-nn),Oa=Math.log(Math.sqrt(da*da+1)-da);ia=(Oa-La)/tr,Zr=function(Qa){var sn=Qa*ia,Fa=sr(La),Pn=gt/(Tr*la)*(Fa*ar(tr*sn+La)-Nt(La));return[Ke+Pn*or,vt+Pn*Ir,gt*Fa/sr(tr*sn+La)]}}return Zr.duration=ia*1e3,Zr},h.behavior.zoom=function(){var de={x:0,y:0,k:1},Pe,Ke,vt,gt=[960,500],Tt=Ea,qt=250,Vt=0,or="mousedown.zoom",Ir="mousemove.zoom",Lr="mouseup.zoom",Zr,ia="touchstart.zoom",la,nn=oe(sn,"zoomstart","zoom","zoomend"),da,La,Oa,Qa;Ia||(Ia="onwheel"in E?(ba=function(){return-h.event.deltaY*(h.event.deltaMode?120:1)},"wheel"):"onmousewheel"in E?(ba=function(){return h.event.wheelDelta},"mousewheel"):(ba=function(){return-h.event.detail},"MozMousePixelScroll"));function sn(gi){gi.on(or,uo).on(Ia+".zoom",wl).on("dblclick.zoom",Ks).on(ia,ts)}sn.event=function(gi){gi.each(function(){var Lo=nn.of(this,arguments),Ko=de;Mi?h.select(this).transition().each("start.zoom",function(){de=this.__chart__||{x:0,y:0,k:1},Ci(Lo)}).tween("zoom:zoom",function(){var Ws=gt[0],Ps=gt[1],ru=Ke?Ke[0]:Ws/2,bs=Ke?Ke[1]:Ps/2,Xs=h.interpolateZoom([(ru-de.x)/de.k,(bs-de.y)/de.k,Ws/de.k],[(ru-Ko.x)/Ko.k,(bs-Ko.y)/Ko.k,Ws/Ko.k]);return function(Tu){var _l=Xs(Tu),st=Ws/_l[2];this.__chart__=de={x:ru-_l[0]*st,y:bs-_l[1]*st,k:st},Xo(Lo)}}).each("interrupt.zoom",function(){Ii(Lo)}).each("end.zoom",function(){Ii(Lo)}):(this.__chart__=de,Ci(Lo),Xo(Lo),Ii(Lo))})},sn.translate=function(gi){return arguments.length?(de={x:+gi[0],y:+gi[1],k:de.k},Ai(),sn):[de.x,de.y]},sn.scale=function(gi){return arguments.length?(de={x:de.x,y:de.y,k:null},si(+gi),Ai(),sn):de.k},sn.scaleExtent=function(gi){return arguments.length?(Tt=gi==null?Ea:[+gi[0],+gi[1]],sn):Tt},sn.center=function(gi){return arguments.length?(vt=gi&&[+gi[0],+gi[1]],sn):vt},sn.size=function(gi){return arguments.length?(gt=gi&&[+gi[0],+gi[1]],sn):gt},sn.duration=function(gi){return arguments.length?(qt=+gi,sn):qt},sn.x=function(gi){return arguments.length?(La=gi,da=gi.copy(),de={x:0,y:0,k:1},sn):La},sn.y=function(gi){return arguments.length?(Qa=gi,Oa=gi.copy(),de={x:0,y:0,k:1},sn):Qa};function Fa(gi){return[(gi[0]-de.x)/de.k,(gi[1]-de.y)/de.k]}function Pn(gi){return[gi[0]*de.k+de.x,gi[1]*de.k+de.y]}function si(gi){de.k=Math.max(Tt[0],Math.min(Tt[1],gi))}function $n(gi,Lo){Lo=Pn(Lo),de.x+=gi[0]-Lo[0],de.y+=gi[1]-Lo[1]}function ni(gi,Lo,Ko,Ws){gi.__chart__={x:de.x,y:de.y,k:de.k},si(Math.pow(2,Ws)),$n(Ke=Lo,Ko),gi=h.select(gi),qt>0&&(gi=gi.transition().duration(qt)),gi.call(sn.event)}function Ai(){La&&La.domain(da.range().map(function(gi){return(gi-de.x)/de.k}).map(da.invert)),Qa&&Qa.domain(Oa.range().map(function(gi){return(gi-de.y)/de.k}).map(Oa.invert))}function Ci(gi){Vt++||gi({type:"zoomstart"})}function Xo(gi){Ai(),gi({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function Ii(gi){--Vt||(gi({type:"zoomend"}),Ke=null)}function uo(){var gi=this,Lo=nn.of(gi,arguments),Ko=0,Ws=h.select(t(gi)).on(Ir,bs).on(Lr,Xs),Ps=Fa(h.mouse(gi)),ru=hr(gi);$a.call(gi),Ci(Lo);function bs(){Ko=1,$n(h.mouse(gi),Ps),Xo(Lo)}function Xs(){Ws.on(Ir,null).on(Lr,null),ru(Ko),Ii(Lo)}}function ts(){var gi=this,Lo=nn.of(gi,arguments),Ko={},Ws=0,Ps,ru=".zoom-"+h.event.changedTouches[0].identifier,bs="touchmove"+ru,Xs="touchend"+ru,Tu=[],_l=h.select(gi),st=hr(gi);ur(),Ci(Lo),_l.on(or,null).on(ia,ur);function ir(){var Qr=h.touches(gi);return Ps=de.k,Qr.forEach(function($r){$r.identifier in Ko&&(Ko[$r.identifier]=Fa($r))}),Qr}function ur(){var Qr=h.event.target;h.select(Qr).on(bs,ua).on(Xs,Ua),Tu.push(Qr);for(var $r=h.event.changedTouches,cn=0,ln=$r.length;cn<ln;++cn)Ko[$r[cn].identifier]=null;var un=ir(),bn=Date.now();if(un.length===1){if(bn-la<500){var ei=un[0];ni(gi,ei,Ko[ei.identifier],Math.floor(Math.log(de.k)/Math.LN2)+1),ee()}la=bn}else if(un.length>1){var ei=un[0],Vn=un[1],_n=ei[0]-Vn[0],Wa=ei[1]-Vn[1];Ws=_n*_n+Wa*Wa}}function ua(){var Qr=h.touches(gi),$r,cn,ln,un;$a.call(gi);for(var bn=0,ei=Qr.length;bn<ei;++bn,un=null)if(ln=Qr[bn],un=Ko[ln.identifier]){if(cn)break;$r=ln,cn=un}if(un){var Vn=(Vn=ln[0]-$r[0])*Vn+(Vn=ln[1]-$r[1])*Vn,_n=Ws&&Math.sqrt(Vn/Ws);$r=[($r[0]+ln[0])/2,($r[1]+ln[1])/2],cn=[(cn[0]+un[0])/2,(cn[1]+un[1])/2],si(_n*Ps)}la=null,$n($r,cn),Xo(Lo)}function Ua(){if(h.event.touches.length){for(var Qr=h.event.changedTouches,$r=0,cn=Qr.length;$r<cn;++$r)delete Ko[Qr[$r].identifier];for(var ln in Ko)return void ir()}h.selectAll(Tu).on(ru,null),_l.on(or,uo).on(ia,ts),st(),Ii(Lo)}}function wl(){var gi=nn.of(this,arguments);Zr?clearTimeout(Zr):($a.call(this),Pe=Fa(Ke=vt||h.mouse(this)),Ci(gi)),Zr=setTimeout(function(){Zr=null,Ii(gi)},50),ee(),si(Math.pow(2,ba()*.002)*de.k),$n(Ke,Pe),Xo(gi)}function Ks(){var gi=h.mouse(this),Lo=Math.log(de.k)/Math.LN2;ni(this,gi,Fa(gi),h.event.shiftKey?Math.ceil(Lo)-1:Math.floor(Lo)+1)}return h.rebind(sn,nn,"on")};var Ea=[0,1/0],ba,Ia;h.color=Ra;function Ra(){}Ra.prototype.toString=function(){return this.rgb()+""},h.hsl=ya;function ya(de,Pe,Ke){return this instanceof ya?(this.h=+de,this.s=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof ya?new ya(de.h,de.s,de.l):Sr(""+de,Er,ya):new ya(de,Pe,Ke)}var rn=ya.prototype=new Ra;rn.brighter=function(de){return de=Math.pow(.7,arguments.length?de:1),new ya(this.h,this.s,this.l/de)},rn.darker=function(de){return de=Math.pow(.7,arguments.length?de:1),new ya(this.h,this.s,de*this.l)},rn.rgb=function(){return mn(this.h,this.s,this.l)};function mn(de,Pe,Ke){var vt,gt;de=isNaN(de)?0:(de%=360)<0?de+360:de,Pe=isNaN(Pe)||Pe<0?0:Pe>1?1:Pe,Ke=Ke<0?0:Ke>1?1:Ke,gt=Ke<=.5?Ke*(1+Pe):Ke+Pe-Ke*Pe,vt=2*Ke-gt;function Tt(Vt){return Vt>360?Vt-=360:Vt<0&&(Vt+=360),Vt<60?vt+(gt-vt)*Vt/60:Vt<180?gt:Vt<240?vt+(gt-vt)*(240-Vt)/60:vt}function qt(Vt){return Math.round(Tt(Vt)*255)}return new Nn(qt(de+120),qt(de),qt(de-120))}h.hcl=Yt;function Yt(de,Pe,Ke){return this instanceof Yt?(this.h=+de,this.c=+Pe,void(this.l=+Ke)):arguments.length<2?de instanceof Yt?new Yt(de.h,de.c,de.l):de instanceof $t?Va(de.l,de.a,de.b):Va((de=_r((de=h.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new Yt(de,Pe,Ke)}var It=Yt.prototype=new Ra;It.brighter=function(de){return new Yt(this.h,this.c,Math.min(100,this.l+Cr*(arguments.length?de:1)))},It.darker=function(de){return new Yt(this.h,this.c,Math.max(0,this.l-Cr*(arguments.length?de:1)))},It.rgb=function(){return Zt(this.h,this.c,this.l).rgb()};function Zt(de,Pe,Ke){return isNaN(de)&&(de=0),isNaN(Pe)&&(Pe=0),new $t(Ke,Math.cos(de*=Xe)*Pe,Math.sin(de)*Pe)}h.lab=$t;function $t(de,Pe,Ke){return this instanceof $t?(this.l=+de,this.a=+Pe,void(this.b=+Ke)):arguments.length<2?de instanceof $t?new $t(de.l,de.a,de.b):de instanceof Yt?Zt(de.h,de.c,de.l):_r((de=Nn(de)).r,de.g,de.b):new $t(de,Pe,Ke)}var Cr=18,qr=.95047,Jr=1,aa=1.08883,Ca=$t.prototype=new Ra;Ca.brighter=function(de){return new $t(Math.min(100,this.l+Cr*(arguments.length?de:1)),this.a,this.b)},Ca.darker=function(de){return new $t(Math.max(0,this.l-Cr*(arguments.length?de:1)),this.a,this.b)},Ca.rgb=function(){return Ha(this.l,this.a,this.b)};function Ha(de,Pe,Ke){var vt=(de+16)/116,gt=vt+Pe/500,Tt=vt-Ke/200;return gt=Za(gt)*qr,vt=Za(vt)*Jr,Tt=Za(Tt)*aa,new Nn(wa(3.2404542*gt-1.5371385*vt-.4985314*Tt),wa(-.969266*gt+1.8760108*vt+.041556*Tt),wa(.0556434*gt-.2040259*vt+1.0572252*Tt))}function Va(de,Pe,Ke){return de>0?new Yt(Math.atan2(Ke,Pe)*bt,Math.sqrt(Pe*Pe+Ke*Ke),de):new Yt(NaN,NaN,de)}function Za(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function an(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function wa(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}h.rgb=Nn;function Nn(de,Pe,Ke){return this instanceof Nn?(this.r=~~de,this.g=~~Pe,void(this.b=~~Ke)):arguments.length<2?de instanceof Nn?new Nn(de.r,de.g,de.b):Sr(""+de,Nn,mn):new Nn(de,Pe,Ke)}function Wn(de){return new Nn(de>>16,de>>8&255,de&255)}function At(de){return Wn(de)+""}var ft=Nn.prototype=new Ra;ft.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Pe=this.r,Ke=this.g,vt=this.b,gt=30;return!Pe&&!Ke&&!vt?new Nn(gt,gt,gt):(Pe&&Pe<gt&&(Pe=gt),Ke&&Ke<gt&&(Ke=gt),vt&&vt<gt&&(vt=gt),new Nn(Math.min(255,Pe/de),Math.min(255,Ke/de),Math.min(255,vt/de)))},ft.darker=function(de){return de=Math.pow(.7,arguments.length?de:1),new Nn(de*this.r,de*this.g,de*this.b)},ft.hsl=function(){return Er(this.r,this.g,this.b)},ft.toString=function(){return"#"+pr(this.r)+pr(this.g)+pr(this.b)};function pr(de){return de<16?"0"+Math.max(0,de).toString(16):Math.min(255,de).toString(16)}function Sr(de,Pe,Ke){var vt=0,gt=0,Tt=0,qt,Vt,or;if(qt=/([a-z]+)\((.*)\)/.exec(de=de.toLowerCase()),qt)switch(Vt=qt[2].split(","),qt[1]){case"hsl":return Ke(parseFloat(Vt[0]),parseFloat(Vt[1])/100,parseFloat(Vt[2])/100);case"rgb":return Pe(Gr(Vt[0]),Gr(Vt[1]),Gr(Vt[2]))}return(or=Fr.get(de))?Pe(or.r,or.g,or.b):(de!=null&&de.charAt(0)==="#"&&!isNaN(or=parseInt(de.slice(1),16))&&(de.length===4?(vt=(or&3840)>>4,vt=vt>>4|vt,gt=or&240,gt=gt>>4|gt,Tt=or&15,Tt=Tt<<4|Tt):de.length===7&&(vt=(or&16711680)>>16,gt=(or&65280)>>8,Tt=or&255)),Pe(vt,gt,Tt))}function Er(de,Pe,Ke){var vt=Math.min(de/=255,Pe/=255,Ke/=255),gt=Math.max(de,Pe,Ke),Tt=gt-vt,qt,Vt,or=(gt+vt)/2;return Tt?(Vt=or<.5?Tt/(gt+vt):Tt/(2-gt-vt),de==gt?qt=(Pe-Ke)/Tt+(Pe<Ke?6:0):Pe==gt?qt=(Ke-de)/Tt+2:qt=(de-Pe)/Tt+4,qt*=60):(qt=NaN,Vt=or>0&&or<1?0:qt),new ya(qt,Vt,or)}function _r(de,Pe,Ke){de=Mr(de),Pe=Mr(Pe),Ke=Mr(Ke);var vt=an((.4124564*de+.3575761*Pe+.1804375*Ke)/qr),gt=an((.2126729*de+.7151522*Pe+.072175*Ke)/Jr),Tt=an((.0193339*de+.119192*Pe+.9503041*Ke)/aa);return $t(116*gt-16,500*(vt-gt),200*(gt-Tt))}function Mr(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function Gr(de){var Pe=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Pe*2.55):Pe}var Fr=h.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Fr.forEach(function(de,Pe){Fr.set(de,Wn(Pe))});function pt(de){return typeof de=="function"?de:function(){return de}}h.functor=pt,h.xhr=Kt(F);function Kt(de){return function(Pe,Ke,vt){return arguments.length===2&&typeof Ke=="function"&&(vt=Ke,Ke=null),xr(Pe,Ke,de,vt)}}function xr(de,Pe,Ke,vt){var gt={},Tt=h.dispatch("beforesend","progress","load","error"),qt={},Vt=new XMLHttpRequest,or=null;self.XDomainRequest&&!("withCredentials"in Vt)&&/^(http(s)?:)?\/\//.test(de)&&(Vt=new XDomainRequest),"onload"in Vt?Vt.onload=Vt.onerror=Ir:Vt.onreadystatechange=function(){Vt.readyState>3&&Ir()};function Ir(){var Lr=Vt.status,Zr;if(!Lr&&fa(Vt)||Lr>=200&&Lr<300||Lr===304){try{Zr=Ke.call(gt,Vt)}catch(ia){Tt.error.call(gt,ia);return}Tt.load.call(gt,Zr)}else Tt.error.call(gt,Vt)}return Vt.onprogress=function(Lr){var Zr=h.event;h.event=Lr;try{Tt.progress.call(gt,Vt)}finally{h.event=Zr}},gt.header=function(Lr,Zr){return Lr=(Lr+"").toLowerCase(),arguments.length<2?qt[Lr]:(Zr==null?delete qt[Lr]:qt[Lr]=Zr+"",gt)},gt.mimeType=function(Lr){return arguments.length?(Pe=Lr==null?null:Lr+"",gt):Pe},gt.responseType=function(Lr){return arguments.length?(or=Lr,gt):or},gt.response=function(Lr){return Ke=Lr,gt},["get","post"].forEach(function(Lr){gt[Lr]=function(){return gt.send.apply(gt,[Lr].concat(S(arguments)))}}),gt.send=function(Lr,Zr,ia){if(arguments.length===2&&typeof Zr=="function"&&(ia=Zr,Zr=null),Vt.open(Lr,de,!0),Pe!=null&&!("accept"in qt)&&(qt.accept=Pe+",*/*"),Vt.setRequestHeader)for(var la in qt)Vt.setRequestHeader(la,qt[la]);return Pe!=null&&Vt.overrideMimeType&&Vt.overrideMimeType(Pe),or!=null&&(Vt.responseType=or),ia!=null&>.on("error",ia).on("load",function(nn){ia(null,nn)}),Tt.beforesend.call(gt,Vt),Vt.send(Zr??null),gt},gt.abort=function(){return Vt.abort(),gt},h.rebind(gt,Tt,"on"),vt==null?gt:gt.get(Hr(vt))}function Hr(de){return de.length===1?function(Pe,Ke){de(Pe==null?Ke:null)}:de}function fa(de){var Pe=de.responseType;return Pe&&Pe!=="text"?de.response:de.responseText}h.dsv=function(de,Pe){var Ke=new RegExp('["'+de+`
|
|
2
2
|
]`),vt=de.charCodeAt(0);function gt(Ir,Lr,Zr){arguments.length<3&&(Zr=Lr,Lr=null);var ia=xr(Ir,Pe,Lr==null?Tt:qt(Lr),Zr);return ia.row=function(la){return arguments.length?ia.response((Lr=la)==null?Tt:qt(la)):Lr},ia}function Tt(Ir){return gt.parse(Ir.responseText)}function qt(Ir){return function(Lr){return gt.parse(Lr.responseText,Ir)}}gt.parse=function(Ir,Lr){var Zr;return gt.parseRows(Ir,function(ia,la){if(Zr)return Zr(ia,la-1);var nn=function(da){for(var La={},Oa=ia.length,Qa=0;Qa<Oa;++Qa)La[ia[Qa]]=da[Qa];return La};Zr=Lr?function(da,La){return Lr(nn(da),La)}:nn})},gt.parseRows=function(Ir,Lr){var Zr={},ia={},la=[],nn=Ir.length,da=0,La=0,Oa,Qa;function sn(){if(da>=nn)return ia;if(Qa)return Qa=!1,Zr;var Pn=da;if(Ir.charCodeAt(Pn)===34){for(var si=Pn;si++<nn;)if(Ir.charCodeAt(si)===34){if(Ir.charCodeAt(si+1)!==34)break;++si}da=si+2;var $n=Ir.charCodeAt(si+1);return $n===13?(Qa=!0,Ir.charCodeAt(si+2)===10&&++da):$n===10&&(Qa=!0),Ir.slice(Pn+1,si).replace(/""/g,'"')}for(;da<nn;){var $n=Ir.charCodeAt(da++),ni=1;if($n===10)Qa=!0;else if($n===13)Qa=!0,Ir.charCodeAt(da)===10&&(++da,++ni);else if($n!==vt)continue;return Ir.slice(Pn,da-ni)}return Ir.slice(Pn)}for(;(Oa=sn())!==ia;){for(var Fa=[];Oa!==Zr&&Oa!==ia;)Fa.push(Oa),Oa=sn();Lr&&(Fa=Lr(Fa,La++))==null||la.push(Fa)}return la},gt.format=function(Ir){if(Array.isArray(Ir[0]))return gt.formatRows(Ir);var Lr=new z,Zr=[];return Ir.forEach(function(ia){for(var la in ia)Lr.has(la)||Zr.push(Lr.add(la))}),[Zr.map(or).join(de)].concat(Ir.map(function(ia){return Zr.map(function(la){return or(ia[la])}).join(de)})).join(`
|
|
3
3
|
`)},gt.formatRows=function(Ir){return Ir.map(Vt).join(`
|
|
4
4
|
`)};function Vt(Ir){return Ir.map(or).join(de)}function or(Ir){return Ke.test(Ir)?'"'+Ir.replace(/\"/g,'""')+'"':Ir}return gt},h.csv=h.dsv(",","text/csv"),h.tsv=h.dsv(" ","text/tab-separated-values");var xa,_a,Wr,ha,jn=this[O(this,"requestAnimationFrame")]||function(de){setTimeout(de,17)};h.timer=function(){tn.apply(this,arguments)};function tn(de,Pe,Ke){var vt=arguments.length;vt<2&&(Pe=0),vt<3&&(Ke=Date.now());var gt=Ke+Pe,Tt={c:de,t:gt,n:null};return _a?_a.n=Tt:xa=Tt,_a=Tt,Wr||(ha=clearTimeout(ha),Wr=1,jn(Zn)),Tt}function Zn(){var de=ii(),Pe=pi()-de;Pe>24?(isFinite(Pe)&&(clearTimeout(ha),ha=setTimeout(Zn,Pe)),Wr=0):(Wr=1,jn(Zn))}h.timer.flush=function(){ii(),pi()};function ii(){for(var de=Date.now(),Pe=xa;Pe;)de>=Pe.t&&Pe.c(de-Pe.t)&&(Pe.c=null),Pe=Pe.n;return de}function pi(){for(var de,Pe=xa,Ke=1/0;Pe;)Pe.c?(Pe.t<Ke&&(Ke=Pe.t),Pe=(de=Pe).n):Pe=de?de.n=Pe.n:xa=Pe.n;return _a=de,Ke}h.round=function(de,Pe){return Pe?Math.round(de*(Pe=Math.pow(10,Pe)))/Pe:Math.round(de)},h.geom={};function di(de){return de[0]}function ki(de){return de[1]}h.geom.hull=function(de){var Pe=di,Ke=ki;if(arguments.length)return vt(de);function vt(gt){if(gt.length<3)return[];var Tt=pt(Pe),qt=pt(Ke),Vt,or=gt.length,Ir=[],Lr=[];for(Vt=0;Vt<or;Vt++)Ir.push([+Tt.call(this,gt[Vt],Vt),+qt.call(this,gt[Vt],Vt),Vt]);for(Ir.sort(no),Vt=0;Vt<or;Vt++)Lr.push([Ir[Vt][0],-Ir[Vt][1]]);var Zr=zn(Ir),ia=zn(Lr),la=ia[0]===Zr[0],nn=ia[ia.length-1]===Zr[Zr.length-1],da=[];for(Vt=Zr.length-1;Vt>=0;--Vt)da.push(gt[Ir[Zr[Vt]][2]]);for(Vt=+la;Vt<ia.length-nn;++Vt)da.push(gt[Ir[ia[Vt]][2]]);return da}return vt.x=function(gt){return arguments.length?(Pe=gt,vt):Pe},vt.y=function(gt){return arguments.length?(Ke=gt,vt):Ke},vt};function zn(de){for(var Pe=de.length,Ke=[0,1],vt=2,gt=2;gt<Pe;gt++){for(;vt>1&&xt(de[Ke[vt-2]],de[Ke[vt-1]],de[gt])<=0;)--vt;Ke[vt++]=gt}return Ke.slice(0,vt)}function no(de,Pe){return de[0]-Pe[0]||de[1]-Pe[1]}h.geom.polygon=function(de){return V(de,Xi),de};var Xi=h.geom.polygon.prototype=[];Xi.area=function(){for(var de=-1,Pe=this.length,Ke,vt=this[Pe-1],gt=0;++de<Pe;)Ke=vt,vt=this[de],gt+=Ke[1]*vt[0]-Ke[0]*vt[1];return gt*.5},Xi.centroid=function(de){var Pe=-1,Ke=this.length,vt=0,gt=0,Tt,qt=this[Ke-1],Vt;for(arguments.length||(de=-1/(6*this.area()));++Pe<Ke;)Tt=qt,qt=this[Pe],Vt=Tt[0]*qt[1]-qt[0]*Tt[1],vt+=(Tt[0]+qt[0])*Vt,gt+=(Tt[1]+qt[1])*Vt;return[vt*de,gt*de]},Xi.clip=function(de){for(var Pe,Ke=to(de),vt=-1,gt=this.length-to(this),Tt,qt,Vt=this[gt-1],or,Ir,Lr;++vt<gt;){for(Pe=de.slice(),de.length=0,or=this[vt],Ir=Pe[(qt=Pe.length-Ke)-1],Tt=-1;++Tt<qt;)Lr=Pe[Tt],Go(Lr,Vt,or)?(Go(Ir,Vt,or)||de.push(ho(Ir,Lr,Vt,or)),de.push(Lr)):Go(Ir,Vt,or)&&de.push(ho(Ir,Lr,Vt,or)),Ir=Lr;Ke&&de.push(de[0]),Vt=or}return de};function Go(de,Pe,Ke){return(Ke[0]-Pe[0])*(de[1]-Pe[1])<(Ke[1]-Pe[1])*(de[0]-Pe[0])}function ho(de,Pe,Ke,vt){var gt=de[0],Tt=Ke[0],qt=Pe[0]-gt,Vt=vt[0]-Tt,or=de[1],Ir=Ke[1],Lr=Pe[1]-or,Zr=vt[1]-Ir,ia=(Vt*(or-Ir)-Zr*(gt-Tt))/(Zr*qt-Vt*Lr);return[gt+ia*qt,or+ia*Lr]}function to(de){var Pe=de[0],Ke=de[de.length-1];return!(Pe[0]-Ke[0]||Pe[1]-Ke[1])}var Gi,Ho,jo,is=[],vo,$i,bi=[];function po(){Oo(this),this.edge=this.site=this.circle=null}function os(de){var Pe=is.pop()||new po;return Pe.site=de,Pe}function Ts(de){ss(de),jo.remove(de),is.push(de),Oo(de)}function Es(de){var Pe=de.circle,Ke=Pe.x,vt=Pe.cy,gt={x:Ke,y:vt},Tt=de.P,qt=de.N,Vt=[de];Ts(de);for(var or=Tt;or.circle&&l(Ke-or.circle.x)<We&&l(vt-or.circle.cy)<We;)Tt=or.P,Vt.unshift(or),Ts(or),or=Tt;Vt.unshift(or),ss(or);for(var Ir=qt;Ir.circle&&l(Ke-Ir.circle.x)<We&&l(vt-Ir.circle.cy)<We;)qt=Ir.N,Vt.push(Ir),Ts(Ir),Ir=qt;Vt.push(Ir),ss(Ir);var Lr=Vt.length,Zr;for(Zr=1;Zr<Lr;++Zr)Ir=Vt[Zr],or=Vt[Zr-1],Ri(Ir.edge,or.site,Ir.site,gt);or=Vt[0],Ir=Vt[Lr-1],Ir.edge=Vs(or.site,Ir.site,null,gt),Wo(or),Wo(Ir)}function Mo(de){for(var Pe=de.x,Ke=de.y,vt,gt,Tt,qt,Vt=jo._;Vt;)if(Tt=On(Vt,Ke)-Pe,Tt>We)Vt=Vt.L;else if(qt=Pe-vi(Vt,Ke),qt>We){if(!Vt.R){vt=Vt;break}Vt=Vt.R}else{Tt>-We?(vt=Vt.P,gt=Vt):qt>-We?(vt=Vt,gt=Vt.N):vt=gt=Vt;break}var or=os(de);if(jo.insert(vt,or),!(!vt&&!gt)){if(vt===gt){ss(vt),gt=os(vt.site),jo.insert(or,gt),or.edge=gt.edge=Vs(vt.site,or.site),Wo(vt),Wo(gt);return}if(!gt){or.edge=Vs(vt.site,or.site);return}ss(vt),ss(gt);var Ir=vt.site,Lr=Ir.x,Zr=Ir.y,ia=de.x-Lr,la=de.y-Zr,nn=gt.site,da=nn.x-Lr,La=nn.y-Zr,Oa=2*(ia*La-la*da),Qa=ia*ia+la*la,sn=da*da+La*La,Fa={x:(La*Qa-la*sn)/Oa+Lr,y:(ia*sn-da*Qa)/Oa+Zr};Ri(gt.edge,Ir,nn,Fa),or.edge=Vs(Ir,de,null,Fa),gt.edge=Vs(de,nn,null,Fa),Wo(vt),Wo(gt)}}function On(de,Pe){var Ke=de.site,vt=Ke.x,gt=Ke.y,Tt=gt-Pe;if(!Tt)return vt;var qt=de.P;if(!qt)return-1/0;Ke=qt.site;var Vt=Ke.x,or=Ke.y,Ir=or-Pe;if(!Ir)return Vt;var Lr=Vt-vt,Zr=1/Tt-1/Ir,ia=Lr/Ir;return Zr?(-ia+Math.sqrt(ia*ia-2*Zr*(Lr*Lr/(-2*Ir)-or+Ir/2+gt-Tt/2)))/Zr+vt:(vt+Vt)/2}function vi(de,Pe){var Ke=de.N;if(Ke)return On(Ke,Pe);var vt=de.site;return vt.y===Pe?vt.x:1/0}function As(de){this.site=de,this.edges=[]}As.prototype.prepare=function(){for(var de=this.edges,Pe=de.length,Ke;Pe--;)Ke=de[Pe].edge,(!Ke.b||!Ke.a)&&de.splice(Pe,1);return de.sort(Oi),de.length};function Ro(de){for(var Pe=de[0][0],Ke=de[1][0],vt=de[0][1],gt=de[1][1],Tt,qt,Vt,or,Ir=Ho,Lr=Ir.length,Zr,ia,la,nn,da,La;Lr--;)if(Zr=Ir[Lr],!(!Zr||!Zr.prepare()))for(la=Zr.edges,nn=la.length,ia=0;ia<nn;)La=la[ia].end(),Vt=La.x,or=La.y,da=la[++ia%nn].start(),Tt=da.x,qt=da.y,(l(Vt-Tt)>We||l(or-qt)>We)&&(la.splice(ia,0,new tl(qs(Zr.site,La,l(Vt-Pe)<We&>-or>We?{x:Pe,y:l(Tt-Pe)<We?qt:gt}:l(or-gt)<We&&Ke-Vt>We?{x:l(qt-gt)<We?Tt:Ke,y:gt}:l(Vt-Ke)<We&&or-vt>We?{x:Ke,y:l(Tt-Ke)<We?qt:vt}:l(or-vt)<We&&Vt-Pe>We?{x:l(qt-vt)<We?Tt:Pe,y:vt}:null),Zr.site,null)),++nn)}function Oi(de,Pe){return Pe.angle-de.angle}function ks(){Oo(this),this.x=this.y=this.arc=this.site=this.cy=null}function Wo(de){var Pe=de.P,Ke=de.N;if(!(!Pe||!Ke)){var vt=Pe.site,gt=de.site,Tt=Ke.site;if(vt!==Tt){var qt=gt.x,Vt=gt.y,or=vt.x-qt,Ir=vt.y-Vt,Lr=Tt.x-qt,La=Tt.y-Vt,Zr=2*(or*La-Ir*Lr);if(!(Zr>=-Ae)){var ia=or*or+Ir*Ir,la=Lr*Lr+La*La,nn=(La*ia-Ir*la)/Zr,da=(or*la-Lr*ia)/Zr,La=da+Vt,Oa=bi.pop()||new ks;Oa.arc=de,Oa.site=gt,Oa.x=nn+qt,Oa.y=La+Math.sqrt(nn*nn+da*da),Oa.cy=La,de.circle=Oa;for(var Qa=null,sn=$i._;sn;)if(Oa.y<sn.y||Oa.y===sn.y&&Oa.x<=sn.x)if(sn.L)sn=sn.L;else{Qa=sn.P;break}else if(sn.R)sn=sn.R;else{Qa=sn;break}$i.insert(Qa,Oa),Qa||(vo=Oa)}}}}function ss(de){var Pe=de.circle;Pe&&(Pe.P||(vo=Pe.N),$i.remove(Pe),bi.push(Pe),Oo(Pe),de.circle=null)}function hl(de,Pe,Ke,vt){return function(gt){var Tt=gt.a,qt=gt.b,Vt=Tt.x,or=Tt.y,Ir=qt.x,Lr=qt.y,Zr=0,ia=1,la=Ir-Vt,nn=Lr-or,da;if(da=de-Vt,!(!la&&da>0)){if(da/=la,la<0){if(da<Zr)return;da<ia&&(ia=da)}else if(la>0){if(da>ia)return;da>Zr&&(Zr=da)}if(da=Ke-Vt,!(!la&&da<0)){if(da/=la,la<0){if(da>ia)return;da>Zr&&(Zr=da)}else if(la>0){if(da<Zr)return;da<ia&&(ia=da)}if(da=Pe-or,!(!nn&&da>0)){if(da/=nn,nn<0){if(da<Zr)return;da<ia&&(ia=da)}else if(nn>0){if(da>ia)return;da>Zr&&(Zr=da)}if(da=vt-or,!(!nn&&da<0)){if(da/=nn,nn<0){if(da>ia)return;da>Zr&&(Zr=da)}else if(nn>0){if(da<Zr)return;da<ia&&(ia=da)}return Zr>0&&(gt.a={x:Vt+Zr*la,y:or+Zr*nn}),ia<1&&(gt.b={x:Vt+ia*la,y:or+ia*nn}),gt}}}}}}function fi(de){for(var Pe=Gi,Ke=hl(de[0][0],de[0][1],de[1][0],de[1][1]),vt=Pe.length,gt;vt--;)gt=Pe[vt],(!_o(gt,de)||!Ke(gt)||l(gt.a.x-gt.b.x)<We&&l(gt.a.y-gt.b.y)<We)&&(gt.a=gt.b=null,Pe.splice(vt,1))}function _o(de,Pe){var Ke=de.b;if(Ke)return!0;var vt=de.a,gt=Pe[0][0],Tt=Pe[1][0],qt=Pe[0][1],Vt=Pe[1][1],or=de.l,Ir=de.r,Lr=or.x,Zr=or.y,ia=Ir.x,la=Ir.y,nn=(Lr+ia)/2,da=(Zr+la)/2,La,Oa;if(la===Zr){if(nn<gt||nn>=Tt)return;if(Lr>ia){if(!vt)vt={x:nn,y:qt};else if(vt.y>=Vt)return;Ke={x:nn,y:Vt}}else{if(!vt)vt={x:nn,y:Vt};else if(vt.y<qt)return;Ke={x:nn,y:qt}}}else if(La=(Lr-ia)/(la-Zr),Oa=da-La*nn,La<-1||La>1)if(Lr>ia){if(!vt)vt={x:(qt-Oa)/La,y:qt};else if(vt.y>=Vt)return;Ke={x:(Vt-Oa)/La,y:Vt}}else{if(!vt)vt={x:(Vt-Oa)/La,y:Vt};else if(vt.y<qt)return;Ke={x:(qt-Oa)/La,y:qt}}else if(Zr<la){if(!vt)vt={x:gt,y:La*gt+Oa};else if(vt.x>=Tt)return;Ke={x:Tt,y:La*Tt+Oa}}else{if(!vt)vt={x:Tt,y:La*Tt+Oa};else if(vt.x<gt)return;Ke={x:gt,y:La*gt+Oa}}return de.a=vt,de.b=Ke,!0}function io(de,Pe){this.l=de,this.r=Pe,this.a=this.b=null}function Vs(de,Pe,Ke,vt){var gt=new io(de,Pe);return Gi.push(gt),Ke&&Ri(gt,de,Pe,Ke),vt&&Ri(gt,Pe,de,vt),Ho[de.i].edges.push(new tl(gt,de,Pe)),Ho[Pe.i].edges.push(new tl(gt,Pe,de)),gt}function qs(de,Pe,Ke){var vt=new io(de,null);return vt.a=Pe,vt.b=Ke,Gi.push(vt),vt}function Ri(de,Pe,Ke,vt){!de.a&&!de.b?(de.a=vt,de.l=Pe,de.r=Ke):de.l===Ke?de.b=vt:de.a=vt}function tl(de,Pe,Ke){var vt=de.a,gt=de.b;this.edge=de,this.site=Pe,this.angle=Ke?Math.atan2(Ke.y-Pe.y,Ke.x-Pe.x):de.l===Pe?Math.atan2(gt.x-vt.x,vt.y-gt.y):Math.atan2(vt.x-gt.x,gt.y-vt.y)}tl.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function il(){this._=null}function Oo(de){de.U=de.C=de.L=de.R=de.P=de.N=null}il.prototype={insert:function(de,Pe){var Ke,vt,gt;if(de){if(Pe.P=de,Pe.N=de.N,de.N&&(de.N.P=Pe),de.N=Pe,de.R){for(de=de.R;de.L;)de=de.L;de.L=Pe}else de.R=Pe;Ke=de}else this._?(de=Bs(this._),Pe.P=null,Pe.N=de,de.P=de.L=Pe,Ke=de):(Pe.P=Pe.N=null,this._=Pe,Ke=null);for(Pe.L=Pe.R=null,Pe.U=Ke,Pe.C=!0,de=Pe;Ke&&Ke.C;)vt=Ke.U,Ke===vt.L?(gt=vt.R,gt&>.C?(Ke.C=gt.C=!1,vt.C=!0,de=vt):(de===Ke.R&&(ms(this,Ke),de=Ke,Ke=de.U),Ke.C=!1,vt.C=!0,Rs(this,vt))):(gt=vt.L,gt&>.C?(Ke.C=gt.C=!1,vt.C=!0,de=vt):(de===Ke.L&&(Rs(this,Ke),de=Ke,Ke=de.U),Ke.C=!1,vt.C=!0,ms(this,vt))),Ke=de.U;this._.C=!1},remove:function(de){de.N&&(de.N.P=de.P),de.P&&(de.P.N=de.N),de.N=de.P=null;var Pe=de.U,Ke,vt=de.L,gt=de.R,Tt,qt;if(vt?gt?Tt=Bs(gt):Tt=vt:Tt=gt,Pe?Pe.L===de?Pe.L=Tt:Pe.R=Tt:this._=Tt,vt&>?(qt=Tt.C,Tt.C=de.C,Tt.L=vt,vt.U=Tt,Tt!==gt?(Pe=Tt.U,Tt.U=de.U,de=Tt.R,Pe.L=de,Tt.R=gt,gt.U=Tt):(Tt.U=Pe,Pe=Tt,de=Tt.R)):(qt=de.C,de=Tt),de&&(de.U=Pe),!qt){if(de&&de.C){de.C=!1;return}do{if(de===this._)break;if(de===Pe.L){if(Ke=Pe.R,Ke.C&&(Ke.C=!1,Pe.C=!0,ms(this,Pe),Ke=Pe.R),Ke.L&&Ke.L.C||Ke.R&&Ke.R.C){(!Ke.R||!Ke.R.C)&&(Ke.L.C=!1,Ke.C=!0,Rs(this,Ke),Ke=Pe.R),Ke.C=Pe.C,Pe.C=Ke.R.C=!1,ms(this,Pe),de=this._;break}}else if(Ke=Pe.L,Ke.C&&(Ke.C=!1,Pe.C=!0,Rs(this,Pe),Ke=Pe.L),Ke.L&&Ke.L.C||Ke.R&&Ke.R.C){(!Ke.L||!Ke.L.C)&&(Ke.R.C=!1,Ke.C=!0,ms(this,Ke),Ke=Pe.L),Ke.C=Pe.C,Pe.C=Ke.L.C=!1,Rs(this,Pe),de=this._;break}Ke.C=!0,de=Pe,Pe=Pe.U}while(!de.C);de&&(de.C=!1)}}};function ms(de,Pe){var Ke=Pe,vt=Pe.R,gt=Ke.U;gt?gt.L===Ke?gt.L=vt:gt.R=vt:de._=vt,vt.U=gt,Ke.U=vt,Ke.R=vt.L,Ke.R&&(Ke.R.U=Ke),vt.L=Ke}function Rs(de,Pe){var Ke=Pe,vt=Pe.L,gt=Ke.U;gt?gt.L===Ke?gt.L=vt:gt.R=vt:de._=vt,vt.U=gt,Ke.U=vt,Ke.L=vt.R,Ke.L&&(Ke.L.U=Ke),vt.R=Ke}function Bs(de){for(;de.L;)de=de.L;return de}function Pl(de,Pe){var Ke=de.sort(Fu).pop(),vt,gt,Tt;for(Gi=[],Ho=new Array(de.length),jo=new il,$i=new il;;)if(Tt=vo,Ke&&(!Tt||Ke.y<Tt.y||Ke.y===Tt.y&&Ke.x<Tt.x))(Ke.x!==vt||Ke.y!==gt)&&(Ho[Ke.i]=new As(Ke),Mo(Ke),vt=Ke.x,gt=Ke.y),Ke=de.pop();else if(Tt)Es(Tt.arc);else break;Pe&&(fi(Pe),Ro(Pe));var qt={cells:Ho,edges:Gi};return jo=$i=Gi=Ho=null,qt}function Fu(de,Pe){return Pe.y-de.y||Pe.x-de.x}h.geom.voronoi=function(de){var Pe=di,Ke=ki,vt=Pe,gt=Ke,Tt=yu;if(de)return qt(de);function qt(or){var Ir=new Array(or.length),Lr=Tt[0][0],Zr=Tt[0][1],ia=Tt[1][0],la=Tt[1][1];return Pl(Vt(or),Tt).cells.forEach(function(nn,da){var La=nn.edges,Oa=nn.site,Qa=Ir[da]=La.length?La.map(function(sn){var Fa=sn.start();return[Fa.x,Fa.y]}):Oa.x>=Lr&&Oa.x<=ia&&Oa.y>=Zr&&Oa.y<=la?[[Lr,la],[ia,la],[ia,Zr],[Lr,Zr]]:[];Qa.point=or[da]}),Ir}function Vt(or){return or.map(function(Ir,Lr){return{x:Math.round(vt(Ir,Lr)/We)*We,y:Math.round(gt(Ir,Lr)/We)*We,i:Lr}})}return qt.links=function(or){return Pl(Vt(or)).edges.filter(function(Ir){return Ir.l&&Ir.r}).map(function(Ir){return{source:or[Ir.l.i],target:or[Ir.r.i]}})},qt.triangles=function(or){var Ir=[];return Pl(Vt(or)).cells.forEach(function(Lr,Zr){for(var ia=Lr.site,la=Lr.edges.sort(Oi),nn=-1,da=la.length,La,Oa=la[da-1].edge,Qa=Oa.l===ia?Oa.r:Oa.l;++nn<da;)La=Qa,Oa=la[nn].edge,Qa=Oa.l===ia?Oa.r:Oa.l,Zr<La.i&&Zr<Qa.i&&Su(ia,La,Qa)<0&&Ir.push([or[Zr],or[La.i],or[Qa.i]])}),Ir},qt.x=function(or){return arguments.length?(vt=pt(Pe=or),qt):Pe},qt.y=function(or){return arguments.length?(gt=pt(Ke=or),qt):Ke},qt.clipExtent=function(or){return arguments.length?(Tt=or??yu,qt):Tt===yu?null:Tt},qt.size=function(or){return arguments.length?qt.clipExtent(or&&[[0,0],or]):Tt===yu?null:Tt&&Tt[1]},qt};var yu=[[-1e6,-1e6],[1e6,1e6]];function Su(de,Pe,Ke){return(de.x-Ke.x)*(Pe.y-de.y)-(de.x-Pe.x)*(Ke.y-de.y)}h.geom.delaunay=function(de){return h.geom.voronoi().triangles(de)},h.geom.quadtree=function(de,Pe,Ke,vt,gt){var Tt=di,qt=ki,Vt;if(Vt=arguments.length)return Tt=Zc,qt=Oc,Vt===3&&(gt=Ke,vt=Pe,Ke=Pe=0),or(de);function or(Ir){var Lr,Zr=pt(Tt),ia=pt(qt),la,nn,da,La,Oa,Qa,sn,Fa;if(Pe!=null)Oa=Pe,Qa=Ke,sn=vt,Fa=gt;else if(sn=Fa=-(Oa=Qa=1/0),la=[],nn=[],La=Ir.length,Vt)for(da=0;da<La;++da)Lr=Ir[da],Lr.x<Oa&&(Oa=Lr.x),Lr.y<Qa&&(Qa=Lr.y),Lr.x>sn&&(sn=Lr.x),Lr.y>Fa&&(Fa=Lr.y),la.push(Lr.x),nn.push(Lr.y);else for(da=0;da<La;++da){var Pn=+Zr(Lr=Ir[da],da),si=+ia(Lr,da);Pn<Oa&&(Oa=Pn),si<Qa&&(Qa=si),Pn>sn&&(sn=Pn),si>Fa&&(Fa=si),la.push(Pn),nn.push(si)}var $n=sn-Oa,ni=Fa-Qa;$n>ni?Fa=Qa+$n:sn=Oa+ni;function Ai(Ii,uo,ts,wl,Ks,gi,Lo,Ko){if(!(isNaN(ts)||isNaN(wl)))if(Ii.leaf){var Ws=Ii.x,Ps=Ii.y;if(Ws!=null)if(l(Ws-ts)+l(Ps-wl)<.01)Ci(Ii,uo,ts,wl,Ks,gi,Lo,Ko);else{var ru=Ii.point;Ii.x=Ii.y=Ii.point=null,Ci(Ii,ru,Ws,Ps,Ks,gi,Lo,Ko),Ci(Ii,uo,ts,wl,Ks,gi,Lo,Ko)}else Ii.x=ts,Ii.y=wl,Ii.point=uo}else Ci(Ii,uo,ts,wl,Ks,gi,Lo,Ko)}function Ci(Ii,uo,ts,wl,Ks,gi,Lo,Ko){var Ws=(Ks+Lo)*.5,Ps=(gi+Ko)*.5,ru=ts>=Ws,bs=wl>=Ps,Xs=bs<<1|ru;Ii.leaf=!1,Ii=Ii.nodes[Xs]||(Ii.nodes[Xs]=ys()),ru?Ks=Ws:Lo=Ws,bs?gi=Ps:Ko=Ps,Ai(Ii,uo,ts,wl,Ks,gi,Lo,Ko)}var Xo=ys();if(Xo.add=function(Ii){Ai(Xo,Ii,+Zr(Ii,++da),+ia(Ii,da),Oa,Qa,sn,Fa)},Xo.visit=function(Ii){su(Ii,Xo,Oa,Qa,sn,Fa)},Xo.find=function(Ii){return Yc(Xo,Ii[0],Ii[1],Oa,Qa,sn,Fa)},da=-1,Pe==null){for(;++da<La;)Ai(Xo,Ir[da],la[da],nn[da],Oa,Qa,sn,Fa);--da}else Ir.forEach(Xo.add);return la=nn=Ir=Lr=null,Xo}return or.x=function(Ir){return arguments.length?(Tt=Ir,or):Tt},or.y=function(Ir){return arguments.length?(qt=Ir,or):qt},or.extent=function(Ir){return arguments.length?(Ir==null?Pe=Ke=vt=gt=null:(Pe=+Ir[0][0],Ke=+Ir[0][1],vt=+Ir[1][0],gt=+Ir[1][1]),or):Pe==null?null:[[Pe,Ke],[vt,gt]]},or.size=function(Ir){return arguments.length?(Ir==null?Pe=Ke=vt=gt=null:(Pe=Ke=0,vt=+Ir[0],gt=+Ir[1]),or):Pe==null?null:[vt-Pe,gt-Ke]},or};function Zc(de){return de.x}function Oc(de){return de.y}function ys(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function su(de,Pe,Ke,vt,gt,Tt){if(!de(Pe,Ke,vt,gt,Tt)){var qt=(Ke+gt)*.5,Vt=(vt+Tt)*.5,or=Pe.nodes;or[0]&&su(de,or[0],Ke,vt,qt,Vt),or[1]&&su(de,or[1],qt,vt,gt,Vt),or[2]&&su(de,or[2],Ke,Vt,qt,Tt),or[3]&&su(de,or[3],qt,Vt,gt,Tt)}}function Yc(de,Pe,Ke,vt,gt,Tt,qt){var Vt=1/0,or;return(function Ir(Lr,Zr,ia,la,nn){if(!(Zr>Tt||ia>qt||la<vt||nn<gt)){if(da=Lr.point){var da,La=Pe-Lr.x,Oa=Ke-Lr.y,Qa=La*La+Oa*Oa;if(Qa<Vt){var sn=Math.sqrt(Vt=Qa);vt=Pe-sn,gt=Ke-sn,Tt=Pe+sn,qt=Ke+sn,or=da}}for(var Fa=Lr.nodes,Pn=(Zr+la)*.5,si=(ia+nn)*.5,$n=Pe>=Pn,ni=Ke>=si,Ai=ni<<1|$n,Ci=Ai+4;Ai<Ci;++Ai)if(Lr=Fa[Ai&3])switch(Ai&3){case 0:Ir(Lr,Zr,ia,Pn,si);break;case 1:Ir(Lr,Pn,ia,la,si);break;case 2:Ir(Lr,Zr,si,Pn,nn);break;case 3:Ir(Lr,Pn,si,la,nn);break}}})(de,vt,gt,Tt,qt),or}h.interpolateRgb=Ul;function Ul(de,Pe){de=h.rgb(de),Pe=h.rgb(Pe);var Ke=de.r,vt=de.g,gt=de.b,Tt=Pe.r-Ke,qt=Pe.g-vt,Vt=Pe.b-gt;return function(or){return"#"+pr(Math.round(Ke+Tt*or))+pr(Math.round(vt+qt*or))+pr(Math.round(gt+Vt*or))}}h.interpolateObject=Il;function Il(de,Pe){var Ke={},vt={},gt;for(gt in de)gt in Pe?Ke[gt]=Vo(de[gt],Pe[gt]):vt[gt]=de[gt];for(gt in Pe)gt in de||(vt[gt]=Pe[gt]);return function(Tt){for(gt in Ke)vt[gt]=Ke[gt](Tt);return vt}}h.interpolateNumber=jl;function jl(de,Pe){return de=+de,Pe=+Pe,function(Ke){return de*(1-Ke)+Pe*Ke}}h.interpolateString=Mu;function Mu(de,Pe){var Ke=Zs.lastIndex=Rl.lastIndex=0,vt,gt,Tt,qt=-1,Vt=[],or=[];for(de=de+"",Pe=Pe+"";(vt=Zs.exec(de))&&(gt=Rl.exec(Pe));)(Tt=gt.index)>Ke&&(Tt=Pe.slice(Ke,Tt),Vt[qt]?Vt[qt]+=Tt:Vt[++qt]=Tt),(vt=vt[0])===(gt=gt[0])?Vt[qt]?Vt[qt]+=gt:Vt[++qt]=gt:(Vt[++qt]=null,or.push({i:qt,x:jl(vt,gt)})),Ke=Rl.lastIndex;return Ke<Pe.length&&(Tt=Pe.slice(Ke),Vt[qt]?Vt[qt]+=Tt:Vt[++qt]=Tt),Vt.length<2?or[0]?(Pe=or[0].x,function(Ir){return Pe(Ir)+""}):function(){return Pe}:(Pe=or.length,function(Ir){for(var Lr=0,Zr;Lr<Pe;++Lr)Vt[(Zr=or[Lr]).i]=Zr.x(Ir);return Vt.join("")})}var Zs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rl=new RegExp(Zs.source,"g");h.interpolate=Vo;function Vo(de,Pe){for(var Ke=h.interpolators.length,vt;--Ke>=0&&!(vt=h.interpolators[Ke](de,Pe)););return vt}h.interpolators=[function(de,Pe){var Ke=typeof Pe;return(Ke==="string"?Fr.has(Pe.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Pe)?Ul:Mu:Pe instanceof Ra?Ul:Array.isArray(Pe)?Cs:Ke==="object"&&isNaN(Pe)?Il:jl)(de,Pe)}],h.interpolateArray=Cs;function Cs(de,Pe){var Ke=[],vt=[],gt=de.length,Tt=Pe.length,qt=Math.min(de.length,Pe.length),Vt;for(Vt=0;Vt<qt;++Vt)Ke.push(Vo(de[Vt],Pe[Vt]));for(;Vt<gt;++Vt)vt[Vt]=de[Vt];for(;Vt<Tt;++Vt)vt[Vt]=Pe[Vt];return function(or){for(Vt=0;Vt<qt;++Vt)vt[Vt]=Ke[Vt](or);return vt}}var Yu=function(){return F},Ql=h.map({linear:Yu,poly:_c,quad:function(){return jf},cubic:function(){return hs},sin:function(){return Eu},exp:function(){return Al},circle:function(){return Kc},elastic:sc,back:Lc,bounce:function(){return Dl}}),oc=h.map({in:F,out:kf,"in-out":Bo,"out-in":function(de){return Bo(kf(de))}});h.ease=function(de){var Pe=de.indexOf("-"),Ke=Pe>=0?de.slice(0,Pe):de,vt=Pe>=0?de.slice(Pe+1):"in";return Ke=Ql.get(Ke)||Yu,vt=oc.get(vt)||F,rl(vt(Ke.apply(null,b.call(arguments,1))))};function rl(de){return function(Pe){return Pe<=0?0:Pe>=1?1:de(Pe)}}function kf(de){return function(Pe){return 1-de(1-Pe)}}function Bo(de){return function(Pe){return .5*(Pe<.5?de(2*Pe):2-de(2-2*Pe))}}function jf(de){return de*de}function hs(de){return de*de*de}function Fi(de){if(de<=0)return 0;if(de>=1)return 1;var Pe=de*de,Ke=Pe*de;return 4*(de<.5?Ke:3*(de-Pe)+Ke-.75)}function _c(de){return function(Pe){return Math.pow(Pe,de)}}function Eu(de){return 1-Math.cos(de*Ue)}function Al(de){return Math.pow(2,10*(de-1))}function Kc(de){return 1-Math.sqrt(1-de*de)}function sc(de,Pe){var Ke;return arguments.length<2&&(Pe=.45),arguments.length?Ke=Pe/pe*Math.asin(1/de):(de=1,Ke=Pe/4),function(vt){return 1+de*Math.pow(2,-10*vt)*Math.sin((vt-Ke)*pe/Pe)}}function Lc(de){return de||(de=1.70158),function(Pe){return Pe*Pe*((de+1)*Pe-de)}}function Dl(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}h.interpolateHcl=yf;function yf(de,Pe){de=h.hcl(de),Pe=h.hcl(Pe);var Ke=de.h,vt=de.c,gt=de.l,Tt=Pe.h-Ke,qt=Pe.c-vt,Vt=Pe.l-gt;return isNaN(qt)&&(qt=0,vt=isNaN(vt)?Pe.c:vt),isNaN(Tt)?(Tt=0,Ke=isNaN(Ke)?Pe.h:Ke):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(or){return Zt(Ke+Tt*or,vt+qt*or,gt+Vt*or)+""}}h.interpolateHsl=rf;function rf(de,Pe){de=h.hsl(de),Pe=h.hsl(Pe);var Ke=de.h,vt=de.s,gt=de.l,Tt=Pe.h-Ke,qt=Pe.s-vt,Vt=Pe.l-gt;return isNaN(qt)&&(qt=0,vt=isNaN(vt)?Pe.s:vt),isNaN(Tt)?(Tt=0,Ke=isNaN(Ke)?Pe.h:Ke):Tt>180?Tt-=360:Tt<-180&&(Tt+=360),function(or){return mn(Ke+Tt*or,vt+qt*or,gt+Vt*or)+""}}h.interpolateLab=Pc;function Pc(de,Pe){de=h.lab(de),Pe=h.lab(Pe);var Ke=de.l,vt=de.a,gt=de.b,Tt=Pe.l-Ke,qt=Pe.a-vt,Vt=Pe.b-gt;return function(or){return Ha(Ke+Tt*or,vt+qt*or,gt+Vt*or)+""}}h.interpolateRound=lc;function lc(de,Pe){return Pe-=de,function(Ke){return Math.round(de+Pe*Ke)}}h.transform=function(de){var Pe=E.createElementNS(h.ns.prefix.svg,"g");return(h.transform=function(Ke){if(Ke!=null){Pe.setAttribute("transform",Ke);var vt=Pe.transform.baseVal.consolidate()}return new $c(vt?vt.matrix:Ku)})(de)};function $c(de){var Pe=[de.a,de.b],Ke=[de.c,de.d],vt=ku(Pe),gt=Jc(Pe,Ke),Tt=ku(af(Ke,Pe,-gt))||0;Pe[0]*Ke[1]<Ke[0]*Pe[1]&&(Pe[0]*=-1,Pe[1]*=-1,vt*=-1,gt*=-1),this.rotate=(vt?Math.atan2(Pe[1],Pe[0]):Math.atan2(-Ke[0],Ke[1]))*bt,this.translate=[de.e,de.f],this.scale=[vt,Tt],this.skew=Tt?Math.atan2(gt,Tt)*bt:0}$c.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function Jc(de,Pe){return de[0]*Pe[0]+de[1]*Pe[1]}function ku(de){var Pe=Math.sqrt(Jc(de,de));return Pe&&(de[0]/=Pe,de[1]/=Pe),Pe}function af(de,Pe,Ke){return de[0]+=Ke*Pe[0],de[1]+=Ke*Pe[1],de}var Ku={a:1,b:0,c:0,d:1,e:0,f:0};h.interpolateTransform=Bc;function Ou(de){return de.length?de.pop()+",":""}function zl(de,Pe,Ke,vt){if(de[0]!==Pe[0]||de[1]!==Pe[1]){var gt=Ke.push("translate(",null,",",null,")");vt.push({i:gt-4,x:jl(de[0],Pe[0])},{i:gt-2,x:jl(de[1],Pe[1])})}else(Pe[0]||Pe[1])&&Ke.push("translate("+Pe+")")}function pc(de,Pe,Ke,vt){de!==Pe?(de-Pe>180?Pe+=360:Pe-de>180&&(de+=360),vt.push({i:Ke.push(Ou(Ke)+"rotate(",null,")")-2,x:jl(de,Pe)})):Pe&&Ke.push(Ou(Ke)+"rotate("+Pe+")")}function Qc(de,Pe,Ke,vt){de!==Pe?vt.push({i:Ke.push(Ou(Ke)+"skewX(",null,")")-2,x:jl(de,Pe)}):Pe&&Ke.push(Ou(Ke)+"skewX("+Pe+")")}function Ds(de,Pe,Ke,vt){if(de[0]!==Pe[0]||de[1]!==Pe[1]){var gt=Ke.push(Ou(Ke)+"scale(",null,",",null,")");vt.push({i:gt-4,x:jl(de[0],Pe[0])},{i:gt-2,x:jl(de[1],Pe[1])})}else(Pe[0]!==1||Pe[1]!==1)&&Ke.push(Ou(Ke)+"scale("+Pe+")")}function Bc(de,Pe){var Ke=[],vt=[];return de=h.transform(de),Pe=h.transform(Pe),zl(de.translate,Pe.translate,Ke,vt),pc(de.rotate,Pe.rotate,Ke,vt),Qc(de.skew,Pe.skew,Ke,vt),Ds(de.scale,Pe.scale,Ke,vt),de=Pe=null,function(gt){for(var Tt=-1,qt=vt.length,Vt;++Tt<qt;)Ke[(Vt=vt[Tt]).i]=Vt.x(gt);return Ke.join("")}}function Cf(de,Pe){return Pe=(Pe-=de=+de)||1/Pe,function(Ke){return(Ke-de)/Pe}}function nf(de,Pe){return Pe=(Pe-=de=+de)||1/Pe,function(Ke){return Math.max(0,Math.min(1,(Ke-de)/Pe))}}h.layout={},h.layout.bundle=function(){return function(de){for(var Pe=[],Ke=-1,vt=de.length;++Ke<vt;)Pe.push(Ic(de[Ke]));return Pe}};function Ic(de){for(var Pe=de.source,Ke=de.target,vt=lu(Pe,Ke),gt=[Pe];Pe!==vt;)Pe=Pe.parent,gt.push(Pe);for(var Tt=gt.length;Ke!==vt;)gt.splice(Tt,0,Ke),Ke=Ke.parent;return gt}function of(de){for(var Pe=[],Ke=de.parent;Ke!=null;)Pe.push(de),de=Ke,Ke=Ke.parent;return Pe.push(de),Pe}function lu(de,Pe){if(de===Pe)return de;for(var Ke=of(de),vt=of(Pe),gt=Ke.pop(),Tt=vt.pop(),qt=null;gt===Tt;)qt=gt,gt=Ke.pop(),Tt=vt.pop();return qt}h.layout.chord=function(){var de={},Pe,Ke,vt,gt,Tt=0,qt,Vt,or;function Ir(){var Zr={},ia=[],la=h.range(gt),nn=[],da,La,Oa,Qa,sn;for(Pe=[],Ke=[],da=0,Qa=-1;++Qa<gt;){for(La=0,sn=-1;++sn<gt;)La+=vt[Qa][sn];ia.push(La),nn.push(h.range(gt)),da+=La}for(qt&&la.sort(function(Xo,Ii){return qt(ia[Xo],ia[Ii])}),Vt&&nn.forEach(function(Xo,Ii){Xo.sort(function(uo,ts){return Vt(vt[Ii][uo],vt[Ii][ts])})}),da=(pe-Tt*gt)/da,La=0,Qa=-1;++Qa<gt;){for(Oa=La,sn=-1;++sn<gt;){var Fa=la[Qa],Pn=nn[Fa][sn],si=vt[Fa][Pn],$n=La,ni=La+=si*da;Zr[Fa+"-"+Pn]={index:Fa,subindex:Pn,startAngle:$n,endAngle:ni,value:si}}Ke[Fa]={index:Fa,startAngle:Oa,endAngle:La,value:ia[Fa]},La+=Tt}for(Qa=-1;++Qa<gt;)for(sn=Qa-1;++sn<gt;){var Ai=Zr[Qa+"-"+sn],Ci=Zr[sn+"-"+Qa];(Ai.value||Ci.value)&&Pe.push(Ai.value<Ci.value?{source:Ci,target:Ai}:{source:Ai,target:Ci})}or&&Lr()}function Lr(){Pe.sort(function(Zr,ia){return or((Zr.source.value+Zr.target.value)/2,(ia.source.value+ia.target.value)/2)})}return de.matrix=function(Zr){return arguments.length?(gt=(vt=Zr)&&vt.length,Pe=Ke=null,de):vt},de.padding=function(Zr){return arguments.length?(Tt=Zr,Pe=Ke=null,de):Tt},de.sortGroups=function(Zr){return arguments.length?(qt=Zr,Pe=Ke=null,de):qt},de.sortSubgroups=function(Zr){return arguments.length?(Vt=Zr,Pe=null,de):Vt},de.sortChords=function(Zr){return arguments.length?(or=Zr,Pe&&Lr(),de):or},de.chords=function(){return Pe||Ir(),Pe},de.groups=function(){return Ke||Ir(),Ke},de},h.layout.force=function(){var de={},Pe=h.dispatch("start","tick","end"),Ke,vt=[1,1],gt,Tt,qt=.9,Vt=$u,or=Yl,Ir=-30,Lr=cu,Zr=.1,ia=.64,la=[],nn=[],da,La,Oa;function Qa(Fa){return function(Pn,si,$n,ni){if(Pn.point!==Fa){var Ai=Pn.cx-Fa.x,Ci=Pn.cy-Fa.y,Xo=ni-si,Ii=Ai*Ai+Ci*Ci;if(Xo*Xo/ia<Ii){if(Ii<Lr){var uo=Pn.charge/Ii;Fa.px-=Ai*uo,Fa.py-=Ci*uo}return!0}if(Pn.point&&Ii&&Ii<Lr){var uo=Pn.pointCharge/Ii;Fa.px-=Ai*uo,Fa.py-=Ci*uo}}return!Pn.charge}}de.tick=function(){if((Tt*=.99)<.005)return Ke=null,Pe.end({type:"end",alpha:Tt=0}),!0;var Fa=la.length,Pn=nn.length,si,$n,ni,Ai,Ci,Xo,Ii,uo,ts;for($n=0;$n<Pn;++$n)ni=nn[$n],Ai=ni.source,Ci=ni.target,uo=Ci.x-Ai.x,ts=Ci.y-Ai.y,(Xo=uo*uo+ts*ts)&&(Xo=Tt*La[$n]*((Xo=Math.sqrt(Xo))-da[$n])/Xo,uo*=Xo,ts*=Xo,Ci.x-=uo*(Ii=Ai.weight+Ci.weight?Ai.weight/(Ai.weight+Ci.weight):.5),Ci.y-=ts*Ii,Ai.x+=uo*(Ii=1-Ii),Ai.y+=ts*Ii);if((Ii=Tt*Zr)&&(uo=vt[0]/2,ts=vt[1]/2,$n=-1,Ii))for(;++$n<Fa;)ni=la[$n],ni.x+=(uo-ni.x)*Ii,ni.y+=(ts-ni.y)*Ii;if(Ir)for(Ys(si=h.geom.quadtree(la),Tt,Oa),$n=-1;++$n<Fa;)(ni=la[$n]).fixed||si.visit(Qa(ni));for($n=-1;++$n<Fa;)ni=la[$n],ni.fixed?(ni.x=ni.px,ni.y=ni.py):(ni.x-=(ni.px-(ni.px=ni.x))*qt,ni.y-=(ni.py-(ni.py=ni.y))*qt);Pe.tick({type:"tick",alpha:Tt})},de.nodes=function(Fa){return arguments.length?(la=Fa,de):la},de.links=function(Fa){return arguments.length?(nn=Fa,de):nn},de.size=function(Fa){return arguments.length?(vt=Fa,de):vt},de.linkDistance=function(Fa){return arguments.length?(Vt=typeof Fa=="function"?Fa:+Fa,de):Vt},de.distance=de.linkDistance,de.linkStrength=function(Fa){return arguments.length?(or=typeof Fa=="function"?Fa:+Fa,de):or},de.friction=function(Fa){return arguments.length?(qt=+Fa,de):qt},de.charge=function(Fa){return arguments.length?(Ir=typeof Fa=="function"?Fa:+Fa,de):Ir},de.chargeDistance=function(Fa){return arguments.length?(Lr=Fa*Fa,de):Math.sqrt(Lr)},de.gravity=function(Fa){return arguments.length?(Zr=+Fa,de):Zr},de.theta=function(Fa){return arguments.length?(ia=Fa*Fa,de):Math.sqrt(ia)},de.alpha=function(Fa){return arguments.length?(Fa=+Fa,Tt?Fa>0?Tt=Fa:(Ke.c=null,Ke.t=NaN,Ke=null,Pe.end({type:"end",alpha:Tt=0})):Fa>0&&(Pe.start({type:"start",alpha:Tt=Fa}),Ke=tn(de.tick)),de):Tt},de.start=function(){var Fa,Pn=la.length,si=nn.length,$n=vt[0],ni=vt[1],Ai,Ci;for(Fa=0;Fa<Pn;++Fa)(Ci=la[Fa]).index=Fa,Ci.weight=0;for(Fa=0;Fa<si;++Fa)Ci=nn[Fa],typeof Ci.source=="number"&&(Ci.source=la[Ci.source]),typeof Ci.target=="number"&&(Ci.target=la[Ci.target]),++Ci.source.weight,++Ci.target.weight;for(Fa=0;Fa<Pn;++Fa)Ci=la[Fa],isNaN(Ci.x)&&(Ci.x=Xo("x",$n)),isNaN(Ci.y)&&(Ci.y=Xo("y",ni)),isNaN(Ci.px)&&(Ci.px=Ci.x),isNaN(Ci.py)&&(Ci.py=Ci.y);if(da=[],typeof Vt=="function")for(Fa=0;Fa<si;++Fa)da[Fa]=+Vt.call(this,nn[Fa],Fa);else for(Fa=0;Fa<si;++Fa)da[Fa]=Vt;if(La=[],typeof or=="function")for(Fa=0;Fa<si;++Fa)La[Fa]=+or.call(this,nn[Fa],Fa);else for(Fa=0;Fa<si;++Fa)La[Fa]=or;if(Oa=[],typeof Ir=="function")for(Fa=0;Fa<Pn;++Fa)Oa[Fa]=+Ir.call(this,la[Fa],Fa);else for(Fa=0;Fa<Pn;++Fa)Oa[Fa]=Ir;function Xo(Ii,uo){if(!Ai){for(Ai=new Array(Pn),Ks=0;Ks<Pn;++Ks)Ai[Ks]=[];for(Ks=0;Ks<si;++Ks){var ts=nn[Ks];Ai[ts.source.index].push(ts.target),Ai[ts.target.index].push(ts.source)}}for(var wl=Ai[Fa],Ks=-1,gi=wl.length,Lo;++Ks<gi;)if(!isNaN(Lo=wl[Ks][Ii]))return Lo;return Math.random()*uo}return de.resume()},de.resume=function(){return de.alpha(.1)},de.stop=function(){return de.alpha(0)},de.drag=function(){if(gt||(gt=h.behavior.drag().origin(F).on("dragstart.force",sf).on("drag.force",sn).on("dragend.force",ul)),!arguments.length)return gt;this.on("mouseover.force",uu).on("mouseout.force",uc).call(gt)};function sn(Fa){Fa.px=h.event.x,Fa.py=h.event.y,de.resume()}return h.rebind(de,Pe,"on")};function sf(de){de.fixed|=2}function ul(de){de.fixed&=-7}function uu(de){de.fixed|=4,de.px=de.x,de.py=de.y}function uc(de){de.fixed&=-5}function Ys(de,Pe,Ke){var vt=0,gt=0;if(de.charge=0,!de.leaf)for(var Tt=de.nodes,qt=Tt.length,Vt=-1,or;++Vt<qt;)or=Tt[Vt],or!=null&&(Ys(or,Pe,Ke),de.charge+=or.charge,vt+=or.charge*or.cx,gt+=or.charge*or.cy);if(de.point){de.leaf||(de.point.x+=Math.random()-.5,de.point.y+=Math.random()-.5);var Ir=Pe*Ke[de.point.index];de.charge+=de.pointCharge=Ir,vt+=Ir*de.point.x,gt+=Ir*de.point.y}de.cx=vt/de.charge,de.cy=gt/de.charge}var $u=20,Yl=1,cu=1/0;h.layout.hierarchy=function(){var de=Lf,Pe=cc,Ke=Nc;function vt(gt){var Tt=[gt],qt=[],Vt;for(gt.depth=0;(Vt=Tt.pop())!=null;)if(qt.push(Vt),(Ir=Pe.call(vt,Vt,Vt.depth))&&(or=Ir.length)){for(var or,Ir,Lr;--or>=0;)Tt.push(Lr=Ir[or]),Lr.parent=Vt,Lr.depth=Vt.depth+1;Ke&&(Vt.value=0),Vt.children=Ir}else Ke&&(Vt.value=+Ke.call(vt,Vt,Vt.depth)||0),delete Vt.children;return Bu(gt,function(Zr){var ia,la;de&&(ia=Zr.children)&&ia.sort(de),Ke&&(la=Zr.parent)&&(la.value+=Zr.value)}),qt}return vt.sort=function(gt){return arguments.length?(de=gt,vt):de},vt.children=function(gt){return arguments.length?(Pe=gt,vt):Pe},vt.value=function(gt){return arguments.length?(Ke=gt,vt):Ke},vt.revalue=function(gt){return Ke&&(xc(gt,function(Tt){Tt.children&&(Tt.value=0)}),Bu(gt,function(Tt){var qt;Tt.children||(Tt.value=+Ke.call(vt,Tt,Tt.depth)||0),(qt=Tt.parent)&&(qt.value+=Tt.value)})),gt},vt};function al(de,Pe){return h.rebind(de,Pe,"sort","children","value"),de.nodes=de,de.links=Kf,de}function xc(de,Pe){for(var Ke=[de];(de=Ke.pop())!=null;)if(Pe(de),(gt=de.children)&&(vt=gt.length))for(var vt,gt;--vt>=0;)Ke.push(gt[vt])}function Bu(de,Pe){for(var Ke=[de],vt=[];(de=Ke.pop())!=null;)if(vt.push(de),(qt=de.children)&&(Tt=qt.length))for(var gt=-1,Tt,qt;++gt<Tt;)Ke.push(qt[gt]);for(;(de=vt.pop())!=null;)Pe(de)}function cc(de){return de.children}function Nc(de){return de.value}function Lf(de,Pe){return Pe.value-de.value}function Kf(de){return h.merge(de.map(function(Pe){return(Pe.children||[]).map(function(Ke){return{source:Pe,target:Ke}})}))}h.layout.partition=function(){var de=h.layout.hierarchy(),Pe=[1,1];function Ke(Tt,qt,Vt,or){var Ir=Tt.children;if(Tt.x=qt,Tt.y=Tt.depth*or,Tt.dx=Vt,Tt.dy=or,Ir&&(Zr=Ir.length)){var Lr=-1,Zr,ia,la;for(Vt=Tt.value?Vt/Tt.value:0;++Lr<Zr;)Ke(ia=Ir[Lr],qt,la=ia.value*Vt,or),qt+=la}}function vt(Tt){var qt=Tt.children,Vt=0;if(qt&&(Ir=qt.length))for(var or=-1,Ir;++or<Ir;)Vt=Math.max(Vt,vt(qt[or]));return 1+Vt}function gt(Tt,qt){var Vt=de.call(this,Tt,qt);return Ke(Vt[0],0,Pe[0],Pe[1]/vt(Vt[0])),Vt}return gt.size=function(Tt){return arguments.length?(Pe=Tt,gt):Pe},al(gt,de)},h.layout.pie=function(){var de=Number,Pe=bc,Ke=0,vt=pe,gt=0;function Tt(qt){var Vt=qt.length,or=qt.map(function(Qa,sn){return+de.call(Tt,Qa,sn)}),Ir=+(typeof Ke=="function"?Ke.apply(this,arguments):Ke),Lr=(typeof vt=="function"?vt.apply(this,arguments):vt)-Ir,Zr=Math.min(Math.abs(Lr)/Vt,+(typeof gt=="function"?gt.apply(this,arguments):gt)),ia=Zr*(Lr<0?-1:1),la=h.sum(or),nn=la?(Lr-Vt*ia)/la:0,da=h.range(Vt),La=[],Oa;return Pe!=null&&da.sort(Pe===bc?function(Qa,sn){return or[sn]-or[Qa]}:function(Qa,sn){return Pe(qt[Qa],qt[sn])}),da.forEach(function(Qa){La[Qa]={data:qt[Qa],value:Oa=or[Qa],startAngle:Ir,endAngle:Ir+=Oa*nn+ia,padAngle:Zr}}),La}return Tt.value=function(qt){return arguments.length?(de=qt,Tt):de},Tt.sort=function(qt){return arguments.length?(Pe=qt,Tt):Pe},Tt.startAngle=function(qt){return arguments.length?(Ke=qt,Tt):Ke},Tt.endAngle=function(qt){return arguments.length?(vt=qt,Tt):vt},Tt.padAngle=function(qt){return arguments.length?(gt=qt,Tt):gt},Tt};var bc={};h.layout.stack=function(){var de=F,Pe=lf,Ke=Tc,vt=jc,gt=Uc,Tt=_u;function qt(Vt,or){if(!(nn=Vt.length))return Vt;var Ir=Vt.map(function(Qa,sn){return de.call(qt,Qa,sn)}),Lr=Ir.map(function(Qa){return Qa.map(function(sn,Fa){return[gt.call(qt,sn,Fa),Tt.call(qt,sn,Fa)]})}),Zr=Pe.call(qt,Lr,or);Ir=h.permute(Ir,Zr),Lr=h.permute(Lr,Zr);var ia=Ke.call(qt,Lr,or),la=Ir[0].length,nn,da,La,Oa;for(La=0;La<la;++La)for(vt.call(qt,Ir[0][La],Oa=ia[La],Lr[0][La][1]),da=1;da<nn;++da)vt.call(qt,Ir[da][La],Oa+=Lr[da-1][La][1],Lr[da][La][1]);return Vt}return qt.values=function(Vt){return arguments.length?(de=Vt,qt):de},qt.order=function(Vt){return arguments.length?(Pe=typeof Vt=="function"?Vt:Vl.get(Vt)||lf,qt):Pe},qt.offset=function(Vt){return arguments.length?(Ke=typeof Vt=="function"?Vt:wc.get(Vt)||Tc,qt):Ke},qt.x=function(Vt){return arguments.length?(gt=Vt,qt):gt},qt.y=function(Vt){return arguments.length?(Tt=Vt,qt):Tt},qt.out=function(Vt){return arguments.length?(vt=Vt,qt):vt},qt};function Uc(de){return de.x}function _u(de){return de.y}function jc(de,Pe,Ke){de.y0=Pe,de.y=Ke}var Vl=h.map({"inside-out":function(de){var Pe=de.length,Ke,vt,gt=de.map(Js),Tt=de.map(fu),qt=h.range(Pe).sort(function(Zr,ia){return gt[Zr]-gt[ia]}),Vt=0,or=0,Ir=[],Lr=[];for(Ke=0;Ke<Pe;++Ke)vt=qt[Ke],Vt<or?(Vt+=Tt[vt],Ir.push(vt)):(or+=Tt[vt],Lr.push(vt));return Lr.reverse().concat(Ir)},reverse:function(de){return h.range(de.length).reverse()},default:lf}),wc=h.map({silhouette:function(de){var Pe=de.length,Ke=de[0].length,vt=[],gt=0,Tt,qt,Vt,or=[];for(qt=0;qt<Ke;++qt){for(Tt=0,Vt=0;Tt<Pe;Tt++)Vt+=de[Tt][qt][1];Vt>gt&&(gt=Vt),vt.push(Vt)}for(qt=0;qt<Ke;++qt)or[qt]=(gt-vt[qt])/2;return or},wiggle:function(de){var Pe=de.length,Ke=de[0],vt=Ke.length,gt,Tt,qt,Vt,or,Ir,Lr,Zr,ia,la=[];for(la[0]=Zr=ia=0,Tt=1;Tt<vt;++Tt){for(gt=0,Vt=0;gt<Pe;++gt)Vt+=de[gt][Tt][1];for(gt=0,or=0,Lr=Ke[Tt][0]-Ke[Tt-1][0];gt<Pe;++gt){for(qt=0,Ir=(de[gt][Tt][1]-de[gt][Tt-1][1])/(2*Lr);qt<gt;++qt)Ir+=(de[qt][Tt][1]-de[qt][Tt-1][1])/Lr;or+=Ir*de[gt][Tt][1]}la[Tt]=Zr-=Vt?or/Vt*Lr:0,Zr<ia&&(ia=Zr)}for(Tt=0;Tt<vt;++Tt)la[Tt]-=ia;return la},expand:function(de){var Pe=de.length,Ke=de[0].length,vt=1/Pe,gt,Tt,qt,Vt=[];for(Tt=0;Tt<Ke;++Tt){for(gt=0,qt=0;gt<Pe;gt++)qt+=de[gt][Tt][1];if(qt)for(gt=0;gt<Pe;gt++)de[gt][Tt][1]/=qt;else for(gt=0;gt<Pe;gt++)de[gt][Tt][1]=vt}for(Tt=0;Tt<Ke;++Tt)Vt[Tt]=0;return Vt},zero:Tc});function lf(de){return h.range(de.length)}function Tc(de){for(var Pe=-1,Ke=de[0].length,vt=[];++Pe<Ke;)vt[Pe]=0;return vt}function Js(de){for(var Pe=1,Ke=0,vt=de[0][1],gt,Tt=de.length;Pe<Tt;++Pe)(gt=de[Pe][1])>vt&&(Ke=Pe,vt=gt);return Ke}function fu(de){return de.reduce(Cu,0)}function Cu(de,Pe){return de+Pe[1]}h.layout.histogram=function(){var de=!0,Pe=Number,Ke=Rc,vt=ef;function gt(Tt,ia){for(var Vt=[],or=Tt.map(Pe,this),Ir=Ke.call(this,or,ia),Lr=vt.call(this,Ir,or,ia),Zr,ia=-1,la=or.length,nn=Lr.length-1,da=de?1:1/la,La;++ia<nn;)Zr=Vt[ia]=[],Zr.dx=Lr[ia+1]-(Zr.x=Lr[ia]),Zr.y=0;if(nn>0)for(ia=-1;++ia<la;)La=or[ia],La>=Ir[0]&&La<=Ir[1]&&(Zr=Vt[h.bisect(Lr,La,1,nn)-1],Zr.y+=da,Zr.push(Tt[ia]));return Vt}return gt.value=function(Tt){return arguments.length?(Pe=Tt,gt):Pe},gt.range=function(Tt){return arguments.length?(Ke=pt(Tt),gt):Ke},gt.bins=function(Tt){return arguments.length?(vt=typeof Tt=="number"?function(qt){return el(qt,Tt)}:pt(Tt),gt):vt},gt.frequency=function(Tt){return arguments.length?(de=!!Tt,gt):de},gt};function ef(de,Pe){return el(de,Math.ceil(Math.log(Pe.length)/Math.LN2+1))}function el(de,Pe){for(var Ke=-1,vt=+de[0],gt=(de[1]-vt)/Pe,Tt=[];++Ke<=Pe;)Tt[Ke]=gt*Ke+vt;return Tt}function Rc(de){return[h.min(de),h.max(de)]}h.layout.pack=function(){var de=h.layout.hierarchy().sort(fc),Pe=0,Ke=[1,1],vt;function gt(Tt,qt){var Vt=de.call(this,Tt,qt),or=Vt[0],Ir=Ke[0],Lr=Ke[1],Zr=vt==null?Math.sqrt:typeof vt=="function"?vt:function(){return vt};if(or.x=or.y=0,Bu(or,function(la){la.r=+Zr(la.value)}),Bu(or,zc),Pe){var ia=Pe*(vt?1:Math.max(2*or.r/Ir,2*or.r/Lr))/2;Bu(or,function(la){la.r+=ia}),Bu(or,zc),Bu(or,function(la){la.r-=ia})}return uf(or,Ir/2,Lr/2,vt?1:1/Math.max(2*or.r/Ir,2*or.r/Lr)),Vt}return gt.size=function(Tt){return arguments.length?(Ke=Tt,gt):Ke},gt.radius=function(Tt){return arguments.length?(vt=Tt==null||typeof Tt=="function"?Tt:+Tt,gt):vt},gt.padding=function(Tt){return arguments.length?(Pe=+Tt,gt):Pe},al(gt,de)};function fc(de,Pe){return de.value-Pe.value}function xu(de,Pe){var Ke=de._pack_next;de._pack_next=Pe,Pe._pack_prev=de,Pe._pack_next=Ke,Ke._pack_prev=Pe}function Dc(de,Pe){de._pack_next=Pe,Pe._pack_prev=de}function Nu(de,Pe){var Ke=Pe.x-de.x,vt=Pe.y-de.y,gt=de.r+Pe.r;return .999*gt*gt>Ke*Ke+vt*vt}function zc(de){if(!(Pe=de.children)||!(ia=Pe.length))return;var Pe,Ke=1/0,vt=-1/0,gt=1/0,Tt=-1/0,qt,Vt,or,Ir,Lr,Zr,ia;function la(Fa){Ke=Math.min(Fa.x-Fa.r,Ke),vt=Math.max(Fa.x+Fa.r,vt),gt=Math.min(Fa.y-Fa.r,gt),Tt=Math.max(Fa.y+Fa.r,Tt)}if(Pe.forEach(Pf),qt=Pe[0],qt.x=-qt.r,qt.y=0,la(qt),ia>1&&(Vt=Pe[1],Vt.x=Vt.r,Vt.y=0,la(Vt),ia>2))for(or=Pe[2],bu(qt,Vt,or),la(or),xu(qt,or),qt._pack_prev=or,xu(or,Vt),Vt=qt._pack_next,Ir=3;Ir<ia;Ir++){bu(qt,Vt,or=Pe[Ir]);var nn=0,da=1,La=1;for(Lr=Vt._pack_next;Lr!==Vt;Lr=Lr._pack_next,da++)if(Nu(Lr,or)){nn=1;break}if(nn==1)for(Zr=qt._pack_prev;Zr!==Lr._pack_prev&&!Nu(Zr,or);Zr=Zr._pack_prev,La++);nn?(da<La||da==La&&Vt.r<qt.r?Dc(qt,Vt=Lr):Dc(qt=Zr,Vt),Ir--):(xu(qt,or),Vt=or,la(or))}var Oa=(Ke+vt)/2,Qa=(gt+Tt)/2,sn=0;for(Ir=0;Ir<ia;Ir++)or=Pe[Ir],or.x-=Oa,or.y-=Qa,sn=Math.max(sn,or.r+Math.sqrt(or.x*or.x+or.y*or.y));de.r=sn,Pe.forEach(Gl)}function Pf(de){de._pack_next=de._pack_prev=de}function Gl(de){delete de._pack_next,delete de._pack_prev}function uf(de,Pe,Ke,vt){var gt=de.children;if(de.x=Pe+=vt*de.x,de.y=Ke+=vt*de.y,de.r*=vt,gt)for(var Tt=-1,qt=gt.length;++Tt<qt;)uf(gt[Tt],Pe,Ke,vt)}function bu(de,Pe,Ke){var vt=de.r+Ke.r,gt=Pe.x-de.x,Tt=Pe.y-de.y;if(vt&&(gt||Tt)){var qt=Pe.r+Ke.r,Vt=gt*gt+Tt*Tt;qt*=qt,vt*=vt;var or=.5+(vt-qt)/(2*Vt),Ir=Math.sqrt(Math.max(0,2*qt*(vt+Vt)-(vt-=Vt)*vt-qt*qt))/(2*Vt);Ke.x=de.x+or*gt+Ir*Tt,Ke.y=de.y+or*Tt-Ir*gt}else Ke.x=de.x+vt,Ke.y=de.y}h.layout.tree=function(){var de=h.layout.hierarchy().sort(null).value(null),Pe=Ju,Ke=[1,1],vt=null;function gt(Lr,Zr){var ia=de.call(this,Lr,Zr),la=ia[0],nn=Tt(la);if(Bu(nn,qt),nn.parent.m=-nn.z,xc(nn,Vt),vt)xc(la,Ir);else{var da=la,La=la,Oa=la;xc(la,function(Pn){Pn.x<da.x&&(da=Pn),Pn.x>La.x&&(La=Pn),Pn.depth>Oa.depth&&(Oa=Pn)});var Qa=Pe(da,La)/2-da.x,sn=Ke[0]/(La.x+Pe(La,da)/2+Qa),Fa=Ke[1]/(Oa.depth||1);xc(la,function(Pn){Pn.x=(Pn.x+Qa)*sn,Pn.y=Pn.depth*Fa})}return ia}function Tt(Lr){for(var Zr={A:null,children:[Lr]},ia=[Zr],la;(la=ia.pop())!=null;)for(var nn=la.children,da,La=0,Oa=nn.length;La<Oa;++La)ia.push((nn[La]=da={_:nn[La],parent:la,children:(da=nn[La].children)&&da.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:La}).a=da);return Zr.children[0]}function qt(Lr){var Zr=Lr.children,ia=Lr.parent.children,la=Lr.i?ia[Lr.i-1]:null;if(Zr.length){ol(Lr);var nn=(Zr[0].z+Zr[Zr.length-1].z)/2;la?(Lr.z=la.z+Pe(Lr._,la._),Lr.m=Lr.z-nn):Lr.z=nn}else la&&(Lr.z=la.z+Pe(Lr._,la._));Lr.parent.A=or(Lr,la,Lr.parent.A||ia[0])}function Vt(Lr){Lr._.x=Lr.z+Lr.parent.m,Lr.m+=Lr.parent.m}function or(Lr,Zr,ia){if(Zr){for(var la=Lr,nn=Lr,da=Zr,La=la.parent.children[0],Oa=la.m,Qa=nn.m,sn=da.m,Fa=La.m,Pn;da=vl(da),la=Uu(la),da&&la;)La=Uu(La),nn=vl(nn),nn.a=Lr,Pn=da.z+sn-la.z-Oa+Pe(da._,la._),Pn>0&&(eu(hc(da,Lr,ia),Lr,Pn),Oa+=Pn,Qa+=Pn),sn+=da.m,Oa+=la.m,Fa+=La.m,Qa+=nn.m;da&&!vl(nn)&&(nn.t=da,nn.m+=sn-Qa),la&&!Uu(La)&&(La.t=la,La.m+=Oa-Fa,ia=Lr)}return ia}function Ir(Lr){Lr.x*=Ke[0],Lr.y=Lr.depth*Ke[1]}return gt.separation=function(Lr){return arguments.length?(Pe=Lr,gt):Pe},gt.size=function(Lr){return arguments.length?(vt=(Ke=Lr)==null?Ir:null,gt):vt?null:Ke},gt.nodeSize=function(Lr){return arguments.length?(vt=(Ke=Lr)==null?null:Ir,gt):vt?Ke:null},al(gt,de)};function Ju(de,Pe){return de.parent==Pe.parent?1:2}function Uu(de){var Pe=de.children;return Pe.length?Pe[0]:de.t}function vl(de){var Pe=de.children,Ke;return(Ke=Pe.length)?Pe[Ke-1]:de.t}function eu(de,Pe,Ke){var vt=Ke/(Pe.i-de.i);Pe.c-=vt,Pe.s+=Ke,de.c+=vt,Pe.z+=Ke,Pe.m+=Ke}function ol(de){for(var Pe=0,Ke=0,vt=de.children,gt=vt.length,Tt;--gt>=0;)Tt=vt[gt],Tt.z+=Pe,Tt.m+=Pe,Pe+=Tt.s+(Ke+=Tt.c)}function hc(de,Pe,Ke){return de.a.parent===Pe.parent?de.a:Ke}h.layout.cluster=function(){var de=h.layout.hierarchy().sort(null).value(null),Pe=Ju,Ke=[1,1],vt=!1;function gt(Tt,qt){var Vt=de.call(this,Tt,qt),or=Vt[0],Ir,Lr=0;Bu(or,function(da){var La=da.children;La&&La.length?(da.x=tf(La),da.y=ju(La)):(da.x=Ir?Lr+=Pe(da,Ir):0,da.y=0,Ir=da)});var Zr=Jt(or),ia=yr(or),la=Zr.x-Pe(Zr,ia)/2,nn=ia.x+Pe(ia,Zr)/2;return Bu(or,vt?function(da){da.x=(da.x-or.x)*Ke[0],da.y=(or.y-da.y)*Ke[1]}:function(da){da.x=(da.x-la)/(nn-la)*Ke[0],da.y=(1-(or.y?da.y/or.y:1))*Ke[1]}),Vt}return gt.separation=function(Tt){return arguments.length?(Pe=Tt,gt):Pe},gt.size=function(Tt){return arguments.length?(vt=(Ke=Tt)==null,gt):vt?null:Ke},gt.nodeSize=function(Tt){return arguments.length?(vt=(Ke=Tt)!=null,gt):vt?Ke:null},al(gt,de)};function ju(de){return 1+h.max(de,function(Pe){return Pe.y})}function tf(de){return de.reduce(function(Pe,Ke){return Pe+Ke.x},0)/de.length}function Jt(de){var Pe=de.children;return Pe&&Pe.length?Jt(Pe[0]):de}function yr(de){var Pe=de.children,Ke;return Pe&&(Ke=Pe.length)?yr(Pe[Ke-1]):de}h.layout.treemap=function(){var de=h.layout.hierarchy(),Pe=Math.round,Ke=[1,1],vt=null,gt=Kr,Tt=!1,qt,Vt="squarify",or=.5*(1+Math.sqrt(5));function Ir(da,La){for(var Oa=-1,Qa=da.length,sn,Fa;++Oa<Qa;)Fa=(sn=da[Oa]).value*(La<0?0:La),sn.area=isNaN(Fa)||Fa<=0?0:Fa}function Lr(da){var La=da.children;if(La&&La.length){var Oa=gt(da),Qa=[],sn=La.slice(),Fa,Pn=1/0,si,$n=Vt==="slice"?Oa.dx:Vt==="dice"?Oa.dy:Vt==="slice-dice"?da.depth&1?Oa.dy:Oa.dx:Math.min(Oa.dx,Oa.dy),ni;for(Ir(sn,Oa.dx*Oa.dy/da.value),Qa.area=0;(ni=sn.length)>0;)Qa.push(Fa=sn[ni-1]),Qa.area+=Fa.area,Vt!=="squarify"||(si=ia(Qa,$n))<=Pn?(sn.pop(),Pn=si):(Qa.area-=Qa.pop().area,la(Qa,$n,Oa,!1),$n=Math.min(Oa.dx,Oa.dy),Qa.length=Qa.area=0,Pn=1/0);Qa.length&&(la(Qa,$n,Oa,!0),Qa.length=Qa.area=0),La.forEach(Lr)}}function Zr(da){var La=da.children;if(La&&La.length){var Oa=gt(da),Qa=La.slice(),sn,Fa=[];for(Ir(Qa,Oa.dx*Oa.dy/da.value),Fa.area=0;sn=Qa.pop();)Fa.push(sn),Fa.area+=sn.area,sn.z!=null&&(la(Fa,sn.z?Oa.dx:Oa.dy,Oa,!Qa.length),Fa.length=Fa.area=0);La.forEach(Zr)}}function ia(da,La){for(var Oa=da.area,Qa,sn=0,Fa=1/0,Pn=-1,si=da.length;++Pn<si;)(Qa=da[Pn].area)&&(Qa<Fa&&(Fa=Qa),Qa>sn&&(sn=Qa));return Oa*=Oa,La*=La,Oa?Math.max(La*sn*or/Oa,Oa/(La*Fa*or)):1/0}function la(da,La,Oa,Qa){var sn=-1,Fa=da.length,Pn=Oa.x,si=Oa.y,$n=La?Pe(da.area/La):0,ni;if(La==Oa.dx){for((Qa||$n>Oa.dy)&&($n=Oa.dy);++sn<Fa;)ni=da[sn],ni.x=Pn,ni.y=si,ni.dy=$n,Pn+=ni.dx=Math.min(Oa.x+Oa.dx-Pn,$n?Pe(ni.area/$n):0);ni.z=!0,ni.dx+=Oa.x+Oa.dx-Pn,Oa.y+=$n,Oa.dy-=$n}else{for((Qa||$n>Oa.dx)&&($n=Oa.dx);++sn<Fa;)ni=da[sn],ni.x=Pn,ni.y=si,ni.dx=$n,si+=ni.dy=Math.min(Oa.y+Oa.dy-si,$n?Pe(ni.area/$n):0);ni.z=!1,ni.dy+=Oa.y+Oa.dy-si,Oa.x+=$n,Oa.dx-=$n}}function nn(da){var La=qt||de(da),Oa=La[0];return Oa.x=Oa.y=0,Oa.value?(Oa.dx=Ke[0],Oa.dy=Ke[1]):Oa.dx=Oa.dy=0,qt&&de.revalue(Oa),Ir([Oa],Oa.dx*Oa.dy/Oa.value),(qt?Zr:Lr)(Oa),Tt&&(qt=La),La}return nn.size=function(da){return arguments.length?(Ke=da,nn):Ke},nn.padding=function(da){if(!arguments.length)return vt;function La(sn){var Fa=da.call(nn,sn,sn.depth);return Fa==null?Kr(sn):jr(sn,typeof Fa=="number"?[Fa,Fa,Fa,Fa]:Fa)}function Oa(sn){return jr(sn,da)}var Qa;return gt=(vt=da)==null?Kr:(Qa=typeof da)=="function"?La:(Qa==="number"&&(da=[da,da,da,da]),Oa),nn},nn.round=function(da){return arguments.length?(Pe=da?Math.round:Number,nn):Pe!=Number},nn.sticky=function(da){return arguments.length?(Tt=da,qt=null,nn):Tt},nn.ratio=function(da){return arguments.length?(or=da,nn):or},nn.mode=function(da){return arguments.length?(Vt=da+"",nn):Vt},al(nn,de)};function Kr(de){return{x:de.x,y:de.y,dx:de.dx,dy:de.dy}}function jr(de,Pe){var Ke=de.x+Pe[3],vt=de.y+Pe[0],gt=de.dx-Pe[1]-Pe[3],Tt=de.dy-Pe[0]-Pe[2];return gt<0&&(Ke+=gt/2,gt=0),Tt<0&&(vt+=Tt/2,Tt=0),{x:Ke,y:vt,dx:gt,dy:Tt}}h.random={normal:function(de,Pe){var Ke=arguments.length;return Ke<2&&(Pe=1),Ke<1&&(de=0),function(){var vt,gt,Tt;do vt=Math.random()*2-1,gt=Math.random()*2-1,Tt=vt*vt+gt*gt;while(!Tt||Tt>1);return de+Pe*vt*Math.sqrt(-2*Math.log(Tt)/Tt)}},logNormal:function(){var de=h.random.normal.apply(h,arguments);return function(){return Math.exp(de())}},bates:function(de){var Pe=h.random.irwinHall(de);return function(){return Pe()/de}},irwinHall:function(de){return function(){for(var Pe=0,Ke=0;Ke<de;Ke++)Pe+=Math.random();return Pe}}},h.scale={};function pa(de){var Pe=de[0],Ke=de[de.length-1];return Pe<Ke?[Pe,Ke]:[Ke,Pe]}function Ja(de){return de.rangeExtent?de.rangeExtent():pa(de.range())}function Ya(de,Pe,Ke,vt){var gt=Ke(de[0],de[1]),Tt=vt(Pe[0],Pe[1]);return function(qt){return Tt(gt(qt))}}function kn(de,Pe){var Ke=0,vt=de.length-1,gt=de[Ke],Tt=de[vt],qt;return Tt<gt&&(qt=Ke,Ke=vt,vt=qt,qt=gt,gt=Tt,Tt=qt),de[Ke]=Pe.floor(gt),de[vt]=Pe.ceil(Tt),de}function Dn(de){return de?{floor:function(Pe){return Math.floor(Pe/de)*de},ceil:function(Pe){return Math.ceil(Pe/de)*de}}:ti}var ti={floor:F,ceil:F};function yn(de,Pe,Ke,vt){var gt=[],Tt=[],qt=0,Vt=Math.min(de.length,Pe.length)-1;for(de[Vt]<de[0]&&(de=de.slice().reverse(),Pe=Pe.slice().reverse());++qt<=Vt;)gt.push(Ke(de[qt-1],de[qt])),Tt.push(vt(Pe[qt-1],Pe[qt]));return function(or){var Ir=h.bisect(de,or,1,Vt)-1;return Tt[Ir](gt[Ir](or))}}h.scale.linear=function(){return Gn([0,1],[0,1],Vo,!1)};function Gn(de,Pe,Ke,vt){var gt,Tt;function qt(){var or=Math.min(de.length,Pe.length)>2?yn:Ya,Ir=vt?nf:Cf;return gt=or(de,Pe,Ir,Ke),Tt=or(Pe,de,Ir,Vo),Vt}function Vt(or){return gt(or)}return Vt.invert=function(or){return Tt(or)},Vt.domain=function(or){return arguments.length?(de=or.map(Number),qt()):de},Vt.range=function(or){return arguments.length?(Pe=or,qt()):Pe},Vt.rangeRound=function(or){return Vt.range(or).interpolate(lc)},Vt.clamp=function(or){return arguments.length?(vt=or,qt()):vt},Vt.interpolate=function(or){return arguments.length?(Ke=or,qt()):Ke},Vt.ticks=function(or){return Vi(de,or)},Vt.tickFormat=function(or,Ir){return d3_scale_linearTickFormat(de,or,Ir)},Vt.nice=function(or){return dn(de,or),qt()},Vt.copy=function(){return Gn(de,Pe,Ke,vt)},qt()}function Mn(de,Pe){return h.rebind(de,Pe,"range","rangeRound","interpolate","clamp")}function dn(de,Pe){return kn(de,Dn(oi(de,Pe)[2])),kn(de,Dn(oi(de,Pe)[2])),de}function oi(de,Pe){Pe==null&&(Pe=10);var Ke=pa(de),vt=Ke[1]-Ke[0],gt=Math.pow(10,Math.floor(Math.log(vt/Pe)/Math.LN10)),Tt=Pe/vt*gt;return Tt<=.15?gt*=10:Tt<=.35?gt*=5:Tt<=.75&&(gt*=2),Ke[0]=Math.ceil(Ke[0]/gt)*gt,Ke[1]=Math.floor(Ke[1]/gt)*gt+gt*.5,Ke[2]=gt,Ke}function Vi(de,Pe){return h.range.apply(h,oi(de,Pe))}h.scale.log=function(){return zi(h.scale.linear().domain([0,1]),10,!0,[1,10])};function zi(de,Pe,Ke,vt){function gt(Vt){return(Ke?Math.log(Vt<0?0:Vt):-Math.log(Vt>0?0:-Vt))/Math.log(Pe)}function Tt(Vt){return Ke?Math.pow(Pe,Vt):-Math.pow(Pe,-Vt)}function qt(Vt){return de(gt(Vt))}return qt.invert=function(Vt){return Tt(de.invert(Vt))},qt.domain=function(Vt){return arguments.length?(Ke=Vt[0]>=0,de.domain((vt=Vt.map(Number)).map(gt)),qt):vt},qt.base=function(Vt){return arguments.length?(Pe=+Vt,de.domain(vt.map(gt)),qt):Pe},qt.nice=function(){var Vt=kn(vt.map(gt),Ke?Math:Zi);return de.domain(Vt),vt=Vt.map(Tt),qt},qt.ticks=function(){var Vt=pa(vt),or=[],Ir=Vt[0],Lr=Vt[1],Zr=Math.floor(gt(Ir)),ia=Math.ceil(gt(Lr)),la=Pe%1?2:Pe;if(isFinite(ia-Zr)){if(Ke){for(;Zr<ia;Zr++)for(var nn=1;nn<la;nn++)or.push(Tt(Zr)*nn);or.push(Tt(Zr))}else for(or.push(Tt(Zr));Zr++<ia;)for(var nn=la-1;nn>0;nn--)or.push(Tt(Zr)*nn);for(Zr=0;or[Zr]<Ir;Zr++);for(ia=or.length;or[ia-1]>Lr;ia--);or=or.slice(Zr,ia)}return or},qt.copy=function(){return zi(de.copy(),Pe,Ke,vt)},Mn(qt,de)}var Zi={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};h.scale.pow=function(){return Hi(h.scale.linear(),1,[0,1])};function Hi(de,Pe,Ke){var vt=li(Pe),gt=li(1/Pe);function Tt(qt){return de(vt(qt))}return Tt.invert=function(qt){return gt(de.invert(qt))},Tt.domain=function(qt){return arguments.length?(de.domain((Ke=qt.map(Number)).map(vt)),Tt):Ke},Tt.ticks=function(qt){return Vi(Ke,qt)},Tt.tickFormat=function(qt,Vt){return d3_scale_linearTickFormat(Ke,qt,Vt)},Tt.nice=function(qt){return Tt.domain(dn(Ke,qt))},Tt.exponent=function(qt){return arguments.length?(vt=li(Pe=qt),gt=li(1/Pe),de.domain(Ke.map(vt)),Tt):Pe},Tt.copy=function(){return Hi(de.copy(),Pe,Ke)},Mn(Tt,de)}function li(de){return function(Pe){return Pe<0?-Math.pow(-Pe,de):Math.pow(Pe,de)}}h.scale.sqrt=function(){return h.scale.pow().exponent(.5)},h.scale.ordinal=function(){return Yn([],{t:"range",a:[[]]})};function Yn(de,Pe){var Ke,vt,gt;function Tt(Vt){return vt[((Ke.get(Vt)||(Pe.t==="range"?Ke.set(Vt,de.push(Vt)):NaN))-1)%vt.length]}function qt(Vt,or){return h.range(de.length).map(function(Ir){return Vt+or*Ir})}return Tt.domain=function(Vt){if(!arguments.length)return de;de=[],Ke=new A;for(var or=-1,Ir=Vt.length,Lr;++or<Ir;)Ke.has(Lr=Vt[or])||Ke.set(Lr,de.push(Lr));return Tt[Pe.t].apply(Tt,Pe.a)},Tt.range=function(Vt){return arguments.length?(vt=Vt,gt=0,Pe={t:"range",a:arguments},Tt):vt},Tt.rangePoints=function(Vt,or){arguments.length<2&&(or=0);var Ir=Vt[0],Lr=Vt[1],Zr=de.length<2?(Ir=(Ir+Lr)/2,0):(Lr-Ir)/(de.length-1+or);return vt=qt(Ir+Zr*or/2,Zr),gt=0,Pe={t:"rangePoints",a:arguments},Tt},Tt.rangeRoundPoints=function(Vt,or){arguments.length<2&&(or=0);var Ir=Vt[0],Lr=Vt[1],Zr=de.length<2?(Ir=Lr=Math.round((Ir+Lr)/2),0):(Lr-Ir)/(de.length-1+or)|0;return vt=qt(Ir+Math.round(Zr*or/2+(Lr-Ir-(de.length-1+or)*Zr)/2),Zr),gt=0,Pe={t:"rangeRoundPoints",a:arguments},Tt},Tt.rangeBands=function(Vt,or,Ir){arguments.length<2&&(or=0),arguments.length<3&&(Ir=or);var Lr=Vt[1]<Vt[0],Zr=Vt[Lr-0],ia=Vt[1-Lr],la=(ia-Zr)/(de.length-or+2*Ir);return vt=qt(Zr+la*Ir,la),Lr&&vt.reverse(),gt=la*(1-or),Pe={t:"rangeBands",a:arguments},Tt},Tt.rangeRoundBands=function(Vt,or,Ir){arguments.length<2&&(or=0),arguments.length<3&&(Ir=or);var Lr=Vt[1]<Vt[0],Zr=Vt[Lr-0],ia=Vt[1-Lr],la=Math.floor((ia-Zr)/(de.length-or+2*Ir));return vt=qt(Zr+Math.round((ia-Zr-(de.length-or)*la)/2),la),Lr&&vt.reverse(),gt=Math.round(la*(1-or)),Pe={t:"rangeRoundBands",a:arguments},Tt},Tt.rangeBand=function(){return gt},Tt.rangeExtent=function(){return pa(Pe.a[0])},Tt.copy=function(){return Yn(de,Pe)},Tt.domain(de)}h.scale.category10=function(){return h.scale.ordinal().range(oo)},h.scale.category20=function(){return h.scale.ordinal().range(No)},h.scale.category20b=function(){return h.scale.ordinal().range(_s)},h.scale.category20c=function(){return h.scale.ordinal().range(Gs)};var oo=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(At),No=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(At),_s=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(At),Gs=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(At);h.scale.quantile=function(){return xs([],[])};function xs(de,Pe){var Ke;function vt(){var Tt=0,qt=Pe.length;for(Ke=[];++Tt<qt;)Ke[Tt-1]=h.quantile(de,Tt/qt);return gt}function gt(Tt){if(!isNaN(Tt=+Tt))return Pe[h.bisect(Ke,Tt)]}return gt.domain=function(Tt){return arguments.length?(de=Tt.map(f).filter(c).sort(s),vt()):de},gt.range=function(Tt){return arguments.length?(Pe=Tt,vt()):Pe},gt.quantiles=function(){return Ke},gt.invertExtent=function(Tt){return Tt=Pe.indexOf(Tt),Tt<0?[NaN,NaN]:[Tt>0?Ke[Tt-1]:de[0],Tt<Ke.length?Ke[Tt]:de[de.length-1]]},gt.copy=function(){return xs(de,Pe)},vt()}h.scale.quantize=function(){return Hs(0,1,[0,1])};function Hs(de,Pe,Ke){var vt,gt;function Tt(Vt){return Ke[Math.max(0,Math.min(gt,Math.floor(vt*(Vt-de))))]}function qt(){return vt=Ke.length/(Pe-de),gt=Ke.length-1,Tt}return Tt.domain=function(Vt){return arguments.length?(de=+Vt[0],Pe=+Vt[Vt.length-1],qt()):[de,Pe]},Tt.range=function(Vt){return arguments.length?(Ke=Vt,qt()):Ke},Tt.invertExtent=function(Vt){return Vt=Ke.indexOf(Vt),Vt=Vt<0?NaN:Vt/vt+de,[Vt,Vt+1/vt]},Tt.copy=function(){return Hs(de,Pe,Ke)},qt()}h.scale.threshold=function(){return es([.5],[0,1])};function es(de,Pe){function Ke(vt){if(vt<=vt)return Pe[h.bisect(de,vt)]}return Ke.domain=function(vt){return arguments.length?(de=vt,Ke):de},Ke.range=function(vt){return arguments.length?(Pe=vt,Ke):Pe},Ke.invertExtent=function(vt){return vt=Pe.indexOf(vt),[de[vt-1],de[vt]]},Ke.copy=function(){return es(de,Pe)},Ke}h.scale.identity=function(){return ml([0,1])};function ml(de){function Pe(Ke){return+Ke}return Pe.invert=Pe,Pe.domain=Pe.range=function(Ke){return arguments.length?(de=Ke.map(Pe),Pe):de},Pe.ticks=function(Ke){return Vi(de,Ke)},Pe.tickFormat=function(Ke,vt){return d3_scale_linearTickFormat(de,Ke,vt)},Pe.copy=function(){return ml(de)},Pe}h.svg={};function dl(){return 0}h.svg.arc=function(){var de=Ti,Pe=xo,Ke=dl,vt=Ns,gt=Ls,Tt=vs,qt=Kl;function Vt(){var Ir=Math.max(0,+de.apply(this,arguments)),Lr=Math.max(0,+Pe.apply(this,arguments)),Zr=gt.apply(this,arguments)-Ue,ia=Tt.apply(this,arguments)-Ue,la=Math.abs(ia-Zr),nn=Zr>ia?0:1;if(Lr<Ir&&(da=Lr,Lr=Ir,Ir=da),la>=Te)return or(Lr,nn)+(Ir?or(Ir,1-nn):"")+"Z";var da,La,Oa,Qa,sn=0,Fa=0,Pn,si,$n,ni,Ai,Ci,Xo,Ii,uo=[];if((Qa=(+qt.apply(this,arguments)||0)/2)&&(Oa=vt===Ns?Math.sqrt(Ir*Ir+Lr*Lr):+vt.apply(this,arguments),nn||(Fa*=-1),Lr&&(Fa=Mt(Oa/Lr*Math.sin(Qa))),Ir&&(sn=Mt(Oa/Ir*Math.sin(Qa)))),Lr){Pn=Lr*Math.cos(Zr+Fa),si=Lr*Math.sin(Zr+Fa),$n=Lr*Math.cos(ia-Fa),ni=Lr*Math.sin(ia-Fa);var ts=Math.abs(ia-Zr-2*Fa)<=me?0:1;if(Fa&&$l(Pn,si,$n,ni)===nn^ts){var wl=(Zr+ia)/2;Pn=Lr*Math.cos(wl),si=Lr*Math.sin(wl),$n=ni=null}}else Pn=si=0;if(Ir){Ai=Ir*Math.cos(ia-sn),Ci=Ir*Math.sin(ia-sn),Xo=Ir*Math.cos(Zr+sn),Ii=Ir*Math.sin(Zr+sn);var Ks=Math.abs(Zr-ia+2*sn)<=me?0:1;if(sn&&$l(Ai,Ci,Xo,Ii)===1-nn^Ks){var gi=(Zr+ia)/2;Ai=Ir*Math.cos(gi),Ci=Ir*Math.sin(gi),Xo=Ii=null}}else Ai=Ci=0;if(la>We&&(da=Math.min(Math.abs(Lr-Ir)/2,+Ke.apply(this,arguments)))>.001){La=Ir<Lr^nn?0:1;var Lo=da,Ko=da;if(la<me){var Ws=Xo==null?[Ai,Ci]:$n==null?[Pn,si]:ho([Pn,si],[Xo,Ii],[$n,ni],[Ai,Ci]),Ps=Pn-Ws[0],ru=si-Ws[1],bs=$n-Ws[0],Xs=ni-Ws[1],Tu=1/Math.sin(Math.acos((Ps*bs+ru*Xs)/(Math.sqrt(Ps*Ps+ru*ru)*Math.sqrt(bs*bs+Xs*Xs)))/2),_l=Math.sqrt(Ws[0]*Ws[0]+Ws[1]*Ws[1]);Ko=Math.min(da,(Ir-_l)/(Tu-1)),Lo=Math.min(da,(Lr-_l)/(Tu+1))}if($n!=null){var st=tu(Xo==null?[Ai,Ci]:[Xo,Ii],[Pn,si],Lr,Lo,nn),ir=tu([$n,ni],[Ai,Ci],Lr,Lo,nn);da===Lo?uo.push("M",st[0],"A",Lo,",",Lo," 0 0,",La," ",st[1],"A",Lr,",",Lr," 0 ",1-nn^$l(st[1][0],st[1][1],ir[1][0],ir[1][1]),",",nn," ",ir[1],"A",Lo,",",Lo," 0 0,",La," ",ir[0]):uo.push("M",st[0],"A",Lo,",",Lo," 0 1,",La," ",ir[0])}else uo.push("M",Pn,",",si);if(Xo!=null){var ur=tu([Pn,si],[Xo,Ii],Ir,-Ko,nn),ua=tu([Ai,Ci],$n==null?[Pn,si]:[$n,ni],Ir,-Ko,nn);da===Ko?uo.push("L",ua[0],"A",Ko,",",Ko," 0 0,",La," ",ua[1],"A",Ir,",",Ir," 0 ",nn^$l(ua[1][0],ua[1][1],ur[1][0],ur[1][1]),",",1-nn," ",ur[1],"A",Ko,",",Ko," 0 0,",La," ",ur[0]):uo.push("L",ua[0],"A",Ko,",",Ko," 0 0,",La," ",ur[0])}else uo.push("L",Ai,",",Ci)}else uo.push("M",Pn,",",si),$n!=null&&uo.push("A",Lr,",",Lr," 0 ",ts,",",nn," ",$n,",",ni),uo.push("L",Ai,",",Ci),Xo!=null&&uo.push("A",Ir,",",Ir," 0 ",Ks,",",1-nn," ",Xo,",",Ii);return uo.push("Z"),uo.join("")}function or(Ir,Lr){return"M0,"+Ir+"A"+Ir+","+Ir+" 0 1,"+Lr+" 0,"+-Ir+"A"+Ir+","+Ir+" 0 1,"+Lr+" 0,"+Ir}return Vt.innerRadius=function(Ir){return arguments.length?(de=pt(Ir),Vt):de},Vt.outerRadius=function(Ir){return arguments.length?(Pe=pt(Ir),Vt):Pe},Vt.cornerRadius=function(Ir){return arguments.length?(Ke=pt(Ir),Vt):Ke},Vt.padRadius=function(Ir){return arguments.length?(vt=Ir==Ns?Ns:pt(Ir),Vt):vt},Vt.startAngle=function(Ir){return arguments.length?(gt=pt(Ir),Vt):gt},Vt.endAngle=function(Ir){return arguments.length?(Tt=pt(Ir),Vt):Tt},Vt.padAngle=function(Ir){return arguments.length?(qt=pt(Ir),Vt):qt},Vt.centroid=function(){var Ir=(+de.apply(this,arguments)+ +Pe.apply(this,arguments))/2,Lr=(+gt.apply(this,arguments)+ +Tt.apply(this,arguments))/2-Ue;return[Math.cos(Lr)*Ir,Math.sin(Lr)*Ir]},Vt};var Ns="auto";function Ti(de){return de.innerRadius}function xo(de){return de.outerRadius}function Ls(de){return de.startAngle}function vs(de){return de.endAngle}function Kl(de){return de&&de.padAngle}function $l(de,Pe,Ke,vt){return(de-Ke)*Pe-(Pe-vt)*de>0?0:1}function tu(de,Pe,Ke,vt,gt){var Tt=de[0]-Pe[0],qt=de[1]-Pe[1],Vt=(gt?vt:-vt)/Math.sqrt(Tt*Tt+qt*qt),or=Vt*qt,Ir=-Vt*Tt,Lr=de[0]+or,Zr=de[1]+Ir,ia=Pe[0]+or,la=Pe[1]+Ir,nn=(Lr+ia)/2,da=(Zr+la)/2,La=ia-Lr,Oa=la-Zr,Qa=La*La+Oa*Oa,sn=Ke-vt,Fa=Lr*la-ia*Zr,Pn=(Oa<0?-1:1)*Math.sqrt(Math.max(0,sn*sn*Qa-Fa*Fa)),si=(Fa*Oa-La*Pn)/Qa,$n=(-Fa*La-Oa*Pn)/Qa,ni=(Fa*Oa+La*Pn)/Qa,Ai=(-Fa*La+Oa*Pn)/Qa,Ci=si-nn,Xo=$n-da,Ii=ni-nn,uo=Ai-da;return Ci*Ci+Xo*Xo>Ii*Ii+uo*uo&&(si=ni,$n=Ai),[[si-or,$n-Ir],[si*Ke/sn,$n*Ke/sn]]}function gc(){return!0}function Jl(de){var Pe=di,Ke=ki,vt=gc,gt=yl,Tt=gt.key,qt=.7;function Vt(or){var Ir=[],Lr=[],Zr=-1,ia=or.length,la,nn=pt(Pe),da=pt(Ke);function La(){Ir.push("M",gt(de(Lr),qt))}for(;++Zr<ia;)vt.call(this,la=or[Zr],Zr)?Lr.push([+nn.call(this,la,Zr),+da.call(this,la,Zr)]):Lr.length&&(La(),Lr=[]);return Lr.length&&La(),Ir.length?Ir.join(""):null}return Vt.x=function(or){return arguments.length?(Pe=or,Vt):Pe},Vt.y=function(or){return arguments.length?(Ke=or,Vt):Ke},Vt.defined=function(or){return arguments.length?(vt=or,Vt):vt},Vt.interpolate=function(or){return arguments.length?(typeof or=="function"?Tt=gt=or:Tt=(gt=Qu.get(or)||yl).key,Vt):Tt},Vt.tension=function(or){return arguments.length?(qt=or,Vt):qt},Vt}h.svg.line=function(){return Jl(F)};var Qu=h.map({linear:yl,"linear-closed":ec,step:Yi,"step-before":so,"step-after":tc,basis:we,"basis-open":Se,"basis-closed":Re,bundle:ct,cardinal:ze,"cardinal-open":wu,"cardinal-closed":hu,monotone:Ye});Qu.forEach(function(de,Pe){Pe.key=de,Pe.closed=/-closed$/.test(de)});function yl(de){return de.length>1?de.join("L"):de+"Z"}function ec(de){return de.join("L")+"Z"}function Yi(de){for(var Pe=0,Ke=de.length,vt=de[0],gt=[vt[0],",",vt[1]];++Pe<Ke;)gt.push("H",(vt[0]+(vt=de[Pe])[0])/2,"V",vt[1]);return Ke>1&>.push("H",vt[0]),gt.join("")}function so(de){for(var Pe=0,Ke=de.length,vt=de[0],gt=[vt[0],",",vt[1]];++Pe<Ke;)gt.push("V",(vt=de[Pe])[1],"H",vt[0]);return gt.join("")}function tc(de){for(var Pe=0,Ke=de.length,vt=de[0],gt=[vt[0],",",vt[1]];++Pe<Ke;)gt.push("H",(vt=de[Pe])[0],"V",vt[1]);return gt.join("")}function wu(de,Pe){return de.length<4?yl(de):de[1]+P(de.slice(1,-1),ne(de,Pe))}function hu(de,Pe){return de.length<3?ec(de):de[0]+P((de.push(de[0]),de),ne([de[de.length-2]].concat(de,[de[1]]),Pe))}function ze(de,Pe){return de.length<3?yl(de):de[0]+P(de,ne(de,Pe))}function P(de,Pe){if(Pe.length<1||de.length!=Pe.length&&de.length!=Pe.length+2)return yl(de);var Ke=de.length!=Pe.length,vt="",gt=de[0],Tt=de[1],qt=Pe[0],Vt=qt,or=1;if(Ke&&(vt+="Q"+(Tt[0]-qt[0]*2/3)+","+(Tt[1]-qt[1]*2/3)+","+Tt[0]+","+Tt[1],gt=de[1],or=2),Pe.length>1){Vt=Pe[1],Tt=de[or],or++,vt+="C"+(gt[0]+qt[0])+","+(gt[1]+qt[1])+","+(Tt[0]-Vt[0])+","+(Tt[1]-Vt[1])+","+Tt[0]+","+Tt[1];for(var Ir=2;Ir<Pe.length;Ir++,or++)Tt=de[or],Vt=Pe[Ir],vt+="S"+(Tt[0]-Vt[0])+","+(Tt[1]-Vt[1])+","+Tt[0]+","+Tt[1]}if(Ke){var Lr=de[or];vt+="Q"+(Tt[0]+Vt[0]*2/3)+","+(Tt[1]+Vt[1]*2/3)+","+Lr[0]+","+Lr[1]}return vt}function ne(de,Pe){for(var Ke=[],vt=(1-Pe)/2,gt,Tt=de[0],qt=de[1],Vt=1,or=de.length;++Vt<or;)gt=Tt,Tt=qt,qt=de[Vt],Ke.push([vt*(qt[0]-gt[0]),vt*(qt[1]-gt[1])]);return Ke}function we(de){if(de.length<3)return yl(de);var Pe=1,Ke=de.length,vt=de[0],gt=vt[0],Tt=vt[1],qt=[gt,gt,gt,(vt=de[1])[0]],Vt=[Tt,Tt,Tt,vt[1]],or=[gt,",",Tt,"L",_t(fr,qt),",",_t(fr,Vt)];for(de.push(de[Ke-1]);++Pe<=Ke;)vt=de[Pe],qt.shift(),qt.push(vt[0]),Vt.shift(),Vt.push(vt[1]),gr(or,qt,Vt);return de.pop(),or.push("L",vt),or.join("")}function Se(de){if(de.length<4)return yl(de);for(var Pe=[],Ke=-1,vt=de.length,gt,Tt=[0],qt=[0];++Ke<3;)gt=de[Ke],Tt.push(gt[0]),qt.push(gt[1]);for(Pe.push(_t(fr,Tt)+","+_t(fr,qt)),--Ke;++Ke<vt;)gt=de[Ke],Tt.shift(),Tt.push(gt[0]),qt.shift(),qt.push(gt[1]),gr(Pe,Tt,qt);return Pe.join("")}function Re(de){for(var Pe,Ke=-1,vt=de.length,gt=vt+4,Tt,qt=[],Vt=[];++Ke<4;)Tt=de[Ke%vt],qt.push(Tt[0]),Vt.push(Tt[1]);for(Pe=[_t(fr,qt),",",_t(fr,Vt)],--Ke;++Ke<gt;)Tt=de[Ke%vt],qt.shift(),qt.push(Tt[0]),Vt.shift(),Vt.push(Tt[1]),gr(Pe,qt,Vt);return Pe.join("")}function ct(de,Pe){var Ke=de.length-1;if(Ke)for(var vt=de[0][0],gt=de[0][1],Tt=de[Ke][0]-vt,qt=de[Ke][1]-gt,Vt=-1,or,Ir;++Vt<=Ke;)or=de[Vt],Ir=Vt/Ke,or[0]=Pe*or[0]+(1-Pe)*(vt+Ir*Tt),or[1]=Pe*or[1]+(1-Pe)*(gt+Ir*qt);return we(de)}function _t(de,Pe){return de[0]*Pe[0]+de[1]*Pe[1]+de[2]*Pe[2]+de[3]*Pe[3]}var zt=[0,2/3,1/3,0],Qt=[0,1/3,2/3,0],fr=[0,1/6,2/3,1/6];function gr(de,Pe,Ke){de.push("C",_t(zt,Pe),",",_t(zt,Ke),",",_t(Qt,Pe),",",_t(Qt,Ke),",",_t(fr,Pe),",",_t(fr,Ke))}function Br(de,Pe){return(Pe[1]-de[1])/(Pe[0]-de[0])}function ta(de){for(var Pe=0,Ke=de.length-1,vt=[],gt=de[0],Tt=de[1],qt=vt[0]=Br(gt,Tt);++Pe<Ke;)vt[Pe]=(qt+(qt=Br(gt=Tt,Tt=de[Pe+1])))/2;return vt[Pe]=qt,vt}function Ve(de){for(var Pe=[],Ke,vt,gt,Tt,qt=ta(de),Vt=-1,or=de.length-1;++Vt<or;)Ke=Br(de[Vt],de[Vt+1]),l(Ke)<We?qt[Vt]=qt[Vt+1]=0:(vt=qt[Vt]/Ke,gt=qt[Vt+1]/Ke,Tt=vt*vt+gt*gt,Tt>9&&(Tt=Ke*3/Math.sqrt(Tt),qt[Vt]=Tt*vt,qt[Vt+1]=Tt*gt));for(Vt=-1;++Vt<=or;)Tt=(de[Math.min(or,Vt+1)][0]-de[Math.max(0,Vt-1)][0])/(6*(1+qt[Vt]*qt[Vt])),Pe.push([Tt||0,qt[Vt]*Tt||0]);return Pe}function Ye(de){return de.length<3?yl(de):de[0]+P(de,Ve(de))}h.svg.line.radial=function(){var de=Jl(it);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function it(de){for(var Pe,Ke=-1,vt=de.length,gt,Tt;++Ke<vt;)Pe=de[Ke],gt=Pe[0],Tt=Pe[1]-Ue,Pe[0]=gt*Math.cos(Tt),Pe[1]=gt*Math.sin(Tt);return de}function ht(de){var Pe=di,Ke=di,vt=0,gt=ki,Tt=gc,qt=yl,Vt=qt.key,or=qt,Ir="L",Lr=.7;function Zr(ia){var la=[],nn=[],da=[],La=-1,Oa=ia.length,Qa,sn=pt(Pe),Fa=pt(vt),Pn=Pe===Ke?function(){return $n}:pt(Ke),si=vt===gt?function(){return ni}:pt(gt),$n,ni;function Ai(){la.push("M",qt(de(da),Lr),Ir,or(de(nn.reverse()),Lr),"Z")}for(;++La<Oa;)Tt.call(this,Qa=ia[La],La)?(nn.push([$n=+sn.call(this,Qa,La),ni=+Fa.call(this,Qa,La)]),da.push([+Pn.call(this,Qa,La),+si.call(this,Qa,La)])):nn.length&&(Ai(),nn=[],da=[]);return nn.length&&Ai(),la.length?la.join(""):null}return Zr.x=function(ia){return arguments.length?(Pe=Ke=ia,Zr):Ke},Zr.x0=function(ia){return arguments.length?(Pe=ia,Zr):Pe},Zr.x1=function(ia){return arguments.length?(Ke=ia,Zr):Ke},Zr.y=function(ia){return arguments.length?(vt=gt=ia,Zr):gt},Zr.y0=function(ia){return arguments.length?(vt=ia,Zr):vt},Zr.y1=function(ia){return arguments.length?(gt=ia,Zr):gt},Zr.defined=function(ia){return arguments.length?(Tt=ia,Zr):Tt},Zr.interpolate=function(ia){return arguments.length?(typeof ia=="function"?Vt=qt=ia:Vt=(qt=Qu.get(ia)||yl).key,or=qt.reverse||qt,Ir=qt.closed?"M":"L",Zr):Vt},Zr.tension=function(ia){return arguments.length?(Lr=ia,Zr):Lr},Zr}so.reverse=tc,tc.reverse=so,h.svg.area=function(){return ht(F)},h.svg.area.radial=function(){var de=ht(it);return de.radius=de.x,delete de.x,de.innerRadius=de.x0,delete de.x0,de.outerRadius=de.x1,delete de.x1,de.angle=de.y,delete de.y,de.startAngle=de.y0,delete de.y0,de.endAngle=de.y1,delete de.y1,de};function St(de){return de.source}function yt(de){return de.target}h.svg.chord=function(){var de=St,Pe=yt,Ke=Lt,vt=Ls,gt=vs;function Tt(Lr,Zr){var ia=qt(this,de,Lr,Zr),la=qt(this,Pe,Lr,Zr);return"M"+ia.p0+or(ia.r,ia.p1,ia.a1-ia.a0)+(Vt(ia,la)?Ir(ia.r,ia.p1,ia.r,ia.p0):Ir(ia.r,ia.p1,la.r,la.p0)+or(la.r,la.p1,la.a1-la.a0)+Ir(la.r,la.p1,ia.r,ia.p0))+"Z"}function qt(Lr,Zr,ia,la){var nn=Zr.call(Lr,ia,la),da=Ke.call(Lr,nn,la),La=vt.call(Lr,nn,la)-Ue,Oa=gt.call(Lr,nn,la)-Ue;return{r:da,a0:La,a1:Oa,p0:[da*Math.cos(La),da*Math.sin(La)],p1:[da*Math.cos(Oa),da*Math.sin(Oa)]}}function Vt(Lr,Zr){return Lr.a0==Zr.a0&&Lr.a1==Zr.a1}function or(Lr,Zr,ia){return"A"+Lr+","+Lr+" 0 "+ +(ia>me)+",1 "+Zr}function Ir(Lr,Zr,ia,la){return"Q 0,0 "+la}return Tt.radius=function(Lr){return arguments.length?(Ke=pt(Lr),Tt):Ke},Tt.source=function(Lr){return arguments.length?(de=pt(Lr),Tt):de},Tt.target=function(Lr){return arguments.length?(Pe=pt(Lr),Tt):Pe},Tt.startAngle=function(Lr){return arguments.length?(vt=pt(Lr),Tt):vt},Tt.endAngle=function(Lr){return arguments.length?(gt=pt(Lr),Tt):gt},Tt};function Lt(de){return de.radius}h.svg.diagonal=function(){var de=St,Pe=yt,Ke=nr;function vt(gt,Tt){var qt=de.call(this,gt,Tt),Vt=Pe.call(this,gt,Tt),or=(qt.y+Vt.y)/2,Ir=[qt,{x:qt.x,y:or},{x:Vt.x,y:or},Vt];return Ir=Ir.map(Ke),"M"+Ir[0]+"C"+Ir[1]+" "+Ir[2]+" "+Ir[3]}return vt.source=function(gt){return arguments.length?(de=pt(gt),vt):de},vt.target=function(gt){return arguments.length?(Pe=pt(gt),vt):Pe},vt.projection=function(gt){return arguments.length?(Ke=gt,vt):Ke},vt};function nr(de){return[de.x,de.y]}h.svg.diagonal.radial=function(){var de=h.svg.diagonal(),Pe=nr,Ke=de.projection;return de.projection=function(vt){return arguments.length?Ke(cr(Pe=vt)):Pe},de};function cr(de){return function(){var Pe=de.apply(this,arguments),Ke=Pe[0],vt=Pe[1]-Ue;return[Ke*Math.cos(vt),Ke*Math.sin(vt)]}}h.svg.symbol=function(){var de=Pr,Pe=mr;function Ke(vt,gt){return(oa.get(de.call(this,vt,gt))||Vr)(Pe.call(this,vt,gt))}return Ke.type=function(vt){return arguments.length?(de=pt(vt),Ke):de},Ke.size=function(vt){return arguments.length?(Pe=pt(vt),Ke):Pe},Ke};function mr(){return 64}function Pr(){return"circle"}function Vr(de){var Pe=Math.sqrt(de/me);return"M0,"+Pe+"A"+Pe+","+Pe+" 0 1,1 0,"+-Pe+"A"+Pe+","+Pe+" 0 1,1 0,"+Pe+"Z"}var oa=h.map({circle:Vr,cross:function(de){var Pe=Math.sqrt(de/5)/2;return"M"+-3*Pe+","+-Pe+"H"+-Pe+"V"+-3*Pe+"H"+Pe+"V"+-Pe+"H"+3*Pe+"V"+Pe+"H"+Pe+"V"+3*Pe+"H"+-Pe+"V"+Pe+"H"+-3*Pe+"Z"},diamond:function(de){var Pe=Math.sqrt(de/(2*Aa)),Ke=Pe*Aa;return"M0,"+-Pe+"L"+Ke+",0 0,"+Pe+" "+-Ke+",0Z"},square:function(de){var Pe=Math.sqrt(de)/2;return"M"+-Pe+","+-Pe+"L"+Pe+","+-Pe+" "+Pe+","+Pe+" "+-Pe+","+Pe+"Z"},"triangle-down":function(de){var Pe=Math.sqrt(de/ca),Ke=Pe*ca/2;return"M0,"+Ke+"L"+Pe+","+-Ke+" "+-Pe+","+-Ke+"Z"},"triangle-up":function(de){var Pe=Math.sqrt(de/ca),Ke=Pe*ca/2;return"M0,"+-Ke+"L"+Pe+","+Ke+" "+-Pe+","+Ke+"Z"}});h.svg.symbolTypes=oa.keys();var ca=Math.sqrt(3),Aa=Math.tan(30*Xe);Q.transition=function(de){for(var Pe=Mi||++ui,Ke=Yo(de),vt=[],gt,Tt,qt=xi||{time:Date.now(),ease:Fi,delay:0,duration:250},Vt=-1,or=this.length;++Vt<or;){vt.push(gt=[]);for(var Ir=this[Vt],Lr=-1,Zr=Ir.length;++Lr<Zr;)(Tt=Ir[Lr])&&Eo(Tt,Lr,Ke,Pe,qt),gt.push(Tt)}return wn(vt,Ke,Pe)},Q.interrupt=function(de){return this.each(de==null?$a:Cn(Yo(de)))};var $a=Cn(Yo());function Cn(de){return function(){var Pe,Ke,vt;(Pe=this[de])&&(vt=Pe[Ke=Pe.active])&&(vt.timer.c=null,vt.timer.t=NaN,--Pe.count?delete Pe[Ke]:delete this[de],Pe.active+=.5,vt.event&&vt.event.interrupt.call(this,this.__data__,vt.index))}}function wn(de,Pe,Ke){return V(de,Ln),de.namespace=Pe,de.id=Ke,de}var Ln=[],ui=0,Mi,xi;Ln.call=Q.call,Ln.empty=Q.empty,Ln.node=Q.node,Ln.size=Q.size,h.transition=function(de,Pe){return de&&de.transition?Mi?de.transition(Pe):de:h.selection().transition(de)},h.transition.prototype=Ln,Ln.select=function(de){var Pe=this.id,Ke=this.namespace,vt=[],gt,Tt,qt;de=q(de);for(var Vt=-1,or=this.length;++Vt<or;){vt.push(gt=[]);for(var Ir=this[Vt],Lr=-1,Zr=Ir.length;++Lr<Zr;)(qt=Ir[Lr])&&(Tt=de.call(qt,qt.__data__,Lr,Vt))?("__data__"in qt&&(Tt.__data__=qt.__data__),Eo(Tt,Lr,Ke,Pe,qt[Ke][Pe]),gt.push(Tt)):gt.push(null)}return wn(vt,Ke,Pe)},Ln.selectAll=function(de){var Pe=this.id,Ke=this.namespace,vt=[],gt,Tt,qt,Vt,or;de=re(de);for(var Ir=-1,Lr=this.length;++Ir<Lr;)for(var Zr=this[Ir],ia=-1,la=Zr.length;++ia<la;)if(qt=Zr[ia]){or=qt[Ke][Pe],Tt=de.call(qt,qt.__data__,ia,Ir),vt.push(gt=[]);for(var nn=-1,da=Tt.length;++nn<da;)(Vt=Tt[nn])&&Eo(Vt,nn,Ke,Pe,or),gt.push(Vt)}return wn(vt,Ke,Pe)},Ln.filter=function(de){var Pe=[],Ke,vt,gt;typeof de!="function"&&(de=he(de));for(var Tt=0,qt=this.length;Tt<qt;Tt++){Pe.push(Ke=[]);for(var vt=this[Tt],Vt=0,or=vt.length;Vt<or;Vt++)(gt=vt[Vt])&&de.call(gt,gt.__data__,Vt,Tt)&&Ke.push(gt)}return wn(Pe,this.namespace,this.id)},Ln.tween=function(de,Pe){var Ke=this.id,vt=this.namespace;return arguments.length<2?this.node()[vt][Ke].tween.get(de):tt(this,Pe==null?function(gt){gt[vt][Ke].tween.remove(de)}:function(gt){gt[vt][Ke].tween.set(de,Pe)})};function Ji(de,Pe,Ke,vt){var gt=de.id,Tt=de.namespace;return tt(de,typeof Ke=="function"?function(qt,Vt,or){qt[Tt][gt].tween.set(Pe,vt(Ke.call(qt,qt.__data__,Vt,or)))}:(Ke=vt(Ke),function(qt){qt[Tt][gt].tween.set(Pe,Ke)}))}Ln.attr=function(de,Pe){if(arguments.length<2){for(Pe in de)this.attr(Pe,de[Pe]);return this}var Ke=de=="transform"?Bc:Vo,vt=h.ns.qualify(de);function gt(){this.removeAttribute(vt)}function Tt(){this.removeAttributeNS(vt.space,vt.local)}function qt(or){return or==null?gt:(or+="",function(){var Ir=this.getAttribute(vt),Lr;return Ir!==or&&(Lr=Ke(Ir,or),function(Zr){this.setAttribute(vt,Lr(Zr))})})}function Vt(or){return or==null?Tt:(or+="",function(){var Ir=this.getAttributeNS(vt.space,vt.local),Lr;return Ir!==or&&(Lr=Ke(Ir,or),function(Zr){this.setAttributeNS(vt.space,vt.local,Lr(Zr))})})}return Ji(this,"attr."+de,Pe,vt.local?Vt:qt)},Ln.attrTween=function(de,Pe){var Ke=h.ns.qualify(de);function vt(Tt,qt){var Vt=Pe.call(this,Tt,qt,this.getAttribute(Ke));return Vt&&function(or){this.setAttribute(Ke,Vt(or))}}function gt(Tt,qt){var Vt=Pe.call(this,Tt,qt,this.getAttributeNS(Ke.space,Ke.local));return Vt&&function(or){this.setAttributeNS(Ke.space,Ke.local,Vt(or))}}return this.tween("attr."+de,Ke.local?gt:vt)},Ln.style=function(de,Pe,Ke){var vt=arguments.length;if(vt<3){if(typeof de!="string"){vt<2&&(Pe="");for(Ke in de)this.style(Ke,de[Ke],Pe);return this}Ke=""}function gt(){this.style.removeProperty(de)}function Tt(qt){return qt==null?gt:(qt+="",function(){var Vt=t(this).getComputedStyle(this,null).getPropertyValue(de),or;return Vt!==qt&&(or=Vo(Vt,qt),function(Ir){this.style.setProperty(de,or(Ir),Ke)})})}return Ji(this,"style."+de,Pe,Tt)},Ln.styleTween=function(de,Pe,Ke){arguments.length<3&&(Ke="");function vt(gt,Tt){var qt=Pe.call(this,gt,Tt,t(this).getComputedStyle(this,null).getPropertyValue(de));return qt&&function(Vt){this.style.setProperty(de,qt(Vt),Ke)}}return this.tween("style."+de,vt)},Ln.text=function(de){return Ji(this,"text",de,Zo)};function Zo(de){return de==null&&(de=""),function(){this.textContent=de}}Ln.remove=function(){var de=this.namespace;return this.each("end.transition",function(){var Pe;this[de].count<2&&(Pe=this.parentNode)&&Pe.removeChild(this)})},Ln.ease=function(de){var Pe=this.id,Ke=this.namespace;return arguments.length<1?this.node()[Ke][Pe].ease:(typeof de!="function"&&(de=h.ease.apply(h,arguments)),tt(this,function(vt){vt[Ke][Pe].ease=de}))},Ln.delay=function(de){var Pe=this.id,Ke=this.namespace;return arguments.length<1?this.node()[Ke][Pe].delay:tt(this,typeof de=="function"?function(vt,gt,Tt){vt[Ke][Pe].delay=+de.call(vt,vt.__data__,gt,Tt)}:(de=+de,function(vt){vt[Ke][Pe].delay=de}))},Ln.duration=function(de){var Pe=this.id,Ke=this.namespace;return arguments.length<1?this.node()[Ke][Pe].duration:tt(this,typeof de=="function"?function(vt,gt,Tt){vt[Ke][Pe].duration=Math.max(1,de.call(vt,vt.__data__,gt,Tt))}:(de=Math.max(1,de),function(vt){vt[Ke][Pe].duration=de}))},Ln.each=function(de,Pe){var Ke=this.id,vt=this.namespace;if(arguments.length<2){var gt=xi,Tt=Mi;try{Mi=Ke,tt(this,function(qt,Vt,or){xi=qt[vt][Ke],de.call(qt,qt.__data__,Vt,or)})}finally{xi=gt,Mi=Tt}}else tt(this,function(qt){var Vt=qt[vt][Ke];(Vt.event||(Vt.event=h.dispatch("start","end","interrupt"))).on(de,Pe)});return this},Ln.transition=function(){for(var de=this.id,Pe=++ui,Ke=this.namespace,vt=[],gt,Tt,qt,Vt,or=0,Ir=this.length;or<Ir;or++){vt.push(gt=[]);for(var Tt=this[or],Lr=0,Zr=Tt.length;Lr<Zr;Lr++)(qt=Tt[Lr])&&(Vt=qt[Ke][de],Eo(qt,Lr,Ke,Pe,{time:Vt.time,ease:Vt.ease,delay:Vt.delay+Vt.duration,duration:Vt.duration})),gt.push(qt)}return wn(vt,Ke,Pe)};function Yo(de){return de==null?"__transition__":"__transition_"+de+"__"}function Eo(de,Pe,Ke,vt,gt){var Tt=de[Ke]||(de[Ke]={active:0,count:0}),qt=Tt[vt],Vt,or,Ir,Lr,Zr;function ia(da){var La=qt.delay;if(or.t=La+Vt,La<=da)return la(da-La);or.c=la}function la(da){var La=Tt.active,Oa=Tt[La];Oa&&(Oa.timer.c=null,Oa.timer.t=NaN,--Tt.count,delete Tt[La],Oa.event&&Oa.event.interrupt.call(de,de.__data__,Oa.index));for(var Qa in Tt)if(+Qa<vt){var sn=Tt[Qa];sn.timer.c=null,sn.timer.t=NaN,--Tt.count,delete Tt[Qa]}or.c=nn,tn(function(){return or.c&&nn(da||1)&&(or.c=null,or.t=NaN),1},0,Vt),Tt.active=vt,qt.event&&qt.event.start.call(de,de.__data__,Pe),Zr=[],qt.tween.forEach(function(Fa,Pn){(Pn=Pn.call(de,de.__data__,Pe))&&Zr.push(Pn)}),Lr=qt.ease,Ir=qt.duration}function nn(da){for(var La=da/Ir,Oa=Lr(La),Qa=Zr.length;Qa>0;)Zr[--Qa].call(de,Oa);if(La>=1)return qt.event&&qt.event.end.call(de,de.__data__,Pe),--Tt.count?delete Tt[vt]:delete de[Ke],1}qt||(Vt=gt.time,or=tn(ia,0,Vt),qt=Tt[vt]={tween:new A,time:Vt,timer:or,delay:gt.delay,duration:gt.duration,ease:gt.ease,index:Pe},gt=null,++Tt.count)}h.svg.axis=function(){var de=h.scale.linear(),Pe=rs,Ke=6,vt=6,gt=3,Tt=[10],qt=null,Vt;function or(Ir){Ir.each(function(){var Lr=h.select(this),Zr=this.__chart__||de,ia=this.__chart__=de.copy(),la=qt??(ia.ticks?ia.ticks.apply(ia,Tt):ia.domain()),nn=Vt??(ia.tickFormat?ia.tickFormat.apply(ia,Tt):F),da=Lr.selectAll(".tick").data(la,ia),La=da.enter().insert("g",".domain").attr("class","tick").style("opacity",We),Oa=h.transition(da.exit()).style("opacity",We).remove(),Qa=h.transition(da.order()).style("opacity",1),sn=Math.max(Ke,0)+gt,Fa,Pn=Ja(ia),si=Lr.selectAll(".domain").data([0]),$n=(si.enter().append("path").attr("class","domain"),h.transition(si));La.append("line"),La.append("text");var ni=La.select("line"),Ai=Qa.select("line"),Ci=da.select("text").text(nn),Xo=La.select("text"),Ii=Qa.select("text"),uo=Pe==="top"||Pe==="left"?-1:1,ts,wl,Ks,gi;if(Pe==="bottom"||Pe==="top"?(Fa=Qs,ts="x",Ks="y",wl="x2",gi="y2",Ci.attr("dy",uo<0?"0em":".71em").style("text-anchor","middle"),$n.attr("d","M"+Pn[0]+","+uo*vt+"V0H"+Pn[1]+"V"+uo*vt)):(Fa=ko,ts="y",Ks="x",wl="y2",gi="x2",Ci.attr("dy",".32em").style("text-anchor",uo<0?"end":"start"),$n.attr("d","M"+uo*vt+","+Pn[0]+"H0V"+Pn[1]+"H"+uo*vt)),ni.attr(gi,uo*Ke),Xo.attr(Ks,uo*sn),Ai.attr(wl,0).attr(gi,uo*Ke),Ii.attr(ts,0).attr(Ks,uo*sn),ia.rangeBand){var Lo=ia,Ko=Lo.rangeBand()/2;Zr=ia=function(Ws){return Lo(Ws)+Ko}}else Zr.rangeBand?Zr=ia:Oa.call(Fa,ia,Zr);La.call(Fa,Zr,ia),Qa.call(Fa,ia,ia)})}return or.scale=function(Ir){return arguments.length?(de=Ir,or):de},or.orient=function(Ir){return arguments.length?(Pe=Ir in sl?Ir+"":rs,or):Pe},or.ticks=function(){return arguments.length?(Tt=S(arguments),or):Tt},or.tickValues=function(Ir){return arguments.length?(qt=Ir,or):qt},or.tickFormat=function(Ir){return arguments.length?(Vt=Ir,or):Vt},or.tickSize=function(Ir){var Lr=arguments.length;return Lr?(Ke=+Ir,vt=+arguments[Lr-1],or):Ke},or.innerTickSize=function(Ir){return arguments.length?(Ke=+Ir,or):Ke},or.outerTickSize=function(Ir){return arguments.length?(vt=+Ir,or):vt},or.tickPadding=function(Ir){return arguments.length?(gt=+Ir,or):gt},or.tickSubdivide=function(){return arguments.length&&or},or};var rs="bottom",sl={top:1,right:1,bottom:1,left:1};function Qs(de,Pe,Ke){de.attr("transform",function(vt){var gt=Pe(vt);return"translate("+(isFinite(gt)?gt:Ke(vt))+",0)"})}function ko(de,Pe,Ke){de.attr("transform",function(vt){var gt=Pe(vt);return"translate(0,"+(isFinite(gt)?gt:Ke(vt))+")"})}h.svg.brush=function(){var de=oe(Lr,"brushstart","brush","brushend"),Pe=null,Ke=null,vt=[0,0],gt=[0,0],Tt,qt,Vt=!0,or=!0,Ir=bl[0];function Lr(da){da.each(function(){var La=h.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",nn).on("touchstart.brush",nn),Oa=La.selectAll(".background").data([0]);Oa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),La.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Qa=La.selectAll(".resize").data(Ir,F);Qa.exit().remove(),Qa.enter().append("g").attr("class",function(si){return"resize "+si}).style("cursor",function(si){return Co[si]}).append("rect").attr("x",function(si){return/[ew]$/.test(si)?-3:null}).attr("y",function(si){return/^[ns]/.test(si)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Qa.style("display",Lr.empty()?"none":null);var sn=h.transition(La),Fa=h.transition(Oa),Pn;Pe&&(Pn=Ja(Pe),Fa.attr("x",Pn[0]).attr("width",Pn[1]-Pn[0]),ia(sn)),Ke&&(Pn=Ja(Ke),Fa.attr("y",Pn[0]).attr("height",Pn[1]-Pn[0]),la(sn)),Zr(sn)})}Lr.event=function(da){da.each(function(){var La=de.of(this,arguments),Oa={x:vt,y:gt,i:Tt,j:qt},Qa=this.__chart__||Oa;this.__chart__=Oa,Mi?h.select(this).transition().each("start.brush",function(){Tt=Qa.i,qt=Qa.j,vt=Qa.x,gt=Qa.y,La({type:"brushstart"})}).tween("brush:brush",function(){var sn=Cs(vt,Oa.x),Fa=Cs(gt,Oa.y);return Tt=qt=null,function(Pn){vt=Oa.x=sn(Pn),gt=Oa.y=Fa(Pn),La({type:"brush",mode:"resize"})}}).each("end.brush",function(){Tt=Oa.i,qt=Oa.j,La({type:"brush",mode:"resize"}),La({type:"brushend"})}):(La({type:"brushstart"}),La({type:"brush",mode:"resize"}),La({type:"brushend"}))})};function Zr(da){da.selectAll(".resize").attr("transform",function(La){return"translate("+vt[+/e$/.test(La)]+","+gt[+/^s/.test(La)]+")"})}function ia(da){da.select(".extent").attr("x",vt[0]),da.selectAll(".extent,.n>rect,.s>rect").attr("width",vt[1]-vt[0])}function la(da){da.select(".extent").attr("y",gt[0]),da.selectAll(".extent,.e>rect,.w>rect").attr("height",gt[1]-gt[0])}function nn(){var da=this,La=h.select(h.event.target),Oa=de.of(da,arguments),Qa=h.select(da),sn=La.datum(),Fa=!/^(n|s)$/.test(sn)&&Pe,Pn=!/^(e|w)$/.test(sn)&&Ke,si=La.classed("extent"),$n=hr(da),ni,Ai=h.mouse(da),Ci,Xo=h.select(t(da)).on("keydown.brush",ts).on("keyup.brush",wl);if(h.event.changedTouches?Xo.on("touchmove.brush",Ks).on("touchend.brush",Lo):Xo.on("mousemove.brush",Ks).on("mouseup.brush",Lo),Qa.interrupt().selectAll("*").interrupt(),si)Ai[0]=vt[0]-Ai[0],Ai[1]=gt[0]-Ai[1];else if(sn){var Ii=+/w$/.test(sn),uo=+/^n/.test(sn);Ci=[vt[1-Ii]-Ai[0],gt[1-uo]-Ai[1]],Ai[0]=vt[Ii],Ai[1]=gt[uo]}else h.event.altKey&&(ni=Ai.slice());Qa.style("pointer-events","none").selectAll(".resize").style("display",null),h.select("body").style("cursor",La.style("cursor")),Oa({type:"brushstart"}),Ks();function ts(){h.event.keyCode==32&&(si||(ni=null,Ai[0]-=vt[1],Ai[1]-=gt[1],si=2),ee())}function wl(){h.event.keyCode==32&&si==2&&(Ai[0]+=vt[1],Ai[1]+=gt[1],si=0,ee())}function Ks(){var Ko=h.mouse(da),Ws=!1;Ci&&(Ko[0]+=Ci[0],Ko[1]+=Ci[1]),si||(h.event.altKey?(ni||(ni=[(vt[0]+vt[1])/2,(gt[0]+gt[1])/2]),Ai[0]=vt[+(Ko[0]<ni[0])],Ai[1]=gt[+(Ko[1]<ni[1])]):ni=null),Fa&&gi(Ko,Pe,0)&&(ia(Qa),Ws=!0),Pn&&gi(Ko,Ke,1)&&(la(Qa),Ws=!0),Ws&&(Zr(Qa),Oa({type:"brush",mode:si?"move":"resize"}))}function gi(Ko,Ws,Ps){var ru=Ja(Ws),bs=ru[0],Xs=ru[1],Tu=Ai[Ps],_l=Ps?gt:vt,st=_l[1]-_l[0],ir,ur;if(si&&(bs-=Tu,Xs-=st+Tu),ir=(Ps?or:Vt)?Math.max(bs,Math.min(Xs,Ko[Ps])):Ko[Ps],si?ur=(ir+=Tu)+st:(ni&&(Tu=Math.max(bs,Math.min(Xs,2*ni[Ps]-ir))),Tu<ir?(ur=ir,ir=Tu):ur=Tu),_l[0]!=ir||_l[1]!=ur)return Ps?qt=null:Tt=null,_l[0]=ir,_l[1]=ur,!0}function Lo(){Ks(),Qa.style("pointer-events","all").selectAll(".resize").style("display",Lr.empty()?"none":null),h.select("body").style("cursor",null),Xo.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),$n(),Oa({type:"brushend"})}}return Lr.x=function(da){return arguments.length?(Pe=da,Ir=bl[!Pe<<1|!Ke],Lr):Pe},Lr.y=function(da){return arguments.length?(Ke=da,Ir=bl[!Pe<<1|!Ke],Lr):Ke},Lr.clamp=function(da){return arguments.length?(Pe&&Ke?(Vt=!!da[0],or=!!da[1]):Pe?Vt=!!da:Ke&&(or=!!da),Lr):Pe&&Ke?[Vt,or]:Pe?Vt:Ke?or:null},Lr.extent=function(da){var La,Oa,Qa,sn,Fa;return arguments.length?(Pe&&(La=da[0],Oa=da[1],Ke&&(La=La[0],Oa=Oa[0]),Tt=[La,Oa],Pe.invert&&(La=Pe(La),Oa=Pe(Oa)),Oa<La&&(Fa=La,La=Oa,Oa=Fa),(La!=vt[0]||Oa!=vt[1])&&(vt=[La,Oa])),Ke&&(Qa=da[0],sn=da[1],Pe&&(Qa=Qa[1],sn=sn[1]),qt=[Qa,sn],Ke.invert&&(Qa=Ke(Qa),sn=Ke(sn)),sn<Qa&&(Fa=Qa,Qa=sn,sn=Fa),(Qa!=gt[0]||sn!=gt[1])&&(gt=[Qa,sn])),Lr):(Pe&&(Tt?(La=Tt[0],Oa=Tt[1]):(La=vt[0],Oa=vt[1],Pe.invert&&(La=Pe.invert(La),Oa=Pe.invert(Oa)),Oa<La&&(Fa=La,La=Oa,Oa=Fa))),Ke&&(qt?(Qa=qt[0],sn=qt[1]):(Qa=gt[0],sn=gt[1],Ke.invert&&(Qa=Ke.invert(Qa),sn=Ke.invert(sn)),sn<Qa&&(Fa=Qa,Qa=sn,sn=Fa))),Pe&&Ke?[[La,Qa],[Oa,sn]]:Pe?[La,Oa]:Ke&&[Qa,sn])},Lr.clear=function(){return Lr.empty()||(vt=[0,0],gt=[0,0],Tt=qt=null),Lr},Lr.empty=function(){return!!Pe&&vt[0]==vt[1]||!!Ke&>[0]==gt[1]},h.rebind(Lr,de,"on")};var Co={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},bl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];h.text=Kt(function(de){return de.responseText}),h.json=function(de,Pe){return xr(de,"application/json",ql,Pe)};function ql(de){return JSON.parse(de.responseText)}h.html=function(de,Pe){return xr(de,"text/html",vu,Pe)};function vu(de){var Pe=E.createRange();return Pe.selectNode(E.body),Pe.createContextualFragment(de.responseText)}h.xml=Kt(function(de){return de.responseXML}),typeof G=="object"&&G.exports?G.exports=h:this.d3=h}).apply(self)}}),Jo=He({"node_modules/d3-time/dist/d3-time.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=h||self,b(h.d3=h.d3||{}))})(Y,function(h){var b=new Date,S=new Date;function E(he,De,tt,nt){function $e(Et){return he(Et=arguments.length===0?new Date:new Date(+Et)),Et}return $e.floor=function(Et){return he(Et=new Date(+Et)),Et},$e.ceil=function(Et){return he(Et=new Date(Et-1)),De(Et,1),he(Et),Et},$e.round=function(Et){var Ct=$e(Et),jt=$e.ceil(Et);return Et-Ct<jt-Et?Ct:jt},$e.offset=function(Et,Ct){return De(Et=new Date(+Et),Ct==null?1:Math.floor(Ct)),Et},$e.range=function(Et,Ct,jt){var Wt=[],dr;if(Et=$e.ceil(Et),jt=jt==null?1:Math.floor(jt),!(Et<Ct)||!(jt>0))return Wt;do Wt.push(dr=new Date(+Et)),De(Et,jt),he(Et);while(dr<Et&&Et<Ct);return Wt},$e.filter=function(Et){return E(function(Ct){if(Ct>=Ct)for(;he(Ct),!Et(Ct);)Ct.setTime(Ct-1)},function(Ct,jt){if(Ct>=Ct)if(jt<0)for(;++jt<=0;)for(;De(Ct,-1),!Et(Ct););else for(;--jt>=0;)for(;De(Ct,1),!Et(Ct););})},tt&&($e.count=function(Et,Ct){return b.setTime(+Et),S.setTime(+Ct),he(b),he(S),Math.floor(tt(b,S))},$e.every=function(Et){return Et=Math.floor(Et),!isFinite(Et)||!(Et>0)?null:Et>1?$e.filter(nt?function(Ct){return nt(Ct)%Et===0}:function(Ct){return $e.count(0,Ct)%Et===0}):$e}),$e}var e=E(function(){},function(he,De){he.setTime(+he+De)},function(he,De){return De-he});e.every=function(he){return he=Math.floor(he),!isFinite(he)||!(he>0)?null:he>1?E(function(De){De.setTime(Math.floor(De/he)*he)},function(De,tt){De.setTime(+De+tt*he)},function(De,tt){return(tt-De)/he}):e};var t=e.range,r=1e3,o=6e4,a=36e5,i=864e5,n=6048e5,s=E(function(he){he.setTime(he-he.getMilliseconds())},function(he,De){he.setTime(+he+De*r)},function(he,De){return(De-he)/r},function(he){return he.getUTCSeconds()}),f=s.range,c=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r)},function(he,De){he.setTime(+he+De*o)},function(he,De){return(De-he)/o},function(he){return he.getMinutes()}),p=c.range,d=E(function(he){he.setTime(he-he.getMilliseconds()-he.getSeconds()*r-he.getMinutes()*o)},function(he,De){he.setTime(+he+De*a)},function(he,De){return(De-he)/a},function(he){return he.getHours()}),T=d.range,l=E(function(he){he.setHours(0,0,0,0)},function(he,De){he.setDate(he.getDate()+De)},function(he,De){return(De-he-(De.getTimezoneOffset()-he.getTimezoneOffset())*o)/i},function(he){return he.getDate()-1}),m=l.range;function x(he){return E(function(De){De.setDate(De.getDate()-(De.getDay()+7-he)%7),De.setHours(0,0,0,0)},function(De,tt){De.setDate(De.getDate()+tt*7)},function(De,tt){return(tt-De-(tt.getTimezoneOffset()-De.getTimezoneOffset())*o)/n})}var A=x(0),M=x(1),_=x(2),w=x(3),g=x(4),u=x(5),v=x(6),y=A.range,R=M.range,L=_.range,z=w.range,F=g.range,B=u.range,O=v.range,I=E(function(he){he.setDate(1),he.setHours(0,0,0,0)},function(he,De){he.setMonth(he.getMonth()+De)},function(he,De){return De.getMonth()-he.getMonth()+(De.getFullYear()-he.getFullYear())*12},function(he){return he.getMonth()}),N=I.range,U=E(function(he){he.setMonth(0,1),he.setHours(0,0,0,0)},function(he,De){he.setFullYear(he.getFullYear()+De)},function(he,De){return De.getFullYear()-he.getFullYear()},function(he){return he.getFullYear()});U.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(De){De.setFullYear(Math.floor(De.getFullYear()/he)*he),De.setMonth(0,1),De.setHours(0,0,0,0)},function(De,tt){De.setFullYear(De.getFullYear()+tt*he)})};var X=U.range,ee=E(function(he){he.setUTCSeconds(0,0)},function(he,De){he.setTime(+he+De*o)},function(he,De){return(De-he)/o},function(he){return he.getUTCMinutes()}),ue=ee.range,oe=E(function(he){he.setUTCMinutes(0,0,0)},function(he,De){he.setTime(+he+De*a)},function(he,De){return(De-he)/a},function(he){return he.getUTCHours()}),le=oe.range,V=E(function(he){he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCDate(he.getUTCDate()+De)},function(he,De){return(De-he)/i},function(he){return he.getUTCDate()-1}),J=V.range;function te(he){return E(function(De){De.setUTCDate(De.getUTCDate()-(De.getUTCDay()+7-he)%7),De.setUTCHours(0,0,0,0)},function(De,tt){De.setUTCDate(De.getUTCDate()+tt*7)},function(De,tt){return(tt-De)/n})}var Z=te(0),se=te(1),Q=te(2),q=te(3),re=te(4),ae=te(5),fe=te(6),be=Z.range,Me=se.range,Ie=Q.range,Le=q.range,je=re.range,et=ae.range,rt=fe.range,Je=E(function(he){he.setUTCDate(1),he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCMonth(he.getUTCMonth()+De)},function(he,De){return De.getUTCMonth()-he.getUTCMonth()+(De.getUTCFullYear()-he.getUTCFullYear())*12},function(he){return he.getUTCMonth()}),Ze=Je.range,Ee=E(function(he){he.setUTCMonth(0,1),he.setUTCHours(0,0,0,0)},function(he,De){he.setUTCFullYear(he.getUTCFullYear()+De)},function(he,De){return De.getUTCFullYear()-he.getUTCFullYear()},function(he){return he.getUTCFullYear()});Ee.every=function(he){return!isFinite(he=Math.floor(he))||!(he>0)?null:E(function(De){De.setUTCFullYear(Math.floor(De.getUTCFullYear()/he)*he),De.setUTCMonth(0,1),De.setUTCHours(0,0,0,0)},function(De,tt){De.setUTCFullYear(De.getUTCFullYear()+tt*he)})};var xe=Ee.range;h.timeDay=l,h.timeDays=m,h.timeFriday=u,h.timeFridays=B,h.timeHour=d,h.timeHours=T,h.timeInterval=E,h.timeMillisecond=e,h.timeMilliseconds=t,h.timeMinute=c,h.timeMinutes=p,h.timeMonday=M,h.timeMondays=R,h.timeMonth=I,h.timeMonths=N,h.timeSaturday=v,h.timeSaturdays=O,h.timeSecond=s,h.timeSeconds=f,h.timeSunday=A,h.timeSundays=y,h.timeThursday=g,h.timeThursdays=F,h.timeTuesday=_,h.timeTuesdays=L,h.timeWednesday=w,h.timeWednesdays=z,h.timeWeek=A,h.timeWeeks=y,h.timeYear=U,h.timeYears=X,h.utcDay=V,h.utcDays=J,h.utcFriday=ae,h.utcFridays=et,h.utcHour=oe,h.utcHours=le,h.utcMillisecond=e,h.utcMilliseconds=t,h.utcMinute=ee,h.utcMinutes=ue,h.utcMonday=se,h.utcMondays=Me,h.utcMonth=Je,h.utcMonths=Ze,h.utcSaturday=fe,h.utcSaturdays=rt,h.utcSecond=s,h.utcSeconds=f,h.utcSunday=Z,h.utcSundays=be,h.utcThursday=re,h.utcThursdays=je,h.utcTuesday=Q,h.utcTuesdays=Ie,h.utcWednesday=q,h.utcWednesdays=Le,h.utcWeek=Z,h.utcWeeks=be,h.utcYear=Ee,h.utcYears=xe,Object.defineProperty(h,"__esModule",{value:!0})})}}),Ni=He({"node_modules/d3-time-format/dist/d3-time-format.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,Jo()):(h=h||self,b(h.d3=h.d3||{},h.d3))})(Y,function(h,b){function S(Fe){if(0<=Fe.y&&Fe.y<100){var We=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return We.setFullYear(Fe.y),We}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function E(Fe){if(0<=Fe.y&&Fe.y<100){var We=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return We.setUTCFullYear(Fe.y),We}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function e(Fe,We,Ae){return{y:Fe,m:We,d:Ae,H:0,M:0,S:0,L:0}}function t(Fe){var We=Fe.dateTime,Ae=Fe.date,me=Fe.time,pe=Fe.periods,Te=Fe.days,Ue=Fe.shortDays,Xe=Fe.months,bt=Fe.shortMonths,xt=f(pe),Mt=c(pe),Nt=f(Te),sr=c(Te),ar=f(Ue),tr=c(Ue),Tr=f(Xe),sa=c(Xe),Ea=f(bt),ba=c(bt),Ia={a:Ha,A:Va,b:Za,B:an,c:null,d:I,e:I,f:ue,H:N,I:U,j:X,L:ee,m:oe,M:le,p:wa,q:Nn,Q:Ct,s:jt,S:V,u:J,U:te,V:Z,w:se,W:Q,x:null,X:null,y:q,Y:re,Z:ae,"%":Et},Ra={a:Wn,A:At,b:ft,B:pr,c:null,d:fe,e:fe,f:je,H:be,I:Me,j:Ie,L:Le,m:et,M:rt,p:Sr,q:Er,Q:Ct,s:jt,S:Je,u:Ze,U:Ee,V:xe,w:he,W:De,x:null,X:null,y:tt,Y:nt,Z:$e,"%":Et},ya={a:Zt,A:$t,b:Cr,B:qr,c:Jr,d:g,e:g,f:z,H:v,I:v,j:u,L,m:w,M:y,p:It,q:_,Q:B,s:O,S:R,u:d,U:T,V:l,w:p,W:m,x:aa,X:Ca,y:A,Y:x,Z:M,"%":F};Ia.x=rn(Ae,Ia),Ia.X=rn(me,Ia),Ia.c=rn(We,Ia),Ra.x=rn(Ae,Ra),Ra.X=rn(me,Ra),Ra.c=rn(We,Ra);function rn(_r,Mr){return function(Gr){var Fr=[],pt=-1,Kt=0,xr=_r.length,Hr,fa,xa;for(Gr instanceof Date||(Gr=new Date(+Gr));++pt<xr;)_r.charCodeAt(pt)===37&&(Fr.push(_r.slice(Kt,pt)),(fa=r[Hr=_r.charAt(++pt)])!=null?Hr=_r.charAt(++pt):fa=Hr==="e"?" ":"0",(xa=Mr[Hr])&&(Hr=xa(Gr,fa)),Fr.push(Hr),Kt=pt+1);return Fr.push(_r.slice(Kt,pt)),Fr.join("")}}function mn(_r,Mr){return function(Gr){var Fr=e(1900,void 0,1),pt=Yt(Fr,_r,Gr+="",0),Kt,xr;if(pt!=Gr.length)return null;if("Q"in Fr)return new Date(Fr.Q);if("s"in Fr)return new Date(Fr.s*1e3+("L"in Fr?Fr.L:0));if(Mr&&!("Z"in Fr)&&(Fr.Z=0),"p"in Fr&&(Fr.H=Fr.H%12+Fr.p*12),Fr.m===void 0&&(Fr.m="q"in Fr?Fr.q:0),"V"in Fr){if(Fr.V<1||Fr.V>53)return null;"w"in Fr||(Fr.w=1),"Z"in Fr?(Kt=E(e(Fr.y,0,1)),xr=Kt.getUTCDay(),Kt=xr>4||xr===0?b.utcMonday.ceil(Kt):b.utcMonday(Kt),Kt=b.utcDay.offset(Kt,(Fr.V-1)*7),Fr.y=Kt.getUTCFullYear(),Fr.m=Kt.getUTCMonth(),Fr.d=Kt.getUTCDate()+(Fr.w+6)%7):(Kt=S(e(Fr.y,0,1)),xr=Kt.getDay(),Kt=xr>4||xr===0?b.timeMonday.ceil(Kt):b.timeMonday(Kt),Kt=b.timeDay.offset(Kt,(Fr.V-1)*7),Fr.y=Kt.getFullYear(),Fr.m=Kt.getMonth(),Fr.d=Kt.getDate()+(Fr.w+6)%7)}else("W"in Fr||"U"in Fr)&&("w"in Fr||(Fr.w="u"in Fr?Fr.u%7:"W"in Fr?1:0),xr="Z"in Fr?E(e(Fr.y,0,1)).getUTCDay():S(e(Fr.y,0,1)).getDay(),Fr.m=0,Fr.d="W"in Fr?(Fr.w+6)%7+Fr.W*7-(xr+5)%7:Fr.w+Fr.U*7-(xr+6)%7);return"Z"in Fr?(Fr.H+=Fr.Z/100|0,Fr.M+=Fr.Z%100,E(Fr)):S(Fr)}}function Yt(_r,Mr,Gr,Fr){for(var pt=0,Kt=Mr.length,xr=Gr.length,Hr,fa;pt<Kt;){if(Fr>=xr)return-1;if(Hr=Mr.charCodeAt(pt++),Hr===37){if(Hr=Mr.charAt(pt++),fa=ya[Hr in r?Mr.charAt(pt++):Hr],!fa||(Fr=fa(_r,Gr,Fr))<0)return-1}else if(Hr!=Gr.charCodeAt(Fr++))return-1}return Fr}function It(_r,Mr,Gr){var Fr=xt.exec(Mr.slice(Gr));return Fr?(_r.p=Mt[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Zt(_r,Mr,Gr){var Fr=ar.exec(Mr.slice(Gr));return Fr?(_r.w=tr[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function $t(_r,Mr,Gr){var Fr=Nt.exec(Mr.slice(Gr));return Fr?(_r.w=sr[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Cr(_r,Mr,Gr){var Fr=Ea.exec(Mr.slice(Gr));return Fr?(_r.m=ba[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function qr(_r,Mr,Gr){var Fr=Tr.exec(Mr.slice(Gr));return Fr?(_r.m=sa[Fr[0].toLowerCase()],Gr+Fr[0].length):-1}function Jr(_r,Mr,Gr){return Yt(_r,We,Mr,Gr)}function aa(_r,Mr,Gr){return Yt(_r,Ae,Mr,Gr)}function Ca(_r,Mr,Gr){return Yt(_r,me,Mr,Gr)}function Ha(_r){return Ue[_r.getDay()]}function Va(_r){return Te[_r.getDay()]}function Za(_r){return bt[_r.getMonth()]}function an(_r){return Xe[_r.getMonth()]}function wa(_r){return pe[+(_r.getHours()>=12)]}function Nn(_r){return 1+~~(_r.getMonth()/3)}function Wn(_r){return Ue[_r.getUTCDay()]}function At(_r){return Te[_r.getUTCDay()]}function ft(_r){return bt[_r.getUTCMonth()]}function pr(_r){return Xe[_r.getUTCMonth()]}function Sr(_r){return pe[+(_r.getUTCHours()>=12)]}function Er(_r){return 1+~~(_r.getUTCMonth()/3)}return{format:function(_r){var Mr=rn(_r+="",Ia);return Mr.toString=function(){return _r},Mr},parse:function(_r){var Mr=mn(_r+="",!1);return Mr.toString=function(){return _r},Mr},utcFormat:function(_r){var Mr=rn(_r+="",Ra);return Mr.toString=function(){return _r},Mr},utcParse:function(_r){var Mr=mn(_r+="",!0);return Mr.toString=function(){return _r},Mr}}}var r={"-":"",_:" ",0:"0"},o=/^\s*\d+/,a=/^%/,i=/[\\^$*+?|[\]().{}]/g;function n(Fe,We,Ae){var me=Fe<0?"-":"",pe=(me?-Fe:Fe)+"",Te=pe.length;return me+(Te<Ae?new Array(Ae-Te+1).join(We)+pe:pe)}function s(Fe){return Fe.replace(i,"\\$&")}function f(Fe){return new RegExp("^(?:"+Fe.map(s).join("|")+")","i")}function c(Fe){for(var We={},Ae=-1,me=Fe.length;++Ae<me;)We[Fe[Ae].toLowerCase()]=Ae;return We}function p(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+1));return me?(Fe.w=+me[0],Ae+me[0].length):-1}function d(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+1));return me?(Fe.u=+me[0],Ae+me[0].length):-1}function T(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+2));return me?(Fe.U=+me[0],Ae+me[0].length):-1}function l(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+2));return me?(Fe.V=+me[0],Ae+me[0].length):-1}function m(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+2));return me?(Fe.W=+me[0],Ae+me[0].length):-1}function x(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+4));return me?(Fe.y=+me[0],Ae+me[0].length):-1}function A(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+2));return me?(Fe.y=+me[0]+(+me[0]>68?1900:2e3),Ae+me[0].length):-1}function M(Fe,We,Ae){var me=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(We.slice(Ae,Ae+6));return me?(Fe.Z=me[1]?0:-(me[2]+(me[3]||"00")),Ae+me[0].length):-1}function _(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+1));return me?(Fe.q=me[0]*3-3,Ae+me[0].length):-1}function w(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+2));return me?(Fe.m=me[0]-1,Ae+me[0].length):-1}function g(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+2));return me?(Fe.d=+me[0],Ae+me[0].length):-1}function u(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+3));return me?(Fe.m=0,Fe.d=+me[0],Ae+me[0].length):-1}function v(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+2));return me?(Fe.H=+me[0],Ae+me[0].length):-1}function y(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+2));return me?(Fe.M=+me[0],Ae+me[0].length):-1}function R(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+2));return me?(Fe.S=+me[0],Ae+me[0].length):-1}function L(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+3));return me?(Fe.L=+me[0],Ae+me[0].length):-1}function z(Fe,We,Ae){var me=o.exec(We.slice(Ae,Ae+6));return me?(Fe.L=Math.floor(me[0]/1e3),Ae+me[0].length):-1}function F(Fe,We,Ae){var me=a.exec(We.slice(Ae,Ae+1));return me?Ae+me[0].length:-1}function B(Fe,We,Ae){var me=o.exec(We.slice(Ae));return me?(Fe.Q=+me[0],Ae+me[0].length):-1}function O(Fe,We,Ae){var me=o.exec(We.slice(Ae));return me?(Fe.s=+me[0],Ae+me[0].length):-1}function I(Fe,We){return n(Fe.getDate(),We,2)}function N(Fe,We){return n(Fe.getHours(),We,2)}function U(Fe,We){return n(Fe.getHours()%12||12,We,2)}function X(Fe,We){return n(1+b.timeDay.count(b.timeYear(Fe),Fe),We,3)}function ee(Fe,We){return n(Fe.getMilliseconds(),We,3)}function ue(Fe,We){return ee(Fe,We)+"000"}function oe(Fe,We){return n(Fe.getMonth()+1,We,2)}function le(Fe,We){return n(Fe.getMinutes(),We,2)}function V(Fe,We){return n(Fe.getSeconds(),We,2)}function J(Fe){var We=Fe.getDay();return We===0?7:We}function te(Fe,We){return n(b.timeSunday.count(b.timeYear(Fe)-1,Fe),We,2)}function Z(Fe,We){var Ae=Fe.getDay();return Fe=Ae>=4||Ae===0?b.timeThursday(Fe):b.timeThursday.ceil(Fe),n(b.timeThursday.count(b.timeYear(Fe),Fe)+(b.timeYear(Fe).getDay()===4),We,2)}function se(Fe){return Fe.getDay()}function Q(Fe,We){return n(b.timeMonday.count(b.timeYear(Fe)-1,Fe),We,2)}function q(Fe,We){return n(Fe.getFullYear()%100,We,2)}function re(Fe,We){return n(Fe.getFullYear()%1e4,We,4)}function ae(Fe){var We=Fe.getTimezoneOffset();return(We>0?"-":(We*=-1,"+"))+n(We/60|0,"0",2)+n(We%60,"0",2)}function fe(Fe,We){return n(Fe.getUTCDate(),We,2)}function be(Fe,We){return n(Fe.getUTCHours(),We,2)}function Me(Fe,We){return n(Fe.getUTCHours()%12||12,We,2)}function Ie(Fe,We){return n(1+b.utcDay.count(b.utcYear(Fe),Fe),We,3)}function Le(Fe,We){return n(Fe.getUTCMilliseconds(),We,3)}function je(Fe,We){return Le(Fe,We)+"000"}function et(Fe,We){return n(Fe.getUTCMonth()+1,We,2)}function rt(Fe,We){return n(Fe.getUTCMinutes(),We,2)}function Je(Fe,We){return n(Fe.getUTCSeconds(),We,2)}function Ze(Fe){var We=Fe.getUTCDay();return We===0?7:We}function Ee(Fe,We){return n(b.utcSunday.count(b.utcYear(Fe)-1,Fe),We,2)}function xe(Fe,We){var Ae=Fe.getUTCDay();return Fe=Ae>=4||Ae===0?b.utcThursday(Fe):b.utcThursday.ceil(Fe),n(b.utcThursday.count(b.utcYear(Fe),Fe)+(b.utcYear(Fe).getUTCDay()===4),We,2)}function he(Fe){return Fe.getUTCDay()}function De(Fe,We){return n(b.utcMonday.count(b.utcYear(Fe)-1,Fe),We,2)}function tt(Fe,We){return n(Fe.getUTCFullYear()%100,We,2)}function nt(Fe,We){return n(Fe.getUTCFullYear()%1e4,We,4)}function $e(){return"+0000"}function Et(){return"%"}function Ct(Fe){return+Fe}function jt(Fe){return Math.floor(+Fe/1e3)}var Wt;dr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function dr(Fe){return Wt=t(Fe),h.timeFormat=Wt.format,h.timeParse=Wt.parse,h.utcFormat=Wt.utcFormat,h.utcParse=Wt.utcParse,Wt}var vr="%Y-%m-%dT%H:%M:%S.%LZ";function Dr(Fe){return Fe.toISOString()}var hr=Date.prototype.toISOString?Dr:h.utcFormat(vr);function Ar(Fe){var We=new Date(Fe);return isNaN(We)?null:We}var mt=+new Date("2000-01-01T00:00:00.000Z")?Ar:h.utcParse(vr);h.isoFormat=hr,h.isoParse=mt,h.timeFormatDefaultLocale=dr,h.timeFormatLocale=t,Object.defineProperty(h,"__esModule",{value:!0})})}}),iu=He({"node_modules/d3-format/dist/d3-format.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=typeof globalThis<"u"?globalThis:h||self,b(h.d3=h.d3||{}))})(Y,function(h){function b(w){return Math.abs(w=Math.round(w))>=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function S(w,g){if((u=(w=g?w.toExponential(g-1):w.toExponential()).indexOf("e"))<0)return null;var u,v=w.slice(0,u);return[v.length>1?v[0]+v.slice(2):v,+w.slice(u+1)]}function E(w){return w=S(Math.abs(w)),w?w[1]:NaN}function e(w,g){return function(u,v){for(var y=u.length,R=[],L=0,z=w[0],F=0;y>0&&z>0&&(F+z+1>v&&(z=Math.max(1,v-F)),R.push(u.substring(y-=z,y+z)),!((F+=z+1)>v));)z=w[L=(L+1)%w.length];return R.reverse().join(g)}}function t(w){return function(g){return g.replace(/[0-9]/g,function(u){return w[+u]})}}var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(w){if(!(g=r.exec(w)))throw new Error("invalid format: "+w);var g;return new a({fill:g[1],align:g[2],sign:g[3],symbol:g[4],zero:g[5],width:g[6],comma:g[7],precision:g[8]&&g[8].slice(1),trim:g[9],type:g[10]})}o.prototype=a.prototype;function a(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function i(w){e:for(var g=w.length,u=1,v=-1,y;u<g;++u)switch(w[u]){case".":v=y=u;break;case"0":v===0&&(v=u),y=u;break;default:if(!+w[u])break e;v>0&&(v=0);break}return v>0?w.slice(0,v)+w.slice(y+1):w}var n;function s(w,g){var u=S(w,g);if(!u)return w+"";var v=u[0],y=u[1],R=y-(n=Math.max(-8,Math.min(8,Math.floor(y/3)))*3)+1,L=v.length;return R===L?v:R>L?v+new Array(R-L+1).join("0"):R>0?v.slice(0,R)+"."+v.slice(R):"0."+new Array(1-R).join("0")+S(w,Math.max(0,g+R-1))[0]}function f(w,g){var u=S(w,g);if(!u)return w+"";var v=u[0],y=u[1];return y<0?"0."+new Array(-y).join("0")+v:v.length>y+1?v.slice(0,y+1)+"."+v.slice(y+1):v+new Array(y-v.length+2).join("0")}var c={"%":function(w,g){return(w*100).toFixed(g)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:b,e:function(w,g){return w.toExponential(g)},f:function(w,g){return w.toFixed(g)},g:function(w,g){return w.toPrecision(g)},o:function(w){return Math.round(w).toString(8)},p:function(w,g){return f(w*100,g)},r:f,s,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function p(w){return w}var d=Array.prototype.map,T=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function l(w){var g=w.grouping===void 0||w.thousands===void 0?p:e(d.call(w.grouping,Number),w.thousands+""),u=w.currency===void 0?"":w.currency[0]+"",v=w.currency===void 0?"":w.currency[1]+"",y=w.decimal===void 0?".":w.decimal+"",R=w.numerals===void 0?p:t(d.call(w.numerals,String)),L=w.percent===void 0?"%":w.percent+"",z=w.minus===void 0?"-":w.minus+"",F=w.nan===void 0?"NaN":w.nan+"";function B(I){I=o(I);var N=I.fill,U=I.align,X=I.sign,ee=I.symbol,ue=I.zero,oe=I.width,le=I.comma,V=I.precision,J=I.trim,te=I.type;te==="n"?(le=!0,te="g"):c[te]||(V===void 0&&(V=12),J=!0,te="g"),(ue||N==="0"&&U==="=")&&(ue=!0,N="0",U="=");var Z=ee==="$"?u:ee==="#"&&/[boxX]/.test(te)?"0"+te.toLowerCase():"",se=ee==="$"?v:/[%p]/.test(te)?L:"",Q=c[te],q=/[defgprs%]/.test(te);V=V===void 0?6:/[gprs]/.test(te)?Math.max(1,Math.min(21,V)):Math.max(0,Math.min(20,V));function re(ae){var fe=Z,be=se,Me,Ie,Le;if(te==="c")be=Q(ae)+be,ae="";else{ae=+ae;var je=ae<0||1/ae<0;if(ae=isNaN(ae)?F:Q(Math.abs(ae),V),J&&(ae=i(ae)),je&&+ae==0&&X!=="+"&&(je=!1),fe=(je?X==="("?X:z:X==="-"||X==="("?"":X)+fe,be=(te==="s"?T[8+n/3]:"")+be+(je&&X==="("?")":""),q){for(Me=-1,Ie=ae.length;++Me<Ie;)if(Le=ae.charCodeAt(Me),48>Le||Le>57){be=(Le===46?y+ae.slice(Me+1):ae.slice(Me))+be,ae=ae.slice(0,Me);break}}}le&&!ue&&(ae=g(ae,1/0));var et=fe.length+ae.length+be.length,rt=et<oe?new Array(oe-et+1).join(N):"";switch(le&&ue&&(ae=g(rt+ae,rt.length?oe-be.length:1/0),rt=""),U){case"<":ae=fe+ae+be+rt;break;case"=":ae=fe+rt+ae+be;break;case"^":ae=rt.slice(0,et=rt.length>>1)+fe+ae+be+rt.slice(et);break;default:ae=rt+fe+ae+be;break}return R(ae)}return re.toString=function(){return I+""},re}function O(I,N){var U=B((I=o(I),I.type="f",I)),X=Math.max(-8,Math.min(8,Math.floor(E(N)/3)))*3,ee=Math.pow(10,-X),ue=T[8+X/3];return function(oe){return U(ee*oe)+ue}}return{format:B,formatPrefix:O}}var m;x({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function x(w){return m=l(w),h.format=m.format,h.formatPrefix=m.formatPrefix,m}function A(w){return Math.max(0,-E(Math.abs(w)))}function M(w,g){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(E(g)/3)))*3-E(Math.abs(w)))}function _(w,g){return w=Math.abs(w),g=Math.abs(g)-w,Math.max(0,E(g)-E(w))+1}h.FormatSpecifier=a,h.formatDefaultLocale=x,h.formatLocale=l,h.formatSpecifier=o,h.precisionFixed=A,h.precisionPrefix=M,h.precisionRound=_,Object.defineProperty(h,"__esModule",{value:!0})})}}),Sf=He({"node_modules/is-string-blank/index.js"(Y,G){G.exports=function(h){for(var b=h.length,S,E=0;E<b;E++)if(S=h.charCodeAt(E),(S<9||S>13)&&S!==32&&S!==133&&S!==160&&S!==5760&&S!==6158&&(S<8192||S>8205)&&S!==8232&&S!==8233&&S!==8239&&S!==8287&&S!==8288&&S!==12288&&S!==65279)return!1;return!0}}}),Ui=He({"node_modules/fast-isnumeric/index.js"(Y,G){var h=Sf();G.exports=function(b){var S=typeof b;if(S==="string"){var E=b;if(b=+b,b===0&&h(E))return!1}else if(S!=="number")return!1;return b-b<1}}}),Qo=He({"src/constants/numerical.js"(Y,G){G.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}}),Cp=He({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=typeof globalThis<"u"?globalThis:h||self,b(h["base64-arraybuffer"]={}))})(Y,function(h){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256),E=0;E<b.length;E++)S[b.charCodeAt(E)]=E;var e=function(r){var o=new Uint8Array(r),a,i=o.length,n="";for(a=0;a<i;a+=3)n+=b[o[a]>>2],n+=b[(o[a]&3)<<4|o[a+1]>>4],n+=b[(o[a+1]&15)<<2|o[a+2]>>6],n+=b[o[a+2]&63];return i%3===2?n=n.substring(0,n.length-1)+"=":i%3===1&&(n=n.substring(0,n.length-2)+"=="),n},t=function(r){var o=r.length*.75,a=r.length,i,n=0,s,f,c,p;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);var d=new ArrayBuffer(o),T=new Uint8Array(d);for(i=0;i<a;i+=4)s=S[r.charCodeAt(i)],f=S[r.charCodeAt(i+1)],c=S[r.charCodeAt(i+2)],p=S[r.charCodeAt(i+3)],T[n++]=s<<2|f>>4,T[n++]=(f&15)<<4|c>>2,T[n++]=(c&3)<<6|p&63;return d};h.decode=t,h.encode=e,Object.defineProperty(h,"__esModule",{value:!0})})}}),fd=He({"src/lib/is_plain_object.js"(Y,G){G.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),Sh=He({"src/lib/array.js"(Y){var G=Cp().decode,h=fd(),b=Array.isArray,S=ArrayBuffer,E=DataView;function e(s){return S.isView(s)&&!(s instanceof E)}Y.isTypedArray=e;function t(s){return b(s)||e(s)}Y.isArrayOrTypedArray=t;function r(s){return!t(s[0])}Y.isArray1D=r,Y.ensureArray=function(s,f){return b(s)||(s=[]),s.length=f,s};var o={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};o.uint8c=o.u1c,o.uint8=o.u1,o.int8=o.i1,o.uint16=o.u2,o.int16=o.i2,o.uint32=o.u4,o.int32=o.i4,o.float32=o.f4,o.float64=o.f8;function a(s){return s.constructor===ArrayBuffer}Y.isArrayBuffer=a,Y.decodeTypedArraySpec=function(s){var f=[],c=i(s),p=c.dtype,d=o[p];if(!d)throw new Error('Error in dtype: "'+p+'"');var T=d.BYTES_PER_ELEMENT,l=c.bdata;a(l)||(l=G(l));var m=c.shape===void 0?[l.byteLength/T]:(""+c.shape).split(",");m.reverse();var x=m.length,A,M,_=+m[0],w=T*_,g=0;if(x===1)f=new d(l);else if(x===2)for(A=+m[1],M=0;M<A;M++)f[M]=new d(l,g,_),g+=w;else if(x===3){A=+m[1];for(var u=+m[2],v=0;v<u;v++)for(f[v]=[],M=0;M<A;M++)f[v][M]=new d(l,g,_),g+=w}else throw new Error("ndim: "+x+'is not supported with the shape:"'+c.shape+'"');return f.bdata=c.bdata,f.dtype=c.dtype,f.shape=m.reverse().join(","),s._inputArray=f,f},Y.isTypedArraySpec=function(s){return h(s)&&s.hasOwnProperty("dtype")&&typeof s.dtype=="string"&&s.hasOwnProperty("bdata")&&(typeof s.bdata=="string"||a(s.bdata))&&(s.shape===void 0||s.hasOwnProperty("shape")&&(typeof s.shape=="string"||typeof s.shape=="number"))};function i(s){return{bdata:s.bdata,dtype:s.dtype,shape:s.shape}}Y.concat=function(){var s=[],f=!0,c=0,p,d,T,l,m,x,A,M;for(T=0;T<arguments.length;T++)l=arguments[T],x=l.length,x&&(d?s.push(l):(d=l,m=x),b(l)?p=!1:(f=!1,c?p!==l.constructor&&(p=!1):p=l.constructor),c+=x);if(!c)return[];if(!s.length)return d;if(f)return d.concat.apply(d,s);if(p){for(A=new p(c),A.set(d),T=0;T<s.length;T++)l=s[T],A.set(l,m),m+=l.length;return A}for(A=new Array(c),M=0;M<d.length;M++)A[M]=d[M];for(T=0;T<s.length;T++){for(l=s[T],M=0;M<l.length;M++)A[m+M]=l[M];m+=M}return A},Y.maxRowLength=function(s){return n(s,Math.max,0)},Y.minRowLength=function(s){return n(s,Math.min,1/0)};function n(s,f,c){if(t(s))if(t(s[0])){for(var p=c,d=0;d<s.length;d++)p=f(p,s[d].length);return p}else return s.length;return 0}}}),$g=He({"src/lib/nested_property.js"(Y,G){var h=Ui(),b=Sh().isArrayOrTypedArray;G.exports=function(s,f){if(h(f))f=String(f);else if(typeof f!="string"||f.slice(-4)==="[-1]")throw"bad property string";var c=f.split("."),p,d,T,l;for(l=0;l<c.length;l++)if(String(c[l]).slice(0,2)==="__")throw"bad property string";for(l=0;l<c.length;){if(p=String(c[l]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),p){if(p[1])c[l]=p[1];else if(l===0)c.splice(0,1);else throw"bad property string";for(d=p[2].slice(1,-1).split("]["),T=0;T<d.length;T++)l++,c.splice(l,0,Number(d[T]))}l++}return typeof s!="object"?i(s,f,c):{set:t(s,c,f),get:S(s,c),astr:f,parts:c,obj:s}};function S(n,s){return function(f){var c=n,p,d,T,l,m;for(l=0;l<s.length-1;l++){if(p=s[l],p===-1){for(d=!0,T=[],m=0;m<c.length;m++)T[m]=S(c[m],s.slice(l+1))(f),T[m]!==T[0]&&(d=!1);return d?T[0]:T}if(typeof p=="number"&&!b(c)||(c=c[p],typeof c!="object"||c===null))return}if(!(typeof c!="object"||c===null)&&(T=c[s[l]],!(!f&&T===null)))return T}}var E=/(^|\.)args\[/;function e(n,s){return n===void 0||n===null&&!s.match(E)}function t(n,s,f){return function(c){var p=n,d="",T=e(c,f),l,m;for(m=0;m<s.length-1;m++){if(l=s[m],typeof l=="number"&&!b(p))throw"array index but container is not an array";if(l===-1){if(T=!o(p,s.slice(m+1),c,f),T)break;return}if(!a(p,l,s[m+1],T))break;if(p=p[l],typeof p!="object"||p===null)throw"container is not an object";d=r(d,l)}if(T){if(m===s.length-1&&(delete p[s[m]],Array.isArray(p)&&+s[m]===p.length-1))for(;p.length&&p[p.length-1]===void 0;)p.pop()}else p[s[m]]=c}}function r(n,s){var f=s;return h(s)?f="["+s+"]":n&&(f="."+s),n+f}function o(n,s,f,c){var p=b(f),d=!0,T=f,l=c.replace("-1",0),m=p?!1:e(f,l),x=s[0],A;for(A=0;A<n.length;A++)l=c.replace("-1",A),p&&(T=f[A%f.length],m=e(T,l)),m&&(d=!1),a(n,A,x,m)&&t(n[A],s,c.replace("-1",A))(T);return d}function a(n,s,f,c){if(n[s]===void 0){if(c)return!1;typeof f=="number"?n[s]=[]:n[s]={}}return!0}function i(n,s,f){return{set:function(){throw"bad container"},get:function(){},astr:s,parts:f,obj:n}}}}),sA=He({"src/lib/keyed_container.js"(Y,G){var h=$g(),b=/^\w*$/,S=0,E=1,e=2,t=3,r=4;G.exports=function(a,i,n,s){n=n||"name",s=s||"value";var f,c,p,d={};i&&i.length?(p=h(a,i),c=p.get()):c=a,i=i||"";var T={};if(c)for(f=0;f<c.length;f++)T[c[f][n]]=f;var l=b.test(s),m={set:function(x,A){var M=A===null?r:S;if(!c){if(!p||M===r)return;c=[],p.set(c)}var _=T[x];if(_===void 0){if(M===r)return;M=M|t,_=c.length,T[x]=_}else A!==(l?c[_][s]:h(c[_],s).get())&&(M=M|e);var w=c[_]=c[_]||{};return w[n]=x,l?w[s]=A:h(w,s).set(A),A!==null&&(M=M&~r),d[_]=d[_]|M,m},get:function(x){if(c){var A=T[x];if(A!==void 0)return l?c[A][s]:h(c[A],s).get()}},rename:function(x,A){var M=T[x];return M===void 0||(d[M]=d[M]|E,T[A]=M,delete T[x],c[M][n]=A),m},remove:function(x){var A=T[x];if(A===void 0)return m;var M=c[A];if(Object.keys(M).length>2)return d[A]=d[A]|e,m.set(x,null);if(l){for(f=A;f<c.length;f++)d[f]=d[f]|t;for(f=A;f<c.length;f++)T[c[f][n]]--;c.splice(A,1),delete T[x]}else h(M,s).set(null),d[A]=d[A]|e|r;return m},constructUpdate:function(){for(var x,A,M={},_=Object.keys(d),w=0;w<_.length;w++)A=_[w],x=i+"["+A+"]",c[A]?(d[A]&E&&(M[x+"."+n]=c[A][n]),d[A]&e&&(l?M[x+"."+s]=d[A]&r?null:c[A][s]:M[x+"."+s]=d[A]&r?null:h(c[A],s).get())):M[x]=null;return M}};return m}}}),lA=He({"src/lib/relative_attr.js"(Y,G){var h=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,b=/^[^\.\[\]]+$/;G.exports=function(S,E){for(;E;){var e=S.match(h);if(e)S=e[1];else if(S.match(b))S="";else throw new Error("bad relativeAttr call:"+[S,E]);if(E.charAt(0)==="^")E=E.slice(1);else break}return S&&E.charAt(0)!=="["?S+"."+E:S+E}}}),Jy=He({"src/lib/to_log_range.js"(Y,G){var h=Ui();G.exports=function(S,E){if(S>0)return Math.log(S)/Math.LN10;var e=Math.log(Math.min(E[0],E[1]))/Math.LN10;return h(e)||(e=Math.log(Math.max(E[0],E[1]))/Math.LN10-6),e}}}),uA=He({"src/lib/relink_private.js"(Y,G){var h=Sh().isArrayOrTypedArray,b=fd();G.exports=function S(E,e){for(var t in e){var r=e[t],o=E[t];if(o!==r)if(t.charAt(0)==="_"||typeof r=="function"){if(t in E)continue;E[t]=r}else if(h(r)&&h(o)&&b(r[0])){if(t==="customdata"||t==="ids")continue;for(var a=Math.min(r.length,o.length),i=0;i<a;i++)o[i]!==r[i]&&b(r[i])&&b(o[i])&&S(o[i],r[i])}else b(r)&&b(o)&&(S(o,r),Object.keys(o).length||delete E[t])}}}}),F0=He({"src/lib/mod.js"(Y,G){function h(S,E){var e=S%E;return e<0?e+E:e}function b(S,E){return Math.abs(S)>E/2?S-Math.round(S/E)*E:S}G.exports={mod:h,modHalf:b}}}),Zf=He({"node_modules/tinycolor2/tinycolor.js"(Y,G){(function(h){var b=/^\s+/,S=/\s+$/,E=0,e=h.round,t=h.min,r=h.max,o=h.random;function a(q,re){if(q=q||"",re=re||{},q instanceof a)return q;if(!(this instanceof a))return new a(q,re);var ae=i(q);this._originalInput=q,this._r=ae.r,this._g=ae.g,this._b=ae.b,this._a=ae.a,this._roundA=e(100*this._a)/100,this._format=re.format||ae.format,this._gradientType=re.gradientType,this._r<1&&(this._r=e(this._r)),this._g<1&&(this._g=e(this._g)),this._b<1&&(this._b=e(this._b)),this._ok=ae.ok,this._tc_id=E++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var q=this.toRgb();return(q.r*299+q.g*587+q.b*114)/1e3},getLuminance:function(){var q=this.toRgb(),re,ae,fe,be,Me,Ie;return re=q.r/255,ae=q.g/255,fe=q.b/255,re<=.03928?be=re/12.92:be=h.pow((re+.055)/1.055,2.4),ae<=.03928?Me=ae/12.92:Me=h.pow((ae+.055)/1.055,2.4),fe<=.03928?Ie=fe/12.92:Ie=h.pow((fe+.055)/1.055,2.4),.2126*be+.7152*Me+.0722*Ie},setAlpha:function(q){return this._a=I(q),this._roundA=e(100*this._a)/100,this},toHsv:function(){var q=c(this._r,this._g,this._b);return{h:q.h*360,s:q.s,v:q.v,a:this._a}},toHsvString:function(){var q=c(this._r,this._g,this._b),re=e(q.h*360),ae=e(q.s*100),fe=e(q.v*100);return this._a==1?"hsv("+re+", "+ae+"%, "+fe+"%)":"hsva("+re+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHsl:function(){var q=s(this._r,this._g,this._b);return{h:q.h*360,s:q.s,l:q.l,a:this._a}},toHslString:function(){var q=s(this._r,this._g,this._b),re=e(q.h*360),ae=e(q.s*100),fe=e(q.l*100);return this._a==1?"hsl("+re+", "+ae+"%, "+fe+"%)":"hsla("+re+", "+ae+"%, "+fe+"%, "+this._roundA+")"},toHex:function(q){return d(this._r,this._g,this._b,q)},toHexString:function(q){return"#"+this.toHex(q)},toHex8:function(q){return T(this._r,this._g,this._b,this._a,q)},toHex8String:function(q){return"#"+this.toHex8(q)},toRgb:function(){return{r:e(this._r),g:e(this._g),b:e(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+e(this._r)+", "+e(this._g)+", "+e(this._b)+")":"rgba("+e(this._r)+", "+e(this._g)+", "+e(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:e(N(this._r,255)*100)+"%",g:e(N(this._g,255)*100)+"%",b:e(N(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%)":"rgba("+e(N(this._r,255)*100)+"%, "+e(N(this._g,255)*100)+"%, "+e(N(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:B[d(this._r,this._g,this._b,!0)]||!1},toFilter:function(q){var re="#"+l(this._r,this._g,this._b,this._a),ae=re,fe=this._gradientType?"GradientType = 1, ":"";if(q){var be=a(q);ae="#"+l(be._r,be._g,be._b,be._a)}return"progid:DXImageTransform.Microsoft.gradient("+fe+"startColorstr="+re+",endColorstr="+ae+")"},toString:function(q){var re=!!q;q=q||this._format;var ae=!1,fe=this._a<1&&this._a>=0,be=!re&&fe&&(q==="hex"||q==="hex6"||q==="hex3"||q==="hex4"||q==="hex8"||q==="name");return be?q==="name"&&this._a===0?this.toName():this.toRgbString():(q==="rgb"&&(ae=this.toRgbString()),q==="prgb"&&(ae=this.toPercentageRgbString()),(q==="hex"||q==="hex6")&&(ae=this.toHexString()),q==="hex3"&&(ae=this.toHexString(!0)),q==="hex4"&&(ae=this.toHex8String(!0)),q==="hex8"&&(ae=this.toHex8String()),q==="name"&&(ae=this.toName()),q==="hsl"&&(ae=this.toHslString()),q==="hsv"&&(ae=this.toHsvString()),ae||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(q,re){var ae=q.apply(null,[this].concat([].slice.call(re)));return this._r=ae._r,this._g=ae._g,this._b=ae._b,this.setAlpha(ae._a),this},lighten:function(){return this._applyModification(M,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(x,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(q,re){return q.apply(null,[this].concat([].slice.call(re)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(u,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(R,arguments)},triad:function(){return this._applyCombination(v,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},a.fromRatio=function(q,re){if(typeof q=="object"){var ae={};for(var fe in q)q.hasOwnProperty(fe)&&(fe==="a"?ae[fe]=q[fe]:ae[fe]=le(q[fe]));q=ae}return a(q,re)};function i(q){var re={r:0,g:0,b:0},ae=1,fe=null,be=null,Me=null,Ie=!1,Le=!1;return typeof q=="string"&&(q=se(q)),typeof q=="object"&&(Z(q.r)&&Z(q.g)&&Z(q.b)?(re=n(q.r,q.g,q.b),Ie=!0,Le=String(q.r).substr(-1)==="%"?"prgb":"rgb"):Z(q.h)&&Z(q.s)&&Z(q.v)?(fe=le(q.s),be=le(q.v),re=p(q.h,fe,be),Ie=!0,Le="hsv"):Z(q.h)&&Z(q.s)&&Z(q.l)&&(fe=le(q.s),Me=le(q.l),re=f(q.h,fe,Me),Ie=!0,Le="hsl"),q.hasOwnProperty("a")&&(ae=q.a)),ae=I(ae),{ok:Ie,format:q.format||Le,r:t(255,r(re.r,0)),g:t(255,r(re.g,0)),b:t(255,r(re.b,0)),a:ae}}function n(q,re,ae){return{r:N(q,255)*255,g:N(re,255)*255,b:N(ae,255)*255}}function s(q,re,ae){q=N(q,255),re=N(re,255),ae=N(ae,255);var fe=r(q,re,ae),be=t(q,re,ae),Me,Ie,Le=(fe+be)/2;if(fe==be)Me=Ie=0;else{var je=fe-be;switch(Ie=Le>.5?je/(2-fe-be):je/(fe+be),fe){case q:Me=(re-ae)/je+(re<ae?6:0);break;case re:Me=(ae-q)/je+2;break;case ae:Me=(q-re)/je+4;break}Me/=6}return{h:Me,s:Ie,l:Le}}function f(q,re,ae){var fe,be,Me;q=N(q,360),re=N(re,100),ae=N(ae,100);function Ie(et,rt,Je){return Je<0&&(Je+=1),Je>1&&(Je-=1),Je<1/6?et+(rt-et)*6*Je:Je<1/2?rt:Je<2/3?et+(rt-et)*(2/3-Je)*6:et}if(re===0)fe=be=Me=ae;else{var Le=ae<.5?ae*(1+re):ae+re-ae*re,je=2*ae-Le;fe=Ie(je,Le,q+1/3),be=Ie(je,Le,q),Me=Ie(je,Le,q-1/3)}return{r:fe*255,g:be*255,b:Me*255}}function c(q,re,ae){q=N(q,255),re=N(re,255),ae=N(ae,255);var fe=r(q,re,ae),be=t(q,re,ae),Me,Ie,Le=fe,je=fe-be;if(Ie=fe===0?0:je/fe,fe==be)Me=0;else{switch(fe){case q:Me=(re-ae)/je+(re<ae?6:0);break;case re:Me=(ae-q)/je+2;break;case ae:Me=(q-re)/je+4;break}Me/=6}return{h:Me,s:Ie,v:Le}}function p(q,re,ae){q=N(q,360)*6,re=N(re,100),ae=N(ae,100);var fe=h.floor(q),be=q-fe,Me=ae*(1-re),Ie=ae*(1-be*re),Le=ae*(1-(1-be)*re),je=fe%6,et=[ae,Ie,Me,Me,Le,ae][je],rt=[Le,ae,ae,Ie,Me,Me][je],Je=[Me,Me,Le,ae,ae,Ie][je];return{r:et*255,g:rt*255,b:Je*255}}function d(q,re,ae,fe){var be=[oe(e(q).toString(16)),oe(e(re).toString(16)),oe(e(ae).toString(16))];return fe&&be[0].charAt(0)==be[0].charAt(1)&&be[1].charAt(0)==be[1].charAt(1)&&be[2].charAt(0)==be[2].charAt(1)?be[0].charAt(0)+be[1].charAt(0)+be[2].charAt(0):be.join("")}function T(q,re,ae,fe,be){var Me=[oe(e(q).toString(16)),oe(e(re).toString(16)),oe(e(ae).toString(16)),oe(V(fe))];return be&&Me[0].charAt(0)==Me[0].charAt(1)&&Me[1].charAt(0)==Me[1].charAt(1)&&Me[2].charAt(0)==Me[2].charAt(1)&&Me[3].charAt(0)==Me[3].charAt(1)?Me[0].charAt(0)+Me[1].charAt(0)+Me[2].charAt(0)+Me[3].charAt(0):Me.join("")}function l(q,re,ae,fe){var be=[oe(V(fe)),oe(e(q).toString(16)),oe(e(re).toString(16)),oe(e(ae).toString(16))];return be.join("")}a.equals=function(q,re){return!q||!re?!1:a(q).toRgbString()==a(re).toRgbString()},a.random=function(){return a.fromRatio({r:o(),g:o(),b:o()})};function m(q,re){re=re===0?0:re||10;var ae=a(q).toHsl();return ae.s-=re/100,ae.s=U(ae.s),a(ae)}function x(q,re){re=re===0?0:re||10;var ae=a(q).toHsl();return ae.s+=re/100,ae.s=U(ae.s),a(ae)}function A(q){return a(q).desaturate(100)}function M(q,re){re=re===0?0:re||10;var ae=a(q).toHsl();return ae.l+=re/100,ae.l=U(ae.l),a(ae)}function _(q,re){re=re===0?0:re||10;var ae=a(q).toRgb();return ae.r=r(0,t(255,ae.r-e(255*-(re/100)))),ae.g=r(0,t(255,ae.g-e(255*-(re/100)))),ae.b=r(0,t(255,ae.b-e(255*-(re/100)))),a(ae)}function w(q,re){re=re===0?0:re||10;var ae=a(q).toHsl();return ae.l-=re/100,ae.l=U(ae.l),a(ae)}function g(q,re){var ae=a(q).toHsl(),fe=(ae.h+re)%360;return ae.h=fe<0?360+fe:fe,a(ae)}function u(q){var re=a(q).toHsl();return re.h=(re.h+180)%360,a(re)}function v(q){var re=a(q).toHsl(),ae=re.h;return[a(q),a({h:(ae+120)%360,s:re.s,l:re.l}),a({h:(ae+240)%360,s:re.s,l:re.l})]}function y(q){var re=a(q).toHsl(),ae=re.h;return[a(q),a({h:(ae+90)%360,s:re.s,l:re.l}),a({h:(ae+180)%360,s:re.s,l:re.l}),a({h:(ae+270)%360,s:re.s,l:re.l})]}function R(q){var re=a(q).toHsl(),ae=re.h;return[a(q),a({h:(ae+72)%360,s:re.s,l:re.l}),a({h:(ae+216)%360,s:re.s,l:re.l})]}function L(q,re,ae){re=re||6,ae=ae||30;var fe=a(q).toHsl(),be=360/ae,Me=[a(q)];for(fe.h=(fe.h-(be*re>>1)+720)%360;--re;)fe.h=(fe.h+be)%360,Me.push(a(fe));return Me}function z(q,re){re=re||6;for(var ae=a(q).toHsv(),fe=ae.h,be=ae.s,Me=ae.v,Ie=[],Le=1/re;re--;)Ie.push(a({h:fe,s:be,v:Me})),Me=(Me+Le)%1;return Ie}a.mix=function(q,re,ae){ae=ae===0?0:ae||50;var fe=a(q).toRgb(),be=a(re).toRgb(),Me=ae/100,Ie={r:(be.r-fe.r)*Me+fe.r,g:(be.g-fe.g)*Me+fe.g,b:(be.b-fe.b)*Me+fe.b,a:(be.a-fe.a)*Me+fe.a};return a(Ie)},a.readability=function(q,re){var ae=a(q),fe=a(re);return(h.max(ae.getLuminance(),fe.getLuminance())+.05)/(h.min(ae.getLuminance(),fe.getLuminance())+.05)},a.isReadable=function(q,re,ae){var fe=a.readability(q,re),be,Me;switch(Me=!1,be=Q(ae),be.level+be.size){case"AAsmall":case"AAAlarge":Me=fe>=4.5;break;case"AAlarge":Me=fe>=3;break;case"AAAsmall":Me=fe>=7;break}return Me},a.mostReadable=function(q,re,ae){var fe=null,be=0,Me,Ie,Le,je;ae=ae||{},Ie=ae.includeFallbackColors,Le=ae.level,je=ae.size;for(var et=0;et<re.length;et++)Me=a.readability(q,re[et]),Me>be&&(be=Me,fe=a(re[et]));return a.isReadable(q,fe,{level:Le,size:je})||!Ie?fe:(ae.includeFallbackColors=!1,a.mostReadable(q,["#fff","#000"],ae))};var F=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=a.hexNames=O(F);function O(q){var re={};for(var ae in q)q.hasOwnProperty(ae)&&(re[q[ae]]=ae);return re}function I(q){return q=parseFloat(q),(isNaN(q)||q<0||q>1)&&(q=1),q}function N(q,re){ee(q)&&(q="100%");var ae=ue(q);return q=t(re,r(0,parseFloat(q))),ae&&(q=parseInt(q*re,10)/100),h.abs(q-re)<1e-6?1:q%re/parseFloat(re)}function U(q){return t(1,r(0,q))}function X(q){return parseInt(q,16)}function ee(q){return typeof q=="string"&&q.indexOf(".")!=-1&&parseFloat(q)===1}function ue(q){return typeof q=="string"&&q.indexOf("%")!=-1}function oe(q){return q.length==1?"0"+q:""+q}function le(q){return q<=1&&(q=q*100+"%"),q}function V(q){return h.round(parseFloat(q)*255).toString(16)}function J(q){return X(q)/255}var te=(function(){var q="[-\\+]?\\d+%?",re="[-\\+]?\\d*\\.\\d+%?",ae="(?:"+re+")|(?:"+q+")",fe="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?",be="[\\s|\\(]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")[,|\\s]+("+ae+")\\s*\\)?";return{CSS_UNIT:new RegExp(ae),rgb:new RegExp("rgb"+fe),rgba:new RegExp("rgba"+be),hsl:new RegExp("hsl"+fe),hsla:new RegExp("hsla"+be),hsv:new RegExp("hsv"+fe),hsva:new RegExp("hsva"+be),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function Z(q){return!!te.CSS_UNIT.exec(q)}function se(q){q=q.replace(b,"").replace(S,"").toLowerCase();var re=!1;if(F[q])q=F[q],re=!0;else if(q=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ae;return(ae=te.rgb.exec(q))?{r:ae[1],g:ae[2],b:ae[3]}:(ae=te.rgba.exec(q))?{r:ae[1],g:ae[2],b:ae[3],a:ae[4]}:(ae=te.hsl.exec(q))?{h:ae[1],s:ae[2],l:ae[3]}:(ae=te.hsla.exec(q))?{h:ae[1],s:ae[2],l:ae[3],a:ae[4]}:(ae=te.hsv.exec(q))?{h:ae[1],s:ae[2],v:ae[3]}:(ae=te.hsva.exec(q))?{h:ae[1],s:ae[2],v:ae[3],a:ae[4]}:(ae=te.hex8.exec(q))?{r:X(ae[1]),g:X(ae[2]),b:X(ae[3]),a:J(ae[4]),format:re?"name":"hex8"}:(ae=te.hex6.exec(q))?{r:X(ae[1]),g:X(ae[2]),b:X(ae[3]),format:re?"name":"hex"}:(ae=te.hex4.exec(q))?{r:X(ae[1]+""+ae[1]),g:X(ae[2]+""+ae[2]),b:X(ae[3]+""+ae[3]),a:J(ae[4]+""+ae[4]),format:re?"name":"hex8"}:(ae=te.hex3.exec(q))?{r:X(ae[1]+""+ae[1]),g:X(ae[2]+""+ae[2]),b:X(ae[3]+""+ae[3]),format:re?"name":"hex"}:!1}function Q(q){var re,ae;return q=q||{level:"AA",size:"small"},re=(q.level||"AA").toUpperCase(),ae=(q.size||"small").toLowerCase(),re!=="AA"&&re!=="AAA"&&(re="AA"),ae!=="small"&&ae!=="large"&&(ae="small"),{level:re,size:ae}}typeof G<"u"&&G.exports?G.exports=a:window.tinycolor=a})(Math)}}),Po=He({"src/lib/extend.js"(Y){var G=fd(),h=Array.isArray;function b(E,e){var t,r;for(t=0;t<E.length;t++){if(r=E[t],r!==null&&typeof r=="object")return!1;r!==void 0&&(e[t]=r)}return!0}Y.extendFlat=function(){return S(arguments,!1,!1,!1)},Y.extendDeep=function(){return S(arguments,!0,!1,!1)},Y.extendDeepAll=function(){return S(arguments,!0,!0,!1)},Y.extendDeepNoArrays=function(){return S(arguments,!0,!1,!0)};function S(E,e,t,r){var o=E[0],a=E.length,i,n,s,f,c,p,d;if(a===2&&h(o)&&h(E[1])&&o.length===0){if(d=b(E[1],o),d)return o;o.splice(0,o.length)}for(var T=1;T<a;T++){i=E[T];for(n in i)s=o[n],f=i[n],r&&h(f)?o[n]=f:e&&f&&(G(f)||(c=h(f)))?(c?(c=!1,p=s&&h(s)?s:[]):p=s&&G(s)?s:{},o[n]=S([p,f],e,t,r)):(typeof f<"u"||t)&&(o[n]=f)}return o}}}),Ru=He({"src/plots/font_attributes.js"(Y,G){G.exports=function(h){var b=h.variantValues,S=h.editType,E=h.colorEditType;E===void 0&&(E=S);var e={editType:S,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};h.noNumericWeightValues&&(e.valType="enumerated",e.values=e.extras,e.extras=void 0,e.min=void 0,e.max=void 0);var t={family:{valType:"string",noBlank:!0,strict:!0,editType:S},size:{valType:"number",min:1,editType:S},color:{valType:"color",editType:E},weight:e,style:{editType:S,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:h.noFontVariant?void 0:{editType:S,valType:"enumerated",values:b||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:h.noFontTextcase?void 0:{editType:S,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:h.noFontLineposition?void 0:{editType:S,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:h.noFontShadow?void 0:{editType:S,valType:"string",dflt:h.autoShadowDflt?"auto":"none"},editType:S};return h.autoSize&&(t.size.dflt="auto"),h.autoColor&&(t.color.dflt="auto"),h.arrayOk&&(t.family.arrayOk=!0,t.weight.arrayOk=!0,t.style.arrayOk=!0,h.noFontVariant||(t.variant.arrayOk=!0),h.noFontTextcase||(t.textcase.arrayOk=!0),h.noFontLineposition||(t.lineposition.arrayOk=!0),h.noFontShadow||(t.shadow.arrayOk=!0),t.size.arrayOk=!0,t.color.arrayOk=!0),t}}}),Jg=He({"src/components/fx/constants.js"(Y,G){G.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),Gd=He({"src/components/fx/layout_attributes.js"(Y,G){var h=Jg(),b=Ru(),S=b({editType:"none"});S.family.dflt=h.HOVERFONT,S.size.dflt=h.HOVERFONTSIZE,G.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:S,grouptitlefont:b({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}}),O0=He({"src/components/fx/attributes.js"(Y,G){var h=Ru(),b=Gd().hoverlabel,S=Po().extendFlat;G.exports={hoverlabel:{bgcolor:S({},b.bgcolor,{arrayOk:!0}),bordercolor:S({},b.bordercolor,{arrayOk:!0}),font:h({arrayOk:!0,editType:"none"}),align:S({},b.align,{arrayOk:!0}),namelength:S({},b.namelength,{arrayOk:!0}),showarrow:S({},b.showarrow),editType:"none"}}}}),Nl=He({"src/plots/attributes.js"(Y,G){var h=Ru(),b=O0();G.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:h({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:b.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}}),Lp=He({"src/components/colorscale/scales.js"(Y,G){var h=Zf(),b={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},S=b.RdBu;function E(r,o){if(o||(o=S),!r)return o;function a(){try{r=b[r]||JSON.parse(r)}catch{r=o}}return typeof r=="string"&&(a(),typeof r=="string"&&a()),e(r)?r:o}function e(r){var o=0;if(!Array.isArray(r)||r.length<2||!r[0]||!r[r.length-1]||+r[0][0]!=0||+r[r.length-1][0]!=1)return!1;for(var a=0;a<r.length;a++){var i=r[a];if(i.length!==2||+i[0]<o||!h(i[1]).isValid())return!1;o=+i[0]}return!0}function t(r){return b[r]!==void 0?!0:e(r)}G.exports={scales:b,defaultScale:S,get:E,isValid:t}}}),Mf=He({"src/components/color/attributes.js"(Y){Y.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Y.defaultLine="#444",Y.lightLine="#eee",Y.background="#fff",Y.borderLine="#BEC8D9",Y.lightFraction=1e3/11}}),Di=He({"src/components/color/index.js"(Y,G){var h=Zf(),b=Ui(),S=Sh().isTypedArray,E=G.exports={},e=Mf();E.defaults=e.defaults;var t=E.defaultLine=e.defaultLine;E.lightLine=e.lightLine;var r=E.background=e.background;E.tinyRGB=function(a){var i=a.toRgb();return"rgb("+Math.round(i.r)+", "+Math.round(i.g)+", "+Math.round(i.b)+")"},E.rgb=function(a){return E.tinyRGB(h(a))},E.opacity=function(a){return a?h(a).getAlpha():0},E.addOpacity=function(a,i){var n=h(a).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+i+")"},E.combine=function(a,i){var n=h(a).toRgb();if(n.a===1)return h(a).toRgbString();var s=h(i||r).toRgb(),f=s.a===1?s:{r:255*(1-s.a)+s.r*s.a,g:255*(1-s.a)+s.g*s.a,b:255*(1-s.a)+s.b*s.a},c={r:f.r*(1-n.a)+n.r*n.a,g:f.g*(1-n.a)+n.g*n.a,b:f.b*(1-n.a)+n.b*n.a};return h(c).toRgbString()},E.interpolate=function(a,i,n){var s=h(a).toRgb(),f=h(i).toRgb(),c={r:n*s.r+(1-n)*f.r,g:n*s.g+(1-n)*f.g,b:n*s.b+(1-n)*f.b};return h(c).toRgbString()},E.contrast=function(a,i,n){var s=h(a);s.getAlpha()!==1&&(s=h(E.combine(a,r)));var f=s.isDark()?i?s.lighten(i):r:n?s.darken(n):t;return f.toString()},E.stroke=function(a,i){var n=h(i);a.style({stroke:E.tinyRGB(n),"stroke-opacity":n.getAlpha()})},E.fill=function(a,i){var n=h(i);a.style({fill:E.tinyRGB(n),"fill-opacity":n.getAlpha()})},E.clean=function(a){if(!(!a||typeof a!="object")){var i=Object.keys(a),n,s,f,c;for(n=0;n<i.length;n++)if(f=i[n],c=a[f],f.slice(-5)==="color")if(Array.isArray(c))for(s=0;s<c.length;s++)c[s]=o(c[s]);else a[f]=o(c);else if(f.slice(-10)==="colorscale"&&Array.isArray(c))for(s=0;s<c.length;s++)Array.isArray(c[s])&&(c[s][1]=o(c[s][1]));else if(Array.isArray(c)){var p=c[0];if(!Array.isArray(p)&&p&&typeof p=="object")for(s=0;s<c.length;s++)E.clean(c[s])}else c&&typeof c=="object"&&!S(c)&&E.clean(c)}};function o(a){if(b(a)||typeof a!="string")return a;var i=a.trim();if(i.slice(0,3)!=="rgb")return a;var n=i.match(/^rgba?\s*\(([^()]*)\)$/);if(!n)return a;var s=n[1].trim().split(/\s*[\s,]\s*/),f=i.charAt(3)==="a"&&s.length===4;if(!f&&s.length!==3)return a;for(var c=0;c<s.length;c++){if(!s[c].length||(s[c]=Number(s[c]),!(s[c]>=0)))return a;if(c===3)s[c]>1&&(s[c]=1);else if(s[c]>=1)return a}var p=Math.round(s[0]*255)+", "+Math.round(s[1]*255)+", "+Math.round(s[2]*255);return f?"rgba("+p+", "+s[3]+")":"rgb("+p+")"}}}),Hd=He({"src/constants/interactions.js"(Y,G){G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),B0=He({"src/lib/regex.js"(Y){Y.counter=function(G,h,b,S){var E=(h||"")+(b?"":"$"),e=S===!1?"":"^";return G==="xy"?new RegExp(e+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+E):new RegExp(e+G+"([2-9]|[1-9][0-9]+)?"+E)}}}),cA=He({"src/lib/coerce.js"(Y){var G=Ui(),h=Zf(),b=Po().extendFlat,S=Nl(),E=Lp(),e=Di(),t=Hd().DESELECTDIM,r=$g(),o=B0().counter,a=F0().modHalf,i=Sh().isArrayOrTypedArray,n=Sh().isTypedArraySpec,s=Sh().decodeTypedArraySpec;Y.valObjectMeta={data_array:{coerceFunction:function(c,p,d){p.set(i(c)?c:n(c)?s(c):d)}},enumerated:{coerceFunction:function(c,p,d,T){T.coerceNumber&&(c=+c),T.values.indexOf(c)===-1?p.set(d):p.set(c)},validateFunction:function(c,p){p.coerceNumber&&(c=+c);for(var d=p.values,T=0;T<d.length;T++){var l=String(d[T]);if(l.charAt(0)==="/"&&l.charAt(l.length-1)==="/"){var m=new RegExp(l.slice(1,-1));if(m.test(c))return!0}else if(c===d[T])return!0}return!1}},boolean:{coerceFunction:function(c,p,d,T){const l=m=>m===!0||m===!1;l(c)||T.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(l)?p.set(c):p.set(d)}},number:{coerceFunction:function(c,p,d,T){n(c)&&(c=s(c)),!G(c)||T.min!==void 0&&c<T.min||T.max!==void 0&&c>T.max?p.set(d):p.set(+c)}},integer:{coerceFunction:function(c,p,d,T){if((T.extras||[]).indexOf(c)!==-1){p.set(c);return}n(c)&&(c=s(c)),c%1||!G(c)||T.min!==void 0&&c<T.min||T.max!==void 0&&c>T.max?p.set(d):p.set(+c)}},string:{coerceFunction:function(c,p,d,T){if(typeof c!="string"){var l=typeof c=="number";T.strict===!0||!l?p.set(d):p.set(String(c))}else T.noBlank&&!c?p.set(d):p.set(c)}},color:{coerceFunction:function(c,p,d){n(c)&&(c=s(c)),h(c).isValid()?p.set(c):p.set(d)}},colorlist:{coerceFunction:function(c,p,d){function T(l){return h(l).isValid()}!Array.isArray(c)||!c.length?p.set(d):c.every(T)?p.set(c):p.set(d)}},colorscale:{coerceFunction:function(c,p,d){p.set(E.get(c,d))}},angle:{coerceFunction:function(c,p,d){n(c)&&(c=s(c)),c==="auto"?p.set("auto"):G(c)?p.set(a(+c,360)):p.set(d)}},subplotid:{coerceFunction:function(c,p,d,T){var l=T.regex||o(d);const m=x=>typeof x=="string"&&l.test(x);m(c)||T.arrayOk&&i(c)&&c.length>0&&c.every(m)?p.set(c):p.set(d)},validateFunction:function(c,p){var d=p.dflt;return c===d?!0:typeof c!="string"?!1:!!o(d).test(c)}},flaglist:{coerceFunction:function(c,p,d,T){if((T.extras||[]).indexOf(c)!==-1){p.set(c);return}if(typeof c!="string"){p.set(d);return}for(var l=c.split("+"),m=0;m<l.length;){var x=l[m];T.flags.indexOf(x)===-1||l.indexOf(x)<m?l.splice(m,1):m++}l.length?p.set(l.join("+")):p.set(d)}},any:{coerceFunction:function(c,p,d){c===void 0?p.set(d):p.set(n(c)?s(c):c)}},info_array:{coerceFunction:function(c,p,d,T){function l(F,B,O){var I,N={set:function(U){I=U}};return O===void 0&&(O=B.dflt),Y.valObjectMeta[B.valType].coerceFunction(F,N,O,B),I}if(n(c)&&(c=s(c)),!i(c)){p.set(d);return}var m=T.dimensions===2||T.dimensions==="1-2"&&Array.isArray(c)&&i(c[0]),x=T.items,A=[],M=Array.isArray(x),_=M&&m&&i(x[0]),w=m&&M&&!_,g=M&&!w?x.length:c.length,u,v,y,R,L,z;if(d=Array.isArray(d)?d:[],m)for(u=0;u<g;u++)for(A[u]=[],y=i(c[u])?c[u]:[],w?L=x.length:M?L=x[u].length:L=y.length,v=0;v<L;v++)w?R=x[v]:M?R=x[u][v]:R=x,z=l(y[v],R,(d[u]||[])[v]),z!==void 0&&(A[u][v]=z);else for(u=0;u<g;u++)z=l(c[u],M?x[u]:x,d[u]),z!==void 0&&(A[u]=z);p.set(A)},validateFunction:function(c,p){if(!i(c))return!1;var d=p.items,T=Array.isArray(d),l=p.dimensions===2;if(!p.freeLength&&c.length!==d.length)return!1;for(var m=0;m<c.length;m++)if(l){if(!i(c[m])||!p.freeLength&&c[m].length!==d[m].length)return!1;for(var x=0;x<c[m].length;x++)if(!f(c[m][x],T?d[m][x]:d))return!1}else if(!f(c[m],T?d[m]:d))return!1;return!0}}},Y.coerce=function(c,p,d,T,l){var m=r(d,T).get(),x=r(c,T),A=r(p,T),M=x.get(),_=p._template;if(M===void 0&&_&&(M=r(_,T).get(),_=0),l===void 0&&(l=m.dflt),m.arrayOk){if(i(M))return A.set(M),M;if(n(M))return M=s(M),A.set(M),M}var w=Y.valObjectMeta[m.valType].coerceFunction;w(M,A,l,m);var g=A.get();return _&&g===l&&!f(M,m)&&(M=r(_,T).get(),w(M,A,l,m),g=A.get()),g},Y.coerce2=function(c,p,d,T,l){var m=r(c,T),x=Y.coerce(c,p,d,T,l),A=m.get();return A!=null?x:!1},Y.coerceFont=function(c,p,d,T){T||(T={}),d=b({},d),d=b(d,T.overrideDflt||{});var l={family:c(p+".family",d.family),size:c(p+".size",d.size),color:c(p+".color",d.color),weight:c(p+".weight",d.weight),style:c(p+".style",d.style)};if(T.noFontVariant||(l.variant=c(p+".variant",d.variant)),T.noFontLineposition||(l.lineposition=c(p+".lineposition",d.lineposition)),T.noFontTextcase||(l.textcase=c(p+".textcase",d.textcase)),!T.noFontShadow){var m=d.shadow;m==="none"&&T.autoShadowDflt&&(m="auto"),l.shadow=c(p+".shadow",m)}return l},Y.coercePattern=function(c,p,d,T){var l=c(p+".shape"),m;if(l||(m=c(p+".path")),l||m){l&&c(p+".solidity"),c(p+".size");var x=c(p+".fillmode"),A=x==="overlay";if(!T){var M=c(p+".bgcolor",A?d:void 0);c(p+".fgcolor",A?e.contrast(M):d)}c(p+".fgopacity",A?.5:1)}},Y.coerceHoverinfo=function(c,p,d){var T=p._module.attributes,l=T.hoverinfo?T:S,m=l.hoverinfo,x;if(d._dataLength===1){var A=m.dflt==="all"?m.flags.slice():m.dflt.split("+");A.splice(A.indexOf("name"),1),x=A.join("+")}return Y.coerce(c,p,l,"hoverinfo",x)},Y.coerceSelectionMarkerOpacity=function(c,p){if(c.marker){var d=c.marker.opacity;if(d!==void 0){var T,l;!i(d)&&!c.selected&&!c.unselected&&(T=d,l=t*d),p("selected.marker.opacity",T),p("unselected.marker.opacity",l)}}};function f(c,p){var d=Y.valObjectMeta[p.valType];if(p.arrayOk&&i(c))return!0;if(d.validateFunction)return d.validateFunction(c,p);var T={},l=T,m={set:function(x){l=x}};return d.coerceFunction(c,m,T,p),l!==T}Y.validate=f}}),Pp=He({"src/plot_api/plot_config.js"(Y,G){var h={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},b={};function S(E,e){for(var t in E){var r=E[t];r.valType?e[t]=r.dflt:(e[t]||(e[t]={}),S(r,e[t]))}}S(h,b),G.exports={configAttributes:h,dfltConfig:b}}}),fb=He({"src/lib/notifier.js"(Y,G){var h=_i(),b=Ui(),S=[];G.exports=function(E,e){if(S.indexOf(E)!==-1)return;S.push(E);var t=1e3;b(e)?t=e:e==="long"&&(t=3e3);var r=h.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var o=r.selectAll(".notifier-note").data(S);function a(i){i.duration(700).style("opacity",0).each("end",function(n){var s=S.indexOf(n);s!==-1&&S.splice(s,1),h.select(this).remove()})}o.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(i){var n=h.select(this);n.append("button").classed("notifier-close",!0).html("×").on("click",function(){n.transition().call(a)});for(var s=n.append("p"),f=i.split(/<br\s*\/?>/g),c=0;c<f.length;c++)c&&s.append("br"),s.append("span").text(f[c]);e==="stick"?n.transition().duration(350).style("opacity",1):n.transition().duration(700).style("opacity",1).transition().delay(t).call(a)})}}}),Wd=He({"src/lib/loggers.js"(Y,G){var h=Pp().dfltConfig,b=fb(),S=G.exports={};S.log=function(){var E;if(h.logging>1){var e=["LOG:"];for(E=0;E<arguments.length;E++)e.push(arguments[E]);console.trace.apply(console,e)}if(h.notifyOnLogging>1){var t=[];for(E=0;E<arguments.length;E++)t.push(arguments[E]);b(t.join("<br>"),"long")}},S.warn=function(){var E;if(h.logging>0){var e=["WARN:"];for(E=0;E<arguments.length;E++)e.push(arguments[E]);console.trace.apply(console,e)}if(h.notifyOnLogging>0){var t=[];for(E=0;E<arguments.length;E++)t.push(arguments[E]);b(t.join("<br>"),"stick")}},S.error=function(){var E;if(h.logging>0){var e=["ERROR:"];for(E=0;E<arguments.length;E++)e.push(arguments[E]);console.error.apply(console,e)}if(h.notifyOnLogging>0){var t=[];for(E=0;E<arguments.length;E++)t.push(arguments[E]);b(t.join("<br>"),"stick")}}}}),Qy=He({"src/lib/noop.js"(Y,G){G.exports=function(){}}}),hb=He({"src/lib/push_unique.js"(Y,G){G.exports=function(b,S){if(S instanceof RegExp){for(var E=S.toString(),e=0;e<b.length;e++)if(b[e]instanceof RegExp&&b[e].toString()===E)return b;b.push(S)}else(S||S===0)&&b.indexOf(S)===-1&&b.push(S);return b}}}),fA=He({"node_modules/gl-mat4/create.js"(Y,G){G.exports=h;function h(){var b=new Float32Array(16);return b[0]=1,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=1,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=1,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,b}}}),hA=He({"node_modules/gl-mat4/clone.js"(Y,G){G.exports=h;function h(b){var S=new Float32Array(16);return S[0]=b[0],S[1]=b[1],S[2]=b[2],S[3]=b[3],S[4]=b[4],S[5]=b[5],S[6]=b[6],S[7]=b[7],S[8]=b[8],S[9]=b[9],S[10]=b[10],S[11]=b[11],S[12]=b[12],S[13]=b[13],S[14]=b[14],S[15]=b[15],S}}}),vA=He({"node_modules/gl-mat4/copy.js"(Y,G){G.exports=h;function h(b,S){return b[0]=S[0],b[1]=S[1],b[2]=S[2],b[3]=S[3],b[4]=S[4],b[5]=S[5],b[6]=S[6],b[7]=S[7],b[8]=S[8],b[9]=S[9],b[10]=S[10],b[11]=S[11],b[12]=S[12],b[13]=S[13],b[14]=S[14],b[15]=S[15],b}}}),vb=He({"node_modules/gl-mat4/identity.js"(Y,G){G.exports=h;function h(b){return b[0]=1,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=1,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=1,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,b}}}),dA=He({"node_modules/gl-mat4/transpose.js"(Y,G){G.exports=h;function h(b,S){if(b===S){var E=S[1],e=S[2],t=S[3],r=S[6],o=S[7],a=S[11];b[1]=S[4],b[2]=S[8],b[3]=S[12],b[4]=E,b[6]=S[9],b[7]=S[13],b[8]=e,b[9]=r,b[11]=S[14],b[12]=t,b[13]=o,b[14]=a}else b[0]=S[0],b[1]=S[4],b[2]=S[8],b[3]=S[12],b[4]=S[1],b[5]=S[5],b[6]=S[9],b[7]=S[13],b[8]=S[2],b[9]=S[6],b[10]=S[10],b[11]=S[14],b[12]=S[3],b[13]=S[7],b[14]=S[11],b[15]=S[15];return b}}}),pA=He({"node_modules/gl-mat4/invert.js"(Y,G){G.exports=h;function h(b,S){var E=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],f=S[9],c=S[10],p=S[11],d=S[12],T=S[13],l=S[14],m=S[15],x=E*a-e*o,A=E*i-t*o,M=E*n-r*o,_=e*i-t*a,w=e*n-r*a,g=t*n-r*i,u=s*T-f*d,v=s*l-c*d,y=s*m-p*d,R=f*l-c*T,L=f*m-p*T,z=c*m-p*l,F=x*z-A*L+M*R+_*y-w*v+g*u;return F?(F=1/F,b[0]=(a*z-i*L+n*R)*F,b[1]=(t*L-e*z-r*R)*F,b[2]=(T*g-l*w+m*_)*F,b[3]=(c*w-f*g-p*_)*F,b[4]=(i*y-o*z-n*v)*F,b[5]=(E*z-t*y+r*v)*F,b[6]=(l*M-d*g-m*A)*F,b[7]=(s*g-c*M+p*A)*F,b[8]=(o*L-a*y+n*u)*F,b[9]=(e*y-E*L-r*u)*F,b[10]=(d*w-T*M+m*x)*F,b[11]=(f*M-s*w-p*x)*F,b[12]=(a*v-o*R-i*u)*F,b[13]=(E*R-e*v+t*u)*F,b[14]=(T*A-d*_-l*x)*F,b[15]=(s*_-f*A+c*x)*F,b):null}}}),gA=He({"node_modules/gl-mat4/adjoint.js"(Y,G){G.exports=h;function h(b,S){var E=S[0],e=S[1],t=S[2],r=S[3],o=S[4],a=S[5],i=S[6],n=S[7],s=S[8],f=S[9],c=S[10],p=S[11],d=S[12],T=S[13],l=S[14],m=S[15];return b[0]=a*(c*m-p*l)-f*(i*m-n*l)+T*(i*p-n*c),b[1]=-(e*(c*m-p*l)-f*(t*m-r*l)+T*(t*p-r*c)),b[2]=e*(i*m-n*l)-a*(t*m-r*l)+T*(t*n-r*i),b[3]=-(e*(i*p-n*c)-a*(t*p-r*c)+f*(t*n-r*i)),b[4]=-(o*(c*m-p*l)-s*(i*m-n*l)+d*(i*p-n*c)),b[5]=E*(c*m-p*l)-s*(t*m-r*l)+d*(t*p-r*c),b[6]=-(E*(i*m-n*l)-o*(t*m-r*l)+d*(t*n-r*i)),b[7]=E*(i*p-n*c)-o*(t*p-r*c)+s*(t*n-r*i),b[8]=o*(f*m-p*T)-s*(a*m-n*T)+d*(a*p-n*f),b[9]=-(E*(f*m-p*T)-s*(e*m-r*T)+d*(e*p-r*f)),b[10]=E*(a*m-n*T)-o*(e*m-r*T)+d*(e*n-r*a),b[11]=-(E*(a*p-n*f)-o*(e*p-r*f)+s*(e*n-r*a)),b[12]=-(o*(f*l-c*T)-s*(a*l-i*T)+d*(a*c-i*f)),b[13]=E*(f*l-c*T)-s*(e*l-t*T)+d*(e*c-t*f),b[14]=-(E*(a*l-i*T)-o*(e*l-t*T)+d*(e*i-t*a)),b[15]=E*(a*c-i*f)-o*(e*c-t*f)+s*(e*i-t*a),b}}}),mA=He({"node_modules/gl-mat4/determinant.js"(Y,G){G.exports=h;function h(b){var S=b[0],E=b[1],e=b[2],t=b[3],r=b[4],o=b[5],a=b[6],i=b[7],n=b[8],s=b[9],f=b[10],c=b[11],p=b[12],d=b[13],T=b[14],l=b[15],m=S*o-E*r,x=S*a-e*r,A=S*i-t*r,M=E*a-e*o,_=E*i-t*o,w=e*i-t*a,g=n*d-s*p,u=n*T-f*p,v=n*l-c*p,y=s*T-f*d,R=s*l-c*d,L=f*l-c*T;return m*L-x*R+A*y+M*v-_*u+w*g}}}),yA=He({"node_modules/gl-mat4/multiply.js"(Y,G){G.exports=h;function h(b,S,E){var e=S[0],t=S[1],r=S[2],o=S[3],a=S[4],i=S[5],n=S[6],s=S[7],f=S[8],c=S[9],p=S[10],d=S[11],T=S[12],l=S[13],m=S[14],x=S[15],A=E[0],M=E[1],_=E[2],w=E[3];return b[0]=A*e+M*a+_*f+w*T,b[1]=A*t+M*i+_*c+w*l,b[2]=A*r+M*n+_*p+w*m,b[3]=A*o+M*s+_*d+w*x,A=E[4],M=E[5],_=E[6],w=E[7],b[4]=A*e+M*a+_*f+w*T,b[5]=A*t+M*i+_*c+w*l,b[6]=A*r+M*n+_*p+w*m,b[7]=A*o+M*s+_*d+w*x,A=E[8],M=E[9],_=E[10],w=E[11],b[8]=A*e+M*a+_*f+w*T,b[9]=A*t+M*i+_*c+w*l,b[10]=A*r+M*n+_*p+w*m,b[11]=A*o+M*s+_*d+w*x,A=E[12],M=E[13],_=E[14],w=E[15],b[12]=A*e+M*a+_*f+w*T,b[13]=A*t+M*i+_*c+w*l,b[14]=A*r+M*n+_*p+w*m,b[15]=A*o+M*s+_*d+w*x,b}}}),_A=He({"node_modules/gl-mat4/translate.js"(Y,G){G.exports=h;function h(b,S,E){var e=E[0],t=E[1],r=E[2],o,a,i,n,s,f,c,p,d,T,l,m;return S===b?(b[12]=S[0]*e+S[4]*t+S[8]*r+S[12],b[13]=S[1]*e+S[5]*t+S[9]*r+S[13],b[14]=S[2]*e+S[6]*t+S[10]*r+S[14],b[15]=S[3]*e+S[7]*t+S[11]*r+S[15]):(o=S[0],a=S[1],i=S[2],n=S[3],s=S[4],f=S[5],c=S[6],p=S[7],d=S[8],T=S[9],l=S[10],m=S[11],b[0]=o,b[1]=a,b[2]=i,b[3]=n,b[4]=s,b[5]=f,b[6]=c,b[7]=p,b[8]=d,b[9]=T,b[10]=l,b[11]=m,b[12]=o*e+s*t+d*r+S[12],b[13]=a*e+f*t+T*r+S[13],b[14]=i*e+c*t+l*r+S[14],b[15]=n*e+p*t+m*r+S[15]),b}}}),xA=He({"node_modules/gl-mat4/scale.js"(Y,G){G.exports=h;function h(b,S,E){var e=E[0],t=E[1],r=E[2];return b[0]=S[0]*e,b[1]=S[1]*e,b[2]=S[2]*e,b[3]=S[3]*e,b[4]=S[4]*t,b[5]=S[5]*t,b[6]=S[6]*t,b[7]=S[7]*t,b[8]=S[8]*r,b[9]=S[9]*r,b[10]=S[10]*r,b[11]=S[11]*r,b[12]=S[12],b[13]=S[13],b[14]=S[14],b[15]=S[15],b}}}),bA=He({"node_modules/gl-mat4/rotate.js"(Y,G){G.exports=h;function h(b,S,E,e){var t=e[0],r=e[1],o=e[2],a=Math.sqrt(t*t+r*r+o*o),i,n,s,f,c,p,d,T,l,m,x,A,M,_,w,g,u,v,y,R,L,z,F,B;return Math.abs(a)<1e-6?null:(a=1/a,t*=a,r*=a,o*=a,i=Math.sin(E),n=Math.cos(E),s=1-n,f=S[0],c=S[1],p=S[2],d=S[3],T=S[4],l=S[5],m=S[6],x=S[7],A=S[8],M=S[9],_=S[10],w=S[11],g=t*t*s+n,u=r*t*s+o*i,v=o*t*s-r*i,y=t*r*s-o*i,R=r*r*s+n,L=o*r*s+t*i,z=t*o*s+r*i,F=r*o*s-t*i,B=o*o*s+n,b[0]=f*g+T*u+A*v,b[1]=c*g+l*u+M*v,b[2]=p*g+m*u+_*v,b[3]=d*g+x*u+w*v,b[4]=f*y+T*R+A*L,b[5]=c*y+l*R+M*L,b[6]=p*y+m*R+_*L,b[7]=d*y+x*R+w*L,b[8]=f*z+T*F+A*B,b[9]=c*z+l*F+M*B,b[10]=p*z+m*F+_*B,b[11]=d*z+x*F+w*B,S!==b&&(b[12]=S[12],b[13]=S[13],b[14]=S[14],b[15]=S[15]),b)}}}),wA=He({"node_modules/gl-mat4/rotateX.js"(Y,G){G.exports=h;function h(b,S,E){var e=Math.sin(E),t=Math.cos(E),r=S[4],o=S[5],a=S[6],i=S[7],n=S[8],s=S[9],f=S[10],c=S[11];return S!==b&&(b[0]=S[0],b[1]=S[1],b[2]=S[2],b[3]=S[3],b[12]=S[12],b[13]=S[13],b[14]=S[14],b[15]=S[15]),b[4]=r*t+n*e,b[5]=o*t+s*e,b[6]=a*t+f*e,b[7]=i*t+c*e,b[8]=n*t-r*e,b[9]=s*t-o*e,b[10]=f*t-a*e,b[11]=c*t-i*e,b}}}),TA=He({"node_modules/gl-mat4/rotateY.js"(Y,G){G.exports=h;function h(b,S,E){var e=Math.sin(E),t=Math.cos(E),r=S[0],o=S[1],a=S[2],i=S[3],n=S[8],s=S[9],f=S[10],c=S[11];return S!==b&&(b[4]=S[4],b[5]=S[5],b[6]=S[6],b[7]=S[7],b[12]=S[12],b[13]=S[13],b[14]=S[14],b[15]=S[15]),b[0]=r*t-n*e,b[1]=o*t-s*e,b[2]=a*t-f*e,b[3]=i*t-c*e,b[8]=r*e+n*t,b[9]=o*e+s*t,b[10]=a*e+f*t,b[11]=i*e+c*t,b}}}),AA=He({"node_modules/gl-mat4/rotateZ.js"(Y,G){G.exports=h;function h(b,S,E){var e=Math.sin(E),t=Math.cos(E),r=S[0],o=S[1],a=S[2],i=S[3],n=S[4],s=S[5],f=S[6],c=S[7];return S!==b&&(b[8]=S[8],b[9]=S[9],b[10]=S[10],b[11]=S[11],b[12]=S[12],b[13]=S[13],b[14]=S[14],b[15]=S[15]),b[0]=r*t+n*e,b[1]=o*t+s*e,b[2]=a*t+f*e,b[3]=i*t+c*e,b[4]=n*t-r*e,b[5]=s*t-o*e,b[6]=f*t-a*e,b[7]=c*t-i*e,b}}}),SA=He({"node_modules/gl-mat4/fromRotation.js"(Y,G){G.exports=h;function h(b,S,E){var e,t,r,o=E[0],a=E[1],i=E[2],n=Math.sqrt(o*o+a*a+i*i);return Math.abs(n)<1e-6?null:(n=1/n,o*=n,a*=n,i*=n,e=Math.sin(S),t=Math.cos(S),r=1-t,b[0]=o*o*r+t,b[1]=a*o*r+i*e,b[2]=i*o*r-a*e,b[3]=0,b[4]=o*a*r-i*e,b[5]=a*a*r+t,b[6]=i*a*r+o*e,b[7]=0,b[8]=o*i*r+a*e,b[9]=a*i*r-o*e,b[10]=i*i*r+t,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,b)}}}),MA=He({"node_modules/gl-mat4/fromRotationTranslation.js"(Y,G){G.exports=h;function h(b,S,E){var e=S[0],t=S[1],r=S[2],o=S[3],a=e+e,i=t+t,n=r+r,s=e*a,f=e*i,c=e*n,p=t*i,d=t*n,T=r*n,l=o*a,m=o*i,x=o*n;return b[0]=1-(p+T),b[1]=f+x,b[2]=c-m,b[3]=0,b[4]=f-x,b[5]=1-(s+T),b[6]=d+l,b[7]=0,b[8]=c+m,b[9]=d-l,b[10]=1-(s+p),b[11]=0,b[12]=E[0],b[13]=E[1],b[14]=E[2],b[15]=1,b}}}),EA=He({"node_modules/gl-mat4/fromScaling.js"(Y,G){G.exports=h;function h(b,S){return b[0]=S[0],b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=S[1],b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=S[2],b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,b}}}),kA=He({"node_modules/gl-mat4/fromTranslation.js"(Y,G){G.exports=h;function h(b,S){return b[0]=1,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=1,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=1,b[11]=0,b[12]=S[0],b[13]=S[1],b[14]=S[2],b[15]=1,b}}}),CA=He({"node_modules/gl-mat4/fromXRotation.js"(Y,G){G.exports=h;function h(b,S){var E=Math.sin(S),e=Math.cos(S);return b[0]=1,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=e,b[6]=E,b[7]=0,b[8]=0,b[9]=-E,b[10]=e,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,b}}}),LA=He({"node_modules/gl-mat4/fromYRotation.js"(Y,G){G.exports=h;function h(b,S){var E=Math.sin(S),e=Math.cos(S);return b[0]=e,b[1]=0,b[2]=-E,b[3]=0,b[4]=0,b[5]=1,b[6]=0,b[7]=0,b[8]=E,b[9]=0,b[10]=e,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,b}}}),PA=He({"node_modules/gl-mat4/fromZRotation.js"(Y,G){G.exports=h;function h(b,S){var E=Math.sin(S),e=Math.cos(S);return b[0]=e,b[1]=E,b[2]=0,b[3]=0,b[4]=-E,b[5]=e,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=1,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,b}}}),IA=He({"node_modules/gl-mat4/fromQuat.js"(Y,G){G.exports=h;function h(b,S){var E=S[0],e=S[1],t=S[2],r=S[3],o=E+E,a=e+e,i=t+t,n=E*o,s=e*o,f=e*a,c=t*o,p=t*a,d=t*i,T=r*o,l=r*a,m=r*i;return b[0]=1-f-d,b[1]=s+m,b[2]=c-l,b[3]=0,b[4]=s-m,b[5]=1-n-d,b[6]=p+T,b[7]=0,b[8]=c+l,b[9]=p-T,b[10]=1-n-f,b[11]=0,b[12]=0,b[13]=0,b[14]=0,b[15]=1,b}}}),RA=He({"node_modules/gl-mat4/frustum.js"(Y,G){G.exports=h;function h(b,S,E,e,t,r,o){var a=1/(E-S),i=1/(t-e),n=1/(r-o);return b[0]=r*2*a,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=r*2*i,b[6]=0,b[7]=0,b[8]=(E+S)*a,b[9]=(t+e)*i,b[10]=(o+r)*n,b[11]=-1,b[12]=0,b[13]=0,b[14]=o*r*2*n,b[15]=0,b}}}),DA=He({"node_modules/gl-mat4/perspective.js"(Y,G){G.exports=h;function h(b,S,E,e,t){var r=1/Math.tan(S/2),o=1/(e-t);return b[0]=r/E,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=r,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=(t+e)*o,b[11]=-1,b[12]=0,b[13]=0,b[14]=2*t*e*o,b[15]=0,b}}}),zA=He({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(Y,G){G.exports=h;function h(b,S,E,e){var t=Math.tan(S.upDegrees*Math.PI/180),r=Math.tan(S.downDegrees*Math.PI/180),o=Math.tan(S.leftDegrees*Math.PI/180),a=Math.tan(S.rightDegrees*Math.PI/180),i=2/(o+a),n=2/(t+r);return b[0]=i,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=n,b[6]=0,b[7]=0,b[8]=-((o-a)*i*.5),b[9]=(t-r)*n*.5,b[10]=e/(E-e),b[11]=-1,b[12]=0,b[13]=0,b[14]=e*E/(E-e),b[15]=0,b}}}),FA=He({"node_modules/gl-mat4/ortho.js"(Y,G){G.exports=h;function h(b,S,E,e,t,r,o){var a=1/(S-E),i=1/(e-t),n=1/(r-o);return b[0]=-2*a,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=-2*i,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=2*n,b[11]=0,b[12]=(S+E)*a,b[13]=(t+e)*i,b[14]=(o+r)*n,b[15]=1,b}}}),OA=He({"node_modules/gl-mat4/lookAt.js"(Y,G){var h=vb();G.exports=b;function b(S,E,e,t){var r,o,a,i,n,s,f,c,p,d,T=E[0],l=E[1],m=E[2],x=t[0],A=t[1],M=t[2],_=e[0],w=e[1],g=e[2];return Math.abs(T-_)<1e-6&&Math.abs(l-w)<1e-6&&Math.abs(m-g)<1e-6?h(S):(f=T-_,c=l-w,p=m-g,d=1/Math.sqrt(f*f+c*c+p*p),f*=d,c*=d,p*=d,r=A*p-M*c,o=M*f-x*p,a=x*c-A*f,d=Math.sqrt(r*r+o*o+a*a),d?(d=1/d,r*=d,o*=d,a*=d):(r=0,o=0,a=0),i=c*a-p*o,n=p*r-f*a,s=f*o-c*r,d=Math.sqrt(i*i+n*n+s*s),d?(d=1/d,i*=d,n*=d,s*=d):(i=0,n=0,s=0),S[0]=r,S[1]=i,S[2]=f,S[3]=0,S[4]=o,S[5]=n,S[6]=c,S[7]=0,S[8]=a,S[9]=s,S[10]=p,S[11]=0,S[12]=-(r*T+o*l+a*m),S[13]=-(i*T+n*l+s*m),S[14]=-(f*T+c*l+p*m),S[15]=1,S)}}}),BA=He({"node_modules/gl-mat4/str.js"(Y,G){G.exports=h;function h(b){return"mat4("+b[0]+", "+b[1]+", "+b[2]+", "+b[3]+", "+b[4]+", "+b[5]+", "+b[6]+", "+b[7]+", "+b[8]+", "+b[9]+", "+b[10]+", "+b[11]+", "+b[12]+", "+b[13]+", "+b[14]+", "+b[15]+")"}}}),db=He({"node_modules/gl-mat4/index.js"(Y,G){G.exports={create:fA(),clone:hA(),copy:vA(),identity:vb(),transpose:dA(),invert:pA(),adjoint:gA(),determinant:mA(),multiply:yA(),translate:_A(),scale:xA(),rotate:bA(),rotateX:wA(),rotateY:TA(),rotateZ:AA(),fromRotation:SA(),fromRotationTranslation:MA(),fromScaling:EA(),fromTranslation:kA(),fromXRotation:CA(),fromYRotation:LA(),fromZRotation:PA(),fromQuat:IA(),frustum:RA(),perspective:DA(),perspectiveFromFieldOfView:zA(),ortho:FA(),lookAt:OA(),str:BA()}}}),e1=He({"src/lib/matrix.js"(Y){var G=db();Y.init2dArray=function(h,b){for(var S=new Array(h),E=0;E<h;E++)S[E]=new Array(b);return S},Y.transposeRagged=function(h){var b=0,S=h.length,E,e;for(E=0;E<S;E++)b=Math.max(b,h[E].length);var t=new Array(b);for(E=0;E<b;E++)for(t[E]=new Array(S),e=0;e<S;e++)t[E][e]=h[e][E];return t},Y.dot=function(h,b){if(!(h.length&&b.length)||h.length!==b.length)return null;var S=h.length,E,e;if(h[0].length)for(E=new Array(S),e=0;e<S;e++)E[e]=Y.dot(h[e],b);else if(b[0].length){var t=Y.transposeRagged(b);for(E=new Array(t.length),e=0;e<t.length;e++)E[e]=Y.dot(h,t[e])}else for(E=0,e=0;e<S;e++)E+=h[e]*b[e];return E},Y.translationMatrix=function(h,b){return[[1,0,h],[0,1,b],[0,0,1]]},Y.rotationMatrix=function(h){var b=h*Math.PI/180;return[[Math.cos(b),-Math.sin(b),0],[Math.sin(b),Math.cos(b),0],[0,0,1]]},Y.rotationXYMatrix=function(h,b,S){return Y.dot(Y.dot(Y.translationMatrix(b,S),Y.rotationMatrix(h)),Y.translationMatrix(-b,-S))},Y.apply3DTransform=function(h){return function(){var b=arguments,S=arguments.length===1?b[0]:[b[0],b[1],b[2]||0];return Y.dot(h,[S[0],S[1],S[2],1]).slice(0,3)}},Y.apply2DTransform=function(h){return function(){var b=arguments;b.length===3&&(b=b[0]);var S=arguments.length===1?b[0]:[b[0],b[1]];return Y.dot(h,[S[0],S[1],1]).slice(0,2)}},Y.apply2DTransform2=function(h){var b=Y.apply2DTransform(h);return function(S){return b(S.slice(0,2)).concat(b(S.slice(2,4)))}},Y.convertCssMatrix=function(h){if(h){var b=h.length;if(b===16)return h;if(b===6)return[h[0],h[1],0,0,h[2],h[3],0,0,0,0,1,0,h[4],h[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},Y.inverseTransformMatrix=function(h){var b=[];return G.invert(b,h),[[b[0],b[1],b[2],b[3]],[b[4],b[5],b[6],b[7]],[b[8],b[9],b[10],b[11]],[b[12],b[13],b[14],b[15]]]}}}),Qg=He({"src/lib/dom.js"(Y,G){var h=_i(),b=Wd(),S=e1(),E=db();function e(T){var l;if(typeof T=="string"){if(l=document.getElementById(T),l===null)throw new Error("No DOM element with id '"+T+"' exists on the page.");return l}else if(T==null)throw new Error("DOM element provided is null or undefined");return T}function t(T){var l=h.select(T);return l.node()instanceof HTMLElement&&l.size()&&l.classed("js-plotly-plot")}function r(T){var l=T&&T.parentNode;l&&l.removeChild(T)}function o(T,l){a("global",T,l)}function a(T,l,m){var x="plotly.js-style-"+T,A=document.getElementById(x);if(!(A&&A.matches(".no-inline-styles"))){A||(A=document.createElement("style"),A.setAttribute("id",x),A.appendChild(document.createTextNode("")),document.head.appendChild(A));var M=A.sheet;M?M.insertRule?M.insertRule(l+"{"+m+"}",0):M.addRule?M.addRule(l,m,0):b.warn("addStyleRule failed"):b.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function i(T){var l="plotly.js-style-"+T,m=document.getElementById(l);m&&r(m)}function n(T,l,m,x,A,M){var _=x.split(":"),w=A.split(":"),g="data-btn-style-event-added";M||(M=document),M.querySelectorAll(T).forEach(function(u){u.getAttribute(g)||(u.addEventListener("mouseenter",function(){var v=this.querySelector(m);v&&(v.style[_[0]]=_[1])}),u.addEventListener("mouseleave",function(){var v=this.querySelector(m);v&&(l&&this.matches(l)?v.style[_[0]]=_[1]:v.style[w[0]]=w[1])}),u.setAttribute(g,!0))})}function s(T){var l=c(T),m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return l.forEach(function(x){var A=f(x);if(A){var M=S.convertCssMatrix(A);m=E.multiply(m,m,M)}}),m}function f(T){var l=window.getComputedStyle(T,null),m=l.getPropertyValue("-webkit-transform")||l.getPropertyValue("-moz-transform")||l.getPropertyValue("-ms-transform")||l.getPropertyValue("-o-transform")||l.getPropertyValue("transform");return m==="none"?null:m.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(x){return+x})}function c(T){for(var l=[];p(T);)l.push(T),T=T.parentNode,typeof ShadowRoot=="function"&&T instanceof ShadowRoot&&(T=T.host);return l}function p(T){return T&&(T instanceof Element||T instanceof HTMLElement)}function d(T,l){return T&&l&&T.top===l.top&&T.left===l.left&&T.right===l.right&&T.bottom===l.bottom}G.exports={getGraphDiv:e,isPlotDiv:t,removeElement:r,addStyleRule:o,addRelatedStyleRule:a,deleteRelatedStyleRule:i,setStyleOnHover:n,getFullTransformMatrix:s,getElementTransformMatrix:f,getElementAndAncestors:c,equalDomRects:d}}}),em=He({"src/plots/animation_attributes.js"(Y,G){G.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}}}),Zu=He({"src/plot_api/edit_types.js"(Y,G){var h=Po().extendFlat,b=fd(),S={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},E={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},e=S.flags.slice().concat(["fullReplot"]),t=E.flags.slice().concat("layoutReplot");G.exports={traces:S,layout:E,traceFlags:function(){return r(e)},layoutFlags:function(){return r(t)},update:function(i,n){var s=n.editType;if(s&&s!=="none")for(var f=s.split("+"),c=0;c<f.length;c++)i[f[c]]=!0},overrideAll:o};function r(i){for(var n={},s=0;s<i.length;s++)n[i[s]]=!1;return n}function o(i,n,s){var f=h({},i);for(var c in f){var p=f[c];b(p)&&(f[c]=a(p,n,s,c))}return s==="from-root"&&(f.editType=n),f}function a(i,n,s,f){if(i.valType){var c=h({},i);if(c.editType=n,Array.isArray(i.items)){c.items=new Array(i.items.length);for(var p=0;p<i.items.length;p++)c.items[p]=a(i.items[p],n)}return c}else return o(i,n,f.charAt(0)==="_"?"nested":"from-root")}}}),nh=He({"src/components/drawing/attributes.js"(Y){Y.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},Y.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}}}),pb=He({"src/constants/docs.js"(Y,G){G.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}}}),Ll=He({"src/plots/template_attributes.js"(Y){var{DATE_FORMAT_LINK:G,FORMAT_LINK:h}=pb(),b=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function S({supportOther:E}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(E?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,h,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,G,"for details on the date formatting syntax.",b].join(" ")}Y.templateFormatStringDescription=S,Y.hovertemplateAttrs=({editType:E="none",arrayOk:e}={},t={})=>fl({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Y.texttemplateAttrs=({editType:E="calc",arrayOk:e}={},t={})=>fl({valType:"string",dflt:"",editType:E},e!==!1?{arrayOk:!0}:{}),Y.shapeTexttemplateAttrs=({editType:E="arraydraw",newshape:e}={},t={})=>({valType:"string",dflt:"",editType:E}),Y.templatefallbackAttrs=({editType:E="none"}={})=>({valType:"any",dflt:"-",editType:E})}}),t1=He({"src/components/shapes/label_texttemplate.js"(Y,G){function h(m,x){return x?x.d2l(m):m}function b(m,x){return x?x.l2d(m):m}function S(m){return m.x0}function E(m){return m.x1}function e(m){return m.y0}function t(m){return m.y1}function r(m){return m.x0shift||0}function o(m){return m.x1shift||0}function a(m){return m.y0shift||0}function i(m){return m.y1shift||0}function n(m,x){return h(m.x1,x)+o(m)-h(m.x0,x)-r(m)}function s(m,x,A){return h(m.y1,A)+i(m)-h(m.y0,A)-a(m)}function f(m,x){return Math.abs(n(m,x))}function c(m,x,A){return Math.abs(s(m,x,A))}function p(m,x,A){return m.type!=="line"?void 0:Math.sqrt(Math.pow(n(m,x),2)+Math.pow(s(m,x,A),2))}function d(m,x){return b((h(m.x1,x)+o(m)+h(m.x0,x)+r(m))/2,x)}function T(m,x,A){return b((h(m.y1,A)+i(m)+h(m.y0,A)+a(m))/2,A)}function l(m,x,A){return m.type!=="line"?void 0:s(m,x,A)/n(m,x)}G.exports={x0:S,x1:E,y0:e,y1:t,slope:l,dx:n,dy:s,width:f,height:c,length:p,xcenter:d,ycenter:T}}}),NA=He({"src/components/shapes/draw_newshape/attributes.js"(Y,G){var h=Zu().overrideAll,b=Nl(),S=Ru(),E=nh().dash,e=Po().extendFlat,{shapeTexttemplateAttrs:t,templatefallbackAttrs:r}=Ll(),o=t1();G.exports=h({newshape:{visible:e({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:e({},b.legend,{}),legendgroup:e({},b.legendgroup,{}),legendgrouptitle:{text:e({},b.legendgrouptitle.text,{}),font:S({})},legendrank:e({},b.legendrank,{}),legendwidth:e({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:e({},E,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:e({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:t({newshape:!0},{keys:Object.keys(o)}),texttemplatefallback:r({editType:"arraydraw"}),font:S({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),UA=He({"src/components/selections/draw_newselection/attributes.js"(Y,G){var h=nh().dash,b=Po().extendFlat;G.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:b({},h,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),r1=He({"src/plots/pad_attributes.js"(Y,G){G.exports=function(h){var b=h.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),N0=He({"src/plots/layout_attributes.js"(Y,G){var h=Ru(),b=em(),S=Mf(),E=NA(),e=UA(),t=r1(),r=Po().extendFlat,o=h({editType:"calc"});o.family.dflt='"Open Sans", verdana, arial, sans-serif',o.size.dflt=12,o.color.dflt=S.defaultLine,G.exports={font:o,title:{text:{valType:"string",editType:"layoutstyle"},font:h({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:h({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:r(t({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:S.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:S.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:S.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:E.newshape,activeshape:E.activeshape,newselection:e.newselection,activeselection:e.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:r({},b.transition,{editType:"none"})}}}),jA=He({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97")){var Y=document.createElement("style");Y.id="696e55e75aaafa12d45b3ff634eadc8348f9c3015fc94984dac1ff824773eb97",Y.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(Y)}})()}}),ji=He({"src/registry.js"(Y){var G=Wd(),h=Qy(),b=hb(),S=fd(),E=Qg().addStyleRule,e=Po(),t=Nl(),r=N0(),o=e.extendFlat,a=e.extendDeepAll;Y.modules={},Y.allCategories={},Y.allTypes=[],Y.subplotsRegistry={},Y.componentsRegistry={},Y.layoutArrayContainers=[],Y.layoutArrayRegexes=[],Y.traceLayoutAttributes={},Y.localeRegistry={},Y.apiMethodRegistry={},Y.collectableSubplotTypes=null,Y.register=function(x){if(Y.collectableSubplotTypes=null,x)x&&!Array.isArray(x)&&(x=[x]);else throw new Error("No argument passed to Plotly.register.");for(var A=0;A<x.length;A++){var M=x[A];if(!M)throw new Error("Invalid module was attempted to be registered!");switch(M.moduleType){case"trace":i(M);break;case"transform":f(M);break;case"component":s(M);break;case"locale":c(M);break;case"apiMethod":var _=M.name;Y.apiMethodRegistry[_]=M.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},Y.getModule=function(m){var x=Y.modules[l(m)];return x?x._module:!1},Y.traceIs=function(m,x){if(m=l(m),m==="various")return!1;var A=Y.modules[m];return A||(m&&G.log("Unrecognized trace type "+m+"."),A=Y.modules[t.type.dflt]),!!A.categories[x]},Y.getComponentMethod=function(m,x){var A=Y.componentsRegistry[m];return A&&A[x]||h},Y.call=function(){var m=arguments[0],x=[].slice.call(arguments,1);return Y.apiMethodRegistry[m].apply(null,x)};function i(m){var x=m.name,A=m.categories,M=m.meta;if(Y.modules[x]){G.log("Type "+x+" already registered");return}Y.subplotsRegistry[m.basePlotModule.name]||n(m.basePlotModule);for(var _={},w=0;w<A.length;w++)_[A[w]]=!0,Y.allCategories[A[w]]=!0;Y.modules[x]={_module:m,categories:_},M&&Object.keys(M).length&&(Y.modules[x].meta=M),Y.allTypes.push(x);for(var g in Y.componentsRegistry)d(g,x);m.layoutAttributes&&o(Y.traceLayoutAttributes,m.layoutAttributes);var u=m.basePlotModule,v=u.name;if(v==="mapbox"){var y=u.constants.styleRules;for(var R in y)E(".js-plotly-plot .plotly .mapboxgl-"+R,y[R])}v==="map"&&jA(),(v==="geo"||v==="mapbox"||v==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function n(m){var x=m.name;if(Y.subplotsRegistry[x]){G.log("Plot type "+x+" already registered.");return}p(m),Y.subplotsRegistry[x]=m;for(var A in Y.componentsRegistry)T(A,m.name)}function s(m){if(typeof m.name!="string")throw new Error("Component module *name* must be a string.");var x=m.name;Y.componentsRegistry[x]=m,m.layoutAttributes&&(m.layoutAttributes._isLinkedToArray&&b(Y.layoutArrayContainers,x),p(m));for(var A in Y.modules)d(x,A);for(var M in Y.subplotsRegistry)T(x,M);m.schema&&m.schema.layout&&a(r,m.schema.layout)}function f(m){if(typeof m.name!="string")throw new Error("Transform module *name* must be a string.");var x="Transform module "+m.name,A=typeof m.transform=="function",M=typeof m.calcTransform=="function";if(!A&&!M)throw new Error(x+" is missing a *transform* or *calcTransform* method.");A&&M&&G.log([x+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),S(m.attributes)||G.log(x+" registered without an *attributes* object."),typeof m.supplyDefaults!="function"&&G.log(x+" registered without a *supplyDefaults* method.")}function c(m){var x=m.name,A=x.split("-")[0],M=m.dictionary,_=m.format,w=M&&Object.keys(M).length,g=_&&Object.keys(_).length,u=Y.localeRegistry,v=u[x];if(v||(u[x]=v={}),A!==x){var y=u[A];y||(u[A]=y={}),w&&y.dictionary===v.dictionary&&(y.dictionary=M),g&&y.format===v.format&&(y.format=_)}w&&(v.dictionary=M),g&&(v.format=_)}function p(m){if(m.layoutAttributes){var x=m.layoutAttributes._arrayAttrRegexps;if(x)for(var A=0;A<x.length;A++)b(Y.layoutArrayRegexes,x[A])}}function d(m,x){var A=Y.componentsRegistry[m].schema;if(!(!A||!A.traces)){var M=A.traces[x];M&&a(Y.modules[x]._module.attributes,M)}}function T(m,x){var A=Y.componentsRegistry[m].schema;if(!(!A||!A.subplots)){var M=Y.subplotsRegistry[x],_=M.layoutAttributes,w=M.attr==="subplot"?M.name:M.attr;Array.isArray(w)&&(w=w[0]);var g=A.subplots[w];_&&g&&a(_,g)}}function l(m){return typeof m=="object"&&(m=m.type),m}}}),VA=He({"src/lib/dates.js"(Y){var G=Ni().timeFormat,h=Ui(),b=Wd(),S=F0().mod,E=Qo(),e=E.BADNUM,t=E.ONEDAY,r=E.ONEHOUR,o=E.ONEMIN,a=E.ONESEC,i=E.EPOCHJD,n=ji(),s=Ni().utcFormat,f=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,c=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,p=new Date().getFullYear()-70;function d(F){return F&&n.componentsRegistry.calendars&&typeof F=="string"&&F!=="gregorian"}Y.dateTick0=function(F,B){var O=T(F,!!B);if(B<2)return O;var I=Y.dateTime2ms(O,F);return I+=t*(B-1),Y.ms2DateTime(I,0,F)};function T(F,B){return d(F)?B?n.getComponentMethod("calendars","CANONICAL_SUNDAY")[F]:n.getComponentMethod("calendars","CANONICAL_TICK")[F]:B?"2000-01-02":"2000-01-01"}Y.dfltRange=function(F){return d(F)?n.getComponentMethod("calendars","DFLTRANGE")[F]:["2000-01-01","2001-01-01"]},Y.isJSDate=function(F){return typeof F=="object"&&F!==null&&typeof F.getTime=="function"};var l,m;Y.dateTime2ms=function(F,B){if(Y.isJSDate(F)){var O=F.getTimezoneOffset()*o,I=(F.getUTCMinutes()-F.getMinutes())*o+(F.getUTCSeconds()-F.getSeconds())*a+(F.getUTCMilliseconds()-F.getMilliseconds());if(I){var N=3*o;O=O-N/2+S(I-O+N/2,N)}return F=Number(F)-O,F>=l&&F<=m?F:e}if(typeof F!="string"&&typeof F!="number")return e;F=String(F);var U=d(B),X=F.charAt(0);U&&(X==="G"||X==="g")&&(F=F.slice(1),B="");var ee=U&&B.slice(0,7)==="chinese",ue=F.match(ee?c:f);if(!ue)return e;var oe=ue[1],le=ue[3]||"1",V=Number(ue[5]||1),J=Number(ue[7]||0),te=Number(ue[9]||0),Z=Number(ue[11]||0);if(U){if(oe.length===2)return e;oe=Number(oe);var se;try{var Q=n.getComponentMethod("calendars","getCal")(B);if(ee){var q=le.charAt(le.length-1)==="i";le=parseInt(le,10),se=Q.newDate(oe,Q.toMonthIndex(oe,le,q),V)}else se=Q.newDate(oe,Number(le),V)}catch{return e}return se?(se.toJD()-i)*t+J*r+te*o+Z*a:e}oe.length===2?oe=(Number(oe)+2e3-p)%100+p:oe=Number(oe),le-=1;var re=new Date(Date.UTC(2e3,le,V,J,te));return re.setUTCFullYear(oe),re.getUTCMonth()!==le||re.getUTCDate()!==V?e:re.getTime()+Z*a},l=Y.MIN_MS=Y.dateTime2ms("-9999"),m=Y.MAX_MS=Y.dateTime2ms("9999-12-31 23:59:59.9999"),Y.isDateTime=function(F,B){return Y.dateTime2ms(F,B)!==e};function x(F,B){return String(F+Math.pow(10,B)).slice(1)}var A=90*t,M=3*r,_=5*o;Y.ms2DateTime=function(F,B,O){if(typeof F!="number"||!(F>=l&&F<=m))return e;B||(B=0);var I=Math.floor(S(F+.05,1)*10),N=Math.round(F-I/10),U,X,ee,ue,oe,le;if(d(O)){var V=Math.floor(N/t)+i,J=Math.floor(S(F,t));try{U=n.getComponentMethod("calendars","getCal")(O).fromJD(V).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(N))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;X=B<A?Math.floor(J/r):0,ee=B<A?Math.floor(J%r/o):0,ue=B<M?Math.floor(J%o/a):0,oe=B<_?J%a*10+I:0}else le=new Date(N),U=s("%Y-%m-%d")(le),X=B<A?le.getUTCHours():0,ee=B<A?le.getUTCMinutes():0,ue=B<M?le.getUTCSeconds():0,oe=B<_?le.getUTCMilliseconds()*10+I:0;return w(U,X,ee,ue,oe)},Y.ms2DateTimeLocal=function(F){if(!(F>=l+t&&F<=m-t))return e;var B=Math.floor(S(F+.05,1)*10),O=new Date(Math.round(F-B/10)),I=G("%Y-%m-%d")(O),N=O.getHours(),U=O.getMinutes(),X=O.getSeconds(),ee=O.getUTCMilliseconds()*10+B;return w(I,N,U,X,ee)};function w(F,B,O,I,N){if((B||O||I||N)&&(F+=" "+x(B,2)+":"+x(O,2),(I||N)&&(F+=":"+x(I,2),N))){for(var U=4;N%10===0;)U-=1,N/=10;F+="."+x(N,U)}return F}Y.cleanDate=function(F,B,O){if(F===e)return B;if(Y.isJSDate(F)||typeof F=="number"&&isFinite(F)){if(d(O))return b.error("JS Dates and milliseconds are incompatible with world calendars",F),B;if(F=Y.ms2DateTimeLocal(+F),!F&&B!==void 0)return B}else if(!Y.isDateTime(F,O))return b.error("unrecognized date",F),B;return F};var g=/%\d?f/g,u=/%h/g,v={1:"1",2:"1",3:"2",4:"2"};function y(F,B,O,I){F=F.replace(g,function(U){var X=Math.min(+U.charAt(1)||6,6),ee=(B/1e3%1+2).toFixed(X).slice(2).replace(/0+$/,"")||"0";return ee});var N=new Date(Math.floor(B+.05));if(F=F.replace(u,function(){return v[O("%q")(N)]}),d(I))try{F=n.getComponentMethod("calendars","worldCalFmt")(F,B,I)}catch{return"Invalid"}return O(F)(N)}var R=[59,59.9,59.99,59.999,59.9999];function L(F,B){var O=S(F+.05,t),I=x(Math.floor(O/r),2)+":"+x(S(Math.floor(O/o),60),2);if(B!=="M"){h(B)||(B=0);var N=Math.min(S(F/a,60),R[B]),U=(100+N).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),I+=":"+U}return I}Y.formatDate=function(F,B,O,I,N,U){if(N=d(N)&&N,!B)if(O==="y")B=U.year;else if(O==="m")B=U.month;else if(O==="d")B=U.dayMonth+`
|
|
@@ -3786,4 +3786,4 @@ uniform ${fr} ${gr} u_${Br};
|
|
|
3786
3786
|
#endif
|
|
3787
3787
|
`}),staticAttributes:we,staticUniforms:ct}}class Kt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(P,ne,we,Se,Re,ct,_t,zt,Qt){this.context=P;let fr=this.boundPaintVertexBuffers.length!==Se.length;for(let gr=0;!fr&&gr<Se.length;gr++)this.boundPaintVertexBuffers[gr]!==Se[gr]&&(fr=!0);!this.vao||this.boundProgram!==ne||this.boundLayoutVertexBuffer!==we||fr||this.boundIndexBuffer!==Re||this.boundVertexOffset!==ct||this.boundDynamicVertexBuffer!==_t||this.boundDynamicVertexBuffer2!==zt||this.boundDynamicVertexBuffer3!==Qt?this.freshBind(ne,we,Se,Re,ct,_t,zt,Qt):(P.bindVertexArray.set(this.vao),_t&&_t.bind(),Re&&Re.dynamicDraw&&Re.bind(),zt&&zt.bind(),Qt&&Qt.bind())}freshBind(P,ne,we,Se,Re,ct,_t,zt){const Qt=P.numAttributes,fr=this.context,gr=fr.gl;this.vao&&this.destroy(),this.vao=fr.createVertexArray(),fr.bindVertexArray.set(this.vao),this.boundProgram=P,this.boundLayoutVertexBuffer=ne,this.boundPaintVertexBuffers=we,this.boundIndexBuffer=Se,this.boundVertexOffset=Re,this.boundDynamicVertexBuffer=ct,this.boundDynamicVertexBuffer2=_t,this.boundDynamicVertexBuffer3=zt,ne.enableAttributes(gr,P);for(const Br of we)Br.enableAttributes(gr,P);ct&&ct.enableAttributes(gr,P),_t&&_t.enableAttributes(gr,P),zt&&zt.enableAttributes(gr,P),ne.bind(),ne.setVertexAttribPointers(gr,P,Re);for(const Br of we)Br.bind(),Br.setVertexAttribPointers(gr,P,Re);ct&&(ct.bind(),ct.setVertexAttribPointers(gr,P,Re)),Se&&Se.bind(),_t&&(_t.bind(),_t.setVertexAttribPointers(gr,P,Re)),zt&&(zt.bind(),zt.setVertexAttribPointers(gr,P,Re)),fr.currentNumAttributes=Qt}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const xr=(ze,P,ne,we,Se)=>({u_matrix:ze,u_texture:0,u_ele_delta:P,u_fog_matrix:ne,u_fog_color:we?we.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:we?we.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:we?we.calculateFogBlendOpacity(Se):0,u_horizon_color:we?we.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:we?we.properties.get("horizon-fog-blend"):1});function Hr(ze){const P=[];for(let ne=0;ne<ze.length;ne++){if(ze[ne]===null)continue;const we=ze[ne].split(" ");P.push(we.pop())}return P}class fa{constructor(P,ne,we,Se,Re,ct){const _t=P.gl;this.program=_t.createProgram();const zt=Hr(ne.staticAttributes),Qt=we?we.getBinderAttributes():[],fr=zt.concat(Qt),gr=Fr.prelude.staticUniforms?Hr(Fr.prelude.staticUniforms):[],Br=ne.staticUniforms?Hr(ne.staticUniforms):[],ta=we?we.getBinderUniforms():[],Ve=gr.concat(Br).concat(ta),Ye=[];for(const cr of Ve)Ye.indexOf(cr)<0&&Ye.push(cr);const it=we?we.defines():[];Re&&it.push("#define OVERDRAW_INSPECTOR;"),ct&&it.push("#define TERRAIN3D;");const ht=it.concat(Fr.prelude.fragmentSource,ne.fragmentSource).join(`
|
|
3788
3788
|
`),St=it.concat(Fr.prelude.vertexSource,ne.vertexSource).join(`
|
|
3789
|
-
`),yt=_t.createShader(_t.FRAGMENT_SHADER);if(_t.isContextLost())return void(this.failedToCreate=!0);if(_t.shaderSource(yt,ht),_t.compileShader(yt),!_t.getShaderParameter(yt,_t.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${_t.getShaderInfoLog(yt)}`);_t.attachShader(this.program,yt);const Lt=_t.createShader(_t.VERTEX_SHADER);if(_t.isContextLost())return void(this.failedToCreate=!0);if(_t.shaderSource(Lt,St),_t.compileShader(Lt),!_t.getShaderParameter(Lt,_t.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${_t.getShaderInfoLog(Lt)}`);_t.attachShader(this.program,Lt),this.attributes={};const nr={};this.numAttributes=fr.length;for(let cr=0;cr<this.numAttributes;cr++)fr[cr]&&(_t.bindAttribLocation(this.program,cr,fr[cr]),this.attributes[fr[cr]]=cr);if(_t.linkProgram(this.program),!_t.getProgramParameter(this.program,_t.LINK_STATUS))throw new Error(`Program failed to link: ${_t.getProgramInfoLog(this.program)}`);_t.deleteShader(Lt),_t.deleteShader(yt);for(let cr=0;cr<Ye.length;cr++){const mr=Ye[cr];if(mr&&!nr[mr]){const Pr=_t.getUniformLocation(this.program,mr);Pr&&(nr[mr]=Pr)}}this.fixedUniforms=Se(P,nr),this.terrainUniforms=((cr,mr)=>({u_depth:new t.aH(cr,mr.u_depth),u_terrain:new t.aH(cr,mr.u_terrain),u_terrain_dim:new t.aI(cr,mr.u_terrain_dim),u_terrain_matrix:new t.aJ(cr,mr.u_terrain_matrix),u_terrain_unpack:new t.aK(cr,mr.u_terrain_unpack),u_terrain_exaggeration:new t.aI(cr,mr.u_terrain_exaggeration)}))(P,nr),this.binderUniforms=we?we.getUniforms(P,nr):[]}draw(P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta,Ve,Ye,it,ht,St){const yt=P.gl;if(this.failedToCreate)return;if(P.program.set(this.program),P.setDepthMode(we),P.setStencilMode(Se),P.setColorMode(Re),P.setCullFace(ct),zt){P.activeTexture.set(yt.TEXTURE2),yt.bindTexture(yt.TEXTURE_2D,zt.depthTexture),P.activeTexture.set(yt.TEXTURE3),yt.bindTexture(yt.TEXTURE_2D,zt.texture);for(const nr in this.terrainUniforms)this.terrainUniforms[nr].set(zt[nr])}for(const nr in this.fixedUniforms)this.fixedUniforms[nr].set(_t[nr]);Ye&&Ye.setUniforms(P,this.binderUniforms,ta,{zoom:Ve});let Lt=0;switch(ne){case yt.LINES:Lt=2;break;case yt.TRIANGLES:Lt=3;break;case yt.LINE_STRIP:Lt=1}for(const nr of Br.get()){const cr=nr.vaos||(nr.vaos={});(cr[Qt]||(cr[Qt]=new Kt)).bind(P,this,fr,Ye?Ye.getPaintVertexBuffers():[],gr,nr.vertexOffset,it,ht,St),yt.drawElements(ne,nr.primitiveLength*Lt,yt.UNSIGNED_SHORT,nr.primitiveOffset*Lt*2)}}}function xa(ze,P,ne){const we=1/Ea(ne,1,P.transform.tileZoom),Se=Math.pow(2,ne.tileID.overscaledZ),Re=ne.tileSize*Math.pow(2,P.transform.tileZoom)/Se,ct=Re*(ne.tileID.canonical.x+ne.tileID.wrap*Se),_t=Re*ne.tileID.canonical.y;return{u_image:0,u_texsize:ne.imageAtlasTexture.size,u_scale:[we,ze.fromScale,ze.toScale],u_fade:ze.t,u_pixel_coord_upper:[ct>>16,_t>>16],u_pixel_coord_lower:[65535&ct,65535&_t]}}const _a=(ze,P,ne,we)=>{const Se=P.style.light,Re=Se.properties.get("position"),ct=[Re.x,Re.y,Re.z],_t=(function(){var Qt=new t.A(9);return t.A!=Float32Array&&(Qt[1]=0,Qt[2]=0,Qt[3]=0,Qt[5]=0,Qt[6]=0,Qt[7]=0),Qt[0]=1,Qt[4]=1,Qt[8]=1,Qt})();Se.properties.get("anchor")==="viewport"&&(function(Qt,fr){var gr=Math.sin(fr),Br=Math.cos(fr);Qt[0]=Br,Qt[1]=gr,Qt[2]=0,Qt[3]=-gr,Qt[4]=Br,Qt[5]=0,Qt[6]=0,Qt[7]=0,Qt[8]=1})(_t,-P.transform.angle),(function(Qt,fr,gr){var Br=fr[0],ta=fr[1],Ve=fr[2];Qt[0]=Br*gr[0]+ta*gr[3]+Ve*gr[6],Qt[1]=Br*gr[1]+ta*gr[4]+Ve*gr[7],Qt[2]=Br*gr[2]+ta*gr[5]+Ve*gr[8]})(ct,ct,_t);const zt=Se.properties.get("color");return{u_matrix:ze,u_lightpos:ct,u_lightintensity:Se.properties.get("intensity"),u_lightcolor:[zt.r,zt.g,zt.b],u_vertical_gradient:+ne,u_opacity:we}},Wr=(ze,P,ne,we,Se,Re,ct)=>t.e(_a(ze,P,ne,we),xa(Re,P,ct),{u_height_factor:-Math.pow(2,Se.overscaledZ)/ct.tileSize/8}),ha=ze=>({u_matrix:ze}),jn=(ze,P,ne,we)=>t.e(ha(ze),xa(ne,P,we)),tn=(ze,P)=>({u_matrix:ze,u_world:P}),Zn=(ze,P,ne,we,Se)=>t.e(jn(ze,P,ne,we),{u_world:Se}),ii=(ze,P,ne,we)=>{const Se=ze.transform;let Re,ct;if(we.paint.get("circle-pitch-alignment")==="map"){const _t=Ea(ne,1,Se.zoom);Re=!0,ct=[_t,_t]}else Re=!1,ct=Se.pixelsToGLUnits;return{u_camera_to_center_distance:Se.cameraToCenterDistance,u_scale_with_map:+(we.paint.get("circle-pitch-scale")==="map"),u_matrix:ze.translatePosMatrix(P.posMatrix,ne,we.paint.get("circle-translate"),we.paint.get("circle-translate-anchor")),u_pitch_with_map:+Re,u_device_pixel_ratio:ze.pixelRatio,u_extrude_scale:ct}},pi=(ze,P,ne)=>({u_matrix:ze,u_inv_matrix:P,u_camera_to_center_distance:ne.cameraToCenterDistance,u_viewport_size:[ne.width,ne.height]}),di=(ze,P,ne=1)=>({u_matrix:ze,u_color:P,u_overlay:0,u_overlay_scale:ne}),ki=ze=>({u_matrix:ze}),zn=(ze,P,ne,we)=>({u_matrix:ze,u_extrude_scale:Ea(P,1,ne),u_intensity:we}),no=(ze,P,ne,we)=>{const Se=t.H();t.aP(Se,0,ze.width,ze.height,0,0,1);const Re=ze.context.gl;return{u_matrix:Se,u_world:[Re.drawingBufferWidth,Re.drawingBufferHeight],u_image:ne,u_color_ramp:we,u_opacity:P.paint.get("heatmap-opacity")}};function Xi(ze,P){const ne=Math.pow(2,P.canonical.z),we=P.canonical.y;return[new t.Z(0,we/ne).toLngLat().lat,new t.Z(0,(we+1)/ne).toLngLat().lat]}const Go=(ze,P,ne,we)=>{const Se=ze.transform;return{u_matrix:jo(ze,P,ne,we),u_ratio:1/Ea(P,1,Se.zoom),u_device_pixel_ratio:ze.pixelRatio,u_units_to_pixels:[1/Se.pixelsToGLUnits[0],1/Se.pixelsToGLUnits[1]]}},ho=(ze,P,ne,we,Se)=>t.e(Go(ze,P,ne,Se),{u_image:0,u_image_height:we}),to=(ze,P,ne,we,Se)=>{const Re=ze.transform,ct=Ho(P,Re);return{u_matrix:jo(ze,P,ne,Se),u_texsize:P.imageAtlasTexture.size,u_ratio:1/Ea(P,1,Re.zoom),u_device_pixel_ratio:ze.pixelRatio,u_image:0,u_scale:[ct,we.fromScale,we.toScale],u_fade:we.t,u_units_to_pixels:[1/Re.pixelsToGLUnits[0],1/Re.pixelsToGLUnits[1]]}},Gi=(ze,P,ne,we,Se,Re)=>{const ct=ze.lineAtlas,_t=Ho(P,ze.transform),zt=ne.layout.get("line-cap")==="round",Qt=ct.getDash(we.from,zt),fr=ct.getDash(we.to,zt),gr=Qt.width*Se.fromScale,Br=fr.width*Se.toScale;return t.e(Go(ze,P,ne,Re),{u_patternscale_a:[_t/gr,-Qt.height/2],u_patternscale_b:[_t/Br,-fr.height/2],u_sdfgamma:ct.width/(256*Math.min(gr,Br)*ze.pixelRatio)/2,u_image:0,u_tex_y_a:Qt.y,u_tex_y_b:fr.y,u_mix:Se.t})};function Ho(ze,P){return 1/Ea(ze,1,P.tileZoom)}function jo(ze,P,ne,we){return ze.translatePosMatrix(we?we.posMatrix:P.tileID.posMatrix,P,ne.paint.get("line-translate"),ne.paint.get("line-translate-anchor"))}const is=(ze,P,ne,we,Se)=>{return{u_matrix:ze,u_tl_parent:P,u_scale_parent:ne,u_buffer_scale:1,u_fade_t:we.mix,u_opacity:we.opacity*Se.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Se.paint.get("raster-brightness-min"),u_brightness_high:Se.paint.get("raster-brightness-max"),u_saturation_factor:(ct=Se.paint.get("raster-saturation"),ct>0?1-1/(1.001-ct):-ct),u_contrast_factor:(Re=Se.paint.get("raster-contrast"),Re>0?1/(1-Re):1+Re),u_spin_weights:vo(Se.paint.get("raster-hue-rotate"))};var Re,ct};function vo(ze){ze*=Math.PI/180;const P=Math.sin(ze),ne=Math.cos(ze);return[(2*ne+1)/3,(-Math.sqrt(3)*P-ne+1)/3,(Math.sqrt(3)*P-ne+1)/3]}const $i=(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta)=>{const Ve=ct.transform;return{u_is_size_zoom_constant:+(ze==="constant"||ze==="source"),u_is_size_feature_constant:+(ze==="constant"||ze==="camera"),u_size_t:P?P.uSizeT:0,u_size:P?P.uSize:0,u_camera_to_center_distance:Ve.cameraToCenterDistance,u_pitch:Ve.pitch/360*2*Math.PI,u_rotate_symbol:+ne,u_aspect_ratio:Ve.width/Ve.height,u_fade_change:ct.options.fadeDuration?ct.symbolFadeChange:1,u_matrix:_t,u_label_plane_matrix:zt,u_coord_matrix:Qt,u_is_text:+gr,u_pitch_with_map:+we,u_is_along_line:Se,u_is_variable_anchor:Re,u_texsize:Br,u_texture:0,u_translation:fr,u_pitched_scale:ta}},bi=(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta,Ve)=>{const Ye=ct.transform;return t.e($i(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,Ve),{u_gamma_scale:we?Math.cos(Ye._pitch)*Ye.cameraToCenterDistance:1,u_device_pixel_ratio:ct.pixelRatio,u_is_halo:1})},po=(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta)=>t.e(bi(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,!0,gr,!0,ta),{u_texsize_icon:Br,u_texture_icon:1}),os=(ze,P,ne)=>({u_matrix:ze,u_opacity:P,u_color:ne}),Ts=(ze,P,ne,we,Se,Re)=>t.e((function(ct,_t,zt,Qt){const fr=zt.imageManager.getPattern(ct.from.toString()),gr=zt.imageManager.getPattern(ct.to.toString()),{width:Br,height:ta}=zt.imageManager.getPixelSize(),Ve=Math.pow(2,Qt.tileID.overscaledZ),Ye=Qt.tileSize*Math.pow(2,zt.transform.tileZoom)/Ve,it=Ye*(Qt.tileID.canonical.x+Qt.tileID.wrap*Ve),ht=Ye*Qt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:fr.tl,u_pattern_br_a:fr.br,u_pattern_tl_b:gr.tl,u_pattern_br_b:gr.br,u_texsize:[Br,ta],u_mix:_t.t,u_pattern_size_a:fr.displaySize,u_pattern_size_b:gr.displaySize,u_scale_a:_t.fromScale,u_scale_b:_t.toScale,u_tile_units_to_pixels:1/Ea(Qt,1,zt.transform.tileZoom),u_pixel_coord_upper:[it>>16,ht>>16],u_pixel_coord_lower:[65535&it,65535&ht]}})(we,Re,ne,Se),{u_matrix:ze,u_opacity:P}),Es={fillExtrusion:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_lightpos:new t.aN(ze,P.u_lightpos),u_lightintensity:new t.aI(ze,P.u_lightintensity),u_lightcolor:new t.aN(ze,P.u_lightcolor),u_vertical_gradient:new t.aI(ze,P.u_vertical_gradient),u_opacity:new t.aI(ze,P.u_opacity)}),fillExtrusionPattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_lightpos:new t.aN(ze,P.u_lightpos),u_lightintensity:new t.aI(ze,P.u_lightintensity),u_lightcolor:new t.aN(ze,P.u_lightcolor),u_vertical_gradient:new t.aI(ze,P.u_vertical_gradient),u_height_factor:new t.aI(ze,P.u_height_factor),u_image:new t.aH(ze,P.u_image),u_texsize:new t.aO(ze,P.u_texsize),u_pixel_coord_upper:new t.aO(ze,P.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(ze,P.u_pixel_coord_lower),u_scale:new t.aN(ze,P.u_scale),u_fade:new t.aI(ze,P.u_fade),u_opacity:new t.aI(ze,P.u_opacity)}),fill:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix)}),fillPattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_image:new t.aH(ze,P.u_image),u_texsize:new t.aO(ze,P.u_texsize),u_pixel_coord_upper:new t.aO(ze,P.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(ze,P.u_pixel_coord_lower),u_scale:new t.aN(ze,P.u_scale),u_fade:new t.aI(ze,P.u_fade)}),fillOutline:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_world:new t.aO(ze,P.u_world)}),fillOutlinePattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_world:new t.aO(ze,P.u_world),u_image:new t.aH(ze,P.u_image),u_texsize:new t.aO(ze,P.u_texsize),u_pixel_coord_upper:new t.aO(ze,P.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(ze,P.u_pixel_coord_lower),u_scale:new t.aN(ze,P.u_scale),u_fade:new t.aI(ze,P.u_fade)}),circle:(ze,P)=>({u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_scale_with_map:new t.aH(ze,P.u_scale_with_map),u_pitch_with_map:new t.aH(ze,P.u_pitch_with_map),u_extrude_scale:new t.aO(ze,P.u_extrude_scale),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_matrix:new t.aJ(ze,P.u_matrix)}),collisionBox:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_pixel_extrude_scale:new t.aO(ze,P.u_pixel_extrude_scale)}),collisionCircle:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_inv_matrix:new t.aJ(ze,P.u_inv_matrix),u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_viewport_size:new t.aO(ze,P.u_viewport_size)}),debug:(ze,P)=>({u_color:new t.aL(ze,P.u_color),u_matrix:new t.aJ(ze,P.u_matrix),u_overlay:new t.aH(ze,P.u_overlay),u_overlay_scale:new t.aI(ze,P.u_overlay_scale)}),clippingMask:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix)}),heatmap:(ze,P)=>({u_extrude_scale:new t.aI(ze,P.u_extrude_scale),u_intensity:new t.aI(ze,P.u_intensity),u_matrix:new t.aJ(ze,P.u_matrix)}),heatmapTexture:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_world:new t.aO(ze,P.u_world),u_image:new t.aH(ze,P.u_image),u_color_ramp:new t.aH(ze,P.u_color_ramp),u_opacity:new t.aI(ze,P.u_opacity)}),hillshade:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_image:new t.aH(ze,P.u_image),u_latrange:new t.aO(ze,P.u_latrange),u_light:new t.aO(ze,P.u_light),u_shadow:new t.aL(ze,P.u_shadow),u_highlight:new t.aL(ze,P.u_highlight),u_accent:new t.aL(ze,P.u_accent)}),hillshadePrepare:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_image:new t.aH(ze,P.u_image),u_dimension:new t.aO(ze,P.u_dimension),u_zoom:new t.aI(ze,P.u_zoom),u_unpack:new t.aK(ze,P.u_unpack)}),line:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_ratio:new t.aI(ze,P.u_ratio),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_units_to_pixels:new t.aO(ze,P.u_units_to_pixels)}),lineGradient:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_ratio:new t.aI(ze,P.u_ratio),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_units_to_pixels:new t.aO(ze,P.u_units_to_pixels),u_image:new t.aH(ze,P.u_image),u_image_height:new t.aI(ze,P.u_image_height)}),linePattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_texsize:new t.aO(ze,P.u_texsize),u_ratio:new t.aI(ze,P.u_ratio),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_image:new t.aH(ze,P.u_image),u_units_to_pixels:new t.aO(ze,P.u_units_to_pixels),u_scale:new t.aN(ze,P.u_scale),u_fade:new t.aI(ze,P.u_fade)}),lineSDF:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_ratio:new t.aI(ze,P.u_ratio),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_units_to_pixels:new t.aO(ze,P.u_units_to_pixels),u_patternscale_a:new t.aO(ze,P.u_patternscale_a),u_patternscale_b:new t.aO(ze,P.u_patternscale_b),u_sdfgamma:new t.aI(ze,P.u_sdfgamma),u_image:new t.aH(ze,P.u_image),u_tex_y_a:new t.aI(ze,P.u_tex_y_a),u_tex_y_b:new t.aI(ze,P.u_tex_y_b),u_mix:new t.aI(ze,P.u_mix)}),raster:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_tl_parent:new t.aO(ze,P.u_tl_parent),u_scale_parent:new t.aI(ze,P.u_scale_parent),u_buffer_scale:new t.aI(ze,P.u_buffer_scale),u_fade_t:new t.aI(ze,P.u_fade_t),u_opacity:new t.aI(ze,P.u_opacity),u_image0:new t.aH(ze,P.u_image0),u_image1:new t.aH(ze,P.u_image1),u_brightness_low:new t.aI(ze,P.u_brightness_low),u_brightness_high:new t.aI(ze,P.u_brightness_high),u_saturation_factor:new t.aI(ze,P.u_saturation_factor),u_contrast_factor:new t.aI(ze,P.u_contrast_factor),u_spin_weights:new t.aN(ze,P.u_spin_weights)}),symbolIcon:(ze,P)=>({u_is_size_zoom_constant:new t.aH(ze,P.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(ze,P.u_is_size_feature_constant),u_size_t:new t.aI(ze,P.u_size_t),u_size:new t.aI(ze,P.u_size),u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_pitch:new t.aI(ze,P.u_pitch),u_rotate_symbol:new t.aH(ze,P.u_rotate_symbol),u_aspect_ratio:new t.aI(ze,P.u_aspect_ratio),u_fade_change:new t.aI(ze,P.u_fade_change),u_matrix:new t.aJ(ze,P.u_matrix),u_label_plane_matrix:new t.aJ(ze,P.u_label_plane_matrix),u_coord_matrix:new t.aJ(ze,P.u_coord_matrix),u_is_text:new t.aH(ze,P.u_is_text),u_pitch_with_map:new t.aH(ze,P.u_pitch_with_map),u_is_along_line:new t.aH(ze,P.u_is_along_line),u_is_variable_anchor:new t.aH(ze,P.u_is_variable_anchor),u_texsize:new t.aO(ze,P.u_texsize),u_texture:new t.aH(ze,P.u_texture),u_translation:new t.aO(ze,P.u_translation),u_pitched_scale:new t.aI(ze,P.u_pitched_scale)}),symbolSDF:(ze,P)=>({u_is_size_zoom_constant:new t.aH(ze,P.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(ze,P.u_is_size_feature_constant),u_size_t:new t.aI(ze,P.u_size_t),u_size:new t.aI(ze,P.u_size),u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_pitch:new t.aI(ze,P.u_pitch),u_rotate_symbol:new t.aH(ze,P.u_rotate_symbol),u_aspect_ratio:new t.aI(ze,P.u_aspect_ratio),u_fade_change:new t.aI(ze,P.u_fade_change),u_matrix:new t.aJ(ze,P.u_matrix),u_label_plane_matrix:new t.aJ(ze,P.u_label_plane_matrix),u_coord_matrix:new t.aJ(ze,P.u_coord_matrix),u_is_text:new t.aH(ze,P.u_is_text),u_pitch_with_map:new t.aH(ze,P.u_pitch_with_map),u_is_along_line:new t.aH(ze,P.u_is_along_line),u_is_variable_anchor:new t.aH(ze,P.u_is_variable_anchor),u_texsize:new t.aO(ze,P.u_texsize),u_texture:new t.aH(ze,P.u_texture),u_gamma_scale:new t.aI(ze,P.u_gamma_scale),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_is_halo:new t.aH(ze,P.u_is_halo),u_translation:new t.aO(ze,P.u_translation),u_pitched_scale:new t.aI(ze,P.u_pitched_scale)}),symbolTextAndIcon:(ze,P)=>({u_is_size_zoom_constant:new t.aH(ze,P.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(ze,P.u_is_size_feature_constant),u_size_t:new t.aI(ze,P.u_size_t),u_size:new t.aI(ze,P.u_size),u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_pitch:new t.aI(ze,P.u_pitch),u_rotate_symbol:new t.aH(ze,P.u_rotate_symbol),u_aspect_ratio:new t.aI(ze,P.u_aspect_ratio),u_fade_change:new t.aI(ze,P.u_fade_change),u_matrix:new t.aJ(ze,P.u_matrix),u_label_plane_matrix:new t.aJ(ze,P.u_label_plane_matrix),u_coord_matrix:new t.aJ(ze,P.u_coord_matrix),u_is_text:new t.aH(ze,P.u_is_text),u_pitch_with_map:new t.aH(ze,P.u_pitch_with_map),u_is_along_line:new t.aH(ze,P.u_is_along_line),u_is_variable_anchor:new t.aH(ze,P.u_is_variable_anchor),u_texsize:new t.aO(ze,P.u_texsize),u_texsize_icon:new t.aO(ze,P.u_texsize_icon),u_texture:new t.aH(ze,P.u_texture),u_texture_icon:new t.aH(ze,P.u_texture_icon),u_gamma_scale:new t.aI(ze,P.u_gamma_scale),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_is_halo:new t.aH(ze,P.u_is_halo),u_translation:new t.aO(ze,P.u_translation),u_pitched_scale:new t.aI(ze,P.u_pitched_scale)}),background:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_opacity:new t.aI(ze,P.u_opacity),u_color:new t.aL(ze,P.u_color)}),backgroundPattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_opacity:new t.aI(ze,P.u_opacity),u_image:new t.aH(ze,P.u_image),u_pattern_tl_a:new t.aO(ze,P.u_pattern_tl_a),u_pattern_br_a:new t.aO(ze,P.u_pattern_br_a),u_pattern_tl_b:new t.aO(ze,P.u_pattern_tl_b),u_pattern_br_b:new t.aO(ze,P.u_pattern_br_b),u_texsize:new t.aO(ze,P.u_texsize),u_mix:new t.aI(ze,P.u_mix),u_pattern_size_a:new t.aO(ze,P.u_pattern_size_a),u_pattern_size_b:new t.aO(ze,P.u_pattern_size_b),u_scale_a:new t.aI(ze,P.u_scale_a),u_scale_b:new t.aI(ze,P.u_scale_b),u_pixel_coord_upper:new t.aO(ze,P.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(ze,P.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(ze,P.u_tile_units_to_pixels)}),terrain:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_texture:new t.aH(ze,P.u_texture),u_ele_delta:new t.aI(ze,P.u_ele_delta),u_fog_matrix:new t.aJ(ze,P.u_fog_matrix),u_fog_color:new t.aL(ze,P.u_fog_color),u_fog_ground_blend:new t.aI(ze,P.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(ze,P.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(ze,P.u_horizon_color),u_horizon_fog_blend:new t.aI(ze,P.u_horizon_fog_blend)}),terrainDepth:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_ele_delta:new t.aI(ze,P.u_ele_delta)}),terrainCoords:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_texture:new t.aH(ze,P.u_texture),u_terrain_coords_id:new t.aI(ze,P.u_terrain_coords_id),u_ele_delta:new t.aI(ze,P.u_ele_delta)}),sky:(ze,P)=>({u_sky_color:new t.aL(ze,P.u_sky_color),u_horizon_color:new t.aL(ze,P.u_horizon_color),u_horizon:new t.aI(ze,P.u_horizon),u_sky_horizon_blend:new t.aI(ze,P.u_sky_horizon_blend)})};class Mo{constructor(P,ne,we){this.context=P;const Se=P.gl;this.buffer=Se.createBuffer(),this.dynamicDraw=!!we,this.context.unbindVAO(),P.bindElementBuffer.set(this.buffer),Se.bufferData(Se.ELEMENT_ARRAY_BUFFER,ne.arrayBuffer,this.dynamicDraw?Se.DYNAMIC_DRAW:Se.STATIC_DRAW),this.dynamicDraw||delete ne.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(P){const ne=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ne.bufferSubData(ne.ELEMENT_ARRAY_BUFFER,0,P.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const On={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class vi{constructor(P,ne,we,Se){this.length=ne.length,this.attributes=we,this.itemSize=ne.bytesPerElement,this.dynamicDraw=Se,this.context=P;const Re=P.gl;this.buffer=Re.createBuffer(),P.bindVertexBuffer.set(this.buffer),Re.bufferData(Re.ARRAY_BUFFER,ne.arrayBuffer,this.dynamicDraw?Re.DYNAMIC_DRAW:Re.STATIC_DRAW),this.dynamicDraw||delete ne.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(P){if(P.length!==this.length)throw new Error(`Length of new data is ${P.length}, which doesn't match current length of ${this.length}`);const ne=this.context.gl;this.bind(),ne.bufferSubData(ne.ARRAY_BUFFER,0,P.arrayBuffer)}enableAttributes(P,ne){for(let we=0;we<this.attributes.length;we++){const Se=ne.attributes[this.attributes[we].name];Se!==void 0&&P.enableVertexAttribArray(Se)}}setVertexAttribPointers(P,ne,we){for(let Se=0;Se<this.attributes.length;Se++){const Re=this.attributes[Se],ct=ne.attributes[Re.name];ct!==void 0&&P.vertexAttribPointer(ct,Re.components,P[On[Re.type]],!1,this.itemSize,Re.offset+this.itemSize*(we||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const As=new WeakMap;function Ro(ze){var P;if(As.has(ze))return As.get(ze);{const ne=(P=ze.getParameter(ze.VERSION))===null||P===void 0?void 0:P.startsWith("WebGL 2.0");return As.set(ze,ne),ne}}class Oi{constructor(P){this.gl=P.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(P){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ks extends Oi{getDefault(){return t.aM.transparent}set(P){const ne=this.current;(P.r!==ne.r||P.g!==ne.g||P.b!==ne.b||P.a!==ne.a||this.dirty)&&(this.gl.clearColor(P.r,P.g,P.b,P.a),this.current=P,this.dirty=!1)}}class Wo extends Oi{getDefault(){return 1}set(P){(P!==this.current||this.dirty)&&(this.gl.clearDepth(P),this.current=P,this.dirty=!1)}}class ss extends Oi{getDefault(){return 0}set(P){(P!==this.current||this.dirty)&&(this.gl.clearStencil(P),this.current=P,this.dirty=!1)}}class hl extends Oi{getDefault(){return[!0,!0,!0,!0]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||P[2]!==ne[2]||P[3]!==ne[3]||this.dirty)&&(this.gl.colorMask(P[0],P[1],P[2],P[3]),this.current=P,this.dirty=!1)}}class fi extends Oi{getDefault(){return!0}set(P){(P!==this.current||this.dirty)&&(this.gl.depthMask(P),this.current=P,this.dirty=!1)}}class _o extends Oi{getDefault(){return 255}set(P){(P!==this.current||this.dirty)&&(this.gl.stencilMask(P),this.current=P,this.dirty=!1)}}class io extends Oi{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(P){const ne=this.current;(P.func!==ne.func||P.ref!==ne.ref||P.mask!==ne.mask||this.dirty)&&(this.gl.stencilFunc(P.func,P.ref,P.mask),this.current=P,this.dirty=!1)}}class Vs extends Oi{getDefault(){const P=this.gl;return[P.KEEP,P.KEEP,P.KEEP]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||P[2]!==ne[2]||this.dirty)&&(this.gl.stencilOp(P[0],P[1],P[2]),this.current=P,this.dirty=!1)}}class qs extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;P?ne.enable(ne.STENCIL_TEST):ne.disable(ne.STENCIL_TEST),this.current=P,this.dirty=!1}}class Ri extends Oi{getDefault(){return[0,1]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||this.dirty)&&(this.gl.depthRange(P[0],P[1]),this.current=P,this.dirty=!1)}}class tl extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;P?ne.enable(ne.DEPTH_TEST):ne.disable(ne.DEPTH_TEST),this.current=P,this.dirty=!1}}class il extends Oi{getDefault(){return this.gl.LESS}set(P){(P!==this.current||this.dirty)&&(this.gl.depthFunc(P),this.current=P,this.dirty=!1)}}class Oo extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;P?ne.enable(ne.BLEND):ne.disable(ne.BLEND),this.current=P,this.dirty=!1}}class ms extends Oi{getDefault(){const P=this.gl;return[P.ONE,P.ZERO]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||this.dirty)&&(this.gl.blendFunc(P[0],P[1]),this.current=P,this.dirty=!1)}}class Rs extends Oi{getDefault(){return t.aM.transparent}set(P){const ne=this.current;(P.r!==ne.r||P.g!==ne.g||P.b!==ne.b||P.a!==ne.a||this.dirty)&&(this.gl.blendColor(P.r,P.g,P.b,P.a),this.current=P,this.dirty=!1)}}class Bs extends Oi{getDefault(){return this.gl.FUNC_ADD}set(P){(P!==this.current||this.dirty)&&(this.gl.blendEquation(P),this.current=P,this.dirty=!1)}}class Pl extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;P?ne.enable(ne.CULL_FACE):ne.disable(ne.CULL_FACE),this.current=P,this.dirty=!1}}class Fu extends Oi{getDefault(){return this.gl.BACK}set(P){(P!==this.current||this.dirty)&&(this.gl.cullFace(P),this.current=P,this.dirty=!1)}}class yu extends Oi{getDefault(){return this.gl.CCW}set(P){(P!==this.current||this.dirty)&&(this.gl.frontFace(P),this.current=P,this.dirty=!1)}}class Su extends Oi{getDefault(){return null}set(P){(P!==this.current||this.dirty)&&(this.gl.useProgram(P),this.current=P,this.dirty=!1)}}class Zc extends Oi{getDefault(){return this.gl.TEXTURE0}set(P){(P!==this.current||this.dirty)&&(this.gl.activeTexture(P),this.current=P,this.dirty=!1)}}class Oc extends Oi{getDefault(){const P=this.gl;return[0,0,P.drawingBufferWidth,P.drawingBufferHeight]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||P[2]!==ne[2]||P[3]!==ne[3]||this.dirty)&&(this.gl.viewport(P[0],P[1],P[2],P[3]),this.current=P,this.dirty=!1)}}class ys extends Oi{getDefault(){return null}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.bindFramebuffer(ne.FRAMEBUFFER,P),this.current=P,this.dirty=!1}}class su extends Oi{getDefault(){return null}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.bindRenderbuffer(ne.RENDERBUFFER,P),this.current=P,this.dirty=!1}}class Yc extends Oi{getDefault(){return null}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.bindTexture(ne.TEXTURE_2D,P),this.current=P,this.dirty=!1}}class Ul extends Oi{getDefault(){return null}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.bindBuffer(ne.ARRAY_BUFFER,P),this.current=P,this.dirty=!1}}class Il extends Oi{getDefault(){return null}set(P){const ne=this.gl;ne.bindBuffer(ne.ELEMENT_ARRAY_BUFFER,P),this.current=P,this.dirty=!1}}class jl extends Oi{getDefault(){return null}set(P){var ne;if(P===this.current&&!this.dirty)return;const we=this.gl;Ro(we)?we.bindVertexArray(P):(ne=we.getExtension("OES_vertex_array_object"))===null||ne===void 0||ne.bindVertexArrayOES(P),this.current=P,this.dirty=!1}}class Mu extends Oi{getDefault(){return 4}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.pixelStorei(ne.UNPACK_ALIGNMENT,P),this.current=P,this.dirty=!1}}class Zs extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.pixelStorei(ne.UNPACK_PREMULTIPLY_ALPHA_WEBGL,P),this.current=P,this.dirty=!1}}class Rl extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.pixelStorei(ne.UNPACK_FLIP_Y_WEBGL,P),this.current=P,this.dirty=!1}}class Vo extends Oi{constructor(P,ne){super(P),this.context=P,this.parent=ne}getDefault(){return null}}class Cs extends Vo{setDirty(){this.dirty=!0}set(P){if(P===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const ne=this.gl;ne.framebufferTexture2D(ne.FRAMEBUFFER,ne.COLOR_ATTACHMENT0,ne.TEXTURE_2D,P,0),this.current=P,this.dirty=!1}}class Yu extends Vo{set(P){if(P===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const ne=this.gl;ne.framebufferRenderbuffer(ne.FRAMEBUFFER,ne.DEPTH_ATTACHMENT,ne.RENDERBUFFER,P),this.current=P,this.dirty=!1}}class Ql extends Vo{set(P){if(P===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const ne=this.gl;ne.framebufferRenderbuffer(ne.FRAMEBUFFER,ne.DEPTH_STENCIL_ATTACHMENT,ne.RENDERBUFFER,P),this.current=P,this.dirty=!1}}class oc{constructor(P,ne,we,Se,Re){this.context=P,this.width=ne,this.height=we;const ct=P.gl,_t=this.framebuffer=ct.createFramebuffer();if(this.colorAttachment=new Cs(P,_t),Se)this.depthAttachment=Re?new Ql(P,_t):new Yu(P,_t);else if(Re)throw new Error("Stencil cannot be set without depth");if(ct.checkFramebufferStatus(ct.FRAMEBUFFER)!==ct.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const P=this.context.gl,ne=this.colorAttachment.get();if(ne&&P.deleteTexture(ne),this.depthAttachment){const we=this.depthAttachment.get();we&&P.deleteRenderbuffer(we)}P.deleteFramebuffer(this.framebuffer)}}class rl{constructor(P,ne,we){this.blendFunction=P,this.blendColor=ne,this.mask=we}}rl.Replace=[1,0],rl.disabled=new rl(rl.Replace,t.aM.transparent,[!1,!1,!1,!1]),rl.unblended=new rl(rl.Replace,t.aM.transparent,[!0,!0,!0,!0]),rl.alphaBlended=new rl([1,771],t.aM.transparent,[!0,!0,!0,!0]);class kf{constructor(P){var ne,we;if(this.gl=P,this.clearColor=new ks(this),this.clearDepth=new Wo(this),this.clearStencil=new ss(this),this.colorMask=new hl(this),this.depthMask=new fi(this),this.stencilMask=new _o(this),this.stencilFunc=new io(this),this.stencilOp=new Vs(this),this.stencilTest=new qs(this),this.depthRange=new Ri(this),this.depthTest=new tl(this),this.depthFunc=new il(this),this.blend=new Oo(this),this.blendFunc=new ms(this),this.blendColor=new Rs(this),this.blendEquation=new Bs(this),this.cullFace=new Pl(this),this.cullFaceSide=new Fu(this),this.frontFace=new yu(this),this.program=new Su(this),this.activeTexture=new Zc(this),this.viewport=new Oc(this),this.bindFramebuffer=new ys(this),this.bindRenderbuffer=new su(this),this.bindTexture=new Yc(this),this.bindVertexBuffer=new Ul(this),this.bindElementBuffer=new Il(this),this.bindVertexArray=new jl(this),this.pixelStoreUnpack=new Mu(this),this.pixelStoreUnpackPremultiplyAlpha=new Zs(this),this.pixelStoreUnpackFlipY=new Rl(this),this.extTextureFilterAnisotropic=P.getExtension("EXT_texture_filter_anisotropic")||P.getExtension("MOZ_EXT_texture_filter_anisotropic")||P.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=P.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=P.getParameter(P.MAX_TEXTURE_SIZE),Ro(P)){this.HALF_FLOAT=P.HALF_FLOAT;const Se=P.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(ne=P.RGBA16F)!==null&&ne!==void 0?ne:Se?.RGBA16F_EXT,this.RGB16F=(we=P.RGB16F)!==null&&we!==void 0?we:Se?.RGB16F_EXT,P.getExtension("EXT_color_buffer_float")}else{P.getExtension("EXT_color_buffer_half_float"),P.getExtension("OES_texture_half_float_linear");const Se=P.getExtension("OES_texture_half_float");this.HALF_FLOAT=Se?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(P,ne){return new Mo(this,P,ne)}createVertexBuffer(P,ne,we){return new vi(this,P,ne,we)}createRenderbuffer(P,ne,we){const Se=this.gl,Re=Se.createRenderbuffer();return this.bindRenderbuffer.set(Re),Se.renderbufferStorage(Se.RENDERBUFFER,P,ne,we),this.bindRenderbuffer.set(null),Re}createFramebuffer(P,ne,we,Se){return new oc(this,P,ne,we,Se)}clear({color:P,depth:ne,stencil:we}){const Se=this.gl;let Re=0;P&&(Re|=Se.COLOR_BUFFER_BIT,this.clearColor.set(P),this.colorMask.set([!0,!0,!0,!0])),ne!==void 0&&(Re|=Se.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(ne),this.depthMask.set(!0)),we!==void 0&&(Re|=Se.STENCIL_BUFFER_BIT,this.clearStencil.set(we),this.stencilMask.set(255)),Se.clear(Re)}setCullFace(P){P.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(P.mode),this.frontFace.set(P.frontFace))}setDepthMode(P){P.func!==this.gl.ALWAYS||P.mask?(this.depthTest.set(!0),this.depthFunc.set(P.func),this.depthMask.set(P.mask),this.depthRange.set(P.range)):this.depthTest.set(!1)}setStencilMode(P){P.test.func!==this.gl.ALWAYS||P.mask?(this.stencilTest.set(!0),this.stencilMask.set(P.mask),this.stencilOp.set([P.fail,P.depthFail,P.pass]),this.stencilFunc.set({func:P.test.func,ref:P.ref,mask:P.test.mask})):this.stencilTest.set(!1)}setColorMode(P){t.aE(P.blendFunction,rl.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(P.blendFunction),this.blendColor.set(P.blendColor)),this.colorMask.set(P.mask)}createVertexArray(){var P;return Ro(this.gl)?this.gl.createVertexArray():(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0?void 0:P.createVertexArrayOES()}deleteVertexArray(P){var ne;return Ro(this.gl)?this.gl.deleteVertexArray(P):(ne=this.gl.getExtension("OES_vertex_array_object"))===null||ne===void 0?void 0:ne.deleteVertexArrayOES(P)}unbindVAO(){this.bindVertexArray.set(null)}}class Bo{constructor(P,ne,we){this.func=P,this.mask=ne,this.range=we}}Bo.ReadOnly=!1,Bo.ReadWrite=!0,Bo.disabled=new Bo(519,Bo.ReadOnly,[0,1]);const jf=7680;class hs{constructor(P,ne,we,Se,Re,ct){this.test=P,this.ref=ne,this.mask=we,this.fail=Se,this.depthFail=Re,this.pass=ct}}hs.disabled=new hs({func:519,mask:0},0,0,jf,jf,jf);class Fi{constructor(P,ne,we){this.enable=P,this.mode=ne,this.frontFace=we}}let _c;function Eu(ze,P,ne,we,Se){const Re=ze.context,ct=Re.gl,_t=ze.useProgram("collisionBox"),zt=[];let Qt=0,fr=0;for(let ht=0;ht<we.length;ht++){const St=we[ht],yt=P.getTile(St).getBucket(ne);if(!yt)continue;const Lt=Se?yt.textCollisionBox:yt.iconCollisionBox,nr=yt.collisionCircleArray;if(nr.length>0){const cr=t.H();t.aQ(cr,yt.placementInvProjMatrix,ze.transform.glCoordMatrix),t.aQ(cr,cr,yt.placementViewportMatrix),zt.push({circleArray:nr,circleOffset:fr,transform:St.posMatrix,invTransform:cr,coord:St}),Qt+=nr.length/4,fr=Qt}Lt&&_t.draw(Re,ct.LINES,Bo.disabled,hs.disabled,ze.colorModeForRenderPass(),Fi.disabled,{u_matrix:St.posMatrix,u_pixel_extrude_scale:[1/(gr=ze.transform).width,1/gr.height]},ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(St),ne.id,Lt.layoutVertexBuffer,Lt.indexBuffer,Lt.segments,null,ze.transform.zoom,null,null,Lt.collisionVertexBuffer)}var gr;if(!Se||!zt.length)return;const Br=ze.useProgram("collisionCircle"),ta=new t.aR;ta.resize(4*Qt),ta._trim();let Ve=0;for(const ht of zt)for(let St=0;St<ht.circleArray.length/4;St++){const yt=4*St,Lt=ht.circleArray[yt+0],nr=ht.circleArray[yt+1],cr=ht.circleArray[yt+2],mr=ht.circleArray[yt+3];ta.emplace(Ve++,Lt,nr,cr,mr,0),ta.emplace(Ve++,Lt,nr,cr,mr,1),ta.emplace(Ve++,Lt,nr,cr,mr,2),ta.emplace(Ve++,Lt,nr,cr,mr,3)}(!_c||_c.length<2*Qt)&&(_c=(function(ht){const St=2*ht,yt=new t.aT;yt.resize(St),yt._trim();for(let Lt=0;Lt<St;Lt++){const nr=6*Lt;yt.uint16[nr+0]=4*Lt+0,yt.uint16[nr+1]=4*Lt+1,yt.uint16[nr+2]=4*Lt+2,yt.uint16[nr+3]=4*Lt+2,yt.uint16[nr+4]=4*Lt+3,yt.uint16[nr+5]=4*Lt+0}return yt})(Qt));const Ye=Re.createIndexBuffer(_c,!0),it=Re.createVertexBuffer(ta,t.aS.members,!0);for(const ht of zt){const St=pi(ht.transform,ht.invTransform,ze.transform);Br.draw(Re,ct.TRIANGLES,Bo.disabled,hs.disabled,ze.colorModeForRenderPass(),Fi.disabled,St,ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(ht.coord),ne.id,it,Ye,t.a0.simpleSegment(0,2*ht.circleOffset,ht.circleArray.length,ht.circleArray.length/2),null,ze.transform.zoom,null,null,null)}it.destroy(),Ye.destroy()}Fi.disabled=new Fi(!1,1029,2305),Fi.backCCW=new Fi(!0,1029,2305);const Al=t.an(new Float32Array(16));function Kc(ze,P,ne,we,Se,Re){const{horizontalAlign:ct,verticalAlign:_t}=t.au(ze);return new t.P((-(ct-.5)*P/Se+we[0])*Re,(-(_t-.5)*ne/Se+we[1])*Re)}function sc(ze,P,ne,we,Se,Re){const ct=P.tileAnchorPoint.add(new t.P(P.translation[0],P.translation[1]));if(P.pitchWithMap){let _t=we.mult(Re);ne||(_t=_t.rotate(-Se));const zt=ct.add(_t);return mt(zt.x,zt.y,P.labelPlaneMatrix,P.getElevation).point}if(ne){const _t=bt(P.tileAnchorPoint.x+1,P.tileAnchorPoint.y,P).point.sub(ze),zt=Math.atan(_t.y/_t.x)+(_t.x<0?Math.PI:0);return ze.add(we.rotate(zt))}return ze.add(we)}function Lc(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta){const Ve=ze.text.placedSymbolArray,Ye=ze.text.dynamicLayoutVertexArray,it=ze.icon.dynamicLayoutVertexArray,ht={};Ye.clear();for(let St=0;St<Ve.length;St++){const yt=Ve.get(St),Lt=yt.hidden||!yt.crossTileID||ze.allowVerticalPlacement&&!yt.placedOrientation?null:we[yt.crossTileID];if(Lt){const nr=new t.P(yt.anchorX,yt.anchorY),cr={getElevation:ta,width:Se.width,height:Se.height,labelPlaneMatrix:Re,pitchWithMap:ne,projection:fr,tileAnchorPoint:nr,translation:gr,unwrappedTileID:Br},mr=ne?mt(nr.x,nr.y,ct,ta):bt(nr.x,nr.y,cr),Pr=Fe(Se.cameraToCenterDistance,mr.signedDistanceFromCamera);let Vr=t.ai(ze.textSizeData,zt,yt)*Pr/t.ap;ne&&(Vr*=ze.tilePixelRatio/_t);const{width:oa,height:ca,anchor:Aa,textOffset:$a,textBoxScale:Cn}=Lt,wn=Kc(Aa,oa,ca,$a,Cn,Vr),Ln=fr.getPitchedTextCorrection(Se,nr.add(new t.P(gr[0],gr[1])),Br),ui=sc(mr.point,cr,P,wn,Se.angle,Ln),Mi=ze.allowVerticalPlacement&&yt.placedOrientation===t.ah.vertical?Math.PI/2:0;for(let xi=0;xi<yt.numGlyphs;xi++)t.aj(Ye,ui,Mi);Qt&&yt.associatedIconIndex>=0&&(ht[yt.associatedIconIndex]={shiftedAnchor:ui,angle:Mi})}else ar(yt.numGlyphs,Ye)}if(Qt){it.clear();const St=ze.icon.placedSymbolArray;for(let yt=0;yt<St.length;yt++){const Lt=St.get(yt);if(Lt.hidden)ar(Lt.numGlyphs,it);else{const nr=ht[yt];if(nr)for(let cr=0;cr<Lt.numGlyphs;cr++)t.aj(it,nr.shiftedAnchor,nr.angle);else ar(Lt.numGlyphs,it)}}ze.icon.dynamicLayoutVertexBuffer.updateData(it)}ze.text.dynamicLayoutVertexBuffer.updateData(Ye)}function Dl(ze,P,ne){return ne.iconsInText&&P?"symbolTextAndIcon":ze?"symbolSDF":"symbolIcon"}function yf(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr){const Br=ze.context,ta=Br.gl,Ve=ze.transform,Ye=an(),it=_t==="map",ht=zt==="map",St=_t!=="viewport"&&ne.layout.get("symbol-placement")!=="point",yt=it&&!ht&&!St,Lt=!ht&&St,nr=!ne.layout.get("symbol-sort-key").isConstant();let cr=!1;const mr=ze.depthModeForSublayer(0,Bo.ReadOnly),Pr=ne._unevaluatedLayout.hasValue("text-variable-anchor")||ne._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Vr=[],oa=Ye.getCircleRadiusCorrection(Ve);for(const ca of we){const Aa=P.getTile(ca),$a=Aa.getBucket(ne);if(!$a)continue;const Cn=Se?$a.text:$a.icon;if(!Cn||!Cn.segments.get().length||!Cn.hasVisibleVertices)continue;const wn=Cn.programConfigurations.get(ne.id),Ln=Se||$a.sdfIcons,ui=Se?$a.textSizeData:$a.iconSizeData,Mi=ht||Ve.pitch!==0,xi=ze.useProgram(Dl(Ln,Se,$a),wn),Ji=t.ag(ui,Ve.zoom),Zo=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(ca);let Yo,Eo,rs,sl,Qs=[0,0],ko=null;if(Se)Eo=Aa.glyphAtlasTexture,rs=ta.LINEAR,Yo=Aa.glyphAtlasTexture.size,$a.iconsInText&&(Qs=Aa.imageAtlasTexture.size,ko=Aa.imageAtlasTexture,sl=Mi||ze.options.rotating||ze.options.zooming||ui.kind==="composite"||ui.kind==="camera"?ta.LINEAR:ta.NEAREST);else{const Zr=ne.layout.get("icon-size").constantOr(0)!==1||$a.iconsNeedLinear;Eo=Aa.imageAtlasTexture,rs=Ln||ze.options.rotating||ze.options.zooming||Zr||Mi?ta.LINEAR:ta.NEAREST,Yo=Aa.imageAtlasTexture.size}const Co=Ea(Aa,1,ze.transform.zoom),bl=Lt?ca.posMatrix:Al,ql=hr(bl,ht,it,ze.transform,Co),vu=Ar(bl,ht,it,ze.transform,Co),de=Ar(ca.posMatrix,ht,it,ze.transform,Co),Pe=Ye.translatePosition(ze.transform,Aa,Re,ct),Ke=Pr&&$a.hasTextData(),vt=ne.layout.get("icon-text-fit")!=="none"&&Ke&&$a.hasIconData();if(St){const Zr=ze.style.map.terrain?(la,nn)=>ze.style.map.terrain.getElevation(ca,la,nn):null,ia=ne.layout.get("text-rotation-alignment")==="map";Ae($a,ca.posMatrix,ze,Se,ql,de,ht,Qt,ia,Ye,ca.toUnwrapped(),Ve.width,Ve.height,Pe,Zr)}const gt=ca.posMatrix,Tt=Se&&Pr||vt,qt=St||Tt?Al:ql,Vt=vu,or=Ln&&ne.paint.get(Se?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ir;Ir=Ln?$a.iconsInText?po(ui.kind,Ji,yt,ht,St,Tt,ze,gt,qt,Vt,Pe,Yo,Qs,oa):bi(ui.kind,Ji,yt,ht,St,Tt,ze,gt,qt,Vt,Pe,Se,Yo,!0,oa):$i(ui.kind,Ji,yt,ht,St,Tt,ze,gt,qt,Vt,Pe,Se,Yo,oa);const Lr={program:xi,buffers:Cn,uniformValues:Ir,atlasTexture:Eo,atlasTextureIcon:ko,atlasInterpolation:rs,atlasInterpolationIcon:sl,isSDF:Ln,hasHalo:or};if(nr&&$a.canOverlap){cr=!0;const Zr=Cn.segments.get();for(const ia of Zr)Vr.push({segments:new t.a0([ia]),sortKey:ia.sortKey,state:Lr,terrainData:Zo})}else Vr.push({segments:Cn.segments,sortKey:0,state:Lr,terrainData:Zo})}cr&&Vr.sort((ca,Aa)=>ca.sortKey-Aa.sortKey);for(const ca of Vr){const Aa=ca.state;if(Br.activeTexture.set(ta.TEXTURE0),Aa.atlasTexture.bind(Aa.atlasInterpolation,ta.CLAMP_TO_EDGE),Aa.atlasTextureIcon&&(Br.activeTexture.set(ta.TEXTURE1),Aa.atlasTextureIcon&&Aa.atlasTextureIcon.bind(Aa.atlasInterpolationIcon,ta.CLAMP_TO_EDGE)),Aa.isSDF){const $a=Aa.uniformValues;Aa.hasHalo&&($a.u_is_halo=1,rf(Aa.buffers,ca.segments,ne,ze,Aa.program,mr,fr,gr,$a,ca.terrainData)),$a.u_is_halo=0}rf(Aa.buffers,ca.segments,ne,ze,Aa.program,mr,fr,gr,Aa.uniformValues,ca.terrainData)}}function rf(ze,P,ne,we,Se,Re,ct,_t,zt,Qt){const fr=we.context;Se.draw(fr,fr.gl.TRIANGLES,Re,ct,_t,Fi.disabled,zt,Qt,ne.id,ze.layoutVertexBuffer,ze.indexBuffer,P,ne.paint,we.transform.zoom,ze.programConfigurations.get(ne.id),ze.dynamicLayoutVertexBuffer,ze.opacityVertexBuffer)}function Pc(ze,P,ne,we){const Se=ze.context,Re=Se.gl,ct=hs.disabled,_t=new rl([Re.ONE,Re.ONE],t.aM.transparent,[!0,!0,!0,!0]),zt=P.getBucket(ne);if(!zt)return;const Qt=we.key;let fr=ne.heatmapFbos.get(Qt);fr||(fr=$c(Se,P.tileSize,P.tileSize),ne.heatmapFbos.set(Qt,fr)),Se.bindFramebuffer.set(fr.framebuffer),Se.viewport.set([0,0,P.tileSize,P.tileSize]),Se.clear({color:t.aM.transparent});const gr=zt.programConfigurations.get(ne.id),Br=ze.useProgram("heatmap",gr),ta=ze.style.map.terrain.getTerrainData(we);Br.draw(Se,Re.TRIANGLES,Bo.disabled,ct,_t,Fi.disabled,zn(we.posMatrix,P,ze.transform.zoom,ne.paint.get("heatmap-intensity")),ta,ne.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,ne.paint,ze.transform.zoom,gr)}function lc(ze,P,ne){const we=ze.context,Se=we.gl;we.setColorMode(ze.colorModeForRenderPass());const Re=Jc(we,P),ct=ne.key,_t=P.heatmapFbos.get(ct);_t&&(we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,_t.colorAttachment.get()),we.activeTexture.set(Se.TEXTURE1),Re.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),ze.useProgram("heatmapTexture").draw(we,Se.TRIANGLES,Bo.disabled,hs.disabled,ze.colorModeForRenderPass(),Fi.disabled,no(ze,P,0,1),null,P.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments,P.paint,ze.transform.zoom),_t.destroy(),P.heatmapFbos.delete(ct))}function $c(ze,P,ne){var we,Se;const Re=ze.gl,ct=Re.createTexture();Re.bindTexture(Re.TEXTURE_2D,ct),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_S,Re.CLAMP_TO_EDGE),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_T,Re.CLAMP_TO_EDGE),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_MIN_FILTER,Re.LINEAR),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_MAG_FILTER,Re.LINEAR);const _t=(we=ze.HALF_FLOAT)!==null&&we!==void 0?we:Re.UNSIGNED_BYTE,zt=(Se=ze.RGBA16F)!==null&&Se!==void 0?Se:Re.RGBA;Re.texImage2D(Re.TEXTURE_2D,0,zt,P,ne,0,Re.RGBA,_t,null);const Qt=ze.createFramebuffer(P,ne,!1,!1);return Qt.colorAttachment.set(ct),Qt}function Jc(ze,P){return P.colorRampTexture||(P.colorRampTexture=new u(ze,P.colorRamp,ze.gl.RGBA)),P.colorRampTexture}function ku(ze,P,ne,we,Se){if(!ne||!we||!we.imageAtlas)return;const Re=we.imageAtlas.patternPositions;let ct=Re[ne.to.toString()],_t=Re[ne.from.toString()];if(!ct&&_t&&(ct=_t),!_t&&ct&&(_t=ct),!ct||!_t){const zt=Se.getPaintProperty(P);ct=Re[zt],_t=Re[zt]}ct&&_t&&ze.setConstantPatternPositions(ct,_t)}function af(ze,P,ne,we,Se,Re,ct){const _t=ze.context.gl,zt="fill-pattern",Qt=ne.paint.get(zt),fr=Qt&&Qt.constantOr(1),gr=ne.getCrossfadeParameters();let Br,ta,Ve,Ye,it;ct?(ta=fr&&!ne.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Br=_t.LINES):(ta=fr?"fillPattern":"fill",Br=_t.TRIANGLES);const ht=Qt.constantOr(null);for(const St of we){const yt=P.getTile(St);if(fr&&!yt.patternsLoaded())continue;const Lt=yt.getBucket(ne);if(!Lt)continue;const nr=Lt.programConfigurations.get(ne.id),cr=ze.useProgram(ta,nr),mr=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(St);fr&&(ze.context.activeTexture.set(_t.TEXTURE0),yt.imageAtlasTexture.bind(_t.LINEAR,_t.CLAMP_TO_EDGE),nr.updatePaintBuffers(gr)),ku(nr,zt,ht,yt,ne);const Pr=mr?St:null,Vr=ze.translatePosMatrix(Pr?Pr.posMatrix:St.posMatrix,yt,ne.paint.get("fill-translate"),ne.paint.get("fill-translate-anchor"));if(ct){Ye=Lt.indexBuffer2,it=Lt.segments2;const oa=[_t.drawingBufferWidth,_t.drawingBufferHeight];Ve=ta==="fillOutlinePattern"&&fr?Zn(Vr,ze,gr,yt,oa):tn(Vr,oa)}else Ye=Lt.indexBuffer,it=Lt.segments,Ve=fr?jn(Vr,ze,gr,yt):ha(Vr);cr.draw(ze.context,Br,Se,ze.stencilModeForClipping(St),Re,Fi.disabled,Ve,mr,ne.id,Lt.layoutVertexBuffer,Ye,it,ne.paint,ze.transform.zoom,nr)}}function Ku(ze,P,ne,we,Se,Re,ct){const _t=ze.context,zt=_t.gl,Qt="fill-extrusion-pattern",fr=ne.paint.get(Qt),gr=fr.constantOr(1),Br=ne.getCrossfadeParameters(),ta=ne.paint.get("fill-extrusion-opacity"),Ve=fr.constantOr(null);for(const Ye of we){const it=P.getTile(Ye),ht=it.getBucket(ne);if(!ht)continue;const St=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Ye),yt=ht.programConfigurations.get(ne.id),Lt=ze.useProgram(gr?"fillExtrusionPattern":"fillExtrusion",yt);gr&&(ze.context.activeTexture.set(zt.TEXTURE0),it.imageAtlasTexture.bind(zt.LINEAR,zt.CLAMP_TO_EDGE),yt.updatePaintBuffers(Br)),ku(yt,Qt,Ve,it,ne);const nr=ze.translatePosMatrix(Ye.posMatrix,it,ne.paint.get("fill-extrusion-translate"),ne.paint.get("fill-extrusion-translate-anchor")),cr=ne.paint.get("fill-extrusion-vertical-gradient"),mr=gr?Wr(nr,ze,cr,ta,Ye,Br,it):_a(nr,ze,cr,ta);Lt.draw(_t,_t.gl.TRIANGLES,Se,Re,ct,Fi.backCCW,mr,St,ne.id,ht.layoutVertexBuffer,ht.indexBuffer,ht.segments,ne.paint,ze.transform.zoom,yt,ze.style.map.terrain&&ht.centroidVertexBuffer)}}function Ou(ze,P,ne,we,Se,Re,ct){const _t=ze.context,zt=_t.gl,Qt=ne.fbo;if(!Qt)return;const fr=ze.useProgram("hillshade"),gr=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(P);_t.activeTexture.set(zt.TEXTURE0),zt.bindTexture(zt.TEXTURE_2D,Qt.colorAttachment.get()),fr.draw(_t,zt.TRIANGLES,Se,Re,ct,Fi.disabled,((Br,ta,Ve,Ye)=>{const it=Ve.paint.get("hillshade-shadow-color"),ht=Ve.paint.get("hillshade-highlight-color"),St=Ve.paint.get("hillshade-accent-color");let yt=Ve.paint.get("hillshade-illumination-direction")*(Math.PI/180);Ve.paint.get("hillshade-illumination-anchor")==="viewport"&&(yt-=Br.transform.angle);const Lt=!Br.options.moving;return{u_matrix:Ye?Ye.posMatrix:Br.transform.calculatePosMatrix(ta.tileID.toUnwrapped(),Lt),u_image:0,u_latrange:Xi(0,ta.tileID),u_light:[Ve.paint.get("hillshade-exaggeration"),yt],u_shadow:it,u_highlight:ht,u_accent:St}})(ze,ne,we,gr?P:null),gr,we.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments)}function zl(ze,P,ne,we,Se,Re){const ct=ze.context,_t=ct.gl,zt=P.dem;if(zt&&zt.data){const Qt=zt.dim,fr=zt.stride,gr=zt.getPixels();if(ct.activeTexture.set(_t.TEXTURE1),ct.pixelStoreUnpackPremultiplyAlpha.set(!1),P.demTexture=P.demTexture||ze.getTileTexture(fr),P.demTexture){const ta=P.demTexture;ta.update(gr,{premultiply:!1}),ta.bind(_t.NEAREST,_t.CLAMP_TO_EDGE)}else P.demTexture=new u(ct,gr,_t.RGBA,{premultiply:!1}),P.demTexture.bind(_t.NEAREST,_t.CLAMP_TO_EDGE);ct.activeTexture.set(_t.TEXTURE0);let Br=P.fbo;if(!Br){const ta=new u(ct,{width:Qt,height:Qt,data:null},_t.RGBA);ta.bind(_t.LINEAR,_t.CLAMP_TO_EDGE),Br=P.fbo=ct.createFramebuffer(Qt,Qt,!0,!1),Br.colorAttachment.set(ta.texture)}ct.bindFramebuffer.set(Br.framebuffer),ct.viewport.set([0,0,Qt,Qt]),ze.useProgram("hillshadePrepare").draw(ct,_t.TRIANGLES,we,Se,Re,Fi.disabled,((ta,Ve)=>{const Ye=Ve.stride,it=t.H();return t.aP(it,0,t.X,-t.X,0,0,1),t.J(it,it,[0,-t.X,0]),{u_matrix:it,u_image:1,u_dimension:[Ye,Ye],u_zoom:ta.overscaledZ,u_unpack:Ve.getUnpackVector()}})(P.tileID,zt),null,ne.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments),P.needsHillshadePrepare=!1}}function pc(ze,P,ne,we,Se,Re){const ct=we.paint.get("raster-fade-duration");if(!Re&&ct>0){const _t=i.now(),zt=(_t-ze.timeAdded)/ct,Qt=P?(_t-P.timeAdded)/ct:-1,fr=ne.getSource(),gr=Se.coveringZoomLevel({tileSize:fr.tileSize,roundZoom:fr.roundZoom}),Br=!P||Math.abs(P.tileID.overscaledZ-gr)>Math.abs(ze.tileID.overscaledZ-gr),ta=Br&&ze.refreshedUponExpiration?1:t.ac(Br?zt:1-Qt,0,1);return ze.refreshedUponExpiration&&zt>=1&&(ze.refreshedUponExpiration=!1),P?{opacity:1,mix:1-ta}:{opacity:ta,mix:0}}return{opacity:1,mix:0}}const Qc=new t.aM(1,0,0,1),Ds=new t.aM(0,1,0,1),Bc=new t.aM(0,0,1,1),Cf=new t.aM(1,0,1,1),nf=new t.aM(0,1,1,1);function Ic(ze,P,ne,we){lu(ze,0,P+ne/2,ze.transform.width,ne,we)}function of(ze,P,ne,we){lu(ze,P-ne/2,0,ne,ze.transform.height,we)}function lu(ze,P,ne,we,Se,Re){const ct=ze.context,_t=ct.gl;_t.enable(_t.SCISSOR_TEST),_t.scissor(P*ze.pixelRatio,ne*ze.pixelRatio,we*ze.pixelRatio,Se*ze.pixelRatio),ct.clear({color:Re}),_t.disable(_t.SCISSOR_TEST)}function sf(ze,P,ne){const we=ze.context,Se=we.gl,Re=ne.posMatrix,ct=ze.useProgram("debug"),_t=Bo.disabled,zt=hs.disabled,Qt=ze.colorModeForRenderPass(),fr="$debug",gr=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(ne);we.activeTexture.set(Se.TEXTURE0);const Br=P.getTileByID(ne.key).latestRawTileData,ta=Math.floor((Br&&Br.byteLength||0)/1024),Ve=P.getTile(ne).tileSize,Ye=512/Math.min(Ve,512)*(ne.overscaledZ/ze.transform.zoom)*.5;let it=ne.canonical.toString();ne.overscaledZ!==ne.canonical.z&&(it+=` => ${ne.overscaledZ}`),(function(ht,St){ht.initDebugOverlayCanvas();const yt=ht.debugOverlayCanvas,Lt=ht.context.gl,nr=ht.debugOverlayCanvas.getContext("2d");nr.clearRect(0,0,yt.width,yt.height),nr.shadowColor="white",nr.shadowBlur=2,nr.lineWidth=1.5,nr.strokeStyle="white",nr.textBaseline="top",nr.font="bold 36px Open Sans, sans-serif",nr.fillText(St,5,5),nr.strokeText(St,5,5),ht.debugOverlayTexture.update(yt),ht.debugOverlayTexture.bind(Lt.LINEAR,Lt.CLAMP_TO_EDGE)})(ze,`${it} ${ta}kB`),ct.draw(we,Se.TRIANGLES,_t,zt,rl.alphaBlended,Fi.disabled,di(Re,t.aM.transparent,Ye),null,fr,ze.debugBuffer,ze.quadTriangleIndexBuffer,ze.debugSegments),ct.draw(we,Se.LINE_STRIP,_t,zt,Qt,Fi.disabled,di(Re,t.aM.red),gr,fr,ze.debugBuffer,ze.tileBorderIndexBuffer,ze.debugSegments)}function ul(ze,P,ne){const we=ze.context,Se=we.gl,Re=ze.colorModeForRenderPass(),ct=new Bo(Se.LEQUAL,Bo.ReadWrite,ze.depthRangeFor3D),_t=ze.useProgram("terrain"),zt=P.getTerrainMesh();we.bindFramebuffer.set(null),we.viewport.set([0,0,ze.width,ze.height]);for(const Qt of ne){const fr=ze.renderToTexture.getTexture(Qt),gr=P.getTerrainData(Qt.tileID);we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,fr.texture);const Br=ze.transform.calculatePosMatrix(Qt.tileID.toUnwrapped()),ta=P.getMeshFrameDelta(ze.transform.zoom),Ve=ze.transform.calculateFogMatrix(Qt.tileID.toUnwrapped()),Ye=xr(Br,ta,Ve,ze.style.sky,ze.transform.pitch);_t.draw(we,Se.TRIANGLES,ct,hs.disabled,Re,Fi.backCCW,Ye,gr,"terrain",zt.vertexBuffer,zt.indexBuffer,zt.segments)}}class uu{constructor(P,ne,we){this.vertexBuffer=P,this.indexBuffer=ne,this.segments=we}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class uc{constructor(P,ne){this.context=new kf(P),this.transform=ne,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ct.maxUnderzooming+Ct.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Sr}resize(P,ne,we){if(this.width=Math.floor(P*we),this.height=Math.floor(ne*we),this.pixelRatio=we,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const Se of this.style._order)this.style._layers[Se].resize()}setup(){const P=this.context,ne=new t.aX;ne.emplaceBack(0,0),ne.emplaceBack(t.X,0),ne.emplaceBack(0,t.X),ne.emplaceBack(t.X,t.X),this.tileExtentBuffer=P.createVertexBuffer(ne,Gr.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);const we=new t.aX;we.emplaceBack(0,0),we.emplaceBack(t.X,0),we.emplaceBack(0,t.X),we.emplaceBack(t.X,t.X),this.debugBuffer=P.createVertexBuffer(we,Gr.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);const Se=new t.$;Se.emplaceBack(0,0,0,0),Se.emplaceBack(t.X,0,t.X,0),Se.emplaceBack(0,t.X,0,t.X),Se.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=P.createVertexBuffer(Se,je.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);const Re=new t.aX;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=P.createVertexBuffer(Re,Gr.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);const ct=new t.aZ;ct.emplaceBack(0),ct.emplaceBack(1),ct.emplaceBack(3),ct.emplaceBack(2),ct.emplaceBack(0),this.tileBorderIndexBuffer=P.createIndexBuffer(ct);const _t=new t.aY;_t.emplaceBack(0,1,2),_t.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=P.createIndexBuffer(_t);const zt=this.context.gl;this.stencilClearMode=new hs({func:zt.ALWAYS,mask:0},0,255,zt.ZERO,zt.ZERO,zt.ZERO)}clearStencil(){const P=this.context,ne=P.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const we=t.H();t.aP(we,0,this.width,this.height,0,0,1),t.K(we,we,[ne.drawingBufferWidth,ne.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(P,ne.TRIANGLES,Bo.disabled,this.stencilClearMode,rl.disabled,Fi.disabled,ki(we),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(P,ne){if(this.currentStencilSource===P.source||!P.isTileClipped()||!ne||!ne.length)return;this.currentStencilSource=P.source;const we=this.context,Se=we.gl;this.nextStencilID+ne.length>256&&this.clearStencil(),we.setColorMode(rl.disabled),we.setDepthMode(Bo.disabled);const Re=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ct of ne){const _t=this._tileClippingMaskIDs[ct.key]=this.nextStencilID++,zt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ct);Re.draw(we,Se.TRIANGLES,Bo.disabled,new hs({func:Se.ALWAYS,mask:0},_t,255,Se.KEEP,Se.KEEP,Se.REPLACE),rl.disabled,Fi.disabled,ki(ct.posMatrix),zt,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const P=this.nextStencilID++,ne=this.context.gl;return new hs({func:ne.NOTEQUAL,mask:255},P,255,ne.KEEP,ne.KEEP,ne.REPLACE)}stencilModeForClipping(P){const ne=this.context.gl;return new hs({func:ne.EQUAL,mask:255},this._tileClippingMaskIDs[P.key],0,ne.KEEP,ne.KEEP,ne.REPLACE)}stencilConfigForOverlap(P){const ne=this.context.gl,we=P.sort((ct,_t)=>_t.overscaledZ-ct.overscaledZ),Se=we[we.length-1].overscaledZ,Re=we[0].overscaledZ-Se+1;if(Re>1){this.currentStencilSource=void 0,this.nextStencilID+Re>256&&this.clearStencil();const ct={};for(let _t=0;_t<Re;_t++)ct[_t+Se]=new hs({func:ne.GEQUAL,mask:255},_t+this.nextStencilID,255,ne.KEEP,ne.KEEP,ne.REPLACE);return this.nextStencilID+=Re,[ct,we]}return[{[Se]:hs.disabled},we]}colorModeForRenderPass(){const P=this.context.gl;return this._showOverdrawInspector?new rl([P.CONSTANT_COLOR,P.ONE],new t.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?rl.unblended:rl.alphaBlended}depthModeForSublayer(P,ne,we){if(!this.opaquePassEnabledForLayer())return Bo.disabled;const Se=1-((1+this.currentLayer)*this.numSublayers+P)*this.depthEpsilon;return new Bo(we||this.context.gl.LEQUAL,ne,[Se,Se])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(P,ne){this.style=P,this.options=ne,this.lineAtlas=P.lineAtlas,this.imageManager=P.imageManager,this.glyphManager=P.glyphManager,this.symbolFadeChange=P.placement.symbolFadeChange(i.now()),this.imageManager.beginFrame();const we=this.style._order,Se=this.style.sourceCaches,Re={},ct={},_t={};for(const zt in Se){const Qt=Se[zt];Qt.used&&Qt.prepare(this.context),Re[zt]=Qt.getVisibleCoordinates(),ct[zt]=Re[zt].slice().reverse(),_t[zt]=Qt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let zt=0;zt<we.length;zt++)if(this.style._layers[we[zt]].is3D()){this.opaquePassCutoff=zt;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const zt of we){const Qt=this.style._layers[zt];if(!Qt.hasOffscreenPass()||Qt.isHidden(this.transform.zoom))continue;const fr=ct[Qt.source];(Qt.type==="custom"||fr.length)&&this.renderLayer(this,Se[Qt.source],Qt,fr)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:ne.showOverdrawInspector?t.aM.black:t.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(zt,Qt){const fr=zt.context,gr=fr.gl,Br=((ht,St,yt)=>({u_sky_color:ht.properties.get("sky-color"),u_horizon_color:ht.properties.get("horizon-color"),u_horizon:(St.height/2+St.getHorizon())*yt,u_sky_horizon_blend:ht.properties.get("sky-horizon-blend")*St.height/2*yt}))(Qt,zt.style.map.transform,zt.pixelRatio),ta=new Bo(gr.LEQUAL,Bo.ReadWrite,[0,1]),Ve=hs.disabled,Ye=zt.colorModeForRenderPass(),it=zt.useProgram("sky");if(!Qt.mesh){const ht=new t.aX;ht.emplaceBack(-1,-1),ht.emplaceBack(1,-1),ht.emplaceBack(1,1),ht.emplaceBack(-1,1);const St=new t.aY;St.emplaceBack(0,1,2),St.emplaceBack(0,2,3),Qt.mesh=new uu(fr.createVertexBuffer(ht,Gr.members),fr.createIndexBuffer(St),t.a0.simpleSegment(0,0,ht.length,St.length))}it.draw(fr,gr.TRIANGLES,ta,Ve,Ye,Fi.disabled,Br,void 0,"sky",Qt.mesh.vertexBuffer,Qt.mesh.indexBuffer,Qt.mesh.segments)})(this,this.style.sky),this._showOverdrawInspector=ne.showOverdrawInspector,this.depthRangeFor3D=[0,1-(P._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=we.length-1;this.currentLayer>=0;this.currentLayer--){const zt=this.style._layers[we[this.currentLayer]],Qt=Se[zt.source],fr=Re[zt.source];this._renderTileClippingMasks(zt,fr),this.renderLayer(this,Qt,zt,fr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<we.length;this.currentLayer++){const zt=this.style._layers[we[this.currentLayer]],Qt=Se[zt.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(zt))continue;const fr=(zt.type==="symbol"?_t:ct)[zt.source];this._renderTileClippingMasks(zt,Re[zt.source]),this.renderLayer(this,Qt,zt,fr)}if(this.options.showTileBoundaries){const zt=(function(Qt,fr){let gr=null;const Br=Object.values(Qt._layers).flatMap(it=>it.source&&!it.isHidden(fr)?[Qt.sourceCaches[it.source]]:[]),ta=Br.filter(it=>it.getSource().type==="vector"),Ve=Br.filter(it=>it.getSource().type!=="vector"),Ye=it=>{(!gr||gr.getSource().maxzoom<it.getSource().maxzoom)&&(gr=it)};return ta.forEach(it=>Ye(it)),gr||Ve.forEach(it=>Ye(it)),gr})(this.style,this.transform.zoom);zt&&(function(Qt,fr,gr){for(let Br=0;Br<gr.length;Br++)sf(Qt,fr,gr[Br])})(this,zt,zt.getVisibleCoordinates())}this.options.showPadding&&(function(zt){const Qt=zt.transform.padding;Ic(zt,zt.transform.height-(Qt.top||0),3,Qc),Ic(zt,Qt.bottom||0,3,Ds),of(zt,Qt.left||0,3,Bc),of(zt,zt.transform.width-(Qt.right||0),3,Cf);const fr=zt.transform.centerPoint;(function(gr,Br,ta,Ve){lu(gr,Br-1,ta-10,2,20,Ve),lu(gr,Br-10,ta-1,20,2,Ve)})(zt,fr.x,zt.transform.height-fr.y,nf)})(this),this.context.setDefault()}maybeDrawDepthAndCoords(P){if(!this.style||!this.style.map||!this.style.map.terrain)return;const ne=this.terrainFacilitator.matrix,we=this.transform.modelViewProjectionMatrix;let Se=this.terrainFacilitator.dirty;Se||(Se=P?!t.a_(ne,we):!t.a$(ne,we)),Se||(Se=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Se&&(t.b0(ne,we),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(Re,ct){const _t=Re.context,zt=_t.gl,Qt=rl.unblended,fr=new Bo(zt.LEQUAL,Bo.ReadWrite,[0,1]),gr=ct.getTerrainMesh(),Br=ct.sourceCache.getRenderableTiles(),ta=Re.useProgram("terrainDepth");_t.bindFramebuffer.set(ct.getFramebuffer("depth").framebuffer),_t.viewport.set([0,0,Re.width/devicePixelRatio,Re.height/devicePixelRatio]),_t.clear({color:t.aM.transparent,depth:1});for(const Ve of Br){const Ye=ct.getTerrainData(Ve.tileID),it={u_matrix:Re.transform.calculatePosMatrix(Ve.tileID.toUnwrapped()),u_ele_delta:ct.getMeshFrameDelta(Re.transform.zoom)};ta.draw(_t,zt.TRIANGLES,fr,hs.disabled,Qt,Fi.backCCW,it,Ye,"terrain",gr.vertexBuffer,gr.indexBuffer,gr.segments)}_t.bindFramebuffer.set(null),_t.viewport.set([0,0,Re.width,Re.height])})(this,this.style.map.terrain),(function(Re,ct){const _t=Re.context,zt=_t.gl,Qt=rl.unblended,fr=new Bo(zt.LEQUAL,Bo.ReadWrite,[0,1]),gr=ct.getTerrainMesh(),Br=ct.getCoordsTexture(),ta=ct.sourceCache.getRenderableTiles(),Ve=Re.useProgram("terrainCoords");_t.bindFramebuffer.set(ct.getFramebuffer("coords").framebuffer),_t.viewport.set([0,0,Re.width/devicePixelRatio,Re.height/devicePixelRatio]),_t.clear({color:t.aM.transparent,depth:1}),ct.coordsIndex=[];for(const Ye of ta){const it=ct.getTerrainData(Ye.tileID);_t.activeTexture.set(zt.TEXTURE0),zt.bindTexture(zt.TEXTURE_2D,Br.texture);const ht={u_matrix:Re.transform.calculatePosMatrix(Ye.tileID.toUnwrapped()),u_terrain_coords_id:(255-ct.coordsIndex.length)/255,u_texture:0,u_ele_delta:ct.getMeshFrameDelta(Re.transform.zoom)};Ve.draw(_t,zt.TRIANGLES,fr,hs.disabled,Qt,Fi.backCCW,ht,it,"terrain",gr.vertexBuffer,gr.indexBuffer,gr.segments),ct.coordsIndex.push(Ye.tileID.key)}_t.bindFramebuffer.set(null),_t.viewport.set([0,0,Re.width,Re.height])})(this,this.style.map.terrain))}renderLayer(P,ne,we,Se){if(!we.isHidden(this.transform.zoom)&&(we.type==="background"||we.type==="custom"||(Se||[]).length))switch(this.id=we.id,we.type){case"symbol":(function(Re,ct,_t,zt,Qt){if(Re.renderPass!=="translucent")return;const fr=hs.disabled,gr=Re.colorModeForRenderPass();(_t._unevaluatedLayout.hasValue("text-variable-anchor")||_t._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(Br,ta,Ve,Ye,it,ht,St,yt,Lt){const nr=ta.transform,cr=an(),mr=it==="map",Pr=ht==="map";for(const Vr of Br){const oa=Ye.getTile(Vr),ca=oa.getBucket(Ve);if(!ca||!ca.text||!ca.text.segments.get().length)continue;const Aa=t.ag(ca.textSizeData,nr.zoom),$a=Ea(oa,1,ta.transform.zoom),Cn=hr(Vr.posMatrix,Pr,mr,ta.transform,$a),wn=Ve.layout.get("icon-text-fit")!=="none"&&ca.hasIconData();if(Aa){const Ln=Math.pow(2,nr.zoom-oa.tileID.overscaledZ),ui=ta.style.map.terrain?(xi,Ji)=>ta.style.map.terrain.getElevation(Vr,xi,Ji):null,Mi=cr.translatePosition(nr,oa,St,yt);Lc(ca,mr,Pr,Lt,nr,Cn,Vr.posMatrix,Ln,Aa,wn,cr,Mi,Vr.toUnwrapped(),ui)}}})(zt,Re,_t,ct,_t.layout.get("text-rotation-alignment"),_t.layout.get("text-pitch-alignment"),_t.paint.get("text-translate"),_t.paint.get("text-translate-anchor"),Qt),_t.paint.get("icon-opacity").constantOr(1)!==0&&yf(Re,ct,_t,zt,!1,_t.paint.get("icon-translate"),_t.paint.get("icon-translate-anchor"),_t.layout.get("icon-rotation-alignment"),_t.layout.get("icon-pitch-alignment"),_t.layout.get("icon-keep-upright"),fr,gr),_t.paint.get("text-opacity").constantOr(1)!==0&&yf(Re,ct,_t,zt,!0,_t.paint.get("text-translate"),_t.paint.get("text-translate-anchor"),_t.layout.get("text-rotation-alignment"),_t.layout.get("text-pitch-alignment"),_t.layout.get("text-keep-upright"),fr,gr),ct.map.showCollisionBoxes&&(Eu(Re,ct,_t,zt,!0),Eu(Re,ct,_t,zt,!1))})(P,ne,we,Se,this.style.placement.variableOffsets);break;case"circle":(function(Re,ct,_t,zt){if(Re.renderPass!=="translucent")return;const Qt=_t.paint.get("circle-opacity"),fr=_t.paint.get("circle-stroke-width"),gr=_t.paint.get("circle-stroke-opacity"),Br=!_t.layout.get("circle-sort-key").isConstant();if(Qt.constantOr(1)===0&&(fr.constantOr(1)===0||gr.constantOr(1)===0))return;const ta=Re.context,Ve=ta.gl,Ye=Re.depthModeForSublayer(0,Bo.ReadOnly),it=hs.disabled,ht=Re.colorModeForRenderPass(),St=[];for(let yt=0;yt<zt.length;yt++){const Lt=zt[yt],nr=ct.getTile(Lt),cr=nr.getBucket(_t);if(!cr)continue;const mr=cr.programConfigurations.get(_t.id),Pr=Re.useProgram("circle",mr),Vr=cr.layoutVertexBuffer,oa=cr.indexBuffer,ca=Re.style.map.terrain&&Re.style.map.terrain.getTerrainData(Lt),Aa={programConfiguration:mr,program:Pr,layoutVertexBuffer:Vr,indexBuffer:oa,uniformValues:ii(Re,Lt,nr,_t),terrainData:ca};if(Br){const $a=cr.segments.get();for(const Cn of $a)St.push({segments:new t.a0([Cn]),sortKey:Cn.sortKey,state:Aa})}else St.push({segments:cr.segments,sortKey:0,state:Aa})}Br&&St.sort((yt,Lt)=>yt.sortKey-Lt.sortKey);for(const yt of St){const{programConfiguration:Lt,program:nr,layoutVertexBuffer:cr,indexBuffer:mr,uniformValues:Pr,terrainData:Vr}=yt.state;nr.draw(ta,Ve.TRIANGLES,Ye,it,ht,Fi.disabled,Pr,Vr,_t.id,cr,mr,yt.segments,_t.paint,Re.transform.zoom,Lt)}})(P,ne,we,Se);break;case"heatmap":(function(Re,ct,_t,zt){if(_t.paint.get("heatmap-opacity")===0)return;const Qt=Re.context;if(Re.style.map.terrain){for(const fr of zt){const gr=ct.getTile(fr);ct.hasRenderableParent(fr)||(Re.renderPass==="offscreen"?Pc(Re,gr,_t,fr):Re.renderPass==="translucent"&&lc(Re,_t,fr))}Qt.viewport.set([0,0,Re.width,Re.height])}else Re.renderPass==="offscreen"?(function(fr,gr,Br,ta){const Ve=fr.context,Ye=Ve.gl,it=hs.disabled,ht=new rl([Ye.ONE,Ye.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(St,yt,Lt){const nr=St.gl;St.activeTexture.set(nr.TEXTURE1),St.viewport.set([0,0,yt.width/4,yt.height/4]);let cr=Lt.heatmapFbos.get(t.aU);cr?(nr.bindTexture(nr.TEXTURE_2D,cr.colorAttachment.get()),St.bindFramebuffer.set(cr.framebuffer)):(cr=$c(St,yt.width/4,yt.height/4),Lt.heatmapFbos.set(t.aU,cr))})(Ve,fr,Br),Ve.clear({color:t.aM.transparent});for(let St=0;St<ta.length;St++){const yt=ta[St];if(gr.hasRenderableParent(yt))continue;const Lt=gr.getTile(yt),nr=Lt.getBucket(Br);if(!nr)continue;const cr=nr.programConfigurations.get(Br.id),mr=fr.useProgram("heatmap",cr),{zoom:Pr}=fr.transform;mr.draw(Ve,Ye.TRIANGLES,Bo.disabled,it,ht,Fi.disabled,zn(yt.posMatrix,Lt,Pr,Br.paint.get("heatmap-intensity")),null,Br.id,nr.layoutVertexBuffer,nr.indexBuffer,nr.segments,Br.paint,fr.transform.zoom,cr)}Ve.viewport.set([0,0,fr.width,fr.height])})(Re,ct,_t,zt):Re.renderPass==="translucent"&&(function(fr,gr){const Br=fr.context,ta=Br.gl;Br.setColorMode(fr.colorModeForRenderPass());const Ve=gr.heatmapFbos.get(t.aU);Ve&&(Br.activeTexture.set(ta.TEXTURE0),ta.bindTexture(ta.TEXTURE_2D,Ve.colorAttachment.get()),Br.activeTexture.set(ta.TEXTURE1),Jc(Br,gr).bind(ta.LINEAR,ta.CLAMP_TO_EDGE),fr.useProgram("heatmapTexture").draw(Br,ta.TRIANGLES,Bo.disabled,hs.disabled,fr.colorModeForRenderPass(),Fi.disabled,no(fr,gr,0,1),null,gr.id,fr.viewportBuffer,fr.quadTriangleIndexBuffer,fr.viewportSegments,gr.paint,fr.transform.zoom))})(Re,_t)})(P,ne,we,Se);break;case"line":(function(Re,ct,_t,zt){if(Re.renderPass!=="translucent")return;const Qt=_t.paint.get("line-opacity"),fr=_t.paint.get("line-width");if(Qt.constantOr(1)===0||fr.constantOr(1)===0)return;const gr=Re.depthModeForSublayer(0,Bo.ReadOnly),Br=Re.colorModeForRenderPass(),ta=_t.paint.get("line-dasharray"),Ve=_t.paint.get("line-pattern"),Ye=Ve.constantOr(1),it=_t.paint.get("line-gradient"),ht=_t.getCrossfadeParameters(),St=Ye?"linePattern":ta?"lineSDF":it?"lineGradient":"line",yt=Re.context,Lt=yt.gl;let nr=!0;for(const cr of zt){const mr=ct.getTile(cr);if(Ye&&!mr.patternsLoaded())continue;const Pr=mr.getBucket(_t);if(!Pr)continue;const Vr=Pr.programConfigurations.get(_t.id),oa=Re.context.program.get(),ca=Re.useProgram(St,Vr),Aa=nr||ca.program!==oa,$a=Re.style.map.terrain&&Re.style.map.terrain.getTerrainData(cr),Cn=Ve.constantOr(null);if(Cn&&mr.imageAtlas){const ui=mr.imageAtlas,Mi=ui.patternPositions[Cn.to.toString()],xi=ui.patternPositions[Cn.from.toString()];Mi&&xi&&Vr.setConstantPatternPositions(Mi,xi)}const wn=$a?cr:null,Ln=Ye?to(Re,mr,_t,ht,wn):ta?Gi(Re,mr,_t,ta,ht,wn):it?ho(Re,mr,_t,Pr.lineClipsArray.length,wn):Go(Re,mr,_t,wn);if(Ye)yt.activeTexture.set(Lt.TEXTURE0),mr.imageAtlasTexture.bind(Lt.LINEAR,Lt.CLAMP_TO_EDGE),Vr.updatePaintBuffers(ht);else if(ta&&(Aa||Re.lineAtlas.dirty))yt.activeTexture.set(Lt.TEXTURE0),Re.lineAtlas.bind(yt);else if(it){const ui=Pr.gradients[_t.id];let Mi=ui.texture;if(_t.gradientVersion!==ui.version){let xi=256;if(_t.stepInterpolant){const Ji=ct.getSource().maxzoom,Zo=cr.canonical.z===Ji?Math.ceil(1<<Re.transform.maxZoom-cr.canonical.z):1;xi=t.ac(t.aV(Pr.maxLineLength/t.X*1024*Zo),256,yt.maxTextureSize)}ui.gradient=t.aW({expression:_t.gradientExpression(),evaluationKey:"lineProgress",resolution:xi,image:ui.gradient||void 0,clips:Pr.lineClipsArray}),ui.texture?ui.texture.update(ui.gradient):ui.texture=new u(yt,ui.gradient,Lt.RGBA),ui.version=_t.gradientVersion,Mi=ui.texture}yt.activeTexture.set(Lt.TEXTURE0),Mi.bind(_t.stepInterpolant?Lt.NEAREST:Lt.LINEAR,Lt.CLAMP_TO_EDGE)}ca.draw(yt,Lt.TRIANGLES,gr,Re.stencilModeForClipping(cr),Br,Fi.disabled,Ln,$a,_t.id,Pr.layoutVertexBuffer,Pr.indexBuffer,Pr.segments,_t.paint,Re.transform.zoom,Vr,Pr.layoutVertexBuffer2),nr=!1}})(P,ne,we,Se);break;case"fill":(function(Re,ct,_t,zt){const Qt=_t.paint.get("fill-color"),fr=_t.paint.get("fill-opacity");if(fr.constantOr(1)===0)return;const gr=Re.colorModeForRenderPass(),Br=_t.paint.get("fill-pattern"),ta=Re.opaquePassEnabledForLayer()&&!Br.constantOr(1)&&Qt.constantOr(t.aM.transparent).a===1&&fr.constantOr(0)===1?"opaque":"translucent";if(Re.renderPass===ta){const Ve=Re.depthModeForSublayer(1,Re.renderPass==="opaque"?Bo.ReadWrite:Bo.ReadOnly);af(Re,ct,_t,zt,Ve,gr,!1)}if(Re.renderPass==="translucent"&&_t.paint.get("fill-antialias")){const Ve=Re.depthModeForSublayer(_t.getPaintProperty("fill-outline-color")?2:0,Bo.ReadOnly);af(Re,ct,_t,zt,Ve,gr,!0)}})(P,ne,we,Se);break;case"fill-extrusion":(function(Re,ct,_t,zt){const Qt=_t.paint.get("fill-extrusion-opacity");if(Qt!==0&&Re.renderPass==="translucent"){const fr=new Bo(Re.context.gl.LEQUAL,Bo.ReadWrite,Re.depthRangeFor3D);if(Qt!==1||_t.paint.get("fill-extrusion-pattern").constantOr(1))Ku(Re,ct,_t,zt,fr,hs.disabled,rl.disabled),Ku(Re,ct,_t,zt,fr,Re.stencilModeFor3D(),Re.colorModeForRenderPass());else{const gr=Re.colorModeForRenderPass();Ku(Re,ct,_t,zt,fr,hs.disabled,gr)}}})(P,ne,we,Se);break;case"hillshade":(function(Re,ct,_t,zt){if(Re.renderPass!=="offscreen"&&Re.renderPass!=="translucent")return;const Qt=Re.context,fr=Re.depthModeForSublayer(0,Bo.ReadOnly),gr=Re.colorModeForRenderPass(),[Br,ta]=Re.renderPass==="translucent"?Re.stencilConfigForOverlap(zt):[{},zt];for(const Ve of ta){const Ye=ct.getTile(Ve);Ye.needsHillshadePrepare!==void 0&&Ye.needsHillshadePrepare&&Re.renderPass==="offscreen"?zl(Re,Ye,_t,fr,hs.disabled,gr):Re.renderPass==="translucent"&&Ou(Re,Ve,Ye,_t,fr,Br[Ve.overscaledZ],gr)}Qt.viewport.set([0,0,Re.width,Re.height])})(P,ne,we,Se);break;case"raster":(function(Re,ct,_t,zt){if(Re.renderPass!=="translucent"||_t.paint.get("raster-opacity")===0||!zt.length)return;const Qt=Re.context,fr=Qt.gl,gr=ct.getSource(),Br=Re.useProgram("raster"),ta=Re.colorModeForRenderPass(),[Ve,Ye]=gr instanceof et?[{},zt]:Re.stencilConfigForOverlap(zt),it=Ye[Ye.length-1].overscaledZ,ht=!Re.options.moving;for(const St of Ye){const yt=Re.depthModeForSublayer(St.overscaledZ-it,_t.paint.get("raster-opacity")===1?Bo.ReadWrite:Bo.ReadOnly,fr.LESS),Lt=ct.getTile(St);Lt.registerFadeDuration(_t.paint.get("raster-fade-duration"));const nr=ct.findLoadedParent(St,0),cr=ct.findLoadedSibling(St),mr=pc(Lt,nr||cr||null,ct,_t,Re.transform,Re.style.map.terrain);let Pr,Vr;const oa=_t.paint.get("raster-resampling")==="nearest"?fr.NEAREST:fr.LINEAR;Qt.activeTexture.set(fr.TEXTURE0),Lt.texture.bind(oa,fr.CLAMP_TO_EDGE,fr.LINEAR_MIPMAP_NEAREST),Qt.activeTexture.set(fr.TEXTURE1),nr?(nr.texture.bind(oa,fr.CLAMP_TO_EDGE,fr.LINEAR_MIPMAP_NEAREST),Pr=Math.pow(2,nr.tileID.overscaledZ-Lt.tileID.overscaledZ),Vr=[Lt.tileID.canonical.x*Pr%1,Lt.tileID.canonical.y*Pr%1]):Lt.texture.bind(oa,fr.CLAMP_TO_EDGE,fr.LINEAR_MIPMAP_NEAREST),Lt.texture.useMipmap&&Qt.extTextureFilterAnisotropic&&Re.transform.pitch>20&&fr.texParameterf(fr.TEXTURE_2D,Qt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Qt.extTextureFilterAnisotropicMax);const ca=Re.style.map.terrain&&Re.style.map.terrain.getTerrainData(St),Aa=ca?St:null,$a=Aa?Aa.posMatrix:Re.transform.calculatePosMatrix(St.toUnwrapped(),ht),Cn=is($a,Vr||[0,0],Pr||1,mr,_t);gr instanceof et?Br.draw(Qt,fr.TRIANGLES,yt,hs.disabled,ta,Fi.disabled,Cn,ca,_t.id,gr.boundsBuffer,Re.quadTriangleIndexBuffer,gr.boundsSegments):Br.draw(Qt,fr.TRIANGLES,yt,Ve[St.overscaledZ],ta,Fi.disabled,Cn,ca,_t.id,Re.rasterBoundsBuffer,Re.quadTriangleIndexBuffer,Re.rasterBoundsSegments)}})(P,ne,we,Se);break;case"background":(function(Re,ct,_t,zt){const Qt=_t.paint.get("background-color"),fr=_t.paint.get("background-opacity");if(fr===0)return;const gr=Re.context,Br=gr.gl,ta=Re.transform,Ve=ta.tileSize,Ye=_t.paint.get("background-pattern");if(Re.isPatternMissing(Ye))return;const it=!Ye&&Qt.a===1&&fr===1&&Re.opaquePassEnabledForLayer()?"opaque":"translucent";if(Re.renderPass!==it)return;const ht=hs.disabled,St=Re.depthModeForSublayer(0,it==="opaque"?Bo.ReadWrite:Bo.ReadOnly),yt=Re.colorModeForRenderPass(),Lt=Re.useProgram(Ye?"backgroundPattern":"background"),nr=zt||ta.coveringTiles({tileSize:Ve,terrain:Re.style.map.terrain});Ye&&(gr.activeTexture.set(Br.TEXTURE0),Re.imageManager.bind(Re.context));const cr=_t.getCrossfadeParameters();for(const mr of nr){const Pr=zt?mr.posMatrix:Re.transform.calculatePosMatrix(mr.toUnwrapped()),Vr=Ye?Ts(Pr,fr,Re,Ye,{tileID:mr,tileSize:Ve},cr):os(Pr,fr,Qt),oa=Re.style.map.terrain&&Re.style.map.terrain.getTerrainData(mr);Lt.draw(gr,Br.TRIANGLES,St,ht,yt,Fi.disabled,Vr,oa,_t.id,Re.tileExtentBuffer,Re.quadTriangleIndexBuffer,Re.tileExtentSegments)}})(P,0,we,Se);break;case"custom":(function(Re,ct,_t){const zt=Re.context,Qt=_t.implementation;if(Re.renderPass==="offscreen"){const fr=Qt.prerender;fr&&(Re.setCustomLayerDefaults(),zt.setColorMode(Re.colorModeForRenderPass()),fr.call(Qt,zt.gl,Re.transform.customLayerMatrix()),zt.setDirty(),Re.setBaseState())}else if(Re.renderPass==="translucent"){Re.setCustomLayerDefaults(),zt.setColorMode(Re.colorModeForRenderPass()),zt.setStencilMode(hs.disabled);const fr=Qt.renderingMode==="3d"?new Bo(Re.context.gl.LEQUAL,Bo.ReadWrite,Re.depthRangeFor3D):Re.depthModeForSublayer(0,Bo.ReadOnly);zt.setDepthMode(fr),Qt.render(zt.gl,Re.transform.customLayerMatrix(),{farZ:Re.transform.farZ,nearZ:Re.transform.nearZ,fov:Re.transform._fov,modelViewProjectionMatrix:Re.transform.modelViewProjectionMatrix,projectionMatrix:Re.transform.projectionMatrix}),zt.setDirty(),Re.setBaseState(),zt.bindFramebuffer.set(null)}})(P,0,we)}}translatePosMatrix(P,ne,we,Se,Re){if(!we[0]&&!we[1])return P;const ct=Re?Se==="map"?this.transform.angle:0:Se==="viewport"?-this.transform.angle:0;if(ct){const Qt=Math.sin(ct),fr=Math.cos(ct);we=[we[0]*fr-we[1]*Qt,we[0]*Qt+we[1]*fr]}const _t=[Re?we[0]:Ea(ne,we[0],this.transform.zoom),Re?we[1]:Ea(ne,we[1],this.transform.zoom),0],zt=new Float32Array(16);return t.J(zt,P,_t),zt}saveTileTexture(P){const ne=this._tileTextures[P.size[0]];ne?ne.push(P):this._tileTextures[P.size[0]]=[P]}getTileTexture(P){const ne=this._tileTextures[P];return ne&&ne.length>0?ne.pop():null}isPatternMissing(P){if(!P)return!1;if(!P.from||!P.to)return!0;const ne=this.imageManager.getPattern(P.from.toString()),we=this.imageManager.getPattern(P.to.toString());return!ne||!we}useProgram(P,ne){this.cache=this.cache||{};const we=P+(ne?ne.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[we]||(this.cache[we]=new fa(this.context,Fr[P],ne,Es[P],this._showOverdrawInspector,this.style.map.terrain)),this.cache[we]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const P=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(P.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:P,drawingBufferHeight:ne}=this.context.gl;return this.width!==P||this.height!==ne}}class Ys{constructor(P,ne){this.points=P,this.planes=ne}static fromInvProjectionMatrix(P,ne,we){const Se=Math.pow(2,we),Re=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(_t=>{const zt=1/(_t=t.af([],_t,P))[3]/ne*Se;return t.b1(_t,_t,[zt,zt,1/_t[3],zt])}),ct=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(_t=>{const zt=(function(Br,ta){var Ve=ta[0],Ye=ta[1],it=ta[2],ht=Ve*Ve+Ye*Ye+it*it;return ht>0&&(ht=1/Math.sqrt(ht)),Br[0]=ta[0]*ht,Br[1]=ta[1]*ht,Br[2]=ta[2]*ht,Br})([],(function(Br,ta,Ve){var Ye=ta[0],it=ta[1],ht=ta[2],St=Ve[0],yt=Ve[1],Lt=Ve[2];return Br[0]=it*Lt-ht*yt,Br[1]=ht*St-Ye*Lt,Br[2]=Ye*yt-it*St,Br})([],M([],Re[_t[0]],Re[_t[1]]),M([],Re[_t[2]],Re[_t[1]]))),Qt=-((fr=zt)[0]*(gr=Re[_t[1]])[0]+fr[1]*gr[1]+fr[2]*gr[2]);var fr,gr;return zt.concat(Qt)});return new Ys(Re,ct)}}class $u{constructor(P,ne){this.min=P,this.max=ne,this.center=(function(we,Se,Re){return we[0]=.5*Se[0],we[1]=.5*Se[1],we[2]=.5*Se[2],we})([],(function(we,Se,Re){return we[0]=Se[0]+Re[0],we[1]=Se[1]+Re[1],we[2]=Se[2]+Re[2],we})([],this.min,this.max))}quadrant(P){const ne=[P%2==0,P<2],we=x(this.min),Se=x(this.max);for(let Re=0;Re<ne.length;Re++)we[Re]=ne[Re]?this.min[Re]:this.center[Re],Se[Re]=ne[Re]?this.center[Re]:this.max[Re];return Se[2]=this.max[2],new $u(we,Se)}distanceX(P){return Math.max(Math.min(this.max[0],P[0]),this.min[0])-P[0]}distanceY(P){return Math.max(Math.min(this.max[1],P[1]),this.min[1])-P[1]}intersects(P){const ne=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let we=!0;for(let Se=0;Se<P.planes.length;Se++){const Re=P.planes[Se];let ct=0;for(let _t=0;_t<ne.length;_t++)t.b2(Re,ne[_t])>=0&&ct++;if(ct===0)return 0;ct!==ne.length&&(we=!1)}if(we)return 2;for(let Se=0;Se<3;Se++){let Re=Number.MAX_VALUE,ct=-Number.MAX_VALUE;for(let _t=0;_t<P.points.length;_t++){const zt=P.points[_t][Se]-this.min[Se];Re=Math.min(Re,zt),ct=Math.max(ct,zt)}if(ct<0||Re>this.max[Se]-this.min[Se])return 0}return 1}}class Yl{constructor(P=0,ne=0,we=0,Se=0){if(isNaN(P)||P<0||isNaN(ne)||ne<0||isNaN(we)||we<0||isNaN(Se)||Se<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=P,this.bottom=ne,this.left=we,this.right=Se}interpolate(P,ne,we){return ne.top!=null&&P.top!=null&&(this.top=t.y.number(P.top,ne.top,we)),ne.bottom!=null&&P.bottom!=null&&(this.bottom=t.y.number(P.bottom,ne.bottom,we)),ne.left!=null&&P.left!=null&&(this.left=t.y.number(P.left,ne.left,we)),ne.right!=null&&P.right!=null&&(this.right=t.y.number(P.right,ne.right,we)),this}getCenter(P,ne){const we=t.ac((this.left+P-this.right)/2,0,P),Se=t.ac((this.top+ne-this.bottom)/2,0,ne);return new t.P(we,Se)}equals(P){return this.top===P.top&&this.bottom===P.bottom&&this.left===P.left&&this.right===P.right}clone(){return new Yl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const cu=85.051129;class al{constructor(P,ne,we,Se,Re){this.tileSize=512,this._renderWorldCopies=Re===void 0||!!Re,this._minZoom=P||0,this._maxZoom=ne||22,this._minPitch=we??0,this._maxPitch=Se??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Yl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const P=new al(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return P.apply(this),P}apply(P){this.tileSize=P.tileSize,this.latRange=P.latRange,this.lngRange=P.lngRange,this.width=P.width,this.height=P.height,this._center=P._center,this._elevation=P._elevation,this.minElevationForCurrentTile=P.minElevationForCurrentTile,this.zoom=P.zoom,this.angle=P.angle,this._fov=P._fov,this._pitch=P._pitch,this._unmodified=P._unmodified,this._edgeInsets=P._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(P){this._minZoom!==P&&(this._minZoom=P,this.zoom=Math.max(this.zoom,P))}get maxZoom(){return this._maxZoom}set maxZoom(P){this._maxZoom!==P&&(this._maxZoom=P,this.zoom=Math.min(this.zoom,P))}get minPitch(){return this._minPitch}set minPitch(P){this._minPitch!==P&&(this._minPitch=P,this.pitch=Math.max(this.pitch,P))}get maxPitch(){return this._maxPitch}set maxPitch(P){this._maxPitch!==P&&(this._maxPitch=P,this.pitch=Math.min(this.pitch,P))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(P){P===void 0?P=!0:P===null&&(P=!1),this._renderWorldCopies=P}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(P){const ne=-t.b3(P,-180,180)*Math.PI/180;this.angle!==ne&&(this._unmodified=!1,this.angle=ne,this._calcMatrices(),this.rotationMatrix=(function(){var we=new t.A(4);return t.A!=Float32Array&&(we[1]=0,we[2]=0),we[0]=1,we[3]=1,we})(),(function(we,Se,Re){var ct=Se[0],_t=Se[1],zt=Se[2],Qt=Se[3],fr=Math.sin(Re),gr=Math.cos(Re);we[0]=ct*gr+zt*fr,we[1]=_t*gr+Qt*fr,we[2]=ct*-fr+zt*gr,we[3]=_t*-fr+Qt*gr})(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(P){const ne=t.ac(P,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ne&&(this._unmodified=!1,this._pitch=ne,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(P){P=Math.max(.01,Math.min(60,P)),this._fov!==P&&(this._unmodified=!1,this._fov=P/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(P){const ne=Math.min(Math.max(P,this.minZoom),this.maxZoom);this._zoom!==ne&&(this._unmodified=!1,this._zoom=ne,this.tileZoom=Math.max(0,Math.floor(ne)),this.scale=this.zoomScale(ne),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(P){P.lat===this._center.lat&&P.lng===this._center.lng||(this._unmodified=!1,this._center=P,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(P){P!==this._elevation&&(this._elevation=P,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(P){this._edgeInsets.equals(P)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,P,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(P){return this._edgeInsets.equals(P)}interpolatePadding(P,ne,we){this._unmodified=!1,this._edgeInsets.interpolate(P,ne,we),this._constrain(),this._calcMatrices()}coveringZoomLevel(P){const ne=(P.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/P.tileSize));return Math.max(0,ne)}getVisibleUnwrappedCoordinates(P){const ne=[new t.b4(0,P)];if(this._renderWorldCopies){const we=this.pointCoordinate(new t.P(0,0)),Se=this.pointCoordinate(new t.P(this.width,0)),Re=this.pointCoordinate(new t.P(this.width,this.height)),ct=this.pointCoordinate(new t.P(0,this.height)),_t=Math.floor(Math.min(we.x,Se.x,Re.x,ct.x)),zt=Math.floor(Math.max(we.x,Se.x,Re.x,ct.x)),Qt=1;for(let fr=_t-Qt;fr<=zt+Qt;fr++)fr!==0&&ne.push(new t.b4(fr,P))}return ne}coveringTiles(P){var ne,we;let Se=this.coveringZoomLevel(P);const Re=Se;if(P.minzoom!==void 0&&Se<P.minzoom)return[];P.maxzoom!==void 0&&Se>P.maxzoom&&(Se=P.maxzoom);const ct=this.pointCoordinate(this.getCameraPoint()),_t=t.Z.fromLngLat(this.center),zt=Math.pow(2,Se),Qt=[zt*ct.x,zt*ct.y,0],fr=[zt*_t.x,zt*_t.y,0],gr=Ys.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Se);let Br=P.minzoom||0;!P.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Br=Se);const ta=P.terrain?2/Math.min(this.tileSize,P.tileSize)*this.tileSize:3,Ve=yt=>({aabb:new $u([yt*zt,0,0],[(yt+1)*zt,zt,0]),zoom:0,x:0,y:0,wrap:yt,fullyVisible:!1}),Ye=[],it=[],ht=Se,St=P.reparseOverscaled?Re:Se;if(this._renderWorldCopies)for(let yt=1;yt<=3;yt++)Ye.push(Ve(-yt)),Ye.push(Ve(yt));for(Ye.push(Ve(0));Ye.length>0;){const yt=Ye.pop(),Lt=yt.x,nr=yt.y;let cr=yt.fullyVisible;if(!cr){const ca=yt.aabb.intersects(gr);if(ca===0)continue;cr=ca===2}const mr=P.terrain?Qt:fr,Pr=yt.aabb.distanceX(mr),Vr=yt.aabb.distanceY(mr),oa=Math.max(Math.abs(Pr),Math.abs(Vr));if(yt.zoom===ht||oa>ta+(1<<ht-yt.zoom)-2&&yt.zoom>=Br){const ca=ht-yt.zoom,Aa=Qt[0]-.5-(Lt<<ca),$a=Qt[1]-.5-(nr<<ca);it.push({tileID:new t.S(yt.zoom===ht?St:yt.zoom,yt.wrap,yt.zoom,Lt,nr),distanceSq:_([fr[0]-.5-Lt,fr[1]-.5-nr]),tileDistanceToCamera:Math.sqrt(Aa*Aa+$a*$a)})}else for(let ca=0;ca<4;ca++){const Aa=(Lt<<1)+ca%2,$a=(nr<<1)+(ca>>1),Cn=yt.zoom+1;let wn=yt.aabb.quadrant(ca);if(P.terrain){const Ln=new t.S(Cn,yt.wrap,Cn,Aa,$a),ui=P.terrain.getMinMaxElevation(Ln),Mi=(ne=ui.minElevation)!==null&&ne!==void 0?ne:this.elevation,xi=(we=ui.maxElevation)!==null&&we!==void 0?we:this.elevation;wn=new $u([wn.min[0],wn.min[1],Mi],[wn.max[0],wn.max[1],xi])}Ye.push({aabb:wn,zoom:Cn,x:Aa,y:$a,wrap:yt.wrap,fullyVisible:cr})}}return it.sort((yt,Lt)=>yt.distanceSq-Lt.distanceSq).map(yt=>yt.tileID)}resize(P,ne){this.width=P,this.height=ne,this.pixelsToGLUnits=[2/P,-2/ne],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(P){return Math.pow(2,P)}scaleZoom(P){return Math.log(P)/Math.LN2}project(P){const ne=t.ac(P.lat,-85.051129,cu);return new t.P(t.O(P.lng)*this.worldSize,t.Q(ne)*this.worldSize)}unproject(P){return new t.Z(P.x/this.worldSize,P.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(P){const ne=this.elevation,we=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Se=this.pointLocation(this.centerPoint,P),Re=P.getElevationForLngLatZoom(Se,this.tileZoom);if(!(this.elevation-Re))return;const ct=we+ne-Re,_t=Math.cos(this._pitch)*this.cameraToCenterDistance/ct/t.b5(1,Se.lat),zt=this.scaleZoom(_t/this.tileSize);this._elevation=Re,this._center=Se,this.zoom=zt}setLocationAtPoint(P,ne){const we=this.pointCoordinate(ne),Se=this.pointCoordinate(this.centerPoint),Re=this.locationCoordinate(P),ct=new t.Z(Re.x-(we.x-Se.x),Re.y-(we.y-Se.y));this.center=this.coordinateLocation(ct),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(P,ne){return ne?this.coordinatePoint(this.locationCoordinate(P),ne.getElevationForLngLatZoom(P,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(P))}pointLocation(P,ne){return this.coordinateLocation(this.pointCoordinate(P,ne))}locationCoordinate(P){return t.Z.fromLngLat(P)}coordinateLocation(P){return P&&P.toLngLat()}pointCoordinate(P,ne){if(ne){const Br=ne.pointCoordinate(P);if(Br!=null)return Br}const we=[P.x,P.y,0,1],Se=[P.x,P.y,1,1];t.af(we,we,this.pixelMatrixInverse),t.af(Se,Se,this.pixelMatrixInverse);const Re=we[3],ct=Se[3],_t=we[1]/Re,zt=Se[1]/ct,Qt=we[2]/Re,fr=Se[2]/ct,gr=Qt===fr?0:(0-Qt)/(fr-Qt);return new t.Z(t.y.number(we[0]/Re,Se[0]/ct,gr)/this.worldSize,t.y.number(_t,zt,gr)/this.worldSize)}coordinatePoint(P,ne=0,we=this.pixelMatrix){const Se=[P.x*this.worldSize,P.y*this.worldSize,ne,1];return t.af(Se,Se,we),new t.P(Se[0]/Se[3],Se[1]/Se[3])}getBounds(){const P=Math.max(0,this.height/2-this.getHorizon());return new ae().extend(this.pointLocation(new t.P(0,P))).extend(this.pointLocation(new t.P(this.width,P))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ae([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(P){P?(this.lngRange=[P.getWest(),P.getEast()],this.latRange=[P.getSouth(),P.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,cu])}calculateTileMatrix(P){const ne=P.canonical,we=this.worldSize/this.zoomScale(ne.z),Se=ne.x+Math.pow(2,ne.z)*P.wrap,Re=t.an(new Float64Array(16));return t.J(Re,Re,[Se*we,ne.y*we,0]),t.K(Re,Re,[we/t.X,we/t.X,1]),Re}calculatePosMatrix(P,ne=!1){const we=P.key,Se=ne?this._alignedPosMatrixCache:this._posMatrixCache;if(Se[we])return Se[we];const Re=this.calculateTileMatrix(P);return t.L(Re,ne?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Re),Se[we]=new Float32Array(Re),Se[we]}calculateFogMatrix(P){const ne=P.key,we=this._fogMatrixCache;if(we[ne])return we[ne];const Se=this.calculateTileMatrix(P);return t.L(Se,this.fogMatrix,Se),we[ne]=new Float32Array(Se),we[ne]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(P,ne){ne=t.ac(+ne,this.minZoom,this.maxZoom);const we={center:new t.N(P.lng,P.lat),zoom:ne};let Se=this.lngRange;if(!this._renderWorldCopies&&Se===null){const yt=179.9999999999;Se=[-yt,yt]}const Re=this.tileSize*this.zoomScale(we.zoom);let ct=0,_t=Re,zt=0,Qt=Re,fr=0,gr=0;const{x:Br,y:ta}=this.size;if(this.latRange){const yt=this.latRange;ct=t.Q(yt[1])*Re,_t=t.Q(yt[0])*Re,_t-ct<ta&&(fr=ta/(_t-ct))}Se&&(zt=t.b3(t.O(Se[0])*Re,0,Re),Qt=t.b3(t.O(Se[1])*Re,0,Re),Qt<zt&&(Qt+=Re),Qt-zt<Br&&(gr=Br/(Qt-zt)));const{x:Ve,y:Ye}=this.project.call({worldSize:Re},P);let it,ht;const St=Math.max(gr||0,fr||0);if(St){const yt=new t.P(gr?(Qt+zt)/2:Ve,fr?(_t+ct)/2:Ye);return we.center=this.unproject.call({worldSize:Re},yt).wrap(),we.zoom+=this.scaleZoom(St),we}if(this.latRange){const yt=ta/2;Ye-yt<ct&&(ht=ct+yt),Ye+yt>_t&&(ht=_t-yt)}if(Se){const yt=(zt+Qt)/2;let Lt=Ve;this._renderWorldCopies&&(Lt=t.b3(Ve,yt-Re/2,yt+Re/2));const nr=Br/2;Lt-nr<zt&&(it=zt+nr),Lt+nr>Qt&&(it=Qt-nr)}if(it!==void 0||ht!==void 0){const yt=new t.P(it??Ve,ht??Ye);we.center=this.unproject.call({worldSize:Re},yt).wrap()}return we}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const P=this._unmodified,{center:ne,zoom:we}=this.getConstrained(this.center,this.zoom);this.center=ne,this.zoom=we,this._unmodified=P,this._constraining=!1}_calcMatrices(){if(!this.height)return;const P=this.centerOffset,ne=this.point.x,we=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Se=t.an(new Float64Array(16));t.K(Se,Se,[this.width/2,-this.height/2,1]),t.J(Se,Se,[1,-1,0]),this.labelPlaneMatrix=Se,Se=t.an(new Float64Array(16)),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[-1,-1,0]),t.K(Se,Se,[2/this.width,2/this.height,1]),this.glCoordMatrix=Se;const Re=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ct=Math.min(this.elevation,this.minElevationForCurrentTile),_t=Re-ct*this._pixelPerMeter/Math.cos(this._pitch),zt=ct<0?_t:Re,Qt=Math.PI/2+this._pitch,fr=this._fov*(.5+P.y/this.height),gr=Math.sin(fr)*zt/Math.sin(t.ac(Math.PI-Qt-fr,.01,Math.PI-.01)),Br=this.getHorizon(),ta=2*Math.atan(Br/this.cameraToCenterDistance)*(.5+P.y/(2*Br)),Ve=Math.sin(ta)*zt/Math.sin(t.ac(Math.PI-Qt-ta,.01,Math.PI-.01)),Ye=Math.min(gr,Ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Ye+zt),this.nearZ=this.height/50,Se=new Float64Array(16),t.b6(Se,this._fov,this.width/this.height,this.nearZ,this.farZ),Se[8]=2*-P.x/this.width,Se[9]=2*P.y/this.height,this.projectionMatrix=t.ae(Se),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[0,0,-this.cameraToCenterDistance]),t.b7(Se,Se,this._pitch),t.ad(Se,Se,this.angle),t.J(Se,Se,[-ne,-we,0]),this.mercatorMatrix=t.K([],Se,[this.worldSize,this.worldSize,this.worldSize]),t.K(Se,Se,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Se),t.J(Se,Se,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Se,this.invModelViewProjectionMatrix=t.as([],Se),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,Re,this.farZ),this.fogMatrix[8]=2*-P.x/this.width,this.fogMatrix[9]=2*P.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ad(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-ne,-we,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,Se);const it=this.width%2/2,ht=this.height%2/2,St=Math.cos(this.angle),yt=Math.sin(this.angle),Lt=ne-Math.round(ne)+St*it+yt*ht,nr=we-Math.round(we)+St*ht+yt*it,cr=new Float64Array(Se);if(t.J(cr,cr,[Lt>.5?Lt-1:Lt,nr>.5?nr-1:nr,0]),this.alignedModelViewProjectionMatrix=cr,Se=t.as(new Float64Array(16),this.pixelMatrix),!Se)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Se,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const P=this.pointCoordinate(new t.P(0,0)),ne=[P.x*this.worldSize,P.y*this.worldSize,0,1];return t.af(ne,ne,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const P=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,P))}getCameraQueryGeometry(P){const ne=this.getCameraPoint();if(P.length===1)return[P[0],ne];{let we=ne.x,Se=ne.y,Re=ne.x,ct=ne.y;for(const _t of P)we=Math.min(we,_t.x),Se=Math.min(Se,_t.y),Re=Math.max(Re,_t.x),ct=Math.max(ct,_t.y);return[new t.P(we,Se),new t.P(Re,Se),new t.P(Re,ct),new t.P(we,ct),new t.P(we,Se)]}}lngLatToCameraDepth(P,ne){const we=this.locationCoordinate(P),Se=[we.x*this.worldSize,we.y*this.worldSize,ne,1];return t.af(Se,Se,this.modelViewProjectionMatrix),Se[2]/Se[3]}}function xc(ze,P){let ne,we=!1,Se=null,Re=null;const ct=()=>{Se=null,we&&(ze.apply(Re,ne),Se=setTimeout(ct,P),we=!1)};return(..._t)=>(we=!0,Re=this,ne=_t,Se||ct(),Se)}class Bu{constructor(P){this._getCurrentHash=()=>{const ne=window.location.hash.replace("#","");if(this._hashName){let we;return ne.split("&").map(Se=>Se.split("=")).forEach(Se=>{Se[0]===this._hashName&&(we=Se)}),(we&&we[1]||"").split("/")}return ne.split("/")},this._onHashChange=()=>{const ne=this._getCurrentHash();if(ne.length>=3&&!ne.some(we=>isNaN(we))){const we=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ne[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ne[2],+ne[1]],zoom:+ne[0],bearing:we,pitch:+(ne[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const ne=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ne)},this._removeHash=()=>{const ne=this._getCurrentHash();if(ne.length===0)return;const we=ne.join("/");let Se=we;Se.split("&").length>0&&(Se=Se.split("&")[0]),this._hashName&&(Se=`${this._hashName}=${we}`);let Re=window.location.hash.replace(Se,"");Re.startsWith("#&")?Re=Re.slice(0,1)+Re.slice(2):Re==="#"&&(Re="");let ct=window.location.href.replace(/(#.+)?$/,Re);ct=ct.replace("&&","&"),window.history.replaceState(window.history.state,null,ct)},this._updateHash=xc(this._updateHashUnthrottled,300),this._hashName=P&&encodeURIComponent(P)}addTo(P){return this._map=P,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(P){const ne=this._map.getCenter(),we=Math.round(100*this._map.getZoom())/100,Se=Math.ceil((we*Math.LN2+Math.log(512/360/.5))/Math.LN10),Re=Math.pow(10,Se),ct=Math.round(ne.lng*Re)/Re,_t=Math.round(ne.lat*Re)/Re,zt=this._map.getBearing(),Qt=this._map.getPitch();let fr="";if(fr+=P?`/${ct}/${_t}/${we}`:`${we}/${_t}/${ct}`,(zt||Qt)&&(fr+="/"+Math.round(10*zt)/10),Qt&&(fr+=`/${Math.round(Qt)}`),this._hashName){const gr=this._hashName;let Br=!1;const ta=window.location.hash.slice(1).split("&").map(Ve=>{const Ye=Ve.split("=")[0];return Ye===gr?(Br=!0,`${Ye}=${fr}`):Ve}).filter(Ve=>Ve);return Br||ta.push(`${gr}=${fr}`),`#${ta.join("&")}`}return`#${fr}`}}const cc={linearity:.3,easing:t.b8(0,0,.3,1)},Nc=t.e({deceleration:2500,maxSpeed:1400},cc),Lf=t.e({deceleration:20,maxSpeed:1400},cc),Kf=t.e({deceleration:1e3,maxSpeed:360},cc),bc=t.e({deceleration:1e3,maxSpeed:90},cc);class Uc{constructor(P){this._map=P,this.clear()}clear(){this._inertiaBuffer=[]}record(P){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.now(),settings:P})}_drainInertiaBuffer(){const P=this._inertiaBuffer,ne=i.now();for(;P.length>0&&ne-P[0].time>160;)P.shift()}_onMoveEnd(P){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const ne={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:Re}of this._inertiaBuffer)ne.zoom+=Re.zoomDelta||0,ne.bearing+=Re.bearingDelta||0,ne.pitch+=Re.pitchDelta||0,Re.panDelta&&ne.pan._add(Re.panDelta),Re.around&&(ne.around=Re.around),Re.pinchAround&&(ne.pinchAround=Re.pinchAround);const we=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Se={};if(ne.pan.mag()){const Re=jc(ne.pan.mag(),we,t.e({},Nc,P||{}));Se.offset=ne.pan.mult(Re.amount/ne.pan.mag()),Se.center=this._map.transform.center,_u(Se,Re)}if(ne.zoom){const Re=jc(ne.zoom,we,Lf);Se.zoom=this._map.transform.zoom+Re.amount,_u(Se,Re)}if(ne.bearing){const Re=jc(ne.bearing,we,Kf);Se.bearing=this._map.transform.bearing+t.ac(Re.amount,-179,179),_u(Se,Re)}if(ne.pitch){const Re=jc(ne.pitch,we,bc);Se.pitch=this._map.transform.pitch+Re.amount,_u(Se,Re)}if(Se.zoom||Se.bearing){const Re=ne.pinchAround===void 0?ne.around:ne.pinchAround;Se.around=Re?this._map.unproject(Re):this._map.getCenter()}return this.clear(),t.e(Se,{noMoveStart:!0})}}function _u(ze,P){(!ze.duration||ze.duration<P.duration)&&(ze.duration=P.duration,ze.easing=P.easing)}function jc(ze,P,ne){const{maxSpeed:we,linearity:Se,deceleration:Re}=ne,ct=t.ac(ze*Se/(P/1e3),-we,we),_t=Math.abs(ct)/(Re*Se);return{easing:ne.easing,duration:1e3*_t,amount:ct*(_t/2)}}class Vl extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(P,ne,we,Se={}){const Re=n.mousePos(ne.getCanvas(),we),ct=ne.unproject(Re);super(P,t.e({point:Re,lngLat:ct,originalEvent:we},Se)),this._defaultPrevented=!1,this.target=ne}}class wc extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(P,ne,we){const Se=P==="touchend"?we.changedTouches:we.touches,Re=n.touchPos(ne.getCanvasContainer(),Se),ct=Re.map(zt=>ne.unproject(zt)),_t=Re.reduce((zt,Qt,fr,gr)=>zt.add(Qt.div(gr.length)),new t.P(0,0));super(P,{points:Re,point:_t,lngLats:ct,lngLat:ne.unproject(_t),originalEvent:we}),this._defaultPrevented=!1}}class lf extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(P,ne,we){super(P,{originalEvent:we}),this._defaultPrevented=!1}}class Tc{constructor(P,ne){this._map=P,this._clickTolerance=ne.clickTolerance}reset(){delete this._mousedownPos}wheel(P){return this._firePreventable(new lf(P.type,this._map,P))}mousedown(P,ne){return this._mousedownPos=ne,this._firePreventable(new Vl(P.type,this._map,P))}mouseup(P){this._map.fire(new Vl(P.type,this._map,P))}click(P,ne){this._mousedownPos&&this._mousedownPos.dist(ne)>=this._clickTolerance||this._map.fire(new Vl(P.type,this._map,P))}dblclick(P){return this._firePreventable(new Vl(P.type,this._map,P))}mouseover(P){this._map.fire(new Vl(P.type,this._map,P))}mouseout(P){this._map.fire(new Vl(P.type,this._map,P))}touchstart(P){return this._firePreventable(new wc(P.type,this._map,P))}touchmove(P){this._map.fire(new wc(P.type,this._map,P))}touchend(P){this._map.fire(new wc(P.type,this._map,P))}touchcancel(P){this._map.fire(new wc(P.type,this._map,P))}_firePreventable(P){if(this._map.fire(P),P.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Js{constructor(P){this._map=P}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(P){this._map.fire(new Vl(P.type,this._map,P))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Vl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(P){this._delayContextMenu?this._contextMenuEvent=P:this._ignoreContextMenu||this._map.fire(new Vl(P.type,this._map,P)),this._map.listens("contextmenu")&&P.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class fu{constructor(P){this._map=P}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(P){return this.transform.pointLocation(t.P.convert(P),this._map.terrain)}}class Cu{constructor(P,ne){this._map=P,this._tr=new fu(P),this._el=P.getCanvasContainer(),this._container=P.getContainer(),this._clickTolerance=ne.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(P,ne){this.isEnabled()&&P.shiftKey&&P.button===0&&(n.disableDrag(),this._startPos=this._lastPos=ne,this._active=!0)}mousemoveWindow(P,ne){if(!this._active)return;const we=ne;if(this._lastPos.equals(we)||!this._box&&we.dist(this._startPos)<this._clickTolerance)return;const Se=this._startPos;this._lastPos=we,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",P));const Re=Math.min(Se.x,we.x),ct=Math.max(Se.x,we.x),_t=Math.min(Se.y,we.y),zt=Math.max(Se.y,we.y);n.setTransform(this._box,`translate(${Re}px,${_t}px)`),this._box.style.width=ct-Re+"px",this._box.style.height=zt-_t+"px"}mouseupWindow(P,ne){if(!this._active||P.button!==0)return;const we=this._startPos,Se=ne;if(this.reset(),n.suppressClick(),we.x!==Se.x||we.y!==Se.y)return this._map.fire(new t.k("boxzoomend",{originalEvent:P})),{cameraAnimation:Re=>Re.fitScreenCoordinates(we,Se,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",P)}keydown(P){this._active&&P.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",P))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(P,ne){return this._map.fire(new t.k(P,{originalEvent:ne}))}}function ef(ze,P){if(ze.length!==P.length)throw new Error(`The number of touches and points are not equal - touches ${ze.length}, points ${P.length}`);const ne={};for(let we=0;we<ze.length;we++)ne[ze[we].identifier]=P[we];return ne}class el{constructor(P){this.reset(),this.numTouches=P.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(P,ne,we){(this.centroid||we.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=P.timeStamp),we.length===this.numTouches&&(this.centroid=(function(Se){const Re=new t.P(0,0);for(const ct of Se)Re._add(ct);return Re.div(Se.length)})(ne),this.touches=ef(we,ne)))}touchmove(P,ne,we){if(this.aborted||!this.centroid)return;const Se=ef(we,ne);for(const Re in this.touches){const ct=Se[Re];(!ct||ct.dist(this.touches[Re])>30)&&(this.aborted=!0)}}touchend(P,ne,we){if((!this.centroid||P.timeStamp-this.startTime>500)&&(this.aborted=!0),we.length===0){const Se=!this.aborted&&this.centroid;if(this.reset(),Se)return Se}}}class Rc{constructor(P){this.singleTap=new el(P),this.numTaps=P.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(P,ne,we){this.singleTap.touchstart(P,ne,we)}touchmove(P,ne,we){this.singleTap.touchmove(P,ne,we)}touchend(P,ne,we){const Se=this.singleTap.touchend(P,ne,we);if(Se){const Re=P.timeStamp-this.lastTime<500,ct=!this.lastTap||this.lastTap.dist(Se)<30;if(Re&&ct||this.reset(),this.count++,this.lastTime=P.timeStamp,this.lastTap=Se,this.count===this.numTaps)return this.reset(),Se}}}class fc{constructor(P){this._tr=new fu(P),this._zoomIn=new Rc({numTouches:1,numTaps:2}),this._zoomOut=new Rc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(P,ne,we){this._zoomIn.touchstart(P,ne,we),this._zoomOut.touchstart(P,ne,we)}touchmove(P,ne,we){this._zoomIn.touchmove(P,ne,we),this._zoomOut.touchmove(P,ne,we)}touchend(P,ne,we){const Se=this._zoomIn.touchend(P,ne,we),Re=this._zoomOut.touchend(P,ne,we),ct=this._tr;return Se?(this._active=!0,P.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:_t=>_t.easeTo({duration:300,zoom:ct.zoom+1,around:ct.unproject(Se)},{originalEvent:P})}):Re?(this._active=!0,P.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:_t=>_t.easeTo({duration:300,zoom:ct.zoom-1,around:ct.unproject(Re)},{originalEvent:P})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xu{constructor(P){this._enabled=!!P.enable,this._moveStateManager=P.moveStateManager,this._clickTolerance=P.clickTolerance||1,this._moveFunction=P.move,this._activateOnStart=!!P.activateOnStart,P.assignEvents(this),this.reset()}reset(P){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(P)}_move(...P){const ne=this._moveFunction(...P);if(ne.bearingDelta||ne.pitchDelta||ne.around||ne.panDelta)return this._active=!0,ne}dragStart(P,ne){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(P)&&(this._moveStateManager.startMove(P),this._lastPoint=ne.length?ne[0]:ne,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(P,ne){if(!this.isEnabled())return;const we=this._lastPoint;if(!we)return;if(P.preventDefault(),!this._moveStateManager.isValidMoveEvent(P))return void this.reset(P);const Se=ne.length?ne[0]:ne;return!this._moved&&Se.dist(we)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Se,this._move(we,Se))}dragEnd(P){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(P)&&(this._moved&&n.suppressClick(),this.reset(P))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const Dc={0:1,2:2};class Nu{constructor(P){this._correctEvent=P.checkCorrectEvent}startMove(P){const ne=n.mouseButton(P);this._eventButton=ne}endMove(P){delete this._eventButton}isValidStartEvent(P){return this._correctEvent(P)}isValidMoveEvent(P){return!(function(ne,we){const Se=Dc[we];return ne.buttons===void 0||(ne.buttons&Se)!==Se})(P,this._eventButton)}isValidEndEvent(P){return n.mouseButton(P)===this._eventButton}}class zc{constructor(){this._firstTouch=void 0}_isOneFingerTouch(P){return P.targetTouches.length===1}_isSameTouchEvent(P){return P.targetTouches[0].identifier===this._firstTouch}startMove(P){this._firstTouch=P.targetTouches[0].identifier}endMove(P){delete this._firstTouch}isValidStartEvent(P){return this._isOneFingerTouch(P)}isValidMoveEvent(P){return this._isOneFingerTouch(P)&&this._isSameTouchEvent(P)}isValidEndEvent(P){return this._isOneFingerTouch(P)&&this._isSameTouchEvent(P)}}const Pf=ze=>{ze.mousedown=ze.dragStart,ze.mousemoveWindow=ze.dragMove,ze.mouseup=ze.dragEnd,ze.contextmenu=P=>{P.preventDefault()}},Gl=({enable:ze,clickTolerance:P,bearingDegreesPerPixelMoved:ne=.8})=>{const we=new Nu({checkCorrectEvent:Se=>n.mouseButton(Se)===0&&Se.ctrlKey||n.mouseButton(Se)===2});return new xu({clickTolerance:P,move:(Se,Re)=>({bearingDelta:(Re.x-Se.x)*ne}),moveStateManager:we,enable:ze,assignEvents:Pf})},uf=({enable:ze,clickTolerance:P,pitchDegreesPerPixelMoved:ne=-.5})=>{const we=new Nu({checkCorrectEvent:Se=>n.mouseButton(Se)===0&&Se.ctrlKey||n.mouseButton(Se)===2});return new xu({clickTolerance:P,move:(Se,Re)=>({pitchDelta:(Re.y-Se.y)*ne}),moveStateManager:we,enable:ze,assignEvents:Pf})};class bu{constructor(P,ne){this._clickTolerance=P.clickTolerance||1,this._map=ne,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(P){return P<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(P,ne,we){return this._calculateTransform(P,ne,we)}touchmove(P,ne,we){if(this._active){if(!this._shouldBePrevented(we.length))return P.preventDefault(),this._calculateTransform(P,ne,we);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",P)}}touchend(P,ne,we){this._calculateTransform(P,ne,we),this._active&&this._shouldBePrevented(we.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(P,ne,we){we.length>0&&(this._active=!0);const Se=ef(we,ne),Re=new t.P(0,0),ct=new t.P(0,0);let _t=0;for(const Qt in Se){const fr=Se[Qt],gr=this._touches[Qt];gr&&(Re._add(fr),ct._add(fr.sub(gr)),_t++,Se[Qt]=fr)}if(this._touches=Se,this._shouldBePrevented(_t)||!ct.mag())return;const zt=ct.div(_t);return this._sum._add(zt),this._sum.mag()<this._clickTolerance?void 0:{around:Re.div(_t),panDelta:zt}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ju{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(P,ne,we){this._firstTwoTouches||we.length<2||(this._firstTwoTouches=[we[0].identifier,we[1].identifier],this._start([ne[0],ne[1]]))}touchmove(P,ne,we){if(!this._firstTwoTouches)return;P.preventDefault();const[Se,Re]=this._firstTwoTouches,ct=Uu(we,ne,Se),_t=Uu(we,ne,Re);if(!ct||!_t)return;const zt=this._aroundCenter?null:ct.add(_t).div(2);return this._move([ct,_t],zt,P)}touchend(P,ne,we){if(!this._firstTwoTouches)return;const[Se,Re]=this._firstTwoTouches,ct=Uu(we,ne,Se),_t=Uu(we,ne,Re);ct&&_t||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(P){this._enabled=!0,this._aroundCenter=!!P&&P.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Uu(ze,P,ne){for(let we=0;we<ze.length;we++)if(ze[we].identifier===ne)return P[we]}function vl(ze,P){return Math.log(ze/P)/Math.LN2}class eu extends Ju{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(P){this._startDistance=this._distance=P[0].dist(P[1])}_move(P,ne){const we=this._distance;if(this._distance=P[0].dist(P[1]),this._active||!(Math.abs(vl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:vl(this._distance,we),pinchAround:ne}}}function ol(ze,P){return 180*ze.angleWith(P)/Math.PI}class hc extends Ju{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(P){this._startVector=this._vector=P[0].sub(P[1]),this._minDiameter=P[0].dist(P[1])}_move(P,ne,we){const Se=this._vector;if(this._vector=P[0].sub(P[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:ol(this._vector,Se),pinchAround:ne}}_isBelowThreshold(P){this._minDiameter=Math.min(this._minDiameter,P.mag());const ne=25/(Math.PI*this._minDiameter)*360,we=ol(P,this._startVector);return Math.abs(we)<ne}}function ju(ze){return Math.abs(ze.y)>Math.abs(ze.x)}class tf extends Ju{constructor(P){super(),this._currentTouchCount=0,this._map=P}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(P,ne,we){super.touchstart(P,ne,we),this._currentTouchCount=we.length}_start(P){this._lastPoints=P,ju(P[0].sub(P[1]))&&(this._valid=!1)}_move(P,ne,we){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Se=P[0].sub(this._lastPoints[0]),Re=P[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Se,Re,we.timeStamp),this._valid?(this._lastPoints=P,this._active=!0,{pitchDelta:(Se.y+Re.y)/2*-.5}):void 0}gestureBeginsVertically(P,ne,we){if(this._valid!==void 0)return this._valid;const Se=P.mag()>=2,Re=ne.mag()>=2;if(!Se&&!Re)return;if(!Se||!Re)return this._firstMove===void 0&&(this._firstMove=we),we-this._firstMove<100&&void 0;const ct=P.y>0==ne.y>0;return ju(P)&&ju(ne)&&ct}}const Jt={panStep:100,bearingStep:15,pitchStep:10};class yr{constructor(P){this._tr=new fu(P);const ne=Jt;this._panStep=ne.panStep,this._bearingStep=ne.bearingStep,this._pitchStep=ne.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(P){if(P.altKey||P.ctrlKey||P.metaKey)return;let ne=0,we=0,Se=0,Re=0,ct=0;switch(P.keyCode){case 61:case 107:case 171:case 187:ne=1;break;case 189:case 109:case 173:ne=-1;break;case 37:P.shiftKey?we=-1:(P.preventDefault(),Re=-1);break;case 39:P.shiftKey?we=1:(P.preventDefault(),Re=1);break;case 38:P.shiftKey?Se=1:(P.preventDefault(),ct=-1);break;case 40:P.shiftKey?Se=-1:(P.preventDefault(),ct=1);break;default:return}return this._rotationDisabled&&(we=0,Se=0),{cameraAnimation:_t=>{const zt=this._tr;_t.easeTo({duration:300,easeId:"keyboardHandler",easing:Kr,zoom:ne?Math.round(zt.zoom)+ne*(P.shiftKey?2:1):zt.zoom,bearing:zt.bearing+we*this._bearingStep,pitch:zt.pitch+Se*this._pitchStep,offset:[-Re*this._panStep,-ct*this._panStep],center:zt.center},{originalEvent:P})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Kr(ze){return ze*(2-ze)}const jr=4.000244140625;class pa{constructor(P,ne){this._onTimeout=we=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(we)},this._map=P,this._tr=new fu(P),this._triggerRenderFrame=ne,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(P){this._defaultZoomRate=P}setWheelZoomRate(P){this._wheelZoomRate=P}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(P){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!P&&P.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(P){return!!this._map.cooperativeGestures.isEnabled()&&!(P.ctrlKey||this._map.cooperativeGestures.isBypassed(P))}wheel(P){if(!this.isEnabled())return;if(this._shouldBePrevented(P))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",P);let ne=P.deltaMode===WheelEvent.DOM_DELTA_LINE?40*P.deltaY:P.deltaY;const we=i.now(),Se=we-(this._lastWheelEventTime||0);this._lastWheelEventTime=we,ne!==0&&ne%jr==0?this._type="wheel":ne!==0&&Math.abs(ne)<4?this._type="trackpad":Se>400?(this._type=null,this._lastValue=ne,this._timeout=setTimeout(this._onTimeout,40,P)):this._type||(this._type=Math.abs(Se*ne)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ne+=this._lastValue)),P.shiftKey&&ne&&(ne/=4),this._type&&(this._lastWheelEvent=P,this._delta-=ne,this._active||this._start(P)),P.preventDefault()}_start(P){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const ne=n.mousePos(this._map.getCanvas(),P),we=this._tr;this._around=ne.y>we.transform.height/2-we.transform.getHorizon()?t.N.convert(this._aroundCenter?we.center:we.unproject(ne)):t.N.convert(we.center),this._aroundPoint=we.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const P=this._tr.transform;if(this._delta!==0){const zt=this._type==="wheel"&&Math.abs(this._delta)>jr?this._wheelZoomRate:this._defaultZoomRate;let Qt=2/(1+Math.exp(-Math.abs(this._delta*zt)));this._delta<0&&Qt!==0&&(Qt=1/Qt);const fr=typeof this._targetZoom=="number"?P.zoomScale(this._targetZoom):P.scale;this._targetZoom=Math.min(P.maxZoom,Math.max(P.minZoom,P.scaleZoom(fr*Qt))),this._type==="wheel"&&(this._startZoom=P.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const ne=typeof this._targetZoom=="number"?this._targetZoom:P.zoom,we=this._startZoom,Se=this._easing;let Re,ct=!1;const _t=i.now()-this._lastWheelEventTime;if(this._type==="wheel"&&we&&Se&&_t){const zt=Math.min(_t/200,1),Qt=Se(zt);Re=t.y.number(we,ne,Qt),zt<1?this._frameId||(this._frameId=!0):ct=!0}else Re=ne,ct=!0;return this._active=!0,ct&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ct,zoomDelta:Re-P.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(P){let ne=t.b9;if(this._prevEase){const we=this._prevEase,Se=(i.now()-we.start)/we.duration,Re=we.easing(Se+.01)-we.easing(Se),ct=.27/Math.sqrt(Re*Re+1e-4)*.01,_t=Math.sqrt(.0729-ct*ct);ne=t.b8(ct,_t,.25,1)}return this._prevEase={start:i.now(),duration:P,easing:ne},ne}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ja{constructor(P,ne){this._clickZoom=P,this._tapZoom=ne}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ya{constructor(P){this._tr=new fu(P),this.reset()}reset(){this._active=!1}dblclick(P,ne){return P.preventDefault(),{cameraAnimation:we=>{we.easeTo({duration:300,zoom:this._tr.zoom+(P.shiftKey?-1:1),around:this._tr.unproject(ne)},{originalEvent:P})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class kn{constructor(){this._tap=new Rc({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(P,ne,we){if(!this._swipePoint)if(this._tapTime){const Se=ne[0],Re=P.timeStamp-this._tapTime<500,ct=this._tapPoint.dist(Se)<30;Re&&ct?we.length>0&&(this._swipePoint=Se,this._swipeTouch=we[0].identifier):this.reset()}else this._tap.touchstart(P,ne,we)}touchmove(P,ne,we){if(this._tapTime){if(this._swipePoint){if(we[0].identifier!==this._swipeTouch)return;const Se=ne[0],Re=Se.y-this._swipePoint.y;return this._swipePoint=Se,P.preventDefault(),this._active=!0,{zoomDelta:Re/128}}}else this._tap.touchmove(P,ne,we)}touchend(P,ne,we){if(this._tapTime)this._swipePoint&&we.length===0&&this.reset();else{const Se=this._tap.touchend(P,ne,we);Se&&(this._tapTime=P.timeStamp,this._tapPoint=Se)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Dn{constructor(P,ne,we){this._el=P,this._mousePan=ne,this._touchPan=we}enable(P){this._inertiaOptions=P||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class ti{constructor(P,ne,we){this._pitchWithRotate=P.pitchWithRotate,this._mouseRotate=ne,this._mousePitch=we}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class yn{constructor(P,ne,we,Se){this._el=P,this._touchZoom=ne,this._touchRotate=we,this._tapDragZoom=Se,this._rotationDisabled=!1,this._enabled=!0}enable(P){this._touchZoom.enable(P),this._rotationDisabled||this._touchRotate.enable(P),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Gn{constructor(P,ne){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=P,this._options=ne,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const P=this._map.getCanvasContainer();P.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",P);let ne=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ne=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const we=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Se=document.createElement("div");Se.className="maplibregl-desktop-message",Se.textContent=ne,this._container.appendChild(Se);const Re=document.createElement("div");Re.className="maplibregl-mobile-message",Re.textContent=we,this._container.appendChild(Re),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(n.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(P){return P[this._bypassKey]}notifyGestureBlocked(P,ne){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:P,originalEvent:ne})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Mn=ze=>ze.zoom||ze.drag||ze.pitch||ze.rotate;class dn extends t.k{}function oi(ze){return ze.panDelta&&ze.panDelta.mag()||ze.zoomDelta||ze.bearingDelta||ze.pitchDelta}class Vi{constructor(P,ne){this.handleWindowEvent=Se=>{this.handleEvent(Se,`${Se.type}Window`)},this.handleEvent=(Se,Re)=>{if(Se.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const ct=Se.type==="renderFrame"?void 0:Se,_t={needsRenderFrame:!1},zt={},Qt={},fr=Se.touches,gr=fr?this._getMapTouches(fr):void 0,Br=gr?n.touchPos(this._map.getCanvas(),gr):n.mousePos(this._map.getCanvas(),Se);for(const{handlerName:Ye,handler:it,allowed:ht}of this._handlers){if(!it.isEnabled())continue;let St;this._blockedByActive(Qt,ht,Ye)?it.reset():it[Re||Se.type]&&(St=it[Re||Se.type](Se,Br,gr),this.mergeHandlerResult(_t,zt,St,Ye,ct),St&&St.needsRenderFrame&&this._triggerRenderFrame()),(St||it.isActive())&&(Qt[Ye]=it)}const ta={};for(const Ye in this._previousActiveHandlers)Qt[Ye]||(ta[Ye]=ct);this._previousActiveHandlers=Qt,(Object.keys(ta).length||oi(_t))&&(this._changes.push([_t,zt,ta]),this._triggerRenderFrame()),(Object.keys(Qt).length||oi(_t))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:Ve}=_t;Ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ve(this._map))},this._map=P,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Uc(P),this._bearingSnap=ne.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ne);const we=this._el;this._listeners=[[we,"touchstart",{passive:!0}],[we,"touchmove",{passive:!1}],[we,"touchend",void 0],[we,"touchcancel",void 0],[we,"mousedown",void 0],[we,"mousemove",void 0],[we,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[we,"mouseover",void 0],[we,"mouseout",void 0],[we,"dblclick",void 0],[we,"click",void 0],[we,"keydown",{capture:!1}],[we,"keyup",void 0],[we,"wheel",{passive:!1}],[we,"contextmenu",void 0],[window,"blur",void 0]];for(const[Se,Re,ct]of this._listeners)n.addEventListener(Se,Re,Se===document?this.handleWindowEvent:this.handleEvent,ct)}destroy(){for(const[P,ne,we]of this._listeners)n.removeEventListener(P,ne,P===document?this.handleWindowEvent:this.handleEvent,we)}_addDefaultHandlers(P){const ne=this._map,we=ne.getCanvasContainer();this._add("mapEvent",new Tc(ne,P));const Se=ne.boxZoom=new Cu(ne,P);this._add("boxZoom",Se),P.interactive&&P.boxZoom&&Se.enable();const Re=ne.cooperativeGestures=new Gn(ne,P.cooperativeGestures);this._add("cooperativeGestures",Re),P.cooperativeGestures&&Re.enable();const ct=new fc(ne),_t=new Ya(ne);ne.doubleClickZoom=new Ja(_t,ct),this._add("tapZoom",ct),this._add("clickZoom",_t),P.interactive&&P.doubleClickZoom&&ne.doubleClickZoom.enable();const zt=new kn;this._add("tapDragZoom",zt);const Qt=ne.touchPitch=new tf(ne);this._add("touchPitch",Qt),P.interactive&&P.touchPitch&&ne.touchPitch.enable(P.touchPitch);const fr=Gl(P),gr=uf(P);ne.dragRotate=new ti(P,fr,gr),this._add("mouseRotate",fr,["mousePitch"]),this._add("mousePitch",gr,["mouseRotate"]),P.interactive&&P.dragRotate&&ne.dragRotate.enable();const Br=(({enable:St,clickTolerance:yt})=>{const Lt=new Nu({checkCorrectEvent:nr=>n.mouseButton(nr)===0&&!nr.ctrlKey});return new xu({clickTolerance:yt,move:(nr,cr)=>({around:cr,panDelta:cr.sub(nr)}),activateOnStart:!0,moveStateManager:Lt,enable:St,assignEvents:Pf})})(P),ta=new bu(P,ne);ne.dragPan=new Dn(we,Br,ta),this._add("mousePan",Br),this._add("touchPan",ta,["touchZoom","touchRotate"]),P.interactive&&P.dragPan&&ne.dragPan.enable(P.dragPan);const Ve=new hc,Ye=new eu;ne.touchZoomRotate=new yn(we,Ye,Ve,zt),this._add("touchRotate",Ve,["touchPan","touchZoom"]),this._add("touchZoom",Ye,["touchPan","touchRotate"]),P.interactive&&P.touchZoomRotate&&ne.touchZoomRotate.enable(P.touchZoomRotate);const it=ne.scrollZoom=new pa(ne,()=>this._triggerRenderFrame());this._add("scrollZoom",it,["mousePan"]),P.interactive&&P.scrollZoom&&ne.scrollZoom.enable(P.scrollZoom);const ht=ne.keyboard=new yr(ne);this._add("keyboard",ht),P.interactive&&P.keyboard&&ne.keyboard.enable(),this._add("blockableMapEvent",new Js(ne))}_add(P,ne,we){this._handlers.push({handlerName:P,handler:ne,allowed:we}),this._handlersById[P]=ne}stop(P){if(!this._updatingCamera){for(const{handler:ne}of this._handlers)ne.reset();this._inertia.clear(),this._fireEvents({},{},P),this._changes=[]}}isActive(){for(const{handler:P}of this._handlers)if(P.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Mn(this._eventsInProgress)||this.isZooming()}_blockedByActive(P,ne,we){for(const Se in P)if(Se!==we&&(!ne||ne.indexOf(Se)<0))return!0;return!1}_getMapTouches(P){const ne=[];for(const we of P)this._el.contains(we.target)&&ne.push(we);return ne}mergeHandlerResult(P,ne,we,Se,Re){if(!we)return;t.e(P,we);const ct={handlerName:Se,originalEvent:we.originalEvent||Re};we.zoomDelta!==void 0&&(ne.zoom=ct),we.panDelta!==void 0&&(ne.drag=ct),we.pitchDelta!==void 0&&(ne.pitch=ct),we.bearingDelta!==void 0&&(ne.rotate=ct)}_applyChanges(){const P={},ne={},we={};for(const[Se,Re,ct]of this._changes)Se.panDelta&&(P.panDelta=(P.panDelta||new t.P(0,0))._add(Se.panDelta)),Se.zoomDelta&&(P.zoomDelta=(P.zoomDelta||0)+Se.zoomDelta),Se.bearingDelta&&(P.bearingDelta=(P.bearingDelta||0)+Se.bearingDelta),Se.pitchDelta&&(P.pitchDelta=(P.pitchDelta||0)+Se.pitchDelta),Se.around!==void 0&&(P.around=Se.around),Se.pinchAround!==void 0&&(P.pinchAround=Se.pinchAround),Se.noInertia&&(P.noInertia=Se.noInertia),t.e(ne,Re),t.e(we,ct);this._updateMapTransform(P,ne,we),this._changes=[]}_updateMapTransform(P,ne,we){const Se=this._map,Re=Se._getTransformForUpdate(),ct=Se.terrain;if(!(oi(P)||ct&&this._terrainMovement))return this._fireEvents(ne,we,!0);let{panDelta:_t,zoomDelta:zt,bearingDelta:Qt,pitchDelta:fr,around:gr,pinchAround:Br}=P;Br!==void 0&&(gr=Br),Se._stop(!0),gr=gr||Se.transform.centerPoint;const ta=Re.pointLocation(_t?gr.sub(_t):gr);Qt&&(Re.bearing+=Qt),fr&&(Re.pitch+=fr),zt&&(Re.zoom+=zt),ct?this._terrainMovement||!ne.drag&&!ne.zoom?ne.drag&&this._terrainMovement?Re.center=Re.pointLocation(Re.centerPoint.sub(_t)):Re.setLocationAtPoint(ta,gr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Re.setLocationAtPoint(ta,gr)):Re.setLocationAtPoint(ta,gr),Se._applyUpdatedTransform(Re),this._map._update(),P.noInertia||this._inertia.record(P),this._fireEvents(ne,we,!0)}_fireEvents(P,ne,we){const Se=Mn(this._eventsInProgress),Re=Mn(P),ct={};for(const gr in P){const{originalEvent:Br}=P[gr];this._eventsInProgress[gr]||(ct[`${gr}start`]=Br),this._eventsInProgress[gr]=P[gr]}!Se&&Re&&this._fireEvent("movestart",Re.originalEvent);for(const gr in ct)this._fireEvent(gr,ct[gr]);Re&&this._fireEvent("move",Re.originalEvent);for(const gr in P){const{originalEvent:Br}=P[gr];this._fireEvent(gr,Br)}const _t={};let zt;for(const gr in this._eventsInProgress){const{handlerName:Br,originalEvent:ta}=this._eventsInProgress[gr];this._handlersById[Br].isActive()||(delete this._eventsInProgress[gr],zt=ne[Br]||ta,_t[`${gr}end`]=zt)}for(const gr in _t)this._fireEvent(gr,_t[gr]);const Qt=Mn(this._eventsInProgress),fr=(Se||Re)&&!Qt;if(fr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const gr=this._map._getTransformForUpdate();gr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(gr)}if(we&&fr){this._updatingCamera=!0;const gr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Br=ta=>ta!==0&&-this._bearingSnap<ta&&ta<this._bearingSnap;!gr||!gr.essential&&i.prefersReducedMotion?(this._map.fire(new t.k("moveend",{originalEvent:zt})),Br(this._map.getBearing())&&this._map.resetNorth()):(Br(gr.bearing||this._map.getBearing())&&(gr.bearing=0),gr.freezeElevation=!0,this._map.easeTo(gr,{originalEvent:zt})),this._updatingCamera=!1}}_fireEvent(P,ne){this._map.fire(new t.k(P,ne?{originalEvent:ne}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(P=>{delete this._frameId,this.handleEvent(new dn("renderFrame",{timeStamp:P})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class zi extends t.E{constructor(P,ne){super(),this._renderFrameCallback=()=>{const we=Math.min((i.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(we)),we<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=P,this._bearingSnap=ne.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(P,ne){return this.jumpTo({center:P},ne)}panBy(P,ne,we){return P=t.P.convert(P).mult(-1),this.panTo(this.transform.center,t.e({offset:P},ne),we)}panTo(P,ne,we){return this.easeTo(t.e({center:P},ne),we)}getZoom(){return this.transform.zoom}setZoom(P,ne){return this.jumpTo({zoom:P},ne),this}zoomTo(P,ne,we){return this.easeTo(t.e({zoom:P},ne),we)}zoomIn(P,ne){return this.zoomTo(this.getZoom()+1,P,ne),this}zoomOut(P,ne){return this.zoomTo(this.getZoom()-1,P,ne),this}getBearing(){return this.transform.bearing}setBearing(P,ne){return this.jumpTo({bearing:P},ne),this}getPadding(){return this.transform.padding}setPadding(P,ne){return this.jumpTo({padding:P},ne),this}rotateTo(P,ne,we){return this.easeTo(t.e({bearing:P},ne),we)}resetNorth(P,ne){return this.rotateTo(0,t.e({duration:1e3},P),ne),this}resetNorthPitch(P,ne){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},P),ne),this}snapToNorth(P,ne){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(P,ne):this}getPitch(){return this.transform.pitch}setPitch(P,ne){return this.jumpTo({pitch:P},ne),this}cameraForBounds(P,ne){P=ae.convert(P).adjustAntiMeridian();const we=ne&&ne.bearing||0;return this._cameraForBoxAndBearing(P.getNorthWest(),P.getSouthEast(),we,ne)}_cameraForBoxAndBearing(P,ne,we,Se){const Re={top:0,bottom:0,right:0,left:0};if(typeof(Se=t.e({padding:Re,offset:[0,0],maxZoom:this.transform.maxZoom},Se)).padding=="number"){const ca=Se.padding;Se.padding={top:ca,bottom:ca,right:ca,left:ca}}Se.padding=t.e(Re,Se.padding);const ct=this.transform,_t=ct.padding,zt=new ae(P,ne),Qt=ct.project(zt.getNorthWest()),fr=ct.project(zt.getNorthEast()),gr=ct.project(zt.getSouthEast()),Br=ct.project(zt.getSouthWest()),ta=t.ba(-we),Ve=Qt.rotate(ta),Ye=fr.rotate(ta),it=gr.rotate(ta),ht=Br.rotate(ta),St=new t.P(Math.max(Ve.x,Ye.x,ht.x,it.x),Math.max(Ve.y,Ye.y,ht.y,it.y)),yt=new t.P(Math.min(Ve.x,Ye.x,ht.x,it.x),Math.min(Ve.y,Ye.y,ht.y,it.y)),Lt=St.sub(yt),nr=(ct.width-(_t.left+_t.right+Se.padding.left+Se.padding.right))/Lt.x,cr=(ct.height-(_t.top+_t.bottom+Se.padding.top+Se.padding.bottom))/Lt.y;if(cr<0||nr<0)return void t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const mr=Math.min(ct.scaleZoom(ct.scale*Math.min(nr,cr)),Se.maxZoom),Pr=t.P.convert(Se.offset),Vr=new t.P((Se.padding.left-Se.padding.right)/2,(Se.padding.top-Se.padding.bottom)/2).rotate(t.ba(we)),oa=Pr.add(Vr).mult(ct.scale/ct.zoomScale(mr));return{center:ct.unproject(Qt.add(gr).div(2).sub(oa)),zoom:mr,bearing:we}}fitBounds(P,ne,we){return this._fitInternal(this.cameraForBounds(P,ne),ne,we)}fitScreenCoordinates(P,ne,we,Se,Re){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.P.convert(P)),this.transform.pointLocation(t.P.convert(ne)),we,Se),Se,Re)}_fitInternal(P,ne,we){return P?(delete(ne=t.e(P,ne)).padding,ne.linear?this.easeTo(ne,we):this.flyTo(ne,we)):this}jumpTo(P,ne){this.stop();const we=this._getTransformForUpdate();let Se=!1,Re=!1,ct=!1;return"zoom"in P&&we.zoom!==+P.zoom&&(Se=!0,we.zoom=+P.zoom),P.center!==void 0&&(we.center=t.N.convert(P.center)),"bearing"in P&&we.bearing!==+P.bearing&&(Re=!0,we.bearing=+P.bearing),"pitch"in P&&we.pitch!==+P.pitch&&(ct=!0,we.pitch=+P.pitch),P.padding==null||we.isPaddingEqual(P.padding)||(we.padding=P.padding),this._applyUpdatedTransform(we),this.fire(new t.k("movestart",ne)).fire(new t.k("move",ne)),Se&&this.fire(new t.k("zoomstart",ne)).fire(new t.k("zoom",ne)).fire(new t.k("zoomend",ne)),Re&&this.fire(new t.k("rotatestart",ne)).fire(new t.k("rotate",ne)).fire(new t.k("rotateend",ne)),ct&&this.fire(new t.k("pitchstart",ne)).fire(new t.k("pitch",ne)).fire(new t.k("pitchend",ne)),this.fire(new t.k("moveend",ne))}calculateCameraOptionsFromTo(P,ne,we,Se=0){const Re=t.Z.fromLngLat(P,ne),ct=t.Z.fromLngLat(we,Se),_t=ct.x-Re.x,zt=ct.y-Re.y,Qt=ct.z-Re.z,fr=Math.hypot(_t,zt,Qt);if(fr===0)throw new Error("Can't calculate camera options with same From and To");const gr=Math.hypot(_t,zt),Br=this.transform.scaleZoom(this.transform.cameraToCenterDistance/fr/this.transform.tileSize),ta=180*Math.atan2(_t,-zt)/Math.PI;let Ve=180*Math.acos(gr/fr)/Math.PI;return Ve=Qt<0?90-Ve:90+Ve,{center:ct.toLngLat(),zoom:Br,pitch:Ve,bearing:ta}}easeTo(P,ne){var we;this._stop(!1,P.easeId),((P=t.e({offset:[0,0],duration:500,easing:t.b9},P)).animate===!1||!P.essential&&i.prefersReducedMotion)&&(P.duration=0);const Se=this._getTransformForUpdate(),Re=Se.zoom,ct=Se.bearing,_t=Se.pitch,zt=Se.padding,Qt="bearing"in P?this._normalizeBearing(P.bearing,ct):ct,fr="pitch"in P?+P.pitch:_t,gr="padding"in P?P.padding:Se.padding,Br=t.P.convert(P.offset);let ta=Se.centerPoint.add(Br);const Ve=Se.pointLocation(ta),{center:Ye,zoom:it}=Se.getConstrained(t.N.convert(P.center||Ve),(we=P.zoom)!==null&&we!==void 0?we:Re);this._normalizeCenter(Ye,Se);const ht=Se.project(Ve),St=Se.project(Ye).sub(ht),yt=Se.zoomScale(it-Re);let Lt,nr;P.around&&(Lt=t.N.convert(P.around),nr=Se.locationPoint(Lt));const cr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||it!==Re,this._rotating=this._rotating||ct!==Qt,this._pitching=this._pitching||fr!==_t,this._padding=!Se.isPaddingEqual(gr),this._easeId=P.easeId,this._prepareEase(ne,P.noMoveStart,cr),this.terrain&&this._prepareElevation(Ye),this._ease(mr=>{if(this._zooming&&(Se.zoom=t.y.number(Re,it,mr)),this._rotating&&(Se.bearing=t.y.number(ct,Qt,mr)),this._pitching&&(Se.pitch=t.y.number(_t,fr,mr)),this._padding&&(Se.interpolatePadding(zt,gr,mr),ta=Se.centerPoint.add(Br)),this.terrain&&!P.freezeElevation&&this._updateElevation(mr),Lt)Se.setLocationAtPoint(Lt,nr);else{const Pr=Se.zoomScale(Se.zoom-Re),Vr=it>Re?Math.min(2,yt):Math.max(.5,yt),oa=Math.pow(Vr,1-mr),ca=Se.unproject(ht.add(St.mult(mr*oa)).mult(Pr));Se.setLocationAtPoint(Se.renderWorldCopies?ca.wrap():ca,ta)}this._applyUpdatedTransform(Se),this._fireMoveEvents(ne)},mr=>{this.terrain&&P.freezeElevation&&this._finalizeElevation(),this._afterEase(ne,mr)},P),this}_prepareEase(P,ne,we={}){this._moving=!0,ne||we.moving||this.fire(new t.k("movestart",P)),this._zooming&&!we.zooming&&this.fire(new t.k("zoomstart",P)),this._rotating&&!we.rotating&&this.fire(new t.k("rotatestart",P)),this._pitching&&!we.pitching&&this.fire(new t.k("pitchstart",P))}_prepareElevation(P){this._elevationCenter=P,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(P,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(P){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const ne=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(P<1&&ne!==this._elevationTarget){const we=this._elevationTarget-this._elevationStart;this._elevationStart+=P*(we-(ne-(we*P+this._elevationStart))/(1-P)),this._elevationTarget=ne}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,P)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(P){const ne=P.getCameraPosition(),we=this.terrain.getElevationForLngLatZoom(ne.lngLat,P.zoom);if(ne.altitude<we){const Se=this.calculateCameraOptionsFromTo(ne.lngLat,we,P.center,P.elevation);return{pitch:Se.pitch,zoom:Se.zoom}}return{}}_applyUpdatedTransform(P){const ne=[];if(this.terrain&&ne.push(Se=>this._elevateCameraIfInsideTerrain(Se)),this.transformCameraUpdate&&ne.push(Se=>this.transformCameraUpdate(Se)),!ne.length)return;const we=P.clone();for(const Se of ne){const Re=we.clone(),{center:ct,zoom:_t,pitch:zt,bearing:Qt,elevation:fr}=Se(Re);ct&&(Re.center=ct),_t!==void 0&&(Re.zoom=_t),zt!==void 0&&(Re.pitch=zt),Qt!==void 0&&(Re.bearing=Qt),fr!==void 0&&(Re.elevation=fr),we.apply(Re)}this.transform.apply(we)}_fireMoveEvents(P){this.fire(new t.k("move",P)),this._zooming&&this.fire(new t.k("zoom",P)),this._rotating&&this.fire(new t.k("rotate",P)),this._pitching&&this.fire(new t.k("pitch",P))}_afterEase(P,ne){if(this._easeId&&ne&&this._easeId===ne)return;delete this._easeId;const we=this._zooming,Se=this._rotating,Re=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,we&&this.fire(new t.k("zoomend",P)),Se&&this.fire(new t.k("rotateend",P)),Re&&this.fire(new t.k("pitchend",P)),this.fire(new t.k("moveend",P))}flyTo(P,ne){var we;if(!P.essential&&i.prefersReducedMotion){const Ln=t.M(P,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ln,ne)}this.stop(),P=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},P);const Se=this._getTransformForUpdate(),Re=Se.zoom,ct=Se.bearing,_t=Se.pitch,zt=Se.padding,Qt="bearing"in P?this._normalizeBearing(P.bearing,ct):ct,fr="pitch"in P?+P.pitch:_t,gr="padding"in P?P.padding:Se.padding,Br=t.P.convert(P.offset);let ta=Se.centerPoint.add(Br);const Ve=Se.pointLocation(ta),{center:Ye,zoom:it}=Se.getConstrained(t.N.convert(P.center||Ve),(we=P.zoom)!==null&&we!==void 0?we:Re);this._normalizeCenter(Ye,Se);const ht=Se.zoomScale(it-Re),St=Se.project(Ve),yt=Se.project(Ye).sub(St);let Lt=P.curve;const nr=Math.max(Se.width,Se.height),cr=nr/ht,mr=yt.mag();if("minZoom"in P){const Ln=t.ac(Math.min(P.minZoom,Re,it),Se.minZoom,Se.maxZoom),ui=nr/Se.zoomScale(Ln-Re);Lt=Math.sqrt(ui/mr*2)}const Pr=Lt*Lt;function Vr(Ln){const ui=(cr*cr-nr*nr+(Ln?-1:1)*Pr*Pr*mr*mr)/(2*(Ln?cr:nr)*Pr*mr);return Math.log(Math.sqrt(ui*ui+1)-ui)}function oa(Ln){return(Math.exp(Ln)-Math.exp(-Ln))/2}function ca(Ln){return(Math.exp(Ln)+Math.exp(-Ln))/2}const Aa=Vr(!1);let $a=function(Ln){return ca(Aa)/ca(Aa+Lt*Ln)},Cn=function(Ln){return nr*((ca(Aa)*(oa(ui=Aa+Lt*Ln)/ca(ui))-oa(Aa))/Pr)/mr;var ui},wn=(Vr(!0)-Aa)/Lt;if(Math.abs(mr)<1e-6||!isFinite(wn)){if(Math.abs(nr-cr)<1e-6)return this.easeTo(P,ne);const Ln=cr<nr?-1:1;wn=Math.abs(Math.log(cr/nr))/Lt,Cn=()=>0,$a=ui=>Math.exp(Ln*Lt*ui)}return P.duration="duration"in P?+P.duration:1e3*wn/("screenSpeed"in P?+P.screenSpeed/Lt:+P.speed),P.maxDuration&&P.duration>P.maxDuration&&(P.duration=0),this._zooming=!0,this._rotating=ct!==Qt,this._pitching=fr!==_t,this._padding=!Se.isPaddingEqual(gr),this._prepareEase(ne,!1),this.terrain&&this._prepareElevation(Ye),this._ease(Ln=>{const ui=Ln*wn,Mi=1/$a(ui);Se.zoom=Ln===1?it:Re+Se.scaleZoom(Mi),this._rotating&&(Se.bearing=t.y.number(ct,Qt,Ln)),this._pitching&&(Se.pitch=t.y.number(_t,fr,Ln)),this._padding&&(Se.interpolatePadding(zt,gr,Ln),ta=Se.centerPoint.add(Br)),this.terrain&&!P.freezeElevation&&this._updateElevation(Ln);const xi=Ln===1?Ye:Se.unproject(St.add(yt.mult(Cn(ui))).mult(Mi));Se.setLocationAtPoint(Se.renderWorldCopies?xi.wrap():xi,ta),this._applyUpdatedTransform(Se),this._fireMoveEvents(ne)},()=>{this.terrain&&P.freezeElevation&&this._finalizeElevation(),this._afterEase(ne)},P),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(P,ne){var we;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const Se=this._onEaseEnd;delete this._onEaseEnd,Se.call(this,ne)}return P||(we=this.handlers)===null||we===void 0||we.stop(!1),this}_ease(P,ne,we){we.animate===!1||we.duration===0?(P(1),ne()):(this._easeStart=i.now(),this._easeOptions=we,this._onEaseFrame=P,this._onEaseEnd=ne,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(P,ne){P=t.b3(P,-180,180);const we=Math.abs(P-ne);return Math.abs(P-360-ne)<we&&(P-=360),Math.abs(P+360-ne)<we&&(P+=360),P}_normalizeCenter(P,ne){if(!ne.renderWorldCopies||ne.lngRange)return;const we=P.lng-ne.center.lng;P.lng+=we>180?-360:we<-180?360:0}queryTerrainElevation(P){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(P),this.transform.tileZoom)-this.transform.elevation:null}}const Zi={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Hi{constructor(P=Zi){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=ne=>{!ne||ne.sourceDataType!=="metadata"&&ne.sourceDataType!=="visibility"&&ne.dataType!=="style"&&ne.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=P}getDefaultPosition(){return"bottom-right"}onAdd(P){return this._map=P,this._compact=this.options.compact,this._container=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(P,ne){const we=this._map._getUIString(`AttributionControl.${ne}`);P.title=we,P.setAttribute("aria-label",we)}_updateAttributions(){if(!this._map.style)return;let P=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?P=P.concat(this.options.customAttribution.map(Se=>typeof Se!="string"?"":Se)):typeof this.options.customAttribution=="string"&&P.push(this.options.customAttribution)),this._map.style.stylesheet){const Se=this._map.style.stylesheet;this.styleOwner=Se.owner,this.styleId=Se.id}const ne=this._map.style.sourceCaches;for(const Se in ne){const Re=ne[Se];if(Re.used||Re.usedForTerrain){const ct=Re.getSource();ct.attribution&&P.indexOf(ct.attribution)<0&&P.push(ct.attribution)}}P=P.filter(Se=>String(Se).trim()),P.sort((Se,Re)=>Se.length-Re.length),P=P.filter((Se,Re)=>{for(let ct=Re+1;ct<P.length;ct++)if(P[ct].indexOf(Se)>=0)return!1;return!0});const we=P.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,P.length?(this._innerContainer.innerHTML=we,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class li{constructor(P={}){this._updateCompact=()=>{const ne=this._container.children;if(ne.length){const we=ne[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&we.classList.add("maplibregl-compact"):we.classList.remove("maplibregl-compact")}},this.options=P}getDefaultPosition(){return"bottom-left"}onAdd(P){this._map=P,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const ne=n.create("a","maplibregl-ctrl-logo");return ne.target="_blank",ne.rel="noopener nofollow",ne.href="https://maplibre.org/",ne.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ne.setAttribute("rel","noopener nofollow"),this._container.appendChild(ne),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){n.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Yn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(P){const ne=++this._id;return this._queue.push({callback:P,id:ne,cancelled:!1}),ne}remove(P){const ne=this._currentlyRunning,we=ne?this._queue.concat(ne):this._queue;for(const Se of we)if(Se.id===P)return void(Se.cancelled=!0)}run(P=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const ne=this._currentlyRunning=this._queue;this._queue=[];for(const we of ne)if(!we.cancelled&&(we.callback(P),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var oo=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class No extends t.E{constructor(P){super(),this.sourceCache=P,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,P.usedForTerrain=!0,P.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(P,ne){this.sourceCache.update(P,ne),this._renderableTilesKeys=[];const we={};for(const Se of P.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ne}))we[Se.key]=!0,this._renderableTilesKeys.push(Se.key),this._tiles[Se.key]||(Se.posMatrix=new Float64Array(16),t.aP(Se.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Se.key]=new nt(Se,this.tileSize));for(const Se in this._tiles)we[Se]||delete this._tiles[Se]}freeRtt(P){for(const ne in this._tiles){const we=this._tiles[ne];(!P||we.tileID.equals(P)||we.tileID.isChildOf(P)||P.isChildOf(we.tileID))&&(we.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(P=>this.getTileByID(P))}getTileByID(P){return this._tiles[P]}getTerrainCoords(P){const ne={};for(const we of this._renderableTilesKeys){const Se=this._tiles[we].tileID;if(Se.canonical.equals(P.canonical)){const Re=P.clone();Re.posMatrix=new Float64Array(16),t.aP(Re.posMatrix,0,t.X,0,t.X,0,1),ne[we]=Re}else if(Se.canonical.isChildOf(P.canonical)){const Re=P.clone();Re.posMatrix=new Float64Array(16);const ct=Se.canonical.z-P.canonical.z,_t=Se.canonical.x-(Se.canonical.x>>ct<<ct),zt=Se.canonical.y-(Se.canonical.y>>ct<<ct),Qt=t.X>>ct;t.aP(Re.posMatrix,0,Qt,0,Qt,0,1),t.J(Re.posMatrix,Re.posMatrix,[-_t*Qt,-zt*Qt,0]),ne[we]=Re}else if(P.canonical.isChildOf(Se.canonical)){const Re=P.clone();Re.posMatrix=new Float64Array(16);const ct=P.canonical.z-Se.canonical.z,_t=P.canonical.x-(P.canonical.x>>ct<<ct),zt=P.canonical.y-(P.canonical.y>>ct<<ct),Qt=t.X>>ct;t.aP(Re.posMatrix,0,t.X,0,t.X,0,1),t.J(Re.posMatrix,Re.posMatrix,[_t*Qt,zt*Qt,0]),t.K(Re.posMatrix,Re.posMatrix,[1/2**ct,1/2**ct,0]),ne[we]=Re}}return ne}getSourceTile(P,ne){const we=this.sourceCache._source;let Se=P.overscaledZ-this.deltaZoom;if(Se>we.maxzoom&&(Se=we.maxzoom),Se<we.minzoom)return null;this._sourceTileCache[P.key]||(this._sourceTileCache[P.key]=P.scaledTo(Se).key);let Re=this.sourceCache.getTileByID(this._sourceTileCache[P.key]);if((!Re||!Re.dem)&&ne)for(;Se>=we.minzoom&&(!Re||!Re.dem);)Re=this.sourceCache.getTileByID(P.scaledTo(Se--).key);return Re}tilesAfterTime(P=Date.now()){return Object.values(this._tiles).filter(ne=>ne.timeAdded>=P)}}class _s{constructor(P,ne,we){this.painter=P,this.sourceCache=new No(ne),this.options=we,this.exaggeration=typeof we.exaggeration=="number"?we.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(P,ne,we,Se=t.X){var Re;if(!(ne>=0&&ne<Se&&we>=0&&we<Se))return 0;const ct=this.getTerrainData(P),_t=(Re=ct.tile)===null||Re===void 0?void 0:Re.dem;if(!_t)return 0;const zt=(function(Ve,Ye,it){var ht=Ye[0],St=Ye[1];return Ve[0]=it[0]*ht+it[4]*St+it[12],Ve[1]=it[1]*ht+it[5]*St+it[13],Ve})([],[ne/Se*t.X,we/Se*t.X],ct.u_terrain_matrix),Qt=[zt[0]*_t.dim,zt[1]*_t.dim],fr=Math.floor(Qt[0]),gr=Math.floor(Qt[1]),Br=Qt[0]-fr,ta=Qt[1]-gr;return _t.get(fr,gr)*(1-Br)*(1-ta)+_t.get(fr+1,gr)*Br*(1-ta)+_t.get(fr,gr+1)*(1-Br)*ta+_t.get(fr+1,gr+1)*Br*ta}getElevationForLngLatZoom(P,ne){if(!t.bb(ne,P.wrap()))return 0;const{tileID:we,mercatorX:Se,mercatorY:Re}=this._getOverscaledTileIDFromLngLatZoom(P,ne);return this.getElevation(we,Se%t.X,Re%t.X,t.X)}getElevation(P,ne,we,Se=t.X){return this.getDEMElevation(P,ne,we,Se)*this.exaggeration}getTerrainData(P){if(!this._emptyDemTexture){const Se=this.painter.context,Re=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new u(Se,Re,Se.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new u(Se,new t.R({width:1,height:1}),Se.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.an([])}const ne=this.sourceCache.getSourceTile(P,!0);if(ne&&ne.dem&&(!ne.demTexture||ne.needsTerrainPrepare)){const Se=this.painter.context;ne.demTexture=this.painter.getTileTexture(ne.dem.stride),ne.demTexture?ne.demTexture.update(ne.dem.getPixels(),{premultiply:!1}):ne.demTexture=new u(Se,ne.dem.getPixels(),Se.gl.RGBA,{premultiply:!1}),ne.demTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),ne.needsTerrainPrepare=!1}const we=ne&&ne+ne.tileID.key+P.key;if(we&&!this._demMatrixCache[we]){const Se=this.sourceCache.sourceCache._source.maxzoom;let Re=P.canonical.z-ne.tileID.canonical.z;P.overscaledZ>P.canonical.z&&(P.canonical.z>=Se?Re=P.canonical.z-Se:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const ct=P.canonical.x-(P.canonical.x>>Re<<Re),_t=P.canonical.y-(P.canonical.y>>Re<<Re),zt=t.bc(new Float64Array(16),[1/(t.X<<Re),1/(t.X<<Re),0]);t.J(zt,zt,[ct*t.X,_t*t.X,0]),this._demMatrixCache[P.key]={matrix:zt,coord:P}}return{u_depth:2,u_terrain:3,u_terrain_dim:ne&&ne.dem&&ne.dem.dim||1,u_terrain_matrix:we?this._demMatrixCache[P.key].matrix:this._emptyDemMatrix,u_terrain_unpack:ne&&ne.dem&&ne.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(ne&&ne.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:ne}}getFramebuffer(P){const ne=this.painter,we=ne.width/devicePixelRatio,Se=ne.height/devicePixelRatio;return!this._fbo||this._fbo.width===we&&this._fbo.height===Se||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new u(ne.context,{width:we,height:Se,data:null},ne.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(ne.context.gl.NEAREST,ne.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new u(ne.context,{width:we,height:Se,data:null},ne.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(ne.context.gl.NEAREST,ne.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=ne.context.createFramebuffer(we,Se,!0,!1),this._fbo.depthAttachment.set(ne.context.createRenderbuffer(ne.context.gl.DEPTH_COMPONENT16,we,Se))),this._fbo.colorAttachment.set(P==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const P=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const ne=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let Re=0,ct=0;Re<this._coordsTextureSize;Re++)for(let _t=0;_t<this._coordsTextureSize;_t++,ct+=4)ne[ct+0]=255&_t,ne[ct+1]=255&Re,ne[ct+2]=_t>>8<<4|Re>>8,ne[ct+3]=0;const we=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ne.buffer)),Se=new u(P,we,P.gl.RGBA,{premultiply:!1});return Se.bind(P.gl.NEAREST,P.gl.CLAMP_TO_EDGE),this._coordsTexture=Se,Se}pointCoordinate(P){this.painter.maybeDrawDepthAndCoords(!0);const ne=new Uint8Array(4),we=this.painter.context,Se=we.gl,Re=Math.round(P.x*this.painter.pixelRatio/devicePixelRatio),ct=Math.round(P.y*this.painter.pixelRatio/devicePixelRatio),_t=Math.round(this.painter.height/devicePixelRatio);we.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Se.readPixels(Re,_t-ct-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ne),we.bindFramebuffer.set(null);const zt=ne[0]+(ne[2]>>4<<8),Qt=ne[1]+((15&ne[2])<<8),fr=this.coordsIndex[255-ne[3]],gr=fr&&this.sourceCache.getTileByID(fr);if(!gr)return null;const Br=this._coordsTextureSize,ta=(1<<gr.tileID.canonical.z)*Br;return new t.Z((gr.tileID.canonical.x*Br+zt)/ta+gr.tileID.wrap,(gr.tileID.canonical.y*Br+Qt)/ta,this.getElevation(gr.tileID,zt,Qt,Br))}depthAtPoint(P){const ne=new Uint8Array(4),we=this.painter.context,Se=we.gl;return we.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Se.readPixels(P.x,this.painter.height/devicePixelRatio-P.y-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ne),we.bindFramebuffer.set(null),(ne[0]/16777216+ne[1]/65536+ne[2]/256+ne[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const P=this.painter.context,ne=new t.bd,we=new t.aY,Se=this.meshSize,Re=t.X/Se,ct=Se*Se;for(let gr=0;gr<=Se;gr++)for(let Br=0;Br<=Se;Br++)ne.emplaceBack(Br*Re,gr*Re,0);for(let gr=0;gr<ct;gr+=Se+1)for(let Br=0;Br<Se;Br++)we.emplaceBack(Br+gr,Se+Br+gr+1,Se+Br+gr+2),we.emplaceBack(Br+gr,Se+Br+gr+2,Br+gr+1);const _t=ne.length,zt=_t+2*(Se+1);for(const gr of[0,1])for(let Br=0;Br<=Se;Br++)for(const ta of[0,1])ne.emplaceBack(Br*Re,gr*t.X,ta);for(let gr=0;gr<2*Se;gr+=2)we.emplaceBack(zt+gr,zt+gr+1,zt+gr+3),we.emplaceBack(zt+gr,zt+gr+3,zt+gr+2),we.emplaceBack(_t+gr,_t+gr+3,_t+gr+1),we.emplaceBack(_t+gr,_t+gr+2,_t+gr+3);const Qt=ne.length,fr=Qt+2*(Se+1);for(const gr of[0,1])for(let Br=0;Br<=Se;Br++)for(const ta of[0,1])ne.emplaceBack(gr*t.X,Br*Re,ta);for(let gr=0;gr<2*Se;gr+=2)we.emplaceBack(Qt+gr,Qt+gr+1,Qt+gr+3),we.emplaceBack(Qt+gr,Qt+gr+3,Qt+gr+2),we.emplaceBack(fr+gr,fr+gr+3,fr+gr+1),we.emplaceBack(fr+gr,fr+gr+2,fr+gr+3);return this._mesh=new uu(P.createVertexBuffer(ne,oo.members),P.createIndexBuffer(we),t.a0.simpleSegment(0,0,ne.length,we.length)),this._mesh}getMeshFrameDelta(P){return 2*Math.PI*t.be/Math.pow(2,P)/5}getMinTileElevationForLngLatZoom(P,ne){var we;const{tileID:Se}=this._getOverscaledTileIDFromLngLatZoom(P,ne);return(we=this.getMinMaxElevation(Se).minElevation)!==null&&we!==void 0?we:0}getMinMaxElevation(P){const ne=this.getTerrainData(P).tile,we={minElevation:null,maxElevation:null};return ne&&ne.dem&&(we.minElevation=ne.dem.min*this.exaggeration,we.maxElevation=ne.dem.max*this.exaggeration),we}_getOverscaledTileIDFromLngLatZoom(P,ne){const we=t.Z.fromLngLat(P.wrap()),Se=(1<<ne)*t.X,Re=we.x*Se,ct=we.y*Se,_t=Math.floor(Re/t.X),zt=Math.floor(ct/t.X);return{tileID:new t.S(ne,0,ne,_t,zt),mercatorX:Re,mercatorY:ct}}}class Gs{constructor(P,ne,we){this._context=P,this._size=ne,this._tileSize=we,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const P of this._objects)P.texture.destroy(),P.fbo.destroy()}_createObject(P){const ne=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),we=new u(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return we.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),ne.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),ne.colorAttachment.set(we.texture),{id:P,fbo:ne,texture:we,stamp:-1,inUse:!1}}getObjectForId(P){return this._objects[P]}useObject(P){P.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(ne=>P.id!==ne),this._recentlyUsed.push(P.id)}stampObject(P){P.stamp=++this._stamp}getOrCreateFreeObject(){for(const ne of this._recentlyUsed)if(!this._objects[ne].inUse)return this._objects[ne];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const P=this._createObject(this._objects.length);return this._objects.push(P),P}freeObject(P){P.inUse=!1}freeAllObjects(){for(const P of this._objects)this.freeObject(P)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(P=>!P.inUse)===!1}}const xs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Hs{constructor(P,ne){this.painter=P,this.terrain=ne,this.pool=new Gs(P.context,30,ne.sourceCache.tileSize*ne.qualityFactor)}destruct(){this.pool.destruct()}getTexture(P){return this.pool.getObjectForId(P.rtt[this._stacks.length-1].id).texture}prepareForRender(P,ne){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=P._order.filter(we=>!P._layers[we].isHidden(ne)),this._coordsDescendingInv={};for(const we in P.sourceCaches){this._coordsDescendingInv[we]={};const Se=P.sourceCaches[we].getVisibleCoordinates();for(const Re of Se){const ct=this.terrain.sourceCache.getTerrainCoords(Re);for(const _t in ct)this._coordsDescendingInv[we][_t]||(this._coordsDescendingInv[we][_t]=[]),this._coordsDescendingInv[we][_t].push(ct[_t])}}this._coordsDescendingInvStr={};for(const we of P._order){const Se=P._layers[we],Re=Se.source;if(xs[Se.type]&&!this._coordsDescendingInvStr[Re]){this._coordsDescendingInvStr[Re]={};for(const ct in this._coordsDescendingInv[Re])this._coordsDescendingInvStr[Re][ct]=this._coordsDescendingInv[Re][ct].map(_t=>_t.key).sort().join()}}for(const we of this._renderableTiles)for(const Se in this._coordsDescendingInvStr){const Re=this._coordsDescendingInvStr[Se][we.tileID.key];Re&&Re!==we.rttCoords[Se]&&(we.rtt=[])}}renderLayer(P){if(P.isHidden(this.painter.transform.zoom))return!1;const ne=P.type,we=this.painter,Se=this._renderableLayerIds[this._renderableLayerIds.length-1]===P.id;if(xs[ne]&&(this._prevType&&xs[this._prevType]||this._stacks.push([]),this._prevType=ne,this._stacks[this._stacks.length-1].push(P.id),!Se))return!0;if(xs[this._prevType]||xs[ne]&&Se){this._prevType=ne;const Re=this._stacks.length-1,ct=this._stacks[Re]||[];for(const _t of this._renderableTiles){if(this.pool.isFull()&&(ul(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(_t),_t.rtt[Re]){const Qt=this.pool.getObjectForId(_t.rtt[Re].id);if(Qt.stamp===_t.rtt[Re].stamp){this.pool.useObject(Qt);continue}}const zt=this.pool.getOrCreateFreeObject();this.pool.useObject(zt),this.pool.stampObject(zt),_t.rtt[Re]={id:zt.id,stamp:zt.stamp},we.context.bindFramebuffer.set(zt.fbo.framebuffer),we.context.clear({color:t.aM.transparent,stencil:0}),we.currentStencilSource=void 0;for(let Qt=0;Qt<ct.length;Qt++){const fr=we.style._layers[ct[Qt]],gr=fr.source?this._coordsDescendingInv[fr.source][_t.tileID.key]:[_t.tileID];we.context.viewport.set([0,0,zt.fbo.width,zt.fbo.height]),we._renderTileClippingMasks(fr,gr),we.renderLayer(we,we.style.sourceCaches[fr.source],fr,gr),fr.source&&(_t.rttCoords[fr.source]=this._coordsDescendingInvStr[fr.source][_t.tileID.key])}}return ul(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),xs[ne]}return!1}}const es={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},ml=r,dl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Zi,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:t.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ns=ze=>{ze.touchstart=ze.dragStart,ze.touchmoveWindow=ze.dragMove,ze.touchend=ze.dragEnd},Ti={showCompass:!0,showZoom:!0,visualizePitch:!1};class xo{constructor(P,ne,we=!1){this.mousedown=ct=>{this.startMouse(t.e({},ct,{ctrlKey:!0,preventDefault:()=>ct.preventDefault()}),n.mousePos(this.element,ct)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ct=>{this.moveMouse(ct,n.mousePos(this.element,ct))},this.mouseup=ct=>{this.mouseRotate.dragEnd(ct),this.mousePitch&&this.mousePitch.dragEnd(ct),this.offTemp()},this.touchstart=ct=>{ct.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,ct.targetTouches)[0],this.startTouch(ct,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=ct=>{ct.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,ct.targetTouches)[0],this.moveTouch(ct,this._lastPos))},this.touchend=ct=>{ct.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const Se=P.dragRotate._mouseRotate.getClickTolerance(),Re=P.dragRotate._mousePitch.getClickTolerance();this.element=ne,this.mouseRotate=Gl({clickTolerance:Se,enable:!0}),this.touchRotate=(({enable:ct,clickTolerance:_t,bearingDegreesPerPixelMoved:zt=.8})=>{const Qt=new zc;return new xu({clickTolerance:_t,move:(fr,gr)=>({bearingDelta:(gr.x-fr.x)*zt}),moveStateManager:Qt,enable:ct,assignEvents:Ns})})({clickTolerance:Se,enable:!0}),this.map=P,we&&(this.mousePitch=uf({clickTolerance:Re,enable:!0}),this.touchPitch=(({enable:ct,clickTolerance:_t,pitchDegreesPerPixelMoved:zt=-.5})=>{const Qt=new zc;return new xu({clickTolerance:_t,move:(fr,gr)=>({pitchDelta:(gr.y-fr.y)*zt}),moveStateManager:Qt,enable:ct,assignEvents:Ns})})({clickTolerance:Re,enable:!0})),n.addEventListener(ne,"mousedown",this.mousedown),n.addEventListener(ne,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(ne,"touchcancel",this.reset)}startMouse(P,ne){this.mouseRotate.dragStart(P,ne),this.mousePitch&&this.mousePitch.dragStart(P,ne),n.disableDrag()}startTouch(P,ne){this.touchRotate.dragStart(P,ne),this.touchPitch&&this.touchPitch.dragStart(P,ne),n.disableDrag()}moveMouse(P,ne){const we=this.map,{bearingDelta:Se}=this.mouseRotate.dragMove(P,ne)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.mousePitch){const{pitchDelta:Re}=this.mousePitch.dragMove(P,ne)||{};Re&&we.setPitch(we.getPitch()+Re)}}moveTouch(P,ne){const we=this.map,{bearingDelta:Se}=this.touchRotate.dragMove(P,ne)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.touchPitch){const{pitchDelta:Re}=this.touchPitch.dragMove(P,ne)||{};Re&&we.setPitch(we.getPitch()+Re)}}off(){const P=this.element;n.removeEventListener(P,"mousedown",this.mousedown),n.removeEventListener(P,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(P,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let Ls;function vs(ze,P,ne){const we=new t.N(ze.lng,ze.lat);if(ze=new t.N(ze.lng,ze.lat),P){const Se=new t.N(ze.lng-360,ze.lat),Re=new t.N(ze.lng+360,ze.lat),ct=ne.locationPoint(ze).distSqr(P);ne.locationPoint(Se).distSqr(P)<ct?ze=Se:ne.locationPoint(Re).distSqr(P)<ct&&(ze=Re)}for(;Math.abs(ze.lng-ne.center.lng)>180;){const Se=ne.locationPoint(ze);if(Se.x>=0&&Se.y>=0&&Se.x<=ne.width&&Se.y<=ne.height)break;ze.lng>ne.center.lng?ze.lng-=360:ze.lng+=360}return ze.lng!==we.lng&&ne.locationPoint(ze).y>ne.height/2-ne.getHorizon()?ze:we}const Kl={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function $l(ze,P,ne){const we=ze.classList;for(const Se in Kl)we.remove(`maplibregl-${ne}-anchor-${Se}`);we.add(`maplibregl-${ne}-anchor-${P}`)}class tu extends t.E{constructor(P){if(super(),this._onKeyPress=ne=>{const we=ne.code,Se=ne.charCode||ne.keyCode;we!=="Space"&&we!=="Enter"&&Se!==32&&Se!==13||this.togglePopup()},this._onMapClick=ne=>{const we=ne.originalEvent.target,Se=this._element;this._popup&&(we===Se||Se.contains(we))&&this.togglePopup()},this._update=ne=>{var we;if(!this._map)return;const Se=this._map.loaded()&&!this._map.isMoving();(ne?.type==="terrain"||ne?.type==="render"&&!Se)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?vs(this._lngLat,this._flatPos,this._map.transform):(we=this._lngLat)===null||we===void 0?void 0:we.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Re="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Re=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Re=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ct="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ct="rotateX(0deg)":this._pitchAlignment==="map"&&(ct=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ne&&ne.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Kl[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ct} ${Re}`),i.frameAsync(new AbortController).then(()=>{this._updateOpacity(ne&&ne.type==="moveend")}).catch(()=>{})},this._onMove=ne=>{if(!this._isDragging){const we=this._clickTolerance||this._map._clickTolerance;this._isDragging=ne.point.dist(this._pointerdownPos)>=we}this._isDragging&&(this._pos=ne.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.k("dragend")),this._state="inactive"},this._addDragHandler=ne=>{this._element.contains(ne.originalEvent.target)&&(ne.preventDefault(),this._positionDelta=ne.point.sub(this._pos).add(this._offset),this._pointerdownPos=ne.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=P&&P.anchor||"center",this._color=P&&P.color||"#3FB1CE",this._scale=P&&P.scale||1,this._draggable=P&&P.draggable||!1,this._clickTolerance=P&&P.clickTolerance||0,this._subpixelPositioning=P&&P.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=P&&P.rotation||0,this._rotationAlignment=P&&P.rotationAlignment||"auto",this._pitchAlignment=P&&P.pitchAlignment&&P.pitchAlignment!=="auto"?P.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(P?.opacity,P?.opacityWhenCovered),P&&P.element)this._element=P.element,this._offset=t.P.convert(P&&P.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const ne=n.createNS("http://www.w3.org/2000/svg","svg"),we=41,Se=27;ne.setAttributeNS(null,"display","block"),ne.setAttributeNS(null,"height",`${we}px`),ne.setAttributeNS(null,"width",`${Se}px`),ne.setAttributeNS(null,"viewBox",`0 0 ${Se} ${we}`);const Re=n.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"stroke","none"),Re.setAttributeNS(null,"stroke-width","1"),Re.setAttributeNS(null,"fill","none"),Re.setAttributeNS(null,"fill-rule","evenodd");const ct=n.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"fill-rule","nonzero");const _t=n.createNS("http://www.w3.org/2000/svg","g");_t.setAttributeNS(null,"transform","translate(3.0, 29.0)"),_t.setAttributeNS(null,"fill","#000000");const zt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const ht of zt){const St=n.createNS("http://www.w3.org/2000/svg","ellipse");St.setAttributeNS(null,"opacity","0.04"),St.setAttributeNS(null,"cx","10.5"),St.setAttributeNS(null,"cy","5.80029008"),St.setAttributeNS(null,"rx",ht.rx),St.setAttributeNS(null,"ry",ht.ry),_t.appendChild(St)}const Qt=n.createNS("http://www.w3.org/2000/svg","g");Qt.setAttributeNS(null,"fill",this._color);const fr=n.createNS("http://www.w3.org/2000/svg","path");fr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Qt.appendChild(fr);const gr=n.createNS("http://www.w3.org/2000/svg","g");gr.setAttributeNS(null,"opacity","0.25"),gr.setAttributeNS(null,"fill","#000000");const Br=n.createNS("http://www.w3.org/2000/svg","path");Br.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),gr.appendChild(Br);const ta=n.createNS("http://www.w3.org/2000/svg","g");ta.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ta.setAttributeNS(null,"fill","#FFFFFF");const Ve=n.createNS("http://www.w3.org/2000/svg","g");Ve.setAttributeNS(null,"transform","translate(8.0, 8.0)");const Ye=n.createNS("http://www.w3.org/2000/svg","circle");Ye.setAttributeNS(null,"fill","#000000"),Ye.setAttributeNS(null,"opacity","0.25"),Ye.setAttributeNS(null,"cx","5.5"),Ye.setAttributeNS(null,"cy","5.5"),Ye.setAttributeNS(null,"r","5.4999962");const it=n.createNS("http://www.w3.org/2000/svg","circle");it.setAttributeNS(null,"fill","#FFFFFF"),it.setAttributeNS(null,"cx","5.5"),it.setAttributeNS(null,"cy","5.5"),it.setAttributeNS(null,"r","5.4999962"),Ve.appendChild(Ye),Ve.appendChild(it),ct.appendChild(_t),ct.appendChild(Qt),ct.appendChild(gr),ct.appendChild(ta),ct.appendChild(Ve),ne.appendChild(ct),ne.setAttributeNS(null,"height",we*this._scale+"px"),ne.setAttributeNS(null,"width",Se*this._scale+"px"),this._element.appendChild(ne),this._offset=t.P.convert(P&&P.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ne=>{ne.preventDefault()}),this._element.addEventListener("mousedown",ne=>{ne.preventDefault()}),$l(this._element,this._anchor,"marker"),P&&P.className)for(const ne of P.className.split(" "))this._element.classList.add(ne);this._popup=null}addTo(P){return this.remove(),this._map=P,this._element.setAttribute("aria-label",P._getUIString("Marker.Title")),P.getCanvasContainer().appendChild(this._element),P.on("move",this._update),P.on("moveend",this._update),P.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(P){return this._lngLat=t.N.convert(P),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(P){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),P){if(!("offset"in P.options)){const Se=Math.abs(13.5)/Math.SQRT2;P.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Se,-1*(38.1-13.5+Se)],"bottom-right":[-Se,-1*(38.1-13.5+Se)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=P,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(P){return this._subpixelPositioning=P,this}getPopup(){return this._popup}togglePopup(){const P=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:P?(P.isOpen()?P.remove():(P.setLngLat(this._lngLat),P.addTo(this._map)),this):this}_updateOpacity(P=!1){var ne,we;if(!(!((ne=this._map)===null||ne===void 0)&&ne.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(P)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const Se=this._map,Re=Se.terrain.depthAtPoint(this._pos),ct=Se.terrain.getElevationForLngLatZoom(this._lngLat,Se.transform.tileZoom);if(Se.transform.lngLatToCameraDepth(this._lngLat,ct)-Re<.006)return void(this._element.style.opacity=this._opacity);const _t=-this._offset.y/Se.transform._pixelPerMeter,zt=Math.sin(Se.getPitch()*Math.PI/180)*_t,Qt=Se.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),fr=Se.transform.lngLatToCameraDepth(this._lngLat,ct+zt)-Qt>.006;!((we=this._popup)===null||we===void 0)&&we.isOpen()&&fr&&this._popup.remove(),this._element.style.opacity=fr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(P){return this._offset=t.P.convert(P),this._update(),this}addClassName(P){this._element.classList.add(P)}removeClassName(P){this._element.classList.remove(P)}toggleClassName(P){return this._element.classList.toggle(P)}setDraggable(P){return this._draggable=!!P,this._map&&(P?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(P){return this._rotation=P||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(P){return this._rotationAlignment=P||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(P){return this._pitchAlignment=P&&P!=="auto"?P:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(P,ne){return P===void 0&&ne===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),P!==void 0&&(this._opacity=P),ne!==void 0&&(this._opacityWhenCovered=ne),this._map&&this._updateOpacity(!0),this}}const gc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Jl=0,Qu=!1;const yl={maxWidth:100,unit:"metric"};function ec(ze,P,ne){const we=ne&&ne.maxWidth||100,Se=ze._container.clientHeight/2,Re=ze.unproject([0,Se]),ct=ze.unproject([we,Se]),_t=Re.distanceTo(ct);if(ne&&ne.unit==="imperial"){const zt=3.2808*_t;zt>5280?Yi(P,we,zt/5280,ze._getUIString("ScaleControl.Miles")):Yi(P,we,zt,ze._getUIString("ScaleControl.Feet"))}else ne&&ne.unit==="nautical"?Yi(P,we,_t/1852,ze._getUIString("ScaleControl.NauticalMiles")):_t>=1e3?Yi(P,we,_t/1e3,ze._getUIString("ScaleControl.Kilometers")):Yi(P,we,_t,ze._getUIString("ScaleControl.Meters"))}function Yi(ze,P,ne,we){const Se=(function(Re){const ct=Math.pow(10,`${Math.floor(Re)}`.length-1);let _t=Re/ct;return _t=_t>=10?10:_t>=5?5:_t>=3?3:_t>=2?2:_t>=1?1:(function(zt){const Qt=Math.pow(10,Math.ceil(-Math.log(zt)/Math.LN10));return Math.round(zt*Qt)/Qt})(_t),ct*_t})(ne);ze.style.width=P*(Se/ne)+"px",ze.innerHTML=`${Se} ${we}`}const so={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},tc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function wu(ze){if(ze){if(typeof ze=="number"){const P=Math.round(Math.abs(ze)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,ze),"top-left":new t.P(P,P),"top-right":new t.P(-P,P),bottom:new t.P(0,-ze),"bottom-left":new t.P(P,-P),"bottom-right":new t.P(-P,-P),left:new t.P(ze,0),right:new t.P(-ze,0)}}if(ze instanceof t.P||Array.isArray(ze)){const P=t.P.convert(ze);return{center:P,top:P,"top-left":P,"top-right":P,bottom:P,"bottom-left":P,"bottom-right":P,left:P,right:P}}return{center:t.P.convert(ze.center||[0,0]),top:t.P.convert(ze.top||[0,0]),"top-left":t.P.convert(ze["top-left"]||[0,0]),"top-right":t.P.convert(ze["top-right"]||[0,0]),bottom:t.P.convert(ze.bottom||[0,0]),"bottom-left":t.P.convert(ze["bottom-left"]||[0,0]),"bottom-right":t.P.convert(ze["bottom-right"]||[0,0]),left:t.P.convert(ze.left||[0,0]),right:t.P.convert(ze.right||[0,0])}}return wu(new t.P(0,0))}const hu=r;e.AJAXError=t.bh,e.Evented=t.E,e.LngLat=t.N,e.MercatorCoordinate=t.Z,e.Point=t.P,e.addProtocol=t.bi,e.config=t.a,e.removeProtocol=t.bj,e.AttributionControl=Hi,e.BoxZoomHandler=Cu,e.CanvasSource=Je,e.CooperativeGesturesHandler=Gn,e.DoubleClickZoomHandler=Ja,e.DragPanHandler=Dn,e.DragRotateHandler=ti,e.EdgeInsets=Yl,e.FullscreenControl=class extends t.E{constructor(ze={}){super(),this._onFullscreenChange=()=>{var P;let ne=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((P=ne?.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)ne=ne.shadowRoot.fullscreenElement;ne===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,ze&&ze.container&&(ze.container instanceof HTMLElement?this._container=ze.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(ze){return this._map=ze,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const ze=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",ze).setAttribute("aria-hidden","true"),ze.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const ze=this._getTitle();this._fullscreenButton.setAttribute("aria-label",ze),this._fullscreenButton.title=ze}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=Le,e.GeolocateControl=class extends t.E{constructor(ze){super(),this._onSuccess=P=>{if(this._map){if(this._isOutOfMapMaxBounds(P))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",P)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=P,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(P),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(P),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",P)),this._finish()}},this._updateCamera=P=>{const ne=new t.N(P.coords.longitude,P.coords.latitude),we=P.coords.accuracy,Se=this._map.getBearing(),Re=t.e({bearing:Se},this.options.fitBoundsOptions),ct=ae.fromLngLat(ne,we);this._map.fitBounds(ct,Re,{geolocateSource:!0})},this._updateMarker=P=>{if(P){const ne=new t.N(P.coords.longitude,P.coords.latitude);this._accuracyCircleMarker.setLngLat(ne).addTo(this._map),this._userLocationDotMarker.setLngLat(ne).addTo(this._map),this._accuracy=P.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=P=>{if(this._map){if(this.options.trackUserLocation)if(P.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const ne=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(P.code===3&&Qu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",P)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",P=>P.preventDefault()),this._geolocateButton=n.create("button","maplibregl-ctrl-geolocate",this._container),n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=P=>{if(this._map){if(P===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");const ne=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}else{const ne=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new tu({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new tu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ne=>{ne.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ne.originalEvent&&ne.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},gc,ze)}onAdd(ze){return this._map=ze,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(P=!1){if(Ls!==void 0&&!P)return Ls;if(window.navigator.permissions===void 0)return Ls=!!window.navigator.geolocation,Ls;try{Ls=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Ls=!!window.navigator.geolocation}return Ls})})().then(P=>this._finishSetupUI(P)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Jl=0,Qu=!1}_isOutOfMapMaxBounds(ze){const P=this._map.getMaxBounds(),ne=ze.coords;return P&&(ne.longitude<P.getWest()||ne.longitude>P.getEast()||ne.latitude<P.getSouth()||ne.latitude>P.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const ze=this._map.getBounds(),P=ze.getSouthEast(),ne=ze.getNorthEast(),we=P.distanceTo(ne),Se=Math.ceil(this._accuracy/(we/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Se}px`,this._circleElement.style.height=`${Se}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Jl--,Qu=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.k("trackuserlocationstart")),this.fire(new t.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let ze;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Jl++,Jl>1?(ze={maximumAge:6e5,timeout:0},Qu=!0):(ze=this.options.positionOptions,Qu=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ze)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.Hash=Bu,e.ImageSource=et,e.KeyboardHandler=yr,e.LngLatBounds=ae,e.LogoControl=li,e.Map=class extends zi{constructor(ze){t.bf.mark(t.bg.create);const P=Object.assign(Object.assign({},dl),ze);if(P.minZoom!=null&&P.maxZoom!=null&&P.minZoom>P.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(P.minPitch!=null&&P.maxPitch!=null&&P.minPitch>P.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(P.minPitch!=null&&P.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(P.maxPitch!=null&&P.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new al(P.minZoom,P.maxZoom,P.minPitch,P.maxPitch,P.renderWorldCopies),{bearingSnap:P.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Yn,this._controls=[],this._mapId=t.a4(),this._contextLost=ne=>{ne.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:ne}))},this._contextRestored=ne=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:ne}))},this._onMapScroll=ne=>{if(ne.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=P.interactive,this._maxTileCacheSize=P.maxTileCacheSize,this._maxTileCacheZoomLevels=P.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=P.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=P.preserveDrawingBuffer===!0,this._antialias=P.antialias===!0,this._trackResize=P.trackResize===!0,this._bearingSnap=P.bearingSnap,this._refreshExpiredTiles=P.refreshExpiredTiles===!0,this._fadeDuration=P.fadeDuration,this._crossSourceCollisions=P.crossSourceCollisions===!0,this._collectResourceTiming=P.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},es),P.locale),this._clickTolerance=P.clickTolerance,this._overridePixelRatio=P.pixelRatio,this._maxCanvasSize=P.maxCanvasSize,this.transformCameraUpdate=P.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=P.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new m(P.transformRequest),typeof P.container=="string"){if(this._container=document.getElementById(P.container),!this._container)throw new Error(`Container '${P.container}' not found.`)}else{if(!(P.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=P.container}if(P.maxBounds&&this.setMaxBounds(P.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ne=!1;const we=xc(Se=>{this._trackResize&&!this._removed&&(this.resize(Se),this.redraw())},50);this._resizeObserver=new ResizeObserver(Se=>{ne?we(Se):ne=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Vi(this,P),this._hash=P.hash&&new Bu(typeof P.hash=="string"&&P.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:P.center,zoom:P.zoom,bearing:P.bearing,pitch:P.pitch}),P.bounds&&(this.resize(),this.fitBounds(P.bounds,t.e({},P.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=P.localIdeographFontFamily,this._validateStyle=P.validateStyle,P.style&&this.setStyle(P.style,{localIdeographFontFamily:P.localIdeographFontFamily}),P.attributionControl&&this.addControl(new Hi(typeof P.attributionControl=="boolean"?void 0:P.attributionControl)),P.maplibreLogo&&this.addControl(new li,P.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ne=>{this._update(ne.dataType==="style"),this.fire(new t.k(`${ne.dataType}data`,ne))}),this.on("dataloading",ne=>{this.fire(new t.k(`${ne.dataType}dataloading`,ne))}),this.on("dataabort",ne=>{this.fire(new t.k("sourcedataabort",ne))})}_getMapId(){return this._mapId}addControl(ze,P){if(P===void 0&&(P=ze.getDefaultPosition?ze.getDefaultPosition():"top-right"),!ze||!ze.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const ne=ze.onAdd(this);this._controls.push(ze);const we=this._controlPositions[P];return P.indexOf("bottom")!==-1?we.insertBefore(ne,we.firstChild):we.appendChild(ne),this}removeControl(ze){if(!ze||!ze.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const P=this._controls.indexOf(ze);return P>-1&&this._controls.splice(P,1),ze.onRemove(this),this}hasControl(ze){return this._controls.indexOf(ze)>-1}calculateCameraOptionsFromTo(ze,P,ne,we){return we==null&&this.terrain&&(we=this.terrain.getElevationForLngLatZoom(ne,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(ze,P,ne,we)}resize(ze){var P;const ne=this._containerDimensions(),we=ne[0],Se=ne[1],Re=this._getClampedPixelRatio(we,Se);if(this._resizeCanvas(we,Se,Re),this.painter.resize(we,Se,Re),this.painter.overLimit()){const _t=this.painter.context.gl;this._maxCanvasSize=[_t.drawingBufferWidth,_t.drawingBufferHeight];const zt=this._getClampedPixelRatio(we,Se);this._resizeCanvas(we,Se,zt),this.painter.resize(we,Se,zt)}this.transform.resize(we,Se),(P=this._requestedCameraState)===null||P===void 0||P.resize(we,Se);const ct=!this._moving;return ct&&(this.stop(),this.fire(new t.k("movestart",ze)).fire(new t.k("move",ze))),this.fire(new t.k("resize",ze)),ct&&this.fire(new t.k("moveend",ze)),this}_getClampedPixelRatio(ze,P){const{0:ne,1:we}=this._maxCanvasSize,Se=this.getPixelRatio(),Re=ze*Se,ct=P*Se;return Math.min(Re>ne?ne/Re:1,ct>we?we/ct:1)*Se}getPixelRatio(){var ze;return(ze=this._overridePixelRatio)!==null&&ze!==void 0?ze:devicePixelRatio}setPixelRatio(ze){this._overridePixelRatio=ze,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(ze){return this.transform.setMaxBounds(ae.convert(ze)),this._update()}setMinZoom(ze){if((ze=ze??-2)>=-2&&ze<=this.transform.maxZoom)return this.transform.minZoom=ze,this._update(),this.getZoom()<ze&&this.setZoom(ze),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(ze){if((ze=ze??22)>=this.transform.minZoom)return this.transform.maxZoom=ze,this._update(),this.getZoom()>ze&&this.setZoom(ze),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(ze){if((ze=ze??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(ze>=0&&ze<=this.transform.maxPitch)return this.transform.minPitch=ze,this._update(),this.getPitch()<ze&&this.setPitch(ze),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(ze){if((ze=ze??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(ze>=this.transform.minPitch)return this.transform.maxPitch=ze,this._update(),this.getPitch()>ze&&this.setPitch(ze),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(ze){return this.transform.renderWorldCopies=ze,this._update()}project(ze){return this.transform.locationPoint(t.N.convert(ze),this.style&&this.terrain)}unproject(ze){return this.transform.pointLocation(t.P.convert(ze),this.terrain)}isMoving(){var ze;return this._moving||((ze=this.handlers)===null||ze===void 0?void 0:ze.isMoving())}isZooming(){var ze;return this._zooming||((ze=this.handlers)===null||ze===void 0?void 0:ze.isZooming())}isRotating(){var ze;return this._rotating||((ze=this.handlers)===null||ze===void 0?void 0:ze.isRotating())}_createDelegatedListener(ze,P,ne){if(ze==="mouseenter"||ze==="mouseover"){let we=!1;return{layers:P,listener:ne,delegates:{mousemove:Re=>{const ct=P.filter(zt=>this.getLayer(zt)),_t=ct.length!==0?this.queryRenderedFeatures(Re.point,{layers:ct}):[];_t.length?we||(we=!0,ne.call(this,new Vl(ze,this,Re.originalEvent,{features:_t}))):we=!1},mouseout:()=>{we=!1}}}}if(ze==="mouseleave"||ze==="mouseout"){let we=!1;return{layers:P,listener:ne,delegates:{mousemove:ct=>{const _t=P.filter(zt=>this.getLayer(zt));(_t.length!==0?this.queryRenderedFeatures(ct.point,{layers:_t}):[]).length?we=!0:we&&(we=!1,ne.call(this,new Vl(ze,this,ct.originalEvent)))},mouseout:ct=>{we&&(we=!1,ne.call(this,new Vl(ze,this,ct.originalEvent)))}}}}{const we=Se=>{const Re=P.filter(_t=>this.getLayer(_t)),ct=Re.length!==0?this.queryRenderedFeatures(Se.point,{layers:Re}):[];ct.length&&(Se.features=ct,ne.call(this,Se),delete Se.features)};return{layers:P,listener:ne,delegates:{[ze]:we}}}}_saveDelegatedListener(ze,P){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ze]=this._delegatedListeners[ze]||[],this._delegatedListeners[ze].push(P)}_removeDelegatedListener(ze,P,ne){if(!this._delegatedListeners||!this._delegatedListeners[ze])return;const we=this._delegatedListeners[ze];for(let Se=0;Se<we.length;Se++){const Re=we[Se];if(Re.listener===ne&&Re.layers.length===P.length&&Re.layers.every(ct=>P.includes(ct))){for(const ct in Re.delegates)this.off(ct,Re.delegates[ct]);return void we.splice(Se,1)}}}on(ze,P,ne){if(ne===void 0)return super.on(ze,P);const we=this._createDelegatedListener(ze,typeof P=="string"?[P]:P,ne);this._saveDelegatedListener(ze,we);for(const Se in we.delegates)this.on(Se,we.delegates[Se]);return this}once(ze,P,ne){if(ne===void 0)return super.once(ze,P);const we=typeof P=="string"?[P]:P,Se=this._createDelegatedListener(ze,we,ne);for(const Re in Se.delegates){const ct=Se.delegates[Re];Se.delegates[Re]=(..._t)=>{this._removeDelegatedListener(ze,we,ne),ct(..._t)}}this._saveDelegatedListener(ze,Se);for(const Re in Se.delegates)this.once(Re,Se.delegates[Re]);return this}off(ze,P,ne){return ne===void 0?super.off(ze,P):(this._removeDelegatedListener(ze,typeof P=="string"?[P]:P,ne),this)}queryRenderedFeatures(ze,P){if(!this.style)return[];let ne;const we=ze instanceof t.P||Array.isArray(ze),Se=we?ze:[[0,0],[this.transform.width,this.transform.height]];if(P=P||(we?{}:ze)||{},Se instanceof t.P||typeof Se[0]=="number")ne=[t.P.convert(Se)];else{const Re=t.P.convert(Se[0]),ct=t.P.convert(Se[1]);ne=[Re,new t.P(ct.x,Re.y),ct,new t.P(Re.x,ct.y),Re]}return this.style.queryRenderedFeatures(ne,P,this.transform)}querySourceFeatures(ze,P){return this.style.querySourceFeatures(ze,P)}setStyle(ze,P){return(P=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},P)).diff!==!1&&P.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ze?(this._diffStyle(ze,P),this):(this._localIdeographFontFamily=P.localIdeographFontFamily,this._updateStyle(ze,P))}setTransformRequest(ze){return this._requestManager.setTransformRequest(ze),this}_getUIString(ze){const P=this._locale[ze];if(P==null)throw new Error(`Missing UI string '${ze}'`);return P}_updateStyle(ze,P){if(P.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(ze,P));const ne=this.style&&P.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!ze)),ze?(this.style=new Mr(this,P||{}),this.style.setEventedParent(this,{style:this.style}),typeof ze=="string"?this.style.loadURL(ze,P,ne):this.style.loadJSON(ze,P,ne),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Mr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(ze,P){if(typeof ze=="string"){const ne=this._requestManager.transformRequest(ze,"Style");t.h(ne,new AbortController).then(we=>{this._updateDiff(we.data,P)}).catch(we=>{we&&this.fire(new t.j(we))})}else typeof ze=="object"&&this._updateDiff(ze,P)}_updateDiff(ze,P){try{this.style.setState(ze,P)&&this._update(!0)}catch(ne){t.w(`Unable to perform style diff: ${ne.message||ne.error||ne}. Rebuilding the style from scratch.`),this._updateStyle(ze,P)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(ze,P){return this._lazyInitEmptyStyle(),this.style.addSource(ze,P),this._update(!0)}isSourceLoaded(ze){const P=this.style&&this.style.sourceCaches[ze];if(P!==void 0)return P.loaded();this.fire(new t.j(new Error(`There is no source with ID '${ze}'`)))}setTerrain(ze){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),ze){const P=this.style.sourceCaches[ze.source];if(!P)throw new Error(`cannot load terrain, because there exists no source with ID: ${ze.source}`);this.terrain===null&&P.reload();for(const ne in this.style._layers){const we=this.style._layers[ne];we.type==="hillshade"&&we.source===ze.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new _s(this.painter,P,ze),this.painter.renderToTexture=new Hs(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ne=>{ne.dataType==="style"?this.terrain.sourceCache.freeRtt():ne.dataType==="source"&&ne.tile&&(ne.sourceId!==ze.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ne.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:ze})),this}getTerrain(){var ze,P;return(P=(ze=this.terrain)===null||ze===void 0?void 0:ze.options)!==null&&P!==void 0?P:null}areTilesLoaded(){const ze=this.style&&this.style.sourceCaches;for(const P in ze){const ne=ze[P]._tiles;for(const we in ne){const Se=ne[we];if(Se.state!=="loaded"&&Se.state!=="errored")return!1}}return!0}removeSource(ze){return this.style.removeSource(ze),this._update(!0)}getSource(ze){return this.style.getSource(ze)}addImage(ze,P,ne={}){const{pixelRatio:we=1,sdf:Se=!1,stretchX:Re,stretchY:ct,content:_t,textFitWidth:zt,textFitHeight:Qt}=ne;if(this._lazyInitEmptyStyle(),!(P instanceof HTMLImageElement||t.b(P))){if(P.width===void 0||P.height===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:fr,height:gr,data:Br}=P,ta=P;return this.style.addImage(ze,{data:new t.R({width:fr,height:gr},new Uint8Array(Br)),pixelRatio:we,stretchX:Re,stretchY:ct,content:_t,textFitWidth:zt,textFitHeight:Qt,sdf:Se,version:0,userImage:ta}),ta.onAdd&&ta.onAdd(this,ze),this}}{const{width:fr,height:gr,data:Br}=i.getImageData(P);this.style.addImage(ze,{data:new t.R({width:fr,height:gr},Br),pixelRatio:we,stretchX:Re,stretchY:ct,content:_t,textFitWidth:zt,textFitHeight:Qt,sdf:Se,version:0})}}updateImage(ze,P){const ne=this.style.getImage(ze);if(!ne)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const we=P instanceof HTMLImageElement||t.b(P)?i.getImageData(P):P,{width:Se,height:Re,data:ct}=we;if(Se===void 0||Re===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Se!==ne.data.width||Re!==ne.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const _t=!(P instanceof HTMLImageElement||t.b(P));return ne.data.replace(ct,_t),this.style.updateImage(ze,ne),this}getImage(ze){return this.style.getImage(ze)}hasImage(ze){return ze?!!this.style.getImage(ze):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(ze){this.style.removeImage(ze)}loadImage(ze){return l.getImage(this._requestManager.transformRequest(ze,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(ze,P){return this._lazyInitEmptyStyle(),this.style.addLayer(ze,P),this._update(!0)}moveLayer(ze,P){return this.style.moveLayer(ze,P),this._update(!0)}removeLayer(ze){return this.style.removeLayer(ze),this._update(!0)}getLayer(ze){return this.style.getLayer(ze)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(ze,P,ne){return this.style.setLayerZoomRange(ze,P,ne),this._update(!0)}setFilter(ze,P,ne={}){return this.style.setFilter(ze,P,ne),this._update(!0)}getFilter(ze){return this.style.getFilter(ze)}setPaintProperty(ze,P,ne,we={}){return this.style.setPaintProperty(ze,P,ne,we),this._update(!0)}getPaintProperty(ze,P){return this.style.getPaintProperty(ze,P)}setLayoutProperty(ze,P,ne,we={}){return this.style.setLayoutProperty(ze,P,ne,we),this._update(!0)}getLayoutProperty(ze,P){return this.style.getLayoutProperty(ze,P)}setGlyphs(ze,P={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(ze,P),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(ze,P,ne={}){return this._lazyInitEmptyStyle(),this.style.addSprite(ze,P,ne,we=>{we||this._update(!0)}),this}removeSprite(ze){return this._lazyInitEmptyStyle(),this.style.removeSprite(ze),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(ze,P={}){return this._lazyInitEmptyStyle(),this.style.setSprite(ze,P,ne=>{ne||this._update(!0)}),this}setLight(ze,P={}){return this._lazyInitEmptyStyle(),this.style.setLight(ze,P),this._update(!0)}getLight(){return this.style.getLight()}setSky(ze){return this._lazyInitEmptyStyle(),this.style.setSky(ze),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(ze,P){return this.style.setFeatureState(ze,P),this._update()}removeFeatureState(ze,P){return this.style.removeFeatureState(ze,P),this._update()}getFeatureState(ze){return this.style.getFeatureState(ze)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let ze=0,P=0;return this._container&&(ze=this._container.clientWidth||400,P=this._container.clientHeight||300),[ze,P]}_setupContainer(){const ze=this._container;ze.classList.add("maplibregl-map");const P=this._canvasContainer=n.create("div","maplibregl-canvas-container",ze);this._interactive&&P.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",P),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const ne=this._containerDimensions(),we=this._getClampedPixelRatio(ne[0],ne[1]);this._resizeCanvas(ne[0],ne[1],we);const Se=this._controlContainer=n.create("div","maplibregl-control-container",ze),Re=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ct=>{Re[ct]=n.create("div",`maplibregl-ctrl-${ct} `,Se)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(ze,P,ne){this._canvas.width=Math.floor(ne*ze),this._canvas.height=Math.floor(ne*P),this._canvas.style.width=`${ze}px`,this._canvas.style.height=`${P}px`}_setupPainter(){const ze={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let P=null;this._canvas.addEventListener("webglcontextcreationerror",we=>{P={requestedAttributes:ze},we&&(P.statusMessage=we.statusMessage,P.type=we.type)},{once:!0});const ne=this._canvas.getContext("webgl2",ze)||this._canvas.getContext("webgl",ze);if(!ne){const we="Failed to initialize WebGL";throw P?(P.message=we,new Error(JSON.stringify(P))):new Error(we)}this.painter=new uc(ne,this.transform),s.testSupport(ne)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(ze){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||ze,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(ze){return this._update(),this._renderTaskQueue.add(ze)}_cancelRenderFrame(ze){this._renderTaskQueue.remove(ze)}_render(ze){const P=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ze),this._removed)return;let ne=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Se=this.transform.zoom,Re=i.now();this.style.zoomHistory.update(Se,Re);const ct=new t.z(Se,{now:Re,fadeDuration:P,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),_t=ct.crossFadingFactor();_t===1&&_t===this._crossFadingFactor||(ne=!0,this._crossFadingFactor=_t),this.style.update(ct)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,P,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:P,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.bf.mark(t.bg.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||ne)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const we=this._sourcesDirty||this._styleDirty||this._placementDirty;return we||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||we||(this._fullyLoaded=!0,t.bf.mark(t.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var ze;this._hash&&this._hash.remove();for(const ne of this._controls)ne.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),(ze=this._resizeObserver)===null||ze===void 0||ze.disconnect();const P=this.painter.context.gl.getExtension("WEBGL_lose_context");P?.loseContext&&P.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),n.remove(this._canvasContainer),n.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,i.frameAsync(this._frameRequest).then(ze=>{t.bf.frame(ze),this._frameRequest=null,this._render(ze)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(ze){this._showTileBoundaries!==ze&&(this._showTileBoundaries=ze,this._update())}get showPadding(){return!!this._showPadding}set showPadding(ze){this._showPadding!==ze&&(this._showPadding=ze,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(ze){this._showCollisionBoxes!==ze&&(this._showCollisionBoxes=ze,ze?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(ze){this._showOverdrawInspector!==ze&&(this._showOverdrawInspector=ze,this._update())}get repaint(){return!!this._repaint}set repaint(ze){this._repaint!==ze&&(this._repaint=ze,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(ze){this._vertices=ze,this._update()}get version(){return ml}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=Vl,e.MapTouchEvent=wc,e.MapWheelEvent=lf,e.Marker=tu,e.NavigationControl=class{constructor(ze){this._updateZoomButtons=()=>{const P=this._map.getZoom(),ne=P===this._map.getMaxZoom(),we=P===this._map.getMinZoom();this._zoomInButton.disabled=ne,this._zoomOutButton.disabled=we,this._zoomInButton.setAttribute("aria-disabled",ne.toString()),this._zoomOutButton.setAttribute("aria-disabled",we.toString())},this._rotateCompassArrow=()=>{const P=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=P},this._setButtonTitle=(P,ne)=>{const we=this._map._getUIString(`NavigationControl.${ne}`);P.title=we,P.setAttribute("aria-label",we)},this.options=t.e({},Ti,ze),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",P=>P.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",P=>this._map.zoomIn({},{originalEvent:P})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",P=>this._map.zoomOut({},{originalEvent:P})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",P=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:P}):this._map.resetNorth({},{originalEvent:P})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(ze){return this._map=ze,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new xo(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(ze,P){const ne=n.create("button",ze,this._container);return ne.type="button",ne.addEventListener("click",P),ne}},e.Popup=class extends t.E{constructor(ze){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=P=>{this._update(P.point)},this._onMouseMove=P=>{this._update(P.point)},this._onDrag=P=>{this._update(P.point)},this._update=P=>{var ne;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const _t of this.options.className.split(" "))this._container.classList.add(_t);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?vs(this._lngLat,this._flatPos,this._map.transform):(ne=this._lngLat)===null||ne===void 0?void 0:ne.wrap(),this._trackPointer&&!P)return;const we=this._flatPos=this._pos=this._trackPointer&&P?P:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&P?P:this._map.transform.locationPoint(this._lngLat));let Se=this.options.anchor;const Re=wu(this.options.offset);if(!Se){const _t=this._container.offsetWidth,zt=this._container.offsetHeight;let Qt;Qt=we.y+Re.bottom.y<zt?["top"]:we.y>this._map.transform.height-zt?["bottom"]:[],we.x<_t/2?Qt.push("left"):we.x>this._map.transform.width-_t/2&&Qt.push("right"),Se=Qt.length===0?"bottom":Qt.join("-")}let ct=we.add(Re[Se]);this.options.subpixelPositioning||(ct=ct.round()),n.setTransform(this._container,`${Kl[Se]} translate(${ct.x}px,${ct.y}px)`),$l(this._container,Se,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(so),ze)}addTo(ze){return this._map&&this.remove(),this._map=ze,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(ze){return this._lngLat=t.N.convert(ze),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(ze){return this.setDOMContent(document.createTextNode(ze))}setHTML(ze){const P=document.createDocumentFragment(),ne=document.createElement("body");let we;for(ne.innerHTML=ze;we=ne.firstChild,we;)P.appendChild(we);return this.setDOMContent(P)}getMaxWidth(){var ze;return(ze=this._container)===null||ze===void 0?void 0:ze.style.maxWidth}setMaxWidth(ze){return this.options.maxWidth=ze,this._update(),this}setDOMContent(ze){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(ze),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(ze){return this._container&&this._container.classList.add(ze),this}removeClassName(ze){return this._container&&this._container.classList.remove(ze),this}setOffset(ze){return this.options.offset=ze,this._update(),this}toggleClassName(ze){if(this._container)return this._container.classList.toggle(ze)}setSubpixelPositioning(ze){this.options.subpixelPositioning=ze}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const ze=this._container.querySelector(tc);ze&&ze.focus()}},e.RasterDEMTileSource=Ie,e.RasterTileSource=Me,e.ScaleControl=class{constructor(ze){this._onMove=()=>{ec(this._map,this._container,this.options)},this.setUnit=P=>{this.options.unit=P,ec(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},yl),ze)}getDefaultPosition(){return"bottom-left"}onAdd(ze){return this._map=ze,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",ze.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=pa,e.Style=Mr,e.TerrainControl=class{constructor(ze){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=ze}onAdd(ze){return this._map=ze,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=tf,e.TwoFingersTouchRotateHandler=hc,e.TwoFingersTouchZoomHandler=eu,e.TwoFingersTouchZoomRotateHandler=yn,e.VectorTileSource=be,e.VideoSource=rt,e.addSourceType=(ze,P)=>t._(void 0,void 0,void 0,function*(){if(Ee(ze))throw new Error(`A source type called "${ze}" already exists.`);((ne,we)=>{Ze[ne]=we})(ze,P)}),e.clearPrewarmedResources=function(){const ze=le;ze&&(ze.isPreloaded()&&ze.numActive()===1?(ze.release(ee),le=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return tt().getRTLTextPluginStatus()},e.getVersion=function(){return hu},e.getWorkerCount=function(){return ue.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(ze){return Z().broadcast("IS",ze)},e.prewarm=function(){J().acquire(ee)},e.setMaxParallelImageRequests=function(ze){t.a.MAX_PARALLEL_IMAGE_REQUESTS=ze},e.setRTLTextPlugin=function(ze,P){return tt().setRTLTextPlugin(ze,P)},e.setWorkerCount=function(ze){ue.workerCount=ze},e.setWorkerUrl=function(ze){t.a.WORKER_URL=ze}});var E=h;return E})}}),jI=He({"src/plots/map/layers.js"(Y,G){var h=ea(),b=Zl().sanitizeHTML,S=XT(),E=gp();function e(i,n){this.subplot=i,this.uid=i.uid+"-"+n,this.index=n,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(n){this.visible?this.needsNewImage(n)?this.updateImage(n):this.needsNewSource(n)?(this.removeLayer(),this.updateSource(n),this.updateLayer(n)):this.needsNewLayer(n)?this.updateLayer(n):this.updateStyle(n):(this.updateSource(n),this.updateLayer(n)),this.visible=r(n)},t.needsNewImage=function(i){var n=this.subplot.map;return n.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},t.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},t.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(i){var n=this.subplot.map;n.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(i){var n=this.subplot.map;if(n.getSource(this.idSource)&&n.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,!!r(i)){var s=a(i);n.addSource(this.idSource,s)}},t.findFollowingMapLayerId=function(i){if(i==="traces")for(var n=this.subplot.getMapLayers(),s=0;s<n.length;s++){var f=n[s].id;if(typeof f=="string"&&f.indexOf(E.traceLayerPrefix)===0){i=f;break}}return i},t.updateLayer=function(i){var n=this.subplot,s=o(i),f=this.lookupBelow(),c=this.findFollowingMapLayerId(f);this.removeLayer(),r(i)&&n.addLayer({id:this.idLayer,source:this.idSource,"source-layer":i.sourcelayer||"",type:i.type,minzoom:i.minzoom,maxzoom:i.maxzoom,layout:s.layout,paint:s.paint},c),this.layerType=i.type,this.below=f},t.updateStyle=function(i){if(r(i)){var n=o(i);this.subplot.setOptions(this.idLayer,"setLayoutProperty",n.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",n.paint)}},t.removeLayer=function(){var i=this.subplot.map;i.getLayer(this.idLayer)&&i.removeLayer(this.idLayer)},t.dispose=function(){var i=this.subplot.map;i.getLayer(this.idLayer)&&i.removeLayer(this.idLayer),i.getSource(this.idSource)&&i.removeSource(this.idSource)};function r(i){if(!i.visible)return!1;var n=i.source;if(Array.isArray(n)&&n.length>0){for(var s=0;s<n.length;s++)if(typeof n[s]!="string"||n[s].length===0)return!1;return!0}return h.isPlainObject(n)||typeof n=="string"&&n.length>0}function o(i){var n={},s={};switch(i.type){case"circle":h.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":h.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":h.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var f=i.symbol,c=S(f.textposition,f.iconsize);h.extendFlat(n,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":c.anchor,"text-offset":c.offset,"symbol-placement":f.placement}),h.extendFlat(s,{"icon-color":i.color,"text-color":f.textfont.color,"text-opacity":i.opacity});break;case"raster":h.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":i.opacity});break}return{layout:n,paint:s}}function a(i){var n=i.sourcetype,s=i.source,f={type:n},c;return n==="geojson"?c="data":n==="vector"?c=typeof s=="string"?"url":"tiles":n==="raster"?(c="tiles",f.tileSize=256):n==="image"&&(c="url",f.coordinates=i.coordinates),f[c]=s,i.sourceattribution&&(f.attribution=b(i.sourceattribution)),f}G.exports=function(n,s,f){var c=new e(n,s);return c.update(f),c}}}),VI=He({"src/plots/map/map.js"(Y,G){var h=UI(),b=ea(),S=hp(),E=ji(),e=Ao(),t=kh(),r=kc(),o=Sv(),a=o.drawMode,i=o.selectMode,n=Xc().prepSelect,s=Xc().clearOutline,f=Xc().clearSelectionsCache,c=Xc().selectOnClick,p=gp(),d=jI();function T(_,w){this.id=w,this.gd=_;var g=_._fullLayout,u=_._context;this.container=g._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=g._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(g),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(_,w,g){var u=this,v;u.map?v=new Promise(function(y,R){u.updateMap(_,w,y,R)}):v=new Promise(function(y,R){u.createMap(_,w,y,R)}),g.push(v)},l.createMap=function(_,w,g,u){var v=this,y=w[v.id],R=v.styleObj=x(y.style),L=y.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=v.map=new h.Map({container:v.div,style:R.style,center:M(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!v.isStatic,preserveDrawingBuffer:v.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new h.AttributionControl({compact:!0})),B={};F.on("styleimagemissing",function(I){var N=I.id;if(!B[N]&&N.includes("-15")){B[N]=!0;var U=new Image(15,15);U.onload=function(){F.addImage(N,U)},U.crossOrigin="Anonymous",U.src="https://unpkg.com/maki@2.1.0/icons/"+N+".svg"}}),F.setTransformRequest(function(I){return I=I.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),I=I.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),I=I.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:I}}),F._canvas.style.left="0px",F._canvas.style.top="0px",v.rejectOnError(u),v.isStatic||v.initFx(_,w);var O=[];O.push(new Promise(function(I){F.once("load",I)})),O=O.concat(S.fetchTraceGeoData(_)),Promise.all(O).then(function(){v.fillBelowLookup(_,w),v.updateData(_),v.updateLayout(w),v.resolveOnRender(g)}).catch(u)},l.updateMap=function(_,w,g,u){var v=this,y=v.map,R=w[this.id];v.rejectOnError(u);var L=[],z=x(R.style);JSON.stringify(v.styleObj)!==JSON.stringify(z)&&(v.styleObj=z,y.setStyle(z.style),v.traceHash={},L.push(new Promise(function(F){y.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(_)),Promise.all(L).then(function(){v.fillBelowLookup(_,w),v.updateData(_),v.updateLayout(w),v.resolveOnRender(g)}).catch(u)},l.fillBelowLookup=function(_,w){var g=w[this.id],u=g.layers,v,y,R=this.belowLookup={},L=!1;for(v=0;v<_.length;v++){var z=_[v][0].trace,F=z._module;typeof z.below=="string"?y=z.below:F.getBelow&&(y=F.getBelow(z,this)),y===""&&(L=!0),R["trace-"+z.uid]=y||""}for(v=0;v<u.length;v++){var B=u[v];typeof B.below=="string"?y=B.below:L?y="traces":y="",R["layout-"+v]=y}var O={},I,N;for(I in R)y=R[I],O[y]?O[y].push(I):O[y]=[I];for(y in O){var U=O[y];if(U.length>1)for(v=0;v<U.length;v++)I=U[v],I.indexOf("trace-")===0?(N=I.split("trace-")[1],this.traceHash[N]&&(this.traceHash[N].below=null)):I.indexOf("layout-")===0&&(N=I.split("layout-")[1],this.layerList[N]&&(this.layerList[N].below=null))}};var m={choroplethmap:0,densitymap:1,scattermap:2};l.updateData=function(_){var w=this.traceHash,g,u,v,y,R=_.slice().sort(function(O,I){return m[O[0].trace.type]-m[I[0].trace.type]});for(v=0;v<R.length;v++){var L=R[v];u=L[0].trace,g=w[u.uid];var z=!1;g&&(g.type===u.type?(g.update(L),z=!0):g.dispose()),!z&&u._module&&(w[u.uid]=u._module.plot(this,L))}var F=Object.keys(w);e:for(v=0;v<F.length;v++){var B=F[v];for(y=0;y<_.length;y++)if(u=_[y][0].trace,B===u.uid)continue e;g=w[B],g.dispose(),delete w[B]}},l.updateLayout=function(_){var w=this.map,g=_[this.id];!this.dragging&&!this.wheeling&&(w.setCenter(M(g.center)),w.setZoom(g.zoom),w.setBearing(g.bearing),w.setPitch(g.pitch)),this.updateLayers(_),this.updateFramework(_),this.updateFx(_),this.map.resize(),this.gd._context._scrollZoom.map?w.scrollZoom.enable():w.scrollZoom.disable()},l.resolveOnRender=function(_){var w=this.map;w.on("render",function g(){w.loaded()&&(w.off("render",g),setTimeout(_,10))})},l.rejectOnError=function(_){var w=this.map;function g(){_(new Error(p.mapOnErrorMsg))}w.once("error",g),w.once("style.error",g),w.once("source.error",g),w.once("tile.error",g),w.once("layer.error",g)},l.createFramework=function(_){var w=this,g=w.div=document.createElement("div");g.id=w.uid,g.style.position="absolute",w.container.appendChild(g),w.xaxis={_id:"x",c2p:function(u){return w.project(u).x}},w.yaxis={_id:"y",c2p:function(u){return w.project(u).y}},w.updateFramework(_),w.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(w.mockAxis,_)},l.initFx=function(_,w){var g=this,u=g.gd,v=g.map;v.on("moveend",function(L){if(g.map){var z=u._fullLayout;if(L.originalEvent||g.wheeling){var F=z[g.id];E.call("_storeDirectGUIEdit",u.layout,z._preGUI,g.getViewEdits(F));var B=g.getView();F._input.center=F.center=B.center,F._input.zoom=F.zoom=B.zoom,F._input.bearing=F.bearing=B.bearing,F._input.pitch=F.pitch=B.pitch,u.emit("plotly_relayout",g.getViewEditsWithDerived(B))}L.originalEvent&&L.originalEvent.type==="mouseup"?g.dragging=!1:g.wheeling&&(g.wheeling=!1),z&&z._rehover&&z._rehover()}}),v.on("wheel",function(){g.wheeling=!0}),v.on("mousemove",function(L){var z=g.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},g.xaxis.p2c=function(){return v.unproject(F).lng},g.yaxis.p2c=function(){return v.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===g.id&&u._fullLayout[g.id]&&r.hover(u,L,g.id)},r.hover(u,L,g.id),u._fullLayout._hoversubplot=g.id});function y(){r.loneUnhover(w._hoverlayer)}v.on("dragstart",function(){g.dragging=!0,y()}),v.on("zoomstart",y),v.on("mouseout",function(){u._fullLayout._hoversubplot=null});function R(){var L=g.getView();u.emit("plotly_relayouting",g.getViewEditsWithDerived(L))}v.on("drag",R),v.on("zoom",R),v.on("dblclick",function(){var L=u._fullLayout[g.id];E.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,g.getViewEdits(L));var z=g.viewInitial;v.setCenter(M(z.center)),v.setZoom(z.zoom),v.setBearing(z.bearing),v.setPitch(z.pitch);var F=g.getView();L._input.center=L.center=F.center,L._input.zoom=L.zoom=F.zoom,L._input.bearing=L.bearing=F.bearing,L._input.pitch=L.pitch=F.pitch,u.emit("plotly_doubleclick",null),u.emit("plotly_relayout",g.getViewEditsWithDerived(F))}),g.clearOutline=function(){f(g.dragOptions),s(g.dragOptions.gd)},g.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&c(z.originalEvent,u,[g.xaxis],[g.yaxis],g.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(_){var w=this,g=w.map,u=w.gd;if(w.isStatic)return;function v(z){var F=w.map.unproject(z);return[F.lng,F.lat]}var y=_.dragmode,R;R=function(z,F){if(F.isRect){var B=z.range={};B[w.id]=[v([F.xmin,F.ymin]),v([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[w.id]=F.map(v)}};var L=w.dragOptions;w.dragOptions=b.extendDeep(L||{},{dragmode:_.dragmode,element:w.div,gd:u,plotinfo:{id:w.id,domain:_[w.id].domain,xaxis:w.xaxis,yaxis:w.yaxis,fillRangeItems:R},xaxes:[w.xaxis],yaxes:[w.yaxis],subplot:w.id}),g.off("click",w.onClickInPanHandler),i(y)||a(y)?(g.dragPan.disable(),g.on("zoomstart",w.clearOutline),w.dragOptions.prepFn=function(z,F,B){n(z,F,B,w.dragOptions,y)},t.init(w.dragOptions)):(g.dragPan.enable(),g.off("zoomstart",w.clearOutline),w.div.onmousedown=null,w.div.ontouchstart=null,w.div.removeEventListener("touchstart",w.div._ontouchstart),w.onClickInPanHandler=w.onClickInPanFn(w.dragOptions),g.on("click",w.onClickInPanHandler))},l.updateFramework=function(_){var w=_[this.id].domain,g=_._size,u=this.div.style;u.width=g.w*(w.x[1]-w.x[0])+"px",u.height=g.h*(w.y[1]-w.y[0])+"px",u.left=g.l+w.x[0]*g.w+"px",u.top=g.t+(1-w.y[1])*g.h+"px",this.xaxis._offset=g.l+w.x[0]*g.w,this.xaxis._length=g.w*(w.x[1]-w.x[0]),this.yaxis._offset=g.t+(1-w.y[1])*g.h,this.yaxis._length=g.h*(w.y[1]-w.y[0])},l.updateLayers=function(_){var w=_[this.id],g=w.layers,u=this.layerList,v;if(g.length!==u.length){for(v=0;v<u.length;v++)u[v].dispose();for(u=this.layerList=[],v=0;v<g.length;v++)u.push(d(this,v,g[v]))}else for(v=0;v<g.length;v++)u[v].update(g[v])},l.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},l.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},l.setOptions=function(_,w,g){for(var u in g)this.map[w](_,u,g[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(_,w){var g=this.map;if(typeof w=="string"){if(w===""){g.addLayer(_,w);return}for(var u=this.getMapLayers(),v=0;v<u.length;v++)if(w===u[v].id){g.addLayer(_,w);return}b.warn(["Trying to add layer with *below* value",w,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}g.addLayer(_)},l.project=function(_){return this.map.project(new h.LngLat(_[0],_[1]))},l.getView=function(){var _=this.map,w=_.getCenter(),g=w.lng,u=w.lat,v={lon:g,lat:u},y=_.getCanvas(),R=parseInt(y.style.width),L=parseInt(y.style.height);return{center:v,zoom:_.getZoom(),bearing:_.getBearing(),pitch:_.getPitch(),_derived:{coordinates:[_.unproject([0,0]).toArray(),_.unproject([R,0]).toArray(),_.unproject([R,L]).toArray(),_.unproject([0,L]).toArray()]}}},l.getViewEdits=function(_){for(var w=this.id,g=["center","zoom","bearing","pitch"],u={},v=0;v<g.length;v++){var y=g[v];u[w+"."+y]=_[y]}return u},l.getViewEditsWithDerived=function(_){var w=this.id,g=this.getViewEdits(_);return g[w+"._derived"]=_._derived,g};function x(_){var w={};return b.isPlainObject(_)?(w.id=_.id,w.style=_):typeof _=="string"?(w.id=_,p.stylesMap[_]?w.style=p.stylesMap[_]:w.style=_):(w.id=p.styleValueDflt,w.style=A(p.styleValueDflt)),w.transition={duration:0,delay:0},w}function A(_){return p.styleUrlPrefix+_+"-"+p.styleUrlSuffix}function M(_){return[_.lon,_.lat]}G.exports=T}}),qI=He({"src/plots/map/layout_defaults.js"(Y,G){var h=ea(),b=tp(),S=_h(),E=ay();G.exports=function(o,a,i){b(o,a,i,{type:"map",attributes:E,handleDefaults:e,partition:"y"})};function e(r,o,a){a("style"),a("center.lon"),a("center.lat"),a("zoom"),a("bearing"),a("pitch");var i=a("bounds.west"),n=a("bounds.east"),s=a("bounds.south"),f=a("bounds.north");(i===void 0||n===void 0||s===void 0||f===void 0)&&delete o.bounds,S(r,o,{name:"layers",handleItemDefaults:t}),o._input=r}function t(r,o){function a(p,d){return h.coerce(r,o,E.layers,p,d)}var i=a("visible");if(i){var n=a("sourcetype"),s=n==="raster"||n==="image";a("source"),a("sourceattribution"),n==="vector"&&a("sourcelayer"),n==="image"&&a("coordinates");var f;s&&(f="raster");var c=a("type",f);s&&c!=="raster"&&(c=o.type="raster",h.log("Source types *raster* and *image* must drawn *raster* layer type.")),a("below"),a("color"),a("opacity"),a("minzoom"),a("maxzoom"),c==="circle"&&a("circle.radius"),c==="line"&&(a("line.width"),a("line.dash")),c==="fill"&&a("fill.outlinecolor"),c==="symbol"&&(a("symbol.icon"),a("symbol.iconsize"),a("symbol.text"),h.coerceFont(a,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),a("symbol.textposition"),a("symbol.placement"))}}}}),gx=He({"src/plots/map/index.js"(Y){var G=ea(),h=G.strTranslate,b=G.strScale,S=ih().getSubplotCalcData,E=rv(),e=_i(),t=Io(),r=Zl(),o=VI(),a="map";Y.name=a,Y.attr="subplot",Y.idRoot=a,Y.idRegex=Y.attrRegex=G.counterRegex(a),Y.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Y.layoutAttributes=ay(),Y.supplyLayoutDefaults=qI(),Y.plot=function(n){for(var s=n._fullLayout,f=n.calcdata,c=s._subplots[a],p=0;p<c.length;p++){var d=c[p],T=S(f,a,d),l=s[d],m=l._subplot;m||(m=new o(n,d),s[d]._subplot=m),m.viewInitial||(m.viewInitial={center:G.extendFlat({},l.center),zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),m.plot(T,s,n._promises)}},Y.clean=function(i,n,s,f){for(var c=f._subplots[a]||[],p=0;p<c.length;p++){var d=c[p];!n[d]&&f[d]._subplot&&f[d]._subplot.destroy()}},Y.toSVG=function(i){for(var n=i._fullLayout,s=n._subplots[a],f=n._size,c=0;c<s.length;c++){var p=n[s[c]],d=p.domain,T=p._subplot,l=T.toImage("png"),m=n._glimages.append("svg:image");m.attr({xmlns:E.svg,"xlink:href":l,x:f.l+f.w*d.x[0],y:f.t+f.h*(1-d.y[1]),width:f.w*(d.x[1]-d.x[0]),height:f.h*(d.y[1]-d.y[0]),preserveAspectRatio:"none"});var x=e.select(p._subplot.div),A=x.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),M=n._glimages.append("g"),_=M.append("text");_.text(A).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":A});var w=t.bBox(_.node()),g=f.w*(d.x[1]-d.x[0]);if(w.width>g/2){var u=A.split("|").join("<br>");_.text(u).attr("data-unformatted",u).call(r.convertToTspans,i),w=t.bBox(_.node())}_.attr("transform",h(-3,-w.height+8)),M.insert("rect",".static-attribution").attr({x:-w.width-6,y:-w.height-3,width:w.width+6,height:w.height+3,fill:"rgba(255, 255, 255, 0.75)"});var v=1;w.width+6>g&&(v=g/(w.width+6));var y=[f.l+f.w*d.x[1],f.t+f.h*(1-d.y[0])];M.attr("transform",h(y[0],y[1])+b(v))}},Y.updateFx=function(i){for(var n=i._fullLayout,s=n._subplots[a],f=0;f<s.length;f++){var c=n[s[f]]._subplot;c.updateFx(n)}}}}),GI=He({"src/traces/scattermap/index.js"(Y,G){G.exports={attributes:dx(),supplyDefaults:zI(),colorbar:xh(),formatLabels:WT(),calc:H_(),plot:OI(),hoverPoints:px().hoverPoints,eventData:BI(),selectPoints:NI(),styleOnSelect:function(h,b){if(b){var S=b[0].trace;S._glTrace.update(b)}},moduleType:"trace",name:"scattermap",basePlotModule:gx(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}}),HI=He({"lib/scattermap.js"(Y,G){G.exports=GI()}}),ZT=He({"src/traces/choroplethmap/attributes.js"(Y,G){var h=pg(),b=ou(),{hovertemplateAttrs:S,templatefallbackAttrs:E}=Ll(),e=Nl(),t=Po().extendFlat;G.exports=t({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:t({},h.featureidkey,{}),below:{valType:"string",editType:"plot"},text:h.text,hovertext:h.hovertext,marker:{line:{color:t({},h.marker.line.color,{editType:"plot"}),width:t({},h.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:t({},h.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:t({},h.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:t({},h.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:h.hoverinfo,hovertemplate:S({},{keys:["properties"]}),hovertemplatefallback:E(),showlegend:t({},e.showlegend,{dflt:!1})},b("",{cLetter:"z",editTypeOverride:"calc"}))}}),WI=He({"src/traces/choroplethmap/defaults.js"(Y,G){var h=ea(),b=Uf(),S=ZT();G.exports=function(e,t,r,o){function a(c,p){return h.coerce(e,t,S,c,p)}var i=a("locations"),n=a("z"),s=a("geojson");if(!h.isArrayOrTypedArray(i)||!i.length||!h.isArrayOrTypedArray(n)||!n.length||!(typeof s=="string"&&s!==""||h.isPlainObject(s))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(i.length,n.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),b(e,t,o,a,{prefix:"",cLetter:"z"}),h.coerceSelectionMarkerOpacity(t,a)}}}),YT=He({"src/traces/choroplethmap/convert.js"(Y,G){var h=Ui(),b=ea(),S=Du(),E=Io(),e=fp().makeBlank,t=hp();function r(a){var i=a[0].trace,n=i.visible===!0&&i._length!==0,s={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},c=i._opts={fill:s,line:f,geojson:e()};if(!n)return c;var p=t.extractTraceFeature(a);if(!p)return c;var d=S.makeColorScaleFuncFromTrace(i),T=i.marker,l=T.line||{},m;b.isArrayOrTypedArray(T.opacity)&&(m=function(v){var y=v.mo;return h(y)?+b.constrain(y,0,1):0});var x;b.isArrayOrTypedArray(l.color)&&(x=function(v){return v.mlc});var A;b.isArrayOrTypedArray(l.width)&&(A=function(v){return v.mlw});for(var M=0;M<a.length;M++){var _=a[M],w=_.fOut;if(w){var g=w.properties;g.fc=d(_.z),m&&(g.mo=m(_)),x&&(g.mlc=x(_)),A&&(g.mlw=A(_)),_.ct=g.ct,_._polygons=t.feature2polygons(w)}}var u=m?{type:"identity",property:"mo"}:T.opacity;return b.extendFlat(s.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":u}),b.extendFlat(f.paint,{"line-color":x?{type:"identity",property:"mlc"}:l.color,"line-width":A?{type:"identity",property:"mlw"}:l.width,"line-opacity":u}),s.layout.visibility="visible",f.layout.visibility="visible",c.geojson={type:"FeatureCollection",features:p},o(a),c}function o(a){var i=a[0].trace,n=i._opts,s;if(i.selectedpoints){for(var f=E.makeSelectedPointStyleFns(i),c=0;c<a.length;c++){var p=a[c];p.fOut&&(p.fOut.properties.mo2=f.selectedOpacityFn(p))}s={type:"identity",property:"mo2"}}else s=b.isArrayOrTypedArray(i.marker.opacity)?{type:"identity",property:"mo"}:i.marker.opacity;return b.extendFlat(n.fill.paint,{"fill-opacity":s}),b.extendFlat(n.line.paint,{"line-opacity":s}),n}G.exports={convert:r,convertOnSelect:o}}}),XI=He({"src/traces/choroplethmap/plot.js"(Y,G){var h=YT().convert,b=YT().convertOnSelect,S=gp().traceLayerPrefix;function E(t,r){this.type="choroplethmap",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",S+r+"-fill"],["line",S+r+"-line"]],this.below=null}var e=E.prototype;e.update=function(t){this._update(h(t)),t[0].trace._glTrace=this},e.updateOnSelect=function(t){this._update(b(t))},e._update=function(t){var r=this.subplot,o=this.layerList,a=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(t.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(t,a),this.below=a);for(var i=0;i<o.length;i++){var n=o[i],s=n[0],f=n[1],c=t[s];r.setOptions(f,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&r.setOptions(f,"setPaintProperty",c.paint)}},e._addLayers=function(t,r){for(var o=this.subplot,a=this.layerList,i=this.sourceId,n=0;n<a.length;n++){var s=a[n],f=s[0],c=t[f];o.addLayer({type:f,id:s[1],source:i,layout:c.layout,paint:c.paint},r)}},e._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,o=r.length-1;o>=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},G.exports=function(r,o){var a=o[0].trace,i=new E(r,a.uid),n=i.sourceId,s=h(o),f=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,f),o[0].trace._glTrace=i,i}}}),ZI=He({"src/traces/choroplethmap/index.js"(Y,G){G.exports={attributes:ZT(),supplyDefaults:WI(),colorbar:ep(),calc:Y_(),plot:XI(),hoverPoints:$_(),eventData:J_(),selectPoints:Q_(),styleOnSelect:function(h,b){if(b){var S=b[0].trace;S._glTrace.updateOnSelect(b)}},getBelow:function(h,b){for(var S=b.getMapLayers(),E=S.length-2;E>=0;E--){var e=S[E].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=E+1;t<S.length;t++)if(e=S[t].id,typeof e=="string"&&e.indexOf("plotly-")===-1)return e}}},moduleType:"trace",name:"choroplethmap",basePlotModule:gx(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}}}),YI=He({"lib/choroplethmap.js"(Y,G){G.exports=ZI()}}),KT=He({"src/traces/densitymap/attributes.js"(Y,G){var h=ou(),{hovertemplateAttrs:b,templatefallbackAttrs:S}=Ll(),E=Nl(),e=dx(),t=Po().extendFlat;G.exports=t({lon:e.lon,lat:e.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:e.text,hovertext:e.hovertext,hoverinfo:t({},E.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:b(),hovertemplatefallback:S(),showlegend:t({},E.showlegend,{dflt:!1})},h("",{cLetter:"z",editTypeOverride:"calc"}))}}),KI=He({"src/traces/densitymap/defaults.js"(Y,G){var h=ea(),b=Uf(),S=KT();G.exports=function(e,t,r,o){function a(f,c){return h.coerce(e,t,S,f,c)}var i=a("lon")||[],n=a("lat")||[],s=Math.min(i.length,n.length);if(!s){t.visible=!1;return}t._length=s,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),b(e,t,o,a,{prefix:"",cLetter:"z"})}}}),$I=He({"src/traces/densitymap/calc.js"(Y,G){var h=Ui(),b=ea().isArrayOrTypedArray,S=Qo().BADNUM,E=Eh(),e=ea()._;G.exports=function(r,o){for(var a=o._length,i=new Array(a),n=o.z,s=b(n)&&n.length,f=0;f<a;f++){var c=i[f]={},p=o.lon[f],d=o.lat[f];if(c.lonlat=h(p)&&h(d)?[+p,+d]:[S,S],s){var T=n[f];c.z=h(T)?T:S}}return E(r,o,{vals:s?n:[0,1],containerStr:"",cLetter:"z"}),a&&(i[0].t={labels:{lat:e(r,"lat:")+" ",lon:e(r,"lon:")+" "}}),i}}}),JI=He({"src/traces/densitymap/convert.js"(Y,G){var h=Ui(),b=ea(),S=Di(),E=Du(),e=Qo().BADNUM,t=fp().makeBlank;G.exports=function(o){var a=o[0].trace,i=a.visible===!0&&a._length!==0,n={layout:{visibility:"none"},paint:{}},s=a._opts={heatmap:n,geojson:t()};if(!i)return s;var f=[],c,p=a.z,d=a.radius,T=b.isArrayOrTypedArray(p)&&p.length,l=b.isArrayOrTypedArray(d);for(c=0;c<o.length;c++){var m=o[c],x=m.lonlat;if(x[0]!==e){var A={};if(T){var M=m.z;A.z=M!==e?M:0}l&&(A.r=h(d[c])&&d[c]>0?+d[c]:0),f.push({type:"Feature",geometry:{type:"Point",coordinates:x},properties:A})}}var _=E.extractOpts(a),w=_.reversescale?E.flipScale(_.colorscale):_.colorscale,g=w[0][1],u=S.opacity(g)<1?g:S.addOpacity(g,0),v=["interpolate",["linear"],["heatmap-density"],0,u];for(c=1;c<w.length;c++)v.push(w[c][0],w[c][1]);var y=["interpolate",["linear"],["get","z"],_.min,0,_.max,1];return b.extendFlat(s.heatmap.paint,{"heatmap-weight":T?y:1/(_.max-_.min),"heatmap-color":v,"heatmap-radius":l?{type:"identity",property:"r"}:a.radius,"heatmap-opacity":a.opacity}),s.geojson={type:"FeatureCollection",features:f},s.heatmap.layout.visibility="visible",s}}}),QI=He({"src/traces/densitymap/plot.js"(Y,G){var h=JI(),b=gp().traceLayerPrefix;function S(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",b+t+"-heatmap"]],this.below=null}var E=S.prototype;E.update=function(e){var t=this.subplot,r=this.layerList,o=h(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(o.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(o,a),this.below=a);for(var i=0;i<r.length;i++){var n=r[i],s=n[0],f=n[1],c=o[s];t.setOptions(f,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&t.setOptions(f,"setPaintProperty",c.paint)}},E._addLayers=function(e,t){for(var r=this.subplot,o=this.layerList,a=this.sourceId,i=0;i<o.length;i++){var n=o[i],s=n[0],f=e[s];r.addLayer({type:s,id:n[1],source:a,layout:f.layout,paint:f.paint},t)}},E._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},G.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),i=a.sourceId,n=h(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),e4=He({"src/traces/densitymap/hover.js"(Y,G){var h=Ao(),b=px().hoverPoints,S=px().getExtraText;G.exports=function(e,t,r){var o=b(e,t,r);if(o){var a=o[0],i=a.cd,n=i[0].trace,s=i[a.index];if(delete a.color,"z"in s){var f=a.subplot.mockAxis;a.z=s.z,a.zLabel=h.tickText(f,f.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),t4=He({"src/traces/densitymap/event_data.js"(Y,G){G.exports=function(b,S){return b.lon=S.lon,b.lat=S.lat,b.z=S.z,b}}}),r4=He({"src/traces/densitymap/index.js"(Y,G){G.exports={attributes:KT(),supplyDefaults:KI(),colorbar:ep(),formatLabels:WT(),calc:$I(),plot:QI(),hoverPoints:e4(),eventData:t4(),getBelow:function(h,b){for(var S=b.getMapLayers(),E=0;E<S.length;E++){var e=S[E],t=e.id;if(e.type==="symbol"&&typeof t=="string"&&t.indexOf("plotly-")===-1)return t}},moduleType:"trace",name:"densitymap",basePlotModule:gx(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}}}),a4=He({"lib/densitymap.js"(Y,G){G.exports=r4()}}),$T=He({"src/traces/sankey/attributes.js"(Y,G){var h=Ru(),b=Nl(),S=Mf(),E=O0(),e=ic().attributes,{hovertemplateAttrs:t,templatefallbackAttrs:r}=Ll(),o=ou(),a=xl().templatedArray,i=Ec().descriptionOnlyNumbers,n=Po().extendFlat,s=Zu().overrideAll;G.exports=s({hoverinfo:n({},b.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:E.hoverlabel,domain:e({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:i("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:h({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:E.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),hovertemplatefallback:r(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:E.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),hovertemplatefallback:r(),colorscales:a("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:n(o().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}}),n4=He({"src/traces/sankey/defaults.js"(Y,G){var h=ea(),b=$T(),S=Di(),E=Zf(),e=ic().defaults,t=am(),r=xl(),o=_h();G.exports=function(n,s,f,c){function p(L,z){return h.coerce(n,s,b,L,z)}var d=h.extendDeep(c.hoverlabel,n.hoverlabel),T=n.node,l=r.newContainer(s,"node");function m(L,z){return h.coerce(T,l,b.node,L,z)}m("label"),m("groups"),m("x"),m("y"),m("pad"),m("thickness"),m("line.color"),m("line.width"),m("hoverinfo",n.hoverinfo),t(T,l,m,d),m("hovertemplate"),m("align");var x=c.colorway,A=function(L){return x[L%x.length]};m("color",l.label.map(function(L,z){return S.addOpacity(A(z),.8)})),m("customdata");var M=n.link||{},_=r.newContainer(s,"link");function w(L,z){return h.coerce(M,_,b.link,L,z)}w("label"),w("arrowlen"),w("source"),w("target"),w("value"),w("line.color"),w("line.width"),w("hoverinfo",n.hoverinfo),t(M,_,w,d),w("hovertemplate");var g=E(c.paper_bgcolor).getLuminance()<.333,u=g?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",v=w("color",u);function y(L){var z=E(L);if(!z.isValid())return L;var F=z.getAlpha();return F<=.8?z.setAlpha(F+.2):z=g?z.brighten():z.darken(),z.toRgbString()}w("hovercolor",Array.isArray(v)?v.map(y):y(v)),w("customdata"),o(M,_,{name:"colorscales",handleItemDefaults:a}),e(s,c,p),p("orientation"),p("valueformat"),p("valuesuffix");var R;l.x.length&&l.y.length&&(R="freeform"),p("arrangement",R),h.coerceFont(p,"textfont",c.font,{autoShadowDflt:!0}),s._length=null};function a(i,n){function s(f,c){return h.coerce(i,n,b.link.colorscales,f,c)}s("label"),s("cmin"),s("cmax"),s("colorscale")}}}),JT=He({"node_modules/strongly-connected-components/scc.js"(Y,G){G.exports=h;function h(b){for(var S=b.length,E=new Array(S),e=new Array(S),t=new Array(S),r=new Array(S),o=new Array(S),a=new Array(S),i=0;i<S;++i)E[i]=-1,e[i]=0,t[i]=!1,r[i]=0,o[i]=-1,a[i]=[];var n=0,s=[],f=[];function c(l){var m=[l],x=[l];for(E[l]=e[l]=n,t[l]=!0,n+=1;x.length>0;){l=x[x.length-1];var A=b[l];if(r[l]<A.length){for(var M=r[l];M<A.length;++M){var _=A[M];if(E[_]<0){E[_]=e[_]=n,t[_]=!0,n+=1,m.push(_),x.push(_);break}else t[_]&&(e[l]=Math.min(e[l],e[_])|0);o[_]>=0&&a[l].push(o[_])}r[l]=M}else{if(e[l]===E[l]){for(var w=[],g=[],u=0,M=m.length-1;M>=0;--M){var v=m[M];if(t[v]=!1,w.push(v),g.push(a[v]),u+=a[v].length,o[v]=s.length,v===l){m.length=M;break}}s.push(w);for(var y=new Array(u),M=0;M<g.length;M++)for(var R=0;R<g[M].length;R++)y[--u]=g[M][R];f.push(y)}x.pop()}}}for(var i=0;i<S;++i)E[i]<0&&c(i);for(var p,i=0;i<f.length;i++){var d=f[i];if(d.length!==0){d.sort(function(m,x){return m-x}),p=[d[0]];for(var T=1;T<d.length;T++)d[T]!==d[T-1]&&p.push(d[T]);f[i]=p}}return{components:s,adjacencyList:f}}}}),i4=He({"src/traces/sankey/calc.js"(Y,G){var h=JT(),b=ea(),S=Jv().wrap,E=b.isArrayOrTypedArray,e=b.isIndex,t=Du();function r(a){var i=a.node,n=a.link,s=[],f=E(n.color),c=E(n.hovercolor),p=E(n.customdata),d={},T={},l=n.colorscales.length,m;for(m=0;m<l;m++){var x=n.colorscales[m],A=t.extractScale(x,{cLetter:"c"}),M=t.makeColorScaleFunc(A);T[x.label]=M}var _=0;for(m=0;m<n.value.length;m++)n.source[m]>_&&(_=n.source[m]),n.target[m]>_&&(_=n.target[m]);var w=_+1;a.node._count=w;var g,u=a.node.groups,v={};for(m=0;m<u.length;m++){var y=u[m];for(g=0;g<y.length;g++){var R=y[g],L=w+m;v.hasOwnProperty(R)?b.warn("Node "+R+" is already part of a group."):v[R]=L}}var z={source:[],target:[]};for(m=0;m<n.value.length;m++){var F=n.value[m],B=n.source[m],O=n.target[m];if(F>0&&e(B,w)&&e(O,w)&&!(v.hasOwnProperty(B)&&v.hasOwnProperty(O)&&v[B]===v[O])){v.hasOwnProperty(O)&&(O=v[O]),v.hasOwnProperty(B)&&(B=v[B]),B=+B,O=+O,d[B]=d[O]=!0;var I="";n.label&&n.label[m]&&(I=n.label[m]);var N=null;I&&T.hasOwnProperty(I)&&(N=T[I]),s.push({pointNumber:m,label:I,color:f?n.color[m]:n.color,hovercolor:c?n.hovercolor[m]:n.hovercolor,customdata:p?n.customdata[m]:n.customdata,concentrationscale:N,source:B,target:O,value:+F}),z.source.push(B),z.target.push(O)}}var U=w+u.length,X=E(i.color),ee=E(i.customdata),ue=[];for(m=0;m<U;m++)if(d[m]){var oe=i.label[m];ue.push({group:m>w-1,childrenNodes:[],pointNumber:m,label:oe,color:X?i.color[m]:i.color,customdata:ee?i.customdata[m]:i.customdata})}var le=!1;return o(U,z.source,z.target)&&(le=!0),{circular:le,links:s,nodes:ue,groups:u,groupLookup:v}}function o(a,i,n){for(var s=b.init2dArray(a,0),f=0;f<Math.min(i.length,n.length);f++)if(b.isIndex(i[f],a)&&b.isIndex(n[f],a)){if(i[f]===n[f])return!0;s[i[f]].push(n[f])}var c=h(s);return c.components.some(function(p){return p.length>1})}G.exports=function(i,n){var s=r(n);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),o4=He({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=h||self,b(h.d3=h.d3||{}))})(Y,function(h){function b(w){var g=+this._x.call(null,w),u=+this._y.call(null,w);return S(this.cover(g,u),g,u,w)}function S(w,g,u,v){if(isNaN(g)||isNaN(u))return w;var y,R=w._root,L={data:v},z=w._x0,F=w._y0,B=w._x1,O=w._y1,I,N,U,X,ee,ue,oe,le;if(!R)return w._root=L,w;for(;R.length;)if((ee=g>=(I=(z+B)/2))?z=I:B=I,(ue=u>=(N=(F+O)/2))?F=N:O=N,y=R,!(R=R[oe=ue<<1|ee]))return y[oe]=L,w;if(U=+w._x.call(null,R.data),X=+w._y.call(null,R.data),g===U&&u===X)return L.next=R,y?y[oe]=L:w._root=L,w;do y=y?y[oe]=new Array(4):w._root=new Array(4),(ee=g>=(I=(z+B)/2))?z=I:B=I,(ue=u>=(N=(F+O)/2))?F=N:O=N;while((oe=ue<<1|ee)===(le=(X>=N)<<1|U>=I));return y[le]=R,y[oe]=L,w}function E(w){var g,u,v=w.length,y,R,L=new Array(v),z=new Array(v),F=1/0,B=1/0,O=-1/0,I=-1/0;for(u=0;u<v;++u)isNaN(y=+this._x.call(null,g=w[u]))||isNaN(R=+this._y.call(null,g))||(L[u]=y,z[u]=R,y<F&&(F=y),y>O&&(O=y),R<B&&(B=R),R>I&&(I=R));if(F>O||B>I)return this;for(this.cover(F,B).cover(O,I),u=0;u<v;++u)S(this,L[u],z[u],w[u]);return this}function e(w,g){if(isNaN(w=+w)||isNaN(g=+g))return this;var u=this._x0,v=this._y0,y=this._x1,R=this._y1;if(isNaN(u))y=(u=Math.floor(w))+1,R=(v=Math.floor(g))+1;else{for(var L=y-u,z=this._root,F,B;u>w||w>=y||v>g||g>=R;)switch(B=(g<v)<<1|w<u,F=new Array(4),F[B]=z,z=F,L*=2,B){case 0:y=u+L,R=v+L;break;case 1:u=y-L,R=v+L;break;case 2:y=u+L,v=R-L;break;case 3:u=y-L,v=R-L;break}this._root&&this._root.length&&(this._root=z)}return this._x0=u,this._y0=v,this._x1=y,this._y1=R,this}function t(){var w=[];return this.visit(function(g){if(!g.length)do w.push(g.data);while(g=g.next)}),w}function r(w){return arguments.length?this.cover(+w[0][0],+w[0][1]).cover(+w[1][0],+w[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function o(w,g,u,v,y){this.node=w,this.x0=g,this.y0=u,this.x1=v,this.y1=y}function a(w,g,u){var v,y=this._x0,R=this._y0,L,z,F,B,O=this._x1,I=this._y1,N=[],U=this._root,X,ee;for(U&&N.push(new o(U,y,R,O,I)),u==null?u=1/0:(y=w-u,R=g-u,O=w+u,I=g+u,u*=u);X=N.pop();)if(!(!(U=X.node)||(L=X.x0)>O||(z=X.y0)>I||(F=X.x1)<y||(B=X.y1)<R))if(U.length){var ue=(L+F)/2,oe=(z+B)/2;N.push(new o(U[3],ue,oe,F,B),new o(U[2],L,oe,ue,B),new o(U[1],ue,z,F,oe),new o(U[0],L,z,ue,oe)),(ee=(g>=oe)<<1|w>=ue)&&(X=N[N.length-1],N[N.length-1]=N[N.length-1-ee],N[N.length-1-ee]=X)}else{var le=w-+this._x.call(null,U.data),V=g-+this._y.call(null,U.data),J=le*le+V*V;if(J<u){var te=Math.sqrt(u=J);y=w-te,R=g-te,O=w+te,I=g+te,v=U.data}}return v}function i(w){if(isNaN(O=+this._x.call(null,w))||isNaN(I=+this._y.call(null,w)))return this;var g,u=this._root,v,y,R,L=this._x0,z=this._y0,F=this._x1,B=this._y1,O,I,N,U,X,ee,ue,oe;if(!u)return this;if(u.length)for(;;){if((X=O>=(N=(L+F)/2))?L=N:F=N,(ee=I>=(U=(z+B)/2))?z=U:B=U,g=u,!(u=u[ue=ee<<1|X]))return this;if(!u.length)break;(g[ue+1&3]||g[ue+2&3]||g[ue+3&3])&&(v=g,oe=ue)}for(;u.data!==w;)if(y=u,!(u=u.next))return this;return(R=u.next)&&delete u.next,y?(R?y.next=R:delete y.next,this):g?(R?g[ue]=R:delete g[ue],(u=g[0]||g[1]||g[2]||g[3])&&u===(g[3]||g[2]||g[1]||g[0])&&!u.length&&(v?v[oe]=u:this._root=u),this):(this._root=R,this)}function n(w){for(var g=0,u=w.length;g<u;++g)this.remove(w[g]);return this}function s(){return this._root}function f(){var w=0;return this.visit(function(g){if(!g.length)do++w;while(g=g.next)}),w}function c(w){var g=[],u,v=this._root,y,R,L,z,F;for(v&&g.push(new o(v,this._x0,this._y0,this._x1,this._y1));u=g.pop();)if(!w(v=u.node,R=u.x0,L=u.y0,z=u.x1,F=u.y1)&&v.length){var B=(R+z)/2,O=(L+F)/2;(y=v[3])&&g.push(new o(y,B,O,z,F)),(y=v[2])&&g.push(new o(y,R,O,B,F)),(y=v[1])&&g.push(new o(y,B,L,z,O)),(y=v[0])&&g.push(new o(y,R,L,B,O))}return this}function p(w){var g=[],u=[],v;for(this._root&&g.push(new o(this._root,this._x0,this._y0,this._x1,this._y1));v=g.pop();){var y=v.node;if(y.length){var R,L=v.x0,z=v.y0,F=v.x1,B=v.y1,O=(L+F)/2,I=(z+B)/2;(R=y[0])&&g.push(new o(R,L,z,O,I)),(R=y[1])&&g.push(new o(R,O,z,F,I)),(R=y[2])&&g.push(new o(R,L,I,O,B)),(R=y[3])&&g.push(new o(R,O,I,F,B))}u.push(v)}for(;v=u.pop();)w(v.node,v.x0,v.y0,v.x1,v.y1);return this}function d(w){return w[0]}function T(w){return arguments.length?(this._x=w,this):this._x}function l(w){return w[1]}function m(w){return arguments.length?(this._y=w,this):this._y}function x(w,g,u){var v=new A(g??d,u??l,NaN,NaN,NaN,NaN);return w==null?v:v.addAll(w)}function A(w,g,u,v,y,R){this._x=w,this._y=g,this._x0=u,this._y0=v,this._x1=y,this._y1=R,this._root=void 0}function M(w){for(var g={data:w.data},u=g;w=w.next;)u=u.next={data:w.data};return g}var _=x.prototype=A.prototype;_.copy=function(){var w=new A(this._x,this._y,this._x0,this._y0,this._x1,this._y1),g=this._root,u,v;if(!g)return w;if(!g.length)return w._root=M(g),w;for(u=[{source:g,target:w._root=new Array(4)}];g=u.pop();)for(var y=0;y<4;++y)(v=g.source[y])&&(v.length?u.push({source:v,target:g.target[y]=new Array(4)}):g.target[y]=M(v));return w},_.add=b,_.addAll=E,_.cover=e,_.data=t,_.extent=r,_.find=a,_.remove=i,_.removeAll=n,_.root=s,_.size=f,_.visit=c,_.visitAfter=p,_.x=T,_.y=m,h.quadtree=x,Object.defineProperty(h,"__esModule",{value:!0})})}}),mx=He({"node_modules/d3-collection/dist/d3-collection.js"(Y,G){(function(h,b){b(typeof Y=="object"&&typeof G<"u"?Y:h.d3=h.d3||{})})(Y,function(h){var b="$";function S(){}S.prototype=E.prototype={constructor:S,has:function(d){return b+d in this},get:function(d){return this[b+d]},set:function(d,T){return this[b+d]=T,this},remove:function(d){var T=b+d;return T in this&&delete this[T]},clear:function(){for(var d in this)d[0]===b&&delete this[d]},keys:function(){var d=[];for(var T in this)T[0]===b&&d.push(T.slice(1));return d},values:function(){var d=[];for(var T in this)T[0]===b&&d.push(this[T]);return d},entries:function(){var d=[];for(var T in this)T[0]===b&&d.push({key:T.slice(1),value:this[T]});return d},size:function(){var d=0;for(var T in this)T[0]===b&&++d;return d},empty:function(){for(var d in this)if(d[0]===b)return!1;return!0},each:function(d){for(var T in this)T[0]===b&&d(this[T],T.slice(1),this)}};function E(d,T){var l=new S;if(d instanceof S)d.each(function(_,w){l.set(w,_)});else if(Array.isArray(d)){var m=-1,x=d.length,A;if(T==null)for(;++m<x;)l.set(m,d[m]);else for(;++m<x;)l.set(T(A=d[m],m,d),A)}else if(d)for(var M in d)l.set(M,d[M]);return l}function e(){var d=[],T=[],l,m,x;function A(_,w,g,u){if(w>=d.length)return l!=null&&_.sort(l),m!=null?m(_):_;for(var v=-1,y=_.length,R=d[w++],L,z,F=E(),B,O=g();++v<y;)(B=F.get(L=R(z=_[v])+""))?B.push(z):F.set(L,[z]);return F.each(function(I,N){u(O,N,A(I,w,g,u))}),O}function M(_,w){if(++w>d.length)return _;var g,u=T[w-1];return m!=null&&w>=d.length?g=_.entries():(g=[],_.each(function(v,y){g.push({key:y,values:M(v,w)})})),u!=null?g.sort(function(v,y){return u(v.key,y.key)}):g}return x={object:function(_){return A(_,0,t,r)},map:function(_){return A(_,0,o,a)},entries:function(_){return M(A(_,0,o,a),0)},key:function(_){return d.push(_),x},sortKeys:function(_){return T[d.length-1]=_,x},sortValues:function(_){return l=_,x},rollup:function(_){return m=_,x}}}function t(){return{}}function r(d,T,l){d[T]=l}function o(){return E()}function a(d,T,l){d.set(T,l)}function i(){}var n=E.prototype;i.prototype=s.prototype={constructor:i,has:n.has,add:function(d){return d+="",this[b+d]=d,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each};function s(d,T){var l=new i;if(d instanceof i)d.each(function(A){l.add(A)});else if(d){var m=-1,x=d.length;if(T==null)for(;++m<x;)l.add(d[m]);else for(;++m<x;)l.add(T(d[m],m,d))}return l}function f(d){var T=[];for(var l in d)T.push(l);return T}function c(d){var T=[];for(var l in d)T.push(d[l]);return T}function p(d){var T=[];for(var l in d)T.push({key:l,value:d[l]});return T}h.nest=e,h.set=s,h.map=E,h.keys=f,h.values=c,h.entries=p,Object.defineProperty(h,"__esModule",{value:!0})})}}),s4=He({"node_modules/d3-dispatch/dist/d3-dispatch.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=h||self,b(h.d3=h.d3||{}))})(Y,function(h){var b={value:function(){}};function S(){for(var o=0,a=arguments.length,i={},n;o<a;++o){if(!(n=arguments[o]+"")||n in i||/[\s.]/.test(n))throw new Error("illegal type: "+n);i[n]=[]}return new E(i)}function E(o){this._=o}function e(o,a){return o.trim().split(/^|\s+/).map(function(i){var n="",s=i.indexOf(".");if(s>=0&&(n=i.slice(s+1),i=i.slice(0,s)),i&&!a.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}E.prototype=S.prototype={constructor:E,on:function(o,a){var i=this._,n=e(o+"",i),s,f=-1,c=n.length;if(arguments.length<2){for(;++f<c;)if((s=(o=n[f]).type)&&(s=t(i[s],o.name)))return s;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++f<c;)if(s=(o=n[f]).type)i[s]=r(i[s],o.name,a);else if(a==null)for(s in i)i[s]=r(i[s],o.name,null);return this},copy:function(){var o={},a=this._;for(var i in a)o[i]=a[i].slice();return new E(o)},call:function(o,a){if((s=arguments.length-2)>0)for(var i=new Array(s),n=0,s,f;n<s;++n)i[n]=arguments[n+2];if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(f=this._[o],n=0,s=f.length;n<s;++n)f[n].value.apply(a,i)},apply:function(o,a,i){if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(var n=this._[o],s=0,f=n.length;s<f;++s)n[s].value.apply(a,i)}};function t(o,a){for(var i=0,n=o.length,s;i<n;++i)if((s=o[i]).name===a)return s.value}function r(o,a,i){for(var n=0,s=o.length;n<s;++n)if(o[n].name===a){o[n]=b,o=o.slice(0,n).concat(o.slice(n+1));break}return i!=null&&o.push({name:a,value:i}),o}h.dispatch=S,Object.defineProperty(h,"__esModule",{value:!0})})}}),l4=He({"node_modules/d3-timer/dist/d3-timer.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=h||self,b(h.d3=h.d3||{}))})(Y,function(h){var b=0,S=0,E=0,e=1e3,t,r,o=0,a=0,i=0,n=typeof performance=="object"&&performance.now?performance:Date,s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(w){setTimeout(w,17)};function f(){return a||(s(c),a=n.now()+i)}function c(){a=0}function p(){this._call=this._time=this._next=null}p.prototype=d.prototype={constructor:p,restart:function(w,g,u){if(typeof w!="function")throw new TypeError("callback is not a function");u=(u==null?f():+u)+(g==null?0:+g),!this._next&&r!==this&&(r?r._next=this:t=this,r=this),this._call=w,this._time=u,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};function d(w,g,u){var v=new p;return v.restart(w,g,u),v}function T(){f(),++b;for(var w=t,g;w;)(g=a-w._time)>=0&&w._call.call(null,g),w=w._next;--b}function l(){a=(o=n.now())+i,b=S=0;try{T()}finally{b=0,x(),a=0}}function m(){var w=n.now(),g=w-o;g>e&&(i-=g,o=w)}function x(){for(var w,g=t,u,v=1/0;g;)g._call?(v>g._time&&(v=g._time),w=g,g=g._next):(u=g._next,g._next=null,g=w?w._next=u:t=u);r=w,A(v)}function A(w){if(!b){S&&(S=clearTimeout(S));var g=w-a;g>24?(w<1/0&&(S=setTimeout(l,w-n.now()-i)),E&&(E=clearInterval(E))):(E||(o=n.now(),E=setInterval(m,e)),b=1,s(l))}}function M(w,g,u){var v=new p;return g=g==null?0:+g,v.restart(function(y){v.stop(),w(y+g)},g,u),v}function _(w,g,u){var v=new p,y=g;return g==null?(v.restart(w,g,u),v):(g=+g,u=u==null?f():+u,v.restart(function R(L){L+=y,v.restart(R,y+=g,u),w(L)},g,u),v)}h.interval=_,h.now=f,h.timeout=M,h.timer=d,h.timerFlush=T,Object.defineProperty(h,"__esModule",{value:!0})})}}),u4=He({"node_modules/d3-force/dist/d3-force.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,o4(),mx(),s4(),l4()):b(h.d3=h.d3||{},h.d3,h.d3,h.d3,h.d3)})(Y,function(h,b,S,E,e){function t(w,g){var u;w==null&&(w=0),g==null&&(g=0);function v(){var y,R=u.length,L,z=0,F=0;for(y=0;y<R;++y)L=u[y],z+=L.x,F+=L.y;for(z=z/R-w,F=F/R-g,y=0;y<R;++y)L=u[y],L.x-=z,L.y-=F}return v.initialize=function(y){u=y},v.x=function(y){return arguments.length?(w=+y,v):w},v.y=function(y){return arguments.length?(g=+y,v):g},v}function r(w){return function(){return w}}function o(){return(Math.random()-.5)*1e-6}function a(w){return w.x+w.vx}function i(w){return w.y+w.vy}function n(w){var g,u,v=1,y=1;typeof w!="function"&&(w=r(w==null?1:+w));function R(){for(var F,B=g.length,O,I,N,U,X,ee,ue=0;ue<y;++ue)for(O=b.quadtree(g,a,i).visitAfter(L),F=0;F<B;++F)I=g[F],X=u[I.index],ee=X*X,N=I.x+I.vx,U=I.y+I.vy,O.visit(oe);function oe(le,V,J,te,Z){var se=le.data,Q=le.r,q=X+Q;if(se){if(se.index>I.index){var re=N-se.x-se.vx,ae=U-se.y-se.vy,fe=re*re+ae*ae;fe<q*q&&(re===0&&(re=o(),fe+=re*re),ae===0&&(ae=o(),fe+=ae*ae),fe=(q-(fe=Math.sqrt(fe)))/fe*v,I.vx+=(re*=fe)*(q=(Q*=Q)/(ee+Q)),I.vy+=(ae*=fe)*q,se.vx-=re*(q=1-q),se.vy-=ae*q)}return}return V>N+q||te<N-q||J>U+q||Z<U-q}}function L(F){if(F.data)return F.r=u[F.data.index];for(var B=F.r=0;B<4;++B)F[B]&&F[B].r>F.r&&(F.r=F[B].r)}function z(){if(g){var F,B=g.length,O;for(u=new Array(B),F=0;F<B;++F)O=g[F],u[O.index]=+w(O,F,g)}}return R.initialize=function(F){g=F,z()},R.iterations=function(F){return arguments.length?(y=+F,R):y},R.strength=function(F){return arguments.length?(v=+F,R):v},R.radius=function(F){return arguments.length?(w=typeof F=="function"?F:r(+F),z(),R):w},R}function s(w){return w.index}function f(w,g){var u=w.get(g);if(!u)throw new Error("missing: "+g);return u}function c(w){var g=s,u=O,v,y=r(30),R,L,z,F,B=1;w==null&&(w=[]);function O(ee){return 1/Math.min(z[ee.source.index],z[ee.target.index])}function I(ee){for(var ue=0,oe=w.length;ue<B;++ue)for(var le=0,V,J,te,Z,se,Q,q;le<oe;++le)V=w[le],J=V.source,te=V.target,Z=te.x+te.vx-J.x-J.vx||o(),se=te.y+te.vy-J.y-J.vy||o(),Q=Math.sqrt(Z*Z+se*se),Q=(Q-R[le])/Q*ee*v[le],Z*=Q,se*=Q,te.vx-=Z*(q=F[le]),te.vy-=se*q,J.vx+=Z*(q=1-q),J.vy+=se*q}function N(){if(L){var ee,ue=L.length,oe=w.length,le=S.map(L,g),V;for(ee=0,z=new Array(ue);ee<oe;++ee)V=w[ee],V.index=ee,typeof V.source!="object"&&(V.source=f(le,V.source)),typeof V.target!="object"&&(V.target=f(le,V.target)),z[V.source.index]=(z[V.source.index]||0)+1,z[V.target.index]=(z[V.target.index]||0)+1;for(ee=0,F=new Array(oe);ee<oe;++ee)V=w[ee],F[ee]=z[V.source.index]/(z[V.source.index]+z[V.target.index]);v=new Array(oe),U(),R=new Array(oe),X()}}function U(){if(L)for(var ee=0,ue=w.length;ee<ue;++ee)v[ee]=+u(w[ee],ee,w)}function X(){if(L)for(var ee=0,ue=w.length;ee<ue;++ee)R[ee]=+y(w[ee],ee,w)}return I.initialize=function(ee){L=ee,N()},I.links=function(ee){return arguments.length?(w=ee,N(),I):w},I.id=function(ee){return arguments.length?(g=ee,I):g},I.iterations=function(ee){return arguments.length?(B=+ee,I):B},I.strength=function(ee){return arguments.length?(u=typeof ee=="function"?ee:r(+ee),U(),I):u},I.distance=function(ee){return arguments.length?(y=typeof ee=="function"?ee:r(+ee),X(),I):y},I}function p(w){return w.x}function d(w){return w.y}var T=10,l=Math.PI*(3-Math.sqrt(5));function m(w){var g,u=1,v=.001,y=1-Math.pow(v,1/300),R=0,L=.6,z=S.map(),F=e.timer(O),B=E.dispatch("tick","end");w==null&&(w=[]);function O(){I(),B.call("tick",g),u<v&&(F.stop(),B.call("end",g))}function I(X){var ee,ue=w.length,oe;X===void 0&&(X=1);for(var le=0;le<X;++le)for(u+=(R-u)*y,z.each(function(V){V(u)}),ee=0;ee<ue;++ee)oe=w[ee],oe.fx==null?oe.x+=oe.vx*=L:(oe.x=oe.fx,oe.vx=0),oe.fy==null?oe.y+=oe.vy*=L:(oe.y=oe.fy,oe.vy=0);return g}function N(){for(var X=0,ee=w.length,ue;X<ee;++X){if(ue=w[X],ue.index=X,ue.fx!=null&&(ue.x=ue.fx),ue.fy!=null&&(ue.y=ue.fy),isNaN(ue.x)||isNaN(ue.y)){var oe=T*Math.sqrt(X),le=X*l;ue.x=oe*Math.cos(le),ue.y=oe*Math.sin(le)}(isNaN(ue.vx)||isNaN(ue.vy))&&(ue.vx=ue.vy=0)}}function U(X){return X.initialize&&X.initialize(w),X}return N(),g={tick:I,restart:function(){return F.restart(O),g},stop:function(){return F.stop(),g},nodes:function(X){return arguments.length?(w=X,N(),z.each(U),g):w},alpha:function(X){return arguments.length?(u=+X,g):u},alphaMin:function(X){return arguments.length?(v=+X,g):v},alphaDecay:function(X){return arguments.length?(y=+X,g):+y},alphaTarget:function(X){return arguments.length?(R=+X,g):R},velocityDecay:function(X){return arguments.length?(L=1-X,g):1-L},force:function(X,ee){return arguments.length>1?(ee==null?z.remove(X):z.set(X,U(ee)),g):z.get(X)},find:function(X,ee,ue){var oe=0,le=w.length,V,J,te,Z,se;for(ue==null?ue=1/0:ue*=ue,oe=0;oe<le;++oe)Z=w[oe],V=X-Z.x,J=ee-Z.y,te=V*V+J*J,te<ue&&(se=Z,ue=te);return se},on:function(X,ee){return arguments.length>1?(B.on(X,ee),g):B.on(X)}}}function x(){var w,g,u,v=r(-30),y,R=1,L=1/0,z=.81;function F(N){var U,X=w.length,ee=b.quadtree(w,p,d).visitAfter(O);for(u=N,U=0;U<X;++U)g=w[U],ee.visit(I)}function B(){if(w){var N,U=w.length,X;for(y=new Array(U),N=0;N<U;++N)X=w[N],y[X.index]=+v(X,N,w)}}function O(N){var U=0,X,ee,ue=0,oe,le,V;if(N.length){for(oe=le=V=0;V<4;++V)(X=N[V])&&(ee=Math.abs(X.value))&&(U+=X.value,ue+=ee,oe+=ee*X.x,le+=ee*X.y);N.x=oe/ue,N.y=le/ue}else{X=N,X.x=X.data.x,X.y=X.data.y;do U+=y[X.data.index];while(X=X.next)}N.value=U}function I(N,U,X,ee){if(!N.value)return!0;var ue=N.x-g.x,oe=N.y-g.y,le=ee-U,V=ue*ue+oe*oe;if(le*le/z<V)return V<L&&(ue===0&&(ue=o(),V+=ue*ue),oe===0&&(oe=o(),V+=oe*oe),V<R&&(V=Math.sqrt(R*V)),g.vx+=ue*N.value*u/V,g.vy+=oe*N.value*u/V),!0;if(N.length||V>=L)return;(N.data!==g||N.next)&&(ue===0&&(ue=o(),V+=ue*ue),oe===0&&(oe=o(),V+=oe*oe),V<R&&(V=Math.sqrt(R*V)));do N.data!==g&&(le=y[N.data.index]*u/V,g.vx+=ue*le,g.vy+=oe*le);while(N=N.next)}return F.initialize=function(N){w=N,B()},F.strength=function(N){return arguments.length?(v=typeof N=="function"?N:r(+N),B(),F):v},F.distanceMin=function(N){return arguments.length?(R=N*N,F):Math.sqrt(R)},F.distanceMax=function(N){return arguments.length?(L=N*N,F):Math.sqrt(L)},F.theta=function(N){return arguments.length?(z=N*N,F):Math.sqrt(z)},F}function A(w,g,u){var v,y=r(.1),R,L;typeof w!="function"&&(w=r(+w)),g==null&&(g=0),u==null&&(u=0);function z(B){for(var O=0,I=v.length;O<I;++O){var N=v[O],U=N.x-g||1e-6,X=N.y-u||1e-6,ee=Math.sqrt(U*U+X*X),ue=(L[O]-ee)*R[O]*B/ee;N.vx+=U*ue,N.vy+=X*ue}}function F(){if(v){var B,O=v.length;for(R=new Array(O),L=new Array(O),B=0;B<O;++B)L[B]=+w(v[B],B,v),R[B]=isNaN(L[B])?0:+y(v[B],B,v)}}return z.initialize=function(B){v=B,F()},z.strength=function(B){return arguments.length?(y=typeof B=="function"?B:r(+B),F(),z):y},z.radius=function(B){return arguments.length?(w=typeof B=="function"?B:r(+B),F(),z):w},z.x=function(B){return arguments.length?(g=+B,z):g},z.y=function(B){return arguments.length?(u=+B,z):u},z}function M(w){var g=r(.1),u,v,y;typeof w!="function"&&(w=r(w==null?0:+w));function R(z){for(var F=0,B=u.length,O;F<B;++F)O=u[F],O.vx+=(y[F]-O.x)*v[F]*z}function L(){if(u){var z,F=u.length;for(v=new Array(F),y=new Array(F),z=0;z<F;++z)v[z]=isNaN(y[z]=+w(u[z],z,u))?0:+g(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(g=typeof z=="function"?z:r(+z),L(),R):g},R.x=function(z){return arguments.length?(w=typeof z=="function"?z:r(+z),L(),R):w},R}function _(w){var g=r(.1),u,v,y;typeof w!="function"&&(w=r(w==null?0:+w));function R(z){for(var F=0,B=u.length,O;F<B;++F)O=u[F],O.vy+=(y[F]-O.y)*v[F]*z}function L(){if(u){var z,F=u.length;for(v=new Array(F),y=new Array(F),z=0;z<F;++z)v[z]=isNaN(y[z]=+w(u[z],z,u))?0:+g(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(g=typeof z=="function"?z:r(+z),L(),R):g},R.y=function(z){return arguments.length?(w=typeof z=="function"?z:r(+z),L(),R):w},R}h.forceCenter=t,h.forceCollide=n,h.forceLink=c,h.forceManyBody=x,h.forceRadial=A,h.forceSimulation=m,h.forceX=M,h.forceY=_,Object.defineProperty(h,"__esModule",{value:!0})})}}),c4=He({"node_modules/d3-path/dist/d3-path.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=h||self,b(h.d3=h.d3||{}))})(Y,function(h){var b=Math.PI,S=2*b,E=1e-6,e=S-E;function t(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new t}t.prototype=r.prototype={constructor:t,moveTo:function(o,a){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(o,a){this._+="L"+(this._x1=+o)+","+(this._y1=+a)},quadraticCurveTo:function(o,a,i,n){this._+="Q"+ +o+","+ +a+","+(this._x1=+i)+","+(this._y1=+n)},bezierCurveTo:function(o,a,i,n,s,f){this._+="C"+ +o+","+ +a+","+ +i+","+ +n+","+(this._x1=+s)+","+(this._y1=+f)},arcTo:function(o,a,i,n,s){o=+o,a=+a,i=+i,n=+n,s=+s;var f=this._x1,c=this._y1,p=i-o,d=n-a,T=f-o,l=c-a,m=T*T+l*l;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=o)+","+(this._y1=a);else if(m>E)if(!(Math.abs(l*p-d*T)>E)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var x=i-f,A=n-c,M=p*p+d*d,_=x*x+A*A,w=Math.sqrt(M),g=Math.sqrt(m),u=s*Math.tan((b-Math.acos((M+m-_)/(2*w*g)))/2),v=u/g,y=u/w;Math.abs(v-1)>E&&(this._+="L"+(o+v*T)+","+(a+v*l)),this._+="A"+s+","+s+",0,0,"+ +(l*x>T*A)+","+(this._x1=o+y*p)+","+(this._y1=a+y*d)}},arc:function(o,a,i,n,s,f){o=+o,a=+a,i=+i,f=!!f;var c=i*Math.cos(n),p=i*Math.sin(n),d=o+c,T=a+p,l=1^f,m=f?n-s:s-n;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+d+","+T:(Math.abs(this._x1-d)>E||Math.abs(this._y1-T)>E)&&(this._+="L"+d+","+T),i&&(m<0&&(m=m%S+S),m>e?this._+="A"+i+","+i+",0,1,"+l+","+(o-c)+","+(a-p)+"A"+i+","+i+",0,1,"+l+","+(this._x1=d)+","+(this._y1=T):m>E&&(this._+="A"+i+","+i+",0,"+ +(m>=b)+","+l+","+(this._x1=o+i*Math.cos(s))+","+(this._y1=a+i*Math.sin(s))))},rect:function(o,a,i,n){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)+"h"+ +i+"v"+ +n+"h"+-i+"Z"},toString:function(){return this._}},h.path=r,Object.defineProperty(h,"__esModule",{value:!0})})}}),QT=He({"node_modules/d3-shape/dist/d3-shape.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,c4()):(h=h||self,b(h.d3=h.d3||{},h.d3))})(Y,function(h,b){function S(pt){return function(){return pt}}var E=Math.abs,e=Math.atan2,t=Math.cos,r=Math.max,o=Math.min,a=Math.sin,i=Math.sqrt,n=1e-12,s=Math.PI,f=s/2,c=2*s;function p(pt){return pt>1?0:pt<-1?s:Math.acos(pt)}function d(pt){return pt>=1?f:pt<=-1?-f:Math.asin(pt)}function T(pt){return pt.innerRadius}function l(pt){return pt.outerRadius}function m(pt){return pt.startAngle}function x(pt){return pt.endAngle}function A(pt){return pt&&pt.padAngle}function M(pt,Kt,xr,Hr,fa,xa,_a,Wr){var ha=xr-pt,jn=Hr-Kt,tn=_a-fa,Zn=Wr-xa,ii=Zn*ha-tn*jn;if(!(ii*ii<n))return ii=(tn*(Kt-xa)-Zn*(pt-fa))/ii,[pt+ii*ha,Kt+ii*jn]}function _(pt,Kt,xr,Hr,fa,xa,_a){var Wr=pt-xr,ha=Kt-Hr,jn=(_a?xa:-xa)/i(Wr*Wr+ha*ha),tn=jn*ha,Zn=-jn*Wr,ii=pt+tn,pi=Kt+Zn,di=xr+tn,ki=Hr+Zn,zn=(ii+di)/2,no=(pi+ki)/2,Xi=di-ii,Go=ki-pi,ho=Xi*Xi+Go*Go,to=fa-xa,Gi=ii*ki-di*pi,Ho=(Go<0?-1:1)*i(r(0,to*to*ho-Gi*Gi)),jo=(Gi*Go-Xi*Ho)/ho,is=(-Gi*Xi-Go*Ho)/ho,vo=(Gi*Go+Xi*Ho)/ho,$i=(-Gi*Xi+Go*Ho)/ho,bi=jo-zn,po=is-no,os=vo-zn,Ts=$i-no;return bi*bi+po*po>os*os+Ts*Ts&&(jo=vo,is=$i),{cx:jo,cy:is,x01:-tn,y01:-Zn,x11:jo*(fa/to-1),y11:is*(fa/to-1)}}function w(){var pt=T,Kt=l,xr=S(0),Hr=null,fa=m,xa=x,_a=A,Wr=null;function ha(){var jn,tn,Zn=+pt.apply(this,arguments),ii=+Kt.apply(this,arguments),pi=fa.apply(this,arguments)-f,di=xa.apply(this,arguments)-f,ki=E(di-pi),zn=di>pi;if(Wr||(Wr=jn=b.path()),ii<Zn&&(tn=ii,ii=Zn,Zn=tn),!(ii>n))Wr.moveTo(0,0);else if(ki>c-n)Wr.moveTo(ii*t(pi),ii*a(pi)),Wr.arc(0,0,ii,pi,di,!zn),Zn>n&&(Wr.moveTo(Zn*t(di),Zn*a(di)),Wr.arc(0,0,Zn,di,pi,zn));else{var no=pi,Xi=di,Go=pi,ho=di,to=ki,Gi=ki,Ho=_a.apply(this,arguments)/2,jo=Ho>n&&(Hr?+Hr.apply(this,arguments):i(Zn*Zn+ii*ii)),is=o(E(ii-Zn)/2,+xr.apply(this,arguments)),vo=is,$i=is,bi,po;if(jo>n){var os=d(jo/Zn*a(Ho)),Ts=d(jo/ii*a(Ho));(to-=os*2)>n?(os*=zn?1:-1,Go+=os,ho-=os):(to=0,Go=ho=(pi+di)/2),(Gi-=Ts*2)>n?(Ts*=zn?1:-1,no+=Ts,Xi-=Ts):(Gi=0,no=Xi=(pi+di)/2)}var Es=ii*t(no),Mo=ii*a(no),On=Zn*t(ho),vi=Zn*a(ho);if(is>n){var As=ii*t(Xi),Ro=ii*a(Xi),Oi=Zn*t(Go),ks=Zn*a(Go),Wo;if(ki<s&&(Wo=M(Es,Mo,Oi,ks,As,Ro,On,vi))){var ss=Es-Wo[0],hl=Mo-Wo[1],fi=As-Wo[0],_o=Ro-Wo[1],io=1/a(p((ss*fi+hl*_o)/(i(ss*ss+hl*hl)*i(fi*fi+_o*_o)))/2),Vs=i(Wo[0]*Wo[0]+Wo[1]*Wo[1]);vo=o(is,(Zn-Vs)/(io-1)),$i=o(is,(ii-Vs)/(io+1))}}Gi>n?$i>n?(bi=_(Oi,ks,Es,Mo,ii,$i,zn),po=_(As,Ro,On,vi,ii,$i,zn),Wr.moveTo(bi.cx+bi.x01,bi.cy+bi.y01),$i<is?Wr.arc(bi.cx,bi.cy,$i,e(bi.y01,bi.x01),e(po.y01,po.x01),!zn):(Wr.arc(bi.cx,bi.cy,$i,e(bi.y01,bi.x01),e(bi.y11,bi.x11),!zn),Wr.arc(0,0,ii,e(bi.cy+bi.y11,bi.cx+bi.x11),e(po.cy+po.y11,po.cx+po.x11),!zn),Wr.arc(po.cx,po.cy,$i,e(po.y11,po.x11),e(po.y01,po.x01),!zn))):(Wr.moveTo(Es,Mo),Wr.arc(0,0,ii,no,Xi,!zn)):Wr.moveTo(Es,Mo),!(Zn>n)||!(to>n)?Wr.lineTo(On,vi):vo>n?(bi=_(On,vi,As,Ro,Zn,-vo,zn),po=_(Es,Mo,Oi,ks,Zn,-vo,zn),Wr.lineTo(bi.cx+bi.x01,bi.cy+bi.y01),vo<is?Wr.arc(bi.cx,bi.cy,vo,e(bi.y01,bi.x01),e(po.y01,po.x01),!zn):(Wr.arc(bi.cx,bi.cy,vo,e(bi.y01,bi.x01),e(bi.y11,bi.x11),!zn),Wr.arc(0,0,Zn,e(bi.cy+bi.y11,bi.cx+bi.x11),e(po.cy+po.y11,po.cx+po.x11),zn),Wr.arc(po.cx,po.cy,vo,e(po.y11,po.x11),e(po.y01,po.x01),!zn))):Wr.arc(0,0,Zn,ho,Go,zn)}if(Wr.closePath(),jn)return Wr=null,jn+""||null}return ha.centroid=function(){var jn=(+pt.apply(this,arguments)+ +Kt.apply(this,arguments))/2,tn=(+fa.apply(this,arguments)+ +xa.apply(this,arguments))/2-s/2;return[t(tn)*jn,a(tn)*jn]},ha.innerRadius=function(jn){return arguments.length?(pt=typeof jn=="function"?jn:S(+jn),ha):pt},ha.outerRadius=function(jn){return arguments.length?(Kt=typeof jn=="function"?jn:S(+jn),ha):Kt},ha.cornerRadius=function(jn){return arguments.length?(xr=typeof jn=="function"?jn:S(+jn),ha):xr},ha.padRadius=function(jn){return arguments.length?(Hr=jn==null?null:typeof jn=="function"?jn:S(+jn),ha):Hr},ha.startAngle=function(jn){return arguments.length?(fa=typeof jn=="function"?jn:S(+jn),ha):fa},ha.endAngle=function(jn){return arguments.length?(xa=typeof jn=="function"?jn:S(+jn),ha):xa},ha.padAngle=function(jn){return arguments.length?(_a=typeof jn=="function"?jn:S(+jn),ha):_a},ha.context=function(jn){return arguments.length?(Wr=jn??null,ha):Wr},ha}function g(pt){this._context=pt}g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;default:this._context.lineTo(pt,Kt);break}}};function u(pt){return new g(pt)}function v(pt){return pt[0]}function y(pt){return pt[1]}function R(){var pt=v,Kt=y,xr=S(!0),Hr=null,fa=u,xa=null;function _a(Wr){var ha,jn=Wr.length,tn,Zn=!1,ii;for(Hr==null&&(xa=fa(ii=b.path())),ha=0;ha<=jn;++ha)!(ha<jn&&xr(tn=Wr[ha],ha,Wr))===Zn&&((Zn=!Zn)?xa.lineStart():xa.lineEnd()),Zn&&xa.point(+pt(tn,ha,Wr),+Kt(tn,ha,Wr));if(ii)return xa=null,ii+""||null}return _a.x=function(Wr){return arguments.length?(pt=typeof Wr=="function"?Wr:S(+Wr),_a):pt},_a.y=function(Wr){return arguments.length?(Kt=typeof Wr=="function"?Wr:S(+Wr),_a):Kt},_a.defined=function(Wr){return arguments.length?(xr=typeof Wr=="function"?Wr:S(!!Wr),_a):xr},_a.curve=function(Wr){return arguments.length?(fa=Wr,Hr!=null&&(xa=fa(Hr)),_a):fa},_a.context=function(Wr){return arguments.length?(Wr==null?Hr=xa=null:xa=fa(Hr=Wr),_a):Hr},_a}function L(){var pt=v,Kt=null,xr=S(0),Hr=y,fa=S(!0),xa=null,_a=u,Wr=null;function ha(tn){var Zn,ii,pi,di=tn.length,ki,zn=!1,no,Xi=new Array(di),Go=new Array(di);for(xa==null&&(Wr=_a(no=b.path())),Zn=0;Zn<=di;++Zn){if(!(Zn<di&&fa(ki=tn[Zn],Zn,tn))===zn)if(zn=!zn)ii=Zn,Wr.areaStart(),Wr.lineStart();else{for(Wr.lineEnd(),Wr.lineStart(),pi=Zn-1;pi>=ii;--pi)Wr.point(Xi[pi],Go[pi]);Wr.lineEnd(),Wr.areaEnd()}zn&&(Xi[Zn]=+pt(ki,Zn,tn),Go[Zn]=+xr(ki,Zn,tn),Wr.point(Kt?+Kt(ki,Zn,tn):Xi[Zn],Hr?+Hr(ki,Zn,tn):Go[Zn]))}if(no)return Wr=null,no+""||null}function jn(){return R().defined(fa).curve(_a).context(xa)}return ha.x=function(tn){return arguments.length?(pt=typeof tn=="function"?tn:S(+tn),Kt=null,ha):pt},ha.x0=function(tn){return arguments.length?(pt=typeof tn=="function"?tn:S(+tn),ha):pt},ha.x1=function(tn){return arguments.length?(Kt=tn==null?null:typeof tn=="function"?tn:S(+tn),ha):Kt},ha.y=function(tn){return arguments.length?(xr=typeof tn=="function"?tn:S(+tn),Hr=null,ha):xr},ha.y0=function(tn){return arguments.length?(xr=typeof tn=="function"?tn:S(+tn),ha):xr},ha.y1=function(tn){return arguments.length?(Hr=tn==null?null:typeof tn=="function"?tn:S(+tn),ha):Hr},ha.lineX0=ha.lineY0=function(){return jn().x(pt).y(xr)},ha.lineY1=function(){return jn().x(pt).y(Hr)},ha.lineX1=function(){return jn().x(Kt).y(xr)},ha.defined=function(tn){return arguments.length?(fa=typeof tn=="function"?tn:S(!!tn),ha):fa},ha.curve=function(tn){return arguments.length?(_a=tn,xa!=null&&(Wr=_a(xa)),ha):_a},ha.context=function(tn){return arguments.length?(tn==null?xa=Wr=null:Wr=_a(xa=tn),ha):xa},ha}function z(pt,Kt){return Kt<pt?-1:Kt>pt?1:Kt>=pt?0:NaN}function F(pt){return pt}function B(){var pt=F,Kt=z,xr=null,Hr=S(0),fa=S(c),xa=S(0);function _a(Wr){var ha,jn=Wr.length,tn,Zn,ii=0,pi=new Array(jn),di=new Array(jn),ki=+Hr.apply(this,arguments),zn=Math.min(c,Math.max(-c,fa.apply(this,arguments)-ki)),no,Xi=Math.min(Math.abs(zn)/jn,xa.apply(this,arguments)),Go=Xi*(zn<0?-1:1),ho;for(ha=0;ha<jn;++ha)(ho=di[pi[ha]=ha]=+pt(Wr[ha],ha,Wr))>0&&(ii+=ho);for(Kt!=null?pi.sort(function(to,Gi){return Kt(di[to],di[Gi])}):xr!=null&&pi.sort(function(to,Gi){return xr(Wr[to],Wr[Gi])}),ha=0,Zn=ii?(zn-jn*Go)/ii:0;ha<jn;++ha,ki=no)tn=pi[ha],ho=di[tn],no=ki+(ho>0?ho*Zn:0)+Go,di[tn]={data:Wr[tn],index:ha,value:ho,startAngle:ki,endAngle:no,padAngle:Xi};return di}return _a.value=function(Wr){return arguments.length?(pt=typeof Wr=="function"?Wr:S(+Wr),_a):pt},_a.sortValues=function(Wr){return arguments.length?(Kt=Wr,xr=null,_a):Kt},_a.sort=function(Wr){return arguments.length?(xr=Wr,Kt=null,_a):xr},_a.startAngle=function(Wr){return arguments.length?(Hr=typeof Wr=="function"?Wr:S(+Wr),_a):Hr},_a.endAngle=function(Wr){return arguments.length?(fa=typeof Wr=="function"?Wr:S(+Wr),_a):fa},_a.padAngle=function(Wr){return arguments.length?(xa=typeof Wr=="function"?Wr:S(+Wr),_a):xa},_a}var O=N(u);function I(pt){this._curve=pt}I.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(pt,Kt){this._curve.point(Kt*Math.sin(pt),Kt*-Math.cos(pt))}};function N(pt){function Kt(xr){return new I(pt(xr))}return Kt._curve=pt,Kt}function U(pt){var Kt=pt.curve;return pt.angle=pt.x,delete pt.x,pt.radius=pt.y,delete pt.y,pt.curve=function(xr){return arguments.length?Kt(N(xr)):Kt()._curve},pt}function X(){return U(R().curve(O))}function ee(){var pt=L().curve(O),Kt=pt.curve,xr=pt.lineX0,Hr=pt.lineX1,fa=pt.lineY0,xa=pt.lineY1;return pt.angle=pt.x,delete pt.x,pt.startAngle=pt.x0,delete pt.x0,pt.endAngle=pt.x1,delete pt.x1,pt.radius=pt.y,delete pt.y,pt.innerRadius=pt.y0,delete pt.y0,pt.outerRadius=pt.y1,delete pt.y1,pt.lineStartAngle=function(){return U(xr())},delete pt.lineX0,pt.lineEndAngle=function(){return U(Hr())},delete pt.lineX1,pt.lineInnerRadius=function(){return U(fa())},delete pt.lineY0,pt.lineOuterRadius=function(){return U(xa())},delete pt.lineY1,pt.curve=function(_a){return arguments.length?Kt(N(_a)):Kt()._curve},pt}function ue(pt,Kt){return[(Kt=+Kt)*Math.cos(pt-=Math.PI/2),Kt*Math.sin(pt)]}var oe=Array.prototype.slice;function le(pt){return pt.source}function V(pt){return pt.target}function J(pt){var Kt=le,xr=V,Hr=v,fa=y,xa=null;function _a(){var Wr,ha=oe.call(arguments),jn=Kt.apply(this,ha),tn=xr.apply(this,ha);if(xa||(xa=Wr=b.path()),pt(xa,+Hr.apply(this,(ha[0]=jn,ha)),+fa.apply(this,ha),+Hr.apply(this,(ha[0]=tn,ha)),+fa.apply(this,ha)),Wr)return xa=null,Wr+""||null}return _a.source=function(Wr){return arguments.length?(Kt=Wr,_a):Kt},_a.target=function(Wr){return arguments.length?(xr=Wr,_a):xr},_a.x=function(Wr){return arguments.length?(Hr=typeof Wr=="function"?Wr:S(+Wr),_a):Hr},_a.y=function(Wr){return arguments.length?(fa=typeof Wr=="function"?Wr:S(+Wr),_a):fa},_a.context=function(Wr){return arguments.length?(xa=Wr??null,_a):xa},_a}function te(pt,Kt,xr,Hr,fa){pt.moveTo(Kt,xr),pt.bezierCurveTo(Kt=(Kt+Hr)/2,xr,Kt,fa,Hr,fa)}function Z(pt,Kt,xr,Hr,fa){pt.moveTo(Kt,xr),pt.bezierCurveTo(Kt,xr=(xr+fa)/2,Hr,xr,Hr,fa)}function se(pt,Kt,xr,Hr,fa){var xa=ue(Kt,xr),_a=ue(Kt,xr=(xr+fa)/2),Wr=ue(Hr,xr),ha=ue(Hr,fa);pt.moveTo(xa[0],xa[1]),pt.bezierCurveTo(_a[0],_a[1],Wr[0],Wr[1],ha[0],ha[1])}function Q(){return J(te)}function q(){return J(Z)}function re(){var pt=J(se);return pt.angle=pt.x,delete pt.x,pt.radius=pt.y,delete pt.y,pt}var ae={draw:function(pt,Kt){var xr=Math.sqrt(Kt/s);pt.moveTo(xr,0),pt.arc(0,0,xr,0,c)}},fe={draw:function(pt,Kt){var xr=Math.sqrt(Kt/5)/2;pt.moveTo(-3*xr,-xr),pt.lineTo(-xr,-xr),pt.lineTo(-xr,-3*xr),pt.lineTo(xr,-3*xr),pt.lineTo(xr,-xr),pt.lineTo(3*xr,-xr),pt.lineTo(3*xr,xr),pt.lineTo(xr,xr),pt.lineTo(xr,3*xr),pt.lineTo(-xr,3*xr),pt.lineTo(-xr,xr),pt.lineTo(-3*xr,xr),pt.closePath()}},be=Math.sqrt(1/3),Me=be*2,Ie={draw:function(pt,Kt){var xr=Math.sqrt(Kt/Me),Hr=xr*be;pt.moveTo(0,-xr),pt.lineTo(Hr,0),pt.lineTo(0,xr),pt.lineTo(-Hr,0),pt.closePath()}},Le=.8908130915292852,je=Math.sin(s/10)/Math.sin(7*s/10),et=Math.sin(c/10)*je,rt=-Math.cos(c/10)*je,Je={draw:function(pt,Kt){var xr=Math.sqrt(Kt*Le),Hr=et*xr,fa=rt*xr;pt.moveTo(0,-xr),pt.lineTo(Hr,fa);for(var xa=1;xa<5;++xa){var _a=c*xa/5,Wr=Math.cos(_a),ha=Math.sin(_a);pt.lineTo(ha*xr,-Wr*xr),pt.lineTo(Wr*Hr-ha*fa,ha*Hr+Wr*fa)}pt.closePath()}},Ze={draw:function(pt,Kt){var xr=Math.sqrt(Kt),Hr=-xr/2;pt.rect(Hr,Hr,xr,xr)}},Ee=Math.sqrt(3),xe={draw:function(pt,Kt){var xr=-Math.sqrt(Kt/(Ee*3));pt.moveTo(0,xr*2),pt.lineTo(-Ee*xr,-xr),pt.lineTo(Ee*xr,-xr),pt.closePath()}},he=-.5,De=Math.sqrt(3)/2,tt=1/Math.sqrt(12),nt=(tt/2+1)*3,$e={draw:function(pt,Kt){var xr=Math.sqrt(Kt/nt),Hr=xr/2,fa=xr*tt,xa=Hr,_a=xr*tt+xr,Wr=-xa,ha=_a;pt.moveTo(Hr,fa),pt.lineTo(xa,_a),pt.lineTo(Wr,ha),pt.lineTo(he*Hr-De*fa,De*Hr+he*fa),pt.lineTo(he*xa-De*_a,De*xa+he*_a),pt.lineTo(he*Wr-De*ha,De*Wr+he*ha),pt.lineTo(he*Hr+De*fa,he*fa-De*Hr),pt.lineTo(he*xa+De*_a,he*_a-De*xa),pt.lineTo(he*Wr+De*ha,he*ha-De*Wr),pt.closePath()}},Et=[ae,fe,Ie,Ze,Je,xe,$e];function Ct(){var pt=S(ae),Kt=S(64),xr=null;function Hr(){var fa;if(xr||(xr=fa=b.path()),pt.apply(this,arguments).draw(xr,+Kt.apply(this,arguments)),fa)return xr=null,fa+""||null}return Hr.type=function(fa){return arguments.length?(pt=typeof fa=="function"?fa:S(fa),Hr):pt},Hr.size=function(fa){return arguments.length?(Kt=typeof fa=="function"?fa:S(+fa),Hr):Kt},Hr.context=function(fa){return arguments.length?(xr=fa??null,Hr):xr},Hr}function jt(){}function Wt(pt,Kt,xr){pt._context.bezierCurveTo((2*pt._x0+pt._x1)/3,(2*pt._y0+pt._y1)/3,(pt._x0+2*pt._x1)/3,(pt._y0+2*pt._y1)/3,(pt._x0+4*pt._x1+Kt)/6,(pt._y0+4*pt._y1+xr)/6)}function dr(pt){this._context=pt}dr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Wt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Wt(this,pt,Kt);break}this._x0=this._x1,this._x1=pt,this._y0=this._y1,this._y1=Kt}};function vr(pt){return new dr(pt)}function Dr(pt){this._context=pt}Dr.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._x2=pt,this._y2=Kt;break;case 1:this._point=2,this._x3=pt,this._y3=Kt;break;case 2:this._point=3,this._x4=pt,this._y4=Kt,this._context.moveTo((this._x0+4*this._x1+pt)/6,(this._y0+4*this._y1+Kt)/6);break;default:Wt(this,pt,Kt);break}this._x0=this._x1,this._x1=pt,this._y0=this._y1,this._y1=Kt}};function hr(pt){return new Dr(pt)}function Ar(pt){this._context=pt}Ar.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var xr=(this._x0+4*this._x1+pt)/6,Hr=(this._y0+4*this._y1+Kt)/6;this._line?this._context.lineTo(xr,Hr):this._context.moveTo(xr,Hr);break;case 3:this._point=4;default:Wt(this,pt,Kt);break}this._x0=this._x1,this._x1=pt,this._y0=this._y1,this._y1=Kt}};function mt(pt){return new Ar(pt)}function Fe(pt,Kt){this._basis=new dr(pt),this._beta=Kt}Fe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var pt=this._x,Kt=this._y,xr=pt.length-1;if(xr>0)for(var Hr=pt[0],fa=Kt[0],xa=pt[xr]-Hr,_a=Kt[xr]-fa,Wr=-1,ha;++Wr<=xr;)ha=Wr/xr,this._basis.point(this._beta*pt[Wr]+(1-this._beta)*(Hr+ha*xa),this._beta*Kt[Wr]+(1-this._beta)*(fa+ha*_a));this._x=this._y=null,this._basis.lineEnd()},point:function(pt,Kt){this._x.push(+pt),this._y.push(+Kt)}};var We=(function pt(Kt){function xr(Hr){return Kt===1?new dr(Hr):new Fe(Hr,Kt)}return xr.beta=function(Hr){return pt(+Hr)},xr})(.85);function Ae(pt,Kt,xr){pt._context.bezierCurveTo(pt._x1+pt._k*(pt._x2-pt._x0),pt._y1+pt._k*(pt._y2-pt._y0),pt._x2+pt._k*(pt._x1-Kt),pt._y2+pt._k*(pt._y1-xr),pt._x2,pt._y2)}function me(pt,Kt){this._context=pt,this._k=(1-Kt)/6}me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ae(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2,this._x1=pt,this._y1=Kt;break;case 2:this._point=3;default:Ae(this,pt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var pe=(function pt(Kt){function xr(Hr){return new me(Hr,Kt)}return xr.tension=function(Hr){return pt(+Hr)},xr})(0);function Te(pt,Kt){this._context=pt,this._k=(1-Kt)/6}Te.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._x3=pt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=pt,this._y4=Kt);break;case 2:this._point=3,this._x5=pt,this._y5=Kt;break;default:Ae(this,pt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Ue=(function pt(Kt){function xr(Hr){return new Te(Hr,Kt)}return xr.tension=function(Hr){return pt(+Hr)},xr})(0);function Xe(pt,Kt){this._context=pt,this._k=(1-Kt)/6}Xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ae(this,pt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var bt=(function pt(Kt){function xr(Hr){return new Xe(Hr,Kt)}return xr.tension=function(Hr){return pt(+Hr)},xr})(0);function xt(pt,Kt,xr){var Hr=pt._x1,fa=pt._y1,xa=pt._x2,_a=pt._y2;if(pt._l01_a>n){var Wr=2*pt._l01_2a+3*pt._l01_a*pt._l12_a+pt._l12_2a,ha=3*pt._l01_a*(pt._l01_a+pt._l12_a);Hr=(Hr*Wr-pt._x0*pt._l12_2a+pt._x2*pt._l01_2a)/ha,fa=(fa*Wr-pt._y0*pt._l12_2a+pt._y2*pt._l01_2a)/ha}if(pt._l23_a>n){var jn=2*pt._l23_2a+3*pt._l23_a*pt._l12_a+pt._l12_2a,tn=3*pt._l23_a*(pt._l23_a+pt._l12_a);xa=(xa*jn+pt._x1*pt._l23_2a-Kt*pt._l12_2a)/tn,_a=(_a*jn+pt._y1*pt._l23_2a-xr*pt._l12_2a)/tn}pt._context.bezierCurveTo(Hr,fa,xa,_a,pt._x2,pt._y2)}function Mt(pt,Kt){this._context=pt,this._alpha=Kt}Mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){if(pt=+pt,Kt=+Kt,this._point){var xr=this._x2-pt,Hr=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(xr*xr+Hr*Hr,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;break;case 2:this._point=3;default:xt(this,pt,Kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Nt=(function pt(Kt){function xr(Hr){return Kt?new Mt(Hr,Kt):new me(Hr,0)}return xr.alpha=function(Hr){return pt(+Hr)},xr})(.5);function sr(pt,Kt){this._context=pt,this._alpha=Kt}sr.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(pt,Kt){if(pt=+pt,Kt=+Kt,this._point){var xr=this._x2-pt,Hr=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(xr*xr+Hr*Hr,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=pt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=pt,this._y4=Kt);break;case 2:this._point=3,this._x5=pt,this._y5=Kt;break;default:xt(this,pt,Kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var ar=(function pt(Kt){function xr(Hr){return Kt?new sr(Hr,Kt):new Te(Hr,0)}return xr.alpha=function(Hr){return pt(+Hr)},xr})(.5);function tr(pt,Kt){this._context=pt,this._alpha=Kt}tr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){if(pt=+pt,Kt=+Kt,this._point){var xr=this._x2-pt,Hr=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(xr*xr+Hr*Hr,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xt(this,pt,Kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Tr=(function pt(Kt){function xr(Hr){return Kt?new tr(Hr,Kt):new Xe(Hr,0)}return xr.alpha=function(Hr){return pt(+Hr)},xr})(.5);function sa(pt){this._context=pt}sa.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(pt,Kt){pt=+pt,Kt=+Kt,this._point?this._context.lineTo(pt,Kt):(this._point=1,this._context.moveTo(pt,Kt))}};function Ea(pt){return new sa(pt)}function ba(pt){return pt<0?-1:1}function Ia(pt,Kt,xr){var Hr=pt._x1-pt._x0,fa=Kt-pt._x1,xa=(pt._y1-pt._y0)/(Hr||fa<0&&-0),_a=(xr-pt._y1)/(fa||Hr<0&&-0),Wr=(xa*fa+_a*Hr)/(Hr+fa);return(ba(xa)+ba(_a))*Math.min(Math.abs(xa),Math.abs(_a),.5*Math.abs(Wr))||0}function Ra(pt,Kt){var xr=pt._x1-pt._x0;return xr?(3*(pt._y1-pt._y0)/xr-Kt)/2:Kt}function ya(pt,Kt,xr){var Hr=pt._x0,fa=pt._y0,xa=pt._x1,_a=pt._y1,Wr=(xa-Hr)/3;pt._context.bezierCurveTo(Hr+Wr,fa+Wr*Kt,xa-Wr,_a-Wr*xr,xa,_a)}function rn(pt){this._context=pt}rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ya(this,this._t0,Ra(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){var xr=NaN;if(pt=+pt,Kt=+Kt,!(pt===this._x1&&Kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;break;case 2:this._point=3,ya(this,Ra(this,xr=Ia(this,pt,Kt)),xr);break;default:ya(this,this._t0,xr=Ia(this,pt,Kt));break}this._x0=this._x1,this._x1=pt,this._y0=this._y1,this._y1=Kt,this._t0=xr}}};function mn(pt){this._context=new Yt(pt)}(mn.prototype=Object.create(rn.prototype)).point=function(pt,Kt){rn.prototype.point.call(this,Kt,pt)};function Yt(pt){this._context=pt}Yt.prototype={moveTo:function(pt,Kt){this._context.moveTo(Kt,pt)},closePath:function(){this._context.closePath()},lineTo:function(pt,Kt){this._context.lineTo(Kt,pt)},bezierCurveTo:function(pt,Kt,xr,Hr,fa,xa){this._context.bezierCurveTo(Kt,pt,Hr,xr,xa,fa)}};function It(pt){return new rn(pt)}function Zt(pt){return new mn(pt)}function $t(pt){this._context=pt}$t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var pt=this._x,Kt=this._y,xr=pt.length;if(xr)if(this._line?this._context.lineTo(pt[0],Kt[0]):this._context.moveTo(pt[0],Kt[0]),xr===2)this._context.lineTo(pt[1],Kt[1]);else for(var Hr=Cr(pt),fa=Cr(Kt),xa=0,_a=1;_a<xr;++xa,++_a)this._context.bezierCurveTo(Hr[0][xa],fa[0][xa],Hr[1][xa],fa[1][xa],pt[_a],Kt[_a]);(this._line||this._line!==0&&xr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(pt,Kt){this._x.push(+pt),this._y.push(+Kt)}};function Cr(pt){var Kt,xr=pt.length-1,Hr,fa=new Array(xr),xa=new Array(xr),_a=new Array(xr);for(fa[0]=0,xa[0]=2,_a[0]=pt[0]+2*pt[1],Kt=1;Kt<xr-1;++Kt)fa[Kt]=1,xa[Kt]=4,_a[Kt]=4*pt[Kt]+2*pt[Kt+1];for(fa[xr-1]=2,xa[xr-1]=7,_a[xr-1]=8*pt[xr-1]+pt[xr],Kt=1;Kt<xr;++Kt)Hr=fa[Kt]/xa[Kt-1],xa[Kt]-=Hr,_a[Kt]-=Hr*_a[Kt-1];for(fa[xr-1]=_a[xr-1]/xa[xr-1],Kt=xr-2;Kt>=0;--Kt)fa[Kt]=(_a[Kt]-fa[Kt+1])/xa[Kt];for(xa[xr-1]=(pt[xr]+fa[xr-1])/2,Kt=0;Kt<xr-1;++Kt)xa[Kt]=2*pt[Kt+1]-fa[Kt+1];return[fa,xa]}function qr(pt){return new $t(pt)}function Jr(pt,Kt){this._context=pt,this._t=Kt}Jr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Kt),this._context.lineTo(pt,Kt);else{var xr=this._x*(1-this._t)+pt*this._t;this._context.lineTo(xr,this._y),this._context.lineTo(xr,Kt)}break}}this._x=pt,this._y=Kt}};function aa(pt){return new Jr(pt,.5)}function Ca(pt){return new Jr(pt,0)}function Ha(pt){return new Jr(pt,1)}function Va(pt,Kt){if((_a=pt.length)>1)for(var xr=1,Hr,fa,xa=pt[Kt[0]],_a,Wr=xa.length;xr<_a;++xr)for(fa=xa,xa=pt[Kt[xr]],Hr=0;Hr<Wr;++Hr)xa[Hr][1]+=xa[Hr][0]=isNaN(fa[Hr][1])?fa[Hr][0]:fa[Hr][1]}function Za(pt){for(var Kt=pt.length,xr=new Array(Kt);--Kt>=0;)xr[Kt]=Kt;return xr}function an(pt,Kt){return pt[Kt]}function wa(){var pt=S([]),Kt=Za,xr=Va,Hr=an;function fa(xa){var _a=pt.apply(this,arguments),Wr,ha=xa.length,jn=_a.length,tn=new Array(jn),Zn;for(Wr=0;Wr<jn;++Wr){for(var ii=_a[Wr],pi=tn[Wr]=new Array(ha),di=0,ki;di<ha;++di)pi[di]=ki=[0,+Hr(xa[di],ii,di,xa)],ki.data=xa[di];pi.key=ii}for(Wr=0,Zn=Kt(tn);Wr<jn;++Wr)tn[Zn[Wr]].index=Wr;return xr(tn,Zn),tn}return fa.keys=function(xa){return arguments.length?(pt=typeof xa=="function"?xa:S(oe.call(xa)),fa):pt},fa.value=function(xa){return arguments.length?(Hr=typeof xa=="function"?xa:S(+xa),fa):Hr},fa.order=function(xa){return arguments.length?(Kt=xa==null?Za:typeof xa=="function"?xa:S(oe.call(xa)),fa):Kt},fa.offset=function(xa){return arguments.length?(xr=xa??Va,fa):xr},fa}function Nn(pt,Kt){if((Hr=pt.length)>0){for(var xr,Hr,fa=0,xa=pt[0].length,_a;fa<xa;++fa){for(_a=xr=0;xr<Hr;++xr)_a+=pt[xr][fa][1]||0;if(_a)for(xr=0;xr<Hr;++xr)pt[xr][fa][1]/=_a}Va(pt,Kt)}}function Wn(pt,Kt){if((ha=pt.length)>0)for(var xr,Hr=0,fa,xa,_a,Wr,ha,jn=pt[Kt[0]].length;Hr<jn;++Hr)for(_a=Wr=0,xr=0;xr<ha;++xr)(xa=(fa=pt[Kt[xr]][Hr])[1]-fa[0])>0?(fa[0]=_a,fa[1]=_a+=xa):xa<0?(fa[1]=Wr,fa[0]=Wr+=xa):(fa[0]=0,fa[1]=xa)}function At(pt,Kt){if((fa=pt.length)>0){for(var xr=0,Hr=pt[Kt[0]],fa,xa=Hr.length;xr<xa;++xr){for(var _a=0,Wr=0;_a<fa;++_a)Wr+=pt[_a][xr][1]||0;Hr[xr][1]+=Hr[xr][0]=-Wr/2}Va(pt,Kt)}}function ft(pt,Kt){if(!(!((_a=pt.length)>0)||!((xa=(fa=pt[Kt[0]]).length)>0))){for(var xr=0,Hr=1,fa,xa,_a;Hr<xa;++Hr){for(var Wr=0,ha=0,jn=0;Wr<_a;++Wr){for(var tn=pt[Kt[Wr]],Zn=tn[Hr][1]||0,ii=tn[Hr-1][1]||0,pi=(Zn-ii)/2,di=0;di<Wr;++di){var ki=pt[Kt[di]],zn=ki[Hr][1]||0,no=ki[Hr-1][1]||0;pi+=zn-no}ha+=Zn,jn+=pi*Zn}fa[Hr-1][1]+=fa[Hr-1][0]=xr,ha&&(xr-=jn/ha)}fa[Hr-1][1]+=fa[Hr-1][0]=xr,Va(pt,Kt)}}function pr(pt){var Kt=pt.map(Sr);return Za(pt).sort(function(xr,Hr){return Kt[xr]-Kt[Hr]})}function Sr(pt){for(var Kt=-1,xr=0,Hr=pt.length,fa,xa=-1/0;++Kt<Hr;)(fa=+pt[Kt][1])>xa&&(xa=fa,xr=Kt);return xr}function Er(pt){var Kt=pt.map(_r);return Za(pt).sort(function(xr,Hr){return Kt[xr]-Kt[Hr]})}function _r(pt){for(var Kt=0,xr=-1,Hr=pt.length,fa;++xr<Hr;)(fa=+pt[xr][1])&&(Kt+=fa);return Kt}function Mr(pt){return Er(pt).reverse()}function Gr(pt){var Kt=pt.length,xr,Hr,fa=pt.map(_r),xa=pr(pt),_a=0,Wr=0,ha=[],jn=[];for(xr=0;xr<Kt;++xr)Hr=xa[xr],_a<Wr?(_a+=fa[Hr],ha.push(Hr)):(Wr+=fa[Hr],jn.push(Hr));return jn.reverse().concat(ha)}function Fr(pt){return Za(pt).reverse()}h.arc=w,h.area=L,h.areaRadial=ee,h.curveBasis=vr,h.curveBasisClosed=hr,h.curveBasisOpen=mt,h.curveBundle=We,h.curveCardinal=pe,h.curveCardinalClosed=Ue,h.curveCardinalOpen=bt,h.curveCatmullRom=Nt,h.curveCatmullRomClosed=ar,h.curveCatmullRomOpen=Tr,h.curveLinear=u,h.curveLinearClosed=Ea,h.curveMonotoneX=It,h.curveMonotoneY=Zt,h.curveNatural=qr,h.curveStep=aa,h.curveStepAfter=Ha,h.curveStepBefore=Ca,h.line=R,h.lineRadial=X,h.linkHorizontal=Q,h.linkRadial=re,h.linkVertical=q,h.pie=B,h.pointRadial=ue,h.radialArea=ee,h.radialLine=X,h.stack=wa,h.stackOffsetDiverging=Wn,h.stackOffsetExpand=Nn,h.stackOffsetNone=Va,h.stackOffsetSilhouette=At,h.stackOffsetWiggle=ft,h.stackOrderAppearance=pr,h.stackOrderAscending=Er,h.stackOrderDescending=Mr,h.stackOrderInsideOut=Gr,h.stackOrderNone=Za,h.stackOrderReverse=Fr,h.symbol=Ct,h.symbolCircle=ae,h.symbolCross=fe,h.symbolDiamond=Ie,h.symbolSquare=Ze,h.symbolStar=Je,h.symbolTriangle=xe,h.symbolWye=$e,h.symbols=Et,Object.defineProperty(h,"__esModule",{value:!0})})}}),f4=He({"node_modules/@plotly/d3-sankey/build/d3-sankey.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,Zm(),mx(),QT()):b(h.d3=h.d3||{},h.d3,h.d3,h.d3)})(Y,function(h,b,S,E){function e(u){return u.target.depth}function t(u){return u.depth}function r(u,v){return v-1-u.height}function o(u,v){return u.sourceLinks.length?u.depth:v-1}function a(u){return u.targetLinks.length?u.depth:u.sourceLinks.length?b.min(u.sourceLinks,e)-1:0}function i(u){return function(){return u}}function n(u,v){return f(u.source,v.source)||u.index-v.index}function s(u,v){return f(u.target,v.target)||u.index-v.index}function f(u,v){return u.y0-v.y0}function c(u){return u.value}function p(u){return(u.y0+u.y1)/2}function d(u){return p(u.source)*u.value}function T(u){return p(u.target)*u.value}function l(u){return u.index}function m(u){return u.nodes}function x(u){return u.links}function A(u,v){var y=u.get(v);if(!y)throw new Error("missing: "+v);return y}var M=function(){var u=0,v=0,y=1,R=1,L=24,z=8,F=l,B=o,O=m,I=x,N=32,U=2/3;function X(){var J={nodes:O.apply(null,arguments),links:I.apply(null,arguments)};return ee(J),ue(J),oe(J),le(J),V(J),J}X.update=function(J){return V(J),J},X.nodeId=function(J){return arguments.length?(F=typeof J=="function"?J:i(J),X):F},X.nodeAlign=function(J){return arguments.length?(B=typeof J=="function"?J:i(J),X):B},X.nodeWidth=function(J){return arguments.length?(L=+J,X):L},X.nodePadding=function(J){return arguments.length?(z=+J,X):z},X.nodes=function(J){return arguments.length?(O=typeof J=="function"?J:i(J),X):O},X.links=function(J){return arguments.length?(I=typeof J=="function"?J:i(J),X):I},X.size=function(J){return arguments.length?(u=v=0,y=+J[0],R=+J[1],X):[y-u,R-v]},X.extent=function(J){return arguments.length?(u=+J[0][0],y=+J[1][0],v=+J[0][1],R=+J[1][1],X):[[u,v],[y,R]]},X.iterations=function(J){return arguments.length?(N=+J,X):N};function ee(J){J.nodes.forEach(function(Z,se){Z.index=se,Z.sourceLinks=[],Z.targetLinks=[]});var te=S.map(J.nodes,F);J.links.forEach(function(Z,se){Z.index=se;var Q=Z.source,q=Z.target;typeof Q!="object"&&(Q=Z.source=A(te,Q)),typeof q!="object"&&(q=Z.target=A(te,q)),Q.sourceLinks.push(Z),q.targetLinks.push(Z)})}function ue(J){J.nodes.forEach(function(te){te.value=Math.max(b.sum(te.sourceLinks,c),b.sum(te.targetLinks,c))})}function oe(J){var te,Z,se;for(te=J.nodes,Z=[],se=0;te.length;++se,te=Z,Z=[])te.forEach(function(q){q.depth=se,q.sourceLinks.forEach(function(re){Z.indexOf(re.target)<0&&Z.push(re.target)})});for(te=J.nodes,Z=[],se=0;te.length;++se,te=Z,Z=[])te.forEach(function(q){q.height=se,q.targetLinks.forEach(function(re){Z.indexOf(re.source)<0&&Z.push(re.source)})});var Q=(y-u-L)/(se-1);J.nodes.forEach(function(q){q.x1=(q.x0=u+Math.max(0,Math.min(se-1,Math.floor(B.call(null,q,se))))*Q)+L})}function le(J){var te=S.nest().key(function(fe){return fe.x0}).sortKeys(b.ascending).entries(J.nodes).map(function(fe){return fe.values});Q(),ae();for(var Z=1,se=N;se>0;--se)re(Z*=.99),ae(),q(Z),ae();function Q(){var fe=b.max(te,function(Ie){return Ie.length}),be=U*(R-v)/(fe-1);z>be&&(z=be);var Me=b.min(te,function(Ie){return(R-v-(Ie.length-1)*z)/b.sum(Ie,c)});te.forEach(function(Ie){Ie.forEach(function(Le,je){Le.y1=(Le.y0=je)+Le.value*Me})}),J.links.forEach(function(Ie){Ie.width=Ie.value*Me})}function q(fe){te.forEach(function(be){be.forEach(function(Me){if(Me.targetLinks.length){var Ie=(b.sum(Me.targetLinks,d)/b.sum(Me.targetLinks,c)-p(Me))*fe;Me.y0+=Ie,Me.y1+=Ie}})})}function re(fe){te.slice().reverse().forEach(function(be){be.forEach(function(Me){if(Me.sourceLinks.length){var Ie=(b.sum(Me.sourceLinks,T)/b.sum(Me.sourceLinks,c)-p(Me))*fe;Me.y0+=Ie,Me.y1+=Ie}})})}function ae(){te.forEach(function(fe){var be,Me,Ie=v,Le=fe.length,je;for(fe.sort(f),je=0;je<Le;++je)be=fe[je],Me=Ie-be.y0,Me>0&&(be.y0+=Me,be.y1+=Me),Ie=be.y1+z;if(Me=Ie-z-R,Me>0)for(Ie=be.y0-=Me,be.y1-=Me,je=Le-2;je>=0;--je)be=fe[je],Me=be.y1+z-Ie,Me>0&&(be.y0-=Me,be.y1-=Me),Ie=be.y0})}}function V(J){J.nodes.forEach(function(te){te.sourceLinks.sort(s),te.targetLinks.sort(n)}),J.nodes.forEach(function(te){var Z=te.y0,se=Z;te.sourceLinks.forEach(function(Q){Q.y0=Z+Q.width/2,Z+=Q.width}),te.targetLinks.forEach(function(Q){Q.y1=se+Q.width/2,se+=Q.width})})}return X};function _(u){return[u.source.x1,u.y0]}function w(u){return[u.target.x0,u.y1]}var g=function(){return E.linkHorizontal().source(_).target(w)};h.sankey=M,h.sankeyCenter=a,h.sankeyLeft=t,h.sankeyRight=r,h.sankeyJustify=o,h.sankeyLinkHorizontal=g,Object.defineProperty(h,"__esModule",{value:!0})})}}),h4=He({"node_modules/elementary-circuits-directed-graph/johnson.js"(Y,G){var h=JT();G.exports=function(S,E){var e=[],t=[],r=[],o={},a=[],i;function n(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(M){delete o[A][M],r[M]&&n(M)})}function s(A){var M=!1;t.push(A),r[A]=!0;var _,w;for(_=0;_<a[A].length;_++)w=a[A][_],w===i?(f(i,t),M=!0):r[w]||(M=s(w));if(M)n(A);else for(_=0;_<a[A].length;_++){w=a[A][_];var g=o[w];g||(g={},o[w]=g),g[w]=!0}return t.pop(),M}function f(A,M){var _=[].concat(M).concat(A);E?E(s):e.push(_)}function c(A){for(var M=0;M<S.length;M++)M<A&&(S[M]=[]),S[M]=S[M].filter(function(_){return _>=A})}function p(A){c(A);for(var M=S,_=h(M),w=_.components.filter(function(z){return z.length>1}),g=1/0,u,v=0;v<w.length;v++)for(var y=0;y<w[v].length;y++)w[v][y]<g&&(g=w[v][y],u=v);var R=w[u];if(!R)return!1;var L=S.map(function(z,F){return R.indexOf(F)===-1?[]:z.filter(function(B){return R.indexOf(B)!==-1})});return{leastVertex:g,adjList:L}}i=0;for(var d=S.length;i<d;){var T=p(i);if(i=T.leastVertex,a=T.adjList,a){for(var l=0;l<a.length;l++)for(var m=0;m<a[l].length;m++){var x=a[l][m];r[+x]=!1,o[x]={}}s(i),i=i+1}else i=d}if(!E)return e}}}),v4=He({"node_modules/@plotly/d3-sankey-circular/dist/d3-sankey-circular.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,Zm(),mx(),QT(),h4()):b(h.d3=h.d3||{},h.d3,h.d3,h.d3,null)})(Y,function(h,b,S,E,e){e=e&&e.hasOwnProperty("default")?e.default:e;function t(Le){return Le.target.depth}function r(Le){return Le.depth}function o(Le,je){return je-1-Le.height}function a(Le,je){return Le.sourceLinks.length?Le.depth:je-1}function i(Le){return Le.targetLinks.length?Le.depth:Le.sourceLinks.length?b.min(Le.sourceLinks,t)-1:0}function n(Le){return function(){return Le}}var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Le){return typeof Le}:function(Le){return Le&&typeof Symbol=="function"&&Le.constructor===Symbol&&Le!==Symbol.prototype?"symbol":typeof Le};function f(Le,je){return p(Le.source,je.source)||Le.index-je.index}function c(Le,je){return p(Le.target,je.target)||Le.index-je.index}function p(Le,je){return Le.partOfCycle===je.partOfCycle?Le.y0-je.y0:Le.circularLinkType==="top"||je.circularLinkType==="bottom"?-1:1}function d(Le){return Le.value}function T(Le){return(Le.y0+Le.y1)/2}function l(Le){return T(Le.source)}function m(Le){return T(Le.target)}function x(Le){return Le.index}function A(Le){return Le.nodes}function M(Le){return Le.links}function _(Le,je){var et=Le.get(je);if(!et)throw new Error("missing: "+je);return et}function w(Le,je){return je(Le)}var g=25,u=10,v=.3;function y(){var Le=0,je=0,et=1,rt=1,Je=24,Ze,Ee=x,xe=a,he=A,De=M,tt=32,nt=2,$e,Et=null;function Ct(){var mt={nodes:he.apply(null,arguments),links:De.apply(null,arguments)};jt(mt),R(mt,Ee,Et),Wt(mt),Dr(mt),L(mt,Ee),hr(mt,tt,Ee),Ar(mt);for(var Fe=4,We=0;We<Fe;We++)re(mt,rt,Ee),ae(mt,rt,Ee),se(mt,je,rt,Ee),re(mt,rt,Ee),ae(mt,rt,Ee);return Ie(mt,je,rt),N(mt,nt,rt,Ee),mt}Ct.nodeId=function(mt){return arguments.length?(Ee=typeof mt=="function"?mt:n(mt),Ct):Ee},Ct.nodeAlign=function(mt){return arguments.length?(xe=typeof mt=="function"?mt:n(mt),Ct):xe},Ct.nodeWidth=function(mt){return arguments.length?(Je=+mt,Ct):Je},Ct.nodePadding=function(mt){return arguments.length?(Ze=+mt,Ct):Ze},Ct.nodes=function(mt){return arguments.length?(he=typeof mt=="function"?mt:n(mt),Ct):he},Ct.links=function(mt){return arguments.length?(De=typeof mt=="function"?mt:n(mt),Ct):De},Ct.size=function(mt){return arguments.length?(Le=je=0,et=+mt[0],rt=+mt[1],Ct):[et-Le,rt-je]},Ct.extent=function(mt){return arguments.length?(Le=+mt[0][0],et=+mt[1][0],je=+mt[0][1],rt=+mt[1][1],Ct):[[Le,je],[et,rt]]},Ct.iterations=function(mt){return arguments.length?(tt=+mt,Ct):tt},Ct.circularLinkGap=function(mt){return arguments.length?(nt=+mt,Ct):nt},Ct.nodePaddingRatio=function(mt){return arguments.length?($e=+mt,Ct):$e},Ct.sortNodes=function(mt){return arguments.length?(Et=mt,Ct):Et},Ct.update=function(mt){return L(mt,Ee),Ar(mt),mt.links.forEach(function(Fe){Fe.circular&&(Fe.circularLinkType=Fe.y0+Fe.y1<rt?"top":"bottom",Fe.source.circularLinkType=Fe.circularLinkType,Fe.target.circularLinkType=Fe.circularLinkType)}),re(mt,rt,Ee,!1),ae(mt,rt,Ee),N(mt,nt,rt,Ee),mt};function jt(mt){mt.nodes.forEach(function(We,Ae){We.index=Ae,We.sourceLinks=[],We.targetLinks=[]});var Fe=S.map(mt.nodes,Ee);return mt.links.forEach(function(We,Ae){We.index=Ae;var me=We.source,pe=We.target;(typeof me>"u"?"undefined":s(me))!=="object"&&(me=We.source=_(Fe,me)),(typeof pe>"u"?"undefined":s(pe))!=="object"&&(pe=We.target=_(Fe,pe)),me.sourceLinks.push(We),pe.targetLinks.push(We)}),mt}function Wt(mt){mt.nodes.forEach(function(Fe){Fe.partOfCycle=!1,Fe.value=Math.max(b.sum(Fe.sourceLinks,d),b.sum(Fe.targetLinks,d)),Fe.sourceLinks.forEach(function(We){We.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=We.circularLinkType)}),Fe.targetLinks.forEach(function(We){We.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=We.circularLinkType)})})}function dr(mt){var Fe=0,We=0,Ae=0,me=0,pe=b.max(mt.nodes,function(Te){return Te.column});return mt.links.forEach(function(Te){Te.circular&&(Te.circularLinkType=="top"?Fe=Fe+Te.width:We=We+Te.width,Te.target.column==0&&(me=me+Te.width),Te.source.column==pe&&(Ae=Ae+Te.width))}),Fe=Fe>0?Fe+g+u:Fe,We=We>0?We+g+u:We,Ae=Ae>0?Ae+g+u:Ae,me=me>0?me+g+u:me,{top:Fe,bottom:We,left:me,right:Ae}}function vr(mt,Fe){var We=b.max(mt.nodes,function(bt){return bt.column}),Ae=et-Le,me=rt-je,pe=Ae+Fe.right+Fe.left,Te=me+Fe.top+Fe.bottom,Ue=Ae/pe,Xe=me/Te;return Le=Le*Ue+Fe.left,et=Fe.right==0?et:et*Ue,je=je*Xe+Fe.top,rt=rt*Xe,mt.nodes.forEach(function(bt){bt.x0=Le+bt.column*((et-Le-Je)/We),bt.x1=bt.x0+Je}),Xe}function Dr(mt){var Fe,We,Ae;for(Fe=mt.nodes,We=[],Ae=0;Fe.length;++Ae,Fe=We,We=[])Fe.forEach(function(me){me.depth=Ae,me.sourceLinks.forEach(function(pe){We.indexOf(pe.target)<0&&!pe.circular&&We.push(pe.target)})});for(Fe=mt.nodes,We=[],Ae=0;Fe.length;++Ae,Fe=We,We=[])Fe.forEach(function(me){me.height=Ae,me.targetLinks.forEach(function(pe){We.indexOf(pe.source)<0&&!pe.circular&&We.push(pe.source)})});mt.nodes.forEach(function(me){me.column=Math.floor(xe.call(null,me,Ae))})}function hr(mt,Fe,We){var Ae=S.nest().key(function(bt){return bt.column}).sortKeys(b.ascending).entries(mt.nodes).map(function(bt){return bt.values});Te(We),Xe();for(var me=1,pe=Fe;pe>0;--pe)Ue(me*=.99,We),Xe();function Te(bt){if($e){var xt=1/0;Ae.forEach(function(ar){var tr=rt*$e/(ar.length+1);xt=tr<xt?tr:xt}),Ze=xt}var Mt=b.min(Ae,function(ar){return(rt-je-(ar.length-1)*Ze)/b.sum(ar,d)});Mt=Mt*v,mt.links.forEach(function(ar){ar.width=ar.value*Mt});var Nt=dr(mt),sr=vr(mt,Nt);Mt=Mt*sr,mt.links.forEach(function(ar){ar.width=ar.value*Mt}),Ae.forEach(function(ar){var tr=ar.length;ar.forEach(function(Tr,sa){Tr.depth==Ae.length-1&&tr==1||Tr.depth==0&&tr==1?(Tr.y0=rt/2-Tr.value*Mt,Tr.y1=Tr.y0+Tr.value*Mt):Tr.partOfCycle?B(Tr,bt)==0?(Tr.y0=rt/2+sa,Tr.y1=Tr.y0+Tr.value*Mt):Tr.circularLinkType=="top"?(Tr.y0=je+sa,Tr.y1=Tr.y0+Tr.value*Mt):(Tr.y0=rt-Tr.value*Mt-sa,Tr.y1=Tr.y0+Tr.value*Mt):Nt.top==0||Nt.bottom==0?(Tr.y0=(rt-je)/tr*sa,Tr.y1=Tr.y0+Tr.value*Mt):(Tr.y0=(rt-je)/2-tr/2+sa,Tr.y1=Tr.y0+Tr.value*Mt)})})}function Ue(bt,xt){var Mt=Ae.length;Ae.forEach(function(Nt){var sr=Nt.length,ar=Nt[0].depth;Nt.forEach(function(tr){var Tr;if((tr.sourceLinks.length||tr.targetLinks.length)&&!(tr.partOfCycle&&B(tr,xt)>0))if(ar==0&&sr==1)Tr=tr.y1-tr.y0,tr.y0=rt/2-Tr/2,tr.y1=rt/2+Tr/2;else if(ar==Mt-1&&sr==1)Tr=tr.y1-tr.y0,tr.y0=rt/2-Tr/2,tr.y1=rt/2+Tr/2;else{var sa=0,Ea=b.mean(tr.sourceLinks,m),ba=b.mean(tr.targetLinks,l);Ea&&ba?sa=(Ea+ba)/2:sa=Ea||ba;var Ia=(sa-T(tr))*bt;tr.y0+=Ia,tr.y1+=Ia}})})}function Xe(){Ae.forEach(function(bt){var xt,Mt,Nt=je,sr=bt.length,ar;for(bt.sort(p),ar=0;ar<sr;++ar)xt=bt[ar],Mt=Nt-xt.y0,Mt>0&&(xt.y0+=Mt,xt.y1+=Mt),Nt=xt.y1+Ze;if(Mt=Nt-Ze-rt,Mt>0)for(Nt=xt.y0-=Mt,xt.y1-=Mt,ar=sr-2;ar>=0;--ar)xt=bt[ar],Mt=xt.y1+Ze-Nt,Mt>0&&(xt.y0-=Mt,xt.y1-=Mt),Nt=xt.y0})}}function Ar(mt){mt.nodes.forEach(function(Fe){Fe.sourceLinks.sort(c),Fe.targetLinks.sort(f)}),mt.nodes.forEach(function(Fe){var We=Fe.y0,Ae=We,me=Fe.y1,pe=me;Fe.sourceLinks.forEach(function(Te){Te.circular?(Te.y0=me-Te.width/2,me=me-Te.width):(Te.y0=We+Te.width/2,We+=Te.width)}),Fe.targetLinks.forEach(function(Te){Te.circular?(Te.y1=pe-Te.width/2,pe=pe-Te.width):(Te.y1=Ae+Te.width/2,Ae+=Te.width)})})}return Ct}function R(Le,je,et){var rt=0;if(et===null){for(var Je=[],Ze=0;Ze<Le.links.length;Ze++){var Ee=Le.links[Ze],xe=Ee.source.index,he=Ee.target.index;Je[xe]||(Je[xe]=[]),Je[he]||(Je[he]=[]),Je[xe].indexOf(he)===-1&&Je[xe].push(he)}var De=e(Je);De.sort(function(Et,Ct){return Et.length-Ct.length});var tt={};for(Ze=0;Ze<De.length;Ze++){var nt=De[Ze],$e=nt.slice(-2);tt[$e[0]]||(tt[$e[0]]={}),tt[$e[0]][$e[1]]=!0}Le.links.forEach(function(Et){var Ct=Et.target.index,jt=Et.source.index;Ct===jt||tt[jt]&&tt[jt][Ct]?(Et.circular=!0,Et.circularLinkID=rt,rt=rt+1):Et.circular=!1})}else Le.links.forEach(function(Et){Et.source[et]<Et.target[et]?Et.circular=!1:(Et.circular=!0,Et.circularLinkID=rt,rt=rt+1)})}function L(Le,je){var et=0,rt=0;Le.links.forEach(function(Je){Je.circular&&(Je.source.circularLinkType||Je.target.circularLinkType?Je.circularLinkType=Je.source.circularLinkType?Je.source.circularLinkType:Je.target.circularLinkType:Je.circularLinkType=et<rt?"top":"bottom",Je.circularLinkType=="top"?et=et+1:rt=rt+1,Le.nodes.forEach(function(Ze){(w(Ze,je)==w(Je.source,je)||w(Ze,je)==w(Je.target,je))&&(Ze.circularLinkType=Je.circularLinkType)}))}),Le.links.forEach(function(Je){Je.circular&&(Je.source.circularLinkType==Je.target.circularLinkType&&(Je.circularLinkType=Je.source.circularLinkType),Me(Je,je)&&(Je.circularLinkType=Je.source.circularLinkType))})}function z(Le){var je=Math.abs(Le.y1-Le.y0),et=Math.abs(Le.target.x0-Le.source.x1);return Math.atan(et/je)}function F(Le,je){return Le.source.column<je.target.column?!1:!(Le.target.column>je.source.column)}function B(Le,je){var et=0;Le.sourceLinks.forEach(function(Je){et=Je.circular&&!Me(Je,je)?et+1:et});var rt=0;return Le.targetLinks.forEach(function(Je){rt=Je.circular&&!Me(Je,je)?rt+1:rt}),et+rt}function O(Le){var je=Le.source.sourceLinks,et=0;je.forEach(function(Ze){et=Ze.circular?et+1:et});var rt=Le.target.targetLinks,Je=0;return rt.forEach(function(Ze){Je=Ze.circular?Je+1:Je}),!(et>1||Je>1)}function I(Le,je,et){return Le.sort(X),Le.forEach(function(rt,Je){var Ze=0;if(Me(rt,et)&&O(rt))rt.circularPathData.verticalBuffer=Ze+rt.width/2;else{var Ee=0;for(Ee;Ee<Je;Ee++)if(F(Le[Je],Le[Ee])){var xe=Le[Ee].circularPathData.verticalBuffer+Le[Ee].width/2+je;Ze=xe>Ze?xe:Ze}rt.circularPathData.verticalBuffer=Ze+rt.width/2}}),Le}function N(Le,je,et,rt){var Je=5,Ze=b.min(Le.links,function(he){return he.source.y0});Le.links.forEach(function(he){he.circular&&(he.circularPathData={})});var Ee=Le.links.filter(function(he){return he.circularLinkType=="top"});I(Ee,je,rt);var xe=Le.links.filter(function(he){return he.circularLinkType=="bottom"});I(xe,je,rt),Le.links.forEach(function(he){if(he.circular){if(he.circularPathData.arcRadius=he.width+u,he.circularPathData.leftNodeBuffer=Je,he.circularPathData.rightNodeBuffer=Je,he.circularPathData.sourceWidth=he.source.x1-he.source.x0,he.circularPathData.sourceX=he.source.x0+he.circularPathData.sourceWidth,he.circularPathData.targetX=he.target.x0,he.circularPathData.sourceY=he.y0,he.circularPathData.targetY=he.y1,Me(he,rt)&&O(he))he.circularPathData.leftSmallArcRadius=u+he.width/2,he.circularPathData.leftLargeArcRadius=u+he.width/2,he.circularPathData.rightSmallArcRadius=u+he.width/2,he.circularPathData.rightLargeArcRadius=u+he.width/2,he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=he.source.y1+g+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=he.source.y0-g-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius);else{var De=he.source.column,tt=he.circularLinkType,nt=Le.links.filter(function(Ct){return Ct.source.column==De&&Ct.circularLinkType==tt});he.circularLinkType=="bottom"?nt.sort(ue):nt.sort(ee);var $e=0;nt.forEach(function(Ct,jt){Ct.circularLinkID==he.circularLinkID&&(he.circularPathData.leftSmallArcRadius=u+he.width/2+$e,he.circularPathData.leftLargeArcRadius=u+he.width/2+jt*je+$e),$e=$e+Ct.width}),De=he.target.column,nt=Le.links.filter(function(Ct){return Ct.target.column==De&&Ct.circularLinkType==tt}),he.circularLinkType=="bottom"?nt.sort(le):nt.sort(oe),$e=0,nt.forEach(function(Ct,jt){Ct.circularLinkID==he.circularLinkID&&(he.circularPathData.rightSmallArcRadius=u+he.width/2+$e,he.circularPathData.rightLargeArcRadius=u+he.width/2+jt*je+$e),$e=$e+Ct.width}),he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=Math.max(et,he.source.y1,he.target.y1)+g+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=Ze-g-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius)}he.circularPathData.leftInnerExtent=he.circularPathData.sourceX+he.circularPathData.leftNodeBuffer,he.circularPathData.rightInnerExtent=he.circularPathData.targetX-he.circularPathData.rightNodeBuffer,he.circularPathData.leftFullExtent=he.circularPathData.sourceX+he.circularPathData.leftLargeArcRadius+he.circularPathData.leftNodeBuffer,he.circularPathData.rightFullExtent=he.circularPathData.targetX-he.circularPathData.rightLargeArcRadius-he.circularPathData.rightNodeBuffer}if(he.circular)he.path=U(he);else{var Et=E.linkHorizontal().source(function(Ct){var jt=Ct.source.x0+(Ct.source.x1-Ct.source.x0),Wt=Ct.y0;return[jt,Wt]}).target(function(Ct){var jt=Ct.target.x0,Wt=Ct.y1;return[jt,Wt]});he.path=Et(he)}})}function U(Le){var je="";return Le.circularLinkType=="top"?je="M"+Le.circularPathData.sourceX+" "+Le.circularPathData.sourceY+" L"+Le.circularPathData.leftInnerExtent+" "+Le.circularPathData.sourceY+" A"+Le.circularPathData.leftLargeArcRadius+" "+Le.circularPathData.leftSmallArcRadius+" 0 0 0 "+Le.circularPathData.leftFullExtent+" "+(Le.circularPathData.sourceY-Le.circularPathData.leftSmallArcRadius)+" L"+Le.circularPathData.leftFullExtent+" "+Le.circularPathData.verticalLeftInnerExtent+" A"+Le.circularPathData.leftLargeArcRadius+" "+Le.circularPathData.leftLargeArcRadius+" 0 0 0 "+Le.circularPathData.leftInnerExtent+" "+Le.circularPathData.verticalFullExtent+" L"+Le.circularPathData.rightInnerExtent+" "+Le.circularPathData.verticalFullExtent+" A"+Le.circularPathData.rightLargeArcRadius+" "+Le.circularPathData.rightLargeArcRadius+" 0 0 0 "+Le.circularPathData.rightFullExtent+" "+Le.circularPathData.verticalRightInnerExtent+" L"+Le.circularPathData.rightFullExtent+" "+(Le.circularPathData.targetY-Le.circularPathData.rightSmallArcRadius)+" A"+Le.circularPathData.rightLargeArcRadius+" "+Le.circularPathData.rightSmallArcRadius+" 0 0 0 "+Le.circularPathData.rightInnerExtent+" "+Le.circularPathData.targetY+" L"+Le.circularPathData.targetX+" "+Le.circularPathData.targetY:je="M"+Le.circularPathData.sourceX+" "+Le.circularPathData.sourceY+" L"+Le.circularPathData.leftInnerExtent+" "+Le.circularPathData.sourceY+" A"+Le.circularPathData.leftLargeArcRadius+" "+Le.circularPathData.leftSmallArcRadius+" 0 0 1 "+Le.circularPathData.leftFullExtent+" "+(Le.circularPathData.sourceY+Le.circularPathData.leftSmallArcRadius)+" L"+Le.circularPathData.leftFullExtent+" "+Le.circularPathData.verticalLeftInnerExtent+" A"+Le.circularPathData.leftLargeArcRadius+" "+Le.circularPathData.leftLargeArcRadius+" 0 0 1 "+Le.circularPathData.leftInnerExtent+" "+Le.circularPathData.verticalFullExtent+" L"+Le.circularPathData.rightInnerExtent+" "+Le.circularPathData.verticalFullExtent+" A"+Le.circularPathData.rightLargeArcRadius+" "+Le.circularPathData.rightLargeArcRadius+" 0 0 1 "+Le.circularPathData.rightFullExtent+" "+Le.circularPathData.verticalRightInnerExtent+" L"+Le.circularPathData.rightFullExtent+" "+(Le.circularPathData.targetY+Le.circularPathData.rightSmallArcRadius)+" A"+Le.circularPathData.rightLargeArcRadius+" "+Le.circularPathData.rightSmallArcRadius+" 0 0 1 "+Le.circularPathData.rightInnerExtent+" "+Le.circularPathData.targetY+" L"+Le.circularPathData.targetX+" "+Le.circularPathData.targetY,je}function X(Le,je){return V(Le)==V(je)?Le.circularLinkType=="bottom"?ue(Le,je):ee(Le,je):V(je)-V(Le)}function ee(Le,je){return Le.y0-je.y0}function ue(Le,je){return je.y0-Le.y0}function oe(Le,je){return Le.y1-je.y1}function le(Le,je){return je.y1-Le.y1}function V(Le){return Le.target.column-Le.source.column}function J(Le){return Le.target.x0-Le.source.x1}function te(Le,je){var et=z(Le),rt=J(je)/Math.tan(et),Je=be(Le)=="up"?Le.y1+rt:Le.y1-rt;return Je}function Z(Le,je){var et=z(Le),rt=J(je)/Math.tan(et),Je=be(Le)=="up"?Le.y1-rt:Le.y1+rt;return Je}function se(Le,je,et,rt){Le.links.forEach(function(Je){if(!Je.circular&&Je.target.column-Je.source.column>1){var Ze=Je.source.column+1,Ee=Je.target.column-1,xe=1,he=Ee-Ze+1;for(xe=1;Ze<=Ee;Ze++,xe++)Le.nodes.forEach(function(De){if(De.column==Ze){var tt=xe/(he+1),nt=Math.pow(1-tt,3),$e=3*tt*Math.pow(1-tt,2),Et=3*Math.pow(tt,2)*(1-tt),Ct=Math.pow(tt,3),jt=nt*Je.y0+$e*Je.y0+Et*Je.y1+Ct*Je.y1,Wt=jt-Je.width/2,dr=jt+Je.width/2,vr;Wt>De.y0&&Wt<De.y1?(vr=De.y1-Wt+10,vr=De.circularLinkType=="bottom"?vr:-vr,De=q(De,vr,je,et),Le.nodes.forEach(function(Dr){w(Dr,rt)==w(De,rt)||Dr.column!=De.column||Q(De,Dr)&&q(Dr,vr,je,et)})):dr>De.y0&&dr<De.y1?(vr=dr-De.y0+10,De=q(De,vr,je,et),Le.nodes.forEach(function(Dr){w(Dr,rt)==w(De,rt)||Dr.column!=De.column||Dr.y0<De.y1&&Dr.y1>De.y1&&q(Dr,vr,je,et)})):Wt<De.y0&&dr>De.y1&&(vr=dr-De.y0+10,De=q(De,vr,je,et),Le.nodes.forEach(function(Dr){w(Dr,rt)==w(De,rt)||Dr.column!=De.column||Dr.y0<De.y1&&Dr.y1>De.y1&&q(Dr,vr,je,et)}))}})}})}function Q(Le,je){return Le.y0>je.y0&&Le.y0<je.y1||Le.y1>je.y0&&Le.y1<je.y1?!0:Le.y0<je.y0&&Le.y1>je.y1}function q(Le,je,et,rt){return Le.y0+je>=et&&Le.y1+je<=rt&&(Le.y0=Le.y0+je,Le.y1=Le.y1+je,Le.targetLinks.forEach(function(Je){Je.y1=Je.y1+je}),Le.sourceLinks.forEach(function(Je){Je.y0=Je.y0+je})),Le}function re(Le,je,et,rt){Le.nodes.forEach(function(Je){rt&&Je.y+(Je.y1-Je.y0)>je&&(Je.y=Je.y-(Je.y+(Je.y1-Je.y0)-je));var Ze=Le.links.filter(function(he){return w(he.source,et)==w(Je,et)}),Ee=Ze.length;Ee>1&&Ze.sort(function(he,De){if(!he.circular&&!De.circular){if(he.target.column==De.target.column)return he.y1-De.y1;if(fe(he,De)){if(he.target.column>De.target.column){var tt=Z(De,he);return he.y1-tt}if(De.target.column>he.target.column){var nt=Z(he,De);return nt-De.y1}}else return he.y1-De.y1}if(he.circular&&!De.circular)return he.circularLinkType=="top"?-1:1;if(De.circular&&!he.circular)return De.circularLinkType=="top"?1:-1;if(he.circular&&De.circular)return he.circularLinkType===De.circularLinkType&&he.circularLinkType=="top"?he.target.column===De.target.column?he.target.y1-De.target.y1:De.target.column-he.target.column:he.circularLinkType===De.circularLinkType&&he.circularLinkType=="bottom"?he.target.column===De.target.column?De.target.y1-he.target.y1:he.target.column-De.target.column:he.circularLinkType=="top"?-1:1});var xe=Je.y0;Ze.forEach(function(he){he.y0=xe+he.width/2,xe=xe+he.width}),Ze.forEach(function(he,De){if(he.circularLinkType=="bottom"){var tt=De+1,nt=0;for(tt;tt<Ee;tt++)nt=nt+Ze[tt].width;he.y0=Je.y1-nt-he.width/2}})})}function ae(Le,je,et){Le.nodes.forEach(function(rt){var Je=Le.links.filter(function(xe){return w(xe.target,et)==w(rt,et)}),Ze=Je.length;Ze>1&&Je.sort(function(xe,he){if(!xe.circular&&!he.circular){if(xe.source.column==he.source.column)return xe.y0-he.y0;if(fe(xe,he)){if(he.source.column<xe.source.column){var De=te(he,xe);return xe.y0-De}if(xe.source.column<he.source.column){var tt=te(xe,he);return tt-he.y0}}else return xe.y0-he.y0}if(xe.circular&&!he.circular)return xe.circularLinkType=="top"?-1:1;if(he.circular&&!xe.circular)return he.circularLinkType=="top"?1:-1;if(xe.circular&&he.circular)return xe.circularLinkType===he.circularLinkType&&xe.circularLinkType=="top"?xe.source.column===he.source.column?xe.source.y1-he.source.y1:xe.source.column-he.source.column:xe.circularLinkType===he.circularLinkType&&xe.circularLinkType=="bottom"?xe.source.column===he.source.column?xe.source.y1-he.source.y1:he.source.column-xe.source.column:xe.circularLinkType=="top"?-1:1});var Ee=rt.y0;Je.forEach(function(xe){xe.y1=Ee+xe.width/2,Ee=Ee+xe.width}),Je.forEach(function(xe,he){if(xe.circularLinkType=="bottom"){var De=he+1,tt=0;for(De;De<Ze;De++)tt=tt+Je[De].width;xe.y1=rt.y1-tt-xe.width/2}})})}function fe(Le,je){return be(Le)==be(je)}function be(Le){return Le.y0-Le.y1>0?"up":"down"}function Me(Le,je){return w(Le.source,je)==w(Le.target,je)}function Ie(Le,je,et){var rt=Le.nodes,Je=Le.links,Ze=!1,Ee=!1;if(Je.forEach(function($e){$e.circularLinkType=="top"?Ze=!0:$e.circularLinkType=="bottom"&&(Ee=!0)}),Ze==!1||Ee==!1){var xe=b.min(rt,function($e){return $e.y0}),he=b.max(rt,function($e){return $e.y1}),De=he-xe,tt=et-je,nt=tt/De;rt.forEach(function($e){var Et=($e.y1-$e.y0)*nt;$e.y0=($e.y0-xe)*nt,$e.y1=$e.y0+Et}),Je.forEach(function($e){$e.y0=($e.y0-xe)*nt,$e.y1=($e.y1-xe)*nt,$e.width=$e.width*nt})}}h.sankeyCircular=y,h.sankeyCenter=i,h.sankeyLeft=r,h.sankeyRight=o,h.sankeyJustify=a,Object.defineProperty(h,"__esModule",{value:!0})})}}),e5=He({"src/traces/sankey/constants.js"(Y,G){G.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),d4=He({"src/traces/sankey/render.js"(Y,G){var h=u4(),b=(Jp(),Os(lp)).interpolateNumber,S=_i(),E=f4(),e=v4(),t=e5(),r=Zf(),o=Di(),a=Io(),i=ea(),n=i.strTranslate,s=i.strRotate,f=Jv(),c=f.keyFun,p=f.repeat,d=f.unwrap,T=Zl(),l=ji(),m=Nf(),x=m.CAP_SHIFT,A=m.LINE_SPACING,M=3;function _(te,Z,se){var Q=d(Z),q=Q.trace,re=q.domain,ae=q.orientation==="h",fe=q.node.pad,be=q.node.thickness,Me={justify:E.sankeyJustify,left:E.sankeyLeft,right:E.sankeyRight,center:E.sankeyCenter}[q.node.align],Ie=te.width*(re.x[1]-re.x[0]),Le=te.height*(re.y[1]-re.y[0]),je=Q._nodes,et=Q._links,rt=Q.circular,Je;rt?Je=e.sankeyCircular().circularLinkGap(0):Je=E.sankey(),Je.iterations(t.sankeyIterations).size(ae?[Ie,Le]:[Le,Ie]).nodeWidth(be).nodePadding(fe).nodeId(function(Dr){return Dr.pointNumber}).nodeAlign(Me).nodes(je).links(et);var Ze=Je();Je.nodePadding()<fe&&i.warn("node.pad was reduced to ",Je.nodePadding()," to fit within the figure.");var Ee,xe,he;for(var De in Q._groupLookup){var tt=parseInt(Q._groupLookup[De]),nt;for(Ee=0;Ee<Ze.nodes.length;Ee++)if(Ze.nodes[Ee].pointNumber===tt){nt=Ze.nodes[Ee];break}if(nt){var $e={pointNumber:parseInt(De),x0:nt.x0,x1:nt.x1,y0:nt.y0,y1:nt.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};Ze.nodes.unshift($e),nt.childrenNodes.unshift($e)}}function Et(){for(Ee=0;Ee<Ze.nodes.length;Ee++){var Dr=Ze.nodes[Ee],hr={},Ar,mt;for(xe=0;xe<Dr.targetLinks.length;xe++)mt=Dr.targetLinks[xe],Ar=mt.source.pointNumber+":"+mt.target.pointNumber,hr.hasOwnProperty(Ar)||(hr[Ar]=[]),hr[Ar].push(mt);var Fe=Object.keys(hr);for(xe=0;xe<Fe.length;xe++){Ar=Fe[xe];var We=hr[Ar],Ae=0,me={};for(he=0;he<We.length;he++)mt=We[he],me[mt.label]||(me[mt.label]=0),me[mt.label]+=mt.value,Ae+=mt.value;for(he=0;he<We.length;he++)mt=We[he],mt.flow={value:Ae,labelConcentration:me[mt.label]/Ae,concentration:mt.value/Ae,links:We},mt.concentrationscale&&(mt.color=r(mt.concentrationscale(mt.flow.labelConcentration)))}var pe=0;for(xe=0;xe<Dr.sourceLinks.length;xe++)pe+=Dr.sourceLinks[xe].value;for(xe=0;xe<Dr.sourceLinks.length;xe++)mt=Dr.sourceLinks[xe],mt.concentrationOut=mt.value/pe;var Te=0;for(xe=0;xe<Dr.targetLinks.length;xe++)Te+=Dr.targetLinks[xe].value;for(xe=0;xe<Dr.targetLinks.length;xe++)mt=Dr.targetLinks[xe],mt.concenrationIn=mt.value/Te}}Et();function Ct(Dr){Dr.forEach(function(hr){var Ar,mt,Fe=0,We=hr.length,Ae;for(hr.sort(function(me,pe){return me.y0-pe.y0}),Ae=0;Ae<We;++Ae)Ar=hr[Ae],Ar.y0>=Fe||(mt=Fe-Ar.y0,mt>1e-6&&(Ar.y0+=mt,Ar.y1+=mt)),Fe=Ar.y1+fe})}function jt(Dr){var hr=Dr.map(function(pe,Te){return{x0:pe.x0,index:Te}}).sort(function(pe,Te){return pe.x0-Te.x0}),Ar=[],mt=-1,Fe,We=-1/0,Ae;for(Ee=0;Ee<hr.length;Ee++){var me=Dr[hr[Ee].index];me.x0>We+be&&(mt+=1,Fe=me.x0),We=me.x0,Ar[mt]||(Ar[mt]=[]),Ar[mt].push(me),Ae=Fe-me.x0,me.x0+=Ae,me.x1+=Ae}return Ar}if(q.node.x.length&&q.node.y.length){for(Ee=0;Ee<Math.min(q.node.x.length,q.node.y.length,Ze.nodes.length);Ee++)if(q.node.x[Ee]&&q.node.y[Ee]){var Wt=[q.node.x[Ee]*Ie,q.node.y[Ee]*Le];Ze.nodes[Ee].x0=Wt[0]-be/2,Ze.nodes[Ee].x1=Wt[0]+be/2;var dr=Ze.nodes[Ee].y1-Ze.nodes[Ee].y0;Ze.nodes[Ee].y0=Wt[1]-dr/2,Ze.nodes[Ee].y1=Wt[1]+dr/2}if(q.arrangement==="snap"){je=Ze.nodes;var vr=jt(je);Ct(vr)}Je.update(Ze)}return{circular:rt,key:se,trace:q,guid:i.randstr(),horizontal:ae,width:Ie,height:Le,nodePad:q.node.pad,nodeLineColor:q.node.line.color,nodeLineWidth:q.node.line.width,linkLineColor:q.link.line.color,linkLineWidth:q.link.line.width,linkArrowLength:q.link.arrowlen,valueFormat:q.valueformat,valueSuffix:q.valuesuffix,textFont:q.textfont,translateX:re.x[0]*te.width+te.margin.l,translateY:te.height-re.y[1]*te.height+te.margin.t,dragParallel:ae?Le:Ie,dragPerpendicular:ae?Ie:Le,arrangement:q.arrangement,sankey:Je,graph:Ze,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function w(te,Z,se){var Q=r(Z.color),q=r(Z.hovercolor),re=Z.source.label+"|"+Z.target.label,ae=re+"__"+se;return Z.trace=te.trace,Z.curveNumber=te.trace.index,{circular:te.circular,key:ae,traceId:te.key,pointNumber:Z.pointNumber,link:Z,tinyColorHue:o.tinyRGB(Q),tinyColorAlpha:Q.getAlpha(),tinyColorHoverHue:o.tinyRGB(q),tinyColorHoverAlpha:q.getAlpha(),linkPath:u,linkLineColor:te.linkLineColor,linkLineWidth:te.linkLineWidth,linkArrowLength:te.linkArrowLength,valueFormat:te.valueFormat,valueSuffix:te.valueSuffix,sankey:te.sankey,parent:te,interactionState:te.interactionState,flow:Z.flow}}function g(te,Z){var se="",Q=te.width/2,q=te.circularPathData,re=q.sourceX+q.verticalBuffer<q.targetX,ae=q.rightFullExtent-q.rightLargeArcRadius-Z<=q.leftFullExtent-Q;return Math.abs(q.rightFullExtent-q.leftFullExtent-Q)<Q,te.circularLinkType==="top"?(se="M "+(q.targetX-Z)+" "+(q.targetY+Q)+" L "+(q.rightInnerExtent-Z)+" "+(q.targetY+Q)+"A "+(q.rightLargeArcRadius+Q)+" "+(q.rightSmallArcRadius+Q)+" 0 0 1 "+(q.rightFullExtent-Q-Z)+" "+(q.targetY-q.rightSmallArcRadius)+"L "+(q.rightFullExtent-Q-Z)+" "+q.verticalRightInnerExtent,re&&ae?se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 1 "+(q.rightFullExtent+Q-Z-(q.rightLargeArcRadius-Q))+" "+(q.verticalRightInnerExtent-(q.rightLargeArcRadius+Q))+" L "+(q.rightFullExtent+Q-(q.rightLargeArcRadius-Q)-Z)+" "+(q.verticalRightInnerExtent-(q.rightLargeArcRadius+Q))+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftLargeArcRadius+Q)+" 0 0 1 "+(q.leftFullExtent+Q)+" "+q.verticalRightInnerExtent:re?se+=" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightLargeArcRadius-Q)+" 0 0 0 "+(q.rightFullExtent-Q-Z-(q.rightLargeArcRadius-Q))+" "+(q.verticalRightInnerExtent-(q.rightLargeArcRadius-Q))+" L "+(q.leftFullExtent+Q+(q.rightLargeArcRadius-Q))+" "+(q.verticalRightInnerExtent-(q.rightLargeArcRadius-Q))+" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftLargeArcRadius-Q)+" 0 0 0 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent:se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 1 "+(q.rightInnerExtent-Z)+" "+(q.verticalFullExtent-Q)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent-Q)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftLargeArcRadius+Q)+" 0 0 1 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent,se+=" L "+(q.leftFullExtent+Q)+" "+(q.sourceY-q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 1 "+q.leftInnerExtent+" "+(q.sourceY+Q)+" L "+q.sourceX+" "+(q.sourceY+Q)+" L "+q.sourceX+" "+(q.sourceY-Q)+" L "+q.leftInnerExtent+" "+(q.sourceY-Q)+" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftSmallArcRadius-Q)+" 0 0 0 "+(q.leftFullExtent-Q)+" "+(q.sourceY-q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Q)+" "+q.verticalLeftInnerExtent,re&&ae?se+=" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 0 "+(q.leftFullExtent-Q)+" "+(q.verticalFullExtent+Q)+"L"+(q.rightFullExtent+Q-Z)+" "+(q.verticalFullExtent+Q)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 0 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent:re?se+=" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 1 "+(q.leftFullExtent+Q)+" "+(q.verticalFullExtent-Q)+" L "+(q.rightFullExtent-Q-Z)+" "+(q.verticalFullExtent-Q)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 1 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent:se+=" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftLargeArcRadius-Q)+" 0 0 0 "+q.leftInnerExtent+" "+(q.verticalFullExtent+Q)+" L "+(q.rightInnerExtent-Z)+" "+(q.verticalFullExtent+Q)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightLargeArcRadius-Q)+" 0 0 0 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent,se+=" L "+(q.rightFullExtent+Q-Z)+" "+(q.targetY-q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 0 "+(q.rightInnerExtent-Z)+" "+(q.targetY-Q)+" L "+(q.targetX-Z)+" "+(q.targetY-Q)+(Z>0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(se="M "+(q.targetX-Z)+" "+(q.targetY-Q)+" L "+(q.rightInnerExtent-Z)+" "+(q.targetY-Q)+" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightSmallArcRadius+Q)+" 0 0 0 "+(q.rightFullExtent-Q-Z)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Q-Z)+" "+q.verticalRightInnerExtent,re&&ae?se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.rightInnerExtent-Q-Z)+" "+(q.verticalFullExtent+Q)+" L "+(q.rightFullExtent+Q-Z-(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent+Q)+" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent:re?se+=" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.rightFullExtent-Z-Q-(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent-Q)+" L "+(q.leftFullExtent+Q+(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent-Q)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent:se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.rightInnerExtent-Z)+" "+(q.verticalFullExtent+Q)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Q)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftLargeArcRadius+Q)+" 0 0 0 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent,se+=" L "+(q.leftFullExtent+Q)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Q)+" L "+q.sourceX+" "+(q.sourceY-Q)+" L "+q.sourceX+" "+(q.sourceY+Q)+" L "+q.leftInnerExtent+" "+(q.sourceY+Q)+" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftSmallArcRadius-Q)+" 0 0 1 "+(q.leftFullExtent-Q)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Q)+" "+q.verticalLeftInnerExtent,re&&ae?se+=" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.leftFullExtent-Q-(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent-Q)+" L "+(q.rightFullExtent+Q-Z+(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent-Q)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent:re?se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.leftFullExtent+Q)+" "+(q.verticalFullExtent+Q)+" L "+(q.rightFullExtent-Z-Q)+" "+(q.verticalFullExtent+Q)+" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent:se+=" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftLargeArcRadius-Q)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Q)+" L "+(q.rightInnerExtent-Z)+" "+(q.verticalFullExtent-Q)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightLargeArcRadius-Q)+" 0 0 1 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent,se+=" L "+(q.rightFullExtent+Q-Z)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.rightInnerExtent-Z)+" "+(q.targetY+Q)+" L "+(q.targetX-Z)+" "+(q.targetY+Q)+(Z>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),se}function u(){var te=.5;function Z(se){var Q=se.linkArrowLength;if(se.link.circular)return g(se.link,Q);var q=Math.abs((se.link.target.x0-se.link.source.x1)/2);Q>q&&(Q=q);var re=se.link.source.x1,ae=se.link.target.x0-Q,fe=b(re,ae),be=fe(te),Me=fe(1-te),Ie=se.link.y0-se.link.width/2,Le=se.link.y0+se.link.width/2,je=se.link.y1-se.link.width/2,et=se.link.y1+se.link.width/2,rt="M"+re+","+Ie,Je="C"+be+","+Ie+" "+Me+","+je+" "+ae+","+je,Ze="C"+Me+","+et+" "+be+","+Le+" "+re+","+Le,Ee=Q>0?"L"+(ae+Q)+","+(je+se.link.width/2):"";return Ee+="L"+ae+","+et,rt+Je+Ee+Ze+"Z"}return Z}function v(te,Z){var se=r(Z.color),Q=t.nodePadAcross,q=te.nodePad/2;Z.dx=Z.x1-Z.x0,Z.dy=Z.y1-Z.y0;var re=Z.dx,ae=Math.max(.5,Z.dy),fe="node_"+Z.pointNumber;return Z.group&&(fe=i.randstr()),Z.trace=te.trace,Z.curveNumber=te.trace.index,{index:Z.pointNumber,key:fe,partOfGroup:Z.partOfGroup||!1,group:Z.group,traceId:te.key,trace:te.trace,node:Z,nodePad:te.nodePad,nodeLineColor:te.nodeLineColor,nodeLineWidth:te.nodeLineWidth,textFont:te.textFont,size:te.horizontal?te.height:te.width,visibleWidth:Math.ceil(re),visibleHeight:ae,zoneX:-Q,zoneY:-q,zoneWidth:re+2*Q,zoneHeight:ae+2*q,labelY:te.horizontal?Z.dy/2+1:Z.dx/2+1,left:Z.originalLayer===1,sizeAcross:te.width,forceLayouts:te.forceLayouts,horizontal:te.horizontal,darkBackground:se.getBrightness()<=128,tinyColorHue:o.tinyRGB(se),tinyColorAlpha:se.getAlpha(),valueFormat:te.valueFormat,valueSuffix:te.valueSuffix,sankey:te.sankey,graph:te.graph,arrangement:te.arrangement,uniqueNodeLabelPathId:[te.guid,te.key,fe].join("_"),interactionState:te.interactionState,figure:te}}function y(te){te.attr("transform",function(Z){return n(Z.node.x0.toFixed(3),Z.node.y0.toFixed(3))})}function R(te){te.call(y)}function L(te,Z){te.call(R),Z.attr("d",u())}function z(te){te.attr("width",function(Z){return Z.node.x1-Z.node.x0}).attr("height",function(Z){return Z.visibleHeight})}function F(te){return te.link.width>1||te.linkLineWidth>0}function B(te){var Z=n(te.translateX,te.translateY);return Z+(te.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(te,Z,se){te.on(".basic",null).on("mouseover.basic",function(Q){!Q.interactionState.dragInProgress&&!Q.partOfGroup&&(se.hover(this,Q,Z),Q.interactionState.hovered=[this,Q])}).on("mousemove.basic",function(Q){!Q.interactionState.dragInProgress&&!Q.partOfGroup&&(se.follow(this,Q),Q.interactionState.hovered=[this,Q])}).on("mouseout.basic",function(Q){!Q.interactionState.dragInProgress&&!Q.partOfGroup&&(se.unhover(this,Q,Z),Q.interactionState.hovered=!1)}).on("click.basic",function(Q){Q.interactionState.hovered&&(se.unhover(this,Q,Z),Q.interactionState.hovered=!1),!Q.interactionState.dragInProgress&&!Q.partOfGroup&&se.select(this,Q,Z)})}function I(te,Z,se,Q){var q=S.behavior.drag().origin(function(re){return{x:re.node.x0+re.visibleWidth/2,y:re.node.y0+re.visibleHeight/2}}).on("dragstart",function(re){if(re.arrangement!=="fixed"&&(i.ensureSingle(Q._fullLayout._infolayer,"g","dragcover",function(fe){Q._fullLayout._dragCover=fe}),i.raiseToTop(this),re.interactionState.dragInProgress=re.node,oe(re.node),re.interactionState.hovered&&(se.nodeEvents.unhover.apply(0,re.interactionState.hovered),re.interactionState.hovered=!1),re.arrangement==="snap")){var ae=re.traceId+"|"+re.key;re.forceLayouts[ae]?re.forceLayouts[ae].alpha(1):N(te,ae,re),U(te,Z,re,ae,Q)}}).on("drag",function(re){if(re.arrangement!=="fixed"){var ae=S.event.x,fe=S.event.y;re.arrangement==="snap"?(re.node.x0=ae-re.visibleWidth/2,re.node.x1=ae+re.visibleWidth/2,re.node.y0=fe-re.visibleHeight/2,re.node.y1=fe+re.visibleHeight/2):(re.arrangement==="freeform"&&(re.node.x0=ae-re.visibleWidth/2,re.node.x1=ae+re.visibleWidth/2),fe=Math.max(0,Math.min(re.size-re.visibleHeight/2,fe)),re.node.y0=fe-re.visibleHeight/2,re.node.y1=fe+re.visibleHeight/2),oe(re.node),re.arrangement!=="snap"&&(re.sankey.update(re.graph),L(te.filter(le(re)),Z))}}).on("dragend",function(re){if(re.arrangement!=="fixed"){re.interactionState.dragInProgress=!1;for(var ae=0;ae<re.node.childrenNodes.length;ae++)re.node.childrenNodes[ae].x=re.node.x,re.node.childrenNodes[ae].y=re.node.y;re.arrangement!=="snap"&&ee(re,Q)}});te.on(".drag",null).call(q)}function N(te,Z,se,Q){V(se.graph.nodes);var q=se.graph.nodes.filter(function(re){return re.originalX===se.node.originalX}).filter(function(re){return!re.partOfGroup});se.forceLayouts[Z]=h.forceSimulation(q).alphaDecay(0).force("collide",h.forceCollide().radius(function(re){return re.dy/2+se.nodePad/2}).strength(1).iterations(t.forceIterations)).force("constrain",X(te,Z,q,se)).stop()}function U(te,Z,se,Q,q){window.requestAnimationFrame(function re(){var ae;for(ae=0;ae<t.forceTicksPerFrame;ae++)se.forceLayouts[Q].tick();var fe=se.graph.nodes;if(J(fe),se.sankey.update(se.graph),L(te.filter(le(se)),Z),se.forceLayouts[Q].alpha()>0)window.requestAnimationFrame(re);else{var be=se.node.originalX;se.node.x0=be-se.visibleWidth/2,se.node.x1=be+se.visibleWidth/2,ee(se,q)}})}function X(te,Z,se,Q){return function(){for(var re=0,ae=0;ae<se.length;ae++){var fe=se[ae];fe===Q.interactionState.dragInProgress?(fe.x=fe.lastDraggedX,fe.y=fe.lastDraggedY):(fe.vx=(fe.originalX-fe.x)/t.forceTicksPerFrame,fe.y=Math.min(Q.size-fe.dy/2,Math.max(fe.dy/2,fe.y))),re=Math.max(re,Math.abs(fe.vx),Math.abs(fe.vy))}!Q.interactionState.dragInProgress&&re<.1&&Q.forceLayouts[Z].alpha()>0&&Q.forceLayouts[Z].alpha(0)}}function ee(te,Z){for(var se=[],Q=[],q=0;q<te.graph.nodes.length;q++){var re=(te.graph.nodes[q].x0+te.graph.nodes[q].x1)/2,ae=(te.graph.nodes[q].y0+te.graph.nodes[q].y1)/2;se.push(re/te.figure.width),Q.push(ae/te.figure.height)}l.call("_guiRestyle",Z,{"node.x":[se],"node.y":[Q]},te.trace.index).then(function(){Z._fullLayout._dragCover&&Z._fullLayout._dragCover.remove()})}function ue(te){var Z=[],se;for(se=0;se<te.length;se++)te[se].originalX=(te[se].x0+te[se].x1)/2,te[se].originalY=(te[se].y0+te[se].y1)/2,Z.indexOf(te[se].originalX)===-1&&Z.push(te[se].originalX);for(Z.sort(function(Q,q){return Q-q}),se=0;se<te.length;se++)te[se].originalLayerIndex=Z.indexOf(te[se].originalX),te[se].originalLayer=te[se].originalLayerIndex/(Z.length-1)}function oe(te){te.lastDraggedX=te.x0+te.dx/2,te.lastDraggedY=te.y0+te.dy/2}function le(te){return function(Z){return Z.node.originalX===te.node.originalX}}function V(te){for(var Z=0;Z<te.length;Z++)te[Z].y=(te[Z].y0+te[Z].y1)/2,te[Z].x=(te[Z].x0+te[Z].x1)/2}function J(te){for(var Z=0;Z<te.length;Z++)te[Z].y0=te[Z].y-te[Z].dy/2,te[Z].y1=te[Z].y0+te[Z].dy,te[Z].x0=te[Z].x-te[Z].dx/2,te[Z].x1=te[Z].x0+te[Z].dx}G.exports=function(te,Z,se,Q,q){var re=te._context.staticPlot,ae=!1;i.ensureSingle(te._fullLayout._infolayer,"g","first-render",function(){ae=!0});var fe=te._fullLayout._dragCover,be=se.filter(function(Ze){return d(Ze).trace.visible}).map(_.bind(null,Q)),Me=Z.selectAll("."+t.cn.sankey).data(be,c);Me.exit().remove(),Me.enter().append("g").classed(t.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",re?"none":"auto").attr("transform",B),Me.each(function(Ze,Ee){te._fullData[Ee]._sankey=Ze;var xe="bgsankey-"+Ze.trace.uid+"-"+Ee;i.ensureSingle(te._fullLayout._draggers,"rect",xe),te._fullData[Ee]._bgRect=S.select("."+xe),te._fullData[Ee]._bgRect.style("pointer-events",re?"none":"all").attr("width",Ze.width).attr("height",Ze.height).attr("x",Ze.translateX).attr("y",Ze.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),Me.transition().ease(t.ease).duration(t.duration).attr("transform",B);var Ie=Me.selectAll("."+t.cn.sankeyLinks).data(p,c);Ie.enter().append("g").classed(t.cn.sankeyLinks,!0).style("fill","none");var Le=Ie.selectAll("."+t.cn.sankeyLink).data(function(Ze){var Ee=Ze.graph.links;return Ee.filter(function(xe){return xe.value}).map(w.bind(null,Ze))},c);Le.enter().append("path").classed(t.cn.sankeyLink,!0).call(O,Me,q.linkEvents),Le.style("stroke",function(Ze){return F(Ze)?o.tinyRGB(r(Ze.linkLineColor)):Ze.tinyColorHue}).style("stroke-opacity",function(Ze){return F(Ze)?o.opacity(Ze.linkLineColor):Ze.tinyColorAlpha}).style("fill",function(Ze){return Ze.tinyColorHue}).style("fill-opacity",function(Ze){return Ze.tinyColorAlpha}).style("stroke-width",function(Ze){return F(Ze)?Ze.linkLineWidth:1}).attr("d",u()),Le.style("opacity",function(){return te._context.staticPlot||ae||fe?1:0}).transition().ease(t.ease).duration(t.duration).style("opacity",1),Le.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var je=Me.selectAll("."+t.cn.sankeyNodeSet).data(p,c);je.enter().append("g").classed(t.cn.sankeyNodeSet,!0),je.style("cursor",function(Ze){switch(Ze.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var et=je.selectAll("."+t.cn.sankeyNode).data(function(Ze){var Ee=Ze.graph.nodes;return ue(Ee),Ee.map(v.bind(null,Ze))},c);et.enter().append("g").classed(t.cn.sankeyNode,!0).call(y).style("opacity",function(Ze){return(te._context.staticPlot||ae)&&!Ze.partOfGroup?1:0}),et.call(O,Me,q.nodeEvents).call(I,Le,q,te),et.transition().ease(t.ease).duration(t.duration).call(y).style("opacity",function(Ze){return Ze.partOfGroup?0:1}),et.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var rt=et.selectAll("."+t.cn.nodeRect).data(p);rt.enter().append("rect").classed(t.cn.nodeRect,!0).call(z),rt.style("stroke-width",function(Ze){return Ze.nodeLineWidth}).style("stroke",function(Ze){return o.tinyRGB(r(Ze.nodeLineColor))}).style("stroke-opacity",function(Ze){return o.opacity(Ze.nodeLineColor)}).style("fill",function(Ze){return Ze.tinyColorHue}).style("fill-opacity",function(Ze){return Ze.tinyColorAlpha}),rt.transition().ease(t.ease).duration(t.duration).call(z);var Je=et.selectAll("."+t.cn.nodeLabel).data(p);Je.enter().append("text").classed(t.cn.nodeLabel,!0).style("cursor","default"),Je.attr("data-notex",1).text(function(Ze){return Ze.node.label}).each(function(Ze){var Ee=S.select(this);a.font(Ee,Ze.textFont),T.convertToTspans(Ee,te)}).attr("text-anchor",function(Ze){return Ze.horizontal&&Ze.left?"end":"start"}).attr("transform",function(Ze){var Ee=S.select(this),xe=T.lineCount(Ee),he=Ze.textFont.size*((xe-1)*A-x),De=Ze.nodeLineWidth/2+M,tt=((Ze.horizontal?Ze.visibleHeight:Ze.visibleWidth)-he)/2;Ze.horizontal&&(Ze.left?De=-De:De+=Ze.visibleWidth);var nt=Ze.horizontal?"":"scale(-1,1)"+s(90);return n(Ze.horizontal?De:tt,Ze.horizontal?tt:De)+nt}),Je.transition().ease(t.ease).duration(t.duration)}}}),t5=He({"src/traces/sankey/plot.js"(Y,G){var h=_i(),b=ea(),S=b.numberFormat,E=d4(),e=kc(),t=Di(),r=e5().cn,o=b._;function a(x){return x!==""}function i(x,A){return x.filter(function(M){return M.key===A.traceId})}function n(x,A){h.select(x).select("path").style("fill-opacity",A),h.select(x).select("rect").style("fill-opacity",A)}function s(x){h.select(x).select("text.name").style("fill","black")}function f(x){return function(A){return x.node.sourceLinks.indexOf(A.link)!==-1||x.node.targetLinks.indexOf(A.link)!==-1}}function c(x){return function(A){return A.node.sourceLinks.indexOf(x.link)!==-1||A.node.targetLinks.indexOf(x.link)!==-1}}function p(x,A,M){A&&M&&i(M,A).selectAll("."+r.sankeyLink).filter(f(A)).call(T.bind(0,A,M,!1))}function d(x,A,M){A&&M&&i(M,A).selectAll("."+r.sankeyLink).filter(f(A)).call(l.bind(0,A,M,!1))}function T(x,A,M,_){_.style("fill",function(w){if(!w.link.concentrationscale)return w.tinyColorHoverHue}).style("fill-opacity",function(w){if(!w.link.concentrationscale)return w.tinyColorHoverAlpha}),_.each(function(w){var g=w.link.label;g!==""&&i(A,x).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===g}).style("fill",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverHue}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverAlpha})}),M&&i(A,x).selectAll("."+r.sankeyNode).filter(c(x)).call(p)}function l(x,A,M,_){_.style("fill",function(w){return w.tinyColorHue}).style("fill-opacity",function(w){return w.tinyColorAlpha}),_.each(function(w){var g=w.link.label;g!==""&&i(A,x).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===g}).style("fill",function(u){return u.tinyColorHue}).style("fill-opacity",function(u){return u.tinyColorAlpha})}),M&&i(A,x).selectAll(r.sankeyNode).filter(c(x)).call(d)}function m(x,A){var M=x.hoverlabel||{},_=b.nestedProperty(M,A).get();return Array.isArray(_)?!1:_}G.exports=function(A,M){for(var _=A._fullLayout,w=_._paper,g=_._size,u=0;u<A._fullData.length;u++)if(A._fullData[u].visible&&A._fullData[u].type===r.sankey&&!A._fullData[u]._viewInitial){var v=A._fullData[u].node;A._fullData[u]._viewInitial={node:{groups:v.groups.slice(),x:v.x.slice(),y:v.y.slice()}}}var y=function(oe,le){var V=le.link;V.originalEvent=h.event,A._hoverdata=[V],e.click(A,{target:!0})},R=function(oe,le,V){A._fullLayout.hovermode!==!1&&(h.select(oe).call(T.bind(0,le,V,!0)),le.link.trace.link.hoverinfo!=="skip"&&(le.link.fullData=le.link.trace,A.emit("plotly_hover",{event:h.event,points:[le.link]})))},L=o(A,"source:")+" ",z=o(A,"target:")+" ",F=o(A,"concentration:")+" ",B=o(A,"incoming flow count:")+" ",O=o(A,"outgoing flow count:")+" ",I=function(oe,le){if(A._fullLayout.hovermode===!1)return;var V=le.link.trace.link;if(V.hoverinfo==="none"||V.hoverinfo==="skip")return;var J=[];function te(fe){var be,Me;fe.circular?(be=(fe.circularPathData.leftInnerExtent+fe.circularPathData.rightInnerExtent)/2,Me=fe.circularPathData.verticalFullExtent):(be=(fe.source.x1+fe.target.x0)/2,Me=(fe.y0+fe.y1)/2);var Ie=[be,Me];return fe.trace.orientation==="v"&&Ie.reverse(),Ie[0]+=le.parent.translateX,Ie[1]+=le.parent.translateY,Ie}for(var Z=0,se=0;se<le.flow.links.length;se++){var Q=le.flow.links[se];if(!(A._fullLayout.hovermode==="closest"&&le.link.pointNumber!==Q.pointNumber)){le.link.pointNumber===Q.pointNumber&&(Z=se),Q.fullData=Q.trace,V=le.link.trace.link;var q=te(Q),re={valueLabel:S(le.valueFormat)(Q.value)+le.valueSuffix};J.push({x:q[0],y:q[1],name:re.valueLabel,text:[Q.label||"",L+Q.source.label,z+Q.target.label,Q.concentrationscale?F+S("%0.2f")(Q.flow.labelConcentration):""].filter(a).join("<br>"),color:m(V,"bgcolor")||t.addOpacity(Q.color,1),borderColor:m(V,"bordercolor"),fontFamily:m(V,"font.family"),fontSize:m(V,"font.size"),fontColor:m(V,"font.color"),fontWeight:m(V,"font.weight"),fontStyle:m(V,"font.style"),fontVariant:m(V,"font.variant"),fontTextcase:m(V,"font.textcase"),fontLineposition:m(V,"font.lineposition"),fontShadow:m(V,"font.shadow"),nameLength:m(V,"namelength"),textAlign:m(V,"align"),idealAlign:h.event.x<q[0]?"right":"left",hovertemplate:V.hovertemplate,hovertemplateLabels:re,eventData:[Q]})}}var ae=e.loneHover(J,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:A,anchorIndex:Z});ae.each(function(){var fe=this;le.link.concentrationscale||n(fe,.65),s(fe)})},N=function(oe,le,V){A._fullLayout.hovermode!==!1&&(h.select(oe).call(l.bind(0,le,V,!0)),le.link.trace.link.hoverinfo!=="skip"&&(le.link.fullData=le.link.trace,A.emit("plotly_unhover",{event:h.event,points:[le.link]})),e.loneUnhover(_._hoverlayer.node()))},U=function(oe,le,V){var J=le.node;J.originalEvent=h.event,A._hoverdata=[J],h.select(oe).call(d,le,V),e.click(A,{target:!0})},X=function(oe,le,V){A._fullLayout.hovermode!==!1&&(h.select(oe).call(p,le,V),le.node.trace.node.hoverinfo!=="skip"&&(le.node.fullData=le.node.trace,A.emit("plotly_hover",{event:h.event,points:[le.node]})))},ee=function(oe,le){if(A._fullLayout.hovermode!==!1){var V=le.node.trace.node;if(!(V.hoverinfo==="none"||V.hoverinfo==="skip")){var J=h.select(oe).select("."+r.nodeRect),te=A._fullLayout._paperdiv.node().getBoundingClientRect(),Z=J.node().getBoundingClientRect(),se=Z.left-2-te.left,Q=Z.right+2-te.left,q=Z.top+Z.height/4-te.top,re={valueLabel:S(le.valueFormat)(le.node.value)+le.valueSuffix};le.node.fullData=le.node.trace,A._fullLayout._calcInverseTransform(A);var ae=A._fullLayout._invScaleX,fe=A._fullLayout._invScaleY,be=e.loneHover({x0:ae*se,x1:ae*Q,y:fe*q,name:S(le.valueFormat)(le.node.value)+le.valueSuffix,text:[le.node.label,B+le.node.targetLinks.length,O+le.node.sourceLinks.length].filter(a).join("<br>"),color:m(V,"bgcolor")||le.tinyColorHue,borderColor:m(V,"bordercolor"),fontFamily:m(V,"font.family"),fontSize:m(V,"font.size"),fontColor:m(V,"font.color"),fontWeight:m(V,"font.weight"),fontStyle:m(V,"font.style"),fontVariant:m(V,"font.variant"),fontTextcase:m(V,"font.textcase"),fontLineposition:m(V,"font.lineposition"),fontShadow:m(V,"font.shadow"),nameLength:m(V,"namelength"),textAlign:m(V,"align"),idealAlign:"left",hovertemplate:V.hovertemplate,hovertemplateLabels:re,eventData:[le.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:A});n(be,.85),s(be)}}},ue=function(oe,le,V){A._fullLayout.hovermode!==!1&&(h.select(oe).call(d,le,V),le.node.trace.node.hoverinfo!=="skip"&&(le.node.fullData=le.node.trace,A.emit("plotly_unhover",{event:h.event,points:[le.node]})),e.loneUnhover(_._hoverlayer.node()))};E(A,w,M,{width:g.w,height:g.h,margin:{t:g.t,r:g.r,b:g.b,l:g.l}},{linkEvents:{hover:R,follow:I,unhover:N,select:y},nodeEvents:{hover:X,follow:ee,unhover:ue,select:U}})}}}),p4=He({"src/traces/sankey/base_plot.js"(Y){var G=Zu().overrideAll,h=ih().getModuleCalcData,b=t5(),S=Gd(),E=Av(),e=kh(),t=Xc().prepSelect,r=ea(),o=ji(),a="sankey";Y.name=a,Y.baseLayoutAttrOverrides=G({hoverlabel:S.hoverlabel},"plot","nested"),Y.plot=function(n){var s=h(n.calcdata,a)[0];b(n,s),Y.updateFx(n)},Y.clean=function(n,s,f,c){var p=c._has&&c._has(a),d=s._has&&s._has(a);p&&!d&&(c._paperdiv.selectAll(".sankey").remove(),c._paperdiv.selectAll(".bgsankey").remove())},Y.updateFx=function(n){for(var s=0;s<n._fullData.length;s++)i(n,s)};function i(n,s){var f=n._fullData[s],c=n._fullLayout,p=c.dragmode,d=c.dragmode==="pan"?"move":"crosshair",T=f._bgRect;if(T&&!(p==="pan"||p==="zoom")){E(T,d);var l={_id:"x",c2p:r.identity,_offset:f._sankey.translateX,_length:f._sankey.width},m={_id:"y",c2p:r.identity,_offset:f._sankey.translateY,_length:f._sankey.height},x={gd:n,element:T.node(),plotinfo:{id:s,xaxis:l,yaxis:m,fillRangeItems:r.noop},subplot:s,xaxes:[l],yaxes:[m],doneFnCompleted:function(A){var M=n._fullData[s],_,w=M.node.groups.slice(),g=[];function u(L){for(var z=M._sankey.graph.nodes,F=0;F<z.length;F++)if(z[F].pointNumber===L)return z[F]}for(var v=0;v<A.length;v++){var y=u(A[v].pointNumber);if(y)if(y.group){for(var R=0;R<y.childrenNodes.length;R++)g.push(y.childrenNodes[R].pointNumber);w[y.pointNumber-M.node._count]=!1}else g.push(y.pointNumber)}_=w.filter(Boolean).concat([g]),o.call("_guiRestyle",n,{"node.groups":[_]},s)}};x.prepFn=function(A,M,_){t(A,M,_,x,p)},e.init(x)}}}}),g4=He({"src/traces/sankey/select.js"(Y,G){G.exports=function(b,S){for(var E=b.cd,e=[],t=E[0].trace,r=t._sankey.graph.nodes,o=0;o<r.length;o++){var a=r[o];if(!a.partOfGroup){var i=[(a.x0+a.x1)/2,(a.y0+a.y1)/2];t.orientation==="v"&&i.reverse(),S&&S.contains(i,!1,o,b)&&e.push({pointNumber:a.pointNumber})}}return e}}}),m4=He({"src/traces/sankey/index.js"(Y,G){G.exports={attributes:$T(),supplyDefaults:n4(),calc:i4(),plot:t5(),moduleType:"trace",name:"sankey",basePlotModule:p4(),selectPoints:g4(),categories:["noOpacity"],meta:{}}}}),y4=He({"lib/sankey.js"(Y,G){G.exports=m4()}}),_4=He({"src/traces/indicator/base_plot.js"(Y){var G=nc();Y.name="indicator",Y.plot=function(h,b,S,E){G.plotBasePlot(Y.name,h,b,S,E)},Y.clean=function(h,b,S,E){G.cleanBasePlot(Y.name,h,b,S,E)}}}),r5=He({"src/traces/indicator/attributes.js"(Y,G){var h=Po().extendFlat,b=Po().extendDeep,S=Zu().overrideAll,E=Ru(),e=Mf(),t=ic().attributes,r=oh(),o=xl().templatedArray,a=tg(),i=Ec().descriptionOnlyNumbers,n=E({editType:"plot",colorEditType:"plot"}),s={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:e.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},f={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},c=o("step",b({},s,{range:f}));G.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:t({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:h({},n,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:i("value")},font:h({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:i("value")},increasing:{symbol:{valType:"string",dflt:a.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:a.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:h({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:b({},s,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:S({range:f,visible:h({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:h({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:E({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:c,threshold:{line:{color:h({},s.line.color,{}),width:h({},s.line.width,{dflt:1}),editType:"plot"},thickness:h({},s.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}}),a5=He({"src/traces/indicator/constants.js"(Y,G){G.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}}),x4=He({"src/traces/indicator/defaults.js"(Y,G){var h=ea(),b=r5(),S=ic().defaults,E=xl(),e=_h(),t=a5(),r=Rp(),o=V0(),a=Yd(),i=Kd();function n(f,c,p,d){function T(I,N){return h.coerce(f,c,b,I,N)}S(c,d,T),T("mode"),c._hasNumber=c.mode.indexOf("number")!==-1,c._hasDelta=c.mode.indexOf("delta")!==-1,c._hasGauge=c.mode.indexOf("gauge")!==-1;var l=T("value");c._range=[0,typeof l=="number"?1.5*l:1];var m=new Array(2),x;if(c._hasNumber){T("number.valueformat");var A=h.extendFlat({},d.font);A.size=void 0,h.coerceFont(T,"number.font",A),c.number.font.size===void 0&&(c.number.font.size=t.defaultNumberFontSize,m[0]=!0),T("number.prefix"),T("number.suffix"),x=c.number.font.size}var M;if(c._hasDelta){var _=h.extendFlat({},d.font);_.size=void 0,h.coerceFont(T,"delta.font",_),c.delta.font.size===void 0&&(c.delta.font.size=(c._hasNumber?.5:1)*(x||t.defaultNumberFontSize),m[1]=!0),T("delta.reference",c.value),T("delta.relative"),T("delta.valueformat",c.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),M=c.delta.font.size}c._scaleNumbers=(!c._hasNumber||m[0])&&(!c._hasDelta||m[1])||!1;var w=h.extendFlat({},d.font);w.size=.25*(x||M||t.defaultNumberFontSize),h.coerceFont(T,"title.font",w),T("title.text");var g,u,v,y;function R(I,N){return h.coerce(g,u,b.gauge,I,N)}function L(I,N){return h.coerce(v,y,b.gauge.axis,I,N)}if(c._hasGauge){g=f.gauge,g||(g={}),u=E.newContainer(c,"gauge"),R("shape");var z=c._isBullet=c.gauge.shape==="bullet";z||T("title.align","center");var F=c._isAngular=c.gauge.shape==="angular";F||T("align","center"),R("bgcolor",d.paper_bgcolor),R("borderwidth"),R("bordercolor"),R("bar.color"),R("bar.line.color"),R("bar.line.width");var B=t.valueThickness*(c.gauge.shape==="bullet"?.5:1);R("bar.thickness",B),e(g,u,{name:"steps",handleItemDefaults:s}),R("threshold.value"),R("threshold.thickness"),R("threshold.line.width"),R("threshold.line.color"),v={},g&&(v=g.axis||{}),y=E.newContainer(u,"axis"),L("visible"),c._range=L("range",c._range);var O={font:d.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(v,y,L,"linear"),i(v,y,L,"linear",O),a(v,y,L,"linear",O),o(v,y,L,O)}else T("title.align","center"),T("align","center"),c._isAngular=c._isBullet=!1;c._length=null}function s(f,c){function p(d,T){return h.coerce(f,c,b.gauge.steps,d,T)}p("color"),p("line.color"),p("line.width"),p("range"),p("thickness")}G.exports={supplyDefaults:n}}}),b4=He({"src/traces/indicator/calc.js"(Y,G){function h(b,S){var E=[],e=S.value;typeof S._lastValue!="number"&&(S._lastValue=S.value);var t=S._lastValue,r=t;return S._hasDelta&&typeof S.delta.reference=="number"&&(r=S.delta.reference),E[0]={y:e,lastY:t,delta:e-r,relativeDelta:(e-r)/r},E}G.exports={calc:h}}}),w4=He({"src/traces/indicator/plot.js"(Y,G){var h=_i(),b=(Jp(),Os(lp)).interpolate,S=(Jp(),Os(lp)).interpolateNumber,E=ea(),e=E.strScale,t=E.strTranslate,r=E.rad2deg,o=Nf().MID_SHIFT,a=Io(),i=a5(),n=Zl(),s=Ao(),f=fm(),c=x1(),p=oh(),d=Di(),T={left:"start",center:"middle",right:"end"},l={left:0,center:.5,right:1},m=/[yzafpnµmkMGTPEZY]/;function x(z){return z&&z.duration>0}G.exports=function(F,B,O,I){var N=F._fullLayout,U;x(O)&&I&&(U=I()),E.makeTraceGroups(N._indicatorlayer,B,"trace").each(function(X){var ee=X[0],ue=ee.trace,oe=h.select(this),le=ue._hasGauge,V=ue._isAngular,J=ue._isBullet,te=ue.domain,Z={w:N._size.w*(te.x[1]-te.x[0]),h:N._size.h*(te.y[1]-te.y[0]),l:N._size.l+N._size.w*te.x[0],r:N._size.r+N._size.w*(1-te.x[1]),t:N._size.t+N._size.h*(1-te.y[1]),b:N._size.b+N._size.h*te.y[0]},se=Z.l+Z.w/2,Q=Z.t+Z.h/2,q=Math.min(Z.w/2,Z.h),re=i.innerRadius*q,ae,fe,be,Me=ue.align||"center";if(fe=Q,!le)ae=Z.l+l[Me]*Z.w,be=function(he){return v(he,Z.w,Z.h)};else if(V&&(ae=se,fe=Q+q/2,be=function(he){return y(he,.9*re)}),J){var Ie=i.bulletPadding,Le=1-i.bulletNumberDomainSize+Ie;ae=Z.l+(Le+(1-Le)*l[Me])*Z.w,be=function(he){return v(he,(i.bulletNumberDomainSize-Ie)*Z.w,Z.h)}}_(F,oe,X,{numbersX:ae,numbersY:fe,numbersScaler:be,transitionOpts:O,onComplete:U});var je,et;le&&(je={range:ue.gauge.axis.range,color:ue.gauge.bgcolor,line:{color:ue.gauge.bordercolor,width:0},thickness:1},et={range:ue.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ue.gauge.bordercolor,width:ue.gauge.borderwidth},thickness:1});var rt=oe.selectAll("g.angular").data(V?X:[]);rt.exit().remove();var Je=oe.selectAll("g.angularaxis").data(V?X:[]);Je.exit().remove(),V&&M(F,oe,X,{radius:q,innerRadius:re,gauge:rt,layer:Je,size:Z,gaugeBg:je,gaugeOutline:et,transitionOpts:O,onComplete:U});var Ze=oe.selectAll("g.bullet").data(J?X:[]);Ze.exit().remove();var Ee=oe.selectAll("g.bulletaxis").data(J?X:[]);Ee.exit().remove(),J&&A(F,oe,X,{gauge:Ze,layer:Ee,size:Z,gaugeBg:je,gaugeOutline:et,transitionOpts:O,onComplete:U});var xe=oe.selectAll("text.title").data(X);xe.exit().remove(),xe.enter().append("text").classed("title",!0),xe.attr("text-anchor",function(){return J?T.right:T[ue.title.align]}).text(ue.title.text).call(a.font,ue.title.font).call(n.convertToTspans,F),xe.attr("transform",function(){var he=Z.l+Z.w*l[ue.title.align],De,tt=i.titlePadding,nt=a.bBox(xe.node());if(le){if(V)if(ue.gauge.axis.visible){var $e=a.bBox(Je.node());De=$e.top-tt-nt.bottom}else De=Z.t+Z.h/2-q/2-nt.bottom-tt;J&&(De=fe-(nt.top+nt.bottom)/2,he=Z.l-i.bulletPadding*Z.w)}else De=ue._numbersTop-tt-nt.bottom;return t(he,De)})})};function A(z,F,B,O){var I=B[0].trace,N=O.gauge,U=O.layer,X=O.gaugeBg,ee=O.gaugeOutline,ue=O.size,oe=I.domain,le=O.transitionOpts,V=O.onComplete,J,te,Z,se,Q;N.enter().append("g").classed("bullet",!0),N.attr("transform",t(ue.l,ue.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var q=ue.h,re=I.gauge.bar.thickness*q,ae=oe.x[0],fe=oe.x[0]+(oe.x[1]-oe.x[0])*(I._hasNumber||I._hasDelta?1-i.bulletNumberDomainSize:1);J=u(z,I.gauge.axis),J._id="xbulletaxis",J.domain=[ae,fe],J.setScale(),te=s.calcTicks(J),Z=s.makeTransTickFn(J),se=s.getTickSigns(J)[2],Q=ue.t+ue.h,J.visible&&(s.drawTicks(z,J,{vals:J.ticks==="inside"?s.clipEnds(J,te):te,layer:U,path:s.makeTickPath(J,Q,se),transFn:Z}),s.drawLabels(z,J,{vals:te,layer:U,transFn:Z,labelFns:s.makeLabelFns(J,Q)}));function be(Je){Je.attr("width",function(Ze){return Math.max(0,J.c2p(Ze.range[1])-J.c2p(Ze.range[0]))}).attr("x",function(Ze){return J.c2p(Ze.range[0])}).attr("y",function(Ze){return .5*(1-Ze.thickness)*q}).attr("height",function(Ze){return Ze.thickness*q})}var Me=[X].concat(I.gauge.steps),Ie=N.selectAll("g.bg-bullet").data(Me);Ie.enter().append("g").classed("bg-bullet",!0).append("rect"),Ie.select("rect").call(be).call(w),Ie.exit().remove();var Le=N.selectAll("g.value-bullet").data([I.gauge.bar]);Le.enter().append("g").classed("value-bullet",!0).append("rect"),Le.select("rect").attr("height",re).attr("y",(q-re)/2).call(w),x(le)?Le.select("rect").transition().duration(le.duration).ease(le.easing).each("end",function(){V&&V()}).each("interrupt",function(){V&&V()}).attr("width",Math.max(0,J.c2p(Math.min(I.gauge.axis.range[1],B[0].y)))):Le.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,J.c2p(Math.min(I.gauge.axis.range[1],B[0].y))):0),Le.exit().remove();var je=B.filter(function(){return I.gauge.threshold.value||I.gauge.threshold.value===0}),et=N.selectAll("g.threshold-bullet").data(je);et.enter().append("g").classed("threshold-bullet",!0).append("line"),et.select("line").attr("x1",J.c2p(I.gauge.threshold.value)).attr("x2",J.c2p(I.gauge.threshold.value)).attr("y1",(1-I.gauge.threshold.thickness)/2*q).attr("y2",(1-(1-I.gauge.threshold.thickness)/2)*q).call(d.stroke,I.gauge.threshold.line.color).style("stroke-width",I.gauge.threshold.line.width),et.exit().remove();var rt=N.selectAll("g.gauge-outline").data([ee]);rt.enter().append("g").classed("gauge-outline",!0).append("rect"),rt.select("rect").call(be).call(w),rt.exit().remove()}function M(z,F,B,O){var I=B[0].trace,N=O.size,U=O.radius,X=O.innerRadius,ee=O.gaugeBg,ue=O.gaugeOutline,oe=[N.l+N.w/2,N.t+N.h/2+U/2],le=O.gauge,V=O.layer,J=O.transitionOpts,te=O.onComplete,Z=Math.PI/2;function se(Et){var Ct=I.gauge.axis.range[0],jt=I.gauge.axis.range[1],Wt=(Et-Ct)/(jt-Ct)*Math.PI-Z;return Wt<-Z?-Z:Wt>Z?Z:Wt}function Q(Et){return h.svg.arc().innerRadius((X+U)/2-Et/2*(U-X)).outerRadius((X+U)/2+Et/2*(U-X)).startAngle(-Z)}function q(Et){Et.attr("d",function(Ct){return Q(Ct.thickness).startAngle(se(Ct.range[0])).endAngle(se(Ct.range[1]))()})}var re,ae,fe,be;le.enter().append("g").classed("angular",!0),le.attr("transform",t(oe[0],oe[1])),V.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),V.selectAll("g.xangularaxistick,path,text").remove(),re=u(z,I.gauge.axis),re.type="linear",re.range=I.gauge.axis.range,re._id="xangularaxis",re.ticklabeloverflow="allow",re.setScale();var Me=function(Et){return(re.range[0]-Et.x)/(re.range[1]-re.range[0])*Math.PI+Math.PI},Ie={},Le=s.makeLabelFns(re,0),je=Le.labelStandoff;Ie.xFn=function(Et){var Ct=Me(Et);return Math.cos(Ct)*je},Ie.yFn=function(Et){var Ct=Me(Et),jt=Math.sin(Ct)>0?.2:1;return-Math.sin(Ct)*(je+Et.fontSize*jt)+Math.abs(Math.cos(Ct))*(Et.fontSize*o)},Ie.anchorFn=function(Et){var Ct=Me(Et),jt=Math.cos(Ct);return Math.abs(jt)<.1?"middle":jt>0?"start":"end"},Ie.heightFn=function(Et,Ct,jt){var Wt=Me(Et);return-.5*(1+Math.sin(Wt))*jt};var et=function(Et){return t(oe[0]+U*Math.cos(Et),oe[1]-U*Math.sin(Et))};fe=function(Et){return et(Me(Et))};var rt=function(Et){var Ct=Me(Et);return et(Ct)+"rotate("+-r(Ct)+")"};if(ae=s.calcTicks(re),be=s.getTickSigns(re)[2],re.visible){be=re.ticks==="inside"?-1:1;var Je=(re.linewidth||1)/2;s.drawTicks(z,re,{vals:ae,layer:V,path:"M"+be*Je+",0h"+be*re.ticklen,transFn:rt}),s.drawLabels(z,re,{vals:ae,layer:V,transFn:fe,labelFns:Ie})}var Ze=[ee].concat(I.gauge.steps),Ee=le.selectAll("g.bg-arc").data(Ze);Ee.enter().append("g").classed("bg-arc",!0).append("path"),Ee.select("path").call(q).call(w),Ee.exit().remove();var xe=Q(I.gauge.bar.thickness),he=le.selectAll("g.value-arc").data([I.gauge.bar]);he.enter().append("g").classed("value-arc",!0).append("path");var De=he.select("path");x(J)?(De.transition().duration(J.duration).ease(J.easing).each("end",function(){te&&te()}).each("interrupt",function(){te&&te()}).attrTween("d",g(xe,se(B[0].lastY),se(B[0].y))),I._lastValue=B[0].y):De.attr("d",typeof B[0].y=="number"?xe.endAngle(se(B[0].y)):"M0,0Z"),De.call(w),he.exit().remove(),Ze=[];var tt=I.gauge.threshold.value;(tt||tt===0)&&Ze.push({range:[tt,tt],color:I.gauge.threshold.color,line:{color:I.gauge.threshold.line.color,width:I.gauge.threshold.line.width},thickness:I.gauge.threshold.thickness});var nt=le.selectAll("g.threshold-arc").data(Ze);nt.enter().append("g").classed("threshold-arc",!0).append("path"),nt.select("path").call(q).call(w),nt.exit().remove();var $e=le.selectAll("g.gauge-outline").data([ue]);$e.enter().append("g").classed("gauge-outline",!0).append("path"),$e.select("path").call(q).call(w),$e.exit().remove()}function _(z,F,B,O){var I=B[0].trace,N=O.numbersX,U=O.numbersY,X=I.align||"center",ee=T[X],ue=O.transitionOpts,oe=O.onComplete,le=E.ensureSingle(F,"g","numbers"),V,J,te,Z=[];I._hasNumber&&Z.push("number"),I._hasDelta&&(Z.push("delta"),I.delta.position==="left"&&Z.reverse());var se=le.selectAll("text").data(Z);se.enter().append("text"),se.attr("text-anchor",function(){return ee}).attr("class",function(et){return et}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),se.exit().remove();function Q(et,rt,Je,Ze){if(et.match("s")&&Je>=0!=Ze>=0&&!rt(Je).slice(-1).match(m)&&!rt(Ze).slice(-1).match(m)){var Ee=et.slice().replace("s","f").replace(/\d+/,function(he){return parseInt(he)-1}),xe=u(z,{tickformat:Ee});return function(he){return Math.abs(he)<1?s.tickText(xe,he).text:rt(he)}}else return rt}function q(){var et=u(z,{tickformat:I.number.valueformat},I._range);et.setScale(),s.prepTicks(et);var rt=function(he){return s.tickText(et,he).text},Je=I.number.suffix,Ze=I.number.prefix,Ee=le.select("text.number");function xe(){var he=typeof B[0].y=="number"?Ze+rt(B[0].y)+Je:"-";Ee.text(he).call(a.font,I.number.font).call(n.convertToTspans,z)}return x(ue)?Ee.transition().duration(ue.duration).ease(ue.easing).each("end",function(){xe(),oe&&oe()}).each("interrupt",function(){xe(),oe&&oe()}).attrTween("text",function(){var he=h.select(this),De=S(B[0].lastY,B[0].y);I._lastValue=B[0].y;var tt=Q(I.number.valueformat,rt,B[0].lastY,B[0].y);return function(nt){he.text(Ze+tt(De(nt))+Je)}}):xe(),V=R(Ze+rt(B[0].y)+Je,I.number.font,ee,z),Ee}function re(){var et=u(z,{tickformat:I.delta.valueformat},I._range);et.setScale(),s.prepTicks(et);var rt=function(nt){return s.tickText(et,nt).text},Je=I.delta.suffix,Ze=I.delta.prefix,Ee=function(nt){var $e=I.delta.relative?nt.relativeDelta:nt.delta;return $e},xe=function(nt,$e){return nt===0||typeof nt!="number"||isNaN(nt)?"-":(nt>0?I.delta.increasing.symbol:I.delta.decreasing.symbol)+Ze+$e(nt)+Je},he=function(nt){return nt.delta>=0?I.delta.increasing.color:I.delta.decreasing.color};I._deltaLastValue===void 0&&(I._deltaLastValue=Ee(B[0]));var De=le.select("text.delta");De.call(a.font,I.delta.font).call(d.fill,he({delta:I._deltaLastValue}));function tt(){De.text(xe(Ee(B[0]),rt)).call(d.fill,he(B[0])).call(n.convertToTspans,z)}return x(ue)?De.transition().duration(ue.duration).ease(ue.easing).tween("text",function(){var nt=h.select(this),$e=Ee(B[0]),Et=I._deltaLastValue,Ct=Q(I.delta.valueformat,rt,Et,$e),jt=S(Et,$e);return I._deltaLastValue=$e,function(Wt){nt.text(xe(jt(Wt),Ct)),nt.call(d.fill,he({delta:jt(Wt)}))}}).each("end",function(){tt(),oe&&oe()}).each("interrupt",function(){tt(),oe&&oe()}):tt(),J=R(xe(Ee(B[0]),rt),I.delta.font,ee,z),De}var ae=I.mode+I.align,fe;if(I._hasDelta&&(fe=re(),ae+=I.delta.position+I.delta.font.size+I.delta.font.family+I.delta.valueformat,ae+=I.delta.increasing.symbol+I.delta.decreasing.symbol,te=J),I._hasNumber&&(q(),ae+=I.number.font.size+I.number.font.family+I.number.valueformat+I.number.suffix+I.number.prefix,te=V),I._hasDelta&&I._hasNumber){var be=[(V.left+V.right)/2,(V.top+V.bottom)/2],Me=[(J.left+J.right)/2,(J.top+J.bottom)/2],Ie,Le,je=.75*I.delta.font.size;I.delta.position==="left"&&(Ie=L(I,"deltaPos",0,-1*(V.width*l[I.align]+J.width*(1-l[I.align])+je),ae,Math.min),Le=be[1]-Me[1],te={width:V.width+J.width+je,height:Math.max(V.height,J.height),left:J.left+Ie,right:V.right,top:Math.min(V.top,J.top+Le),bottom:Math.max(V.bottom,J.bottom+Le)}),I.delta.position==="right"&&(Ie=L(I,"deltaPos",0,V.width*(1-l[I.align])+J.width*l[I.align]+je,ae,Math.max),Le=be[1]-Me[1],te={width:V.width+J.width+je,height:Math.max(V.height,J.height),left:V.left,right:J.right+Ie,top:Math.min(V.top,J.top+Le),bottom:Math.max(V.bottom,J.bottom+Le)}),I.delta.position==="bottom"&&(Ie=null,Le=J.height,te={width:Math.max(V.width,J.width),height:V.height+J.height,left:Math.min(V.left,J.left),right:Math.max(V.right,J.right),top:V.bottom-V.height,bottom:V.bottom+J.height}),I.delta.position==="top"&&(Ie=null,Le=V.top,te={width:Math.max(V.width,J.width),height:V.height+J.height,left:Math.min(V.left,J.left),right:Math.max(V.right,J.right),top:V.bottom-V.height-J.height,bottom:V.bottom}),fe.attr({dx:Ie,dy:Le})}(I._hasNumber||I._hasDelta)&&le.attr("transform",function(){var et=O.numbersScaler(te);ae+=et[2];var rt=L(I,"numbersScale",1,et[0],ae,Math.min),Je;I._scaleNumbers||(rt=1),I._isAngular?Je=U-rt*te.bottom:Je=U-rt*(te.top+te.bottom)/2,I._numbersTop=rt*te.top+Je;var Ze=te[X];X==="center"&&(Ze=(te.left+te.right)/2);var Ee=N-rt*Ze;return Ee=L(I,"numbersTranslate",0,Ee,ae,Math.max),t(Ee,Je)+e(rt)})}function w(z){z.each(function(F){d.stroke(h.select(this),F.line.color)}).each(function(F){d.fill(h.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function g(z,F,B){return function(){var O=b(F,B);return function(I){return z.endAngle(O(I))()}}}function u(z,F,B){var O=z._fullLayout,I=E.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},F),N={type:"linear",_id:"x"+F._id},U={letter:"x",font:O.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function X(ee,ue){return E.coerce(I,N,p,ee,ue)}return f(I,N,X,U,O),c(I,N,X,U),N}function v(z,F,B){var O=Math.min(F/z.width,B/z.height);return[O,z,F+"x"+B]}function y(z,F){var B=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/B;return[O,z,F]}function R(z,F,B,O){var I=document.createElementNS("http://www.w3.org/2000/svg","text"),N=h.select(I);return N.text(z).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",z).call(n.convertToTspans,O).call(a.font,F),a.bBox(N.node())}function L(z,F,B,O,I,N){var U="_cache"+F;z[U]&&z[U].key===I||(z[U]={key:I,value:B});var X=E.aggNums(N,null,[z[U].value,O],2);return z[U].value=X,X}}}),T4=He({"src/traces/indicator/index.js"(Y,G){G.exports={moduleType:"trace",name:"indicator",basePlotModule:_4(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:r5(),supplyDefaults:x4().supplyDefaults,calc:b4().calc,plot:w4(),meta:{}}}}),A4=He({"lib/indicator.js"(Y,G){G.exports=T4()}}),n5=He({"src/traces/table/attributes.js"(Y,G){var h=Fp(),b=Po().extendFlat,S=Zu().overrideAll,E=Ru(),e=ic().attributes,t=Ec().descriptionOnlyNumbers;G.exports=S({domain:e({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:b({},h.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},E({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:b({},h.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},E({arrayOk:!0}))}},"calc","from-root")}}),S4=He({"src/traces/table/defaults.js"(Y,G){var h=ea(),b=n5(),S=ic().defaults;function E(e,t){for(var r=e.columnorder||[],o=e.header.values.length,a=r.slice(0,o),i=a.slice().sort(function(f,c){return f-c}),n=a.map(function(f){return i.indexOf(f)}),s=n.length;s<o;s++)n.push(s);t("columnorder",n)}G.exports=function(t,r,o,a){function i(n,s){return h.coerce(t,r,b,n,s)}S(r,a,i),i("columnwidth"),i("header.values"),i("header.format"),i("header.align"),i("header.prefix"),i("header.suffix"),i("header.height"),i("header.line.width"),i("header.line.color"),i("header.fill.color"),h.coerceFont(i,"header.font",a.font),E(r,i),i("cells.values"),i("cells.format"),i("cells.align"),i("cells.prefix"),i("cells.suffix"),i("cells.height"),i("cells.line.width"),i("cells.line.color"),i("cells.fill.color"),h.coerceFont(i,"cells.font",a.font),r._length=null}}}),M4=He({"src/traces/table/calc.js"(Y,G){var h=Jv().wrap;G.exports=function(){return h({})}}}),i5=He({"src/traces/table/constants.js"(Y,G){G.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),E4=He({"src/traces/table/data_preparation_helper.js"(Y,G){var h=i5(),b=Po().extendFlat,S=Ui(),E=Sh().isTypedArray,e=Sh().isArrayOrTypedArray;G.exports=function(p,d){var T=o(d.cells.values),l=function(ee){return ee.slice(d.header.values.length,ee.length)},m=o(d.header.values);m.length&&!m[0].length&&(m[0]=[""],m=o(m));var x=m.concat(l(T).map(function(){return a((m[0]||[""]).length)})),A=d.domain,M=Math.floor(p._fullLayout._size.w*(A.x[1]-A.x[0])),_=Math.floor(p._fullLayout._size.h*(A.y[1]-A.y[0])),w=d.header.values.length?x[0].map(function(){return d.header.height}):[h.emptyHeaderHeight],g=T.length?T[0].map(function(){return d.cells.height}):[],u=w.reduce(r,0),v=_-u,y=v+h.uplift,R=s(g,y),L=s(w,u),z=n(L,[]),F=n(R,z),B={},O=d._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function(ee,ue){return ue})));var I=x.map(function(ee,ue){var oe=e(d.columnwidth)?d.columnwidth[Math.min(ue,d.columnwidth.length-1)]:d.columnwidth;return S(oe)?Number(oe):1}),N=I.reduce(r,0);I=I.map(function(ee){return ee/N*M});var U=Math.max(t(d.header.line.width),t(d.cells.line.width)),X={key:d.uid+p._context.staticPlot,translateX:A.x[0]*p._fullLayout._size.w,translateY:p._fullLayout._size.h*(1-A.y[1]),size:p._fullLayout._size,width:M,maxLineWidth:U,height:_,columnOrder:O,groupHeight:_,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:b({},d.cells,{values:T}),headerCells:b({},d.header,{values:x}),gdColumns:x.map(function(ee){return ee[0]}),gdColumnsOriginalOrder:x.map(function(ee){return ee[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:x.map(function(ee,ue){var oe=B[ee];B[ee]=(oe||0)+1;var le=ee+"__"+B[ee];return{key:le,label:ee,specIndex:ue,xIndex:O[ue],xScale:i,x:void 0,calcdata:void 0,columnWidth:I[ue]}})};return X.columns.forEach(function(ee){ee.calcdata=X,ee.x=i(ee)}),X};function t(c){if(e(c)){for(var p=0,d=0;d<c.length;d++)p=Math.max(p,t(c[d]));return p}return c}function r(c,p){return c+p}function o(c){var p=c.slice(),d=1/0,T=0,l;for(l=0;l<p.length;l++)E(p[l])?p[l]=Array.from(p[l]):e(p[l])||(p[l]=[p[l]]),d=Math.min(d,p[l].length),T=Math.max(T,p[l].length);if(d!==T)for(l=0;l<p.length;l++){var m=T-p[l].length;m&&(p[l]=p[l].concat(a(m)))}return p}function a(c){for(var p=new Array(c),d=0;d<c;d++)p[d]="";return p}function i(c){return c.calcdata.columns.reduce(function(p,d){return d.xIndex<c.xIndex?p+d.columnWidth:p},0)}function n(c,p){var d=Object.keys(c);return d.map(function(T){return b({},c[T],{auxiliaryBlocks:p})})}function s(c,p){for(var d={},T,l=0,m=0,x=f(),A=0,M=0,_=0;_<c.length;_++)T=c[_],x.rows.push({rowIndex:_,rowHeight:T}),m+=T,(m>=p||_===c.length-1)&&(d[l]=x,x.key=M++,x.firstRowIndex=A,x.lastRowIndex=_,x=f(),l+=m,A=_+1,m=0);return d}function f(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),k4=He({"src/traces/table/data_split_helpers.js"(Y){var G=Po().extendFlat;Y.splitToPanels=function(b){var S=[0,0],E=G({},b,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:b.calcdata.headerCells.values[b.specIndex],rowBlocks:b.calcdata.headerRowBlocks,calcdata:G({},b.calcdata,{cells:b.calcdata.headerCells})}),e=G({},b,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks}),t=G({},b,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks});return[e,t,E]},Y.splitToCells=function(b){var S=h(b);return(b.values||[]).slice(S[0],S[1]).map(function(E,e){var t=typeof E=="string"&&E.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:b,calcdata:b.calcdata,page:b.page,rowBlocks:b.rowBlocks,value:E}})};function h(b){var S=b.rowBlocks[b.page],E=S?S.rows[0].rowIndex:0,e=S?E+S.rows.length:0;return[E,e]}}}),o5=He({"src/traces/table/plot.js"(Y,G){var h=i5(),b=_i(),S=ea(),E=S.numberFormat,e=Jv(),t=Io(),r=Zl(),o=ea().raiseToTop,a=ea().strTranslate,i=ea().cancelTransition,n=E4(),s=k4(),f=Di();G.exports=function(ae,fe){var be=!ae._context.staticPlot,Me=ae._fullLayout._paper.selectAll("."+h.cn.table).data(fe.map(function($e){var Et=e.unwrap($e),Ct=Et.trace;return n(ae,Ct)}),e.keyFun);Me.exit().remove(),Me.enter().append("g").classed(h.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),Me.attr("width",function($e){return $e.width+$e.size.l+$e.size.r}).attr("height",function($e){return $e.height+$e.size.t+$e.size.b}).attr("transform",function($e){return a($e.translateX,$e.translateY)});var Ie=Me.selectAll("."+h.cn.tableControlView).data(e.repeat,e.keyFun),Le=Ie.enter().append("g").classed(h.cn.tableControlView,!0).style("box-sizing","content-box");if(be){var je="onwheel"in document?"wheel":"mousewheel";Le.on("mousemove",function($e){Ie.filter(function(Et){return $e===Et}).call(l,ae)}).on(je,function($e){if(!$e.scrollbarState.wheeling){$e.scrollbarState.wheeling=!0;var Et=$e.scrollY+b.event.deltaY,Ct=ee(ae,Ie,null,Et)($e);Ct||(b.event.stopPropagation(),b.event.preventDefault()),$e.scrollbarState.wheeling=!1}}).call(l,ae,!0)}Ie.attr("transform",function($e){return a($e.size.l,$e.size.t)});var et=Ie.selectAll("."+h.cn.scrollBackground).data(e.repeat,e.keyFun);et.enter().append("rect").classed(h.cn.scrollBackground,!0).attr("fill","none"),et.attr("width",function($e){return $e.width}).attr("height",function($e){return $e.height}),Ie.each(function($e){t.setClipUrl(b.select(this),p(ae,$e),ae)});var rt=Ie.selectAll("."+h.cn.yColumn).data(function($e){return $e.columns},e.keyFun);rt.enter().append("g").classed(h.cn.yColumn,!0),rt.exit().remove(),rt.attr("transform",function($e){return a($e.x,0)}),be&&rt.call(b.behavior.drag().origin(function($e){var Et=b.select(this);return B(Et,$e,-h.uplift),o(this),$e.calcdata.columnDragInProgress=!0,l(Ie.filter(function(Ct){return $e.calcdata.key===Ct.key}),ae),$e}).on("drag",function($e){var Et=b.select(this),Ct=function(dr){return($e===dr?b.event.x:dr.x)+dr.columnWidth/2};$e.x=Math.max(-h.overdrag,Math.min($e.calcdata.width+h.overdrag-$e.columnWidth,b.event.x));var jt=T(rt).filter(function(dr){return dr.calcdata.key===$e.calcdata.key}),Wt=jt.sort(function(dr,vr){return Ct(dr)-Ct(vr)});Wt.forEach(function(dr,vr){dr.xIndex=vr,dr.x=$e===dr?dr.x:dr.xScale(dr)}),rt.filter(function(dr){return $e!==dr}).transition().ease(h.transitionEase).duration(h.transitionDuration).attr("transform",function(dr){return a(dr.x,0)}),Et.call(i).attr("transform",a($e.x,-h.uplift))}).on("dragend",function($e){var Et=b.select(this),Ct=$e.calcdata;$e.x=$e.xScale($e),$e.calcdata.columnDragInProgress=!1,B(Et,$e,0),z(ae,Ct,Ct.columns.map(function(jt){return jt.xIndex}))})),rt.each(function($e){t.setClipUrl(b.select(this),d(ae,$e),ae)});var Je=rt.selectAll("."+h.cn.columnBlock).data(s.splitToPanels,e.keyFun);Je.enter().append("g").classed(h.cn.columnBlock,!0).attr("id",function($e){return $e.key}),Je.style("cursor",function($e){return $e.dragHandle?"ew-resize":$e.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Ze=Je.filter(I),Ee=Je.filter(O);be&&Ee.call(b.behavior.drag().origin(function($e){return b.event.stopPropagation(),$e}).on("drag",ee(ae,Ie,-1)).on("dragend",function(){})),m(ae,Ie,Ze,Je),m(ae,Ie,Ee,Je);var xe=Ie.selectAll("."+h.cn.scrollAreaClip).data(e.repeat,e.keyFun);xe.enter().append("clipPath").classed(h.cn.scrollAreaClip,!0).attr("id",function($e){return p(ae,$e)});var he=xe.selectAll("."+h.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);he.enter().append("rect").classed(h.cn.scrollAreaClipRect,!0).attr("x",-h.overdrag).attr("y",-h.uplift).attr("fill","none"),he.attr("width",function($e){return $e.width+2*h.overdrag}).attr("height",function($e){return $e.height+h.uplift});var De=rt.selectAll("."+h.cn.columnBoundary).data(e.repeat,e.keyFun);De.enter().append("g").classed(h.cn.columnBoundary,!0);var tt=rt.selectAll("."+h.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);tt.enter().append("clipPath").classed(h.cn.columnBoundaryClippath,!0),tt.attr("id",function($e){return d(ae,$e)});var nt=tt.selectAll("."+h.cn.columnBoundaryRect).data(e.repeat,e.keyFun);nt.enter().append("rect").classed(h.cn.columnBoundaryRect,!0).attr("fill","none"),nt.attr("width",function($e){return $e.columnWidth+2*c($e)}).attr("height",function($e){return $e.calcdata.height+2*c($e)+h.uplift}).attr("x",function($e){return-c($e)}).attr("y",function($e){return-c($e)}),X(null,Ee,Ie)};function c(re){return Math.ceil(re.calcdata.maxLineWidth/2)}function p(re,ae){return"clip"+re._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function d(re,ae){return"clip"+re._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function T(re){return[].concat.apply([],re.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function l(re,ae,fe){function be(rt){var Je=rt.rowBlocks;return te(Je,Je.length-1)+(Je.length?Z(Je[Je.length-1],1/0):1)}var Me=re.selectAll("."+h.cn.scrollbarKit).data(e.repeat,e.keyFun);Me.enter().append("g").classed(h.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Me.each(function(rt){var Je=rt.scrollbarState;Je.totalHeight=be(rt),Je.scrollableAreaHeight=rt.groupHeight-N(rt),Je.currentlyVisibleHeight=Math.min(Je.totalHeight,Je.scrollableAreaHeight),Je.ratio=Je.currentlyVisibleHeight/Je.totalHeight,Je.barLength=Math.max(Je.ratio*Je.currentlyVisibleHeight,h.goldenRatio*h.scrollbarWidth),Je.barWiggleRoom=Je.currentlyVisibleHeight-Je.barLength,Je.wiggleRoom=Math.max(0,Je.totalHeight-Je.scrollableAreaHeight),Je.topY=Je.barWiggleRoom===0?0:rt.scrollY/Je.wiggleRoom*Je.barWiggleRoom,Je.bottomY=Je.topY+Je.barLength,Je.dragMultiplier=Je.wiggleRoom/Je.barWiggleRoom}).attr("transform",function(rt){var Je=rt.width+h.scrollbarWidth/2+h.scrollbarOffset;return a(Je,N(rt))});var Ie=Me.selectAll("."+h.cn.scrollbar).data(e.repeat,e.keyFun);Ie.enter().append("g").classed(h.cn.scrollbar,!0);var Le=Ie.selectAll("."+h.cn.scrollbarSlider).data(e.repeat,e.keyFun);Le.enter().append("g").classed(h.cn.scrollbarSlider,!0),Le.attr("transform",function(rt){return a(0,rt.scrollbarState.topY||0)});var je=Le.selectAll("."+h.cn.scrollbarGlyph).data(e.repeat,e.keyFun);je.enter().append("line").classed(h.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",h.scrollbarWidth).attr("stroke-linecap","round").attr("y1",h.scrollbarWidth/2),je.attr("y2",function(rt){return rt.scrollbarState.barLength-h.scrollbarWidth/2}).attr("stroke-opacity",function(rt){return rt.columnDragInProgress||!rt.scrollbarState.barWiggleRoom||fe?0:.4}),je.transition().delay(0).duration(0),je.transition().delay(h.scrollbarHideDelay).duration(h.scrollbarHideDuration).attr("stroke-opacity",0);var et=Ie.selectAll("."+h.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);et.enter().append("line").classed(h.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",h.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(rt){var Je=b.event.y,Ze=this.getBoundingClientRect(),Ee=rt.scrollbarState,xe=Je-Ze.top,he=b.scale.linear().domain([0,Ee.scrollableAreaHeight]).range([0,Ee.totalHeight]).clamp(!0);Ee.topY<=xe&&xe<=Ee.bottomY||ee(ae,re,null,he(xe-Ee.barLength/2))(rt)}).call(b.behavior.drag().origin(function(rt){return b.event.stopPropagation(),rt.scrollbarState.scrollbarScrollInProgress=!0,rt}).on("drag",ee(ae,re)).on("dragend",function(){})),et.attr("y2",function(rt){return rt.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(je.remove(),et.remove())}function m(re,ae,fe,be){var Me=x(fe),Ie=A(Me);g(Ie);var Le=M(Ie);v(Le);var je=w(Ie),et=_(je);u(et),y(et,ae,be,re),J(Ie)}function x(re){var ae=re.selectAll("."+h.cn.columnCells).data(e.repeat,e.keyFun);return ae.enter().append("g").classed(h.cn.columnCells,!0),ae.exit().remove(),ae}function A(re){var ae=re.selectAll("."+h.cn.columnCell).data(s.splitToCells,function(fe){return fe.keyWithinBlock});return ae.enter().append("g").classed(h.cn.columnCell,!0),ae.exit().remove(),ae}function M(re){var ae=re.selectAll("."+h.cn.cellRect).data(e.repeat,function(fe){return fe.keyWithinBlock});return ae.enter().append("rect").classed(h.cn.cellRect,!0),ae}function _(re){var ae=re.selectAll("."+h.cn.cellText).data(e.repeat,function(fe){return fe.keyWithinBlock});return ae.enter().append("text").classed(h.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){b.event.stopPropagation()}),ae}function w(re){var ae=re.selectAll("."+h.cn.cellTextHolder).data(e.repeat,function(fe){return fe.keyWithinBlock});return ae.enter().append("g").classed(h.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function g(re){re.each(function(ae,fe){var be=ae.calcdata.cells.font,Me=ae.column.specIndex,Ie={size:F(be.size,Me,fe),color:F(be.color,Me,fe),family:F(be.family,Me,fe),weight:F(be.weight,Me,fe),style:F(be.style,Me,fe),variant:F(be.variant,Me,fe),textcase:F(be.textcase,Me,fe),lineposition:F(be.lineposition,Me,fe),shadow:F(be.shadow,Me,fe)};ae.rowNumber=ae.key,ae.align=F(ae.calcdata.cells.align,Me,fe),ae.cellBorderWidth=F(ae.calcdata.cells.line.width,Me,fe),ae.font=Ie})}function u(re){re.each(function(ae){t.font(b.select(this),ae.font)})}function v(re){re.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var fe=b.select(this);f.stroke(fe,F(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),f.fill(fe,F(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function y(re,ae,fe,be){re.text(function(Me){var Ie=Me.column.specIndex,Le=Me.rowNumber,je=Me.value,et=typeof je=="string",rt=et&&je.match(/<br>/i),Je=!et||rt;Me.mayHaveMarkup=et&&je.match(/[<&>]/);var Ze=R(je);Me.latex=Ze;var Ee=Ze?"":F(Me.calcdata.cells.prefix,Ie,Le)||"",xe=Ze?"":F(Me.calcdata.cells.suffix,Ie,Le)||"",he=Ze?null:F(Me.calcdata.cells.format,Ie,Le)||null,De=Ee+(he?E(he)(Me.value):Me.value)+xe,tt;Me.wrappingNeeded=!Me.wrapped&&!Je&&!Ze&&(tt=L(De)),Me.cellHeightMayIncrease=rt||Ze||Me.mayHaveMarkup||(tt===void 0?L(De):tt),Me.needsConvertToTspans=Me.mayHaveMarkup||Me.wrappingNeeded||Me.latex;var nt;if(Me.wrappingNeeded){var $e=h.wrapSplitCharacter===" "?De.replace(/<a href=/ig,"<a_href="):De,Et=$e.split(h.wrapSplitCharacter),Ct=h.wrapSplitCharacter===" "?Et.map(function(jt){return jt.replace(/<a_href=/ig,"<a href=")}):Et;Me.fragments=Ct.map(function(jt){return{text:jt,width:null}}),Me.fragments.push({fragment:h.wrapSpacer,width:null}),nt=Ct.join(h.lineBreaker)+h.lineBreaker+h.wrapSpacer}else delete Me.fragments,nt=De;return nt}).attr("dy",function(Me){return Me.needsConvertToTspans?0:"0.75em"}).each(function(Me){var Ie=this,Le=b.select(Ie),je=Me.wrappingNeeded?oe:le;Me.needsConvertToTspans?r.convertToTspans(Le,be,je(fe,Ie,ae,be,Me)):b.select(Ie.parentNode).attr("transform",function(et){return a(V(et),h.cellPad)}).attr("text-anchor",function(et){return{left:"start",center:"middle",right:"end"}[et.align]})})}function R(re){return typeof re=="string"&&re.match(h.latexCheck)}function L(re){return re.indexOf(h.wrapSplitCharacter)!==-1}function z(re,ae,fe){var be=ae.gdColumnsOriginalOrder;ae.gdColumns.sort(function(Me,Ie){return fe[be.indexOf(Me)]-fe[be.indexOf(Ie)]}),ae.columnorder=fe,re.emit("plotly_restyle")}function F(re,ae,fe){if(S.isArrayOrTypedArray(re)){var be=re[Math.min(ae,re.length-1)];return S.isArrayOrTypedArray(be)?be[Math.min(fe,be.length-1)]:be}else return re}function B(re,ae,fe){re.transition().ease(h.releaseTransitionEase).duration(h.releaseTransitionDuration).attr("transform",a(ae.x,fe))}function O(re){return re.type==="cells"}function I(re){return re.type==="header"}function N(re){var ae=re.rowBlocks.length?re.rowBlocks[0].auxiliaryBlocks:[];return ae.reduce(function(fe,be){return fe+Z(be,1/0)},0)}function U(re,ae,fe){for(var be=[],Me=0,Ie=0;Ie<re.length;Ie++){for(var Le=re[Ie],je=Le.rows,et=0,rt=0;rt<je.length;rt++)et+=je[rt].rowHeight;Le.allRowsHeight=et;var Je=Me+et,Ze=ae,Ee=Ze+fe;Ze<Je&&Ee>Me&&be.push(Ie),Me+=et}return be}function X(re,ae,fe){var be=T(ae)[0];if(be!==void 0){var Me=be.rowBlocks,Ie=be.calcdata,Le=te(Me,Me.length),je=be.calcdata.groupHeight-N(be),et=Ie.scrollY=Math.max(0,Math.min(Le-je,Ie.scrollY)),rt=U(Me,et,je);rt.length===1&&(rt[0]===Me.length-1?rt.unshift(rt[0]-1):rt.push(rt[0]+1)),rt[0]%2&&rt.reverse(),ae.each(function(Je,Ze){Je.page=rt[Ze],Je.scrollY=et}),ae.attr("transform",function(Je){var Ze=te(Je.rowBlocks,Je.page)-Je.scrollY;return a(0,Ze)}),re&&(ue(re,fe,ae,rt,be.prevPages,be,0),ue(re,fe,ae,rt,be.prevPages,be,1),l(fe,re))}}function ee(re,ae,fe,be){return function(Ie){var Le=Ie.calcdata?Ie.calcdata:Ie,je=ae.filter(function(Ze){return Le.key===Ze.key}),et=fe||Le.scrollbarState.dragMultiplier,rt=Le.scrollY;Le.scrollY=be===void 0?Le.scrollY+et*b.event.dy:be;var Je=je.selectAll("."+h.cn.yColumn).selectAll("."+h.cn.columnBlock).filter(O);return X(re,Je,je),Le.scrollY===rt}}function ue(re,ae,fe,be,Me,Ie,Le){var je=be[Le]!==Me[Le];je&&(clearTimeout(Ie.currentRepaint[Le]),Ie.currentRepaint[Le]=setTimeout(function(){var et=fe.filter(function(rt,Je){return Je===Le&&be[Je]!==Me[Je]});m(re,ae,et,fe),Me[Le]=be[Le]}))}function oe(re,ae,fe,be){return function(){var Ie=b.select(ae.parentNode);Ie.each(function(Le){var je=Le.fragments;Ie.selectAll("tspan.line").each(function(De,tt){je[tt].width=this.getComputedTextLength()});var et=je[je.length-1].width,rt=je.slice(0,-1),Je=[],Ze,Ee,xe=0,he=Le.column.columnWidth-2*h.cellPad;for(Le.value="";rt.length;)Ze=rt.shift(),Ee=Ze.width+et,xe+Ee>he&&(Le.value+=Je.join(h.wrapSpacer)+h.lineBreaker,Je=[],xe=0),Je.push(Ze.text),xe+=Ee;xe&&(Le.value+=Je.join(h.wrapSpacer)),Le.wrapped=!0}),Ie.selectAll("tspan.line").remove(),y(Ie.select("."+h.cn.cellText),fe,re,be),b.select(ae.parentNode.parentNode).call(J)}}function le(re,ae,fe,be,Me){return function(){if(!Me.settledY){var Le=b.select(ae.parentNode),je=Q(Me),et=Me.key-je.firstRowIndex,rt=je.rows[et].rowHeight,Je=Me.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*h.cellPad:rt,Ze=Math.max(Je,rt),Ee=Ze-je.rows[et].rowHeight;Ee&&(je.rows[et].rowHeight=Ze,re.selectAll("."+h.cn.columnCell).call(J),X(null,re.filter(O),0),l(fe,be,!0)),Le.attr("transform",function(){var xe=this,he=xe.parentNode,De=he.getBoundingClientRect(),tt=b.select(xe.parentNode).select("."+h.cn.cellRect).node().getBoundingClientRect(),nt=xe.transform.baseVal.consolidate(),$e=tt.top-De.top+(nt?nt.matrix.f:h.cellPad);return a(V(Me,b.select(xe.parentNode).select("."+h.cn.cellTextHolder).node().getBoundingClientRect().width),$e)}),Me.settledY=!0}}}function V(re,ae){switch(re.align){case"left":return h.cellPad;case"right":return re.column.columnWidth-(ae||0)-h.cellPad;case"center":return(re.column.columnWidth-(ae||0))/2;default:return h.cellPad}}function J(re){re.attr("transform",function(ae){var fe=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Le,je){return Le+Z(je,1/0)},0),be=Q(ae),Me=Z(be,ae.key),Ie=Me+fe;return a(0,Ie)}).selectAll("."+h.cn.cellRect).attr("height",function(ae){return q(Q(ae),ae.key).rowHeight})}function te(re,ae){for(var fe=0,be=ae-1;be>=0;be--)fe+=se(re[be]);return fe}function Z(re,ae){for(var fe=0,be=0;be<re.rows.length&&re.rows[be].rowIndex<ae;be++)fe+=re.rows[be].rowHeight;return fe}function se(re){var ae=re.allRowsHeight;if(ae!==void 0)return ae;for(var fe=0,be=0;be<re.rows.length;be++)fe+=re.rows[be].rowHeight;return re.allRowsHeight=fe,fe}function Q(re){return re.rowBlocks[re.page]}function q(re,ae){return re.rows[ae-re.firstRowIndex]}}}),C4=He({"src/traces/table/base_plot.js"(Y){var G=ih().getModuleCalcData,h=o5(),b="table";Y.name=b,Y.plot=function(S){var E=G(S.calcdata,b)[0];E.length&&h(S,E)},Y.clean=function(S,E,e,t){var r=t._has&&t._has(b),o=E._has&&E._has(b);r&&!o&&t._paperdiv.selectAll(".table").remove()}}}),L4=He({"src/traces/table/index.js"(Y,G){G.exports={attributes:n5(),supplyDefaults:S4(),calc:M4(),plot:o5(),moduleType:"trace",name:"table",basePlotModule:C4(),categories:["noOpacity"],meta:{}}}}),P4=He({"lib/table.js"(Y,G){G.exports=L4()}}),I4=He({"src/traces/carpet/axis_attributes.js"(Y,G){var h=Ru(),b=Mf(),S=oh(),E=Ec().descriptionWithDates,e=Zu().overrideAll,t=nh().dash,r=Po().extendFlat;G.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:h({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:S.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:r({},S.labelalias,{editType:"calc"}),tickfont:h({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:E("tick label")},tickformatstops:e(S.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:b.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:r({},t,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:r({},t,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:b.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}}}),yx=He({"src/traces/carpet/attributes.js"(Y,G){var h=Ru(),b=I4(),S=Mf(),E=h({editType:"calc"}),e=Cc().zorder;E.family.dflt='"Open Sans", verdana, arial, sans-serif',E.size.dflt=12,E.color.dflt=S.defaultLine,G.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:b,baxis:b,font:E,color:{valType:"color",dflt:S.defaultLine,editType:"plot"},zorder:e}}}),R4=He({"src/traces/carpet/xy_defaults.js"(Y,G){var h=ea().isArray1D;G.exports=function(S,E,e){var t=e("x"),r=t&&t.length,o=e("y"),a=o&&o.length;if(!r&&!a)return!1;if(E._cheater=!t,(!r||h(t))&&(!a||h(o))){var i=r?t.length:1/0;a&&(i=Math.min(i,o.length)),E.a&&E.a.length&&(i=Math.min(i,E.a.length)),E.b&&E.b.length&&(i=Math.min(i,E.b.length)),E._length=i}else E._length=null;return!0}}}),D4=He({"src/traces/carpet/axis_defaults.js"(Y,G){var h=yx(),b=Di().addOpacity,S=ji(),E=ea(),e=Rp(),t=Yd(),r=Kd(),o=_1(),a=Wv(),i=G0();G.exports=function(f,c,p){var d=p.letter,T=p.font||{},l=h[d+"axis"];function m(U,X){return E.coerce(f,c,l,U,X)}function x(U,X){return E.coerce2(f,c,l,U,X)}p.name&&(c._name=p.name,c._id=p.name),m("autotypenumbers",p.autotypenumbersDflt);var A=m("type");if(A==="-"&&(p.data&&n(c,p.data),c.type==="-"?c.type="linear":A=f.type=c.type),m("smoothing"),m("cheatertype"),m("showticklabels"),m("labelprefix",d+" = "),m("labelsuffix"),m("showtickprefix"),m("showticksuffix"),m("separatethousands"),m("tickformat"),m("exponentformat"),m("minexponent"),m("showexponent"),m("categoryorder"),m("tickmode"),m("tickvals"),m("ticktext"),m("tick0"),m("dtick"),c.tickmode==="array"&&(m("arraytick0"),m("arraydtick")),m("labelpadding"),c._hovertitle=d,A==="date"){var M=S.getComponentMethod("calendars","handleDefaults");M(f,c,"calendar",p.calendar)}a(c,p.fullLayout),c.c2p=E.identity;var _=m("color",p.dfltColor),w=_===f.color?_:T.color,g=m("title.text");g&&(E.coerceFont(m,"title.font",T,{overrideDflt:{size:E.bigFont(T.size),color:w}}),m("title.offset")),m("tickangle");var u=m("autorange",!c.isValidRange(f.range));u&&m("rangemode"),m("range"),c.cleanRange(),m("fixedrange"),e(f,c,m,A),r(f,c,m,A,p),t(f,c,m,A,p),o(f,c,m,{data:p.data,dataAttr:d});var v=x("gridcolor",b(_,.3)),y=x("gridwidth"),R=x("griddash"),L=m("showgrid");L||(delete c.gridcolor,delete c.gridwidth,delete c.griddash);var z=x("startlinecolor",_),F=x("startlinewidth",y),B=m("startline",c.showgrid||!!z||!!F);B||(delete c.startlinecolor,delete c.startlinewidth);var O=x("endlinecolor",_),I=x("endlinewidth",y),N=m("endline",c.showgrid||!!O||!!I);return N||(delete c.endlinecolor,delete c.endlinewidth),L?(m("minorgridcount"),m("minorgridwidth",y),m("minorgriddash",R),m("minorgridcolor",b(v,.06)),c.minorgridcount||(delete c.minorgridwidth,delete c.minorgriddash,delete c.minorgridcolor)):(delete c.gridcolor,delete c.gridwidth,delete c.griddash),c.showticklabels==="none"&&(delete c.tickfont,delete c.tickangle,delete c.showexponent,delete c.exponentformat,delete c.minexponent,delete c.tickformat,delete c.showticksuffix,delete c.showtickprefix),c.showticksuffix||delete c.ticksuffix,c.showtickprefix||delete c.tickprefix,m("tickmode"),c};function n(s,f){if(s.type==="-"){var c=s._id,p=c.charAt(0),d=p+"calendar",T=s[d];s.type=i(f,T,{autotypenumbers:s.autotypenumbers})}}}}),z4=He({"src/traces/carpet/ab_defaults.js"(Y,G){var h=D4(),b=xl();G.exports=function(e,t,r,o,a){var i=o("a");i||(o("da"),o("a0"));var n=o("b");n||(o("db"),o("b0")),S(e,t,r,a)};function S(E,e,t,r){var o=["aaxis","baxis"];o.forEach(function(a){var i=a.charAt(0),n=E[a]||{},s=b.newContainer(e,a),f={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:i+"axis",letter:i,font:e.font,name:a,data:E[i],calendar:e.calendar,dfltColor:r,bgColor:t.paper_bgcolor,autotypenumbersDflt:t.autotypenumbers,fullLayout:t};h(n,s,f),s._categories=s._categories||[],!E[a]&&n.type!=="-"&&(E[a]={type:n.type})})}}}),F4=He({"src/traces/carpet/defaults.js"(Y,G){var h=ea(),b=R4(),S=z4(),E=yx(),e=Mf();G.exports=function(r,o,a,i){function n(c,p){return h.coerce(r,o,E,c,p)}o._clipPathId="clip"+o.uid+"carpet";var s=n("color",e.defaultLine);if(h.coerceFont(n,"font",i.font),n("carpet"),S(r,o,i,n,s),!o.a||!o.b){o.visible=!1;return}o.a.length<3&&(o.aaxis.smoothing=0),o.b.length<3&&(o.baxis.smoothing=0);var f=b(r,o,n);f||(o.visible=!1),o._cheater&&n("cheaterslope"),n("zorder")}}}),s5=He({"src/traces/carpet/map_1d_array.js"(Y,G){var h=ea().isArrayOrTypedArray;G.exports=function(S,E,e){var t;for(h(S)?S.length>E.length&&(S=S.slice(0,E.length)):S=[],t=0;t<E.length;t++)S[t]=e(E[t]);return S}}}),l5=He({"src/traces/carpet/makepath.js"(Y,G){G.exports=function(b,S,E){if(b.length===0)return"";var e,t=[],r=E?3:1;for(e=0;e<b.length;e+=r)t.push(b[e]+","+S[e]),E&&e<b.length-r&&(t.push("C"),t.push([b[e+1]+","+S[e+1],b[e+2]+","+S[e+2]+" "].join(" ")));return t.join(E?"":"L")}}}),O4=He({"src/traces/carpet/orient_text.js"(Y,G){G.exports=function(b,S,E,e,t,r){var o=t[0]*b.dpdx(S),a=t[1]*b.dpdy(E),i=1,n=1;if(r){var s=Math.sqrt(t[0]*t[0]+t[1]*t[1]),f=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=(t[0]*r[0]+t[1]*r[1])/s/f;n=Math.max(0,c)}var p=Math.atan2(a,o)*180/Math.PI;return p<-90?(p+=180,i=-i):p>90&&(p-=180,i=-i),{angle:p,flip:i,p:b.c2p(e,S,E),offsetMultplier:n}}}}),B4=He({"src/traces/carpet/plot.js"(Y,G){var h=_i(),b=Io(),S=s5(),E=l5(),e=O4(),t=Zl(),r=ea(),o=r.strRotate,a=r.strTranslate,i=Nf();G.exports=function(m,x,A,M){var _=m._context.staticPlot,w=x.xaxis,g=x.yaxis,u=m._fullLayout,v=u._clips;r.makeTraceGroups(M,A,"trace").each(function(y){var R=h.select(this),L=y[0],z=L.trace,F=z.aaxis,B=z.baxis,O=r.ensureSingle(R,"g","minorlayer"),I=r.ensureSingle(R,"g","majorlayer"),N=r.ensureSingle(R,"g","boundarylayer"),U=r.ensureSingle(R,"g","labellayer");R.style("opacity",z.opacity),s(w,g,I,F,"a",F._gridlines,!0),s(w,g,I,B,"b",B._gridlines,!0),s(w,g,O,F,"a",F._minorgridlines,!0),s(w,g,O,B,"b",B._minorgridlines,!0),s(w,g,N,F,"a-boundary",F._boundarylines,_),s(w,g,N,B,"b-boundary",B._boundarylines,_);var X=f(m,w,g,z,L,U,F._labels,"a-label"),ee=f(m,w,g,z,L,U,B._labels,"b-label");c(m,U,z,L,w,g,X,ee),n(z,L,v,w,g)})};function n(l,m,x,A,M){var _,w,g,u,v=x.select("#"+l._clipPathId);v.size()||(v=x.append("clipPath").classed("carpetclip",!0));var y=r.ensureSingle(v,"path","carpetboundary"),R=m.clipsegments,L=[];for(u=0;u<R.length;u++)_=R[u],w=S([],_.x,A.c2p),g=S([],_.y,M.c2p),L.push(E(w,g,_.bicubic));var z="M"+L.join("L")+"Z";v.attr("id",l._clipPathId),y.attr("d",z)}function s(l,m,x,A,M,_,w){var g="const-"+M+"-lines",u=x.selectAll("."+g).data(_);u.enter().append("path").classed(g,!0).style("vector-effect",w?"none":"non-scaling-stroke"),u.each(function(v){var y=v,R=y.x,L=y.y,z=S([],R,l.c2p),F=S([],L,m.c2p),B="M"+E(z,F,y.smoothing),O=h.select(this);O.attr("d",B).style("stroke-width",y.width).style("stroke",y.color).style("stroke-dasharray",b.dashStyle(y.dash,y.width)).style("fill","none")}),u.exit().remove()}function f(l,m,x,A,M,_,w,g){var u=_.selectAll("text."+g).data(w);u.enter().append("text").classed(g,!0);var v=0,y={};return u.each(function(R,L){var z;if(R.axis.tickangle==="auto")z=e(A,m,x,R.xy,R.dxy);else{var F=(R.axis.tickangle+180)*Math.PI/180;z=e(A,m,x,R.xy,[Math.cos(F),Math.sin(F)])}L||(y={angle:z.angle,flip:z.flip});var B=(R.endAnchor?-1:1)*z.flip,O=h.select(this).attr({"text-anchor":B>0?"start":"end","data-notex":1}).call(b.font,R.font).text(R.text).call(t.convertToTspans,l),I=b.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(R.axis.labelpadding*B,I.height*.3)),v=Math.max(v,I.width+R.axis.labelpadding)}),u.exit().remove(),y.maxExtent=v,y}function c(l,m,x,A,M,_,w,g){var u,v,y,R,L=r.aggNums(Math.min,null,x.a),z=r.aggNums(Math.max,null,x.a),F=r.aggNums(Math.min,null,x.b),B=r.aggNums(Math.max,null,x.b);u=.5*(L+z),v=F,y=x.ab2xy(u,v,!0),R=x.dxyda_rough(u,v),w.angle===void 0&&r.extendFlat(w,e(x,M,_,y,x.dxydb_rough(u,v))),T(l,m,x,A,y,R,x.aaxis,M,_,w,"a-title"),u=L,v=.5*(F+B),y=x.ab2xy(u,v,!0),R=x.dxydb_rough(u,v),g.angle===void 0&&r.extendFlat(g,e(x,M,_,y,x.dxyda_rough(u,v))),T(l,m,x,A,y,R,x.baxis,M,_,g,"b-title")}var p=i.LINE_SPACING,d=(1-i.MID_SHIFT)/p+1;function T(l,m,x,A,M,_,w,g,u,v,y){var R=[];w.title.text&&R.push(w.title.text);var L=m.selectAll("text."+y).data(R),z=v.maxExtent;L.enter().append("text").classed(y,!0),L.each(function(){var F=e(x,g,u,M,_);["start","both"].indexOf(w.showticklabels)===-1&&(z=0);var B=w.title.font.size;z+=B+w.title.offset;var O=v.angle+(v.flip<0?180:0),I=(O-F.angle+450)%360,N=I>90&&I<270,U=h.select(this);U.text(w.title.text).call(t.convertToTspans,l),N&&(z=(-t.lineCount(U)+d)*p*B-z),U.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(b.font,w.title.font)}),L.exit().remove()}}}),N4=He({"src/traces/carpet/cheater_basis.js"(Y,G){var h=ea().isArrayOrTypedArray;G.exports=function(b,S,E){var e,t,r,o,a,i,n=[],s=h(b)?b.length:b,f=h(S)?S.length:S,c=h(b)?b:null,p=h(S)?S:null;c&&(r=(c.length-1)/(c[c.length-1]-c[0])/(s-1)),p&&(o=(p.length-1)/(p[p.length-1]-p[0])/(f-1));var d,T=1/0,l=-1/0;for(t=0;t<f;t++)for(n[t]=[],i=p?(p[t]-p[0])*o:t/(f-1),e=0;e<s;e++)a=c?(c[e]-c[0])*r:e/(s-1),d=a-i*E,T=Math.min(d,T),l=Math.max(d,l),n[t][e]=d;var m=1/(l-T),x=-T*m;for(t=0;t<f;t++)for(e=0;e<s;e++)n[t][e]=m*n[t][e]+x;return n}}}),U4=He({"src/traces/carpet/array_minmax.js"(Y,G){var h=ea().isArrayOrTypedArray;G.exports=function(S){return b(S,0)};function b(S,E){if(!h(S)||E>=10)return null;for(var e=1/0,t=-1/0,r=S.length,o=0;o<r;o++){var a=S[o];if(h(a)){var i=b(a,E+1);i&&(e=Math.min(i[0],e),t=Math.max(i[1],t))}else e=Math.min(a,e),t=Math.max(a,t)}return[e,t]}}}),j4=He({"src/traces/carpet/calc_gridlines.js"(Y,G){var h=Ao(),b=Po().extendFlat;G.exports=function(E,e,t){var r,o,a,i,n,s,f,c,p,d,T,l,m,x,A=E["_"+e],M=E[e+"axis"],_=M._gridlines=[],w=M._minorgridlines=[],g=M._boundarylines=[],u=E["_"+t],v=E[t+"axis"];M.tickmode==="array"&&(M.tickvals=A.slice());var y=E._xctrl,R=E._yctrl,L=y[0].length,z=y.length,F=E._a.length,B=E._b.length;h.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var O=M.smoothing?3:1;function I(U){var X,ee,ue,oe,le,V,J,te,Z,se,Q,q,re=[],ae=[],fe={};if(e==="b")for(ee=E.b2j(U),ue=Math.floor(Math.max(0,Math.min(B-2,ee))),oe=ee-ue,fe.length=B,fe.crossLength=F,fe.xy=function(be){return E.evalxy([],be,ee)},fe.dxy=function(be,Me){return E.dxydi([],be,ue,Me,oe)},X=0;X<F;X++)V=Math.min(F-2,X),J=X-V,te=E.evalxy([],X,ee),v.smoothing&&X>0&&(Z=E.dxydi([],X-1,ue,0,oe),re.push(le[0]+Z[0]/3),ae.push(le[1]+Z[1]/3),se=E.dxydi([],X-1,ue,1,oe),re.push(te[0]-se[0]/3),ae.push(te[1]-se[1]/3)),re.push(te[0]),ae.push(te[1]),le=te;else for(X=E.a2i(U),V=Math.floor(Math.max(0,Math.min(F-2,X))),J=X-V,fe.length=F,fe.crossLength=B,fe.xy=function(be){return E.evalxy([],X,be)},fe.dxy=function(be,Me){return E.dxydj([],V,be,J,Me)},ee=0;ee<B;ee++)ue=Math.min(B-2,ee),oe=ee-ue,te=E.evalxy([],X,ee),v.smoothing&&ee>0&&(Q=E.dxydj([],V,ee-1,J,0),re.push(le[0]+Q[0]/3),ae.push(le[1]+Q[1]/3),q=E.dxydj([],V,ee-1,J,1),re.push(te[0]-q[0]/3),ae.push(te[1]-q[1]/3)),re.push(te[0]),ae.push(te[1]),le=te;return fe.axisLetter=e,fe.axis=M,fe.crossAxis=v,fe.value=U,fe.constvar=t,fe.index=c,fe.x=re,fe.y=ae,fe.smoothing=v.smoothing,fe}function N(U){var X,ee,ue,oe,le,V=[],J=[],te={};if(te.length=A.length,te.crossLength=u.length,e==="b")for(ue=Math.max(0,Math.min(B-2,U)),le=Math.min(1,Math.max(0,U-ue)),te.xy=function(Z){return E.evalxy([],Z,U)},te.dxy=function(Z,se){return E.dxydi([],Z,ue,se,le)},X=0;X<L;X++)V[X]=y[U*O][X],J[X]=R[U*O][X];else for(ee=Math.max(0,Math.min(F-2,U)),oe=Math.min(1,Math.max(0,U-ee)),te.xy=function(Z){return E.evalxy([],U,Z)},te.dxy=function(Z,se){return E.dxydj([],ee,Z,oe,se)},X=0;X<z;X++)V[X]=y[X][U*O],J[X]=R[X][U*O];return te.axisLetter=e,te.axis=M,te.crossAxis=v,te.value=A[U],te.constvar=t,te.index=U,te.x=V,te.y=J,te.smoothing=v.smoothing,te}if(M.tickmode==="array"){for(i=5e-15,n=[Math.floor((A.length-1-M.arraytick0)/M.arraydtick*(1+i)),Math.ceil(-M.arraytick0/M.arraydtick/(1+i))].sort(function(U,X){return U-X}),s=n[0]-1,f=n[1]+1,c=s;c<f;c++)o=M.arraytick0+M.arraydtick*c,!(o<0||o>A.length-1)&&_.push(b(N(o),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s;c<f;c++)if(a=M.arraytick0+M.arraydtick*c,T=Math.min(a+M.arraydtick,A.length-1),!(a<0||a>A.length-1)&&!(T<0||T>A.length-1))for(l=A[a],m=A[T],r=0;r<M.minorgridcount;r++)x=T-a,!(x<=0)&&(d=l+(m-l)*(r+1)/(M.minorgridcount+1)*(M.arraydtick/x),!(d<A[0]||d>A[A.length-1])&&w.push(b(I(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&g.push(b(N(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&g.push(b(N(A.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(i=5e-15,n=[Math.floor((A[A.length-1]-M.tick0)/M.dtick*(1+i)),Math.ceil((A[0]-M.tick0)/M.dtick/(1+i))].sort(function(U,X){return U-X}),s=n[0],f=n[1],c=s;c<=f;c++)p=M.tick0+M.dtick*c,_.push(b(I(p),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s-1;c<f+1;c++)for(p=M.tick0+M.dtick*c,r=0;r<M.minorgridcount;r++)d=p+M.dtick*(r+1)/(M.minorgridcount+1),!(d<A[0]||d>A[A.length-1])&&w.push(b(I(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&g.push(b(I(A[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&g.push(b(I(A[A.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}}}),V4=He({"src/traces/carpet/calc_labels.js"(Y,G){var h=Ao(),b=Po().extendFlat;G.exports=function(E,e){var t,r,o,a,i,n=e._labels=[],s=e._gridlines;for(t=0;t<s.length;t++)i=s[t],["start","both"].indexOf(e.showticklabels)!==-1&&(r=h.tickText(e,i.value),b(r,{prefix:o,suffix:a,endAnchor:!0,xy:i.xy(0),dxy:i.dxy(0,0),axis:i.axis,length:i.crossAxis.length,font:i.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),n.push(r)),["end","both"].indexOf(e.showticklabels)!==-1&&(r=h.tickText(e,i.value),b(r,{endAnchor:!1,xy:i.xy(i.crossLength-1),dxy:i.dxy(i.crossLength-2,1),axis:i.axis,length:i.crossAxis.length,font:i.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),n.push(r))}}}),q4=He({"src/traces/carpet/calc_clippath.js"(Y,G){G.exports=function(b,S,E,e){var t,r,o,a=[],i=!!E.smoothing,n=!!e.smoothing,s=b[0].length-1,f=b.length-1;for(t=0,r=[],o=[];t<=s;t++)r[t]=b[0][t],o[t]=S[0][t];for(a.push({x:r,y:o,bicubic:i}),t=0,r=[],o=[];t<=f;t++)r[t]=b[t][s],o[t]=S[t][s];for(a.push({x:r,y:o,bicubic:n}),t=s,r=[],o=[];t>=0;t--)r[s-t]=b[f][t],o[s-t]=S[f][t];for(a.push({x:r,y:o,bicubic:i}),t=f,r=[],o=[];t>=0;t--)r[f-t]=b[t][0],o[f-t]=S[t][0];return a.push({x:r,y:o,bicubic:n}),a}}}),G4=He({"src/traces/carpet/smooth_fill_2d_array.js"(Y,G){var h=ea();G.exports=function(S,E,e){var t,r,o,a=[],i=[],n=S[0].length,s=S.length;function f(ee,ue){var oe=0,le,V=0;return ee>0&&(le=S[ue][ee-1])!==void 0&&(V++,oe+=le),ee<n-1&&(le=S[ue][ee+1])!==void 0&&(V++,oe+=le),ue>0&&(le=S[ue-1][ee])!==void 0&&(V++,oe+=le),ue<s-1&&(le=S[ue+1][ee])!==void 0&&(V++,oe+=le),oe/Math.max(1,V)}var c=0;for(t=0;t<n;t++)for(r=0;r<s;r++)S[r][t]===void 0&&(a.push(t),i.push(r),S[r][t]=f(t,r)),c=Math.max(c,Math.abs(S[r][t]));if(!a.length)return S;var p,d,T,l,m,x,A,M,_,w,g,u=1e-5,v=0,y=100,R=0,L=a.length;do{for(v=0,o=0;o<L;o++){t=a[o],r=i[o];var z=0,F=0,B,O,I,N,U,X;t===0?(U=Math.min(n-1,2),I=E[U],N=E[1],B=S[r][U],O=S[r][1],F+=O+(O-B)*(E[0]-N)/(N-I),z++):t===n-1&&(U=Math.max(0,n-3),I=E[U],N=E[n-2],B=S[r][U],O=S[r][n-2],F+=O+(O-B)*(E[n-1]-N)/(N-I),z++),(t===0||t===n-1)&&r>0&&r<s-1&&(p=e[r+1]-e[r],d=e[r]-e[r-1],F+=(d*S[r+1][t]+p*S[r-1][t])/(d+p),z++),r===0?(X=Math.min(s-1,2),I=e[X],N=e[1],B=S[X][t],O=S[1][t],F+=O+(O-B)*(e[0]-N)/(N-I),z++):r===s-1&&(X=Math.max(0,s-3),I=e[X],N=e[s-2],B=S[X][t],O=S[s-2][t],F+=O+(O-B)*(e[s-1]-N)/(N-I),z++),(r===0||r===s-1)&&t>0&&t<n-1&&(p=E[t+1]-E[t],d=E[t]-E[t-1],F+=(d*S[r][t+1]+p*S[r][t-1])/(d+p),z++),z?F/=z:(T=E[t+1]-E[t],l=E[t]-E[t-1],m=e[r+1]-e[r],x=e[r]-e[r-1],A=T*l*(T+l),M=m*x*(m+x),F=(A*(x*S[r+1][t]+m*S[r-1][t])+M*(l*S[r][t+1]+T*S[r][t-1]))/(M*(l+T)+A*(x+m))),_=F-S[r][t],w=_/c,v+=w*w,g=z?0:.85,S[r][t]+=_*(1+g)}v=Math.sqrt(v)}while(R++<y&&v>u);return h.log("Smoother converged to",v,"after",R,"iterations"),S}}}),H4=He({"src/traces/carpet/constants.js"(Y,G){G.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),W4=He({"src/traces/carpet/catmull_rom.js"(Y,G){var h=.5;G.exports=function(S,E,e,t){var r=S[0]-E[0],o=S[1]-E[1],a=e[0]-E[0],i=e[1]-E[1],n=Math.pow(r*r+o*o,h/2),s=Math.pow(a*a+i*i,h/2),f=(s*s*r-n*n*a)*t,c=(s*s*o-n*n*i)*t,p=s*(n+s)*3,d=n*(n+s)*3;return[[E[0]+(p&&f/p),E[1]+(p&&c/p)],[E[0]-(d&&f/d),E[1]-(d&&c/d)]]}}}),X4=He({"src/traces/carpet/compute_control_points.js"(Y,G){var h=W4(),b=ea().ensureArray;function S(E,e,t){var r=-.5*t[0]+1.5*e[0],o=-.5*t[1]+1.5*e[1];return[(2*r+E[0])/3,(2*o+E[1])/3]}G.exports=function(e,t,r,o,a,i){var n,s,f,c,p,d,T,l,m,x,A=r[0].length,M=r.length,_=a?3*A-2:A,w=i?3*M-2:M;for(e=b(e,w),t=b(t,w),f=0;f<w;f++)e[f]=b(e[f],_),t[f]=b(t[f],_);for(s=0,c=0;s<M;s++,c+=i?3:1)for(p=e[c],d=t[c],T=r[s],l=o[s],n=0,f=0;n<A;n++,f+=a?3:1)p[f]=T[n],d[f]=l[n];if(a)for(s=0,c=0;s<M;s++,c+=i?3:1){for(n=1,f=3;n<A-1;n++,f+=3)m=h([r[s][n-1],o[s][n-1]],[r[s][n],o[s][n]],[r[s][n+1],o[s][n+1]],a),e[c][f-1]=m[0][0],t[c][f-1]=m[0][1],e[c][f+1]=m[1][0],t[c][f+1]=m[1][1];x=S([e[c][0],t[c][0]],[e[c][2],t[c][2]],[e[c][3],t[c][3]]),e[c][1]=x[0],t[c][1]=x[1],x=S([e[c][_-1],t[c][_-1]],[e[c][_-3],t[c][_-3]],[e[c][_-4],t[c][_-4]]),e[c][_-2]=x[0],t[c][_-2]=x[1]}if(i)for(f=0;f<_;f++){for(c=3;c<w-3;c+=3)m=h([e[c-3][f],t[c-3][f]],[e[c][f],t[c][f]],[e[c+3][f],t[c+3][f]],i),e[c-1][f]=m[0][0],t[c-1][f]=m[0][1],e[c+1][f]=m[1][0],t[c+1][f]=m[1][1];x=S([e[0][f],t[0][f]],[e[2][f],t[2][f]],[e[3][f],t[3][f]]),e[1][f]=x[0],t[1][f]=x[1],x=S([e[w-1][f],t[w-1][f]],[e[w-3][f],t[w-3][f]],[e[w-4][f],t[w-4][f]]),e[w-2][f]=x[0],t[w-2][f]=x[1]}if(a&&i)for(c=1;c<w;c+=(c+1)%3===0?2:1){for(f=3;f<_-3;f+=3)m=h([e[c][f-3],t[c][f-3]],[e[c][f],t[c][f]],[e[c][f+3],t[c][f+3]],a),e[c][f-1]=.5*(e[c][f-1]+m[0][0]),t[c][f-1]=.5*(t[c][f-1]+m[0][1]),e[c][f+1]=.5*(e[c][f+1]+m[1][0]),t[c][f+1]=.5*(t[c][f+1]+m[1][1]);x=S([e[c][0],t[c][0]],[e[c][2],t[c][2]],[e[c][3],t[c][3]]),e[c][1]=.5*(e[c][1]+x[0]),t[c][1]=.5*(t[c][1]+x[1]),x=S([e[c][_-1],t[c][_-1]],[e[c][_-3],t[c][_-3]],[e[c][_-4],t[c][_-4]]),e[c][_-2]=.5*(e[c][_-2]+x[0]),t[c][_-2]=.5*(t[c][_-2]+x[1])}return[e,t]}}}),Z4=He({"src/traces/carpet/create_spline_evaluator.js"(Y,G){G.exports=function(h,b,S,E,e){var t=b-2,r=S-2;return E&&e?function(o,a,i){o||(o=[]);var n,s,f,c,p,d,T=Math.max(0,Math.min(Math.floor(a),t)),l=Math.max(0,Math.min(Math.floor(i),r)),m=Math.max(0,Math.min(1,a-T)),x=Math.max(0,Math.min(1,i-l));T*=3,l*=3;var A=m*m,M=A*m,_=1-m,w=_*_,g=w*_,u=x*x,v=u*x,y=1-x,R=y*y,L=R*y;for(d=0;d<h.length;d++)p=h[d],n=g*p[l][T]+3*(w*m*p[l][T+1]+_*A*p[l][T+2])+M*p[l][T+3],s=g*p[l+1][T]+3*(w*m*p[l+1][T+1]+_*A*p[l+1][T+2])+M*p[l+1][T+3],f=g*p[l+2][T]+3*(w*m*p[l+2][T+1]+_*A*p[l+2][T+2])+M*p[l+2][T+3],c=g*p[l+3][T]+3*(w*m*p[l+3][T+1]+_*A*p[l+3][T+2])+M*p[l+3][T+3],o[d]=L*n+3*(R*x*s+y*u*f)+v*c;return o}:E?function(o,a,i){o||(o=[]);var n=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(i),r)),f=Math.max(0,Math.min(1,a-n)),c=Math.max(0,Math.min(1,i-s)),p,d,T,l,m,x;n*=3;var A=f*f,M=A*f,_=1-f,w=_*_,g=w*_,u=1-c;for(m=0;m<h.length;m++)x=h[m],p=u*x[s][n]+c*x[s+1][n],d=u*x[s][n+1]+c*x[s+1][n+1],T=u*x[s][n+2]+c*x[s+1][n+1],l=u*x[s][n+3]+c*x[s+1][n+1],o[m]=g*p+3*(w*f*d+_*A*T)+M*l;return o}:e?function(o,a,i){o||(o=[]);var n=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(i),r)),f=Math.max(0,Math.min(1,a-n)),c=Math.max(0,Math.min(1,i-s)),p,d,T,l,m,x;s*=3;var A=c*c,M=A*c,_=1-c,w=_*_,g=w*_,u=1-f;for(m=0;m<h.length;m++)x=h[m],p=u*x[s][n]+f*x[s][n+1],d=u*x[s+1][n]+f*x[s+1][n+1],T=u*x[s+2][n]+f*x[s+2][n+1],l=u*x[s+3][n]+f*x[s+3][n+1],o[m]=g*p+3*(w*c*d+_*A*T)+M*l;return o}:function(o,a,i){o||(o=[]);var n=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(i),r)),f=Math.max(0,Math.min(1,a-n)),c=Math.max(0,Math.min(1,i-s)),p,d,T,l,m=1-c,x=1-f;for(T=0;T<h.length;T++)l=h[T],p=x*l[s][n]+f*l[s][n+1],d=x*l[s+1][n]+f*l[s+1][n+1],o[T]=m*p+c*d;return o}}}}),Y4=He({"src/traces/carpet/create_i_derivative_evaluator.js"(Y,G){G.exports=function(h,b,S){return b&&S?function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f,c;e*=3,t*=3;var p=r*r,d=1-r,T=d*d,l=d*r*2,m=-3*T,x=3*(T-l),A=3*(l-p),M=3*p,_=o*o,w=_*o,g=1-o,u=g*g,v=u*g;for(c=0;c<h.length;c++)f=h[c],a=m*f[t][e]+x*f[t][e+1]+A*f[t][e+2]+M*f[t][e+3],i=m*f[t+1][e]+x*f[t+1][e+1]+A*f[t+1][e+2]+M*f[t+1][e+3],n=m*f[t+2][e]+x*f[t+2][e+1]+A*f[t+2][e+2]+M*f[t+2][e+3],s=m*f[t+3][e]+x*f[t+3][e+1]+A*f[t+3][e+2]+M*f[t+3][e+3],E[c]=v*a+3*(u*o*i+g*_*n)+w*s;return E}:b?function(E,e,t,r,o){E||(E=[]);var a,i,n,s;e*=3;var f=r*r,c=1-r,p=c*c,d=c*r*2,T=-3*p,l=3*(p-d),m=3*(d-f),x=3*f,A=1-o;for(n=0;n<h.length;n++)s=h[n],a=T*s[t][e]+l*s[t][e+1]+m*s[t][e+2]+x*s[t][e+3],i=T*s[t+1][e]+l*s[t+1][e+1]+m*s[t+1][e+2]+x*s[t+1][e+3],E[n]=A*a+o*i;return E}:S?function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f,c;t*=3;var p=o*o,d=p*o,T=1-o,l=T*T,m=l*T;for(f=0;f<h.length;f++)c=h[f],a=c[t][e+1]-c[t][e],i=c[t+1][e+1]-c[t+1][e],n=c[t+2][e+1]-c[t+2][e],s=c[t+3][e+1]-c[t+3][e],E[f]=m*a+3*(l*o*i+T*p*n)+d*s;return E}:function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f=1-o;for(n=0;n<h.length;n++)s=h[n],a=s[t][e+1]-s[t][e],i=s[t+1][e+1]-s[t+1][e],E[n]=f*a+o*i;return E}}}}),K4=He({"src/traces/carpet/create_j_derivative_evaluator.js"(Y,G){G.exports=function(h,b,S){return b&&S?function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f,c;e*=3,t*=3;var p=r*r,d=p*r,T=1-r,l=T*T,m=l*T,x=o*o,A=1-o,M=A*A,_=A*o*2,w=-3*M,g=3*(M-_),u=3*(_-x),v=3*x;for(c=0;c<h.length;c++)f=h[c],a=w*f[t][e]+g*f[t+1][e]+u*f[t+2][e]+v*f[t+3][e],i=w*f[t][e+1]+g*f[t+1][e+1]+u*f[t+2][e+1]+v*f[t+3][e+1],n=w*f[t][e+2]+g*f[t+1][e+2]+u*f[t+2][e+2]+v*f[t+3][e+2],s=w*f[t][e+3]+g*f[t+1][e+3]+u*f[t+2][e+3]+v*f[t+3][e+3],E[c]=m*a+3*(l*r*i+T*p*n)+d*s;return E}:b?function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f,c;e*=3;var p=o*o,d=p*o,T=1-o,l=T*T,m=l*T;for(f=0;f<h.length;f++)c=h[f],a=c[t+1][e]-c[t][e],i=c[t+1][e+1]-c[t][e+1],n=c[t+1][e+2]-c[t][e+2],s=c[t+1][e+3]-c[t][e+3],E[f]=m*a+3*(l*o*i+T*p*n)+d*s;return E}:S?function(E,e,t,r,o){E||(E=[]);var a,i,n,s;t*=3;var f=1-r,c=o*o,p=1-o,d=p*p,T=p*o*2,l=-3*d,m=3*(d-T),x=3*(T-c),A=3*c;for(n=0;n<h.length;n++)s=h[n],a=l*s[t][e]+m*s[t+1][e]+x*s[t+2][e]+A*s[t+3][e],i=l*s[t][e+1]+m*s[t+1][e+1]+x*s[t+2][e+1]+A*s[t+3][e+1],E[n]=f*a+r*i;return E}:function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f=1-r;for(n=0;n<h.length;n++)s=h[n],a=s[t+1][e]-s[t][e],i=s[t+1][e+1]-s[t][e+1],E[n]=f*a+r*i;return E}}}}),$4=He({"src/traces/carpet/set_convert.js"(Y,G){var h=H4(),b=a1().findBin,S=X4(),E=Z4(),e=Y4(),t=K4();G.exports=function(o){var a=o._a,i=o._b,n=a.length,s=i.length,f=o.aaxis,c=o.baxis,p=a[0],d=a[n-1],T=i[0],l=i[s-1],m=a[a.length-1]-a[0],x=i[i.length-1]-i[0],A=m*h.RELATIVE_CULL_TOLERANCE,M=x*h.RELATIVE_CULL_TOLERANCE;p-=A,d+=A,T-=M,l+=M,o.isVisible=function(_,w){return _>p&&_<d&&w>T&&w<l},o.isOccluded=function(_,w){return _<p||_>d||w<T||w>l},o.setScale=function(){var _=o._x,w=o._y,g=S(o._xctrl,o._yctrl,_,w,f.smoothing,c.smoothing);o._xctrl=g[0],o._yctrl=g[1],o.evalxy=E([o._xctrl,o._yctrl],n,s,f.smoothing,c.smoothing),o.dxydi=e([o._xctrl,o._yctrl],f.smoothing,c.smoothing),o.dxydj=t([o._xctrl,o._yctrl],f.smoothing,c.smoothing)},o.i2a=function(_){var w=Math.max(0,Math.floor(_[0]),n-2),g=_[0]-w;return(1-g)*a[w]+g*a[w+1]},o.j2b=function(_){var w=Math.max(0,Math.floor(_[1]),n-2),g=_[1]-w;return(1-g)*i[w]+g*i[w+1]},o.ij2ab=function(_){return[o.i2a(_[0]),o.j2b(_[1])]},o.a2i=function(_){var w=Math.max(0,Math.min(b(_,a),n-2)),g=a[w],u=a[w+1];return Math.max(0,Math.min(n-1,w+(_-g)/(u-g)))},o.b2j=function(_){var w=Math.max(0,Math.min(b(_,i),s-2)),g=i[w],u=i[w+1];return Math.max(0,Math.min(s-1,w+(_-g)/(u-g)))},o.ab2ij=function(_){return[o.a2i(_[0]),o.b2j(_[1])]},o.i2c=function(_,w){return o.evalxy([],_,w)},o.ab2xy=function(_,w,g){if(!g&&(_<a[0]||_>a[n-1]|w<i[0]||w>i[s-1]))return[!1,!1];var u=o.a2i(_),v=o.b2j(w),y=o.evalxy([],u,v);if(g){var R=0,L=0,z=[],F,B,O,I;_<a[0]?(F=0,B=0,R=(_-a[0])/(a[1]-a[0])):_>a[n-1]?(F=n-2,B=1,R=(_-a[n-1])/(a[n-1]-a[n-2])):(F=Math.max(0,Math.min(n-2,Math.floor(u))),B=u-F),w<i[0]?(O=0,I=0,L=(w-i[0])/(i[1]-i[0])):w>i[s-1]?(O=s-2,I=1,L=(w-i[s-1])/(i[s-1]-i[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(v))),I=v-O),R&&(o.dxydi(z,F,O,B,I),y[0]+=z[0]*R,y[1]+=z[1]*R),L&&(o.dxydj(z,F,O,B,I),y[0]+=z[0]*L,y[1]+=z[1]*L)}return y},o.c2p=function(_,w,g){return[w.c2p(_[0]),g.c2p(_[1])]},o.p2x=function(_,w,g){return[w.p2c(_[0]),g.p2c(_[1])]},o.dadi=function(_){var w=Math.max(0,Math.min(a.length-2,_));return a[w+1]-a[w]},o.dbdj=function(_){var w=Math.max(0,Math.min(i.length-2,_));return i[w+1]-i[w]},o.dxyda=function(_,w,g,u){var v=o.dxydi(null,_,w,g,u),y=o.dadi(_,g);return[v[0]/y,v[1]/y]},o.dxydb=function(_,w,g,u){var v=o.dxydj(null,_,w,g,u),y=o.dbdj(w,u);return[v[0]/y,v[1]/y]},o.dxyda_rough=function(_,w,g){var u=m*(g||.1),v=o.ab2xy(_+u,w,!0),y=o.ab2xy(_-u,w,!0);return[(v[0]-y[0])*.5/u,(v[1]-y[1])*.5/u]},o.dxydb_rough=function(_,w,g){var u=x*(g||.1),v=o.ab2xy(_,w+u,!0),y=o.ab2xy(_,w-u,!0);return[(v[0]-y[0])*.5/u,(v[1]-y[1])*.5/u]},o.dpdx=function(_){return _._m},o.dpdy=function(_){return _._m}}}}),J4=He({"src/traces/carpet/calc.js"(Y,G){var h=Ao(),b=ea().isArray1D,S=N4(),E=U4(),e=j4(),t=V4(),r=q4(),o=F1(),a=G4(),i=z1(),n=$4();G.exports=function(f,c){var p=h.getFromId(f,c.xaxis),d=h.getFromId(f,c.yaxis),T=c.aaxis,l=c.baxis,m=c.x,x=c.y,A=[];m&&b(m)&&A.push("x"),x&&b(x)&&A.push("y"),A.length&&i(c,T,l,"a","b",A);var M=c._a=c._a||c.a,_=c._b=c._b||c.b;m=c._x||c.x,x=c._y||c.y;var w={};if(c._cheater){var g=T.cheatertype==="index"?M.length:M,u=l.cheatertype==="index"?_.length:_;m=S(g,u,c.cheaterslope)}c._x=m=o(m),c._y=x=o(x),a(m,M,_),a(x,M,_),n(c),c.setScale();var v=E(m),y=E(x),R=.5*(v[1]-v[0]),L=.5*(v[1]+v[0]),z=.5*(y[1]-y[0]),F=.5*(y[1]+y[0]),B=1.3;return v=[L-R*B,L+R*B],y=[F-z*B,F+z*B],c._extremes[p._id]=h.findExtremes(p,v,{padded:!0}),c._extremes[d._id]=h.findExtremes(d,y,{padded:!0}),e(c,"a","b"),e(c,"b","a"),t(c,T),t(c,l),w.clipsegments=r(c._xctrl,c._yctrl,T,l),w.x=m,w.y=x,w.a=M,w.b=_,[w]}}}),Q4=He({"src/traces/carpet/index.js"(Y,G){G.exports={attributes:yx(),supplyDefaults:F4(),plot:B4(),calc:J4(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:mf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),eR=He({"lib/carpet.js"(Y,G){G.exports=Q4()}}),u5=He({"src/traces/scattercarpet/attributes.js"(Y,G){var h=Mv(),b=Cc(),S=Nl(),{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Ll(),r=ou(),o=Po().extendFlat,a=b.marker,i=b.line,n=a.line;G.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},b.mode,{dflt:"markers"}),text:o({},b.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},b.hovertext,{}),line:{color:i.color,width:i.width,dash:i.dash,backoff:i.backoff,shape:o({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:b.connectgaps,fill:o({},b.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:h(),marker:o({symbol:a.symbol,opacity:a.opacity,maxdisplayed:a.maxdisplayed,angle:a.angle,angleref:a.angleref,standoff:a.standoff,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:o({width:n.width,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:b.hoveron,hovertemplate:E(),hovertemplatefallback:t(),zorder:b.zorder}}}),tR=He({"src/traces/scattercarpet/defaults.js"(Y,G){var h=ea(),b=Xv(),S=mu(),E=av(),e=cv(),t=X0(),r=fv(),o=kv(),a=u5();G.exports=function(n,s,f,c){function p(M,_){return h.coerce(n,s,a,M,_)}p("carpet"),s.xaxis="x",s.yaxis="y";var d=p("a"),T=p("b"),l=Math.min(d.length,T.length);if(!l){s.visible=!1;return}s._length=l,p("text"),p("texttemplate"),p("texttemplatefallback"),p("hovertext");var m=l<b.PTS_LINESONLY?"lines+markers":"lines";p("mode",m),S.hasMarkers(s)&&E(n,s,f,c,p,{gradient:!0}),S.hasLines(s)&&(e(n,s,f,c,p,{backoff:!0}),t(n,s,p),p("connectgaps")),S.hasText(s)&&r(n,s,c,p);var x=[];(S.hasMarkers(s)||S.hasText(s))&&(p("marker.maxdisplayed"),x.push("points")),p("fill"),s.fill!=="none"&&(o(n,s,f,p),S.hasLines(s)||t(n,s,p)),(s.fill==="tonext"||s.fill==="toself")&&x.push("fills");var A=p("hoveron",x.join("+")||"points");A!=="fills"&&(p("hovertemplate"),p("hovertemplatefallback")),p("zorder"),h.coerceSelectionMarkerOpacity(s,p)}}}),rR=He({"src/traces/scattercarpet/format_labels.js"(Y,G){G.exports=function(b,S){var E={},e=S._carpet,t=e.ab2ij([b.a,b.b]),r=Math.floor(t[0]),o=t[0]-r,a=Math.floor(t[1]),i=t[1]-a,n=e.evalxy([],r,a,o,i);return E.yLabel=n[1].toFixed(3),E}}}),_x=He({"src/traces/carpet/lookup_carpetid.js"(Y,G){G.exports=function(h,b){for(var S=h._fullData.length,E,e=0;e<S;e++){var t=h._fullData[e];if(t.index!==b.index&&t.type==="carpet"&&(E||(E=t),t.carpet===b.carpet))return t}return E}}}),aR=He({"src/traces/scattercarpet/calc.js"(Y,G){var h=Ui(),b=hv(),S=Zv(),E=vv(),e=dv().calcMarkerSize,t=_x();G.exports=function(o,a){var i=a._carpetTrace=t(o,a);if(!(!i||!i.visible||i.visible==="legendonly")){var n;a.xaxis=i.xaxis,a.yaxis=i.yaxis;var s=a._length,f=new Array(s),c,p,d=!1;for(n=0;n<s;n++)if(c=a.a[n],p=a.b[n],h(c)&&h(p)){var T=i.ab2xy(+c,+p,!0),l=i.isVisible(+c,+p);l||(d=!0),f[n]={x:T[0],y:T[1],a:c,b:p,vis:l}}else f[n]={x:!1,y:!1};return a._needsCull=d,f[0].carpet=i,f[0].trace=a,e(a,s),b(o,a),S(f,a),E(f,a),f}}}}),nR=He({"src/traces/scattercarpet/plot.js"(Y,G){var h=Z0(),b=Ao(),S=Io();G.exports=function(e,t,r,o){var a,i,n,s=r[0][0].carpet,f=b.getFromId(e,s.xaxis||"x"),c=b.getFromId(e,s.yaxis||"y"),p={xaxis:f,yaxis:c,plot:t.plot};for(a=0;a<r.length;a++)i=r[a][0].trace,i._xA=f,i._yA=c;for(h(e,p,r,o),a=0;a<r.length;a++)i=r[a][0].trace,n=o.selectAll("g.trace"+i.uid+" .js-line"),S.setClipUrl(n,r[a][0].carpet._clipPathId,e)}}}),iR=He({"src/traces/scattercarpet/hover.js"(Y,G){var h=K0(),b=ea().fillText;G.exports=function(E,e,t,r){var o=h(E,e,t,r);if(!o||o[0].index===!1)return;var a=o[0];if(a.index===void 0){var i=1-a.y0/E.ya._length,n=E.xa._length,s=n*i/2,f=n-s;return a.x0=Math.max(Math.min(a.x0,f),s),a.x1=Math.max(Math.min(a.x1,f),s),o}var c=a.cd[a.index];a.a=c.a,a.b=c.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var p=a.trace,d=p._carpet,T=p._module.formatLabels(c,p);a.yLabel=T.yLabel,delete a.text;var l=[];function m(M,_){var w;M.labelprefix&&M.labelprefix.length>0?w=M.labelprefix.replace(/ = $/,""):w=M._hovertitle,l.push(w+": "+_.toFixed(3)+M.labelsuffix)}if(!p.hovertemplate){var x=c.hi||p.hoverinfo,A=x.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&m(d.aaxis,c.a),A.indexOf("b")!==-1&&m(d.baxis,c.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&b(c,p,l),a.extraText=l.join("<br>")}return o}}}),oR=He({"src/traces/scattercarpet/event_data.js"(Y,G){G.exports=function(b,S,E,e,t){var r=e[t];return b.a=r.a,b.b=r.b,b.y=r.y,b}}}),sR=He({"src/traces/scattercarpet/index.js"(Y,G){G.exports={attributes:u5(),supplyDefaults:tR(),colorbar:xh(),formatLabels:rR(),calc:aR(),plot:nR(),style:Gh().style,styleOnSelect:Gh().styleOnSelect,hoverPoints:iR(),selectPoints:$0(),eventData:oR(),moduleType:"trace",name:"scattercarpet",basePlotModule:mf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),lR=He({"lib/scattercarpet.js"(Y,G){G.exports=sR()}}),c5=He({"src/traces/contourcarpet/attributes.js"(Y,G){var h=eg(),b=ym(),S=ou(),E=Po().extendFlat,e=b.contours;G.exports=E({carpet:{valType:"string",editType:"calc"},z:h.z,a:h.x,a0:h.x0,da:h.dx,b:h.y,b0:h.y0,db:h.dy,text:h.text,hovertext:h.hovertext,transpose:h.transpose,atype:h.xtype,btype:h.ytype,fillcolor:b.fillcolor,autocontour:b.autocontour,ncontours:b.ncontours,contours:{type:e.type,start:e.start,end:e.end,size:e.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:e.showlines,showlabels:e.showlabels,labelfont:e.labelfont,labelformat:e.labelformat,operation:e.operation,value:e.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:b.line.color,width:b.line.width,dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},zorder:b.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),f5=He({"src/traces/contourcarpet/defaults.js"(Y,G){var h=ea(),b=D1(),S=c5(),E=Fw(),e=Z1(),t=Y1();G.exports=function(o,a,i,n){function s(d,T){return h.coerce(o,a,S,d,T)}function f(d){return h.coerce2(o,a,S,d)}if(s("carpet"),o.a&&o.b){var c=b(o,a,s,n,"a","b");if(!c){a.visible=!1;return}s("text");var p=s("contours.type")==="constraint";p?E(o,a,s,n,i,{hasHover:!1}):(e(o,a,s,f),t(o,a,s,n,{hasHover:!1}))}else a._defaultColor=i,a._length=null;s("zorder")}}}),uR=He({"src/traces/contourcarpet/calc.js"(Y,G){var h=Eh(),b=ea(),S=z1(),E=F1(),e=O1(),t=B1(),r=xw(),o=f5(),a=_x(),i=Ew();G.exports=function(f,c){var p=c._carpetTrace=a(f,c);if(!(!p||!p.visible||p.visible==="legendonly")){if(!c.a||!c.b){var d=f.data[p.index],T=f.data[c.index];T.a||(T.a=d.a),T.b||(T.b=d.b),o(T,c,c._defaultColor,f._fullLayout)}var l=n(f,c);return i(c,c._z),l}};function n(s,f){var c=f._carpetTrace,p=c.aaxis,d=c.baxis,T,l,m,x,A,M,_;p._minDtick=0,d._minDtick=0,b.isArray1D(f.z)&&S(f,p,d,"a","b",["z"]),T=f._a=f._a||f.a,x=f._b=f._b||f.b,T=T?p.makeCalcdata(f,"_a"):[],x=x?d.makeCalcdata(f,"_b"):[],l=f.a0||0,m=f.da||1,A=f.b0||0,M=f.db||1,_=f._z=E(f._z||f.z,f.transpose),f._emptypoints=t(_),e(_,f._emptypoints);var w=b.maxRowLength(_),g=f.xtype==="scaled"?"":T,u=r(f,g,l,m,w,p),v=f.ytype==="scaled"?"":x,y=r(f,v,A,M,_.length,d),R={a:u,b:y,z:_};return f.contours.type==="levels"&&f.contours.coloring!=="none"&&h(s,f,{vals:_,containerStr:"",cLetter:"z"}),[R]}}}),cR=He({"src/traces/carpet/axis_aligned_line.js"(Y,G){var h=ea().isArrayOrTypedArray;G.exports=function(b,S,E,e){var t,r,o,a,i,n,s,f,c,p,d,T,l,m=h(E)?"a":"b",x=m==="a"?b.aaxis:b.baxis,A=x.smoothing,M=m==="a"?b.a2i:b.b2j,_=m==="a"?E:e,w=m==="a"?e:E,g=m==="a"?S.a.length:S.b.length,u=m==="a"?S.b.length:S.a.length,v=Math.floor(m==="a"?b.b2j(w):b.a2i(w)),y=m==="a"?function(ue){return b.evalxy([],ue,v)}:function(ue){return b.evalxy([],v,ue)};A&&(o=Math.max(0,Math.min(u-2,v)),a=v-o,r=m==="a"?function(ue,oe){return b.dxydi([],ue,o,oe,a)}:function(ue,oe){return b.dxydj([],o,ue,a,oe)});var R=M(_[0]),L=M(_[1]),z=R<L?1:-1,F=(L-R)*1e-8,B=z>0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,I=z>0?Math.min:Math.max,N=z>0?Math.max:Math.min,U=B(R+F),X=O(L-F);s=y(R);var ee=[[s]];for(t=U;t*z<X*z;t+=z)i=[],d=N(R,t),T=I(L,t+z),l=T-d,n=Math.max(0,Math.min(g-2,Math.floor(.5*(d+T)))),f=y(T),A&&(c=r(n,d-n),p=r(n,T-n),i.push([s[0]+c[0]/3*l,s[1]+c[1]/3*l]),i.push([f[0]-p[0]/3*l,f[1]-p[1]/3*l])),i.push(f),ee.push(i),s=f;return ee}}}),fR=He({"src/traces/contourcarpet/plot.js"(Y,G){var h=_i(),b=s5(),S=l5(),E=Io(),e=ea(),t=Cw(),r=Lw(),o=K1(),a=xm(),i=Iw(),n=Pw(),s=Rw(),f=_x(),c=cR();G.exports=function(g,u,v,y){var R=u.xaxis,L=u.yaxis;e.makeTraceGroups(y,v,"contour").each(function(z){var F=h.select(this),B=z[0],O=B.trace,I=O._carpetTrace=f(g,O),N=g.calcdata[I.index][0];if(!I.visible||I.visible==="legendonly")return;var U=B.a,X=B.b,ee=O.contours,ue=n(ee,u,B),oe=ee.type==="constraint",le=ee._operation,V=oe?le==="="?"lines":"fill":ee.coloring;function J(Ie){var Le=I.ab2xy(Ie[0],Ie[1],!0);return[R.c2p(Le[0]),L.c2p(Le[1])]}var te=[[U[0],X[X.length-1]],[U[U.length-1],X[X.length-1]],[U[U.length-1],X[0]],[U[0],X[0]]];t(ue);var Z=(U[U.length-1]-U[0])*1e-8,se=(X[X.length-1]-X[0])*1e-8;r(ue,Z,se);var Q=ue;ee.type==="constraint"&&(Q=i(ue,le)),p(ue,J);var q,re,ae,fe,be=[];for(fe=N.clipsegments.length-1;fe>=0;fe--)q=N.clipsegments[fe],re=b([],q.x,R.c2p),ae=b([],q.y,L.c2p),re.reverse(),ae.reverse(),be.push(S(re,ae,q.bicubic));var Me="M"+be.join("L")+"Z";A(F,N.clipsegments,R,L,oe,V),M(O,F,R,L,Q,te,J,I,N,V,Me),d(F,ue,g,B,ee,u,I),E.setClipUrl(F,I._clipPathId,g)})};function p(w,g){var u,v,y,R,L,z,F,B,O;for(u=0;u<w.length;u++){for(R=w[u],L=R.pedgepaths=[],z=R.ppaths=[],v=0;v<R.edgepaths.length;v++){for(O=R.edgepaths[v],F=[],y=0;y<O.length;y++)F[y]=g(O[y]);L.push(F)}for(v=0;v<R.paths.length;v++){for(O=R.paths[v],B=[],y=0;y<O.length;y++)B[y]=g(O[y]);z.push(B)}}}function d(w,g,u,v,y,R,L){var z=u._context.staticPlot,F=e.ensureSingle(w,"g","contourlines"),B=y.showlines!==!1,O=y.showlabels,I=B&&O,N=o.createLines(F,B||O,g,z),U=o.createLineClip(F,I,u,v.trace.uid),X=w.selectAll("g.contourlabels").data(O?[0]:[]);if(X.exit().remove(),X.enter().append("g").classed("contourlabels",!0),O){var ee=R.xaxis,ue=R.yaxis,oe=ee._length,le=ue._length,V=[[[0,0],[oe,0],[oe,le],[0,le]]],J=[];e.clearLocationCache();var te=o.labelFormatter(u,v),Z=E.tester.append("text").attr("data-notex",1).call(E.font,y.labelfont),se={left:0,right:oe,center:oe/2,top:0,bottom:le,middle:le/2},Q=Math.sqrt(oe*oe+le*le),q=a.LABELDISTANCE*Q/Math.max(1,g.length/a.LABELINCREASE);N.each(function(re){var ae=o.calcTextOpts(re.level,te,Z,u);h.select(this).selectAll("path").each(function(fe){var be=this,Me=e.getVisibleSegment(be,se,ae.height/2);if(Me&&(T(be,fe,re,Me,L,ae.height),!(Me.len<(ae.width+ae.height)*a.LABELMIN)))for(var Ie=Math.min(Math.ceil(Me.len/q),a.LABELMAX),Le=0;Le<Ie;Le++){var je=o.findBestTextLocation(be,Me,ae,J,se);if(!je)break;o.addLabelData(je,ae,J,V)}})}),Z.remove(),o.drawLabels(X,J,u,U,I?V:null)}O&&!B&&N.remove()}function T(w,g,u,v,y,R){for(var L,z=0;z<u.pedgepaths.length;z++)g===u.pedgepaths[z]&&(L=u.edgepaths[z]);if(!L)return;var F=y.a[0],B=y.a[y.a.length-1],O=y.b[0],I=y.b[y.b.length-1];function N(oe,le){var V=0,J,te=.1;return(Math.abs(oe[0]-F)<te||Math.abs(oe[0]-B)<te)&&(J=m(y.dxydb_rough(oe[0],oe[1],te)),V=Math.max(V,R*x(le,J)/2)),(Math.abs(oe[1]-O)<te||Math.abs(oe[1]-I)<te)&&(J=m(y.dxyda_rough(oe[0],oe[1],te)),V=Math.max(V,R*x(le,J)/2)),V}var U=l(w,0,1),X=l(w,v.total,v.total-1),ee=N(L[0],U),ue=v.total-N(L[L.length-1],X);v.min<ee&&(v.min=ee),v.max>ue&&(v.max=ue),v.len=v.max-v.min}function l(w,g,u){var v=w.getPointAtLength(g),y=w.getPointAtLength(u),R=y.x-v.x,L=y.y-v.y,z=Math.sqrt(R*R+L*L);return[R/z,L/z]}function m(w){var g=Math.sqrt(w[0]*w[0]+w[1]*w[1]);return[w[0]/g,w[1]/g]}function x(w,g){var u=Math.abs(w[0]*g[0]+w[1]*g[1]),v=Math.sqrt(1-u*u);return v/u}function A(w,g,u,v,y,R){var L,z,F,B,O=e.ensureSingle(w,"g","contourbg"),I=O.selectAll("path").data(R==="fill"&&!y?[0]:[]);I.enter().append("path"),I.exit().remove();var N=[];for(B=0;B<g.length;B++)L=g[B],z=b([],L.x,u.c2p),F=b([],L.y,v.c2p),N.push(S(z,F,L.bicubic));I.attr("d","M"+N.join("L")+"Z").style("stroke","none")}function M(w,g,u,v,y,R,L,z,F,B,O){var I=B==="fill";I&&s(y,w.contours);var N=e.ensureSingle(g,"g","contourfill"),U=N.selectAll("path").data(I?y:[]);U.enter().append("path"),U.exit().remove(),U.each(function(X){var ee=(X.prefixBoundary?O:"")+_(w,X,R,L,z,F,u,v);ee?h.select(this).attr("d",ee).style("stroke","none"):h.select(this).remove()})}function _(w,g,u,v,y,R,L,z){var F,B="",O=g.edgepaths.map(function(ae,fe){return fe}),I=!0,N,U,X,ee,ue,oe,le=Math.abs(u[0][0]-u[2][0])*1e-4,V=Math.abs(u[0][1]-u[2][1])*1e-4;function J(ae){return Math.abs(ae[1]-u[0][1])<V}function te(ae){return Math.abs(ae[1]-u[2][1])<V}function Z(ae){return Math.abs(ae[0]-u[0][0])<le}function se(ae){return Math.abs(ae[0]-u[2][0])<le}function Q(ae,fe){var be,Me,Ie,Le,je="";for(J(ae)&&!se(ae)||te(ae)&&!Z(ae)?(Le=y.aaxis,Ie=c(y,R,[ae[0],fe[0]],.5*(ae[1]+fe[1]))):(Le=y.baxis,Ie=c(y,R,.5*(ae[0]+fe[0]),[ae[1],fe[1]])),be=1;be<Ie.length;be++)for(je+=Le.smoothing?"C":"L",Me=0;Me<Ie[be].length;Me++){var et=Ie[be][Me];je+=[L.c2p(et[0]),z.c2p(et[1])]+" "}return je}for(F=0,N=null;O.length;){var q=g.edgepaths[F][0];for(N&&(B+=Q(N,q)),oe=E.smoothopen(g.edgepaths[F].map(v),g.smoothing),B+=I?oe:oe.replace(/^M/,"L"),O.splice(O.indexOf(F),1),N=g.edgepaths[F][g.edgepaths[F].length-1],ee=-1,X=0;X<4;X++){if(!N){e.log("Missing end?",F,g);break}for(J(N)&&!se(N)?U=u[1]:Z(N)?U=u[0]:te(N)?U=u[3]:se(N)&&(U=u[2]),ue=0;ue<g.edgepaths.length;ue++){var re=g.edgepaths[ue][0];Math.abs(N[0]-U[0])<le?Math.abs(N[0]-re[0])<le&&(re[1]-N[1])*(U[1]-re[1])>=0&&(U=re,ee=ue):Math.abs(N[1]-U[1])<V?Math.abs(N[1]-re[1])<V&&(re[0]-N[0])*(U[0]-re[0])>=0&&(U=re,ee=ue):e.log("endpt to newendpt is not vert. or horz.",N,U,re)}if(ee>=0)break;B+=Q(N,U),N=U}if(ee===g.edgepaths.length){e.log("unclosed perimeter path");break}F=ee,I=O.indexOf(F)===-1,I&&(F=O[0],B+=Q(N,U)+"Z",N=null)}for(F=0;F<g.paths.length;F++)B+=E.smoothclosed(g.paths[F].map(v),g.smoothing);return B}}}),hR=He({"src/traces/contourcarpet/index.js"(Y,G){G.exports={attributes:c5(),supplyDefaults:f5(),colorbar:J1(),calc:uR(),plot:fR(),style:$1(),moduleType:"trace",name:"contourcarpet",basePlotModule:mf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}}),vR=He({"lib/contourcarpet.js"(Y,G){G.exports=hR()}}),xx=He({"src/traces/ohlc/attributes.js"(Y,G){var h=ea().extendFlat,b=Cc(),S=Ec().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:e}=Ll(),t=nh().dash,r=O0(),o=tg(),a=o.INCREASING.COLOR,i=o.DECREASING.COLOR,n=b.line;function s(f){return{line:{color:h({},n.color,{dflt:f}),width:n.width,dash:t,editType:"style"},editType:"style"}}G.exports={xperiod:b.xperiod,xperiod0:b.xperiod0,xperiodalignment:b.xperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:h({},n.width,{}),dash:h({},t,{}),editType:"style"},increasing:s(a),decreasing:s(i),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:E({},{keys:["open","high","low","close"]}),hovertemplatefallback:e(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:h({},r.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:b.zorder}}}),h5=He({"src/traces/ohlc/ohlc_defaults.js"(Y,G){var h=ji(),b=ea();G.exports=function(E,e,t,r){var o=t("x"),a=t("open"),i=t("high"),n=t("low"),s=t("close");t("hoverlabel.split");var f=h.getComponentMethod("calendars","handleTraceDefaults");if(f(E,e,["x"],r),!!(a&&i&&n&&s)){var c=Math.min(a.length,i.length,n.length,s.length);return o&&(c=Math.min(c,b.minRowLength(o))),e._length=c,c}}}}),dR=He({"src/traces/ohlc/defaults.js"(Y,G){var h=ea(),b=h5(),S=Ev(),E=xx();G.exports=function(r,o,a,i){function n(f,c){return h.coerce(r,o,E,f,c)}var s=b(r,o,n,i);if(!s){o.visible=!1;return}S(r,o,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),e(r,o,n,"increasing"),e(r,o,n,"decreasing"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("tickwidth"),i._requestRangeslider[o.xaxis]=!0,n("zorder")};function e(t,r,o,a){o(a+".line.color"),o(a+".line.width",r.line.width),o(a+".line.dash",r.line.dash)}}}),v5=He({"src/traces/ohlc/calc.js"(Y,G){var h=ea(),b=h._,S=Ao(),E=Cv(),e=Qo().BADNUM;function t(i,n){var s=S.getFromId(i,n.xaxis),f=S.getFromId(i,n.yaxis),c=a(i,s,n),p=n._minDiff;n._minDiff=null;var d=n._origX;n._origX=null;var T=n._xcalc;n._xcalc=null;var l=o(i,n,d,T,f,r);return n._extremes[s._id]=S.findExtremes(s,T,{vpad:p/2}),l.length?(h.extendFlat(l[0].t,{wHover:p/2,tickLen:c}),l):[{t:{empty:!0}}]}function r(i,n,s,f){return{o:i,h:n,l:s,c:f}}function o(i,n,s,f,c,p){for(var d=c.makeCalcdata(n,"open"),T=c.makeCalcdata(n,"high"),l=c.makeCalcdata(n,"low"),m=c.makeCalcdata(n,"close"),x=h.isArrayOrTypedArray(n.text),A=h.isArrayOrTypedArray(n.hovertext),M=!0,_=null,w=!!n.xperiodalignment,g=[],u=0;u<f.length;u++){var v=f[u],y=d[u],R=T[u],L=l[u],z=m[u];if(v!==e&&y!==e&&R!==e&&L!==e&&z!==e){z===y?_!==null&&z!==_&&(M=z>_):M=z>y,_=z;var F=p(y,R,L,z);F.pos=v,F.yc=(y+z)/2,F.i=u,F.dir=M?"increasing":"decreasing",F.x=F.pos,F.y=[L,R],w&&(F.orig_p=s[u]),x&&(F.tx=n.text[u]),A&&(F.htx=n.hovertext[u]),g.push(F)}else g.push({pos:v,empty:!0})}return n._extremes[c._id]=S.findExtremes(c,h.concat(l,T),{padded:!0}),g.length&&(g[0].t={labels:{open:b(i,"open:")+" ",high:b(i,"high:")+" ",low:b(i,"low:")+" ",close:b(i,"close:")+" "}}),g}function a(i,n,s){var f=s._minDiff;if(!f){var c=i._fullData,p=[];f=1/0;var d;for(d=0;d<c.length;d++){var T=c[d];if(T.type==="ohlc"&&T.visible===!0&&T.xaxis===n._id){p.push(T);var l=n.makeCalcdata(T,"x");T._origX=l;var m=E(s,n,"x",l).vals;T._xcalc=m;var x=h.distinctVals(m).minDiff;x&&isFinite(x)&&(f=Math.min(f,x))}}for(f===1/0&&(f=1),d=0;d<p.length;d++)p[d]._minDiff=f}return f*s.tickwidth}G.exports={calc:t,calcCommon:o}}}),pR=He({"src/traces/ohlc/plot.js"(Y,G){var h=_i(),b=ea();G.exports=function(E,e,t,r){var o=e.yaxis,a=e.xaxis,i=!!a.rangebreaks;b.makeTraceGroups(r,t,"trace ohlc").each(function(n){var s=h.select(this),f=n[0],c=f.t,p=f.trace;if(p.visible!==!0||c.empty){s.remove();return}var d=c.tickLen,T=s.selectAll("path").data(b.identity);T.enter().append("path"),T.exit().remove(),T.attr("d",function(l){if(l.empty)return"M0,0Z";var m=a.c2p(l.pos-d,!0),x=a.c2p(l.pos+d,!0),A=i?(m+x)/2:a.c2p(l.pos,!0),M=o.c2p(l.o,!0),_=o.c2p(l.h,!0),w=o.c2p(l.l,!0),g=o.c2p(l.c,!0);return"M"+m+","+M+"H"+A+"M"+A+","+_+"V"+w+"M"+x+","+g+"H"+A})})}}}),gR=He({"src/traces/ohlc/style.js"(Y,G){var h=_i(),b=Io(),S=Di();G.exports=function(e,t,r){var o=r||h.select(e).selectAll("g.ohlclayer").selectAll("g.trace");o.style("opacity",function(a){return a[0].trace.opacity}),o.each(function(a){var i=a[0].trace;h.select(this).selectAll("path").each(function(n){if(!n.empty){var s=i[n.dir].line;h.select(this).style("fill","none").call(S.stroke,s.color).call(b.dashLine,s.dash,s.width).style("opacity",i.selectedpoints&&!n.selected?.3:1)}})})}}}),d5=He({"src/traces/ohlc/hover.js"(Y,G){var h=Ao(),b=ea(),S=kc(),E=Di(),e=ea().fillText,t=tg(),r={increasing:t.INCREASING.SYMBOL,decreasing:t.DECREASING.SYMBOL};function o(s,f,c,p){var d=s.cd,T=d[0].trace;return T.hoverlabel.split?i(s,f,c,p):n(s,f,c,p)}function a(s,f,c,p){var d=s.cd,T=s.xa,l=d[0].trace,m=d[0].t,x=l.type,A=x==="ohlc"?"l":"min",M=x==="ohlc"?"h":"max",_,w,g=m.bPos||0,u=function(X){return X.pos+g-f},v=m.bdPos||m.tickLen,y=m.wHover,R=Math.min(1,v/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));_=s.maxHoverDistance-R,w=s.maxSpikeDistance-R;function L(X){var ee=u(X);return S.inbox(ee-y,ee+y,_)}function z(X){var ee=X[A],ue=X[M];return ee===ue||S.inbox(ee-c,ue-c,_)}function F(X){return(L(X)+z(X))/2}var B=S.getDistanceFunction(p,L,z,F);if(S.getClosest(d,B,s),s.index===!1)return null;var O=d[s.index];if(O.empty)return null;var I=O.dir,N=l[I],U=N.line.color;return E.opacity(U)&&N.line.width?s.color=U:s.color=N.fillcolor,s.x0=T.c2p(O.pos+g-v,!0),s.x1=T.c2p(O.pos+g+v,!0),s.xLabelVal=O.orig_p!==void 0?O.orig_p:O.pos,s.spikeDistance=F(O)*w/_,s.xSpike=T.c2p(O.pos,!0),s}function i(s,f,c,p){var d=s.cd,T=s.ya,l=d[0].trace,m=d[0].t,x=[],A=a(s,f,c,p);if(!A)return[];var M=d[A.index],_=M.hi||l.hoverinfo||"";if(_==="none"||_==="skip")return[];for(var w=["high","open","close","low"],g={},u=0;u<w.length;u++){var v=w[u],y=l[v][A.index],R=T.c2p(y,!0),L;y in g?(L=g[y],L.yLabel+="<br>"+m.labels[v]+h.hoverLabelText(T,y,l.yhoverformat)):(L=b.extendFlat({},A),L.y0=L.y1=R,L.yLabelVal=y,L.yLabel=m.labels[v]+h.hoverLabelText(T,y,l.yhoverformat),L.name="",x.push(L),g[y]=L)}return x}function n(s,f,c,p){var d=s.cd,T=s.ya,l=d[0].trace,m=d[0].t,x=a(s,f,c,p);if(!x)return[];var A=x.index,M=d[A],_=x.index=M.i,w=M.dir;function g(F){return m.labels[F]+h.hoverLabelText(T,l[F][_],l.yhoverformat)}var u=M.hi||l.hoverinfo||"",v=u.split("+"),y=u==="all",R=y||v.indexOf("y")!==-1,L=y||v.indexOf("text")!==-1,z=R?[g("open"),g("high"),g("low"),g("close")+" "+r[w]]:[];return L&&e(M,l,z),x.extraText=z.join("<br>"),x.y0=x.y1=T.c2p(M.yc,!0),[x]}G.exports={hoverPoints:o,hoverSplit:i,hoverOnPoints:n}}}),p5=He({"src/traces/ohlc/select.js"(Y,G){G.exports=function(b,S){var E=b.cd,e=b.xaxis,t=b.yaxis,r=[],o,a=E[0].t.bPos||0;if(S===!1)for(o=0;o<E.length;o++)E[o].selected=0;else for(o=0;o<E.length;o++){var i=E[o];S.contains([e.c2p(i.pos+a),t.c2p(i.yc)],null,i.i,b)?(r.push({pointNumber:i.i,x:e.c2d(i.pos),y:t.c2d(i.yc)}),i.selected=1):i.selected=0}return r}}}),mR=He({"src/traces/ohlc/index.js"(Y,G){G.exports={moduleType:"trace",name:"ohlc",basePlotModule:mf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:xx(),supplyDefaults:dR(),calc:v5().calc,plot:pR(),style:gR(),hoverPoints:d5().hoverPoints,selectPoints:p5()}}}),yR=He({"lib/ohlc.js"(Y,G){G.exports=mR()}}),g5=He({"src/traces/candlestick/attributes.js"(Y,G){var h=ea().extendFlat,b=Ec().axisHoverFormat,S=xx(),E=dm();function e(t){return{line:{color:h({},E.line.color,{dflt:t}),width:E.line.width,editType:"style"},fillcolor:E.fillcolor,editType:"style"}}G.exports={xperiod:S.xperiod,xperiod0:S.xperiod0,xperiodalignment:S.xperiodalignment,xhoverformat:b("x"),yhoverformat:b("y"),x:S.x,open:S.open,high:S.high,low:S.low,close:S.close,line:{width:h({},E.line.width,{}),editType:"style"},increasing:e(S.increasing.line.color.dflt),decreasing:e(S.decreasing.line.color.dflt),text:S.text,hovertext:S.hovertext,hovertemplate:S.hovertemplate,hovertemplatefallback:S.hovertemplatefallback,whiskerwidth:h({},E.whiskerwidth,{dflt:0}),hoverlabel:S.hoverlabel,zorder:E.zorder}}}),_R=He({"src/traces/candlestick/defaults.js"(Y,G){var h=ea(),b=Di(),S=h5(),E=Ev(),e=g5();G.exports=function(o,a,i,n){function s(c,p){return h.coerce(o,a,e,c,p)}var f=S(o,a,s,n);if(!f){a.visible=!1;return}E(o,a,n,s,{x:!0}),s("xhoverformat"),s("yhoverformat"),s("line.width"),t(o,a,s,"increasing"),t(o,a,s,"decreasing"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),s("whiskerwidth"),n._requestRangeslider[a.xaxis]=!0,s("zorder")};function t(r,o,a,i){var n=a(i+".line.color");a(i+".line.width",o.line.width),a(i+".fillcolor",b.addOpacity(n,.5))}}}),xR=He({"src/traces/candlestick/calc.js"(Y,G){var h=ea(),b=Ao(),S=Cv(),E=v5().calcCommon;G.exports=function(t,r){var o=t._fullLayout,a=b.getFromId(t,r.xaxis),i=b.getFromId(t,r.yaxis),n=a.makeCalcdata(r,"x"),s=S(r,a,"x",n).vals,f=E(t,r,n,s,i,e);return f.length?(h.extendFlat(f[0].t,{num:o._numBoxes,dPos:h.distinctVals(s).minDiff/2,posLetter:"x",valLetter:"y"}),o._numBoxes++,f):[{t:{empty:!0}}]};function e(t,r,o,a){return{min:o,q1:Math.min(t,a),med:a,q3:Math.max(t,a),max:r}}}}),bR=He({"src/traces/candlestick/index.js"(Y,G){G.exports={moduleType:"trace",name:"candlestick",basePlotModule:mf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:g5(),layoutAttributes:pm(),supplyLayoutDefaults:L1().supplyLayoutDefaults,crossTraceCalc:P1().crossTraceCalc,supplyDefaults:_R(),calc:xR(),plot:I1().plot,layerName:"boxlayer",style:R1().style,hoverPoints:d5().hoverPoints,selectPoints:p5()}}}),wR=He({"lib/candlestick.js"(Y,G){G.exports=bR()}}),m5=He({"src/plots/polar/set_convert.js"(Y,G){var h=ea(),b=Wv(),S=h.deg2rad,E=h.rad2deg;G.exports=function(i,n,s){switch(b(i,s),i._id){case"x":case"radialaxis":e(i,n);break;case"angularaxis":o(i,n);break}};function e(a,i){var n=i._subplot;a.setGeometry=function(){var s=a._rl[0],f=a._rl[1],c=n.innerRadius,p=(n.radius-c)/(f-s),d=c/p,T=s>f?function(l){return l<=0}:function(l){return l>=0};a.c2g=function(l){var m=a.c2l(l)-s;return(T(m)?m:0)+d},a.g2c=function(l){return a.l2c(l+s-d)},a.g2p=function(l){return l*p},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,i){return i==="degrees"?S(a):a}function r(a,i){return i==="degrees"?E(a):a}function o(a,i){var n=a.type;if(n==="linear"){var s=a.d2c,f=a.c2d;a.d2c=function(c,p){return t(s(c),p)},a.c2d=function(c,p){return f(r(c,p))}}a.makeCalcdata=function(c,p){var d=c[p],T=c._length,l,m,x=function(g){return a.d2c(g,c.thetaunit)};if(d)for(l=new Array(T),m=0;m<T;m++)l[m]=x(d[m]);else{var A=p+"0",M="d"+p,_=A in c?x(c[A]):0,w=c[M]?x(c[M]):(a.period||2*Math.PI)/T;for(l=new Array(T),m=0;m<T;m++)l[m]=_+m*w}return l},a.setGeometry=function(){var c=i.sector,p=c.map(S),d={clockwise:-1,counterclockwise:1}[a.direction],T=S(a.rotation),l=function(u){return d*u+T},m=function(u){return(u-T)/d},x,A,M,_;switch(n){case"linear":A=x=h.identity,_=S,M=E,a.range=h.isFullCircle(p)?[c[0],c[0]+360]:p.map(m).map(E);break;case"category":var w=a._categories.length,g=a.period?Math.max(a.period,w):w;g===0&&(g=1),A=_=function(u){return u*2*Math.PI/g},x=M=function(u){return u*g/Math.PI/2},a.range=[0,g];break}a.c2g=function(u){return l(A(u))},a.g2c=function(u){return x(m(u))},a.t2g=function(u){return l(_(u))},a.g2t=function(u){return M(m(u))}}}}}),bx=He({"src/plots/polar/constants.js"(Y,G){G.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}}}),wx=He({"src/plots/polar/helpers.js"(Y,G){var h=ea(),b=sm().tester,S=h.findIndexOfMin,E=h.isAngleInsideSector,e=h.angleDelta,t=h.angleDist;function r(m,x,A,M,_){if(!E(x,M))return!1;var w,g;A[0]<A[1]?(w=A[0],g=A[1]):(w=A[1],g=A[0]);var u=b(s(w,M[0],M[1],_)),v=b(s(g,M[0],M[1],_)),y=[m*Math.cos(x),m*Math.sin(x)];return v.contains(y)&&!u.contains(y)}function o(m,x,A,M){var _,w,g=M[0],u=M[1],v=p(Math.sin(x)-Math.sin(m)),y=p(Math.cos(x)-Math.cos(m)),R=Math.tan(A),L=p(1/R),z=v/y,F=u-z*g;return L?v&&y?(_=F/(R-z),w=R*_):y?(_=u*L,w=u):(_=g,w=g*R):v&&y?(_=0,w=F):y?(_=0,w=u):_=w=NaN,[_,w]}function a(m,x,A,M){var _=-x*A,w=x*x+1,g=2*(x*_-A),u=_*_+A*A-m*m,v=Math.sqrt(g*g-4*w*u),y=(-g+v)/(2*w),R=(-g-v)/(2*w);return[[y,x*y+_+M],[R,x*R+_+M]]}function i(m,x){var A=x.length,M=new Array(A+1),_;for(_=0;_<A;_++){var w=x[_];M[_]=[m*Math.cos(w),m*Math.sin(w)]}return M[_]=M[0].slice(),M}function n(m,x,A,M){var _=M.length,w=[],g,u;function v(N){return[m*Math.cos(N),m*Math.sin(N)]}function y(N,U,X){return o(N,U,X,v(N))}function R(N){return h.mod(N,_)}function L(N){return E(N,[x,A])}var z=S(M,function(N){return L(N)?t(N,x):1/0}),F=y(M[z],M[R(z-1)],x);for(w.push(F),g=z,u=0;u<_;g++,u++){var B=M[R(g)];if(!L(B))break;w.push(v(B))}var O=S(M,function(N){return L(N)?t(N,A):1/0}),I=y(M[O],M[R(O+1)],A);return w.push(I),w.push([0,0]),w.push(w[0].slice()),w}function s(m,x,A,M){return h.isFullCircle([x,A])?i(m,M):n(m,x,A,M)}function f(m,x,A,M){for(var _=1/0,w=1/0,g=s(m,x,A,M),u=0;u<g.length;u++){var v=g[u];_=Math.min(_,v[0]),w=Math.min(w,-v[1])}return[_,w]}function c(m,x){var A=function(w){var g=e(w,m);return g>0?g:1/0},M=S(x,A),_=h.mod(M+1,x.length);return[x[M],x[_]]}function p(m){return Math.abs(m)>1e-10?m:0}function d(m,x,A){x=x||0,A=A||0;for(var M=m.length,_=new Array(M),w=0;w<M;w++){var g=m[w];_[w]=[x+g[0],A-g[1]]}return _}function T(m,x,A,M,_,w){var g=s(m,x,A,M);return"M"+d(g,_,w).join("L")}function l(m,x,A,M,_,w,g){var u,v;m<x?(u=m,v=x):(u=x,v=m);var y=d(s(u,A,M,_),w,g),R=d(s(v,A,M,_),w,g);return"M"+R.reverse().join("L")+"M"+y.join("L")}G.exports={isPtInsidePolygon:r,findPolygonOffset:f,findEnclosingVertexAngles:c,findIntersectionXY:o,findXYatLength:a,clampTiny:p,pathPolygon:T,pathPolygonAnnulus:l}}}),y5=He({"src/plots/smith/helpers.js"(Y,G){function h(r){return r<0?-1:r>0?1:0}function b(r){var o=r[0],a=r[1];if(!isFinite(o)||!isFinite(a))return[1,0];var i=(o+1)*(o+1)+a*a;return[(o*o+a*a-1)/i,2*a/i]}function S(r,o){var a=o[0],i=o[1];return[a*r.radius+r.cx,-i*r.radius+r.cy]}function E(r,o){return o*r.radius}function e(r,o,a,i){var n=S(r,b([a,o])),s=n[0],f=n[1],c=S(r,b([i,o])),p=c[0],d=c[1];if(o===0)return["M"+s+","+f,"L"+p+","+d].join(" ");var T=E(r,1/Math.abs(o));return["M"+s+","+f,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+p+","+d].join(" ")}function t(r,o,a,i){var n=E(r,1/(o+1)),s=S(r,b([o,a])),f=s[0],c=s[1],p=S(r,b([o,i])),d=p[0],T=p[1];if(h(a)!==h(i)){var l=S(r,b([o,0])),m=l[0],x=l[1];return["M"+f+","+c,"A"+n+","+n+" 0 0,"+(0<a?0:1)+" "+m+","+x,"A"+n+","+n+" 0 0,"+(i<0?0:1)+d+","+T].join(" ")}return["M"+f+","+c,"A"+n+","+n+" 0 0,"+(i<a?0:1)+" "+d+","+T].join(" ")}G.exports={smith:b,reactanceArc:e,resistanceArc:t,smithTransform:S}}}),_5=He({"src/plots/polar/polar.js"(Y,G){var h=_i(),b=Zf(),S=ji(),E=ea(),e=E.strRotate,t=E.strTranslate,r=Di(),o=Io(),a=nc(),i=Ao(),n=Wv(),s=m5(),f=Tv().doAutoRange,c=Gb(),p=kh(),d=kc(),T=Dp(),l=Xc().prepSelect,m=Xc().selectOnClick,x=Xc().clearOutline,A=Av(),M=nm(),_=om().redrawReglTraces,w=Nf().MID_SHIFT,g=bx(),u=wx(),v=y5(),y=v.smith,R=v.reactanceArc,L=v.resistanceArc,z=v.smithTransform,F=E._,B=E.mod,O=E.deg2rad,I=E.rad2deg;function N(le,V,J){this.isSmith=J||!1,this.id=V,this.gd=le,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var te=le._fullLayout,Z="clip"+te._uid+V;this.clipIds.forTraces=Z+"-for-traces",this.clipPaths.forTraces=te._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=te["_"+(J?"smith":"polar")+"layer"].append("g").attr("class",V),this.getHole=function(se){return this.isSmith?0:se.hole},this.getSector=function(se){return this.isSmith?[0,360]:se.sector},this.getRadial=function(se){return this.isSmith?se.realaxis:se.radialaxis},this.getAngular=function(se){return this.isSmith?se.imaginaryaxis:se.angularaxis},J||(this.radialTickLayout=null,this.angularTickLayout=null)}var U=N.prototype;G.exports=function(V,J,te){return new N(V,J,te)},U.plot=function(le,V){for(var J=this,te=V[J.id],Z=!1,se=0;se<le.length;se++){var Q=le[se][0].trace;if(Q.cliponaxis===!1){Z=!0;break}}J._hasClipOnAxisFalse=Z,J.updateLayers(V,te),J.updateLayout(V,te),a.generalUpdatePerTraceModule(J.gd,J,le,te),J.updateFx(V,te),J.isSmith&&(delete te.realaxis.range,delete te.imaginaryaxis.range)},U.updateLayers=function(le,V){var J=this,te=J.isSmith,Z=J.layers,se=J.getRadial(V),Q=J.getAngular(V),q=g.layerNames,re=q.indexOf("frontplot"),ae=q.slice(0,re),fe=Q.layer==="below traces",be=se.layer==="below traces";fe&&ae.push("angular-line"),be&&ae.push("radial-line"),fe&&ae.push("angular-axis"),be&&ae.push("radial-axis"),ae.push("frontplot"),fe||ae.push("angular-line"),be||ae.push("radial-line"),fe||ae.push("angular-axis"),be||ae.push("radial-axis");var Me=(te?"smith":"polar")+"sublayer",Ie=J.framework.selectAll("."+Me).data(ae,String);Ie.enter().append("g").attr("class",function(Le){return Me+" "+Le}).each(function(Le){var je=Z[Le]=h.select(this);switch(Le){case"frontplot":te||je.append("g").classed("barlayer",!0),je.append("g").classed("scatterlayer",!0);break;case"backplot":je.append("g").classed("maplayer",!0);break;case"plotbg":Z.bg=je.append("path");break;case"radial-grid":je.style("fill","none");break;case"angular-grid":je.style("fill","none");break;case"radial-line":je.append("line").style("fill","none");break;case"angular-line":je.append("path").style("fill","none");break}}),Ie.order()},U.updateLayout=function(le,V){var J=this,te=J.layers,Z=le._size,se=J.getRadial(V),Q=J.getAngular(V),q=V.domain.x,re=V.domain.y;J.xOffset=Z.l+Z.w*q[0],J.yOffset=Z.t+Z.h*(1-re[1]);var ae=J.xLength=Z.w*(q[1]-q[0]),fe=J.yLength=Z.h*(re[1]-re[0]),be=J.getSector(V);J.sectorInRad=be.map(O);var Me=J.sectorBBox=ee(be),Ie=Me[2]-Me[0],Le=Me[3]-Me[1],je=fe/ae,et=Math.abs(Le/Ie),rt,Je,Ze,Ee,xe;je>et?(rt=ae,Je=ae*et,xe=(fe-Je)/Z.h/2,Ze=[q[0],q[1]],Ee=[re[0]+xe,re[1]-xe]):(rt=fe/et,Je=fe,xe=(ae-rt)/Z.w/2,Ze=[q[0]+xe,q[1]-xe],Ee=[re[0],re[1]]),J.xLength2=rt,J.yLength2=Je,J.xDomain2=Ze,J.yDomain2=Ee;var he=J.xOffset2=Z.l+Z.w*Ze[0],De=J.yOffset2=Z.t+Z.h*(1-Ee[1]),tt=J.radius=rt/Ie,nt=J.innerRadius=J.getHole(V)*tt,$e=J.cx=he-tt*Me[0],Et=J.cy=De+tt*Me[3],Ct=J.cxx=$e-he,jt=J.cyy=Et-De,Wt=se.side,dr;Wt==="counterclockwise"?(dr=Wt,Wt="top"):Wt==="clockwise"&&(dr=Wt,Wt="bottom"),J.radialAxis=J.mockAxis(le,V,se,{_id:"x",side:Wt,_trueSide:dr,domain:[nt/Z.w,tt/Z.w]}),J.angularAxis=J.mockAxis(le,V,Q,{side:"right",domain:[0,Math.PI],autorange:!1}),J.doAutoRange(le,V),J.updateAngularAxis(le,V),J.updateRadialAxis(le,V),J.updateRadialAxisTitle(le,V),J.xaxis=J.mockCartesianAxis(le,V,{_id:"x",domain:Ze}),J.yaxis=J.mockCartesianAxis(le,V,{_id:"y",domain:Ee});var vr=J.pathSubplot();J.clipPaths.forTraces.select("path").attr("d",vr).attr("transform",t(Ct,jt)),te.frontplot.attr("transform",t(he,De)).call(o.setClipUrl,J._hasClipOnAxisFalse?null:J.clipIds.forTraces,J.gd),te.bg.attr("d",vr).attr("transform",t($e,Et)).call(r.fill,V.bgcolor)},U.mockAxis=function(le,V,J,te){var Z=E.extendFlat({},J,te);return s(Z,V,le),Z},U.mockCartesianAxis=function(le,V,J){var te=this,Z=te.isSmith,se=J._id,Q=E.extendFlat({type:"linear"},J);n(Q,le);var q={x:[0,2],y:[1,3]};return Q.setRange=function(){var re=te.sectorBBox,ae=q[se],fe=te.radialAxis._rl,be=(fe[1]-fe[0])/(1-te.getHole(V));Q.range=[re[ae[0]]*be,re[ae[1]]*be]},Q.isPtWithinRange=se==="x"&&!Z?function(re){return te.isPtInside(re)}:function(){return!0},Q.setRange(),Q.setScale(),Q},U.doAutoRange=function(le,V){var J=this,te=J.gd,Z=J.radialAxis,se=J.getRadial(V);f(te,Z);var Q=Z.range;if(se.range=Q.slice(),se._input.range=Q.slice(),Z._rl=[Z.r2l(Q[0],null,"gregorian"),Z.r2l(Q[1],null,"gregorian")],Z.minallowed!==void 0){var q=Z.r2l(Z.minallowed);Z._rl[0]>Z._rl[1]?Z._rl[1]=Math.max(Z._rl[1],q):Z._rl[0]=Math.max(Z._rl[0],q)}if(Z.maxallowed!==void 0){var re=Z.r2l(Z.maxallowed);Z._rl[0]<Z._rl[1]?Z._rl[1]=Math.min(Z._rl[1],re):Z._rl[0]=Math.min(Z._rl[0],re)}},U.updateRadialAxis=function(le,V){var J=this,te=J.gd,Z=J.layers,se=J.radius,Q=J.innerRadius,q=J.cx,re=J.cy,ae=J.getRadial(V),fe=B(J.getSector(V)[0],360),be=J.radialAxis,Me=Q<se,Ie=J.isSmith;Ie||(J.fillViewInitialKey("radialaxis.angle",ae.angle),J.fillViewInitialKey("radialaxis.range",be.range.slice()),be.setGeometry()),be.tickangle==="auto"&&fe>90&&fe<=270&&(be.tickangle=180);var Le=Ie?function(tt){var nt=z(J,y([tt.x,0]));return t(nt[0]-q,nt[1]-re)}:function(tt){return t(be.l2p(tt.x)+Q,0)},je=Ie?function(tt){return L(J,tt.x,-1/0,1/0)}:function(tt){return J.pathArc(be.r2p(tt.x)+Q)},et=X(ae);if(J.radialTickLayout!==et&&(Z["radial-axis"].selectAll(".xtick").remove(),J.radialTickLayout=et),Me){be.setScale();var rt=0,Je=Ie?(be.tickvals||[]).filter(function(tt){return tt>=0}).map(function(tt){return i.tickText(be,tt,!0,!1)}):i.calcTicks(be),Ze=Ie?Je:i.clipEnds(be,Je),Ee=i.getTickSigns(be)[2];Ie&&((be.ticks==="top"&&be.side==="bottom"||be.ticks==="bottom"&&be.side==="top")&&(Ee=-Ee),be.ticks==="top"&&be.side==="top"&&(rt=-be.ticklen),be.ticks==="bottom"&&be.side==="bottom"&&(rt=be.ticklen)),i.drawTicks(te,be,{vals:Je,layer:Z["radial-axis"],path:i.makeTickPath(be,0,Ee),transFn:Le,crisp:!1}),i.drawGrid(te,be,{vals:Ze,layer:Z["radial-grid"],path:je,transFn:E.noop,crisp:!1}),i.drawLabels(te,be,{vals:Je,layer:Z["radial-axis"],transFn:Le,labelFns:i.makeLabelFns(be,rt)})}var xe=J.radialAxisAngle=J.vangles?I(ue(O(ae.angle),J.vangles)):ae.angle,he=t(q,re),De=he+e(-xe);oe(Z["radial-axis"],Me&&(ae.showticklabels||ae.ticks),{transform:De}),oe(Z["radial-grid"],Me&&ae.showgrid,{transform:Ie?"":he}),oe(Z["radial-line"].select("line"),Me&&ae.showline,{x1:Ie?-se:Q,y1:0,x2:se,y2:0,transform:De}).attr("stroke-width",ae.linewidth).call(r.stroke,ae.linecolor)},U.updateRadialAxisTitle=function(le,V,J){if(!this.isSmith){var te=this,Z=te.gd,se=te.radius,Q=te.cx,q=te.cy,re=te.getRadial(V),ae=te.id+"title",fe=0;if(re.title){var be=o.bBox(te.layers["radial-axis"].node()).height,Me=re.title.font.size,Ie=re.side;fe=Ie==="top"?Me:Ie==="counterclockwise"?-(be+Me*.4):be+Me*.8}var Le=J!==void 0?J:te.radialAxisAngle,je=O(Le),et=Math.cos(je),rt=Math.sin(je),Je=Q+se/2*et+fe*rt,Ze=q-se/2*rt+fe*et;te.layers["radial-axis-title"]=T.draw(Z,ae,{propContainer:re,propName:te.id+".radialaxis.title.text",placeholder:F(Z,"Click to enter radial axis title"),attributes:{x:Je,y:Ze,"text-anchor":"middle"},transform:{rotate:-Le}})}},U.updateAngularAxis=function(le,V){var J=this,te=J.gd,Z=J.layers,se=J.radius,Q=J.innerRadius,q=J.cx,re=J.cy,ae=J.getAngular(V),fe=J.angularAxis,be=J.isSmith;be||(J.fillViewInitialKey("angularaxis.rotation",ae.rotation),fe.setGeometry(),fe.setScale());var Me=be?function(nt){var $e=z(J,y([0,nt.x]));return Math.atan2($e[0]-q,$e[1]-re)-Math.PI/2}:function(nt){return fe.t2g(nt.x)};fe.type==="linear"&&fe.thetaunit==="radians"&&(fe.tick0=I(fe.tick0),fe.dtick=I(fe.dtick));var Ie=function(nt){return t(q+se*Math.cos(nt),re-se*Math.sin(nt))},Le=be?function(nt){var $e=z(J,y([0,nt.x]));return t($e[0],$e[1])}:function(nt){return Ie(Me(nt))},je=be?function(nt){var $e=z(J,y([0,nt.x])),Et=Math.atan2($e[0]-q,$e[1]-re)-Math.PI/2;return t($e[0],$e[1])+e(-I(Et))}:function(nt){var $e=Me(nt);return Ie($e)+e(-I($e))},et=be?function(nt){return R(J,nt.x,0,1/0)}:function(nt){var $e=Me(nt),Et=Math.cos($e),Ct=Math.sin($e);return"M"+[q+Q*Et,re-Q*Ct]+"L"+[q+se*Et,re-se*Ct]},rt=i.makeLabelFns(fe,0),Je=rt.labelStandoff,Ze={};Ze.xFn=function(nt){var $e=Me(nt);return Math.cos($e)*Je},Ze.yFn=function(nt){var $e=Me(nt),Et=Math.sin($e)>0?.2:1;return-Math.sin($e)*(Je+nt.fontSize*Et)+Math.abs(Math.cos($e))*(nt.fontSize*w)},Ze.anchorFn=function(nt){var $e=Me(nt),Et=Math.cos($e);return Math.abs(Et)<.1?"middle":Et>0?"start":"end"},Ze.heightFn=function(nt,$e,Et){var Ct=Me(nt);return-.5*(1+Math.sin(Ct))*Et};var Ee=X(ae);J.angularTickLayout!==Ee&&(Z["angular-axis"].selectAll("."+fe._id+"tick").remove(),J.angularTickLayout=Ee);var xe=be?[1/0].concat(fe.tickvals||[]).map(function(nt){return i.tickText(fe,nt,!0,!1)}):i.calcTicks(fe);be&&(xe[0].text="∞",xe[0].fontSize*=1.75);var he;if(V.gridshape==="linear"?(he=xe.map(Me),E.angleDelta(he[0],he[1])<0&&(he=he.slice().reverse())):he=null,J.vangles=he,fe.type==="category"&&(xe=xe.filter(function(nt){return E.isAngleInsideSector(Me(nt),J.sectorInRad)})),fe.visible){var De=fe.ticks==="inside"?-1:1,tt=(fe.linewidth||1)/2;i.drawTicks(te,fe,{vals:xe,layer:Z["angular-axis"],path:"M"+De*tt+",0h"+De*fe.ticklen,transFn:je,crisp:!1}),i.drawGrid(te,fe,{vals:xe,layer:Z["angular-grid"],path:et,transFn:E.noop,crisp:!1}),i.drawLabels(te,fe,{vals:xe,layer:Z["angular-axis"],repositionOnUpdate:!0,transFn:Le,labelFns:Ze})}oe(Z["angular-line"].select("path"),ae.showline,{d:J.pathSubplot(),transform:t(q,re)}).attr("stroke-width",ae.linewidth).call(r.stroke,ae.linecolor)},U.updateFx=function(le,V){if(!this.gd._context.staticPlot){var J=!this.isSmith;J&&(this.updateAngularDrag(le),this.updateRadialDrag(le,V,0),this.updateRadialDrag(le,V,1)),this.updateHoverAndMainDrag(le)}},U.updateHoverAndMainDrag=function(le){var V=this,J=V.isSmith,te=V.gd,Z=V.layers,se=le._zoomlayer,Q=g.MINZOOM,q=g.OFFEDGE,re=V.radius,ae=V.innerRadius,fe=V.cx,be=V.cy,Me=V.cxx,Ie=V.cyy,Le=V.sectorInRad,je=V.vangles,et=V.radialAxis,rt=u.clampTiny,Je=u.findXYatLength,Ze=u.findEnclosingVertexAngles,Ee=g.cornerHalfWidth,xe=g.cornerLen/2,he,De,tt=c.makeDragger(Z,"path","maindrag",le.dragmode===!1?"none":"crosshair");h.select(tt).attr("d",V.pathSubplot()).attr("transform",t(fe,be)),tt.onmousemove=function(ar){d.hover(te,ar,V.id),te._fullLayout._lasthover=tt,te._fullLayout._hoversubplot=V.id},tt.onmouseout=function(ar){te._dragging||p.unhover(te,ar)};var nt={element:tt,gd:te,subplot:V.id,plotinfo:{id:V.id,xaxis:V.xaxis,yaxis:V.yaxis},xaxes:[V.xaxis],yaxes:[V.yaxis]},$e,Et,Ct,jt,Wt,dr,vr,Dr,hr;function Ar(ar,tr){return Math.sqrt(ar*ar+tr*tr)}function mt(ar,tr){return Ar(ar-Me,tr-Ie)}function Fe(ar,tr){return Math.atan2(Ie-tr,ar-Me)}function We(ar,tr){return[ar*Math.cos(tr),ar*Math.sin(-tr)]}function Ae(ar,tr){if(ar===0)return V.pathSector(2*Ee);var Tr=xe/ar,sa=tr-Tr,Ea=tr+Tr,ba=Math.max(0,Math.min(ar,re)),Ia=ba-Ee,Ra=ba+Ee;return"M"+We(Ia,sa)+"A"+[Ia,Ia]+" 0,0,0 "+We(Ia,Ea)+"L"+We(Ra,Ea)+"A"+[Ra,Ra]+" 0,0,1 "+We(Ra,sa)+"Z"}function me(ar,tr,Tr){if(ar===0)return V.pathSector(2*Ee);var sa=We(ar,tr),Ea=We(ar,Tr),ba=rt((sa[0]+Ea[0])/2),Ia=rt((sa[1]+Ea[1])/2),Ra,ya;if(ba&&Ia){var rn=Ia/ba,mn=-1/rn,Yt=Je(Ee,rn,ba,Ia);Ra=Je(xe,mn,Yt[0][0],Yt[0][1]),ya=Je(xe,mn,Yt[1][0],Yt[1][1])}else{var It,Zt;Ia?(It=xe,Zt=Ee):(It=Ee,Zt=xe),Ra=[[ba-It,Ia-Zt],[ba+It,Ia-Zt]],ya=[[ba-It,Ia+Zt],[ba+It,Ia+Zt]]}return"M"+Ra.join("L")+"L"+ya.reverse().join("L")+"Z"}function pe(){Ct=null,jt=null,Wt=V.pathSubplot(),dr=!1;var ar=te._fullLayout[V.id];vr=b(ar.bgcolor).getLuminance(),Dr=c.makeZoombox(se,vr,fe,be,Wt),Dr.attr("fill-rule","evenodd"),hr=c.makeCorners(se,fe,be),x(te)}function Te(ar,tr){return tr=Math.max(Math.min(tr,re),ae),ar<q?ar=0:re-ar<q?ar=re:tr<q?tr=0:re-tr<q&&(tr=re),Math.abs(tr-ar)>Q?(ar<tr?(Ct=ar,jt=tr):(Ct=tr,jt=ar),!0):(Ct=null,jt=null,!1)}function Ue(ar,tr){ar=ar||Wt,tr=tr||"M0,0Z",Dr.attr("d",ar),hr.attr("d",tr),c.transitionZoombox(Dr,hr,dr,vr),dr=!0;var Tr={};Nt(Tr),te.emit("plotly_relayouting",Tr)}function Xe(ar,tr){ar=ar*he,tr=tr*De;var Tr=$e+ar,sa=Et+tr,Ea=mt($e,Et),ba=Math.min(mt(Tr,sa),re),Ia=Fe($e,Et),Ra,ya;Te(Ea,ba)&&(Ra=Wt+V.pathSector(jt),Ct&&(Ra+=V.pathSector(Ct)),ya=Ae(Ct,Ia)+Ae(jt,Ia)),Ue(Ra,ya)}function bt(ar,tr,Tr,sa){var Ea=u.findIntersectionXY(Tr,sa,Tr,[ar-Me,Ie-tr]);return Ar(Ea[0],Ea[1])}function xt(ar,tr){var Tr=$e+ar,sa=Et+tr,Ea=Fe($e,Et),ba=Fe(Tr,sa),Ia=Ze(Ea,je),Ra=Ze(ba,je),ya=bt($e,Et,Ia[0],Ia[1]),rn=Math.min(bt(Tr,sa,Ra[0],Ra[1]),re),mn,Yt;Te(ya,rn)&&(mn=Wt+V.pathSector(jt),Ct&&(mn+=V.pathSector(Ct)),Yt=[me(Ct,Ia[0],Ia[1]),me(jt,Ia[0],Ia[1])].join(" ")),Ue(mn,Yt)}function Mt(){if(c.removeZoombox(te),!(Ct===null||jt===null)){var ar={};Nt(ar),c.showDoubleClickNotifier(te),S.call("_guiRelayout",te,ar)}}function Nt(ar){var tr=et._rl,Tr=(tr[1]-tr[0])/(1-ae/re)/re,sa=[tr[0]+(Ct-ae)*Tr,tr[0]+(jt-ae)*Tr];ar[V.id+".radialaxis.range"]=sa}function sr(ar,tr){var Tr=te._fullLayout.clickmode;if(c.removeZoombox(te),ar===2){var sa={};for(var Ea in V.viewInitial)sa[V.id+"."+Ea]=V.viewInitial[Ea];te.emit("plotly_doubleclick",null),S.call("_guiRelayout",te,sa)}Tr.indexOf("select")>-1&&ar===1&&m(tr,te,[V.xaxis],[V.yaxis],V.id,nt),Tr.indexOf("event")>-1&&d.click(te,tr,V.id)}nt.prepFn=function(ar,tr,Tr){var sa=te._fullLayout.dragmode,Ea=tt.getBoundingClientRect();te._fullLayout._calcInverseTransform(te);var ba=te._fullLayout._invTransform;he=te._fullLayout._invScaleX,De=te._fullLayout._invScaleY;var Ia=E.apply3DTransform(ba)(tr-Ea.left,Tr-Ea.top);if($e=Ia[0],Et=Ia[1],je){var Ra=u.findPolygonOffset(re,Le[0],Le[1],je);$e+=Me+Ra[0],Et+=Ie+Ra[1]}switch(sa){case"zoom":nt.clickFn=sr,J||(je?nt.moveFn=xt:nt.moveFn=Xe,nt.doneFn=Mt,pe());break;case"select":case"lasso":l(ar,tr,Tr,nt,sa);break}},p.init(nt)},U.updateRadialDrag=function(le,V,J){var te=this,Z=te.gd,se=te.layers,Q=te.radius,q=te.innerRadius,re=te.cx,ae=te.cy,fe=te.radialAxis,be=g.radialDragBoxSize,Me=be/2;if(!fe.visible)return;var Ie=O(te.radialAxisAngle),Le=fe._rl,je=Le[0],et=Le[1],rt=Le[J],Je=.75*(Le[1]-Le[0])/(1-te.getHole(V))/Q,Ze,Ee,xe;J?(Ze=re+(Q+Me)*Math.cos(Ie),Ee=ae-(Q+Me)*Math.sin(Ie),xe="radialdrag"):(Ze=re+(q-Me)*Math.cos(Ie),Ee=ae-(q-Me)*Math.sin(Ie),xe="radialdrag-inner");var he=c.makeRectDragger(se,xe,"crosshair",-Me,-Me,be,be),De={element:he,gd:Z};le.dragmode===!1&&(De.dragmode=!1),oe(h.select(he),fe.visible&&q<Q,{transform:t(Ze,Ee)});var tt,nt,$e;function Et(vr,Dr){if(tt)tt(vr,Dr);else{var hr=[vr,-Dr],Ar=[Math.cos(Ie),Math.sin(Ie)],mt=Math.abs(E.dot(hr,Ar)/Math.sqrt(E.dot(hr,hr)));isNaN(mt)||(tt=mt<.5?Wt:dr)}var Fe={};Ct(Fe),Z.emit("plotly_relayouting",Fe)}function Ct(vr){nt!==null?vr[te.id+".radialaxis.angle"]=nt:$e!==null&&(vr[te.id+".radialaxis.range["+J+"]"]=$e)}function jt(){nt!==null?S.call("_guiRelayout",Z,te.id+".radialaxis.angle",nt):$e!==null&&S.call("_guiRelayout",Z,te.id+".radialaxis.range["+J+"]",$e)}function Wt(vr,Dr){if(J!==0){var hr=Ze+vr,Ar=Ee+Dr;nt=Math.atan2(ae-Ar,hr-re),te.vangles&&(nt=ue(nt,te.vangles)),nt=I(nt);var mt=t(re,ae)+e(-nt);se["radial-axis"].attr("transform",mt),se["radial-line"].select("line").attr("transform",mt);var Fe=te.gd._fullLayout,We=Fe[te.id];te.updateRadialAxisTitle(Fe,We,nt)}}function dr(vr,Dr){var hr=E.dot([vr,-Dr],[Math.cos(Ie),Math.sin(Ie)]);if($e=rt-Je*hr,Je>0!=(J?$e>je:$e<et)){$e=null;return}var Ar=Z._fullLayout,mt=Ar[te.id];fe.range[J]=$e,fe._rl[J]=$e,te.updateRadialAxis(Ar,mt),te.xaxis.setRange(),te.xaxis.setScale(),te.yaxis.setRange(),te.yaxis.setScale();var Fe=!1;for(var We in te.traceHash){var Ae=te.traceHash[We],me=E.filterVisible(Ae),pe=Ae[0][0].trace._module;pe.plot(Z,te,me,mt),S.traceIs(We,"gl")&&me.length&&(Fe=!0)}Fe&&(M(Z),_(Z))}De.prepFn=function(){tt=null,nt=null,$e=null,De.moveFn=Et,De.doneFn=jt,x(Z)},De.clampFn=function(vr,Dr){return Math.sqrt(vr*vr+Dr*Dr)<g.MINDRAG&&(vr=0,Dr=0),[vr,Dr]},p.init(De)},U.updateAngularDrag=function(le){var V=this,J=V.gd,te=V.layers,Z=V.radius,se=V.angularAxis,Q=V.cx,q=V.cy,re=V.cxx,ae=V.cyy,fe=g.angularDragBoxSize,be=c.makeDragger(te,"path","angulardrag",le.dragmode===!1?"none":"move"),Me={element:be,gd:J};le.dragmode===!1?Me.dragmode=!1:h.select(be).attr("d",V.pathAnnulus(Z,Z+fe)).attr("transform",t(Q,q)).call(A,"move");function Ie($e,Et){return Math.atan2(ae+fe-Et,$e-re-fe)}var Le=te.frontplot.select(".scatterlayer").selectAll(".trace"),je=Le.selectAll(".point"),et=Le.selectAll(".textpoint"),rt,Je,Ze,Ee,xe,he;function De($e,Et){var Ct=V.gd._fullLayout,jt=Ct[V.id],Wt=rt+$e*le._invScaleX,dr=Je+Et*le._invScaleY,vr=Ie(Wt,dr),Dr=I(vr-he);if(Ee=Ze+Dr,te.frontplot.attr("transform",t(V.xOffset2,V.yOffset2)+e([-Dr,re,ae])),V.vangles){xe=V.radialAxisAngle+Dr;var hr=t(Q,q)+e(-Dr),Ar=t(Q,q)+e(-xe);te.bg.attr("transform",hr),te["radial-grid"].attr("transform",hr),te["radial-axis"].attr("transform",Ar),te["radial-line"].select("line").attr("transform",Ar),V.updateRadialAxisTitle(Ct,jt,xe)}else V.clipPaths.forTraces.select("path").attr("transform",t(re,ae)+e(Dr));je.each(function(){var Te=h.select(this),Ue=o.getTranslate(Te);Te.attr("transform",t(Ue.x,Ue.y)+e([Dr]))}),et.each(function(){var Te=h.select(this),Ue=Te.select("text"),Xe=o.getTranslate(Te);Te.attr("transform",e([Dr,Ue.attr("x"),Ue.attr("y")])+t(Xe.x,Xe.y))}),se.rotation=E.modHalf(Ee,360),V.updateAngularAxis(Ct,jt),V._hasClipOnAxisFalse&&!E.isFullCircle(V.sectorInRad)&&Le.call(o.hideOutsideRangePoints,V);var mt=!1;for(var Fe in V.traceHash)if(S.traceIs(Fe,"gl")){var We=V.traceHash[Fe],Ae=E.filterVisible(We),me=We[0][0].trace._module;me.plot(J,V,Ae,jt),Ae.length&&(mt=!0)}mt&&(M(J),_(J));var pe={};tt(pe),J.emit("plotly_relayouting",pe)}function tt($e){$e[V.id+".angularaxis.rotation"]=Ee,V.vangles&&($e[V.id+".radialaxis.angle"]=xe)}function nt(){et.select("text").attr("transform",null);var $e={};tt($e),S.call("_guiRelayout",J,$e)}Me.prepFn=function($e,Et,Ct){var jt=le[V.id];Ze=jt.angularaxis.rotation;var Wt=be.getBoundingClientRect();rt=Et-Wt.left,Je=Ct-Wt.top,J._fullLayout._calcInverseTransform(J);var dr=E.apply3DTransform(le._invTransform)(rt,Je);rt=dr[0],Je=dr[1],he=Ie(rt,Je),Me.moveFn=De,Me.doneFn=nt,x(J)},V.vangles&&!E.isFullCircle(V.sectorInRad)&&(Me.prepFn=E.noop,A(h.select(be),null)),p.init(Me)},U.isPtInside=function(le){if(this.isSmith)return!0;var V=this.sectorInRad,J=this.vangles,te=this.angularAxis.c2g(le.theta),Z=this.radialAxis,se=Z.c2l(le.r),Q=Z._rl,q=J?u.isPtInsidePolygon:E.isPtInsideSector;return q(se,te,Q,V,J)},U.pathArc=function(le){var V=this.sectorInRad,J=this.vangles,te=J?u.pathPolygon:E.pathArc;return te(le,V[0],V[1],J)},U.pathSector=function(le){var V=this.sectorInRad,J=this.vangles,te=J?u.pathPolygon:E.pathSector;return te(le,V[0],V[1],J)},U.pathAnnulus=function(le,V){var J=this.sectorInRad,te=this.vangles,Z=te?u.pathPolygonAnnulus:E.pathAnnulus;return Z(le,V,J[0],J[1],te)},U.pathSubplot=function(){var le=this.innerRadius,V=this.radius;return le?this.pathAnnulus(le,V):this.pathSector(V)},U.fillViewInitialKey=function(le,V){le in this.viewInitial||(this.viewInitial[le]=V)};function X(le){var V=le.ticks+String(le.ticklen)+String(le.showticklabels);return"side"in le&&(V+=le.side),V}function ee(le){var V=le[0],J=le[1],te=J-V,Z=B(V,360),se=Z+te,Q=Math.cos(O(Z)),q=Math.sin(O(Z)),re=Math.cos(O(se)),ae=Math.sin(O(se)),fe,be,Me,Ie;return Z<=90&&se>=90||Z>90&&se>=450?Ie=1:q<=0&&ae<=0?Ie=0:Ie=Math.max(q,ae),Z<=180&&se>=180||Z>180&&se>=540?fe=-1:Q>=0&&re>=0?fe=0:fe=Math.min(Q,re),Z<=270&&se>=270||Z>270&&se>=630?be=-1:q>=0&&ae>=0?be=0:be=Math.min(q,ae),se>=360?Me=1:Q<=0&&re<=0?Me=0:Me=Math.max(Q,re),[fe,be,Me,Ie]}function ue(le,V){var J=function(Z){return E.angleDist(le,Z)},te=E.findIndexOfMin(V,J);return V[te]}function oe(le,V,J){return V?(le.attr("display",null),le.attr(J)):le&&le.attr("display","none"),le}}}),x5=He({"src/plots/polar/layout_attributes.js"(Y,G){var h=Mf(),b=oh(),S=ic().attributes,E=ea().extendFlat,e=Zu().overrideAll,t=e({color:b.color,showline:E({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:E({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),r=e({tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,labelalias:b.labelalias,minorloglabels:b.minorloglabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,layer:b.layer},"plot","from-root"),o={visible:E({},b.visible,{dflt:!0}),type:E({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},autorange:E({},b.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:E({},b.minallowed,{editType:"plot"}),maxallowed:E({},b.maxallowed,{editType:"plot"}),range:E({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:b.categoryorder,categoryarray:b.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:b.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:E({},b.title.text,{editType:"plot",dflt:""}),font:E({},b.title.font,{editType:"plot"}),editType:"plot"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(o,t,r);var a={visible:E({},b.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:b.autotypenumbers,categoryorder:b.categoryorder,categoryarray:b.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(a,t,r),G.exports={domain:S({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:h.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),TR=He({"src/plots/polar/layout_defaults.js"(Y,G){var h=ea(),b=Di(),S=xl(),E=tp(),e=ih().getSubplotData,t=Rp(),r=V0(),o=Yd(),a=Kd(),i=_1(),n=cm(),s=Sb(),f=G0(),c=x5(),p=m5(),d=bx(),T=d.axisNames;function l(x,A,M,_){var w=M("bgcolor");_.bgColor=b.combine(w,_.paper_bgcolor);var g=M("sector");M("hole");var u=e(_.fullData,d.name,_.id),v=_.layoutOut,y;function R(be,Me){return M(y+"."+be,Me)}for(var L=0;L<T.length;L++){y=T[L],h.isPlainObject(x[y])||(x[y]={});var z=x[y],F=S.newContainer(A,y);F._id=F._name=y,F._attr=_.id+"."+y,F._traceIndices=u.map(function(be){return be.index});var B=d.axisName2dataArray[y],O=m(z,F,R,u,B,_);i(z,F,R,{axData:u,dataAttr:B});var I=R("visible");switch(p(F,A,v),R("uirevision",A.uirevision),F._m=1,y){case"radialaxis":R("minallowed"),R("maxallowed");var N=R("range"),U=F.getAutorangeDflt(N),X=R("autorange",U),ee;N&&(N[0]===null&&N[1]===null||(N[0]===null||N[1]===null)&&(X==="reversed"||X===!0)||N[0]!==null&&(X==="min"||X==="max reversed")||N[1]!==null&&(X==="max"||X==="min reversed"))&&(N=void 0,delete F.range,F.autorange=!0,ee=!0),ee||(U=F.getAutorangeDflt(N),X=R("autorange",U)),z.autorange=X,X&&(s(R,X,N),(O==="linear"||O==="-")&&R("rangemode"),F.isReversed()&&(F._m=-1)),F.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(O==="date"){h.log("Polar plots do not support date angular axes yet.");for(var ue=0;ue<u.length;ue++)u[ue].visible=!1;O=z.type=F.type="linear"}R(O==="linear"?"thetaunit":"period");var oe=R("direction");R("rotation",{counterclockwise:0,clockwise:90}[oe]);break}if(a(z,F,R,F.type,{tickSuffixDflt:F.thetaunit==="degrees"?"°":void 0}),I){var le,V,J,te,Z,se,Q,q,re,ae,fe=_.font||{};le=R("color"),V=le===z.color?le:fe.color,J=fe.size,te=fe.family,Z=fe.weight,se=fe.style,Q=fe.variant,q=fe.textcase,re=fe.lineposition,ae=fe.shadow,t(z,F,R,F.type),o(z,F,R,F.type,{font:{weight:Z,style:se,variant:Q,textcase:q,lineposition:re,shadow:ae,color:V,size:J,family:te},noAutotickangles:y==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),r(z,F,R,{outerTicks:!0}),n(z,F,R,{dfltColor:le,bgColor:_.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:c[y]}),R("layer"),y==="radialaxis"&&(R("side"),R("angle",g[0]),R("title.text"),h.coerceFont(R,"title.font",{weight:Z,style:se,variant:Q,textcase:q,lineposition:re,shadow:ae,color:V,size:h.bigFont(J),family:te}))}O!=="category"&&R("hoverformat"),F._input=z}A.angularaxis.type==="category"&&M("gridshape")}function m(x,A,M,_,w,g){var u=M("autotypenumbers",g.autotypenumbersDflt),v=M("type");if(v==="-"){for(var y,R=0;R<_.length;R++)if(_[R].visible){y=_[R];break}y&&y[w]&&(A.type=f(y[w],"gregorian",{noMultiCategory:!0,autotypenumbers:u})),A.type==="-"?A.type="linear":x.type=A.type}return A.type}G.exports=function(A,M,_){E(A,M,_,{type:d.name,attributes:c,handleDefaults:l,font:M.font,autotypenumbersDflt:M.autotypenumbers,paper_bgcolor:M.paper_bgcolor,fullData:_,layoutOut:M})}}}),Tx=He({"src/plots/polar/index.js"(Y,G){var h=ih().getSubplotCalcData,b=ea().counterRegex,S=_5(),E=bx(),e=E.attr,t=E.name,r=b(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(n){for(var s=n._fullLayout,f=n.calcdata,c=s._subplots[t],p=0;p<c.length;p++){var d=c[p],T=h(f,t,d),l=s[d]._subplot;l||(l=S(n,d),s[d]._subplot=l),l.plot(T,s,n._promises)}}function i(n,s,f,c){for(var p=c._subplots[t]||[],d=c._has&&c._has("gl"),T=s._has&&s._has("gl"),l=d&&!T,m=0;m<p.length;m++){var x=p[m],A=c[x]._subplot;if(!s[x]&&A){A.framework.remove(),A.layers["radial-axis-title"].remove();for(var M in A.clipPaths)A.clipPaths[M].remove()}l&&A._scene&&(A._scene.destroy(),A._scene=null)}}G.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:x5(),supplyLayoutDefaults:TR(),plot:a,clean:i,toSVG:mf().toSVG}}}),ny=He({"src/traces/scatterpolar/attributes.js"(Y,G){var{hovertemplateAttrs:h,texttemplateAttrs:b,templatefallbackAttrs:S}=Ll(),E=Po().extendFlat,e=Mv(),t=Cc(),r=Nl(),o=t.line;G.exports={mode:t.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:t.text,texttemplate:b({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:E({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,marker:t.marker,cliponaxis:E({},t.cliponaxis,{dflt:!1}),textposition:t.textposition,textfont:t.textfont,fill:E({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:e(),hoverinfo:E({},r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:t.hoveron,hovertemplate:h(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),Ax=He({"src/traces/scatterpolar/defaults.js"(Y,G){var h=ea(),b=mu(),S=av(),E=cv(),e=X0(),t=fv(),r=kv(),o=Xv().PTS_LINESONLY,a=ny();function i(s,f,c,p){function d(m,x){return h.coerce(s,f,a,m,x)}var T=n(s,f,p,d);if(!T){f.visible=!1;return}d("thetaunit"),d("mode",T<o?"lines+markers":"lines"),d("text"),d("hovertext"),f.hoveron!=="fills"&&(d("hovertemplate"),d("hovertemplatefallback")),b.hasMarkers(f)&&S(s,f,c,p,d,{gradient:!0}),b.hasLines(f)&&(E(s,f,c,p,d,{backoff:!0}),e(s,f,d),d("connectgaps")),b.hasText(f)&&(d("texttemplate"),d("texttemplatefallback"),t(s,f,p,d));var l=[];(b.hasMarkers(f)||b.hasText(f))&&(d("cliponaxis"),d("marker.maxdisplayed"),l.push("points")),d("fill"),f.fill!=="none"&&(r(s,f,c,d),b.hasLines(f)||e(s,f,d)),(f.fill==="tonext"||f.fill==="toself")&&l.push("fills"),d("hoveron",l.join("+")||"points"),h.coerceSelectionMarkerOpacity(f,d)}function n(s,f,c,p){var d=p("r"),T=p("theta");h.isTypedArray(d)&&(f.r=d=Array.from(d)),h.isTypedArray(T)&&(f.theta=T=Array.from(T));var l;if(d)T?l=Math.min(d.length,T.length):(l=d.length,p("theta0"),p("dtheta"));else{if(!T)return 0;l=f.theta.length,p("r0"),p("dr")}return f._length=l,l}G.exports={handleRThetaDefaults:n,supplyDefaults:i}}}),Sx=He({"src/traces/scatterpolar/format_labels.js"(Y,G){var h=ea(),b=Ao();G.exports=function(E,e,t){var r={},o=t[e.subplot]._subplot,a,i;o?(a=o.radialAxis,i=o.angularAxis):(o=t[e.subplot],a=o.radialaxis,i=o.angularaxis);var n=a.c2l(E.r);r.rLabel=b.tickText(a,n,!0).text;var s=i.thetaunit==="degrees"?h.rad2deg(E.theta):E.theta;return r.thetaLabel=b.tickText(i,s,!0).text,r}}}),AR=He({"src/traces/scatterpolar/calc.js"(Y,G){var h=Ui(),b=Qo().BADNUM,S=Ao(),E=hv(),e=Zv(),t=vv(),r=dv().calcMarkerSize;G.exports=function(a,i){for(var n=a._fullLayout,s=i.subplot,f=n[s].radialaxis,c=n[s].angularaxis,p=f.makeCalcdata(i,"r"),d=c.makeCalcdata(i,"theta"),T=i._length,l=new Array(T),m=0;m<T;m++){var x=p[m],A=d[m],M=l[m]={};h(x)&&h(A)?(M.r=x,M.theta=A):M.r=b}var _=r(i,T);return i._extremes.x=S.findExtremes(f,p,{ppad:_}),E(a,i),e(l,i),t(l,i),l}}}),SR=He({"src/traces/scatterpolar/plot.js"(Y,G){var h=Z0(),b=Qo().BADNUM;G.exports=function(E,e,t){for(var r=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,a=e.yaxis,i={xaxis:o,yaxis:a,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},n=e.radialAxis,s=e.angularAxis,f=0;f<t.length;f++)for(var c=t[f],p=0;p<c.length;p++){p===0&&(c[0].trace._xA=o,c[0].trace._yA=a);var d=c[p],T=d.r;if(T===b)d.x=d.y=b;else{var l=n.c2g(T),m=s.c2g(d.theta);d.x=l*Math.cos(m),d.y=l*Math.sin(m)}}h(E,i,t,r)}}}),Mx=He({"src/traces/scatterpolar/hover.js"(Y,G){var h=K0();function b(E,e,t,r){var o=h(E,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var i=E.subplot,n=a.cd[a.index],s=a.trace;if(i.isPtInside(n))return a.xLabelVal=void 0,a.yLabelVal=void 0,S(n,s,i,a),a.hovertemplate=s.hovertemplate,o}}function S(E,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="r",a._hovertitle="θ";var i={};i[e.subplot]={_subplot:t};var n=e._module.formatLabels(E,e,i);r.rLabel=n.rLabel,r.thetaLabel=n.thetaLabel;var s=E.hi||e.hoverinfo,f=[];function c(d,T){f.push(d._hovertitle+": "+T)}if(!e.hovertemplate){var p=s.split("+");p.indexOf("all")!==-1&&(p=["r","theta","text"]),p.indexOf("r")!==-1&&c(o,r.rLabel),p.indexOf("theta")!==-1&&c(a,r.thetaLabel),p.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("<br>")}}G.exports={hoverPoints:b,makeHoverPointText:S}}}),MR=He({"src/traces/scatterpolar/index.js"(Y,G){G.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:Tx(),categories:["polar","symbols","showLegend","scatter-like"],attributes:ny(),supplyDefaults:Ax().supplyDefaults,colorbar:xh(),formatLabels:Sx(),calc:AR(),plot:SR(),style:Gh().style,styleOnSelect:Gh().styleOnSelect,hoverPoints:Mx().hoverPoints,selectPoints:$0(),meta:{}}}}),ER=He({"lib/scatterpolar.js"(Y,G){G.exports=MR()}}),b5=He({"src/traces/scatterpolargl/attributes.js"(Y,G){var h=ny(),{cliponaxis:b,hoveron:S}=h,E=Kh(h,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:i,marker:n,textfont:s,textposition:f}=Ym();G.exports=Wc(fl({},E),{connectgaps:e,fill:a,fillcolor:i,line:{color:t,dash:r,editType:"calc",width:o},marker:n,textfont:s,textposition:f})}}),kR=He({"src/traces/scatterpolargl/defaults.js"(Y,G){var h=ea(),b=mu(),S=Ax().handleRThetaDefaults,E=av(),e=cv(),t=fv(),r=kv(),o=Xv().PTS_LINESONLY,a=b5();G.exports=function(n,s,f,c){function p(T,l){return h.coerce(n,s,a,T,l)}var d=S(n,s,c,p);if(!d){s.visible=!1;return}p("thetaunit"),p("mode",d<o?"lines+markers":"lines"),p("text"),p("hovertext"),s.hoveron!=="fills"&&(p("hovertemplate"),p("hovertemplatefallback")),b.hasMarkers(s)&&E(n,s,f,c,p,{noAngleRef:!0,noStandOff:!0}),b.hasLines(s)&&(e(n,s,f,c,p),p("connectgaps")),b.hasText(s)&&(p("texttemplate"),p("texttemplatefallback"),t(n,s,c,p,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),p("fill"),s.fill!=="none"&&r(n,s,f,p),h.coerceSelectionMarkerOpacity(s,p)}}}),CR=He({"src/traces/scatterpolargl/format_labels.js"(Y,G){var h=Sx();G.exports=function(S,E,e){var t=S.i;return"r"in S||(S.r=E._r[t]),"theta"in S||(S.theta=E._theta[t]),h(S,E,e)}}}),LR=He({"src/traces/scatterpolargl/calc.js"(Y,G){var h=hv(),b=dv().calcMarkerSize,S=a0(),E=Ao(),e=vp().TOO_MANY_POINTS;G.exports=function(r,o){var a=r._fullLayout,i=o.subplot,n=a[i].radialaxis,s=a[i].angularaxis,f=o._r=n.makeCalcdata(o,"r"),c=o._theta=s.makeCalcdata(o,"theta"),p=o._length,d={};p<f.length&&(f=f.slice(0,p)),p<c.length&&(c=c.slice(0,p)),d.r=f,d.theta=c,h(r,o);var T=d.opts=S.style(r,o),l;return p<e?l=b(o,p):T.marker&&(l=2*(T.marker.sizeAvg||Math.max(T.marker.size,3))),o._extremes.x=E.findExtremes(n,f,{ppad:l}),[{x:!1,y:!1,t:d,trace:o}]}}}),PR=He({"src/traces/scatterpolargl/hover.js"(Y,G){var h=ex(),b=Mx().makeHoverPointText;function S(E,e,t,r){var o=E.cd,a=o[0].t,i=a.r,n=a.theta,s=h.hoverPoints(E,e,t,r);if(!(!s||s[0].index===!1)){var f=s[0];if(f.index===void 0)return s;var c=E.subplot,p=f.cd[f.index],d=f.trace;if(p.r=i[f.index],p.theta=n[f.index],!!c.isPtInside(p))return f.xLabelVal=void 0,f.yLabelVal=void 0,b(p,d,c,f),s}}G.exports={hoverPoints:S}}}),IR=He({"src/traces/scatterpolargl/base_index.js"(Y,G){G.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:Tx(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:b5(),supplyDefaults:kR(),colorbar:xh(),formatLabels:CR(),calc:LR(),hoverPoints:PR().hoverPoints,selectPoints:rT(),meta:{}}}}),RR=He({"src/traces/scatterpolargl/plot.js"(Y,G){var h=rx(),b=Ui(),S=MT(),E=eT(),e=a0(),t=ea(),r=vp().TOO_MANY_POINTS,o={};G.exports=function(i,n,s){if(s.length){var f=n.radialAxis,c=n.angularAxis,p=E(i,n);return s.forEach(function(d){if(!(!d||!d[0]||!d[0].trace)){var T=d[0],l=T.trace,m=T.t,x=l._length,A=m.r,M=m.theta,_=m.opts,w,g=A.slice(),u=M.slice();for(w=0;w<A.length;w++)n.isPtInside({r:A[w],theta:M[w]})||(g[w]=NaN,u[w]=NaN);var v=new Array(x*2),y=Array(x),R=Array(x);for(w=0;w<x;w++){var L=g[w],z,F;if(b(L)){var B=f.c2g(L),O=c.c2g(u[w],l.thetaunit);z=B*Math.cos(O),F=B*Math.sin(O)}else z=F=NaN;y[w]=v[w*2]=z,R[w]=v[w*2+1]=F}m.tree=h(v),_.marker&&x>=r&&(_.marker.cluster=m.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=v),_.line&&v.length>1&&t.extendFlat(_.line,e.linePositions(i,l,v)),_.text&&(t.extendFlat(_.text,{positions:v},e.textPosition(i,l,_.text,_.marker)),t.extendFlat(_.textSel,{positions:v},e.textPosition(i,l,_.text,_.markerSel)),t.extendFlat(_.textUnsel,{positions:v},e.textPosition(i,l,_.text,_.markerUnsel))),_.fill&&!p.fill2d&&(p.fill2d=!0),_.marker&&!p.scatter2d&&(p.scatter2d=!0),_.line&&!p.line2d&&(p.line2d=!0),_.text&&!p.glText&&(p.glText=!0),p.lineOptions.push(_.line),p.fillOptions.push(_.fill),p.markerOptions.push(_.marker),p.markerSelectedOptions.push(_.markerSel),p.markerUnselectedOptions.push(_.markerUnsel),p.textOptions.push(_.text),p.textSelectedOptions.push(_.textSel),p.textUnselectedOptions.push(_.textUnsel),p.selectBatch.push([]),p.unselectBatch.push([]),m.x=y,m.y=R,m.rawx=y,m.rawy=R,m.r=A,m.theta=M,m.positions=v,m._scene=p,m.index=p.count,p.count++}}),S(i,n,s)}},G.exports.reglPrecompiled=o}}),DR=He({"src/traces/scatterpolargl/index.js"(Y,G){var h=IR();h.plot=RR(),G.exports=h}}),zR=He({"lib/scatterpolargl.js"(Y,G){G.exports=DR()}}),w5=He({"src/traces/barpolar/attributes.js"(Y,G){var{hovertemplateAttrs:h,templatefallbackAttrs:b}=Ll(),S=Po().extendFlat,E=ny(),e=Yv();G.exports={r:E.r,theta:E.theta,r0:E.r0,dr:E.dr,theta0:E.theta0,dtheta:E.dtheta,thetaunit:E.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:E.hoverinfo,hovertemplate:h(),hovertemplatefallback:b(),selected:e.selected,unselected:e.unselected};function t(){var r=S({},e.marker);return delete r.cornerradius,r}}}),T5=He({"src/traces/barpolar/layout_attributes.js"(Y,G){G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),FR=He({"src/traces/barpolar/defaults.js"(Y,G){var h=ea(),b=Ax().handleRThetaDefaults,S=k1(),E=w5();G.exports=function(t,r,o,a){function i(s,f){return h.coerce(t,r,E,s,f)}var n=b(t,r,a,i);if(!n){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),S(t,r,i,o,a),h.coerceSelectionMarkerOpacity(r,i)}}}),OR=He({"src/traces/barpolar/layout_defaults.js"(Y,G){var h=ea(),b=T5();G.exports=function(S,E,e){var t={},r;function o(n,s){return h.coerce(S[r]||{},E[r],b,n,s)}for(var a=0;a<e.length;a++){var i=e[a];i.type==="barpolar"&&i.visible===!0&&(r=i.subplot,t[r]||(o("barmode"),o("bargap"),t[r]=1))}}}}),A5=He({"src/traces/barpolar/calc.js"(Y,G){var h=Mh().hasColorscale,b=Eh(),S=ea().isArrayOrTypedArray,E=vm(),e=Bp().setGroupPositions,t=vv(),r=ji().traceIs,o=ea().extendFlat;function a(n,s){for(var f=n._fullLayout,c=s.subplot,p=f[c].radialaxis,d=f[c].angularaxis,T=p.makeCalcdata(s,"r"),l=d.makeCalcdata(s,"theta"),m=s._length,x=new Array(m),A=T,M=l,_=0;_<m;_++)x[_]={p:M[_],s:A[_]};function w(g){var u=s[g];u!==void 0&&(s["_"+g]=S(u)?d.makeCalcdata(s,g):d.d2c(u,s.thetaunit))}return d.type==="linear"&&(w("width"),w("offset")),h(s,"marker")&&b(n,s,{vals:s.marker.color,containerStr:"marker",cLetter:"c"}),h(s,"marker.line")&&b(n,s,{vals:s.marker.line.color,containerStr:"marker.line",cLetter:"c"}),E(x,s),t(x,s),x}function i(n,s,f){for(var c=n.calcdata,p=[],d=0;d<c.length;d++){var T=c[d],l=T[0].trace;l.visible===!0&&r(l,"bar")&&l.subplot===f&&p.push(T)}var m=o({},s.radialaxis,{_id:"x"}),x=s.angularaxis;e(n,x,m,p,{mode:s.barmode,norm:s.barnorm,gap:s.bargap,groupgap:s.bargroupgap})}G.exports={calc:a,crossTraceCalc:i}}}),BR=He({"src/traces/barpolar/plot.js"(Y,G){var h=_i(),b=Ui(),S=ea(),E=Io(),e=wx();G.exports=function(o,a,i){var n=o._context.staticPlot,s=a.xaxis,f=a.yaxis,c=a.radialAxis,p=a.angularAxis,d=t(a),T=a.layers.frontplot.select("g.barlayer");S.makeTraceGroups(T,i,"trace bars").each(function(){var l=h.select(this),m=S.ensureSingle(l,"g","points"),x=m.selectAll("g.point").data(S.identity);x.enter().append("g").style("vector-effect",n?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),x.exit().remove(),x.each(function(A){var M=h.select(this),_=A.rp0=c.c2p(A.s0),w=A.rp1=c.c2p(A.s1),g=A.thetag0=p.c2g(A.p0),u=A.thetag1=p.c2g(A.p1),v;if(!b(_)||!b(w)||!b(g)||!b(u)||_===w||g===u)v="M0,0Z";else{var y=c.c2g(A.s1),R=(g+u)/2;A.ct=[s.c2p(y*Math.cos(R)),f.c2p(y*Math.sin(R))],v=d(_,w,g,u)}S.ensureSingle(M,"path").attr("d",v)}),E.setClipUrl(l,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,o)})};function t(r){var o=r.cxx,a=r.cyy;return r.vangles?function(i,n,s,f){var c,p;S.angleDelta(s,f)>0?(c=s,p=f):(c=f,p=s);var d=e.findEnclosingVertexAngles(c,r.vangles)[0],T=e.findEnclosingVertexAngles(p,r.vangles)[1],l=[d,(c+p)/2,T];return e.pathPolygonAnnulus(i,n,c,p,l,o,a)}:function(i,n,s,f){return S.pathAnnulus(i,n,s,f,o,a)}}}}),NR=He({"src/traces/barpolar/hover.js"(Y,G){var h=kc(),b=ea(),S=J0().getTraceColor,E=b.fillText,e=Mx().makeHoverPointText,t=wx().isPtInsidePolygon;G.exports=function(o,a,i){var n=o.cd,s=n[0].trace,f=o.subplot,c=f.radialAxis,p=f.angularAxis,d=f.vangles,T=d?t:b.isPtInsideSector,l=o.maxHoverDistance,m=p._period||2*Math.PI,x=Math.abs(c.g2p(Math.sqrt(a*a+i*i))),A=Math.atan2(i,a);c.range[0]>c.range[1]&&(A+=Math.PI);var M=function(u){return T(x,A,[u.rp0,u.rp1],[u.thetag0,u.thetag1],d)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/m)-1+(u.rp1-x)/(u.rp1-u.rp0)-1:1/0};if(h.getClosest(n,M,o),o.index!==!1){var _=o.index,w=n[_];o.x0=o.x1=w.ct[0],o.y0=o.y1=w.ct[1];var g=b.extendFlat({},w,{r:w.s,theta:w.p});return E(w,s,o),e(g,s,f,o),o.hovertemplate=s.hovertemplate,o.color=S(s,w),o.xLabelVal=o.yLabelVal=void 0,w.s<0&&(o.idealAlign="left"),[o]}}}}),UR=He({"src/traces/barpolar/index.js"(Y,G){G.exports={moduleType:"trace",name:"barpolar",basePlotModule:Tx(),categories:["polar","bar","showLegend"],attributes:w5(),layoutAttributes:T5(),supplyDefaults:FR(),supplyLayoutDefaults:OR(),calc:A5().calc,crossTraceCalc:A5().crossTraceCalc,plot:BR(),colorbar:xh(),formatLabels:Sx(),style:pv().style,styleOnSelect:pv().styleOnSelect,hoverPoints:NR(),selectPoints:Q0(),meta:{}}}}),jR=He({"lib/barpolar.js"(Y,G){G.exports=UR()}}),S5=He({"src/plots/smith/constants.js"(Y,G){G.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),M5=He({"src/plots/smith/layout_attributes.js"(Y,G){var h=Mf(),b=oh(),S=ic().attributes,E=ea().extendFlat,e=Zu().overrideAll,t=e({color:b.color,showline:E({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:E({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),r=e({ticklen:b.ticklen,tickwidth:E({},b.tickwidth,{dflt:2}),tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,tickfont:b.tickfont,tickformat:b.tickformat,hoverformat:b.hoverformat,layer:b.layer},"plot","from-root"),o=E({visible:E({},b.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:E({},b.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},t,r),a=E({visible:E({},b.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:b.ticks,editType:"calc"},t,r);G.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:h.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),VR=He({"src/plots/smith/layout_defaults.js"(Y,G){var h=ea(),b=Di(),S=xl(),E=tp(),e=ih().getSubplotData,t=Kd(),r=Yd(),o=cm(),a=Wv(),i=M5(),n=S5(),s=n.axisNames,f=p(function(d){return h.isTypedArray(d)&&(d=Array.from(d)),d.slice().reverse().map(function(T){return-T}).concat([0]).concat(d)},String);function c(d,T,l,m){var x=l("bgcolor");m.bgColor=b.combine(x,m.paper_bgcolor);var A=e(m.fullData,n.name,m.id),M=m.layoutOut,_;function w(U,X){return l(_+"."+U,X)}for(var g=0;g<s.length;g++){_=s[g],h.isPlainObject(d[_])||(d[_]={});var u=d[_],v=S.newContainer(T,_);v._id=v._name=_,v._attr=m.id+"."+_,v._traceIndices=A.map(function(U){return U.index});var y=w("visible");if(v.type="linear",a(v,M),t(u,v,w,v.type),y){var R=_==="realaxis";if(R&&w("side"),R)w("tickvals");else{var L=f(T.realaxis.tickvals||i.realaxis.tickvals.dflt);w("tickvals",L)}h.isTypedArray(v.tickvals)&&(v.tickvals=Array.from(v.tickvals));var z,F,B,O,I=m.font||{};y&&(z=w("color"),F=z===u.color?z:I.color,B=I.size,O=I.family),r(u,v,w,v.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!R,noExp:!0,font:{color:F,size:B,family:O}}),h.coerce2(d,T,i,_+".ticklen"),h.coerce2(d,T,i,_+".tickwidth"),h.coerce2(d,T,i,_+".tickcolor",T.color);var N=w("ticks");N||(delete T[_].ticklen,delete T[_].tickwidth,delete T[_].tickcolor),o(u,v,w,{dfltColor:z,bgColor:m.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i[_]}),w("layer")}w("hoverformat"),delete v.type,v._input=u}}G.exports=function(T,l,m){E(T,l,m,{noUirevision:!0,type:n.name,attributes:i,handleDefaults:c,font:l.font,paper_bgcolor:l.paper_bgcolor,fullData:m,layoutOut:l})};function p(d,T){var l={};return function(m){var x=T?T(m):m;if(x in l)return l[x];var A=d(m);return l[x]=A,A}}}}),qR=He({"src/plots/smith/index.js"(Y,G){var h=ih().getSubplotCalcData,b=ea().counterRegex,S=_5(),E=S5(),e=E.attr,t=E.name,r=b(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(n){for(var s=n._fullLayout,f=n.calcdata,c=s._subplots[t],p=0;p<c.length;p++){var d=c[p],T=h(f,t,d),l=s[d]._subplot;l||(l=S(n,d,!0),s[d]._subplot=l),l.plot(T,s,n._promises)}}function i(n,s,f,c){for(var p=c._subplots[t]||[],d=0;d<p.length;d++){var T=p[d],l=c[T]._subplot;if(!s[T]&&l){l.framework.remove();for(var m in l.clipPaths)l.clipPaths[m].remove()}}}G.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:M5(),supplyLayoutDefaults:VR(),plot:a,clean:i,toSVG:mf().toSVG}}}),E5=He({"src/traces/scattersmith/attributes.js"(Y,G){var{hovertemplateAttrs:h,texttemplateAttrs:b,templatefallbackAttrs:S}=Ll(),E=Po().extendFlat,e=Mv(),t=Cc(),r=Nl(),o=t.line;G.exports={mode:t.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:t.text,texttemplate:b({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:E({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,marker:t.marker,cliponaxis:E({},t.cliponaxis,{dflt:!1}),textposition:t.textposition,textfont:t.textfont,fill:E({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:e(),hoverinfo:E({},r.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:t.hoveron,hovertemplate:h(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),GR=He({"src/traces/scattersmith/defaults.js"(Y,G){var h=ea(),b=mu(),S=av(),E=cv(),e=X0(),t=fv(),r=kv(),o=Xv().PTS_LINESONLY,a=E5();G.exports=function(s,f,c,p){function d(m,x){return h.coerce(s,f,a,m,x)}var T=i(s,f,p,d);if(!T){f.visible=!1;return}d("mode",T<o?"lines+markers":"lines"),d("text"),d("hovertext"),f.hoveron!=="fills"&&(d("hovertemplate"),d("hovertemplatefallback")),b.hasMarkers(f)&&S(s,f,c,p,d,{gradient:!0}),b.hasLines(f)&&(E(s,f,c,p,d,{backoff:!0}),e(s,f,d),d("connectgaps")),b.hasText(f)&&(d("texttemplate"),d("texttemplatefallback"),t(s,f,p,d));var l=[];(b.hasMarkers(f)||b.hasText(f))&&(d("cliponaxis"),d("marker.maxdisplayed"),l.push("points")),d("fill"),f.fill!=="none"&&(r(s,f,c,d),b.hasLines(f)||e(s,f,d)),(f.fill==="tonext"||f.fill==="toself")&&l.push("fills"),d("hoveron",l.join("+")||"points"),h.coerceSelectionMarkerOpacity(f,d)};function i(n,s,f,c){var p=c("real"),d=c("imag"),T;return p&&d&&(T=Math.min(p.length,d.length)),h.isTypedArray(p)&&(s.real=p=Array.from(p)),h.isTypedArray(d)&&(s.imag=d=Array.from(d)),s._length=T,T}}}),HR=He({"src/traces/scattersmith/format_labels.js"(Y,G){var h=Ao();G.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot;return t.realLabel=h.tickText(r.radialAxis,S.real,!0).text,t.imagLabel=h.tickText(r.angularAxis,S.imag,!0).text,t}}}),WR=He({"src/traces/scattersmith/calc.js"(Y,G){var h=Ui(),b=Qo().BADNUM,S=hv(),E=Zv(),e=vv(),t=dv().calcMarkerSize;G.exports=function(o,a){for(var i=o._fullLayout,n=a.subplot,s=i[n].realaxis,f=i[n].imaginaryaxis,c=s.makeCalcdata(a,"real"),p=f.makeCalcdata(a,"imag"),d=a._length,T=new Array(d),l=0;l<d;l++){var m=c[l],x=p[l],A=T[l]={};h(m)&&h(x)?(A.real=m,A.imag=x):A.real=b}return t(a,d),S(o,a),E(T,a),e(T,a),T}}}),XR=He({"src/traces/scattersmith/plot.js"(Y,G){var h=Z0(),b=Qo().BADNUM,S=y5(),E=S.smith;G.exports=function(t,r,o){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,n=r.yaxis,s={xaxis:i,yaxis:n,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},f=0;f<o.length;f++)for(var c=o[f],p=0;p<c.length;p++){p===0&&(c[0].trace._xA=i,c[0].trace._yA=n);var d=c[p],T=d.real;if(T===b)d.x=d.y=b;else{var l=E([T,d.imag]);d.x=l[0],d.y=l[1]}}h(t,s,o,a)}}}),ZR=He({"src/traces/scattersmith/hover.js"(Y,G){var h=K0();function b(E,e,t,r){var o=h(E,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var i=E.subplot,n=a.cd[a.index],s=a.trace;if(i.isPtInside(n))return a.xLabelVal=void 0,a.yLabelVal=void 0,S(n,s,i,a),a.hovertemplate=s.hovertemplate,o}}function S(E,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="real",a._hovertitle="imag";var i={};i[e.subplot]={_subplot:t};var n=e._module.formatLabels(E,e,i);r.realLabel=n.realLabel,r.imagLabel=n.imagLabel;var s=E.hi||e.hoverinfo,f=[];function c(d,T){f.push(d._hovertitle+": "+T)}if(!e.hovertemplate){var p=s.split("+");p.indexOf("all")!==-1&&(p=["real","imag","text"]),p.indexOf("real")!==-1&&c(o,r.realLabel),p.indexOf("imag")!==-1&&c(a,r.imagLabel),p.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("<br>")}}G.exports={hoverPoints:b,makeHoverPointText:S}}}),YR=He({"src/traces/scattersmith/index.js"(Y,G){G.exports={moduleType:"trace",name:"scattersmith",basePlotModule:qR(),categories:["smith","symbols","showLegend","scatter-like"],attributes:E5(),supplyDefaults:GR(),colorbar:xh(),formatLabels:HR(),calc:WR(),plot:XR(),style:Gh().style,styleOnSelect:Gh().styleOnSelect,hoverPoints:ZR().hoverPoints,selectPoints:$0(),meta:{}}}}),KR=He({"lib/scattersmith.js"(Y,G){G.exports=YR()}}),Lh=He({"node_modules/world-calendars/dist/main.js"(Y,G){var h=Ef();function b(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}h(b.prototype,{instance:function(o,a){o=(o||"gregorian").toLowerCase(),a=a||"";var i=this._localCals[o+"-"+a];if(!i&&this.calendars[o]&&(i=new this.calendars[o](a),this._localCals[o+"-"+a]=i),!i)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return i},newDate:function(o,a,i,n,s){return n=(o!=null&&o.year?o.calendar():typeof n=="string"?this.instance(n,s):n)||this.instance(),n.newDate(o,a,i)},substituteDigits:function(o){return function(a){return(a+"").replace(/[0-9]/g,function(i){return o[i]})}},substituteChineseDigits:function(o,a){return function(i){for(var n="",s=0;i>0;){var f=i%10;n=(f===0?"":o[f]+a[s])+n,s++,i=Math.floor(i/10)}return n.indexOf(o[1]+a[1])===0&&(n=n.substr(1)),n||o[0]}}});function S(o,a,i,n){if(this._calendar=o,this._year=a,this._month=i,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function E(o,a){return o=""+o,"000000".substring(0,a-o.length)+o}h(S.prototype,{newDate:function(o,a,i){return this._calendar.newDate(o??this,a,i)},year:function(o){return arguments.length===0?this._year:this.set(o,"y")},month:function(o){return arguments.length===0?this._month:this.set(o,"m")},day:function(o){return arguments.length===0?this._day:this.set(o,"d")},date:function(o,a,i){if(!this._calendar.isValid(o,a,i))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=a,this._day=i,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(o,a){return this._calendar.add(this,o,a)},set:function(o,a){return this._calendar.set(this,o,a)},compareTo:function(o){if(this._calendar.name!==o._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,o._calendar.local.name);var a=this._year!==o._year?this._year-o._year:this._month!==o._month?this.monthOfYear()-o.monthOfYear():this._day-o._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(o){return this._calendar.fromJD(o)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(o){return this._calendar.fromJSDate(o)},toString:function(){return(this.year()<0?"-":"")+E(Math.abs(this.year()),4)+"-"+E(this.month(),2)+"-"+E(this.day(),2)}});function e(){this.shortYearCutoff="+10"}h(e.prototype,{_validateLevel:0,newDate:function(o,a,i){return o==null?this.today():(o.year&&(this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),i=o.day(),a=o.month(),o=o.year()),new S(this,o,a,i))},today:function(){return this.fromJSDate(new Date)},epoch:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return a.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+E(Math.abs(a.year()),4)},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(o,a){var i=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(i.month()+this.monthsInYear(i)-this.firstMonth)%this.monthsInYear(i)+this.minMonth},fromMonthOfYear:function(o,a){var i=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,i,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),i},daysInYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(o,a,i){return this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(o,a,i){return this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,a,i),a,i)},_add:function(o,a,i){if(this._validateLevel++,i==="d"||i==="w"){var n=o.toJD()+a*(i==="w"?this.daysInWeek():1),s=o.calendar().fromJD(n);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var f=o.year()+(i==="y"?a:0),c=o.monthOfYear()+(i==="m"?a:0),s=o.day(),p=function(l){for(;c<l.minMonth;)f--,c+=l.monthsInYear(f);for(var m=l.monthsInYear(f);c>m-1+l.minMonth;)f++,c-=m,m=l.monthsInYear(f)};i==="y"?(o.month()!==this.fromMonthOfYear(f,c)&&(c=this.newDate(f,o.month(),this.minDay).monthOfYear()),c=Math.min(c,this.monthsInYear(f)),s=Math.min(s,this.daysInMonth(f,this.fromMonthOfYear(f,c)))):i==="m"&&(p(this),s=Math.min(s,this.daysInMonth(f,this.fromMonthOfYear(f,c))));var d=[f,this.fromMonthOfYear(f,c),s];return this._validateLevel--,d}catch(T){throw this._validateLevel--,T}},_correctAdd:function(o,a,i,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(a[0]===0||o.year()>0!=a[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],f=i<0?-1:1;a=this._add(o,i*s[0]+f*s[1],s[2])}return o.date(a[0],a[1],a[2])},set:function(o,a,i){this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var n=i==="y"?a:o.year(),s=i==="m"?a:o.month(),f=i==="d"?a:o.day();return(i==="y"||i==="m")&&(f=Math.min(f,this.daysInMonth(n,s))),o.date(n,s,f)},isValid:function(o,a,i){this._validateLevel++;var n=this.hasYearZero||o!==0;if(n){var s=this.newDate(o,a,this.minDay);n=a>=this.minMonth&&a-this.minMonth<this.monthsInYear(s)&&i>=this.minDay&&i-this.minDay<this.daysInMonth(s)}return this._validateLevel--,n},toJSDate:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return r.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(o){return this.fromJD(r.instance().fromJSDate(o).toJD())},_validate:function(o,a,i,n){if(o.year){if(this._validateLevel===0&&this.name!==o.calendar().name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,o.calendar().local.name);return o}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(o,a,i))throw n.replace(/\{0\}/,this.local.name);var s=this.newDate(o,a,i);return this._validateLevel--,s}catch(f){throw this._validateLevel--,f}}});function t(o){this.local=this.regionalOptions[o]||this.regionalOptions[""]}t.prototype=new e,h(t.prototype,{name:"Gregorian",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(i){var a=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),i=a.year()+(a.year()<0?1:0);return i%4===0&&(i%100!==0||i%400===0)},weekOfYear:function(o,a,i){var n=this.newDate(o,a,i);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(o,a){var i=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return this.daysPerMonth[i.month()-1]+(i.month()===2&&this.leapYear(i.year())?1:0)},weekDay:function(o,a,i){return(this.dayOfWeek(o,a,i)||7)<6},toJD:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);o=n.year(),a=n.month(),i=n.day(),o<0&&o++,a<3&&(a+=12,o--);var s=Math.floor(o/100),f=2-s+Math.floor(s/4);return Math.floor(365.25*(o+4716))+Math.floor(30.6001*(a+1))+i+f-1524.5},fromJD:function(o){var a=Math.floor(o+.5),i=Math.floor((a-186721625e-2)/36524.25);i=a+1+i-Math.floor(i/4);var n=i+1524,s=Math.floor((n-122.1)/365.25),f=Math.floor(365.25*s),c=Math.floor((n-f)/30.6001),p=n-f-Math.floor(c*30.6001),d=c-(c>13.5?13:1),T=s-(d>2.5?4716:4715);return T<=0&&T--,this.newDate(T,d,p)},toJSDate:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(n.year(),n.month()-1,n.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(o){return this.newDate(o.getFullYear(),o.getMonth()+1,o.getDate())}});var r=G.exports=new b;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),$R=He({"node_modules/world-calendars/dist/plus.js"(){var Y=Ef(),G=Lh();Y(G.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),G.local=G.regionalOptions[""],Y(G.cdate.prototype,{formatDate:function(h,b){return typeof h!="string"&&(b=h,h=""),this._calendar.formatDate(h||"",this,b)}}),Y(G.baseCalendar.prototype,{UNIX_EPOCH:G.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:G.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(h,b,S){if(typeof h!="string"&&(S=b,b=h,h=""),!b)return"";if(b.calendar()!==this)throw G.local.invalidFormat||G.regionalOptions[""].invalidFormat;h=h||this.local.dateFormat,S=S||{};var E=S.dayNamesShort||this.local.dayNamesShort,e=S.dayNames||this.local.dayNames,t=S.monthNumbers||this.local.monthNumbers,r=S.monthNamesShort||this.local.monthNamesShort,o=S.monthNames||this.local.monthNames;S.calculateWeek||this.local.calculateWeek;for(var a=function(x,A){for(var M=1;m+M<h.length&&h.charAt(m+M)===x;)M++;return m+=M-1,Math.floor(M/(A||1))>1},i=function(x,A,M,_){var w=""+A;if(a(x,_))for(;w.length<M;)w="0"+w;return w},n=function(x,A,M,_){return a(x)?_[A]:M[A]},s=this,f=function(x){return typeof t=="function"?t.call(s,x,a("m")):d(i("m",x.month(),2))},c=function(x,A){return A?typeof o=="function"?o.call(s,x):o[x.month()-s.minMonth]:typeof r=="function"?r.call(s,x):r[x.month()-s.minMonth]},p=this.local.digits,d=function(x){return S.localNumbers&&p?p(x):x},T="",l=!1,m=0;m<h.length;m++)if(l)h.charAt(m)==="'"&&!a("'")?l=!1:T+=h.charAt(m);else switch(h.charAt(m)){case"d":T+=d(i("d",b.day(),2));break;case"D":T+=n("D",b.dayOfWeek(),E,e);break;case"o":T+=i("o",b.dayOfYear(),3);break;case"w":T+=i("w",b.weekOfYear(),2);break;case"m":T+=f(b);break;case"M":T+=c(b,a("M"));break;case"y":T+=a("y",2)?b.year():(b.year()%100<10?"0":"")+b.year()%100;break;case"Y":a("Y",2),T+=b.formatYear();break;case"J":T+=b.toJD();break;case"@":T+=(b.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":T+=(b.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":a("'")?T+="'":l=!0;break;default:T+=h.charAt(m)}return T},parseDate:function(h,b,S){if(b==null)throw G.local.invalidArguments||G.regionalOptions[""].invalidArguments;if(b=typeof b=="object"?b.toString():b+"",b==="")return null;h=h||this.local.dateFormat,S=S||{};var E=S.shortYearCutoff||this.shortYearCutoff;E=typeof E!="string"?E:this.today().year()%100+parseInt(E,10);for(var e=S.dayNamesShort||this.local.dayNamesShort,t=S.dayNames||this.local.dayNames,r=S.parseMonth||this.local.parseMonth,o=S.monthNumbers||this.local.monthNumbers,a=S.monthNamesShort||this.local.monthNamesShort,i=S.monthNames||this.local.monthNames,n=-1,s=-1,f=-1,c=-1,p=-1,d=!1,T=!1,l=function(R,L){for(var z=1;u+z<h.length&&h.charAt(u+z)===R;)z++;return u+=z-1,Math.floor(z/(L||1))>1},m=function(R,L){var z=l(R,L),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],B=new RegExp("^-?\\d{1,"+F+"}"),O=b.substring(g).match(B);if(!O)throw(G.local.missingNumberAt||G.regionalOptions[""].missingNumberAt).replace(/\{0\}/,g);return g+=O[0].length,parseInt(O[0],10)},x=this,A=function(){if(typeof o=="function"){l("m");var R=o.call(x,b.substring(g));return g+=R.length,R}return m("m")},M=function(R,L,z,F){for(var B=l(R,F)?z:L,O=0;O<B.length;O++)if(b.substr(g,B[O].length).toLowerCase()===B[O].toLowerCase())return g+=B[O].length,O+x.minMonth;throw(G.local.unknownNameAt||G.regionalOptions[""].unknownNameAt).replace(/\{0\}/,g)},_=function(){if(typeof i=="function"){var R=l("M")?i.call(x,b.substring(g)):a.call(x,b.substring(g));return g+=R.length,R}return M("M",a,i)},w=function(){if(b.charAt(g)!==h.charAt(u))throw(G.local.unexpectedLiteralAt||G.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,g);g++},g=0,u=0;u<h.length;u++)if(T)h.charAt(u)==="'"&&!l("'")?T=!1:w();else switch(h.charAt(u)){case"d":c=m("d");break;case"D":M("D",e,t);break;case"o":p=m("o");break;case"w":m("w");break;case"m":f=A();break;case"M":f=_();break;case"y":var v=u;d=!l("y",2),u=v,s=m("y",2);break;case"Y":s=m("Y",2);break;case"J":n=m("J")+.5,b.charAt(g)==="."&&(g++,m("J"));break;case"@":n=m("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":n=m("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":g=b.length;break;case"'":l("'")?w():T=!0;break;default:w()}if(g<b.length)throw G.local.unexpectedText||G.regionalOptions[""].unexpectedText;if(s===-1?s=this.today().year():s<100&&d&&(s+=E===-1?1900:this.today().year()-this.today().year()%100-(s<=E?0:100)),typeof f=="string"&&(f=r.call(this,s,f)),p>-1){f=1,c=p;for(var y=this.daysInMonth(s,f);c>y;y=this.daysInMonth(s,f))f++,c-=y}return n>-1?this.fromJD(n):this.newDate(s,f,c)},determineDate:function(h,b,S,E,e){S&&typeof S!="object"&&(e=E,E=S,S=null),typeof E!="string"&&(e=E,E="");var t=this,r=function(o){try{return t.parseDate(E,o,e)}catch{}o=o.toLowerCase();for(var a=(o.match(/^c/)&&S?S.newDate():null)||t.today(),i=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,n=i.exec(o);n;)a.add(parseInt(n[1],10),n[2]||"d"),n=i.exec(o);return a};return b=b?b.newDate():null,h=h==null?b:typeof h=="string"?r(h):typeof h=="number"?isNaN(h)||h===1/0||h===-1/0?b:t.today().add(h,"d"):t.newDate(h),h}})}}),JR=He({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Y=Lh(),G=Ef(),h=Y.instance();function b(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}b.prototype=new Y.baseCalendar,G(b.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,s){if(typeof n=="string"){var f=n.match(E);return f?f[0]:""}var c=this._validateYear(n),p=n.month(),d=""+this.toChineseMonth(c,p);return s&&d.length<2&&(d="0"+d),this.isIntercalaryMonth(c,p)&&(d+="i"),d},monthNames:function(n){if(typeof n=="string"){var s=n.match(e);return s?s[0]:""}var f=this._validateYear(n),c=n.month(),p=this.toChineseMonth(f,c),d=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][p-1];return this.isIntercalaryMonth(f,c)&&(d="闰"+d),d},monthNamesShort:function(n){if(typeof n=="string"){var s=n.match(t);return s?s[0]:""}var f=this._validateYear(n),c=n.month(),p=this.toChineseMonth(f,c),d=["一","二","三","四","五","六","七","八","九","十","十一","十二"][p-1];return this.isIntercalaryMonth(f,c)&&(d="闰"+d),d},parseMonth:function(n,s){n=this._validateYear(n);var f=parseInt(s),c;if(isNaN(f))s[0]==="闰"&&(c=!0,s=s.substring(1)),s[s.length-1]==="月"&&(s=s.substring(0,s.length-1)),f=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(s);else{var p=s[s.length-1];c=p==="i"||p==="I"}var d=this.toMonthIndex(n,f,c);return d},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(n,s){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw s.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,s,f){var c=this.intercalaryMonth(n),p=f&&s!==c;if(p||s<1||s>12)throw Y.local.invalidMonth.replace(/\{0\}/,this.local.name);var d;return c?!f&&s<=c?d=s-1:d=s:d=s-1,d},toChineseMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var f=this.intercalaryMonth(n),c=f?12:11;if(s<0||s>c)throw Y.local.invalidMonth.replace(/\{0\}/,this.local.name);var p;return f?s<f?p=s+1:p=s:p=s+1,p},intercalaryMonth:function(n){n=this._validateYear(n);var s=r[n-r[0]],f=s>>13;return f},isIntercalaryMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var f=this.intercalaryMonth(n);return!!f&&f===s},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,s,f){var c=this._validateYear(n,Y.local.invalidyear),p=o[c-o[0]],d=p>>9&4095,T=p>>5&15,l=p&31,m;m=h.newDate(d,T,l),m.add(4-(m.dayOfWeek()||7),"d");var x=this.toJD(n,s,f)-m.toJD();return 1+Math.floor(x/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,s){n.year&&(s=n.month(),n=n.year()),n=this._validateYear(n);var f=r[n-r[0]],c=f>>13,p=c?12:11;if(s>p)throw Y.local.invalidMonth.replace(/\{0\}/,this.local.name);var d=f&1<<12-s?30:29;return d},weekDay:function(n,s,f){return(this.dayOfWeek(n,s,f)||7)<6},toJD:function(n,s,f){var c=this._validate(n,d,f,Y.local.invalidDate);n=this._validateYear(c.year()),s=c.month(),f=c.day();var p=this.isIntercalaryMonth(n,s),d=this.toChineseMonth(n,s),T=i(n,d,f,p);return h.toJD(T.year,T.month,T.day)},fromJD:function(n){var s=h.fromJD(n),f=a(s.year(),s.month(),s.day()),c=this.toMonthIndex(f.year,f.month,f.isIntercalary);return this.newDate(f.year,c,f.day)},fromString:function(n){var s=n.match(S),f=this._validateYear(+s[1]),c=+s[2],p=!!s[3],d=this.toMonthIndex(f,c,p),T=+s[4];return this.newDate(f,d,T)},add:function(n,s,f){var c=n.year(),p=n.month(),d=this.isIntercalaryMonth(c,p),T=this.toChineseMonth(c,p),l=Object.getPrototypeOf(b.prototype).add.call(this,n,s,f);if(f==="y"){var m=l.year(),x=l.month(),A=this.isIntercalaryMonth(m,T),M=d&&A?this.toMonthIndex(m,T,!0):this.toMonthIndex(m,T,!1);M!==x&&l.month(M)}return l}});var S=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,E=/^\d?\d[iI]?/m,e=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;Y.calendars.chinese=b;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],o=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function a(n,s,f,c){var p,d;if(typeof n=="object")p=n,d=s||{};else{var T=typeof n=="number"&&n>=1888&&n<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var l=typeof s=="number"&&s>=1&&s<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var m=typeof f=="number"&&f>=1&&f<=31;if(!m)throw new Error("Solar day outside range 1 - 31");p={year:n,month:s,day:f},d={}}var x=o[p.year-o[0]],A=p.year<<9|p.month<<5|p.day;d.year=A>=x?p.year:p.year-1,x=o[d.year-o[0]];var M=x>>9&4095,_=x>>5&15,w=x&31,g,u=new Date(M,_-1,w),v=new Date(p.year,p.month-1,p.day);g=Math.round((v-u)/(24*3600*1e3));var y=r[d.year-r[0]],R;for(R=0;R<13;R++){var L=y&1<<12-R?30:29;if(g<L)break;g-=L}var z=y>>13;return!z||R<z?(d.isIntercalary=!1,d.month=1+R):R===z?(d.isIntercalary=!0,d.month=R):(d.isIntercalary=!1,d.month=R),d.day=1+g,d}function i(n,s,f,c,p){var d,T;if(typeof n=="object")T=n,d=s||{};else{var l=typeof n=="number"&&n>=1888&&n<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var m=typeof s=="number"&&s>=1&&s<=12;if(!m)throw new Error("Lunar month outside range 1 - 12");var x=typeof f=="number"&&f>=1&&f<=30;if(!x)throw new Error("Lunar day outside range 1 - 30");var A;typeof c=="object"?(A=!1,d=c):(A=!!c,d={}),T={year:n,month:s,day:f,isIntercalary:A}}var M;M=T.day-1;var _=r[T.year-r[0]],w=_>>13,g;w&&(T.month>w||T.isIntercalary)?g=T.month:g=T.month-1;for(var u=0;u<g;u++){var v=_&1<<12-u?30:29;M+=v}var y=o[T.year-o[0]],R=y>>9&4095,L=y>>5&15,z=y&31,F=new Date(R,L-1,z+M);return d.year=F.getFullYear(),d.month=1+F.getMonth(),d.day=F.getDate(),d}}}),QR=He({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,Y.local.invalidYear||Y.regionalOptions[""].invalidYear),13},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(b,S){var E=this._validate(b,S,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(b,S,E){return(this.dayOfWeek(b,S,E)||7)<6},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);return b=e.year(),b<0&&b++,e.day()+(e.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var S=Math.floor(b)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(b)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Y.calendars.coptic=h}}),eD=He({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(S){return this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear),!1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear),13},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear),400},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,E,e){var t=this.dayOfWeek(S,E,e);return t>=2&&t<=6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);return{century:b[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);return S=t.year()+(t.year()<0?1:0),E=t.month(),e=t.day(),e+(E>1?16:0)+(E>2?(E-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var E=Math.floor(S/400)+1;S-=(E-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(E<=0?E-1:E,e,t)}});var b={20:"Fruitbat",21:"Anchovy"};Y.calendars.discworld=h}}),tD=He({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,Y.local.invalidYear||Y.regionalOptions[""].invalidYear),13},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(b,S){var E=this._validate(b,S,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(b,S,E){return(this.dayOfWeek(b,S,E)||7)<6},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);return b=e.year(),b<0&&b++,e.day()+(e.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var S=Math.floor(b)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(b)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Y.calendars.ethiopian=h}}),rD=He({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear);return this._leapYear(E.year())},_leapYear:function(S){return S=S<0?S+1:S,b(S*7+1,19)<7},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear),this._leapYear(S.year?S.year():S)?13:12},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear);return S=E.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,E){return S.year&&(E=S.month(),S=S.year()),this._validate(S,E,this.minDay,Y.local.invalidMonth),E===12&&this.leapYear(S)||E===8&&b(this.daysInYear(S),10)===5?30:E===9&&b(this.daysInYear(S),10)===3?29:this.daysPerMonth[E-1]},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(E<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a<E;a++)o+=this.daysInMonth(S,a)}else for(var a=7;a<E;a++)o+=this.daysInMonth(S,a);return o},_delay1:function(S){var E=Math.floor((235*S-234)/19),e=12084+13753*E,t=E*29+Math.floor(e/25920);return b(3*(t+1),7)<3&&t++,t},_delay2:function(S){var E=this._delay1(S-1),e=this._delay1(S),t=this._delay1(S+1);return t-e===356?2:e-E===382?1:0},fromJD:function(S){S=Math.floor(S)+.5;for(var E=Math.floor((S-this.jdEpoch)*98496/35975351)-1;S>=this.toJD(E===-1?1:E+1,7,1);)E++;for(var e=S<this.toJD(E,1,1)?7:1;S>this.toJD(E,e,this.daysInMonth(E,e));)e++;var t=S-this.toJD(E,e,1)+1;return this.newDate(E,e,t)}});function b(S,E){return S-E*Math.floor(S/E)}Y.calendars.hebrew=h}}),aD=He({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(b){var S=this._validate(b,this.minMonth,this.minDay,Y.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(b){return this.leapYear(b)?355:354},daysInMonth:function(b,S){var E=this._validate(b,S,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===12&&this.leapYear(E.year())?1:0)},weekDay:function(b,S,E){return this.dayOfWeek(b,S,E)!==5},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);return b=e.year(),S=e.month(),E=e.day(),b=b<=0?b+1:b,E+Math.ceil(29.5*(S-1))+(b-1)*354+Math.floor((3+11*b)/30)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b)+.5;var S=Math.floor((30*(b-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var E=Math.min(12,Math.ceil((b-29-this.toJD(S,1,1))/29.5)+1),e=b-this.toJD(S,E,1)+1;return this.newDate(S,E,e)}}),Y.calendars.islamic=h}}),nD=He({"node_modules/world-calendars/dist/calendars/julian.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),E=S.year()<0?S.year()+1:S.year();return E%4===0},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(b,S){var E=this._validate(b,S,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===2&&this.leapYear(E.year())?1:0)},weekDay:function(b,S,E){return(this.dayOfWeek(b,S,E)||7)<6},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);return b=e.year(),S=e.month(),E=e.day(),b<0&&b++,S<=2&&(b--,S+=12),Math.floor(365.25*(b+4716))+Math.floor(30.6001*(S+1))+E-1524.5},fromJD:function(b){var S=Math.floor(b+.5),E=S+1524,e=Math.floor((E-122.1)/365.25),t=Math.floor(365.25*e),r=Math.floor((E-t)/30.6001),o=r-Math.floor(r<14?1:13),a=e-Math.floor(o>2?4716:4715),i=E-t-Math.floor(30.6001*r);return a<=0&&a--,this.newDate(a,o,i)}}),Y.calendars.julian=h}}),iD=He({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Y=Lh(),G=Ef();function h(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),!1},formatYear:function(E){var e=this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear);E=e.year();var t=Math.floor(E/400);E=E%400,E+=E<0?400:0;var r=Math.floor(E/20);return t+"."+r+"."+E%20},forYear:function(E){if(E=E.split("."),E.length<3)throw"Invalid Mayan year";for(var e=0,t=0;t<E.length;t++){var r=parseInt(E[t],10);if(Math.abs(r)>19||t>0&&r<0)throw"Invalid Mayan year";e=e*20+r}return e},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),18},weekOfYear:function(E,e,t){return this._validate(E,e,t,Y.local.invalidDate),0},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),360},daysInMonth:function(E,e){return this._validate(E,e,this.minDay,Y.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(E,e,t){var r=this._validate(E,e,t,Y.local.invalidDate);return r.day()},weekDay:function(E,e,t){return this._validate(E,e,t,Y.local.invalidDate),!0},extraInfo:function(E,e,t){var r=this._validate(E,e,t,Y.local.invalidDate),o=r.toJD(),a=this._toHaab(o),i=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[i[0]-1],tzolkinDay:i[0],tzolkinTrecena:i[1]}},_toHaab:function(E){E-=this.jdEpoch;var e=b(E+8+340,365);return[Math.floor(e/20)+1,b(e,20)]},_toTzolkin:function(E){return E-=this.jdEpoch,[S(E+20,20),S(E+4,13)]},toJD:function(E,e,t){var r=this._validate(E,e,t,Y.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(E){E=Math.floor(E)+.5-this.jdEpoch;var e=Math.floor(E/360);E=E%360,E+=E<0?360:0;var t=Math.floor(E/20),r=E%20;return this.newDate(e,t,r)}});function b(E,e){return E-e*Math.floor(E/e)}function S(E,e){return b(E-1,e)+1}Y.calendars.mayan=h}}),oD=He({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar;var b=Y.instance("gregorian");G(h.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear||Y.regionalOptions[""].invalidYear);return b.leapYear(E.year()+(E.year()<1?1:0)+1469)},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Y.local.invalidMonth),r=t.year();r<0&&r++;for(var o=t.day(),a=1;a<t.month();a++)o+=this.daysPerMonth[a-1];return o+b.toJD(r+1468,3,13)},fromJD:function(S){S=Math.floor(S+.5);for(var E=Math.floor((S-(this.jdEpoch-1))/366);S>=this.toJD(E+1,1,1);)E++;for(var e=S-Math.floor(this.toJD(E,1,1)+.5)+1,t=1;e>this.daysInMonth(E,t);)e-=this.daysInMonth(E,t),t++;return this.newDate(E,t,e)}}),Y.calendars.nanakshahi=h}}),sD=He({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(b){return this.daysInYear(b)!==this.daysPerYear},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(b){var S=this._validate(b,this.minMonth,this.minDay,Y.local.invalidYear);if(b=S.year(),typeof this.NEPALI_CALENDAR_DATA[b]>"u")return this.daysPerYear;for(var E=0,e=this.minMonth;e<=12;e++)E+=this.NEPALI_CALENDAR_DATA[b][e];return E},daysInMonth:function(b,S){return b.year&&(S=b.month(),b=b.year()),this._validate(b,S,this.minDay,Y.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[b]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[b][S]},weekDay:function(b,S,E){return this.dayOfWeek(b,S,E)!==6},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);b=e.year(),S=e.month(),E=e.day();var t=Y.instance(),r=0,o=S,a=b;this._createMissingCalendarData(b);var i=b-(o>9||o===9&&E>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=E,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===9?(r+=E-this.NEPALI_CALENDAR_DATA[a][0],r<0&&(r+=t.daysInYear(i))):r+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],t.newDate(i,1,1).add(r,"d").toJD()},fromJD:function(b){var S=Y.instance(),E=S.fromJD(b),e=E.year(),t=E.dayOfYear(),r=e+56;this._createMissingCalendarData(r);for(var o=9,a=this.NEPALI_CALENDAR_DATA[r][0],i=this.NEPALI_CALENDAR_DATA[r][o]-a+1;t>i;)o++,o>12&&(o=1,r++),i+=this.NEPALI_CALENDAR_DATA[r][o];var n=this.NEPALI_CALENDAR_DATA[r][o]-(i-t);return this.newDate(r,o,n)},_createMissingCalendarData:function(b){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var E=b-1;E<b+2;E++)typeof this.NEPALI_CALENDAR_DATA[E]>"u"&&(this.NEPALI_CALENDAR_DATA[E]=S)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),Y.calendars.nepali=h}}),lD=He({"node_modules/world-calendars/dist/calendars/persian.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function b(S){var E=S-475;S<0&&E++;var e=.242197,t=e*E,r=e*(E+1),o=t-Math.floor(t),a=r-Math.floor(r);return o>a}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear);return b(E.year())},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=0;if(S>0)for(var o=1;o<S;o++)b(o)&&r++;else if(S<0)for(var o=S;o<0;o++)b(o)&&r--;return e+(E<=7?(E-1)*31:(E-1)*30+6)+(S>0?S-1:S)*365+r+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var E=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(E);e<=0&&e--,S>this.toJD(e,12,b(e)?30:29)&&(e++,e===0&&e++);var t=S-this.toJD(e,1,1)+1,r=t<=186?Math.ceil(t/31):Math.ceil((t-6)/30),o=S-this.toJD(e,r,1)+1;return this.newDate(e,r,o)}}),Y.calendars.persian=h,Y.calendars.jalali=h}}),uD=He({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Y=Lh(),G=Ef(),h=Y.instance();function b(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}b.prototype=new Y.baseCalendar,G(b.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Y.local.invalidYear),e=this._t2gYear(E.year());return h.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Y.local.invalidYear),r=this._t2gYear(t.year());return h.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Y.local.invalidDate),r=this._t2gYear(t.year());return h.toJD(r,t.month(),t.day())},fromJD:function(S){var E=h.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)},_g2tYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)}}),Y.calendars.taiwan=b}}),cD=He({"node_modules/world-calendars/dist/calendars/thai.js"(){var Y=Lh(),G=Ef(),h=Y.instance();function b(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}b.prototype=new Y.baseCalendar,G(b.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Y.local.invalidYear),e=this._t2gYear(E.year());return h.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Y.local.invalidYear),r=this._t2gYear(t.year());return h.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Y.local.invalidDate),r=this._t2gYear(t.year());return h.toJD(r,t.month(),t.day())},fromJD:function(S){var E=h.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)},_g2tYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)}}),Y.calendars.thai=b}}),fD=He({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear);return this.daysInYear(E.year())===355},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var E=0,e=1;e<=12;e++)E+=this.daysInMonth(S,e);return E},daysInMonth:function(S,E){for(var e=this._validate(S,E,this.minDay,Y.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;o<b.length;o++){if(b[o]>t)return b[r]-b[r-1];r++}return 30},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+b[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var E=S-24e5+.5,e=0,t=0;t<b.length&&!(b[t]>E);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,i=r-12*o,n=E-b[e-1]+1;return this.newDate(a,i,n)},isValid:function(S,E,e){var t=Y.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(S=S.year!=null?S.year:S,t=S>=1276&&S<=1500),t},_validate:function(S,E,e,t){var r=Y.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw t.replace(/\{0\}/,this.local.name);return r}}),Y.calendars.ummalqura=h;var b=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),hD=He({"src/components/calendars/calendars.js"(Y,G){G.exports=Lh(),$R(),JR(),QR(),eD(),tD(),rD(),aD(),nD(),iD(),oD(),sD(),lD(),uD(),cD(),fD()}}),vD=He({"src/components/calendars/index.js"(Y,G){var h=hD(),b=ea(),S=Qo(),E=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:b.sortObjectKeys(h.calendars),editType:"calc",dflt:"gregorian"},r=function(_,w,g,u){var v={};return v[g]=t,b.coerce(_,w,v,g,u)},o=function(_,w,g,u){for(var v=0;v<g.length;v++)r(_,w,g[v]+"calendar",u.calendar)},a={chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},i={chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},n={chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},s="##",f={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:s,w:s,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function c(_,w,g){for(var u=Math.floor((w+.05)/e)+E,v=d(g).fromJD(u),y=0,R,L,z,F,B;(y=_.indexOf("%",y))!==-1;)R=_.charAt(y+1),R==="0"||R==="-"||R==="_"?(z=3,L=_.charAt(y+2),R==="_"&&(R="-")):(L=R,R="0",z=2),F=f[L],F?(F===s?B=s:B=v.formatDate(F[R]),_=_.slice(0,y)+B+_.slice(y+z),y+=B.length):y+=z;return _}var p={};function d(_){var w=p[_];return w||(w=p[_]=h.instance(_),w)}function T(_){return b.extendFlat({},t,{description:_})}function l(_){return"Sets the calendar system to use with `"+_+"` date data."}var m={xcalendar:T(l("x"))},x=b.extendFlat({},m,{ycalendar:T(l("y"))}),A=b.extendFlat({},x,{zcalendar:T(l("z"))}),M=T(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));G.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:x,bar:x,box:x,heatmap:x,contour:x,histogram:x,histogram2d:x,histogram2dcontour:x,scatter3d:A,surface:A,mesh3d:A,scattergl:x,ohlc:m,candlestick:m},layout:{calendar:T(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:M},yaxis:{calendar:M},scene:{xaxis:{calendar:M},yaxis:{calendar:M},zaxis:{calendar:M}},polar:{radialaxis:{calendar:M}}}},layoutAttributes:t,handleDefaults:r,handleTraceDefaults:o,CANONICAL_SUNDAY:i,CANONICAL_TICK:a,DFLTRANGE:n,getCal:d,worldCalFmt:c}}}),dD=He({"lib/calendars.js"(Y,G){G.exports=vD()}}),pD=He({"lib/index.js"(Y,G){var h=WM();h.register([KM(),QM(),aE(),lE(),hE(),gE(),_E(),LE(),NE(),KE(),o6(),Mk(),Ik(),yC(),EC(),zC(),VC(),iL(),uL(),fL(),pL(),xL(),SL(),CL(),GL(),XL(),L8(),H8(),nI(),cI(),xI(),AI(),II(),HI(),YI(),a4(),y4(),A4(),P4(),eR(),lR(),vR(),yR(),wR(),ER(),zR(),jR(),KR(),dD()]),G.exports=h}});return pD()})();return window.Plotly=Ms,Ms})})($y)),$y.exports}var Q5;function g7(){return Q5||(Q5=1,(function(en){Object.defineProperty(en,"__esModule",{value:!0}),en.default=void 0;var qi=Fo(v7()),Ms=Fo(p7());function Fo(Xu){return Xu&&Xu.__esModule?Xu:{default:Xu}}var zs=(0,qi.default)(Ms.default),rc=zs;en.default=rc})(lb)),lb}var m7=g7();const y7=e7(m7),_7=t7("div",{target:"eawp8q10"})({height:"100%"}),x7=r7.getLogger("PlotlyChart:CustomTheme");function b7(en,qi){const{genericFonts:Ms,colors:Fo,fontSizes:zs}=qi,rc={font:{color:yh(qi),family:Ms.bodyFont,size:Wf(zs.twoSm),weight:qi.fontWeights.normal},title:{color:Fo.headingColor,subtitleColor:Fo.bodyText,font:{family:Ms.headingFont,size:Wf(zs.md),color:Fo.headingColor},pad:{l:Wf(qi.spacing.twoXS)},xanchor:"left",x:0},legend:{title:{font:{size:Wf(zs.twoSm),color:yh(qi)},side:"top"},valign:"top",bordercolor:Fo.transparent,borderwidth:0,font:{size:Wf(zs.twoSm),color:aA(qi)}},paper_bgcolor:Fo.bgColor,plot_bgcolor:Fo.bgColor,yaxis:{ticklabelposition:"outside",zerolinecolor:qv(qi),title:{font:{color:yh(qi),size:Wf(zs.sm)},standoff:Wf(qi.spacing.twoXL)},tickcolor:qv(qi),tickfont:{color:yh(qi),size:Wf(zs.twoSm)},gridcolor:qv(qi),minor:{gridcolor:qv(qi)},automargin:!0},xaxis:{zerolinecolor:qv(qi),gridcolor:qv(qi),showgrid:!1,tickfont:{color:yh(qi),size:Wf(zs.twoSm)},tickcolor:qv(qi),title:{font:{color:yh(qi),size:Wf(zs.sm)},standoff:Wf(qi.spacing.xl)},minor:{gridcolor:qv(qi)},zeroline:!1,automargin:!0,rangeselector:{bgcolor:Fo.bgColor,bordercolor:qv(qi),borderwidth:1,x:0}},margin:{pad:Wf(qi.spacing.sm),r:0,l:0},hoverlabel:{bgcolor:Fo.bgColor,bordercolor:Fo.borderColor,font:{color:yh(qi),family:Ms.bodyFont,size:Wf(zs.twoSm)}},coloraxis:{colorbar:{thickness:16,xpad:Wf(qi.spacing.twoXL),ticklabelposition:"outside",outlinecolor:Fo.transparent,outlinewidth:8,len:.75,y:.5745,title:{font:{color:yh(qi),size:Wf(zs.sm)}},tickfont:{color:yh(qi),size:Wf(zs.twoSm)}}},ternary:{gridcolor:yh(qi),bgcolor:Fo.bgColor,title:{font:{family:Ms.bodyFont,size:Wf(zs.sm)}},color:yh(qi),aaxis:{gridcolor:yh(qi),linecolor:yh(qi),tickfont:{family:Ms.bodyFont,size:Wf(zs.twoSm)}},baxis:{linecolor:yh(qi),gridcolor:yh(qi),tickfont:{family:Ms.bodyFont,size:Wf(zs.twoSm)}},caxis:{linecolor:yh(qi),gridcolor:yh(qi),tickfont:{family:Ms.bodyFont,size:Wf(zs.twoSm)}}}};rA(en,rc)}function w7(en,qi,Ms){const Fo="#000001",zs="#000002",rc="#000003",Xu="#000004",Xf="#000005",wf="#000006",Hc="#000007",Tf="#000008",Af="#000009",ah="#000010";if(Ms==="streamlit"){const js=qi.colors.chartCategoricalColors;en=en.replaceAll(Fo,js[0]),en=en.replaceAll(zs,js[1]),en=en.replaceAll(rc,js[2]),en=en.replaceAll(Xu,js[3]),en=en.replaceAll(Xf,js[4]),en=en.replaceAll(wf,js[5]),en=en.replaceAll(Hc,js[6]),en=en.replaceAll(Tf,js[7]),en=en.replaceAll(Af,js[8]),en=en.replaceAll(ah,js[9])}else en=en.replaceAll(Fo,"#636efa"),en=en.replaceAll(zs,"#EF553B"),en=en.replaceAll(rc,"#00cc96"),en=en.replaceAll(Xu,"#ab63fa"),en=en.replaceAll(Xf,"#FFA15A"),en=en.replaceAll(wf,"#19d3f3"),en=en.replaceAll(Hc,"#FF6692"),en=en.replaceAll(Tf,"#B6E880"),en=en.replaceAll(Af,"#FF97FF"),en=en.replaceAll(ah,"#FECB52");return en}function T7(en,qi,Ms){const Fo="#000011",zs="#000012",rc="#000013",Xu="#000014",Xf="#000015",wf="#000016",Hc="#000017",Tf="#000018",Af="#000019",ah="#000020";if(Ms==="streamlit"){const js=qi.colors.chartSequentialColors;en=en.replaceAll(Fo,js[0]),en=en.replaceAll(zs,js[1]),en=en.replaceAll(rc,js[2]),en=en.replaceAll(Xu,js[3]),en=en.replaceAll(Xf,js[4]),en=en.replaceAll(wf,js[5]),en=en.replaceAll(Hc,js[6]),en=en.replaceAll(Tf,js[7]),en=en.replaceAll(Af,js[8]),en=en.replaceAll(ah,js[9])}else en=en.replaceAll(Fo,"#0d0887"),en=en.replaceAll(zs,"#46039f"),en=en.replaceAll(rc,"#7201a8"),en=en.replaceAll(Xu,"#9c179e"),en=en.replaceAll(Xf,"#bd3786"),en=en.replaceAll(wf,"#d8576b"),en=en.replaceAll(Hc,"#ed7953"),en=en.replaceAll(Tf,"#fb9f3a"),en=en.replaceAll(Af,"#fdca26"),en=en.replaceAll(ah,"#f0f921");return en}function A7(en,qi,Ms){const Fo="#000021",zs="#000022",rc="#000023",Xu="#000024",Xf="#000025",wf="#000026",Hc="#000027",Tf="#000028",Af="#000029",ah="#000030",js="#000031";if(Ms==="streamlit"){const fl=s7(qi);en=en.replaceAll(Fo,fl[0]),en=en.replaceAll(zs,fl[1]),en=en.replaceAll(rc,fl[2]),en=en.replaceAll(Xu,fl[3]),en=en.replaceAll(Xf,fl[4]),en=en.replaceAll(wf,fl[5]),en=en.replaceAll(Hc,fl[6]),en=en.replaceAll(Tf,fl[7]),en=en.replaceAll(Af,fl[8]),en=en.replaceAll(ah,fl[9]),en=en.replaceAll(js,fl[10])}else en=en.replaceAll(Fo,"#8e0152"),en=en.replaceAll(zs,"#c51b7d"),en=en.replaceAll(rc,"#de77ae"),en=en.replaceAll(Xu,"#f1b6da"),en=en.replaceAll(Xf,"#fde0ef"),en=en.replaceAll(wf,"#f7f7f7"),en=en.replaceAll(Hc,"#e6f5d0"),en=en.replaceAll(Tf,"#b8e186"),en=en.replaceAll(Af,"#7fbc41"),en=en.replaceAll(ah,"#4d9221"),en=en.replaceAll(js,"#276419");return en}function S7(en,qi){const Ms="#000032",Fo="#000033",zs="#000034",rc="#000035",Xu="#000036",Xf="#000037",wf="#000038",Hc="#000039",Tf="#000040";return en=en.replaceAll(Ms,n7(qi)),en=en.replaceAll(Fo,i7(qi)),en=en.replaceAll(zs,o7(qi)),en=en.replaceAll(rc,qv(qi)),en=en.replaceAll(Xu,yh(qi)),en=en.replaceAll(Xf,aA(qi)),en=en.replaceAll(wf,qi.colors.bgColor),en=en.replaceAll(Hc,qi.colors.fadedText05),en=en.replaceAll(Tf,qi.colors.bgMix),en}function M7(en,qi,Ms){return en=S7(en,qi),en=w7(en,qi,Ms),en=T7(en,qi,Ms),en=A7(en,qi,Ms),en}function E7(en,qi){try{b7(en.layout.template.layout,qi)}catch(Ms){const Fo=a7(Ms);x7.error(Fo)}"title"in en.layout&&(en.layout.title=rA(en.layout.title,{text:`<b>${en.layout.title.text}</b>`}))}function k7(en,qi){const{colors:Ms,genericFonts:Fo}=qi,zs={font:{color:Ms.bodyText,family:Fo.bodyFont},paper_bgcolor:Ms.bgColor,plot_bgcolor:Ms.secondaryBg};return{...en,font:{...zs.font,...en.font},paper_bgcolor:en.paper_bgcolor||zs.paper_bgcolor,plot_bgcolor:en.plot_bgcolor||zs.plot_bgcolor}}function C7(en){if(en==="")return{x:[],y:[]};const qi=en.replace("M","").replace("Z","").split("L"),Ms=[],Fo=[];return qi.forEach(zs=>{const[rc,Xu]=zs.split(",").map(Number);Ms.push(rc),Fo.push(Xu)}),{x:Ms,y:Fo}}function L7(en){if(!("x0"in en&&"x1"in en&&"y0"in en&&"y1"in en))return{x:[],y:[]};const Ms=[en.x0,en.x1],Fo=[en.y0,en.y1];return{x:Ms,y:Fo}}function eA(en,qi,Ms){const Fo=JSON.parse(M7(JSON.stringify(en),Ms,qi));return qi==="streamlit"?E7(Fo,Ms):Fo.layout=k7(Fo.layout,Ms),Fo}function P7(en,qi,Ms,Fo){if(!en)return;const zs={selection:{points:[],point_indices:[],box:[],lasso:[]}},rc=new Set,Xu=[],Xf=[],wf=[],{selections:Hc,points:Tf}=en;if(Tf&&Tf.forEach(function(js){wf.push({...js,legendgroup:js.data.legendgroup||void 0,data:void 0,fullData:void 0}),K5(js.pointIndex)&&rc.add(js.pointIndex),K5(js.pointIndices)&&js.pointIndices.length>0&&js.pointIndices.forEach(fl=>rc.add(fl))}),Hc&&Hc.forEach(js=>{if(js.type==="rect"){const fl=L7(js),Wc={xref:js.xref,yref:js.yref,x:fl.x,y:fl.y};Xu.push(Wc)}if(js.type==="path"){const fl=C7(js.path),Wc={xref:js.xref,yref:js.yref,x:fl.x,y:fl.y};Xf.push(Wc)}}),zs.selection.point_indices=Array.from(rc),zs.selection.points=wf.map(js=>l7(js)),zs.selection.box=Xu,zs.selection.lasso=Xf,zs.selection.box.length>0&&!Ms.selectionMode.includes(Kg.SelectionMode.BOX)||zs.selection.lasso.length>0&&!Ms.selectionMode.includes(Kg.SelectionMode.LASSO))return;const Af=qi.getStringValue(Ms),ah=JSON.stringify(zs);Af!==ah&&qi.setStringValue(Ms,ah,{fromUi:!0},Fo)}function I7(en,qi,Ms){const Fo={selection:{points:[],point_indices:[],box:[],lasso:[]}};en.setStringValue(qi,JSON.stringify(Fo),{fromUi:!0},Ms)}const R7=150,D7=50,tA=450,z7={width:600,height:470,name:"fullscreen-expand",path:"M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z"},F7={width:600,height:470,name:"fullscreen-collapse",path:"M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V64zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32H96v64c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32H32zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H352V64zM320 320c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32s32-14.3 32-32V384h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H320z"};function O7({element:en,widgetMgr:qi,disabled:Ms,fragmentId:Fo,disableFullscreenMode:zs}){const rc=u7(),{expanded:Xu,width:Xf,height:wf,expand:Hc,collapse:Tf}=nA(iA),{height:Af,elementRef:ah}=c7([],0),js=Xf||0,fl=Gv.useMemo(()=>en.spec?JSON.parse(en.spec):{layout:{},data:[],frames:void 0},[en.id,en.spec]),[Wc,Kh]=Gv.useState(()=>{const Jo=qi.getElementState(en.id,"figure");return Jo||eA(fl,en.theme,rc)}),Fs=en.selectionMode.length>0&&!Ms,He=Fs&&en.selectionMode.includes(Kg.SelectionMode.LASSO),uv=Fs&&en.selectionMode.includes(Kg.SelectionMode.BOX),Hv=Fs&&en.selectionMode.includes(Kg.SelectionMode.POINTS),ws=Gv.useMemo(()=>{if(!en.config)return{};const Jo=JSON.parse(en.config);if(zs||(Jo.modeBarButtonsToAdd=[{name:Xu?"Close fullscreen":"Fullscreen",icon:Xu?F7:z7,click:()=>{Xu&&Tf?Tf():Hc&&Hc()}},...Jo.modeBarButtonsToAdd??[]]),!Jo.modeBarButtonsToRemove){Jo.displaylogo=!1;const Ni=["sendDataToCloud"];Fs?(He||Ni.push("lasso2d"),uv||Ni.push("select2d")):Ni.push("lasso2d","select2d"),Jo.modeBarButtonsToRemove=Ni}return Jo},[en.id,en.config,Xu,zs,Fs,He,uv,Tf,Hc]);Gv.useEffect(()=>{Kh(Jo=>eA(Jo,en.theme,rc))},[en.id,rc,en.theme]),Gv.useEffect(()=>{let Jo=fl.layout.clickmode,Ni=fl.layout.hovermode,iu=fl.layout.dragmode;Ms?(Jo="none",iu="pan"):Fs&&(fl.layout.clickmode||(Hv?Jo="event+select":Jo="none"),fl.layout.hovermode||(Ni="closest"),fl.layout.dragmode||(Hv?iu="pan":uv?iu="select":He?iu="lasso":iu="pan")),Kh(Sf=>Sf.layout.clickmode===Jo&&Sf.layout.hovermode===Ni&&Sf.layout.dragmode===iu?Sf:{...Sf,layout:{...Sf.layout,clickmode:Jo,hovermode:Ni,dragmode:iu}})},[en.id,Fs,Hv,uv,He,Ms]);let Os=js===-1?Wc.layout?.width:Math.max(js,R7),ac=Af>0?Af:Wc.layout?.height??tA;Xu&&(Os=js,ac=wf??tA),(Wc.layout.height!==ac||Wc.layout.width!==Os)&&Kh(Jo=>({...Jo,layout:{...Jo.layout,height:ac,width:Os}}));const Sc=Gv.useCallback(Jo=>{P7(Jo,qi,en,Fo)},[en.id,qi,Fo]),_i=Gv.useCallback((Jo=!0)=>{I7(qi,en,Fo),Jo&&setTimeout(()=>{Kh(Ni=>({...Ni,data:Ni.data.map(iu=>({...iu,selectedpoints:null})),layout:{...Ni.layout,selections:[]}}))},D7)},[en.id,qi,Fo]);return Gv.useEffect(()=>{if(!en.formId||!Fs)return;const Jo=new h7;return Jo.manageFormClearListener(qi,en.formId,_i),()=>{Jo.disconnect()}},[en.formId,qi,Fs,_i]),Gv.useEffect(()=>{if(!Fs)return;let Jo;Wc.layout?.dragmode==="select"||Wc.layout?.dragmode==="lasso"?Jo="event":Jo=Hv?"event+select":"none",Wc.layout?.clickmode!==Jo&&Kh(Ni=>({...Ni,layout:{...Ni.layout,clickmode:Jo}}))},[Wc.layout?.dragmode]),cb(_7,{ref:ah,className:"stPlotlyChart","data-testid":"stPlotlyChart",children:cb(y7,{data:Wc.data,layout:Wc.layout,config:ws,frames:Wc.frames??void 0,style:{visibility:Wc.layout?.width===void 0?"hidden":void 0,overflow:"hidden"},onSelected:Fs?Sc:()=>{},onDoubleClick:Fs?()=>_i():void 0,onDeselect:Fs?()=>{_i(!1)}:void 0,onInitialized:Jo=>{qi.setElementState(en.id,"figure",Jo)},onUpdate:Jo=>{qi.setElementState(en.id,"figure",Jo),Kh(Jo)}})})}const B7=en=>{const{width:qi}=nA(iA);return qi?cb(O7,{width:qi,...en}):null},N7=f7(B7),G7=Gv.memo(N7);export{G7 as default};
|
|
3789
|
+
`),yt=_t.createShader(_t.FRAGMENT_SHADER);if(_t.isContextLost())return void(this.failedToCreate=!0);if(_t.shaderSource(yt,ht),_t.compileShader(yt),!_t.getShaderParameter(yt,_t.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${_t.getShaderInfoLog(yt)}`);_t.attachShader(this.program,yt);const Lt=_t.createShader(_t.VERTEX_SHADER);if(_t.isContextLost())return void(this.failedToCreate=!0);if(_t.shaderSource(Lt,St),_t.compileShader(Lt),!_t.getShaderParameter(Lt,_t.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${_t.getShaderInfoLog(Lt)}`);_t.attachShader(this.program,Lt),this.attributes={};const nr={};this.numAttributes=fr.length;for(let cr=0;cr<this.numAttributes;cr++)fr[cr]&&(_t.bindAttribLocation(this.program,cr,fr[cr]),this.attributes[fr[cr]]=cr);if(_t.linkProgram(this.program),!_t.getProgramParameter(this.program,_t.LINK_STATUS))throw new Error(`Program failed to link: ${_t.getProgramInfoLog(this.program)}`);_t.deleteShader(Lt),_t.deleteShader(yt);for(let cr=0;cr<Ye.length;cr++){const mr=Ye[cr];if(mr&&!nr[mr]){const Pr=_t.getUniformLocation(this.program,mr);Pr&&(nr[mr]=Pr)}}this.fixedUniforms=Se(P,nr),this.terrainUniforms=((cr,mr)=>({u_depth:new t.aH(cr,mr.u_depth),u_terrain:new t.aH(cr,mr.u_terrain),u_terrain_dim:new t.aI(cr,mr.u_terrain_dim),u_terrain_matrix:new t.aJ(cr,mr.u_terrain_matrix),u_terrain_unpack:new t.aK(cr,mr.u_terrain_unpack),u_terrain_exaggeration:new t.aI(cr,mr.u_terrain_exaggeration)}))(P,nr),this.binderUniforms=we?we.getUniforms(P,nr):[]}draw(P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta,Ve,Ye,it,ht,St){const yt=P.gl;if(this.failedToCreate)return;if(P.program.set(this.program),P.setDepthMode(we),P.setStencilMode(Se),P.setColorMode(Re),P.setCullFace(ct),zt){P.activeTexture.set(yt.TEXTURE2),yt.bindTexture(yt.TEXTURE_2D,zt.depthTexture),P.activeTexture.set(yt.TEXTURE3),yt.bindTexture(yt.TEXTURE_2D,zt.texture);for(const nr in this.terrainUniforms)this.terrainUniforms[nr].set(zt[nr])}for(const nr in this.fixedUniforms)this.fixedUniforms[nr].set(_t[nr]);Ye&&Ye.setUniforms(P,this.binderUniforms,ta,{zoom:Ve});let Lt=0;switch(ne){case yt.LINES:Lt=2;break;case yt.TRIANGLES:Lt=3;break;case yt.LINE_STRIP:Lt=1}for(const nr of Br.get()){const cr=nr.vaos||(nr.vaos={});(cr[Qt]||(cr[Qt]=new Kt)).bind(P,this,fr,Ye?Ye.getPaintVertexBuffers():[],gr,nr.vertexOffset,it,ht,St),yt.drawElements(ne,nr.primitiveLength*Lt,yt.UNSIGNED_SHORT,nr.primitiveOffset*Lt*2)}}}function xa(ze,P,ne){const we=1/Ea(ne,1,P.transform.tileZoom),Se=Math.pow(2,ne.tileID.overscaledZ),Re=ne.tileSize*Math.pow(2,P.transform.tileZoom)/Se,ct=Re*(ne.tileID.canonical.x+ne.tileID.wrap*Se),_t=Re*ne.tileID.canonical.y;return{u_image:0,u_texsize:ne.imageAtlasTexture.size,u_scale:[we,ze.fromScale,ze.toScale],u_fade:ze.t,u_pixel_coord_upper:[ct>>16,_t>>16],u_pixel_coord_lower:[65535&ct,65535&_t]}}const _a=(ze,P,ne,we)=>{const Se=P.style.light,Re=Se.properties.get("position"),ct=[Re.x,Re.y,Re.z],_t=(function(){var Qt=new t.A(9);return t.A!=Float32Array&&(Qt[1]=0,Qt[2]=0,Qt[3]=0,Qt[5]=0,Qt[6]=0,Qt[7]=0),Qt[0]=1,Qt[4]=1,Qt[8]=1,Qt})();Se.properties.get("anchor")==="viewport"&&(function(Qt,fr){var gr=Math.sin(fr),Br=Math.cos(fr);Qt[0]=Br,Qt[1]=gr,Qt[2]=0,Qt[3]=-gr,Qt[4]=Br,Qt[5]=0,Qt[6]=0,Qt[7]=0,Qt[8]=1})(_t,-P.transform.angle),(function(Qt,fr,gr){var Br=fr[0],ta=fr[1],Ve=fr[2];Qt[0]=Br*gr[0]+ta*gr[3]+Ve*gr[6],Qt[1]=Br*gr[1]+ta*gr[4]+Ve*gr[7],Qt[2]=Br*gr[2]+ta*gr[5]+Ve*gr[8]})(ct,ct,_t);const zt=Se.properties.get("color");return{u_matrix:ze,u_lightpos:ct,u_lightintensity:Se.properties.get("intensity"),u_lightcolor:[zt.r,zt.g,zt.b],u_vertical_gradient:+ne,u_opacity:we}},Wr=(ze,P,ne,we,Se,Re,ct)=>t.e(_a(ze,P,ne,we),xa(Re,P,ct),{u_height_factor:-Math.pow(2,Se.overscaledZ)/ct.tileSize/8}),ha=ze=>({u_matrix:ze}),jn=(ze,P,ne,we)=>t.e(ha(ze),xa(ne,P,we)),tn=(ze,P)=>({u_matrix:ze,u_world:P}),Zn=(ze,P,ne,we,Se)=>t.e(jn(ze,P,ne,we),{u_world:Se}),ii=(ze,P,ne,we)=>{const Se=ze.transform;let Re,ct;if(we.paint.get("circle-pitch-alignment")==="map"){const _t=Ea(ne,1,Se.zoom);Re=!0,ct=[_t,_t]}else Re=!1,ct=Se.pixelsToGLUnits;return{u_camera_to_center_distance:Se.cameraToCenterDistance,u_scale_with_map:+(we.paint.get("circle-pitch-scale")==="map"),u_matrix:ze.translatePosMatrix(P.posMatrix,ne,we.paint.get("circle-translate"),we.paint.get("circle-translate-anchor")),u_pitch_with_map:+Re,u_device_pixel_ratio:ze.pixelRatio,u_extrude_scale:ct}},pi=(ze,P,ne)=>({u_matrix:ze,u_inv_matrix:P,u_camera_to_center_distance:ne.cameraToCenterDistance,u_viewport_size:[ne.width,ne.height]}),di=(ze,P,ne=1)=>({u_matrix:ze,u_color:P,u_overlay:0,u_overlay_scale:ne}),ki=ze=>({u_matrix:ze}),zn=(ze,P,ne,we)=>({u_matrix:ze,u_extrude_scale:Ea(P,1,ne),u_intensity:we}),no=(ze,P,ne,we)=>{const Se=t.H();t.aP(Se,0,ze.width,ze.height,0,0,1);const Re=ze.context.gl;return{u_matrix:Se,u_world:[Re.drawingBufferWidth,Re.drawingBufferHeight],u_image:ne,u_color_ramp:we,u_opacity:P.paint.get("heatmap-opacity")}};function Xi(ze,P){const ne=Math.pow(2,P.canonical.z),we=P.canonical.y;return[new t.Z(0,we/ne).toLngLat().lat,new t.Z(0,(we+1)/ne).toLngLat().lat]}const Go=(ze,P,ne,we)=>{const Se=ze.transform;return{u_matrix:jo(ze,P,ne,we),u_ratio:1/Ea(P,1,Se.zoom),u_device_pixel_ratio:ze.pixelRatio,u_units_to_pixels:[1/Se.pixelsToGLUnits[0],1/Se.pixelsToGLUnits[1]]}},ho=(ze,P,ne,we,Se)=>t.e(Go(ze,P,ne,Se),{u_image:0,u_image_height:we}),to=(ze,P,ne,we,Se)=>{const Re=ze.transform,ct=Ho(P,Re);return{u_matrix:jo(ze,P,ne,Se),u_texsize:P.imageAtlasTexture.size,u_ratio:1/Ea(P,1,Re.zoom),u_device_pixel_ratio:ze.pixelRatio,u_image:0,u_scale:[ct,we.fromScale,we.toScale],u_fade:we.t,u_units_to_pixels:[1/Re.pixelsToGLUnits[0],1/Re.pixelsToGLUnits[1]]}},Gi=(ze,P,ne,we,Se,Re)=>{const ct=ze.lineAtlas,_t=Ho(P,ze.transform),zt=ne.layout.get("line-cap")==="round",Qt=ct.getDash(we.from,zt),fr=ct.getDash(we.to,zt),gr=Qt.width*Se.fromScale,Br=fr.width*Se.toScale;return t.e(Go(ze,P,ne,Re),{u_patternscale_a:[_t/gr,-Qt.height/2],u_patternscale_b:[_t/Br,-fr.height/2],u_sdfgamma:ct.width/(256*Math.min(gr,Br)*ze.pixelRatio)/2,u_image:0,u_tex_y_a:Qt.y,u_tex_y_b:fr.y,u_mix:Se.t})};function Ho(ze,P){return 1/Ea(ze,1,P.tileZoom)}function jo(ze,P,ne,we){return ze.translatePosMatrix(we?we.posMatrix:P.tileID.posMatrix,P,ne.paint.get("line-translate"),ne.paint.get("line-translate-anchor"))}const is=(ze,P,ne,we,Se)=>{return{u_matrix:ze,u_tl_parent:P,u_scale_parent:ne,u_buffer_scale:1,u_fade_t:we.mix,u_opacity:we.opacity*Se.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Se.paint.get("raster-brightness-min"),u_brightness_high:Se.paint.get("raster-brightness-max"),u_saturation_factor:(ct=Se.paint.get("raster-saturation"),ct>0?1-1/(1.001-ct):-ct),u_contrast_factor:(Re=Se.paint.get("raster-contrast"),Re>0?1/(1-Re):1+Re),u_spin_weights:vo(Se.paint.get("raster-hue-rotate"))};var Re,ct};function vo(ze){ze*=Math.PI/180;const P=Math.sin(ze),ne=Math.cos(ze);return[(2*ne+1)/3,(-Math.sqrt(3)*P-ne+1)/3,(Math.sqrt(3)*P-ne+1)/3]}const $i=(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta)=>{const Ve=ct.transform;return{u_is_size_zoom_constant:+(ze==="constant"||ze==="source"),u_is_size_feature_constant:+(ze==="constant"||ze==="camera"),u_size_t:P?P.uSizeT:0,u_size:P?P.uSize:0,u_camera_to_center_distance:Ve.cameraToCenterDistance,u_pitch:Ve.pitch/360*2*Math.PI,u_rotate_symbol:+ne,u_aspect_ratio:Ve.width/Ve.height,u_fade_change:ct.options.fadeDuration?ct.symbolFadeChange:1,u_matrix:_t,u_label_plane_matrix:zt,u_coord_matrix:Qt,u_is_text:+gr,u_pitch_with_map:+we,u_is_along_line:Se,u_is_variable_anchor:Re,u_texsize:Br,u_texture:0,u_translation:fr,u_pitched_scale:ta}},bi=(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta,Ve)=>{const Ye=ct.transform;return t.e($i(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,Ve),{u_gamma_scale:we?Math.cos(Ye._pitch)*Ye.cameraToCenterDistance:1,u_device_pixel_ratio:ct.pixelRatio,u_is_halo:1})},po=(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta)=>t.e(bi(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,!0,gr,!0,ta),{u_texsize_icon:Br,u_texture_icon:1}),os=(ze,P,ne)=>({u_matrix:ze,u_opacity:P,u_color:ne}),Ts=(ze,P,ne,we,Se,Re)=>t.e((function(ct,_t,zt,Qt){const fr=zt.imageManager.getPattern(ct.from.toString()),gr=zt.imageManager.getPattern(ct.to.toString()),{width:Br,height:ta}=zt.imageManager.getPixelSize(),Ve=Math.pow(2,Qt.tileID.overscaledZ),Ye=Qt.tileSize*Math.pow(2,zt.transform.tileZoom)/Ve,it=Ye*(Qt.tileID.canonical.x+Qt.tileID.wrap*Ve),ht=Ye*Qt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:fr.tl,u_pattern_br_a:fr.br,u_pattern_tl_b:gr.tl,u_pattern_br_b:gr.br,u_texsize:[Br,ta],u_mix:_t.t,u_pattern_size_a:fr.displaySize,u_pattern_size_b:gr.displaySize,u_scale_a:_t.fromScale,u_scale_b:_t.toScale,u_tile_units_to_pixels:1/Ea(Qt,1,zt.transform.tileZoom),u_pixel_coord_upper:[it>>16,ht>>16],u_pixel_coord_lower:[65535&it,65535&ht]}})(we,Re,ne,Se),{u_matrix:ze,u_opacity:P}),Es={fillExtrusion:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_lightpos:new t.aN(ze,P.u_lightpos),u_lightintensity:new t.aI(ze,P.u_lightintensity),u_lightcolor:new t.aN(ze,P.u_lightcolor),u_vertical_gradient:new t.aI(ze,P.u_vertical_gradient),u_opacity:new t.aI(ze,P.u_opacity)}),fillExtrusionPattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_lightpos:new t.aN(ze,P.u_lightpos),u_lightintensity:new t.aI(ze,P.u_lightintensity),u_lightcolor:new t.aN(ze,P.u_lightcolor),u_vertical_gradient:new t.aI(ze,P.u_vertical_gradient),u_height_factor:new t.aI(ze,P.u_height_factor),u_image:new t.aH(ze,P.u_image),u_texsize:new t.aO(ze,P.u_texsize),u_pixel_coord_upper:new t.aO(ze,P.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(ze,P.u_pixel_coord_lower),u_scale:new t.aN(ze,P.u_scale),u_fade:new t.aI(ze,P.u_fade),u_opacity:new t.aI(ze,P.u_opacity)}),fill:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix)}),fillPattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_image:new t.aH(ze,P.u_image),u_texsize:new t.aO(ze,P.u_texsize),u_pixel_coord_upper:new t.aO(ze,P.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(ze,P.u_pixel_coord_lower),u_scale:new t.aN(ze,P.u_scale),u_fade:new t.aI(ze,P.u_fade)}),fillOutline:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_world:new t.aO(ze,P.u_world)}),fillOutlinePattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_world:new t.aO(ze,P.u_world),u_image:new t.aH(ze,P.u_image),u_texsize:new t.aO(ze,P.u_texsize),u_pixel_coord_upper:new t.aO(ze,P.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(ze,P.u_pixel_coord_lower),u_scale:new t.aN(ze,P.u_scale),u_fade:new t.aI(ze,P.u_fade)}),circle:(ze,P)=>({u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_scale_with_map:new t.aH(ze,P.u_scale_with_map),u_pitch_with_map:new t.aH(ze,P.u_pitch_with_map),u_extrude_scale:new t.aO(ze,P.u_extrude_scale),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_matrix:new t.aJ(ze,P.u_matrix)}),collisionBox:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_pixel_extrude_scale:new t.aO(ze,P.u_pixel_extrude_scale)}),collisionCircle:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_inv_matrix:new t.aJ(ze,P.u_inv_matrix),u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_viewport_size:new t.aO(ze,P.u_viewport_size)}),debug:(ze,P)=>({u_color:new t.aL(ze,P.u_color),u_matrix:new t.aJ(ze,P.u_matrix),u_overlay:new t.aH(ze,P.u_overlay),u_overlay_scale:new t.aI(ze,P.u_overlay_scale)}),clippingMask:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix)}),heatmap:(ze,P)=>({u_extrude_scale:new t.aI(ze,P.u_extrude_scale),u_intensity:new t.aI(ze,P.u_intensity),u_matrix:new t.aJ(ze,P.u_matrix)}),heatmapTexture:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_world:new t.aO(ze,P.u_world),u_image:new t.aH(ze,P.u_image),u_color_ramp:new t.aH(ze,P.u_color_ramp),u_opacity:new t.aI(ze,P.u_opacity)}),hillshade:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_image:new t.aH(ze,P.u_image),u_latrange:new t.aO(ze,P.u_latrange),u_light:new t.aO(ze,P.u_light),u_shadow:new t.aL(ze,P.u_shadow),u_highlight:new t.aL(ze,P.u_highlight),u_accent:new t.aL(ze,P.u_accent)}),hillshadePrepare:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_image:new t.aH(ze,P.u_image),u_dimension:new t.aO(ze,P.u_dimension),u_zoom:new t.aI(ze,P.u_zoom),u_unpack:new t.aK(ze,P.u_unpack)}),line:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_ratio:new t.aI(ze,P.u_ratio),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_units_to_pixels:new t.aO(ze,P.u_units_to_pixels)}),lineGradient:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_ratio:new t.aI(ze,P.u_ratio),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_units_to_pixels:new t.aO(ze,P.u_units_to_pixels),u_image:new t.aH(ze,P.u_image),u_image_height:new t.aI(ze,P.u_image_height)}),linePattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_texsize:new t.aO(ze,P.u_texsize),u_ratio:new t.aI(ze,P.u_ratio),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_image:new t.aH(ze,P.u_image),u_units_to_pixels:new t.aO(ze,P.u_units_to_pixels),u_scale:new t.aN(ze,P.u_scale),u_fade:new t.aI(ze,P.u_fade)}),lineSDF:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_ratio:new t.aI(ze,P.u_ratio),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_units_to_pixels:new t.aO(ze,P.u_units_to_pixels),u_patternscale_a:new t.aO(ze,P.u_patternscale_a),u_patternscale_b:new t.aO(ze,P.u_patternscale_b),u_sdfgamma:new t.aI(ze,P.u_sdfgamma),u_image:new t.aH(ze,P.u_image),u_tex_y_a:new t.aI(ze,P.u_tex_y_a),u_tex_y_b:new t.aI(ze,P.u_tex_y_b),u_mix:new t.aI(ze,P.u_mix)}),raster:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_tl_parent:new t.aO(ze,P.u_tl_parent),u_scale_parent:new t.aI(ze,P.u_scale_parent),u_buffer_scale:new t.aI(ze,P.u_buffer_scale),u_fade_t:new t.aI(ze,P.u_fade_t),u_opacity:new t.aI(ze,P.u_opacity),u_image0:new t.aH(ze,P.u_image0),u_image1:new t.aH(ze,P.u_image1),u_brightness_low:new t.aI(ze,P.u_brightness_low),u_brightness_high:new t.aI(ze,P.u_brightness_high),u_saturation_factor:new t.aI(ze,P.u_saturation_factor),u_contrast_factor:new t.aI(ze,P.u_contrast_factor),u_spin_weights:new t.aN(ze,P.u_spin_weights)}),symbolIcon:(ze,P)=>({u_is_size_zoom_constant:new t.aH(ze,P.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(ze,P.u_is_size_feature_constant),u_size_t:new t.aI(ze,P.u_size_t),u_size:new t.aI(ze,P.u_size),u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_pitch:new t.aI(ze,P.u_pitch),u_rotate_symbol:new t.aH(ze,P.u_rotate_symbol),u_aspect_ratio:new t.aI(ze,P.u_aspect_ratio),u_fade_change:new t.aI(ze,P.u_fade_change),u_matrix:new t.aJ(ze,P.u_matrix),u_label_plane_matrix:new t.aJ(ze,P.u_label_plane_matrix),u_coord_matrix:new t.aJ(ze,P.u_coord_matrix),u_is_text:new t.aH(ze,P.u_is_text),u_pitch_with_map:new t.aH(ze,P.u_pitch_with_map),u_is_along_line:new t.aH(ze,P.u_is_along_line),u_is_variable_anchor:new t.aH(ze,P.u_is_variable_anchor),u_texsize:new t.aO(ze,P.u_texsize),u_texture:new t.aH(ze,P.u_texture),u_translation:new t.aO(ze,P.u_translation),u_pitched_scale:new t.aI(ze,P.u_pitched_scale)}),symbolSDF:(ze,P)=>({u_is_size_zoom_constant:new t.aH(ze,P.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(ze,P.u_is_size_feature_constant),u_size_t:new t.aI(ze,P.u_size_t),u_size:new t.aI(ze,P.u_size),u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_pitch:new t.aI(ze,P.u_pitch),u_rotate_symbol:new t.aH(ze,P.u_rotate_symbol),u_aspect_ratio:new t.aI(ze,P.u_aspect_ratio),u_fade_change:new t.aI(ze,P.u_fade_change),u_matrix:new t.aJ(ze,P.u_matrix),u_label_plane_matrix:new t.aJ(ze,P.u_label_plane_matrix),u_coord_matrix:new t.aJ(ze,P.u_coord_matrix),u_is_text:new t.aH(ze,P.u_is_text),u_pitch_with_map:new t.aH(ze,P.u_pitch_with_map),u_is_along_line:new t.aH(ze,P.u_is_along_line),u_is_variable_anchor:new t.aH(ze,P.u_is_variable_anchor),u_texsize:new t.aO(ze,P.u_texsize),u_texture:new t.aH(ze,P.u_texture),u_gamma_scale:new t.aI(ze,P.u_gamma_scale),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_is_halo:new t.aH(ze,P.u_is_halo),u_translation:new t.aO(ze,P.u_translation),u_pitched_scale:new t.aI(ze,P.u_pitched_scale)}),symbolTextAndIcon:(ze,P)=>({u_is_size_zoom_constant:new t.aH(ze,P.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(ze,P.u_is_size_feature_constant),u_size_t:new t.aI(ze,P.u_size_t),u_size:new t.aI(ze,P.u_size),u_camera_to_center_distance:new t.aI(ze,P.u_camera_to_center_distance),u_pitch:new t.aI(ze,P.u_pitch),u_rotate_symbol:new t.aH(ze,P.u_rotate_symbol),u_aspect_ratio:new t.aI(ze,P.u_aspect_ratio),u_fade_change:new t.aI(ze,P.u_fade_change),u_matrix:new t.aJ(ze,P.u_matrix),u_label_plane_matrix:new t.aJ(ze,P.u_label_plane_matrix),u_coord_matrix:new t.aJ(ze,P.u_coord_matrix),u_is_text:new t.aH(ze,P.u_is_text),u_pitch_with_map:new t.aH(ze,P.u_pitch_with_map),u_is_along_line:new t.aH(ze,P.u_is_along_line),u_is_variable_anchor:new t.aH(ze,P.u_is_variable_anchor),u_texsize:new t.aO(ze,P.u_texsize),u_texsize_icon:new t.aO(ze,P.u_texsize_icon),u_texture:new t.aH(ze,P.u_texture),u_texture_icon:new t.aH(ze,P.u_texture_icon),u_gamma_scale:new t.aI(ze,P.u_gamma_scale),u_device_pixel_ratio:new t.aI(ze,P.u_device_pixel_ratio),u_is_halo:new t.aH(ze,P.u_is_halo),u_translation:new t.aO(ze,P.u_translation),u_pitched_scale:new t.aI(ze,P.u_pitched_scale)}),background:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_opacity:new t.aI(ze,P.u_opacity),u_color:new t.aL(ze,P.u_color)}),backgroundPattern:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_opacity:new t.aI(ze,P.u_opacity),u_image:new t.aH(ze,P.u_image),u_pattern_tl_a:new t.aO(ze,P.u_pattern_tl_a),u_pattern_br_a:new t.aO(ze,P.u_pattern_br_a),u_pattern_tl_b:new t.aO(ze,P.u_pattern_tl_b),u_pattern_br_b:new t.aO(ze,P.u_pattern_br_b),u_texsize:new t.aO(ze,P.u_texsize),u_mix:new t.aI(ze,P.u_mix),u_pattern_size_a:new t.aO(ze,P.u_pattern_size_a),u_pattern_size_b:new t.aO(ze,P.u_pattern_size_b),u_scale_a:new t.aI(ze,P.u_scale_a),u_scale_b:new t.aI(ze,P.u_scale_b),u_pixel_coord_upper:new t.aO(ze,P.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(ze,P.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(ze,P.u_tile_units_to_pixels)}),terrain:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_texture:new t.aH(ze,P.u_texture),u_ele_delta:new t.aI(ze,P.u_ele_delta),u_fog_matrix:new t.aJ(ze,P.u_fog_matrix),u_fog_color:new t.aL(ze,P.u_fog_color),u_fog_ground_blend:new t.aI(ze,P.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(ze,P.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(ze,P.u_horizon_color),u_horizon_fog_blend:new t.aI(ze,P.u_horizon_fog_blend)}),terrainDepth:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_ele_delta:new t.aI(ze,P.u_ele_delta)}),terrainCoords:(ze,P)=>({u_matrix:new t.aJ(ze,P.u_matrix),u_texture:new t.aH(ze,P.u_texture),u_terrain_coords_id:new t.aI(ze,P.u_terrain_coords_id),u_ele_delta:new t.aI(ze,P.u_ele_delta)}),sky:(ze,P)=>({u_sky_color:new t.aL(ze,P.u_sky_color),u_horizon_color:new t.aL(ze,P.u_horizon_color),u_horizon:new t.aI(ze,P.u_horizon),u_sky_horizon_blend:new t.aI(ze,P.u_sky_horizon_blend)})};class Mo{constructor(P,ne,we){this.context=P;const Se=P.gl;this.buffer=Se.createBuffer(),this.dynamicDraw=!!we,this.context.unbindVAO(),P.bindElementBuffer.set(this.buffer),Se.bufferData(Se.ELEMENT_ARRAY_BUFFER,ne.arrayBuffer,this.dynamicDraw?Se.DYNAMIC_DRAW:Se.STATIC_DRAW),this.dynamicDraw||delete ne.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(P){const ne=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),ne.bufferSubData(ne.ELEMENT_ARRAY_BUFFER,0,P.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const On={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class vi{constructor(P,ne,we,Se){this.length=ne.length,this.attributes=we,this.itemSize=ne.bytesPerElement,this.dynamicDraw=Se,this.context=P;const Re=P.gl;this.buffer=Re.createBuffer(),P.bindVertexBuffer.set(this.buffer),Re.bufferData(Re.ARRAY_BUFFER,ne.arrayBuffer,this.dynamicDraw?Re.DYNAMIC_DRAW:Re.STATIC_DRAW),this.dynamicDraw||delete ne.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(P){if(P.length!==this.length)throw new Error(`Length of new data is ${P.length}, which doesn't match current length of ${this.length}`);const ne=this.context.gl;this.bind(),ne.bufferSubData(ne.ARRAY_BUFFER,0,P.arrayBuffer)}enableAttributes(P,ne){for(let we=0;we<this.attributes.length;we++){const Se=ne.attributes[this.attributes[we].name];Se!==void 0&&P.enableVertexAttribArray(Se)}}setVertexAttribPointers(P,ne,we){for(let Se=0;Se<this.attributes.length;Se++){const Re=this.attributes[Se],ct=ne.attributes[Re.name];ct!==void 0&&P.vertexAttribPointer(ct,Re.components,P[On[Re.type]],!1,this.itemSize,Re.offset+this.itemSize*(we||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const As=new WeakMap;function Ro(ze){var P;if(As.has(ze))return As.get(ze);{const ne=(P=ze.getParameter(ze.VERSION))===null||P===void 0?void 0:P.startsWith("WebGL 2.0");return As.set(ze,ne),ne}}class Oi{constructor(P){this.gl=P.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(P){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ks extends Oi{getDefault(){return t.aM.transparent}set(P){const ne=this.current;(P.r!==ne.r||P.g!==ne.g||P.b!==ne.b||P.a!==ne.a||this.dirty)&&(this.gl.clearColor(P.r,P.g,P.b,P.a),this.current=P,this.dirty=!1)}}class Wo extends Oi{getDefault(){return 1}set(P){(P!==this.current||this.dirty)&&(this.gl.clearDepth(P),this.current=P,this.dirty=!1)}}class ss extends Oi{getDefault(){return 0}set(P){(P!==this.current||this.dirty)&&(this.gl.clearStencil(P),this.current=P,this.dirty=!1)}}class hl extends Oi{getDefault(){return[!0,!0,!0,!0]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||P[2]!==ne[2]||P[3]!==ne[3]||this.dirty)&&(this.gl.colorMask(P[0],P[1],P[2],P[3]),this.current=P,this.dirty=!1)}}class fi extends Oi{getDefault(){return!0}set(P){(P!==this.current||this.dirty)&&(this.gl.depthMask(P),this.current=P,this.dirty=!1)}}class _o extends Oi{getDefault(){return 255}set(P){(P!==this.current||this.dirty)&&(this.gl.stencilMask(P),this.current=P,this.dirty=!1)}}class io extends Oi{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(P){const ne=this.current;(P.func!==ne.func||P.ref!==ne.ref||P.mask!==ne.mask||this.dirty)&&(this.gl.stencilFunc(P.func,P.ref,P.mask),this.current=P,this.dirty=!1)}}class Vs extends Oi{getDefault(){const P=this.gl;return[P.KEEP,P.KEEP,P.KEEP]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||P[2]!==ne[2]||this.dirty)&&(this.gl.stencilOp(P[0],P[1],P[2]),this.current=P,this.dirty=!1)}}class qs extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;P?ne.enable(ne.STENCIL_TEST):ne.disable(ne.STENCIL_TEST),this.current=P,this.dirty=!1}}class Ri extends Oi{getDefault(){return[0,1]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||this.dirty)&&(this.gl.depthRange(P[0],P[1]),this.current=P,this.dirty=!1)}}class tl extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;P?ne.enable(ne.DEPTH_TEST):ne.disable(ne.DEPTH_TEST),this.current=P,this.dirty=!1}}class il extends Oi{getDefault(){return this.gl.LESS}set(P){(P!==this.current||this.dirty)&&(this.gl.depthFunc(P),this.current=P,this.dirty=!1)}}class Oo extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;P?ne.enable(ne.BLEND):ne.disable(ne.BLEND),this.current=P,this.dirty=!1}}class ms extends Oi{getDefault(){const P=this.gl;return[P.ONE,P.ZERO]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||this.dirty)&&(this.gl.blendFunc(P[0],P[1]),this.current=P,this.dirty=!1)}}class Rs extends Oi{getDefault(){return t.aM.transparent}set(P){const ne=this.current;(P.r!==ne.r||P.g!==ne.g||P.b!==ne.b||P.a!==ne.a||this.dirty)&&(this.gl.blendColor(P.r,P.g,P.b,P.a),this.current=P,this.dirty=!1)}}class Bs extends Oi{getDefault(){return this.gl.FUNC_ADD}set(P){(P!==this.current||this.dirty)&&(this.gl.blendEquation(P),this.current=P,this.dirty=!1)}}class Pl extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;P?ne.enable(ne.CULL_FACE):ne.disable(ne.CULL_FACE),this.current=P,this.dirty=!1}}class Fu extends Oi{getDefault(){return this.gl.BACK}set(P){(P!==this.current||this.dirty)&&(this.gl.cullFace(P),this.current=P,this.dirty=!1)}}class yu extends Oi{getDefault(){return this.gl.CCW}set(P){(P!==this.current||this.dirty)&&(this.gl.frontFace(P),this.current=P,this.dirty=!1)}}class Su extends Oi{getDefault(){return null}set(P){(P!==this.current||this.dirty)&&(this.gl.useProgram(P),this.current=P,this.dirty=!1)}}class Zc extends Oi{getDefault(){return this.gl.TEXTURE0}set(P){(P!==this.current||this.dirty)&&(this.gl.activeTexture(P),this.current=P,this.dirty=!1)}}class Oc extends Oi{getDefault(){const P=this.gl;return[0,0,P.drawingBufferWidth,P.drawingBufferHeight]}set(P){const ne=this.current;(P[0]!==ne[0]||P[1]!==ne[1]||P[2]!==ne[2]||P[3]!==ne[3]||this.dirty)&&(this.gl.viewport(P[0],P[1],P[2],P[3]),this.current=P,this.dirty=!1)}}class ys extends Oi{getDefault(){return null}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.bindFramebuffer(ne.FRAMEBUFFER,P),this.current=P,this.dirty=!1}}class su extends Oi{getDefault(){return null}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.bindRenderbuffer(ne.RENDERBUFFER,P),this.current=P,this.dirty=!1}}class Yc extends Oi{getDefault(){return null}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.bindTexture(ne.TEXTURE_2D,P),this.current=P,this.dirty=!1}}class Ul extends Oi{getDefault(){return null}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.bindBuffer(ne.ARRAY_BUFFER,P),this.current=P,this.dirty=!1}}class Il extends Oi{getDefault(){return null}set(P){const ne=this.gl;ne.bindBuffer(ne.ELEMENT_ARRAY_BUFFER,P),this.current=P,this.dirty=!1}}class jl extends Oi{getDefault(){return null}set(P){var ne;if(P===this.current&&!this.dirty)return;const we=this.gl;Ro(we)?we.bindVertexArray(P):(ne=we.getExtension("OES_vertex_array_object"))===null||ne===void 0||ne.bindVertexArrayOES(P),this.current=P,this.dirty=!1}}class Mu extends Oi{getDefault(){return 4}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.pixelStorei(ne.UNPACK_ALIGNMENT,P),this.current=P,this.dirty=!1}}class Zs extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.pixelStorei(ne.UNPACK_PREMULTIPLY_ALPHA_WEBGL,P),this.current=P,this.dirty=!1}}class Rl extends Oi{getDefault(){return!1}set(P){if(P===this.current&&!this.dirty)return;const ne=this.gl;ne.pixelStorei(ne.UNPACK_FLIP_Y_WEBGL,P),this.current=P,this.dirty=!1}}class Vo extends Oi{constructor(P,ne){super(P),this.context=P,this.parent=ne}getDefault(){return null}}class Cs extends Vo{setDirty(){this.dirty=!0}set(P){if(P===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const ne=this.gl;ne.framebufferTexture2D(ne.FRAMEBUFFER,ne.COLOR_ATTACHMENT0,ne.TEXTURE_2D,P,0),this.current=P,this.dirty=!1}}class Yu extends Vo{set(P){if(P===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const ne=this.gl;ne.framebufferRenderbuffer(ne.FRAMEBUFFER,ne.DEPTH_ATTACHMENT,ne.RENDERBUFFER,P),this.current=P,this.dirty=!1}}class Ql extends Vo{set(P){if(P===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const ne=this.gl;ne.framebufferRenderbuffer(ne.FRAMEBUFFER,ne.DEPTH_STENCIL_ATTACHMENT,ne.RENDERBUFFER,P),this.current=P,this.dirty=!1}}class oc{constructor(P,ne,we,Se,Re){this.context=P,this.width=ne,this.height=we;const ct=P.gl,_t=this.framebuffer=ct.createFramebuffer();if(this.colorAttachment=new Cs(P,_t),Se)this.depthAttachment=Re?new Ql(P,_t):new Yu(P,_t);else if(Re)throw new Error("Stencil cannot be set without depth");if(ct.checkFramebufferStatus(ct.FRAMEBUFFER)!==ct.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const P=this.context.gl,ne=this.colorAttachment.get();if(ne&&P.deleteTexture(ne),this.depthAttachment){const we=this.depthAttachment.get();we&&P.deleteRenderbuffer(we)}P.deleteFramebuffer(this.framebuffer)}}class rl{constructor(P,ne,we){this.blendFunction=P,this.blendColor=ne,this.mask=we}}rl.Replace=[1,0],rl.disabled=new rl(rl.Replace,t.aM.transparent,[!1,!1,!1,!1]),rl.unblended=new rl(rl.Replace,t.aM.transparent,[!0,!0,!0,!0]),rl.alphaBlended=new rl([1,771],t.aM.transparent,[!0,!0,!0,!0]);class kf{constructor(P){var ne,we;if(this.gl=P,this.clearColor=new ks(this),this.clearDepth=new Wo(this),this.clearStencil=new ss(this),this.colorMask=new hl(this),this.depthMask=new fi(this),this.stencilMask=new _o(this),this.stencilFunc=new io(this),this.stencilOp=new Vs(this),this.stencilTest=new qs(this),this.depthRange=new Ri(this),this.depthTest=new tl(this),this.depthFunc=new il(this),this.blend=new Oo(this),this.blendFunc=new ms(this),this.blendColor=new Rs(this),this.blendEquation=new Bs(this),this.cullFace=new Pl(this),this.cullFaceSide=new Fu(this),this.frontFace=new yu(this),this.program=new Su(this),this.activeTexture=new Zc(this),this.viewport=new Oc(this),this.bindFramebuffer=new ys(this),this.bindRenderbuffer=new su(this),this.bindTexture=new Yc(this),this.bindVertexBuffer=new Ul(this),this.bindElementBuffer=new Il(this),this.bindVertexArray=new jl(this),this.pixelStoreUnpack=new Mu(this),this.pixelStoreUnpackPremultiplyAlpha=new Zs(this),this.pixelStoreUnpackFlipY=new Rl(this),this.extTextureFilterAnisotropic=P.getExtension("EXT_texture_filter_anisotropic")||P.getExtension("MOZ_EXT_texture_filter_anisotropic")||P.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=P.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=P.getParameter(P.MAX_TEXTURE_SIZE),Ro(P)){this.HALF_FLOAT=P.HALF_FLOAT;const Se=P.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(ne=P.RGBA16F)!==null&&ne!==void 0?ne:Se?.RGBA16F_EXT,this.RGB16F=(we=P.RGB16F)!==null&&we!==void 0?we:Se?.RGB16F_EXT,P.getExtension("EXT_color_buffer_float")}else{P.getExtension("EXT_color_buffer_half_float"),P.getExtension("OES_texture_half_float_linear");const Se=P.getExtension("OES_texture_half_float");this.HALF_FLOAT=Se?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(P,ne){return new Mo(this,P,ne)}createVertexBuffer(P,ne,we){return new vi(this,P,ne,we)}createRenderbuffer(P,ne,we){const Se=this.gl,Re=Se.createRenderbuffer();return this.bindRenderbuffer.set(Re),Se.renderbufferStorage(Se.RENDERBUFFER,P,ne,we),this.bindRenderbuffer.set(null),Re}createFramebuffer(P,ne,we,Se){return new oc(this,P,ne,we,Se)}clear({color:P,depth:ne,stencil:we}){const Se=this.gl;let Re=0;P&&(Re|=Se.COLOR_BUFFER_BIT,this.clearColor.set(P),this.colorMask.set([!0,!0,!0,!0])),ne!==void 0&&(Re|=Se.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(ne),this.depthMask.set(!0)),we!==void 0&&(Re|=Se.STENCIL_BUFFER_BIT,this.clearStencil.set(we),this.stencilMask.set(255)),Se.clear(Re)}setCullFace(P){P.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(P.mode),this.frontFace.set(P.frontFace))}setDepthMode(P){P.func!==this.gl.ALWAYS||P.mask?(this.depthTest.set(!0),this.depthFunc.set(P.func),this.depthMask.set(P.mask),this.depthRange.set(P.range)):this.depthTest.set(!1)}setStencilMode(P){P.test.func!==this.gl.ALWAYS||P.mask?(this.stencilTest.set(!0),this.stencilMask.set(P.mask),this.stencilOp.set([P.fail,P.depthFail,P.pass]),this.stencilFunc.set({func:P.test.func,ref:P.ref,mask:P.test.mask})):this.stencilTest.set(!1)}setColorMode(P){t.aE(P.blendFunction,rl.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(P.blendFunction),this.blendColor.set(P.blendColor)),this.colorMask.set(P.mask)}createVertexArray(){var P;return Ro(this.gl)?this.gl.createVertexArray():(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0?void 0:P.createVertexArrayOES()}deleteVertexArray(P){var ne;return Ro(this.gl)?this.gl.deleteVertexArray(P):(ne=this.gl.getExtension("OES_vertex_array_object"))===null||ne===void 0?void 0:ne.deleteVertexArrayOES(P)}unbindVAO(){this.bindVertexArray.set(null)}}class Bo{constructor(P,ne,we){this.func=P,this.mask=ne,this.range=we}}Bo.ReadOnly=!1,Bo.ReadWrite=!0,Bo.disabled=new Bo(519,Bo.ReadOnly,[0,1]);const jf=7680;class hs{constructor(P,ne,we,Se,Re,ct){this.test=P,this.ref=ne,this.mask=we,this.fail=Se,this.depthFail=Re,this.pass=ct}}hs.disabled=new hs({func:519,mask:0},0,0,jf,jf,jf);class Fi{constructor(P,ne,we){this.enable=P,this.mode=ne,this.frontFace=we}}let _c;function Eu(ze,P,ne,we,Se){const Re=ze.context,ct=Re.gl,_t=ze.useProgram("collisionBox"),zt=[];let Qt=0,fr=0;for(let ht=0;ht<we.length;ht++){const St=we[ht],yt=P.getTile(St).getBucket(ne);if(!yt)continue;const Lt=Se?yt.textCollisionBox:yt.iconCollisionBox,nr=yt.collisionCircleArray;if(nr.length>0){const cr=t.H();t.aQ(cr,yt.placementInvProjMatrix,ze.transform.glCoordMatrix),t.aQ(cr,cr,yt.placementViewportMatrix),zt.push({circleArray:nr,circleOffset:fr,transform:St.posMatrix,invTransform:cr,coord:St}),Qt+=nr.length/4,fr=Qt}Lt&&_t.draw(Re,ct.LINES,Bo.disabled,hs.disabled,ze.colorModeForRenderPass(),Fi.disabled,{u_matrix:St.posMatrix,u_pixel_extrude_scale:[1/(gr=ze.transform).width,1/gr.height]},ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(St),ne.id,Lt.layoutVertexBuffer,Lt.indexBuffer,Lt.segments,null,ze.transform.zoom,null,null,Lt.collisionVertexBuffer)}var gr;if(!Se||!zt.length)return;const Br=ze.useProgram("collisionCircle"),ta=new t.aR;ta.resize(4*Qt),ta._trim();let Ve=0;for(const ht of zt)for(let St=0;St<ht.circleArray.length/4;St++){const yt=4*St,Lt=ht.circleArray[yt+0],nr=ht.circleArray[yt+1],cr=ht.circleArray[yt+2],mr=ht.circleArray[yt+3];ta.emplace(Ve++,Lt,nr,cr,mr,0),ta.emplace(Ve++,Lt,nr,cr,mr,1),ta.emplace(Ve++,Lt,nr,cr,mr,2),ta.emplace(Ve++,Lt,nr,cr,mr,3)}(!_c||_c.length<2*Qt)&&(_c=(function(ht){const St=2*ht,yt=new t.aT;yt.resize(St),yt._trim();for(let Lt=0;Lt<St;Lt++){const nr=6*Lt;yt.uint16[nr+0]=4*Lt+0,yt.uint16[nr+1]=4*Lt+1,yt.uint16[nr+2]=4*Lt+2,yt.uint16[nr+3]=4*Lt+2,yt.uint16[nr+4]=4*Lt+3,yt.uint16[nr+5]=4*Lt+0}return yt})(Qt));const Ye=Re.createIndexBuffer(_c,!0),it=Re.createVertexBuffer(ta,t.aS.members,!0);for(const ht of zt){const St=pi(ht.transform,ht.invTransform,ze.transform);Br.draw(Re,ct.TRIANGLES,Bo.disabled,hs.disabled,ze.colorModeForRenderPass(),Fi.disabled,St,ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(ht.coord),ne.id,it,Ye,t.a0.simpleSegment(0,2*ht.circleOffset,ht.circleArray.length,ht.circleArray.length/2),null,ze.transform.zoom,null,null,null)}it.destroy(),Ye.destroy()}Fi.disabled=new Fi(!1,1029,2305),Fi.backCCW=new Fi(!0,1029,2305);const Al=t.an(new Float32Array(16));function Kc(ze,P,ne,we,Se,Re){const{horizontalAlign:ct,verticalAlign:_t}=t.au(ze);return new t.P((-(ct-.5)*P/Se+we[0])*Re,(-(_t-.5)*ne/Se+we[1])*Re)}function sc(ze,P,ne,we,Se,Re){const ct=P.tileAnchorPoint.add(new t.P(P.translation[0],P.translation[1]));if(P.pitchWithMap){let _t=we.mult(Re);ne||(_t=_t.rotate(-Se));const zt=ct.add(_t);return mt(zt.x,zt.y,P.labelPlaneMatrix,P.getElevation).point}if(ne){const _t=bt(P.tileAnchorPoint.x+1,P.tileAnchorPoint.y,P).point.sub(ze),zt=Math.atan(_t.y/_t.x)+(_t.x<0?Math.PI:0);return ze.add(we.rotate(zt))}return ze.add(we)}function Lc(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr,Br,ta){const Ve=ze.text.placedSymbolArray,Ye=ze.text.dynamicLayoutVertexArray,it=ze.icon.dynamicLayoutVertexArray,ht={};Ye.clear();for(let St=0;St<Ve.length;St++){const yt=Ve.get(St),Lt=yt.hidden||!yt.crossTileID||ze.allowVerticalPlacement&&!yt.placedOrientation?null:we[yt.crossTileID];if(Lt){const nr=new t.P(yt.anchorX,yt.anchorY),cr={getElevation:ta,width:Se.width,height:Se.height,labelPlaneMatrix:Re,pitchWithMap:ne,projection:fr,tileAnchorPoint:nr,translation:gr,unwrappedTileID:Br},mr=ne?mt(nr.x,nr.y,ct,ta):bt(nr.x,nr.y,cr),Pr=Fe(Se.cameraToCenterDistance,mr.signedDistanceFromCamera);let Vr=t.ai(ze.textSizeData,zt,yt)*Pr/t.ap;ne&&(Vr*=ze.tilePixelRatio/_t);const{width:oa,height:ca,anchor:Aa,textOffset:$a,textBoxScale:Cn}=Lt,wn=Kc(Aa,oa,ca,$a,Cn,Vr),Ln=fr.getPitchedTextCorrection(Se,nr.add(new t.P(gr[0],gr[1])),Br),ui=sc(mr.point,cr,P,wn,Se.angle,Ln),Mi=ze.allowVerticalPlacement&&yt.placedOrientation===t.ah.vertical?Math.PI/2:0;for(let xi=0;xi<yt.numGlyphs;xi++)t.aj(Ye,ui,Mi);Qt&&yt.associatedIconIndex>=0&&(ht[yt.associatedIconIndex]={shiftedAnchor:ui,angle:Mi})}else ar(yt.numGlyphs,Ye)}if(Qt){it.clear();const St=ze.icon.placedSymbolArray;for(let yt=0;yt<St.length;yt++){const Lt=St.get(yt);if(Lt.hidden)ar(Lt.numGlyphs,it);else{const nr=ht[yt];if(nr)for(let cr=0;cr<Lt.numGlyphs;cr++)t.aj(it,nr.shiftedAnchor,nr.angle);else ar(Lt.numGlyphs,it)}}ze.icon.dynamicLayoutVertexBuffer.updateData(it)}ze.text.dynamicLayoutVertexBuffer.updateData(Ye)}function Dl(ze,P,ne){return ne.iconsInText&&P?"symbolTextAndIcon":ze?"symbolSDF":"symbolIcon"}function yf(ze,P,ne,we,Se,Re,ct,_t,zt,Qt,fr,gr){const Br=ze.context,ta=Br.gl,Ve=ze.transform,Ye=an(),it=_t==="map",ht=zt==="map",St=_t!=="viewport"&&ne.layout.get("symbol-placement")!=="point",yt=it&&!ht&&!St,Lt=!ht&&St,nr=!ne.layout.get("symbol-sort-key").isConstant();let cr=!1;const mr=ze.depthModeForSublayer(0,Bo.ReadOnly),Pr=ne._unevaluatedLayout.hasValue("text-variable-anchor")||ne._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Vr=[],oa=Ye.getCircleRadiusCorrection(Ve);for(const ca of we){const Aa=P.getTile(ca),$a=Aa.getBucket(ne);if(!$a)continue;const Cn=Se?$a.text:$a.icon;if(!Cn||!Cn.segments.get().length||!Cn.hasVisibleVertices)continue;const wn=Cn.programConfigurations.get(ne.id),Ln=Se||$a.sdfIcons,ui=Se?$a.textSizeData:$a.iconSizeData,Mi=ht||Ve.pitch!==0,xi=ze.useProgram(Dl(Ln,Se,$a),wn),Ji=t.ag(ui,Ve.zoom),Zo=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(ca);let Yo,Eo,rs,sl,Qs=[0,0],ko=null;if(Se)Eo=Aa.glyphAtlasTexture,rs=ta.LINEAR,Yo=Aa.glyphAtlasTexture.size,$a.iconsInText&&(Qs=Aa.imageAtlasTexture.size,ko=Aa.imageAtlasTexture,sl=Mi||ze.options.rotating||ze.options.zooming||ui.kind==="composite"||ui.kind==="camera"?ta.LINEAR:ta.NEAREST);else{const Zr=ne.layout.get("icon-size").constantOr(0)!==1||$a.iconsNeedLinear;Eo=Aa.imageAtlasTexture,rs=Ln||ze.options.rotating||ze.options.zooming||Zr||Mi?ta.LINEAR:ta.NEAREST,Yo=Aa.imageAtlasTexture.size}const Co=Ea(Aa,1,ze.transform.zoom),bl=Lt?ca.posMatrix:Al,ql=hr(bl,ht,it,ze.transform,Co),vu=Ar(bl,ht,it,ze.transform,Co),de=Ar(ca.posMatrix,ht,it,ze.transform,Co),Pe=Ye.translatePosition(ze.transform,Aa,Re,ct),Ke=Pr&&$a.hasTextData(),vt=ne.layout.get("icon-text-fit")!=="none"&&Ke&&$a.hasIconData();if(St){const Zr=ze.style.map.terrain?(la,nn)=>ze.style.map.terrain.getElevation(ca,la,nn):null,ia=ne.layout.get("text-rotation-alignment")==="map";Ae($a,ca.posMatrix,ze,Se,ql,de,ht,Qt,ia,Ye,ca.toUnwrapped(),Ve.width,Ve.height,Pe,Zr)}const gt=ca.posMatrix,Tt=Se&&Pr||vt,qt=St||Tt?Al:ql,Vt=vu,or=Ln&&ne.paint.get(Se?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ir;Ir=Ln?$a.iconsInText?po(ui.kind,Ji,yt,ht,St,Tt,ze,gt,qt,Vt,Pe,Yo,Qs,oa):bi(ui.kind,Ji,yt,ht,St,Tt,ze,gt,qt,Vt,Pe,Se,Yo,!0,oa):$i(ui.kind,Ji,yt,ht,St,Tt,ze,gt,qt,Vt,Pe,Se,Yo,oa);const Lr={program:xi,buffers:Cn,uniformValues:Ir,atlasTexture:Eo,atlasTextureIcon:ko,atlasInterpolation:rs,atlasInterpolationIcon:sl,isSDF:Ln,hasHalo:or};if(nr&&$a.canOverlap){cr=!0;const Zr=Cn.segments.get();for(const ia of Zr)Vr.push({segments:new t.a0([ia]),sortKey:ia.sortKey,state:Lr,terrainData:Zo})}else Vr.push({segments:Cn.segments,sortKey:0,state:Lr,terrainData:Zo})}cr&&Vr.sort((ca,Aa)=>ca.sortKey-Aa.sortKey);for(const ca of Vr){const Aa=ca.state;if(Br.activeTexture.set(ta.TEXTURE0),Aa.atlasTexture.bind(Aa.atlasInterpolation,ta.CLAMP_TO_EDGE),Aa.atlasTextureIcon&&(Br.activeTexture.set(ta.TEXTURE1),Aa.atlasTextureIcon&&Aa.atlasTextureIcon.bind(Aa.atlasInterpolationIcon,ta.CLAMP_TO_EDGE)),Aa.isSDF){const $a=Aa.uniformValues;Aa.hasHalo&&($a.u_is_halo=1,rf(Aa.buffers,ca.segments,ne,ze,Aa.program,mr,fr,gr,$a,ca.terrainData)),$a.u_is_halo=0}rf(Aa.buffers,ca.segments,ne,ze,Aa.program,mr,fr,gr,Aa.uniformValues,ca.terrainData)}}function rf(ze,P,ne,we,Se,Re,ct,_t,zt,Qt){const fr=we.context;Se.draw(fr,fr.gl.TRIANGLES,Re,ct,_t,Fi.disabled,zt,Qt,ne.id,ze.layoutVertexBuffer,ze.indexBuffer,P,ne.paint,we.transform.zoom,ze.programConfigurations.get(ne.id),ze.dynamicLayoutVertexBuffer,ze.opacityVertexBuffer)}function Pc(ze,P,ne,we){const Se=ze.context,Re=Se.gl,ct=hs.disabled,_t=new rl([Re.ONE,Re.ONE],t.aM.transparent,[!0,!0,!0,!0]),zt=P.getBucket(ne);if(!zt)return;const Qt=we.key;let fr=ne.heatmapFbos.get(Qt);fr||(fr=$c(Se,P.tileSize,P.tileSize),ne.heatmapFbos.set(Qt,fr)),Se.bindFramebuffer.set(fr.framebuffer),Se.viewport.set([0,0,P.tileSize,P.tileSize]),Se.clear({color:t.aM.transparent});const gr=zt.programConfigurations.get(ne.id),Br=ze.useProgram("heatmap",gr),ta=ze.style.map.terrain.getTerrainData(we);Br.draw(Se,Re.TRIANGLES,Bo.disabled,ct,_t,Fi.disabled,zn(we.posMatrix,P,ze.transform.zoom,ne.paint.get("heatmap-intensity")),ta,ne.id,zt.layoutVertexBuffer,zt.indexBuffer,zt.segments,ne.paint,ze.transform.zoom,gr)}function lc(ze,P,ne){const we=ze.context,Se=we.gl;we.setColorMode(ze.colorModeForRenderPass());const Re=Jc(we,P),ct=ne.key,_t=P.heatmapFbos.get(ct);_t&&(we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,_t.colorAttachment.get()),we.activeTexture.set(Se.TEXTURE1),Re.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),ze.useProgram("heatmapTexture").draw(we,Se.TRIANGLES,Bo.disabled,hs.disabled,ze.colorModeForRenderPass(),Fi.disabled,no(ze,P,0,1),null,P.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments,P.paint,ze.transform.zoom),_t.destroy(),P.heatmapFbos.delete(ct))}function $c(ze,P,ne){var we,Se;const Re=ze.gl,ct=Re.createTexture();Re.bindTexture(Re.TEXTURE_2D,ct),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_S,Re.CLAMP_TO_EDGE),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_WRAP_T,Re.CLAMP_TO_EDGE),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_MIN_FILTER,Re.LINEAR),Re.texParameteri(Re.TEXTURE_2D,Re.TEXTURE_MAG_FILTER,Re.LINEAR);const _t=(we=ze.HALF_FLOAT)!==null&&we!==void 0?we:Re.UNSIGNED_BYTE,zt=(Se=ze.RGBA16F)!==null&&Se!==void 0?Se:Re.RGBA;Re.texImage2D(Re.TEXTURE_2D,0,zt,P,ne,0,Re.RGBA,_t,null);const Qt=ze.createFramebuffer(P,ne,!1,!1);return Qt.colorAttachment.set(ct),Qt}function Jc(ze,P){return P.colorRampTexture||(P.colorRampTexture=new u(ze,P.colorRamp,ze.gl.RGBA)),P.colorRampTexture}function ku(ze,P,ne,we,Se){if(!ne||!we||!we.imageAtlas)return;const Re=we.imageAtlas.patternPositions;let ct=Re[ne.to.toString()],_t=Re[ne.from.toString()];if(!ct&&_t&&(ct=_t),!_t&&ct&&(_t=ct),!ct||!_t){const zt=Se.getPaintProperty(P);ct=Re[zt],_t=Re[zt]}ct&&_t&&ze.setConstantPatternPositions(ct,_t)}function af(ze,P,ne,we,Se,Re,ct){const _t=ze.context.gl,zt="fill-pattern",Qt=ne.paint.get(zt),fr=Qt&&Qt.constantOr(1),gr=ne.getCrossfadeParameters();let Br,ta,Ve,Ye,it;ct?(ta=fr&&!ne.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Br=_t.LINES):(ta=fr?"fillPattern":"fill",Br=_t.TRIANGLES);const ht=Qt.constantOr(null);for(const St of we){const yt=P.getTile(St);if(fr&&!yt.patternsLoaded())continue;const Lt=yt.getBucket(ne);if(!Lt)continue;const nr=Lt.programConfigurations.get(ne.id),cr=ze.useProgram(ta,nr),mr=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(St);fr&&(ze.context.activeTexture.set(_t.TEXTURE0),yt.imageAtlasTexture.bind(_t.LINEAR,_t.CLAMP_TO_EDGE),nr.updatePaintBuffers(gr)),ku(nr,zt,ht,yt,ne);const Pr=mr?St:null,Vr=ze.translatePosMatrix(Pr?Pr.posMatrix:St.posMatrix,yt,ne.paint.get("fill-translate"),ne.paint.get("fill-translate-anchor"));if(ct){Ye=Lt.indexBuffer2,it=Lt.segments2;const oa=[_t.drawingBufferWidth,_t.drawingBufferHeight];Ve=ta==="fillOutlinePattern"&&fr?Zn(Vr,ze,gr,yt,oa):tn(Vr,oa)}else Ye=Lt.indexBuffer,it=Lt.segments,Ve=fr?jn(Vr,ze,gr,yt):ha(Vr);cr.draw(ze.context,Br,Se,ze.stencilModeForClipping(St),Re,Fi.disabled,Ve,mr,ne.id,Lt.layoutVertexBuffer,Ye,it,ne.paint,ze.transform.zoom,nr)}}function Ku(ze,P,ne,we,Se,Re,ct){const _t=ze.context,zt=_t.gl,Qt="fill-extrusion-pattern",fr=ne.paint.get(Qt),gr=fr.constantOr(1),Br=ne.getCrossfadeParameters(),ta=ne.paint.get("fill-extrusion-opacity"),Ve=fr.constantOr(null);for(const Ye of we){const it=P.getTile(Ye),ht=it.getBucket(ne);if(!ht)continue;const St=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(Ye),yt=ht.programConfigurations.get(ne.id),Lt=ze.useProgram(gr?"fillExtrusionPattern":"fillExtrusion",yt);gr&&(ze.context.activeTexture.set(zt.TEXTURE0),it.imageAtlasTexture.bind(zt.LINEAR,zt.CLAMP_TO_EDGE),yt.updatePaintBuffers(Br)),ku(yt,Qt,Ve,it,ne);const nr=ze.translatePosMatrix(Ye.posMatrix,it,ne.paint.get("fill-extrusion-translate"),ne.paint.get("fill-extrusion-translate-anchor")),cr=ne.paint.get("fill-extrusion-vertical-gradient"),mr=gr?Wr(nr,ze,cr,ta,Ye,Br,it):_a(nr,ze,cr,ta);Lt.draw(_t,_t.gl.TRIANGLES,Se,Re,ct,Fi.backCCW,mr,St,ne.id,ht.layoutVertexBuffer,ht.indexBuffer,ht.segments,ne.paint,ze.transform.zoom,yt,ze.style.map.terrain&&ht.centroidVertexBuffer)}}function Ou(ze,P,ne,we,Se,Re,ct){const _t=ze.context,zt=_t.gl,Qt=ne.fbo;if(!Qt)return;const fr=ze.useProgram("hillshade"),gr=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(P);_t.activeTexture.set(zt.TEXTURE0),zt.bindTexture(zt.TEXTURE_2D,Qt.colorAttachment.get()),fr.draw(_t,zt.TRIANGLES,Se,Re,ct,Fi.disabled,((Br,ta,Ve,Ye)=>{const it=Ve.paint.get("hillshade-shadow-color"),ht=Ve.paint.get("hillshade-highlight-color"),St=Ve.paint.get("hillshade-accent-color");let yt=Ve.paint.get("hillshade-illumination-direction")*(Math.PI/180);Ve.paint.get("hillshade-illumination-anchor")==="viewport"&&(yt-=Br.transform.angle);const Lt=!Br.options.moving;return{u_matrix:Ye?Ye.posMatrix:Br.transform.calculatePosMatrix(ta.tileID.toUnwrapped(),Lt),u_image:0,u_latrange:Xi(0,ta.tileID),u_light:[Ve.paint.get("hillshade-exaggeration"),yt],u_shadow:it,u_highlight:ht,u_accent:St}})(ze,ne,we,gr?P:null),gr,we.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments)}function zl(ze,P,ne,we,Se,Re){const ct=ze.context,_t=ct.gl,zt=P.dem;if(zt&&zt.data){const Qt=zt.dim,fr=zt.stride,gr=zt.getPixels();if(ct.activeTexture.set(_t.TEXTURE1),ct.pixelStoreUnpackPremultiplyAlpha.set(!1),P.demTexture=P.demTexture||ze.getTileTexture(fr),P.demTexture){const ta=P.demTexture;ta.update(gr,{premultiply:!1}),ta.bind(_t.NEAREST,_t.CLAMP_TO_EDGE)}else P.demTexture=new u(ct,gr,_t.RGBA,{premultiply:!1}),P.demTexture.bind(_t.NEAREST,_t.CLAMP_TO_EDGE);ct.activeTexture.set(_t.TEXTURE0);let Br=P.fbo;if(!Br){const ta=new u(ct,{width:Qt,height:Qt,data:null},_t.RGBA);ta.bind(_t.LINEAR,_t.CLAMP_TO_EDGE),Br=P.fbo=ct.createFramebuffer(Qt,Qt,!0,!1),Br.colorAttachment.set(ta.texture)}ct.bindFramebuffer.set(Br.framebuffer),ct.viewport.set([0,0,Qt,Qt]),ze.useProgram("hillshadePrepare").draw(ct,_t.TRIANGLES,we,Se,Re,Fi.disabled,((ta,Ve)=>{const Ye=Ve.stride,it=t.H();return t.aP(it,0,t.X,-t.X,0,0,1),t.J(it,it,[0,-t.X,0]),{u_matrix:it,u_image:1,u_dimension:[Ye,Ye],u_zoom:ta.overscaledZ,u_unpack:Ve.getUnpackVector()}})(P.tileID,zt),null,ne.id,ze.rasterBoundsBuffer,ze.quadTriangleIndexBuffer,ze.rasterBoundsSegments),P.needsHillshadePrepare=!1}}function pc(ze,P,ne,we,Se,Re){const ct=we.paint.get("raster-fade-duration");if(!Re&&ct>0){const _t=i.now(),zt=(_t-ze.timeAdded)/ct,Qt=P?(_t-P.timeAdded)/ct:-1,fr=ne.getSource(),gr=Se.coveringZoomLevel({tileSize:fr.tileSize,roundZoom:fr.roundZoom}),Br=!P||Math.abs(P.tileID.overscaledZ-gr)>Math.abs(ze.tileID.overscaledZ-gr),ta=Br&&ze.refreshedUponExpiration?1:t.ac(Br?zt:1-Qt,0,1);return ze.refreshedUponExpiration&&zt>=1&&(ze.refreshedUponExpiration=!1),P?{opacity:1,mix:1-ta}:{opacity:ta,mix:0}}return{opacity:1,mix:0}}const Qc=new t.aM(1,0,0,1),Ds=new t.aM(0,1,0,1),Bc=new t.aM(0,0,1,1),Cf=new t.aM(1,0,1,1),nf=new t.aM(0,1,1,1);function Ic(ze,P,ne,we){lu(ze,0,P+ne/2,ze.transform.width,ne,we)}function of(ze,P,ne,we){lu(ze,P-ne/2,0,ne,ze.transform.height,we)}function lu(ze,P,ne,we,Se,Re){const ct=ze.context,_t=ct.gl;_t.enable(_t.SCISSOR_TEST),_t.scissor(P*ze.pixelRatio,ne*ze.pixelRatio,we*ze.pixelRatio,Se*ze.pixelRatio),ct.clear({color:Re}),_t.disable(_t.SCISSOR_TEST)}function sf(ze,P,ne){const we=ze.context,Se=we.gl,Re=ne.posMatrix,ct=ze.useProgram("debug"),_t=Bo.disabled,zt=hs.disabled,Qt=ze.colorModeForRenderPass(),fr="$debug",gr=ze.style.map.terrain&&ze.style.map.terrain.getTerrainData(ne);we.activeTexture.set(Se.TEXTURE0);const Br=P.getTileByID(ne.key).latestRawTileData,ta=Math.floor((Br&&Br.byteLength||0)/1024),Ve=P.getTile(ne).tileSize,Ye=512/Math.min(Ve,512)*(ne.overscaledZ/ze.transform.zoom)*.5;let it=ne.canonical.toString();ne.overscaledZ!==ne.canonical.z&&(it+=` => ${ne.overscaledZ}`),(function(ht,St){ht.initDebugOverlayCanvas();const yt=ht.debugOverlayCanvas,Lt=ht.context.gl,nr=ht.debugOverlayCanvas.getContext("2d");nr.clearRect(0,0,yt.width,yt.height),nr.shadowColor="white",nr.shadowBlur=2,nr.lineWidth=1.5,nr.strokeStyle="white",nr.textBaseline="top",nr.font="bold 36px Open Sans, sans-serif",nr.fillText(St,5,5),nr.strokeText(St,5,5),ht.debugOverlayTexture.update(yt),ht.debugOverlayTexture.bind(Lt.LINEAR,Lt.CLAMP_TO_EDGE)})(ze,`${it} ${ta}kB`),ct.draw(we,Se.TRIANGLES,_t,zt,rl.alphaBlended,Fi.disabled,di(Re,t.aM.transparent,Ye),null,fr,ze.debugBuffer,ze.quadTriangleIndexBuffer,ze.debugSegments),ct.draw(we,Se.LINE_STRIP,_t,zt,Qt,Fi.disabled,di(Re,t.aM.red),gr,fr,ze.debugBuffer,ze.tileBorderIndexBuffer,ze.debugSegments)}function ul(ze,P,ne){const we=ze.context,Se=we.gl,Re=ze.colorModeForRenderPass(),ct=new Bo(Se.LEQUAL,Bo.ReadWrite,ze.depthRangeFor3D),_t=ze.useProgram("terrain"),zt=P.getTerrainMesh();we.bindFramebuffer.set(null),we.viewport.set([0,0,ze.width,ze.height]);for(const Qt of ne){const fr=ze.renderToTexture.getTexture(Qt),gr=P.getTerrainData(Qt.tileID);we.activeTexture.set(Se.TEXTURE0),Se.bindTexture(Se.TEXTURE_2D,fr.texture);const Br=ze.transform.calculatePosMatrix(Qt.tileID.toUnwrapped()),ta=P.getMeshFrameDelta(ze.transform.zoom),Ve=ze.transform.calculateFogMatrix(Qt.tileID.toUnwrapped()),Ye=xr(Br,ta,Ve,ze.style.sky,ze.transform.pitch);_t.draw(we,Se.TRIANGLES,ct,hs.disabled,Re,Fi.backCCW,Ye,gr,"terrain",zt.vertexBuffer,zt.indexBuffer,zt.segments)}}class uu{constructor(P,ne,we){this.vertexBuffer=P,this.indexBuffer=ne,this.segments=we}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class uc{constructor(P,ne){this.context=new kf(P),this.transform=ne,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Ct.maxUnderzooming+Ct.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Sr}resize(P,ne,we){if(this.width=Math.floor(P*we),this.height=Math.floor(ne*we),this.pixelRatio=we,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const Se of this.style._order)this.style._layers[Se].resize()}setup(){const P=this.context,ne=new t.aX;ne.emplaceBack(0,0),ne.emplaceBack(t.X,0),ne.emplaceBack(0,t.X),ne.emplaceBack(t.X,t.X),this.tileExtentBuffer=P.createVertexBuffer(ne,Gr.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);const we=new t.aX;we.emplaceBack(0,0),we.emplaceBack(t.X,0),we.emplaceBack(0,t.X),we.emplaceBack(t.X,t.X),this.debugBuffer=P.createVertexBuffer(we,Gr.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);const Se=new t.$;Se.emplaceBack(0,0,0,0),Se.emplaceBack(t.X,0,t.X,0),Se.emplaceBack(0,t.X,0,t.X),Se.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=P.createVertexBuffer(Se,je.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);const Re=new t.aX;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=P.createVertexBuffer(Re,Gr.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);const ct=new t.aZ;ct.emplaceBack(0),ct.emplaceBack(1),ct.emplaceBack(3),ct.emplaceBack(2),ct.emplaceBack(0),this.tileBorderIndexBuffer=P.createIndexBuffer(ct);const _t=new t.aY;_t.emplaceBack(0,1,2),_t.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=P.createIndexBuffer(_t);const zt=this.context.gl;this.stencilClearMode=new hs({func:zt.ALWAYS,mask:0},0,255,zt.ZERO,zt.ZERO,zt.ZERO)}clearStencil(){const P=this.context,ne=P.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const we=t.H();t.aP(we,0,this.width,this.height,0,0,1),t.K(we,we,[ne.drawingBufferWidth,ne.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(P,ne.TRIANGLES,Bo.disabled,this.stencilClearMode,rl.disabled,Fi.disabled,ki(we),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(P,ne){if(this.currentStencilSource===P.source||!P.isTileClipped()||!ne||!ne.length)return;this.currentStencilSource=P.source;const we=this.context,Se=we.gl;this.nextStencilID+ne.length>256&&this.clearStencil(),we.setColorMode(rl.disabled),we.setDepthMode(Bo.disabled);const Re=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ct of ne){const _t=this._tileClippingMaskIDs[ct.key]=this.nextStencilID++,zt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(ct);Re.draw(we,Se.TRIANGLES,Bo.disabled,new hs({func:Se.ALWAYS,mask:0},_t,255,Se.KEEP,Se.KEEP,Se.REPLACE),rl.disabled,Fi.disabled,ki(ct.posMatrix),zt,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const P=this.nextStencilID++,ne=this.context.gl;return new hs({func:ne.NOTEQUAL,mask:255},P,255,ne.KEEP,ne.KEEP,ne.REPLACE)}stencilModeForClipping(P){const ne=this.context.gl;return new hs({func:ne.EQUAL,mask:255},this._tileClippingMaskIDs[P.key],0,ne.KEEP,ne.KEEP,ne.REPLACE)}stencilConfigForOverlap(P){const ne=this.context.gl,we=P.sort((ct,_t)=>_t.overscaledZ-ct.overscaledZ),Se=we[we.length-1].overscaledZ,Re=we[0].overscaledZ-Se+1;if(Re>1){this.currentStencilSource=void 0,this.nextStencilID+Re>256&&this.clearStencil();const ct={};for(let _t=0;_t<Re;_t++)ct[_t+Se]=new hs({func:ne.GEQUAL,mask:255},_t+this.nextStencilID,255,ne.KEEP,ne.KEEP,ne.REPLACE);return this.nextStencilID+=Re,[ct,we]}return[{[Se]:hs.disabled},we]}colorModeForRenderPass(){const P=this.context.gl;return this._showOverdrawInspector?new rl([P.CONSTANT_COLOR,P.ONE],new t.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?rl.unblended:rl.alphaBlended}depthModeForSublayer(P,ne,we){if(!this.opaquePassEnabledForLayer())return Bo.disabled;const Se=1-((1+this.currentLayer)*this.numSublayers+P)*this.depthEpsilon;return new Bo(we||this.context.gl.LEQUAL,ne,[Se,Se])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(P,ne){this.style=P,this.options=ne,this.lineAtlas=P.lineAtlas,this.imageManager=P.imageManager,this.glyphManager=P.glyphManager,this.symbolFadeChange=P.placement.symbolFadeChange(i.now()),this.imageManager.beginFrame();const we=this.style._order,Se=this.style.sourceCaches,Re={},ct={},_t={};for(const zt in Se){const Qt=Se[zt];Qt.used&&Qt.prepare(this.context),Re[zt]=Qt.getVisibleCoordinates(),ct[zt]=Re[zt].slice().reverse(),_t[zt]=Qt.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let zt=0;zt<we.length;zt++)if(this.style._layers[we[zt]].is3D()){this.opaquePassCutoff=zt;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const zt of we){const Qt=this.style._layers[zt];if(!Qt.hasOffscreenPass()||Qt.isHidden(this.transform.zoom))continue;const fr=ct[Qt.source];(Qt.type==="custom"||fr.length)&&this.renderLayer(this,Se[Qt.source],Qt,fr)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:ne.showOverdrawInspector?t.aM.black:t.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(zt,Qt){const fr=zt.context,gr=fr.gl,Br=((ht,St,yt)=>({u_sky_color:ht.properties.get("sky-color"),u_horizon_color:ht.properties.get("horizon-color"),u_horizon:(St.height/2+St.getHorizon())*yt,u_sky_horizon_blend:ht.properties.get("sky-horizon-blend")*St.height/2*yt}))(Qt,zt.style.map.transform,zt.pixelRatio),ta=new Bo(gr.LEQUAL,Bo.ReadWrite,[0,1]),Ve=hs.disabled,Ye=zt.colorModeForRenderPass(),it=zt.useProgram("sky");if(!Qt.mesh){const ht=new t.aX;ht.emplaceBack(-1,-1),ht.emplaceBack(1,-1),ht.emplaceBack(1,1),ht.emplaceBack(-1,1);const St=new t.aY;St.emplaceBack(0,1,2),St.emplaceBack(0,2,3),Qt.mesh=new uu(fr.createVertexBuffer(ht,Gr.members),fr.createIndexBuffer(St),t.a0.simpleSegment(0,0,ht.length,St.length))}it.draw(fr,gr.TRIANGLES,ta,Ve,Ye,Fi.disabled,Br,void 0,"sky",Qt.mesh.vertexBuffer,Qt.mesh.indexBuffer,Qt.mesh.segments)})(this,this.style.sky),this._showOverdrawInspector=ne.showOverdrawInspector,this.depthRangeFor3D=[0,1-(P._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=we.length-1;this.currentLayer>=0;this.currentLayer--){const zt=this.style._layers[we[this.currentLayer]],Qt=Se[zt.source],fr=Re[zt.source];this._renderTileClippingMasks(zt,fr),this.renderLayer(this,Qt,zt,fr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<we.length;this.currentLayer++){const zt=this.style._layers[we[this.currentLayer]],Qt=Se[zt.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(zt))continue;const fr=(zt.type==="symbol"?_t:ct)[zt.source];this._renderTileClippingMasks(zt,Re[zt.source]),this.renderLayer(this,Qt,zt,fr)}if(this.options.showTileBoundaries){const zt=(function(Qt,fr){let gr=null;const Br=Object.values(Qt._layers).flatMap(it=>it.source&&!it.isHidden(fr)?[Qt.sourceCaches[it.source]]:[]),ta=Br.filter(it=>it.getSource().type==="vector"),Ve=Br.filter(it=>it.getSource().type!=="vector"),Ye=it=>{(!gr||gr.getSource().maxzoom<it.getSource().maxzoom)&&(gr=it)};return ta.forEach(it=>Ye(it)),gr||Ve.forEach(it=>Ye(it)),gr})(this.style,this.transform.zoom);zt&&(function(Qt,fr,gr){for(let Br=0;Br<gr.length;Br++)sf(Qt,fr,gr[Br])})(this,zt,zt.getVisibleCoordinates())}this.options.showPadding&&(function(zt){const Qt=zt.transform.padding;Ic(zt,zt.transform.height-(Qt.top||0),3,Qc),Ic(zt,Qt.bottom||0,3,Ds),of(zt,Qt.left||0,3,Bc),of(zt,zt.transform.width-(Qt.right||0),3,Cf);const fr=zt.transform.centerPoint;(function(gr,Br,ta,Ve){lu(gr,Br-1,ta-10,2,20,Ve),lu(gr,Br-10,ta-1,20,2,Ve)})(zt,fr.x,zt.transform.height-fr.y,nf)})(this),this.context.setDefault()}maybeDrawDepthAndCoords(P){if(!this.style||!this.style.map||!this.style.map.terrain)return;const ne=this.terrainFacilitator.matrix,we=this.transform.modelViewProjectionMatrix;let Se=this.terrainFacilitator.dirty;Se||(Se=P?!t.a_(ne,we):!t.a$(ne,we)),Se||(Se=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Se&&(t.b0(ne,we),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(Re,ct){const _t=Re.context,zt=_t.gl,Qt=rl.unblended,fr=new Bo(zt.LEQUAL,Bo.ReadWrite,[0,1]),gr=ct.getTerrainMesh(),Br=ct.sourceCache.getRenderableTiles(),ta=Re.useProgram("terrainDepth");_t.bindFramebuffer.set(ct.getFramebuffer("depth").framebuffer),_t.viewport.set([0,0,Re.width/devicePixelRatio,Re.height/devicePixelRatio]),_t.clear({color:t.aM.transparent,depth:1});for(const Ve of Br){const Ye=ct.getTerrainData(Ve.tileID),it={u_matrix:Re.transform.calculatePosMatrix(Ve.tileID.toUnwrapped()),u_ele_delta:ct.getMeshFrameDelta(Re.transform.zoom)};ta.draw(_t,zt.TRIANGLES,fr,hs.disabled,Qt,Fi.backCCW,it,Ye,"terrain",gr.vertexBuffer,gr.indexBuffer,gr.segments)}_t.bindFramebuffer.set(null),_t.viewport.set([0,0,Re.width,Re.height])})(this,this.style.map.terrain),(function(Re,ct){const _t=Re.context,zt=_t.gl,Qt=rl.unblended,fr=new Bo(zt.LEQUAL,Bo.ReadWrite,[0,1]),gr=ct.getTerrainMesh(),Br=ct.getCoordsTexture(),ta=ct.sourceCache.getRenderableTiles(),Ve=Re.useProgram("terrainCoords");_t.bindFramebuffer.set(ct.getFramebuffer("coords").framebuffer),_t.viewport.set([0,0,Re.width/devicePixelRatio,Re.height/devicePixelRatio]),_t.clear({color:t.aM.transparent,depth:1}),ct.coordsIndex=[];for(const Ye of ta){const it=ct.getTerrainData(Ye.tileID);_t.activeTexture.set(zt.TEXTURE0),zt.bindTexture(zt.TEXTURE_2D,Br.texture);const ht={u_matrix:Re.transform.calculatePosMatrix(Ye.tileID.toUnwrapped()),u_terrain_coords_id:(255-ct.coordsIndex.length)/255,u_texture:0,u_ele_delta:ct.getMeshFrameDelta(Re.transform.zoom)};Ve.draw(_t,zt.TRIANGLES,fr,hs.disabled,Qt,Fi.backCCW,ht,it,"terrain",gr.vertexBuffer,gr.indexBuffer,gr.segments),ct.coordsIndex.push(Ye.tileID.key)}_t.bindFramebuffer.set(null),_t.viewport.set([0,0,Re.width,Re.height])})(this,this.style.map.terrain))}renderLayer(P,ne,we,Se){if(!we.isHidden(this.transform.zoom)&&(we.type==="background"||we.type==="custom"||(Se||[]).length))switch(this.id=we.id,we.type){case"symbol":(function(Re,ct,_t,zt,Qt){if(Re.renderPass!=="translucent")return;const fr=hs.disabled,gr=Re.colorModeForRenderPass();(_t._unevaluatedLayout.hasValue("text-variable-anchor")||_t._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(Br,ta,Ve,Ye,it,ht,St,yt,Lt){const nr=ta.transform,cr=an(),mr=it==="map",Pr=ht==="map";for(const Vr of Br){const oa=Ye.getTile(Vr),ca=oa.getBucket(Ve);if(!ca||!ca.text||!ca.text.segments.get().length)continue;const Aa=t.ag(ca.textSizeData,nr.zoom),$a=Ea(oa,1,ta.transform.zoom),Cn=hr(Vr.posMatrix,Pr,mr,ta.transform,$a),wn=Ve.layout.get("icon-text-fit")!=="none"&&ca.hasIconData();if(Aa){const Ln=Math.pow(2,nr.zoom-oa.tileID.overscaledZ),ui=ta.style.map.terrain?(xi,Ji)=>ta.style.map.terrain.getElevation(Vr,xi,Ji):null,Mi=cr.translatePosition(nr,oa,St,yt);Lc(ca,mr,Pr,Lt,nr,Cn,Vr.posMatrix,Ln,Aa,wn,cr,Mi,Vr.toUnwrapped(),ui)}}})(zt,Re,_t,ct,_t.layout.get("text-rotation-alignment"),_t.layout.get("text-pitch-alignment"),_t.paint.get("text-translate"),_t.paint.get("text-translate-anchor"),Qt),_t.paint.get("icon-opacity").constantOr(1)!==0&&yf(Re,ct,_t,zt,!1,_t.paint.get("icon-translate"),_t.paint.get("icon-translate-anchor"),_t.layout.get("icon-rotation-alignment"),_t.layout.get("icon-pitch-alignment"),_t.layout.get("icon-keep-upright"),fr,gr),_t.paint.get("text-opacity").constantOr(1)!==0&&yf(Re,ct,_t,zt,!0,_t.paint.get("text-translate"),_t.paint.get("text-translate-anchor"),_t.layout.get("text-rotation-alignment"),_t.layout.get("text-pitch-alignment"),_t.layout.get("text-keep-upright"),fr,gr),ct.map.showCollisionBoxes&&(Eu(Re,ct,_t,zt,!0),Eu(Re,ct,_t,zt,!1))})(P,ne,we,Se,this.style.placement.variableOffsets);break;case"circle":(function(Re,ct,_t,zt){if(Re.renderPass!=="translucent")return;const Qt=_t.paint.get("circle-opacity"),fr=_t.paint.get("circle-stroke-width"),gr=_t.paint.get("circle-stroke-opacity"),Br=!_t.layout.get("circle-sort-key").isConstant();if(Qt.constantOr(1)===0&&(fr.constantOr(1)===0||gr.constantOr(1)===0))return;const ta=Re.context,Ve=ta.gl,Ye=Re.depthModeForSublayer(0,Bo.ReadOnly),it=hs.disabled,ht=Re.colorModeForRenderPass(),St=[];for(let yt=0;yt<zt.length;yt++){const Lt=zt[yt],nr=ct.getTile(Lt),cr=nr.getBucket(_t);if(!cr)continue;const mr=cr.programConfigurations.get(_t.id),Pr=Re.useProgram("circle",mr),Vr=cr.layoutVertexBuffer,oa=cr.indexBuffer,ca=Re.style.map.terrain&&Re.style.map.terrain.getTerrainData(Lt),Aa={programConfiguration:mr,program:Pr,layoutVertexBuffer:Vr,indexBuffer:oa,uniformValues:ii(Re,Lt,nr,_t),terrainData:ca};if(Br){const $a=cr.segments.get();for(const Cn of $a)St.push({segments:new t.a0([Cn]),sortKey:Cn.sortKey,state:Aa})}else St.push({segments:cr.segments,sortKey:0,state:Aa})}Br&&St.sort((yt,Lt)=>yt.sortKey-Lt.sortKey);for(const yt of St){const{programConfiguration:Lt,program:nr,layoutVertexBuffer:cr,indexBuffer:mr,uniformValues:Pr,terrainData:Vr}=yt.state;nr.draw(ta,Ve.TRIANGLES,Ye,it,ht,Fi.disabled,Pr,Vr,_t.id,cr,mr,yt.segments,_t.paint,Re.transform.zoom,Lt)}})(P,ne,we,Se);break;case"heatmap":(function(Re,ct,_t,zt){if(_t.paint.get("heatmap-opacity")===0)return;const Qt=Re.context;if(Re.style.map.terrain){for(const fr of zt){const gr=ct.getTile(fr);ct.hasRenderableParent(fr)||(Re.renderPass==="offscreen"?Pc(Re,gr,_t,fr):Re.renderPass==="translucent"&&lc(Re,_t,fr))}Qt.viewport.set([0,0,Re.width,Re.height])}else Re.renderPass==="offscreen"?(function(fr,gr,Br,ta){const Ve=fr.context,Ye=Ve.gl,it=hs.disabled,ht=new rl([Ye.ONE,Ye.ONE],t.aM.transparent,[!0,!0,!0,!0]);(function(St,yt,Lt){const nr=St.gl;St.activeTexture.set(nr.TEXTURE1),St.viewport.set([0,0,yt.width/4,yt.height/4]);let cr=Lt.heatmapFbos.get(t.aU);cr?(nr.bindTexture(nr.TEXTURE_2D,cr.colorAttachment.get()),St.bindFramebuffer.set(cr.framebuffer)):(cr=$c(St,yt.width/4,yt.height/4),Lt.heatmapFbos.set(t.aU,cr))})(Ve,fr,Br),Ve.clear({color:t.aM.transparent});for(let St=0;St<ta.length;St++){const yt=ta[St];if(gr.hasRenderableParent(yt))continue;const Lt=gr.getTile(yt),nr=Lt.getBucket(Br);if(!nr)continue;const cr=nr.programConfigurations.get(Br.id),mr=fr.useProgram("heatmap",cr),{zoom:Pr}=fr.transform;mr.draw(Ve,Ye.TRIANGLES,Bo.disabled,it,ht,Fi.disabled,zn(yt.posMatrix,Lt,Pr,Br.paint.get("heatmap-intensity")),null,Br.id,nr.layoutVertexBuffer,nr.indexBuffer,nr.segments,Br.paint,fr.transform.zoom,cr)}Ve.viewport.set([0,0,fr.width,fr.height])})(Re,ct,_t,zt):Re.renderPass==="translucent"&&(function(fr,gr){const Br=fr.context,ta=Br.gl;Br.setColorMode(fr.colorModeForRenderPass());const Ve=gr.heatmapFbos.get(t.aU);Ve&&(Br.activeTexture.set(ta.TEXTURE0),ta.bindTexture(ta.TEXTURE_2D,Ve.colorAttachment.get()),Br.activeTexture.set(ta.TEXTURE1),Jc(Br,gr).bind(ta.LINEAR,ta.CLAMP_TO_EDGE),fr.useProgram("heatmapTexture").draw(Br,ta.TRIANGLES,Bo.disabled,hs.disabled,fr.colorModeForRenderPass(),Fi.disabled,no(fr,gr,0,1),null,gr.id,fr.viewportBuffer,fr.quadTriangleIndexBuffer,fr.viewportSegments,gr.paint,fr.transform.zoom))})(Re,_t)})(P,ne,we,Se);break;case"line":(function(Re,ct,_t,zt){if(Re.renderPass!=="translucent")return;const Qt=_t.paint.get("line-opacity"),fr=_t.paint.get("line-width");if(Qt.constantOr(1)===0||fr.constantOr(1)===0)return;const gr=Re.depthModeForSublayer(0,Bo.ReadOnly),Br=Re.colorModeForRenderPass(),ta=_t.paint.get("line-dasharray"),Ve=_t.paint.get("line-pattern"),Ye=Ve.constantOr(1),it=_t.paint.get("line-gradient"),ht=_t.getCrossfadeParameters(),St=Ye?"linePattern":ta?"lineSDF":it?"lineGradient":"line",yt=Re.context,Lt=yt.gl;let nr=!0;for(const cr of zt){const mr=ct.getTile(cr);if(Ye&&!mr.patternsLoaded())continue;const Pr=mr.getBucket(_t);if(!Pr)continue;const Vr=Pr.programConfigurations.get(_t.id),oa=Re.context.program.get(),ca=Re.useProgram(St,Vr),Aa=nr||ca.program!==oa,$a=Re.style.map.terrain&&Re.style.map.terrain.getTerrainData(cr),Cn=Ve.constantOr(null);if(Cn&&mr.imageAtlas){const ui=mr.imageAtlas,Mi=ui.patternPositions[Cn.to.toString()],xi=ui.patternPositions[Cn.from.toString()];Mi&&xi&&Vr.setConstantPatternPositions(Mi,xi)}const wn=$a?cr:null,Ln=Ye?to(Re,mr,_t,ht,wn):ta?Gi(Re,mr,_t,ta,ht,wn):it?ho(Re,mr,_t,Pr.lineClipsArray.length,wn):Go(Re,mr,_t,wn);if(Ye)yt.activeTexture.set(Lt.TEXTURE0),mr.imageAtlasTexture.bind(Lt.LINEAR,Lt.CLAMP_TO_EDGE),Vr.updatePaintBuffers(ht);else if(ta&&(Aa||Re.lineAtlas.dirty))yt.activeTexture.set(Lt.TEXTURE0),Re.lineAtlas.bind(yt);else if(it){const ui=Pr.gradients[_t.id];let Mi=ui.texture;if(_t.gradientVersion!==ui.version){let xi=256;if(_t.stepInterpolant){const Ji=ct.getSource().maxzoom,Zo=cr.canonical.z===Ji?Math.ceil(1<<Re.transform.maxZoom-cr.canonical.z):1;xi=t.ac(t.aV(Pr.maxLineLength/t.X*1024*Zo),256,yt.maxTextureSize)}ui.gradient=t.aW({expression:_t.gradientExpression(),evaluationKey:"lineProgress",resolution:xi,image:ui.gradient||void 0,clips:Pr.lineClipsArray}),ui.texture?ui.texture.update(ui.gradient):ui.texture=new u(yt,ui.gradient,Lt.RGBA),ui.version=_t.gradientVersion,Mi=ui.texture}yt.activeTexture.set(Lt.TEXTURE0),Mi.bind(_t.stepInterpolant?Lt.NEAREST:Lt.LINEAR,Lt.CLAMP_TO_EDGE)}ca.draw(yt,Lt.TRIANGLES,gr,Re.stencilModeForClipping(cr),Br,Fi.disabled,Ln,$a,_t.id,Pr.layoutVertexBuffer,Pr.indexBuffer,Pr.segments,_t.paint,Re.transform.zoom,Vr,Pr.layoutVertexBuffer2),nr=!1}})(P,ne,we,Se);break;case"fill":(function(Re,ct,_t,zt){const Qt=_t.paint.get("fill-color"),fr=_t.paint.get("fill-opacity");if(fr.constantOr(1)===0)return;const gr=Re.colorModeForRenderPass(),Br=_t.paint.get("fill-pattern"),ta=Re.opaquePassEnabledForLayer()&&!Br.constantOr(1)&&Qt.constantOr(t.aM.transparent).a===1&&fr.constantOr(0)===1?"opaque":"translucent";if(Re.renderPass===ta){const Ve=Re.depthModeForSublayer(1,Re.renderPass==="opaque"?Bo.ReadWrite:Bo.ReadOnly);af(Re,ct,_t,zt,Ve,gr,!1)}if(Re.renderPass==="translucent"&&_t.paint.get("fill-antialias")){const Ve=Re.depthModeForSublayer(_t.getPaintProperty("fill-outline-color")?2:0,Bo.ReadOnly);af(Re,ct,_t,zt,Ve,gr,!0)}})(P,ne,we,Se);break;case"fill-extrusion":(function(Re,ct,_t,zt){const Qt=_t.paint.get("fill-extrusion-opacity");if(Qt!==0&&Re.renderPass==="translucent"){const fr=new Bo(Re.context.gl.LEQUAL,Bo.ReadWrite,Re.depthRangeFor3D);if(Qt!==1||_t.paint.get("fill-extrusion-pattern").constantOr(1))Ku(Re,ct,_t,zt,fr,hs.disabled,rl.disabled),Ku(Re,ct,_t,zt,fr,Re.stencilModeFor3D(),Re.colorModeForRenderPass());else{const gr=Re.colorModeForRenderPass();Ku(Re,ct,_t,zt,fr,hs.disabled,gr)}}})(P,ne,we,Se);break;case"hillshade":(function(Re,ct,_t,zt){if(Re.renderPass!=="offscreen"&&Re.renderPass!=="translucent")return;const Qt=Re.context,fr=Re.depthModeForSublayer(0,Bo.ReadOnly),gr=Re.colorModeForRenderPass(),[Br,ta]=Re.renderPass==="translucent"?Re.stencilConfigForOverlap(zt):[{},zt];for(const Ve of ta){const Ye=ct.getTile(Ve);Ye.needsHillshadePrepare!==void 0&&Ye.needsHillshadePrepare&&Re.renderPass==="offscreen"?zl(Re,Ye,_t,fr,hs.disabled,gr):Re.renderPass==="translucent"&&Ou(Re,Ve,Ye,_t,fr,Br[Ve.overscaledZ],gr)}Qt.viewport.set([0,0,Re.width,Re.height])})(P,ne,we,Se);break;case"raster":(function(Re,ct,_t,zt){if(Re.renderPass!=="translucent"||_t.paint.get("raster-opacity")===0||!zt.length)return;const Qt=Re.context,fr=Qt.gl,gr=ct.getSource(),Br=Re.useProgram("raster"),ta=Re.colorModeForRenderPass(),[Ve,Ye]=gr instanceof et?[{},zt]:Re.stencilConfigForOverlap(zt),it=Ye[Ye.length-1].overscaledZ,ht=!Re.options.moving;for(const St of Ye){const yt=Re.depthModeForSublayer(St.overscaledZ-it,_t.paint.get("raster-opacity")===1?Bo.ReadWrite:Bo.ReadOnly,fr.LESS),Lt=ct.getTile(St);Lt.registerFadeDuration(_t.paint.get("raster-fade-duration"));const nr=ct.findLoadedParent(St,0),cr=ct.findLoadedSibling(St),mr=pc(Lt,nr||cr||null,ct,_t,Re.transform,Re.style.map.terrain);let Pr,Vr;const oa=_t.paint.get("raster-resampling")==="nearest"?fr.NEAREST:fr.LINEAR;Qt.activeTexture.set(fr.TEXTURE0),Lt.texture.bind(oa,fr.CLAMP_TO_EDGE,fr.LINEAR_MIPMAP_NEAREST),Qt.activeTexture.set(fr.TEXTURE1),nr?(nr.texture.bind(oa,fr.CLAMP_TO_EDGE,fr.LINEAR_MIPMAP_NEAREST),Pr=Math.pow(2,nr.tileID.overscaledZ-Lt.tileID.overscaledZ),Vr=[Lt.tileID.canonical.x*Pr%1,Lt.tileID.canonical.y*Pr%1]):Lt.texture.bind(oa,fr.CLAMP_TO_EDGE,fr.LINEAR_MIPMAP_NEAREST),Lt.texture.useMipmap&&Qt.extTextureFilterAnisotropic&&Re.transform.pitch>20&&fr.texParameterf(fr.TEXTURE_2D,Qt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Qt.extTextureFilterAnisotropicMax);const ca=Re.style.map.terrain&&Re.style.map.terrain.getTerrainData(St),Aa=ca?St:null,$a=Aa?Aa.posMatrix:Re.transform.calculatePosMatrix(St.toUnwrapped(),ht),Cn=is($a,Vr||[0,0],Pr||1,mr,_t);gr instanceof et?Br.draw(Qt,fr.TRIANGLES,yt,hs.disabled,ta,Fi.disabled,Cn,ca,_t.id,gr.boundsBuffer,Re.quadTriangleIndexBuffer,gr.boundsSegments):Br.draw(Qt,fr.TRIANGLES,yt,Ve[St.overscaledZ],ta,Fi.disabled,Cn,ca,_t.id,Re.rasterBoundsBuffer,Re.quadTriangleIndexBuffer,Re.rasterBoundsSegments)}})(P,ne,we,Se);break;case"background":(function(Re,ct,_t,zt){const Qt=_t.paint.get("background-color"),fr=_t.paint.get("background-opacity");if(fr===0)return;const gr=Re.context,Br=gr.gl,ta=Re.transform,Ve=ta.tileSize,Ye=_t.paint.get("background-pattern");if(Re.isPatternMissing(Ye))return;const it=!Ye&&Qt.a===1&&fr===1&&Re.opaquePassEnabledForLayer()?"opaque":"translucent";if(Re.renderPass!==it)return;const ht=hs.disabled,St=Re.depthModeForSublayer(0,it==="opaque"?Bo.ReadWrite:Bo.ReadOnly),yt=Re.colorModeForRenderPass(),Lt=Re.useProgram(Ye?"backgroundPattern":"background"),nr=zt||ta.coveringTiles({tileSize:Ve,terrain:Re.style.map.terrain});Ye&&(gr.activeTexture.set(Br.TEXTURE0),Re.imageManager.bind(Re.context));const cr=_t.getCrossfadeParameters();for(const mr of nr){const Pr=zt?mr.posMatrix:Re.transform.calculatePosMatrix(mr.toUnwrapped()),Vr=Ye?Ts(Pr,fr,Re,Ye,{tileID:mr,tileSize:Ve},cr):os(Pr,fr,Qt),oa=Re.style.map.terrain&&Re.style.map.terrain.getTerrainData(mr);Lt.draw(gr,Br.TRIANGLES,St,ht,yt,Fi.disabled,Vr,oa,_t.id,Re.tileExtentBuffer,Re.quadTriangleIndexBuffer,Re.tileExtentSegments)}})(P,0,we,Se);break;case"custom":(function(Re,ct,_t){const zt=Re.context,Qt=_t.implementation;if(Re.renderPass==="offscreen"){const fr=Qt.prerender;fr&&(Re.setCustomLayerDefaults(),zt.setColorMode(Re.colorModeForRenderPass()),fr.call(Qt,zt.gl,Re.transform.customLayerMatrix()),zt.setDirty(),Re.setBaseState())}else if(Re.renderPass==="translucent"){Re.setCustomLayerDefaults(),zt.setColorMode(Re.colorModeForRenderPass()),zt.setStencilMode(hs.disabled);const fr=Qt.renderingMode==="3d"?new Bo(Re.context.gl.LEQUAL,Bo.ReadWrite,Re.depthRangeFor3D):Re.depthModeForSublayer(0,Bo.ReadOnly);zt.setDepthMode(fr),Qt.render(zt.gl,Re.transform.customLayerMatrix(),{farZ:Re.transform.farZ,nearZ:Re.transform.nearZ,fov:Re.transform._fov,modelViewProjectionMatrix:Re.transform.modelViewProjectionMatrix,projectionMatrix:Re.transform.projectionMatrix}),zt.setDirty(),Re.setBaseState(),zt.bindFramebuffer.set(null)}})(P,0,we)}}translatePosMatrix(P,ne,we,Se,Re){if(!we[0]&&!we[1])return P;const ct=Re?Se==="map"?this.transform.angle:0:Se==="viewport"?-this.transform.angle:0;if(ct){const Qt=Math.sin(ct),fr=Math.cos(ct);we=[we[0]*fr-we[1]*Qt,we[0]*Qt+we[1]*fr]}const _t=[Re?we[0]:Ea(ne,we[0],this.transform.zoom),Re?we[1]:Ea(ne,we[1],this.transform.zoom),0],zt=new Float32Array(16);return t.J(zt,P,_t),zt}saveTileTexture(P){const ne=this._tileTextures[P.size[0]];ne?ne.push(P):this._tileTextures[P.size[0]]=[P]}getTileTexture(P){const ne=this._tileTextures[P];return ne&&ne.length>0?ne.pop():null}isPatternMissing(P){if(!P)return!1;if(!P.from||!P.to)return!0;const ne=this.imageManager.getPattern(P.from.toString()),we=this.imageManager.getPattern(P.to.toString());return!ne||!we}useProgram(P,ne){this.cache=this.cache||{};const we=P+(ne?ne.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[we]||(this.cache[we]=new fa(this.context,Fr[P],ne,Es[P],this._showOverdrawInspector,this.style.map.terrain)),this.cache[we]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const P=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(P.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new u(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:P,drawingBufferHeight:ne}=this.context.gl;return this.width!==P||this.height!==ne}}class Ys{constructor(P,ne){this.points=P,this.planes=ne}static fromInvProjectionMatrix(P,ne,we){const Se=Math.pow(2,we),Re=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(_t=>{const zt=1/(_t=t.af([],_t,P))[3]/ne*Se;return t.b1(_t,_t,[zt,zt,1/_t[3],zt])}),ct=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(_t=>{const zt=(function(Br,ta){var Ve=ta[0],Ye=ta[1],it=ta[2],ht=Ve*Ve+Ye*Ye+it*it;return ht>0&&(ht=1/Math.sqrt(ht)),Br[0]=ta[0]*ht,Br[1]=ta[1]*ht,Br[2]=ta[2]*ht,Br})([],(function(Br,ta,Ve){var Ye=ta[0],it=ta[1],ht=ta[2],St=Ve[0],yt=Ve[1],Lt=Ve[2];return Br[0]=it*Lt-ht*yt,Br[1]=ht*St-Ye*Lt,Br[2]=Ye*yt-it*St,Br})([],M([],Re[_t[0]],Re[_t[1]]),M([],Re[_t[2]],Re[_t[1]]))),Qt=-((fr=zt)[0]*(gr=Re[_t[1]])[0]+fr[1]*gr[1]+fr[2]*gr[2]);var fr,gr;return zt.concat(Qt)});return new Ys(Re,ct)}}class $u{constructor(P,ne){this.min=P,this.max=ne,this.center=(function(we,Se,Re){return we[0]=.5*Se[0],we[1]=.5*Se[1],we[2]=.5*Se[2],we})([],(function(we,Se,Re){return we[0]=Se[0]+Re[0],we[1]=Se[1]+Re[1],we[2]=Se[2]+Re[2],we})([],this.min,this.max))}quadrant(P){const ne=[P%2==0,P<2],we=x(this.min),Se=x(this.max);for(let Re=0;Re<ne.length;Re++)we[Re]=ne[Re]?this.min[Re]:this.center[Re],Se[Re]=ne[Re]?this.center[Re]:this.max[Re];return Se[2]=this.max[2],new $u(we,Se)}distanceX(P){return Math.max(Math.min(this.max[0],P[0]),this.min[0])-P[0]}distanceY(P){return Math.max(Math.min(this.max[1],P[1]),this.min[1])-P[1]}intersects(P){const ne=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let we=!0;for(let Se=0;Se<P.planes.length;Se++){const Re=P.planes[Se];let ct=0;for(let _t=0;_t<ne.length;_t++)t.b2(Re,ne[_t])>=0&&ct++;if(ct===0)return 0;ct!==ne.length&&(we=!1)}if(we)return 2;for(let Se=0;Se<3;Se++){let Re=Number.MAX_VALUE,ct=-Number.MAX_VALUE;for(let _t=0;_t<P.points.length;_t++){const zt=P.points[_t][Se]-this.min[Se];Re=Math.min(Re,zt),ct=Math.max(ct,zt)}if(ct<0||Re>this.max[Se]-this.min[Se])return 0}return 1}}class Yl{constructor(P=0,ne=0,we=0,Se=0){if(isNaN(P)||P<0||isNaN(ne)||ne<0||isNaN(we)||we<0||isNaN(Se)||Se<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=P,this.bottom=ne,this.left=we,this.right=Se}interpolate(P,ne,we){return ne.top!=null&&P.top!=null&&(this.top=t.y.number(P.top,ne.top,we)),ne.bottom!=null&&P.bottom!=null&&(this.bottom=t.y.number(P.bottom,ne.bottom,we)),ne.left!=null&&P.left!=null&&(this.left=t.y.number(P.left,ne.left,we)),ne.right!=null&&P.right!=null&&(this.right=t.y.number(P.right,ne.right,we)),this}getCenter(P,ne){const we=t.ac((this.left+P-this.right)/2,0,P),Se=t.ac((this.top+ne-this.bottom)/2,0,ne);return new t.P(we,Se)}equals(P){return this.top===P.top&&this.bottom===P.bottom&&this.left===P.left&&this.right===P.right}clone(){return new Yl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const cu=85.051129;class al{constructor(P,ne,we,Se,Re){this.tileSize=512,this._renderWorldCopies=Re===void 0||!!Re,this._minZoom=P||0,this._maxZoom=ne||22,this._minPitch=we??0,this._maxPitch=Se??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Yl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const P=new al(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return P.apply(this),P}apply(P){this.tileSize=P.tileSize,this.latRange=P.latRange,this.lngRange=P.lngRange,this.width=P.width,this.height=P.height,this._center=P._center,this._elevation=P._elevation,this.minElevationForCurrentTile=P.minElevationForCurrentTile,this.zoom=P.zoom,this.angle=P.angle,this._fov=P._fov,this._pitch=P._pitch,this._unmodified=P._unmodified,this._edgeInsets=P._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(P){this._minZoom!==P&&(this._minZoom=P,this.zoom=Math.max(this.zoom,P))}get maxZoom(){return this._maxZoom}set maxZoom(P){this._maxZoom!==P&&(this._maxZoom=P,this.zoom=Math.min(this.zoom,P))}get minPitch(){return this._minPitch}set minPitch(P){this._minPitch!==P&&(this._minPitch=P,this.pitch=Math.max(this.pitch,P))}get maxPitch(){return this._maxPitch}set maxPitch(P){this._maxPitch!==P&&(this._maxPitch=P,this.pitch=Math.min(this.pitch,P))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(P){P===void 0?P=!0:P===null&&(P=!1),this._renderWorldCopies=P}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(P){const ne=-t.b3(P,-180,180)*Math.PI/180;this.angle!==ne&&(this._unmodified=!1,this.angle=ne,this._calcMatrices(),this.rotationMatrix=(function(){var we=new t.A(4);return t.A!=Float32Array&&(we[1]=0,we[2]=0),we[0]=1,we[3]=1,we})(),(function(we,Se,Re){var ct=Se[0],_t=Se[1],zt=Se[2],Qt=Se[3],fr=Math.sin(Re),gr=Math.cos(Re);we[0]=ct*gr+zt*fr,we[1]=_t*gr+Qt*fr,we[2]=ct*-fr+zt*gr,we[3]=_t*-fr+Qt*gr})(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(P){const ne=t.ac(P,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==ne&&(this._unmodified=!1,this._pitch=ne,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(P){P=Math.max(.01,Math.min(60,P)),this._fov!==P&&(this._unmodified=!1,this._fov=P/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(P){const ne=Math.min(Math.max(P,this.minZoom),this.maxZoom);this._zoom!==ne&&(this._unmodified=!1,this._zoom=ne,this.tileZoom=Math.max(0,Math.floor(ne)),this.scale=this.zoomScale(ne),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(P){P.lat===this._center.lat&&P.lng===this._center.lng||(this._unmodified=!1,this._center=P,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(P){P!==this._elevation&&(this._elevation=P,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(P){this._edgeInsets.equals(P)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,P,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(P){return this._edgeInsets.equals(P)}interpolatePadding(P,ne,we){this._unmodified=!1,this._edgeInsets.interpolate(P,ne,we),this._constrain(),this._calcMatrices()}coveringZoomLevel(P){const ne=(P.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/P.tileSize));return Math.max(0,ne)}getVisibleUnwrappedCoordinates(P){const ne=[new t.b4(0,P)];if(this._renderWorldCopies){const we=this.pointCoordinate(new t.P(0,0)),Se=this.pointCoordinate(new t.P(this.width,0)),Re=this.pointCoordinate(new t.P(this.width,this.height)),ct=this.pointCoordinate(new t.P(0,this.height)),_t=Math.floor(Math.min(we.x,Se.x,Re.x,ct.x)),zt=Math.floor(Math.max(we.x,Se.x,Re.x,ct.x)),Qt=1;for(let fr=_t-Qt;fr<=zt+Qt;fr++)fr!==0&&ne.push(new t.b4(fr,P))}return ne}coveringTiles(P){var ne,we;let Se=this.coveringZoomLevel(P);const Re=Se;if(P.minzoom!==void 0&&Se<P.minzoom)return[];P.maxzoom!==void 0&&Se>P.maxzoom&&(Se=P.maxzoom);const ct=this.pointCoordinate(this.getCameraPoint()),_t=t.Z.fromLngLat(this.center),zt=Math.pow(2,Se),Qt=[zt*ct.x,zt*ct.y,0],fr=[zt*_t.x,zt*_t.y,0],gr=Ys.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Se);let Br=P.minzoom||0;!P.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Br=Se);const ta=P.terrain?2/Math.min(this.tileSize,P.tileSize)*this.tileSize:3,Ve=yt=>({aabb:new $u([yt*zt,0,0],[(yt+1)*zt,zt,0]),zoom:0,x:0,y:0,wrap:yt,fullyVisible:!1}),Ye=[],it=[],ht=Se,St=P.reparseOverscaled?Re:Se;if(this._renderWorldCopies)for(let yt=1;yt<=3;yt++)Ye.push(Ve(-yt)),Ye.push(Ve(yt));for(Ye.push(Ve(0));Ye.length>0;){const yt=Ye.pop(),Lt=yt.x,nr=yt.y;let cr=yt.fullyVisible;if(!cr){const ca=yt.aabb.intersects(gr);if(ca===0)continue;cr=ca===2}const mr=P.terrain?Qt:fr,Pr=yt.aabb.distanceX(mr),Vr=yt.aabb.distanceY(mr),oa=Math.max(Math.abs(Pr),Math.abs(Vr));if(yt.zoom===ht||oa>ta+(1<<ht-yt.zoom)-2&&yt.zoom>=Br){const ca=ht-yt.zoom,Aa=Qt[0]-.5-(Lt<<ca),$a=Qt[1]-.5-(nr<<ca);it.push({tileID:new t.S(yt.zoom===ht?St:yt.zoom,yt.wrap,yt.zoom,Lt,nr),distanceSq:_([fr[0]-.5-Lt,fr[1]-.5-nr]),tileDistanceToCamera:Math.sqrt(Aa*Aa+$a*$a)})}else for(let ca=0;ca<4;ca++){const Aa=(Lt<<1)+ca%2,$a=(nr<<1)+(ca>>1),Cn=yt.zoom+1;let wn=yt.aabb.quadrant(ca);if(P.terrain){const Ln=new t.S(Cn,yt.wrap,Cn,Aa,$a),ui=P.terrain.getMinMaxElevation(Ln),Mi=(ne=ui.minElevation)!==null&&ne!==void 0?ne:this.elevation,xi=(we=ui.maxElevation)!==null&&we!==void 0?we:this.elevation;wn=new $u([wn.min[0],wn.min[1],Mi],[wn.max[0],wn.max[1],xi])}Ye.push({aabb:wn,zoom:Cn,x:Aa,y:$a,wrap:yt.wrap,fullyVisible:cr})}}return it.sort((yt,Lt)=>yt.distanceSq-Lt.distanceSq).map(yt=>yt.tileID)}resize(P,ne){this.width=P,this.height=ne,this.pixelsToGLUnits=[2/P,-2/ne],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(P){return Math.pow(2,P)}scaleZoom(P){return Math.log(P)/Math.LN2}project(P){const ne=t.ac(P.lat,-85.051129,cu);return new t.P(t.O(P.lng)*this.worldSize,t.Q(ne)*this.worldSize)}unproject(P){return new t.Z(P.x/this.worldSize,P.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(P){const ne=this.elevation,we=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Se=this.pointLocation(this.centerPoint,P),Re=P.getElevationForLngLatZoom(Se,this.tileZoom);if(!(this.elevation-Re))return;const ct=we+ne-Re,_t=Math.cos(this._pitch)*this.cameraToCenterDistance/ct/t.b5(1,Se.lat),zt=this.scaleZoom(_t/this.tileSize);this._elevation=Re,this._center=Se,this.zoom=zt}setLocationAtPoint(P,ne){const we=this.pointCoordinate(ne),Se=this.pointCoordinate(this.centerPoint),Re=this.locationCoordinate(P),ct=new t.Z(Re.x-(we.x-Se.x),Re.y-(we.y-Se.y));this.center=this.coordinateLocation(ct),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(P,ne){return ne?this.coordinatePoint(this.locationCoordinate(P),ne.getElevationForLngLatZoom(P,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(P))}pointLocation(P,ne){return this.coordinateLocation(this.pointCoordinate(P,ne))}locationCoordinate(P){return t.Z.fromLngLat(P)}coordinateLocation(P){return P&&P.toLngLat()}pointCoordinate(P,ne){if(ne){const Br=ne.pointCoordinate(P);if(Br!=null)return Br}const we=[P.x,P.y,0,1],Se=[P.x,P.y,1,1];t.af(we,we,this.pixelMatrixInverse),t.af(Se,Se,this.pixelMatrixInverse);const Re=we[3],ct=Se[3],_t=we[1]/Re,zt=Se[1]/ct,Qt=we[2]/Re,fr=Se[2]/ct,gr=Qt===fr?0:(0-Qt)/(fr-Qt);return new t.Z(t.y.number(we[0]/Re,Se[0]/ct,gr)/this.worldSize,t.y.number(_t,zt,gr)/this.worldSize)}coordinatePoint(P,ne=0,we=this.pixelMatrix){const Se=[P.x*this.worldSize,P.y*this.worldSize,ne,1];return t.af(Se,Se,we),new t.P(Se[0]/Se[3],Se[1]/Se[3])}getBounds(){const P=Math.max(0,this.height/2-this.getHorizon());return new ae().extend(this.pointLocation(new t.P(0,P))).extend(this.pointLocation(new t.P(this.width,P))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ae([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(P){P?(this.lngRange=[P.getWest(),P.getEast()],this.latRange=[P.getSouth(),P.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,cu])}calculateTileMatrix(P){const ne=P.canonical,we=this.worldSize/this.zoomScale(ne.z),Se=ne.x+Math.pow(2,ne.z)*P.wrap,Re=t.an(new Float64Array(16));return t.J(Re,Re,[Se*we,ne.y*we,0]),t.K(Re,Re,[we/t.X,we/t.X,1]),Re}calculatePosMatrix(P,ne=!1){const we=P.key,Se=ne?this._alignedPosMatrixCache:this._posMatrixCache;if(Se[we])return Se[we];const Re=this.calculateTileMatrix(P);return t.L(Re,ne?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Re),Se[we]=new Float32Array(Re),Se[we]}calculateFogMatrix(P){const ne=P.key,we=this._fogMatrixCache;if(we[ne])return we[ne];const Se=this.calculateTileMatrix(P);return t.L(Se,this.fogMatrix,Se),we[ne]=new Float32Array(Se),we[ne]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(P,ne){ne=t.ac(+ne,this.minZoom,this.maxZoom);const we={center:new t.N(P.lng,P.lat),zoom:ne};let Se=this.lngRange;if(!this._renderWorldCopies&&Se===null){const yt=179.9999999999;Se=[-yt,yt]}const Re=this.tileSize*this.zoomScale(we.zoom);let ct=0,_t=Re,zt=0,Qt=Re,fr=0,gr=0;const{x:Br,y:ta}=this.size;if(this.latRange){const yt=this.latRange;ct=t.Q(yt[1])*Re,_t=t.Q(yt[0])*Re,_t-ct<ta&&(fr=ta/(_t-ct))}Se&&(zt=t.b3(t.O(Se[0])*Re,0,Re),Qt=t.b3(t.O(Se[1])*Re,0,Re),Qt<zt&&(Qt+=Re),Qt-zt<Br&&(gr=Br/(Qt-zt)));const{x:Ve,y:Ye}=this.project.call({worldSize:Re},P);let it,ht;const St=Math.max(gr||0,fr||0);if(St){const yt=new t.P(gr?(Qt+zt)/2:Ve,fr?(_t+ct)/2:Ye);return we.center=this.unproject.call({worldSize:Re},yt).wrap(),we.zoom+=this.scaleZoom(St),we}if(this.latRange){const yt=ta/2;Ye-yt<ct&&(ht=ct+yt),Ye+yt>_t&&(ht=_t-yt)}if(Se){const yt=(zt+Qt)/2;let Lt=Ve;this._renderWorldCopies&&(Lt=t.b3(Ve,yt-Re/2,yt+Re/2));const nr=Br/2;Lt-nr<zt&&(it=zt+nr),Lt+nr>Qt&&(it=Qt-nr)}if(it!==void 0||ht!==void 0){const yt=new t.P(it??Ve,ht??Ye);we.center=this.unproject.call({worldSize:Re},yt).wrap()}return we}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const P=this._unmodified,{center:ne,zoom:we}=this.getConstrained(this.center,this.zoom);this.center=ne,this.zoom=we,this._unmodified=P,this._constraining=!1}_calcMatrices(){if(!this.height)return;const P=this.centerOffset,ne=this.point.x,we=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let Se=t.an(new Float64Array(16));t.K(Se,Se,[this.width/2,-this.height/2,1]),t.J(Se,Se,[1,-1,0]),this.labelPlaneMatrix=Se,Se=t.an(new Float64Array(16)),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[-1,-1,0]),t.K(Se,Se,[2/this.width,2/this.height,1]),this.glCoordMatrix=Se;const Re=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),ct=Math.min(this.elevation,this.minElevationForCurrentTile),_t=Re-ct*this._pixelPerMeter/Math.cos(this._pitch),zt=ct<0?_t:Re,Qt=Math.PI/2+this._pitch,fr=this._fov*(.5+P.y/this.height),gr=Math.sin(fr)*zt/Math.sin(t.ac(Math.PI-Qt-fr,.01,Math.PI-.01)),Br=this.getHorizon(),ta=2*Math.atan(Br/this.cameraToCenterDistance)*(.5+P.y/(2*Br)),Ve=Math.sin(ta)*zt/Math.sin(t.ac(Math.PI-Qt-ta,.01,Math.PI-.01)),Ye=Math.min(gr,Ve);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Ye+zt),this.nearZ=this.height/50,Se=new Float64Array(16),t.b6(Se,this._fov,this.width/this.height,this.nearZ,this.farZ),Se[8]=2*-P.x/this.width,Se[9]=2*P.y/this.height,this.projectionMatrix=t.ae(Se),t.K(Se,Se,[1,-1,1]),t.J(Se,Se,[0,0,-this.cameraToCenterDistance]),t.b7(Se,Se,this._pitch),t.ad(Se,Se,this.angle),t.J(Se,Se,[-ne,-we,0]),this.mercatorMatrix=t.K([],Se,[this.worldSize,this.worldSize,this.worldSize]),t.K(Se,Se,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,Se),t.J(Se,Se,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Se,this.invModelViewProjectionMatrix=t.as([],Se),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,Re,this.farZ),this.fogMatrix[8]=2*-P.x/this.width,this.fogMatrix[9]=2*P.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ad(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-ne,-we,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,Se);const it=this.width%2/2,ht=this.height%2/2,St=Math.cos(this.angle),yt=Math.sin(this.angle),Lt=ne-Math.round(ne)+St*it+yt*ht,nr=we-Math.round(we)+St*ht+yt*it,cr=new Float64Array(Se);if(t.J(cr,cr,[Lt>.5?Lt-1:Lt,nr>.5?nr-1:nr,0]),this.alignedModelViewProjectionMatrix=cr,Se=t.as(new Float64Array(16),this.pixelMatrix),!Se)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Se,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const P=this.pointCoordinate(new t.P(0,0)),ne=[P.x*this.worldSize,P.y*this.worldSize,0,1];return t.af(ne,ne,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const P=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,P))}getCameraQueryGeometry(P){const ne=this.getCameraPoint();if(P.length===1)return[P[0],ne];{let we=ne.x,Se=ne.y,Re=ne.x,ct=ne.y;for(const _t of P)we=Math.min(we,_t.x),Se=Math.min(Se,_t.y),Re=Math.max(Re,_t.x),ct=Math.max(ct,_t.y);return[new t.P(we,Se),new t.P(Re,Se),new t.P(Re,ct),new t.P(we,ct),new t.P(we,Se)]}}lngLatToCameraDepth(P,ne){const we=this.locationCoordinate(P),Se=[we.x*this.worldSize,we.y*this.worldSize,ne,1];return t.af(Se,Se,this.modelViewProjectionMatrix),Se[2]/Se[3]}}function xc(ze,P){let ne,we=!1,Se=null,Re=null;const ct=()=>{Se=null,we&&(ze.apply(Re,ne),Se=setTimeout(ct,P),we=!1)};return(..._t)=>(we=!0,Re=this,ne=_t,Se||ct(),Se)}class Bu{constructor(P){this._getCurrentHash=()=>{const ne=window.location.hash.replace("#","");if(this._hashName){let we;return ne.split("&").map(Se=>Se.split("=")).forEach(Se=>{Se[0]===this._hashName&&(we=Se)}),(we&&we[1]||"").split("/")}return ne.split("/")},this._onHashChange=()=>{const ne=this._getCurrentHash();if(ne.length>=3&&!ne.some(we=>isNaN(we))){const we=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(ne[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+ne[2],+ne[1]],zoom:+ne[0],bearing:we,pitch:+(ne[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const ne=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,ne)},this._removeHash=()=>{const ne=this._getCurrentHash();if(ne.length===0)return;const we=ne.join("/");let Se=we;Se.split("&").length>0&&(Se=Se.split("&")[0]),this._hashName&&(Se=`${this._hashName}=${we}`);let Re=window.location.hash.replace(Se,"");Re.startsWith("#&")?Re=Re.slice(0,1)+Re.slice(2):Re==="#"&&(Re="");let ct=window.location.href.replace(/(#.+)?$/,Re);ct=ct.replace("&&","&"),window.history.replaceState(window.history.state,null,ct)},this._updateHash=xc(this._updateHashUnthrottled,300),this._hashName=P&&encodeURIComponent(P)}addTo(P){return this._map=P,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(P){const ne=this._map.getCenter(),we=Math.round(100*this._map.getZoom())/100,Se=Math.ceil((we*Math.LN2+Math.log(512/360/.5))/Math.LN10),Re=Math.pow(10,Se),ct=Math.round(ne.lng*Re)/Re,_t=Math.round(ne.lat*Re)/Re,zt=this._map.getBearing(),Qt=this._map.getPitch();let fr="";if(fr+=P?`/${ct}/${_t}/${we}`:`${we}/${_t}/${ct}`,(zt||Qt)&&(fr+="/"+Math.round(10*zt)/10),Qt&&(fr+=`/${Math.round(Qt)}`),this._hashName){const gr=this._hashName;let Br=!1;const ta=window.location.hash.slice(1).split("&").map(Ve=>{const Ye=Ve.split("=")[0];return Ye===gr?(Br=!0,`${Ye}=${fr}`):Ve}).filter(Ve=>Ve);return Br||ta.push(`${gr}=${fr}`),`#${ta.join("&")}`}return`#${fr}`}}const cc={linearity:.3,easing:t.b8(0,0,.3,1)},Nc=t.e({deceleration:2500,maxSpeed:1400},cc),Lf=t.e({deceleration:20,maxSpeed:1400},cc),Kf=t.e({deceleration:1e3,maxSpeed:360},cc),bc=t.e({deceleration:1e3,maxSpeed:90},cc);class Uc{constructor(P){this._map=P,this.clear()}clear(){this._inertiaBuffer=[]}record(P){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.now(),settings:P})}_drainInertiaBuffer(){const P=this._inertiaBuffer,ne=i.now();for(;P.length>0&&ne-P[0].time>160;)P.shift()}_onMoveEnd(P){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const ne={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:Re}of this._inertiaBuffer)ne.zoom+=Re.zoomDelta||0,ne.bearing+=Re.bearingDelta||0,ne.pitch+=Re.pitchDelta||0,Re.panDelta&&ne.pan._add(Re.panDelta),Re.around&&(ne.around=Re.around),Re.pinchAround&&(ne.pinchAround=Re.pinchAround);const we=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Se={};if(ne.pan.mag()){const Re=jc(ne.pan.mag(),we,t.e({},Nc,P||{}));Se.offset=ne.pan.mult(Re.amount/ne.pan.mag()),Se.center=this._map.transform.center,_u(Se,Re)}if(ne.zoom){const Re=jc(ne.zoom,we,Lf);Se.zoom=this._map.transform.zoom+Re.amount,_u(Se,Re)}if(ne.bearing){const Re=jc(ne.bearing,we,Kf);Se.bearing=this._map.transform.bearing+t.ac(Re.amount,-179,179),_u(Se,Re)}if(ne.pitch){const Re=jc(ne.pitch,we,bc);Se.pitch=this._map.transform.pitch+Re.amount,_u(Se,Re)}if(Se.zoom||Se.bearing){const Re=ne.pinchAround===void 0?ne.around:ne.pinchAround;Se.around=Re?this._map.unproject(Re):this._map.getCenter()}return this.clear(),t.e(Se,{noMoveStart:!0})}}function _u(ze,P){(!ze.duration||ze.duration<P.duration)&&(ze.duration=P.duration,ze.easing=P.easing)}function jc(ze,P,ne){const{maxSpeed:we,linearity:Se,deceleration:Re}=ne,ct=t.ac(ze*Se/(P/1e3),-we,we),_t=Math.abs(ct)/(Re*Se);return{easing:ne.easing,duration:1e3*_t,amount:ct*(_t/2)}}class Vl extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(P,ne,we,Se={}){const Re=n.mousePos(ne.getCanvas(),we),ct=ne.unproject(Re);super(P,t.e({point:Re,lngLat:ct,originalEvent:we},Se)),this._defaultPrevented=!1,this.target=ne}}class wc extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(P,ne,we){const Se=P==="touchend"?we.changedTouches:we.touches,Re=n.touchPos(ne.getCanvasContainer(),Se),ct=Re.map(zt=>ne.unproject(zt)),_t=Re.reduce((zt,Qt,fr,gr)=>zt.add(Qt.div(gr.length)),new t.P(0,0));super(P,{points:Re,point:_t,lngLats:ct,lngLat:ne.unproject(_t),originalEvent:we}),this._defaultPrevented=!1}}class lf extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(P,ne,we){super(P,{originalEvent:we}),this._defaultPrevented=!1}}class Tc{constructor(P,ne){this._map=P,this._clickTolerance=ne.clickTolerance}reset(){delete this._mousedownPos}wheel(P){return this._firePreventable(new lf(P.type,this._map,P))}mousedown(P,ne){return this._mousedownPos=ne,this._firePreventable(new Vl(P.type,this._map,P))}mouseup(P){this._map.fire(new Vl(P.type,this._map,P))}click(P,ne){this._mousedownPos&&this._mousedownPos.dist(ne)>=this._clickTolerance||this._map.fire(new Vl(P.type,this._map,P))}dblclick(P){return this._firePreventable(new Vl(P.type,this._map,P))}mouseover(P){this._map.fire(new Vl(P.type,this._map,P))}mouseout(P){this._map.fire(new Vl(P.type,this._map,P))}touchstart(P){return this._firePreventable(new wc(P.type,this._map,P))}touchmove(P){this._map.fire(new wc(P.type,this._map,P))}touchend(P){this._map.fire(new wc(P.type,this._map,P))}touchcancel(P){this._map.fire(new wc(P.type,this._map,P))}_firePreventable(P){if(this._map.fire(P),P.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Js{constructor(P){this._map=P}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(P){this._map.fire(new Vl(P.type,this._map,P))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Vl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(P){this._delayContextMenu?this._contextMenuEvent=P:this._ignoreContextMenu||this._map.fire(new Vl(P.type,this._map,P)),this._map.listens("contextmenu")&&P.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class fu{constructor(P){this._map=P}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(P){return this.transform.pointLocation(t.P.convert(P),this._map.terrain)}}class Cu{constructor(P,ne){this._map=P,this._tr=new fu(P),this._el=P.getCanvasContainer(),this._container=P.getContainer(),this._clickTolerance=ne.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(P,ne){this.isEnabled()&&P.shiftKey&&P.button===0&&(n.disableDrag(),this._startPos=this._lastPos=ne,this._active=!0)}mousemoveWindow(P,ne){if(!this._active)return;const we=ne;if(this._lastPos.equals(we)||!this._box&&we.dist(this._startPos)<this._clickTolerance)return;const Se=this._startPos;this._lastPos=we,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",P));const Re=Math.min(Se.x,we.x),ct=Math.max(Se.x,we.x),_t=Math.min(Se.y,we.y),zt=Math.max(Se.y,we.y);n.setTransform(this._box,`translate(${Re}px,${_t}px)`),this._box.style.width=ct-Re+"px",this._box.style.height=zt-_t+"px"}mouseupWindow(P,ne){if(!this._active||P.button!==0)return;const we=this._startPos,Se=ne;if(this.reset(),n.suppressClick(),we.x!==Se.x||we.y!==Se.y)return this._map.fire(new t.k("boxzoomend",{originalEvent:P})),{cameraAnimation:Re=>Re.fitScreenCoordinates(we,Se,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",P)}keydown(P){this._active&&P.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",P))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(P,ne){return this._map.fire(new t.k(P,{originalEvent:ne}))}}function ef(ze,P){if(ze.length!==P.length)throw new Error(`The number of touches and points are not equal - touches ${ze.length}, points ${P.length}`);const ne={};for(let we=0;we<ze.length;we++)ne[ze[we].identifier]=P[we];return ne}class el{constructor(P){this.reset(),this.numTouches=P.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(P,ne,we){(this.centroid||we.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=P.timeStamp),we.length===this.numTouches&&(this.centroid=(function(Se){const Re=new t.P(0,0);for(const ct of Se)Re._add(ct);return Re.div(Se.length)})(ne),this.touches=ef(we,ne)))}touchmove(P,ne,we){if(this.aborted||!this.centroid)return;const Se=ef(we,ne);for(const Re in this.touches){const ct=Se[Re];(!ct||ct.dist(this.touches[Re])>30)&&(this.aborted=!0)}}touchend(P,ne,we){if((!this.centroid||P.timeStamp-this.startTime>500)&&(this.aborted=!0),we.length===0){const Se=!this.aborted&&this.centroid;if(this.reset(),Se)return Se}}}class Rc{constructor(P){this.singleTap=new el(P),this.numTaps=P.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(P,ne,we){this.singleTap.touchstart(P,ne,we)}touchmove(P,ne,we){this.singleTap.touchmove(P,ne,we)}touchend(P,ne,we){const Se=this.singleTap.touchend(P,ne,we);if(Se){const Re=P.timeStamp-this.lastTime<500,ct=!this.lastTap||this.lastTap.dist(Se)<30;if(Re&&ct||this.reset(),this.count++,this.lastTime=P.timeStamp,this.lastTap=Se,this.count===this.numTaps)return this.reset(),Se}}}class fc{constructor(P){this._tr=new fu(P),this._zoomIn=new Rc({numTouches:1,numTaps:2}),this._zoomOut=new Rc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(P,ne,we){this._zoomIn.touchstart(P,ne,we),this._zoomOut.touchstart(P,ne,we)}touchmove(P,ne,we){this._zoomIn.touchmove(P,ne,we),this._zoomOut.touchmove(P,ne,we)}touchend(P,ne,we){const Se=this._zoomIn.touchend(P,ne,we),Re=this._zoomOut.touchend(P,ne,we),ct=this._tr;return Se?(this._active=!0,P.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:_t=>_t.easeTo({duration:300,zoom:ct.zoom+1,around:ct.unproject(Se)},{originalEvent:P})}):Re?(this._active=!0,P.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:_t=>_t.easeTo({duration:300,zoom:ct.zoom-1,around:ct.unproject(Re)},{originalEvent:P})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class xu{constructor(P){this._enabled=!!P.enable,this._moveStateManager=P.moveStateManager,this._clickTolerance=P.clickTolerance||1,this._moveFunction=P.move,this._activateOnStart=!!P.activateOnStart,P.assignEvents(this),this.reset()}reset(P){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(P)}_move(...P){const ne=this._moveFunction(...P);if(ne.bearingDelta||ne.pitchDelta||ne.around||ne.panDelta)return this._active=!0,ne}dragStart(P,ne){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(P)&&(this._moveStateManager.startMove(P),this._lastPoint=ne.length?ne[0]:ne,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(P,ne){if(!this.isEnabled())return;const we=this._lastPoint;if(!we)return;if(P.preventDefault(),!this._moveStateManager.isValidMoveEvent(P))return void this.reset(P);const Se=ne.length?ne[0]:ne;return!this._moved&&Se.dist(we)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Se,this._move(we,Se))}dragEnd(P){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(P)&&(this._moved&&n.suppressClick(),this.reset(P))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const Dc={0:1,2:2};class Nu{constructor(P){this._correctEvent=P.checkCorrectEvent}startMove(P){const ne=n.mouseButton(P);this._eventButton=ne}endMove(P){delete this._eventButton}isValidStartEvent(P){return this._correctEvent(P)}isValidMoveEvent(P){return!(function(ne,we){const Se=Dc[we];return ne.buttons===void 0||(ne.buttons&Se)!==Se})(P,this._eventButton)}isValidEndEvent(P){return n.mouseButton(P)===this._eventButton}}class zc{constructor(){this._firstTouch=void 0}_isOneFingerTouch(P){return P.targetTouches.length===1}_isSameTouchEvent(P){return P.targetTouches[0].identifier===this._firstTouch}startMove(P){this._firstTouch=P.targetTouches[0].identifier}endMove(P){delete this._firstTouch}isValidStartEvent(P){return this._isOneFingerTouch(P)}isValidMoveEvent(P){return this._isOneFingerTouch(P)&&this._isSameTouchEvent(P)}isValidEndEvent(P){return this._isOneFingerTouch(P)&&this._isSameTouchEvent(P)}}const Pf=ze=>{ze.mousedown=ze.dragStart,ze.mousemoveWindow=ze.dragMove,ze.mouseup=ze.dragEnd,ze.contextmenu=P=>{P.preventDefault()}},Gl=({enable:ze,clickTolerance:P,bearingDegreesPerPixelMoved:ne=.8})=>{const we=new Nu({checkCorrectEvent:Se=>n.mouseButton(Se)===0&&Se.ctrlKey||n.mouseButton(Se)===2});return new xu({clickTolerance:P,move:(Se,Re)=>({bearingDelta:(Re.x-Se.x)*ne}),moveStateManager:we,enable:ze,assignEvents:Pf})},uf=({enable:ze,clickTolerance:P,pitchDegreesPerPixelMoved:ne=-.5})=>{const we=new Nu({checkCorrectEvent:Se=>n.mouseButton(Se)===0&&Se.ctrlKey||n.mouseButton(Se)===2});return new xu({clickTolerance:P,move:(Se,Re)=>({pitchDelta:(Re.y-Se.y)*ne}),moveStateManager:we,enable:ze,assignEvents:Pf})};class bu{constructor(P,ne){this._clickTolerance=P.clickTolerance||1,this._map=ne,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(P){return P<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(P,ne,we){return this._calculateTransform(P,ne,we)}touchmove(P,ne,we){if(this._active){if(!this._shouldBePrevented(we.length))return P.preventDefault(),this._calculateTransform(P,ne,we);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",P)}}touchend(P,ne,we){this._calculateTransform(P,ne,we),this._active&&this._shouldBePrevented(we.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(P,ne,we){we.length>0&&(this._active=!0);const Se=ef(we,ne),Re=new t.P(0,0),ct=new t.P(0,0);let _t=0;for(const Qt in Se){const fr=Se[Qt],gr=this._touches[Qt];gr&&(Re._add(fr),ct._add(fr.sub(gr)),_t++,Se[Qt]=fr)}if(this._touches=Se,this._shouldBePrevented(_t)||!ct.mag())return;const zt=ct.div(_t);return this._sum._add(zt),this._sum.mag()<this._clickTolerance?void 0:{around:Re.div(_t),panDelta:zt}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ju{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(P,ne,we){this._firstTwoTouches||we.length<2||(this._firstTwoTouches=[we[0].identifier,we[1].identifier],this._start([ne[0],ne[1]]))}touchmove(P,ne,we){if(!this._firstTwoTouches)return;P.preventDefault();const[Se,Re]=this._firstTwoTouches,ct=Uu(we,ne,Se),_t=Uu(we,ne,Re);if(!ct||!_t)return;const zt=this._aroundCenter?null:ct.add(_t).div(2);return this._move([ct,_t],zt,P)}touchend(P,ne,we){if(!this._firstTwoTouches)return;const[Se,Re]=this._firstTwoTouches,ct=Uu(we,ne,Se),_t=Uu(we,ne,Re);ct&&_t||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(P){this._enabled=!0,this._aroundCenter=!!P&&P.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Uu(ze,P,ne){for(let we=0;we<ze.length;we++)if(ze[we].identifier===ne)return P[we]}function vl(ze,P){return Math.log(ze/P)/Math.LN2}class eu extends Ju{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(P){this._startDistance=this._distance=P[0].dist(P[1])}_move(P,ne){const we=this._distance;if(this._distance=P[0].dist(P[1]),this._active||!(Math.abs(vl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:vl(this._distance,we),pinchAround:ne}}}function ol(ze,P){return 180*ze.angleWith(P)/Math.PI}class hc extends Ju{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(P){this._startVector=this._vector=P[0].sub(P[1]),this._minDiameter=P[0].dist(P[1])}_move(P,ne,we){const Se=this._vector;if(this._vector=P[0].sub(P[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:ol(this._vector,Se),pinchAround:ne}}_isBelowThreshold(P){this._minDiameter=Math.min(this._minDiameter,P.mag());const ne=25/(Math.PI*this._minDiameter)*360,we=ol(P,this._startVector);return Math.abs(we)<ne}}function ju(ze){return Math.abs(ze.y)>Math.abs(ze.x)}class tf extends Ju{constructor(P){super(),this._currentTouchCount=0,this._map=P}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(P,ne,we){super.touchstart(P,ne,we),this._currentTouchCount=we.length}_start(P){this._lastPoints=P,ju(P[0].sub(P[1]))&&(this._valid=!1)}_move(P,ne,we){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Se=P[0].sub(this._lastPoints[0]),Re=P[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Se,Re,we.timeStamp),this._valid?(this._lastPoints=P,this._active=!0,{pitchDelta:(Se.y+Re.y)/2*-.5}):void 0}gestureBeginsVertically(P,ne,we){if(this._valid!==void 0)return this._valid;const Se=P.mag()>=2,Re=ne.mag()>=2;if(!Se&&!Re)return;if(!Se||!Re)return this._firstMove===void 0&&(this._firstMove=we),we-this._firstMove<100&&void 0;const ct=P.y>0==ne.y>0;return ju(P)&&ju(ne)&&ct}}const Jt={panStep:100,bearingStep:15,pitchStep:10};class yr{constructor(P){this._tr=new fu(P);const ne=Jt;this._panStep=ne.panStep,this._bearingStep=ne.bearingStep,this._pitchStep=ne.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(P){if(P.altKey||P.ctrlKey||P.metaKey)return;let ne=0,we=0,Se=0,Re=0,ct=0;switch(P.keyCode){case 61:case 107:case 171:case 187:ne=1;break;case 189:case 109:case 173:ne=-1;break;case 37:P.shiftKey?we=-1:(P.preventDefault(),Re=-1);break;case 39:P.shiftKey?we=1:(P.preventDefault(),Re=1);break;case 38:P.shiftKey?Se=1:(P.preventDefault(),ct=-1);break;case 40:P.shiftKey?Se=-1:(P.preventDefault(),ct=1);break;default:return}return this._rotationDisabled&&(we=0,Se=0),{cameraAnimation:_t=>{const zt=this._tr;_t.easeTo({duration:300,easeId:"keyboardHandler",easing:Kr,zoom:ne?Math.round(zt.zoom)+ne*(P.shiftKey?2:1):zt.zoom,bearing:zt.bearing+we*this._bearingStep,pitch:zt.pitch+Se*this._pitchStep,offset:[-Re*this._panStep,-ct*this._panStep],center:zt.center},{originalEvent:P})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Kr(ze){return ze*(2-ze)}const jr=4.000244140625;class pa{constructor(P,ne){this._onTimeout=we=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(we)},this._map=P,this._tr=new fu(P),this._triggerRenderFrame=ne,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(P){this._defaultZoomRate=P}setWheelZoomRate(P){this._wheelZoomRate=P}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(P){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!P&&P.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(P){return!!this._map.cooperativeGestures.isEnabled()&&!(P.ctrlKey||this._map.cooperativeGestures.isBypassed(P))}wheel(P){if(!this.isEnabled())return;if(this._shouldBePrevented(P))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",P);let ne=P.deltaMode===WheelEvent.DOM_DELTA_LINE?40*P.deltaY:P.deltaY;const we=i.now(),Se=we-(this._lastWheelEventTime||0);this._lastWheelEventTime=we,ne!==0&&ne%jr==0?this._type="wheel":ne!==0&&Math.abs(ne)<4?this._type="trackpad":Se>400?(this._type=null,this._lastValue=ne,this._timeout=setTimeout(this._onTimeout,40,P)):this._type||(this._type=Math.abs(Se*ne)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ne+=this._lastValue)),P.shiftKey&&ne&&(ne/=4),this._type&&(this._lastWheelEvent=P,this._delta-=ne,this._active||this._start(P)),P.preventDefault()}_start(P){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const ne=n.mousePos(this._map.getCanvas(),P),we=this._tr;this._around=ne.y>we.transform.height/2-we.transform.getHorizon()?t.N.convert(this._aroundCenter?we.center:we.unproject(ne)):t.N.convert(we.center),this._aroundPoint=we.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const P=this._tr.transform;if(this._delta!==0){const zt=this._type==="wheel"&&Math.abs(this._delta)>jr?this._wheelZoomRate:this._defaultZoomRate;let Qt=2/(1+Math.exp(-Math.abs(this._delta*zt)));this._delta<0&&Qt!==0&&(Qt=1/Qt);const fr=typeof this._targetZoom=="number"?P.zoomScale(this._targetZoom):P.scale;this._targetZoom=Math.min(P.maxZoom,Math.max(P.minZoom,P.scaleZoom(fr*Qt))),this._type==="wheel"&&(this._startZoom=P.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const ne=typeof this._targetZoom=="number"?this._targetZoom:P.zoom,we=this._startZoom,Se=this._easing;let Re,ct=!1;const _t=i.now()-this._lastWheelEventTime;if(this._type==="wheel"&&we&&Se&&_t){const zt=Math.min(_t/200,1),Qt=Se(zt);Re=t.y.number(we,ne,Qt),zt<1?this._frameId||(this._frameId=!0):ct=!0}else Re=ne,ct=!0;return this._active=!0,ct&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ct,zoomDelta:Re-P.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(P){let ne=t.b9;if(this._prevEase){const we=this._prevEase,Se=(i.now()-we.start)/we.duration,Re=we.easing(Se+.01)-we.easing(Se),ct=.27/Math.sqrt(Re*Re+1e-4)*.01,_t=Math.sqrt(.0729-ct*ct);ne=t.b8(ct,_t,.25,1)}return this._prevEase={start:i.now(),duration:P,easing:ne},ne}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ja{constructor(P,ne){this._clickZoom=P,this._tapZoom=ne}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ya{constructor(P){this._tr=new fu(P),this.reset()}reset(){this._active=!1}dblclick(P,ne){return P.preventDefault(),{cameraAnimation:we=>{we.easeTo({duration:300,zoom:this._tr.zoom+(P.shiftKey?-1:1),around:this._tr.unproject(ne)},{originalEvent:P})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class kn{constructor(){this._tap=new Rc({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(P,ne,we){if(!this._swipePoint)if(this._tapTime){const Se=ne[0],Re=P.timeStamp-this._tapTime<500,ct=this._tapPoint.dist(Se)<30;Re&&ct?we.length>0&&(this._swipePoint=Se,this._swipeTouch=we[0].identifier):this.reset()}else this._tap.touchstart(P,ne,we)}touchmove(P,ne,we){if(this._tapTime){if(this._swipePoint){if(we[0].identifier!==this._swipeTouch)return;const Se=ne[0],Re=Se.y-this._swipePoint.y;return this._swipePoint=Se,P.preventDefault(),this._active=!0,{zoomDelta:Re/128}}}else this._tap.touchmove(P,ne,we)}touchend(P,ne,we){if(this._tapTime)this._swipePoint&&we.length===0&&this.reset();else{const Se=this._tap.touchend(P,ne,we);Se&&(this._tapTime=P.timeStamp,this._tapPoint=Se)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Dn{constructor(P,ne,we){this._el=P,this._mousePan=ne,this._touchPan=we}enable(P){this._inertiaOptions=P||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class ti{constructor(P,ne,we){this._pitchWithRotate=P.pitchWithRotate,this._mouseRotate=ne,this._mousePitch=we}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class yn{constructor(P,ne,we,Se){this._el=P,this._touchZoom=ne,this._touchRotate=we,this._tapDragZoom=Se,this._rotationDisabled=!1,this._enabled=!0}enable(P){this._touchZoom.enable(P),this._rotationDisabled||this._touchRotate.enable(P),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Gn{constructor(P,ne){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=P,this._options=ne,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const P=this._map.getCanvasContainer();P.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",P);let ne=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(ne=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const we=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Se=document.createElement("div");Se.className="maplibregl-desktop-message",Se.textContent=ne,this._container.appendChild(Se);const Re=document.createElement("div");Re.className="maplibregl-mobile-message",Re.textContent=we,this._container.appendChild(Re),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(n.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(P){return P[this._bypassKey]}notifyGestureBlocked(P,ne){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:P,originalEvent:ne})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Mn=ze=>ze.zoom||ze.drag||ze.pitch||ze.rotate;class dn extends t.k{}function oi(ze){return ze.panDelta&&ze.panDelta.mag()||ze.zoomDelta||ze.bearingDelta||ze.pitchDelta}class Vi{constructor(P,ne){this.handleWindowEvent=Se=>{this.handleEvent(Se,`${Se.type}Window`)},this.handleEvent=(Se,Re)=>{if(Se.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const ct=Se.type==="renderFrame"?void 0:Se,_t={needsRenderFrame:!1},zt={},Qt={},fr=Se.touches,gr=fr?this._getMapTouches(fr):void 0,Br=gr?n.touchPos(this._map.getCanvas(),gr):n.mousePos(this._map.getCanvas(),Se);for(const{handlerName:Ye,handler:it,allowed:ht}of this._handlers){if(!it.isEnabled())continue;let St;this._blockedByActive(Qt,ht,Ye)?it.reset():it[Re||Se.type]&&(St=it[Re||Se.type](Se,Br,gr),this.mergeHandlerResult(_t,zt,St,Ye,ct),St&&St.needsRenderFrame&&this._triggerRenderFrame()),(St||it.isActive())&&(Qt[Ye]=it)}const ta={};for(const Ye in this._previousActiveHandlers)Qt[Ye]||(ta[Ye]=ct);this._previousActiveHandlers=Qt,(Object.keys(ta).length||oi(_t))&&(this._changes.push([_t,zt,ta]),this._triggerRenderFrame()),(Object.keys(Qt).length||oi(_t))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:Ve}=_t;Ve&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ve(this._map))},this._map=P,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Uc(P),this._bearingSnap=ne.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ne);const we=this._el;this._listeners=[[we,"touchstart",{passive:!0}],[we,"touchmove",{passive:!1}],[we,"touchend",void 0],[we,"touchcancel",void 0],[we,"mousedown",void 0],[we,"mousemove",void 0],[we,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[we,"mouseover",void 0],[we,"mouseout",void 0],[we,"dblclick",void 0],[we,"click",void 0],[we,"keydown",{capture:!1}],[we,"keyup",void 0],[we,"wheel",{passive:!1}],[we,"contextmenu",void 0],[window,"blur",void 0]];for(const[Se,Re,ct]of this._listeners)n.addEventListener(Se,Re,Se===document?this.handleWindowEvent:this.handleEvent,ct)}destroy(){for(const[P,ne,we]of this._listeners)n.removeEventListener(P,ne,P===document?this.handleWindowEvent:this.handleEvent,we)}_addDefaultHandlers(P){const ne=this._map,we=ne.getCanvasContainer();this._add("mapEvent",new Tc(ne,P));const Se=ne.boxZoom=new Cu(ne,P);this._add("boxZoom",Se),P.interactive&&P.boxZoom&&Se.enable();const Re=ne.cooperativeGestures=new Gn(ne,P.cooperativeGestures);this._add("cooperativeGestures",Re),P.cooperativeGestures&&Re.enable();const ct=new fc(ne),_t=new Ya(ne);ne.doubleClickZoom=new Ja(_t,ct),this._add("tapZoom",ct),this._add("clickZoom",_t),P.interactive&&P.doubleClickZoom&&ne.doubleClickZoom.enable();const zt=new kn;this._add("tapDragZoom",zt);const Qt=ne.touchPitch=new tf(ne);this._add("touchPitch",Qt),P.interactive&&P.touchPitch&&ne.touchPitch.enable(P.touchPitch);const fr=Gl(P),gr=uf(P);ne.dragRotate=new ti(P,fr,gr),this._add("mouseRotate",fr,["mousePitch"]),this._add("mousePitch",gr,["mouseRotate"]),P.interactive&&P.dragRotate&&ne.dragRotate.enable();const Br=(({enable:St,clickTolerance:yt})=>{const Lt=new Nu({checkCorrectEvent:nr=>n.mouseButton(nr)===0&&!nr.ctrlKey});return new xu({clickTolerance:yt,move:(nr,cr)=>({around:cr,panDelta:cr.sub(nr)}),activateOnStart:!0,moveStateManager:Lt,enable:St,assignEvents:Pf})})(P),ta=new bu(P,ne);ne.dragPan=new Dn(we,Br,ta),this._add("mousePan",Br),this._add("touchPan",ta,["touchZoom","touchRotate"]),P.interactive&&P.dragPan&&ne.dragPan.enable(P.dragPan);const Ve=new hc,Ye=new eu;ne.touchZoomRotate=new yn(we,Ye,Ve,zt),this._add("touchRotate",Ve,["touchPan","touchZoom"]),this._add("touchZoom",Ye,["touchPan","touchRotate"]),P.interactive&&P.touchZoomRotate&&ne.touchZoomRotate.enable(P.touchZoomRotate);const it=ne.scrollZoom=new pa(ne,()=>this._triggerRenderFrame());this._add("scrollZoom",it,["mousePan"]),P.interactive&&P.scrollZoom&&ne.scrollZoom.enable(P.scrollZoom);const ht=ne.keyboard=new yr(ne);this._add("keyboard",ht),P.interactive&&P.keyboard&&ne.keyboard.enable(),this._add("blockableMapEvent",new Js(ne))}_add(P,ne,we){this._handlers.push({handlerName:P,handler:ne,allowed:we}),this._handlersById[P]=ne}stop(P){if(!this._updatingCamera){for(const{handler:ne}of this._handlers)ne.reset();this._inertia.clear(),this._fireEvents({},{},P),this._changes=[]}}isActive(){for(const{handler:P}of this._handlers)if(P.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Mn(this._eventsInProgress)||this.isZooming()}_blockedByActive(P,ne,we){for(const Se in P)if(Se!==we&&(!ne||ne.indexOf(Se)<0))return!0;return!1}_getMapTouches(P){const ne=[];for(const we of P)this._el.contains(we.target)&&ne.push(we);return ne}mergeHandlerResult(P,ne,we,Se,Re){if(!we)return;t.e(P,we);const ct={handlerName:Se,originalEvent:we.originalEvent||Re};we.zoomDelta!==void 0&&(ne.zoom=ct),we.panDelta!==void 0&&(ne.drag=ct),we.pitchDelta!==void 0&&(ne.pitch=ct),we.bearingDelta!==void 0&&(ne.rotate=ct)}_applyChanges(){const P={},ne={},we={};for(const[Se,Re,ct]of this._changes)Se.panDelta&&(P.panDelta=(P.panDelta||new t.P(0,0))._add(Se.panDelta)),Se.zoomDelta&&(P.zoomDelta=(P.zoomDelta||0)+Se.zoomDelta),Se.bearingDelta&&(P.bearingDelta=(P.bearingDelta||0)+Se.bearingDelta),Se.pitchDelta&&(P.pitchDelta=(P.pitchDelta||0)+Se.pitchDelta),Se.around!==void 0&&(P.around=Se.around),Se.pinchAround!==void 0&&(P.pinchAround=Se.pinchAround),Se.noInertia&&(P.noInertia=Se.noInertia),t.e(ne,Re),t.e(we,ct);this._updateMapTransform(P,ne,we),this._changes=[]}_updateMapTransform(P,ne,we){const Se=this._map,Re=Se._getTransformForUpdate(),ct=Se.terrain;if(!(oi(P)||ct&&this._terrainMovement))return this._fireEvents(ne,we,!0);let{panDelta:_t,zoomDelta:zt,bearingDelta:Qt,pitchDelta:fr,around:gr,pinchAround:Br}=P;Br!==void 0&&(gr=Br),Se._stop(!0),gr=gr||Se.transform.centerPoint;const ta=Re.pointLocation(_t?gr.sub(_t):gr);Qt&&(Re.bearing+=Qt),fr&&(Re.pitch+=fr),zt&&(Re.zoom+=zt),ct?this._terrainMovement||!ne.drag&&!ne.zoom?ne.drag&&this._terrainMovement?Re.center=Re.pointLocation(Re.centerPoint.sub(_t)):Re.setLocationAtPoint(ta,gr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Re.setLocationAtPoint(ta,gr)):Re.setLocationAtPoint(ta,gr),Se._applyUpdatedTransform(Re),this._map._update(),P.noInertia||this._inertia.record(P),this._fireEvents(ne,we,!0)}_fireEvents(P,ne,we){const Se=Mn(this._eventsInProgress),Re=Mn(P),ct={};for(const gr in P){const{originalEvent:Br}=P[gr];this._eventsInProgress[gr]||(ct[`${gr}start`]=Br),this._eventsInProgress[gr]=P[gr]}!Se&&Re&&this._fireEvent("movestart",Re.originalEvent);for(const gr in ct)this._fireEvent(gr,ct[gr]);Re&&this._fireEvent("move",Re.originalEvent);for(const gr in P){const{originalEvent:Br}=P[gr];this._fireEvent(gr,Br)}const _t={};let zt;for(const gr in this._eventsInProgress){const{handlerName:Br,originalEvent:ta}=this._eventsInProgress[gr];this._handlersById[Br].isActive()||(delete this._eventsInProgress[gr],zt=ne[Br]||ta,_t[`${gr}end`]=zt)}for(const gr in _t)this._fireEvent(gr,_t[gr]);const Qt=Mn(this._eventsInProgress),fr=(Se||Re)&&!Qt;if(fr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const gr=this._map._getTransformForUpdate();gr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(gr)}if(we&&fr){this._updatingCamera=!0;const gr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Br=ta=>ta!==0&&-this._bearingSnap<ta&&ta<this._bearingSnap;!gr||!gr.essential&&i.prefersReducedMotion?(this._map.fire(new t.k("moveend",{originalEvent:zt})),Br(this._map.getBearing())&&this._map.resetNorth()):(Br(gr.bearing||this._map.getBearing())&&(gr.bearing=0),gr.freezeElevation=!0,this._map.easeTo(gr,{originalEvent:zt})),this._updatingCamera=!1}}_fireEvent(P,ne){this._map.fire(new t.k(P,ne?{originalEvent:ne}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(P=>{delete this._frameId,this.handleEvent(new dn("renderFrame",{timeStamp:P})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class zi extends t.E{constructor(P,ne){super(),this._renderFrameCallback=()=>{const we=Math.min((i.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(we)),we<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=P,this._bearingSnap=ne.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(P,ne){return this.jumpTo({center:P},ne)}panBy(P,ne,we){return P=t.P.convert(P).mult(-1),this.panTo(this.transform.center,t.e({offset:P},ne),we)}panTo(P,ne,we){return this.easeTo(t.e({center:P},ne),we)}getZoom(){return this.transform.zoom}setZoom(P,ne){return this.jumpTo({zoom:P},ne),this}zoomTo(P,ne,we){return this.easeTo(t.e({zoom:P},ne),we)}zoomIn(P,ne){return this.zoomTo(this.getZoom()+1,P,ne),this}zoomOut(P,ne){return this.zoomTo(this.getZoom()-1,P,ne),this}getBearing(){return this.transform.bearing}setBearing(P,ne){return this.jumpTo({bearing:P},ne),this}getPadding(){return this.transform.padding}setPadding(P,ne){return this.jumpTo({padding:P},ne),this}rotateTo(P,ne,we){return this.easeTo(t.e({bearing:P},ne),we)}resetNorth(P,ne){return this.rotateTo(0,t.e({duration:1e3},P),ne),this}resetNorthPitch(P,ne){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},P),ne),this}snapToNorth(P,ne){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(P,ne):this}getPitch(){return this.transform.pitch}setPitch(P,ne){return this.jumpTo({pitch:P},ne),this}cameraForBounds(P,ne){P=ae.convert(P).adjustAntiMeridian();const we=ne&&ne.bearing||0;return this._cameraForBoxAndBearing(P.getNorthWest(),P.getSouthEast(),we,ne)}_cameraForBoxAndBearing(P,ne,we,Se){const Re={top:0,bottom:0,right:0,left:0};if(typeof(Se=t.e({padding:Re,offset:[0,0],maxZoom:this.transform.maxZoom},Se)).padding=="number"){const ca=Se.padding;Se.padding={top:ca,bottom:ca,right:ca,left:ca}}Se.padding=t.e(Re,Se.padding);const ct=this.transform,_t=ct.padding,zt=new ae(P,ne),Qt=ct.project(zt.getNorthWest()),fr=ct.project(zt.getNorthEast()),gr=ct.project(zt.getSouthEast()),Br=ct.project(zt.getSouthWest()),ta=t.ba(-we),Ve=Qt.rotate(ta),Ye=fr.rotate(ta),it=gr.rotate(ta),ht=Br.rotate(ta),St=new t.P(Math.max(Ve.x,Ye.x,ht.x,it.x),Math.max(Ve.y,Ye.y,ht.y,it.y)),yt=new t.P(Math.min(Ve.x,Ye.x,ht.x,it.x),Math.min(Ve.y,Ye.y,ht.y,it.y)),Lt=St.sub(yt),nr=(ct.width-(_t.left+_t.right+Se.padding.left+Se.padding.right))/Lt.x,cr=(ct.height-(_t.top+_t.bottom+Se.padding.top+Se.padding.bottom))/Lt.y;if(cr<0||nr<0)return void t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const mr=Math.min(ct.scaleZoom(ct.scale*Math.min(nr,cr)),Se.maxZoom),Pr=t.P.convert(Se.offset),Vr=new t.P((Se.padding.left-Se.padding.right)/2,(Se.padding.top-Se.padding.bottom)/2).rotate(t.ba(we)),oa=Pr.add(Vr).mult(ct.scale/ct.zoomScale(mr));return{center:ct.unproject(Qt.add(gr).div(2).sub(oa)),zoom:mr,bearing:we}}fitBounds(P,ne,we){return this._fitInternal(this.cameraForBounds(P,ne),ne,we)}fitScreenCoordinates(P,ne,we,Se,Re){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.P.convert(P)),this.transform.pointLocation(t.P.convert(ne)),we,Se),Se,Re)}_fitInternal(P,ne,we){return P?(delete(ne=t.e(P,ne)).padding,ne.linear?this.easeTo(ne,we):this.flyTo(ne,we)):this}jumpTo(P,ne){this.stop();const we=this._getTransformForUpdate();let Se=!1,Re=!1,ct=!1;return"zoom"in P&&we.zoom!==+P.zoom&&(Se=!0,we.zoom=+P.zoom),P.center!==void 0&&(we.center=t.N.convert(P.center)),"bearing"in P&&we.bearing!==+P.bearing&&(Re=!0,we.bearing=+P.bearing),"pitch"in P&&we.pitch!==+P.pitch&&(ct=!0,we.pitch=+P.pitch),P.padding==null||we.isPaddingEqual(P.padding)||(we.padding=P.padding),this._applyUpdatedTransform(we),this.fire(new t.k("movestart",ne)).fire(new t.k("move",ne)),Se&&this.fire(new t.k("zoomstart",ne)).fire(new t.k("zoom",ne)).fire(new t.k("zoomend",ne)),Re&&this.fire(new t.k("rotatestart",ne)).fire(new t.k("rotate",ne)).fire(new t.k("rotateend",ne)),ct&&this.fire(new t.k("pitchstart",ne)).fire(new t.k("pitch",ne)).fire(new t.k("pitchend",ne)),this.fire(new t.k("moveend",ne))}calculateCameraOptionsFromTo(P,ne,we,Se=0){const Re=t.Z.fromLngLat(P,ne),ct=t.Z.fromLngLat(we,Se),_t=ct.x-Re.x,zt=ct.y-Re.y,Qt=ct.z-Re.z,fr=Math.hypot(_t,zt,Qt);if(fr===0)throw new Error("Can't calculate camera options with same From and To");const gr=Math.hypot(_t,zt),Br=this.transform.scaleZoom(this.transform.cameraToCenterDistance/fr/this.transform.tileSize),ta=180*Math.atan2(_t,-zt)/Math.PI;let Ve=180*Math.acos(gr/fr)/Math.PI;return Ve=Qt<0?90-Ve:90+Ve,{center:ct.toLngLat(),zoom:Br,pitch:Ve,bearing:ta}}easeTo(P,ne){var we;this._stop(!1,P.easeId),((P=t.e({offset:[0,0],duration:500,easing:t.b9},P)).animate===!1||!P.essential&&i.prefersReducedMotion)&&(P.duration=0);const Se=this._getTransformForUpdate(),Re=Se.zoom,ct=Se.bearing,_t=Se.pitch,zt=Se.padding,Qt="bearing"in P?this._normalizeBearing(P.bearing,ct):ct,fr="pitch"in P?+P.pitch:_t,gr="padding"in P?P.padding:Se.padding,Br=t.P.convert(P.offset);let ta=Se.centerPoint.add(Br);const Ve=Se.pointLocation(ta),{center:Ye,zoom:it}=Se.getConstrained(t.N.convert(P.center||Ve),(we=P.zoom)!==null&&we!==void 0?we:Re);this._normalizeCenter(Ye,Se);const ht=Se.project(Ve),St=Se.project(Ye).sub(ht),yt=Se.zoomScale(it-Re);let Lt,nr;P.around&&(Lt=t.N.convert(P.around),nr=Se.locationPoint(Lt));const cr={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||it!==Re,this._rotating=this._rotating||ct!==Qt,this._pitching=this._pitching||fr!==_t,this._padding=!Se.isPaddingEqual(gr),this._easeId=P.easeId,this._prepareEase(ne,P.noMoveStart,cr),this.terrain&&this._prepareElevation(Ye),this._ease(mr=>{if(this._zooming&&(Se.zoom=t.y.number(Re,it,mr)),this._rotating&&(Se.bearing=t.y.number(ct,Qt,mr)),this._pitching&&(Se.pitch=t.y.number(_t,fr,mr)),this._padding&&(Se.interpolatePadding(zt,gr,mr),ta=Se.centerPoint.add(Br)),this.terrain&&!P.freezeElevation&&this._updateElevation(mr),Lt)Se.setLocationAtPoint(Lt,nr);else{const Pr=Se.zoomScale(Se.zoom-Re),Vr=it>Re?Math.min(2,yt):Math.max(.5,yt),oa=Math.pow(Vr,1-mr),ca=Se.unproject(ht.add(St.mult(mr*oa)).mult(Pr));Se.setLocationAtPoint(Se.renderWorldCopies?ca.wrap():ca,ta)}this._applyUpdatedTransform(Se),this._fireMoveEvents(ne)},mr=>{this.terrain&&P.freezeElevation&&this._finalizeElevation(),this._afterEase(ne,mr)},P),this}_prepareEase(P,ne,we={}){this._moving=!0,ne||we.moving||this.fire(new t.k("movestart",P)),this._zooming&&!we.zooming&&this.fire(new t.k("zoomstart",P)),this._rotating&&!we.rotating&&this.fire(new t.k("rotatestart",P)),this._pitching&&!we.pitching&&this.fire(new t.k("pitchstart",P))}_prepareElevation(P){this._elevationCenter=P,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(P,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(P){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const ne=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(P<1&&ne!==this._elevationTarget){const we=this._elevationTarget-this._elevationStart;this._elevationStart+=P*(we-(ne-(we*P+this._elevationStart))/(1-P)),this._elevationTarget=ne}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,P)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(P){const ne=P.getCameraPosition(),we=this.terrain.getElevationForLngLatZoom(ne.lngLat,P.zoom);if(ne.altitude<we){const Se=this.calculateCameraOptionsFromTo(ne.lngLat,we,P.center,P.elevation);return{pitch:Se.pitch,zoom:Se.zoom}}return{}}_applyUpdatedTransform(P){const ne=[];if(this.terrain&&ne.push(Se=>this._elevateCameraIfInsideTerrain(Se)),this.transformCameraUpdate&&ne.push(Se=>this.transformCameraUpdate(Se)),!ne.length)return;const we=P.clone();for(const Se of ne){const Re=we.clone(),{center:ct,zoom:_t,pitch:zt,bearing:Qt,elevation:fr}=Se(Re);ct&&(Re.center=ct),_t!==void 0&&(Re.zoom=_t),zt!==void 0&&(Re.pitch=zt),Qt!==void 0&&(Re.bearing=Qt),fr!==void 0&&(Re.elevation=fr),we.apply(Re)}this.transform.apply(we)}_fireMoveEvents(P){this.fire(new t.k("move",P)),this._zooming&&this.fire(new t.k("zoom",P)),this._rotating&&this.fire(new t.k("rotate",P)),this._pitching&&this.fire(new t.k("pitch",P))}_afterEase(P,ne){if(this._easeId&&ne&&this._easeId===ne)return;delete this._easeId;const we=this._zooming,Se=this._rotating,Re=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,we&&this.fire(new t.k("zoomend",P)),Se&&this.fire(new t.k("rotateend",P)),Re&&this.fire(new t.k("pitchend",P)),this.fire(new t.k("moveend",P))}flyTo(P,ne){var we;if(!P.essential&&i.prefersReducedMotion){const Ln=t.M(P,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ln,ne)}this.stop(),P=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},P);const Se=this._getTransformForUpdate(),Re=Se.zoom,ct=Se.bearing,_t=Se.pitch,zt=Se.padding,Qt="bearing"in P?this._normalizeBearing(P.bearing,ct):ct,fr="pitch"in P?+P.pitch:_t,gr="padding"in P?P.padding:Se.padding,Br=t.P.convert(P.offset);let ta=Se.centerPoint.add(Br);const Ve=Se.pointLocation(ta),{center:Ye,zoom:it}=Se.getConstrained(t.N.convert(P.center||Ve),(we=P.zoom)!==null&&we!==void 0?we:Re);this._normalizeCenter(Ye,Se);const ht=Se.zoomScale(it-Re),St=Se.project(Ve),yt=Se.project(Ye).sub(St);let Lt=P.curve;const nr=Math.max(Se.width,Se.height),cr=nr/ht,mr=yt.mag();if("minZoom"in P){const Ln=t.ac(Math.min(P.minZoom,Re,it),Se.minZoom,Se.maxZoom),ui=nr/Se.zoomScale(Ln-Re);Lt=Math.sqrt(ui/mr*2)}const Pr=Lt*Lt;function Vr(Ln){const ui=(cr*cr-nr*nr+(Ln?-1:1)*Pr*Pr*mr*mr)/(2*(Ln?cr:nr)*Pr*mr);return Math.log(Math.sqrt(ui*ui+1)-ui)}function oa(Ln){return(Math.exp(Ln)-Math.exp(-Ln))/2}function ca(Ln){return(Math.exp(Ln)+Math.exp(-Ln))/2}const Aa=Vr(!1);let $a=function(Ln){return ca(Aa)/ca(Aa+Lt*Ln)},Cn=function(Ln){return nr*((ca(Aa)*(oa(ui=Aa+Lt*Ln)/ca(ui))-oa(Aa))/Pr)/mr;var ui},wn=(Vr(!0)-Aa)/Lt;if(Math.abs(mr)<1e-6||!isFinite(wn)){if(Math.abs(nr-cr)<1e-6)return this.easeTo(P,ne);const Ln=cr<nr?-1:1;wn=Math.abs(Math.log(cr/nr))/Lt,Cn=()=>0,$a=ui=>Math.exp(Ln*Lt*ui)}return P.duration="duration"in P?+P.duration:1e3*wn/("screenSpeed"in P?+P.screenSpeed/Lt:+P.speed),P.maxDuration&&P.duration>P.maxDuration&&(P.duration=0),this._zooming=!0,this._rotating=ct!==Qt,this._pitching=fr!==_t,this._padding=!Se.isPaddingEqual(gr),this._prepareEase(ne,!1),this.terrain&&this._prepareElevation(Ye),this._ease(Ln=>{const ui=Ln*wn,Mi=1/$a(ui);Se.zoom=Ln===1?it:Re+Se.scaleZoom(Mi),this._rotating&&(Se.bearing=t.y.number(ct,Qt,Ln)),this._pitching&&(Se.pitch=t.y.number(_t,fr,Ln)),this._padding&&(Se.interpolatePadding(zt,gr,Ln),ta=Se.centerPoint.add(Br)),this.terrain&&!P.freezeElevation&&this._updateElevation(Ln);const xi=Ln===1?Ye:Se.unproject(St.add(yt.mult(Cn(ui))).mult(Mi));Se.setLocationAtPoint(Se.renderWorldCopies?xi.wrap():xi,ta),this._applyUpdatedTransform(Se),this._fireMoveEvents(ne)},()=>{this.terrain&&P.freezeElevation&&this._finalizeElevation(),this._afterEase(ne)},P),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(P,ne){var we;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const Se=this._onEaseEnd;delete this._onEaseEnd,Se.call(this,ne)}return P||(we=this.handlers)===null||we===void 0||we.stop(!1),this}_ease(P,ne,we){we.animate===!1||we.duration===0?(P(1),ne()):(this._easeStart=i.now(),this._easeOptions=we,this._onEaseFrame=P,this._onEaseEnd=ne,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(P,ne){P=t.b3(P,-180,180);const we=Math.abs(P-ne);return Math.abs(P-360-ne)<we&&(P-=360),Math.abs(P+360-ne)<we&&(P+=360),P}_normalizeCenter(P,ne){if(!ne.renderWorldCopies||ne.lngRange)return;const we=P.lng-ne.center.lng;P.lng+=we>180?-360:we<-180?360:0}queryTerrainElevation(P){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(P),this.transform.tileZoom)-this.transform.elevation:null}}const Zi={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Hi{constructor(P=Zi){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=ne=>{!ne||ne.sourceDataType!=="metadata"&&ne.sourceDataType!=="visibility"&&ne.dataType!=="style"&&ne.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=P}getDefaultPosition(){return"bottom-right"}onAdd(P){return this._map=P,this._compact=this.options.compact,this._container=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(P,ne){const we=this._map._getUIString(`AttributionControl.${ne}`);P.title=we,P.setAttribute("aria-label",we)}_updateAttributions(){if(!this._map.style)return;let P=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?P=P.concat(this.options.customAttribution.map(Se=>typeof Se!="string"?"":Se)):typeof this.options.customAttribution=="string"&&P.push(this.options.customAttribution)),this._map.style.stylesheet){const Se=this._map.style.stylesheet;this.styleOwner=Se.owner,this.styleId=Se.id}const ne=this._map.style.sourceCaches;for(const Se in ne){const Re=ne[Se];if(Re.used||Re.usedForTerrain){const ct=Re.getSource();ct.attribution&&P.indexOf(ct.attribution)<0&&P.push(ct.attribution)}}P=P.filter(Se=>String(Se).trim()),P.sort((Se,Re)=>Se.length-Re.length),P=P.filter((Se,Re)=>{for(let ct=Re+1;ct<P.length;ct++)if(P[ct].indexOf(Se)>=0)return!1;return!0});const we=P.join(" | ");we!==this._attribHTML&&(this._attribHTML=we,P.length?(this._innerContainer.innerHTML=we,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class li{constructor(P={}){this._updateCompact=()=>{const ne=this._container.children;if(ne.length){const we=ne[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&we.classList.add("maplibregl-compact"):we.classList.remove("maplibregl-compact")}},this.options=P}getDefaultPosition(){return"bottom-left"}onAdd(P){this._map=P,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const ne=n.create("a","maplibregl-ctrl-logo");return ne.target="_blank",ne.rel="noopener nofollow",ne.href="https://maplibre.org/",ne.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ne.setAttribute("rel","noopener nofollow"),this._container.appendChild(ne),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){n.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Yn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(P){const ne=++this._id;return this._queue.push({callback:P,id:ne,cancelled:!1}),ne}remove(P){const ne=this._currentlyRunning,we=ne?this._queue.concat(ne):this._queue;for(const Se of we)if(Se.id===P)return void(Se.cancelled=!0)}run(P=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const ne=this._currentlyRunning=this._queue;this._queue=[];for(const we of ne)if(!we.cancelled&&(we.callback(P),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var oo=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class No extends t.E{constructor(P){super(),this.sourceCache=P,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,P.usedForTerrain=!0,P.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(P,ne){this.sourceCache.update(P,ne),this._renderableTilesKeys=[];const we={};for(const Se of P.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:ne}))we[Se.key]=!0,this._renderableTilesKeys.push(Se.key),this._tiles[Se.key]||(Se.posMatrix=new Float64Array(16),t.aP(Se.posMatrix,0,t.X,0,t.X,0,1),this._tiles[Se.key]=new nt(Se,this.tileSize));for(const Se in this._tiles)we[Se]||delete this._tiles[Se]}freeRtt(P){for(const ne in this._tiles){const we=this._tiles[ne];(!P||we.tileID.equals(P)||we.tileID.isChildOf(P)||P.isChildOf(we.tileID))&&(we.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(P=>this.getTileByID(P))}getTileByID(P){return this._tiles[P]}getTerrainCoords(P){const ne={};for(const we of this._renderableTilesKeys){const Se=this._tiles[we].tileID;if(Se.canonical.equals(P.canonical)){const Re=P.clone();Re.posMatrix=new Float64Array(16),t.aP(Re.posMatrix,0,t.X,0,t.X,0,1),ne[we]=Re}else if(Se.canonical.isChildOf(P.canonical)){const Re=P.clone();Re.posMatrix=new Float64Array(16);const ct=Se.canonical.z-P.canonical.z,_t=Se.canonical.x-(Se.canonical.x>>ct<<ct),zt=Se.canonical.y-(Se.canonical.y>>ct<<ct),Qt=t.X>>ct;t.aP(Re.posMatrix,0,Qt,0,Qt,0,1),t.J(Re.posMatrix,Re.posMatrix,[-_t*Qt,-zt*Qt,0]),ne[we]=Re}else if(P.canonical.isChildOf(Se.canonical)){const Re=P.clone();Re.posMatrix=new Float64Array(16);const ct=P.canonical.z-Se.canonical.z,_t=P.canonical.x-(P.canonical.x>>ct<<ct),zt=P.canonical.y-(P.canonical.y>>ct<<ct),Qt=t.X>>ct;t.aP(Re.posMatrix,0,t.X,0,t.X,0,1),t.J(Re.posMatrix,Re.posMatrix,[_t*Qt,zt*Qt,0]),t.K(Re.posMatrix,Re.posMatrix,[1/2**ct,1/2**ct,0]),ne[we]=Re}}return ne}getSourceTile(P,ne){const we=this.sourceCache._source;let Se=P.overscaledZ-this.deltaZoom;if(Se>we.maxzoom&&(Se=we.maxzoom),Se<we.minzoom)return null;this._sourceTileCache[P.key]||(this._sourceTileCache[P.key]=P.scaledTo(Se).key);let Re=this.sourceCache.getTileByID(this._sourceTileCache[P.key]);if((!Re||!Re.dem)&&ne)for(;Se>=we.minzoom&&(!Re||!Re.dem);)Re=this.sourceCache.getTileByID(P.scaledTo(Se--).key);return Re}tilesAfterTime(P=Date.now()){return Object.values(this._tiles).filter(ne=>ne.timeAdded>=P)}}class _s{constructor(P,ne,we){this.painter=P,this.sourceCache=new No(ne),this.options=we,this.exaggeration=typeof we.exaggeration=="number"?we.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(P,ne,we,Se=t.X){var Re;if(!(ne>=0&&ne<Se&&we>=0&&we<Se))return 0;const ct=this.getTerrainData(P),_t=(Re=ct.tile)===null||Re===void 0?void 0:Re.dem;if(!_t)return 0;const zt=(function(Ve,Ye,it){var ht=Ye[0],St=Ye[1];return Ve[0]=it[0]*ht+it[4]*St+it[12],Ve[1]=it[1]*ht+it[5]*St+it[13],Ve})([],[ne/Se*t.X,we/Se*t.X],ct.u_terrain_matrix),Qt=[zt[0]*_t.dim,zt[1]*_t.dim],fr=Math.floor(Qt[0]),gr=Math.floor(Qt[1]),Br=Qt[0]-fr,ta=Qt[1]-gr;return _t.get(fr,gr)*(1-Br)*(1-ta)+_t.get(fr+1,gr)*Br*(1-ta)+_t.get(fr,gr+1)*(1-Br)*ta+_t.get(fr+1,gr+1)*Br*ta}getElevationForLngLatZoom(P,ne){if(!t.bb(ne,P.wrap()))return 0;const{tileID:we,mercatorX:Se,mercatorY:Re}=this._getOverscaledTileIDFromLngLatZoom(P,ne);return this.getElevation(we,Se%t.X,Re%t.X,t.X)}getElevation(P,ne,we,Se=t.X){return this.getDEMElevation(P,ne,we,Se)*this.exaggeration}getTerrainData(P){if(!this._emptyDemTexture){const Se=this.painter.context,Re=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new u(Se,Re,Se.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new u(Se,new t.R({width:1,height:1}),Se.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.an([])}const ne=this.sourceCache.getSourceTile(P,!0);if(ne&&ne.dem&&(!ne.demTexture||ne.needsTerrainPrepare)){const Se=this.painter.context;ne.demTexture=this.painter.getTileTexture(ne.dem.stride),ne.demTexture?ne.demTexture.update(ne.dem.getPixels(),{premultiply:!1}):ne.demTexture=new u(Se,ne.dem.getPixels(),Se.gl.RGBA,{premultiply:!1}),ne.demTexture.bind(Se.gl.NEAREST,Se.gl.CLAMP_TO_EDGE),ne.needsTerrainPrepare=!1}const we=ne&&ne+ne.tileID.key+P.key;if(we&&!this._demMatrixCache[we]){const Se=this.sourceCache.sourceCache._source.maxzoom;let Re=P.canonical.z-ne.tileID.canonical.z;P.overscaledZ>P.canonical.z&&(P.canonical.z>=Se?Re=P.canonical.z-Se:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const ct=P.canonical.x-(P.canonical.x>>Re<<Re),_t=P.canonical.y-(P.canonical.y>>Re<<Re),zt=t.bc(new Float64Array(16),[1/(t.X<<Re),1/(t.X<<Re),0]);t.J(zt,zt,[ct*t.X,_t*t.X,0]),this._demMatrixCache[P.key]={matrix:zt,coord:P}}return{u_depth:2,u_terrain:3,u_terrain_dim:ne&&ne.dem&&ne.dem.dim||1,u_terrain_matrix:we?this._demMatrixCache[P.key].matrix:this._emptyDemMatrix,u_terrain_unpack:ne&&ne.dem&&ne.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(ne&&ne.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:ne}}getFramebuffer(P){const ne=this.painter,we=ne.width/devicePixelRatio,Se=ne.height/devicePixelRatio;return!this._fbo||this._fbo.width===we&&this._fbo.height===Se||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new u(ne.context,{width:we,height:Se,data:null},ne.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(ne.context.gl.NEAREST,ne.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new u(ne.context,{width:we,height:Se,data:null},ne.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(ne.context.gl.NEAREST,ne.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=ne.context.createFramebuffer(we,Se,!0,!1),this._fbo.depthAttachment.set(ne.context.createRenderbuffer(ne.context.gl.DEPTH_COMPONENT16,we,Se))),this._fbo.colorAttachment.set(P==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const P=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const ne=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let Re=0,ct=0;Re<this._coordsTextureSize;Re++)for(let _t=0;_t<this._coordsTextureSize;_t++,ct+=4)ne[ct+0]=255&_t,ne[ct+1]=255&Re,ne[ct+2]=_t>>8<<4|Re>>8,ne[ct+3]=0;const we=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(ne.buffer)),Se=new u(P,we,P.gl.RGBA,{premultiply:!1});return Se.bind(P.gl.NEAREST,P.gl.CLAMP_TO_EDGE),this._coordsTexture=Se,Se}pointCoordinate(P){this.painter.maybeDrawDepthAndCoords(!0);const ne=new Uint8Array(4),we=this.painter.context,Se=we.gl,Re=Math.round(P.x*this.painter.pixelRatio/devicePixelRatio),ct=Math.round(P.y*this.painter.pixelRatio/devicePixelRatio),_t=Math.round(this.painter.height/devicePixelRatio);we.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Se.readPixels(Re,_t-ct-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ne),we.bindFramebuffer.set(null);const zt=ne[0]+(ne[2]>>4<<8),Qt=ne[1]+((15&ne[2])<<8),fr=this.coordsIndex[255-ne[3]],gr=fr&&this.sourceCache.getTileByID(fr);if(!gr)return null;const Br=this._coordsTextureSize,ta=(1<<gr.tileID.canonical.z)*Br;return new t.Z((gr.tileID.canonical.x*Br+zt)/ta+gr.tileID.wrap,(gr.tileID.canonical.y*Br+Qt)/ta,this.getElevation(gr.tileID,zt,Qt,Br))}depthAtPoint(P){const ne=new Uint8Array(4),we=this.painter.context,Se=we.gl;return we.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Se.readPixels(P.x,this.painter.height/devicePixelRatio-P.y-1,1,1,Se.RGBA,Se.UNSIGNED_BYTE,ne),we.bindFramebuffer.set(null),(ne[0]/16777216+ne[1]/65536+ne[2]/256+ne[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const P=this.painter.context,ne=new t.bd,we=new t.aY,Se=this.meshSize,Re=t.X/Se,ct=Se*Se;for(let gr=0;gr<=Se;gr++)for(let Br=0;Br<=Se;Br++)ne.emplaceBack(Br*Re,gr*Re,0);for(let gr=0;gr<ct;gr+=Se+1)for(let Br=0;Br<Se;Br++)we.emplaceBack(Br+gr,Se+Br+gr+1,Se+Br+gr+2),we.emplaceBack(Br+gr,Se+Br+gr+2,Br+gr+1);const _t=ne.length,zt=_t+2*(Se+1);for(const gr of[0,1])for(let Br=0;Br<=Se;Br++)for(const ta of[0,1])ne.emplaceBack(Br*Re,gr*t.X,ta);for(let gr=0;gr<2*Se;gr+=2)we.emplaceBack(zt+gr,zt+gr+1,zt+gr+3),we.emplaceBack(zt+gr,zt+gr+3,zt+gr+2),we.emplaceBack(_t+gr,_t+gr+3,_t+gr+1),we.emplaceBack(_t+gr,_t+gr+2,_t+gr+3);const Qt=ne.length,fr=Qt+2*(Se+1);for(const gr of[0,1])for(let Br=0;Br<=Se;Br++)for(const ta of[0,1])ne.emplaceBack(gr*t.X,Br*Re,ta);for(let gr=0;gr<2*Se;gr+=2)we.emplaceBack(Qt+gr,Qt+gr+1,Qt+gr+3),we.emplaceBack(Qt+gr,Qt+gr+3,Qt+gr+2),we.emplaceBack(fr+gr,fr+gr+3,fr+gr+1),we.emplaceBack(fr+gr,fr+gr+2,fr+gr+3);return this._mesh=new uu(P.createVertexBuffer(ne,oo.members),P.createIndexBuffer(we),t.a0.simpleSegment(0,0,ne.length,we.length)),this._mesh}getMeshFrameDelta(P){return 2*Math.PI*t.be/Math.pow(2,P)/5}getMinTileElevationForLngLatZoom(P,ne){var we;const{tileID:Se}=this._getOverscaledTileIDFromLngLatZoom(P,ne);return(we=this.getMinMaxElevation(Se).minElevation)!==null&&we!==void 0?we:0}getMinMaxElevation(P){const ne=this.getTerrainData(P).tile,we={minElevation:null,maxElevation:null};return ne&&ne.dem&&(we.minElevation=ne.dem.min*this.exaggeration,we.maxElevation=ne.dem.max*this.exaggeration),we}_getOverscaledTileIDFromLngLatZoom(P,ne){const we=t.Z.fromLngLat(P.wrap()),Se=(1<<ne)*t.X,Re=we.x*Se,ct=we.y*Se,_t=Math.floor(Re/t.X),zt=Math.floor(ct/t.X);return{tileID:new t.S(ne,0,ne,_t,zt),mercatorX:Re,mercatorY:ct}}}class Gs{constructor(P,ne,we){this._context=P,this._size=ne,this._tileSize=we,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const P of this._objects)P.texture.destroy(),P.fbo.destroy()}_createObject(P){const ne=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),we=new u(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return we.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),ne.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),ne.colorAttachment.set(we.texture),{id:P,fbo:ne,texture:we,stamp:-1,inUse:!1}}getObjectForId(P){return this._objects[P]}useObject(P){P.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(ne=>P.id!==ne),this._recentlyUsed.push(P.id)}stampObject(P){P.stamp=++this._stamp}getOrCreateFreeObject(){for(const ne of this._recentlyUsed)if(!this._objects[ne].inUse)return this._objects[ne];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const P=this._createObject(this._objects.length);return this._objects.push(P),P}freeObject(P){P.inUse=!1}freeAllObjects(){for(const P of this._objects)this.freeObject(P)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(P=>!P.inUse)===!1}}const xs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Hs{constructor(P,ne){this.painter=P,this.terrain=ne,this.pool=new Gs(P.context,30,ne.sourceCache.tileSize*ne.qualityFactor)}destruct(){this.pool.destruct()}getTexture(P){return this.pool.getObjectForId(P.rtt[this._stacks.length-1].id).texture}prepareForRender(P,ne){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=P._order.filter(we=>!P._layers[we].isHidden(ne)),this._coordsDescendingInv={};for(const we in P.sourceCaches){this._coordsDescendingInv[we]={};const Se=P.sourceCaches[we].getVisibleCoordinates();for(const Re of Se){const ct=this.terrain.sourceCache.getTerrainCoords(Re);for(const _t in ct)this._coordsDescendingInv[we][_t]||(this._coordsDescendingInv[we][_t]=[]),this._coordsDescendingInv[we][_t].push(ct[_t])}}this._coordsDescendingInvStr={};for(const we of P._order){const Se=P._layers[we],Re=Se.source;if(xs[Se.type]&&!this._coordsDescendingInvStr[Re]){this._coordsDescendingInvStr[Re]={};for(const ct in this._coordsDescendingInv[Re])this._coordsDescendingInvStr[Re][ct]=this._coordsDescendingInv[Re][ct].map(_t=>_t.key).sort().join()}}for(const we of this._renderableTiles)for(const Se in this._coordsDescendingInvStr){const Re=this._coordsDescendingInvStr[Se][we.tileID.key];Re&&Re!==we.rttCoords[Se]&&(we.rtt=[])}}renderLayer(P){if(P.isHidden(this.painter.transform.zoom))return!1;const ne=P.type,we=this.painter,Se=this._renderableLayerIds[this._renderableLayerIds.length-1]===P.id;if(xs[ne]&&(this._prevType&&xs[this._prevType]||this._stacks.push([]),this._prevType=ne,this._stacks[this._stacks.length-1].push(P.id),!Se))return!0;if(xs[this._prevType]||xs[ne]&&Se){this._prevType=ne;const Re=this._stacks.length-1,ct=this._stacks[Re]||[];for(const _t of this._renderableTiles){if(this.pool.isFull()&&(ul(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(_t),_t.rtt[Re]){const Qt=this.pool.getObjectForId(_t.rtt[Re].id);if(Qt.stamp===_t.rtt[Re].stamp){this.pool.useObject(Qt);continue}}const zt=this.pool.getOrCreateFreeObject();this.pool.useObject(zt),this.pool.stampObject(zt),_t.rtt[Re]={id:zt.id,stamp:zt.stamp},we.context.bindFramebuffer.set(zt.fbo.framebuffer),we.context.clear({color:t.aM.transparent,stencil:0}),we.currentStencilSource=void 0;for(let Qt=0;Qt<ct.length;Qt++){const fr=we.style._layers[ct[Qt]],gr=fr.source?this._coordsDescendingInv[fr.source][_t.tileID.key]:[_t.tileID];we.context.viewport.set([0,0,zt.fbo.width,zt.fbo.height]),we._renderTileClippingMasks(fr,gr),we.renderLayer(we,we.style.sourceCaches[fr.source],fr,gr),fr.source&&(_t.rttCoords[fr.source]=this._coordsDescendingInvStr[fr.source][_t.tileID.key])}}return ul(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),xs[ne]}return!1}}const es={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},ml=r,dl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Zi,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:t.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ns=ze=>{ze.touchstart=ze.dragStart,ze.touchmoveWindow=ze.dragMove,ze.touchend=ze.dragEnd},Ti={showCompass:!0,showZoom:!0,visualizePitch:!1};class xo{constructor(P,ne,we=!1){this.mousedown=ct=>{this.startMouse(t.e({},ct,{ctrlKey:!0,preventDefault:()=>ct.preventDefault()}),n.mousePos(this.element,ct)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=ct=>{this.moveMouse(ct,n.mousePos(this.element,ct))},this.mouseup=ct=>{this.mouseRotate.dragEnd(ct),this.mousePitch&&this.mousePitch.dragEnd(ct),this.offTemp()},this.touchstart=ct=>{ct.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,ct.targetTouches)[0],this.startTouch(ct,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=ct=>{ct.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,ct.targetTouches)[0],this.moveTouch(ct,this._lastPos))},this.touchend=ct=>{ct.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const Se=P.dragRotate._mouseRotate.getClickTolerance(),Re=P.dragRotate._mousePitch.getClickTolerance();this.element=ne,this.mouseRotate=Gl({clickTolerance:Se,enable:!0}),this.touchRotate=(({enable:ct,clickTolerance:_t,bearingDegreesPerPixelMoved:zt=.8})=>{const Qt=new zc;return new xu({clickTolerance:_t,move:(fr,gr)=>({bearingDelta:(gr.x-fr.x)*zt}),moveStateManager:Qt,enable:ct,assignEvents:Ns})})({clickTolerance:Se,enable:!0}),this.map=P,we&&(this.mousePitch=uf({clickTolerance:Re,enable:!0}),this.touchPitch=(({enable:ct,clickTolerance:_t,pitchDegreesPerPixelMoved:zt=-.5})=>{const Qt=new zc;return new xu({clickTolerance:_t,move:(fr,gr)=>({pitchDelta:(gr.y-fr.y)*zt}),moveStateManager:Qt,enable:ct,assignEvents:Ns})})({clickTolerance:Re,enable:!0})),n.addEventListener(ne,"mousedown",this.mousedown),n.addEventListener(ne,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(ne,"touchcancel",this.reset)}startMouse(P,ne){this.mouseRotate.dragStart(P,ne),this.mousePitch&&this.mousePitch.dragStart(P,ne),n.disableDrag()}startTouch(P,ne){this.touchRotate.dragStart(P,ne),this.touchPitch&&this.touchPitch.dragStart(P,ne),n.disableDrag()}moveMouse(P,ne){const we=this.map,{bearingDelta:Se}=this.mouseRotate.dragMove(P,ne)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.mousePitch){const{pitchDelta:Re}=this.mousePitch.dragMove(P,ne)||{};Re&&we.setPitch(we.getPitch()+Re)}}moveTouch(P,ne){const we=this.map,{bearingDelta:Se}=this.touchRotate.dragMove(P,ne)||{};if(Se&&we.setBearing(we.getBearing()+Se),this.touchPitch){const{pitchDelta:Re}=this.touchPitch.dragMove(P,ne)||{};Re&&we.setPitch(we.getPitch()+Re)}}off(){const P=this.element;n.removeEventListener(P,"mousedown",this.mousedown),n.removeEventListener(P,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(P,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let Ls;function vs(ze,P,ne){const we=new t.N(ze.lng,ze.lat);if(ze=new t.N(ze.lng,ze.lat),P){const Se=new t.N(ze.lng-360,ze.lat),Re=new t.N(ze.lng+360,ze.lat),ct=ne.locationPoint(ze).distSqr(P);ne.locationPoint(Se).distSqr(P)<ct?ze=Se:ne.locationPoint(Re).distSqr(P)<ct&&(ze=Re)}for(;Math.abs(ze.lng-ne.center.lng)>180;){const Se=ne.locationPoint(ze);if(Se.x>=0&&Se.y>=0&&Se.x<=ne.width&&Se.y<=ne.height)break;ze.lng>ne.center.lng?ze.lng-=360:ze.lng+=360}return ze.lng!==we.lng&&ne.locationPoint(ze).y>ne.height/2-ne.getHorizon()?ze:we}const Kl={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function $l(ze,P,ne){const we=ze.classList;for(const Se in Kl)we.remove(`maplibregl-${ne}-anchor-${Se}`);we.add(`maplibregl-${ne}-anchor-${P}`)}class tu extends t.E{constructor(P){if(super(),this._onKeyPress=ne=>{const we=ne.code,Se=ne.charCode||ne.keyCode;we!=="Space"&&we!=="Enter"&&Se!==32&&Se!==13||this.togglePopup()},this._onMapClick=ne=>{const we=ne.originalEvent.target,Se=this._element;this._popup&&(we===Se||Se.contains(we))&&this.togglePopup()},this._update=ne=>{var we;if(!this._map)return;const Se=this._map.loaded()&&!this._map.isMoving();(ne?.type==="terrain"||ne?.type==="render"&&!Se)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?vs(this._lngLat,this._flatPos,this._map.transform):(we=this._lngLat)===null||we===void 0?void 0:we.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Re="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Re=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Re=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let ct="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?ct="rotateX(0deg)":this._pitchAlignment==="map"&&(ct=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||ne&&ne.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Kl[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${ct} ${Re}`),i.frameAsync(new AbortController).then(()=>{this._updateOpacity(ne&&ne.type==="moveend")}).catch(()=>{})},this._onMove=ne=>{if(!this._isDragging){const we=this._clickTolerance||this._map._clickTolerance;this._isDragging=ne.point.dist(this._pointerdownPos)>=we}this._isDragging&&(this._pos=ne.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.k("dragend")),this._state="inactive"},this._addDragHandler=ne=>{this._element.contains(ne.originalEvent.target)&&(ne.preventDefault(),this._positionDelta=ne.point.sub(this._pos).add(this._offset),this._pointerdownPos=ne.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=P&&P.anchor||"center",this._color=P&&P.color||"#3FB1CE",this._scale=P&&P.scale||1,this._draggable=P&&P.draggable||!1,this._clickTolerance=P&&P.clickTolerance||0,this._subpixelPositioning=P&&P.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=P&&P.rotation||0,this._rotationAlignment=P&&P.rotationAlignment||"auto",this._pitchAlignment=P&&P.pitchAlignment&&P.pitchAlignment!=="auto"?P.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(P?.opacity,P?.opacityWhenCovered),P&&P.element)this._element=P.element,this._offset=t.P.convert(P&&P.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const ne=n.createNS("http://www.w3.org/2000/svg","svg"),we=41,Se=27;ne.setAttributeNS(null,"display","block"),ne.setAttributeNS(null,"height",`${we}px`),ne.setAttributeNS(null,"width",`${Se}px`),ne.setAttributeNS(null,"viewBox",`0 0 ${Se} ${we}`);const Re=n.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"stroke","none"),Re.setAttributeNS(null,"stroke-width","1"),Re.setAttributeNS(null,"fill","none"),Re.setAttributeNS(null,"fill-rule","evenodd");const ct=n.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"fill-rule","nonzero");const _t=n.createNS("http://www.w3.org/2000/svg","g");_t.setAttributeNS(null,"transform","translate(3.0, 29.0)"),_t.setAttributeNS(null,"fill","#000000");const zt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const ht of zt){const St=n.createNS("http://www.w3.org/2000/svg","ellipse");St.setAttributeNS(null,"opacity","0.04"),St.setAttributeNS(null,"cx","10.5"),St.setAttributeNS(null,"cy","5.80029008"),St.setAttributeNS(null,"rx",ht.rx),St.setAttributeNS(null,"ry",ht.ry),_t.appendChild(St)}const Qt=n.createNS("http://www.w3.org/2000/svg","g");Qt.setAttributeNS(null,"fill",this._color);const fr=n.createNS("http://www.w3.org/2000/svg","path");fr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Qt.appendChild(fr);const gr=n.createNS("http://www.w3.org/2000/svg","g");gr.setAttributeNS(null,"opacity","0.25"),gr.setAttributeNS(null,"fill","#000000");const Br=n.createNS("http://www.w3.org/2000/svg","path");Br.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),gr.appendChild(Br);const ta=n.createNS("http://www.w3.org/2000/svg","g");ta.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ta.setAttributeNS(null,"fill","#FFFFFF");const Ve=n.createNS("http://www.w3.org/2000/svg","g");Ve.setAttributeNS(null,"transform","translate(8.0, 8.0)");const Ye=n.createNS("http://www.w3.org/2000/svg","circle");Ye.setAttributeNS(null,"fill","#000000"),Ye.setAttributeNS(null,"opacity","0.25"),Ye.setAttributeNS(null,"cx","5.5"),Ye.setAttributeNS(null,"cy","5.5"),Ye.setAttributeNS(null,"r","5.4999962");const it=n.createNS("http://www.w3.org/2000/svg","circle");it.setAttributeNS(null,"fill","#FFFFFF"),it.setAttributeNS(null,"cx","5.5"),it.setAttributeNS(null,"cy","5.5"),it.setAttributeNS(null,"r","5.4999962"),Ve.appendChild(Ye),Ve.appendChild(it),ct.appendChild(_t),ct.appendChild(Qt),ct.appendChild(gr),ct.appendChild(ta),ct.appendChild(Ve),ne.appendChild(ct),ne.setAttributeNS(null,"height",we*this._scale+"px"),ne.setAttributeNS(null,"width",Se*this._scale+"px"),this._element.appendChild(ne),this._offset=t.P.convert(P&&P.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",ne=>{ne.preventDefault()}),this._element.addEventListener("mousedown",ne=>{ne.preventDefault()}),$l(this._element,this._anchor,"marker"),P&&P.className)for(const ne of P.className.split(" "))this._element.classList.add(ne);this._popup=null}addTo(P){return this.remove(),this._map=P,this._element.setAttribute("aria-label",P._getUIString("Marker.Title")),P.getCanvasContainer().appendChild(this._element),P.on("move",this._update),P.on("moveend",this._update),P.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(P){return this._lngLat=t.N.convert(P),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(P){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),P){if(!("offset"in P.options)){const Se=Math.abs(13.5)/Math.SQRT2;P.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Se,-1*(38.1-13.5+Se)],"bottom-right":[-Se,-1*(38.1-13.5+Se)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=P,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(P){return this._subpixelPositioning=P,this}getPopup(){return this._popup}togglePopup(){const P=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:P?(P.isOpen()?P.remove():(P.setLngLat(this._lngLat),P.addTo(this._map)),this):this}_updateOpacity(P=!1){var ne,we;if(!(!((ne=this._map)===null||ne===void 0)&&ne.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(P)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const Se=this._map,Re=Se.terrain.depthAtPoint(this._pos),ct=Se.terrain.getElevationForLngLatZoom(this._lngLat,Se.transform.tileZoom);if(Se.transform.lngLatToCameraDepth(this._lngLat,ct)-Re<.006)return void(this._element.style.opacity=this._opacity);const _t=-this._offset.y/Se.transform._pixelPerMeter,zt=Math.sin(Se.getPitch()*Math.PI/180)*_t,Qt=Se.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),fr=Se.transform.lngLatToCameraDepth(this._lngLat,ct+zt)-Qt>.006;!((we=this._popup)===null||we===void 0)&&we.isOpen()&&fr&&this._popup.remove(),this._element.style.opacity=fr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(P){return this._offset=t.P.convert(P),this._update(),this}addClassName(P){this._element.classList.add(P)}removeClassName(P){this._element.classList.remove(P)}toggleClassName(P){return this._element.classList.toggle(P)}setDraggable(P){return this._draggable=!!P,this._map&&(P?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(P){return this._rotation=P||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(P){return this._rotationAlignment=P||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(P){return this._pitchAlignment=P&&P!=="auto"?P:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(P,ne){return P===void 0&&ne===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),P!==void 0&&(this._opacity=P),ne!==void 0&&(this._opacityWhenCovered=ne),this._map&&this._updateOpacity(!0),this}}const gc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Jl=0,Qu=!1;const yl={maxWidth:100,unit:"metric"};function ec(ze,P,ne){const we=ne&&ne.maxWidth||100,Se=ze._container.clientHeight/2,Re=ze.unproject([0,Se]),ct=ze.unproject([we,Se]),_t=Re.distanceTo(ct);if(ne&&ne.unit==="imperial"){const zt=3.2808*_t;zt>5280?Yi(P,we,zt/5280,ze._getUIString("ScaleControl.Miles")):Yi(P,we,zt,ze._getUIString("ScaleControl.Feet"))}else ne&&ne.unit==="nautical"?Yi(P,we,_t/1852,ze._getUIString("ScaleControl.NauticalMiles")):_t>=1e3?Yi(P,we,_t/1e3,ze._getUIString("ScaleControl.Kilometers")):Yi(P,we,_t,ze._getUIString("ScaleControl.Meters"))}function Yi(ze,P,ne,we){const Se=(function(Re){const ct=Math.pow(10,`${Math.floor(Re)}`.length-1);let _t=Re/ct;return _t=_t>=10?10:_t>=5?5:_t>=3?3:_t>=2?2:_t>=1?1:(function(zt){const Qt=Math.pow(10,Math.ceil(-Math.log(zt)/Math.LN10));return Math.round(zt*Qt)/Qt})(_t),ct*_t})(ne);ze.style.width=P*(Se/ne)+"px",ze.innerHTML=`${Se} ${we}`}const so={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},tc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function wu(ze){if(ze){if(typeof ze=="number"){const P=Math.round(Math.abs(ze)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,ze),"top-left":new t.P(P,P),"top-right":new t.P(-P,P),bottom:new t.P(0,-ze),"bottom-left":new t.P(P,-P),"bottom-right":new t.P(-P,-P),left:new t.P(ze,0),right:new t.P(-ze,0)}}if(ze instanceof t.P||Array.isArray(ze)){const P=t.P.convert(ze);return{center:P,top:P,"top-left":P,"top-right":P,bottom:P,"bottom-left":P,"bottom-right":P,left:P,right:P}}return{center:t.P.convert(ze.center||[0,0]),top:t.P.convert(ze.top||[0,0]),"top-left":t.P.convert(ze["top-left"]||[0,0]),"top-right":t.P.convert(ze["top-right"]||[0,0]),bottom:t.P.convert(ze.bottom||[0,0]),"bottom-left":t.P.convert(ze["bottom-left"]||[0,0]),"bottom-right":t.P.convert(ze["bottom-right"]||[0,0]),left:t.P.convert(ze.left||[0,0]),right:t.P.convert(ze.right||[0,0])}}return wu(new t.P(0,0))}const hu=r;e.AJAXError=t.bh,e.Evented=t.E,e.LngLat=t.N,e.MercatorCoordinate=t.Z,e.Point=t.P,e.addProtocol=t.bi,e.config=t.a,e.removeProtocol=t.bj,e.AttributionControl=Hi,e.BoxZoomHandler=Cu,e.CanvasSource=Je,e.CooperativeGesturesHandler=Gn,e.DoubleClickZoomHandler=Ja,e.DragPanHandler=Dn,e.DragRotateHandler=ti,e.EdgeInsets=Yl,e.FullscreenControl=class extends t.E{constructor(ze={}){super(),this._onFullscreenChange=()=>{var P;let ne=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((P=ne?.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)ne=ne.shadowRoot.fullscreenElement;ne===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,ze&&ze.container&&(ze.container instanceof HTMLElement?this._container=ze.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(ze){return this._map=ze,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const ze=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",ze).setAttribute("aria-hidden","true"),ze.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const ze=this._getTitle();this._fullscreenButton.setAttribute("aria-label",ze),this._fullscreenButton.title=ze}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=Le,e.GeolocateControl=class extends t.E{constructor(ze){super(),this._onSuccess=P=>{if(this._map){if(this._isOutOfMapMaxBounds(P))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",P)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=P,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(P),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(P),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",P)),this._finish()}},this._updateCamera=P=>{const ne=new t.N(P.coords.longitude,P.coords.latitude),we=P.coords.accuracy,Se=this._map.getBearing(),Re=t.e({bearing:Se},this.options.fitBoundsOptions),ct=ae.fromLngLat(ne,we);this._map.fitBounds(ct,Re,{geolocateSource:!0})},this._updateMarker=P=>{if(P){const ne=new t.N(P.coords.longitude,P.coords.latitude);this._accuracyCircleMarker.setLngLat(ne).addTo(this._map),this._userLocationDotMarker.setLngLat(ne).addTo(this._map),this._accuracy=P.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=P=>{if(this._map){if(this.options.trackUserLocation)if(P.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const ne=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(P.code===3&&Qu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",P)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",P=>P.preventDefault()),this._geolocateButton=n.create("button","maplibregl-ctrl-geolocate",this._container),n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=P=>{if(this._map){if(P===!1){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");const ne=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}else{const ne=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new tu({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new tu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",ne=>{ne.geolocateSource||this._watchState!=="ACTIVE_LOCK"||ne.originalEvent&&ne.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},gc,ze)}onAdd(ze){return this._map=ze,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(P=!1){if(Ls!==void 0&&!P)return Ls;if(window.navigator.permissions===void 0)return Ls=!!window.navigator.geolocation,Ls;try{Ls=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Ls=!!window.navigator.geolocation}return Ls})})().then(P=>this._finishSetupUI(P)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Jl=0,Qu=!1}_isOutOfMapMaxBounds(ze){const P=this._map.getMaxBounds(),ne=ze.coords;return P&&(ne.longitude<P.getWest()||ne.longitude>P.getEast()||ne.latitude<P.getSouth()||ne.latitude>P.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const ze=this._map.getBounds(),P=ze.getSouthEast(),ne=ze.getNorthEast(),we=P.distanceTo(ne),Se=Math.ceil(this._accuracy/(we/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Se}px`,this._circleElement.style.height=`${Se}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Jl--,Qu=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.k("trackuserlocationstart")),this.fire(new t.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let ze;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Jl++,Jl>1?(ze={maximumAge:6e5,timeout:0},Qu=!0):(ze=this.options.positionOptions,Qu=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ze)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.Hash=Bu,e.ImageSource=et,e.KeyboardHandler=yr,e.LngLatBounds=ae,e.LogoControl=li,e.Map=class extends zi{constructor(ze){t.bf.mark(t.bg.create);const P=Object.assign(Object.assign({},dl),ze);if(P.minZoom!=null&&P.maxZoom!=null&&P.minZoom>P.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(P.minPitch!=null&&P.maxPitch!=null&&P.minPitch>P.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(P.minPitch!=null&&P.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(P.maxPitch!=null&&P.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new al(P.minZoom,P.maxZoom,P.minPitch,P.maxPitch,P.renderWorldCopies),{bearingSnap:P.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Yn,this._controls=[],this._mapId=t.a4(),this._contextLost=ne=>{ne.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:ne}))},this._contextRestored=ne=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:ne}))},this._onMapScroll=ne=>{if(ne.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=P.interactive,this._maxTileCacheSize=P.maxTileCacheSize,this._maxTileCacheZoomLevels=P.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=P.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=P.preserveDrawingBuffer===!0,this._antialias=P.antialias===!0,this._trackResize=P.trackResize===!0,this._bearingSnap=P.bearingSnap,this._refreshExpiredTiles=P.refreshExpiredTiles===!0,this._fadeDuration=P.fadeDuration,this._crossSourceCollisions=P.crossSourceCollisions===!0,this._collectResourceTiming=P.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},es),P.locale),this._clickTolerance=P.clickTolerance,this._overridePixelRatio=P.pixelRatio,this._maxCanvasSize=P.maxCanvasSize,this.transformCameraUpdate=P.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=P.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new m(P.transformRequest),typeof P.container=="string"){if(this._container=document.getElementById(P.container),!this._container)throw new Error(`Container '${P.container}' not found.`)}else{if(!(P.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=P.container}if(P.maxBounds&&this.setMaxBounds(P.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let ne=!1;const we=xc(Se=>{this._trackResize&&!this._removed&&(this.resize(Se),this.redraw())},50);this._resizeObserver=new ResizeObserver(Se=>{ne?we(Se):ne=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Vi(this,P),this._hash=P.hash&&new Bu(typeof P.hash=="string"&&P.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:P.center,zoom:P.zoom,bearing:P.bearing,pitch:P.pitch}),P.bounds&&(this.resize(),this.fitBounds(P.bounds,t.e({},P.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=P.localIdeographFontFamily,this._validateStyle=P.validateStyle,P.style&&this.setStyle(P.style,{localIdeographFontFamily:P.localIdeographFontFamily}),P.attributionControl&&this.addControl(new Hi(typeof P.attributionControl=="boolean"?void 0:P.attributionControl)),P.maplibreLogo&&this.addControl(new li,P.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",ne=>{this._update(ne.dataType==="style"),this.fire(new t.k(`${ne.dataType}data`,ne))}),this.on("dataloading",ne=>{this.fire(new t.k(`${ne.dataType}dataloading`,ne))}),this.on("dataabort",ne=>{this.fire(new t.k("sourcedataabort",ne))})}_getMapId(){return this._mapId}addControl(ze,P){if(P===void 0&&(P=ze.getDefaultPosition?ze.getDefaultPosition():"top-right"),!ze||!ze.onAdd)return this.fire(new t.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const ne=ze.onAdd(this);this._controls.push(ze);const we=this._controlPositions[P];return P.indexOf("bottom")!==-1?we.insertBefore(ne,we.firstChild):we.appendChild(ne),this}removeControl(ze){if(!ze||!ze.onRemove)return this.fire(new t.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const P=this._controls.indexOf(ze);return P>-1&&this._controls.splice(P,1),ze.onRemove(this),this}hasControl(ze){return this._controls.indexOf(ze)>-1}calculateCameraOptionsFromTo(ze,P,ne,we){return we==null&&this.terrain&&(we=this.terrain.getElevationForLngLatZoom(ne,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(ze,P,ne,we)}resize(ze){var P;const ne=this._containerDimensions(),we=ne[0],Se=ne[1],Re=this._getClampedPixelRatio(we,Se);if(this._resizeCanvas(we,Se,Re),this.painter.resize(we,Se,Re),this.painter.overLimit()){const _t=this.painter.context.gl;this._maxCanvasSize=[_t.drawingBufferWidth,_t.drawingBufferHeight];const zt=this._getClampedPixelRatio(we,Se);this._resizeCanvas(we,Se,zt),this.painter.resize(we,Se,zt)}this.transform.resize(we,Se),(P=this._requestedCameraState)===null||P===void 0||P.resize(we,Se);const ct=!this._moving;return ct&&(this.stop(),this.fire(new t.k("movestart",ze)).fire(new t.k("move",ze))),this.fire(new t.k("resize",ze)),ct&&this.fire(new t.k("moveend",ze)),this}_getClampedPixelRatio(ze,P){const{0:ne,1:we}=this._maxCanvasSize,Se=this.getPixelRatio(),Re=ze*Se,ct=P*Se;return Math.min(Re>ne?ne/Re:1,ct>we?we/ct:1)*Se}getPixelRatio(){var ze;return(ze=this._overridePixelRatio)!==null&&ze!==void 0?ze:devicePixelRatio}setPixelRatio(ze){this._overridePixelRatio=ze,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(ze){return this.transform.setMaxBounds(ae.convert(ze)),this._update()}setMinZoom(ze){if((ze=ze??-2)>=-2&&ze<=this.transform.maxZoom)return this.transform.minZoom=ze,this._update(),this.getZoom()<ze&&this.setZoom(ze),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(ze){if((ze=ze??22)>=this.transform.minZoom)return this.transform.maxZoom=ze,this._update(),this.getZoom()>ze&&this.setZoom(ze),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(ze){if((ze=ze??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(ze>=0&&ze<=this.transform.maxPitch)return this.transform.minPitch=ze,this._update(),this.getPitch()<ze&&this.setPitch(ze),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(ze){if((ze=ze??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(ze>=this.transform.minPitch)return this.transform.maxPitch=ze,this._update(),this.getPitch()>ze&&this.setPitch(ze),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(ze){return this.transform.renderWorldCopies=ze,this._update()}project(ze){return this.transform.locationPoint(t.N.convert(ze),this.style&&this.terrain)}unproject(ze){return this.transform.pointLocation(t.P.convert(ze),this.terrain)}isMoving(){var ze;return this._moving||((ze=this.handlers)===null||ze===void 0?void 0:ze.isMoving())}isZooming(){var ze;return this._zooming||((ze=this.handlers)===null||ze===void 0?void 0:ze.isZooming())}isRotating(){var ze;return this._rotating||((ze=this.handlers)===null||ze===void 0?void 0:ze.isRotating())}_createDelegatedListener(ze,P,ne){if(ze==="mouseenter"||ze==="mouseover"){let we=!1;return{layers:P,listener:ne,delegates:{mousemove:Re=>{const ct=P.filter(zt=>this.getLayer(zt)),_t=ct.length!==0?this.queryRenderedFeatures(Re.point,{layers:ct}):[];_t.length?we||(we=!0,ne.call(this,new Vl(ze,this,Re.originalEvent,{features:_t}))):we=!1},mouseout:()=>{we=!1}}}}if(ze==="mouseleave"||ze==="mouseout"){let we=!1;return{layers:P,listener:ne,delegates:{mousemove:ct=>{const _t=P.filter(zt=>this.getLayer(zt));(_t.length!==0?this.queryRenderedFeatures(ct.point,{layers:_t}):[]).length?we=!0:we&&(we=!1,ne.call(this,new Vl(ze,this,ct.originalEvent)))},mouseout:ct=>{we&&(we=!1,ne.call(this,new Vl(ze,this,ct.originalEvent)))}}}}{const we=Se=>{const Re=P.filter(_t=>this.getLayer(_t)),ct=Re.length!==0?this.queryRenderedFeatures(Se.point,{layers:Re}):[];ct.length&&(Se.features=ct,ne.call(this,Se),delete Se.features)};return{layers:P,listener:ne,delegates:{[ze]:we}}}}_saveDelegatedListener(ze,P){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ze]=this._delegatedListeners[ze]||[],this._delegatedListeners[ze].push(P)}_removeDelegatedListener(ze,P,ne){if(!this._delegatedListeners||!this._delegatedListeners[ze])return;const we=this._delegatedListeners[ze];for(let Se=0;Se<we.length;Se++){const Re=we[Se];if(Re.listener===ne&&Re.layers.length===P.length&&Re.layers.every(ct=>P.includes(ct))){for(const ct in Re.delegates)this.off(ct,Re.delegates[ct]);return void we.splice(Se,1)}}}on(ze,P,ne){if(ne===void 0)return super.on(ze,P);const we=this._createDelegatedListener(ze,typeof P=="string"?[P]:P,ne);this._saveDelegatedListener(ze,we);for(const Se in we.delegates)this.on(Se,we.delegates[Se]);return this}once(ze,P,ne){if(ne===void 0)return super.once(ze,P);const we=typeof P=="string"?[P]:P,Se=this._createDelegatedListener(ze,we,ne);for(const Re in Se.delegates){const ct=Se.delegates[Re];Se.delegates[Re]=(..._t)=>{this._removeDelegatedListener(ze,we,ne),ct(..._t)}}this._saveDelegatedListener(ze,Se);for(const Re in Se.delegates)this.once(Re,Se.delegates[Re]);return this}off(ze,P,ne){return ne===void 0?super.off(ze,P):(this._removeDelegatedListener(ze,typeof P=="string"?[P]:P,ne),this)}queryRenderedFeatures(ze,P){if(!this.style)return[];let ne;const we=ze instanceof t.P||Array.isArray(ze),Se=we?ze:[[0,0],[this.transform.width,this.transform.height]];if(P=P||(we?{}:ze)||{},Se instanceof t.P||typeof Se[0]=="number")ne=[t.P.convert(Se)];else{const Re=t.P.convert(Se[0]),ct=t.P.convert(Se[1]);ne=[Re,new t.P(ct.x,Re.y),ct,new t.P(Re.x,ct.y),Re]}return this.style.queryRenderedFeatures(ne,P,this.transform)}querySourceFeatures(ze,P){return this.style.querySourceFeatures(ze,P)}setStyle(ze,P){return(P=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},P)).diff!==!1&&P.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ze?(this._diffStyle(ze,P),this):(this._localIdeographFontFamily=P.localIdeographFontFamily,this._updateStyle(ze,P))}setTransformRequest(ze){return this._requestManager.setTransformRequest(ze),this}_getUIString(ze){const P=this._locale[ze];if(P==null)throw new Error(`Missing UI string '${ze}'`);return P}_updateStyle(ze,P){if(P.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(ze,P));const ne=this.style&&P.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!ze)),ze?(this.style=new Mr(this,P||{}),this.style.setEventedParent(this,{style:this.style}),typeof ze=="string"?this.style.loadURL(ze,P,ne):this.style.loadJSON(ze,P,ne),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Mr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(ze,P){if(typeof ze=="string"){const ne=this._requestManager.transformRequest(ze,"Style");t.h(ne,new AbortController).then(we=>{this._updateDiff(we.data,P)}).catch(we=>{we&&this.fire(new t.j(we))})}else typeof ze=="object"&&this._updateDiff(ze,P)}_updateDiff(ze,P){try{this.style.setState(ze,P)&&this._update(!0)}catch(ne){t.w(`Unable to perform style diff: ${ne.message||ne.error||ne}. Rebuilding the style from scratch.`),this._updateStyle(ze,P)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(ze,P){return this._lazyInitEmptyStyle(),this.style.addSource(ze,P),this._update(!0)}isSourceLoaded(ze){const P=this.style&&this.style.sourceCaches[ze];if(P!==void 0)return P.loaded();this.fire(new t.j(new Error(`There is no source with ID '${ze}'`)))}setTerrain(ze){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),ze){const P=this.style.sourceCaches[ze.source];if(!P)throw new Error(`cannot load terrain, because there exists no source with ID: ${ze.source}`);this.terrain===null&&P.reload();for(const ne in this.style._layers){const we=this.style._layers[ne];we.type==="hillshade"&&we.source===ze.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new _s(this.painter,P,ze),this.painter.renderToTexture=new Hs(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=ne=>{ne.dataType==="style"?this.terrain.sourceCache.freeRtt():ne.dataType==="source"&&ne.tile&&(ne.sourceId!==ze.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(ne.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:ze})),this}getTerrain(){var ze,P;return(P=(ze=this.terrain)===null||ze===void 0?void 0:ze.options)!==null&&P!==void 0?P:null}areTilesLoaded(){const ze=this.style&&this.style.sourceCaches;for(const P in ze){const ne=ze[P]._tiles;for(const we in ne){const Se=ne[we];if(Se.state!=="loaded"&&Se.state!=="errored")return!1}}return!0}removeSource(ze){return this.style.removeSource(ze),this._update(!0)}getSource(ze){return this.style.getSource(ze)}addImage(ze,P,ne={}){const{pixelRatio:we=1,sdf:Se=!1,stretchX:Re,stretchY:ct,content:_t,textFitWidth:zt,textFitHeight:Qt}=ne;if(this._lazyInitEmptyStyle(),!(P instanceof HTMLImageElement||t.b(P))){if(P.width===void 0||P.height===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:fr,height:gr,data:Br}=P,ta=P;return this.style.addImage(ze,{data:new t.R({width:fr,height:gr},new Uint8Array(Br)),pixelRatio:we,stretchX:Re,stretchY:ct,content:_t,textFitWidth:zt,textFitHeight:Qt,sdf:Se,version:0,userImage:ta}),ta.onAdd&&ta.onAdd(this,ze),this}}{const{width:fr,height:gr,data:Br}=i.getImageData(P);this.style.addImage(ze,{data:new t.R({width:fr,height:gr},Br),pixelRatio:we,stretchX:Re,stretchY:ct,content:_t,textFitWidth:zt,textFitHeight:Qt,sdf:Se,version:0})}}updateImage(ze,P){const ne=this.style.getImage(ze);if(!ne)return this.fire(new t.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const we=P instanceof HTMLImageElement||t.b(P)?i.getImageData(P):P,{width:Se,height:Re,data:ct}=we;if(Se===void 0||Re===void 0)return this.fire(new t.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Se!==ne.data.width||Re!==ne.data.height)return this.fire(new t.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const _t=!(P instanceof HTMLImageElement||t.b(P));return ne.data.replace(ct,_t),this.style.updateImage(ze,ne),this}getImage(ze){return this.style.getImage(ze)}hasImage(ze){return ze?!!this.style.getImage(ze):(this.fire(new t.j(new Error("Missing required image id"))),!1)}removeImage(ze){this.style.removeImage(ze)}loadImage(ze){return l.getImage(this._requestManager.transformRequest(ze,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(ze,P){return this._lazyInitEmptyStyle(),this.style.addLayer(ze,P),this._update(!0)}moveLayer(ze,P){return this.style.moveLayer(ze,P),this._update(!0)}removeLayer(ze){return this.style.removeLayer(ze),this._update(!0)}getLayer(ze){return this.style.getLayer(ze)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(ze,P,ne){return this.style.setLayerZoomRange(ze,P,ne),this._update(!0)}setFilter(ze,P,ne={}){return this.style.setFilter(ze,P,ne),this._update(!0)}getFilter(ze){return this.style.getFilter(ze)}setPaintProperty(ze,P,ne,we={}){return this.style.setPaintProperty(ze,P,ne,we),this._update(!0)}getPaintProperty(ze,P){return this.style.getPaintProperty(ze,P)}setLayoutProperty(ze,P,ne,we={}){return this.style.setLayoutProperty(ze,P,ne,we),this._update(!0)}getLayoutProperty(ze,P){return this.style.getLayoutProperty(ze,P)}setGlyphs(ze,P={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(ze,P),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(ze,P,ne={}){return this._lazyInitEmptyStyle(),this.style.addSprite(ze,P,ne,we=>{we||this._update(!0)}),this}removeSprite(ze){return this._lazyInitEmptyStyle(),this.style.removeSprite(ze),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(ze,P={}){return this._lazyInitEmptyStyle(),this.style.setSprite(ze,P,ne=>{ne||this._update(!0)}),this}setLight(ze,P={}){return this._lazyInitEmptyStyle(),this.style.setLight(ze,P),this._update(!0)}getLight(){return this.style.getLight()}setSky(ze){return this._lazyInitEmptyStyle(),this.style.setSky(ze),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(ze,P){return this.style.setFeatureState(ze,P),this._update()}removeFeatureState(ze,P){return this.style.removeFeatureState(ze,P),this._update()}getFeatureState(ze){return this.style.getFeatureState(ze)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let ze=0,P=0;return this._container&&(ze=this._container.clientWidth||400,P=this._container.clientHeight||300),[ze,P]}_setupContainer(){const ze=this._container;ze.classList.add("maplibregl-map");const P=this._canvasContainer=n.create("div","maplibregl-canvas-container",ze);this._interactive&&P.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",P),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const ne=this._containerDimensions(),we=this._getClampedPixelRatio(ne[0],ne[1]);this._resizeCanvas(ne[0],ne[1],we);const Se=this._controlContainer=n.create("div","maplibregl-control-container",ze),Re=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(ct=>{Re[ct]=n.create("div",`maplibregl-ctrl-${ct} `,Se)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(ze,P,ne){this._canvas.width=Math.floor(ne*ze),this._canvas.height=Math.floor(ne*P),this._canvas.style.width=`${ze}px`,this._canvas.style.height=`${P}px`}_setupPainter(){const ze={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let P=null;this._canvas.addEventListener("webglcontextcreationerror",we=>{P={requestedAttributes:ze},we&&(P.statusMessage=we.statusMessage,P.type=we.type)},{once:!0});const ne=this._canvas.getContext("webgl2",ze)||this._canvas.getContext("webgl",ze);if(!ne){const we="Failed to initialize WebGL";throw P?(P.message=we,new Error(JSON.stringify(P))):new Error(we)}this.painter=new uc(ne,this.transform),s.testSupport(ne)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(ze){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||ze,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(ze){return this._update(),this._renderTaskQueue.add(ze)}_cancelRenderFrame(ze){this._renderTaskQueue.remove(ze)}_render(ze){const P=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ze),this._removed)return;let ne=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Se=this.transform.zoom,Re=i.now();this.style.zoomHistory.update(Se,Re);const ct=new t.z(Se,{now:Re,fadeDuration:P,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),_t=ct.crossFadingFactor();_t===1&&_t===this._crossFadingFactor||(ne=!0,this._crossFadingFactor=_t),this.style.update(ct)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,P,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:P,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.bf.mark(t.bg.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||ne)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const we=this._sourcesDirty||this._styleDirty||this._placementDirty;return we||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||we||(this._fullyLoaded=!0,t.bf.mark(t.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var ze;this._hash&&this._hash.remove();for(const ne of this._controls)ne.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),(ze=this._resizeObserver)===null||ze===void 0||ze.disconnect();const P=this.painter.context.gl.getExtension("WEBGL_lose_context");P?.loseContext&&P.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),n.remove(this._canvasContainer),n.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,i.frameAsync(this._frameRequest).then(ze=>{t.bf.frame(ze),this._frameRequest=null,this._render(ze)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(ze){this._showTileBoundaries!==ze&&(this._showTileBoundaries=ze,this._update())}get showPadding(){return!!this._showPadding}set showPadding(ze){this._showPadding!==ze&&(this._showPadding=ze,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(ze){this._showCollisionBoxes!==ze&&(this._showCollisionBoxes=ze,ze?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(ze){this._showOverdrawInspector!==ze&&(this._showOverdrawInspector=ze,this._update())}get repaint(){return!!this._repaint}set repaint(ze){this._repaint!==ze&&(this._repaint=ze,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(ze){this._vertices=ze,this._update()}get version(){return ml}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=Vl,e.MapTouchEvent=wc,e.MapWheelEvent=lf,e.Marker=tu,e.NavigationControl=class{constructor(ze){this._updateZoomButtons=()=>{const P=this._map.getZoom(),ne=P===this._map.getMaxZoom(),we=P===this._map.getMinZoom();this._zoomInButton.disabled=ne,this._zoomOutButton.disabled=we,this._zoomInButton.setAttribute("aria-disabled",ne.toString()),this._zoomOutButton.setAttribute("aria-disabled",we.toString())},this._rotateCompassArrow=()=>{const P=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=P},this._setButtonTitle=(P,ne)=>{const we=this._map._getUIString(`NavigationControl.${ne}`);P.title=we,P.setAttribute("aria-label",we)},this.options=t.e({},Ti,ze),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",P=>P.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",P=>this._map.zoomIn({},{originalEvent:P})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",P=>this._map.zoomOut({},{originalEvent:P})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",P=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:P}):this._map.resetNorth({},{originalEvent:P})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(ze){return this._map=ze,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new xo(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(ze,P){const ne=n.create("button",ze,this._container);return ne.type="button",ne.addEventListener("click",P),ne}},e.Popup=class extends t.E{constructor(ze){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=P=>{this._update(P.point)},this._onMouseMove=P=>{this._update(P.point)},this._onDrag=P=>{this._update(P.point)},this._update=P=>{var ne;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const _t of this.options.className.split(" "))this._container.classList.add(_t);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?vs(this._lngLat,this._flatPos,this._map.transform):(ne=this._lngLat)===null||ne===void 0?void 0:ne.wrap(),this._trackPointer&&!P)return;const we=this._flatPos=this._pos=this._trackPointer&&P?P:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&P?P:this._map.transform.locationPoint(this._lngLat));let Se=this.options.anchor;const Re=wu(this.options.offset);if(!Se){const _t=this._container.offsetWidth,zt=this._container.offsetHeight;let Qt;Qt=we.y+Re.bottom.y<zt?["top"]:we.y>this._map.transform.height-zt?["bottom"]:[],we.x<_t/2?Qt.push("left"):we.x>this._map.transform.width-_t/2&&Qt.push("right"),Se=Qt.length===0?"bottom":Qt.join("-")}let ct=we.add(Re[Se]);this.options.subpixelPositioning||(ct=ct.round()),n.setTransform(this._container,`${Kl[Se]} translate(${ct.x}px,${ct.y}px)`),$l(this._container,Se,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(so),ze)}addTo(ze){return this._map&&this.remove(),this._map=ze,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(ze){return this._lngLat=t.N.convert(ze),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(ze){return this.setDOMContent(document.createTextNode(ze))}setHTML(ze){const P=document.createDocumentFragment(),ne=document.createElement("body");let we;for(ne.innerHTML=ze;we=ne.firstChild,we;)P.appendChild(we);return this.setDOMContent(P)}getMaxWidth(){var ze;return(ze=this._container)===null||ze===void 0?void 0:ze.style.maxWidth}setMaxWidth(ze){return this.options.maxWidth=ze,this._update(),this}setDOMContent(ze){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(ze),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(ze){return this._container&&this._container.classList.add(ze),this}removeClassName(ze){return this._container&&this._container.classList.remove(ze),this}setOffset(ze){return this.options.offset=ze,this._update(),this}toggleClassName(ze){if(this._container)return this._container.classList.toggle(ze)}setSubpixelPositioning(ze){this.options.subpixelPositioning=ze}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const ze=this._container.querySelector(tc);ze&&ze.focus()}},e.RasterDEMTileSource=Ie,e.RasterTileSource=Me,e.ScaleControl=class{constructor(ze){this._onMove=()=>{ec(this._map,this._container,this.options)},this.setUnit=P=>{this.options.unit=P,ec(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},yl),ze)}getDefaultPosition(){return"bottom-left"}onAdd(ze){return this._map=ze,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",ze.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=pa,e.Style=Mr,e.TerrainControl=class{constructor(ze){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=ze}onAdd(ze){return this._map=ze,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=tf,e.TwoFingersTouchRotateHandler=hc,e.TwoFingersTouchZoomHandler=eu,e.TwoFingersTouchZoomRotateHandler=yn,e.VectorTileSource=be,e.VideoSource=rt,e.addSourceType=(ze,P)=>t._(void 0,void 0,void 0,function*(){if(Ee(ze))throw new Error(`A source type called "${ze}" already exists.`);((ne,we)=>{Ze[ne]=we})(ze,P)}),e.clearPrewarmedResources=function(){const ze=le;ze&&(ze.isPreloaded()&&ze.numActive()===1?(ze.release(ee),le=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return tt().getRTLTextPluginStatus()},e.getVersion=function(){return hu},e.getWorkerCount=function(){return ue.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(ze){return Z().broadcast("IS",ze)},e.prewarm=function(){J().acquire(ee)},e.setMaxParallelImageRequests=function(ze){t.a.MAX_PARALLEL_IMAGE_REQUESTS=ze},e.setRTLTextPlugin=function(ze,P){return tt().setRTLTextPlugin(ze,P)},e.setWorkerCount=function(ze){ue.workerCount=ze},e.setWorkerUrl=function(ze){t.a.WORKER_URL=ze}});var E=h;return E})}}),jI=He({"src/plots/map/layers.js"(Y,G){var h=ea(),b=Zl().sanitizeHTML,S=XT(),E=gp();function e(i,n){this.subplot=i,this.uid=i.uid+"-"+n,this.index=n,this.idSource="source-"+this.uid,this.idLayer=E.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var t=e.prototype;t.update=function(n){this.visible?this.needsNewImage(n)?this.updateImage(n):this.needsNewSource(n)?(this.removeLayer(),this.updateSource(n),this.updateLayer(n)):this.needsNewLayer(n)?this.updateLayer(n):this.updateStyle(n):(this.updateSource(n),this.updateLayer(n)),this.visible=r(n)},t.needsNewImage=function(i){var n=this.subplot.map;return n.getSource(this.idSource)&&this.sourceType==="image"&&i.sourcetype==="image"&&(this.source!==i.source||JSON.stringify(this.coordinates)!==JSON.stringify(i.coordinates))},t.needsNewSource=function(i){return this.sourceType!==i.sourcetype||JSON.stringify(this.source)!==JSON.stringify(i.source)||this.layerType!==i.type},t.needsNewLayer=function(i){return this.layerType!==i.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},t.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},t.updateImage=function(i){var n=this.subplot.map;n.getSource(this.idSource).updateImage({url:i.source,coordinates:i.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},t.updateSource=function(i){var n=this.subplot.map;if(n.getSource(this.idSource)&&n.removeSource(this.idSource),this.sourceType=i.sourcetype,this.source=i.source,!!r(i)){var s=a(i);n.addSource(this.idSource,s)}},t.findFollowingMapLayerId=function(i){if(i==="traces")for(var n=this.subplot.getMapLayers(),s=0;s<n.length;s++){var f=n[s].id;if(typeof f=="string"&&f.indexOf(E.traceLayerPrefix)===0){i=f;break}}return i},t.updateLayer=function(i){var n=this.subplot,s=o(i),f=this.lookupBelow(),c=this.findFollowingMapLayerId(f);this.removeLayer(),r(i)&&n.addLayer({id:this.idLayer,source:this.idSource,"source-layer":i.sourcelayer||"",type:i.type,minzoom:i.minzoom,maxzoom:i.maxzoom,layout:s.layout,paint:s.paint},c),this.layerType=i.type,this.below=f},t.updateStyle=function(i){if(r(i)){var n=o(i);this.subplot.setOptions(this.idLayer,"setLayoutProperty",n.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",n.paint)}},t.removeLayer=function(){var i=this.subplot.map;i.getLayer(this.idLayer)&&i.removeLayer(this.idLayer)},t.dispose=function(){var i=this.subplot.map;i.getLayer(this.idLayer)&&i.removeLayer(this.idLayer),i.getSource(this.idSource)&&i.removeSource(this.idSource)};function r(i){if(!i.visible)return!1;var n=i.source;if(Array.isArray(n)&&n.length>0){for(var s=0;s<n.length;s++)if(typeof n[s]!="string"||n[s].length===0)return!1;return!0}return h.isPlainObject(n)||typeof n=="string"&&n.length>0}function o(i){var n={},s={};switch(i.type){case"circle":h.extendFlat(s,{"circle-radius":i.circle.radius,"circle-color":i.color,"circle-opacity":i.opacity});break;case"line":h.extendFlat(s,{"line-width":i.line.width,"line-color":i.color,"line-opacity":i.opacity,"line-dasharray":i.line.dash});break;case"fill":h.extendFlat(s,{"fill-color":i.color,"fill-outline-color":i.fill.outlinecolor,"fill-opacity":i.opacity});break;case"symbol":var f=i.symbol,c=S(f.textposition,f.iconsize);h.extendFlat(n,{"icon-image":f.icon+"-15","icon-size":f.iconsize/10,"text-field":f.text,"text-size":f.textfont.size,"text-anchor":c.anchor,"text-offset":c.offset,"symbol-placement":f.placement}),h.extendFlat(s,{"icon-color":i.color,"text-color":f.textfont.color,"text-opacity":i.opacity});break;case"raster":h.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":i.opacity});break}return{layout:n,paint:s}}function a(i){var n=i.sourcetype,s=i.source,f={type:n},c;return n==="geojson"?c="data":n==="vector"?c=typeof s=="string"?"url":"tiles":n==="raster"?(c="tiles",f.tileSize=256):n==="image"&&(c="url",f.coordinates=i.coordinates),f[c]=s,i.sourceattribution&&(f.attribution=b(i.sourceattribution)),f}G.exports=function(n,s,f){var c=new e(n,s);return c.update(f),c}}}),VI=He({"src/plots/map/map.js"(Y,G){var h=UI(),b=ea(),S=hp(),E=ji(),e=Ao(),t=kh(),r=kc(),o=Sv(),a=o.drawMode,i=o.selectMode,n=Xc().prepSelect,s=Xc().clearOutline,f=Xc().clearSelectionsCache,c=Xc().selectOnClick,p=gp(),d=jI();function T(_,w){this.id=w,this.gd=_;var g=_._fullLayout,u=_._context;this.container=g._glcontainer.node(),this.isStatic=u.staticPlot,this.uid=g._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(g),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var l=T.prototype;l.plot=function(_,w,g){var u=this,v;u.map?v=new Promise(function(y,R){u.updateMap(_,w,y,R)}):v=new Promise(function(y,R){u.createMap(_,w,y,R)}),g.push(v)},l.createMap=function(_,w,g,u){var v=this,y=w[v.id],R=v.styleObj=x(y.style),L=y.bounds,z=L?[[L.west,L.south],[L.east,L.north]]:null,F=v.map=new h.Map({container:v.div,style:R.style,center:M(y.center),zoom:y.zoom,bearing:y.bearing,pitch:y.pitch,maxBounds:z,interactive:!v.isStatic,preserveDrawingBuffer:v.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new h.AttributionControl({compact:!0})),B={};F.on("styleimagemissing",function(I){var N=I.id;if(!B[N]&&N.includes("-15")){B[N]=!0;var U=new Image(15,15);U.onload=function(){F.addImage(N,U)},U.crossOrigin="Anonymous",U.src="https://unpkg.com/maki@2.1.0/icons/"+N+".svg"}}),F.setTransformRequest(function(I){return I=I.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),I=I.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),I=I.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:I}}),F._canvas.style.left="0px",F._canvas.style.top="0px",v.rejectOnError(u),v.isStatic||v.initFx(_,w);var O=[];O.push(new Promise(function(I){F.once("load",I)})),O=O.concat(S.fetchTraceGeoData(_)),Promise.all(O).then(function(){v.fillBelowLookup(_,w),v.updateData(_),v.updateLayout(w),v.resolveOnRender(g)}).catch(u)},l.updateMap=function(_,w,g,u){var v=this,y=v.map,R=w[this.id];v.rejectOnError(u);var L=[],z=x(R.style);JSON.stringify(v.styleObj)!==JSON.stringify(z)&&(v.styleObj=z,y.setStyle(z.style),v.traceHash={},L.push(new Promise(function(F){y.once("styledata",F)}))),L=L.concat(S.fetchTraceGeoData(_)),Promise.all(L).then(function(){v.fillBelowLookup(_,w),v.updateData(_),v.updateLayout(w),v.resolveOnRender(g)}).catch(u)},l.fillBelowLookup=function(_,w){var g=w[this.id],u=g.layers,v,y,R=this.belowLookup={},L=!1;for(v=0;v<_.length;v++){var z=_[v][0].trace,F=z._module;typeof z.below=="string"?y=z.below:F.getBelow&&(y=F.getBelow(z,this)),y===""&&(L=!0),R["trace-"+z.uid]=y||""}for(v=0;v<u.length;v++){var B=u[v];typeof B.below=="string"?y=B.below:L?y="traces":y="",R["layout-"+v]=y}var O={},I,N;for(I in R)y=R[I],O[y]?O[y].push(I):O[y]=[I];for(y in O){var U=O[y];if(U.length>1)for(v=0;v<U.length;v++)I=U[v],I.indexOf("trace-")===0?(N=I.split("trace-")[1],this.traceHash[N]&&(this.traceHash[N].below=null)):I.indexOf("layout-")===0&&(N=I.split("layout-")[1],this.layerList[N]&&(this.layerList[N].below=null))}};var m={choroplethmap:0,densitymap:1,scattermap:2};l.updateData=function(_){var w=this.traceHash,g,u,v,y,R=_.slice().sort(function(O,I){return m[O[0].trace.type]-m[I[0].trace.type]});for(v=0;v<R.length;v++){var L=R[v];u=L[0].trace,g=w[u.uid];var z=!1;g&&(g.type===u.type?(g.update(L),z=!0):g.dispose()),!z&&u._module&&(w[u.uid]=u._module.plot(this,L))}var F=Object.keys(w);e:for(v=0;v<F.length;v++){var B=F[v];for(y=0;y<_.length;y++)if(u=_[y][0].trace,B===u.uid)continue e;g=w[B],g.dispose(),delete w[B]}},l.updateLayout=function(_){var w=this.map,g=_[this.id];!this.dragging&&!this.wheeling&&(w.setCenter(M(g.center)),w.setZoom(g.zoom),w.setBearing(g.bearing),w.setPitch(g.pitch)),this.updateLayers(_),this.updateFramework(_),this.updateFx(_),this.map.resize(),this.gd._context._scrollZoom.map?w.scrollZoom.enable():w.scrollZoom.disable()},l.resolveOnRender=function(_){var w=this.map;w.on("render",function g(){w.loaded()&&(w.off("render",g),setTimeout(_,10))})},l.rejectOnError=function(_){var w=this.map;function g(){_(new Error(p.mapOnErrorMsg))}w.once("error",g),w.once("style.error",g),w.once("source.error",g),w.once("tile.error",g),w.once("layer.error",g)},l.createFramework=function(_){var w=this,g=w.div=document.createElement("div");g.id=w.uid,g.style.position="absolute",w.container.appendChild(g),w.xaxis={_id:"x",c2p:function(u){return w.project(u).x}},w.yaxis={_id:"y",c2p:function(u){return w.project(u).y}},w.updateFramework(_),w.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(w.mockAxis,_)},l.initFx=function(_,w){var g=this,u=g.gd,v=g.map;v.on("moveend",function(L){if(g.map){var z=u._fullLayout;if(L.originalEvent||g.wheeling){var F=z[g.id];E.call("_storeDirectGUIEdit",u.layout,z._preGUI,g.getViewEdits(F));var B=g.getView();F._input.center=F.center=B.center,F._input.zoom=F.zoom=B.zoom,F._input.bearing=F.bearing=B.bearing,F._input.pitch=F.pitch=B.pitch,u.emit("plotly_relayout",g.getViewEditsWithDerived(B))}L.originalEvent&&L.originalEvent.type==="mouseup"?g.dragging=!1:g.wheeling&&(g.wheeling=!1),z&&z._rehover&&z._rehover()}}),v.on("wheel",function(){g.wheeling=!0}),v.on("mousemove",function(L){var z=g.div.getBoundingClientRect(),F=[L.originalEvent.offsetX,L.originalEvent.offsetY];L.target.getBoundingClientRect=function(){return z},g.xaxis.p2c=function(){return v.unproject(F).lng},g.yaxis.p2c=function(){return v.unproject(F).lat},u._fullLayout._rehover=function(){u._fullLayout._hoversubplot===g.id&&u._fullLayout[g.id]&&r.hover(u,L,g.id)},r.hover(u,L,g.id),u._fullLayout._hoversubplot=g.id});function y(){r.loneUnhover(w._hoverlayer)}v.on("dragstart",function(){g.dragging=!0,y()}),v.on("zoomstart",y),v.on("mouseout",function(){u._fullLayout._hoversubplot=null});function R(){var L=g.getView();u.emit("plotly_relayouting",g.getViewEditsWithDerived(L))}v.on("drag",R),v.on("zoom",R),v.on("dblclick",function(){var L=u._fullLayout[g.id];E.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,g.getViewEdits(L));var z=g.viewInitial;v.setCenter(M(z.center)),v.setZoom(z.zoom),v.setBearing(z.bearing),v.setPitch(z.pitch);var F=g.getView();L._input.center=L.center=F.center,L._input.zoom=L.zoom=F.zoom,L._input.bearing=L.bearing=F.bearing,L._input.pitch=L.pitch=F.pitch,u.emit("plotly_doubleclick",null),u.emit("plotly_relayout",g.getViewEditsWithDerived(F))}),g.clearOutline=function(){f(g.dragOptions),s(g.dragOptions.gd)},g.onClickInPanFn=function(L){return function(z){var F=u._fullLayout.clickmode;F.indexOf("select")>-1&&c(z.originalEvent,u,[g.xaxis],[g.yaxis],g.id,L),F.indexOf("event")>-1&&r.click(u,z.originalEvent)}}},l.updateFx=function(_){var w=this,g=w.map,u=w.gd;if(w.isStatic)return;function v(z){var F=w.map.unproject(z);return[F.lng,F.lat]}var y=_.dragmode,R;R=function(z,F){if(F.isRect){var B=z.range={};B[w.id]=[v([F.xmin,F.ymin]),v([F.xmax,F.ymax])]}else{var O=z.lassoPoints={};O[w.id]=F.map(v)}};var L=w.dragOptions;w.dragOptions=b.extendDeep(L||{},{dragmode:_.dragmode,element:w.div,gd:u,plotinfo:{id:w.id,domain:_[w.id].domain,xaxis:w.xaxis,yaxis:w.yaxis,fillRangeItems:R},xaxes:[w.xaxis],yaxes:[w.yaxis],subplot:w.id}),g.off("click",w.onClickInPanHandler),i(y)||a(y)?(g.dragPan.disable(),g.on("zoomstart",w.clearOutline),w.dragOptions.prepFn=function(z,F,B){n(z,F,B,w.dragOptions,y)},t.init(w.dragOptions)):(g.dragPan.enable(),g.off("zoomstart",w.clearOutline),w.div.onmousedown=null,w.div.ontouchstart=null,w.div.removeEventListener("touchstart",w.div._ontouchstart),w.onClickInPanHandler=w.onClickInPanFn(w.dragOptions),g.on("click",w.onClickInPanHandler))},l.updateFramework=function(_){var w=_[this.id].domain,g=_._size,u=this.div.style;u.width=g.w*(w.x[1]-w.x[0])+"px",u.height=g.h*(w.y[1]-w.y[0])+"px",u.left=g.l+w.x[0]*g.w+"px",u.top=g.t+(1-w.y[1])*g.h+"px",this.xaxis._offset=g.l+w.x[0]*g.w,this.xaxis._length=g.w*(w.x[1]-w.x[0]),this.yaxis._offset=g.t+(1-w.y[1])*g.h,this.yaxis._length=g.h*(w.y[1]-w.y[0])},l.updateLayers=function(_){var w=_[this.id],g=w.layers,u=this.layerList,v;if(g.length!==u.length){for(v=0;v<u.length;v++)u[v].dispose();for(u=this.layerList=[],v=0;v<g.length;v++)u.push(d(this,v,g[v]))}else for(v=0;v<g.length;v++)u[v].update(g[v])},l.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},l.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},l.setOptions=function(_,w,g){for(var u in g)this.map[w](_,u,g[u])},l.getMapLayers=function(){return this.map.getStyle().layers},l.addLayer=function(_,w){var g=this.map;if(typeof w=="string"){if(w===""){g.addLayer(_,w);return}for(var u=this.getMapLayers(),v=0;v<u.length;v++)if(w===u[v].id){g.addLayer(_,w);return}b.warn(["Trying to add layer with *below* value",w,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}g.addLayer(_)},l.project=function(_){return this.map.project(new h.LngLat(_[0],_[1]))},l.getView=function(){var _=this.map,w=_.getCenter(),g=w.lng,u=w.lat,v={lon:g,lat:u},y=_.getCanvas(),R=parseInt(y.style.width),L=parseInt(y.style.height);return{center:v,zoom:_.getZoom(),bearing:_.getBearing(),pitch:_.getPitch(),_derived:{coordinates:[_.unproject([0,0]).toArray(),_.unproject([R,0]).toArray(),_.unproject([R,L]).toArray(),_.unproject([0,L]).toArray()]}}},l.getViewEdits=function(_){for(var w=this.id,g=["center","zoom","bearing","pitch"],u={},v=0;v<g.length;v++){var y=g[v];u[w+"."+y]=_[y]}return u},l.getViewEditsWithDerived=function(_){var w=this.id,g=this.getViewEdits(_);return g[w+"._derived"]=_._derived,g};function x(_){var w={};return b.isPlainObject(_)?(w.id=_.id,w.style=_):typeof _=="string"?(w.id=_,p.stylesMap[_]?w.style=p.stylesMap[_]:w.style=_):(w.id=p.styleValueDflt,w.style=A(p.styleValueDflt)),w.transition={duration:0,delay:0},w}function A(_){return p.styleUrlPrefix+_+"-"+p.styleUrlSuffix}function M(_){return[_.lon,_.lat]}G.exports=T}}),qI=He({"src/plots/map/layout_defaults.js"(Y,G){var h=ea(),b=tp(),S=_h(),E=ay();G.exports=function(o,a,i){b(o,a,i,{type:"map",attributes:E,handleDefaults:e,partition:"y"})};function e(r,o,a){a("style"),a("center.lon"),a("center.lat"),a("zoom"),a("bearing"),a("pitch");var i=a("bounds.west"),n=a("bounds.east"),s=a("bounds.south"),f=a("bounds.north");(i===void 0||n===void 0||s===void 0||f===void 0)&&delete o.bounds,S(r,o,{name:"layers",handleItemDefaults:t}),o._input=r}function t(r,o){function a(p,d){return h.coerce(r,o,E.layers,p,d)}var i=a("visible");if(i){var n=a("sourcetype"),s=n==="raster"||n==="image";a("source"),a("sourceattribution"),n==="vector"&&a("sourcelayer"),n==="image"&&a("coordinates");var f;s&&(f="raster");var c=a("type",f);s&&c!=="raster"&&(c=o.type="raster",h.log("Source types *raster* and *image* must drawn *raster* layer type.")),a("below"),a("color"),a("opacity"),a("minzoom"),a("maxzoom"),c==="circle"&&a("circle.radius"),c==="line"&&(a("line.width"),a("line.dash")),c==="fill"&&a("fill.outlinecolor"),c==="symbol"&&(a("symbol.icon"),a("symbol.iconsize"),a("symbol.text"),h.coerceFont(a,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),a("symbol.textposition"),a("symbol.placement"))}}}}),gx=He({"src/plots/map/index.js"(Y){var G=ea(),h=G.strTranslate,b=G.strScale,S=ih().getSubplotCalcData,E=rv(),e=_i(),t=Io(),r=Zl(),o=VI(),a="map";Y.name=a,Y.attr="subplot",Y.idRoot=a,Y.idRegex=Y.attrRegex=G.counterRegex(a),Y.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},Y.layoutAttributes=ay(),Y.supplyLayoutDefaults=qI(),Y.plot=function(n){for(var s=n._fullLayout,f=n.calcdata,c=s._subplots[a],p=0;p<c.length;p++){var d=c[p],T=S(f,a,d),l=s[d],m=l._subplot;m||(m=new o(n,d),s[d]._subplot=m),m.viewInitial||(m.viewInitial={center:G.extendFlat({},l.center),zoom:l.zoom,bearing:l.bearing,pitch:l.pitch}),m.plot(T,s,n._promises)}},Y.clean=function(i,n,s,f){for(var c=f._subplots[a]||[],p=0;p<c.length;p++){var d=c[p];!n[d]&&f[d]._subplot&&f[d]._subplot.destroy()}},Y.toSVG=function(i){for(var n=i._fullLayout,s=n._subplots[a],f=n._size,c=0;c<s.length;c++){var p=n[s[c]],d=p.domain,T=p._subplot,l=T.toImage("png"),m=n._glimages.append("svg:image");m.attr({xmlns:E.svg,"xlink:href":l,x:f.l+f.w*d.x[0],y:f.t+f.h*(1-d.y[1]),width:f.w*(d.x[1]-d.x[0]),height:f.h*(d.y[1]-d.y[0]),preserveAspectRatio:"none"});var x=e.select(p._subplot.div),A=x.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),M=n._glimages.append("g"),_=M.append("text");_.text(A).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":A});var w=t.bBox(_.node()),g=f.w*(d.x[1]-d.x[0]);if(w.width>g/2){var u=A.split("|").join("<br>");_.text(u).attr("data-unformatted",u).call(r.convertToTspans,i),w=t.bBox(_.node())}_.attr("transform",h(-3,-w.height+8)),M.insert("rect",".static-attribution").attr({x:-w.width-6,y:-w.height-3,width:w.width+6,height:w.height+3,fill:"rgba(255, 255, 255, 0.75)"});var v=1;w.width+6>g&&(v=g/(w.width+6));var y=[f.l+f.w*d.x[1],f.t+f.h*(1-d.y[0])];M.attr("transform",h(y[0],y[1])+b(v))}},Y.updateFx=function(i){for(var n=i._fullLayout,s=n._subplots[a],f=0;f<s.length;f++){var c=n[s[f]]._subplot;c.updateFx(n)}}}}),GI=He({"src/traces/scattermap/index.js"(Y,G){G.exports={attributes:dx(),supplyDefaults:zI(),colorbar:xh(),formatLabels:WT(),calc:H_(),plot:OI(),hoverPoints:px().hoverPoints,eventData:BI(),selectPoints:NI(),styleOnSelect:function(h,b){if(b){var S=b[0].trace;S._glTrace.update(b)}},moduleType:"trace",name:"scattermap",basePlotModule:gx(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}}),HI=He({"lib/scattermap.js"(Y,G){G.exports=GI()}}),ZT=He({"src/traces/choroplethmap/attributes.js"(Y,G){var h=pg(),b=ou(),{hovertemplateAttrs:S,templatefallbackAttrs:E}=Ll(),e=Nl(),t=Po().extendFlat;G.exports=t({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:t({},h.featureidkey,{}),below:{valType:"string",editType:"plot"},text:h.text,hovertext:h.hovertext,marker:{line:{color:t({},h.marker.line.color,{editType:"plot"}),width:t({},h.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:t({},h.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:t({},h.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:t({},h.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:h.hoverinfo,hovertemplate:S({},{keys:["properties"]}),hovertemplatefallback:E(),showlegend:t({},e.showlegend,{dflt:!1})},b("",{cLetter:"z",editTypeOverride:"calc"}))}}),WI=He({"src/traces/choroplethmap/defaults.js"(Y,G){var h=ea(),b=Uf(),S=ZT();G.exports=function(e,t,r,o){function a(c,p){return h.coerce(e,t,S,c,p)}var i=a("locations"),n=a("z"),s=a("geojson");if(!h.isArrayOrTypedArray(i)||!i.length||!h.isArrayOrTypedArray(n)||!n.length||!(typeof s=="string"&&s!==""||h.isPlainObject(s))){t.visible=!1;return}a("featureidkey"),t._length=Math.min(i.length,n.length),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var f=a("marker.line.width");f&&a("marker.line.color"),a("marker.opacity"),b(e,t,o,a,{prefix:"",cLetter:"z"}),h.coerceSelectionMarkerOpacity(t,a)}}}),YT=He({"src/traces/choroplethmap/convert.js"(Y,G){var h=Ui(),b=ea(),S=Du(),E=Io(),e=fp().makeBlank,t=hp();function r(a){var i=a[0].trace,n=i.visible===!0&&i._length!==0,s={layout:{visibility:"none"},paint:{}},f={layout:{visibility:"none"},paint:{}},c=i._opts={fill:s,line:f,geojson:e()};if(!n)return c;var p=t.extractTraceFeature(a);if(!p)return c;var d=S.makeColorScaleFuncFromTrace(i),T=i.marker,l=T.line||{},m;b.isArrayOrTypedArray(T.opacity)&&(m=function(v){var y=v.mo;return h(y)?+b.constrain(y,0,1):0});var x;b.isArrayOrTypedArray(l.color)&&(x=function(v){return v.mlc});var A;b.isArrayOrTypedArray(l.width)&&(A=function(v){return v.mlw});for(var M=0;M<a.length;M++){var _=a[M],w=_.fOut;if(w){var g=w.properties;g.fc=d(_.z),m&&(g.mo=m(_)),x&&(g.mlc=x(_)),A&&(g.mlw=A(_)),_.ct=g.ct,_._polygons=t.feature2polygons(w)}}var u=m?{type:"identity",property:"mo"}:T.opacity;return b.extendFlat(s.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":u}),b.extendFlat(f.paint,{"line-color":x?{type:"identity",property:"mlc"}:l.color,"line-width":A?{type:"identity",property:"mlw"}:l.width,"line-opacity":u}),s.layout.visibility="visible",f.layout.visibility="visible",c.geojson={type:"FeatureCollection",features:p},o(a),c}function o(a){var i=a[0].trace,n=i._opts,s;if(i.selectedpoints){for(var f=E.makeSelectedPointStyleFns(i),c=0;c<a.length;c++){var p=a[c];p.fOut&&(p.fOut.properties.mo2=f.selectedOpacityFn(p))}s={type:"identity",property:"mo2"}}else s=b.isArrayOrTypedArray(i.marker.opacity)?{type:"identity",property:"mo"}:i.marker.opacity;return b.extendFlat(n.fill.paint,{"fill-opacity":s}),b.extendFlat(n.line.paint,{"line-opacity":s}),n}G.exports={convert:r,convertOnSelect:o}}}),XI=He({"src/traces/choroplethmap/plot.js"(Y,G){var h=YT().convert,b=YT().convertOnSelect,S=gp().traceLayerPrefix;function E(t,r){this.type="choroplethmap",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["fill",S+r+"-fill"],["line",S+r+"-line"]],this.below=null}var e=E.prototype;e.update=function(t){this._update(h(t)),t[0].trace._glTrace=this},e.updateOnSelect=function(t){this._update(b(t))},e._update=function(t){var r=this.subplot,o=this.layerList,a=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(t.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(t,a),this.below=a);for(var i=0;i<o.length;i++){var n=o[i],s=n[0],f=n[1],c=t[s];r.setOptions(f,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&r.setOptions(f,"setPaintProperty",c.paint)}},e._addLayers=function(t,r){for(var o=this.subplot,a=this.layerList,i=this.sourceId,n=0;n<a.length;n++){var s=a[n],f=s[0],c=t[f];o.addLayer({type:f,id:s[1],source:i,layout:c.layout,paint:c.paint},r)}},e._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,o=r.length-1;o>=0;o--)t.removeLayer(r[o][1])},e.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},G.exports=function(r,o){var a=o[0].trace,i=new E(r,a.uid),n=i.sourceId,s=h(o),f=i.below=r.belowLookup["trace-"+a.uid];return r.map.addSource(n,{type:"geojson",data:s.geojson}),i._addLayers(s,f),o[0].trace._glTrace=i,i}}}),ZI=He({"src/traces/choroplethmap/index.js"(Y,G){G.exports={attributes:ZT(),supplyDefaults:WI(),colorbar:ep(),calc:Y_(),plot:XI(),hoverPoints:$_(),eventData:J_(),selectPoints:Q_(),styleOnSelect:function(h,b){if(b){var S=b[0].trace;S._glTrace.updateOnSelect(b)}},getBelow:function(h,b){for(var S=b.getMapLayers(),E=S.length-2;E>=0;E--){var e=S[E].id;if(typeof e=="string"&&e.indexOf("water")===0){for(var t=E+1;t<S.length;t++)if(e=S[t].id,typeof e=="string"&&e.indexOf("plotly-")===-1)return e}}},moduleType:"trace",name:"choroplethmap",basePlotModule:gx(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}}}),YI=He({"lib/choroplethmap.js"(Y,G){G.exports=ZI()}}),KT=He({"src/traces/densitymap/attributes.js"(Y,G){var h=ou(),{hovertemplateAttrs:b,templatefallbackAttrs:S}=Ll(),E=Nl(),e=dx(),t=Po().extendFlat;G.exports=t({lon:e.lon,lat:e.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:e.text,hovertext:e.hovertext,hoverinfo:t({},E.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:b(),hovertemplatefallback:S(),showlegend:t({},E.showlegend,{dflt:!1})},h("",{cLetter:"z",editTypeOverride:"calc"}))}}),KI=He({"src/traces/densitymap/defaults.js"(Y,G){var h=ea(),b=Uf(),S=KT();G.exports=function(e,t,r,o){function a(f,c){return h.coerce(e,t,S,f,c)}var i=a("lon")||[],n=a("lat")||[],s=Math.min(i.length,n.length);if(!s){t.visible=!1;return}t._length=s,a("z"),a("radius"),a("below"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),b(e,t,o,a,{prefix:"",cLetter:"z"})}}}),$I=He({"src/traces/densitymap/calc.js"(Y,G){var h=Ui(),b=ea().isArrayOrTypedArray,S=Qo().BADNUM,E=Eh(),e=ea()._;G.exports=function(r,o){for(var a=o._length,i=new Array(a),n=o.z,s=b(n)&&n.length,f=0;f<a;f++){var c=i[f]={},p=o.lon[f],d=o.lat[f];if(c.lonlat=h(p)&&h(d)?[+p,+d]:[S,S],s){var T=n[f];c.z=h(T)?T:S}}return E(r,o,{vals:s?n:[0,1],containerStr:"",cLetter:"z"}),a&&(i[0].t={labels:{lat:e(r,"lat:")+" ",lon:e(r,"lon:")+" "}}),i}}}),JI=He({"src/traces/densitymap/convert.js"(Y,G){var h=Ui(),b=ea(),S=Di(),E=Du(),e=Qo().BADNUM,t=fp().makeBlank;G.exports=function(o){var a=o[0].trace,i=a.visible===!0&&a._length!==0,n={layout:{visibility:"none"},paint:{}},s=a._opts={heatmap:n,geojson:t()};if(!i)return s;var f=[],c,p=a.z,d=a.radius,T=b.isArrayOrTypedArray(p)&&p.length,l=b.isArrayOrTypedArray(d);for(c=0;c<o.length;c++){var m=o[c],x=m.lonlat;if(x[0]!==e){var A={};if(T){var M=m.z;A.z=M!==e?M:0}l&&(A.r=h(d[c])&&d[c]>0?+d[c]:0),f.push({type:"Feature",geometry:{type:"Point",coordinates:x},properties:A})}}var _=E.extractOpts(a),w=_.reversescale?E.flipScale(_.colorscale):_.colorscale,g=w[0][1],u=S.opacity(g)<1?g:S.addOpacity(g,0),v=["interpolate",["linear"],["heatmap-density"],0,u];for(c=1;c<w.length;c++)v.push(w[c][0],w[c][1]);var y=["interpolate",["linear"],["get","z"],_.min,0,_.max,1];return b.extendFlat(s.heatmap.paint,{"heatmap-weight":T?y:1/(_.max-_.min),"heatmap-color":v,"heatmap-radius":l?{type:"identity",property:"r"}:a.radius,"heatmap-opacity":a.opacity}),s.geojson={type:"FeatureCollection",features:f},s.heatmap.layout.visibility="visible",s}}}),QI=He({"src/traces/densitymap/plot.js"(Y,G){var h=JI(),b=gp().traceLayerPrefix;function S(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",b+t+"-heatmap"]],this.below=null}var E=S.prototype;E.update=function(e){var t=this.subplot,r=this.layerList,o=h(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(o.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(o,a),this.below=a);for(var i=0;i<r.length;i++){var n=r[i],s=n[0],f=n[1],c=o[s];t.setOptions(f,"setLayoutProperty",c.layout),c.layout.visibility==="visible"&&t.setOptions(f,"setPaintProperty",c.paint)}},E._addLayers=function(e,t){for(var r=this.subplot,o=this.layerList,a=this.sourceId,i=0;i<o.length;i++){var n=o[i],s=n[0],f=e[s];r.addLayer({type:s,id:n[1],source:a,layout:f.layout,paint:f.paint},t)}},E._removeLayers=function(){for(var e=this.subplot.map,t=this.layerList,r=t.length-1;r>=0;r--)e.removeLayer(t[r][1])},E.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},G.exports=function(t,r){var o=r[0].trace,a=new S(t,o.uid),i=a.sourceId,n=h(r),s=a.below=t.belowLookup["trace-"+o.uid];return t.map.addSource(i,{type:"geojson",data:n.geojson}),a._addLayers(n,s),a}}}),e4=He({"src/traces/densitymap/hover.js"(Y,G){var h=Ao(),b=px().hoverPoints,S=px().getExtraText;G.exports=function(e,t,r){var o=b(e,t,r);if(o){var a=o[0],i=a.cd,n=i[0].trace,s=i[a.index];if(delete a.color,"z"in s){var f=a.subplot.mockAxis;a.z=s.z,a.zLabel=h.tickText(f,f.c2l(s.z),"hover").text}return a.extraText=S(n,s,i[0].t.labels),[a]}}}}),t4=He({"src/traces/densitymap/event_data.js"(Y,G){G.exports=function(b,S){return b.lon=S.lon,b.lat=S.lat,b.z=S.z,b}}}),r4=He({"src/traces/densitymap/index.js"(Y,G){G.exports={attributes:KT(),supplyDefaults:KI(),colorbar:ep(),formatLabels:WT(),calc:$I(),plot:QI(),hoverPoints:e4(),eventData:t4(),getBelow:function(h,b){for(var S=b.getMapLayers(),E=0;E<S.length;E++){var e=S[E],t=e.id;if(e.type==="symbol"&&typeof t=="string"&&t.indexOf("plotly-")===-1)return t}},moduleType:"trace",name:"densitymap",basePlotModule:gx(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}}}),a4=He({"lib/densitymap.js"(Y,G){G.exports=r4()}}),$T=He({"src/traces/sankey/attributes.js"(Y,G){var h=Ru(),b=Nl(),S=Mf(),E=O0(),e=ic().attributes,{hovertemplateAttrs:t,templatefallbackAttrs:r}=Ll(),o=ou(),a=xl().templatedArray,i=Ec().descriptionOnlyNumbers,n=Po().extendFlat,s=Zu().overrideAll;G.exports=s({hoverinfo:n({},b.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:E.hoverlabel,domain:e({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:i("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:h({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:E.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),hovertemplatefallback:r(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:E.hoverlabel,hovertemplate:t({},{keys:["value","label"]}),hovertemplatefallback:r(),colorscales:a("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:n(o().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}}),n4=He({"src/traces/sankey/defaults.js"(Y,G){var h=ea(),b=$T(),S=Di(),E=Zf(),e=ic().defaults,t=am(),r=xl(),o=_h();G.exports=function(n,s,f,c){function p(L,z){return h.coerce(n,s,b,L,z)}var d=h.extendDeep(c.hoverlabel,n.hoverlabel),T=n.node,l=r.newContainer(s,"node");function m(L,z){return h.coerce(T,l,b.node,L,z)}m("label"),m("groups"),m("x"),m("y"),m("pad"),m("thickness"),m("line.color"),m("line.width"),m("hoverinfo",n.hoverinfo),t(T,l,m,d),m("hovertemplate"),m("align");var x=c.colorway,A=function(L){return x[L%x.length]};m("color",l.label.map(function(L,z){return S.addOpacity(A(z),.8)})),m("customdata");var M=n.link||{},_=r.newContainer(s,"link");function w(L,z){return h.coerce(M,_,b.link,L,z)}w("label"),w("arrowlen"),w("source"),w("target"),w("value"),w("line.color"),w("line.width"),w("hoverinfo",n.hoverinfo),t(M,_,w,d),w("hovertemplate");var g=E(c.paper_bgcolor).getLuminance()<.333,u=g?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",v=w("color",u);function y(L){var z=E(L);if(!z.isValid())return L;var F=z.getAlpha();return F<=.8?z.setAlpha(F+.2):z=g?z.brighten():z.darken(),z.toRgbString()}w("hovercolor",Array.isArray(v)?v.map(y):y(v)),w("customdata"),o(M,_,{name:"colorscales",handleItemDefaults:a}),e(s,c,p),p("orientation"),p("valueformat"),p("valuesuffix");var R;l.x.length&&l.y.length&&(R="freeform"),p("arrangement",R),h.coerceFont(p,"textfont",c.font,{autoShadowDflt:!0}),s._length=null};function a(i,n){function s(f,c){return h.coerce(i,n,b.link.colorscales,f,c)}s("label"),s("cmin"),s("cmax"),s("colorscale")}}}),JT=He({"node_modules/strongly-connected-components/scc.js"(Y,G){G.exports=h;function h(b){for(var S=b.length,E=new Array(S),e=new Array(S),t=new Array(S),r=new Array(S),o=new Array(S),a=new Array(S),i=0;i<S;++i)E[i]=-1,e[i]=0,t[i]=!1,r[i]=0,o[i]=-1,a[i]=[];var n=0,s=[],f=[];function c(l){var m=[l],x=[l];for(E[l]=e[l]=n,t[l]=!0,n+=1;x.length>0;){l=x[x.length-1];var A=b[l];if(r[l]<A.length){for(var M=r[l];M<A.length;++M){var _=A[M];if(E[_]<0){E[_]=e[_]=n,t[_]=!0,n+=1,m.push(_),x.push(_);break}else t[_]&&(e[l]=Math.min(e[l],e[_])|0);o[_]>=0&&a[l].push(o[_])}r[l]=M}else{if(e[l]===E[l]){for(var w=[],g=[],u=0,M=m.length-1;M>=0;--M){var v=m[M];if(t[v]=!1,w.push(v),g.push(a[v]),u+=a[v].length,o[v]=s.length,v===l){m.length=M;break}}s.push(w);for(var y=new Array(u),M=0;M<g.length;M++)for(var R=0;R<g[M].length;R++)y[--u]=g[M][R];f.push(y)}x.pop()}}}for(var i=0;i<S;++i)E[i]<0&&c(i);for(var p,i=0;i<f.length;i++){var d=f[i];if(d.length!==0){d.sort(function(m,x){return m-x}),p=[d[0]];for(var T=1;T<d.length;T++)d[T]!==d[T-1]&&p.push(d[T]);f[i]=p}}return{components:s,adjacencyList:f}}}}),i4=He({"src/traces/sankey/calc.js"(Y,G){var h=JT(),b=ea(),S=Jv().wrap,E=b.isArrayOrTypedArray,e=b.isIndex,t=Du();function r(a){var i=a.node,n=a.link,s=[],f=E(n.color),c=E(n.hovercolor),p=E(n.customdata),d={},T={},l=n.colorscales.length,m;for(m=0;m<l;m++){var x=n.colorscales[m],A=t.extractScale(x,{cLetter:"c"}),M=t.makeColorScaleFunc(A);T[x.label]=M}var _=0;for(m=0;m<n.value.length;m++)n.source[m]>_&&(_=n.source[m]),n.target[m]>_&&(_=n.target[m]);var w=_+1;a.node._count=w;var g,u=a.node.groups,v={};for(m=0;m<u.length;m++){var y=u[m];for(g=0;g<y.length;g++){var R=y[g],L=w+m;v.hasOwnProperty(R)?b.warn("Node "+R+" is already part of a group."):v[R]=L}}var z={source:[],target:[]};for(m=0;m<n.value.length;m++){var F=n.value[m],B=n.source[m],O=n.target[m];if(F>0&&e(B,w)&&e(O,w)&&!(v.hasOwnProperty(B)&&v.hasOwnProperty(O)&&v[B]===v[O])){v.hasOwnProperty(O)&&(O=v[O]),v.hasOwnProperty(B)&&(B=v[B]),B=+B,O=+O,d[B]=d[O]=!0;var I="";n.label&&n.label[m]&&(I=n.label[m]);var N=null;I&&T.hasOwnProperty(I)&&(N=T[I]),s.push({pointNumber:m,label:I,color:f?n.color[m]:n.color,hovercolor:c?n.hovercolor[m]:n.hovercolor,customdata:p?n.customdata[m]:n.customdata,concentrationscale:N,source:B,target:O,value:+F}),z.source.push(B),z.target.push(O)}}var U=w+u.length,X=E(i.color),ee=E(i.customdata),ue=[];for(m=0;m<U;m++)if(d[m]){var oe=i.label[m];ue.push({group:m>w-1,childrenNodes:[],pointNumber:m,label:oe,color:X?i.color[m]:i.color,customdata:ee?i.customdata[m]:i.customdata})}var le=!1;return o(U,z.source,z.target)&&(le=!0),{circular:le,links:s,nodes:ue,groups:u,groupLookup:v}}function o(a,i,n){for(var s=b.init2dArray(a,0),f=0;f<Math.min(i.length,n.length);f++)if(b.isIndex(i[f],a)&&b.isIndex(n[f],a)){if(i[f]===n[f])return!0;s[i[f]].push(n[f])}var c=h(s);return c.components.some(function(p){return p.length>1})}G.exports=function(i,n){var s=r(n);return S({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),o4=He({"node_modules/d3-quadtree/dist/d3-quadtree.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=h||self,b(h.d3=h.d3||{}))})(Y,function(h){function b(w){var g=+this._x.call(null,w),u=+this._y.call(null,w);return S(this.cover(g,u),g,u,w)}function S(w,g,u,v){if(isNaN(g)||isNaN(u))return w;var y,R=w._root,L={data:v},z=w._x0,F=w._y0,B=w._x1,O=w._y1,I,N,U,X,ee,ue,oe,le;if(!R)return w._root=L,w;for(;R.length;)if((ee=g>=(I=(z+B)/2))?z=I:B=I,(ue=u>=(N=(F+O)/2))?F=N:O=N,y=R,!(R=R[oe=ue<<1|ee]))return y[oe]=L,w;if(U=+w._x.call(null,R.data),X=+w._y.call(null,R.data),g===U&&u===X)return L.next=R,y?y[oe]=L:w._root=L,w;do y=y?y[oe]=new Array(4):w._root=new Array(4),(ee=g>=(I=(z+B)/2))?z=I:B=I,(ue=u>=(N=(F+O)/2))?F=N:O=N;while((oe=ue<<1|ee)===(le=(X>=N)<<1|U>=I));return y[le]=R,y[oe]=L,w}function E(w){var g,u,v=w.length,y,R,L=new Array(v),z=new Array(v),F=1/0,B=1/0,O=-1/0,I=-1/0;for(u=0;u<v;++u)isNaN(y=+this._x.call(null,g=w[u]))||isNaN(R=+this._y.call(null,g))||(L[u]=y,z[u]=R,y<F&&(F=y),y>O&&(O=y),R<B&&(B=R),R>I&&(I=R));if(F>O||B>I)return this;for(this.cover(F,B).cover(O,I),u=0;u<v;++u)S(this,L[u],z[u],w[u]);return this}function e(w,g){if(isNaN(w=+w)||isNaN(g=+g))return this;var u=this._x0,v=this._y0,y=this._x1,R=this._y1;if(isNaN(u))y=(u=Math.floor(w))+1,R=(v=Math.floor(g))+1;else{for(var L=y-u,z=this._root,F,B;u>w||w>=y||v>g||g>=R;)switch(B=(g<v)<<1|w<u,F=new Array(4),F[B]=z,z=F,L*=2,B){case 0:y=u+L,R=v+L;break;case 1:u=y-L,R=v+L;break;case 2:y=u+L,v=R-L;break;case 3:u=y-L,v=R-L;break}this._root&&this._root.length&&(this._root=z)}return this._x0=u,this._y0=v,this._x1=y,this._y1=R,this}function t(){var w=[];return this.visit(function(g){if(!g.length)do w.push(g.data);while(g=g.next)}),w}function r(w){return arguments.length?this.cover(+w[0][0],+w[0][1]).cover(+w[1][0],+w[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function o(w,g,u,v,y){this.node=w,this.x0=g,this.y0=u,this.x1=v,this.y1=y}function a(w,g,u){var v,y=this._x0,R=this._y0,L,z,F,B,O=this._x1,I=this._y1,N=[],U=this._root,X,ee;for(U&&N.push(new o(U,y,R,O,I)),u==null?u=1/0:(y=w-u,R=g-u,O=w+u,I=g+u,u*=u);X=N.pop();)if(!(!(U=X.node)||(L=X.x0)>O||(z=X.y0)>I||(F=X.x1)<y||(B=X.y1)<R))if(U.length){var ue=(L+F)/2,oe=(z+B)/2;N.push(new o(U[3],ue,oe,F,B),new o(U[2],L,oe,ue,B),new o(U[1],ue,z,F,oe),new o(U[0],L,z,ue,oe)),(ee=(g>=oe)<<1|w>=ue)&&(X=N[N.length-1],N[N.length-1]=N[N.length-1-ee],N[N.length-1-ee]=X)}else{var le=w-+this._x.call(null,U.data),V=g-+this._y.call(null,U.data),J=le*le+V*V;if(J<u){var te=Math.sqrt(u=J);y=w-te,R=g-te,O=w+te,I=g+te,v=U.data}}return v}function i(w){if(isNaN(O=+this._x.call(null,w))||isNaN(I=+this._y.call(null,w)))return this;var g,u=this._root,v,y,R,L=this._x0,z=this._y0,F=this._x1,B=this._y1,O,I,N,U,X,ee,ue,oe;if(!u)return this;if(u.length)for(;;){if((X=O>=(N=(L+F)/2))?L=N:F=N,(ee=I>=(U=(z+B)/2))?z=U:B=U,g=u,!(u=u[ue=ee<<1|X]))return this;if(!u.length)break;(g[ue+1&3]||g[ue+2&3]||g[ue+3&3])&&(v=g,oe=ue)}for(;u.data!==w;)if(y=u,!(u=u.next))return this;return(R=u.next)&&delete u.next,y?(R?y.next=R:delete y.next,this):g?(R?g[ue]=R:delete g[ue],(u=g[0]||g[1]||g[2]||g[3])&&u===(g[3]||g[2]||g[1]||g[0])&&!u.length&&(v?v[oe]=u:this._root=u),this):(this._root=R,this)}function n(w){for(var g=0,u=w.length;g<u;++g)this.remove(w[g]);return this}function s(){return this._root}function f(){var w=0;return this.visit(function(g){if(!g.length)do++w;while(g=g.next)}),w}function c(w){var g=[],u,v=this._root,y,R,L,z,F;for(v&&g.push(new o(v,this._x0,this._y0,this._x1,this._y1));u=g.pop();)if(!w(v=u.node,R=u.x0,L=u.y0,z=u.x1,F=u.y1)&&v.length){var B=(R+z)/2,O=(L+F)/2;(y=v[3])&&g.push(new o(y,B,O,z,F)),(y=v[2])&&g.push(new o(y,R,O,B,F)),(y=v[1])&&g.push(new o(y,B,L,z,O)),(y=v[0])&&g.push(new o(y,R,L,B,O))}return this}function p(w){var g=[],u=[],v;for(this._root&&g.push(new o(this._root,this._x0,this._y0,this._x1,this._y1));v=g.pop();){var y=v.node;if(y.length){var R,L=v.x0,z=v.y0,F=v.x1,B=v.y1,O=(L+F)/2,I=(z+B)/2;(R=y[0])&&g.push(new o(R,L,z,O,I)),(R=y[1])&&g.push(new o(R,O,z,F,I)),(R=y[2])&&g.push(new o(R,L,I,O,B)),(R=y[3])&&g.push(new o(R,O,I,F,B))}u.push(v)}for(;v=u.pop();)w(v.node,v.x0,v.y0,v.x1,v.y1);return this}function d(w){return w[0]}function T(w){return arguments.length?(this._x=w,this):this._x}function l(w){return w[1]}function m(w){return arguments.length?(this._y=w,this):this._y}function x(w,g,u){var v=new A(g??d,u??l,NaN,NaN,NaN,NaN);return w==null?v:v.addAll(w)}function A(w,g,u,v,y,R){this._x=w,this._y=g,this._x0=u,this._y0=v,this._x1=y,this._y1=R,this._root=void 0}function M(w){for(var g={data:w.data},u=g;w=w.next;)u=u.next={data:w.data};return g}var _=x.prototype=A.prototype;_.copy=function(){var w=new A(this._x,this._y,this._x0,this._y0,this._x1,this._y1),g=this._root,u,v;if(!g)return w;if(!g.length)return w._root=M(g),w;for(u=[{source:g,target:w._root=new Array(4)}];g=u.pop();)for(var y=0;y<4;++y)(v=g.source[y])&&(v.length?u.push({source:v,target:g.target[y]=new Array(4)}):g.target[y]=M(v));return w},_.add=b,_.addAll=E,_.cover=e,_.data=t,_.extent=r,_.find=a,_.remove=i,_.removeAll=n,_.root=s,_.size=f,_.visit=c,_.visitAfter=p,_.x=T,_.y=m,h.quadtree=x,Object.defineProperty(h,"__esModule",{value:!0})})}}),mx=He({"node_modules/d3-collection/dist/d3-collection.js"(Y,G){(function(h,b){b(typeof Y=="object"&&typeof G<"u"?Y:h.d3=h.d3||{})})(Y,function(h){var b="$";function S(){}S.prototype=E.prototype={constructor:S,has:function(d){return b+d in this},get:function(d){return this[b+d]},set:function(d,T){return this[b+d]=T,this},remove:function(d){var T=b+d;return T in this&&delete this[T]},clear:function(){for(var d in this)d[0]===b&&delete this[d]},keys:function(){var d=[];for(var T in this)T[0]===b&&d.push(T.slice(1));return d},values:function(){var d=[];for(var T in this)T[0]===b&&d.push(this[T]);return d},entries:function(){var d=[];for(var T in this)T[0]===b&&d.push({key:T.slice(1),value:this[T]});return d},size:function(){var d=0;for(var T in this)T[0]===b&&++d;return d},empty:function(){for(var d in this)if(d[0]===b)return!1;return!0},each:function(d){for(var T in this)T[0]===b&&d(this[T],T.slice(1),this)}};function E(d,T){var l=new S;if(d instanceof S)d.each(function(_,w){l.set(w,_)});else if(Array.isArray(d)){var m=-1,x=d.length,A;if(T==null)for(;++m<x;)l.set(m,d[m]);else for(;++m<x;)l.set(T(A=d[m],m,d),A)}else if(d)for(var M in d)l.set(M,d[M]);return l}function e(){var d=[],T=[],l,m,x;function A(_,w,g,u){if(w>=d.length)return l!=null&&_.sort(l),m!=null?m(_):_;for(var v=-1,y=_.length,R=d[w++],L,z,F=E(),B,O=g();++v<y;)(B=F.get(L=R(z=_[v])+""))?B.push(z):F.set(L,[z]);return F.each(function(I,N){u(O,N,A(I,w,g,u))}),O}function M(_,w){if(++w>d.length)return _;var g,u=T[w-1];return m!=null&&w>=d.length?g=_.entries():(g=[],_.each(function(v,y){g.push({key:y,values:M(v,w)})})),u!=null?g.sort(function(v,y){return u(v.key,y.key)}):g}return x={object:function(_){return A(_,0,t,r)},map:function(_){return A(_,0,o,a)},entries:function(_){return M(A(_,0,o,a),0)},key:function(_){return d.push(_),x},sortKeys:function(_){return T[d.length-1]=_,x},sortValues:function(_){return l=_,x},rollup:function(_){return m=_,x}}}function t(){return{}}function r(d,T,l){d[T]=l}function o(){return E()}function a(d,T,l){d.set(T,l)}function i(){}var n=E.prototype;i.prototype=s.prototype={constructor:i,has:n.has,add:function(d){return d+="",this[b+d]=d,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each};function s(d,T){var l=new i;if(d instanceof i)d.each(function(A){l.add(A)});else if(d){var m=-1,x=d.length;if(T==null)for(;++m<x;)l.add(d[m]);else for(;++m<x;)l.add(T(d[m],m,d))}return l}function f(d){var T=[];for(var l in d)T.push(l);return T}function c(d){var T=[];for(var l in d)T.push(d[l]);return T}function p(d){var T=[];for(var l in d)T.push({key:l,value:d[l]});return T}h.nest=e,h.set=s,h.map=E,h.keys=f,h.values=c,h.entries=p,Object.defineProperty(h,"__esModule",{value:!0})})}}),s4=He({"node_modules/d3-dispatch/dist/d3-dispatch.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=h||self,b(h.d3=h.d3||{}))})(Y,function(h){var b={value:function(){}};function S(){for(var o=0,a=arguments.length,i={},n;o<a;++o){if(!(n=arguments[o]+"")||n in i||/[\s.]/.test(n))throw new Error("illegal type: "+n);i[n]=[]}return new E(i)}function E(o){this._=o}function e(o,a){return o.trim().split(/^|\s+/).map(function(i){var n="",s=i.indexOf(".");if(s>=0&&(n=i.slice(s+1),i=i.slice(0,s)),i&&!a.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:n}})}E.prototype=S.prototype={constructor:E,on:function(o,a){var i=this._,n=e(o+"",i),s,f=-1,c=n.length;if(arguments.length<2){for(;++f<c;)if((s=(o=n[f]).type)&&(s=t(i[s],o.name)))return s;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++f<c;)if(s=(o=n[f]).type)i[s]=r(i[s],o.name,a);else if(a==null)for(s in i)i[s]=r(i[s],o.name,null);return this},copy:function(){var o={},a=this._;for(var i in a)o[i]=a[i].slice();return new E(o)},call:function(o,a){if((s=arguments.length-2)>0)for(var i=new Array(s),n=0,s,f;n<s;++n)i[n]=arguments[n+2];if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(f=this._[o],n=0,s=f.length;n<s;++n)f[n].value.apply(a,i)},apply:function(o,a,i){if(!this._.hasOwnProperty(o))throw new Error("unknown type: "+o);for(var n=this._[o],s=0,f=n.length;s<f;++s)n[s].value.apply(a,i)}};function t(o,a){for(var i=0,n=o.length,s;i<n;++i)if((s=o[i]).name===a)return s.value}function r(o,a,i){for(var n=0,s=o.length;n<s;++n)if(o[n].name===a){o[n]=b,o=o.slice(0,n).concat(o.slice(n+1));break}return i!=null&&o.push({name:a,value:i}),o}h.dispatch=S,Object.defineProperty(h,"__esModule",{value:!0})})}}),l4=He({"node_modules/d3-timer/dist/d3-timer.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=h||self,b(h.d3=h.d3||{}))})(Y,function(h){var b=0,S=0,E=0,e=1e3,t,r,o=0,a=0,i=0,n=typeof performance=="object"&&performance.now?performance:Date,s=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(w){setTimeout(w,17)};function f(){return a||(s(c),a=n.now()+i)}function c(){a=0}function p(){this._call=this._time=this._next=null}p.prototype=d.prototype={constructor:p,restart:function(w,g,u){if(typeof w!="function")throw new TypeError("callback is not a function");u=(u==null?f():+u)+(g==null?0:+g),!this._next&&r!==this&&(r?r._next=this:t=this,r=this),this._call=w,this._time=u,A()},stop:function(){this._call&&(this._call=null,this._time=1/0,A())}};function d(w,g,u){var v=new p;return v.restart(w,g,u),v}function T(){f(),++b;for(var w=t,g;w;)(g=a-w._time)>=0&&w._call.call(null,g),w=w._next;--b}function l(){a=(o=n.now())+i,b=S=0;try{T()}finally{b=0,x(),a=0}}function m(){var w=n.now(),g=w-o;g>e&&(i-=g,o=w)}function x(){for(var w,g=t,u,v=1/0;g;)g._call?(v>g._time&&(v=g._time),w=g,g=g._next):(u=g._next,g._next=null,g=w?w._next=u:t=u);r=w,A(v)}function A(w){if(!b){S&&(S=clearTimeout(S));var g=w-a;g>24?(w<1/0&&(S=setTimeout(l,w-n.now()-i)),E&&(E=clearInterval(E))):(E||(o=n.now(),E=setInterval(m,e)),b=1,s(l))}}function M(w,g,u){var v=new p;return g=g==null?0:+g,v.restart(function(y){v.stop(),w(y+g)},g,u),v}function _(w,g,u){var v=new p,y=g;return g==null?(v.restart(w,g,u),v):(g=+g,u=u==null?f():+u,v.restart(function R(L){L+=y,v.restart(R,y+=g,u),w(L)},g,u),v)}h.interval=_,h.now=f,h.timeout=M,h.timer=d,h.timerFlush=T,Object.defineProperty(h,"__esModule",{value:!0})})}}),u4=He({"node_modules/d3-force/dist/d3-force.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,o4(),mx(),s4(),l4()):b(h.d3=h.d3||{},h.d3,h.d3,h.d3,h.d3)})(Y,function(h,b,S,E,e){function t(w,g){var u;w==null&&(w=0),g==null&&(g=0);function v(){var y,R=u.length,L,z=0,F=0;for(y=0;y<R;++y)L=u[y],z+=L.x,F+=L.y;for(z=z/R-w,F=F/R-g,y=0;y<R;++y)L=u[y],L.x-=z,L.y-=F}return v.initialize=function(y){u=y},v.x=function(y){return arguments.length?(w=+y,v):w},v.y=function(y){return arguments.length?(g=+y,v):g},v}function r(w){return function(){return w}}function o(){return(Math.random()-.5)*1e-6}function a(w){return w.x+w.vx}function i(w){return w.y+w.vy}function n(w){var g,u,v=1,y=1;typeof w!="function"&&(w=r(w==null?1:+w));function R(){for(var F,B=g.length,O,I,N,U,X,ee,ue=0;ue<y;++ue)for(O=b.quadtree(g,a,i).visitAfter(L),F=0;F<B;++F)I=g[F],X=u[I.index],ee=X*X,N=I.x+I.vx,U=I.y+I.vy,O.visit(oe);function oe(le,V,J,te,Z){var se=le.data,Q=le.r,q=X+Q;if(se){if(se.index>I.index){var re=N-se.x-se.vx,ae=U-se.y-se.vy,fe=re*re+ae*ae;fe<q*q&&(re===0&&(re=o(),fe+=re*re),ae===0&&(ae=o(),fe+=ae*ae),fe=(q-(fe=Math.sqrt(fe)))/fe*v,I.vx+=(re*=fe)*(q=(Q*=Q)/(ee+Q)),I.vy+=(ae*=fe)*q,se.vx-=re*(q=1-q),se.vy-=ae*q)}return}return V>N+q||te<N-q||J>U+q||Z<U-q}}function L(F){if(F.data)return F.r=u[F.data.index];for(var B=F.r=0;B<4;++B)F[B]&&F[B].r>F.r&&(F.r=F[B].r)}function z(){if(g){var F,B=g.length,O;for(u=new Array(B),F=0;F<B;++F)O=g[F],u[O.index]=+w(O,F,g)}}return R.initialize=function(F){g=F,z()},R.iterations=function(F){return arguments.length?(y=+F,R):y},R.strength=function(F){return arguments.length?(v=+F,R):v},R.radius=function(F){return arguments.length?(w=typeof F=="function"?F:r(+F),z(),R):w},R}function s(w){return w.index}function f(w,g){var u=w.get(g);if(!u)throw new Error("missing: "+g);return u}function c(w){var g=s,u=O,v,y=r(30),R,L,z,F,B=1;w==null&&(w=[]);function O(ee){return 1/Math.min(z[ee.source.index],z[ee.target.index])}function I(ee){for(var ue=0,oe=w.length;ue<B;++ue)for(var le=0,V,J,te,Z,se,Q,q;le<oe;++le)V=w[le],J=V.source,te=V.target,Z=te.x+te.vx-J.x-J.vx||o(),se=te.y+te.vy-J.y-J.vy||o(),Q=Math.sqrt(Z*Z+se*se),Q=(Q-R[le])/Q*ee*v[le],Z*=Q,se*=Q,te.vx-=Z*(q=F[le]),te.vy-=se*q,J.vx+=Z*(q=1-q),J.vy+=se*q}function N(){if(L){var ee,ue=L.length,oe=w.length,le=S.map(L,g),V;for(ee=0,z=new Array(ue);ee<oe;++ee)V=w[ee],V.index=ee,typeof V.source!="object"&&(V.source=f(le,V.source)),typeof V.target!="object"&&(V.target=f(le,V.target)),z[V.source.index]=(z[V.source.index]||0)+1,z[V.target.index]=(z[V.target.index]||0)+1;for(ee=0,F=new Array(oe);ee<oe;++ee)V=w[ee],F[ee]=z[V.source.index]/(z[V.source.index]+z[V.target.index]);v=new Array(oe),U(),R=new Array(oe),X()}}function U(){if(L)for(var ee=0,ue=w.length;ee<ue;++ee)v[ee]=+u(w[ee],ee,w)}function X(){if(L)for(var ee=0,ue=w.length;ee<ue;++ee)R[ee]=+y(w[ee],ee,w)}return I.initialize=function(ee){L=ee,N()},I.links=function(ee){return arguments.length?(w=ee,N(),I):w},I.id=function(ee){return arguments.length?(g=ee,I):g},I.iterations=function(ee){return arguments.length?(B=+ee,I):B},I.strength=function(ee){return arguments.length?(u=typeof ee=="function"?ee:r(+ee),U(),I):u},I.distance=function(ee){return arguments.length?(y=typeof ee=="function"?ee:r(+ee),X(),I):y},I}function p(w){return w.x}function d(w){return w.y}var T=10,l=Math.PI*(3-Math.sqrt(5));function m(w){var g,u=1,v=.001,y=1-Math.pow(v,1/300),R=0,L=.6,z=S.map(),F=e.timer(O),B=E.dispatch("tick","end");w==null&&(w=[]);function O(){I(),B.call("tick",g),u<v&&(F.stop(),B.call("end",g))}function I(X){var ee,ue=w.length,oe;X===void 0&&(X=1);for(var le=0;le<X;++le)for(u+=(R-u)*y,z.each(function(V){V(u)}),ee=0;ee<ue;++ee)oe=w[ee],oe.fx==null?oe.x+=oe.vx*=L:(oe.x=oe.fx,oe.vx=0),oe.fy==null?oe.y+=oe.vy*=L:(oe.y=oe.fy,oe.vy=0);return g}function N(){for(var X=0,ee=w.length,ue;X<ee;++X){if(ue=w[X],ue.index=X,ue.fx!=null&&(ue.x=ue.fx),ue.fy!=null&&(ue.y=ue.fy),isNaN(ue.x)||isNaN(ue.y)){var oe=T*Math.sqrt(X),le=X*l;ue.x=oe*Math.cos(le),ue.y=oe*Math.sin(le)}(isNaN(ue.vx)||isNaN(ue.vy))&&(ue.vx=ue.vy=0)}}function U(X){return X.initialize&&X.initialize(w),X}return N(),g={tick:I,restart:function(){return F.restart(O),g},stop:function(){return F.stop(),g},nodes:function(X){return arguments.length?(w=X,N(),z.each(U),g):w},alpha:function(X){return arguments.length?(u=+X,g):u},alphaMin:function(X){return arguments.length?(v=+X,g):v},alphaDecay:function(X){return arguments.length?(y=+X,g):+y},alphaTarget:function(X){return arguments.length?(R=+X,g):R},velocityDecay:function(X){return arguments.length?(L=1-X,g):1-L},force:function(X,ee){return arguments.length>1?(ee==null?z.remove(X):z.set(X,U(ee)),g):z.get(X)},find:function(X,ee,ue){var oe=0,le=w.length,V,J,te,Z,se;for(ue==null?ue=1/0:ue*=ue,oe=0;oe<le;++oe)Z=w[oe],V=X-Z.x,J=ee-Z.y,te=V*V+J*J,te<ue&&(se=Z,ue=te);return se},on:function(X,ee){return arguments.length>1?(B.on(X,ee),g):B.on(X)}}}function x(){var w,g,u,v=r(-30),y,R=1,L=1/0,z=.81;function F(N){var U,X=w.length,ee=b.quadtree(w,p,d).visitAfter(O);for(u=N,U=0;U<X;++U)g=w[U],ee.visit(I)}function B(){if(w){var N,U=w.length,X;for(y=new Array(U),N=0;N<U;++N)X=w[N],y[X.index]=+v(X,N,w)}}function O(N){var U=0,X,ee,ue=0,oe,le,V;if(N.length){for(oe=le=V=0;V<4;++V)(X=N[V])&&(ee=Math.abs(X.value))&&(U+=X.value,ue+=ee,oe+=ee*X.x,le+=ee*X.y);N.x=oe/ue,N.y=le/ue}else{X=N,X.x=X.data.x,X.y=X.data.y;do U+=y[X.data.index];while(X=X.next)}N.value=U}function I(N,U,X,ee){if(!N.value)return!0;var ue=N.x-g.x,oe=N.y-g.y,le=ee-U,V=ue*ue+oe*oe;if(le*le/z<V)return V<L&&(ue===0&&(ue=o(),V+=ue*ue),oe===0&&(oe=o(),V+=oe*oe),V<R&&(V=Math.sqrt(R*V)),g.vx+=ue*N.value*u/V,g.vy+=oe*N.value*u/V),!0;if(N.length||V>=L)return;(N.data!==g||N.next)&&(ue===0&&(ue=o(),V+=ue*ue),oe===0&&(oe=o(),V+=oe*oe),V<R&&(V=Math.sqrt(R*V)));do N.data!==g&&(le=y[N.data.index]*u/V,g.vx+=ue*le,g.vy+=oe*le);while(N=N.next)}return F.initialize=function(N){w=N,B()},F.strength=function(N){return arguments.length?(v=typeof N=="function"?N:r(+N),B(),F):v},F.distanceMin=function(N){return arguments.length?(R=N*N,F):Math.sqrt(R)},F.distanceMax=function(N){return arguments.length?(L=N*N,F):Math.sqrt(L)},F.theta=function(N){return arguments.length?(z=N*N,F):Math.sqrt(z)},F}function A(w,g,u){var v,y=r(.1),R,L;typeof w!="function"&&(w=r(+w)),g==null&&(g=0),u==null&&(u=0);function z(B){for(var O=0,I=v.length;O<I;++O){var N=v[O],U=N.x-g||1e-6,X=N.y-u||1e-6,ee=Math.sqrt(U*U+X*X),ue=(L[O]-ee)*R[O]*B/ee;N.vx+=U*ue,N.vy+=X*ue}}function F(){if(v){var B,O=v.length;for(R=new Array(O),L=new Array(O),B=0;B<O;++B)L[B]=+w(v[B],B,v),R[B]=isNaN(L[B])?0:+y(v[B],B,v)}}return z.initialize=function(B){v=B,F()},z.strength=function(B){return arguments.length?(y=typeof B=="function"?B:r(+B),F(),z):y},z.radius=function(B){return arguments.length?(w=typeof B=="function"?B:r(+B),F(),z):w},z.x=function(B){return arguments.length?(g=+B,z):g},z.y=function(B){return arguments.length?(u=+B,z):u},z}function M(w){var g=r(.1),u,v,y;typeof w!="function"&&(w=r(w==null?0:+w));function R(z){for(var F=0,B=u.length,O;F<B;++F)O=u[F],O.vx+=(y[F]-O.x)*v[F]*z}function L(){if(u){var z,F=u.length;for(v=new Array(F),y=new Array(F),z=0;z<F;++z)v[z]=isNaN(y[z]=+w(u[z],z,u))?0:+g(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(g=typeof z=="function"?z:r(+z),L(),R):g},R.x=function(z){return arguments.length?(w=typeof z=="function"?z:r(+z),L(),R):w},R}function _(w){var g=r(.1),u,v,y;typeof w!="function"&&(w=r(w==null?0:+w));function R(z){for(var F=0,B=u.length,O;F<B;++F)O=u[F],O.vy+=(y[F]-O.y)*v[F]*z}function L(){if(u){var z,F=u.length;for(v=new Array(F),y=new Array(F),z=0;z<F;++z)v[z]=isNaN(y[z]=+w(u[z],z,u))?0:+g(u[z],z,u)}}return R.initialize=function(z){u=z,L()},R.strength=function(z){return arguments.length?(g=typeof z=="function"?z:r(+z),L(),R):g},R.y=function(z){return arguments.length?(w=typeof z=="function"?z:r(+z),L(),R):w},R}h.forceCenter=t,h.forceCollide=n,h.forceLink=c,h.forceManyBody=x,h.forceRadial=A,h.forceSimulation=m,h.forceX=M,h.forceY=_,Object.defineProperty(h,"__esModule",{value:!0})})}}),c4=He({"node_modules/d3-path/dist/d3-path.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y):(h=h||self,b(h.d3=h.d3||{}))})(Y,function(h){var b=Math.PI,S=2*b,E=1e-6,e=S-E;function t(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function r(){return new t}t.prototype=r.prototype={constructor:t,moveTo:function(o,a){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(o,a){this._+="L"+(this._x1=+o)+","+(this._y1=+a)},quadraticCurveTo:function(o,a,i,n){this._+="Q"+ +o+","+ +a+","+(this._x1=+i)+","+(this._y1=+n)},bezierCurveTo:function(o,a,i,n,s,f){this._+="C"+ +o+","+ +a+","+ +i+","+ +n+","+(this._x1=+s)+","+(this._y1=+f)},arcTo:function(o,a,i,n,s){o=+o,a=+a,i=+i,n=+n,s=+s;var f=this._x1,c=this._y1,p=i-o,d=n-a,T=f-o,l=c-a,m=T*T+l*l;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=o)+","+(this._y1=a);else if(m>E)if(!(Math.abs(l*p-d*T)>E)||!s)this._+="L"+(this._x1=o)+","+(this._y1=a);else{var x=i-f,A=n-c,M=p*p+d*d,_=x*x+A*A,w=Math.sqrt(M),g=Math.sqrt(m),u=s*Math.tan((b-Math.acos((M+m-_)/(2*w*g)))/2),v=u/g,y=u/w;Math.abs(v-1)>E&&(this._+="L"+(o+v*T)+","+(a+v*l)),this._+="A"+s+","+s+",0,0,"+ +(l*x>T*A)+","+(this._x1=o+y*p)+","+(this._y1=a+y*d)}},arc:function(o,a,i,n,s,f){o=+o,a=+a,i=+i,f=!!f;var c=i*Math.cos(n),p=i*Math.sin(n),d=o+c,T=a+p,l=1^f,m=f?n-s:s-n;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+d+","+T:(Math.abs(this._x1-d)>E||Math.abs(this._y1-T)>E)&&(this._+="L"+d+","+T),i&&(m<0&&(m=m%S+S),m>e?this._+="A"+i+","+i+",0,1,"+l+","+(o-c)+","+(a-p)+"A"+i+","+i+",0,1,"+l+","+(this._x1=d)+","+(this._y1=T):m>E&&(this._+="A"+i+","+i+",0,"+ +(m>=b)+","+l+","+(this._x1=o+i*Math.cos(s))+","+(this._y1=a+i*Math.sin(s))))},rect:function(o,a,i,n){this._+="M"+(this._x0=this._x1=+o)+","+(this._y0=this._y1=+a)+"h"+ +i+"v"+ +n+"h"+-i+"Z"},toString:function(){return this._}},h.path=r,Object.defineProperty(h,"__esModule",{value:!0})})}}),QT=He({"node_modules/d3-shape/dist/d3-shape.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,c4()):(h=h||self,b(h.d3=h.d3||{},h.d3))})(Y,function(h,b){function S(pt){return function(){return pt}}var E=Math.abs,e=Math.atan2,t=Math.cos,r=Math.max,o=Math.min,a=Math.sin,i=Math.sqrt,n=1e-12,s=Math.PI,f=s/2,c=2*s;function p(pt){return pt>1?0:pt<-1?s:Math.acos(pt)}function d(pt){return pt>=1?f:pt<=-1?-f:Math.asin(pt)}function T(pt){return pt.innerRadius}function l(pt){return pt.outerRadius}function m(pt){return pt.startAngle}function x(pt){return pt.endAngle}function A(pt){return pt&&pt.padAngle}function M(pt,Kt,xr,Hr,fa,xa,_a,Wr){var ha=xr-pt,jn=Hr-Kt,tn=_a-fa,Zn=Wr-xa,ii=Zn*ha-tn*jn;if(!(ii*ii<n))return ii=(tn*(Kt-xa)-Zn*(pt-fa))/ii,[pt+ii*ha,Kt+ii*jn]}function _(pt,Kt,xr,Hr,fa,xa,_a){var Wr=pt-xr,ha=Kt-Hr,jn=(_a?xa:-xa)/i(Wr*Wr+ha*ha),tn=jn*ha,Zn=-jn*Wr,ii=pt+tn,pi=Kt+Zn,di=xr+tn,ki=Hr+Zn,zn=(ii+di)/2,no=(pi+ki)/2,Xi=di-ii,Go=ki-pi,ho=Xi*Xi+Go*Go,to=fa-xa,Gi=ii*ki-di*pi,Ho=(Go<0?-1:1)*i(r(0,to*to*ho-Gi*Gi)),jo=(Gi*Go-Xi*Ho)/ho,is=(-Gi*Xi-Go*Ho)/ho,vo=(Gi*Go+Xi*Ho)/ho,$i=(-Gi*Xi+Go*Ho)/ho,bi=jo-zn,po=is-no,os=vo-zn,Ts=$i-no;return bi*bi+po*po>os*os+Ts*Ts&&(jo=vo,is=$i),{cx:jo,cy:is,x01:-tn,y01:-Zn,x11:jo*(fa/to-1),y11:is*(fa/to-1)}}function w(){var pt=T,Kt=l,xr=S(0),Hr=null,fa=m,xa=x,_a=A,Wr=null;function ha(){var jn,tn,Zn=+pt.apply(this,arguments),ii=+Kt.apply(this,arguments),pi=fa.apply(this,arguments)-f,di=xa.apply(this,arguments)-f,ki=E(di-pi),zn=di>pi;if(Wr||(Wr=jn=b.path()),ii<Zn&&(tn=ii,ii=Zn,Zn=tn),!(ii>n))Wr.moveTo(0,0);else if(ki>c-n)Wr.moveTo(ii*t(pi),ii*a(pi)),Wr.arc(0,0,ii,pi,di,!zn),Zn>n&&(Wr.moveTo(Zn*t(di),Zn*a(di)),Wr.arc(0,0,Zn,di,pi,zn));else{var no=pi,Xi=di,Go=pi,ho=di,to=ki,Gi=ki,Ho=_a.apply(this,arguments)/2,jo=Ho>n&&(Hr?+Hr.apply(this,arguments):i(Zn*Zn+ii*ii)),is=o(E(ii-Zn)/2,+xr.apply(this,arguments)),vo=is,$i=is,bi,po;if(jo>n){var os=d(jo/Zn*a(Ho)),Ts=d(jo/ii*a(Ho));(to-=os*2)>n?(os*=zn?1:-1,Go+=os,ho-=os):(to=0,Go=ho=(pi+di)/2),(Gi-=Ts*2)>n?(Ts*=zn?1:-1,no+=Ts,Xi-=Ts):(Gi=0,no=Xi=(pi+di)/2)}var Es=ii*t(no),Mo=ii*a(no),On=Zn*t(ho),vi=Zn*a(ho);if(is>n){var As=ii*t(Xi),Ro=ii*a(Xi),Oi=Zn*t(Go),ks=Zn*a(Go),Wo;if(ki<s&&(Wo=M(Es,Mo,Oi,ks,As,Ro,On,vi))){var ss=Es-Wo[0],hl=Mo-Wo[1],fi=As-Wo[0],_o=Ro-Wo[1],io=1/a(p((ss*fi+hl*_o)/(i(ss*ss+hl*hl)*i(fi*fi+_o*_o)))/2),Vs=i(Wo[0]*Wo[0]+Wo[1]*Wo[1]);vo=o(is,(Zn-Vs)/(io-1)),$i=o(is,(ii-Vs)/(io+1))}}Gi>n?$i>n?(bi=_(Oi,ks,Es,Mo,ii,$i,zn),po=_(As,Ro,On,vi,ii,$i,zn),Wr.moveTo(bi.cx+bi.x01,bi.cy+bi.y01),$i<is?Wr.arc(bi.cx,bi.cy,$i,e(bi.y01,bi.x01),e(po.y01,po.x01),!zn):(Wr.arc(bi.cx,bi.cy,$i,e(bi.y01,bi.x01),e(bi.y11,bi.x11),!zn),Wr.arc(0,0,ii,e(bi.cy+bi.y11,bi.cx+bi.x11),e(po.cy+po.y11,po.cx+po.x11),!zn),Wr.arc(po.cx,po.cy,$i,e(po.y11,po.x11),e(po.y01,po.x01),!zn))):(Wr.moveTo(Es,Mo),Wr.arc(0,0,ii,no,Xi,!zn)):Wr.moveTo(Es,Mo),!(Zn>n)||!(to>n)?Wr.lineTo(On,vi):vo>n?(bi=_(On,vi,As,Ro,Zn,-vo,zn),po=_(Es,Mo,Oi,ks,Zn,-vo,zn),Wr.lineTo(bi.cx+bi.x01,bi.cy+bi.y01),vo<is?Wr.arc(bi.cx,bi.cy,vo,e(bi.y01,bi.x01),e(po.y01,po.x01),!zn):(Wr.arc(bi.cx,bi.cy,vo,e(bi.y01,bi.x01),e(bi.y11,bi.x11),!zn),Wr.arc(0,0,Zn,e(bi.cy+bi.y11,bi.cx+bi.x11),e(po.cy+po.y11,po.cx+po.x11),zn),Wr.arc(po.cx,po.cy,vo,e(po.y11,po.x11),e(po.y01,po.x01),!zn))):Wr.arc(0,0,Zn,ho,Go,zn)}if(Wr.closePath(),jn)return Wr=null,jn+""||null}return ha.centroid=function(){var jn=(+pt.apply(this,arguments)+ +Kt.apply(this,arguments))/2,tn=(+fa.apply(this,arguments)+ +xa.apply(this,arguments))/2-s/2;return[t(tn)*jn,a(tn)*jn]},ha.innerRadius=function(jn){return arguments.length?(pt=typeof jn=="function"?jn:S(+jn),ha):pt},ha.outerRadius=function(jn){return arguments.length?(Kt=typeof jn=="function"?jn:S(+jn),ha):Kt},ha.cornerRadius=function(jn){return arguments.length?(xr=typeof jn=="function"?jn:S(+jn),ha):xr},ha.padRadius=function(jn){return arguments.length?(Hr=jn==null?null:typeof jn=="function"?jn:S(+jn),ha):Hr},ha.startAngle=function(jn){return arguments.length?(fa=typeof jn=="function"?jn:S(+jn),ha):fa},ha.endAngle=function(jn){return arguments.length?(xa=typeof jn=="function"?jn:S(+jn),ha):xa},ha.padAngle=function(jn){return arguments.length?(_a=typeof jn=="function"?jn:S(+jn),ha):_a},ha.context=function(jn){return arguments.length?(Wr=jn??null,ha):Wr},ha}function g(pt){this._context=pt}g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;default:this._context.lineTo(pt,Kt);break}}};function u(pt){return new g(pt)}function v(pt){return pt[0]}function y(pt){return pt[1]}function R(){var pt=v,Kt=y,xr=S(!0),Hr=null,fa=u,xa=null;function _a(Wr){var ha,jn=Wr.length,tn,Zn=!1,ii;for(Hr==null&&(xa=fa(ii=b.path())),ha=0;ha<=jn;++ha)!(ha<jn&&xr(tn=Wr[ha],ha,Wr))===Zn&&((Zn=!Zn)?xa.lineStart():xa.lineEnd()),Zn&&xa.point(+pt(tn,ha,Wr),+Kt(tn,ha,Wr));if(ii)return xa=null,ii+""||null}return _a.x=function(Wr){return arguments.length?(pt=typeof Wr=="function"?Wr:S(+Wr),_a):pt},_a.y=function(Wr){return arguments.length?(Kt=typeof Wr=="function"?Wr:S(+Wr),_a):Kt},_a.defined=function(Wr){return arguments.length?(xr=typeof Wr=="function"?Wr:S(!!Wr),_a):xr},_a.curve=function(Wr){return arguments.length?(fa=Wr,Hr!=null&&(xa=fa(Hr)),_a):fa},_a.context=function(Wr){return arguments.length?(Wr==null?Hr=xa=null:xa=fa(Hr=Wr),_a):Hr},_a}function L(){var pt=v,Kt=null,xr=S(0),Hr=y,fa=S(!0),xa=null,_a=u,Wr=null;function ha(tn){var Zn,ii,pi,di=tn.length,ki,zn=!1,no,Xi=new Array(di),Go=new Array(di);for(xa==null&&(Wr=_a(no=b.path())),Zn=0;Zn<=di;++Zn){if(!(Zn<di&&fa(ki=tn[Zn],Zn,tn))===zn)if(zn=!zn)ii=Zn,Wr.areaStart(),Wr.lineStart();else{for(Wr.lineEnd(),Wr.lineStart(),pi=Zn-1;pi>=ii;--pi)Wr.point(Xi[pi],Go[pi]);Wr.lineEnd(),Wr.areaEnd()}zn&&(Xi[Zn]=+pt(ki,Zn,tn),Go[Zn]=+xr(ki,Zn,tn),Wr.point(Kt?+Kt(ki,Zn,tn):Xi[Zn],Hr?+Hr(ki,Zn,tn):Go[Zn]))}if(no)return Wr=null,no+""||null}function jn(){return R().defined(fa).curve(_a).context(xa)}return ha.x=function(tn){return arguments.length?(pt=typeof tn=="function"?tn:S(+tn),Kt=null,ha):pt},ha.x0=function(tn){return arguments.length?(pt=typeof tn=="function"?tn:S(+tn),ha):pt},ha.x1=function(tn){return arguments.length?(Kt=tn==null?null:typeof tn=="function"?tn:S(+tn),ha):Kt},ha.y=function(tn){return arguments.length?(xr=typeof tn=="function"?tn:S(+tn),Hr=null,ha):xr},ha.y0=function(tn){return arguments.length?(xr=typeof tn=="function"?tn:S(+tn),ha):xr},ha.y1=function(tn){return arguments.length?(Hr=tn==null?null:typeof tn=="function"?tn:S(+tn),ha):Hr},ha.lineX0=ha.lineY0=function(){return jn().x(pt).y(xr)},ha.lineY1=function(){return jn().x(pt).y(Hr)},ha.lineX1=function(){return jn().x(Kt).y(xr)},ha.defined=function(tn){return arguments.length?(fa=typeof tn=="function"?tn:S(!!tn),ha):fa},ha.curve=function(tn){return arguments.length?(_a=tn,xa!=null&&(Wr=_a(xa)),ha):_a},ha.context=function(tn){return arguments.length?(tn==null?xa=Wr=null:Wr=_a(xa=tn),ha):xa},ha}function z(pt,Kt){return Kt<pt?-1:Kt>pt?1:Kt>=pt?0:NaN}function F(pt){return pt}function B(){var pt=F,Kt=z,xr=null,Hr=S(0),fa=S(c),xa=S(0);function _a(Wr){var ha,jn=Wr.length,tn,Zn,ii=0,pi=new Array(jn),di=new Array(jn),ki=+Hr.apply(this,arguments),zn=Math.min(c,Math.max(-c,fa.apply(this,arguments)-ki)),no,Xi=Math.min(Math.abs(zn)/jn,xa.apply(this,arguments)),Go=Xi*(zn<0?-1:1),ho;for(ha=0;ha<jn;++ha)(ho=di[pi[ha]=ha]=+pt(Wr[ha],ha,Wr))>0&&(ii+=ho);for(Kt!=null?pi.sort(function(to,Gi){return Kt(di[to],di[Gi])}):xr!=null&&pi.sort(function(to,Gi){return xr(Wr[to],Wr[Gi])}),ha=0,Zn=ii?(zn-jn*Go)/ii:0;ha<jn;++ha,ki=no)tn=pi[ha],ho=di[tn],no=ki+(ho>0?ho*Zn:0)+Go,di[tn]={data:Wr[tn],index:ha,value:ho,startAngle:ki,endAngle:no,padAngle:Xi};return di}return _a.value=function(Wr){return arguments.length?(pt=typeof Wr=="function"?Wr:S(+Wr),_a):pt},_a.sortValues=function(Wr){return arguments.length?(Kt=Wr,xr=null,_a):Kt},_a.sort=function(Wr){return arguments.length?(xr=Wr,Kt=null,_a):xr},_a.startAngle=function(Wr){return arguments.length?(Hr=typeof Wr=="function"?Wr:S(+Wr),_a):Hr},_a.endAngle=function(Wr){return arguments.length?(fa=typeof Wr=="function"?Wr:S(+Wr),_a):fa},_a.padAngle=function(Wr){return arguments.length?(xa=typeof Wr=="function"?Wr:S(+Wr),_a):xa},_a}var O=N(u);function I(pt){this._curve=pt}I.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(pt,Kt){this._curve.point(Kt*Math.sin(pt),Kt*-Math.cos(pt))}};function N(pt){function Kt(xr){return new I(pt(xr))}return Kt._curve=pt,Kt}function U(pt){var Kt=pt.curve;return pt.angle=pt.x,delete pt.x,pt.radius=pt.y,delete pt.y,pt.curve=function(xr){return arguments.length?Kt(N(xr)):Kt()._curve},pt}function X(){return U(R().curve(O))}function ee(){var pt=L().curve(O),Kt=pt.curve,xr=pt.lineX0,Hr=pt.lineX1,fa=pt.lineY0,xa=pt.lineY1;return pt.angle=pt.x,delete pt.x,pt.startAngle=pt.x0,delete pt.x0,pt.endAngle=pt.x1,delete pt.x1,pt.radius=pt.y,delete pt.y,pt.innerRadius=pt.y0,delete pt.y0,pt.outerRadius=pt.y1,delete pt.y1,pt.lineStartAngle=function(){return U(xr())},delete pt.lineX0,pt.lineEndAngle=function(){return U(Hr())},delete pt.lineX1,pt.lineInnerRadius=function(){return U(fa())},delete pt.lineY0,pt.lineOuterRadius=function(){return U(xa())},delete pt.lineY1,pt.curve=function(_a){return arguments.length?Kt(N(_a)):Kt()._curve},pt}function ue(pt,Kt){return[(Kt=+Kt)*Math.cos(pt-=Math.PI/2),Kt*Math.sin(pt)]}var oe=Array.prototype.slice;function le(pt){return pt.source}function V(pt){return pt.target}function J(pt){var Kt=le,xr=V,Hr=v,fa=y,xa=null;function _a(){var Wr,ha=oe.call(arguments),jn=Kt.apply(this,ha),tn=xr.apply(this,ha);if(xa||(xa=Wr=b.path()),pt(xa,+Hr.apply(this,(ha[0]=jn,ha)),+fa.apply(this,ha),+Hr.apply(this,(ha[0]=tn,ha)),+fa.apply(this,ha)),Wr)return xa=null,Wr+""||null}return _a.source=function(Wr){return arguments.length?(Kt=Wr,_a):Kt},_a.target=function(Wr){return arguments.length?(xr=Wr,_a):xr},_a.x=function(Wr){return arguments.length?(Hr=typeof Wr=="function"?Wr:S(+Wr),_a):Hr},_a.y=function(Wr){return arguments.length?(fa=typeof Wr=="function"?Wr:S(+Wr),_a):fa},_a.context=function(Wr){return arguments.length?(xa=Wr??null,_a):xa},_a}function te(pt,Kt,xr,Hr,fa){pt.moveTo(Kt,xr),pt.bezierCurveTo(Kt=(Kt+Hr)/2,xr,Kt,fa,Hr,fa)}function Z(pt,Kt,xr,Hr,fa){pt.moveTo(Kt,xr),pt.bezierCurveTo(Kt,xr=(xr+fa)/2,Hr,xr,Hr,fa)}function se(pt,Kt,xr,Hr,fa){var xa=ue(Kt,xr),_a=ue(Kt,xr=(xr+fa)/2),Wr=ue(Hr,xr),ha=ue(Hr,fa);pt.moveTo(xa[0],xa[1]),pt.bezierCurveTo(_a[0],_a[1],Wr[0],Wr[1],ha[0],ha[1])}function Q(){return J(te)}function q(){return J(Z)}function re(){var pt=J(se);return pt.angle=pt.x,delete pt.x,pt.radius=pt.y,delete pt.y,pt}var ae={draw:function(pt,Kt){var xr=Math.sqrt(Kt/s);pt.moveTo(xr,0),pt.arc(0,0,xr,0,c)}},fe={draw:function(pt,Kt){var xr=Math.sqrt(Kt/5)/2;pt.moveTo(-3*xr,-xr),pt.lineTo(-xr,-xr),pt.lineTo(-xr,-3*xr),pt.lineTo(xr,-3*xr),pt.lineTo(xr,-xr),pt.lineTo(3*xr,-xr),pt.lineTo(3*xr,xr),pt.lineTo(xr,xr),pt.lineTo(xr,3*xr),pt.lineTo(-xr,3*xr),pt.lineTo(-xr,xr),pt.lineTo(-3*xr,xr),pt.closePath()}},be=Math.sqrt(1/3),Me=be*2,Ie={draw:function(pt,Kt){var xr=Math.sqrt(Kt/Me),Hr=xr*be;pt.moveTo(0,-xr),pt.lineTo(Hr,0),pt.lineTo(0,xr),pt.lineTo(-Hr,0),pt.closePath()}},Le=.8908130915292852,je=Math.sin(s/10)/Math.sin(7*s/10),et=Math.sin(c/10)*je,rt=-Math.cos(c/10)*je,Je={draw:function(pt,Kt){var xr=Math.sqrt(Kt*Le),Hr=et*xr,fa=rt*xr;pt.moveTo(0,-xr),pt.lineTo(Hr,fa);for(var xa=1;xa<5;++xa){var _a=c*xa/5,Wr=Math.cos(_a),ha=Math.sin(_a);pt.lineTo(ha*xr,-Wr*xr),pt.lineTo(Wr*Hr-ha*fa,ha*Hr+Wr*fa)}pt.closePath()}},Ze={draw:function(pt,Kt){var xr=Math.sqrt(Kt),Hr=-xr/2;pt.rect(Hr,Hr,xr,xr)}},Ee=Math.sqrt(3),xe={draw:function(pt,Kt){var xr=-Math.sqrt(Kt/(Ee*3));pt.moveTo(0,xr*2),pt.lineTo(-Ee*xr,-xr),pt.lineTo(Ee*xr,-xr),pt.closePath()}},he=-.5,De=Math.sqrt(3)/2,tt=1/Math.sqrt(12),nt=(tt/2+1)*3,$e={draw:function(pt,Kt){var xr=Math.sqrt(Kt/nt),Hr=xr/2,fa=xr*tt,xa=Hr,_a=xr*tt+xr,Wr=-xa,ha=_a;pt.moveTo(Hr,fa),pt.lineTo(xa,_a),pt.lineTo(Wr,ha),pt.lineTo(he*Hr-De*fa,De*Hr+he*fa),pt.lineTo(he*xa-De*_a,De*xa+he*_a),pt.lineTo(he*Wr-De*ha,De*Wr+he*ha),pt.lineTo(he*Hr+De*fa,he*fa-De*Hr),pt.lineTo(he*xa+De*_a,he*_a-De*xa),pt.lineTo(he*Wr+De*ha,he*ha-De*Wr),pt.closePath()}},Et=[ae,fe,Ie,Ze,Je,xe,$e];function Ct(){var pt=S(ae),Kt=S(64),xr=null;function Hr(){var fa;if(xr||(xr=fa=b.path()),pt.apply(this,arguments).draw(xr,+Kt.apply(this,arguments)),fa)return xr=null,fa+""||null}return Hr.type=function(fa){return arguments.length?(pt=typeof fa=="function"?fa:S(fa),Hr):pt},Hr.size=function(fa){return arguments.length?(Kt=typeof fa=="function"?fa:S(+fa),Hr):Kt},Hr.context=function(fa){return arguments.length?(xr=fa??null,Hr):xr},Hr}function jt(){}function Wt(pt,Kt,xr){pt._context.bezierCurveTo((2*pt._x0+pt._x1)/3,(2*pt._y0+pt._y1)/3,(pt._x0+2*pt._x1)/3,(pt._y0+2*pt._y1)/3,(pt._x0+4*pt._x1+Kt)/6,(pt._y0+4*pt._y1+xr)/6)}function dr(pt){this._context=pt}dr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Wt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Wt(this,pt,Kt);break}this._x0=this._x1,this._x1=pt,this._y0=this._y1,this._y1=Kt}};function vr(pt){return new dr(pt)}function Dr(pt){this._context=pt}Dr.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._x2=pt,this._y2=Kt;break;case 1:this._point=2,this._x3=pt,this._y3=Kt;break;case 2:this._point=3,this._x4=pt,this._y4=Kt,this._context.moveTo((this._x0+4*this._x1+pt)/6,(this._y0+4*this._y1+Kt)/6);break;default:Wt(this,pt,Kt);break}this._x0=this._x1,this._x1=pt,this._y0=this._y1,this._y1=Kt}};function hr(pt){return new Dr(pt)}function Ar(pt){this._context=pt}Ar.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var xr=(this._x0+4*this._x1+pt)/6,Hr=(this._y0+4*this._y1+Kt)/6;this._line?this._context.lineTo(xr,Hr):this._context.moveTo(xr,Hr);break;case 3:this._point=4;default:Wt(this,pt,Kt);break}this._x0=this._x1,this._x1=pt,this._y0=this._y1,this._y1=Kt}};function mt(pt){return new Ar(pt)}function Fe(pt,Kt){this._basis=new dr(pt),this._beta=Kt}Fe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var pt=this._x,Kt=this._y,xr=pt.length-1;if(xr>0)for(var Hr=pt[0],fa=Kt[0],xa=pt[xr]-Hr,_a=Kt[xr]-fa,Wr=-1,ha;++Wr<=xr;)ha=Wr/xr,this._basis.point(this._beta*pt[Wr]+(1-this._beta)*(Hr+ha*xa),this._beta*Kt[Wr]+(1-this._beta)*(fa+ha*_a));this._x=this._y=null,this._basis.lineEnd()},point:function(pt,Kt){this._x.push(+pt),this._y.push(+Kt)}};var We=(function pt(Kt){function xr(Hr){return Kt===1?new dr(Hr):new Fe(Hr,Kt)}return xr.beta=function(Hr){return pt(+Hr)},xr})(.85);function Ae(pt,Kt,xr){pt._context.bezierCurveTo(pt._x1+pt._k*(pt._x2-pt._x0),pt._y1+pt._k*(pt._y2-pt._y0),pt._x2+pt._k*(pt._x1-Kt),pt._y2+pt._k*(pt._y1-xr),pt._x2,pt._y2)}function me(pt,Kt){this._context=pt,this._k=(1-Kt)/6}me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ae(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2,this._x1=pt,this._y1=Kt;break;case 2:this._point=3;default:Ae(this,pt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var pe=(function pt(Kt){function xr(Hr){return new me(Hr,Kt)}return xr.tension=function(Hr){return pt(+Hr)},xr})(0);function Te(pt,Kt){this._context=pt,this._k=(1-Kt)/6}Te.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._x3=pt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=pt,this._y4=Kt);break;case 2:this._point=3,this._x5=pt,this._y5=Kt;break;default:Ae(this,pt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Ue=(function pt(Kt){function xr(Hr){return new Te(Hr,Kt)}return xr.tension=function(Hr){return pt(+Hr)},xr})(0);function Xe(pt,Kt){this._context=pt,this._k=(1-Kt)/6}Xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ae(this,pt,Kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var bt=(function pt(Kt){function xr(Hr){return new Xe(Hr,Kt)}return xr.tension=function(Hr){return pt(+Hr)},xr})(0);function xt(pt,Kt,xr){var Hr=pt._x1,fa=pt._y1,xa=pt._x2,_a=pt._y2;if(pt._l01_a>n){var Wr=2*pt._l01_2a+3*pt._l01_a*pt._l12_a+pt._l12_2a,ha=3*pt._l01_a*(pt._l01_a+pt._l12_a);Hr=(Hr*Wr-pt._x0*pt._l12_2a+pt._x2*pt._l01_2a)/ha,fa=(fa*Wr-pt._y0*pt._l12_2a+pt._y2*pt._l01_2a)/ha}if(pt._l23_a>n){var jn=2*pt._l23_2a+3*pt._l23_a*pt._l12_a+pt._l12_2a,tn=3*pt._l23_a*(pt._l23_a+pt._l12_a);xa=(xa*jn+pt._x1*pt._l23_2a-Kt*pt._l12_2a)/tn,_a=(_a*jn+pt._y1*pt._l23_2a-xr*pt._l12_2a)/tn}pt._context.bezierCurveTo(Hr,fa,xa,_a,pt._x2,pt._y2)}function Mt(pt,Kt){this._context=pt,this._alpha=Kt}Mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){if(pt=+pt,Kt=+Kt,this._point){var xr=this._x2-pt,Hr=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(xr*xr+Hr*Hr,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;break;case 2:this._point=3;default:xt(this,pt,Kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Nt=(function pt(Kt){function xr(Hr){return Kt?new Mt(Hr,Kt):new me(Hr,0)}return xr.alpha=function(Hr){return pt(+Hr)},xr})(.5);function sr(pt,Kt){this._context=pt,this._alpha=Kt}sr.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(pt,Kt){if(pt=+pt,Kt=+Kt,this._point){var xr=this._x2-pt,Hr=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(xr*xr+Hr*Hr,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=pt,this._y3=Kt;break;case 1:this._point=2,this._context.moveTo(this._x4=pt,this._y4=Kt);break;case 2:this._point=3,this._x5=pt,this._y5=Kt;break;default:xt(this,pt,Kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var ar=(function pt(Kt){function xr(Hr){return Kt?new sr(Hr,Kt):new Te(Hr,0)}return xr.alpha=function(Hr){return pt(+Hr)},xr})(.5);function tr(pt,Kt){this._context=pt,this._alpha=Kt}tr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){if(pt=+pt,Kt=+Kt,this._point){var xr=this._x2-pt,Hr=this._y2-Kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(xr*xr+Hr*Hr,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xt(this,pt,Kt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=pt,this._y0=this._y1,this._y1=this._y2,this._y2=Kt}};var Tr=(function pt(Kt){function xr(Hr){return Kt?new tr(Hr,Kt):new Xe(Hr,0)}return xr.alpha=function(Hr){return pt(+Hr)},xr})(.5);function sa(pt){this._context=pt}sa.prototype={areaStart:jt,areaEnd:jt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(pt,Kt){pt=+pt,Kt=+Kt,this._point?this._context.lineTo(pt,Kt):(this._point=1,this._context.moveTo(pt,Kt))}};function Ea(pt){return new sa(pt)}function ba(pt){return pt<0?-1:1}function Ia(pt,Kt,xr){var Hr=pt._x1-pt._x0,fa=Kt-pt._x1,xa=(pt._y1-pt._y0)/(Hr||fa<0&&-0),_a=(xr-pt._y1)/(fa||Hr<0&&-0),Wr=(xa*fa+_a*Hr)/(Hr+fa);return(ba(xa)+ba(_a))*Math.min(Math.abs(xa),Math.abs(_a),.5*Math.abs(Wr))||0}function Ra(pt,Kt){var xr=pt._x1-pt._x0;return xr?(3*(pt._y1-pt._y0)/xr-Kt)/2:Kt}function ya(pt,Kt,xr){var Hr=pt._x0,fa=pt._y0,xa=pt._x1,_a=pt._y1,Wr=(xa-Hr)/3;pt._context.bezierCurveTo(Hr+Wr,fa+Wr*Kt,xa-Wr,_a-Wr*xr,xa,_a)}function rn(pt){this._context=pt}rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ya(this,this._t0,Ra(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(pt,Kt){var xr=NaN;if(pt=+pt,Kt=+Kt,!(pt===this._x1&&Kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;break;case 2:this._point=3,ya(this,Ra(this,xr=Ia(this,pt,Kt)),xr);break;default:ya(this,this._t0,xr=Ia(this,pt,Kt));break}this._x0=this._x1,this._x1=pt,this._y0=this._y1,this._y1=Kt,this._t0=xr}}};function mn(pt){this._context=new Yt(pt)}(mn.prototype=Object.create(rn.prototype)).point=function(pt,Kt){rn.prototype.point.call(this,Kt,pt)};function Yt(pt){this._context=pt}Yt.prototype={moveTo:function(pt,Kt){this._context.moveTo(Kt,pt)},closePath:function(){this._context.closePath()},lineTo:function(pt,Kt){this._context.lineTo(Kt,pt)},bezierCurveTo:function(pt,Kt,xr,Hr,fa,xa){this._context.bezierCurveTo(Kt,pt,Hr,xr,xa,fa)}};function It(pt){return new rn(pt)}function Zt(pt){return new mn(pt)}function $t(pt){this._context=pt}$t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var pt=this._x,Kt=this._y,xr=pt.length;if(xr)if(this._line?this._context.lineTo(pt[0],Kt[0]):this._context.moveTo(pt[0],Kt[0]),xr===2)this._context.lineTo(pt[1],Kt[1]);else for(var Hr=Cr(pt),fa=Cr(Kt),xa=0,_a=1;_a<xr;++xa,++_a)this._context.bezierCurveTo(Hr[0][xa],fa[0][xa],Hr[1][xa],fa[1][xa],pt[_a],Kt[_a]);(this._line||this._line!==0&&xr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(pt,Kt){this._x.push(+pt),this._y.push(+Kt)}};function Cr(pt){var Kt,xr=pt.length-1,Hr,fa=new Array(xr),xa=new Array(xr),_a=new Array(xr);for(fa[0]=0,xa[0]=2,_a[0]=pt[0]+2*pt[1],Kt=1;Kt<xr-1;++Kt)fa[Kt]=1,xa[Kt]=4,_a[Kt]=4*pt[Kt]+2*pt[Kt+1];for(fa[xr-1]=2,xa[xr-1]=7,_a[xr-1]=8*pt[xr-1]+pt[xr],Kt=1;Kt<xr;++Kt)Hr=fa[Kt]/xa[Kt-1],xa[Kt]-=Hr,_a[Kt]-=Hr*_a[Kt-1];for(fa[xr-1]=_a[xr-1]/xa[xr-1],Kt=xr-2;Kt>=0;--Kt)fa[Kt]=(_a[Kt]-fa[Kt+1])/xa[Kt];for(xa[xr-1]=(pt[xr]+fa[xr-1])/2,Kt=0;Kt<xr-1;++Kt)xa[Kt]=2*pt[Kt+1]-fa[Kt+1];return[fa,xa]}function qr(pt){return new $t(pt)}function Jr(pt,Kt){this._context=pt,this._t=Kt}Jr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(pt,Kt){switch(pt=+pt,Kt=+Kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(pt,Kt):this._context.moveTo(pt,Kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Kt),this._context.lineTo(pt,Kt);else{var xr=this._x*(1-this._t)+pt*this._t;this._context.lineTo(xr,this._y),this._context.lineTo(xr,Kt)}break}}this._x=pt,this._y=Kt}};function aa(pt){return new Jr(pt,.5)}function Ca(pt){return new Jr(pt,0)}function Ha(pt){return new Jr(pt,1)}function Va(pt,Kt){if((_a=pt.length)>1)for(var xr=1,Hr,fa,xa=pt[Kt[0]],_a,Wr=xa.length;xr<_a;++xr)for(fa=xa,xa=pt[Kt[xr]],Hr=0;Hr<Wr;++Hr)xa[Hr][1]+=xa[Hr][0]=isNaN(fa[Hr][1])?fa[Hr][0]:fa[Hr][1]}function Za(pt){for(var Kt=pt.length,xr=new Array(Kt);--Kt>=0;)xr[Kt]=Kt;return xr}function an(pt,Kt){return pt[Kt]}function wa(){var pt=S([]),Kt=Za,xr=Va,Hr=an;function fa(xa){var _a=pt.apply(this,arguments),Wr,ha=xa.length,jn=_a.length,tn=new Array(jn),Zn;for(Wr=0;Wr<jn;++Wr){for(var ii=_a[Wr],pi=tn[Wr]=new Array(ha),di=0,ki;di<ha;++di)pi[di]=ki=[0,+Hr(xa[di],ii,di,xa)],ki.data=xa[di];pi.key=ii}for(Wr=0,Zn=Kt(tn);Wr<jn;++Wr)tn[Zn[Wr]].index=Wr;return xr(tn,Zn),tn}return fa.keys=function(xa){return arguments.length?(pt=typeof xa=="function"?xa:S(oe.call(xa)),fa):pt},fa.value=function(xa){return arguments.length?(Hr=typeof xa=="function"?xa:S(+xa),fa):Hr},fa.order=function(xa){return arguments.length?(Kt=xa==null?Za:typeof xa=="function"?xa:S(oe.call(xa)),fa):Kt},fa.offset=function(xa){return arguments.length?(xr=xa??Va,fa):xr},fa}function Nn(pt,Kt){if((Hr=pt.length)>0){for(var xr,Hr,fa=0,xa=pt[0].length,_a;fa<xa;++fa){for(_a=xr=0;xr<Hr;++xr)_a+=pt[xr][fa][1]||0;if(_a)for(xr=0;xr<Hr;++xr)pt[xr][fa][1]/=_a}Va(pt,Kt)}}function Wn(pt,Kt){if((ha=pt.length)>0)for(var xr,Hr=0,fa,xa,_a,Wr,ha,jn=pt[Kt[0]].length;Hr<jn;++Hr)for(_a=Wr=0,xr=0;xr<ha;++xr)(xa=(fa=pt[Kt[xr]][Hr])[1]-fa[0])>0?(fa[0]=_a,fa[1]=_a+=xa):xa<0?(fa[1]=Wr,fa[0]=Wr+=xa):(fa[0]=0,fa[1]=xa)}function At(pt,Kt){if((fa=pt.length)>0){for(var xr=0,Hr=pt[Kt[0]],fa,xa=Hr.length;xr<xa;++xr){for(var _a=0,Wr=0;_a<fa;++_a)Wr+=pt[_a][xr][1]||0;Hr[xr][1]+=Hr[xr][0]=-Wr/2}Va(pt,Kt)}}function ft(pt,Kt){if(!(!((_a=pt.length)>0)||!((xa=(fa=pt[Kt[0]]).length)>0))){for(var xr=0,Hr=1,fa,xa,_a;Hr<xa;++Hr){for(var Wr=0,ha=0,jn=0;Wr<_a;++Wr){for(var tn=pt[Kt[Wr]],Zn=tn[Hr][1]||0,ii=tn[Hr-1][1]||0,pi=(Zn-ii)/2,di=0;di<Wr;++di){var ki=pt[Kt[di]],zn=ki[Hr][1]||0,no=ki[Hr-1][1]||0;pi+=zn-no}ha+=Zn,jn+=pi*Zn}fa[Hr-1][1]+=fa[Hr-1][0]=xr,ha&&(xr-=jn/ha)}fa[Hr-1][1]+=fa[Hr-1][0]=xr,Va(pt,Kt)}}function pr(pt){var Kt=pt.map(Sr);return Za(pt).sort(function(xr,Hr){return Kt[xr]-Kt[Hr]})}function Sr(pt){for(var Kt=-1,xr=0,Hr=pt.length,fa,xa=-1/0;++Kt<Hr;)(fa=+pt[Kt][1])>xa&&(xa=fa,xr=Kt);return xr}function Er(pt){var Kt=pt.map(_r);return Za(pt).sort(function(xr,Hr){return Kt[xr]-Kt[Hr]})}function _r(pt){for(var Kt=0,xr=-1,Hr=pt.length,fa;++xr<Hr;)(fa=+pt[xr][1])&&(Kt+=fa);return Kt}function Mr(pt){return Er(pt).reverse()}function Gr(pt){var Kt=pt.length,xr,Hr,fa=pt.map(_r),xa=pr(pt),_a=0,Wr=0,ha=[],jn=[];for(xr=0;xr<Kt;++xr)Hr=xa[xr],_a<Wr?(_a+=fa[Hr],ha.push(Hr)):(Wr+=fa[Hr],jn.push(Hr));return jn.reverse().concat(ha)}function Fr(pt){return Za(pt).reverse()}h.arc=w,h.area=L,h.areaRadial=ee,h.curveBasis=vr,h.curveBasisClosed=hr,h.curveBasisOpen=mt,h.curveBundle=We,h.curveCardinal=pe,h.curveCardinalClosed=Ue,h.curveCardinalOpen=bt,h.curveCatmullRom=Nt,h.curveCatmullRomClosed=ar,h.curveCatmullRomOpen=Tr,h.curveLinear=u,h.curveLinearClosed=Ea,h.curveMonotoneX=It,h.curveMonotoneY=Zt,h.curveNatural=qr,h.curveStep=aa,h.curveStepAfter=Ha,h.curveStepBefore=Ca,h.line=R,h.lineRadial=X,h.linkHorizontal=Q,h.linkRadial=re,h.linkVertical=q,h.pie=B,h.pointRadial=ue,h.radialArea=ee,h.radialLine=X,h.stack=wa,h.stackOffsetDiverging=Wn,h.stackOffsetExpand=Nn,h.stackOffsetNone=Va,h.stackOffsetSilhouette=At,h.stackOffsetWiggle=ft,h.stackOrderAppearance=pr,h.stackOrderAscending=Er,h.stackOrderDescending=Mr,h.stackOrderInsideOut=Gr,h.stackOrderNone=Za,h.stackOrderReverse=Fr,h.symbol=Ct,h.symbolCircle=ae,h.symbolCross=fe,h.symbolDiamond=Ie,h.symbolSquare=Ze,h.symbolStar=Je,h.symbolTriangle=xe,h.symbolWye=$e,h.symbols=Et,Object.defineProperty(h,"__esModule",{value:!0})})}}),f4=He({"node_modules/@plotly/d3-sankey/build/d3-sankey.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,Zm(),mx(),QT()):b(h.d3=h.d3||{},h.d3,h.d3,h.d3)})(Y,function(h,b,S,E){function e(u){return u.target.depth}function t(u){return u.depth}function r(u,v){return v-1-u.height}function o(u,v){return u.sourceLinks.length?u.depth:v-1}function a(u){return u.targetLinks.length?u.depth:u.sourceLinks.length?b.min(u.sourceLinks,e)-1:0}function i(u){return function(){return u}}function n(u,v){return f(u.source,v.source)||u.index-v.index}function s(u,v){return f(u.target,v.target)||u.index-v.index}function f(u,v){return u.y0-v.y0}function c(u){return u.value}function p(u){return(u.y0+u.y1)/2}function d(u){return p(u.source)*u.value}function T(u){return p(u.target)*u.value}function l(u){return u.index}function m(u){return u.nodes}function x(u){return u.links}function A(u,v){var y=u.get(v);if(!y)throw new Error("missing: "+v);return y}var M=function(){var u=0,v=0,y=1,R=1,L=24,z=8,F=l,B=o,O=m,I=x,N=32,U=2/3;function X(){var J={nodes:O.apply(null,arguments),links:I.apply(null,arguments)};return ee(J),ue(J),oe(J),le(J),V(J),J}X.update=function(J){return V(J),J},X.nodeId=function(J){return arguments.length?(F=typeof J=="function"?J:i(J),X):F},X.nodeAlign=function(J){return arguments.length?(B=typeof J=="function"?J:i(J),X):B},X.nodeWidth=function(J){return arguments.length?(L=+J,X):L},X.nodePadding=function(J){return arguments.length?(z=+J,X):z},X.nodes=function(J){return arguments.length?(O=typeof J=="function"?J:i(J),X):O},X.links=function(J){return arguments.length?(I=typeof J=="function"?J:i(J),X):I},X.size=function(J){return arguments.length?(u=v=0,y=+J[0],R=+J[1],X):[y-u,R-v]},X.extent=function(J){return arguments.length?(u=+J[0][0],y=+J[1][0],v=+J[0][1],R=+J[1][1],X):[[u,v],[y,R]]},X.iterations=function(J){return arguments.length?(N=+J,X):N};function ee(J){J.nodes.forEach(function(Z,se){Z.index=se,Z.sourceLinks=[],Z.targetLinks=[]});var te=S.map(J.nodes,F);J.links.forEach(function(Z,se){Z.index=se;var Q=Z.source,q=Z.target;typeof Q!="object"&&(Q=Z.source=A(te,Q)),typeof q!="object"&&(q=Z.target=A(te,q)),Q.sourceLinks.push(Z),q.targetLinks.push(Z)})}function ue(J){J.nodes.forEach(function(te){te.value=Math.max(b.sum(te.sourceLinks,c),b.sum(te.targetLinks,c))})}function oe(J){var te,Z,se;for(te=J.nodes,Z=[],se=0;te.length;++se,te=Z,Z=[])te.forEach(function(q){q.depth=se,q.sourceLinks.forEach(function(re){Z.indexOf(re.target)<0&&Z.push(re.target)})});for(te=J.nodes,Z=[],se=0;te.length;++se,te=Z,Z=[])te.forEach(function(q){q.height=se,q.targetLinks.forEach(function(re){Z.indexOf(re.source)<0&&Z.push(re.source)})});var Q=(y-u-L)/(se-1);J.nodes.forEach(function(q){q.x1=(q.x0=u+Math.max(0,Math.min(se-1,Math.floor(B.call(null,q,se))))*Q)+L})}function le(J){var te=S.nest().key(function(fe){return fe.x0}).sortKeys(b.ascending).entries(J.nodes).map(function(fe){return fe.values});Q(),ae();for(var Z=1,se=N;se>0;--se)re(Z*=.99),ae(),q(Z),ae();function Q(){var fe=b.max(te,function(Ie){return Ie.length}),be=U*(R-v)/(fe-1);z>be&&(z=be);var Me=b.min(te,function(Ie){return(R-v-(Ie.length-1)*z)/b.sum(Ie,c)});te.forEach(function(Ie){Ie.forEach(function(Le,je){Le.y1=(Le.y0=je)+Le.value*Me})}),J.links.forEach(function(Ie){Ie.width=Ie.value*Me})}function q(fe){te.forEach(function(be){be.forEach(function(Me){if(Me.targetLinks.length){var Ie=(b.sum(Me.targetLinks,d)/b.sum(Me.targetLinks,c)-p(Me))*fe;Me.y0+=Ie,Me.y1+=Ie}})})}function re(fe){te.slice().reverse().forEach(function(be){be.forEach(function(Me){if(Me.sourceLinks.length){var Ie=(b.sum(Me.sourceLinks,T)/b.sum(Me.sourceLinks,c)-p(Me))*fe;Me.y0+=Ie,Me.y1+=Ie}})})}function ae(){te.forEach(function(fe){var be,Me,Ie=v,Le=fe.length,je;for(fe.sort(f),je=0;je<Le;++je)be=fe[je],Me=Ie-be.y0,Me>0&&(be.y0+=Me,be.y1+=Me),Ie=be.y1+z;if(Me=Ie-z-R,Me>0)for(Ie=be.y0-=Me,be.y1-=Me,je=Le-2;je>=0;--je)be=fe[je],Me=be.y1+z-Ie,Me>0&&(be.y0-=Me,be.y1-=Me),Ie=be.y0})}}function V(J){J.nodes.forEach(function(te){te.sourceLinks.sort(s),te.targetLinks.sort(n)}),J.nodes.forEach(function(te){var Z=te.y0,se=Z;te.sourceLinks.forEach(function(Q){Q.y0=Z+Q.width/2,Z+=Q.width}),te.targetLinks.forEach(function(Q){Q.y1=se+Q.width/2,se+=Q.width})})}return X};function _(u){return[u.source.x1,u.y0]}function w(u){return[u.target.x0,u.y1]}var g=function(){return E.linkHorizontal().source(_).target(w)};h.sankey=M,h.sankeyCenter=a,h.sankeyLeft=t,h.sankeyRight=r,h.sankeyJustify=o,h.sankeyLinkHorizontal=g,Object.defineProperty(h,"__esModule",{value:!0})})}}),h4=He({"node_modules/elementary-circuits-directed-graph/johnson.js"(Y,G){var h=JT();G.exports=function(S,E){var e=[],t=[],r=[],o={},a=[],i;function n(A){r[A]=!1,o.hasOwnProperty(A)&&Object.keys(o[A]).forEach(function(M){delete o[A][M],r[M]&&n(M)})}function s(A){var M=!1;t.push(A),r[A]=!0;var _,w;for(_=0;_<a[A].length;_++)w=a[A][_],w===i?(f(i,t),M=!0):r[w]||(M=s(w));if(M)n(A);else for(_=0;_<a[A].length;_++){w=a[A][_];var g=o[w];g||(g={},o[w]=g),g[w]=!0}return t.pop(),M}function f(A,M){var _=[].concat(M).concat(A);E?E(s):e.push(_)}function c(A){for(var M=0;M<S.length;M++)M<A&&(S[M]=[]),S[M]=S[M].filter(function(_){return _>=A})}function p(A){c(A);for(var M=S,_=h(M),w=_.components.filter(function(z){return z.length>1}),g=1/0,u,v=0;v<w.length;v++)for(var y=0;y<w[v].length;y++)w[v][y]<g&&(g=w[v][y],u=v);var R=w[u];if(!R)return!1;var L=S.map(function(z,F){return R.indexOf(F)===-1?[]:z.filter(function(B){return R.indexOf(B)!==-1})});return{leastVertex:g,adjList:L}}i=0;for(var d=S.length;i<d;){var T=p(i);if(i=T.leastVertex,a=T.adjList,a){for(var l=0;l<a.length;l++)for(var m=0;m<a[l].length;m++){var x=a[l][m];r[+x]=!1,o[x]={}}s(i),i=i+1}else i=d}if(!E)return e}}}),v4=He({"node_modules/@plotly/d3-sankey-circular/dist/d3-sankey-circular.js"(Y,G){(function(h,b){typeof Y=="object"&&typeof G<"u"?b(Y,Zm(),mx(),QT(),h4()):b(h.d3=h.d3||{},h.d3,h.d3,h.d3,null)})(Y,function(h,b,S,E,e){e=e&&e.hasOwnProperty("default")?e.default:e;function t(Le){return Le.target.depth}function r(Le){return Le.depth}function o(Le,je){return je-1-Le.height}function a(Le,je){return Le.sourceLinks.length?Le.depth:je-1}function i(Le){return Le.targetLinks.length?Le.depth:Le.sourceLinks.length?b.min(Le.sourceLinks,t)-1:0}function n(Le){return function(){return Le}}var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Le){return typeof Le}:function(Le){return Le&&typeof Symbol=="function"&&Le.constructor===Symbol&&Le!==Symbol.prototype?"symbol":typeof Le};function f(Le,je){return p(Le.source,je.source)||Le.index-je.index}function c(Le,je){return p(Le.target,je.target)||Le.index-je.index}function p(Le,je){return Le.partOfCycle===je.partOfCycle?Le.y0-je.y0:Le.circularLinkType==="top"||je.circularLinkType==="bottom"?-1:1}function d(Le){return Le.value}function T(Le){return(Le.y0+Le.y1)/2}function l(Le){return T(Le.source)}function m(Le){return T(Le.target)}function x(Le){return Le.index}function A(Le){return Le.nodes}function M(Le){return Le.links}function _(Le,je){var et=Le.get(je);if(!et)throw new Error("missing: "+je);return et}function w(Le,je){return je(Le)}var g=25,u=10,v=.3;function y(){var Le=0,je=0,et=1,rt=1,Je=24,Ze,Ee=x,xe=a,he=A,De=M,tt=32,nt=2,$e,Et=null;function Ct(){var mt={nodes:he.apply(null,arguments),links:De.apply(null,arguments)};jt(mt),R(mt,Ee,Et),Wt(mt),Dr(mt),L(mt,Ee),hr(mt,tt,Ee),Ar(mt);for(var Fe=4,We=0;We<Fe;We++)re(mt,rt,Ee),ae(mt,rt,Ee),se(mt,je,rt,Ee),re(mt,rt,Ee),ae(mt,rt,Ee);return Ie(mt,je,rt),N(mt,nt,rt,Ee),mt}Ct.nodeId=function(mt){return arguments.length?(Ee=typeof mt=="function"?mt:n(mt),Ct):Ee},Ct.nodeAlign=function(mt){return arguments.length?(xe=typeof mt=="function"?mt:n(mt),Ct):xe},Ct.nodeWidth=function(mt){return arguments.length?(Je=+mt,Ct):Je},Ct.nodePadding=function(mt){return arguments.length?(Ze=+mt,Ct):Ze},Ct.nodes=function(mt){return arguments.length?(he=typeof mt=="function"?mt:n(mt),Ct):he},Ct.links=function(mt){return arguments.length?(De=typeof mt=="function"?mt:n(mt),Ct):De},Ct.size=function(mt){return arguments.length?(Le=je=0,et=+mt[0],rt=+mt[1],Ct):[et-Le,rt-je]},Ct.extent=function(mt){return arguments.length?(Le=+mt[0][0],et=+mt[1][0],je=+mt[0][1],rt=+mt[1][1],Ct):[[Le,je],[et,rt]]},Ct.iterations=function(mt){return arguments.length?(tt=+mt,Ct):tt},Ct.circularLinkGap=function(mt){return arguments.length?(nt=+mt,Ct):nt},Ct.nodePaddingRatio=function(mt){return arguments.length?($e=+mt,Ct):$e},Ct.sortNodes=function(mt){return arguments.length?(Et=mt,Ct):Et},Ct.update=function(mt){return L(mt,Ee),Ar(mt),mt.links.forEach(function(Fe){Fe.circular&&(Fe.circularLinkType=Fe.y0+Fe.y1<rt?"top":"bottom",Fe.source.circularLinkType=Fe.circularLinkType,Fe.target.circularLinkType=Fe.circularLinkType)}),re(mt,rt,Ee,!1),ae(mt,rt,Ee),N(mt,nt,rt,Ee),mt};function jt(mt){mt.nodes.forEach(function(We,Ae){We.index=Ae,We.sourceLinks=[],We.targetLinks=[]});var Fe=S.map(mt.nodes,Ee);return mt.links.forEach(function(We,Ae){We.index=Ae;var me=We.source,pe=We.target;(typeof me>"u"?"undefined":s(me))!=="object"&&(me=We.source=_(Fe,me)),(typeof pe>"u"?"undefined":s(pe))!=="object"&&(pe=We.target=_(Fe,pe)),me.sourceLinks.push(We),pe.targetLinks.push(We)}),mt}function Wt(mt){mt.nodes.forEach(function(Fe){Fe.partOfCycle=!1,Fe.value=Math.max(b.sum(Fe.sourceLinks,d),b.sum(Fe.targetLinks,d)),Fe.sourceLinks.forEach(function(We){We.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=We.circularLinkType)}),Fe.targetLinks.forEach(function(We){We.circular&&(Fe.partOfCycle=!0,Fe.circularLinkType=We.circularLinkType)})})}function dr(mt){var Fe=0,We=0,Ae=0,me=0,pe=b.max(mt.nodes,function(Te){return Te.column});return mt.links.forEach(function(Te){Te.circular&&(Te.circularLinkType=="top"?Fe=Fe+Te.width:We=We+Te.width,Te.target.column==0&&(me=me+Te.width),Te.source.column==pe&&(Ae=Ae+Te.width))}),Fe=Fe>0?Fe+g+u:Fe,We=We>0?We+g+u:We,Ae=Ae>0?Ae+g+u:Ae,me=me>0?me+g+u:me,{top:Fe,bottom:We,left:me,right:Ae}}function vr(mt,Fe){var We=b.max(mt.nodes,function(bt){return bt.column}),Ae=et-Le,me=rt-je,pe=Ae+Fe.right+Fe.left,Te=me+Fe.top+Fe.bottom,Ue=Ae/pe,Xe=me/Te;return Le=Le*Ue+Fe.left,et=Fe.right==0?et:et*Ue,je=je*Xe+Fe.top,rt=rt*Xe,mt.nodes.forEach(function(bt){bt.x0=Le+bt.column*((et-Le-Je)/We),bt.x1=bt.x0+Je}),Xe}function Dr(mt){var Fe,We,Ae;for(Fe=mt.nodes,We=[],Ae=0;Fe.length;++Ae,Fe=We,We=[])Fe.forEach(function(me){me.depth=Ae,me.sourceLinks.forEach(function(pe){We.indexOf(pe.target)<0&&!pe.circular&&We.push(pe.target)})});for(Fe=mt.nodes,We=[],Ae=0;Fe.length;++Ae,Fe=We,We=[])Fe.forEach(function(me){me.height=Ae,me.targetLinks.forEach(function(pe){We.indexOf(pe.source)<0&&!pe.circular&&We.push(pe.source)})});mt.nodes.forEach(function(me){me.column=Math.floor(xe.call(null,me,Ae))})}function hr(mt,Fe,We){var Ae=S.nest().key(function(bt){return bt.column}).sortKeys(b.ascending).entries(mt.nodes).map(function(bt){return bt.values});Te(We),Xe();for(var me=1,pe=Fe;pe>0;--pe)Ue(me*=.99,We),Xe();function Te(bt){if($e){var xt=1/0;Ae.forEach(function(ar){var tr=rt*$e/(ar.length+1);xt=tr<xt?tr:xt}),Ze=xt}var Mt=b.min(Ae,function(ar){return(rt-je-(ar.length-1)*Ze)/b.sum(ar,d)});Mt=Mt*v,mt.links.forEach(function(ar){ar.width=ar.value*Mt});var Nt=dr(mt),sr=vr(mt,Nt);Mt=Mt*sr,mt.links.forEach(function(ar){ar.width=ar.value*Mt}),Ae.forEach(function(ar){var tr=ar.length;ar.forEach(function(Tr,sa){Tr.depth==Ae.length-1&&tr==1||Tr.depth==0&&tr==1?(Tr.y0=rt/2-Tr.value*Mt,Tr.y1=Tr.y0+Tr.value*Mt):Tr.partOfCycle?B(Tr,bt)==0?(Tr.y0=rt/2+sa,Tr.y1=Tr.y0+Tr.value*Mt):Tr.circularLinkType=="top"?(Tr.y0=je+sa,Tr.y1=Tr.y0+Tr.value*Mt):(Tr.y0=rt-Tr.value*Mt-sa,Tr.y1=Tr.y0+Tr.value*Mt):Nt.top==0||Nt.bottom==0?(Tr.y0=(rt-je)/tr*sa,Tr.y1=Tr.y0+Tr.value*Mt):(Tr.y0=(rt-je)/2-tr/2+sa,Tr.y1=Tr.y0+Tr.value*Mt)})})}function Ue(bt,xt){var Mt=Ae.length;Ae.forEach(function(Nt){var sr=Nt.length,ar=Nt[0].depth;Nt.forEach(function(tr){var Tr;if((tr.sourceLinks.length||tr.targetLinks.length)&&!(tr.partOfCycle&&B(tr,xt)>0))if(ar==0&&sr==1)Tr=tr.y1-tr.y0,tr.y0=rt/2-Tr/2,tr.y1=rt/2+Tr/2;else if(ar==Mt-1&&sr==1)Tr=tr.y1-tr.y0,tr.y0=rt/2-Tr/2,tr.y1=rt/2+Tr/2;else{var sa=0,Ea=b.mean(tr.sourceLinks,m),ba=b.mean(tr.targetLinks,l);Ea&&ba?sa=(Ea+ba)/2:sa=Ea||ba;var Ia=(sa-T(tr))*bt;tr.y0+=Ia,tr.y1+=Ia}})})}function Xe(){Ae.forEach(function(bt){var xt,Mt,Nt=je,sr=bt.length,ar;for(bt.sort(p),ar=0;ar<sr;++ar)xt=bt[ar],Mt=Nt-xt.y0,Mt>0&&(xt.y0+=Mt,xt.y1+=Mt),Nt=xt.y1+Ze;if(Mt=Nt-Ze-rt,Mt>0)for(Nt=xt.y0-=Mt,xt.y1-=Mt,ar=sr-2;ar>=0;--ar)xt=bt[ar],Mt=xt.y1+Ze-Nt,Mt>0&&(xt.y0-=Mt,xt.y1-=Mt),Nt=xt.y0})}}function Ar(mt){mt.nodes.forEach(function(Fe){Fe.sourceLinks.sort(c),Fe.targetLinks.sort(f)}),mt.nodes.forEach(function(Fe){var We=Fe.y0,Ae=We,me=Fe.y1,pe=me;Fe.sourceLinks.forEach(function(Te){Te.circular?(Te.y0=me-Te.width/2,me=me-Te.width):(Te.y0=We+Te.width/2,We+=Te.width)}),Fe.targetLinks.forEach(function(Te){Te.circular?(Te.y1=pe-Te.width/2,pe=pe-Te.width):(Te.y1=Ae+Te.width/2,Ae+=Te.width)})})}return Ct}function R(Le,je,et){var rt=0;if(et===null){for(var Je=[],Ze=0;Ze<Le.links.length;Ze++){var Ee=Le.links[Ze],xe=Ee.source.index,he=Ee.target.index;Je[xe]||(Je[xe]=[]),Je[he]||(Je[he]=[]),Je[xe].indexOf(he)===-1&&Je[xe].push(he)}var De=e(Je);De.sort(function(Et,Ct){return Et.length-Ct.length});var tt={};for(Ze=0;Ze<De.length;Ze++){var nt=De[Ze],$e=nt.slice(-2);tt[$e[0]]||(tt[$e[0]]={}),tt[$e[0]][$e[1]]=!0}Le.links.forEach(function(Et){var Ct=Et.target.index,jt=Et.source.index;Ct===jt||tt[jt]&&tt[jt][Ct]?(Et.circular=!0,Et.circularLinkID=rt,rt=rt+1):Et.circular=!1})}else Le.links.forEach(function(Et){Et.source[et]<Et.target[et]?Et.circular=!1:(Et.circular=!0,Et.circularLinkID=rt,rt=rt+1)})}function L(Le,je){var et=0,rt=0;Le.links.forEach(function(Je){Je.circular&&(Je.source.circularLinkType||Je.target.circularLinkType?Je.circularLinkType=Je.source.circularLinkType?Je.source.circularLinkType:Je.target.circularLinkType:Je.circularLinkType=et<rt?"top":"bottom",Je.circularLinkType=="top"?et=et+1:rt=rt+1,Le.nodes.forEach(function(Ze){(w(Ze,je)==w(Je.source,je)||w(Ze,je)==w(Je.target,je))&&(Ze.circularLinkType=Je.circularLinkType)}))}),Le.links.forEach(function(Je){Je.circular&&(Je.source.circularLinkType==Je.target.circularLinkType&&(Je.circularLinkType=Je.source.circularLinkType),Me(Je,je)&&(Je.circularLinkType=Je.source.circularLinkType))})}function z(Le){var je=Math.abs(Le.y1-Le.y0),et=Math.abs(Le.target.x0-Le.source.x1);return Math.atan(et/je)}function F(Le,je){return Le.source.column<je.target.column?!1:!(Le.target.column>je.source.column)}function B(Le,je){var et=0;Le.sourceLinks.forEach(function(Je){et=Je.circular&&!Me(Je,je)?et+1:et});var rt=0;return Le.targetLinks.forEach(function(Je){rt=Je.circular&&!Me(Je,je)?rt+1:rt}),et+rt}function O(Le){var je=Le.source.sourceLinks,et=0;je.forEach(function(Ze){et=Ze.circular?et+1:et});var rt=Le.target.targetLinks,Je=0;return rt.forEach(function(Ze){Je=Ze.circular?Je+1:Je}),!(et>1||Je>1)}function I(Le,je,et){return Le.sort(X),Le.forEach(function(rt,Je){var Ze=0;if(Me(rt,et)&&O(rt))rt.circularPathData.verticalBuffer=Ze+rt.width/2;else{var Ee=0;for(Ee;Ee<Je;Ee++)if(F(Le[Je],Le[Ee])){var xe=Le[Ee].circularPathData.verticalBuffer+Le[Ee].width/2+je;Ze=xe>Ze?xe:Ze}rt.circularPathData.verticalBuffer=Ze+rt.width/2}}),Le}function N(Le,je,et,rt){var Je=5,Ze=b.min(Le.links,function(he){return he.source.y0});Le.links.forEach(function(he){he.circular&&(he.circularPathData={})});var Ee=Le.links.filter(function(he){return he.circularLinkType=="top"});I(Ee,je,rt);var xe=Le.links.filter(function(he){return he.circularLinkType=="bottom"});I(xe,je,rt),Le.links.forEach(function(he){if(he.circular){if(he.circularPathData.arcRadius=he.width+u,he.circularPathData.leftNodeBuffer=Je,he.circularPathData.rightNodeBuffer=Je,he.circularPathData.sourceWidth=he.source.x1-he.source.x0,he.circularPathData.sourceX=he.source.x0+he.circularPathData.sourceWidth,he.circularPathData.targetX=he.target.x0,he.circularPathData.sourceY=he.y0,he.circularPathData.targetY=he.y1,Me(he,rt)&&O(he))he.circularPathData.leftSmallArcRadius=u+he.width/2,he.circularPathData.leftLargeArcRadius=u+he.width/2,he.circularPathData.rightSmallArcRadius=u+he.width/2,he.circularPathData.rightLargeArcRadius=u+he.width/2,he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=he.source.y1+g+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=he.source.y0-g-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius);else{var De=he.source.column,tt=he.circularLinkType,nt=Le.links.filter(function(Ct){return Ct.source.column==De&&Ct.circularLinkType==tt});he.circularLinkType=="bottom"?nt.sort(ue):nt.sort(ee);var $e=0;nt.forEach(function(Ct,jt){Ct.circularLinkID==he.circularLinkID&&(he.circularPathData.leftSmallArcRadius=u+he.width/2+$e,he.circularPathData.leftLargeArcRadius=u+he.width/2+jt*je+$e),$e=$e+Ct.width}),De=he.target.column,nt=Le.links.filter(function(Ct){return Ct.target.column==De&&Ct.circularLinkType==tt}),he.circularLinkType=="bottom"?nt.sort(le):nt.sort(oe),$e=0,nt.forEach(function(Ct,jt){Ct.circularLinkID==he.circularLinkID&&(he.circularPathData.rightSmallArcRadius=u+he.width/2+$e,he.circularPathData.rightLargeArcRadius=u+he.width/2+jt*je+$e),$e=$e+Ct.width}),he.circularLinkType=="bottom"?(he.circularPathData.verticalFullExtent=Math.max(et,he.source.y1,he.target.y1)+g+he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent-he.circularPathData.rightLargeArcRadius):(he.circularPathData.verticalFullExtent=Ze-g-he.circularPathData.verticalBuffer,he.circularPathData.verticalLeftInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.leftLargeArcRadius,he.circularPathData.verticalRightInnerExtent=he.circularPathData.verticalFullExtent+he.circularPathData.rightLargeArcRadius)}he.circularPathData.leftInnerExtent=he.circularPathData.sourceX+he.circularPathData.leftNodeBuffer,he.circularPathData.rightInnerExtent=he.circularPathData.targetX-he.circularPathData.rightNodeBuffer,he.circularPathData.leftFullExtent=he.circularPathData.sourceX+he.circularPathData.leftLargeArcRadius+he.circularPathData.leftNodeBuffer,he.circularPathData.rightFullExtent=he.circularPathData.targetX-he.circularPathData.rightLargeArcRadius-he.circularPathData.rightNodeBuffer}if(he.circular)he.path=U(he);else{var Et=E.linkHorizontal().source(function(Ct){var jt=Ct.source.x0+(Ct.source.x1-Ct.source.x0),Wt=Ct.y0;return[jt,Wt]}).target(function(Ct){var jt=Ct.target.x0,Wt=Ct.y1;return[jt,Wt]});he.path=Et(he)}})}function U(Le){var je="";return Le.circularLinkType=="top"?je="M"+Le.circularPathData.sourceX+" "+Le.circularPathData.sourceY+" L"+Le.circularPathData.leftInnerExtent+" "+Le.circularPathData.sourceY+" A"+Le.circularPathData.leftLargeArcRadius+" "+Le.circularPathData.leftSmallArcRadius+" 0 0 0 "+Le.circularPathData.leftFullExtent+" "+(Le.circularPathData.sourceY-Le.circularPathData.leftSmallArcRadius)+" L"+Le.circularPathData.leftFullExtent+" "+Le.circularPathData.verticalLeftInnerExtent+" A"+Le.circularPathData.leftLargeArcRadius+" "+Le.circularPathData.leftLargeArcRadius+" 0 0 0 "+Le.circularPathData.leftInnerExtent+" "+Le.circularPathData.verticalFullExtent+" L"+Le.circularPathData.rightInnerExtent+" "+Le.circularPathData.verticalFullExtent+" A"+Le.circularPathData.rightLargeArcRadius+" "+Le.circularPathData.rightLargeArcRadius+" 0 0 0 "+Le.circularPathData.rightFullExtent+" "+Le.circularPathData.verticalRightInnerExtent+" L"+Le.circularPathData.rightFullExtent+" "+(Le.circularPathData.targetY-Le.circularPathData.rightSmallArcRadius)+" A"+Le.circularPathData.rightLargeArcRadius+" "+Le.circularPathData.rightSmallArcRadius+" 0 0 0 "+Le.circularPathData.rightInnerExtent+" "+Le.circularPathData.targetY+" L"+Le.circularPathData.targetX+" "+Le.circularPathData.targetY:je="M"+Le.circularPathData.sourceX+" "+Le.circularPathData.sourceY+" L"+Le.circularPathData.leftInnerExtent+" "+Le.circularPathData.sourceY+" A"+Le.circularPathData.leftLargeArcRadius+" "+Le.circularPathData.leftSmallArcRadius+" 0 0 1 "+Le.circularPathData.leftFullExtent+" "+(Le.circularPathData.sourceY+Le.circularPathData.leftSmallArcRadius)+" L"+Le.circularPathData.leftFullExtent+" "+Le.circularPathData.verticalLeftInnerExtent+" A"+Le.circularPathData.leftLargeArcRadius+" "+Le.circularPathData.leftLargeArcRadius+" 0 0 1 "+Le.circularPathData.leftInnerExtent+" "+Le.circularPathData.verticalFullExtent+" L"+Le.circularPathData.rightInnerExtent+" "+Le.circularPathData.verticalFullExtent+" A"+Le.circularPathData.rightLargeArcRadius+" "+Le.circularPathData.rightLargeArcRadius+" 0 0 1 "+Le.circularPathData.rightFullExtent+" "+Le.circularPathData.verticalRightInnerExtent+" L"+Le.circularPathData.rightFullExtent+" "+(Le.circularPathData.targetY+Le.circularPathData.rightSmallArcRadius)+" A"+Le.circularPathData.rightLargeArcRadius+" "+Le.circularPathData.rightSmallArcRadius+" 0 0 1 "+Le.circularPathData.rightInnerExtent+" "+Le.circularPathData.targetY+" L"+Le.circularPathData.targetX+" "+Le.circularPathData.targetY,je}function X(Le,je){return V(Le)==V(je)?Le.circularLinkType=="bottom"?ue(Le,je):ee(Le,je):V(je)-V(Le)}function ee(Le,je){return Le.y0-je.y0}function ue(Le,je){return je.y0-Le.y0}function oe(Le,je){return Le.y1-je.y1}function le(Le,je){return je.y1-Le.y1}function V(Le){return Le.target.column-Le.source.column}function J(Le){return Le.target.x0-Le.source.x1}function te(Le,je){var et=z(Le),rt=J(je)/Math.tan(et),Je=be(Le)=="up"?Le.y1+rt:Le.y1-rt;return Je}function Z(Le,je){var et=z(Le),rt=J(je)/Math.tan(et),Je=be(Le)=="up"?Le.y1-rt:Le.y1+rt;return Je}function se(Le,je,et,rt){Le.links.forEach(function(Je){if(!Je.circular&&Je.target.column-Je.source.column>1){var Ze=Je.source.column+1,Ee=Je.target.column-1,xe=1,he=Ee-Ze+1;for(xe=1;Ze<=Ee;Ze++,xe++)Le.nodes.forEach(function(De){if(De.column==Ze){var tt=xe/(he+1),nt=Math.pow(1-tt,3),$e=3*tt*Math.pow(1-tt,2),Et=3*Math.pow(tt,2)*(1-tt),Ct=Math.pow(tt,3),jt=nt*Je.y0+$e*Je.y0+Et*Je.y1+Ct*Je.y1,Wt=jt-Je.width/2,dr=jt+Je.width/2,vr;Wt>De.y0&&Wt<De.y1?(vr=De.y1-Wt+10,vr=De.circularLinkType=="bottom"?vr:-vr,De=q(De,vr,je,et),Le.nodes.forEach(function(Dr){w(Dr,rt)==w(De,rt)||Dr.column!=De.column||Q(De,Dr)&&q(Dr,vr,je,et)})):dr>De.y0&&dr<De.y1?(vr=dr-De.y0+10,De=q(De,vr,je,et),Le.nodes.forEach(function(Dr){w(Dr,rt)==w(De,rt)||Dr.column!=De.column||Dr.y0<De.y1&&Dr.y1>De.y1&&q(Dr,vr,je,et)})):Wt<De.y0&&dr>De.y1&&(vr=dr-De.y0+10,De=q(De,vr,je,et),Le.nodes.forEach(function(Dr){w(Dr,rt)==w(De,rt)||Dr.column!=De.column||Dr.y0<De.y1&&Dr.y1>De.y1&&q(Dr,vr,je,et)}))}})}})}function Q(Le,je){return Le.y0>je.y0&&Le.y0<je.y1||Le.y1>je.y0&&Le.y1<je.y1?!0:Le.y0<je.y0&&Le.y1>je.y1}function q(Le,je,et,rt){return Le.y0+je>=et&&Le.y1+je<=rt&&(Le.y0=Le.y0+je,Le.y1=Le.y1+je,Le.targetLinks.forEach(function(Je){Je.y1=Je.y1+je}),Le.sourceLinks.forEach(function(Je){Je.y0=Je.y0+je})),Le}function re(Le,je,et,rt){Le.nodes.forEach(function(Je){rt&&Je.y+(Je.y1-Je.y0)>je&&(Je.y=Je.y-(Je.y+(Je.y1-Je.y0)-je));var Ze=Le.links.filter(function(he){return w(he.source,et)==w(Je,et)}),Ee=Ze.length;Ee>1&&Ze.sort(function(he,De){if(!he.circular&&!De.circular){if(he.target.column==De.target.column)return he.y1-De.y1;if(fe(he,De)){if(he.target.column>De.target.column){var tt=Z(De,he);return he.y1-tt}if(De.target.column>he.target.column){var nt=Z(he,De);return nt-De.y1}}else return he.y1-De.y1}if(he.circular&&!De.circular)return he.circularLinkType=="top"?-1:1;if(De.circular&&!he.circular)return De.circularLinkType=="top"?1:-1;if(he.circular&&De.circular)return he.circularLinkType===De.circularLinkType&&he.circularLinkType=="top"?he.target.column===De.target.column?he.target.y1-De.target.y1:De.target.column-he.target.column:he.circularLinkType===De.circularLinkType&&he.circularLinkType=="bottom"?he.target.column===De.target.column?De.target.y1-he.target.y1:he.target.column-De.target.column:he.circularLinkType=="top"?-1:1});var xe=Je.y0;Ze.forEach(function(he){he.y0=xe+he.width/2,xe=xe+he.width}),Ze.forEach(function(he,De){if(he.circularLinkType=="bottom"){var tt=De+1,nt=0;for(tt;tt<Ee;tt++)nt=nt+Ze[tt].width;he.y0=Je.y1-nt-he.width/2}})})}function ae(Le,je,et){Le.nodes.forEach(function(rt){var Je=Le.links.filter(function(xe){return w(xe.target,et)==w(rt,et)}),Ze=Je.length;Ze>1&&Je.sort(function(xe,he){if(!xe.circular&&!he.circular){if(xe.source.column==he.source.column)return xe.y0-he.y0;if(fe(xe,he)){if(he.source.column<xe.source.column){var De=te(he,xe);return xe.y0-De}if(xe.source.column<he.source.column){var tt=te(xe,he);return tt-he.y0}}else return xe.y0-he.y0}if(xe.circular&&!he.circular)return xe.circularLinkType=="top"?-1:1;if(he.circular&&!xe.circular)return he.circularLinkType=="top"?1:-1;if(xe.circular&&he.circular)return xe.circularLinkType===he.circularLinkType&&xe.circularLinkType=="top"?xe.source.column===he.source.column?xe.source.y1-he.source.y1:xe.source.column-he.source.column:xe.circularLinkType===he.circularLinkType&&xe.circularLinkType=="bottom"?xe.source.column===he.source.column?xe.source.y1-he.source.y1:he.source.column-xe.source.column:xe.circularLinkType=="top"?-1:1});var Ee=rt.y0;Je.forEach(function(xe){xe.y1=Ee+xe.width/2,Ee=Ee+xe.width}),Je.forEach(function(xe,he){if(xe.circularLinkType=="bottom"){var De=he+1,tt=0;for(De;De<Ze;De++)tt=tt+Je[De].width;xe.y1=rt.y1-tt-xe.width/2}})})}function fe(Le,je){return be(Le)==be(je)}function be(Le){return Le.y0-Le.y1>0?"up":"down"}function Me(Le,je){return w(Le.source,je)==w(Le.target,je)}function Ie(Le,je,et){var rt=Le.nodes,Je=Le.links,Ze=!1,Ee=!1;if(Je.forEach(function($e){$e.circularLinkType=="top"?Ze=!0:$e.circularLinkType=="bottom"&&(Ee=!0)}),Ze==!1||Ee==!1){var xe=b.min(rt,function($e){return $e.y0}),he=b.max(rt,function($e){return $e.y1}),De=he-xe,tt=et-je,nt=tt/De;rt.forEach(function($e){var Et=($e.y1-$e.y0)*nt;$e.y0=($e.y0-xe)*nt,$e.y1=$e.y0+Et}),Je.forEach(function($e){$e.y0=($e.y0-xe)*nt,$e.y1=($e.y1-xe)*nt,$e.width=$e.width*nt})}}h.sankeyCircular=y,h.sankeyCenter=i,h.sankeyLeft=r,h.sankeyRight=o,h.sankeyJustify=a,Object.defineProperty(h,"__esModule",{value:!0})})}}),e5=He({"src/traces/sankey/constants.js"(Y,G){G.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),d4=He({"src/traces/sankey/render.js"(Y,G){var h=u4(),b=(Jp(),Os(lp)).interpolateNumber,S=_i(),E=f4(),e=v4(),t=e5(),r=Zf(),o=Di(),a=Io(),i=ea(),n=i.strTranslate,s=i.strRotate,f=Jv(),c=f.keyFun,p=f.repeat,d=f.unwrap,T=Zl(),l=ji(),m=Nf(),x=m.CAP_SHIFT,A=m.LINE_SPACING,M=3;function _(te,Z,se){var Q=d(Z),q=Q.trace,re=q.domain,ae=q.orientation==="h",fe=q.node.pad,be=q.node.thickness,Me={justify:E.sankeyJustify,left:E.sankeyLeft,right:E.sankeyRight,center:E.sankeyCenter}[q.node.align],Ie=te.width*(re.x[1]-re.x[0]),Le=te.height*(re.y[1]-re.y[0]),je=Q._nodes,et=Q._links,rt=Q.circular,Je;rt?Je=e.sankeyCircular().circularLinkGap(0):Je=E.sankey(),Je.iterations(t.sankeyIterations).size(ae?[Ie,Le]:[Le,Ie]).nodeWidth(be).nodePadding(fe).nodeId(function(Dr){return Dr.pointNumber}).nodeAlign(Me).nodes(je).links(et);var Ze=Je();Je.nodePadding()<fe&&i.warn("node.pad was reduced to ",Je.nodePadding()," to fit within the figure.");var Ee,xe,he;for(var De in Q._groupLookup){var tt=parseInt(Q._groupLookup[De]),nt;for(Ee=0;Ee<Ze.nodes.length;Ee++)if(Ze.nodes[Ee].pointNumber===tt){nt=Ze.nodes[Ee];break}if(nt){var $e={pointNumber:parseInt(De),x0:nt.x0,x1:nt.x1,y0:nt.y0,y1:nt.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};Ze.nodes.unshift($e),nt.childrenNodes.unshift($e)}}function Et(){for(Ee=0;Ee<Ze.nodes.length;Ee++){var Dr=Ze.nodes[Ee],hr={},Ar,mt;for(xe=0;xe<Dr.targetLinks.length;xe++)mt=Dr.targetLinks[xe],Ar=mt.source.pointNumber+":"+mt.target.pointNumber,hr.hasOwnProperty(Ar)||(hr[Ar]=[]),hr[Ar].push(mt);var Fe=Object.keys(hr);for(xe=0;xe<Fe.length;xe++){Ar=Fe[xe];var We=hr[Ar],Ae=0,me={};for(he=0;he<We.length;he++)mt=We[he],me[mt.label]||(me[mt.label]=0),me[mt.label]+=mt.value,Ae+=mt.value;for(he=0;he<We.length;he++)mt=We[he],mt.flow={value:Ae,labelConcentration:me[mt.label]/Ae,concentration:mt.value/Ae,links:We},mt.concentrationscale&&(mt.color=r(mt.concentrationscale(mt.flow.labelConcentration)))}var pe=0;for(xe=0;xe<Dr.sourceLinks.length;xe++)pe+=Dr.sourceLinks[xe].value;for(xe=0;xe<Dr.sourceLinks.length;xe++)mt=Dr.sourceLinks[xe],mt.concentrationOut=mt.value/pe;var Te=0;for(xe=0;xe<Dr.targetLinks.length;xe++)Te+=Dr.targetLinks[xe].value;for(xe=0;xe<Dr.targetLinks.length;xe++)mt=Dr.targetLinks[xe],mt.concenrationIn=mt.value/Te}}Et();function Ct(Dr){Dr.forEach(function(hr){var Ar,mt,Fe=0,We=hr.length,Ae;for(hr.sort(function(me,pe){return me.y0-pe.y0}),Ae=0;Ae<We;++Ae)Ar=hr[Ae],Ar.y0>=Fe||(mt=Fe-Ar.y0,mt>1e-6&&(Ar.y0+=mt,Ar.y1+=mt)),Fe=Ar.y1+fe})}function jt(Dr){var hr=Dr.map(function(pe,Te){return{x0:pe.x0,index:Te}}).sort(function(pe,Te){return pe.x0-Te.x0}),Ar=[],mt=-1,Fe,We=-1/0,Ae;for(Ee=0;Ee<hr.length;Ee++){var me=Dr[hr[Ee].index];me.x0>We+be&&(mt+=1,Fe=me.x0),We=me.x0,Ar[mt]||(Ar[mt]=[]),Ar[mt].push(me),Ae=Fe-me.x0,me.x0+=Ae,me.x1+=Ae}return Ar}if(q.node.x.length&&q.node.y.length){for(Ee=0;Ee<Math.min(q.node.x.length,q.node.y.length,Ze.nodes.length);Ee++)if(q.node.x[Ee]&&q.node.y[Ee]){var Wt=[q.node.x[Ee]*Ie,q.node.y[Ee]*Le];Ze.nodes[Ee].x0=Wt[0]-be/2,Ze.nodes[Ee].x1=Wt[0]+be/2;var dr=Ze.nodes[Ee].y1-Ze.nodes[Ee].y0;Ze.nodes[Ee].y0=Wt[1]-dr/2,Ze.nodes[Ee].y1=Wt[1]+dr/2}if(q.arrangement==="snap"){je=Ze.nodes;var vr=jt(je);Ct(vr)}Je.update(Ze)}return{circular:rt,key:se,trace:q,guid:i.randstr(),horizontal:ae,width:Ie,height:Le,nodePad:q.node.pad,nodeLineColor:q.node.line.color,nodeLineWidth:q.node.line.width,linkLineColor:q.link.line.color,linkLineWidth:q.link.line.width,linkArrowLength:q.link.arrowlen,valueFormat:q.valueformat,valueSuffix:q.valuesuffix,textFont:q.textfont,translateX:re.x[0]*te.width+te.margin.l,translateY:te.height-re.y[1]*te.height+te.margin.t,dragParallel:ae?Le:Ie,dragPerpendicular:ae?Ie:Le,arrangement:q.arrangement,sankey:Je,graph:Ze,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function w(te,Z,se){var Q=r(Z.color),q=r(Z.hovercolor),re=Z.source.label+"|"+Z.target.label,ae=re+"__"+se;return Z.trace=te.trace,Z.curveNumber=te.trace.index,{circular:te.circular,key:ae,traceId:te.key,pointNumber:Z.pointNumber,link:Z,tinyColorHue:o.tinyRGB(Q),tinyColorAlpha:Q.getAlpha(),tinyColorHoverHue:o.tinyRGB(q),tinyColorHoverAlpha:q.getAlpha(),linkPath:u,linkLineColor:te.linkLineColor,linkLineWidth:te.linkLineWidth,linkArrowLength:te.linkArrowLength,valueFormat:te.valueFormat,valueSuffix:te.valueSuffix,sankey:te.sankey,parent:te,interactionState:te.interactionState,flow:Z.flow}}function g(te,Z){var se="",Q=te.width/2,q=te.circularPathData,re=q.sourceX+q.verticalBuffer<q.targetX,ae=q.rightFullExtent-q.rightLargeArcRadius-Z<=q.leftFullExtent-Q;return Math.abs(q.rightFullExtent-q.leftFullExtent-Q)<Q,te.circularLinkType==="top"?(se="M "+(q.targetX-Z)+" "+(q.targetY+Q)+" L "+(q.rightInnerExtent-Z)+" "+(q.targetY+Q)+"A "+(q.rightLargeArcRadius+Q)+" "+(q.rightSmallArcRadius+Q)+" 0 0 1 "+(q.rightFullExtent-Q-Z)+" "+(q.targetY-q.rightSmallArcRadius)+"L "+(q.rightFullExtent-Q-Z)+" "+q.verticalRightInnerExtent,re&&ae?se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 1 "+(q.rightFullExtent+Q-Z-(q.rightLargeArcRadius-Q))+" "+(q.verticalRightInnerExtent-(q.rightLargeArcRadius+Q))+" L "+(q.rightFullExtent+Q-(q.rightLargeArcRadius-Q)-Z)+" "+(q.verticalRightInnerExtent-(q.rightLargeArcRadius+Q))+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftLargeArcRadius+Q)+" 0 0 1 "+(q.leftFullExtent+Q)+" "+q.verticalRightInnerExtent:re?se+=" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightLargeArcRadius-Q)+" 0 0 0 "+(q.rightFullExtent-Q-Z-(q.rightLargeArcRadius-Q))+" "+(q.verticalRightInnerExtent-(q.rightLargeArcRadius-Q))+" L "+(q.leftFullExtent+Q+(q.rightLargeArcRadius-Q))+" "+(q.verticalRightInnerExtent-(q.rightLargeArcRadius-Q))+" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftLargeArcRadius-Q)+" 0 0 0 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent:se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 1 "+(q.rightInnerExtent-Z)+" "+(q.verticalFullExtent-Q)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent-Q)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftLargeArcRadius+Q)+" 0 0 1 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent,se+=" L "+(q.leftFullExtent+Q)+" "+(q.sourceY-q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 1 "+q.leftInnerExtent+" "+(q.sourceY+Q)+" L "+q.sourceX+" "+(q.sourceY+Q)+" L "+q.sourceX+" "+(q.sourceY-Q)+" L "+q.leftInnerExtent+" "+(q.sourceY-Q)+" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftSmallArcRadius-Q)+" 0 0 0 "+(q.leftFullExtent-Q)+" "+(q.sourceY-q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Q)+" "+q.verticalLeftInnerExtent,re&&ae?se+=" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 0 "+(q.leftFullExtent-Q)+" "+(q.verticalFullExtent+Q)+"L"+(q.rightFullExtent+Q-Z)+" "+(q.verticalFullExtent+Q)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 0 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent:re?se+=" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 1 "+(q.leftFullExtent+Q)+" "+(q.verticalFullExtent-Q)+" L "+(q.rightFullExtent-Q-Z)+" "+(q.verticalFullExtent-Q)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 1 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent:se+=" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftLargeArcRadius-Q)+" 0 0 0 "+q.leftInnerExtent+" "+(q.verticalFullExtent+Q)+" L "+(q.rightInnerExtent-Z)+" "+(q.verticalFullExtent+Q)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightLargeArcRadius-Q)+" 0 0 0 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent,se+=" L "+(q.rightFullExtent+Q-Z)+" "+(q.targetY-q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 0 "+(q.rightInnerExtent-Z)+" "+(q.targetY-Q)+" L "+(q.targetX-Z)+" "+(q.targetY-Q)+(Z>0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(se="M "+(q.targetX-Z)+" "+(q.targetY-Q)+" L "+(q.rightInnerExtent-Z)+" "+(q.targetY-Q)+" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightSmallArcRadius+Q)+" 0 0 0 "+(q.rightFullExtent-Q-Z)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Q-Z)+" "+q.verticalRightInnerExtent,re&&ae?se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.rightInnerExtent-Q-Z)+" "+(q.verticalFullExtent+Q)+" L "+(q.rightFullExtent+Q-Z-(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent+Q)+" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent:re?se+=" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.rightFullExtent-Z-Q-(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent-Q)+" L "+(q.leftFullExtent+Q+(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent-Q)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent:se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.rightInnerExtent-Z)+" "+(q.verticalFullExtent+Q)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Q)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftLargeArcRadius+Q)+" 0 0 0 "+(q.leftFullExtent+Q)+" "+q.verticalLeftInnerExtent,se+=" L "+(q.leftFullExtent+Q)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Q)+" "+(q.leftSmallArcRadius+Q)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Q)+" L "+q.sourceX+" "+(q.sourceY-Q)+" L "+q.sourceX+" "+(q.sourceY+Q)+" L "+q.leftInnerExtent+" "+(q.sourceY+Q)+" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftSmallArcRadius-Q)+" 0 0 1 "+(q.leftFullExtent-Q)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Q)+" "+q.verticalLeftInnerExtent,re&&ae?se+=" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.leftFullExtent-Q-(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent-Q)+" L "+(q.rightFullExtent+Q-Z+(q.rightLargeArcRadius-Q))+" "+(q.verticalFullExtent-Q)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent:re?se+=" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.leftFullExtent+Q)+" "+(q.verticalFullExtent+Q)+" L "+(q.rightFullExtent-Z-Q)+" "+(q.verticalFullExtent+Q)+" A "+(q.rightLargeArcRadius+Q)+" "+(q.rightLargeArcRadius+Q)+" 0 0 0 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent:se+=" A "+(q.leftLargeArcRadius-Q)+" "+(q.leftLargeArcRadius-Q)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Q)+" L "+(q.rightInnerExtent-Z)+" "+(q.verticalFullExtent-Q)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightLargeArcRadius-Q)+" 0 0 1 "+(q.rightFullExtent+Q-Z)+" "+q.verticalRightInnerExtent,se+=" L "+(q.rightFullExtent+Q-Z)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Q)+" "+(q.rightSmallArcRadius-Q)+" 0 0 1 "+(q.rightInnerExtent-Z)+" "+(q.targetY+Q)+" L "+(q.targetX-Z)+" "+(q.targetY+Q)+(Z>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),se}function u(){var te=.5;function Z(se){var Q=se.linkArrowLength;if(se.link.circular)return g(se.link,Q);var q=Math.abs((se.link.target.x0-se.link.source.x1)/2);Q>q&&(Q=q);var re=se.link.source.x1,ae=se.link.target.x0-Q,fe=b(re,ae),be=fe(te),Me=fe(1-te),Ie=se.link.y0-se.link.width/2,Le=se.link.y0+se.link.width/2,je=se.link.y1-se.link.width/2,et=se.link.y1+se.link.width/2,rt="M"+re+","+Ie,Je="C"+be+","+Ie+" "+Me+","+je+" "+ae+","+je,Ze="C"+Me+","+et+" "+be+","+Le+" "+re+","+Le,Ee=Q>0?"L"+(ae+Q)+","+(je+se.link.width/2):"";return Ee+="L"+ae+","+et,rt+Je+Ee+Ze+"Z"}return Z}function v(te,Z){var se=r(Z.color),Q=t.nodePadAcross,q=te.nodePad/2;Z.dx=Z.x1-Z.x0,Z.dy=Z.y1-Z.y0;var re=Z.dx,ae=Math.max(.5,Z.dy),fe="node_"+Z.pointNumber;return Z.group&&(fe=i.randstr()),Z.trace=te.trace,Z.curveNumber=te.trace.index,{index:Z.pointNumber,key:fe,partOfGroup:Z.partOfGroup||!1,group:Z.group,traceId:te.key,trace:te.trace,node:Z,nodePad:te.nodePad,nodeLineColor:te.nodeLineColor,nodeLineWidth:te.nodeLineWidth,textFont:te.textFont,size:te.horizontal?te.height:te.width,visibleWidth:Math.ceil(re),visibleHeight:ae,zoneX:-Q,zoneY:-q,zoneWidth:re+2*Q,zoneHeight:ae+2*q,labelY:te.horizontal?Z.dy/2+1:Z.dx/2+1,left:Z.originalLayer===1,sizeAcross:te.width,forceLayouts:te.forceLayouts,horizontal:te.horizontal,darkBackground:se.getBrightness()<=128,tinyColorHue:o.tinyRGB(se),tinyColorAlpha:se.getAlpha(),valueFormat:te.valueFormat,valueSuffix:te.valueSuffix,sankey:te.sankey,graph:te.graph,arrangement:te.arrangement,uniqueNodeLabelPathId:[te.guid,te.key,fe].join("_"),interactionState:te.interactionState,figure:te}}function y(te){te.attr("transform",function(Z){return n(Z.node.x0.toFixed(3),Z.node.y0.toFixed(3))})}function R(te){te.call(y)}function L(te,Z){te.call(R),Z.attr("d",u())}function z(te){te.attr("width",function(Z){return Z.node.x1-Z.node.x0}).attr("height",function(Z){return Z.visibleHeight})}function F(te){return te.link.width>1||te.linkLineWidth>0}function B(te){var Z=n(te.translateX,te.translateY);return Z+(te.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(te,Z,se){te.on(".basic",null).on("mouseover.basic",function(Q){!Q.interactionState.dragInProgress&&!Q.partOfGroup&&(se.hover(this,Q,Z),Q.interactionState.hovered=[this,Q])}).on("mousemove.basic",function(Q){!Q.interactionState.dragInProgress&&!Q.partOfGroup&&(se.follow(this,Q),Q.interactionState.hovered=[this,Q])}).on("mouseout.basic",function(Q){!Q.interactionState.dragInProgress&&!Q.partOfGroup&&(se.unhover(this,Q,Z),Q.interactionState.hovered=!1)}).on("click.basic",function(Q){Q.interactionState.hovered&&(se.unhover(this,Q,Z),Q.interactionState.hovered=!1),!Q.interactionState.dragInProgress&&!Q.partOfGroup&&se.select(this,Q,Z)})}function I(te,Z,se,Q){var q=S.behavior.drag().origin(function(re){return{x:re.node.x0+re.visibleWidth/2,y:re.node.y0+re.visibleHeight/2}}).on("dragstart",function(re){if(re.arrangement!=="fixed"&&(i.ensureSingle(Q._fullLayout._infolayer,"g","dragcover",function(fe){Q._fullLayout._dragCover=fe}),i.raiseToTop(this),re.interactionState.dragInProgress=re.node,oe(re.node),re.interactionState.hovered&&(se.nodeEvents.unhover.apply(0,re.interactionState.hovered),re.interactionState.hovered=!1),re.arrangement==="snap")){var ae=re.traceId+"|"+re.key;re.forceLayouts[ae]?re.forceLayouts[ae].alpha(1):N(te,ae,re),U(te,Z,re,ae,Q)}}).on("drag",function(re){if(re.arrangement!=="fixed"){var ae=S.event.x,fe=S.event.y;re.arrangement==="snap"?(re.node.x0=ae-re.visibleWidth/2,re.node.x1=ae+re.visibleWidth/2,re.node.y0=fe-re.visibleHeight/2,re.node.y1=fe+re.visibleHeight/2):(re.arrangement==="freeform"&&(re.node.x0=ae-re.visibleWidth/2,re.node.x1=ae+re.visibleWidth/2),fe=Math.max(0,Math.min(re.size-re.visibleHeight/2,fe)),re.node.y0=fe-re.visibleHeight/2,re.node.y1=fe+re.visibleHeight/2),oe(re.node),re.arrangement!=="snap"&&(re.sankey.update(re.graph),L(te.filter(le(re)),Z))}}).on("dragend",function(re){if(re.arrangement!=="fixed"){re.interactionState.dragInProgress=!1;for(var ae=0;ae<re.node.childrenNodes.length;ae++)re.node.childrenNodes[ae].x=re.node.x,re.node.childrenNodes[ae].y=re.node.y;re.arrangement!=="snap"&&ee(re,Q)}});te.on(".drag",null).call(q)}function N(te,Z,se,Q){V(se.graph.nodes);var q=se.graph.nodes.filter(function(re){return re.originalX===se.node.originalX}).filter(function(re){return!re.partOfGroup});se.forceLayouts[Z]=h.forceSimulation(q).alphaDecay(0).force("collide",h.forceCollide().radius(function(re){return re.dy/2+se.nodePad/2}).strength(1).iterations(t.forceIterations)).force("constrain",X(te,Z,q,se)).stop()}function U(te,Z,se,Q,q){window.requestAnimationFrame(function re(){var ae;for(ae=0;ae<t.forceTicksPerFrame;ae++)se.forceLayouts[Q].tick();var fe=se.graph.nodes;if(J(fe),se.sankey.update(se.graph),L(te.filter(le(se)),Z),se.forceLayouts[Q].alpha()>0)window.requestAnimationFrame(re);else{var be=se.node.originalX;se.node.x0=be-se.visibleWidth/2,se.node.x1=be+se.visibleWidth/2,ee(se,q)}})}function X(te,Z,se,Q){return function(){for(var re=0,ae=0;ae<se.length;ae++){var fe=se[ae];fe===Q.interactionState.dragInProgress?(fe.x=fe.lastDraggedX,fe.y=fe.lastDraggedY):(fe.vx=(fe.originalX-fe.x)/t.forceTicksPerFrame,fe.y=Math.min(Q.size-fe.dy/2,Math.max(fe.dy/2,fe.y))),re=Math.max(re,Math.abs(fe.vx),Math.abs(fe.vy))}!Q.interactionState.dragInProgress&&re<.1&&Q.forceLayouts[Z].alpha()>0&&Q.forceLayouts[Z].alpha(0)}}function ee(te,Z){for(var se=[],Q=[],q=0;q<te.graph.nodes.length;q++){var re=(te.graph.nodes[q].x0+te.graph.nodes[q].x1)/2,ae=(te.graph.nodes[q].y0+te.graph.nodes[q].y1)/2;se.push(re/te.figure.width),Q.push(ae/te.figure.height)}l.call("_guiRestyle",Z,{"node.x":[se],"node.y":[Q]},te.trace.index).then(function(){Z._fullLayout._dragCover&&Z._fullLayout._dragCover.remove()})}function ue(te){var Z=[],se;for(se=0;se<te.length;se++)te[se].originalX=(te[se].x0+te[se].x1)/2,te[se].originalY=(te[se].y0+te[se].y1)/2,Z.indexOf(te[se].originalX)===-1&&Z.push(te[se].originalX);for(Z.sort(function(Q,q){return Q-q}),se=0;se<te.length;se++)te[se].originalLayerIndex=Z.indexOf(te[se].originalX),te[se].originalLayer=te[se].originalLayerIndex/(Z.length-1)}function oe(te){te.lastDraggedX=te.x0+te.dx/2,te.lastDraggedY=te.y0+te.dy/2}function le(te){return function(Z){return Z.node.originalX===te.node.originalX}}function V(te){for(var Z=0;Z<te.length;Z++)te[Z].y=(te[Z].y0+te[Z].y1)/2,te[Z].x=(te[Z].x0+te[Z].x1)/2}function J(te){for(var Z=0;Z<te.length;Z++)te[Z].y0=te[Z].y-te[Z].dy/2,te[Z].y1=te[Z].y0+te[Z].dy,te[Z].x0=te[Z].x-te[Z].dx/2,te[Z].x1=te[Z].x0+te[Z].dx}G.exports=function(te,Z,se,Q,q){var re=te._context.staticPlot,ae=!1;i.ensureSingle(te._fullLayout._infolayer,"g","first-render",function(){ae=!0});var fe=te._fullLayout._dragCover,be=se.filter(function(Ze){return d(Ze).trace.visible}).map(_.bind(null,Q)),Me=Z.selectAll("."+t.cn.sankey).data(be,c);Me.exit().remove(),Me.enter().append("g").classed(t.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",re?"none":"auto").attr("transform",B),Me.each(function(Ze,Ee){te._fullData[Ee]._sankey=Ze;var xe="bgsankey-"+Ze.trace.uid+"-"+Ee;i.ensureSingle(te._fullLayout._draggers,"rect",xe),te._fullData[Ee]._bgRect=S.select("."+xe),te._fullData[Ee]._bgRect.style("pointer-events",re?"none":"all").attr("width",Ze.width).attr("height",Ze.height).attr("x",Ze.translateX).attr("y",Ze.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),Me.transition().ease(t.ease).duration(t.duration).attr("transform",B);var Ie=Me.selectAll("."+t.cn.sankeyLinks).data(p,c);Ie.enter().append("g").classed(t.cn.sankeyLinks,!0).style("fill","none");var Le=Ie.selectAll("."+t.cn.sankeyLink).data(function(Ze){var Ee=Ze.graph.links;return Ee.filter(function(xe){return xe.value}).map(w.bind(null,Ze))},c);Le.enter().append("path").classed(t.cn.sankeyLink,!0).call(O,Me,q.linkEvents),Le.style("stroke",function(Ze){return F(Ze)?o.tinyRGB(r(Ze.linkLineColor)):Ze.tinyColorHue}).style("stroke-opacity",function(Ze){return F(Ze)?o.opacity(Ze.linkLineColor):Ze.tinyColorAlpha}).style("fill",function(Ze){return Ze.tinyColorHue}).style("fill-opacity",function(Ze){return Ze.tinyColorAlpha}).style("stroke-width",function(Ze){return F(Ze)?Ze.linkLineWidth:1}).attr("d",u()),Le.style("opacity",function(){return te._context.staticPlot||ae||fe?1:0}).transition().ease(t.ease).duration(t.duration).style("opacity",1),Le.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var je=Me.selectAll("."+t.cn.sankeyNodeSet).data(p,c);je.enter().append("g").classed(t.cn.sankeyNodeSet,!0),je.style("cursor",function(Ze){switch(Ze.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var et=je.selectAll("."+t.cn.sankeyNode).data(function(Ze){var Ee=Ze.graph.nodes;return ue(Ee),Ee.map(v.bind(null,Ze))},c);et.enter().append("g").classed(t.cn.sankeyNode,!0).call(y).style("opacity",function(Ze){return(te._context.staticPlot||ae)&&!Ze.partOfGroup?1:0}),et.call(O,Me,q.nodeEvents).call(I,Le,q,te),et.transition().ease(t.ease).duration(t.duration).call(y).style("opacity",function(Ze){return Ze.partOfGroup?0:1}),et.exit().transition().ease(t.ease).duration(t.duration).style("opacity",0).remove();var rt=et.selectAll("."+t.cn.nodeRect).data(p);rt.enter().append("rect").classed(t.cn.nodeRect,!0).call(z),rt.style("stroke-width",function(Ze){return Ze.nodeLineWidth}).style("stroke",function(Ze){return o.tinyRGB(r(Ze.nodeLineColor))}).style("stroke-opacity",function(Ze){return o.opacity(Ze.nodeLineColor)}).style("fill",function(Ze){return Ze.tinyColorHue}).style("fill-opacity",function(Ze){return Ze.tinyColorAlpha}),rt.transition().ease(t.ease).duration(t.duration).call(z);var Je=et.selectAll("."+t.cn.nodeLabel).data(p);Je.enter().append("text").classed(t.cn.nodeLabel,!0).style("cursor","default"),Je.attr("data-notex",1).text(function(Ze){return Ze.node.label}).each(function(Ze){var Ee=S.select(this);a.font(Ee,Ze.textFont),T.convertToTspans(Ee,te)}).attr("text-anchor",function(Ze){return Ze.horizontal&&Ze.left?"end":"start"}).attr("transform",function(Ze){var Ee=S.select(this),xe=T.lineCount(Ee),he=Ze.textFont.size*((xe-1)*A-x),De=Ze.nodeLineWidth/2+M,tt=((Ze.horizontal?Ze.visibleHeight:Ze.visibleWidth)-he)/2;Ze.horizontal&&(Ze.left?De=-De:De+=Ze.visibleWidth);var nt=Ze.horizontal?"":"scale(-1,1)"+s(90);return n(Ze.horizontal?De:tt,Ze.horizontal?tt:De)+nt}),Je.transition().ease(t.ease).duration(t.duration)}}}),t5=He({"src/traces/sankey/plot.js"(Y,G){var h=_i(),b=ea(),S=b.numberFormat,E=d4(),e=kc(),t=Di(),r=e5().cn,o=b._;function a(x){return x!==""}function i(x,A){return x.filter(function(M){return M.key===A.traceId})}function n(x,A){h.select(x).select("path").style("fill-opacity",A),h.select(x).select("rect").style("fill-opacity",A)}function s(x){h.select(x).select("text.name").style("fill","black")}function f(x){return function(A){return x.node.sourceLinks.indexOf(A.link)!==-1||x.node.targetLinks.indexOf(A.link)!==-1}}function c(x){return function(A){return A.node.sourceLinks.indexOf(x.link)!==-1||A.node.targetLinks.indexOf(x.link)!==-1}}function p(x,A,M){A&&M&&i(M,A).selectAll("."+r.sankeyLink).filter(f(A)).call(T.bind(0,A,M,!1))}function d(x,A,M){A&&M&&i(M,A).selectAll("."+r.sankeyLink).filter(f(A)).call(l.bind(0,A,M,!1))}function T(x,A,M,_){_.style("fill",function(w){if(!w.link.concentrationscale)return w.tinyColorHoverHue}).style("fill-opacity",function(w){if(!w.link.concentrationscale)return w.tinyColorHoverAlpha}),_.each(function(w){var g=w.link.label;g!==""&&i(A,x).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===g}).style("fill",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverHue}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.tinyColorHoverAlpha})}),M&&i(A,x).selectAll("."+r.sankeyNode).filter(c(x)).call(p)}function l(x,A,M,_){_.style("fill",function(w){return w.tinyColorHue}).style("fill-opacity",function(w){return w.tinyColorAlpha}),_.each(function(w){var g=w.link.label;g!==""&&i(A,x).selectAll("."+r.sankeyLink).filter(function(u){return u.link.label===g}).style("fill",function(u){return u.tinyColorHue}).style("fill-opacity",function(u){return u.tinyColorAlpha})}),M&&i(A,x).selectAll(r.sankeyNode).filter(c(x)).call(d)}function m(x,A){var M=x.hoverlabel||{},_=b.nestedProperty(M,A).get();return Array.isArray(_)?!1:_}G.exports=function(A,M){for(var _=A._fullLayout,w=_._paper,g=_._size,u=0;u<A._fullData.length;u++)if(A._fullData[u].visible&&A._fullData[u].type===r.sankey&&!A._fullData[u]._viewInitial){var v=A._fullData[u].node;A._fullData[u]._viewInitial={node:{groups:v.groups.slice(),x:v.x.slice(),y:v.y.slice()}}}var y=function(oe,le){var V=le.link;V.originalEvent=h.event,A._hoverdata=[V],e.click(A,{target:!0})},R=function(oe,le,V){A._fullLayout.hovermode!==!1&&(h.select(oe).call(T.bind(0,le,V,!0)),le.link.trace.link.hoverinfo!=="skip"&&(le.link.fullData=le.link.trace,A.emit("plotly_hover",{event:h.event,points:[le.link]})))},L=o(A,"source:")+" ",z=o(A,"target:")+" ",F=o(A,"concentration:")+" ",B=o(A,"incoming flow count:")+" ",O=o(A,"outgoing flow count:")+" ",I=function(oe,le){if(A._fullLayout.hovermode===!1)return;var V=le.link.trace.link;if(V.hoverinfo==="none"||V.hoverinfo==="skip")return;var J=[];function te(fe){var be,Me;fe.circular?(be=(fe.circularPathData.leftInnerExtent+fe.circularPathData.rightInnerExtent)/2,Me=fe.circularPathData.verticalFullExtent):(be=(fe.source.x1+fe.target.x0)/2,Me=(fe.y0+fe.y1)/2);var Ie=[be,Me];return fe.trace.orientation==="v"&&Ie.reverse(),Ie[0]+=le.parent.translateX,Ie[1]+=le.parent.translateY,Ie}for(var Z=0,se=0;se<le.flow.links.length;se++){var Q=le.flow.links[se];if(!(A._fullLayout.hovermode==="closest"&&le.link.pointNumber!==Q.pointNumber)){le.link.pointNumber===Q.pointNumber&&(Z=se),Q.fullData=Q.trace,V=le.link.trace.link;var q=te(Q),re={valueLabel:S(le.valueFormat)(Q.value)+le.valueSuffix};J.push({x:q[0],y:q[1],name:re.valueLabel,text:[Q.label||"",L+Q.source.label,z+Q.target.label,Q.concentrationscale?F+S("%0.2f")(Q.flow.labelConcentration):""].filter(a).join("<br>"),color:m(V,"bgcolor")||t.addOpacity(Q.color,1),borderColor:m(V,"bordercolor"),fontFamily:m(V,"font.family"),fontSize:m(V,"font.size"),fontColor:m(V,"font.color"),fontWeight:m(V,"font.weight"),fontStyle:m(V,"font.style"),fontVariant:m(V,"font.variant"),fontTextcase:m(V,"font.textcase"),fontLineposition:m(V,"font.lineposition"),fontShadow:m(V,"font.shadow"),nameLength:m(V,"namelength"),textAlign:m(V,"align"),idealAlign:h.event.x<q[0]?"right":"left",hovertemplate:V.hovertemplate,hovertemplateLabels:re,eventData:[Q]})}}var ae=e.loneHover(J,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:A,anchorIndex:Z});ae.each(function(){var fe=this;le.link.concentrationscale||n(fe,.65),s(fe)})},N=function(oe,le,V){A._fullLayout.hovermode!==!1&&(h.select(oe).call(l.bind(0,le,V,!0)),le.link.trace.link.hoverinfo!=="skip"&&(le.link.fullData=le.link.trace,A.emit("plotly_unhover",{event:h.event,points:[le.link]})),e.loneUnhover(_._hoverlayer.node()))},U=function(oe,le,V){var J=le.node;J.originalEvent=h.event,A._hoverdata=[J],h.select(oe).call(d,le,V),e.click(A,{target:!0})},X=function(oe,le,V){A._fullLayout.hovermode!==!1&&(h.select(oe).call(p,le,V),le.node.trace.node.hoverinfo!=="skip"&&(le.node.fullData=le.node.trace,A.emit("plotly_hover",{event:h.event,points:[le.node]})))},ee=function(oe,le){if(A._fullLayout.hovermode!==!1){var V=le.node.trace.node;if(!(V.hoverinfo==="none"||V.hoverinfo==="skip")){var J=h.select(oe).select("."+r.nodeRect),te=A._fullLayout._paperdiv.node().getBoundingClientRect(),Z=J.node().getBoundingClientRect(),se=Z.left-2-te.left,Q=Z.right+2-te.left,q=Z.top+Z.height/4-te.top,re={valueLabel:S(le.valueFormat)(le.node.value)+le.valueSuffix};le.node.fullData=le.node.trace,A._fullLayout._calcInverseTransform(A);var ae=A._fullLayout._invScaleX,fe=A._fullLayout._invScaleY,be=e.loneHover({x0:ae*se,x1:ae*Q,y:fe*q,name:S(le.valueFormat)(le.node.value)+le.valueSuffix,text:[le.node.label,B+le.node.targetLinks.length,O+le.node.sourceLinks.length].filter(a).join("<br>"),color:m(V,"bgcolor")||le.tinyColorHue,borderColor:m(V,"bordercolor"),fontFamily:m(V,"font.family"),fontSize:m(V,"font.size"),fontColor:m(V,"font.color"),fontWeight:m(V,"font.weight"),fontStyle:m(V,"font.style"),fontVariant:m(V,"font.variant"),fontTextcase:m(V,"font.textcase"),fontLineposition:m(V,"font.lineposition"),fontShadow:m(V,"font.shadow"),nameLength:m(V,"namelength"),textAlign:m(V,"align"),idealAlign:"left",hovertemplate:V.hovertemplate,hovertemplateLabels:re,eventData:[le.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:A});n(be,.85),s(be)}}},ue=function(oe,le,V){A._fullLayout.hovermode!==!1&&(h.select(oe).call(d,le,V),le.node.trace.node.hoverinfo!=="skip"&&(le.node.fullData=le.node.trace,A.emit("plotly_unhover",{event:h.event,points:[le.node]})),e.loneUnhover(_._hoverlayer.node()))};E(A,w,M,{width:g.w,height:g.h,margin:{t:g.t,r:g.r,b:g.b,l:g.l}},{linkEvents:{hover:R,follow:I,unhover:N,select:y},nodeEvents:{hover:X,follow:ee,unhover:ue,select:U}})}}}),p4=He({"src/traces/sankey/base_plot.js"(Y){var G=Zu().overrideAll,h=ih().getModuleCalcData,b=t5(),S=Gd(),E=Av(),e=kh(),t=Xc().prepSelect,r=ea(),o=ji(),a="sankey";Y.name=a,Y.baseLayoutAttrOverrides=G({hoverlabel:S.hoverlabel},"plot","nested"),Y.plot=function(n){var s=h(n.calcdata,a)[0];b(n,s),Y.updateFx(n)},Y.clean=function(n,s,f,c){var p=c._has&&c._has(a),d=s._has&&s._has(a);p&&!d&&(c._paperdiv.selectAll(".sankey").remove(),c._paperdiv.selectAll(".bgsankey").remove())},Y.updateFx=function(n){for(var s=0;s<n._fullData.length;s++)i(n,s)};function i(n,s){var f=n._fullData[s],c=n._fullLayout,p=c.dragmode,d=c.dragmode==="pan"?"move":"crosshair",T=f._bgRect;if(T&&!(p==="pan"||p==="zoom")){E(T,d);var l={_id:"x",c2p:r.identity,_offset:f._sankey.translateX,_length:f._sankey.width},m={_id:"y",c2p:r.identity,_offset:f._sankey.translateY,_length:f._sankey.height},x={gd:n,element:T.node(),plotinfo:{id:s,xaxis:l,yaxis:m,fillRangeItems:r.noop},subplot:s,xaxes:[l],yaxes:[m],doneFnCompleted:function(A){var M=n._fullData[s],_,w=M.node.groups.slice(),g=[];function u(L){for(var z=M._sankey.graph.nodes,F=0;F<z.length;F++)if(z[F].pointNumber===L)return z[F]}for(var v=0;v<A.length;v++){var y=u(A[v].pointNumber);if(y)if(y.group){for(var R=0;R<y.childrenNodes.length;R++)g.push(y.childrenNodes[R].pointNumber);w[y.pointNumber-M.node._count]=!1}else g.push(y.pointNumber)}_=w.filter(Boolean).concat([g]),o.call("_guiRestyle",n,{"node.groups":[_]},s)}};x.prepFn=function(A,M,_){t(A,M,_,x,p)},e.init(x)}}}}),g4=He({"src/traces/sankey/select.js"(Y,G){G.exports=function(b,S){for(var E=b.cd,e=[],t=E[0].trace,r=t._sankey.graph.nodes,o=0;o<r.length;o++){var a=r[o];if(!a.partOfGroup){var i=[(a.x0+a.x1)/2,(a.y0+a.y1)/2];t.orientation==="v"&&i.reverse(),S&&S.contains(i,!1,o,b)&&e.push({pointNumber:a.pointNumber})}}return e}}}),m4=He({"src/traces/sankey/index.js"(Y,G){G.exports={attributes:$T(),supplyDefaults:n4(),calc:i4(),plot:t5(),moduleType:"trace",name:"sankey",basePlotModule:p4(),selectPoints:g4(),categories:["noOpacity"],meta:{}}}}),y4=He({"lib/sankey.js"(Y,G){G.exports=m4()}}),_4=He({"src/traces/indicator/base_plot.js"(Y){var G=nc();Y.name="indicator",Y.plot=function(h,b,S,E){G.plotBasePlot(Y.name,h,b,S,E)},Y.clean=function(h,b,S,E){G.cleanBasePlot(Y.name,h,b,S,E)}}}),r5=He({"src/traces/indicator/attributes.js"(Y,G){var h=Po().extendFlat,b=Po().extendDeep,S=Zu().overrideAll,E=Ru(),e=Mf(),t=ic().attributes,r=oh(),o=xl().templatedArray,a=tg(),i=Ec().descriptionOnlyNumbers,n=E({editType:"plot",colorEditType:"plot"}),s={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:e.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},f={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},c=o("step",b({},s,{range:f}));G.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:t({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:h({},n,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:i("value")},font:h({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:i("value")},increasing:{symbol:{valType:"string",dflt:a.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:a.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:a.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:h({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:b({},s,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:e.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:S({range:f,visible:h({},r.visible,{dflt:!0}),tickmode:r.minor.tickmode,nticks:r.nticks,tick0:r.tick0,dtick:r.dtick,tickvals:r.tickvals,ticktext:r.ticktext,ticks:h({},r.ticks,{dflt:"outside"}),ticklen:r.ticklen,tickwidth:r.tickwidth,tickcolor:r.tickcolor,ticklabelstep:r.ticklabelstep,showticklabels:r.showticklabels,labelalias:r.labelalias,tickfont:E({}),tickangle:r.tickangle,tickformat:r.tickformat,tickformatstops:r.tickformatstops,tickprefix:r.tickprefix,showtickprefix:r.showtickprefix,ticksuffix:r.ticksuffix,showticksuffix:r.showticksuffix,separatethousands:r.separatethousands,exponentformat:r.exponentformat,minexponent:r.minexponent,showexponent:r.showexponent,editType:"plot"},"plot"),steps:c,threshold:{line:{color:h({},s.line.color,{}),width:h({},s.line.width,{dflt:1}),editType:"plot"},thickness:h({},s.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}}),a5=He({"src/traces/indicator/constants.js"(Y,G){G.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}}),x4=He({"src/traces/indicator/defaults.js"(Y,G){var h=ea(),b=r5(),S=ic().defaults,E=xl(),e=_h(),t=a5(),r=Rp(),o=V0(),a=Yd(),i=Kd();function n(f,c,p,d){function T(I,N){return h.coerce(f,c,b,I,N)}S(c,d,T),T("mode"),c._hasNumber=c.mode.indexOf("number")!==-1,c._hasDelta=c.mode.indexOf("delta")!==-1,c._hasGauge=c.mode.indexOf("gauge")!==-1;var l=T("value");c._range=[0,typeof l=="number"?1.5*l:1];var m=new Array(2),x;if(c._hasNumber){T("number.valueformat");var A=h.extendFlat({},d.font);A.size=void 0,h.coerceFont(T,"number.font",A),c.number.font.size===void 0&&(c.number.font.size=t.defaultNumberFontSize,m[0]=!0),T("number.prefix"),T("number.suffix"),x=c.number.font.size}var M;if(c._hasDelta){var _=h.extendFlat({},d.font);_.size=void 0,h.coerceFont(T,"delta.font",_),c.delta.font.size===void 0&&(c.delta.font.size=(c._hasNumber?.5:1)*(x||t.defaultNumberFontSize),m[1]=!0),T("delta.reference",c.value),T("delta.relative"),T("delta.valueformat",c.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),M=c.delta.font.size}c._scaleNumbers=(!c._hasNumber||m[0])&&(!c._hasDelta||m[1])||!1;var w=h.extendFlat({},d.font);w.size=.25*(x||M||t.defaultNumberFontSize),h.coerceFont(T,"title.font",w),T("title.text");var g,u,v,y;function R(I,N){return h.coerce(g,u,b.gauge,I,N)}function L(I,N){return h.coerce(v,y,b.gauge.axis,I,N)}if(c._hasGauge){g=f.gauge,g||(g={}),u=E.newContainer(c,"gauge"),R("shape");var z=c._isBullet=c.gauge.shape==="bullet";z||T("title.align","center");var F=c._isAngular=c.gauge.shape==="angular";F||T("align","center"),R("bgcolor",d.paper_bgcolor),R("borderwidth"),R("bordercolor"),R("bar.color"),R("bar.line.color"),R("bar.line.width");var B=t.valueThickness*(c.gauge.shape==="bullet"?.5:1);R("bar.thickness",B),e(g,u,{name:"steps",handleItemDefaults:s}),R("threshold.value"),R("threshold.thickness"),R("threshold.line.width"),R("threshold.line.color"),v={},g&&(v=g.axis||{}),y=E.newContainer(u,"axis"),L("visible"),c._range=L("range",c._range);var O={font:d.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};r(v,y,L,"linear"),i(v,y,L,"linear",O),a(v,y,L,"linear",O),o(v,y,L,O)}else T("title.align","center"),T("align","center"),c._isAngular=c._isBullet=!1;c._length=null}function s(f,c){function p(d,T){return h.coerce(f,c,b.gauge.steps,d,T)}p("color"),p("line.color"),p("line.width"),p("range"),p("thickness")}G.exports={supplyDefaults:n}}}),b4=He({"src/traces/indicator/calc.js"(Y,G){function h(b,S){var E=[],e=S.value;typeof S._lastValue!="number"&&(S._lastValue=S.value);var t=S._lastValue,r=t;return S._hasDelta&&typeof S.delta.reference=="number"&&(r=S.delta.reference),E[0]={y:e,lastY:t,delta:e-r,relativeDelta:(e-r)/r},E}G.exports={calc:h}}}),w4=He({"src/traces/indicator/plot.js"(Y,G){var h=_i(),b=(Jp(),Os(lp)).interpolate,S=(Jp(),Os(lp)).interpolateNumber,E=ea(),e=E.strScale,t=E.strTranslate,r=E.rad2deg,o=Nf().MID_SHIFT,a=Io(),i=a5(),n=Zl(),s=Ao(),f=fm(),c=x1(),p=oh(),d=Di(),T={left:"start",center:"middle",right:"end"},l={left:0,center:.5,right:1},m=/[yzafpnµmkMGTPEZY]/;function x(z){return z&&z.duration>0}G.exports=function(F,B,O,I){var N=F._fullLayout,U;x(O)&&I&&(U=I()),E.makeTraceGroups(N._indicatorlayer,B,"trace").each(function(X){var ee=X[0],ue=ee.trace,oe=h.select(this),le=ue._hasGauge,V=ue._isAngular,J=ue._isBullet,te=ue.domain,Z={w:N._size.w*(te.x[1]-te.x[0]),h:N._size.h*(te.y[1]-te.y[0]),l:N._size.l+N._size.w*te.x[0],r:N._size.r+N._size.w*(1-te.x[1]),t:N._size.t+N._size.h*(1-te.y[1]),b:N._size.b+N._size.h*te.y[0]},se=Z.l+Z.w/2,Q=Z.t+Z.h/2,q=Math.min(Z.w/2,Z.h),re=i.innerRadius*q,ae,fe,be,Me=ue.align||"center";if(fe=Q,!le)ae=Z.l+l[Me]*Z.w,be=function(he){return v(he,Z.w,Z.h)};else if(V&&(ae=se,fe=Q+q/2,be=function(he){return y(he,.9*re)}),J){var Ie=i.bulletPadding,Le=1-i.bulletNumberDomainSize+Ie;ae=Z.l+(Le+(1-Le)*l[Me])*Z.w,be=function(he){return v(he,(i.bulletNumberDomainSize-Ie)*Z.w,Z.h)}}_(F,oe,X,{numbersX:ae,numbersY:fe,numbersScaler:be,transitionOpts:O,onComplete:U});var je,et;le&&(je={range:ue.gauge.axis.range,color:ue.gauge.bgcolor,line:{color:ue.gauge.bordercolor,width:0},thickness:1},et={range:ue.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ue.gauge.bordercolor,width:ue.gauge.borderwidth},thickness:1});var rt=oe.selectAll("g.angular").data(V?X:[]);rt.exit().remove();var Je=oe.selectAll("g.angularaxis").data(V?X:[]);Je.exit().remove(),V&&M(F,oe,X,{radius:q,innerRadius:re,gauge:rt,layer:Je,size:Z,gaugeBg:je,gaugeOutline:et,transitionOpts:O,onComplete:U});var Ze=oe.selectAll("g.bullet").data(J?X:[]);Ze.exit().remove();var Ee=oe.selectAll("g.bulletaxis").data(J?X:[]);Ee.exit().remove(),J&&A(F,oe,X,{gauge:Ze,layer:Ee,size:Z,gaugeBg:je,gaugeOutline:et,transitionOpts:O,onComplete:U});var xe=oe.selectAll("text.title").data(X);xe.exit().remove(),xe.enter().append("text").classed("title",!0),xe.attr("text-anchor",function(){return J?T.right:T[ue.title.align]}).text(ue.title.text).call(a.font,ue.title.font).call(n.convertToTspans,F),xe.attr("transform",function(){var he=Z.l+Z.w*l[ue.title.align],De,tt=i.titlePadding,nt=a.bBox(xe.node());if(le){if(V)if(ue.gauge.axis.visible){var $e=a.bBox(Je.node());De=$e.top-tt-nt.bottom}else De=Z.t+Z.h/2-q/2-nt.bottom-tt;J&&(De=fe-(nt.top+nt.bottom)/2,he=Z.l-i.bulletPadding*Z.w)}else De=ue._numbersTop-tt-nt.bottom;return t(he,De)})})};function A(z,F,B,O){var I=B[0].trace,N=O.gauge,U=O.layer,X=O.gaugeBg,ee=O.gaugeOutline,ue=O.size,oe=I.domain,le=O.transitionOpts,V=O.onComplete,J,te,Z,se,Q;N.enter().append("g").classed("bullet",!0),N.attr("transform",t(ue.l,ue.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var q=ue.h,re=I.gauge.bar.thickness*q,ae=oe.x[0],fe=oe.x[0]+(oe.x[1]-oe.x[0])*(I._hasNumber||I._hasDelta?1-i.bulletNumberDomainSize:1);J=u(z,I.gauge.axis),J._id="xbulletaxis",J.domain=[ae,fe],J.setScale(),te=s.calcTicks(J),Z=s.makeTransTickFn(J),se=s.getTickSigns(J)[2],Q=ue.t+ue.h,J.visible&&(s.drawTicks(z,J,{vals:J.ticks==="inside"?s.clipEnds(J,te):te,layer:U,path:s.makeTickPath(J,Q,se),transFn:Z}),s.drawLabels(z,J,{vals:te,layer:U,transFn:Z,labelFns:s.makeLabelFns(J,Q)}));function be(Je){Je.attr("width",function(Ze){return Math.max(0,J.c2p(Ze.range[1])-J.c2p(Ze.range[0]))}).attr("x",function(Ze){return J.c2p(Ze.range[0])}).attr("y",function(Ze){return .5*(1-Ze.thickness)*q}).attr("height",function(Ze){return Ze.thickness*q})}var Me=[X].concat(I.gauge.steps),Ie=N.selectAll("g.bg-bullet").data(Me);Ie.enter().append("g").classed("bg-bullet",!0).append("rect"),Ie.select("rect").call(be).call(w),Ie.exit().remove();var Le=N.selectAll("g.value-bullet").data([I.gauge.bar]);Le.enter().append("g").classed("value-bullet",!0).append("rect"),Le.select("rect").attr("height",re).attr("y",(q-re)/2).call(w),x(le)?Le.select("rect").transition().duration(le.duration).ease(le.easing).each("end",function(){V&&V()}).each("interrupt",function(){V&&V()}).attr("width",Math.max(0,J.c2p(Math.min(I.gauge.axis.range[1],B[0].y)))):Le.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,J.c2p(Math.min(I.gauge.axis.range[1],B[0].y))):0),Le.exit().remove();var je=B.filter(function(){return I.gauge.threshold.value||I.gauge.threshold.value===0}),et=N.selectAll("g.threshold-bullet").data(je);et.enter().append("g").classed("threshold-bullet",!0).append("line"),et.select("line").attr("x1",J.c2p(I.gauge.threshold.value)).attr("x2",J.c2p(I.gauge.threshold.value)).attr("y1",(1-I.gauge.threshold.thickness)/2*q).attr("y2",(1-(1-I.gauge.threshold.thickness)/2)*q).call(d.stroke,I.gauge.threshold.line.color).style("stroke-width",I.gauge.threshold.line.width),et.exit().remove();var rt=N.selectAll("g.gauge-outline").data([ee]);rt.enter().append("g").classed("gauge-outline",!0).append("rect"),rt.select("rect").call(be).call(w),rt.exit().remove()}function M(z,F,B,O){var I=B[0].trace,N=O.size,U=O.radius,X=O.innerRadius,ee=O.gaugeBg,ue=O.gaugeOutline,oe=[N.l+N.w/2,N.t+N.h/2+U/2],le=O.gauge,V=O.layer,J=O.transitionOpts,te=O.onComplete,Z=Math.PI/2;function se(Et){var Ct=I.gauge.axis.range[0],jt=I.gauge.axis.range[1],Wt=(Et-Ct)/(jt-Ct)*Math.PI-Z;return Wt<-Z?-Z:Wt>Z?Z:Wt}function Q(Et){return h.svg.arc().innerRadius((X+U)/2-Et/2*(U-X)).outerRadius((X+U)/2+Et/2*(U-X)).startAngle(-Z)}function q(Et){Et.attr("d",function(Ct){return Q(Ct.thickness).startAngle(se(Ct.range[0])).endAngle(se(Ct.range[1]))()})}var re,ae,fe,be;le.enter().append("g").classed("angular",!0),le.attr("transform",t(oe[0],oe[1])),V.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),V.selectAll("g.xangularaxistick,path,text").remove(),re=u(z,I.gauge.axis),re.type="linear",re.range=I.gauge.axis.range,re._id="xangularaxis",re.ticklabeloverflow="allow",re.setScale();var Me=function(Et){return(re.range[0]-Et.x)/(re.range[1]-re.range[0])*Math.PI+Math.PI},Ie={},Le=s.makeLabelFns(re,0),je=Le.labelStandoff;Ie.xFn=function(Et){var Ct=Me(Et);return Math.cos(Ct)*je},Ie.yFn=function(Et){var Ct=Me(Et),jt=Math.sin(Ct)>0?.2:1;return-Math.sin(Ct)*(je+Et.fontSize*jt)+Math.abs(Math.cos(Ct))*(Et.fontSize*o)},Ie.anchorFn=function(Et){var Ct=Me(Et),jt=Math.cos(Ct);return Math.abs(jt)<.1?"middle":jt>0?"start":"end"},Ie.heightFn=function(Et,Ct,jt){var Wt=Me(Et);return-.5*(1+Math.sin(Wt))*jt};var et=function(Et){return t(oe[0]+U*Math.cos(Et),oe[1]-U*Math.sin(Et))};fe=function(Et){return et(Me(Et))};var rt=function(Et){var Ct=Me(Et);return et(Ct)+"rotate("+-r(Ct)+")"};if(ae=s.calcTicks(re),be=s.getTickSigns(re)[2],re.visible){be=re.ticks==="inside"?-1:1;var Je=(re.linewidth||1)/2;s.drawTicks(z,re,{vals:ae,layer:V,path:"M"+be*Je+",0h"+be*re.ticklen,transFn:rt}),s.drawLabels(z,re,{vals:ae,layer:V,transFn:fe,labelFns:Ie})}var Ze=[ee].concat(I.gauge.steps),Ee=le.selectAll("g.bg-arc").data(Ze);Ee.enter().append("g").classed("bg-arc",!0).append("path"),Ee.select("path").call(q).call(w),Ee.exit().remove();var xe=Q(I.gauge.bar.thickness),he=le.selectAll("g.value-arc").data([I.gauge.bar]);he.enter().append("g").classed("value-arc",!0).append("path");var De=he.select("path");x(J)?(De.transition().duration(J.duration).ease(J.easing).each("end",function(){te&&te()}).each("interrupt",function(){te&&te()}).attrTween("d",g(xe,se(B[0].lastY),se(B[0].y))),I._lastValue=B[0].y):De.attr("d",typeof B[0].y=="number"?xe.endAngle(se(B[0].y)):"M0,0Z"),De.call(w),he.exit().remove(),Ze=[];var tt=I.gauge.threshold.value;(tt||tt===0)&&Ze.push({range:[tt,tt],color:I.gauge.threshold.color,line:{color:I.gauge.threshold.line.color,width:I.gauge.threshold.line.width},thickness:I.gauge.threshold.thickness});var nt=le.selectAll("g.threshold-arc").data(Ze);nt.enter().append("g").classed("threshold-arc",!0).append("path"),nt.select("path").call(q).call(w),nt.exit().remove();var $e=le.selectAll("g.gauge-outline").data([ue]);$e.enter().append("g").classed("gauge-outline",!0).append("path"),$e.select("path").call(q).call(w),$e.exit().remove()}function _(z,F,B,O){var I=B[0].trace,N=O.numbersX,U=O.numbersY,X=I.align||"center",ee=T[X],ue=O.transitionOpts,oe=O.onComplete,le=E.ensureSingle(F,"g","numbers"),V,J,te,Z=[];I._hasNumber&&Z.push("number"),I._hasDelta&&(Z.push("delta"),I.delta.position==="left"&&Z.reverse());var se=le.selectAll("text").data(Z);se.enter().append("text"),se.attr("text-anchor",function(){return ee}).attr("class",function(et){return et}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),se.exit().remove();function Q(et,rt,Je,Ze){if(et.match("s")&&Je>=0!=Ze>=0&&!rt(Je).slice(-1).match(m)&&!rt(Ze).slice(-1).match(m)){var Ee=et.slice().replace("s","f").replace(/\d+/,function(he){return parseInt(he)-1}),xe=u(z,{tickformat:Ee});return function(he){return Math.abs(he)<1?s.tickText(xe,he).text:rt(he)}}else return rt}function q(){var et=u(z,{tickformat:I.number.valueformat},I._range);et.setScale(),s.prepTicks(et);var rt=function(he){return s.tickText(et,he).text},Je=I.number.suffix,Ze=I.number.prefix,Ee=le.select("text.number");function xe(){var he=typeof B[0].y=="number"?Ze+rt(B[0].y)+Je:"-";Ee.text(he).call(a.font,I.number.font).call(n.convertToTspans,z)}return x(ue)?Ee.transition().duration(ue.duration).ease(ue.easing).each("end",function(){xe(),oe&&oe()}).each("interrupt",function(){xe(),oe&&oe()}).attrTween("text",function(){var he=h.select(this),De=S(B[0].lastY,B[0].y);I._lastValue=B[0].y;var tt=Q(I.number.valueformat,rt,B[0].lastY,B[0].y);return function(nt){he.text(Ze+tt(De(nt))+Je)}}):xe(),V=R(Ze+rt(B[0].y)+Je,I.number.font,ee,z),Ee}function re(){var et=u(z,{tickformat:I.delta.valueformat},I._range);et.setScale(),s.prepTicks(et);var rt=function(nt){return s.tickText(et,nt).text},Je=I.delta.suffix,Ze=I.delta.prefix,Ee=function(nt){var $e=I.delta.relative?nt.relativeDelta:nt.delta;return $e},xe=function(nt,$e){return nt===0||typeof nt!="number"||isNaN(nt)?"-":(nt>0?I.delta.increasing.symbol:I.delta.decreasing.symbol)+Ze+$e(nt)+Je},he=function(nt){return nt.delta>=0?I.delta.increasing.color:I.delta.decreasing.color};I._deltaLastValue===void 0&&(I._deltaLastValue=Ee(B[0]));var De=le.select("text.delta");De.call(a.font,I.delta.font).call(d.fill,he({delta:I._deltaLastValue}));function tt(){De.text(xe(Ee(B[0]),rt)).call(d.fill,he(B[0])).call(n.convertToTspans,z)}return x(ue)?De.transition().duration(ue.duration).ease(ue.easing).tween("text",function(){var nt=h.select(this),$e=Ee(B[0]),Et=I._deltaLastValue,Ct=Q(I.delta.valueformat,rt,Et,$e),jt=S(Et,$e);return I._deltaLastValue=$e,function(Wt){nt.text(xe(jt(Wt),Ct)),nt.call(d.fill,he({delta:jt(Wt)}))}}).each("end",function(){tt(),oe&&oe()}).each("interrupt",function(){tt(),oe&&oe()}):tt(),J=R(xe(Ee(B[0]),rt),I.delta.font,ee,z),De}var ae=I.mode+I.align,fe;if(I._hasDelta&&(fe=re(),ae+=I.delta.position+I.delta.font.size+I.delta.font.family+I.delta.valueformat,ae+=I.delta.increasing.symbol+I.delta.decreasing.symbol,te=J),I._hasNumber&&(q(),ae+=I.number.font.size+I.number.font.family+I.number.valueformat+I.number.suffix+I.number.prefix,te=V),I._hasDelta&&I._hasNumber){var be=[(V.left+V.right)/2,(V.top+V.bottom)/2],Me=[(J.left+J.right)/2,(J.top+J.bottom)/2],Ie,Le,je=.75*I.delta.font.size;I.delta.position==="left"&&(Ie=L(I,"deltaPos",0,-1*(V.width*l[I.align]+J.width*(1-l[I.align])+je),ae,Math.min),Le=be[1]-Me[1],te={width:V.width+J.width+je,height:Math.max(V.height,J.height),left:J.left+Ie,right:V.right,top:Math.min(V.top,J.top+Le),bottom:Math.max(V.bottom,J.bottom+Le)}),I.delta.position==="right"&&(Ie=L(I,"deltaPos",0,V.width*(1-l[I.align])+J.width*l[I.align]+je,ae,Math.max),Le=be[1]-Me[1],te={width:V.width+J.width+je,height:Math.max(V.height,J.height),left:V.left,right:J.right+Ie,top:Math.min(V.top,J.top+Le),bottom:Math.max(V.bottom,J.bottom+Le)}),I.delta.position==="bottom"&&(Ie=null,Le=J.height,te={width:Math.max(V.width,J.width),height:V.height+J.height,left:Math.min(V.left,J.left),right:Math.max(V.right,J.right),top:V.bottom-V.height,bottom:V.bottom+J.height}),I.delta.position==="top"&&(Ie=null,Le=V.top,te={width:Math.max(V.width,J.width),height:V.height+J.height,left:Math.min(V.left,J.left),right:Math.max(V.right,J.right),top:V.bottom-V.height-J.height,bottom:V.bottom}),fe.attr({dx:Ie,dy:Le})}(I._hasNumber||I._hasDelta)&&le.attr("transform",function(){var et=O.numbersScaler(te);ae+=et[2];var rt=L(I,"numbersScale",1,et[0],ae,Math.min),Je;I._scaleNumbers||(rt=1),I._isAngular?Je=U-rt*te.bottom:Je=U-rt*(te.top+te.bottom)/2,I._numbersTop=rt*te.top+Je;var Ze=te[X];X==="center"&&(Ze=(te.left+te.right)/2);var Ee=N-rt*Ze;return Ee=L(I,"numbersTranslate",0,Ee,ae,Math.max),t(Ee,Je)+e(rt)})}function w(z){z.each(function(F){d.stroke(h.select(this),F.line.color)}).each(function(F){d.fill(h.select(this),F.color)}).style("stroke-width",function(F){return F.line.width})}function g(z,F,B){return function(){var O=b(F,B);return function(I){return z.endAngle(O(I))()}}}function u(z,F,B){var O=z._fullLayout,I=E.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},F),N={type:"linear",_id:"x"+F._id},U={letter:"x",font:O.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function X(ee,ue){return E.coerce(I,N,p,ee,ue)}return f(I,N,X,U,O),c(I,N,X,U),N}function v(z,F,B){var O=Math.min(F/z.width,B/z.height);return[O,z,F+"x"+B]}function y(z,F){var B=Math.sqrt(z.width/2*(z.width/2)+z.height*z.height),O=F/B;return[O,z,F]}function R(z,F,B,O){var I=document.createElementNS("http://www.w3.org/2000/svg","text"),N=h.select(I);return N.text(z).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",z).call(n.convertToTspans,O).call(a.font,F),a.bBox(N.node())}function L(z,F,B,O,I,N){var U="_cache"+F;z[U]&&z[U].key===I||(z[U]={key:I,value:B});var X=E.aggNums(N,null,[z[U].value,O],2);return z[U].value=X,X}}}),T4=He({"src/traces/indicator/index.js"(Y,G){G.exports={moduleType:"trace",name:"indicator",basePlotModule:_4(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:r5(),supplyDefaults:x4().supplyDefaults,calc:b4().calc,plot:w4(),meta:{}}}}),A4=He({"lib/indicator.js"(Y,G){G.exports=T4()}}),n5=He({"src/traces/table/attributes.js"(Y,G){var h=Fp(),b=Po().extendFlat,S=Zu().overrideAll,E=Ru(),e=ic().attributes,t=Ec().descriptionOnlyNumbers;G.exports=S({domain:e({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:b({},h.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},E({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:t("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:b({},h.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},E({arrayOk:!0}))}},"calc","from-root")}}),S4=He({"src/traces/table/defaults.js"(Y,G){var h=ea(),b=n5(),S=ic().defaults;function E(e,t){for(var r=e.columnorder||[],o=e.header.values.length,a=r.slice(0,o),i=a.slice().sort(function(f,c){return f-c}),n=a.map(function(f){return i.indexOf(f)}),s=n.length;s<o;s++)n.push(s);t("columnorder",n)}G.exports=function(t,r,o,a){function i(n,s){return h.coerce(t,r,b,n,s)}S(r,a,i),i("columnwidth"),i("header.values"),i("header.format"),i("header.align"),i("header.prefix"),i("header.suffix"),i("header.height"),i("header.line.width"),i("header.line.color"),i("header.fill.color"),h.coerceFont(i,"header.font",a.font),E(r,i),i("cells.values"),i("cells.format"),i("cells.align"),i("cells.prefix"),i("cells.suffix"),i("cells.height"),i("cells.line.width"),i("cells.line.color"),i("cells.fill.color"),h.coerceFont(i,"cells.font",a.font),r._length=null}}}),M4=He({"src/traces/table/calc.js"(Y,G){var h=Jv().wrap;G.exports=function(){return h({})}}}),i5=He({"src/traces/table/constants.js"(Y,G){G.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}}}),E4=He({"src/traces/table/data_preparation_helper.js"(Y,G){var h=i5(),b=Po().extendFlat,S=Ui(),E=Sh().isTypedArray,e=Sh().isArrayOrTypedArray;G.exports=function(p,d){var T=o(d.cells.values),l=function(ee){return ee.slice(d.header.values.length,ee.length)},m=o(d.header.values);m.length&&!m[0].length&&(m[0]=[""],m=o(m));var x=m.concat(l(T).map(function(){return a((m[0]||[""]).length)})),A=d.domain,M=Math.floor(p._fullLayout._size.w*(A.x[1]-A.x[0])),_=Math.floor(p._fullLayout._size.h*(A.y[1]-A.y[0])),w=d.header.values.length?x[0].map(function(){return d.header.height}):[h.emptyHeaderHeight],g=T.length?T[0].map(function(){return d.cells.height}):[],u=w.reduce(r,0),v=_-u,y=v+h.uplift,R=s(g,y),L=s(w,u),z=n(L,[]),F=n(R,z),B={},O=d._fullInput.columnorder;e(O)&&(O=Array.from(O)),O=O.concat(l(T.map(function(ee,ue){return ue})));var I=x.map(function(ee,ue){var oe=e(d.columnwidth)?d.columnwidth[Math.min(ue,d.columnwidth.length-1)]:d.columnwidth;return S(oe)?Number(oe):1}),N=I.reduce(r,0);I=I.map(function(ee){return ee/N*M});var U=Math.max(t(d.header.line.width),t(d.cells.line.width)),X={key:d.uid+p._context.staticPlot,translateX:A.x[0]*p._fullLayout._size.w,translateY:p._fullLayout._size.h*(1-A.y[1]),size:p._fullLayout._size,width:M,maxLineWidth:U,height:_,columnOrder:O,groupHeight:_,rowBlocks:F,headerRowBlocks:z,scrollY:0,cells:b({},d.cells,{values:T}),headerCells:b({},d.header,{values:x}),gdColumns:x.map(function(ee){return ee[0]}),gdColumnsOriginalOrder:x.map(function(ee){return ee[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:x.map(function(ee,ue){var oe=B[ee];B[ee]=(oe||0)+1;var le=ee+"__"+B[ee];return{key:le,label:ee,specIndex:ue,xIndex:O[ue],xScale:i,x:void 0,calcdata:void 0,columnWidth:I[ue]}})};return X.columns.forEach(function(ee){ee.calcdata=X,ee.x=i(ee)}),X};function t(c){if(e(c)){for(var p=0,d=0;d<c.length;d++)p=Math.max(p,t(c[d]));return p}return c}function r(c,p){return c+p}function o(c){var p=c.slice(),d=1/0,T=0,l;for(l=0;l<p.length;l++)E(p[l])?p[l]=Array.from(p[l]):e(p[l])||(p[l]=[p[l]]),d=Math.min(d,p[l].length),T=Math.max(T,p[l].length);if(d!==T)for(l=0;l<p.length;l++){var m=T-p[l].length;m&&(p[l]=p[l].concat(a(m)))}return p}function a(c){for(var p=new Array(c),d=0;d<c;d++)p[d]="";return p}function i(c){return c.calcdata.columns.reduce(function(p,d){return d.xIndex<c.xIndex?p+d.columnWidth:p},0)}function n(c,p){var d=Object.keys(c);return d.map(function(T){return b({},c[T],{auxiliaryBlocks:p})})}function s(c,p){for(var d={},T,l=0,m=0,x=f(),A=0,M=0,_=0;_<c.length;_++)T=c[_],x.rows.push({rowIndex:_,rowHeight:T}),m+=T,(m>=p||_===c.length-1)&&(d[l]=x,x.key=M++,x.firstRowIndex=A,x.lastRowIndex=_,x=f(),l+=m,A=_+1,m=0);return d}function f(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),k4=He({"src/traces/table/data_split_helpers.js"(Y){var G=Po().extendFlat;Y.splitToPanels=function(b){var S=[0,0],E=G({},b,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:b.calcdata.headerCells.values[b.specIndex],rowBlocks:b.calcdata.headerRowBlocks,calcdata:G({},b.calcdata,{cells:b.calcdata.headerCells})}),e=G({},b,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks}),t=G({},b,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks});return[e,t,E]},Y.splitToCells=function(b){var S=h(b);return(b.values||[]).slice(S[0],S[1]).map(function(E,e){var t=typeof E=="string"&&E.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:e+t,key:S[0]+e,column:b,calcdata:b.calcdata,page:b.page,rowBlocks:b.rowBlocks,value:E}})};function h(b){var S=b.rowBlocks[b.page],E=S?S.rows[0].rowIndex:0,e=S?E+S.rows.length:0;return[E,e]}}}),o5=He({"src/traces/table/plot.js"(Y,G){var h=i5(),b=_i(),S=ea(),E=S.numberFormat,e=Jv(),t=Io(),r=Zl(),o=ea().raiseToTop,a=ea().strTranslate,i=ea().cancelTransition,n=E4(),s=k4(),f=Di();G.exports=function(ae,fe){var be=!ae._context.staticPlot,Me=ae._fullLayout._paper.selectAll("."+h.cn.table).data(fe.map(function($e){var Et=e.unwrap($e),Ct=Et.trace;return n(ae,Ct)}),e.keyFun);Me.exit().remove(),Me.enter().append("g").classed(h.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),Me.attr("width",function($e){return $e.width+$e.size.l+$e.size.r}).attr("height",function($e){return $e.height+$e.size.t+$e.size.b}).attr("transform",function($e){return a($e.translateX,$e.translateY)});var Ie=Me.selectAll("."+h.cn.tableControlView).data(e.repeat,e.keyFun),Le=Ie.enter().append("g").classed(h.cn.tableControlView,!0).style("box-sizing","content-box");if(be){var je="onwheel"in document?"wheel":"mousewheel";Le.on("mousemove",function($e){Ie.filter(function(Et){return $e===Et}).call(l,ae)}).on(je,function($e){if(!$e.scrollbarState.wheeling){$e.scrollbarState.wheeling=!0;var Et=$e.scrollY+b.event.deltaY,Ct=ee(ae,Ie,null,Et)($e);Ct||(b.event.stopPropagation(),b.event.preventDefault()),$e.scrollbarState.wheeling=!1}}).call(l,ae,!0)}Ie.attr("transform",function($e){return a($e.size.l,$e.size.t)});var et=Ie.selectAll("."+h.cn.scrollBackground).data(e.repeat,e.keyFun);et.enter().append("rect").classed(h.cn.scrollBackground,!0).attr("fill","none"),et.attr("width",function($e){return $e.width}).attr("height",function($e){return $e.height}),Ie.each(function($e){t.setClipUrl(b.select(this),p(ae,$e),ae)});var rt=Ie.selectAll("."+h.cn.yColumn).data(function($e){return $e.columns},e.keyFun);rt.enter().append("g").classed(h.cn.yColumn,!0),rt.exit().remove(),rt.attr("transform",function($e){return a($e.x,0)}),be&&rt.call(b.behavior.drag().origin(function($e){var Et=b.select(this);return B(Et,$e,-h.uplift),o(this),$e.calcdata.columnDragInProgress=!0,l(Ie.filter(function(Ct){return $e.calcdata.key===Ct.key}),ae),$e}).on("drag",function($e){var Et=b.select(this),Ct=function(dr){return($e===dr?b.event.x:dr.x)+dr.columnWidth/2};$e.x=Math.max(-h.overdrag,Math.min($e.calcdata.width+h.overdrag-$e.columnWidth,b.event.x));var jt=T(rt).filter(function(dr){return dr.calcdata.key===$e.calcdata.key}),Wt=jt.sort(function(dr,vr){return Ct(dr)-Ct(vr)});Wt.forEach(function(dr,vr){dr.xIndex=vr,dr.x=$e===dr?dr.x:dr.xScale(dr)}),rt.filter(function(dr){return $e!==dr}).transition().ease(h.transitionEase).duration(h.transitionDuration).attr("transform",function(dr){return a(dr.x,0)}),Et.call(i).attr("transform",a($e.x,-h.uplift))}).on("dragend",function($e){var Et=b.select(this),Ct=$e.calcdata;$e.x=$e.xScale($e),$e.calcdata.columnDragInProgress=!1,B(Et,$e,0),z(ae,Ct,Ct.columns.map(function(jt){return jt.xIndex}))})),rt.each(function($e){t.setClipUrl(b.select(this),d(ae,$e),ae)});var Je=rt.selectAll("."+h.cn.columnBlock).data(s.splitToPanels,e.keyFun);Je.enter().append("g").classed(h.cn.columnBlock,!0).attr("id",function($e){return $e.key}),Je.style("cursor",function($e){return $e.dragHandle?"ew-resize":$e.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var Ze=Je.filter(I),Ee=Je.filter(O);be&&Ee.call(b.behavior.drag().origin(function($e){return b.event.stopPropagation(),$e}).on("drag",ee(ae,Ie,-1)).on("dragend",function(){})),m(ae,Ie,Ze,Je),m(ae,Ie,Ee,Je);var xe=Ie.selectAll("."+h.cn.scrollAreaClip).data(e.repeat,e.keyFun);xe.enter().append("clipPath").classed(h.cn.scrollAreaClip,!0).attr("id",function($e){return p(ae,$e)});var he=xe.selectAll("."+h.cn.scrollAreaClipRect).data(e.repeat,e.keyFun);he.enter().append("rect").classed(h.cn.scrollAreaClipRect,!0).attr("x",-h.overdrag).attr("y",-h.uplift).attr("fill","none"),he.attr("width",function($e){return $e.width+2*h.overdrag}).attr("height",function($e){return $e.height+h.uplift});var De=rt.selectAll("."+h.cn.columnBoundary).data(e.repeat,e.keyFun);De.enter().append("g").classed(h.cn.columnBoundary,!0);var tt=rt.selectAll("."+h.cn.columnBoundaryClippath).data(e.repeat,e.keyFun);tt.enter().append("clipPath").classed(h.cn.columnBoundaryClippath,!0),tt.attr("id",function($e){return d(ae,$e)});var nt=tt.selectAll("."+h.cn.columnBoundaryRect).data(e.repeat,e.keyFun);nt.enter().append("rect").classed(h.cn.columnBoundaryRect,!0).attr("fill","none"),nt.attr("width",function($e){return $e.columnWidth+2*c($e)}).attr("height",function($e){return $e.calcdata.height+2*c($e)+h.uplift}).attr("x",function($e){return-c($e)}).attr("y",function($e){return-c($e)}),X(null,Ee,Ie)};function c(re){return Math.ceil(re.calcdata.maxLineWidth/2)}function p(re,ae){return"clip"+re._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function d(re,ae){return"clip"+re._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function T(re){return[].concat.apply([],re.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function l(re,ae,fe){function be(rt){var Je=rt.rowBlocks;return te(Je,Je.length-1)+(Je.length?Z(Je[Je.length-1],1/0):1)}var Me=re.selectAll("."+h.cn.scrollbarKit).data(e.repeat,e.keyFun);Me.enter().append("g").classed(h.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),Me.each(function(rt){var Je=rt.scrollbarState;Je.totalHeight=be(rt),Je.scrollableAreaHeight=rt.groupHeight-N(rt),Je.currentlyVisibleHeight=Math.min(Je.totalHeight,Je.scrollableAreaHeight),Je.ratio=Je.currentlyVisibleHeight/Je.totalHeight,Je.barLength=Math.max(Je.ratio*Je.currentlyVisibleHeight,h.goldenRatio*h.scrollbarWidth),Je.barWiggleRoom=Je.currentlyVisibleHeight-Je.barLength,Je.wiggleRoom=Math.max(0,Je.totalHeight-Je.scrollableAreaHeight),Je.topY=Je.barWiggleRoom===0?0:rt.scrollY/Je.wiggleRoom*Je.barWiggleRoom,Je.bottomY=Je.topY+Je.barLength,Je.dragMultiplier=Je.wiggleRoom/Je.barWiggleRoom}).attr("transform",function(rt){var Je=rt.width+h.scrollbarWidth/2+h.scrollbarOffset;return a(Je,N(rt))});var Ie=Me.selectAll("."+h.cn.scrollbar).data(e.repeat,e.keyFun);Ie.enter().append("g").classed(h.cn.scrollbar,!0);var Le=Ie.selectAll("."+h.cn.scrollbarSlider).data(e.repeat,e.keyFun);Le.enter().append("g").classed(h.cn.scrollbarSlider,!0),Le.attr("transform",function(rt){return a(0,rt.scrollbarState.topY||0)});var je=Le.selectAll("."+h.cn.scrollbarGlyph).data(e.repeat,e.keyFun);je.enter().append("line").classed(h.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",h.scrollbarWidth).attr("stroke-linecap","round").attr("y1",h.scrollbarWidth/2),je.attr("y2",function(rt){return rt.scrollbarState.barLength-h.scrollbarWidth/2}).attr("stroke-opacity",function(rt){return rt.columnDragInProgress||!rt.scrollbarState.barWiggleRoom||fe?0:.4}),je.transition().delay(0).duration(0),je.transition().delay(h.scrollbarHideDelay).duration(h.scrollbarHideDuration).attr("stroke-opacity",0);var et=Ie.selectAll("."+h.cn.scrollbarCaptureZone).data(e.repeat,e.keyFun);et.enter().append("line").classed(h.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",h.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(rt){var Je=b.event.y,Ze=this.getBoundingClientRect(),Ee=rt.scrollbarState,xe=Je-Ze.top,he=b.scale.linear().domain([0,Ee.scrollableAreaHeight]).range([0,Ee.totalHeight]).clamp(!0);Ee.topY<=xe&&xe<=Ee.bottomY||ee(ae,re,null,he(xe-Ee.barLength/2))(rt)}).call(b.behavior.drag().origin(function(rt){return b.event.stopPropagation(),rt.scrollbarState.scrollbarScrollInProgress=!0,rt}).on("drag",ee(ae,re)).on("dragend",function(){})),et.attr("y2",function(rt){return rt.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(je.remove(),et.remove())}function m(re,ae,fe,be){var Me=x(fe),Ie=A(Me);g(Ie);var Le=M(Ie);v(Le);var je=w(Ie),et=_(je);u(et),y(et,ae,be,re),J(Ie)}function x(re){var ae=re.selectAll("."+h.cn.columnCells).data(e.repeat,e.keyFun);return ae.enter().append("g").classed(h.cn.columnCells,!0),ae.exit().remove(),ae}function A(re){var ae=re.selectAll("."+h.cn.columnCell).data(s.splitToCells,function(fe){return fe.keyWithinBlock});return ae.enter().append("g").classed(h.cn.columnCell,!0),ae.exit().remove(),ae}function M(re){var ae=re.selectAll("."+h.cn.cellRect).data(e.repeat,function(fe){return fe.keyWithinBlock});return ae.enter().append("rect").classed(h.cn.cellRect,!0),ae}function _(re){var ae=re.selectAll("."+h.cn.cellText).data(e.repeat,function(fe){return fe.keyWithinBlock});return ae.enter().append("text").classed(h.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){b.event.stopPropagation()}),ae}function w(re){var ae=re.selectAll("."+h.cn.cellTextHolder).data(e.repeat,function(fe){return fe.keyWithinBlock});return ae.enter().append("g").classed(h.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function g(re){re.each(function(ae,fe){var be=ae.calcdata.cells.font,Me=ae.column.specIndex,Ie={size:F(be.size,Me,fe),color:F(be.color,Me,fe),family:F(be.family,Me,fe),weight:F(be.weight,Me,fe),style:F(be.style,Me,fe),variant:F(be.variant,Me,fe),textcase:F(be.textcase,Me,fe),lineposition:F(be.lineposition,Me,fe),shadow:F(be.shadow,Me,fe)};ae.rowNumber=ae.key,ae.align=F(ae.calcdata.cells.align,Me,fe),ae.cellBorderWidth=F(ae.calcdata.cells.line.width,Me,fe),ae.font=Ie})}function u(re){re.each(function(ae){t.font(b.select(this),ae.font)})}function v(re){re.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var fe=b.select(this);f.stroke(fe,F(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),f.fill(fe,F(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function y(re,ae,fe,be){re.text(function(Me){var Ie=Me.column.specIndex,Le=Me.rowNumber,je=Me.value,et=typeof je=="string",rt=et&&je.match(/<br>/i),Je=!et||rt;Me.mayHaveMarkup=et&&je.match(/[<&>]/);var Ze=R(je);Me.latex=Ze;var Ee=Ze?"":F(Me.calcdata.cells.prefix,Ie,Le)||"",xe=Ze?"":F(Me.calcdata.cells.suffix,Ie,Le)||"",he=Ze?null:F(Me.calcdata.cells.format,Ie,Le)||null,De=Ee+(he?E(he)(Me.value):Me.value)+xe,tt;Me.wrappingNeeded=!Me.wrapped&&!Je&&!Ze&&(tt=L(De)),Me.cellHeightMayIncrease=rt||Ze||Me.mayHaveMarkup||(tt===void 0?L(De):tt),Me.needsConvertToTspans=Me.mayHaveMarkup||Me.wrappingNeeded||Me.latex;var nt;if(Me.wrappingNeeded){var $e=h.wrapSplitCharacter===" "?De.replace(/<a href=/ig,"<a_href="):De,Et=$e.split(h.wrapSplitCharacter),Ct=h.wrapSplitCharacter===" "?Et.map(function(jt){return jt.replace(/<a_href=/ig,"<a href=")}):Et;Me.fragments=Ct.map(function(jt){return{text:jt,width:null}}),Me.fragments.push({fragment:h.wrapSpacer,width:null}),nt=Ct.join(h.lineBreaker)+h.lineBreaker+h.wrapSpacer}else delete Me.fragments,nt=De;return nt}).attr("dy",function(Me){return Me.needsConvertToTspans?0:"0.75em"}).each(function(Me){var Ie=this,Le=b.select(Ie),je=Me.wrappingNeeded?oe:le;Me.needsConvertToTspans?r.convertToTspans(Le,be,je(fe,Ie,ae,be,Me)):b.select(Ie.parentNode).attr("transform",function(et){return a(V(et),h.cellPad)}).attr("text-anchor",function(et){return{left:"start",center:"middle",right:"end"}[et.align]})})}function R(re){return typeof re=="string"&&re.match(h.latexCheck)}function L(re){return re.indexOf(h.wrapSplitCharacter)!==-1}function z(re,ae,fe){var be=ae.gdColumnsOriginalOrder;ae.gdColumns.sort(function(Me,Ie){return fe[be.indexOf(Me)]-fe[be.indexOf(Ie)]}),ae.columnorder=fe,re.emit("plotly_restyle")}function F(re,ae,fe){if(S.isArrayOrTypedArray(re)){var be=re[Math.min(ae,re.length-1)];return S.isArrayOrTypedArray(be)?be[Math.min(fe,be.length-1)]:be}else return re}function B(re,ae,fe){re.transition().ease(h.releaseTransitionEase).duration(h.releaseTransitionDuration).attr("transform",a(ae.x,fe))}function O(re){return re.type==="cells"}function I(re){return re.type==="header"}function N(re){var ae=re.rowBlocks.length?re.rowBlocks[0].auxiliaryBlocks:[];return ae.reduce(function(fe,be){return fe+Z(be,1/0)},0)}function U(re,ae,fe){for(var be=[],Me=0,Ie=0;Ie<re.length;Ie++){for(var Le=re[Ie],je=Le.rows,et=0,rt=0;rt<je.length;rt++)et+=je[rt].rowHeight;Le.allRowsHeight=et;var Je=Me+et,Ze=ae,Ee=Ze+fe;Ze<Je&&Ee>Me&&be.push(Ie),Me+=et}return be}function X(re,ae,fe){var be=T(ae)[0];if(be!==void 0){var Me=be.rowBlocks,Ie=be.calcdata,Le=te(Me,Me.length),je=be.calcdata.groupHeight-N(be),et=Ie.scrollY=Math.max(0,Math.min(Le-je,Ie.scrollY)),rt=U(Me,et,je);rt.length===1&&(rt[0]===Me.length-1?rt.unshift(rt[0]-1):rt.push(rt[0]+1)),rt[0]%2&&rt.reverse(),ae.each(function(Je,Ze){Je.page=rt[Ze],Je.scrollY=et}),ae.attr("transform",function(Je){var Ze=te(Je.rowBlocks,Je.page)-Je.scrollY;return a(0,Ze)}),re&&(ue(re,fe,ae,rt,be.prevPages,be,0),ue(re,fe,ae,rt,be.prevPages,be,1),l(fe,re))}}function ee(re,ae,fe,be){return function(Ie){var Le=Ie.calcdata?Ie.calcdata:Ie,je=ae.filter(function(Ze){return Le.key===Ze.key}),et=fe||Le.scrollbarState.dragMultiplier,rt=Le.scrollY;Le.scrollY=be===void 0?Le.scrollY+et*b.event.dy:be;var Je=je.selectAll("."+h.cn.yColumn).selectAll("."+h.cn.columnBlock).filter(O);return X(re,Je,je),Le.scrollY===rt}}function ue(re,ae,fe,be,Me,Ie,Le){var je=be[Le]!==Me[Le];je&&(clearTimeout(Ie.currentRepaint[Le]),Ie.currentRepaint[Le]=setTimeout(function(){var et=fe.filter(function(rt,Je){return Je===Le&&be[Je]!==Me[Je]});m(re,ae,et,fe),Me[Le]=be[Le]}))}function oe(re,ae,fe,be){return function(){var Ie=b.select(ae.parentNode);Ie.each(function(Le){var je=Le.fragments;Ie.selectAll("tspan.line").each(function(De,tt){je[tt].width=this.getComputedTextLength()});var et=je[je.length-1].width,rt=je.slice(0,-1),Je=[],Ze,Ee,xe=0,he=Le.column.columnWidth-2*h.cellPad;for(Le.value="";rt.length;)Ze=rt.shift(),Ee=Ze.width+et,xe+Ee>he&&(Le.value+=Je.join(h.wrapSpacer)+h.lineBreaker,Je=[],xe=0),Je.push(Ze.text),xe+=Ee;xe&&(Le.value+=Je.join(h.wrapSpacer)),Le.wrapped=!0}),Ie.selectAll("tspan.line").remove(),y(Ie.select("."+h.cn.cellText),fe,re,be),b.select(ae.parentNode.parentNode).call(J)}}function le(re,ae,fe,be,Me){return function(){if(!Me.settledY){var Le=b.select(ae.parentNode),je=Q(Me),et=Me.key-je.firstRowIndex,rt=je.rows[et].rowHeight,Je=Me.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*h.cellPad:rt,Ze=Math.max(Je,rt),Ee=Ze-je.rows[et].rowHeight;Ee&&(je.rows[et].rowHeight=Ze,re.selectAll("."+h.cn.columnCell).call(J),X(null,re.filter(O),0),l(fe,be,!0)),Le.attr("transform",function(){var xe=this,he=xe.parentNode,De=he.getBoundingClientRect(),tt=b.select(xe.parentNode).select("."+h.cn.cellRect).node().getBoundingClientRect(),nt=xe.transform.baseVal.consolidate(),$e=tt.top-De.top+(nt?nt.matrix.f:h.cellPad);return a(V(Me,b.select(xe.parentNode).select("."+h.cn.cellTextHolder).node().getBoundingClientRect().width),$e)}),Me.settledY=!0}}}function V(re,ae){switch(re.align){case"left":return h.cellPad;case"right":return re.column.columnWidth-(ae||0)-h.cellPad;case"center":return(re.column.columnWidth-(ae||0))/2;default:return h.cellPad}}function J(re){re.attr("transform",function(ae){var fe=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Le,je){return Le+Z(je,1/0)},0),be=Q(ae),Me=Z(be,ae.key),Ie=Me+fe;return a(0,Ie)}).selectAll("."+h.cn.cellRect).attr("height",function(ae){return q(Q(ae),ae.key).rowHeight})}function te(re,ae){for(var fe=0,be=ae-1;be>=0;be--)fe+=se(re[be]);return fe}function Z(re,ae){for(var fe=0,be=0;be<re.rows.length&&re.rows[be].rowIndex<ae;be++)fe+=re.rows[be].rowHeight;return fe}function se(re){var ae=re.allRowsHeight;if(ae!==void 0)return ae;for(var fe=0,be=0;be<re.rows.length;be++)fe+=re.rows[be].rowHeight;return re.allRowsHeight=fe,fe}function Q(re){return re.rowBlocks[re.page]}function q(re,ae){return re.rows[ae-re.firstRowIndex]}}}),C4=He({"src/traces/table/base_plot.js"(Y){var G=ih().getModuleCalcData,h=o5(),b="table";Y.name=b,Y.plot=function(S){var E=G(S.calcdata,b)[0];E.length&&h(S,E)},Y.clean=function(S,E,e,t){var r=t._has&&t._has(b),o=E._has&&E._has(b);r&&!o&&t._paperdiv.selectAll(".table").remove()}}}),L4=He({"src/traces/table/index.js"(Y,G){G.exports={attributes:n5(),supplyDefaults:S4(),calc:M4(),plot:o5(),moduleType:"trace",name:"table",basePlotModule:C4(),categories:["noOpacity"],meta:{}}}}),P4=He({"lib/table.js"(Y,G){G.exports=L4()}}),I4=He({"src/traces/carpet/axis_attributes.js"(Y,G){var h=Ru(),b=Mf(),S=oh(),E=Ec().descriptionWithDates,e=Zu().overrideAll,t=nh().dash,r=Po().extendFlat;G.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:h({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:S.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:r({},S.labelalias,{editType:"calc"}),tickfont:h({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:E("tick label")},tickformatstops:e(S.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:b.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:r({},t,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:r({},t,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:b.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}}}),yx=He({"src/traces/carpet/attributes.js"(Y,G){var h=Ru(),b=I4(),S=Mf(),E=h({editType:"calc"}),e=Cc().zorder;E.family.dflt='"Open Sans", verdana, arial, sans-serif',E.size.dflt=12,E.color.dflt=S.defaultLine,G.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:b,baxis:b,font:E,color:{valType:"color",dflt:S.defaultLine,editType:"plot"},zorder:e}}}),R4=He({"src/traces/carpet/xy_defaults.js"(Y,G){var h=ea().isArray1D;G.exports=function(S,E,e){var t=e("x"),r=t&&t.length,o=e("y"),a=o&&o.length;if(!r&&!a)return!1;if(E._cheater=!t,(!r||h(t))&&(!a||h(o))){var i=r?t.length:1/0;a&&(i=Math.min(i,o.length)),E.a&&E.a.length&&(i=Math.min(i,E.a.length)),E.b&&E.b.length&&(i=Math.min(i,E.b.length)),E._length=i}else E._length=null;return!0}}}),D4=He({"src/traces/carpet/axis_defaults.js"(Y,G){var h=yx(),b=Di().addOpacity,S=ji(),E=ea(),e=Rp(),t=Yd(),r=Kd(),o=_1(),a=Wv(),i=G0();G.exports=function(f,c,p){var d=p.letter,T=p.font||{},l=h[d+"axis"];function m(U,X){return E.coerce(f,c,l,U,X)}function x(U,X){return E.coerce2(f,c,l,U,X)}p.name&&(c._name=p.name,c._id=p.name),m("autotypenumbers",p.autotypenumbersDflt);var A=m("type");if(A==="-"&&(p.data&&n(c,p.data),c.type==="-"?c.type="linear":A=f.type=c.type),m("smoothing"),m("cheatertype"),m("showticklabels"),m("labelprefix",d+" = "),m("labelsuffix"),m("showtickprefix"),m("showticksuffix"),m("separatethousands"),m("tickformat"),m("exponentformat"),m("minexponent"),m("showexponent"),m("categoryorder"),m("tickmode"),m("tickvals"),m("ticktext"),m("tick0"),m("dtick"),c.tickmode==="array"&&(m("arraytick0"),m("arraydtick")),m("labelpadding"),c._hovertitle=d,A==="date"){var M=S.getComponentMethod("calendars","handleDefaults");M(f,c,"calendar",p.calendar)}a(c,p.fullLayout),c.c2p=E.identity;var _=m("color",p.dfltColor),w=_===f.color?_:T.color,g=m("title.text");g&&(E.coerceFont(m,"title.font",T,{overrideDflt:{size:E.bigFont(T.size),color:w}}),m("title.offset")),m("tickangle");var u=m("autorange",!c.isValidRange(f.range));u&&m("rangemode"),m("range"),c.cleanRange(),m("fixedrange"),e(f,c,m,A),r(f,c,m,A,p),t(f,c,m,A,p),o(f,c,m,{data:p.data,dataAttr:d});var v=x("gridcolor",b(_,.3)),y=x("gridwidth"),R=x("griddash"),L=m("showgrid");L||(delete c.gridcolor,delete c.gridwidth,delete c.griddash);var z=x("startlinecolor",_),F=x("startlinewidth",y),B=m("startline",c.showgrid||!!z||!!F);B||(delete c.startlinecolor,delete c.startlinewidth);var O=x("endlinecolor",_),I=x("endlinewidth",y),N=m("endline",c.showgrid||!!O||!!I);return N||(delete c.endlinecolor,delete c.endlinewidth),L?(m("minorgridcount"),m("minorgridwidth",y),m("minorgriddash",R),m("minorgridcolor",b(v,.06)),c.minorgridcount||(delete c.minorgridwidth,delete c.minorgriddash,delete c.minorgridcolor)):(delete c.gridcolor,delete c.gridwidth,delete c.griddash),c.showticklabels==="none"&&(delete c.tickfont,delete c.tickangle,delete c.showexponent,delete c.exponentformat,delete c.minexponent,delete c.tickformat,delete c.showticksuffix,delete c.showtickprefix),c.showticksuffix||delete c.ticksuffix,c.showtickprefix||delete c.tickprefix,m("tickmode"),c};function n(s,f){if(s.type==="-"){var c=s._id,p=c.charAt(0),d=p+"calendar",T=s[d];s.type=i(f,T,{autotypenumbers:s.autotypenumbers})}}}}),z4=He({"src/traces/carpet/ab_defaults.js"(Y,G){var h=D4(),b=xl();G.exports=function(e,t,r,o,a){var i=o("a");i||(o("da"),o("a0"));var n=o("b");n||(o("db"),o("b0")),S(e,t,r,a)};function S(E,e,t,r){var o=["aaxis","baxis"];o.forEach(function(a){var i=a.charAt(0),n=E[a]||{},s=b.newContainer(e,a),f={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:i+"axis",letter:i,font:e.font,name:a,data:E[i],calendar:e.calendar,dfltColor:r,bgColor:t.paper_bgcolor,autotypenumbersDflt:t.autotypenumbers,fullLayout:t};h(n,s,f),s._categories=s._categories||[],!E[a]&&n.type!=="-"&&(E[a]={type:n.type})})}}}),F4=He({"src/traces/carpet/defaults.js"(Y,G){var h=ea(),b=R4(),S=z4(),E=yx(),e=Mf();G.exports=function(r,o,a,i){function n(c,p){return h.coerce(r,o,E,c,p)}o._clipPathId="clip"+o.uid+"carpet";var s=n("color",e.defaultLine);if(h.coerceFont(n,"font",i.font),n("carpet"),S(r,o,i,n,s),!o.a||!o.b){o.visible=!1;return}o.a.length<3&&(o.aaxis.smoothing=0),o.b.length<3&&(o.baxis.smoothing=0);var f=b(r,o,n);f||(o.visible=!1),o._cheater&&n("cheaterslope"),n("zorder")}}}),s5=He({"src/traces/carpet/map_1d_array.js"(Y,G){var h=ea().isArrayOrTypedArray;G.exports=function(S,E,e){var t;for(h(S)?S.length>E.length&&(S=S.slice(0,E.length)):S=[],t=0;t<E.length;t++)S[t]=e(E[t]);return S}}}),l5=He({"src/traces/carpet/makepath.js"(Y,G){G.exports=function(b,S,E){if(b.length===0)return"";var e,t=[],r=E?3:1;for(e=0;e<b.length;e+=r)t.push(b[e]+","+S[e]),E&&e<b.length-r&&(t.push("C"),t.push([b[e+1]+","+S[e+1],b[e+2]+","+S[e+2]+" "].join(" ")));return t.join(E?"":"L")}}}),O4=He({"src/traces/carpet/orient_text.js"(Y,G){G.exports=function(b,S,E,e,t,r){var o=t[0]*b.dpdx(S),a=t[1]*b.dpdy(E),i=1,n=1;if(r){var s=Math.sqrt(t[0]*t[0]+t[1]*t[1]),f=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=(t[0]*r[0]+t[1]*r[1])/s/f;n=Math.max(0,c)}var p=Math.atan2(a,o)*180/Math.PI;return p<-90?(p+=180,i=-i):p>90&&(p-=180,i=-i),{angle:p,flip:i,p:b.c2p(e,S,E),offsetMultplier:n}}}}),B4=He({"src/traces/carpet/plot.js"(Y,G){var h=_i(),b=Io(),S=s5(),E=l5(),e=O4(),t=Zl(),r=ea(),o=r.strRotate,a=r.strTranslate,i=Nf();G.exports=function(m,x,A,M){var _=m._context.staticPlot,w=x.xaxis,g=x.yaxis,u=m._fullLayout,v=u._clips;r.makeTraceGroups(M,A,"trace").each(function(y){var R=h.select(this),L=y[0],z=L.trace,F=z.aaxis,B=z.baxis,O=r.ensureSingle(R,"g","minorlayer"),I=r.ensureSingle(R,"g","majorlayer"),N=r.ensureSingle(R,"g","boundarylayer"),U=r.ensureSingle(R,"g","labellayer");R.style("opacity",z.opacity),s(w,g,I,F,"a",F._gridlines,!0),s(w,g,I,B,"b",B._gridlines,!0),s(w,g,O,F,"a",F._minorgridlines,!0),s(w,g,O,B,"b",B._minorgridlines,!0),s(w,g,N,F,"a-boundary",F._boundarylines,_),s(w,g,N,B,"b-boundary",B._boundarylines,_);var X=f(m,w,g,z,L,U,F._labels,"a-label"),ee=f(m,w,g,z,L,U,B._labels,"b-label");c(m,U,z,L,w,g,X,ee),n(z,L,v,w,g)})};function n(l,m,x,A,M){var _,w,g,u,v=x.select("#"+l._clipPathId);v.size()||(v=x.append("clipPath").classed("carpetclip",!0));var y=r.ensureSingle(v,"path","carpetboundary"),R=m.clipsegments,L=[];for(u=0;u<R.length;u++)_=R[u],w=S([],_.x,A.c2p),g=S([],_.y,M.c2p),L.push(E(w,g,_.bicubic));var z="M"+L.join("L")+"Z";v.attr("id",l._clipPathId),y.attr("d",z)}function s(l,m,x,A,M,_,w){var g="const-"+M+"-lines",u=x.selectAll("."+g).data(_);u.enter().append("path").classed(g,!0).style("vector-effect",w?"none":"non-scaling-stroke"),u.each(function(v){var y=v,R=y.x,L=y.y,z=S([],R,l.c2p),F=S([],L,m.c2p),B="M"+E(z,F,y.smoothing),O=h.select(this);O.attr("d",B).style("stroke-width",y.width).style("stroke",y.color).style("stroke-dasharray",b.dashStyle(y.dash,y.width)).style("fill","none")}),u.exit().remove()}function f(l,m,x,A,M,_,w,g){var u=_.selectAll("text."+g).data(w);u.enter().append("text").classed(g,!0);var v=0,y={};return u.each(function(R,L){var z;if(R.axis.tickangle==="auto")z=e(A,m,x,R.xy,R.dxy);else{var F=(R.axis.tickangle+180)*Math.PI/180;z=e(A,m,x,R.xy,[Math.cos(F),Math.sin(F)])}L||(y={angle:z.angle,flip:z.flip});var B=(R.endAnchor?-1:1)*z.flip,O=h.select(this).attr({"text-anchor":B>0?"start":"end","data-notex":1}).call(b.font,R.font).text(R.text).call(t.convertToTspans,l),I=b.bBox(this);O.attr("transform",a(z.p[0],z.p[1])+o(z.angle)+a(R.axis.labelpadding*B,I.height*.3)),v=Math.max(v,I.width+R.axis.labelpadding)}),u.exit().remove(),y.maxExtent=v,y}function c(l,m,x,A,M,_,w,g){var u,v,y,R,L=r.aggNums(Math.min,null,x.a),z=r.aggNums(Math.max,null,x.a),F=r.aggNums(Math.min,null,x.b),B=r.aggNums(Math.max,null,x.b);u=.5*(L+z),v=F,y=x.ab2xy(u,v,!0),R=x.dxyda_rough(u,v),w.angle===void 0&&r.extendFlat(w,e(x,M,_,y,x.dxydb_rough(u,v))),T(l,m,x,A,y,R,x.aaxis,M,_,w,"a-title"),u=L,v=.5*(F+B),y=x.ab2xy(u,v,!0),R=x.dxydb_rough(u,v),g.angle===void 0&&r.extendFlat(g,e(x,M,_,y,x.dxyda_rough(u,v))),T(l,m,x,A,y,R,x.baxis,M,_,g,"b-title")}var p=i.LINE_SPACING,d=(1-i.MID_SHIFT)/p+1;function T(l,m,x,A,M,_,w,g,u,v,y){var R=[];w.title.text&&R.push(w.title.text);var L=m.selectAll("text."+y).data(R),z=v.maxExtent;L.enter().append("text").classed(y,!0),L.each(function(){var F=e(x,g,u,M,_);["start","both"].indexOf(w.showticklabels)===-1&&(z=0);var B=w.title.font.size;z+=B+w.title.offset;var O=v.angle+(v.flip<0?180:0),I=(O-F.angle+450)%360,N=I>90&&I<270,U=h.select(this);U.text(w.title.text).call(t.convertToTspans,l),N&&(z=(-t.lineCount(U)+d)*p*B-z),U.attr("transform",a(F.p[0],F.p[1])+o(F.angle)+a(0,z)).attr("text-anchor","middle").call(b.font,w.title.font)}),L.exit().remove()}}}),N4=He({"src/traces/carpet/cheater_basis.js"(Y,G){var h=ea().isArrayOrTypedArray;G.exports=function(b,S,E){var e,t,r,o,a,i,n=[],s=h(b)?b.length:b,f=h(S)?S.length:S,c=h(b)?b:null,p=h(S)?S:null;c&&(r=(c.length-1)/(c[c.length-1]-c[0])/(s-1)),p&&(o=(p.length-1)/(p[p.length-1]-p[0])/(f-1));var d,T=1/0,l=-1/0;for(t=0;t<f;t++)for(n[t]=[],i=p?(p[t]-p[0])*o:t/(f-1),e=0;e<s;e++)a=c?(c[e]-c[0])*r:e/(s-1),d=a-i*E,T=Math.min(d,T),l=Math.max(d,l),n[t][e]=d;var m=1/(l-T),x=-T*m;for(t=0;t<f;t++)for(e=0;e<s;e++)n[t][e]=m*n[t][e]+x;return n}}}),U4=He({"src/traces/carpet/array_minmax.js"(Y,G){var h=ea().isArrayOrTypedArray;G.exports=function(S){return b(S,0)};function b(S,E){if(!h(S)||E>=10)return null;for(var e=1/0,t=-1/0,r=S.length,o=0;o<r;o++){var a=S[o];if(h(a)){var i=b(a,E+1);i&&(e=Math.min(i[0],e),t=Math.max(i[1],t))}else e=Math.min(a,e),t=Math.max(a,t)}return[e,t]}}}),j4=He({"src/traces/carpet/calc_gridlines.js"(Y,G){var h=Ao(),b=Po().extendFlat;G.exports=function(E,e,t){var r,o,a,i,n,s,f,c,p,d,T,l,m,x,A=E["_"+e],M=E[e+"axis"],_=M._gridlines=[],w=M._minorgridlines=[],g=M._boundarylines=[],u=E["_"+t],v=E[t+"axis"];M.tickmode==="array"&&(M.tickvals=A.slice());var y=E._xctrl,R=E._yctrl,L=y[0].length,z=y.length,F=E._a.length,B=E._b.length;h.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var O=M.smoothing?3:1;function I(U){var X,ee,ue,oe,le,V,J,te,Z,se,Q,q,re=[],ae=[],fe={};if(e==="b")for(ee=E.b2j(U),ue=Math.floor(Math.max(0,Math.min(B-2,ee))),oe=ee-ue,fe.length=B,fe.crossLength=F,fe.xy=function(be){return E.evalxy([],be,ee)},fe.dxy=function(be,Me){return E.dxydi([],be,ue,Me,oe)},X=0;X<F;X++)V=Math.min(F-2,X),J=X-V,te=E.evalxy([],X,ee),v.smoothing&&X>0&&(Z=E.dxydi([],X-1,ue,0,oe),re.push(le[0]+Z[0]/3),ae.push(le[1]+Z[1]/3),se=E.dxydi([],X-1,ue,1,oe),re.push(te[0]-se[0]/3),ae.push(te[1]-se[1]/3)),re.push(te[0]),ae.push(te[1]),le=te;else for(X=E.a2i(U),V=Math.floor(Math.max(0,Math.min(F-2,X))),J=X-V,fe.length=F,fe.crossLength=B,fe.xy=function(be){return E.evalxy([],X,be)},fe.dxy=function(be,Me){return E.dxydj([],V,be,J,Me)},ee=0;ee<B;ee++)ue=Math.min(B-2,ee),oe=ee-ue,te=E.evalxy([],X,ee),v.smoothing&&ee>0&&(Q=E.dxydj([],V,ee-1,J,0),re.push(le[0]+Q[0]/3),ae.push(le[1]+Q[1]/3),q=E.dxydj([],V,ee-1,J,1),re.push(te[0]-q[0]/3),ae.push(te[1]-q[1]/3)),re.push(te[0]),ae.push(te[1]),le=te;return fe.axisLetter=e,fe.axis=M,fe.crossAxis=v,fe.value=U,fe.constvar=t,fe.index=c,fe.x=re,fe.y=ae,fe.smoothing=v.smoothing,fe}function N(U){var X,ee,ue,oe,le,V=[],J=[],te={};if(te.length=A.length,te.crossLength=u.length,e==="b")for(ue=Math.max(0,Math.min(B-2,U)),le=Math.min(1,Math.max(0,U-ue)),te.xy=function(Z){return E.evalxy([],Z,U)},te.dxy=function(Z,se){return E.dxydi([],Z,ue,se,le)},X=0;X<L;X++)V[X]=y[U*O][X],J[X]=R[U*O][X];else for(ee=Math.max(0,Math.min(F-2,U)),oe=Math.min(1,Math.max(0,U-ee)),te.xy=function(Z){return E.evalxy([],U,Z)},te.dxy=function(Z,se){return E.dxydj([],ee,Z,oe,se)},X=0;X<z;X++)V[X]=y[X][U*O],J[X]=R[X][U*O];return te.axisLetter=e,te.axis=M,te.crossAxis=v,te.value=A[U],te.constvar=t,te.index=U,te.x=V,te.y=J,te.smoothing=v.smoothing,te}if(M.tickmode==="array"){for(i=5e-15,n=[Math.floor((A.length-1-M.arraytick0)/M.arraydtick*(1+i)),Math.ceil(-M.arraytick0/M.arraydtick/(1+i))].sort(function(U,X){return U-X}),s=n[0]-1,f=n[1]+1,c=s;c<f;c++)o=M.arraytick0+M.arraydtick*c,!(o<0||o>A.length-1)&&_.push(b(N(o),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s;c<f;c++)if(a=M.arraytick0+M.arraydtick*c,T=Math.min(a+M.arraydtick,A.length-1),!(a<0||a>A.length-1)&&!(T<0||T>A.length-1))for(l=A[a],m=A[T],r=0;r<M.minorgridcount;r++)x=T-a,!(x<=0)&&(d=l+(m-l)*(r+1)/(M.minorgridcount+1)*(M.arraydtick/x),!(d<A[0]||d>A[A.length-1])&&w.push(b(I(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&g.push(b(N(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&g.push(b(N(A.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(i=5e-15,n=[Math.floor((A[A.length-1]-M.tick0)/M.dtick*(1+i)),Math.ceil((A[0]-M.tick0)/M.dtick/(1+i))].sort(function(U,X){return U-X}),s=n[0],f=n[1],c=s;c<=f;c++)p=M.tick0+M.dtick*c,_.push(b(I(p),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(c=s-1;c<f+1;c++)for(p=M.tick0+M.dtick*c,r=0;r<M.minorgridcount;r++)d=p+M.dtick*(r+1)/(M.minorgridcount+1),!(d<A[0]||d>A[A.length-1])&&w.push(b(I(d),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&g.push(b(I(A[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&g.push(b(I(A[A.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}}}),V4=He({"src/traces/carpet/calc_labels.js"(Y,G){var h=Ao(),b=Po().extendFlat;G.exports=function(E,e){var t,r,o,a,i,n=e._labels=[],s=e._gridlines;for(t=0;t<s.length;t++)i=s[t],["start","both"].indexOf(e.showticklabels)!==-1&&(r=h.tickText(e,i.value),b(r,{prefix:o,suffix:a,endAnchor:!0,xy:i.xy(0),dxy:i.dxy(0,0),axis:i.axis,length:i.crossAxis.length,font:i.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),n.push(r)),["end","both"].indexOf(e.showticklabels)!==-1&&(r=h.tickText(e,i.value),b(r,{endAnchor:!1,xy:i.xy(i.crossLength-1),dxy:i.dxy(i.crossLength-2,1),axis:i.axis,length:i.crossAxis.length,font:i.axis.tickfont,isFirst:t===0,isLast:t===s.length-1}),n.push(r))}}}),q4=He({"src/traces/carpet/calc_clippath.js"(Y,G){G.exports=function(b,S,E,e){var t,r,o,a=[],i=!!E.smoothing,n=!!e.smoothing,s=b[0].length-1,f=b.length-1;for(t=0,r=[],o=[];t<=s;t++)r[t]=b[0][t],o[t]=S[0][t];for(a.push({x:r,y:o,bicubic:i}),t=0,r=[],o=[];t<=f;t++)r[t]=b[t][s],o[t]=S[t][s];for(a.push({x:r,y:o,bicubic:n}),t=s,r=[],o=[];t>=0;t--)r[s-t]=b[f][t],o[s-t]=S[f][t];for(a.push({x:r,y:o,bicubic:i}),t=f,r=[],o=[];t>=0;t--)r[f-t]=b[t][0],o[f-t]=S[t][0];return a.push({x:r,y:o,bicubic:n}),a}}}),G4=He({"src/traces/carpet/smooth_fill_2d_array.js"(Y,G){var h=ea();G.exports=function(S,E,e){var t,r,o,a=[],i=[],n=S[0].length,s=S.length;function f(ee,ue){var oe=0,le,V=0;return ee>0&&(le=S[ue][ee-1])!==void 0&&(V++,oe+=le),ee<n-1&&(le=S[ue][ee+1])!==void 0&&(V++,oe+=le),ue>0&&(le=S[ue-1][ee])!==void 0&&(V++,oe+=le),ue<s-1&&(le=S[ue+1][ee])!==void 0&&(V++,oe+=le),oe/Math.max(1,V)}var c=0;for(t=0;t<n;t++)for(r=0;r<s;r++)S[r][t]===void 0&&(a.push(t),i.push(r),S[r][t]=f(t,r)),c=Math.max(c,Math.abs(S[r][t]));if(!a.length)return S;var p,d,T,l,m,x,A,M,_,w,g,u=1e-5,v=0,y=100,R=0,L=a.length;do{for(v=0,o=0;o<L;o++){t=a[o],r=i[o];var z=0,F=0,B,O,I,N,U,X;t===0?(U=Math.min(n-1,2),I=E[U],N=E[1],B=S[r][U],O=S[r][1],F+=O+(O-B)*(E[0]-N)/(N-I),z++):t===n-1&&(U=Math.max(0,n-3),I=E[U],N=E[n-2],B=S[r][U],O=S[r][n-2],F+=O+(O-B)*(E[n-1]-N)/(N-I),z++),(t===0||t===n-1)&&r>0&&r<s-1&&(p=e[r+1]-e[r],d=e[r]-e[r-1],F+=(d*S[r+1][t]+p*S[r-1][t])/(d+p),z++),r===0?(X=Math.min(s-1,2),I=e[X],N=e[1],B=S[X][t],O=S[1][t],F+=O+(O-B)*(e[0]-N)/(N-I),z++):r===s-1&&(X=Math.max(0,s-3),I=e[X],N=e[s-2],B=S[X][t],O=S[s-2][t],F+=O+(O-B)*(e[s-1]-N)/(N-I),z++),(r===0||r===s-1)&&t>0&&t<n-1&&(p=E[t+1]-E[t],d=E[t]-E[t-1],F+=(d*S[r][t+1]+p*S[r][t-1])/(d+p),z++),z?F/=z:(T=E[t+1]-E[t],l=E[t]-E[t-1],m=e[r+1]-e[r],x=e[r]-e[r-1],A=T*l*(T+l),M=m*x*(m+x),F=(A*(x*S[r+1][t]+m*S[r-1][t])+M*(l*S[r][t+1]+T*S[r][t-1]))/(M*(l+T)+A*(x+m))),_=F-S[r][t],w=_/c,v+=w*w,g=z?0:.85,S[r][t]+=_*(1+g)}v=Math.sqrt(v)}while(R++<y&&v>u);return h.log("Smoother converged to",v,"after",R,"iterations"),S}}}),H4=He({"src/traces/carpet/constants.js"(Y,G){G.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),W4=He({"src/traces/carpet/catmull_rom.js"(Y,G){var h=.5;G.exports=function(S,E,e,t){var r=S[0]-E[0],o=S[1]-E[1],a=e[0]-E[0],i=e[1]-E[1],n=Math.pow(r*r+o*o,h/2),s=Math.pow(a*a+i*i,h/2),f=(s*s*r-n*n*a)*t,c=(s*s*o-n*n*i)*t,p=s*(n+s)*3,d=n*(n+s)*3;return[[E[0]+(p&&f/p),E[1]+(p&&c/p)],[E[0]-(d&&f/d),E[1]-(d&&c/d)]]}}}),X4=He({"src/traces/carpet/compute_control_points.js"(Y,G){var h=W4(),b=ea().ensureArray;function S(E,e,t){var r=-.5*t[0]+1.5*e[0],o=-.5*t[1]+1.5*e[1];return[(2*r+E[0])/3,(2*o+E[1])/3]}G.exports=function(e,t,r,o,a,i){var n,s,f,c,p,d,T,l,m,x,A=r[0].length,M=r.length,_=a?3*A-2:A,w=i?3*M-2:M;for(e=b(e,w),t=b(t,w),f=0;f<w;f++)e[f]=b(e[f],_),t[f]=b(t[f],_);for(s=0,c=0;s<M;s++,c+=i?3:1)for(p=e[c],d=t[c],T=r[s],l=o[s],n=0,f=0;n<A;n++,f+=a?3:1)p[f]=T[n],d[f]=l[n];if(a)for(s=0,c=0;s<M;s++,c+=i?3:1){for(n=1,f=3;n<A-1;n++,f+=3)m=h([r[s][n-1],o[s][n-1]],[r[s][n],o[s][n]],[r[s][n+1],o[s][n+1]],a),e[c][f-1]=m[0][0],t[c][f-1]=m[0][1],e[c][f+1]=m[1][0],t[c][f+1]=m[1][1];x=S([e[c][0],t[c][0]],[e[c][2],t[c][2]],[e[c][3],t[c][3]]),e[c][1]=x[0],t[c][1]=x[1],x=S([e[c][_-1],t[c][_-1]],[e[c][_-3],t[c][_-3]],[e[c][_-4],t[c][_-4]]),e[c][_-2]=x[0],t[c][_-2]=x[1]}if(i)for(f=0;f<_;f++){for(c=3;c<w-3;c+=3)m=h([e[c-3][f],t[c-3][f]],[e[c][f],t[c][f]],[e[c+3][f],t[c+3][f]],i),e[c-1][f]=m[0][0],t[c-1][f]=m[0][1],e[c+1][f]=m[1][0],t[c+1][f]=m[1][1];x=S([e[0][f],t[0][f]],[e[2][f],t[2][f]],[e[3][f],t[3][f]]),e[1][f]=x[0],t[1][f]=x[1],x=S([e[w-1][f],t[w-1][f]],[e[w-3][f],t[w-3][f]],[e[w-4][f],t[w-4][f]]),e[w-2][f]=x[0],t[w-2][f]=x[1]}if(a&&i)for(c=1;c<w;c+=(c+1)%3===0?2:1){for(f=3;f<_-3;f+=3)m=h([e[c][f-3],t[c][f-3]],[e[c][f],t[c][f]],[e[c][f+3],t[c][f+3]],a),e[c][f-1]=.5*(e[c][f-1]+m[0][0]),t[c][f-1]=.5*(t[c][f-1]+m[0][1]),e[c][f+1]=.5*(e[c][f+1]+m[1][0]),t[c][f+1]=.5*(t[c][f+1]+m[1][1]);x=S([e[c][0],t[c][0]],[e[c][2],t[c][2]],[e[c][3],t[c][3]]),e[c][1]=.5*(e[c][1]+x[0]),t[c][1]=.5*(t[c][1]+x[1]),x=S([e[c][_-1],t[c][_-1]],[e[c][_-3],t[c][_-3]],[e[c][_-4],t[c][_-4]]),e[c][_-2]=.5*(e[c][_-2]+x[0]),t[c][_-2]=.5*(t[c][_-2]+x[1])}return[e,t]}}}),Z4=He({"src/traces/carpet/create_spline_evaluator.js"(Y,G){G.exports=function(h,b,S,E,e){var t=b-2,r=S-2;return E&&e?function(o,a,i){o||(o=[]);var n,s,f,c,p,d,T=Math.max(0,Math.min(Math.floor(a),t)),l=Math.max(0,Math.min(Math.floor(i),r)),m=Math.max(0,Math.min(1,a-T)),x=Math.max(0,Math.min(1,i-l));T*=3,l*=3;var A=m*m,M=A*m,_=1-m,w=_*_,g=w*_,u=x*x,v=u*x,y=1-x,R=y*y,L=R*y;for(d=0;d<h.length;d++)p=h[d],n=g*p[l][T]+3*(w*m*p[l][T+1]+_*A*p[l][T+2])+M*p[l][T+3],s=g*p[l+1][T]+3*(w*m*p[l+1][T+1]+_*A*p[l+1][T+2])+M*p[l+1][T+3],f=g*p[l+2][T]+3*(w*m*p[l+2][T+1]+_*A*p[l+2][T+2])+M*p[l+2][T+3],c=g*p[l+3][T]+3*(w*m*p[l+3][T+1]+_*A*p[l+3][T+2])+M*p[l+3][T+3],o[d]=L*n+3*(R*x*s+y*u*f)+v*c;return o}:E?function(o,a,i){o||(o=[]);var n=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(i),r)),f=Math.max(0,Math.min(1,a-n)),c=Math.max(0,Math.min(1,i-s)),p,d,T,l,m,x;n*=3;var A=f*f,M=A*f,_=1-f,w=_*_,g=w*_,u=1-c;for(m=0;m<h.length;m++)x=h[m],p=u*x[s][n]+c*x[s+1][n],d=u*x[s][n+1]+c*x[s+1][n+1],T=u*x[s][n+2]+c*x[s+1][n+1],l=u*x[s][n+3]+c*x[s+1][n+1],o[m]=g*p+3*(w*f*d+_*A*T)+M*l;return o}:e?function(o,a,i){o||(o=[]);var n=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(i),r)),f=Math.max(0,Math.min(1,a-n)),c=Math.max(0,Math.min(1,i-s)),p,d,T,l,m,x;s*=3;var A=c*c,M=A*c,_=1-c,w=_*_,g=w*_,u=1-f;for(m=0;m<h.length;m++)x=h[m],p=u*x[s][n]+f*x[s][n+1],d=u*x[s+1][n]+f*x[s+1][n+1],T=u*x[s+2][n]+f*x[s+2][n+1],l=u*x[s+3][n]+f*x[s+3][n+1],o[m]=g*p+3*(w*c*d+_*A*T)+M*l;return o}:function(o,a,i){o||(o=[]);var n=Math.max(0,Math.min(Math.floor(a),t)),s=Math.max(0,Math.min(Math.floor(i),r)),f=Math.max(0,Math.min(1,a-n)),c=Math.max(0,Math.min(1,i-s)),p,d,T,l,m=1-c,x=1-f;for(T=0;T<h.length;T++)l=h[T],p=x*l[s][n]+f*l[s][n+1],d=x*l[s+1][n]+f*l[s+1][n+1],o[T]=m*p+c*d;return o}}}}),Y4=He({"src/traces/carpet/create_i_derivative_evaluator.js"(Y,G){G.exports=function(h,b,S){return b&&S?function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f,c;e*=3,t*=3;var p=r*r,d=1-r,T=d*d,l=d*r*2,m=-3*T,x=3*(T-l),A=3*(l-p),M=3*p,_=o*o,w=_*o,g=1-o,u=g*g,v=u*g;for(c=0;c<h.length;c++)f=h[c],a=m*f[t][e]+x*f[t][e+1]+A*f[t][e+2]+M*f[t][e+3],i=m*f[t+1][e]+x*f[t+1][e+1]+A*f[t+1][e+2]+M*f[t+1][e+3],n=m*f[t+2][e]+x*f[t+2][e+1]+A*f[t+2][e+2]+M*f[t+2][e+3],s=m*f[t+3][e]+x*f[t+3][e+1]+A*f[t+3][e+2]+M*f[t+3][e+3],E[c]=v*a+3*(u*o*i+g*_*n)+w*s;return E}:b?function(E,e,t,r,o){E||(E=[]);var a,i,n,s;e*=3;var f=r*r,c=1-r,p=c*c,d=c*r*2,T=-3*p,l=3*(p-d),m=3*(d-f),x=3*f,A=1-o;for(n=0;n<h.length;n++)s=h[n],a=T*s[t][e]+l*s[t][e+1]+m*s[t][e+2]+x*s[t][e+3],i=T*s[t+1][e]+l*s[t+1][e+1]+m*s[t+1][e+2]+x*s[t+1][e+3],E[n]=A*a+o*i;return E}:S?function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f,c;t*=3;var p=o*o,d=p*o,T=1-o,l=T*T,m=l*T;for(f=0;f<h.length;f++)c=h[f],a=c[t][e+1]-c[t][e],i=c[t+1][e+1]-c[t+1][e],n=c[t+2][e+1]-c[t+2][e],s=c[t+3][e+1]-c[t+3][e],E[f]=m*a+3*(l*o*i+T*p*n)+d*s;return E}:function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f=1-o;for(n=0;n<h.length;n++)s=h[n],a=s[t][e+1]-s[t][e],i=s[t+1][e+1]-s[t+1][e],E[n]=f*a+o*i;return E}}}}),K4=He({"src/traces/carpet/create_j_derivative_evaluator.js"(Y,G){G.exports=function(h,b,S){return b&&S?function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f,c;e*=3,t*=3;var p=r*r,d=p*r,T=1-r,l=T*T,m=l*T,x=o*o,A=1-o,M=A*A,_=A*o*2,w=-3*M,g=3*(M-_),u=3*(_-x),v=3*x;for(c=0;c<h.length;c++)f=h[c],a=w*f[t][e]+g*f[t+1][e]+u*f[t+2][e]+v*f[t+3][e],i=w*f[t][e+1]+g*f[t+1][e+1]+u*f[t+2][e+1]+v*f[t+3][e+1],n=w*f[t][e+2]+g*f[t+1][e+2]+u*f[t+2][e+2]+v*f[t+3][e+2],s=w*f[t][e+3]+g*f[t+1][e+3]+u*f[t+2][e+3]+v*f[t+3][e+3],E[c]=m*a+3*(l*r*i+T*p*n)+d*s;return E}:b?function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f,c;e*=3;var p=o*o,d=p*o,T=1-o,l=T*T,m=l*T;for(f=0;f<h.length;f++)c=h[f],a=c[t+1][e]-c[t][e],i=c[t+1][e+1]-c[t][e+1],n=c[t+1][e+2]-c[t][e+2],s=c[t+1][e+3]-c[t][e+3],E[f]=m*a+3*(l*o*i+T*p*n)+d*s;return E}:S?function(E,e,t,r,o){E||(E=[]);var a,i,n,s;t*=3;var f=1-r,c=o*o,p=1-o,d=p*p,T=p*o*2,l=-3*d,m=3*(d-T),x=3*(T-c),A=3*c;for(n=0;n<h.length;n++)s=h[n],a=l*s[t][e]+m*s[t+1][e]+x*s[t+2][e]+A*s[t+3][e],i=l*s[t][e+1]+m*s[t+1][e+1]+x*s[t+2][e+1]+A*s[t+3][e+1],E[n]=f*a+r*i;return E}:function(E,e,t,r,o){E||(E=[]);var a,i,n,s,f=1-r;for(n=0;n<h.length;n++)s=h[n],a=s[t+1][e]-s[t][e],i=s[t+1][e+1]-s[t][e+1],E[n]=f*a+r*i;return E}}}}),$4=He({"src/traces/carpet/set_convert.js"(Y,G){var h=H4(),b=a1().findBin,S=X4(),E=Z4(),e=Y4(),t=K4();G.exports=function(o){var a=o._a,i=o._b,n=a.length,s=i.length,f=o.aaxis,c=o.baxis,p=a[0],d=a[n-1],T=i[0],l=i[s-1],m=a[a.length-1]-a[0],x=i[i.length-1]-i[0],A=m*h.RELATIVE_CULL_TOLERANCE,M=x*h.RELATIVE_CULL_TOLERANCE;p-=A,d+=A,T-=M,l+=M,o.isVisible=function(_,w){return _>p&&_<d&&w>T&&w<l},o.isOccluded=function(_,w){return _<p||_>d||w<T||w>l},o.setScale=function(){var _=o._x,w=o._y,g=S(o._xctrl,o._yctrl,_,w,f.smoothing,c.smoothing);o._xctrl=g[0],o._yctrl=g[1],o.evalxy=E([o._xctrl,o._yctrl],n,s,f.smoothing,c.smoothing),o.dxydi=e([o._xctrl,o._yctrl],f.smoothing,c.smoothing),o.dxydj=t([o._xctrl,o._yctrl],f.smoothing,c.smoothing)},o.i2a=function(_){var w=Math.max(0,Math.floor(_[0]),n-2),g=_[0]-w;return(1-g)*a[w]+g*a[w+1]},o.j2b=function(_){var w=Math.max(0,Math.floor(_[1]),n-2),g=_[1]-w;return(1-g)*i[w]+g*i[w+1]},o.ij2ab=function(_){return[o.i2a(_[0]),o.j2b(_[1])]},o.a2i=function(_){var w=Math.max(0,Math.min(b(_,a),n-2)),g=a[w],u=a[w+1];return Math.max(0,Math.min(n-1,w+(_-g)/(u-g)))},o.b2j=function(_){var w=Math.max(0,Math.min(b(_,i),s-2)),g=i[w],u=i[w+1];return Math.max(0,Math.min(s-1,w+(_-g)/(u-g)))},o.ab2ij=function(_){return[o.a2i(_[0]),o.b2j(_[1])]},o.i2c=function(_,w){return o.evalxy([],_,w)},o.ab2xy=function(_,w,g){if(!g&&(_<a[0]||_>a[n-1]|w<i[0]||w>i[s-1]))return[!1,!1];var u=o.a2i(_),v=o.b2j(w),y=o.evalxy([],u,v);if(g){var R=0,L=0,z=[],F,B,O,I;_<a[0]?(F=0,B=0,R=(_-a[0])/(a[1]-a[0])):_>a[n-1]?(F=n-2,B=1,R=(_-a[n-1])/(a[n-1]-a[n-2])):(F=Math.max(0,Math.min(n-2,Math.floor(u))),B=u-F),w<i[0]?(O=0,I=0,L=(w-i[0])/(i[1]-i[0])):w>i[s-1]?(O=s-2,I=1,L=(w-i[s-1])/(i[s-1]-i[s-2])):(O=Math.max(0,Math.min(s-2,Math.floor(v))),I=v-O),R&&(o.dxydi(z,F,O,B,I),y[0]+=z[0]*R,y[1]+=z[1]*R),L&&(o.dxydj(z,F,O,B,I),y[0]+=z[0]*L,y[1]+=z[1]*L)}return y},o.c2p=function(_,w,g){return[w.c2p(_[0]),g.c2p(_[1])]},o.p2x=function(_,w,g){return[w.p2c(_[0]),g.p2c(_[1])]},o.dadi=function(_){var w=Math.max(0,Math.min(a.length-2,_));return a[w+1]-a[w]},o.dbdj=function(_){var w=Math.max(0,Math.min(i.length-2,_));return i[w+1]-i[w]},o.dxyda=function(_,w,g,u){var v=o.dxydi(null,_,w,g,u),y=o.dadi(_,g);return[v[0]/y,v[1]/y]},o.dxydb=function(_,w,g,u){var v=o.dxydj(null,_,w,g,u),y=o.dbdj(w,u);return[v[0]/y,v[1]/y]},o.dxyda_rough=function(_,w,g){var u=m*(g||.1),v=o.ab2xy(_+u,w,!0),y=o.ab2xy(_-u,w,!0);return[(v[0]-y[0])*.5/u,(v[1]-y[1])*.5/u]},o.dxydb_rough=function(_,w,g){var u=x*(g||.1),v=o.ab2xy(_,w+u,!0),y=o.ab2xy(_,w-u,!0);return[(v[0]-y[0])*.5/u,(v[1]-y[1])*.5/u]},o.dpdx=function(_){return _._m},o.dpdy=function(_){return _._m}}}}),J4=He({"src/traces/carpet/calc.js"(Y,G){var h=Ao(),b=ea().isArray1D,S=N4(),E=U4(),e=j4(),t=V4(),r=q4(),o=F1(),a=G4(),i=z1(),n=$4();G.exports=function(f,c){var p=h.getFromId(f,c.xaxis),d=h.getFromId(f,c.yaxis),T=c.aaxis,l=c.baxis,m=c.x,x=c.y,A=[];m&&b(m)&&A.push("x"),x&&b(x)&&A.push("y"),A.length&&i(c,T,l,"a","b",A);var M=c._a=c._a||c.a,_=c._b=c._b||c.b;m=c._x||c.x,x=c._y||c.y;var w={};if(c._cheater){var g=T.cheatertype==="index"?M.length:M,u=l.cheatertype==="index"?_.length:_;m=S(g,u,c.cheaterslope)}c._x=m=o(m),c._y=x=o(x),a(m,M,_),a(x,M,_),n(c),c.setScale();var v=E(m),y=E(x),R=.5*(v[1]-v[0]),L=.5*(v[1]+v[0]),z=.5*(y[1]-y[0]),F=.5*(y[1]+y[0]),B=1.3;return v=[L-R*B,L+R*B],y=[F-z*B,F+z*B],c._extremes[p._id]=h.findExtremes(p,v,{padded:!0}),c._extremes[d._id]=h.findExtremes(d,y,{padded:!0}),e(c,"a","b"),e(c,"b","a"),t(c,T),t(c,l),w.clipsegments=r(c._xctrl,c._yctrl,T,l),w.x=m,w.y=x,w.a=M,w.b=_,[w]}}}),Q4=He({"src/traces/carpet/index.js"(Y,G){G.exports={attributes:yx(),supplyDefaults:F4(),plot:B4(),calc:J4(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:mf(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),eR=He({"lib/carpet.js"(Y,G){G.exports=Q4()}}),u5=He({"src/traces/scattercarpet/attributes.js"(Y,G){var h=Mv(),b=Cc(),S=Nl(),{hovertemplateAttrs:E,texttemplateAttrs:e,templatefallbackAttrs:t}=Ll(),r=ou(),o=Po().extendFlat,a=b.marker,i=b.line,n=a.line;G.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:o({},b.mode,{dflt:"markers"}),text:o({},b.text,{}),texttemplate:e({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:t({editType:"plot"}),hovertext:o({},b.hovertext,{}),line:{color:i.color,width:i.width,dash:i.dash,backoff:i.backoff,shape:o({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:b.connectgaps,fill:o({},b.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:h(),marker:o({symbol:a.symbol,opacity:a.opacity,maxdisplayed:a.maxdisplayed,angle:a.angle,angleref:a.angleref,standoff:a.standoff,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:o({width:n.width,editType:"calc"},r("marker.line")),gradient:a.gradient,editType:"calc"},r("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:o({},S.hoverinfo,{flags:["a","b","text","name"]}),hoveron:b.hoveron,hovertemplate:E(),hovertemplatefallback:t(),zorder:b.zorder}}}),tR=He({"src/traces/scattercarpet/defaults.js"(Y,G){var h=ea(),b=Xv(),S=mu(),E=av(),e=cv(),t=X0(),r=fv(),o=kv(),a=u5();G.exports=function(n,s,f,c){function p(M,_){return h.coerce(n,s,a,M,_)}p("carpet"),s.xaxis="x",s.yaxis="y";var d=p("a"),T=p("b"),l=Math.min(d.length,T.length);if(!l){s.visible=!1;return}s._length=l,p("text"),p("texttemplate"),p("texttemplatefallback"),p("hovertext");var m=l<b.PTS_LINESONLY?"lines+markers":"lines";p("mode",m),S.hasMarkers(s)&&E(n,s,f,c,p,{gradient:!0}),S.hasLines(s)&&(e(n,s,f,c,p,{backoff:!0}),t(n,s,p),p("connectgaps")),S.hasText(s)&&r(n,s,c,p);var x=[];(S.hasMarkers(s)||S.hasText(s))&&(p("marker.maxdisplayed"),x.push("points")),p("fill"),s.fill!=="none"&&(o(n,s,f,p),S.hasLines(s)||t(n,s,p)),(s.fill==="tonext"||s.fill==="toself")&&x.push("fills");var A=p("hoveron",x.join("+")||"points");A!=="fills"&&(p("hovertemplate"),p("hovertemplatefallback")),p("zorder"),h.coerceSelectionMarkerOpacity(s,p)}}}),rR=He({"src/traces/scattercarpet/format_labels.js"(Y,G){G.exports=function(b,S){var E={},e=S._carpet,t=e.ab2ij([b.a,b.b]),r=Math.floor(t[0]),o=t[0]-r,a=Math.floor(t[1]),i=t[1]-a,n=e.evalxy([],r,a,o,i);return E.yLabel=n[1].toFixed(3),E}}}),_x=He({"src/traces/carpet/lookup_carpetid.js"(Y,G){G.exports=function(h,b){for(var S=h._fullData.length,E,e=0;e<S;e++){var t=h._fullData[e];if(t.index!==b.index&&t.type==="carpet"&&(E||(E=t),t.carpet===b.carpet))return t}return E}}}),aR=He({"src/traces/scattercarpet/calc.js"(Y,G){var h=Ui(),b=hv(),S=Zv(),E=vv(),e=dv().calcMarkerSize,t=_x();G.exports=function(o,a){var i=a._carpetTrace=t(o,a);if(!(!i||!i.visible||i.visible==="legendonly")){var n;a.xaxis=i.xaxis,a.yaxis=i.yaxis;var s=a._length,f=new Array(s),c,p,d=!1;for(n=0;n<s;n++)if(c=a.a[n],p=a.b[n],h(c)&&h(p)){var T=i.ab2xy(+c,+p,!0),l=i.isVisible(+c,+p);l||(d=!0),f[n]={x:T[0],y:T[1],a:c,b:p,vis:l}}else f[n]={x:!1,y:!1};return a._needsCull=d,f[0].carpet=i,f[0].trace=a,e(a,s),b(o,a),S(f,a),E(f,a),f}}}}),nR=He({"src/traces/scattercarpet/plot.js"(Y,G){var h=Z0(),b=Ao(),S=Io();G.exports=function(e,t,r,o){var a,i,n,s=r[0][0].carpet,f=b.getFromId(e,s.xaxis||"x"),c=b.getFromId(e,s.yaxis||"y"),p={xaxis:f,yaxis:c,plot:t.plot};for(a=0;a<r.length;a++)i=r[a][0].trace,i._xA=f,i._yA=c;for(h(e,p,r,o),a=0;a<r.length;a++)i=r[a][0].trace,n=o.selectAll("g.trace"+i.uid+" .js-line"),S.setClipUrl(n,r[a][0].carpet._clipPathId,e)}}}),iR=He({"src/traces/scattercarpet/hover.js"(Y,G){var h=K0(),b=ea().fillText;G.exports=function(E,e,t,r){var o=h(E,e,t,r);if(!o||o[0].index===!1)return;var a=o[0];if(a.index===void 0){var i=1-a.y0/E.ya._length,n=E.xa._length,s=n*i/2,f=n-s;return a.x0=Math.max(Math.min(a.x0,f),s),a.x1=Math.max(Math.min(a.x1,f),s),o}var c=a.cd[a.index];a.a=c.a,a.b=c.b,a.xLabelVal=void 0,a.yLabelVal=void 0;var p=a.trace,d=p._carpet,T=p._module.formatLabels(c,p);a.yLabel=T.yLabel,delete a.text;var l=[];function m(M,_){var w;M.labelprefix&&M.labelprefix.length>0?w=M.labelprefix.replace(/ = $/,""):w=M._hovertitle,l.push(w+": "+_.toFixed(3)+M.labelsuffix)}if(!p.hovertemplate){var x=c.hi||p.hoverinfo,A=x.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&m(d.aaxis,c.a),A.indexOf("b")!==-1&&m(d.baxis,c.b),l.push("y: "+a.yLabel),A.indexOf("text")!==-1&&b(c,p,l),a.extraText=l.join("<br>")}return o}}}),oR=He({"src/traces/scattercarpet/event_data.js"(Y,G){G.exports=function(b,S,E,e,t){var r=e[t];return b.a=r.a,b.b=r.b,b.y=r.y,b}}}),sR=He({"src/traces/scattercarpet/index.js"(Y,G){G.exports={attributes:u5(),supplyDefaults:tR(),colorbar:xh(),formatLabels:rR(),calc:aR(),plot:nR(),style:Gh().style,styleOnSelect:Gh().styleOnSelect,hoverPoints:iR(),selectPoints:$0(),eventData:oR(),moduleType:"trace",name:"scattercarpet",basePlotModule:mf(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),lR=He({"lib/scattercarpet.js"(Y,G){G.exports=sR()}}),c5=He({"src/traces/contourcarpet/attributes.js"(Y,G){var h=eg(),b=ym(),S=ou(),E=Po().extendFlat,e=b.contours;G.exports=E({carpet:{valType:"string",editType:"calc"},z:h.z,a:h.x,a0:h.x0,da:h.dx,b:h.y,b0:h.y0,db:h.dy,text:h.text,hovertext:h.hovertext,transpose:h.transpose,atype:h.xtype,btype:h.ytype,fillcolor:b.fillcolor,autocontour:b.autocontour,ncontours:b.ncontours,contours:{type:e.type,start:e.start,end:e.end,size:e.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:e.showlines,showlabels:e.showlabels,labelfont:e.labelfont,labelformat:e.labelformat,operation:e.operation,value:e.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:b.line.color,width:b.line.width,dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},zorder:b.zorder},S("",{cLetter:"z",autoColorDflt:!1}))}}),f5=He({"src/traces/contourcarpet/defaults.js"(Y,G){var h=ea(),b=D1(),S=c5(),E=Fw(),e=Z1(),t=Y1();G.exports=function(o,a,i,n){function s(d,T){return h.coerce(o,a,S,d,T)}function f(d){return h.coerce2(o,a,S,d)}if(s("carpet"),o.a&&o.b){var c=b(o,a,s,n,"a","b");if(!c){a.visible=!1;return}s("text");var p=s("contours.type")==="constraint";p?E(o,a,s,n,i,{hasHover:!1}):(e(o,a,s,f),t(o,a,s,n,{hasHover:!1}))}else a._defaultColor=i,a._length=null;s("zorder")}}}),uR=He({"src/traces/contourcarpet/calc.js"(Y,G){var h=Eh(),b=ea(),S=z1(),E=F1(),e=O1(),t=B1(),r=xw(),o=f5(),a=_x(),i=Ew();G.exports=function(f,c){var p=c._carpetTrace=a(f,c);if(!(!p||!p.visible||p.visible==="legendonly")){if(!c.a||!c.b){var d=f.data[p.index],T=f.data[c.index];T.a||(T.a=d.a),T.b||(T.b=d.b),o(T,c,c._defaultColor,f._fullLayout)}var l=n(f,c);return i(c,c._z),l}};function n(s,f){var c=f._carpetTrace,p=c.aaxis,d=c.baxis,T,l,m,x,A,M,_;p._minDtick=0,d._minDtick=0,b.isArray1D(f.z)&&S(f,p,d,"a","b",["z"]),T=f._a=f._a||f.a,x=f._b=f._b||f.b,T=T?p.makeCalcdata(f,"_a"):[],x=x?d.makeCalcdata(f,"_b"):[],l=f.a0||0,m=f.da||1,A=f.b0||0,M=f.db||1,_=f._z=E(f._z||f.z,f.transpose),f._emptypoints=t(_),e(_,f._emptypoints);var w=b.maxRowLength(_),g=f.xtype==="scaled"?"":T,u=r(f,g,l,m,w,p),v=f.ytype==="scaled"?"":x,y=r(f,v,A,M,_.length,d),R={a:u,b:y,z:_};return f.contours.type==="levels"&&f.contours.coloring!=="none"&&h(s,f,{vals:_,containerStr:"",cLetter:"z"}),[R]}}}),cR=He({"src/traces/carpet/axis_aligned_line.js"(Y,G){var h=ea().isArrayOrTypedArray;G.exports=function(b,S,E,e){var t,r,o,a,i,n,s,f,c,p,d,T,l,m=h(E)?"a":"b",x=m==="a"?b.aaxis:b.baxis,A=x.smoothing,M=m==="a"?b.a2i:b.b2j,_=m==="a"?E:e,w=m==="a"?e:E,g=m==="a"?S.a.length:S.b.length,u=m==="a"?S.b.length:S.a.length,v=Math.floor(m==="a"?b.b2j(w):b.a2i(w)),y=m==="a"?function(ue){return b.evalxy([],ue,v)}:function(ue){return b.evalxy([],v,ue)};A&&(o=Math.max(0,Math.min(u-2,v)),a=v-o,r=m==="a"?function(ue,oe){return b.dxydi([],ue,o,oe,a)}:function(ue,oe){return b.dxydj([],o,ue,a,oe)});var R=M(_[0]),L=M(_[1]),z=R<L?1:-1,F=(L-R)*1e-8,B=z>0?Math.floor:Math.ceil,O=z>0?Math.ceil:Math.floor,I=z>0?Math.min:Math.max,N=z>0?Math.max:Math.min,U=B(R+F),X=O(L-F);s=y(R);var ee=[[s]];for(t=U;t*z<X*z;t+=z)i=[],d=N(R,t),T=I(L,t+z),l=T-d,n=Math.max(0,Math.min(g-2,Math.floor(.5*(d+T)))),f=y(T),A&&(c=r(n,d-n),p=r(n,T-n),i.push([s[0]+c[0]/3*l,s[1]+c[1]/3*l]),i.push([f[0]-p[0]/3*l,f[1]-p[1]/3*l])),i.push(f),ee.push(i),s=f;return ee}}}),fR=He({"src/traces/contourcarpet/plot.js"(Y,G){var h=_i(),b=s5(),S=l5(),E=Io(),e=ea(),t=Cw(),r=Lw(),o=K1(),a=xm(),i=Iw(),n=Pw(),s=Rw(),f=_x(),c=cR();G.exports=function(g,u,v,y){var R=u.xaxis,L=u.yaxis;e.makeTraceGroups(y,v,"contour").each(function(z){var F=h.select(this),B=z[0],O=B.trace,I=O._carpetTrace=f(g,O),N=g.calcdata[I.index][0];if(!I.visible||I.visible==="legendonly")return;var U=B.a,X=B.b,ee=O.contours,ue=n(ee,u,B),oe=ee.type==="constraint",le=ee._operation,V=oe?le==="="?"lines":"fill":ee.coloring;function J(Ie){var Le=I.ab2xy(Ie[0],Ie[1],!0);return[R.c2p(Le[0]),L.c2p(Le[1])]}var te=[[U[0],X[X.length-1]],[U[U.length-1],X[X.length-1]],[U[U.length-1],X[0]],[U[0],X[0]]];t(ue);var Z=(U[U.length-1]-U[0])*1e-8,se=(X[X.length-1]-X[0])*1e-8;r(ue,Z,se);var Q=ue;ee.type==="constraint"&&(Q=i(ue,le)),p(ue,J);var q,re,ae,fe,be=[];for(fe=N.clipsegments.length-1;fe>=0;fe--)q=N.clipsegments[fe],re=b([],q.x,R.c2p),ae=b([],q.y,L.c2p),re.reverse(),ae.reverse(),be.push(S(re,ae,q.bicubic));var Me="M"+be.join("L")+"Z";A(F,N.clipsegments,R,L,oe,V),M(O,F,R,L,Q,te,J,I,N,V,Me),d(F,ue,g,B,ee,u,I),E.setClipUrl(F,I._clipPathId,g)})};function p(w,g){var u,v,y,R,L,z,F,B,O;for(u=0;u<w.length;u++){for(R=w[u],L=R.pedgepaths=[],z=R.ppaths=[],v=0;v<R.edgepaths.length;v++){for(O=R.edgepaths[v],F=[],y=0;y<O.length;y++)F[y]=g(O[y]);L.push(F)}for(v=0;v<R.paths.length;v++){for(O=R.paths[v],B=[],y=0;y<O.length;y++)B[y]=g(O[y]);z.push(B)}}}function d(w,g,u,v,y,R,L){var z=u._context.staticPlot,F=e.ensureSingle(w,"g","contourlines"),B=y.showlines!==!1,O=y.showlabels,I=B&&O,N=o.createLines(F,B||O,g,z),U=o.createLineClip(F,I,u,v.trace.uid),X=w.selectAll("g.contourlabels").data(O?[0]:[]);if(X.exit().remove(),X.enter().append("g").classed("contourlabels",!0),O){var ee=R.xaxis,ue=R.yaxis,oe=ee._length,le=ue._length,V=[[[0,0],[oe,0],[oe,le],[0,le]]],J=[];e.clearLocationCache();var te=o.labelFormatter(u,v),Z=E.tester.append("text").attr("data-notex",1).call(E.font,y.labelfont),se={left:0,right:oe,center:oe/2,top:0,bottom:le,middle:le/2},Q=Math.sqrt(oe*oe+le*le),q=a.LABELDISTANCE*Q/Math.max(1,g.length/a.LABELINCREASE);N.each(function(re){var ae=o.calcTextOpts(re.level,te,Z,u);h.select(this).selectAll("path").each(function(fe){var be=this,Me=e.getVisibleSegment(be,se,ae.height/2);if(Me&&(T(be,fe,re,Me,L,ae.height),!(Me.len<(ae.width+ae.height)*a.LABELMIN)))for(var Ie=Math.min(Math.ceil(Me.len/q),a.LABELMAX),Le=0;Le<Ie;Le++){var je=o.findBestTextLocation(be,Me,ae,J,se);if(!je)break;o.addLabelData(je,ae,J,V)}})}),Z.remove(),o.drawLabels(X,J,u,U,I?V:null)}O&&!B&&N.remove()}function T(w,g,u,v,y,R){for(var L,z=0;z<u.pedgepaths.length;z++)g===u.pedgepaths[z]&&(L=u.edgepaths[z]);if(!L)return;var F=y.a[0],B=y.a[y.a.length-1],O=y.b[0],I=y.b[y.b.length-1];function N(oe,le){var V=0,J,te=.1;return(Math.abs(oe[0]-F)<te||Math.abs(oe[0]-B)<te)&&(J=m(y.dxydb_rough(oe[0],oe[1],te)),V=Math.max(V,R*x(le,J)/2)),(Math.abs(oe[1]-O)<te||Math.abs(oe[1]-I)<te)&&(J=m(y.dxyda_rough(oe[0],oe[1],te)),V=Math.max(V,R*x(le,J)/2)),V}var U=l(w,0,1),X=l(w,v.total,v.total-1),ee=N(L[0],U),ue=v.total-N(L[L.length-1],X);v.min<ee&&(v.min=ee),v.max>ue&&(v.max=ue),v.len=v.max-v.min}function l(w,g,u){var v=w.getPointAtLength(g),y=w.getPointAtLength(u),R=y.x-v.x,L=y.y-v.y,z=Math.sqrt(R*R+L*L);return[R/z,L/z]}function m(w){var g=Math.sqrt(w[0]*w[0]+w[1]*w[1]);return[w[0]/g,w[1]/g]}function x(w,g){var u=Math.abs(w[0]*g[0]+w[1]*g[1]),v=Math.sqrt(1-u*u);return v/u}function A(w,g,u,v,y,R){var L,z,F,B,O=e.ensureSingle(w,"g","contourbg"),I=O.selectAll("path").data(R==="fill"&&!y?[0]:[]);I.enter().append("path"),I.exit().remove();var N=[];for(B=0;B<g.length;B++)L=g[B],z=b([],L.x,u.c2p),F=b([],L.y,v.c2p),N.push(S(z,F,L.bicubic));I.attr("d","M"+N.join("L")+"Z").style("stroke","none")}function M(w,g,u,v,y,R,L,z,F,B,O){var I=B==="fill";I&&s(y,w.contours);var N=e.ensureSingle(g,"g","contourfill"),U=N.selectAll("path").data(I?y:[]);U.enter().append("path"),U.exit().remove(),U.each(function(X){var ee=(X.prefixBoundary?O:"")+_(w,X,R,L,z,F,u,v);ee?h.select(this).attr("d",ee).style("stroke","none"):h.select(this).remove()})}function _(w,g,u,v,y,R,L,z){var F,B="",O=g.edgepaths.map(function(ae,fe){return fe}),I=!0,N,U,X,ee,ue,oe,le=Math.abs(u[0][0]-u[2][0])*1e-4,V=Math.abs(u[0][1]-u[2][1])*1e-4;function J(ae){return Math.abs(ae[1]-u[0][1])<V}function te(ae){return Math.abs(ae[1]-u[2][1])<V}function Z(ae){return Math.abs(ae[0]-u[0][0])<le}function se(ae){return Math.abs(ae[0]-u[2][0])<le}function Q(ae,fe){var be,Me,Ie,Le,je="";for(J(ae)&&!se(ae)||te(ae)&&!Z(ae)?(Le=y.aaxis,Ie=c(y,R,[ae[0],fe[0]],.5*(ae[1]+fe[1]))):(Le=y.baxis,Ie=c(y,R,.5*(ae[0]+fe[0]),[ae[1],fe[1]])),be=1;be<Ie.length;be++)for(je+=Le.smoothing?"C":"L",Me=0;Me<Ie[be].length;Me++){var et=Ie[be][Me];je+=[L.c2p(et[0]),z.c2p(et[1])]+" "}return je}for(F=0,N=null;O.length;){var q=g.edgepaths[F][0];for(N&&(B+=Q(N,q)),oe=E.smoothopen(g.edgepaths[F].map(v),g.smoothing),B+=I?oe:oe.replace(/^M/,"L"),O.splice(O.indexOf(F),1),N=g.edgepaths[F][g.edgepaths[F].length-1],ee=-1,X=0;X<4;X++){if(!N){e.log("Missing end?",F,g);break}for(J(N)&&!se(N)?U=u[1]:Z(N)?U=u[0]:te(N)?U=u[3]:se(N)&&(U=u[2]),ue=0;ue<g.edgepaths.length;ue++){var re=g.edgepaths[ue][0];Math.abs(N[0]-U[0])<le?Math.abs(N[0]-re[0])<le&&(re[1]-N[1])*(U[1]-re[1])>=0&&(U=re,ee=ue):Math.abs(N[1]-U[1])<V?Math.abs(N[1]-re[1])<V&&(re[0]-N[0])*(U[0]-re[0])>=0&&(U=re,ee=ue):e.log("endpt to newendpt is not vert. or horz.",N,U,re)}if(ee>=0)break;B+=Q(N,U),N=U}if(ee===g.edgepaths.length){e.log("unclosed perimeter path");break}F=ee,I=O.indexOf(F)===-1,I&&(F=O[0],B+=Q(N,U)+"Z",N=null)}for(F=0;F<g.paths.length;F++)B+=E.smoothclosed(g.paths[F].map(v),g.smoothing);return B}}}),hR=He({"src/traces/contourcarpet/index.js"(Y,G){G.exports={attributes:c5(),supplyDefaults:f5(),colorbar:J1(),calc:uR(),plot:fR(),style:$1(),moduleType:"trace",name:"contourcarpet",basePlotModule:mf(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}}),vR=He({"lib/contourcarpet.js"(Y,G){G.exports=hR()}}),xx=He({"src/traces/ohlc/attributes.js"(Y,G){var h=ea().extendFlat,b=Cc(),S=Ec().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:e}=Ll(),t=nh().dash,r=O0(),o=tg(),a=o.INCREASING.COLOR,i=o.DECREASING.COLOR,n=b.line;function s(f){return{line:{color:h({},n.color,{dflt:f}),width:n.width,dash:t,editType:"style"},editType:"style"}}G.exports={xperiod:b.xperiod,xperiod0:b.xperiod0,xperiodalignment:b.xperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:h({},n.width,{}),dash:h({},t,{}),editType:"style"},increasing:s(a),decreasing:s(i),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:E({},{keys:["open","high","low","close"]}),hovertemplatefallback:e(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:h({},r.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:b.zorder}}}),h5=He({"src/traces/ohlc/ohlc_defaults.js"(Y,G){var h=ji(),b=ea();G.exports=function(E,e,t,r){var o=t("x"),a=t("open"),i=t("high"),n=t("low"),s=t("close");t("hoverlabel.split");var f=h.getComponentMethod("calendars","handleTraceDefaults");if(f(E,e,["x"],r),!!(a&&i&&n&&s)){var c=Math.min(a.length,i.length,n.length,s.length);return o&&(c=Math.min(c,b.minRowLength(o))),e._length=c,c}}}}),dR=He({"src/traces/ohlc/defaults.js"(Y,G){var h=ea(),b=h5(),S=Ev(),E=xx();G.exports=function(r,o,a,i){function n(f,c){return h.coerce(r,o,E,f,c)}var s=b(r,o,n,i);if(!s){o.visible=!1;return}S(r,o,i,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),n("line.dash"),e(r,o,n,"increasing"),e(r,o,n,"decreasing"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("tickwidth"),i._requestRangeslider[o.xaxis]=!0,n("zorder")};function e(t,r,o,a){o(a+".line.color"),o(a+".line.width",r.line.width),o(a+".line.dash",r.line.dash)}}}),v5=He({"src/traces/ohlc/calc.js"(Y,G){var h=ea(),b=h._,S=Ao(),E=Cv(),e=Qo().BADNUM;function t(i,n){var s=S.getFromId(i,n.xaxis),f=S.getFromId(i,n.yaxis),c=a(i,s,n),p=n._minDiff;n._minDiff=null;var d=n._origX;n._origX=null;var T=n._xcalc;n._xcalc=null;var l=o(i,n,d,T,f,r);return n._extremes[s._id]=S.findExtremes(s,T,{vpad:p/2}),l.length?(h.extendFlat(l[0].t,{wHover:p/2,tickLen:c}),l):[{t:{empty:!0}}]}function r(i,n,s,f){return{o:i,h:n,l:s,c:f}}function o(i,n,s,f,c,p){for(var d=c.makeCalcdata(n,"open"),T=c.makeCalcdata(n,"high"),l=c.makeCalcdata(n,"low"),m=c.makeCalcdata(n,"close"),x=h.isArrayOrTypedArray(n.text),A=h.isArrayOrTypedArray(n.hovertext),M=!0,_=null,w=!!n.xperiodalignment,g=[],u=0;u<f.length;u++){var v=f[u],y=d[u],R=T[u],L=l[u],z=m[u];if(v!==e&&y!==e&&R!==e&&L!==e&&z!==e){z===y?_!==null&&z!==_&&(M=z>_):M=z>y,_=z;var F=p(y,R,L,z);F.pos=v,F.yc=(y+z)/2,F.i=u,F.dir=M?"increasing":"decreasing",F.x=F.pos,F.y=[L,R],w&&(F.orig_p=s[u]),x&&(F.tx=n.text[u]),A&&(F.htx=n.hovertext[u]),g.push(F)}else g.push({pos:v,empty:!0})}return n._extremes[c._id]=S.findExtremes(c,h.concat(l,T),{padded:!0}),g.length&&(g[0].t={labels:{open:b(i,"open:")+" ",high:b(i,"high:")+" ",low:b(i,"low:")+" ",close:b(i,"close:")+" "}}),g}function a(i,n,s){var f=s._minDiff;if(!f){var c=i._fullData,p=[];f=1/0;var d;for(d=0;d<c.length;d++){var T=c[d];if(T.type==="ohlc"&&T.visible===!0&&T.xaxis===n._id){p.push(T);var l=n.makeCalcdata(T,"x");T._origX=l;var m=E(s,n,"x",l).vals;T._xcalc=m;var x=h.distinctVals(m).minDiff;x&&isFinite(x)&&(f=Math.min(f,x))}}for(f===1/0&&(f=1),d=0;d<p.length;d++)p[d]._minDiff=f}return f*s.tickwidth}G.exports={calc:t,calcCommon:o}}}),pR=He({"src/traces/ohlc/plot.js"(Y,G){var h=_i(),b=ea();G.exports=function(E,e,t,r){var o=e.yaxis,a=e.xaxis,i=!!a.rangebreaks;b.makeTraceGroups(r,t,"trace ohlc").each(function(n){var s=h.select(this),f=n[0],c=f.t,p=f.trace;if(p.visible!==!0||c.empty){s.remove();return}var d=c.tickLen,T=s.selectAll("path").data(b.identity);T.enter().append("path"),T.exit().remove(),T.attr("d",function(l){if(l.empty)return"M0,0Z";var m=a.c2p(l.pos-d,!0),x=a.c2p(l.pos+d,!0),A=i?(m+x)/2:a.c2p(l.pos,!0),M=o.c2p(l.o,!0),_=o.c2p(l.h,!0),w=o.c2p(l.l,!0),g=o.c2p(l.c,!0);return"M"+m+","+M+"H"+A+"M"+A+","+_+"V"+w+"M"+x+","+g+"H"+A})})}}}),gR=He({"src/traces/ohlc/style.js"(Y,G){var h=_i(),b=Io(),S=Di();G.exports=function(e,t,r){var o=r||h.select(e).selectAll("g.ohlclayer").selectAll("g.trace");o.style("opacity",function(a){return a[0].trace.opacity}),o.each(function(a){var i=a[0].trace;h.select(this).selectAll("path").each(function(n){if(!n.empty){var s=i[n.dir].line;h.select(this).style("fill","none").call(S.stroke,s.color).call(b.dashLine,s.dash,s.width).style("opacity",i.selectedpoints&&!n.selected?.3:1)}})})}}}),d5=He({"src/traces/ohlc/hover.js"(Y,G){var h=Ao(),b=ea(),S=kc(),E=Di(),e=ea().fillText,t=tg(),r={increasing:t.INCREASING.SYMBOL,decreasing:t.DECREASING.SYMBOL};function o(s,f,c,p){var d=s.cd,T=d[0].trace;return T.hoverlabel.split?i(s,f,c,p):n(s,f,c,p)}function a(s,f,c,p){var d=s.cd,T=s.xa,l=d[0].trace,m=d[0].t,x=l.type,A=x==="ohlc"?"l":"min",M=x==="ohlc"?"h":"max",_,w,g=m.bPos||0,u=function(X){return X.pos+g-f},v=m.bdPos||m.tickLen,y=m.wHover,R=Math.min(1,v/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));_=s.maxHoverDistance-R,w=s.maxSpikeDistance-R;function L(X){var ee=u(X);return S.inbox(ee-y,ee+y,_)}function z(X){var ee=X[A],ue=X[M];return ee===ue||S.inbox(ee-c,ue-c,_)}function F(X){return(L(X)+z(X))/2}var B=S.getDistanceFunction(p,L,z,F);if(S.getClosest(d,B,s),s.index===!1)return null;var O=d[s.index];if(O.empty)return null;var I=O.dir,N=l[I],U=N.line.color;return E.opacity(U)&&N.line.width?s.color=U:s.color=N.fillcolor,s.x0=T.c2p(O.pos+g-v,!0),s.x1=T.c2p(O.pos+g+v,!0),s.xLabelVal=O.orig_p!==void 0?O.orig_p:O.pos,s.spikeDistance=F(O)*w/_,s.xSpike=T.c2p(O.pos,!0),s}function i(s,f,c,p){var d=s.cd,T=s.ya,l=d[0].trace,m=d[0].t,x=[],A=a(s,f,c,p);if(!A)return[];var M=d[A.index],_=M.hi||l.hoverinfo||"";if(_==="none"||_==="skip")return[];for(var w=["high","open","close","low"],g={},u=0;u<w.length;u++){var v=w[u],y=l[v][A.index],R=T.c2p(y,!0),L;y in g?(L=g[y],L.yLabel+="<br>"+m.labels[v]+h.hoverLabelText(T,y,l.yhoverformat)):(L=b.extendFlat({},A),L.y0=L.y1=R,L.yLabelVal=y,L.yLabel=m.labels[v]+h.hoverLabelText(T,y,l.yhoverformat),L.name="",x.push(L),g[y]=L)}return x}function n(s,f,c,p){var d=s.cd,T=s.ya,l=d[0].trace,m=d[0].t,x=a(s,f,c,p);if(!x)return[];var A=x.index,M=d[A],_=x.index=M.i,w=M.dir;function g(F){return m.labels[F]+h.hoverLabelText(T,l[F][_],l.yhoverformat)}var u=M.hi||l.hoverinfo||"",v=u.split("+"),y=u==="all",R=y||v.indexOf("y")!==-1,L=y||v.indexOf("text")!==-1,z=R?[g("open"),g("high"),g("low"),g("close")+" "+r[w]]:[];return L&&e(M,l,z),x.extraText=z.join("<br>"),x.y0=x.y1=T.c2p(M.yc,!0),[x]}G.exports={hoverPoints:o,hoverSplit:i,hoverOnPoints:n}}}),p5=He({"src/traces/ohlc/select.js"(Y,G){G.exports=function(b,S){var E=b.cd,e=b.xaxis,t=b.yaxis,r=[],o,a=E[0].t.bPos||0;if(S===!1)for(o=0;o<E.length;o++)E[o].selected=0;else for(o=0;o<E.length;o++){var i=E[o];S.contains([e.c2p(i.pos+a),t.c2p(i.yc)],null,i.i,b)?(r.push({pointNumber:i.i,x:e.c2d(i.pos),y:t.c2d(i.yc)}),i.selected=1):i.selected=0}return r}}}),mR=He({"src/traces/ohlc/index.js"(Y,G){G.exports={moduleType:"trace",name:"ohlc",basePlotModule:mf(),categories:["cartesian","svg","showLegend"],meta:{},attributes:xx(),supplyDefaults:dR(),calc:v5().calc,plot:pR(),style:gR(),hoverPoints:d5().hoverPoints,selectPoints:p5()}}}),yR=He({"lib/ohlc.js"(Y,G){G.exports=mR()}}),g5=He({"src/traces/candlestick/attributes.js"(Y,G){var h=ea().extendFlat,b=Ec().axisHoverFormat,S=xx(),E=dm();function e(t){return{line:{color:h({},E.line.color,{dflt:t}),width:E.line.width,editType:"style"},fillcolor:E.fillcolor,editType:"style"}}G.exports={xperiod:S.xperiod,xperiod0:S.xperiod0,xperiodalignment:S.xperiodalignment,xhoverformat:b("x"),yhoverformat:b("y"),x:S.x,open:S.open,high:S.high,low:S.low,close:S.close,line:{width:h({},E.line.width,{}),editType:"style"},increasing:e(S.increasing.line.color.dflt),decreasing:e(S.decreasing.line.color.dflt),text:S.text,hovertext:S.hovertext,hovertemplate:S.hovertemplate,hovertemplatefallback:S.hovertemplatefallback,whiskerwidth:h({},E.whiskerwidth,{dflt:0}),hoverlabel:S.hoverlabel,zorder:E.zorder}}}),_R=He({"src/traces/candlestick/defaults.js"(Y,G){var h=ea(),b=Di(),S=h5(),E=Ev(),e=g5();G.exports=function(o,a,i,n){function s(c,p){return h.coerce(o,a,e,c,p)}var f=S(o,a,s,n);if(!f){a.visible=!1;return}E(o,a,n,s,{x:!0}),s("xhoverformat"),s("yhoverformat"),s("line.width"),t(o,a,s,"increasing"),t(o,a,s,"decreasing"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),s("whiskerwidth"),n._requestRangeslider[a.xaxis]=!0,s("zorder")};function t(r,o,a,i){var n=a(i+".line.color");a(i+".line.width",o.line.width),a(i+".fillcolor",b.addOpacity(n,.5))}}}),xR=He({"src/traces/candlestick/calc.js"(Y,G){var h=ea(),b=Ao(),S=Cv(),E=v5().calcCommon;G.exports=function(t,r){var o=t._fullLayout,a=b.getFromId(t,r.xaxis),i=b.getFromId(t,r.yaxis),n=a.makeCalcdata(r,"x"),s=S(r,a,"x",n).vals,f=E(t,r,n,s,i,e);return f.length?(h.extendFlat(f[0].t,{num:o._numBoxes,dPos:h.distinctVals(s).minDiff/2,posLetter:"x",valLetter:"y"}),o._numBoxes++,f):[{t:{empty:!0}}]};function e(t,r,o,a){return{min:o,q1:Math.min(t,a),med:a,q3:Math.max(t,a),max:r}}}}),bR=He({"src/traces/candlestick/index.js"(Y,G){G.exports={moduleType:"trace",name:"candlestick",basePlotModule:mf(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:g5(),layoutAttributes:pm(),supplyLayoutDefaults:L1().supplyLayoutDefaults,crossTraceCalc:P1().crossTraceCalc,supplyDefaults:_R(),calc:xR(),plot:I1().plot,layerName:"boxlayer",style:R1().style,hoverPoints:d5().hoverPoints,selectPoints:p5()}}}),wR=He({"lib/candlestick.js"(Y,G){G.exports=bR()}}),m5=He({"src/plots/polar/set_convert.js"(Y,G){var h=ea(),b=Wv(),S=h.deg2rad,E=h.rad2deg;G.exports=function(i,n,s){switch(b(i,s),i._id){case"x":case"radialaxis":e(i,n);break;case"angularaxis":o(i,n);break}};function e(a,i){var n=i._subplot;a.setGeometry=function(){var s=a._rl[0],f=a._rl[1],c=n.innerRadius,p=(n.radius-c)/(f-s),d=c/p,T=s>f?function(l){return l<=0}:function(l){return l>=0};a.c2g=function(l){var m=a.c2l(l)-s;return(T(m)?m:0)+d},a.g2c=function(l){return a.l2c(l+s-d)},a.g2p=function(l){return l*p},a.c2p=function(l){return a.g2p(a.c2g(l))}}}function t(a,i){return i==="degrees"?S(a):a}function r(a,i){return i==="degrees"?E(a):a}function o(a,i){var n=a.type;if(n==="linear"){var s=a.d2c,f=a.c2d;a.d2c=function(c,p){return t(s(c),p)},a.c2d=function(c,p){return f(r(c,p))}}a.makeCalcdata=function(c,p){var d=c[p],T=c._length,l,m,x=function(g){return a.d2c(g,c.thetaunit)};if(d)for(l=new Array(T),m=0;m<T;m++)l[m]=x(d[m]);else{var A=p+"0",M="d"+p,_=A in c?x(c[A]):0,w=c[M]?x(c[M]):(a.period||2*Math.PI)/T;for(l=new Array(T),m=0;m<T;m++)l[m]=_+m*w}return l},a.setGeometry=function(){var c=i.sector,p=c.map(S),d={clockwise:-1,counterclockwise:1}[a.direction],T=S(a.rotation),l=function(u){return d*u+T},m=function(u){return(u-T)/d},x,A,M,_;switch(n){case"linear":A=x=h.identity,_=S,M=E,a.range=h.isFullCircle(p)?[c[0],c[0]+360]:p.map(m).map(E);break;case"category":var w=a._categories.length,g=a.period?Math.max(a.period,w):w;g===0&&(g=1),A=_=function(u){return u*2*Math.PI/g},x=M=function(u){return u*g/Math.PI/2},a.range=[0,g];break}a.c2g=function(u){return l(A(u))},a.g2c=function(u){return x(m(u))},a.t2g=function(u){return l(_(u))},a.g2t=function(u){return M(m(u))}}}}}),bx=He({"src/plots/polar/constants.js"(Y,G){G.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}}}),wx=He({"src/plots/polar/helpers.js"(Y,G){var h=ea(),b=sm().tester,S=h.findIndexOfMin,E=h.isAngleInsideSector,e=h.angleDelta,t=h.angleDist;function r(m,x,A,M,_){if(!E(x,M))return!1;var w,g;A[0]<A[1]?(w=A[0],g=A[1]):(w=A[1],g=A[0]);var u=b(s(w,M[0],M[1],_)),v=b(s(g,M[0],M[1],_)),y=[m*Math.cos(x),m*Math.sin(x)];return v.contains(y)&&!u.contains(y)}function o(m,x,A,M){var _,w,g=M[0],u=M[1],v=p(Math.sin(x)-Math.sin(m)),y=p(Math.cos(x)-Math.cos(m)),R=Math.tan(A),L=p(1/R),z=v/y,F=u-z*g;return L?v&&y?(_=F/(R-z),w=R*_):y?(_=u*L,w=u):(_=g,w=g*R):v&&y?(_=0,w=F):y?(_=0,w=u):_=w=NaN,[_,w]}function a(m,x,A,M){var _=-x*A,w=x*x+1,g=2*(x*_-A),u=_*_+A*A-m*m,v=Math.sqrt(g*g-4*w*u),y=(-g+v)/(2*w),R=(-g-v)/(2*w);return[[y,x*y+_+M],[R,x*R+_+M]]}function i(m,x){var A=x.length,M=new Array(A+1),_;for(_=0;_<A;_++){var w=x[_];M[_]=[m*Math.cos(w),m*Math.sin(w)]}return M[_]=M[0].slice(),M}function n(m,x,A,M){var _=M.length,w=[],g,u;function v(N){return[m*Math.cos(N),m*Math.sin(N)]}function y(N,U,X){return o(N,U,X,v(N))}function R(N){return h.mod(N,_)}function L(N){return E(N,[x,A])}var z=S(M,function(N){return L(N)?t(N,x):1/0}),F=y(M[z],M[R(z-1)],x);for(w.push(F),g=z,u=0;u<_;g++,u++){var B=M[R(g)];if(!L(B))break;w.push(v(B))}var O=S(M,function(N){return L(N)?t(N,A):1/0}),I=y(M[O],M[R(O+1)],A);return w.push(I),w.push([0,0]),w.push(w[0].slice()),w}function s(m,x,A,M){return h.isFullCircle([x,A])?i(m,M):n(m,x,A,M)}function f(m,x,A,M){for(var _=1/0,w=1/0,g=s(m,x,A,M),u=0;u<g.length;u++){var v=g[u];_=Math.min(_,v[0]),w=Math.min(w,-v[1])}return[_,w]}function c(m,x){var A=function(w){var g=e(w,m);return g>0?g:1/0},M=S(x,A),_=h.mod(M+1,x.length);return[x[M],x[_]]}function p(m){return Math.abs(m)>1e-10?m:0}function d(m,x,A){x=x||0,A=A||0;for(var M=m.length,_=new Array(M),w=0;w<M;w++){var g=m[w];_[w]=[x+g[0],A-g[1]]}return _}function T(m,x,A,M,_,w){var g=s(m,x,A,M);return"M"+d(g,_,w).join("L")}function l(m,x,A,M,_,w,g){var u,v;m<x?(u=m,v=x):(u=x,v=m);var y=d(s(u,A,M,_),w,g),R=d(s(v,A,M,_),w,g);return"M"+R.reverse().join("L")+"M"+y.join("L")}G.exports={isPtInsidePolygon:r,findPolygonOffset:f,findEnclosingVertexAngles:c,findIntersectionXY:o,findXYatLength:a,clampTiny:p,pathPolygon:T,pathPolygonAnnulus:l}}}),y5=He({"src/plots/smith/helpers.js"(Y,G){function h(r){return r<0?-1:r>0?1:0}function b(r){var o=r[0],a=r[1];if(!isFinite(o)||!isFinite(a))return[1,0];var i=(o+1)*(o+1)+a*a;return[(o*o+a*a-1)/i,2*a/i]}function S(r,o){var a=o[0],i=o[1];return[a*r.radius+r.cx,-i*r.radius+r.cy]}function E(r,o){return o*r.radius}function e(r,o,a,i){var n=S(r,b([a,o])),s=n[0],f=n[1],c=S(r,b([i,o])),p=c[0],d=c[1];if(o===0)return["M"+s+","+f,"L"+p+","+d].join(" ");var T=E(r,1/Math.abs(o));return["M"+s+","+f,"A"+T+","+T+" 0 0,"+(o<0?1:0)+" "+p+","+d].join(" ")}function t(r,o,a,i){var n=E(r,1/(o+1)),s=S(r,b([o,a])),f=s[0],c=s[1],p=S(r,b([o,i])),d=p[0],T=p[1];if(h(a)!==h(i)){var l=S(r,b([o,0])),m=l[0],x=l[1];return["M"+f+","+c,"A"+n+","+n+" 0 0,"+(0<a?0:1)+" "+m+","+x,"A"+n+","+n+" 0 0,"+(i<0?0:1)+d+","+T].join(" ")}return["M"+f+","+c,"A"+n+","+n+" 0 0,"+(i<a?0:1)+" "+d+","+T].join(" ")}G.exports={smith:b,reactanceArc:e,resistanceArc:t,smithTransform:S}}}),_5=He({"src/plots/polar/polar.js"(Y,G){var h=_i(),b=Zf(),S=ji(),E=ea(),e=E.strRotate,t=E.strTranslate,r=Di(),o=Io(),a=nc(),i=Ao(),n=Wv(),s=m5(),f=Tv().doAutoRange,c=Gb(),p=kh(),d=kc(),T=Dp(),l=Xc().prepSelect,m=Xc().selectOnClick,x=Xc().clearOutline,A=Av(),M=nm(),_=om().redrawReglTraces,w=Nf().MID_SHIFT,g=bx(),u=wx(),v=y5(),y=v.smith,R=v.reactanceArc,L=v.resistanceArc,z=v.smithTransform,F=E._,B=E.mod,O=E.deg2rad,I=E.rad2deg;function N(le,V,J){this.isSmith=J||!1,this.id=V,this.gd=le,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var te=le._fullLayout,Z="clip"+te._uid+V;this.clipIds.forTraces=Z+"-for-traces",this.clipPaths.forTraces=te._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=te["_"+(J?"smith":"polar")+"layer"].append("g").attr("class",V),this.getHole=function(se){return this.isSmith?0:se.hole},this.getSector=function(se){return this.isSmith?[0,360]:se.sector},this.getRadial=function(se){return this.isSmith?se.realaxis:se.radialaxis},this.getAngular=function(se){return this.isSmith?se.imaginaryaxis:se.angularaxis},J||(this.radialTickLayout=null,this.angularTickLayout=null)}var U=N.prototype;G.exports=function(V,J,te){return new N(V,J,te)},U.plot=function(le,V){for(var J=this,te=V[J.id],Z=!1,se=0;se<le.length;se++){var Q=le[se][0].trace;if(Q.cliponaxis===!1){Z=!0;break}}J._hasClipOnAxisFalse=Z,J.updateLayers(V,te),J.updateLayout(V,te),a.generalUpdatePerTraceModule(J.gd,J,le,te),J.updateFx(V,te),J.isSmith&&(delete te.realaxis.range,delete te.imaginaryaxis.range)},U.updateLayers=function(le,V){var J=this,te=J.isSmith,Z=J.layers,se=J.getRadial(V),Q=J.getAngular(V),q=g.layerNames,re=q.indexOf("frontplot"),ae=q.slice(0,re),fe=Q.layer==="below traces",be=se.layer==="below traces";fe&&ae.push("angular-line"),be&&ae.push("radial-line"),fe&&ae.push("angular-axis"),be&&ae.push("radial-axis"),ae.push("frontplot"),fe||ae.push("angular-line"),be||ae.push("radial-line"),fe||ae.push("angular-axis"),be||ae.push("radial-axis");var Me=(te?"smith":"polar")+"sublayer",Ie=J.framework.selectAll("."+Me).data(ae,String);Ie.enter().append("g").attr("class",function(Le){return Me+" "+Le}).each(function(Le){var je=Z[Le]=h.select(this);switch(Le){case"frontplot":te||je.append("g").classed("barlayer",!0),je.append("g").classed("scatterlayer",!0);break;case"backplot":je.append("g").classed("maplayer",!0);break;case"plotbg":Z.bg=je.append("path");break;case"radial-grid":je.style("fill","none");break;case"angular-grid":je.style("fill","none");break;case"radial-line":je.append("line").style("fill","none");break;case"angular-line":je.append("path").style("fill","none");break}}),Ie.order()},U.updateLayout=function(le,V){var J=this,te=J.layers,Z=le._size,se=J.getRadial(V),Q=J.getAngular(V),q=V.domain.x,re=V.domain.y;J.xOffset=Z.l+Z.w*q[0],J.yOffset=Z.t+Z.h*(1-re[1]);var ae=J.xLength=Z.w*(q[1]-q[0]),fe=J.yLength=Z.h*(re[1]-re[0]),be=J.getSector(V);J.sectorInRad=be.map(O);var Me=J.sectorBBox=ee(be),Ie=Me[2]-Me[0],Le=Me[3]-Me[1],je=fe/ae,et=Math.abs(Le/Ie),rt,Je,Ze,Ee,xe;je>et?(rt=ae,Je=ae*et,xe=(fe-Je)/Z.h/2,Ze=[q[0],q[1]],Ee=[re[0]+xe,re[1]-xe]):(rt=fe/et,Je=fe,xe=(ae-rt)/Z.w/2,Ze=[q[0]+xe,q[1]-xe],Ee=[re[0],re[1]]),J.xLength2=rt,J.yLength2=Je,J.xDomain2=Ze,J.yDomain2=Ee;var he=J.xOffset2=Z.l+Z.w*Ze[0],De=J.yOffset2=Z.t+Z.h*(1-Ee[1]),tt=J.radius=rt/Ie,nt=J.innerRadius=J.getHole(V)*tt,$e=J.cx=he-tt*Me[0],Et=J.cy=De+tt*Me[3],Ct=J.cxx=$e-he,jt=J.cyy=Et-De,Wt=se.side,dr;Wt==="counterclockwise"?(dr=Wt,Wt="top"):Wt==="clockwise"&&(dr=Wt,Wt="bottom"),J.radialAxis=J.mockAxis(le,V,se,{_id:"x",side:Wt,_trueSide:dr,domain:[nt/Z.w,tt/Z.w]}),J.angularAxis=J.mockAxis(le,V,Q,{side:"right",domain:[0,Math.PI],autorange:!1}),J.doAutoRange(le,V),J.updateAngularAxis(le,V),J.updateRadialAxis(le,V),J.updateRadialAxisTitle(le,V),J.xaxis=J.mockCartesianAxis(le,V,{_id:"x",domain:Ze}),J.yaxis=J.mockCartesianAxis(le,V,{_id:"y",domain:Ee});var vr=J.pathSubplot();J.clipPaths.forTraces.select("path").attr("d",vr).attr("transform",t(Ct,jt)),te.frontplot.attr("transform",t(he,De)).call(o.setClipUrl,J._hasClipOnAxisFalse?null:J.clipIds.forTraces,J.gd),te.bg.attr("d",vr).attr("transform",t($e,Et)).call(r.fill,V.bgcolor)},U.mockAxis=function(le,V,J,te){var Z=E.extendFlat({},J,te);return s(Z,V,le),Z},U.mockCartesianAxis=function(le,V,J){var te=this,Z=te.isSmith,se=J._id,Q=E.extendFlat({type:"linear"},J);n(Q,le);var q={x:[0,2],y:[1,3]};return Q.setRange=function(){var re=te.sectorBBox,ae=q[se],fe=te.radialAxis._rl,be=(fe[1]-fe[0])/(1-te.getHole(V));Q.range=[re[ae[0]]*be,re[ae[1]]*be]},Q.isPtWithinRange=se==="x"&&!Z?function(re){return te.isPtInside(re)}:function(){return!0},Q.setRange(),Q.setScale(),Q},U.doAutoRange=function(le,V){var J=this,te=J.gd,Z=J.radialAxis,se=J.getRadial(V);f(te,Z);var Q=Z.range;if(se.range=Q.slice(),se._input.range=Q.slice(),Z._rl=[Z.r2l(Q[0],null,"gregorian"),Z.r2l(Q[1],null,"gregorian")],Z.minallowed!==void 0){var q=Z.r2l(Z.minallowed);Z._rl[0]>Z._rl[1]?Z._rl[1]=Math.max(Z._rl[1],q):Z._rl[0]=Math.max(Z._rl[0],q)}if(Z.maxallowed!==void 0){var re=Z.r2l(Z.maxallowed);Z._rl[0]<Z._rl[1]?Z._rl[1]=Math.min(Z._rl[1],re):Z._rl[0]=Math.min(Z._rl[0],re)}},U.updateRadialAxis=function(le,V){var J=this,te=J.gd,Z=J.layers,se=J.radius,Q=J.innerRadius,q=J.cx,re=J.cy,ae=J.getRadial(V),fe=B(J.getSector(V)[0],360),be=J.radialAxis,Me=Q<se,Ie=J.isSmith;Ie||(J.fillViewInitialKey("radialaxis.angle",ae.angle),J.fillViewInitialKey("radialaxis.range",be.range.slice()),be.setGeometry()),be.tickangle==="auto"&&fe>90&&fe<=270&&(be.tickangle=180);var Le=Ie?function(tt){var nt=z(J,y([tt.x,0]));return t(nt[0]-q,nt[1]-re)}:function(tt){return t(be.l2p(tt.x)+Q,0)},je=Ie?function(tt){return L(J,tt.x,-1/0,1/0)}:function(tt){return J.pathArc(be.r2p(tt.x)+Q)},et=X(ae);if(J.radialTickLayout!==et&&(Z["radial-axis"].selectAll(".xtick").remove(),J.radialTickLayout=et),Me){be.setScale();var rt=0,Je=Ie?(be.tickvals||[]).filter(function(tt){return tt>=0}).map(function(tt){return i.tickText(be,tt,!0,!1)}):i.calcTicks(be),Ze=Ie?Je:i.clipEnds(be,Je),Ee=i.getTickSigns(be)[2];Ie&&((be.ticks==="top"&&be.side==="bottom"||be.ticks==="bottom"&&be.side==="top")&&(Ee=-Ee),be.ticks==="top"&&be.side==="top"&&(rt=-be.ticklen),be.ticks==="bottom"&&be.side==="bottom"&&(rt=be.ticklen)),i.drawTicks(te,be,{vals:Je,layer:Z["radial-axis"],path:i.makeTickPath(be,0,Ee),transFn:Le,crisp:!1}),i.drawGrid(te,be,{vals:Ze,layer:Z["radial-grid"],path:je,transFn:E.noop,crisp:!1}),i.drawLabels(te,be,{vals:Je,layer:Z["radial-axis"],transFn:Le,labelFns:i.makeLabelFns(be,rt)})}var xe=J.radialAxisAngle=J.vangles?I(ue(O(ae.angle),J.vangles)):ae.angle,he=t(q,re),De=he+e(-xe);oe(Z["radial-axis"],Me&&(ae.showticklabels||ae.ticks),{transform:De}),oe(Z["radial-grid"],Me&&ae.showgrid,{transform:Ie?"":he}),oe(Z["radial-line"].select("line"),Me&&ae.showline,{x1:Ie?-se:Q,y1:0,x2:se,y2:0,transform:De}).attr("stroke-width",ae.linewidth).call(r.stroke,ae.linecolor)},U.updateRadialAxisTitle=function(le,V,J){if(!this.isSmith){var te=this,Z=te.gd,se=te.radius,Q=te.cx,q=te.cy,re=te.getRadial(V),ae=te.id+"title",fe=0;if(re.title){var be=o.bBox(te.layers["radial-axis"].node()).height,Me=re.title.font.size,Ie=re.side;fe=Ie==="top"?Me:Ie==="counterclockwise"?-(be+Me*.4):be+Me*.8}var Le=J!==void 0?J:te.radialAxisAngle,je=O(Le),et=Math.cos(je),rt=Math.sin(je),Je=Q+se/2*et+fe*rt,Ze=q-se/2*rt+fe*et;te.layers["radial-axis-title"]=T.draw(Z,ae,{propContainer:re,propName:te.id+".radialaxis.title.text",placeholder:F(Z,"Click to enter radial axis title"),attributes:{x:Je,y:Ze,"text-anchor":"middle"},transform:{rotate:-Le}})}},U.updateAngularAxis=function(le,V){var J=this,te=J.gd,Z=J.layers,se=J.radius,Q=J.innerRadius,q=J.cx,re=J.cy,ae=J.getAngular(V),fe=J.angularAxis,be=J.isSmith;be||(J.fillViewInitialKey("angularaxis.rotation",ae.rotation),fe.setGeometry(),fe.setScale());var Me=be?function(nt){var $e=z(J,y([0,nt.x]));return Math.atan2($e[0]-q,$e[1]-re)-Math.PI/2}:function(nt){return fe.t2g(nt.x)};fe.type==="linear"&&fe.thetaunit==="radians"&&(fe.tick0=I(fe.tick0),fe.dtick=I(fe.dtick));var Ie=function(nt){return t(q+se*Math.cos(nt),re-se*Math.sin(nt))},Le=be?function(nt){var $e=z(J,y([0,nt.x]));return t($e[0],$e[1])}:function(nt){return Ie(Me(nt))},je=be?function(nt){var $e=z(J,y([0,nt.x])),Et=Math.atan2($e[0]-q,$e[1]-re)-Math.PI/2;return t($e[0],$e[1])+e(-I(Et))}:function(nt){var $e=Me(nt);return Ie($e)+e(-I($e))},et=be?function(nt){return R(J,nt.x,0,1/0)}:function(nt){var $e=Me(nt),Et=Math.cos($e),Ct=Math.sin($e);return"M"+[q+Q*Et,re-Q*Ct]+"L"+[q+se*Et,re-se*Ct]},rt=i.makeLabelFns(fe,0),Je=rt.labelStandoff,Ze={};Ze.xFn=function(nt){var $e=Me(nt);return Math.cos($e)*Je},Ze.yFn=function(nt){var $e=Me(nt),Et=Math.sin($e)>0?.2:1;return-Math.sin($e)*(Je+nt.fontSize*Et)+Math.abs(Math.cos($e))*(nt.fontSize*w)},Ze.anchorFn=function(nt){var $e=Me(nt),Et=Math.cos($e);return Math.abs(Et)<.1?"middle":Et>0?"start":"end"},Ze.heightFn=function(nt,$e,Et){var Ct=Me(nt);return-.5*(1+Math.sin(Ct))*Et};var Ee=X(ae);J.angularTickLayout!==Ee&&(Z["angular-axis"].selectAll("."+fe._id+"tick").remove(),J.angularTickLayout=Ee);var xe=be?[1/0].concat(fe.tickvals||[]).map(function(nt){return i.tickText(fe,nt,!0,!1)}):i.calcTicks(fe);be&&(xe[0].text="∞",xe[0].fontSize*=1.75);var he;if(V.gridshape==="linear"?(he=xe.map(Me),E.angleDelta(he[0],he[1])<0&&(he=he.slice().reverse())):he=null,J.vangles=he,fe.type==="category"&&(xe=xe.filter(function(nt){return E.isAngleInsideSector(Me(nt),J.sectorInRad)})),fe.visible){var De=fe.ticks==="inside"?-1:1,tt=(fe.linewidth||1)/2;i.drawTicks(te,fe,{vals:xe,layer:Z["angular-axis"],path:"M"+De*tt+",0h"+De*fe.ticklen,transFn:je,crisp:!1}),i.drawGrid(te,fe,{vals:xe,layer:Z["angular-grid"],path:et,transFn:E.noop,crisp:!1}),i.drawLabels(te,fe,{vals:xe,layer:Z["angular-axis"],repositionOnUpdate:!0,transFn:Le,labelFns:Ze})}oe(Z["angular-line"].select("path"),ae.showline,{d:J.pathSubplot(),transform:t(q,re)}).attr("stroke-width",ae.linewidth).call(r.stroke,ae.linecolor)},U.updateFx=function(le,V){if(!this.gd._context.staticPlot){var J=!this.isSmith;J&&(this.updateAngularDrag(le),this.updateRadialDrag(le,V,0),this.updateRadialDrag(le,V,1)),this.updateHoverAndMainDrag(le)}},U.updateHoverAndMainDrag=function(le){var V=this,J=V.isSmith,te=V.gd,Z=V.layers,se=le._zoomlayer,Q=g.MINZOOM,q=g.OFFEDGE,re=V.radius,ae=V.innerRadius,fe=V.cx,be=V.cy,Me=V.cxx,Ie=V.cyy,Le=V.sectorInRad,je=V.vangles,et=V.radialAxis,rt=u.clampTiny,Je=u.findXYatLength,Ze=u.findEnclosingVertexAngles,Ee=g.cornerHalfWidth,xe=g.cornerLen/2,he,De,tt=c.makeDragger(Z,"path","maindrag",le.dragmode===!1?"none":"crosshair");h.select(tt).attr("d",V.pathSubplot()).attr("transform",t(fe,be)),tt.onmousemove=function(ar){d.hover(te,ar,V.id),te._fullLayout._lasthover=tt,te._fullLayout._hoversubplot=V.id},tt.onmouseout=function(ar){te._dragging||p.unhover(te,ar)};var nt={element:tt,gd:te,subplot:V.id,plotinfo:{id:V.id,xaxis:V.xaxis,yaxis:V.yaxis},xaxes:[V.xaxis],yaxes:[V.yaxis]},$e,Et,Ct,jt,Wt,dr,vr,Dr,hr;function Ar(ar,tr){return Math.sqrt(ar*ar+tr*tr)}function mt(ar,tr){return Ar(ar-Me,tr-Ie)}function Fe(ar,tr){return Math.atan2(Ie-tr,ar-Me)}function We(ar,tr){return[ar*Math.cos(tr),ar*Math.sin(-tr)]}function Ae(ar,tr){if(ar===0)return V.pathSector(2*Ee);var Tr=xe/ar,sa=tr-Tr,Ea=tr+Tr,ba=Math.max(0,Math.min(ar,re)),Ia=ba-Ee,Ra=ba+Ee;return"M"+We(Ia,sa)+"A"+[Ia,Ia]+" 0,0,0 "+We(Ia,Ea)+"L"+We(Ra,Ea)+"A"+[Ra,Ra]+" 0,0,1 "+We(Ra,sa)+"Z"}function me(ar,tr,Tr){if(ar===0)return V.pathSector(2*Ee);var sa=We(ar,tr),Ea=We(ar,Tr),ba=rt((sa[0]+Ea[0])/2),Ia=rt((sa[1]+Ea[1])/2),Ra,ya;if(ba&&Ia){var rn=Ia/ba,mn=-1/rn,Yt=Je(Ee,rn,ba,Ia);Ra=Je(xe,mn,Yt[0][0],Yt[0][1]),ya=Je(xe,mn,Yt[1][0],Yt[1][1])}else{var It,Zt;Ia?(It=xe,Zt=Ee):(It=Ee,Zt=xe),Ra=[[ba-It,Ia-Zt],[ba+It,Ia-Zt]],ya=[[ba-It,Ia+Zt],[ba+It,Ia+Zt]]}return"M"+Ra.join("L")+"L"+ya.reverse().join("L")+"Z"}function pe(){Ct=null,jt=null,Wt=V.pathSubplot(),dr=!1;var ar=te._fullLayout[V.id];vr=b(ar.bgcolor).getLuminance(),Dr=c.makeZoombox(se,vr,fe,be,Wt),Dr.attr("fill-rule","evenodd"),hr=c.makeCorners(se,fe,be),x(te)}function Te(ar,tr){return tr=Math.max(Math.min(tr,re),ae),ar<q?ar=0:re-ar<q?ar=re:tr<q?tr=0:re-tr<q&&(tr=re),Math.abs(tr-ar)>Q?(ar<tr?(Ct=ar,jt=tr):(Ct=tr,jt=ar),!0):(Ct=null,jt=null,!1)}function Ue(ar,tr){ar=ar||Wt,tr=tr||"M0,0Z",Dr.attr("d",ar),hr.attr("d",tr),c.transitionZoombox(Dr,hr,dr,vr),dr=!0;var Tr={};Nt(Tr),te.emit("plotly_relayouting",Tr)}function Xe(ar,tr){ar=ar*he,tr=tr*De;var Tr=$e+ar,sa=Et+tr,Ea=mt($e,Et),ba=Math.min(mt(Tr,sa),re),Ia=Fe($e,Et),Ra,ya;Te(Ea,ba)&&(Ra=Wt+V.pathSector(jt),Ct&&(Ra+=V.pathSector(Ct)),ya=Ae(Ct,Ia)+Ae(jt,Ia)),Ue(Ra,ya)}function bt(ar,tr,Tr,sa){var Ea=u.findIntersectionXY(Tr,sa,Tr,[ar-Me,Ie-tr]);return Ar(Ea[0],Ea[1])}function xt(ar,tr){var Tr=$e+ar,sa=Et+tr,Ea=Fe($e,Et),ba=Fe(Tr,sa),Ia=Ze(Ea,je),Ra=Ze(ba,je),ya=bt($e,Et,Ia[0],Ia[1]),rn=Math.min(bt(Tr,sa,Ra[0],Ra[1]),re),mn,Yt;Te(ya,rn)&&(mn=Wt+V.pathSector(jt),Ct&&(mn+=V.pathSector(Ct)),Yt=[me(Ct,Ia[0],Ia[1]),me(jt,Ia[0],Ia[1])].join(" ")),Ue(mn,Yt)}function Mt(){if(c.removeZoombox(te),!(Ct===null||jt===null)){var ar={};Nt(ar),c.showDoubleClickNotifier(te),S.call("_guiRelayout",te,ar)}}function Nt(ar){var tr=et._rl,Tr=(tr[1]-tr[0])/(1-ae/re)/re,sa=[tr[0]+(Ct-ae)*Tr,tr[0]+(jt-ae)*Tr];ar[V.id+".radialaxis.range"]=sa}function sr(ar,tr){var Tr=te._fullLayout.clickmode;if(c.removeZoombox(te),ar===2){var sa={};for(var Ea in V.viewInitial)sa[V.id+"."+Ea]=V.viewInitial[Ea];te.emit("plotly_doubleclick",null),S.call("_guiRelayout",te,sa)}Tr.indexOf("select")>-1&&ar===1&&m(tr,te,[V.xaxis],[V.yaxis],V.id,nt),Tr.indexOf("event")>-1&&d.click(te,tr,V.id)}nt.prepFn=function(ar,tr,Tr){var sa=te._fullLayout.dragmode,Ea=tt.getBoundingClientRect();te._fullLayout._calcInverseTransform(te);var ba=te._fullLayout._invTransform;he=te._fullLayout._invScaleX,De=te._fullLayout._invScaleY;var Ia=E.apply3DTransform(ba)(tr-Ea.left,Tr-Ea.top);if($e=Ia[0],Et=Ia[1],je){var Ra=u.findPolygonOffset(re,Le[0],Le[1],je);$e+=Me+Ra[0],Et+=Ie+Ra[1]}switch(sa){case"zoom":nt.clickFn=sr,J||(je?nt.moveFn=xt:nt.moveFn=Xe,nt.doneFn=Mt,pe());break;case"select":case"lasso":l(ar,tr,Tr,nt,sa);break}},p.init(nt)},U.updateRadialDrag=function(le,V,J){var te=this,Z=te.gd,se=te.layers,Q=te.radius,q=te.innerRadius,re=te.cx,ae=te.cy,fe=te.radialAxis,be=g.radialDragBoxSize,Me=be/2;if(!fe.visible)return;var Ie=O(te.radialAxisAngle),Le=fe._rl,je=Le[0],et=Le[1],rt=Le[J],Je=.75*(Le[1]-Le[0])/(1-te.getHole(V))/Q,Ze,Ee,xe;J?(Ze=re+(Q+Me)*Math.cos(Ie),Ee=ae-(Q+Me)*Math.sin(Ie),xe="radialdrag"):(Ze=re+(q-Me)*Math.cos(Ie),Ee=ae-(q-Me)*Math.sin(Ie),xe="radialdrag-inner");var he=c.makeRectDragger(se,xe,"crosshair",-Me,-Me,be,be),De={element:he,gd:Z};le.dragmode===!1&&(De.dragmode=!1),oe(h.select(he),fe.visible&&q<Q,{transform:t(Ze,Ee)});var tt,nt,$e;function Et(vr,Dr){if(tt)tt(vr,Dr);else{var hr=[vr,-Dr],Ar=[Math.cos(Ie),Math.sin(Ie)],mt=Math.abs(E.dot(hr,Ar)/Math.sqrt(E.dot(hr,hr)));isNaN(mt)||(tt=mt<.5?Wt:dr)}var Fe={};Ct(Fe),Z.emit("plotly_relayouting",Fe)}function Ct(vr){nt!==null?vr[te.id+".radialaxis.angle"]=nt:$e!==null&&(vr[te.id+".radialaxis.range["+J+"]"]=$e)}function jt(){nt!==null?S.call("_guiRelayout",Z,te.id+".radialaxis.angle",nt):$e!==null&&S.call("_guiRelayout",Z,te.id+".radialaxis.range["+J+"]",$e)}function Wt(vr,Dr){if(J!==0){var hr=Ze+vr,Ar=Ee+Dr;nt=Math.atan2(ae-Ar,hr-re),te.vangles&&(nt=ue(nt,te.vangles)),nt=I(nt);var mt=t(re,ae)+e(-nt);se["radial-axis"].attr("transform",mt),se["radial-line"].select("line").attr("transform",mt);var Fe=te.gd._fullLayout,We=Fe[te.id];te.updateRadialAxisTitle(Fe,We,nt)}}function dr(vr,Dr){var hr=E.dot([vr,-Dr],[Math.cos(Ie),Math.sin(Ie)]);if($e=rt-Je*hr,Je>0!=(J?$e>je:$e<et)){$e=null;return}var Ar=Z._fullLayout,mt=Ar[te.id];fe.range[J]=$e,fe._rl[J]=$e,te.updateRadialAxis(Ar,mt),te.xaxis.setRange(),te.xaxis.setScale(),te.yaxis.setRange(),te.yaxis.setScale();var Fe=!1;for(var We in te.traceHash){var Ae=te.traceHash[We],me=E.filterVisible(Ae),pe=Ae[0][0].trace._module;pe.plot(Z,te,me,mt),S.traceIs(We,"gl")&&me.length&&(Fe=!0)}Fe&&(M(Z),_(Z))}De.prepFn=function(){tt=null,nt=null,$e=null,De.moveFn=Et,De.doneFn=jt,x(Z)},De.clampFn=function(vr,Dr){return Math.sqrt(vr*vr+Dr*Dr)<g.MINDRAG&&(vr=0,Dr=0),[vr,Dr]},p.init(De)},U.updateAngularDrag=function(le){var V=this,J=V.gd,te=V.layers,Z=V.radius,se=V.angularAxis,Q=V.cx,q=V.cy,re=V.cxx,ae=V.cyy,fe=g.angularDragBoxSize,be=c.makeDragger(te,"path","angulardrag",le.dragmode===!1?"none":"move"),Me={element:be,gd:J};le.dragmode===!1?Me.dragmode=!1:h.select(be).attr("d",V.pathAnnulus(Z,Z+fe)).attr("transform",t(Q,q)).call(A,"move");function Ie($e,Et){return Math.atan2(ae+fe-Et,$e-re-fe)}var Le=te.frontplot.select(".scatterlayer").selectAll(".trace"),je=Le.selectAll(".point"),et=Le.selectAll(".textpoint"),rt,Je,Ze,Ee,xe,he;function De($e,Et){var Ct=V.gd._fullLayout,jt=Ct[V.id],Wt=rt+$e*le._invScaleX,dr=Je+Et*le._invScaleY,vr=Ie(Wt,dr),Dr=I(vr-he);if(Ee=Ze+Dr,te.frontplot.attr("transform",t(V.xOffset2,V.yOffset2)+e([-Dr,re,ae])),V.vangles){xe=V.radialAxisAngle+Dr;var hr=t(Q,q)+e(-Dr),Ar=t(Q,q)+e(-xe);te.bg.attr("transform",hr),te["radial-grid"].attr("transform",hr),te["radial-axis"].attr("transform",Ar),te["radial-line"].select("line").attr("transform",Ar),V.updateRadialAxisTitle(Ct,jt,xe)}else V.clipPaths.forTraces.select("path").attr("transform",t(re,ae)+e(Dr));je.each(function(){var Te=h.select(this),Ue=o.getTranslate(Te);Te.attr("transform",t(Ue.x,Ue.y)+e([Dr]))}),et.each(function(){var Te=h.select(this),Ue=Te.select("text"),Xe=o.getTranslate(Te);Te.attr("transform",e([Dr,Ue.attr("x"),Ue.attr("y")])+t(Xe.x,Xe.y))}),se.rotation=E.modHalf(Ee,360),V.updateAngularAxis(Ct,jt),V._hasClipOnAxisFalse&&!E.isFullCircle(V.sectorInRad)&&Le.call(o.hideOutsideRangePoints,V);var mt=!1;for(var Fe in V.traceHash)if(S.traceIs(Fe,"gl")){var We=V.traceHash[Fe],Ae=E.filterVisible(We),me=We[0][0].trace._module;me.plot(J,V,Ae,jt),Ae.length&&(mt=!0)}mt&&(M(J),_(J));var pe={};tt(pe),J.emit("plotly_relayouting",pe)}function tt($e){$e[V.id+".angularaxis.rotation"]=Ee,V.vangles&&($e[V.id+".radialaxis.angle"]=xe)}function nt(){et.select("text").attr("transform",null);var $e={};tt($e),S.call("_guiRelayout",J,$e)}Me.prepFn=function($e,Et,Ct){var jt=le[V.id];Ze=jt.angularaxis.rotation;var Wt=be.getBoundingClientRect();rt=Et-Wt.left,Je=Ct-Wt.top,J._fullLayout._calcInverseTransform(J);var dr=E.apply3DTransform(le._invTransform)(rt,Je);rt=dr[0],Je=dr[1],he=Ie(rt,Je),Me.moveFn=De,Me.doneFn=nt,x(J)},V.vangles&&!E.isFullCircle(V.sectorInRad)&&(Me.prepFn=E.noop,A(h.select(be),null)),p.init(Me)},U.isPtInside=function(le){if(this.isSmith)return!0;var V=this.sectorInRad,J=this.vangles,te=this.angularAxis.c2g(le.theta),Z=this.radialAxis,se=Z.c2l(le.r),Q=Z._rl,q=J?u.isPtInsidePolygon:E.isPtInsideSector;return q(se,te,Q,V,J)},U.pathArc=function(le){var V=this.sectorInRad,J=this.vangles,te=J?u.pathPolygon:E.pathArc;return te(le,V[0],V[1],J)},U.pathSector=function(le){var V=this.sectorInRad,J=this.vangles,te=J?u.pathPolygon:E.pathSector;return te(le,V[0],V[1],J)},U.pathAnnulus=function(le,V){var J=this.sectorInRad,te=this.vangles,Z=te?u.pathPolygonAnnulus:E.pathAnnulus;return Z(le,V,J[0],J[1],te)},U.pathSubplot=function(){var le=this.innerRadius,V=this.radius;return le?this.pathAnnulus(le,V):this.pathSector(V)},U.fillViewInitialKey=function(le,V){le in this.viewInitial||(this.viewInitial[le]=V)};function X(le){var V=le.ticks+String(le.ticklen)+String(le.showticklabels);return"side"in le&&(V+=le.side),V}function ee(le){var V=le[0],J=le[1],te=J-V,Z=B(V,360),se=Z+te,Q=Math.cos(O(Z)),q=Math.sin(O(Z)),re=Math.cos(O(se)),ae=Math.sin(O(se)),fe,be,Me,Ie;return Z<=90&&se>=90||Z>90&&se>=450?Ie=1:q<=0&&ae<=0?Ie=0:Ie=Math.max(q,ae),Z<=180&&se>=180||Z>180&&se>=540?fe=-1:Q>=0&&re>=0?fe=0:fe=Math.min(Q,re),Z<=270&&se>=270||Z>270&&se>=630?be=-1:q>=0&&ae>=0?be=0:be=Math.min(q,ae),se>=360?Me=1:Q<=0&&re<=0?Me=0:Me=Math.max(Q,re),[fe,be,Me,Ie]}function ue(le,V){var J=function(Z){return E.angleDist(le,Z)},te=E.findIndexOfMin(V,J);return V[te]}function oe(le,V,J){return V?(le.attr("display",null),le.attr(J)):le&&le.attr("display","none"),le}}}),x5=He({"src/plots/polar/layout_attributes.js"(Y,G){var h=Mf(),b=oh(),S=ic().attributes,E=ea().extendFlat,e=Zu().overrideAll,t=e({color:b.color,showline:E({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:E({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),r=e({tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,labelalias:b.labelalias,minorloglabels:b.minorloglabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,layer:b.layer},"plot","from-root"),o={visible:E({},b.visible,{dflt:!0}),type:E({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},autorange:E({},b.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:E({},b.minallowed,{editType:"plot"}),maxallowed:E({},b.maxallowed,{editType:"plot"}),range:E({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:b.categoryorder,categoryarray:b.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:b.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:E({},b.title.text,{editType:"plot",dflt:""}),font:E({},b.title.font,{editType:"plot"}),editType:"plot"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(o,t,r);var a={visible:E({},b.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:b.autotypenumbers,categoryorder:b.categoryorder,categoryarray:b.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};E(a,t,r),G.exports={domain:S({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:h.background},radialaxis:o,angularaxis:a,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),TR=He({"src/plots/polar/layout_defaults.js"(Y,G){var h=ea(),b=Di(),S=xl(),E=tp(),e=ih().getSubplotData,t=Rp(),r=V0(),o=Yd(),a=Kd(),i=_1(),n=cm(),s=Sb(),f=G0(),c=x5(),p=m5(),d=bx(),T=d.axisNames;function l(x,A,M,_){var w=M("bgcolor");_.bgColor=b.combine(w,_.paper_bgcolor);var g=M("sector");M("hole");var u=e(_.fullData,d.name,_.id),v=_.layoutOut,y;function R(be,Me){return M(y+"."+be,Me)}for(var L=0;L<T.length;L++){y=T[L],h.isPlainObject(x[y])||(x[y]={});var z=x[y],F=S.newContainer(A,y);F._id=F._name=y,F._attr=_.id+"."+y,F._traceIndices=u.map(function(be){return be.index});var B=d.axisName2dataArray[y],O=m(z,F,R,u,B,_);i(z,F,R,{axData:u,dataAttr:B});var I=R("visible");switch(p(F,A,v),R("uirevision",A.uirevision),F._m=1,y){case"radialaxis":R("minallowed"),R("maxallowed");var N=R("range"),U=F.getAutorangeDflt(N),X=R("autorange",U),ee;N&&(N[0]===null&&N[1]===null||(N[0]===null||N[1]===null)&&(X==="reversed"||X===!0)||N[0]!==null&&(X==="min"||X==="max reversed")||N[1]!==null&&(X==="max"||X==="min reversed"))&&(N=void 0,delete F.range,F.autorange=!0,ee=!0),ee||(U=F.getAutorangeDflt(N),X=R("autorange",U)),z.autorange=X,X&&(s(R,X,N),(O==="linear"||O==="-")&&R("rangemode"),F.isReversed()&&(F._m=-1)),F.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(O==="date"){h.log("Polar plots do not support date angular axes yet.");for(var ue=0;ue<u.length;ue++)u[ue].visible=!1;O=z.type=F.type="linear"}R(O==="linear"?"thetaunit":"period");var oe=R("direction");R("rotation",{counterclockwise:0,clockwise:90}[oe]);break}if(a(z,F,R,F.type,{tickSuffixDflt:F.thetaunit==="degrees"?"°":void 0}),I){var le,V,J,te,Z,se,Q,q,re,ae,fe=_.font||{};le=R("color"),V=le===z.color?le:fe.color,J=fe.size,te=fe.family,Z=fe.weight,se=fe.style,Q=fe.variant,q=fe.textcase,re=fe.lineposition,ae=fe.shadow,t(z,F,R,F.type),o(z,F,R,F.type,{font:{weight:Z,style:se,variant:Q,textcase:q,lineposition:re,shadow:ae,color:V,size:J,family:te},noAutotickangles:y==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),r(z,F,R,{outerTicks:!0}),n(z,F,R,{dfltColor:le,bgColor:_.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:c[y]}),R("layer"),y==="radialaxis"&&(R("side"),R("angle",g[0]),R("title.text"),h.coerceFont(R,"title.font",{weight:Z,style:se,variant:Q,textcase:q,lineposition:re,shadow:ae,color:V,size:h.bigFont(J),family:te}))}O!=="category"&&R("hoverformat"),F._input=z}A.angularaxis.type==="category"&&M("gridshape")}function m(x,A,M,_,w,g){var u=M("autotypenumbers",g.autotypenumbersDflt),v=M("type");if(v==="-"){for(var y,R=0;R<_.length;R++)if(_[R].visible){y=_[R];break}y&&y[w]&&(A.type=f(y[w],"gregorian",{noMultiCategory:!0,autotypenumbers:u})),A.type==="-"?A.type="linear":x.type=A.type}return A.type}G.exports=function(A,M,_){E(A,M,_,{type:d.name,attributes:c,handleDefaults:l,font:M.font,autotypenumbersDflt:M.autotypenumbers,paper_bgcolor:M.paper_bgcolor,fullData:_,layoutOut:M})}}}),Tx=He({"src/plots/polar/index.js"(Y,G){var h=ih().getSubplotCalcData,b=ea().counterRegex,S=_5(),E=bx(),e=E.attr,t=E.name,r=b(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(n){for(var s=n._fullLayout,f=n.calcdata,c=s._subplots[t],p=0;p<c.length;p++){var d=c[p],T=h(f,t,d),l=s[d]._subplot;l||(l=S(n,d),s[d]._subplot=l),l.plot(T,s,n._promises)}}function i(n,s,f,c){for(var p=c._subplots[t]||[],d=c._has&&c._has("gl"),T=s._has&&s._has("gl"),l=d&&!T,m=0;m<p.length;m++){var x=p[m],A=c[x]._subplot;if(!s[x]&&A){A.framework.remove(),A.layers["radial-axis-title"].remove();for(var M in A.clipPaths)A.clipPaths[M].remove()}l&&A._scene&&(A._scene.destroy(),A._scene=null)}}G.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:x5(),supplyLayoutDefaults:TR(),plot:a,clean:i,toSVG:mf().toSVG}}}),ny=He({"src/traces/scatterpolar/attributes.js"(Y,G){var{hovertemplateAttrs:h,texttemplateAttrs:b,templatefallbackAttrs:S}=Ll(),E=Po().extendFlat,e=Mv(),t=Cc(),r=Nl(),o=t.line;G.exports={mode:t.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:t.text,texttemplate:b({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:E({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,marker:t.marker,cliponaxis:E({},t.cliponaxis,{dflt:!1}),textposition:t.textposition,textfont:t.textfont,fill:E({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:e(),hoverinfo:E({},r.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:t.hoveron,hovertemplate:h(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),Ax=He({"src/traces/scatterpolar/defaults.js"(Y,G){var h=ea(),b=mu(),S=av(),E=cv(),e=X0(),t=fv(),r=kv(),o=Xv().PTS_LINESONLY,a=ny();function i(s,f,c,p){function d(m,x){return h.coerce(s,f,a,m,x)}var T=n(s,f,p,d);if(!T){f.visible=!1;return}d("thetaunit"),d("mode",T<o?"lines+markers":"lines"),d("text"),d("hovertext"),f.hoveron!=="fills"&&(d("hovertemplate"),d("hovertemplatefallback")),b.hasMarkers(f)&&S(s,f,c,p,d,{gradient:!0}),b.hasLines(f)&&(E(s,f,c,p,d,{backoff:!0}),e(s,f,d),d("connectgaps")),b.hasText(f)&&(d("texttemplate"),d("texttemplatefallback"),t(s,f,p,d));var l=[];(b.hasMarkers(f)||b.hasText(f))&&(d("cliponaxis"),d("marker.maxdisplayed"),l.push("points")),d("fill"),f.fill!=="none"&&(r(s,f,c,d),b.hasLines(f)||e(s,f,d)),(f.fill==="tonext"||f.fill==="toself")&&l.push("fills"),d("hoveron",l.join("+")||"points"),h.coerceSelectionMarkerOpacity(f,d)}function n(s,f,c,p){var d=p("r"),T=p("theta");h.isTypedArray(d)&&(f.r=d=Array.from(d)),h.isTypedArray(T)&&(f.theta=T=Array.from(T));var l;if(d)T?l=Math.min(d.length,T.length):(l=d.length,p("theta0"),p("dtheta"));else{if(!T)return 0;l=f.theta.length,p("r0"),p("dr")}return f._length=l,l}G.exports={handleRThetaDefaults:n,supplyDefaults:i}}}),Sx=He({"src/traces/scatterpolar/format_labels.js"(Y,G){var h=ea(),b=Ao();G.exports=function(E,e,t){var r={},o=t[e.subplot]._subplot,a,i;o?(a=o.radialAxis,i=o.angularAxis):(o=t[e.subplot],a=o.radialaxis,i=o.angularaxis);var n=a.c2l(E.r);r.rLabel=b.tickText(a,n,!0).text;var s=i.thetaunit==="degrees"?h.rad2deg(E.theta):E.theta;return r.thetaLabel=b.tickText(i,s,!0).text,r}}}),AR=He({"src/traces/scatterpolar/calc.js"(Y,G){var h=Ui(),b=Qo().BADNUM,S=Ao(),E=hv(),e=Zv(),t=vv(),r=dv().calcMarkerSize;G.exports=function(a,i){for(var n=a._fullLayout,s=i.subplot,f=n[s].radialaxis,c=n[s].angularaxis,p=f.makeCalcdata(i,"r"),d=c.makeCalcdata(i,"theta"),T=i._length,l=new Array(T),m=0;m<T;m++){var x=p[m],A=d[m],M=l[m]={};h(x)&&h(A)?(M.r=x,M.theta=A):M.r=b}var _=r(i,T);return i._extremes.x=S.findExtremes(f,p,{ppad:_}),E(a,i),e(l,i),t(l,i),l}}}),SR=He({"src/traces/scatterpolar/plot.js"(Y,G){var h=Z0(),b=Qo().BADNUM;G.exports=function(E,e,t){for(var r=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,a=e.yaxis,i={xaxis:o,yaxis:a,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},n=e.radialAxis,s=e.angularAxis,f=0;f<t.length;f++)for(var c=t[f],p=0;p<c.length;p++){p===0&&(c[0].trace._xA=o,c[0].trace._yA=a);var d=c[p],T=d.r;if(T===b)d.x=d.y=b;else{var l=n.c2g(T),m=s.c2g(d.theta);d.x=l*Math.cos(m),d.y=l*Math.sin(m)}}h(E,i,t,r)}}}),Mx=He({"src/traces/scatterpolar/hover.js"(Y,G){var h=K0();function b(E,e,t,r){var o=h(E,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var i=E.subplot,n=a.cd[a.index],s=a.trace;if(i.isPtInside(n))return a.xLabelVal=void 0,a.yLabelVal=void 0,S(n,s,i,a),a.hovertemplate=s.hovertemplate,o}}function S(E,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="r",a._hovertitle="θ";var i={};i[e.subplot]={_subplot:t};var n=e._module.formatLabels(E,e,i);r.rLabel=n.rLabel,r.thetaLabel=n.thetaLabel;var s=E.hi||e.hoverinfo,f=[];function c(d,T){f.push(d._hovertitle+": "+T)}if(!e.hovertemplate){var p=s.split("+");p.indexOf("all")!==-1&&(p=["r","theta","text"]),p.indexOf("r")!==-1&&c(o,r.rLabel),p.indexOf("theta")!==-1&&c(a,r.thetaLabel),p.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("<br>")}}G.exports={hoverPoints:b,makeHoverPointText:S}}}),MR=He({"src/traces/scatterpolar/index.js"(Y,G){G.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:Tx(),categories:["polar","symbols","showLegend","scatter-like"],attributes:ny(),supplyDefaults:Ax().supplyDefaults,colorbar:xh(),formatLabels:Sx(),calc:AR(),plot:SR(),style:Gh().style,styleOnSelect:Gh().styleOnSelect,hoverPoints:Mx().hoverPoints,selectPoints:$0(),meta:{}}}}),ER=He({"lib/scatterpolar.js"(Y,G){G.exports=MR()}}),b5=He({"src/traces/scatterpolargl/attributes.js"(Y,G){var h=ny(),{cliponaxis:b,hoveron:S}=h,E=Kh(h,["cliponaxis","hoveron"]),{connectgaps:e,line:{color:t,dash:r,width:o},fill:a,fillcolor:i,marker:n,textfont:s,textposition:f}=Ym();G.exports=Wc(fl({},E),{connectgaps:e,fill:a,fillcolor:i,line:{color:t,dash:r,editType:"calc",width:o},marker:n,textfont:s,textposition:f})}}),kR=He({"src/traces/scatterpolargl/defaults.js"(Y,G){var h=ea(),b=mu(),S=Ax().handleRThetaDefaults,E=av(),e=cv(),t=fv(),r=kv(),o=Xv().PTS_LINESONLY,a=b5();G.exports=function(n,s,f,c){function p(T,l){return h.coerce(n,s,a,T,l)}var d=S(n,s,c,p);if(!d){s.visible=!1;return}p("thetaunit"),p("mode",d<o?"lines+markers":"lines"),p("text"),p("hovertext"),s.hoveron!=="fills"&&(p("hovertemplate"),p("hovertemplatefallback")),b.hasMarkers(s)&&E(n,s,f,c,p,{noAngleRef:!0,noStandOff:!0}),b.hasLines(s)&&(e(n,s,f,c,p),p("connectgaps")),b.hasText(s)&&(p("texttemplate"),p("texttemplatefallback"),t(n,s,c,p,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),p("fill"),s.fill!=="none"&&r(n,s,f,p),h.coerceSelectionMarkerOpacity(s,p)}}}),CR=He({"src/traces/scatterpolargl/format_labels.js"(Y,G){var h=Sx();G.exports=function(S,E,e){var t=S.i;return"r"in S||(S.r=E._r[t]),"theta"in S||(S.theta=E._theta[t]),h(S,E,e)}}}),LR=He({"src/traces/scatterpolargl/calc.js"(Y,G){var h=hv(),b=dv().calcMarkerSize,S=a0(),E=Ao(),e=vp().TOO_MANY_POINTS;G.exports=function(r,o){var a=r._fullLayout,i=o.subplot,n=a[i].radialaxis,s=a[i].angularaxis,f=o._r=n.makeCalcdata(o,"r"),c=o._theta=s.makeCalcdata(o,"theta"),p=o._length,d={};p<f.length&&(f=f.slice(0,p)),p<c.length&&(c=c.slice(0,p)),d.r=f,d.theta=c,h(r,o);var T=d.opts=S.style(r,o),l;return p<e?l=b(o,p):T.marker&&(l=2*(T.marker.sizeAvg||Math.max(T.marker.size,3))),o._extremes.x=E.findExtremes(n,f,{ppad:l}),[{x:!1,y:!1,t:d,trace:o}]}}}),PR=He({"src/traces/scatterpolargl/hover.js"(Y,G){var h=ex(),b=Mx().makeHoverPointText;function S(E,e,t,r){var o=E.cd,a=o[0].t,i=a.r,n=a.theta,s=h.hoverPoints(E,e,t,r);if(!(!s||s[0].index===!1)){var f=s[0];if(f.index===void 0)return s;var c=E.subplot,p=f.cd[f.index],d=f.trace;if(p.r=i[f.index],p.theta=n[f.index],!!c.isPtInside(p))return f.xLabelVal=void 0,f.yLabelVal=void 0,b(p,d,c,f),s}}G.exports={hoverPoints:S}}}),IR=He({"src/traces/scatterpolargl/base_index.js"(Y,G){G.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:Tx(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:b5(),supplyDefaults:kR(),colorbar:xh(),formatLabels:CR(),calc:LR(),hoverPoints:PR().hoverPoints,selectPoints:rT(),meta:{}}}}),RR=He({"src/traces/scatterpolargl/plot.js"(Y,G){var h=rx(),b=Ui(),S=MT(),E=eT(),e=a0(),t=ea(),r=vp().TOO_MANY_POINTS,o={};G.exports=function(i,n,s){if(s.length){var f=n.radialAxis,c=n.angularAxis,p=E(i,n);return s.forEach(function(d){if(!(!d||!d[0]||!d[0].trace)){var T=d[0],l=T.trace,m=T.t,x=l._length,A=m.r,M=m.theta,_=m.opts,w,g=A.slice(),u=M.slice();for(w=0;w<A.length;w++)n.isPtInside({r:A[w],theta:M[w]})||(g[w]=NaN,u[w]=NaN);var v=new Array(x*2),y=Array(x),R=Array(x);for(w=0;w<x;w++){var L=g[w],z,F;if(b(L)){var B=f.c2g(L),O=c.c2g(u[w],l.thetaunit);z=B*Math.cos(O),F=B*Math.sin(O)}else z=F=NaN;y[w]=v[w*2]=z,R[w]=v[w*2+1]=F}m.tree=h(v),_.marker&&x>=r&&(_.marker.cluster=m.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=v),_.line&&v.length>1&&t.extendFlat(_.line,e.linePositions(i,l,v)),_.text&&(t.extendFlat(_.text,{positions:v},e.textPosition(i,l,_.text,_.marker)),t.extendFlat(_.textSel,{positions:v},e.textPosition(i,l,_.text,_.markerSel)),t.extendFlat(_.textUnsel,{positions:v},e.textPosition(i,l,_.text,_.markerUnsel))),_.fill&&!p.fill2d&&(p.fill2d=!0),_.marker&&!p.scatter2d&&(p.scatter2d=!0),_.line&&!p.line2d&&(p.line2d=!0),_.text&&!p.glText&&(p.glText=!0),p.lineOptions.push(_.line),p.fillOptions.push(_.fill),p.markerOptions.push(_.marker),p.markerSelectedOptions.push(_.markerSel),p.markerUnselectedOptions.push(_.markerUnsel),p.textOptions.push(_.text),p.textSelectedOptions.push(_.textSel),p.textUnselectedOptions.push(_.textUnsel),p.selectBatch.push([]),p.unselectBatch.push([]),m.x=y,m.y=R,m.rawx=y,m.rawy=R,m.r=A,m.theta=M,m.positions=v,m._scene=p,m.index=p.count,p.count++}}),S(i,n,s)}},G.exports.reglPrecompiled=o}}),DR=He({"src/traces/scatterpolargl/index.js"(Y,G){var h=IR();h.plot=RR(),G.exports=h}}),zR=He({"lib/scatterpolargl.js"(Y,G){G.exports=DR()}}),w5=He({"src/traces/barpolar/attributes.js"(Y,G){var{hovertemplateAttrs:h,templatefallbackAttrs:b}=Ll(),S=Po().extendFlat,E=ny(),e=Yv();G.exports={r:E.r,theta:E.theta,r0:E.r0,dr:E.dr,theta0:E.theta0,dtheta:E.dtheta,thetaunit:E.thetaunit,base:S({},e.base,{}),offset:S({},e.offset,{}),width:S({},e.width,{}),text:S({},e.text,{}),hovertext:S({},e.hovertext,{}),marker:t(),hoverinfo:E.hoverinfo,hovertemplate:h(),hovertemplatefallback:b(),selected:e.selected,unselected:e.unselected};function t(){var r=S({},e.marker);return delete r.cornerradius,r}}}),T5=He({"src/traces/barpolar/layout_attributes.js"(Y,G){G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),FR=He({"src/traces/barpolar/defaults.js"(Y,G){var h=ea(),b=Ax().handleRThetaDefaults,S=k1(),E=w5();G.exports=function(t,r,o,a){function i(s,f){return h.coerce(t,r,E,s,f)}var n=b(t,r,a,i);if(!n){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),S(t,r,i,o,a),h.coerceSelectionMarkerOpacity(r,i)}}}),OR=He({"src/traces/barpolar/layout_defaults.js"(Y,G){var h=ea(),b=T5();G.exports=function(S,E,e){var t={},r;function o(n,s){return h.coerce(S[r]||{},E[r],b,n,s)}for(var a=0;a<e.length;a++){var i=e[a];i.type==="barpolar"&&i.visible===!0&&(r=i.subplot,t[r]||(o("barmode"),o("bargap"),t[r]=1))}}}}),A5=He({"src/traces/barpolar/calc.js"(Y,G){var h=Mh().hasColorscale,b=Eh(),S=ea().isArrayOrTypedArray,E=vm(),e=Bp().setGroupPositions,t=vv(),r=ji().traceIs,o=ea().extendFlat;function a(n,s){for(var f=n._fullLayout,c=s.subplot,p=f[c].radialaxis,d=f[c].angularaxis,T=p.makeCalcdata(s,"r"),l=d.makeCalcdata(s,"theta"),m=s._length,x=new Array(m),A=T,M=l,_=0;_<m;_++)x[_]={p:M[_],s:A[_]};function w(g){var u=s[g];u!==void 0&&(s["_"+g]=S(u)?d.makeCalcdata(s,g):d.d2c(u,s.thetaunit))}return d.type==="linear"&&(w("width"),w("offset")),h(s,"marker")&&b(n,s,{vals:s.marker.color,containerStr:"marker",cLetter:"c"}),h(s,"marker.line")&&b(n,s,{vals:s.marker.line.color,containerStr:"marker.line",cLetter:"c"}),E(x,s),t(x,s),x}function i(n,s,f){for(var c=n.calcdata,p=[],d=0;d<c.length;d++){var T=c[d],l=T[0].trace;l.visible===!0&&r(l,"bar")&&l.subplot===f&&p.push(T)}var m=o({},s.radialaxis,{_id:"x"}),x=s.angularaxis;e(n,x,m,p,{mode:s.barmode,norm:s.barnorm,gap:s.bargap,groupgap:s.bargroupgap})}G.exports={calc:a,crossTraceCalc:i}}}),BR=He({"src/traces/barpolar/plot.js"(Y,G){var h=_i(),b=Ui(),S=ea(),E=Io(),e=wx();G.exports=function(o,a,i){var n=o._context.staticPlot,s=a.xaxis,f=a.yaxis,c=a.radialAxis,p=a.angularAxis,d=t(a),T=a.layers.frontplot.select("g.barlayer");S.makeTraceGroups(T,i,"trace bars").each(function(){var l=h.select(this),m=S.ensureSingle(l,"g","points"),x=m.selectAll("g.point").data(S.identity);x.enter().append("g").style("vector-effect",n?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),x.exit().remove(),x.each(function(A){var M=h.select(this),_=A.rp0=c.c2p(A.s0),w=A.rp1=c.c2p(A.s1),g=A.thetag0=p.c2g(A.p0),u=A.thetag1=p.c2g(A.p1),v;if(!b(_)||!b(w)||!b(g)||!b(u)||_===w||g===u)v="M0,0Z";else{var y=c.c2g(A.s1),R=(g+u)/2;A.ct=[s.c2p(y*Math.cos(R)),f.c2p(y*Math.sin(R))],v=d(_,w,g,u)}S.ensureSingle(M,"path").attr("d",v)}),E.setClipUrl(l,a._hasClipOnAxisFalse?a.clipIds.forTraces:null,o)})};function t(r){var o=r.cxx,a=r.cyy;return r.vangles?function(i,n,s,f){var c,p;S.angleDelta(s,f)>0?(c=s,p=f):(c=f,p=s);var d=e.findEnclosingVertexAngles(c,r.vangles)[0],T=e.findEnclosingVertexAngles(p,r.vangles)[1],l=[d,(c+p)/2,T];return e.pathPolygonAnnulus(i,n,c,p,l,o,a)}:function(i,n,s,f){return S.pathAnnulus(i,n,s,f,o,a)}}}}),NR=He({"src/traces/barpolar/hover.js"(Y,G){var h=kc(),b=ea(),S=J0().getTraceColor,E=b.fillText,e=Mx().makeHoverPointText,t=wx().isPtInsidePolygon;G.exports=function(o,a,i){var n=o.cd,s=n[0].trace,f=o.subplot,c=f.radialAxis,p=f.angularAxis,d=f.vangles,T=d?t:b.isPtInsideSector,l=o.maxHoverDistance,m=p._period||2*Math.PI,x=Math.abs(c.g2p(Math.sqrt(a*a+i*i))),A=Math.atan2(i,a);c.range[0]>c.range[1]&&(A+=Math.PI);var M=function(u){return T(x,A,[u.rp0,u.rp1],[u.thetag0,u.thetag1],d)?l+Math.min(1,Math.abs(u.thetag1-u.thetag0)/m)-1+(u.rp1-x)/(u.rp1-u.rp0)-1:1/0};if(h.getClosest(n,M,o),o.index!==!1){var _=o.index,w=n[_];o.x0=o.x1=w.ct[0],o.y0=o.y1=w.ct[1];var g=b.extendFlat({},w,{r:w.s,theta:w.p});return E(w,s,o),e(g,s,f,o),o.hovertemplate=s.hovertemplate,o.color=S(s,w),o.xLabelVal=o.yLabelVal=void 0,w.s<0&&(o.idealAlign="left"),[o]}}}}),UR=He({"src/traces/barpolar/index.js"(Y,G){G.exports={moduleType:"trace",name:"barpolar",basePlotModule:Tx(),categories:["polar","bar","showLegend"],attributes:w5(),layoutAttributes:T5(),supplyDefaults:FR(),supplyLayoutDefaults:OR(),calc:A5().calc,crossTraceCalc:A5().crossTraceCalc,plot:BR(),colorbar:xh(),formatLabels:Sx(),style:pv().style,styleOnSelect:pv().styleOnSelect,hoverPoints:NR(),selectPoints:Q0(),meta:{}}}}),jR=He({"lib/barpolar.js"(Y,G){G.exports=UR()}}),S5=He({"src/plots/smith/constants.js"(Y,G){G.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),M5=He({"src/plots/smith/layout_attributes.js"(Y,G){var h=Mf(),b=oh(),S=ic().attributes,E=ea().extendFlat,e=Zu().overrideAll,t=e({color:b.color,showline:E({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:E({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),r=e({ticklen:b.ticklen,tickwidth:E({},b.tickwidth,{dflt:2}),tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,tickfont:b.tickfont,tickformat:b.tickformat,hoverformat:b.hoverformat,layer:b.layer},"plot","from-root"),o=E({visible:E({},b.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:E({},b.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},t,r),a=E({visible:E({},b.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:b.ticks,editType:"calc"},t,r);G.exports={domain:S({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:h.background},realaxis:o,imaginaryaxis:a,editType:"calc"}}}),VR=He({"src/plots/smith/layout_defaults.js"(Y,G){var h=ea(),b=Di(),S=xl(),E=tp(),e=ih().getSubplotData,t=Kd(),r=Yd(),o=cm(),a=Wv(),i=M5(),n=S5(),s=n.axisNames,f=p(function(d){return h.isTypedArray(d)&&(d=Array.from(d)),d.slice().reverse().map(function(T){return-T}).concat([0]).concat(d)},String);function c(d,T,l,m){var x=l("bgcolor");m.bgColor=b.combine(x,m.paper_bgcolor);var A=e(m.fullData,n.name,m.id),M=m.layoutOut,_;function w(U,X){return l(_+"."+U,X)}for(var g=0;g<s.length;g++){_=s[g],h.isPlainObject(d[_])||(d[_]={});var u=d[_],v=S.newContainer(T,_);v._id=v._name=_,v._attr=m.id+"."+_,v._traceIndices=A.map(function(U){return U.index});var y=w("visible");if(v.type="linear",a(v,M),t(u,v,w,v.type),y){var R=_==="realaxis";if(R&&w("side"),R)w("tickvals");else{var L=f(T.realaxis.tickvals||i.realaxis.tickvals.dflt);w("tickvals",L)}h.isTypedArray(v.tickvals)&&(v.tickvals=Array.from(v.tickvals));var z,F,B,O,I=m.font||{};y&&(z=w("color"),F=z===u.color?z:I.color,B=I.size,O=I.family),r(u,v,w,v.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!R,noExp:!0,font:{color:F,size:B,family:O}}),h.coerce2(d,T,i,_+".ticklen"),h.coerce2(d,T,i,_+".tickwidth"),h.coerce2(d,T,i,_+".tickcolor",T.color);var N=w("ticks");N||(delete T[_].ticklen,delete T[_].tickwidth,delete T[_].tickcolor),o(u,v,w,{dfltColor:z,bgColor:m.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i[_]}),w("layer")}w("hoverformat"),delete v.type,v._input=u}}G.exports=function(T,l,m){E(T,l,m,{noUirevision:!0,type:n.name,attributes:i,handleDefaults:c,font:l.font,paper_bgcolor:l.paper_bgcolor,fullData:m,layoutOut:l})};function p(d,T){var l={};return function(m){var x=T?T(m):m;if(x in l)return l[x];var A=d(m);return l[x]=A,A}}}}),qR=He({"src/plots/smith/index.js"(Y,G){var h=ih().getSubplotCalcData,b=ea().counterRegex,S=_5(),E=S5(),e=E.attr,t=E.name,r=b(t),o={};o[e]={valType:"subplotid",dflt:t,editType:"calc"};function a(n){for(var s=n._fullLayout,f=n.calcdata,c=s._subplots[t],p=0;p<c.length;p++){var d=c[p],T=h(f,t,d),l=s[d]._subplot;l||(l=S(n,d,!0),s[d]._subplot=l),l.plot(T,s,n._promises)}}function i(n,s,f,c){for(var p=c._subplots[t]||[],d=0;d<p.length;d++){var T=p[d],l=c[T]._subplot;if(!s[T]&&l){l.framework.remove();for(var m in l.clipPaths)l.clipPaths[m].remove()}}}G.exports={attr:e,name:t,idRoot:t,idRegex:r,attrRegex:r,attributes:o,layoutAttributes:M5(),supplyLayoutDefaults:VR(),plot:a,clean:i,toSVG:mf().toSVG}}}),E5=He({"src/traces/scattersmith/attributes.js"(Y,G){var{hovertemplateAttrs:h,texttemplateAttrs:b,templatefallbackAttrs:S}=Ll(),E=Po().extendFlat,e=Mv(),t=Cc(),r=Nl(),o=t.line;G.exports={mode:t.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:t.text,texttemplate:b({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,line:{color:o.color,width:o.width,dash:o.dash,backoff:o.backoff,shape:E({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,marker:t.marker,cliponaxis:E({},t.cliponaxis,{dflt:!1}),textposition:t.textposition,textfont:t.textfont,fill:E({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:e(),hoverinfo:E({},r.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:t.hoveron,hovertemplate:h(),hovertemplatefallback:S(),selected:t.selected,unselected:t.unselected}}}),GR=He({"src/traces/scattersmith/defaults.js"(Y,G){var h=ea(),b=mu(),S=av(),E=cv(),e=X0(),t=fv(),r=kv(),o=Xv().PTS_LINESONLY,a=E5();G.exports=function(s,f,c,p){function d(m,x){return h.coerce(s,f,a,m,x)}var T=i(s,f,p,d);if(!T){f.visible=!1;return}d("mode",T<o?"lines+markers":"lines"),d("text"),d("hovertext"),f.hoveron!=="fills"&&(d("hovertemplate"),d("hovertemplatefallback")),b.hasMarkers(f)&&S(s,f,c,p,d,{gradient:!0}),b.hasLines(f)&&(E(s,f,c,p,d,{backoff:!0}),e(s,f,d),d("connectgaps")),b.hasText(f)&&(d("texttemplate"),d("texttemplatefallback"),t(s,f,p,d));var l=[];(b.hasMarkers(f)||b.hasText(f))&&(d("cliponaxis"),d("marker.maxdisplayed"),l.push("points")),d("fill"),f.fill!=="none"&&(r(s,f,c,d),b.hasLines(f)||e(s,f,d)),(f.fill==="tonext"||f.fill==="toself")&&l.push("fills"),d("hoveron",l.join("+")||"points"),h.coerceSelectionMarkerOpacity(f,d)};function i(n,s,f,c){var p=c("real"),d=c("imag"),T;return p&&d&&(T=Math.min(p.length,d.length)),h.isTypedArray(p)&&(s.real=p=Array.from(p)),h.isTypedArray(d)&&(s.imag=d=Array.from(d)),s._length=T,T}}}),HR=He({"src/traces/scattersmith/format_labels.js"(Y,G){var h=Ao();G.exports=function(S,E,e){var t={},r=e[E.subplot]._subplot;return t.realLabel=h.tickText(r.radialAxis,S.real,!0).text,t.imagLabel=h.tickText(r.angularAxis,S.imag,!0).text,t}}}),WR=He({"src/traces/scattersmith/calc.js"(Y,G){var h=Ui(),b=Qo().BADNUM,S=hv(),E=Zv(),e=vv(),t=dv().calcMarkerSize;G.exports=function(o,a){for(var i=o._fullLayout,n=a.subplot,s=i[n].realaxis,f=i[n].imaginaryaxis,c=s.makeCalcdata(a,"real"),p=f.makeCalcdata(a,"imag"),d=a._length,T=new Array(d),l=0;l<d;l++){var m=c[l],x=p[l],A=T[l]={};h(m)&&h(x)?(A.real=m,A.imag=x):A.real=b}return t(a,d),S(o,a),E(T,a),e(T,a),T}}}),XR=He({"src/traces/scattersmith/plot.js"(Y,G){var h=Z0(),b=Qo().BADNUM,S=y5(),E=S.smith;G.exports=function(t,r,o){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,n=r.yaxis,s={xaxis:i,yaxis:n,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},f=0;f<o.length;f++)for(var c=o[f],p=0;p<c.length;p++){p===0&&(c[0].trace._xA=i,c[0].trace._yA=n);var d=c[p],T=d.real;if(T===b)d.x=d.y=b;else{var l=E([T,d.imag]);d.x=l[0],d.y=l[1]}}h(t,s,o,a)}}}),ZR=He({"src/traces/scattersmith/hover.js"(Y,G){var h=K0();function b(E,e,t,r){var o=h(E,e,t,r);if(!(!o||o[0].index===!1)){var a=o[0];if(a.index===void 0)return o;var i=E.subplot,n=a.cd[a.index],s=a.trace;if(i.isPtInside(n))return a.xLabelVal=void 0,a.yLabelVal=void 0,S(n,s,i,a),a.hovertemplate=s.hovertemplate,o}}function S(E,e,t,r){var o=t.radialAxis,a=t.angularAxis;o._hovertitle="real",a._hovertitle="imag";var i={};i[e.subplot]={_subplot:t};var n=e._module.formatLabels(E,e,i);r.realLabel=n.realLabel,r.imagLabel=n.imagLabel;var s=E.hi||e.hoverinfo,f=[];function c(d,T){f.push(d._hovertitle+": "+T)}if(!e.hovertemplate){var p=s.split("+");p.indexOf("all")!==-1&&(p=["real","imag","text"]),p.indexOf("real")!==-1&&c(o,r.realLabel),p.indexOf("imag")!==-1&&c(a,r.imagLabel),p.indexOf("text")!==-1&&r.text&&(f.push(r.text),delete r.text),r.extraText=f.join("<br>")}}G.exports={hoverPoints:b,makeHoverPointText:S}}}),YR=He({"src/traces/scattersmith/index.js"(Y,G){G.exports={moduleType:"trace",name:"scattersmith",basePlotModule:qR(),categories:["smith","symbols","showLegend","scatter-like"],attributes:E5(),supplyDefaults:GR(),colorbar:xh(),formatLabels:HR(),calc:WR(),plot:XR(),style:Gh().style,styleOnSelect:Gh().styleOnSelect,hoverPoints:ZR().hoverPoints,selectPoints:$0(),meta:{}}}}),KR=He({"lib/scattersmith.js"(Y,G){G.exports=YR()}}),Lh=He({"node_modules/world-calendars/dist/main.js"(Y,G){var h=Ef();function b(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}h(b.prototype,{instance:function(o,a){o=(o||"gregorian").toLowerCase(),a=a||"";var i=this._localCals[o+"-"+a];if(!i&&this.calendars[o]&&(i=new this.calendars[o](a),this._localCals[o+"-"+a]=i),!i)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,o);return i},newDate:function(o,a,i,n,s){return n=(o!=null&&o.year?o.calendar():typeof n=="string"?this.instance(n,s):n)||this.instance(),n.newDate(o,a,i)},substituteDigits:function(o){return function(a){return(a+"").replace(/[0-9]/g,function(i){return o[i]})}},substituteChineseDigits:function(o,a){return function(i){for(var n="",s=0;i>0;){var f=i%10;n=(f===0?"":o[f]+a[s])+n,s++,i=Math.floor(i/10)}return n.indexOf(o[1]+a[1])===0&&(n=n.substr(1)),n||o[0]}}});function S(o,a,i,n){if(this._calendar=o,this._year=a,this._month=i,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function E(o,a){return o=""+o,"000000".substring(0,a-o.length)+o}h(S.prototype,{newDate:function(o,a,i){return this._calendar.newDate(o??this,a,i)},year:function(o){return arguments.length===0?this._year:this.set(o,"y")},month:function(o){return arguments.length===0?this._month:this.set(o,"m")},day:function(o){return arguments.length===0?this._day:this.set(o,"d")},date:function(o,a,i){if(!this._calendar.isValid(o,a,i))throw(r.local.invalidDate||r.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=o,this._month=a,this._day=i,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(o,a){return this._calendar.add(this,o,a)},set:function(o,a){return this._calendar.set(this,o,a)},compareTo:function(o){if(this._calendar.name!==o._calendar.name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,o._calendar.local.name);var a=this._year!==o._year?this._year-o._year:this._month!==o._month?this.monthOfYear()-o.monthOfYear():this._day-o._day;return a===0?0:a<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(o){return this._calendar.fromJD(o)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(o){return this._calendar.fromJSDate(o)},toString:function(){return(this.year()<0?"-":"")+E(Math.abs(this.year()),4)+"-"+E(this.month(),2)+"-"+E(this.day(),2)}});function e(){this.shortYearCutoff="+10"}h(e.prototype,{_validateLevel:0,newDate:function(o,a,i){return o==null?this.today():(o.year&&(this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),i=o.day(),a=o.month(),o=o.year()),new S(this,o,a,i))},today:function(){return this.fromJSDate(new Date)},epoch:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return a.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return(a.year()<0?"-":"")+E(Math.abs(a.year()),4)},monthsInYear:function(o){return this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),12},monthOfYear:function(o,a){var i=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return(i.month()+this.monthsInYear(i)-this.firstMonth)%this.monthsInYear(i)+this.minMonth},fromMonthOfYear:function(o,a){var i=(a+this.firstMonth-2*this.minMonth)%this.monthsInYear(o)+this.minMonth;return this._validate(o,i,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth),i},daysInYear:function(o){var a=this._validate(o,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear);return this.leapYear(a)?366:365},dayOfYear:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(o,a,i){return this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),{}},add:function(o,a,i){return this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate),this._correctAdd(o,this._add(o,a,i),a,i)},_add:function(o,a,i){if(this._validateLevel++,i==="d"||i==="w"){var n=o.toJD()+a*(i==="w"?this.daysInWeek():1),s=o.calendar().fromJD(n);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var f=o.year()+(i==="y"?a:0),c=o.monthOfYear()+(i==="m"?a:0),s=o.day(),p=function(l){for(;c<l.minMonth;)f--,c+=l.monthsInYear(f);for(var m=l.monthsInYear(f);c>m-1+l.minMonth;)f++,c-=m,m=l.monthsInYear(f)};i==="y"?(o.month()!==this.fromMonthOfYear(f,c)&&(c=this.newDate(f,o.month(),this.minDay).monthOfYear()),c=Math.min(c,this.monthsInYear(f)),s=Math.min(s,this.daysInMonth(f,this.fromMonthOfYear(f,c)))):i==="m"&&(p(this),s=Math.min(s,this.daysInMonth(f,this.fromMonthOfYear(f,c))));var d=[f,this.fromMonthOfYear(f,c),s];return this._validateLevel--,d}catch(T){throw this._validateLevel--,T}},_correctAdd:function(o,a,i,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(a[0]===0||o.year()>0!=a[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],f=i<0?-1:1;a=this._add(o,i*s[0]+f*s[1],s[2])}return o.date(a[0],a[1],a[2])},set:function(o,a,i){this._validate(o,this.minMonth,this.minDay,r.local.invalidDate||r.regionalOptions[""].invalidDate);var n=i==="y"?a:o.year(),s=i==="m"?a:o.month(),f=i==="d"?a:o.day();return(i==="y"||i==="m")&&(f=Math.min(f,this.daysInMonth(n,s))),o.date(n,s,f)},isValid:function(o,a,i){this._validateLevel++;var n=this.hasYearZero||o!==0;if(n){var s=this.newDate(o,a,this.minDay);n=a>=this.minMonth&&a-this.minMonth<this.monthsInYear(s)&&i>=this.minDay&&i-this.minDay<this.daysInMonth(s)}return this._validateLevel--,n},toJSDate:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);return r.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(o){return this.fromJD(r.instance().fromJSDate(o).toJD())},_validate:function(o,a,i,n){if(o.year){if(this._validateLevel===0&&this.name!==o.calendar().name)throw(r.local.differentCalendars||r.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,o.calendar().local.name);return o}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(o,a,i))throw n.replace(/\{0\}/,this.local.name);var s=this.newDate(o,a,i);return this._validateLevel--,s}catch(f){throw this._validateLevel--,f}}});function t(o){this.local=this.regionalOptions[o]||this.regionalOptions[""]}t.prototype=new e,h(t.prototype,{name:"Gregorian",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(i){var a=this._validate(i,this.minMonth,this.minDay,r.local.invalidYear||r.regionalOptions[""].invalidYear),i=a.year()+(a.year()<0?1:0);return i%4===0&&(i%100!==0||i%400===0)},weekOfYear:function(o,a,i){var n=this.newDate(o,a,i);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(o,a){var i=this._validate(o,a,this.minDay,r.local.invalidMonth||r.regionalOptions[""].invalidMonth);return this.daysPerMonth[i.month()-1]+(i.month()===2&&this.leapYear(i.year())?1:0)},weekDay:function(o,a,i){return(this.dayOfWeek(o,a,i)||7)<6},toJD:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate);o=n.year(),a=n.month(),i=n.day(),o<0&&o++,a<3&&(a+=12,o--);var s=Math.floor(o/100),f=2-s+Math.floor(s/4);return Math.floor(365.25*(o+4716))+Math.floor(30.6001*(a+1))+i+f-1524.5},fromJD:function(o){var a=Math.floor(o+.5),i=Math.floor((a-186721625e-2)/36524.25);i=a+1+i-Math.floor(i/4);var n=i+1524,s=Math.floor((n-122.1)/365.25),f=Math.floor(365.25*s),c=Math.floor((n-f)/30.6001),p=n-f-Math.floor(c*30.6001),d=c-(c>13.5?13:1),T=s-(d>2.5?4716:4715);return T<=0&&T--,this.newDate(T,d,p)},toJSDate:function(o,a,i){var n=this._validate(o,a,i,r.local.invalidDate||r.regionalOptions[""].invalidDate),s=new Date(n.year(),n.month()-1,n.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(o){return this.newDate(o.getFullYear(),o.getMonth()+1,o.getDate())}});var r=G.exports=new b;r.cdate=S,r.baseCalendar=e,r.calendars.gregorian=t}}),$R=He({"node_modules/world-calendars/dist/plus.js"(){var Y=Ef(),G=Lh();Y(G.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),G.local=G.regionalOptions[""],Y(G.cdate.prototype,{formatDate:function(h,b){return typeof h!="string"&&(b=h,h=""),this._calendar.formatDate(h||"",this,b)}}),Y(G.baseCalendar.prototype,{UNIX_EPOCH:G.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:G.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(h,b,S){if(typeof h!="string"&&(S=b,b=h,h=""),!b)return"";if(b.calendar()!==this)throw G.local.invalidFormat||G.regionalOptions[""].invalidFormat;h=h||this.local.dateFormat,S=S||{};var E=S.dayNamesShort||this.local.dayNamesShort,e=S.dayNames||this.local.dayNames,t=S.monthNumbers||this.local.monthNumbers,r=S.monthNamesShort||this.local.monthNamesShort,o=S.monthNames||this.local.monthNames;S.calculateWeek||this.local.calculateWeek;for(var a=function(x,A){for(var M=1;m+M<h.length&&h.charAt(m+M)===x;)M++;return m+=M-1,Math.floor(M/(A||1))>1},i=function(x,A,M,_){var w=""+A;if(a(x,_))for(;w.length<M;)w="0"+w;return w},n=function(x,A,M,_){return a(x)?_[A]:M[A]},s=this,f=function(x){return typeof t=="function"?t.call(s,x,a("m")):d(i("m",x.month(),2))},c=function(x,A){return A?typeof o=="function"?o.call(s,x):o[x.month()-s.minMonth]:typeof r=="function"?r.call(s,x):r[x.month()-s.minMonth]},p=this.local.digits,d=function(x){return S.localNumbers&&p?p(x):x},T="",l=!1,m=0;m<h.length;m++)if(l)h.charAt(m)==="'"&&!a("'")?l=!1:T+=h.charAt(m);else switch(h.charAt(m)){case"d":T+=d(i("d",b.day(),2));break;case"D":T+=n("D",b.dayOfWeek(),E,e);break;case"o":T+=i("o",b.dayOfYear(),3);break;case"w":T+=i("w",b.weekOfYear(),2);break;case"m":T+=f(b);break;case"M":T+=c(b,a("M"));break;case"y":T+=a("y",2)?b.year():(b.year()%100<10?"0":"")+b.year()%100;break;case"Y":a("Y",2),T+=b.formatYear();break;case"J":T+=b.toJD();break;case"@":T+=(b.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":T+=(b.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":a("'")?T+="'":l=!0;break;default:T+=h.charAt(m)}return T},parseDate:function(h,b,S){if(b==null)throw G.local.invalidArguments||G.regionalOptions[""].invalidArguments;if(b=typeof b=="object"?b.toString():b+"",b==="")return null;h=h||this.local.dateFormat,S=S||{};var E=S.shortYearCutoff||this.shortYearCutoff;E=typeof E!="string"?E:this.today().year()%100+parseInt(E,10);for(var e=S.dayNamesShort||this.local.dayNamesShort,t=S.dayNames||this.local.dayNames,r=S.parseMonth||this.local.parseMonth,o=S.monthNumbers||this.local.monthNumbers,a=S.monthNamesShort||this.local.monthNamesShort,i=S.monthNames||this.local.monthNames,n=-1,s=-1,f=-1,c=-1,p=-1,d=!1,T=!1,l=function(R,L){for(var z=1;u+z<h.length&&h.charAt(u+z)===R;)z++;return u+=z-1,Math.floor(z/(L||1))>1},m=function(R,L){var z=l(R,L),F=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(R)+1],B=new RegExp("^-?\\d{1,"+F+"}"),O=b.substring(g).match(B);if(!O)throw(G.local.missingNumberAt||G.regionalOptions[""].missingNumberAt).replace(/\{0\}/,g);return g+=O[0].length,parseInt(O[0],10)},x=this,A=function(){if(typeof o=="function"){l("m");var R=o.call(x,b.substring(g));return g+=R.length,R}return m("m")},M=function(R,L,z,F){for(var B=l(R,F)?z:L,O=0;O<B.length;O++)if(b.substr(g,B[O].length).toLowerCase()===B[O].toLowerCase())return g+=B[O].length,O+x.minMonth;throw(G.local.unknownNameAt||G.regionalOptions[""].unknownNameAt).replace(/\{0\}/,g)},_=function(){if(typeof i=="function"){var R=l("M")?i.call(x,b.substring(g)):a.call(x,b.substring(g));return g+=R.length,R}return M("M",a,i)},w=function(){if(b.charAt(g)!==h.charAt(u))throw(G.local.unexpectedLiteralAt||G.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,g);g++},g=0,u=0;u<h.length;u++)if(T)h.charAt(u)==="'"&&!l("'")?T=!1:w();else switch(h.charAt(u)){case"d":c=m("d");break;case"D":M("D",e,t);break;case"o":p=m("o");break;case"w":m("w");break;case"m":f=A();break;case"M":f=_();break;case"y":var v=u;d=!l("y",2),u=v,s=m("y",2);break;case"Y":s=m("Y",2);break;case"J":n=m("J")+.5,b.charAt(g)==="."&&(g++,m("J"));break;case"@":n=m("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":n=m("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":g=b.length;break;case"'":l("'")?w():T=!0;break;default:w()}if(g<b.length)throw G.local.unexpectedText||G.regionalOptions[""].unexpectedText;if(s===-1?s=this.today().year():s<100&&d&&(s+=E===-1?1900:this.today().year()-this.today().year()%100-(s<=E?0:100)),typeof f=="string"&&(f=r.call(this,s,f)),p>-1){f=1,c=p;for(var y=this.daysInMonth(s,f);c>y;y=this.daysInMonth(s,f))f++,c-=y}return n>-1?this.fromJD(n):this.newDate(s,f,c)},determineDate:function(h,b,S,E,e){S&&typeof S!="object"&&(e=E,E=S,S=null),typeof E!="string"&&(e=E,E="");var t=this,r=function(o){try{return t.parseDate(E,o,e)}catch{}o=o.toLowerCase();for(var a=(o.match(/^c/)&&S?S.newDate():null)||t.today(),i=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,n=i.exec(o);n;)a.add(parseInt(n[1],10),n[2]||"d"),n=i.exec(o);return a};return b=b?b.newDate():null,h=h==null?b:typeof h=="string"?r(h):typeof h=="number"?isNaN(h)||h===1/0||h===-1/0?b:t.today().add(h,"d"):t.newDate(h),h}})}}),JR=He({"node_modules/world-calendars/dist/calendars/chinese.js"(){var Y=Lh(),G=Ef(),h=Y.instance();function b(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}b.prototype=new Y.baseCalendar,G(b.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,s){if(typeof n=="string"){var f=n.match(E);return f?f[0]:""}var c=this._validateYear(n),p=n.month(),d=""+this.toChineseMonth(c,p);return s&&d.length<2&&(d="0"+d),this.isIntercalaryMonth(c,p)&&(d+="i"),d},monthNames:function(n){if(typeof n=="string"){var s=n.match(e);return s?s[0]:""}var f=this._validateYear(n),c=n.month(),p=this.toChineseMonth(f,c),d=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][p-1];return this.isIntercalaryMonth(f,c)&&(d="闰"+d),d},monthNamesShort:function(n){if(typeof n=="string"){var s=n.match(t);return s?s[0]:""}var f=this._validateYear(n),c=n.month(),p=this.toChineseMonth(f,c),d=["一","二","三","四","五","六","七","八","九","十","十一","十二"][p-1];return this.isIntercalaryMonth(f,c)&&(d="闰"+d),d},parseMonth:function(n,s){n=this._validateYear(n);var f=parseInt(s),c;if(isNaN(f))s[0]==="闰"&&(c=!0,s=s.substring(1)),s[s.length-1]==="月"&&(s=s.substring(0,s.length-1)),f=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(s);else{var p=s[s.length-1];c=p==="i"||p==="I"}var d=this.toMonthIndex(n,f,c);return d},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(n,s){if(n.year&&(n=n.year()),typeof n!="number"||n<1888||n>2111)throw s.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,s,f){var c=this.intercalaryMonth(n),p=f&&s!==c;if(p||s<1||s>12)throw Y.local.invalidMonth.replace(/\{0\}/,this.local.name);var d;return c?!f&&s<=c?d=s-1:d=s:d=s-1,d},toChineseMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var f=this.intercalaryMonth(n),c=f?12:11;if(s<0||s>c)throw Y.local.invalidMonth.replace(/\{0\}/,this.local.name);var p;return f?s<f?p=s+1:p=s:p=s+1,p},intercalaryMonth:function(n){n=this._validateYear(n);var s=r[n-r[0]],f=s>>13;return f},isIntercalaryMonth:function(n,s){n.year&&(n=n.year(),s=n.month());var f=this.intercalaryMonth(n);return!!f&&f===s},leapYear:function(n){return this.intercalaryMonth(n)!==0},weekOfYear:function(n,s,f){var c=this._validateYear(n,Y.local.invalidyear),p=o[c-o[0]],d=p>>9&4095,T=p>>5&15,l=p&31,m;m=h.newDate(d,T,l),m.add(4-(m.dayOfWeek()||7),"d");var x=this.toJD(n,s,f)-m.toJD();return 1+Math.floor(x/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,s){n.year&&(s=n.month(),n=n.year()),n=this._validateYear(n);var f=r[n-r[0]],c=f>>13,p=c?12:11;if(s>p)throw Y.local.invalidMonth.replace(/\{0\}/,this.local.name);var d=f&1<<12-s?30:29;return d},weekDay:function(n,s,f){return(this.dayOfWeek(n,s,f)||7)<6},toJD:function(n,s,f){var c=this._validate(n,d,f,Y.local.invalidDate);n=this._validateYear(c.year()),s=c.month(),f=c.day();var p=this.isIntercalaryMonth(n,s),d=this.toChineseMonth(n,s),T=i(n,d,f,p);return h.toJD(T.year,T.month,T.day)},fromJD:function(n){var s=h.fromJD(n),f=a(s.year(),s.month(),s.day()),c=this.toMonthIndex(f.year,f.month,f.isIntercalary);return this.newDate(f.year,c,f.day)},fromString:function(n){var s=n.match(S),f=this._validateYear(+s[1]),c=+s[2],p=!!s[3],d=this.toMonthIndex(f,c,p),T=+s[4];return this.newDate(f,d,T)},add:function(n,s,f){var c=n.year(),p=n.month(),d=this.isIntercalaryMonth(c,p),T=this.toChineseMonth(c,p),l=Object.getPrototypeOf(b.prototype).add.call(this,n,s,f);if(f==="y"){var m=l.year(),x=l.month(),A=this.isIntercalaryMonth(m,T),M=d&&A?this.toMonthIndex(m,T,!0):this.toMonthIndex(m,T,!1);M!==x&&l.month(M)}return l}});var S=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,E=/^\d?\d[iI]?/m,e=/^闰?十?[一二三四五六七八九]?月/m,t=/^闰?十?[一二三四五六七八九]?/m;Y.calendars.chinese=b;var r=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],o=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function a(n,s,f,c){var p,d;if(typeof n=="object")p=n,d=s||{};else{var T=typeof n=="number"&&n>=1888&&n<=2111;if(!T)throw new Error("Solar year outside range 1888-2111");var l=typeof s=="number"&&s>=1&&s<=12;if(!l)throw new Error("Solar month outside range 1 - 12");var m=typeof f=="number"&&f>=1&&f<=31;if(!m)throw new Error("Solar day outside range 1 - 31");p={year:n,month:s,day:f},d={}}var x=o[p.year-o[0]],A=p.year<<9|p.month<<5|p.day;d.year=A>=x?p.year:p.year-1,x=o[d.year-o[0]];var M=x>>9&4095,_=x>>5&15,w=x&31,g,u=new Date(M,_-1,w),v=new Date(p.year,p.month-1,p.day);g=Math.round((v-u)/(24*3600*1e3));var y=r[d.year-r[0]],R;for(R=0;R<13;R++){var L=y&1<<12-R?30:29;if(g<L)break;g-=L}var z=y>>13;return!z||R<z?(d.isIntercalary=!1,d.month=1+R):R===z?(d.isIntercalary=!0,d.month=R):(d.isIntercalary=!1,d.month=R),d.day=1+g,d}function i(n,s,f,c,p){var d,T;if(typeof n=="object")T=n,d=s||{};else{var l=typeof n=="number"&&n>=1888&&n<=2111;if(!l)throw new Error("Lunar year outside range 1888-2111");var m=typeof s=="number"&&s>=1&&s<=12;if(!m)throw new Error("Lunar month outside range 1 - 12");var x=typeof f=="number"&&f>=1&&f<=30;if(!x)throw new Error("Lunar day outside range 1 - 30");var A;typeof c=="object"?(A=!1,d=c):(A=!!c,d={}),T={year:n,month:s,day:f,isIntercalary:A}}var M;M=T.day-1;var _=r[T.year-r[0]],w=_>>13,g;w&&(T.month>w||T.isIntercalary)?g=T.month:g=T.month-1;for(var u=0;u<g;u++){var v=_&1<<12-u?30:29;M+=v}var y=o[T.year-o[0]],R=y>>9&4095,L=y>>5&15,z=y&31,F=new Date(R,L-1,z+M);return d.year=F.getFullYear(),d.month=1+F.getMonth(),d.day=F.getDate(),d}}}),QR=He({"node_modules/world-calendars/dist/calendars/coptic.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,Y.local.invalidYear||Y.regionalOptions[""].invalidYear),13},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(b,S){var E=this._validate(b,S,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(b,S,E){return(this.dayOfWeek(b,S,E)||7)<6},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);return b=e.year(),b<0&&b++,e.day()+(e.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var S=Math.floor(b)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(b)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Y.calendars.coptic=h}}),eD=He({"node_modules/world-calendars/dist/calendars/discworld.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(S){return this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear),!1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear),13},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear),400},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);return(t.day()+1)%8},weekDay:function(S,E,e){var t=this.dayOfWeek(S,E,e);return t>=2&&t<=6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);return{century:b[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);return S=t.year()+(t.year()<0?1:0),E=t.month(),e=t.day(),e+(E>1?16:0)+(E>2?(E-2)*32:0)+(S-1)*400+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S+.5)-Math.floor(this.jdEpoch)-1;var E=Math.floor(S/400)+1;S-=(E-1)*400,S+=S>15?16:0;var e=Math.floor(S/32)+1,t=S-(e-1)*32+1;return this.newDate(E<=0?E-1:E,e,t)}});var b={20:"Fruitbat",21:"Anchovy"};Y.calendars.discworld=h}}),tD=He({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),E=S.year()+(S.year()<0?1:0);return E%4===3||E%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,Y.local.invalidYear||Y.regionalOptions[""].invalidYear),13},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(b,S){var E=this._validate(b,S,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===13&&this.leapYear(E.year())?1:0)},weekDay:function(b,S,E){return(this.dayOfWeek(b,S,E)||7)<6},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);return b=e.year(),b<0&&b++,e.day()+(e.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var S=Math.floor(b)+.5-this.jdEpoch,E=Math.floor((S-Math.floor((S+366)/1461))/365)+1;E<=0&&E--,S=Math.floor(b)+.5-this.newDate(E,1,1).toJD();var e=Math.floor(S/30)+1,t=S-(e-1)*30+1;return this.newDate(E,e,t)}}),Y.calendars.ethiopian=h}}),rD=He({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear);return this._leapYear(E.year())},_leapYear:function(S){return S=S<0?S+1:S,b(S*7+1,19)<7},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear),this._leapYear(S.year?S.year():S)?13:12},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear);return S=E.year(),this.toJD(S===-1?1:S+1,7,1)-this.toJD(S,7,1)},daysInMonth:function(S,E){return S.year&&(E=S.month(),S=S.year()),this._validate(S,E,this.minDay,Y.local.invalidMonth),E===12&&this.leapYear(S)||E===8&&b(this.daysInYear(S),10)===5?30:E===9&&b(this.daysInYear(S),10)===3?29:this.daysPerMonth[E-1]},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==6},extraInfo:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=S<=0?S+1:S,o=this.jdEpoch+this._delay1(r)+this._delay2(r)+e+1;if(E<7){for(var a=7;a<=this.monthsInYear(S);a++)o+=this.daysInMonth(S,a);for(var a=1;a<E;a++)o+=this.daysInMonth(S,a)}else for(var a=7;a<E;a++)o+=this.daysInMonth(S,a);return o},_delay1:function(S){var E=Math.floor((235*S-234)/19),e=12084+13753*E,t=E*29+Math.floor(e/25920);return b(3*(t+1),7)<3&&t++,t},_delay2:function(S){var E=this._delay1(S-1),e=this._delay1(S),t=this._delay1(S+1);return t-e===356?2:e-E===382?1:0},fromJD:function(S){S=Math.floor(S)+.5;for(var E=Math.floor((S-this.jdEpoch)*98496/35975351)-1;S>=this.toJD(E===-1?1:E+1,7,1);)E++;for(var e=S<this.toJD(E,1,1)?7:1;S>this.toJD(E,e,this.daysInMonth(E,e));)e++;var t=S-this.toJD(E,e,1)+1;return this.newDate(E,e,t)}});function b(S,E){return S-E*Math.floor(S/E)}Y.calendars.hebrew=h}}),aD=He({"node_modules/world-calendars/dist/calendars/islamic.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(b){var S=this._validate(b,this.minMonth,this.minDay,Y.local.invalidYear);return(S.year()*11+14)%30<11},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(b){return this.leapYear(b)?355:354},daysInMonth:function(b,S){var E=this._validate(b,S,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===12&&this.leapYear(E.year())?1:0)},weekDay:function(b,S,E){return this.dayOfWeek(b,S,E)!==5},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);return b=e.year(),S=e.month(),E=e.day(),b=b<=0?b+1:b,E+Math.ceil(29.5*(S-1))+(b-1)*354+Math.floor((3+11*b)/30)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b)+.5;var S=Math.floor((30*(b-this.jdEpoch)+10646)/10631);S=S<=0?S-1:S;var E=Math.min(12,Math.ceil((b-29-this.toJD(S,1,1))/29.5)+1),e=b-this.toJD(S,E,1)+1;return this.newDate(S,E,e)}}),Y.calendars.islamic=h}}),nD=He({"node_modules/world-calendars/dist/calendars/julian.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(E){var S=this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),E=S.year()<0?S.year()+1:S.year();return E%4===0},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(4-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(b,S){var E=this._validate(b,S,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[E.month()-1]+(E.month()===2&&this.leapYear(E.year())?1:0)},weekDay:function(b,S,E){return(this.dayOfWeek(b,S,E)||7)<6},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);return b=e.year(),S=e.month(),E=e.day(),b<0&&b++,S<=2&&(b--,S+=12),Math.floor(365.25*(b+4716))+Math.floor(30.6001*(S+1))+E-1524.5},fromJD:function(b){var S=Math.floor(b+.5),E=S+1524,e=Math.floor((E-122.1)/365.25),t=Math.floor(365.25*e),r=Math.floor((E-t)/30.6001),o=r-Math.floor(r<14?1:13),a=e-Math.floor(o>2?4716:4715),i=E-t-Math.floor(30.6001*r);return a<=0&&a--,this.newDate(a,o,i)}}),Y.calendars.julian=h}}),iD=He({"node_modules/world-calendars/dist/calendars/mayan.js"(){var Y=Lh(),G=Ef();function h(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),!1},formatYear:function(E){var e=this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear);E=e.year();var t=Math.floor(E/400);E=E%400,E+=E<0?400:0;var r=Math.floor(E/20);return t+"."+r+"."+E%20},forYear:function(E){if(E=E.split("."),E.length<3)throw"Invalid Mayan year";for(var e=0,t=0;t<E.length;t++){var r=parseInt(E[t],10);if(Math.abs(r)>19||t>0&&r<0)throw"Invalid Mayan year";e=e*20+r}return e},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),18},weekOfYear:function(E,e,t){return this._validate(E,e,t,Y.local.invalidDate),0},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,Y.local.invalidYear),360},daysInMonth:function(E,e){return this._validate(E,e,this.minDay,Y.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(E,e,t){var r=this._validate(E,e,t,Y.local.invalidDate);return r.day()},weekDay:function(E,e,t){return this._validate(E,e,t,Y.local.invalidDate),!0},extraInfo:function(E,e,t){var r=this._validate(E,e,t,Y.local.invalidDate),o=r.toJD(),a=this._toHaab(o),i=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[i[0]-1],tzolkinDay:i[0],tzolkinTrecena:i[1]}},_toHaab:function(E){E-=this.jdEpoch;var e=b(E+8+340,365);return[Math.floor(e/20)+1,b(e,20)]},_toTzolkin:function(E){return E-=this.jdEpoch,[S(E+20,20),S(E+4,13)]},toJD:function(E,e,t){var r=this._validate(E,e,t,Y.local.invalidDate);return r.day()+r.month()*20+r.year()*360+this.jdEpoch},fromJD:function(E){E=Math.floor(E)+.5-this.jdEpoch;var e=Math.floor(E/360);E=E%360,E+=E<0?360:0;var t=Math.floor(E/20),r=E%20;return this.newDate(e,t,r)}});function b(E,e){return E-e*Math.floor(E/e)}function S(E,e){return b(E-1,e)+1}Y.calendars.mayan=h}}),oD=He({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar;var b=Y.instance("gregorian");G(h.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear||Y.regionalOptions[""].invalidYear);return b.leapYear(E.year()+(E.year()<1?1:0)+1469)},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Y.local.invalidMonth),r=t.year();r<0&&r++;for(var o=t.day(),a=1;a<t.month();a++)o+=this.daysPerMonth[a-1];return o+b.toJD(r+1468,3,13)},fromJD:function(S){S=Math.floor(S+.5);for(var E=Math.floor((S-(this.jdEpoch-1))/366);S>=this.toJD(E+1,1,1);)E++;for(var e=S-Math.floor(this.toJD(E,1,1)+.5)+1,t=1;e>this.daysInMonth(E,t);)e-=this.daysInMonth(E,t),t++;return this.newDate(E,t,e)}}),Y.calendars.nanakshahi=h}}),sD=He({"node_modules/world-calendars/dist/calendars/nepali.js"(){var Y=Lh(),G=Ef();function h(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(b){return this.daysInYear(b)!==this.daysPerYear},weekOfYear:function(b,S,E){var e=this.newDate(b,S,E);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(b){var S=this._validate(b,this.minMonth,this.minDay,Y.local.invalidYear);if(b=S.year(),typeof this.NEPALI_CALENDAR_DATA[b]>"u")return this.daysPerYear;for(var E=0,e=this.minMonth;e<=12;e++)E+=this.NEPALI_CALENDAR_DATA[b][e];return E},daysInMonth:function(b,S){return b.year&&(S=b.month(),b=b.year()),this._validate(b,S,this.minDay,Y.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[b]>"u"?this.daysPerMonth[S-1]:this.NEPALI_CALENDAR_DATA[b][S]},weekDay:function(b,S,E){return this.dayOfWeek(b,S,E)!==6},toJD:function(b,S,E){var e=this._validate(b,S,E,Y.local.invalidDate);b=e.year(),S=e.month(),E=e.day();var t=Y.instance(),r=0,o=S,a=b;this._createMissingCalendarData(b);var i=b-(o>9||o===9&&E>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(S!==9&&(r=E,o--);o!==9;)o<=0&&(o=12,a--),r+=this.NEPALI_CALENDAR_DATA[a][o],o--;return S===9?(r+=E-this.NEPALI_CALENDAR_DATA[a][0],r<0&&(r+=t.daysInYear(i))):r+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],t.newDate(i,1,1).add(r,"d").toJD()},fromJD:function(b){var S=Y.instance(),E=S.fromJD(b),e=E.year(),t=E.dayOfYear(),r=e+56;this._createMissingCalendarData(r);for(var o=9,a=this.NEPALI_CALENDAR_DATA[r][0],i=this.NEPALI_CALENDAR_DATA[r][o]-a+1;t>i;)o++,o>12&&(o=1,r++),i+=this.NEPALI_CALENDAR_DATA[r][o];var n=this.NEPALI_CALENDAR_DATA[r][o]-(i-t);return this.newDate(r,o,n)},_createMissingCalendarData:function(b){var S=this.daysPerMonth.slice(0);S.unshift(17);for(var E=b-1;E<b+2;E++)typeof this.NEPALI_CALENDAR_DATA[E]>"u"&&(this.NEPALI_CALENDAR_DATA[E]=S)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),Y.calendars.nepali=h}}),lD=He({"node_modules/world-calendars/dist/calendars/persian.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}function b(S){var E=S-475;S<0&&E++;var e=.242197,t=e*E,r=e*(E+1),o=t-Math.floor(t),a=r-Math.floor(r);return o>a}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear);return b(E.year())},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-((t.dayOfWeek()+1)%7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===12&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate);S=t.year(),E=t.month(),e=t.day();var r=0;if(S>0)for(var o=1;o<S;o++)b(o)&&r++;else if(S<0)for(var o=S;o<0;o++)b(o)&&r--;return e+(E<=7?(E-1)*31:(E-1)*30+6)+(S>0?S-1:S)*365+r+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var E=475+(S-this.toJD(475,1,1))/365.242197,e=Math.floor(E);e<=0&&e--,S>this.toJD(e,12,b(e)?30:29)&&(e++,e===0&&e++);var t=S-this.toJD(e,1,1)+1,r=t<=186?Math.ceil(t/31):Math.ceil((t-6)/30),o=S-this.toJD(e,r,1)+1;return this.newDate(e,r,o)}}),Y.calendars.persian=h,Y.calendars.jalali=h}}),uD=He({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var Y=Lh(),G=Ef(),h=Y.instance();function b(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}b.prototype=new Y.baseCalendar,G(b.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Y.local.invalidYear),e=this._t2gYear(E.year());return h.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Y.local.invalidYear),r=this._t2gYear(t.year());return h.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Y.local.invalidDate),r=this._t2gYear(t.year());return h.toJD(r,t.month(),t.day())},fromJD:function(S){var E=h.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)},_g2tYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)}}),Y.calendars.taiwan=b}}),cD=He({"node_modules/world-calendars/dist/calendars/thai.js"(){var Y=Lh(),G=Ef(),h=Y.instance();function b(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}b.prototype=new Y.baseCalendar,G(b.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(e){var E=this._validate(e,this.minMonth,this.minDay,Y.local.invalidYear),e=this._t2gYear(E.year());return h.leapYear(e)},weekOfYear:function(r,E,e){var t=this._validate(r,this.minMonth,this.minDay,Y.local.invalidYear),r=this._t2gYear(t.year());return h.weekOfYear(r,t.month(),t.day())},daysInMonth:function(S,E){var e=this._validate(S,E,this.minDay,Y.local.invalidMonth);return this.daysPerMonth[e.month()-1]+(e.month()===2&&this.leapYear(e.year())?1:0)},weekDay:function(S,E,e){return(this.dayOfWeek(S,E,e)||7)<6},toJD:function(r,E,e){var t=this._validate(r,E,e,Y.local.invalidDate),r=this._t2gYear(t.year());return h.toJD(r,t.month(),t.day())},fromJD:function(S){var E=h.fromJD(S),e=this._g2tYear(E.year());return this.newDate(e,E.month(),E.day())},_t2gYear:function(S){return S-this.yearsOffset-(S>=1&&S<=this.yearsOffset?1:0)},_g2tYear:function(S){return S+this.yearsOffset+(S>=-this.yearsOffset&&S<=-1?1:0)}}),Y.calendars.thai=b}}),fD=He({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var Y=Lh(),G=Ef();function h(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}h.prototype=new Y.baseCalendar,G(h.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(S){var E=this._validate(S,this.minMonth,this.minDay,Y.local.invalidYear);return this.daysInYear(E.year())===355},weekOfYear:function(S,E,e){var t=this.newDate(S,E,e);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(S){for(var E=0,e=1;e<=12;e++)E+=this.daysInMonth(S,e);return E},daysInMonth:function(S,E){for(var e=this._validate(S,E,this.minDay,Y.local.invalidMonth),t=e.toJD()-24e5+.5,r=0,o=0;o<b.length;o++){if(b[o]>t)return b[r]-b[r-1];r++}return 30},weekDay:function(S,E,e){return this.dayOfWeek(S,E,e)!==5},toJD:function(S,E,e){var t=this._validate(S,E,e,Y.local.invalidDate),r=12*(t.year()-1)+t.month()-15292,o=t.day()+b[r-1]-1;return o+24e5-.5},fromJD:function(S){for(var E=S-24e5+.5,e=0,t=0;t<b.length&&!(b[t]>E);t++)e++;var r=e+15292,o=Math.floor((r-1)/12),a=o+1,i=r-12*o,n=E-b[e-1]+1;return this.newDate(a,i,n)},isValid:function(S,E,e){var t=Y.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(S=S.year!=null?S.year:S,t=S>=1276&&S<=1500),t},_validate:function(S,E,e,t){var r=Y.baseCalendar.prototype._validate.apply(this,arguments);if(r.year<1276||r.year>1500)throw t.replace(/\{0\}/,this.local.name);return r}}),Y.calendars.ummalqura=h;var b=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]}}),hD=He({"src/components/calendars/calendars.js"(Y,G){G.exports=Lh(),$R(),JR(),QR(),eD(),tD(),rD(),aD(),nD(),iD(),oD(),sD(),lD(),uD(),cD(),fD()}}),vD=He({"src/components/calendars/index.js"(Y,G){var h=hD(),b=ea(),S=Qo(),E=S.EPOCHJD,e=S.ONEDAY,t={valType:"enumerated",values:b.sortObjectKeys(h.calendars),editType:"calc",dflt:"gregorian"},r=function(_,w,g,u){var v={};return v[g]=t,b.coerce(_,w,v,g,u)},o=function(_,w,g,u){for(var v=0;v<g.length;v++)r(_,w,g[v]+"calendar",u.calendar)},a={chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},i={chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},n={chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},s="##",f={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:s,w:s,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function c(_,w,g){for(var u=Math.floor((w+.05)/e)+E,v=d(g).fromJD(u),y=0,R,L,z,F,B;(y=_.indexOf("%",y))!==-1;)R=_.charAt(y+1),R==="0"||R==="-"||R==="_"?(z=3,L=_.charAt(y+2),R==="_"&&(R="-")):(L=R,R="0",z=2),F=f[L],F?(F===s?B=s:B=v.formatDate(F[R]),_=_.slice(0,y)+B+_.slice(y+z),y+=B.length):y+=z;return _}var p={};function d(_){var w=p[_];return w||(w=p[_]=h.instance(_),w)}function T(_){return b.extendFlat({},t,{description:_})}function l(_){return"Sets the calendar system to use with `"+_+"` date data."}var m={xcalendar:T(l("x"))},x=b.extendFlat({},m,{ycalendar:T(l("y"))}),A=b.extendFlat({},x,{zcalendar:T(l("z"))}),M=T(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));G.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:x,bar:x,box:x,heatmap:x,contour:x,histogram:x,histogram2d:x,histogram2dcontour:x,scatter3d:A,surface:A,mesh3d:A,scattergl:x,ohlc:m,candlestick:m},layout:{calendar:T(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:M},yaxis:{calendar:M},scene:{xaxis:{calendar:M},yaxis:{calendar:M},zaxis:{calendar:M}},polar:{radialaxis:{calendar:M}}}},layoutAttributes:t,handleDefaults:r,handleTraceDefaults:o,CANONICAL_SUNDAY:i,CANONICAL_TICK:a,DFLTRANGE:n,getCal:d,worldCalFmt:c}}}),dD=He({"lib/calendars.js"(Y,G){G.exports=vD()}}),pD=He({"lib/index.js"(Y,G){var h=WM();h.register([KM(),QM(),aE(),lE(),hE(),gE(),_E(),LE(),NE(),KE(),o6(),Mk(),Ik(),yC(),EC(),zC(),VC(),iL(),uL(),fL(),pL(),xL(),SL(),CL(),GL(),XL(),L8(),H8(),nI(),cI(),xI(),AI(),II(),HI(),YI(),a4(),y4(),A4(),P4(),eR(),lR(),vR(),yR(),wR(),ER(),zR(),jR(),KR(),dD()]),G.exports=h}});return pD()})();return window.Plotly=Ms,Ms})})($y)),$y.exports}var Q5;function g7(){return Q5||(Q5=1,(function(en){Object.defineProperty(en,"__esModule",{value:!0}),en.default=void 0;var qi=Fo(v7()),Ms=Fo(p7());function Fo(Xu){return Xu&&Xu.__esModule?Xu:{default:Xu}}var zs=(0,qi.default)(Ms.default),rc=zs;en.default=rc})(lb)),lb}var m7=g7();const y7=e7(m7),_7=t7("div",{target:"e1d14c7f0"})({height:"100%"}),x7=r7.getLogger("PlotlyChart:CustomTheme");function b7(en,qi){const{genericFonts:Ms,colors:Fo,fontSizes:zs}=qi,rc={font:{color:yh(qi),family:Ms.bodyFont,size:Wf(zs.twoSm),weight:qi.fontWeights.normal},title:{color:Fo.headingColor,subtitleColor:Fo.bodyText,font:{family:Ms.headingFont,size:Wf(zs.md),color:Fo.headingColor},pad:{l:Wf(qi.spacing.twoXS)},xanchor:"left",x:0},legend:{title:{font:{size:Wf(zs.twoSm),color:yh(qi)},side:"top"},valign:"top",bordercolor:Fo.transparent,borderwidth:0,font:{size:Wf(zs.twoSm),color:aA(qi)}},paper_bgcolor:Fo.bgColor,plot_bgcolor:Fo.bgColor,yaxis:{ticklabelposition:"outside",zerolinecolor:qv(qi),title:{font:{color:yh(qi),size:Wf(zs.sm)},standoff:Wf(qi.spacing.twoXL)},tickcolor:qv(qi),tickfont:{color:yh(qi),size:Wf(zs.twoSm)},gridcolor:qv(qi),minor:{gridcolor:qv(qi)},automargin:!0},xaxis:{zerolinecolor:qv(qi),gridcolor:qv(qi),showgrid:!1,tickfont:{color:yh(qi),size:Wf(zs.twoSm)},tickcolor:qv(qi),title:{font:{color:yh(qi),size:Wf(zs.sm)},standoff:Wf(qi.spacing.xl)},minor:{gridcolor:qv(qi)},zeroline:!1,automargin:!0,rangeselector:{bgcolor:Fo.bgColor,bordercolor:qv(qi),borderwidth:1,x:0}},margin:{pad:Wf(qi.spacing.sm),r:0,l:0},hoverlabel:{bgcolor:Fo.bgColor,bordercolor:Fo.borderColor,font:{color:yh(qi),family:Ms.bodyFont,size:Wf(zs.twoSm)}},coloraxis:{colorbar:{thickness:16,xpad:Wf(qi.spacing.twoXL),ticklabelposition:"outside",outlinecolor:Fo.transparent,outlinewidth:8,len:.75,y:.5745,title:{font:{color:yh(qi),size:Wf(zs.sm)}},tickfont:{color:yh(qi),size:Wf(zs.twoSm)}}},ternary:{gridcolor:yh(qi),bgcolor:Fo.bgColor,title:{font:{family:Ms.bodyFont,size:Wf(zs.sm)}},color:yh(qi),aaxis:{gridcolor:yh(qi),linecolor:yh(qi),tickfont:{family:Ms.bodyFont,size:Wf(zs.twoSm)}},baxis:{linecolor:yh(qi),gridcolor:yh(qi),tickfont:{family:Ms.bodyFont,size:Wf(zs.twoSm)}},caxis:{linecolor:yh(qi),gridcolor:yh(qi),tickfont:{family:Ms.bodyFont,size:Wf(zs.twoSm)}}}};rA(en,rc)}function w7(en,qi,Ms){const Fo="#000001",zs="#000002",rc="#000003",Xu="#000004",Xf="#000005",wf="#000006",Hc="#000007",Tf="#000008",Af="#000009",ah="#000010";if(Ms==="streamlit"){const js=qi.colors.chartCategoricalColors;en=en.replaceAll(Fo,js[0]),en=en.replaceAll(zs,js[1]),en=en.replaceAll(rc,js[2]),en=en.replaceAll(Xu,js[3]),en=en.replaceAll(Xf,js[4]),en=en.replaceAll(wf,js[5]),en=en.replaceAll(Hc,js[6]),en=en.replaceAll(Tf,js[7]),en=en.replaceAll(Af,js[8]),en=en.replaceAll(ah,js[9])}else en=en.replaceAll(Fo,"#636efa"),en=en.replaceAll(zs,"#EF553B"),en=en.replaceAll(rc,"#00cc96"),en=en.replaceAll(Xu,"#ab63fa"),en=en.replaceAll(Xf,"#FFA15A"),en=en.replaceAll(wf,"#19d3f3"),en=en.replaceAll(Hc,"#FF6692"),en=en.replaceAll(Tf,"#B6E880"),en=en.replaceAll(Af,"#FF97FF"),en=en.replaceAll(ah,"#FECB52");return en}function T7(en,qi,Ms){const Fo="#000011",zs="#000012",rc="#000013",Xu="#000014",Xf="#000015",wf="#000016",Hc="#000017",Tf="#000018",Af="#000019",ah="#000020";if(Ms==="streamlit"){const js=qi.colors.chartSequentialColors;en=en.replaceAll(Fo,js[0]),en=en.replaceAll(zs,js[1]),en=en.replaceAll(rc,js[2]),en=en.replaceAll(Xu,js[3]),en=en.replaceAll(Xf,js[4]),en=en.replaceAll(wf,js[5]),en=en.replaceAll(Hc,js[6]),en=en.replaceAll(Tf,js[7]),en=en.replaceAll(Af,js[8]),en=en.replaceAll(ah,js[9])}else en=en.replaceAll(Fo,"#0d0887"),en=en.replaceAll(zs,"#46039f"),en=en.replaceAll(rc,"#7201a8"),en=en.replaceAll(Xu,"#9c179e"),en=en.replaceAll(Xf,"#bd3786"),en=en.replaceAll(wf,"#d8576b"),en=en.replaceAll(Hc,"#ed7953"),en=en.replaceAll(Tf,"#fb9f3a"),en=en.replaceAll(Af,"#fdca26"),en=en.replaceAll(ah,"#f0f921");return en}function A7(en,qi,Ms){const Fo="#000021",zs="#000022",rc="#000023",Xu="#000024",Xf="#000025",wf="#000026",Hc="#000027",Tf="#000028",Af="#000029",ah="#000030",js="#000031";if(Ms==="streamlit"){const fl=s7(qi);en=en.replaceAll(Fo,fl[0]),en=en.replaceAll(zs,fl[1]),en=en.replaceAll(rc,fl[2]),en=en.replaceAll(Xu,fl[3]),en=en.replaceAll(Xf,fl[4]),en=en.replaceAll(wf,fl[5]),en=en.replaceAll(Hc,fl[6]),en=en.replaceAll(Tf,fl[7]),en=en.replaceAll(Af,fl[8]),en=en.replaceAll(ah,fl[9]),en=en.replaceAll(js,fl[10])}else en=en.replaceAll(Fo,"#8e0152"),en=en.replaceAll(zs,"#c51b7d"),en=en.replaceAll(rc,"#de77ae"),en=en.replaceAll(Xu,"#f1b6da"),en=en.replaceAll(Xf,"#fde0ef"),en=en.replaceAll(wf,"#f7f7f7"),en=en.replaceAll(Hc,"#e6f5d0"),en=en.replaceAll(Tf,"#b8e186"),en=en.replaceAll(Af,"#7fbc41"),en=en.replaceAll(ah,"#4d9221"),en=en.replaceAll(js,"#276419");return en}function S7(en,qi){const Ms="#000032",Fo="#000033",zs="#000034",rc="#000035",Xu="#000036",Xf="#000037",wf="#000038",Hc="#000039",Tf="#000040";return en=en.replaceAll(Ms,n7(qi)),en=en.replaceAll(Fo,i7(qi)),en=en.replaceAll(zs,o7(qi)),en=en.replaceAll(rc,qv(qi)),en=en.replaceAll(Xu,yh(qi)),en=en.replaceAll(Xf,aA(qi)),en=en.replaceAll(wf,qi.colors.bgColor),en=en.replaceAll(Hc,qi.colors.fadedText05),en=en.replaceAll(Tf,qi.colors.bgMix),en}function M7(en,qi,Ms){return en=S7(en,qi),en=w7(en,qi,Ms),en=T7(en,qi,Ms),en=A7(en,qi,Ms),en}function E7(en,qi){try{b7(en.layout.template.layout,qi)}catch(Ms){const Fo=a7(Ms);x7.error(Fo)}"title"in en.layout&&(en.layout.title=rA(en.layout.title,{text:`<b>${en.layout.title.text}</b>`}))}function k7(en,qi){const{colors:Ms,genericFonts:Fo}=qi,zs={font:{color:Ms.bodyText,family:Fo.bodyFont},paper_bgcolor:Ms.bgColor,plot_bgcolor:Ms.secondaryBg};return{...en,font:{...zs.font,...en.font},paper_bgcolor:en.paper_bgcolor||zs.paper_bgcolor,plot_bgcolor:en.plot_bgcolor||zs.plot_bgcolor}}function C7(en){if(en==="")return{x:[],y:[]};const qi=en.replace("M","").replace("Z","").split("L"),Ms=[],Fo=[];return qi.forEach(zs=>{const[rc,Xu]=zs.split(",").map(Number);Ms.push(rc),Fo.push(Xu)}),{x:Ms,y:Fo}}function L7(en){if(!("x0"in en&&"x1"in en&&"y0"in en&&"y1"in en))return{x:[],y:[]};const Ms=[en.x0,en.x1],Fo=[en.y0,en.y1];return{x:Ms,y:Fo}}function eA(en,qi,Ms){const Fo=JSON.parse(M7(JSON.stringify(en),Ms,qi));return qi==="streamlit"?E7(Fo,Ms):Fo.layout=k7(Fo.layout,Ms),Fo}function P7(en,qi,Ms,Fo){if(!en)return;const zs={selection:{points:[],point_indices:[],box:[],lasso:[]}},rc=new Set,Xu=[],Xf=[],wf=[],{selections:Hc,points:Tf}=en;if(Tf&&Tf.forEach(function(js){wf.push({...js,legendgroup:js.data.legendgroup||void 0,data:void 0,fullData:void 0}),K5(js.pointIndex)&&rc.add(js.pointIndex),K5(js.pointIndices)&&js.pointIndices.length>0&&js.pointIndices.forEach(fl=>rc.add(fl))}),Hc&&Hc.forEach(js=>{if(js.type==="rect"){const fl=L7(js),Wc={xref:js.xref,yref:js.yref,x:fl.x,y:fl.y};Xu.push(Wc)}if(js.type==="path"){const fl=C7(js.path),Wc={xref:js.xref,yref:js.yref,x:fl.x,y:fl.y};Xf.push(Wc)}}),zs.selection.point_indices=Array.from(rc),zs.selection.points=wf.map(js=>l7(js)),zs.selection.box=Xu,zs.selection.lasso=Xf,zs.selection.box.length>0&&!Ms.selectionMode.includes(Kg.SelectionMode.BOX)||zs.selection.lasso.length>0&&!Ms.selectionMode.includes(Kg.SelectionMode.LASSO))return;const Af=qi.getStringValue(Ms),ah=JSON.stringify(zs);Af!==ah&&qi.setStringValue(Ms,ah,{fromUi:!0},Fo)}function I7(en,qi,Ms){const Fo={selection:{points:[],point_indices:[],box:[],lasso:[]}};en.setStringValue(qi,JSON.stringify(Fo),{fromUi:!0},Ms)}const R7=150,D7=50,tA=450,z7={width:600,height:470,name:"fullscreen-expand",path:"M32 32C14.3 32 0 46.3 0 64v96c0 17.7 14.3 32 32 32s32-14.3 32-32V96h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H64V352zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32h64v64c0 17.7 14.3 32 32 32s32-14.3 32-32V64c0-17.7-14.3-32-32-32H320zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H320c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V352z"},F7={width:600,height:470,name:"fullscreen-collapse",path:"M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v64H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96c17.7 0 32-14.3 32-32V64zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32H96v64c0 17.7 14.3 32 32 32s32-14.3 32-32V352c0-17.7-14.3-32-32-32H32zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H352V64zM320 320c-17.7 0-32 14.3-32 32v96c0 17.7 14.3 32 32 32s32-14.3 32-32V384h64c17.7 0 32-14.3 32-32s-14.3-32-32-32H320z"};function O7({element:en,widgetMgr:qi,disabled:Ms,fragmentId:Fo,disableFullscreenMode:zs}){const rc=u7(),{expanded:Xu,width:Xf,height:wf,expand:Hc,collapse:Tf}=nA(iA),{height:Af,elementRef:ah}=c7([],0),js=Xf||0,fl=Gv.useMemo(()=>en.spec?JSON.parse(en.spec):{layout:{},data:[],frames:void 0},[en.id,en.spec]),[Wc,Kh]=Gv.useState(()=>{const Jo=qi.getElementState(en.id,"figure");return Jo||eA(fl,en.theme,rc)}),Fs=en.selectionMode.length>0&&!Ms,He=Fs&&en.selectionMode.includes(Kg.SelectionMode.LASSO),uv=Fs&&en.selectionMode.includes(Kg.SelectionMode.BOX),Hv=Fs&&en.selectionMode.includes(Kg.SelectionMode.POINTS),ws=Gv.useMemo(()=>{if(!en.config)return{};const Jo=JSON.parse(en.config);if(zs||(Jo.modeBarButtonsToAdd=[{name:Xu?"Close fullscreen":"Fullscreen",icon:Xu?F7:z7,click:()=>{Xu&&Tf?Tf():Hc&&Hc()}},...Jo.modeBarButtonsToAdd??[]]),!Jo.modeBarButtonsToRemove){Jo.displaylogo=!1;const Ni=["sendDataToCloud"];Fs?(He||Ni.push("lasso2d"),uv||Ni.push("select2d")):Ni.push("lasso2d","select2d"),Jo.modeBarButtonsToRemove=Ni}return Jo},[en.id,en.config,Xu,zs,Fs,He,uv,Tf,Hc]);Gv.useEffect(()=>{Kh(Jo=>eA(Jo,en.theme,rc))},[en.id,rc,en.theme]),Gv.useEffect(()=>{let Jo=fl.layout.clickmode,Ni=fl.layout.hovermode,iu=fl.layout.dragmode;Ms?(Jo="none",iu="pan"):Fs&&(fl.layout.clickmode||(Hv?Jo="event+select":Jo="none"),fl.layout.hovermode||(Ni="closest"),fl.layout.dragmode||(Hv?iu="pan":uv?iu="select":He?iu="lasso":iu="pan")),Kh(Sf=>Sf.layout.clickmode===Jo&&Sf.layout.hovermode===Ni&&Sf.layout.dragmode===iu?Sf:{...Sf,layout:{...Sf.layout,clickmode:Jo,hovermode:Ni,dragmode:iu}})},[en.id,Fs,Hv,uv,He,Ms]);let Os=js===-1?Wc.layout?.width:Math.max(js,R7),ac=Af>0?Af:Wc.layout?.height??tA;Xu&&(Os=js,ac=wf??tA),(Wc.layout.height!==ac||Wc.layout.width!==Os)&&Kh(Jo=>({...Jo,layout:{...Jo.layout,height:ac,width:Os}}));const Sc=Gv.useCallback(Jo=>{P7(Jo,qi,en,Fo)},[en.id,qi,Fo]),_i=Gv.useCallback((Jo=!0)=>{I7(qi,en,Fo),Jo&&setTimeout(()=>{Kh(Ni=>({...Ni,data:Ni.data.map(iu=>({...iu,selectedpoints:null})),layout:{...Ni.layout,selections:[]}}))},D7)},[en.id,qi,Fo]);return Gv.useEffect(()=>{if(!en.formId||!Fs)return;const Jo=new h7;return Jo.manageFormClearListener(qi,en.formId,_i),()=>{Jo.disconnect()}},[en.formId,qi,Fs,_i]),Gv.useEffect(()=>{if(!Fs)return;let Jo;Wc.layout?.dragmode==="select"||Wc.layout?.dragmode==="lasso"?Jo="event":Jo=Hv?"event+select":"none",Wc.layout?.clickmode!==Jo&&Kh(Ni=>({...Ni,layout:{...Ni.layout,clickmode:Jo}}))},[Wc.layout?.dragmode]),cb(_7,{ref:ah,className:"stPlotlyChart","data-testid":"stPlotlyChart",children:cb(y7,{data:Wc.data,layout:Wc.layout,config:ws,frames:Wc.frames??void 0,style:{visibility:Wc.layout?.width===void 0?"hidden":void 0,overflow:"hidden"},onSelected:Fs?Sc:()=>{},onDoubleClick:Fs?()=>_i():void 0,onDeselect:Fs?()=>{_i(!1)}:void 0,onInitialized:Jo=>{qi.setElementState(en.id,"figure",Jo)},onUpdate:Jo=>{qi.setElementState(en.id,"figure",Jo),Kh(Jo)}})})}const B7=en=>{const{width:qi}=nA(iA);return qi?cb(O7,{width:qi,...en}):null},N7=f7(B7),G7=Gv.memo(N7);export{G7 as default};
|