From 5be45549ca383a08b2b6d1721cde0b58862cffe7 Mon Sep 17 00:00:00 2001 From: petrikoro Date: Sun, 30 Nov 2025 15:47:37 +0300 Subject: [PATCH 1/3] feat(fork): add add swap support for postgres * chore: add swap support for postgres engine * chore: add web dist to git * fix: fix sql commands * fix: fix misquote of current_user * chore: make logging * chore: add more logging * fix: fix index duplicates * chore: add clean up for temp table * chore: add tests * feat: add support for timescaledb hypertables * chore: add dependent views logger * fix: add rolback for timescaledb * fix: make analyze work on single table * fix: fix timescaledb query * fix: do not recreate default index on timescaledb tables --- .gitignore | 3 +- sqlmesh/core/engine_adapter/postgres.py | 493 ++- tests/core/engine_adapter/test_postgres.py | 932 ++++++ web/client/.gitignore | 1 - web/client/dist/assets/Audits-CBiYyyx-.js | 1 + web/client/dist/assets/Banner-DSRbUlO5.js | 1 + .../dist/assets/ChevronDownIcon-MK_nrjD_.js | 1 + .../dist/assets/ChevronRightIcon-CLWtT22Q.js | 1 + web/client/dist/assets/Content-BNuGZN5l.js | 1 + web/client/dist/assets/Content-CSHJyW0n.js | 10 + web/client/dist/assets/Data-C1oRDbLx.js | 1 + .../dist/assets/DataCatalog-HXyX2-_j.js | 14 + web/client/dist/assets/Editor-BDyfpUuw.js | 1 + web/client/dist/assets/Editor-D0jNItwC.js | 1 + web/client/dist/assets/Errors-BfuFLcPi.js | 1 + .../dist/assets/FileExplorer-BR9IE3he.js | 2 + web/client/dist/assets/Footer-CgBEtiAh.js | 1 + web/client/dist/assets/Header-DSqR6nSO.js | 1 + web/client/dist/assets/Input-B-oZ6fGO.js | 41 + web/client/dist/assets/Lineage-DYQVwDbD.js | 1 + .../dist/assets/ListboxShow-BE5-xevs.js | 1 + .../dist/assets/ModelLineage-DkIFAYo4.js | 1 + web/client/dist/assets/Models-D5dWr8RB.js | 1 + web/client/dist/assets/Page-C-XfU5BR.js | 1 + web/client/dist/assets/Plan-ZEuTINBq.js | 1 + .../dist/assets/PlusCircleIcon-DVXAHG8_.js | 1 + .../dist/assets/ReportErrors-B7FEPzMB.js | 1 + web/client/dist/assets/Root-8aZyhPxF.js | 1 + web/client/dist/assets/SearchList-W_iT2G82.js | 2663 +++++++++++++++++ .../dist/assets/SelectEnvironment-C65jALmO.js | 2 + web/client/dist/assets/SourceList-DSLO6nVJ.js | 1 + .../dist/assets/SourceListItem-BHt8d9-I.js | 1 + web/client/dist/assets/SplitPane-CViaZmw6.js | 1 + web/client/dist/assets/Tests-DhaVt5t1.js | 1 + web/client/dist/assets/Welcome-DvpjH-_4.js | 1 + .../_commonjs-dynamic-modules-TDtrdbi3.js | 1 + web/client/dist/assets/context-BctCsyGb.js | 71 + web/client/dist/assets/context-DFNeGsFF.js | 1 + web/client/dist/assets/editor-CcO28cqd.js | 6 + web/client/dist/assets/file-CvJN3aZO.js | 1 + .../assets/floating-ui.react-dom-CjE-JNW1.js | 1 + web/client/dist/assets/help-B59vE3aE.js | 1 + web/client/dist/assets/help-DuPhjipa.js | 22 + web/client/dist/assets/index-C-dJH7yZ.js | 4 + web/client/dist/assets/index-Dj0i1-CA.js | 58 + web/client/dist/assets/plan-BTRSbjKn.js | 1 + web/client/dist/assets/popover-_Sf0yvOI.js | 13 + web/client/dist/assets/project-BvSOI8MY.js | 1 + web/client/dist/css/base.css | 241 ++ web/client/dist/css/design.css | 456 +++ web/client/dist/favicons/favicon.svg | 10 + .../Inter/Inter-VariableFont_slnt,wght.ttf | Bin 0 -> 803384 bytes web/client/dist/fonts/Inter/OFL.txt | 93 + web/client/dist/fonts/Inter/README.txt | 72 + .../dist/fonts/Inter/static/Inter-Black.ttf | Bin 0 -> 316372 bytes .../dist/fonts/Inter/static/Inter-Bold.ttf | Bin 0 -> 316100 bytes .../fonts/Inter/static/Inter-ExtraBold.ttf | Bin 0 -> 316716 bytes .../fonts/Inter/static/Inter-ExtraLight.ttf | Bin 0 -> 310808 bytes .../dist/fonts/Inter/static/Inter-Light.ttf | Bin 0 -> 310420 bytes .../dist/fonts/Inter/static/Inter-Medium.ttf | Bin 0 -> 314712 bytes .../dist/fonts/Inter/static/Inter-Regular.ttf | Bin 0 -> 309828 bytes .../fonts/Inter/static/Inter-SemiBold.ttf | Bin 0 -> 315756 bytes .../dist/fonts/Inter/static/Inter-Thin.ttf | Bin 0 -> 310516 bytes ...JetBrainsMono-Italic-VariableFont_wght.ttf | Bin 0 -> 191988 bytes .../JetBrainsMono-VariableFont_wght.ttf | Bin 0 -> 187860 bytes web/client/dist/fonts/JetBrains_Mono/OFL.txt | 93 + .../dist/fonts/JetBrains_Mono/README.txt | 79 + .../static/JetBrainsMono-Bold.ttf | Bin 0 -> 114832 bytes .../static/JetBrainsMono-BoldItalic.ttf | Bin 0 -> 117928 bytes .../static/JetBrainsMono-ExtraBold.ttf | Bin 0 -> 114804 bytes .../static/JetBrainsMono-ExtraBoldItalic.ttf | Bin 0 -> 117960 bytes .../static/JetBrainsMono-ExtraLight.ttf | Bin 0 -> 115076 bytes .../static/JetBrainsMono-ExtraLightItalic.ttf | Bin 0 -> 118236 bytes .../static/JetBrainsMono-Italic.ttf | Bin 0 -> 117948 bytes .../static/JetBrainsMono-Light.ttf | Bin 0 -> 115024 bytes .../static/JetBrainsMono-LightItalic.ttf | Bin 0 -> 118132 bytes .../static/JetBrainsMono-Medium.ttf | Bin 0 -> 114924 bytes .../static/JetBrainsMono-MediumItalic.ttf | Bin 0 -> 118052 bytes .../static/JetBrainsMono-Regular.ttf | Bin 0 -> 114908 bytes .../static/JetBrainsMono-SemiBold.ttf | Bin 0 -> 114904 bytes .../static/JetBrainsMono-SemiBoldItalic.ttf | Bin 0 -> 118040 bytes .../static/JetBrainsMono-Thin.ttf | Bin 0 -> 115000 bytes .../static/JetBrainsMono-ThinItalic.ttf | Bin 0 -> 118164 bytes .../martina-plantijn-regular.otf | Bin 0 -> 380996 bytes .../martina-plantijn-regular.woff2 | Bin 0 -> 44660 bytes .../dist/fonts/Sohne/sohne-buch-kursiv.otf | Bin 0 -> 207016 bytes .../dist/fonts/Sohne/sohne-buch-kursiv.woff2 | Bin 0 -> 34273 bytes web/client/dist/fonts/Sohne/sohne-buch.otf | Bin 0 -> 191552 bytes web/client/dist/fonts/Sohne/sohne-buch.woff2 | Bin 0 -> 33115 bytes web/client/dist/fonts/Sohne/sohne-kraftig.otf | Bin 0 -> 186004 bytes .../dist/fonts/Sohne/sohne-kraftig.woff2 | Bin 0 -> 31911 bytes .../dist/fonts/Sohne/sohne-mono-buch.otf | Bin 0 -> 73232 bytes .../dist/fonts/Sohne/sohne-mono-buch.woff2 | Bin 0 -> 25795 bytes .../dist/fonts/Sohne/sohne-mono-kraftig.otf | Bin 0 -> 75272 bytes .../dist/fonts/Sohne/sohne-mono-kraftig.woff2 | Bin 0 -> 25703 bytes web/client/dist/index.html | 244 ++ web/server/main.py | 5 + 97 files changed, 5656 insertions(+), 4 deletions(-) create mode 100644 web/client/dist/assets/Audits-CBiYyyx-.js create mode 100644 web/client/dist/assets/Banner-DSRbUlO5.js create mode 100644 web/client/dist/assets/ChevronDownIcon-MK_nrjD_.js create mode 100644 web/client/dist/assets/ChevronRightIcon-CLWtT22Q.js create mode 100644 web/client/dist/assets/Content-BNuGZN5l.js create mode 100644 web/client/dist/assets/Content-CSHJyW0n.js create mode 100644 web/client/dist/assets/Data-C1oRDbLx.js create mode 100644 web/client/dist/assets/DataCatalog-HXyX2-_j.js create mode 100644 web/client/dist/assets/Editor-BDyfpUuw.js create mode 100644 web/client/dist/assets/Editor-D0jNItwC.js create mode 100644 web/client/dist/assets/Errors-BfuFLcPi.js create mode 100644 web/client/dist/assets/FileExplorer-BR9IE3he.js create mode 100644 web/client/dist/assets/Footer-CgBEtiAh.js create mode 100644 web/client/dist/assets/Header-DSqR6nSO.js create mode 100644 web/client/dist/assets/Input-B-oZ6fGO.js create mode 100644 web/client/dist/assets/Lineage-DYQVwDbD.js create mode 100644 web/client/dist/assets/ListboxShow-BE5-xevs.js create mode 100644 web/client/dist/assets/ModelLineage-DkIFAYo4.js create mode 100644 web/client/dist/assets/Models-D5dWr8RB.js create mode 100644 web/client/dist/assets/Page-C-XfU5BR.js create mode 100644 web/client/dist/assets/Plan-ZEuTINBq.js create mode 100644 web/client/dist/assets/PlusCircleIcon-DVXAHG8_.js create mode 100644 web/client/dist/assets/ReportErrors-B7FEPzMB.js create mode 100644 web/client/dist/assets/Root-8aZyhPxF.js create mode 100644 web/client/dist/assets/SearchList-W_iT2G82.js create mode 100644 web/client/dist/assets/SelectEnvironment-C65jALmO.js create mode 100644 web/client/dist/assets/SourceList-DSLO6nVJ.js create mode 100644 web/client/dist/assets/SourceListItem-BHt8d9-I.js create mode 100644 web/client/dist/assets/SplitPane-CViaZmw6.js create mode 100644 web/client/dist/assets/Tests-DhaVt5t1.js create mode 100644 web/client/dist/assets/Welcome-DvpjH-_4.js create mode 100644 web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js create mode 100644 web/client/dist/assets/context-BctCsyGb.js create mode 100644 web/client/dist/assets/context-DFNeGsFF.js create mode 100644 web/client/dist/assets/editor-CcO28cqd.js create mode 100644 web/client/dist/assets/file-CvJN3aZO.js create mode 100644 web/client/dist/assets/floating-ui.react-dom-CjE-JNW1.js create mode 100644 web/client/dist/assets/help-B59vE3aE.js create mode 100644 web/client/dist/assets/help-DuPhjipa.js create mode 100644 web/client/dist/assets/index-C-dJH7yZ.js create mode 100644 web/client/dist/assets/index-Dj0i1-CA.js create mode 100644 web/client/dist/assets/plan-BTRSbjKn.js create mode 100644 web/client/dist/assets/popover-_Sf0yvOI.js create mode 100644 web/client/dist/assets/project-BvSOI8MY.js create mode 100644 web/client/dist/css/base.css create mode 100644 web/client/dist/css/design.css create mode 100644 web/client/dist/favicons/favicon.svg create mode 100644 web/client/dist/fonts/Inter/Inter-VariableFont_slnt,wght.ttf create mode 100644 web/client/dist/fonts/Inter/OFL.txt create mode 100644 web/client/dist/fonts/Inter/README.txt create mode 100644 web/client/dist/fonts/Inter/static/Inter-Black.ttf create mode 100644 web/client/dist/fonts/Inter/static/Inter-Bold.ttf create mode 100644 web/client/dist/fonts/Inter/static/Inter-ExtraBold.ttf create mode 100644 web/client/dist/fonts/Inter/static/Inter-ExtraLight.ttf create mode 100644 web/client/dist/fonts/Inter/static/Inter-Light.ttf create mode 100644 web/client/dist/fonts/Inter/static/Inter-Medium.ttf create mode 100644 web/client/dist/fonts/Inter/static/Inter-Regular.ttf create mode 100644 web/client/dist/fonts/Inter/static/Inter-SemiBold.ttf create mode 100644 web/client/dist/fonts/Inter/static/Inter-Thin.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/JetBrainsMono-Italic-VariableFont_wght.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/JetBrainsMono-VariableFont_wght.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/OFL.txt create mode 100644 web/client/dist/fonts/JetBrains_Mono/README.txt create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-Bold.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-BoldItalic.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-ExtraBold.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-ExtraBoldItalic.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-ExtraLight.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-ExtraLightItalic.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-Italic.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-Light.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-LightItalic.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-Medium.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-MediumItalic.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-Regular.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-SemiBold.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-SemiBoldItalic.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-Thin.ttf create mode 100644 web/client/dist/fonts/JetBrains_Mono/static/JetBrainsMono-ThinItalic.ttf create mode 100644 web/client/dist/fonts/Martina_Plantijn/martina-plantijn-regular.otf create mode 100644 web/client/dist/fonts/Martina_Plantijn/martina-plantijn-regular.woff2 create mode 100644 web/client/dist/fonts/Sohne/sohne-buch-kursiv.otf create mode 100644 web/client/dist/fonts/Sohne/sohne-buch-kursiv.woff2 create mode 100644 web/client/dist/fonts/Sohne/sohne-buch.otf create mode 100644 web/client/dist/fonts/Sohne/sohne-buch.woff2 create mode 100644 web/client/dist/fonts/Sohne/sohne-kraftig.otf create mode 100644 web/client/dist/fonts/Sohne/sohne-kraftig.woff2 create mode 100644 web/client/dist/fonts/Sohne/sohne-mono-buch.otf create mode 100644 web/client/dist/fonts/Sohne/sohne-mono-buch.woff2 create mode 100644 web/client/dist/fonts/Sohne/sohne-mono-kraftig.otf create mode 100644 web/client/dist/fonts/Sohne/sohne-mono-kraftig.woff2 create mode 100644 web/client/dist/index.html diff --git a/.gitignore b/.gitignore index 16593984dd..ccf400439d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ __pycache__/ .Python build/ develop-eggs/ -dist/ +/dist/ downloads/ eggs/ .eggs/ @@ -151,7 +151,6 @@ dmypy.json **/.DS_Store **/node_modules /web/client/src/api/client.ts -web/client/dist .local/ # Version file diff --git a/sqlmesh/core/engine_adapter/postgres.py b/sqlmesh/core/engine_adapter/postgres.py index 3dd108cf91..94cfa511ba 100644 --- a/sqlmesh/core/engine_adapter/postgres.py +++ b/sqlmesh/core/engine_adapter/postgres.py @@ -14,12 +14,23 @@ logical_merge, GrantsFromInfoSchemaMixin, ) -from sqlmesh.core.engine_adapter.shared import set_catalog +from sqlmesh.core.engine_adapter.shared import set_catalog, DataObjectType +from sqlmesh.utils import random_id if t.TYPE_CHECKING: from sqlmesh.core._typing import TableName from sqlmesh.core.engine_adapter._typing import DF, QueryOrDF + +class HypertableConfig(t.NamedTuple): + """Configuration for a TimescaleDB hypertable.""" + + time_column: str + chunk_time_interval: t.Optional[str] = None + partitioning_column: t.Optional[str] = None + number_partitions: t.Optional[int] = None + + logger = logging.getLogger(__name__) @@ -141,3 +152,483 @@ def server_version(self) -> t.Tuple[int, int]: if match: return int(match.group(1)), int(match.group(2)) return 0, 0 + + def _get_dependent_views(self, table_name: TableName) -> t.List[t.Tuple[str, str, str, bool]]: + """Fetches all views that depend on the given table. + + Uses PostgreSQL system catalogs (pg_depend, pg_rewrite, pg_class) to find + views that reference the table. This is needed because PostgreSQL views + store the OID of tables they reference, requiring recreation after table swap. + + Args: + table_name: The name of the table to find dependents for. + + Returns: + List of tuples containing (schema_name, view_name, definition, is_materialized). + """ + table = exp.to_table(table_name) + schema_name = table.db or self._get_current_schema() + full_table_name = f"{schema_name}.{table.name}" + regclass_cast = exp.Cast(this=exp.Literal.string(full_table_name), to="regclass") + + query = ( + exp.select( + exp.column("nspname", "n"), + exp.column("relname", "c"), + exp.func("pg_get_viewdef", exp.column("oid", "c"), exp.true()), + exp.column("relkind", "c").eq(exp.Literal.string("m")), + ) + .distinct() + .from_(exp.table_("pg_depend", "pg_catalog").as_("d")) + .join(exp.table_("pg_rewrite", "pg_catalog").as_("r"), on="r.oid = d.objid") + .join(exp.table_("pg_class", "pg_catalog").as_("c"), on="c.oid = r.ev_class") + .join(exp.table_("pg_namespace", "pg_catalog").as_("n"), on="n.oid = c.relnamespace") + .where( + exp.column("refobjid", "d").eq(regclass_cast), + exp.column("classid", "d").eq( + exp.Cast(this=exp.Literal.string("pg_rewrite"), to="regclass") + ), + exp.column("deptype", "d").eq(exp.Literal.string("n")), + exp.column("relkind", "c").isin(exp.Literal.string("v"), exp.Literal.string("m")), + ) + .order_by("n.nspname", "c.relname") + ) + + logger.info("Fetching dependent views for %s", table_name) + self.execute(query) + return self.cursor.fetchall() + + def _recreate_dependent_views( + self, dependent_views: t.List[t.Tuple[str, str, str, bool]] + ) -> None: + """Recreates dependent views after a table swap. + + For regular views, uses CREATE OR REPLACE which preserves grants. + For materialized views, saves grants before DROP and restores after CREATE. + + Args: + dependent_views: List of tuples (schema_name, view_name, definition, is_materialized). + """ + for schema_name, view_name, definition, is_materialized in dependent_views: + view_table = exp.table_(view_name, db=schema_name) + full_view_name = f"{schema_name}.{view_name}" + view_query: exp.Expression = exp.maybe_parse(definition, dialect=self.dialect) + + logger.info("Recreating dependent view '%s'", view_table.sql(dialect=self.dialect)) + + if is_materialized: + view_grants = self._get_table_grants(full_view_name) + + self.execute( + exp.Drop(this=view_table, exists=True, kind="MATERIALIZED VIEW", cascade=True) + ) + self.execute( + exp.Create(this=view_table, kind="MATERIALIZED VIEW", expression=view_query) + ) + + if view_grants: + logger.info("Restoring grants for materialized view '%s'", full_view_name) + self._apply_table_grants(view_table, view_grants) + else: + self.execute( + exp.Create(this=view_table, kind="VIEW", replace=True, expression=view_query) + ) + + def _get_table_indexes(self, table_name: TableName) -> t.List[str]: + """Fetches CREATE INDEX statements for all user-defined indexes on a table. + + Excludes indexes that back primary key or unique constraints, as these are + automatically created with table constraints. + + Args: + table_name: The name of the table to get indexes for. + + Returns: + List of CREATE INDEX SQL statements. + """ + table = exp.to_table(table_name) + schema_name = table.db or self._get_current_schema() + + # CTE to find indexes backing primary key or unique constraints + excluded_indexes_cte = ( + exp.select(exp.column("relname", "idx").as_("indexname")) + .from_(exp.table_("pg_constraint", "pg_catalog").as_("c")) + .join( + exp.table_("pg_class", "pg_catalog").as_("idx"), + on=exp.column("oid", "idx").eq(exp.column("conindid", "c")), + ) + .join( + exp.table_("pg_namespace", "pg_catalog").as_("n"), + on=exp.column("oid", "n").eq(exp.column("connamespace", "c")), + ) + .where( + exp.column("nspname", "n").eq(exp.Literal.string(schema_name)), + exp.column("contype", "c").isin(exp.Literal.string("p"), exp.Literal.string("u")), + ) + ) + + query = ( + exp.select(exp.column("indexdef", "i")) + .from_(exp.table_("pg_indexes").as_("i")) + .join( + excluded_indexes_cte.subquery("ei"), + on=exp.column("indexname", "ei").eq(exp.column("indexname", "i")), + join_type="LEFT", + ) + .where( + exp.column("schemaname", "i").eq(exp.Literal.string(schema_name)), + exp.column("tablename", "i").eq(exp.Literal.string(table.name)), + exp.column("indexname", "ei").is_(exp.null()), + ) + ) + + logger.info("Fetching table indexes for %s", table_name) + self.execute(query) + return [row[0] for row in self.cursor.fetchall() if row[0]] + + def _recreate_indexes( + self, + index_definitions: t.List[str], + target_table: exp.Table, + ) -> None: + """Recreates indexes on target table from stored definitions. + + Args: + index_definitions: List of CREATE INDEX SQL statements. + target_table: The table to create indexes on. + """ + logger.info("Recreating indexes on %s", target_table.sql(dialect=self.dialect)) + + for index_def in index_definitions: + index_expr: exp.Expression = exp.maybe_parse(index_def, dialect=self.dialect) + if index := index_expr.find(exp.Index): + index.set("table", target_table.copy()) + index.this.set("this", random_id()) + try: + self.execute(index_expr) + except Exception as e: + logger.error("Failed to recreate index: %s", e) + + def _get_table_grants( + self, table_name: TableName + ) -> t.List[t.Tuple[str, str, t.Optional[str]]]: + """Fetches all grants on a table/view from information_schema. + + Retrieves both table-level grants (aggregated by grantee) and column-level + grants (aggregated by grantee and privilege_type). + + Args: + table_name: The name of the table/view to get grants for. + + Returns: + List of tuples (grantee, privileges, columns). + - For table-level: (grantee, "SELECT, INSERT, ...", None) + - For column-level: (grantee, "SELECT", "col1, col2, ...") + """ + table = exp.to_table(table_name) + schema_name = table.db or self._get_current_schema() + + # Table-level grants: aggregate privileges per grantee + table_grants_query = ( + exp.select( + exp.column("grantee"), + exp.func("string_agg", exp.column("privilege_type"), exp.Literal.string(", ")).as_( + "privileges" + ), + exp.cast(exp.null(), "text").as_("columns"), + ) + .from_(exp.table_("role_table_grants", "information_schema")) + .where( + exp.column("table_schema").eq(exp.Literal.string(schema_name)), + exp.column("table_name").eq(exp.Literal.string(table.name)), + exp.column("grantee").neq(exp.var("current_user")), + ) + .group_by(exp.column("grantee")) + ) + + # Column-level grants: aggregate columns per (grantee, privilege_type) + column_grants_query = ( + exp.select( + exp.column("grantee"), + exp.column("privilege_type").as_("privileges"), + exp.func("string_agg", exp.column("column_name"), exp.Literal.string(", ")).as_( + "columns" + ), + ) + .from_(exp.table_("column_privileges", "information_schema")) + .where( + exp.column("table_schema").eq(exp.Literal.string(schema_name)), + exp.column("table_name").eq(exp.Literal.string(table.name)), + exp.column("grantee").neq(exp.var("current_user")), + ) + .group_by(exp.column("grantee"), exp.column("privilege_type")) + ) + + logger.info("Fetching table grants for %s", table_name) + self.execute(exp.union(table_grants_query, column_grants_query, distinct=False)) + return self.cursor.fetchall() + + def _apply_table_grants( + self, table: exp.Table, grants: t.List[t.Tuple[str, str, t.Optional[str]]] + ) -> None: + """Applies grants to a table including column-level grants. + + Args: + table: The table expression to apply grants to. + grants: List of tuples (grantee, privileges, columns). + - For table-level: (grantee, "SELECT, INSERT, ...", None) + - For column-level: (grantee, "SELECT", "col1, col2, ...") + """ + for grantee, privileges, columns in grants: + if columns: + # Column-level grant: GRANT privilege (col1, col2) ON TABLE table TO grantee + privilege_str = f"{privileges} ({columns})" + else: + # Table-level grant: GRANT priv1, priv2 ON TABLE table TO grantee + privilege_str = privileges + + grant_expr = exp.Grant( + privileges=[exp.Var(this=privilege_str)], + kind="TABLE", + securable=table.copy(), + principals=[exp.Var(this=grantee)], + ) + + logger.info("Recreating grants on %s", table.sql(dialect=self.dialect)) + + try: + self.execute(grant_expr) + except Exception as e: + logger.warning("Failed to apply grant: %s", e) + + def _get_hypertable_config(self, table_name: TableName) -> t.Optional[HypertableConfig]: + """Gets TimescaleDB hypertable configuration if the table is a hypertable. + + Queries TimescaleDB information schema to retrieve hypertable dimensions. + Returns None if the table is not a hypertable or TimescaleDB is not installed. + + Args: + table_name: The name of the table to check. + + Returns: + HypertableConfig with time column and optional space partitioning info, + or None if not a hypertable. + """ + table = exp.to_table(table_name) + schema_name = table.db or self._get_current_schema() + + # Query TimescaleDB dimensions view for hypertable info + # This view contains both time and space dimensions + query = ( + exp.select( + exp.column("column_name", "d"), + exp.column("dimension_type", "d"), + exp.column("time_interval", "d"), + exp.column("num_partitions", "d"), + ) + .from_(exp.table_("dimensions", "timescaledb_information").as_("d")) + .join( + exp.table_("hypertables", "timescaledb_information").as_("h"), + on=exp.and_( + exp.column("hypertable_schema", "d").eq(exp.column("hypertable_schema", "h")), + exp.column("hypertable_name", "d").eq(exp.column("hypertable_name", "h")), + ), + ) + .where( + exp.column("hypertable_schema", "h").eq(exp.Literal.string(schema_name)), + exp.column("hypertable_name", "h").eq(exp.Literal.string(table.name)), + ) + .order_by(exp.column("dimension_number", "d")) + ) + + try: + logger.info("Fetching TimescaleDB info for %s", table_name) + self.execute(query) + rows = self.cursor.fetchall() + except Exception as e: + # TimescaleDB not installed or other error + logger.warning("Could not query TimescaleDB info: %s", e) + # Rollback to recover from the failed transaction state in PostgreSQL + # Without this, all subsequent queries would fail + self._connection_pool.rollback() + return None + + if not rows: + return None + + time_column = None + chunk_time_interval = None + partitioning_column = None + number_partitions = None + + for column_name, dimension_type, time_interval, num_partitions in rows: + if dimension_type == "Time": + time_column = column_name + if time_interval: + chunk_time_interval = str(time_interval) + elif dimension_type == "Space": + partitioning_column = column_name + number_partitions = num_partitions + + if not time_column: + return None + + return HypertableConfig( + time_column=time_column, + chunk_time_interval=chunk_time_interval, + partitioning_column=partitioning_column, + number_partitions=number_partitions, + ) + + def _create_hypertable( + self, table: exp.Table, config: HypertableConfig, create_default_indexes: bool = True + ) -> None: + """Converts a regular table to a TimescaleDB hypertable. + + Args: + table: The table to convert. + config: HypertableConfig with the hypertable configuration. + create_default_indexes: Whether to create default indexes on the time column. + Set to False when recreating indexes manually to avoid conflicts. + """ + table_sql = table.sql(dialect=self.dialect) + + # Build create_hypertable call - arguments must be string literals (single quotes) + # The table reference is passed as a string that PostgreSQL casts to regclass + # Column names are passed as NAME type strings + def escape_literal(s: str) -> str: + return s.replace("'", "''") + + args = [f"'{table_sql}'", f"'{escape_literal(config.time_column)}'"] + + if config.chunk_time_interval: + args.append(f"chunk_time_interval => INTERVAL '{config.chunk_time_interval}'") + + if config.partitioning_column and config.number_partitions: + args.append(f"partitioning_column => '{escape_literal(config.partitioning_column)}'") + args.append(f"number_partitions => {config.number_partitions}") + + if not create_default_indexes: + args.append("create_default_indexes => FALSE") + + create_hypertable_sql = f"SELECT create_hypertable({', '.join(args)})" + logger.info("Converting table to hypertable: %s", table_sql) + self.execute(create_hypertable_sql) + + def replace_query( + self, + table_name: TableName, + query_or_df: QueryOrDF, + target_columns_to_types: t.Optional[t.Dict[str, exp.DataType]] = None, + table_description: t.Optional[str] = None, + column_descriptions: t.Optional[t.Dict[str, str]] = None, + source_columns: t.Optional[t.List[str]] = None, + supports_replace_table_override: t.Optional[bool] = None, + **kwargs: t.Any, + ) -> None: + """Replaces table contents using atomic swap. + + Uses RENAME to swap tables atomically, then recreates dependent views (bound by OID), + restores indexes and grants. Falls back to _insert_overwrite_by_condition for + self-referencing queries. + """ + target_data_object = self.get_data_object(table_name) + table_exists = target_data_object is not None + if self.drop_data_object_on_type_mismatch(target_data_object, DataObjectType.TABLE): + table_exists = False + + source_queries, target_columns_to_types = self._get_source_queries_and_columns_to_types( + query_or_df, + target_columns_to_types, + target_table=table_name, + source_columns=source_columns, + ) + + if not table_exists: + return self._create_table_from_source_queries( + table_name, + source_queries, + target_columns_to_types, + replace=False, + table_description=table_description, + column_descriptions=column_descriptions, + **kwargs, + ) + + target_table = exp.to_table(table_name) + query = source_queries[0].query_factory() + + from sqlmesh.core.engine_adapter.base import quote_identifiers + + self_referencing = any( + quote_identifiers(tbl) == quote_identifiers(target_table) + for tbl in query.find_all(exp.Table) + ) + + if self_referencing: + if not target_columns_to_types: + target_columns_to_types = self.columns(target_table) + return self._insert_overwrite_by_condition( + target_table, + source_queries, + target_columns_to_types, + **kwargs, + ) + + if not target_columns_to_types: + target_columns_to_types = self.columns(target_table) + + dependent_views = self._get_dependent_views(table_name) + indexes = self._get_table_indexes(table_name) + grants = self._get_table_grants(table_name) + hypertable_config = self._get_hypertable_config(table_name) + + temp_table = self._get_temp_table(target_table) + old_table = self._get_temp_table(target_table) + + try: + self.create_table( + temp_table, + target_columns_to_types, + exists=False, + table_description=table_description, + column_descriptions=column_descriptions, + **kwargs, + ) + + # Convert to hypertable before inserting data (required by TimescaleDB) + # When we have indexes to recreate, disable default index creation to avoid conflicts + # (TimescaleDB creates indexes on time column by default, which would conflict with + # the indexes we're about to recreate) + if hypertable_config: + self._create_hypertable( + temp_table, hypertable_config, create_default_indexes=not indexes + ) + + self._insert_append_source_queries(temp_table, source_queries, target_columns_to_types) + + if indexes: + self._recreate_indexes(indexes, temp_table) + if grants: + self._apply_table_grants(temp_table, grants) + + self.execute( + exp.Command(this="ANALYZE", expression=temp_table.sql(dialect=self.dialect)) + ) + except Exception: + self.drop_table(temp_table, exists=True) + raise + + try: + with self.transaction(): + self.rename_table(target_table, old_table) + self.rename_table(temp_table, target_table) + + if dependent_views: + self._recreate_dependent_views(dependent_views) + + self.drop_table(old_table) + except Exception: + # Transaction rolled back, temp_table still exists + self.drop_table(temp_table, exists=True) + raise diff --git a/tests/core/engine_adapter/test_postgres.py b/tests/core/engine_adapter/test_postgres.py index ebcdd03f55..1b2d1255e6 100644 --- a/tests/core/engine_adapter/test_postgres.py +++ b/tests/core/engine_adapter/test_postgres.py @@ -282,3 +282,935 @@ def test_sync_grants_config_with_default_schema( "WHERE table_schema = 'public' AND table_name = 'test_table' " "AND grantor = current_role AND grantee <> current_role" ) + + +def test_get_dependent_views(make_mocked_engine_adapter: t.Callable, mocker: MockerFixture): + """Test that _get_dependent_views generates correct SQL query.""" + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + mocker.patch.object(adapter, "_get_current_schema", return_value="public") + adapter.cursor.fetchall.return_value = [ + ("public", "view1", "SELECT * FROM test_table", False), + ("public", "mat_view1", "SELECT * FROM test_table", True), + ] + + result = adapter._get_dependent_views("public.test_table") + + assert len(result) == 2 + assert result[0] == ("public", "view1", "SELECT * FROM test_table", False) + assert result[1] == ("public", "mat_view1", "SELECT * FROM test_table", True) + + # Verify the SQL query structure + sql_calls = to_sql_calls(adapter) + assert len(sql_calls) == 1 + assert "pg_depend" in sql_calls[0].lower() + assert "pg_rewrite" in sql_calls[0].lower() + assert "pg_class" in sql_calls[0].lower() + assert "pg_get_viewdef" in sql_calls[0].lower() + + +def test_recreate_dependent_views_regular( + make_mocked_engine_adapter: t.Callable, mocker: MockerFixture +): + """Test that regular views are recreated with CREATE OR REPLACE (preserves grants).""" + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + dependent_views = [ + ("public", "view1", "SELECT * FROM test_table", False), + ] + + adapter._recreate_dependent_views(dependent_views) + + sql_calls = to_sql_calls(adapter) + assert len(sql_calls) == 1 + assert "CREATE OR REPLACE VIEW" in sql_calls[0] + assert '"public"."view1"' in sql_calls[0] + + +def test_recreate_dependent_views_materialized( + make_mocked_engine_adapter: t.Callable, mocker: MockerFixture +): + """Test that materialized views are recreated with DROP + CREATE and grants are restored.""" + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + # Mock _get_table_grants to return aggregated grants + adapter.cursor.fetchall.return_value = [("analyst", "SELECT, UPDATE", None)] + + dependent_views = [ + ("public", "mat_view1", "SELECT * FROM test_table", True), + ] + + adapter._recreate_dependent_views(dependent_views) + + sql_calls = to_sql_calls(adapter) + # Should have: fetchall (grants query), DROP, CREATE, GRANT + assert any("DROP MATERIALIZED VIEW" in sql for sql in sql_calls) + assert any("CREATE MATERIALIZED VIEW" in sql for sql in sql_calls) + assert any("GRANT SELECT, UPDATE ON" in sql for sql in sql_calls) + + +def test_get_table_indexes(make_mocked_engine_adapter: t.Callable, mocker: MockerFixture): + """Test that _get_table_indexes retrieves index definitions excluding constraint-backed indexes.""" + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + mocker.patch.object(adapter, "_get_current_schema", return_value="public") + adapter.cursor.fetchall.return_value = [ + ("CREATE INDEX idx_col1 ON public.test_table (col1)",), + ("CREATE INDEX idx_col2 ON public.test_table (col2)",), + ] + + result = adapter._get_table_indexes("public.test_table") + + assert len(result) == 2 + assert "CREATE INDEX idx_col1" in result[0] + assert "CREATE INDEX idx_col2" in result[1] + + sql_calls = to_sql_calls(adapter) + assert len(sql_calls) == 1 + assert "pg_indexes" in sql_calls[0].lower() + # Excludes primary key ('p') and unique ('u') constraint-backed indexes via pg_constraint + assert "pg_constraint" in sql_calls[0].lower() + assert "'p'" in sql_calls[0] # Primary key constraint type + assert "'u'" in sql_calls[0] # Unique constraint type + + +def test_recreate_indexes(make_mocked_engine_adapter: t.Callable): + """Test that _recreate_indexes executes index definitions with new random names.""" + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + index_definitions = [ + "CREATE INDEX idx_col1 ON public.test_table (col1)", + "CREATE INDEX idx_col2 ON public.test_table (col2)", + ] + table = exp.to_table("public.new_table") + + adapter._recreate_indexes(index_definitions, table) + + sql_calls = to_sql_calls(adapter) + assert len(sql_calls) == 2 + # Index name is randomized to avoid conflicts, table is replaced with target + assert "CREATE INDEX" in sql_calls[0] + assert '"public"."new_table"' in sql_calls[0] + assert '"col1"' in sql_calls[0] + assert "CREATE INDEX" in sql_calls[1] + assert '"public"."new_table"' in sql_calls[1] + assert '"col2"' in sql_calls[1] + + +def test_get_table_grants(make_mocked_engine_adapter: t.Callable, mocker: MockerFixture): + """Test that _get_table_grants retrieves aggregated grants from information_schema.""" + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + mocker.patch.object(adapter, "_get_current_schema", return_value="public") + # Aggregated format: (grantee, privileges, columns) + adapter.cursor.fetchall.return_value = [ + ("analyst", "SELECT, UPDATE", None), # Table-level grants aggregated + ("writer", "INSERT", None), # Table-level grant + ("analyst", "SELECT", "email, name"), # Column-level grant with aggregated columns + ] + + result = adapter._get_table_grants("public.test_table") + + assert len(result) == 3 + assert ("analyst", "SELECT, UPDATE", None) in result + assert ("writer", "INSERT", None) in result + assert ("analyst", "SELECT", "email, name") in result + + # Verify SQL uses information_schema with aggregation + sql_calls = to_sql_calls(adapter) + assert len(sql_calls) == 1 + sql = sql_calls[0].lower() + assert "information_schema" in sql + assert "role_table_grants" in sql # Table-level grants + assert "column_privileges" in sql # Column-level grants + assert "string_agg" in sql # Aggregation function + assert "group by" in sql # Grouping + assert "union" in sql # Combined query + + +def test_get_table_grants_current_user_not_quoted( + make_mocked_engine_adapter: t.Callable, mocker: MockerFixture +): + """Test that current_user is not quoted in _get_table_grants SQL query. + + current_user is a SQL keyword that returns the current user, not a column name. + If quoted as "current_user", PostgreSQL interprets it as a column reference + and raises: psycopg2.errors.UndefinedColumn: column "current_user" does not exist + """ + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + mocker.patch.object(adapter, "_get_current_schema", return_value="public") + adapter.cursor.fetchall.return_value = [] + + adapter._get_table_grants("public.test_table") + + sql_calls = to_sql_calls(adapter) + assert len(sql_calls) == 1 + sql = sql_calls[0] + + # current_user should appear unquoted (as SQL keyword), not as "current_user" (column ref) + assert "current_user" in sql.lower() + # Should NOT have quoted "current_user" which would be interpreted as a column + assert '"current_user"' not in sql + + +def test_apply_table_grants(make_mocked_engine_adapter: t.Callable): + """Test that _apply_table_grants applies aggregated grants correctly.""" + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + # Aggregated format: (grantee, privileges, columns) + grants = [ + ("analyst", "SELECT, UPDATE", None), # Table-level with multiple privileges + ("writer", "INSERT", None), # Table-level single privilege + ("analyst", "SELECT", "email, name"), # Column-level with multiple columns + ] + table = exp.to_table("public.test_table") + + adapter._apply_table_grants(table, grants) + + sql_calls = to_sql_calls(adapter) + assert len(sql_calls) == 3 + # Table-level grant with multiple privileges + assert any( + "GRANT SELECT, UPDATE ON" in sql and "test_table" in sql and "analyst" in sql + for sql in sql_calls + ) + # Table-level grant with single privilege + assert any( + "GRANT INSERT ON" in sql and "test_table" in sql and "writer" in sql for sql in sql_calls + ) + # Column-level grant with multiple columns + assert any( + "GRANT SELECT (email, name) ON" in sql and "test_table" in sql and "analyst" in sql + for sql in sql_calls + ) + + +def test_replace_query_table_not_exists( + make_mocked_engine_adapter: t.Callable, mocker: MockerFixture +): + """Test replace_query when table doesn't exist - should just create it.""" + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + # Table doesn't exist + mocker.patch.object(adapter, "get_data_object", return_value=None) + + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT 1 as id, 'test' as name"), + {"id": exp.DataType.build("INT"), "name": exp.DataType.build("TEXT")}, + ) + + sql_calls = to_sql_calls(adapter) + # Should create table directly without swap logic + assert any("CREATE TABLE" in sql for sql in sql_calls) + # Should not have rename operations + assert not any("ALTER TABLE" in sql and "RENAME" in sql for sql in sql_calls) + + +def test_replace_query_with_swap( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test replace_query with atomic swap when table exists.""" + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + # Table exists + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="test_table", type=DataObjectType.TABLE + ), + ) + + # Mock temp table names + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + make_temp_table_name("test_table", "temp1"), + make_temp_table_name("test_table", "old1"), + ] + + # Mock methods that query the database + mocker.patch.object(adapter, "_get_dependent_views", return_value=[]) + mocker.patch.object(adapter, "_get_table_indexes", return_value=[]) + mocker.patch.object(adapter, "_get_table_grants", return_value=[]) + mocker.patch.object(adapter, "_get_hypertable_config", return_value=None) + mocker.patch.object( + adapter, + "columns", + return_value={"id": exp.DataType.build("INT"), "name": exp.DataType.build("TEXT")}, + ) + + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT 1 as id, 'test' as name"), + ) + + sql_calls = to_sql_calls(adapter) + + # Should have: BEGIN, CREATE temp table, INSERT, RENAME x2, DROP old, COMMIT + assert any("CREATE TABLE" in sql for sql in sql_calls) + assert any("INSERT INTO" in sql for sql in sql_calls) + # Two renames: target -> old, temp -> target + rename_calls = [sql for sql in sql_calls if "ALTER TABLE" in sql and "RENAME" in sql] + assert len(rename_calls) == 2 + assert any("DROP TABLE" in sql for sql in sql_calls) + + +def test_replace_query_self_referencing( + make_mocked_engine_adapter: t.Callable, mocker: MockerFixture +): + """Test replace_query falls back to base implementation for self-referencing queries.""" + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + # Table exists + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="test_table", type=DataObjectType.TABLE + ), + ) + + mocker.patch.object(adapter, "columns", return_value={"id": exp.DataType.build("INT")}) + + # Mock _insert_overwrite_by_condition to track if it's called + insert_overwrite_mock = mocker.patch.object(adapter, "_insert_overwrite_by_condition") + + # Self-referencing query + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT id + 1 as id FROM test_schema.test_table"), + ) + + # Should fall back to _insert_overwrite_by_condition + insert_overwrite_mock.assert_called_once() + + +def test_replace_query_with_dependent_views( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test replace_query recreates dependent views after swap.""" + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="test_table", type=DataObjectType.TABLE + ), + ) + + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + make_temp_table_name("test_table", "temp1"), + make_temp_table_name("test_table", "old1"), + ] + + # Has a dependent view + mocker.patch.object( + adapter, + "_get_dependent_views", + return_value=[("test_schema", "dependent_view", "SELECT * FROM test_table", False)], + ) + mocker.patch.object(adapter, "_get_table_indexes", return_value=[]) + mocker.patch.object(adapter, "_get_table_grants", return_value=[]) + mocker.patch.object(adapter, "_get_hypertable_config", return_value=None) + mocker.patch.object(adapter, "columns", return_value={"id": exp.DataType.build("INT")}) + + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT 1 as id"), + ) + + sql_calls = to_sql_calls(adapter) + + # Should recreate the dependent view + assert any("CREATE OR REPLACE VIEW" in sql and "dependent_view" in sql for sql in sql_calls) + + +def test_replace_query_with_indexes_and_grants( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test replace_query restores indexes and grants after swap.""" + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="test_table", type=DataObjectType.TABLE + ), + ) + + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + make_temp_table_name("test_table", "temp1"), + make_temp_table_name("test_table", "old1"), + ] + + mocker.patch.object(adapter, "_get_dependent_views", return_value=[]) + mocker.patch.object( + adapter, + "_get_table_indexes", + return_value=['CREATE INDEX idx_id ON "test_schema"."test_table" (id)'], + ) + # Aggregated grants format + mocker.patch.object( + adapter, + "_get_table_grants", + return_value=[("analyst", "SELECT, UPDATE", None)], + ) + mocker.patch.object(adapter, "_get_hypertable_config", return_value=None) + mocker.patch.object(adapter, "columns", return_value={"id": exp.DataType.build("INT")}) + + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT 1 as id"), + ) + + sql_calls = to_sql_calls(adapter) + + # Should recreate index (name is randomized, but table and column should be present) + assert any("CREATE INDEX" in sql and '"id"' in sql for sql in sql_calls) + # Should restore aggregated grants + assert any("GRANT SELECT, UPDATE ON" in sql for sql in sql_calls) + + +def test_replace_query_error_during_insert_cleans_up_temp_table( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test that temp table is dropped when error occurs during data insertion.""" + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="test_table", type=DataObjectType.TABLE + ), + ) + + temp_table = make_temp_table_name("test_table", "temp1") + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + temp_table, + make_temp_table_name("test_table", "old1"), + ] + + mocker.patch.object(adapter, "_get_dependent_views", return_value=[]) + mocker.patch.object(adapter, "_get_table_indexes", return_value=[]) + mocker.patch.object(adapter, "_get_table_grants", return_value=[]) + mocker.patch.object(adapter, "_get_hypertable_config", return_value=None) + mocker.patch.object(adapter, "columns", return_value={"id": exp.DataType.build("INT")}) + + # Simulate error during insert + mocker.patch.object( + adapter, "_insert_append_source_queries", side_effect=Exception("Insert failed") + ) + + with pytest.raises(Exception, match="Insert failed"): + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT 1 as id"), + ) + + sql_calls = to_sql_calls(adapter) + + # Should have created temp table + assert any("CREATE TABLE" in sql for sql in sql_calls) + # Should have dropped temp table on error + assert any("DROP TABLE" in sql and "temp1" in sql for sql in sql_calls) + # Should NOT have any rename operations + assert not any("RENAME" in sql for sql in sql_calls) + + +def test_replace_query_error_during_swap_cleans_up_temp_table( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test that temp table is dropped when error occurs during swap transaction.""" + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="test_table", type=DataObjectType.TABLE + ), + ) + + temp_table = make_temp_table_name("test_table", "temp1") + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + temp_table, + make_temp_table_name("test_table", "old1"), + ] + + mocker.patch.object(adapter, "_get_dependent_views", return_value=[]) + mocker.patch.object(adapter, "_get_table_indexes", return_value=[]) + mocker.patch.object(adapter, "_get_table_grants", return_value=[]) + mocker.patch.object(adapter, "_get_hypertable_config", return_value=None) + mocker.patch.object(adapter, "columns", return_value={"id": exp.DataType.build("INT")}) + + # Simulate error during rename (swap) + mocker.patch.object(adapter, "rename_table", side_effect=Exception("Rename failed")) + + with pytest.raises(Exception, match="Rename failed"): + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT 1 as id"), + ) + + sql_calls = to_sql_calls(adapter) + + # Should have created and populated temp table + assert any("CREATE TABLE" in sql for sql in sql_calls) + assert any("INSERT INTO" in sql for sql in sql_calls) + # Should have dropped temp table after transaction rollback + assert any("DROP TABLE" in sql and "temp1" in sql for sql in sql_calls) + + +def test_replace_query_error_during_view_recreation_cleans_up_temp_table( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test that temp table is dropped when error occurs during view recreation.""" + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="test_table", type=DataObjectType.TABLE + ), + ) + + temp_table = make_temp_table_name("test_table", "temp1") + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + temp_table, + make_temp_table_name("test_table", "old1"), + ] + + mocker.patch.object( + adapter, + "_get_dependent_views", + return_value=[("test_schema", "broken_view", "SELECT * FROM test_table", False)], + ) + mocker.patch.object(adapter, "_get_table_indexes", return_value=[]) + mocker.patch.object(adapter, "_get_table_grants", return_value=[]) + mocker.patch.object(adapter, "_get_hypertable_config", return_value=None) + mocker.patch.object(adapter, "columns", return_value={"id": exp.DataType.build("INT")}) + + # Simulate error during view recreation + mocker.patch.object( + adapter, "_recreate_dependent_views", side_effect=Exception("View recreation failed") + ) + + with pytest.raises(Exception, match="View recreation failed"): + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT 1 as id"), + ) + + sql_calls = to_sql_calls(adapter) + + # Should have created and populated temp table + assert any("CREATE TABLE" in sql for sql in sql_calls) + assert any("INSERT INTO" in sql for sql in sql_calls) + # Transaction rolled back (rename undone), temp table dropped + assert any("DROP TABLE" in sql and "temp1" in sql for sql in sql_calls) + + +def test_replace_query_with_hypertable_swap( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test replace_query preserves hypertable configuration during swap.""" + from sqlmesh.core.engine_adapter import PostgresEngineAdapter + from sqlmesh.core.engine_adapter.postgres import HypertableConfig + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="events", type=DataObjectType.TABLE + ), + ) + + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + make_temp_table_name("events", "temp1"), + make_temp_table_name("events", "old1"), + ] + + mocker.patch.object(adapter, "_get_dependent_views", return_value=[]) + mocker.patch.object(adapter, "_get_table_indexes", return_value=[]) + mocker.patch.object(adapter, "_get_table_grants", return_value=[]) + mocker.patch.object( + adapter, + "columns", + return_value={ + "id": exp.DataType.build("INT"), + "event_time": exp.DataType.build("TIMESTAMP"), + }, + ) + + # Mock hypertable config - table is already a hypertable + hypertable_config = HypertableConfig( + time_column="event_time", + chunk_time_interval="7 days", + ) + mocker.patch.object(adapter, "_get_hypertable_config", return_value=hypertable_config) + + # Track _create_hypertable calls + create_hypertable_mock = mocker.patch.object(adapter, "_create_hypertable") + + adapter.replace_query( + "test_schema.events", + parse_one("SELECT 1 as id, NOW() as event_time"), + ) + + # Should call _create_hypertable on temp table with the same config + create_hypertable_mock.assert_called_once() + call_args = create_hypertable_mock.call_args + # First arg is the temp table + assert "temp1" in call_args[0][0].sql(dialect="postgres") + # Second arg is the hypertable config + assert call_args[0][1] == hypertable_config + # Third arg: no indexes to recreate, so create_default_indexes should be True + assert call_args[1].get("create_default_indexes", True) is True + + +def test_replace_query_with_hypertable_and_indexes_disables_default_indexes( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test that create_default_indexes=False when recreating indexes. + + When a hypertable has indexes that need to be recreated, we disable + TimescaleDB's default index creation to avoid conflicts. + """ + from sqlmesh.core.engine_adapter import PostgresEngineAdapter + from sqlmesh.core.engine_adapter.postgres import HypertableConfig + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="events", type=DataObjectType.TABLE + ), + ) + + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + make_temp_table_name("events", "temp1"), + make_temp_table_name("events", "old1"), + ] + + mocker.patch.object(adapter, "_get_dependent_views", return_value=[]) + # Table has indexes that need to be recreated + mocker.patch.object( + adapter, + "_get_table_indexes", + return_value=['CREATE INDEX "events_time_idx" ON "test_schema"."events" ("event_time")'], + ) + mocker.patch.object(adapter, "_get_table_grants", return_value=[]) + mocker.patch.object( + adapter, + "columns", + return_value={ + "id": exp.DataType.build("INT"), + "event_time": exp.DataType.build("TIMESTAMP"), + }, + ) + + hypertable_config = HypertableConfig( + time_column="event_time", + chunk_time_interval="7 days", + ) + mocker.patch.object(adapter, "_get_hypertable_config", return_value=hypertable_config) + + create_hypertable_mock = mocker.patch.object(adapter, "_create_hypertable") + + adapter.replace_query( + "test_schema.events", + parse_one("SELECT 1 as id, NOW() as event_time"), + ) + + create_hypertable_mock.assert_called_once() + call_args = create_hypertable_mock.call_args + # When there are indexes to recreate, create_default_indexes should be False + assert call_args[1].get("create_default_indexes") is False + + +def test_replace_query_without_hypertable( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test replace_query does not call _create_hypertable for regular tables.""" + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="test_table", type=DataObjectType.TABLE + ), + ) + + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + make_temp_table_name("test_table", "temp1"), + make_temp_table_name("test_table", "old1"), + ] + + mocker.patch.object(adapter, "_get_dependent_views", return_value=[]) + mocker.patch.object(adapter, "_get_table_indexes", return_value=[]) + mocker.patch.object(adapter, "_get_table_grants", return_value=[]) + mocker.patch.object(adapter, "columns", return_value={"id": exp.DataType.build("INT")}) + + # Not a hypertable + mocker.patch.object(adapter, "_get_hypertable_config", return_value=None) + + create_hypertable_mock = mocker.patch.object(adapter, "_create_hypertable") + + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT 1 as id"), + ) + + # Should NOT call _create_hypertable for regular tables + create_hypertable_mock.assert_not_called() + + +def test_replace_query_runs_analyze_on_temp_table( + make_mocked_engine_adapter: t.Callable, + make_temp_table_name: t.Callable, + mocker: MockerFixture, +): + """Test that replace_query runs ANALYZE on the temp table before swapping. + + ANALYZE should include the table name, not just 'ANALYZE' without arguments. + Without the table name, ANALYZE would analyze all tables in the database. + """ + from sqlmesh.core.engine_adapter.shared import DataObject, DataObjectType + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + mocker.patch.object( + adapter, + "get_data_object", + return_value=DataObject( + catalog="db", schema="test_schema", name="test_table", type=DataObjectType.TABLE + ), + ) + + temp_table = make_temp_table_name("test_table", "temp1") + temp_table_mock = mocker.patch.object(adapter, "_get_temp_table") + temp_table_mock.side_effect = [ + temp_table, + make_temp_table_name("test_table", "old1"), + ] + + mocker.patch.object(adapter, "_get_dependent_views", return_value=[]) + mocker.patch.object(adapter, "_get_table_indexes", return_value=[]) + mocker.patch.object(adapter, "_get_table_grants", return_value=[]) + mocker.patch.object(adapter, "_get_hypertable_config", return_value=None) + mocker.patch.object(adapter, "columns", return_value={"id": exp.DataType.build("INT")}) + + adapter.replace_query( + "test_schema.test_table", + parse_one("SELECT 1 as id"), + ) + + sql_calls = to_sql_calls(adapter) + + # Find ANALYZE statement + analyze_calls = [sql for sql in sql_calls if sql.upper().startswith("ANALYZE")] + assert len(analyze_calls) == 1, f"Expected exactly one ANALYZE call, got: {analyze_calls}" + + # ANALYZE should include the temp table name, not be empty + analyze_sql = analyze_calls[0] + assert "temp1" in analyze_sql, f"ANALYZE should include temp table name, got: {analyze_sql}" + assert analyze_sql != "ANALYZE", "ANALYZE should not be called without a table name" + + +def test_create_hypertable_sql_generation(make_mocked_engine_adapter: t.Callable): + """Test that _create_hypertable generates correct SQL with string literals. + + The create_hypertable function requires string literals (single quotes) for + table and column names, not identifiers (double quotes). Double-quoted identifiers + are interpreted as column references, causing 'missing FROM-clause' errors. + """ + from sqlmesh.core.engine_adapter.postgres import HypertableConfig + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + # Test basic hypertable creation + config = HypertableConfig( + time_column="created_at", + chunk_time_interval="7 days", + ) + + table = exp.to_table("test_schema.test_table") + adapter._create_hypertable(table, config) + + sql_calls = to_sql_calls(adapter) + create_hypertable_calls = [sql for sql in sql_calls if "create_hypertable" in sql.lower()] + + assert len(create_hypertable_calls) == 1 + sql = create_hypertable_calls[0] + + # Table name should be wrapped in single quotes (string literal) + assert "'" in sql, "Table name should be a string literal" + # Table reference should be a string literal, not an identifier reference + assert "'test_schema.test_table'" in sql, f"Table name not properly quoted: {sql}" + + # Column name should be a string literal + assert "'created_at'" in sql, f"Column name not properly quoted: {sql}" + + # Chunk interval should be present + assert "chunk_time_interval => INTERVAL '7 days'" in sql + + +def test_create_hypertable_with_partitioning(make_mocked_engine_adapter: t.Callable): + """Test _create_hypertable with space partitioning column.""" + from sqlmesh.core.engine_adapter.postgres import HypertableConfig + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + config = HypertableConfig( + time_column="event_time", + chunk_time_interval="1 day", + partitioning_column="device_id", + number_partitions=4, + ) + + table = exp.to_table("events") + adapter._create_hypertable(table, config) + + sql_calls = to_sql_calls(adapter) + create_hypertable_calls = [sql for sql in sql_calls if "create_hypertable" in sql.lower()] + + assert len(create_hypertable_calls) == 1 + sql = create_hypertable_calls[0] + + # Check all arguments are string literals where needed + assert "'event_time'" in sql + assert "partitioning_column => 'device_id'" in sql + assert "number_partitions => 4" in sql + + +def test_create_hypertable_escapes_quotes(make_mocked_engine_adapter: t.Callable): + """Test that _create_hypertable properly escapes single quotes in column names.""" + from sqlmesh.core.engine_adapter.postgres import HypertableConfig + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + # Column name with a single quote (unusual but possible) + config = HypertableConfig( + time_column="it's_time", + chunk_time_interval="1 day", + ) + + table = exp.to_table("test_table") + adapter._create_hypertable(table, config) + + sql_calls = to_sql_calls(adapter) + create_hypertable_calls = [sql for sql in sql_calls if "create_hypertable" in sql.lower()] + + assert len(create_hypertable_calls) == 1 + sql = create_hypertable_calls[0] + + # Single quote should be escaped by doubling + assert "'it''s_time'" in sql, f"Quote not escaped properly: {sql}" + + +def test_create_hypertable_with_create_default_indexes_false( + make_mocked_engine_adapter: t.Callable, +): + """Test that _create_hypertable can disable default index creation. + + When recreating indexes manually during table swap, we need to disable + TimescaleDB's automatic index creation to avoid conflicts with the indexes + we're about to recreate. + """ + from sqlmesh.core.engine_adapter.postgres import HypertableConfig + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + config = HypertableConfig( + time_column="created_at", + chunk_time_interval="7 days", + ) + + table = exp.to_table("test_table") + adapter._create_hypertable(table, config, create_default_indexes=False) + + sql_calls = to_sql_calls(adapter) + create_hypertable_calls = [sql for sql in sql_calls if "create_hypertable" in sql.lower()] + + assert len(create_hypertable_calls) == 1 + sql = create_hypertable_calls[0] + + # Should include create_default_indexes => FALSE + assert "create_default_indexes => FALSE" in sql, f"Missing create_default_indexes: {sql}" + + +def test_create_hypertable_default_indexes_enabled_by_default( + make_mocked_engine_adapter: t.Callable, +): + """Test that _create_hypertable enables default indexes by default.""" + from sqlmesh.core.engine_adapter.postgres import HypertableConfig + + adapter = make_mocked_engine_adapter(PostgresEngineAdapter) + + config = HypertableConfig( + time_column="created_at", + chunk_time_interval="7 days", + ) + + table = exp.to_table("test_table") + adapter._create_hypertable(table, config) # No create_default_indexes argument + + sql_calls = to_sql_calls(adapter) + create_hypertable_calls = [sql for sql in sql_calls if "create_hypertable" in sql.lower()] + + assert len(create_hypertable_calls) == 1 + sql = create_hypertable_calls[0] + + # Should NOT include create_default_indexes (uses TimescaleDB default which is TRUE) + assert "create_default_indexes" not in sql, f"Unexpected create_default_indexes: {sql}" diff --git a/web/client/.gitignore b/web/client/.gitignore index 8c41e27432..7debb5ff20 100644 --- a/web/client/.gitignore +++ b/web/client/.gitignore @@ -2,5 +2,4 @@ node_modules/ /test-results/ /playwright-report/ /playwright/.cache/ -dist tsconfig.tsbuildinfo \ No newline at end of file diff --git a/web/client/dist/assets/Audits-CBiYyyx-.js b/web/client/dist/assets/Audits-CBiYyyx-.js new file mode 100644 index 0000000000..7d59b60445 --- /dev/null +++ b/web/client/dist/assets/Audits-CBiYyyx-.js @@ -0,0 +1 @@ +import{x as n,j as s,O as f,e as t,H as c,B as p,m as x,l as d}from"./index-Dj0i1-CA.js";import{P as j}from"./Page-C-XfU5BR.js";import{u as h}from"./project-BvSOI8MY.js";import{S as v}from"./SourceList-DSLO6nVJ.js";import{S as A}from"./SourceListItem-BHt8d9-I.js";import"./SplitPane-CViaZmw6.js";import"./file-CvJN3aZO.js";import"./Input-B-oZ6fGO.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./index-C-dJH7yZ.js";function k(){const{pathname:a}=n(),i=h(e=>e.files),r=Array.from(i.values()).filter(e=>e.path.endsWith("audits"));return s.jsx(j,{sidebar:s.jsxs("div",{className:"flex flex-col w-full h-full",children:[s.jsx(v,{keyId:"basename",keyName:"basename",to:t.Audits,items:r,isActive:e=>`${t.Audits}/${e}`===a,className:"h-full",listItem:({to:e,name:o,description:m,text:l,disabled:u=!1})=>s.jsx(A,{to:e,name:o,text:l,description:m,disabled:u})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:d.sm,variant:x.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{k as default}; diff --git a/web/client/dist/assets/Banner-DSRbUlO5.js b/web/client/dist/assets/Banner-DSRbUlO5.js new file mode 100644 index 0000000000..fff461049d --- /dev/null +++ b/web/client/dist/assets/Banner-DSRbUlO5.js @@ -0,0 +1 @@ +import{j as s,c as i,l as a,m as n,H as p}from"./index-Dj0i1-CA.js";function l({variant:t=n.Neutral,size:e=a.md,isFull:r=!1,isCenter:u=!1,hasBackground:x=!0,hasBackgroundOnHover:f=!1,hasBorder:c=!1,children:m,className:b}){return s.jsx("div",{className:i("w-full text-sm px-4 overflow-hidden rounded-lg",e===a.sm&&"py-2",e===a.md&&"py-4",e===a.lg&&"py-6",r&&"h-full",u&&"justify-center items-center",c&&"border-2",w(t,x,f),b),children:m})}function g({className:t}){return s.jsx(p,{className:i("mx-4 w-full",t)})}function d({children:t,className:e}){return s.jsx("h4",{className:i("font-bold text-sm whitespace-nowrap text-left",e),children:t})}function o({children:t,className:e}){return s.jsx("p",{className:i("text-neutral-600",e),children:t})}l.Label=d;l.Description=o;l.Divider=g;function w(t,e=!0,r=!1){switch(t){case n.Primary:return[r?"hover:bg-primary-5":"",e?"bg-primary-5":"","text-primary-600 dark:text-primary-400"];case n.Success:return[r?"hover:bg-success-5":"",e?"bg-success-5":"","text-success-600 dark:text-success-400"];case n.Warning:return[r?"hover:bg-warning-5":"",e?"bg-warning-5":"","text-warning-600 dark:text-warning-400"];case n.Danger:return[r?"hover:bg-danger-5":"",e?"bg-danger-5":"","text-danger-600 dark:text-danger-400"];case n.Info:return[r?"hover:bg-info-5":"",e?"bg-info-5":"","text-info-600 dark:text-info-400"];case n.Neutral:return[r?"hover:bg-neutral-5":"",e?"bg-neutral-5":"","text-neutral-600 dark:text-neutral-400"];default:return["bg-transparent","text-neutral-600 dark:text-neutral-400"]}}export{l as B}; diff --git a/web/client/dist/assets/ChevronDownIcon-MK_nrjD_.js b/web/client/dist/assets/ChevronDownIcon-MK_nrjD_.js new file mode 100644 index 0000000000..cd2a1e3ae8 --- /dev/null +++ b/web/client/dist/assets/ChevronDownIcon-MK_nrjD_.js @@ -0,0 +1 @@ +import{r as e}from"./index-Dj0i1-CA.js";function t({title:r,titleId:a,...l},o){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},l),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const c=e.forwardRef(t);export{c as F}; diff --git a/web/client/dist/assets/ChevronRightIcon-CLWtT22Q.js b/web/client/dist/assets/ChevronRightIcon-CLWtT22Q.js new file mode 100644 index 0000000000..e1cd553bad --- /dev/null +++ b/web/client/dist/assets/ChevronRightIcon-CLWtT22Q.js @@ -0,0 +1 @@ +import{r as e}from"./index-Dj0i1-CA.js";function o({title:r,titleId:a,...t},l){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},t),r?e.createElement("title",{id:a},r):null,e.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const i=e.forwardRef(o);export{i as F}; diff --git a/web/client/dist/assets/Content-BNuGZN5l.js b/web/client/dist/assets/Content-BNuGZN5l.js new file mode 100644 index 0000000000..aef5c779dc --- /dev/null +++ b/web/client/dist/assets/Content-BNuGZN5l.js @@ -0,0 +1 @@ +import{d as a,Q as l,v as e,j as r,U as n,e as d}from"./index-Dj0i1-CA.js";import{D as u}from"./ReportErrors-B7FEPzMB.js";import"./PlusCircleIcon-DVXAHG8_.js";import"./popover-_Sf0yvOI.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SplitPane-CViaZmw6.js";function v(){const{errors:i}=a(),{id:o}=l(),s=e(o)?void 0:Array.from(i).find(t=>t.id===o);return r.jsx("div",{className:"flex overflow-auto w-full h-full",children:e(s)?r.jsx(n,{link:d.Errors,description:e(o)?void 0:`Error ${o} Does Not Exist`,message:"Back To Errors"}):r.jsx("div",{className:"p-4 h-full w-full",children:r.jsx("div",{className:"w-full h-full p-4 rounded-lg bg-danger-5 text-danger-700",children:r.jsx(u,{error:s,scope:s.key,withSplitPane:!0})})})})}export{v as default}; diff --git a/web/client/dist/assets/Content-CSHJyW0n.js b/web/client/dist/assets/Content-CSHJyW0n.js new file mode 100644 index 0000000000..1ed623713d --- /dev/null +++ b/web/client/dist/assets/Content-CSHJyW0n.js @@ -0,0 +1,10 @@ +import{r as v,R as J,a as _,j as e,m as O,s as Qe,b as C,B as oe,v as E,l as T,c as w,M as De,f as V,I as Xe,J as de,i as I,K as Q,g as H,T as Me,H as ue,P as ye,C as es,A as $,q as ss,L as as,d as ns,k as ts,o as ls,p as is,Q as rs,U as os,e as cs}from"./index-Dj0i1-CA.js";import{u as W,S as ds,A as us,a as Ne,b as R,E as A,P as z,c as ms}from"./SelectEnvironment-C65jALmO.js";import{u as j,a as Y,E as M}from"./plan-BTRSbjKn.js";import{B as S}from"./Banner-DSRbUlO5.js";import{V as L,F as ke,a as Pe,p as ps}from"./PlusCircleIcon-DVXAHG8_.js";import{K as fs,L as $e,V as hs,y as xs,p as js,o as ce,$ as vs,W as gs,X as ys,_ as ws,Y as bs,a as Re,Z as Ns,z as se}from"./popover-_Sf0yvOI.js";import{I as K}from"./Input-B-oZ6fGO.js";import{H as ks,V as Ps,Q as Ts,w as Cs,u as Fs,a as As,l as Ss,T as Ds,N as Rs,U as Es,j as Bs,p as _s}from"./ListboxShow-BE5-xevs.js";import{u as ze}from"./project-BvSOI8MY.js";import{F as we}from"./context-BctCsyGb.js";import"./ModelLineage-DkIFAYo4.js";import"./editor-CcO28cqd.js";import"./file-CvJN3aZO.js";import"./SearchList-W_iT2G82.js";import"./help-B59vE3aE.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./ChevronDownIcon-MK_nrjD_.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./SourceList-DSLO6nVJ.js";import"./index-C-dJH7yZ.js";function Os({title:s,titleId:a,...t},r){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},t),s?v.createElement("title",{id:a},s):null,v.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const X=v.forwardRef(Os);let Te=v.createContext(null);Te.displayName="GroupContext";let Is=v.Fragment;function Ms(s){var a;let[t,r]=v.useState(null),[l,i]=Ts(),[c,u]=Cs(),o=v.useMemo(()=>({switch:t,setSwitch:r}),[t,r]),d={},m=s,n=$e();return J.createElement(u,{name:"Switch.Description",value:c},J.createElement(i,{name:"Switch.Label",value:l,props:{htmlFor:(a=o.switch)==null?void 0:a.id,onClick(h){t&&(hs(h.currentTarget)&&h.preventDefault(),t.click(),t.focus({preventScroll:!0}))}}},J.createElement(Te.Provider,{value:o},n({ourProps:d,theirProps:m,slot:{},defaultTag:Is,name:"Switch.Group"}))))}let $s="button";function zs(s,a){var t;let r=v.useId(),l=Fs(),i=As(),{id:c=l||`headlessui-switch-${r}`,disabled:u=i||!1,checked:o,defaultChecked:d,onChange:m,name:n,value:h,form:p,autoFocus:f=!1,...x}=s,F=v.useContext(Te),[B,D]=v.useState(null),N=v.useRef(null),k=xs(N,a,F===null?null:F.setSwitch,D),g=Ss(d),[P,Z]=Ds(o,m,g??!1),je=js(),[le,b]=v.useState(!1),ie=ce(()=>{b(!0),Z==null||Z(!P),je.nextFrame(()=>{b(!1)})}),re=ce(U=>{if(Ns(U.currentTarget))return U.preventDefault();U.preventDefault(),ie()}),ve=ce(U=>{U.key===Re.Space?(U.preventDefault(),ie()):U.key===Re.Enter&&_s(U.currentTarget)}),Le=ce(U=>U.preventDefault()),Ve=Rs(),Ge=Es(),{isFocusVisible:Fe,focusProps:He}=vs({autoFocus:f}),{isHovered:Ae,hoverProps:Ke}=gs({isDisabled:u}),{pressed:Se,pressProps:Ze}=ys({disabled:u}),qe=v.useMemo(()=>({checked:P,disabled:u,hover:Ae,focus:Fe,active:Se,autofocus:f,changing:le}),[P,Ae,Fe,Se,u,le,f]),We=ws({id:c,ref:k,role:"switch",type:bs(s,B),tabIndex:s.tabIndex===-1?0:(t=s.tabIndex)!=null?t:0,"aria-checked":P,"aria-labelledby":Ve,"aria-describedby":Ge,disabled:u||void 0,autoFocus:f,onClick:re,onKeyUp:ve,onKeyPress:Le},He,Ke,Ze),Ye=v.useCallback(()=>{if(g!==void 0)return Z==null?void 0:Z(g)},[Z,g]),Je=$e();return J.createElement(J.Fragment,null,n!=null&&J.createElement(Bs,{disabled:u,data:{[n]:h||"on"},overrides:{type:"checkbox",checked:P},form:p,onReset:Ye}),Je({ourProps:We,theirProps:x,slot:qe,defaultTag:$s,name:"Switch"}))}let Us=fs(zs),Ls=Ms,Vs=Ps,Gs=ks,ge=Object.assign(Us,{Group:Ls,Label:Vs,Description:Gs});function Hs(){const s=_(a=>a.environment);return e.jsx("div",{className:"flex flex-col px-4 py-2 w-full",children:e.jsx(S,{variant:O.Warning,children:e.jsx(L,{defaultOpen:!1,children:({open:a})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{className:"w-full flex items-center justify-between",children:[e.jsx(S.Label,{className:"w-full",children:s.isInitialProd?"Initializing Prod Environment":"Prod Environment"}),s.isInitialProd&&e.jsx(e.Fragment,{children:a?e.jsx(ke,{className:"w-5 text-warning-500"}):e.jsx(Pe,{className:"w-5 text-warning-500"})})]}),s.isInitialProd&&e.jsx(L.Panel,{className:"px-2 text-sm mt-2",children:e.jsx(S.Description,{children:"Prod will be completely backfilled in order to ensure there are no data gaps. After this is applied, it is recommended to validate further changes in a dev environment before deploying to production."})})]})})})})}function Ks(s=0){return v.useCallback(a=>{setTimeout(()=>{a==null||a.focus()},s)},[s])}function Zs({run:s,apply:a,cancel:t,reset:r}){const l=Qe(),{change_categorization:i}=W(),c=_(b=>b.modules),u=_(b=>b.environment),o=_(b=>b.environments),d=_(b=>b.addConfirmation),m=_(b=>b.setShowConfirmation),n=j(b=>b.planAction),h=j(b=>b.planOverview),p=j(b=>b.planApply),f=j(b=>b.planCancel),x=Ks();function F(b){b.stopPropagation(),r()}function B(b){b.stopPropagation(),t()}function D(b){b.stopPropagation(),l(-1)}function N(b){b.stopPropagation();const ie=u.isProd&&C(u.isInitial),re=Array.from(i.values()).some(ve=>E(ve.category));ie?d({headline:"Applying Plan Directly On Prod Environment!",tagline:"Safer choice will be to select or add new environment first.",description:"Are you sure you want to apply your changes directly on prod?",yesText:`Yes, Run ${u.name}`,noText:"No, Cancel",action:a,details:re?["ATTENTION!","[Breaking Change] category will be applied to all uncategorized changes"]:void 0,children:e.jsxs("div",{className:"mt-5 pt-4",children:[e.jsx("h4",{className:"mb-2",children:`${o.size>1?"Select or ":""}Add Environment`}),e.jsxs("div",{className:"flex items-center relative",children:[o.size>1&&e.jsx(ds,{className:"mr-2",showAddEnvironment:!1,onSelect:()=>{m(!1)},size:T.md}),e.jsx(us,{className:"w-full",size:T.md,onAdd:()=>{m(!1)}})]})]})}):re?d({headline:"Some changes are missing categorization!",description:"Are you sure you want to proceed?",details:["[Breaking Change] category will be applied to all uncategorized changes"],yesText:"Yes, Apply",noText:"No, Cancel",action:a}):a()}function k(b){b.stopPropagation(),s()}const g=h.isFailed||p.isFailed||f.isSuccessful,P=C(n.isCancelling)&&C(n.isDone)&&(n.isProcessing?C(f.isSuccessful):!0)&&C(g),Z=n.isApplying||f.isCancelling||p.isRunning&&h.isFinished,je=g||C(n.isProcessing)&&C(n.isRun)&&C(n.isDone),le=c.showHistoryNavigation;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex justify-between pt-2 pl-4 pr-2 pb-2",children:[e.jsx("div",{className:"flex w-full items-center",children:e.jsx(se,{appear:!0,show:P,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",as:"div",children:P&&e.jsx(oe,{disabled:n.isProcessing||f.isSuccessful||n.isDone,onClick:n.isRun?k:f.isSuccessful?void 0:N,ref:x,variant:f.isSuccessful?O.Danger:O.Primary,autoFocus:!0,className:"trasition-all duration-300 ease-in-out",children:e.jsx("span",{children:Y.getActionDisplayName(n,f.isSuccessful?[]:[M.RunningTask,M.Running,M.Run,M.Applying,M.ApplyBackfill,M.ApplyVirtual,M.ApplyChangesAndBackfill,M.ApplyMetadata],f.isSuccessful?"Canceled":"Done")})})})}),e.jsxs("div",{className:"flex items-center",children:[Z&&e.jsx(oe,{onClick:B,variant:O.Danger,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:Y.getActionDisplayName(n,n.isProcessing&&C(f.isSuccessful)?[M.Cancelling]:[],f.isSuccessful?"Finishing Cancellation...":"Cancel")}),je&&e.jsx(oe,{onClick:F,variant:O.Info,disabled:n.isCancelling||n.isProcessing&&f.isSuccessful,children:"Start Over"}),le&&e.jsx(oe,{onClick:D,variant:O.Info,children:"Go Back"})]})]})})}function qs({label:s,enabled:a,setEnabled:t,a11yTitle:r,size:l=T.md,disabled:i=!1,className:c}){return e.jsxs(ge.Group,{as:"div",className:"m-1",children:[e.jsxs(ge,{checked:i?!1:a,onChange:t,className:w("flex relative border-secondary-30 rounded-full m-0","shrink-0 focus:outline-none ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100 focus:border-secondary-500 focus-visible:ring-opacity-75","transition duration-200 ease-in-out",a?"bg-secondary-500":"bg-secondary-20",c,i?"opacity-50 cursor-not-allowed":"cursor-pointer",l===T.sm&&"h-[14px] w-6 focus:ring-1 border",l===T.md&&"h-5 w-10 focus:ring-2 border-2",l===T.lg&&"h-7 w-14 focus:ring-4 border-2"),disabled:i,children:[e.jsx("span",{className:"sr-only",children:r}),e.jsx("span",{"aria-hidden":"true",className:w("pointer-events-none inline-block transform rounded-full shadow-md transition duration-200 ease-in-out","bg-light",l===T.sm&&"h-3 w-3",l===T.md&&"h-4 w-4",l===T.lg&&"h-6 w-6",a&&l===T.sm&&"translate-x-[10px]",a&&l===T.md&&"translate-x-5",a&&l===T.lg&&"translate-x-7")})]}),s!=null&&e.jsx(ge.Label,{className:w("text-xs font-light ml-1 text-neutral-600 dark:text-neutral-400"),children:s})]})}function q({label:s,info:a,enabled:t,disabled:r=!1,setEnabled:l,className:i}){return e.jsxs("div",{className:w("flex justify-between",i),children:[e.jsxs("label",{className:"block mb-1 px-3 text-sm font-bold",children:[s,e.jsx("small",{className:"block text-xs text-neutral-500",children:a})]}),e.jsx(qs,{disabled:r,enabled:t,setEnabled:l,size:T.lg})]})}function Ws({disabled:s=!1,className:a}){const t=Ne(),{start:r,end:l,isInitialPlanRun:i}=W();return e.jsxs("div",{className:w("flex w-full flex-wrap md:flex-nowrap",a),children:[e.jsx(K,{className:"w-full md:w-[50%]",label:"Start Date (UTC)",info:"The start datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2023-12-13",value:r,onInput:o=>{o.stopPropagation(),t({type:R.DateStart,start:o.target.value})}})}),e.jsx(K,{className:"w-full md:w-[50%]",label:"End Date (UTC)",info:"The end datetime of the interval",disabled:s||i,children:({disabled:c,className:u})=>e.jsx(K.Textfield,{className:w(u,"w-full"),disabled:c,placeholder:"2022-12-13",value:l,onInput:o=>{o.stopPropagation(),t({type:R.DateEnd,end:o.target.value})}})})]})}function Ys(){const s=Ne(),{skip_tests:a,no_gaps:t,skip_backfill:r,forward_only:l,auto_apply:i,no_auto_categorization:c,restate_models:u,isInitialPlanRun:o,create_from:d,include_unmodified:m}=W(),n=v.useRef(null),h=j(N=>N.planAction),p=j(N=>N.planOverview),f=j(N=>N.planApply),x=_(N=>N.environment),F=_(N=>N.environments),B=De.getOnlyRemote(Array.from(F));v.useEffect(()=>{s({type:R.PlanOptions,...p.plan_options,skip_tests:!1})},[]);const D=h.isProcessing||h.isDone||f.isFinished||p.isLatest&&C(h.isRun)||p.isVirtualUpdate;return v.useEffect(()=>{var N;E(n.current)||h.isProcessing&&n.current.classList.contains("--is-open")&&((N=n.current)==null||N.click())},[n,h]),e.jsxs("form",{className:"w-full",children:[e.jsx("fieldset",{className:w(D&&"opacity-50 cursor-not-allowed"),children:e.jsx(Ws,{className:w(D&&"pointer-events-none")})}),e.jsx("fieldset",{className:"my-2",children:e.jsx(S,{children:e.jsx(L,{defaultOpen:h.isRun,children:({open:N})=>e.jsxs(e.Fragment,{children:[e.jsxs(L.Button,{ref:n,className:w("w-full flex items-center",N&&"--is-open"),children:[e.jsxs(S.Label,{className:"mr-2 text-sm w-full",children:[e.jsx("span",{children:"Additional Options"}),D&&e.jsx("span",{className:"ml-1",children:"(Read Only)"})]}),N?e.jsx(ke,{className:"h-5 w-5 text-neutral-400"}):e.jsx(Pe,{className:"h-5 w-5 text-neutral-400"})]}),e.jsxs(L.Panel,{unmount:!1,className:w("py-4 text-sm text-neutral-500",D&&"opacity-50 cursor-not-allowed"),children:[e.jsx("div",{className:w(D&&"pointer-events-none"),children:e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap",children:[C(x.isProd)&&e.jsx(K,{className:"w-full",label:"Create From Environment",info:"The environment to base the plan on rather than local files",disabled:B.length<2,children:({className:k,disabled:g})=>e.jsx(K.Selector,{className:w(k,"w-full"),list:De.getOnlyRemote(Array.from(F)).filter(P=>P!==x).map(P=>({value:P.name,text:P.name})),onChange:P=>{s({type:R.PlanOptions,create_from:P})},value:d,disabled:g})}),e.jsx(K,{className:"w-full",label:"Restate Models",info:`Restate data for specified models and models + downstream from the one specified. For production + environment, all related model versions will have + their intervals wiped, but only the current + versions will be backfilled. For development + environment, only the current model versions will + be affected`,children:({className:k})=>e.jsx(K.Textfield,{className:w(k,"w-full"),placeholder:"project.model1, project.model2",disabled:o,value:u??"",onInput:g=>{g.stopPropagation(),s({type:R.PlanOptions,restate_models:g.target.value})}})})]})}),e.jsxs("div",{className:w("flex flex-wrap md:flex-nowrap w-full mt-3",D&&"pointer-events-none"),children:[e.jsxs("div",{className:"w-full md:mr-2",children:[e.jsx("div",{className:"block my-2",children:e.jsx(q,{label:"Skip Tests",info:`Skip tests prior to generating the plan if they + are defined`,enabled:!!a,setEnabled:k=>{s({type:R.PlanOptions,skip_tests:k})}})}),e.jsx("div",{className:"block my-2",children:e.jsx(q,{label:"No Gaps",info:`Ensure that new snapshots have no data gaps when + comparing to existing snapshots for matching + models in the target environment`,enabled:!!t||!!r&&x.isInitialProd||x.isInitialProd,disabled:o||!!r&&x.isInitialProd||x.isInitialProd,setEnabled:k=>{s({type:R.PlanOptions,no_gaps:k})}})}),e.jsx("div",{className:"block my-2",children:e.jsx(q,{label:"Skip Backfill",info:"Skip the backfill step",enabled:!!r,disabled:o||x.isInitialProd,setEnabled:k=>{s({type:R.PlanOptions,skip_backfill:k})}})})]}),e.jsxs("div",{className:"w-full md:ml-2",children:[e.jsxs("div",{className:"block my-2",children:[e.jsx(q,{label:"Include Unmodified",info:"Indicates whether to create views for all models in the target development environment or only for modified ones",enabled:!!m,disabled:o||x.isInitialProd,setEnabled:k=>{s({type:R.PlanOptions,include_unmodified:k})}}),e.jsx(q,{label:"Forward Only",info:"Create a plan for forward-only changes",enabled:!!l,disabled:o||x.isInitialProd,setEnabled:k=>{s({type:R.PlanOptions,forward_only:k})}})]}),e.jsx("div",{className:"block my-2",children:e.jsx(q,{label:"Auto Apply",info:"Automatically apply the plan after it is generated",enabled:!!i,setEnabled:k=>{s({type:R.PlanOptions,auto_apply:k})}})}),e.jsx("div",{className:"block my-2",children:e.jsx(q,{label:"No Auto Categorization",info:"Set category manually",enabled:!!c,disabled:o||x.isInitialProd,setEnabled:k=>{s({type:R.PlanOptions,no_auto_categorization:k})}})})]})]})]})]})},String(h.isRun))})})]})}function Js(s){const{start:a,end:t,skip_tests:r,no_gaps:l,skip_backfill:i,forward_only:c,include_unmodified:u,no_auto_categorization:o,restate_models:d,auto_apply:m,create_from:n,change_categorization:h}=W(),p=_(D=>D.environment),f=E(p==null?void 0:p.isDefault)||V(p==null?void 0:p.isDefault),x=v.useMemo(()=>{if(!p.isProd)return{start:a,end:f&&Xe(d)?void 0:t}},[p,a,t,f,d]),F=v.useMemo(()=>p.isInitialProd?{include_unmodified:!0,no_gaps:!0,skip_tests:r,auto_apply:m}:{skip_tests:r,no_gaps:l,skip_backfill:i,forward_only:c,create_from:n,no_auto_categorization:o,restate_models:d,include_unmodified:u,auto_apply:m},[p,l,i,c,u,n,o,r,d,m]),B=v.useMemo(()=>Array.from(h.values()).reduce((D,{category:N,change:k})=>(D[k.displayName]=(N==null?void 0:N.value)??de.NUMBER_1,D),{}),[h]);return{planOptions:{...F,...s},planDates:x,categories:B}}function Qs(){const{start:s,end:a,skip_tests:t,no_gaps:r,skip_backfill:l,forward_only:i,include_unmodified:c,no_auto_categorization:u,restate_models:o,create_from:d,change_categorization:m}=W(),n=_(x=>x.environment),h=E(n==null?void 0:n.isDefault)||V(n==null?void 0:n.isDefault),p=v.useMemo(()=>{if(!h)return{start:s,end:a}},[s,a,h]),f=v.useMemo(()=>Array.from(m.values()).reduce((x,{category:F,change:B})=>(x[B.displayName]=(F==null?void 0:F.value)??de.NUMBER_1,x),{}),[m]);return{planDates:p,planOptions:{no_gaps:r,skip_backfill:l,forward_only:i,include_unmodified:c,create_from:d,no_auto_categorization:u,skip_tests:t,restate_models:o},categories:f}}function ee(s,a,t){var c;const r=(s.isFinished&&(a.isLatest||a.isRunning)||t.isFinished||C((c=s.overview)==null?void 0:c.isFailed))&&I(s.overview),l=r?s.overview:a,i=r?s:a;return{meta:i.meta,start:i.start,end:i.end,hasChanges:l.hasChanges,hasBackfills:l.hasBackfills,backfills:i.backfills??[],added:i.added??[],removed:i.removed??[],direct:i.direct??[],indirect:i.indirect??[],metadata:i.metadata??[],plan_options:i.plan_options,stageValidation:i.stageValidation,stageBackfills:i.stageBackfills,stageChanges:i.stageChanges,isFailed:l.isFailed||t.isFailed||s.isFailed}}const Ee=3;function ae({progress:s=0,delay:a=0,duration:t=0,startFromZero:r=!0,className:l}){return C(r)&&(s=s{const d=Object.values(r),m=d.length;let n=0,h=0,p=0;return d.forEach(f=>{n=f.completed===f.total?n+1:n,h+=f.total,p+=f.completed}),{models:d,taskCompleted:n,taskTotal:m,batchesTotal:h,batchesCompleted:p}},[r]);return e.jsx("div",{className:"text-prose",ref:t,children:a({models:l,completed:i,total:c,totalBatches:u,completedBatches:o})})};function Xs({className:s,headline:a,environment:t,completed:r,total:l,updatedAt:i,updateType:c,completedBatches:u,totalBatches:o}){return e.jsx(Ce,{className:s,children:e.jsxs(me,{children:[e.jsxs(pe,{children:[e.jsx(fe,{children:e.jsx(Ue,{headline:a,environment:t})}),e.jsxs(he,{children:[e.jsx(ne,{completed:r,total:l,unit:"task"}),e.jsx(te,{}),e.jsx(ne,{completed:u,total:o,unit:"batches"}),e.jsx(te,{}),e.jsx(xe,{completed:u,total:o})]})]}),e.jsx(ae,{progress:Q(u,o)}),I(i)&&e.jsx(sa,{updatedAt:i,updateType:c})]})})}function ea({models:s,className:a,added:t,removed:r,direct:l,indirect:i,metadata:c,showBatches:u=!0,showProgress:o=!0,showVirtualUpdate:d=!1,queue:m}){return e.jsxs(e.Fragment,{children:[e.jsx(se,{show:H(m),enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",as:"div",children:e.jsxs("div",{className:"px-4 pt-3 pb-2 mt-4 shadow-lg rounded-lg",children:[e.jsx(Me,{text:"Currently in proccess"}),e.jsx(be,{models:m,children:n=>e.jsxs(me,{children:[e.jsxs(pe,{children:[e.jsxs(fe,{children:[H(n.interval)&&e.jsx(Be,{start:n.interval[0],end:n.interval[1]}),e.jsx(Oe,{modelName:n.displayViewName,changeType:Ie({modelName:n.name,added:t,removed:r,direct:l,indirect:i,metadata:c})})]}),e.jsxs(he,{children:[u&&e.jsx(ne,{completed:n.completed,total:n.total,unit:"batch"}),e.jsx(te,{}),o&&e.jsx(e.Fragment,{children:E(n.end)||E(n.start)?e.jsx(xe,{total:n.total,completed:n.completed}):e.jsx(_e,{start:n.start,end:n.end})}),d&&e.jsx("span",{className:"inline-block whitespace-nowrap font-bold ml-2",children:"Updated"})]})]}),o?e.jsx(ae,{startFromZero:!1,progress:Q(n.completed,n.total)}):e.jsx(ue,{className:"my-1 border-neutral-200 opacity-50"})]})})]})}),e.jsx(Ce,{className:a,children:e.jsx(be,{models:s,children:n=>e.jsxs(me,{children:[e.jsxs(pe,{children:[e.jsxs(fe,{children:[H(n.interval)&&e.jsx(Be,{start:n.interval[0],end:n.interval[1]}),e.jsx(Oe,{modelName:n.displayViewName,changeType:Ie({modelName:n.name,added:t,removed:r,direct:l,indirect:i,metadata:c})})]}),e.jsxs(he,{children:[u&&e.jsx(ne,{completed:n.completed,total:n.total,unit:"batch"}),e.jsx(te,{}),o&&e.jsx(e.Fragment,{children:E(n.end)||E(n.start)?e.jsx(xe,{total:n.total,completed:n.completed}):e.jsx(_e,{start:n.start,end:n.end})}),d&&e.jsx("span",{className:"inline-block whitespace-nowrap font-bold ml-2",children:"Updated"})]})]}),o?e.jsx(ae,{progress:Q(n.completed,n.total),startFromZero:m.findIndex(h=>h.name===n.name)===-1}):e.jsx(ue,{className:"my-1 border-neutral-200 opacity-50"})]})})})]})}function Ce({className:s,children:a}){return e.jsx("div",{className:w("max-h-[50vh] overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",s),children:a})}function me({className:s,children:a}){return e.jsx("div",{className:w("px-2",s),children:a})}function be({className:s,models:a,children:t}){return e.jsx("ul",{className:w("rounded-lg pt-4 overflow-auto text-prose hover:scrollbar scrollbar--vertical scrollbar--horizontal",s),children:a.map(r=>e.jsx("li",{className:"mb-2",children:t(r)},r.name))})}function pe({className:s,children:a}){return e.jsx("div",{className:w("flex sm:justify-between sm:items-baseline text-xs",s),children:a})}function Ue({className:s,headline:a,environment:t}){return e.jsxs("span",{className:w("flex items-center",s),children:[e.jsx("span",{className:"block whitespace-nowrap text-sm font-medium",children:a}),I(t)&&e.jsx("small",{className:"inline-block ml-1 px-2 py-[0.125rem] text-xs font-bold bg-neutral-10 rounded-md",children:t})]})}function fe({className:s,children:a}){return e.jsx("div",{className:w("flex mr-6 w-full sm:w-auto overflow-hidden",s),children:a})}function he({className:s,children:a}){return e.jsx("div",{className:w("flex items-center",s),children:a})}function Be({className:s,start:a,end:t}){return e.jsxs("span",{className:w("inline-block mr-2 whitespace-nowrap font-mono",s),children:[a," – ",t]})}function ne({className:s,total:a,completed:t,unit:r}){return e.jsxs("span",{className:w("inline-block whitespace-nowrap",s),children:[t," of ",a," ",ps(r,a)]})}function te({className:s}){return e.jsx("span",{className:w("inline-block mx-2",s),children:"|"})}function xe({className:s,total:a,completed:t}){return e.jsxs("span",{className:w("inline-block whitespace-nowrap font-bold",s),children:[Math.ceil(Q(t,a)),"%"]})}function _e({className:s,start:a,end:t}){return e.jsx("span",{className:w("inline-block whitespace-nowrap font-bold",s),children:`${Math.floor((t-a)/6e4)}:${String(Math.ceil((t-a)/1e3%60)).padStart(2,"0")}`})}function sa({updateType:s,updatedAt:a}){return e.jsxs("div",{className:"flex justify-between mt-1",children:[e.jsxs("small",{className:"text-xs",children:[e.jsx("b",{children:"Update Type:"}),e.jsx("span",{className:"inline-block ml-1",children:s})]}),e.jsxs("small",{className:"text-xs",children:[e.jsx("b",{children:"Last Update:"}),e.jsx("span",{className:"inline-block ml-1",children:ye(new Date(a),"yyyy-mm-dd hh-mm-ss",!1)})]})]})}function Oe({className:s,modelName:a,changeType:t}){return e.jsx("span",{className:w("font-bold whitespace-nowrap",t===A.Add&&"text-success-600 dark:text-success-500",t===A.Remove&&"text-danger-500",t===A.Direct&&"text-secondary-500 dark:text-primary-500",t===A.Indirect&&"text-warning-500",t===A.Default&&"text-prose",s),children:a})}y.Block=Ce;y.Summary=Xs;y.Details=ea;y.DetailsProgress=he;y.Task=me;y.Tasks=be;y.TaskDetails=pe;y.TaskProgress=xe;y.TaskSize=ne;y.TaskDivider=te;y.TaskInfo=fe;y.TaskHeadline=Ue;function Ie({modelName:s,added:a,removed:t,direct:r,indirect:l,metadata:i}){return a.some(c=>c.name===s)?A.Add:t.some(c=>c.name===s)?A.Remove:r.some(c=>c.name===s)?A.Direct:l.some(c=>c.name===s)?A.Indirect:i.some(c=>c.name===s)?A.Metadata:A.Default}function aa({report:s}){var a;return e.jsxs("div",{children:[e.jsxs("div",{className:"py-2",children:[e.jsxs("p",{children:["Total: ",s.total]}),e.jsxs("p",{children:["Succeeded: ",s.successful]}),e.jsxs("p",{children:["Failed: ",s.failures]}),e.jsxs("p",{children:["Errors: ",s.errors]}),e.jsxs("p",{children:["Dialect: ",s.dialect]})]}),e.jsx("ul",{children:(a=s.details)==null?void 0:a.map(t=>e.jsxs("li",{className:"flex mb-1",children:[e.jsx("span",{className:"inline-block mr-4",children:"—"}),e.jsxs("div",{className:"overflow-hidden",children:[e.jsx("span",{className:"inline-block mb-2",children:t.message}),e.jsx("code",{className:"inline-block max-h-[50vh] bg-theme py-2 px-4 rounded-lg w-full overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:e.jsx("pre",{children:t.details})})]})]},t.message))})]})}function na(){var f;const s=ze(x=>x.tests),a=j(x=>x.planApply),t=j(x=>x.planOverview),r=j(x=>x.planCancel),l=j(x=>x.planAction),{plan_options:i,hasChanges:c,hasBackfills:u,isFailed:o}=ee(a,t,r),d=I(s)&&!!s.total,m=I(s)&&!!s.message&&C(d),n=I(s)&&(!!s.failures||!!s.errors),h=C(l.isProcessing)&&C(l.isDone)&&C(r.isFinished),p=o&&[n,d,c,u].every(es);return e.jsx(se,{appear:!0,show:C(l.isRun),enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:w("my-2 rounded-xl",o&&"bg-danger-5"),as:"div",children:p?e.jsxs(S,{className:"flex items-center",size:T.sm,variant:O.Danger,children:[e.jsx(we,{className:"w-4 mr-2"}),e.jsx(S.Label,{className:"mr-2 text-sm",children:"Plan Failed"})]}):e.jsxs(e.Fragment,{children:[o&&e.jsxs(S,{className:"flex items-center mb-1",size:T.sm,variant:O.Danger,children:[e.jsx(we,{className:"w-4 mr-2"}),e.jsx(S.Label,{className:"mr-2 text-sm",children:"Plan Failed"})]}),V(i==null?void 0:i.skip_tests)?e.jsxs(S,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(X,{className:"w-4 mr-2"}),e.jsx(S.Label,{className:"mr-2 text-sm",children:"Tests Skipped"})]}):d?e.jsx(ra,{isOpen:!0,report:s}):m?e.jsx(ia,{report:s}):e.jsxs(S,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(X,{className:"w-4 mr-2"}),e.jsx(S.Label,{className:"mr-2 text-sm",children:"No Tests"})]}),C(n)&&e.jsxs(e.Fragment,{children:[e.jsx(ta,{isOpen:h}),e.jsx(la,{isOpen:h}),e.jsx(pa,{}),a.shouldShowEvaluation&&e.jsxs(oa,{start:a.evaluationStart,end:a.isFinished?a.evaluationEnd??((f=r.meta)==null?void 0:f.end):void 0,children:[e.jsx(ca,{}),e.jsx(da,{}),e.jsx(ua,{}),e.jsx(ma,{})]})]})]})})}function ta({isOpen:s=!1}){var d;const a=j(m=>m.planApply),t=j(m=>m.planOverview),r=j(m=>m.planCancel),{meta:l,stageChanges:i,hasChanges:c}=ee(a,t,r),u=(i==null?void 0:i.meta)??l;return ss([$.init,$.fail],(d=i==null?void 0:i.meta)==null?void 0:d.status)||V(c)?e.jsx(G,{meta:u,states:["Changes","Failed Getting Changes","Getting Changes..."],isOpen:s&&V(c),panel:e.jsx(fa,{})}):e.jsxs(S,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(X,{className:"w-4 mr-2"}),e.jsx(S.Label,{className:"mr-2 text-sm",children:"No Changes"})]})}function la({isOpen:s=!1}){const{change_categorization:a}=W(),t=j(p=>p.planApply),r=j(p=>p.planOverview),l=j(p=>p.planCancel),{meta:i,stageBackfills:c,backfills:u,hasBackfills:o}=ee(t,r,l),d=(c==null?void 0:c.meta)??i,m=v.useMemo(()=>Array.from(a.values()).reduce((p,{category:f,change:x})=>{var F;return(f==null?void 0:f.value)!==de.NUMBER_3&&p.add(x.name),(E(f)||f.value===de.NUMBER_1)&&((F=x.indirect)==null||F.forEach(B=>p.add(B.name))),p},new Set),[a]),n=v.useMemo(()=>a.size>0?u.filter(p=>m.has(p.name)):u,[u,m]);return((d==null?void 0:d.status)===$.init||V(o))&&(a.size>0?n.length>0:!0)?e.jsx(G,{meta:d,states:["Backfills","Failed Getting Backfills","Getting Backfills..."],isOpen:s&&V(o),panel:e.jsx(z,{headline:`Models ${n.length}`,type:A.Default,children:e.jsx(z.Default,{type:A.Default,changes:n})})}):e.jsxs(S,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(X,{className:"w-4 mr-2"}),e.jsx(S.Label,{className:"mr-2 text-sm",children:"No Backfills"})]})}function ia({report:s}){return e.jsx(G,{meta:{status:$.success,...s},states:["Tests Completed","Failed Tests","Running Tests..."],children:s.message})}function ra({report:s,isOpen:a=!1}){return e.jsx(G,{variant:O.Danger,meta:{status:$.fail,...s},isOpen:a,states:["Tests Failed","One or More Tests Failed","Running Tests..."],shouldCollapse:!1,children:e.jsx(aa,{report:s})})}function oa({start:s,end:a,children:t}){const r=v.useRef(null);return v.useEffect(()=>{setTimeout(()=>{var l;(l=r.current)==null||l.scrollIntoView({behavior:"smooth",block:"start"})},500)},[]),E(s)?e.jsx(e.Fragment,{}):e.jsxs("div",{ref:r,className:"pt-4 pb-2 text-xs",children:[e.jsxs("span",{className:"text-neutral-500 block px-4 mb-1",children:["Evaluation started at"," ",ye(new Date(s),"yyyy-mm-dd hh-mm-ss")]}),e.jsx(ue,{}),e.jsx("div",{className:"py-2",children:t}),I(a)&&e.jsxs(e.Fragment,{children:[e.jsx(ue,{}),e.jsxs("span",{className:"text-neutral-500 block px-4 mt-1",children:["Evaluation stopped at"," ",ye(new Date(a),"yyyy-mm-dd hh-mm-ss")]})]})]})}function ca({isOpen:s}){var t;const a=j(r=>r.planApply);return E(a.stageCreation)?e.jsx(e.Fragment,{}):e.jsx(G,{meta:(t=a.stageCreation)==null?void 0:t.meta,states:["Snapshot Tables Created","Snapshot Tables Creation Failed","Creating Snapshot Tables..."],isOpen:s,children:e.jsx(y.Block,{children:e.jsxs(y.Task,{children:[e.jsxs(y.TaskDetails,{children:[e.jsx(y.TaskInfo,{children:e.jsx(y.TaskHeadline,{headline:"Snapshot Tables"})}),e.jsxs(y.DetailsProgress,{children:[e.jsx(y.TaskSize,{completed:a.stageCreation.num_tasks,total:a.stageCreation.total_tasks,unit:"task"}),e.jsx(y.TaskDivider,{}),e.jsx(y.TaskProgress,{completed:a.stageCreation.num_tasks,total:a.stageCreation.total_tasks})]})]}),e.jsx(ae,{progress:Q(a.stageCreation.num_tasks,a.stageCreation.total_tasks)})]})})})}function da(){var a;const s=j(t=>t.planApply);return E(s.stageRestate)?e.jsxs(S,{className:"flex items-center mb-1",size:T.sm,hasBackground:!1,children:[e.jsx(X,{className:"w-4 mr-2"}),e.jsx(S.Label,{className:"mr-2 text-sm",children:"No Models To Restate"})]}):e.jsx(G,{meta:(a=s.stageRestate)==null?void 0:a.meta,states:["Restate Models","Restate Models Failed","Restating Models..."]})}function ua(){const s=j(d=>d.planApply),a=j(d=>d.planAction),t=j(d=>d.planOverview),r=j(d=>d.planCancel),l=s.environment,i=s.stageBackfill,{backfills:c}=ee(s,t,r),u=v.useMemo(()=>Object.values(s.tasks).reduce((d,m)=>{const n=c.find(h=>h.name===m.name);return m.interval=(n==null?void 0:n.interval)??[],d[m.name]=m,d},{}),[c,s.tasks]);return I(i)&&I(l)?e.jsx(G,{meta:i.meta,states:["Backfilled","Backfilling Failed","Backfilling Intervals..."],showDetails:!0,isOpen:!0,shouldCollapse:!1,children:e.jsx(y,{tasks:u,children:({total:d,completed:m,models:n,completedBatches:h,totalBatches:p})=>e.jsxs(e.Fragment,{children:[e.jsx(y.Summary,{headline:"Target Environment",environment:l,completed:m,total:d,completedBatches:h,totalBatches:p,updateType:a.isApplyVirtual?"Virtual":"Backfill"}),I(n)&&e.jsx(y.Details,{models:n,added:s.added,removed:s.removed,direct:s.direct,indirect:s.indirect,metadata:s.metadata,queue:s.queue,showBatches:!0,showVirtualUpdate:a.isApplyVirtual,showProgress:!0})]})})}):e.jsx(e.Fragment,{})}function ma(){var a;const s=j(t=>t.planApply);return E(s.stagePromote)?e.jsx(e.Fragment,{}):e.jsx("div",{children:e.jsx(G,{meta:(a=s.stagePromote)==null?void 0:a.meta,states:["Environment Promoted","Promotion Failed","Promoting Environment..."],children:e.jsx(y.Block,{children:e.jsxs(y.Task,{children:[e.jsxs(y.TaskDetails,{children:[e.jsx(y.TaskInfo,{children:e.jsx(y.TaskHeadline,{headline:`Promote Environment: ${s.stagePromote.target_environment}`})}),e.jsxs(y.DetailsProgress,{children:[e.jsx(y.TaskSize,{completed:s.stagePromote.num_tasks,total:s.stagePromote.total_tasks,unit:"task"}),e.jsx(y.TaskDivider,{}),e.jsx(y.TaskProgress,{completed:s.stagePromote.num_tasks,total:s.stagePromote.total_tasks})]})]}),e.jsx(ae,{progress:Q(s.stagePromote.num_tasks,s.stagePromote.total_tasks)})]})})})})}function pa(){var u;const{virtualUpdateDescription:s}=W(),a=j(o=>o.planApply),t=j(o=>o.planOverview),r=j(o=>o.planCancel),{isFailed:l}=ee(a,t,r),i=((u=a.overview)==null?void 0:u.isVirtualUpdate)??t.isVirtualUpdate,c=V(a.isFinished);return i&&C(l)?e.jsx(G,{meta:{status:$.success,done:c},states:[c?"Virtual Update Completed":"Virtual Update","Virtual Update Failed","Applying Virtual Update..."],children:s}):e.jsx(e.Fragment,{})}function fa(){const s=j(n=>n.planAction),a=j(n=>n.planOverview),t=j(n=>n.planApply),r=j(n=>n.planCancel),{hasChanges:l,added:i,removed:c,direct:u,indirect:o,metadata:d}=ee(t,a,r),m=s.isProcessing||s.isDone||t.isFinished||a.isLatest&&C(s.isRun)||a.isVirtualUpdate;return e.jsx("div",{className:"w-full my-2",children:V(l)&&e.jsxs(e.Fragment,{children:[H(i)&&e.jsx(z,{className:"w-full my-2",headline:"Added Models",type:A.Add,children:e.jsx(z.Default,{type:A.Add,changes:i})}),H(c)&&e.jsx(z,{className:"w-full my-2",headline:"Removed Models",type:A.Remove,children:e.jsx(z.Default,{type:A.Remove,changes:c})}),H(u)&&e.jsx(z,{className:"my-2 w-full",headline:"Modified Directly",type:A.Direct,children:e.jsx(z.Direct,{changes:u,disabled:m})}),H(o)&&e.jsx(z,{className:"my-2 w-full",headline:"Modified Indirectly",type:A.Indirect,children:e.jsx(z.Indirect,{changes:o})}),H(d)&&e.jsx(z,{className:"my-2 w-full",headline:"Modified Metadata",type:A.Default,children:e.jsx(z.Default,{type:A.Default,changes:d})})]})})}function G({meta:s,states:a=["Success","Failed","Running"],isOpen:t=!1,trigger:r,panel:l,children:i,showDetails:c=!0,shouldCollapse:u=!0}){const o=v.useRef(null),d=j(P=>P.planOverview),m=j(P=>P.planApply),n=(s==null?void 0:s.status)!==$.fail&&I(l)||I(i),[h,p]=v.useState(t);v.useEffect(()=>{var P;E(o.current)||u&&(m.isFinished||d.isLatest)&&o.current.classList.contains("--is-open")&&((P=o.current)==null||P.click())},[o,d,m,u]),v.useEffect(()=>{p(t&&n)},[t,n]);const f=(s==null?void 0:s.status)===$.fail,x=(s==null?void 0:s.status)===$.success,F=(s==null?void 0:s.status)===$.init,B=x?O.Success:f?O.Danger:O.Info,[D,N,k]=a,g=x?D:f?N:k;return e.jsx(se,{appear:!0,show:I(s),enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"my-2",as:"div",children:e.jsxs(L,{children:[e.jsx(S,{className:"mb-1",variant:B,size:T.sm,hasBackground:!1,hasBackgroundOnHover:n,children:e.jsx(L.Button,{ref:o,className:w("w-full flex flex-col",h&&"--is-open",C(n)&&"cursor-default"),onClick:()=>p(P=>!P),children:E(r)?e.jsxs(e.Fragment,{children:[F&&e.jsx(as,{text:g,hasSpinner:!0,size:T.sm,variant:O.Primary,className:"w-full"}),C(F)&&e.jsxs("div",{className:"flex items-center h-full",children:[c&&n?e.jsx(e.Fragment,{children:h?e.jsx(ke,{className:"w-4 mr-2"}):e.jsx(Pe,{className:"w-4 mr-2"})}):e.jsxs(e.Fragment,{children:[(s==null?void 0:s.status)===$.success&&e.jsx(X,{className:"min-w-4 max-w-4 mr-2"}),(s==null?void 0:s.status)===$.fail&&e.jsx(we,{className:"min-w-4 max-w-4 mr-2"})]}),e.jsx(S.Label,{className:"mr-2 text-sm",children:e.jsx(Me,{text:g,size:T.sm,variant:B})})]})]}):r})}),e.jsx(se,{appear:!0,show:h,enter:"transition ease duration-300 transform",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"transition ease duration-300 transform",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",className:"trasition-all duration-300 ease-in-out",as:"div",children:e.jsxs(L.Panel,{static:!0,className:"px-2 text-xs mb-2",children:[I(i)&&e.jsx("div",{className:w("p-4 rounded-md",B===O.Danger?"bg-danger-5 text-danger-500":"bg-neutral-5"),children:i}),(s==null?void 0:s.status)!==$.fail&&l]})})]})})}function ha(){const s=Ne(),{clearErrors:a}=ns(),t=_(g=>g.environment),r=j(g=>g.planAction),l=j(g=>g.setPlanAction),i=j(g=>g.resetPlanTrackers),c=j(g=>g.resetPlanCancel),u=j(g=>g.clearPlanApply),o=ze(g=>g.setTests),d=Js(),m=Qs(),{refetch:n,cancel:h}=ts(t.name,d),{refetch:p,cancel:f}=ls(t.name,m),{refetch:x}=is();function F(){a(),s([{type:R.ResetPlanDates},{type:R.ResetPlanOptions},{type:R.ResetTestsReport},{type:R.ResetCategories}])}function B(){l(new Y({value:M.Run})),u(),F(),setTimeout(()=>i(),500)}function D(){l(new Y({value:M.Cancelling})),c(),s([{type:R.ResetTestsReport}]);let g;r.isApplying?g=h:g=f,g(),x()}function N(){l(new Y({value:M.Applying})),u(),s([{type:R.ResetTestsReport}]),p().catch(console.log)}function k(){l(new Y({value:M.Running})),i(),o(void 0),s([{type:R.ResetTestsReport}]),n().catch(console.log)}return e.jsxs("div",{className:"flex flex-col w-full h-full max-w-[80rem]",children:[t.isProd&&e.jsx(Hs,{}),e.jsxs("div",{className:"relative w-full h-full flex flex-col pt-2 pl-4 pr-2 overflow-y-scroll hover:scrollbar scrollbar--vertical",children:[e.jsx(Ys,{}),e.jsx(na,{})]}),e.jsx(Zs,{apply:N,run:k,cancel:D,reset:B})]})}function Oa(){const{environmentName:s}=rs(),a=_(l=>l.environment),t=_(l=>l.environments),r=_(l=>l.setEnvironment);return v.useEffect(()=>{if(a.isInitialProd||s===a.name)return;const l=Array.from(t).find(i=>i.name===s);E(l)||r(l)},[s]),e.jsx(ms,{children:E(a)?e.jsx(os,{link:cs.Plan,description:E(s)?void 0:`Environment ${s} Does Not Exist`,message:"Back To Data Catalog"}):e.jsx(ha,{})})}export{Oa as default}; diff --git a/web/client/dist/assets/Data-C1oRDbLx.js b/web/client/dist/assets/Data-C1oRDbLx.js new file mode 100644 index 0000000000..e46fab3441 --- /dev/null +++ b/web/client/dist/assets/Data-C1oRDbLx.js @@ -0,0 +1 @@ +import{Q as x,a as m,v as h,P as a,a4 as c,a5 as D,a6 as P,r as T,j as u}from"./index-Dj0i1-CA.js";import{g as b,T as g}from"./help-DuPhjipa.js";import{u as r}from"./editor-CcO28cqd.js";import"./index-C-dJH7yZ.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./Input-B-oZ6fGO.js";import"./file-CvJN3aZO.js";const d=1440*60*1e3;function S(){const{modelName:o}=x(),p=m(e=>e.models),s=m(e=>e.lastSelectedModel),v=r(e=>e.previewTable),i=r(e=>e.setPreviewQuery),n=r(e=>e.setPreviewTable),t=h(o)||o===(s==null?void 0:s.name)?s:p.get(encodeURI(o)),l={model:t.displayName,start:a(c(Date.now()-d)),end:a(new Date),execution_time:a(c(Date.now()-d)),limit:1e3},{refetch:f}=D(l),{refetch:w}=P(l);return T.useEffect(()=>{i(void 0),n(void 0),f().then(({data:e})=>{i(e==null?void 0:e.sql)}),w().then(({data:e})=>{n(b(e))})},[t]),u.jsx("div",{className:"flex overflow-hidden w-full h-full px-2",children:u.jsx(g,{headline:t==null?void 0:t.displayName,data:v??[[],[]]})})}export{S as default}; diff --git a/web/client/dist/assets/DataCatalog-HXyX2-_j.js b/web/client/dist/assets/DataCatalog-HXyX2-_j.js new file mode 100644 index 0000000000..87e8511545 --- /dev/null +++ b/web/client/dist/assets/DataCatalog-HXyX2-_j.js @@ -0,0 +1,14 @@ +import{a1 as jt,j as C,i as Ae,b as bn,g as Ht,C as Nr,D as Dr,a2 as Fr,f as _r,P as Or,Q as Mr,s as Rr,a as tn,a3 as Br,v as we,r as jr,U as Hr,e as Xn,L as Ur,S as Vr}from"./index-Dj0i1-CA.js";import{M as qr,u as $r,L as Yr,C as Kr,a as rn}from"./context-BctCsyGb.js";import{T as Qr,a as ln,b as Wr,c as Xr,d as Gn,e as ge,f as Gr,g as Jr,h as Jn,i as Zn,j as Zr,k as et,l as nt}from"./SearchList-W_iT2G82.js";import ei from"./ModelLineage-DkIFAYo4.js";import{E as on}from"./file-CvJN3aZO.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./editor-CcO28cqd.js";import"./project-BvSOI8MY.js";import"./help-B59vE3aE.js";import"./SourceList-DSLO6nVJ.js";import"./Input-B-oZ6fGO.js";import"./index-C-dJH7yZ.js";import"./popover-_Sf0yvOI.js";import"./ListboxShow-BE5-xevs.js";function ni(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const ti=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ri=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ii={};function tt(e,n){return(ii.jsx?ri:ti).test(e)}const li=/[ \t\n\f\r]/g;function oi(e){return typeof e=="object"?e.type==="text"?rt(e.value):!1:rt(e)}function rt(e){return e.replace(li,"")===""}class qe{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}qe.prototype.normal={};qe.prototype.property={};qe.prototype.space=void 0;function Ut(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new qe(t,r,n)}function wn(e){return e.toLowerCase()}class Z{constructor(n,t){this.attribute=t,this.property=n}}Z.prototype.attribute="";Z.prototype.booleanish=!1;Z.prototype.boolean=!1;Z.prototype.commaOrSpaceSeparated=!1;Z.prototype.commaSeparated=!1;Z.prototype.defined=!1;Z.prototype.mustUseProperty=!1;Z.prototype.number=!1;Z.prototype.overloadedBoolean=!1;Z.prototype.property="";Z.prototype.spaceSeparated=!1;Z.prototype.space=void 0;let ai=0;const F=Se(),Y=Se(),Sn=Se(),x=Se(),V=Se(),ve=Se(),ne=Se();function Se(){return 2**++ai}const Cn=Object.freeze(Object.defineProperty({__proto__:null,boolean:F,booleanish:Y,commaOrSpaceSeparated:ne,commaSeparated:ve,number:x,overloadedBoolean:Sn,spaceSeparated:V},Symbol.toStringTag,{value:"Module"})),an=Object.keys(Cn);class Ln extends Z{constructor(n,t,r,i){let l=-1;if(super(n,t),it(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&fi.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(lt,di);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!lt.test(l)){let o=l.replace(pi,mi);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=Ln}return new i(r,n)}function mi(e){return"-"+e.toLowerCase()}function di(e){return e.charAt(1).toUpperCase()}const gi=Ut([Vt,ui,Yt,Kt,Qt],"html"),Nn=Ut([Vt,si,Yt,Kt,Qt],"svg");function yi(e){return e.join(" ").trim()}var Te={},un,ot;function xi(){if(ot)return un;ot=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,s=` +`,u="/",c="*",f="",h="comment",p="declaration";un=function(b,z){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];z=z||{};var k=1,v=1;function E(P){var I=P.match(n);I&&(k+=I.length);var N=P.lastIndexOf(s);v=~N?P.length-N:v+P.length}function j(){var P={line:k,column:v};return function(I){return I.position=new U(P),$(),I}}function U(P){this.start=P,this.end={line:k,column:v},this.source=z.source}U.prototype.content=b;function y(P){var I=new Error(z.source+":"+k+":"+v+": "+P);if(I.reason=P,I.filename=z.source,I.line=k,I.column=v,I.source=b,!z.silent)throw I}function O(P){var I=P.exec(b);if(I){var N=I[0];return E(N),b=b.slice(N.length),I}}function $(){O(t)}function R(P){var I;for(P=P||[];I=B();)I!==!1&&P.push(I);return P}function B(){var P=j();if(!(u!=b.charAt(0)||c!=b.charAt(1))){for(var I=2;f!=b.charAt(I)&&(c!=b.charAt(I)||u!=b.charAt(I+1));)++I;if(I+=2,f===b.charAt(I-1))return y("End of comment missing");var N=b.slice(2,I-2);return v+=2,E(N),b=b.slice(I),v+=2,P({type:h,comment:N})}}function A(){var P=j(),I=O(r);if(I){if(B(),!O(i))return y("property missing ':'");var N=O(l),K=P({type:p,property:S(I[0].replace(e,f)),value:N?S(N[0].replace(e,f)):f});return O(o),K}}function T(){var P=[];R(P);for(var I;I=A();)I!==!1&&(P.push(I),R(P));return P}return $(),T()};function S(b){return b?b.replace(a,f):f}return un}var at;function ki(){if(at)return Te;at=1;var e=Te&&Te.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Te,"__esModule",{value:!0}),Te.default=t;var n=e(xi());function t(r,i){var l=null;if(!r||typeof r!="string")return l;var o=(0,n.default)(r),a=typeof i=="function";return o.forEach(function(s){if(s.type==="declaration"){var u=s.property,c=s.value;a?i(u,c,s):c&&(l=l||{},l[u]=c)}}),l}return Te}var Oe={},ut;function bi(){if(ut)return Oe;ut=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(u){return!u||t.test(u)||e.test(u)},o=function(u,c){return c.toUpperCase()},a=function(u,c){return"".concat(c,"-")},s=function(u,c){return c===void 0&&(c={}),l(u)?u:(u=u.toLowerCase(),c.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(n,o))};return Oe.camelCase=s,Oe}var Me,st;function wi(){if(st)return Me;st=1;var e=Me&&Me.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(ki()),t=bi();function r(i,l){var o={};return!i||typeof i!="string"||(0,n.default)(i,function(a,s){a&&s&&(o[(0,t.camelCase)(a,l)]=s)}),o}return r.default=r,Me=r,Me}var Si=wi();const Ci=jt(Si),Wt=Xt("end"),Dn=Xt("start");function Xt(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Ei(e){const n=Dn(e),t=Wt(e);if(n&&t)return{start:n,end:t}}function je(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ct(e.position):"start"in e||"end"in e?ct(e):"line"in e||"column"in e?En(e):""}function En(e){return pt(e&&e.line)+":"+pt(e&&e.column)}function ct(e){return En(e&&e.start)+"-"+En(e&&e.end)}function pt(e){return e&&typeof e=="number"?e:1}class X extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?l.ruleId=r:(l.source=r.slice(0,s),l.ruleId=r.slice(s+1))}if(!l.place&&l.ancestors&&l.ancestors){const s=l.ancestors[l.ancestors.length-1];s&&(l.place=s.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=je(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual,this.expected,this.note,this.url}}X.prototype.file="";X.prototype.name="";X.prototype.reason="";X.prototype.message="";X.prototype.stack="";X.prototype.column=void 0;X.prototype.line=void 0;X.prototype.ancestors=void 0;X.prototype.cause=void 0;X.prototype.fatal=void 0;X.prototype.place=void 0;X.prototype.ruleId=void 0;X.prototype.source=void 0;const Fn={}.hasOwnProperty,Ii=new Map,Ti=/[A-Z]/g,Pi=new Set(["table","tbody","thead","tfoot","tr"]),Ai=new Set(["td","th"]),Gt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Mi(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Oi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Nn:gi,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=Jt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function Jt(e,n,t){if(n.type==="element")return zi(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Li(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Di(e,n,t);if(n.type==="mdxjsEsm")return Ni(e,n);if(n.type==="root")return Fi(e,n,t);if(n.type==="text")return _i(e,n)}function zi(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Nn,e.schema=i),e.ancestors.push(n);const l=er(e,n.tagName,!1),o=Ri(e,n);let a=On(e,n);return Pi.has(n.tagName)&&(a=a.filter(function(s){return typeof s=="string"?!oi(s):!0})),Zt(e,o,l,n),_n(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Li(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ve(e,n.position)}function Ni(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ve(e,n.position)}function Di(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Nn,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:er(e,n.name,!0),o=Bi(e,n),a=On(e,n);return Zt(e,o,l,n),_n(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Fi(e,n,t){const r={};return _n(r,On(e,n)),e.create(n,e.Fragment,r,t)}function _i(e,n){return n.value}function Zt(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function _n(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Oi(e,n,t){return r;function r(i,l,o,a){const u=Array.isArray(o.children)?t:n;return a?u(l,o,a):u(l,o)}}function Mi(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),s=Dn(r);return n(i,l,o,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Ri(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&Fn.call(n.properties,i)){const l=ji(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Ai.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Bi(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Ve(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else Ve(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function On(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Ii;for(;++ri?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l0?(ce(e,e.length,0,n),e):n}const mt={}.hasOwnProperty;function Qi(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function ze(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const se=xe(/[A-Za-z]/),te=xe(/[\dA-Za-z]/),Gi=xe(/[#-'*+\--9=?A-Z^-~]/);function In(e){return e!==null&&(e<32||e===127)}const Tn=xe(/\d/),Ji=xe(/[\dA-Fa-f]/),Zi=xe(/[!-/:-@[-`{-~]/);function L(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function M(e){return e===-2||e===-1||e===32}const el=xe(new RegExp("\\p{P}|\\p{S}","u")),nl=xe(/\s/);function xe(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Ne(e){const n=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function q(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(s){return M(s)?(e.enter(t),a(s)):n(s)}function a(s){return M(s)&&l++o))return;const O=n.events.length;let $=O,R,B;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){if(R){B=n.events[$][1].end;break}R=!0}for(k(r),y=O;yE;){const U=t[j];n.containerState=U[1],U[0].exit.call(n,e)}t.length=E}function v(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function ol(e,n,t){return q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gt(e){if(e===null||J(e)||nl(e))return 1;if(el(e))return 2}function Rn(e,n,t){const r=[];let i=-1;for(;++i1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},h={...e[t][1].start};yt(f,-s),yt(h,s),o={type:s>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:h},l={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:s>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=re(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=re(u,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),u=re(u,Rn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=re(u,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(c=2,u=re(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):c=0,ce(e,r-1,t-r+3,u),t=r+u.length-c-2;break}}for(t=-1;++t0&&M(y)?q(e,v,"linePrefix",l+1)(y):v(y)}function v(y){return y===null||L(y)?e.check(xt,b,j)(y):(e.enter("codeFlowValue"),E(y))}function E(y){return y===null||L(y)?(e.exit("codeFlowValue"),v(y)):(e.consume(y),E)}function j(y){return e.exit("codeFenced"),n(y)}function U(y,O,$){let R=0;return B;function B(N){return y.enter("lineEnding"),y.consume(N),y.exit("lineEnding"),A}function A(N){return y.enter("codeFencedFence"),M(N)?q(y,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):T(N)}function T(N){return N===a?(y.enter("codeFencedFenceSequence"),P(N)):$(N)}function P(N){return N===a?(R++,y.consume(N),P):R>=o?(y.exit("codeFencedFenceSequence"),M(N)?q(y,I,"whitespace")(N):I(N)):$(N)}function I(N){return N===null||L(N)?(y.exit("codeFencedFence"),O(N)):$(N)}}}function xl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const cn={name:"codeIndented",tokenize:bl},kl={partial:!0,tokenize:wl};function bl(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),q(e,l,"linePrefix",5)(u)}function l(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):t(u)}function o(u){return u===null?s(u):L(u)?e.attempt(kl,o,s)(u):(e.enter("codeFlowValue"),a(u))}function a(u){return u===null||L(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),a)}function s(u){return e.exit("codeIndented"),n(u)}}function wl(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):L(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):q(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):L(o)?i(o):t(o)}}const Sl={name:"codeText",previous:El,resolve:Cl,tokenize:Il};function Cl(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Re(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Re(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Re(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function ar(e,n,t,r,i,l,o,a,s){const u=s||Number.POSITIVE_INFINITY;let c=0;return f;function f(k){return k===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(k),e.exit(l),h):k===null||k===32||k===41||In(k)?t(k):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(k))}function h(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===62?(e.exit("chunkString"),e.exit(a),h(k)):k===null||k===60||L(k)?t(k):(e.consume(k),k===92?S:p)}function S(k){return k===60||k===62||k===92?(e.consume(k),p):p(k)}function b(k){return!c&&(k===null||k===41||J(k))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(k)):c999||p===null||p===91||p===93&&!s||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):L(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||L(p)||a++>999?(e.exit("chunkString"),c(p)):(e.consume(p),s||(s=!M(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function sr(e,n,t,r,i,l){let o;return a;function a(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),o=h===40?41:h,s):t(h)}function s(h){return h===o?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):(e.enter(l),u(h))}function u(h){return h===o?(e.exit(l),s(o)):h===null?t(h):L(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===o||h===null||L(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?f:c)}function f(h){return h===o||h===92?(e.consume(h),c):c(h)}}function He(e,n){let t;return r;function r(i){return L(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):M(i)?q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Dl={name:"definition",tokenize:_l},Fl={partial:!0,tokenize:Ol};function _l(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return ur.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=ze(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):t(p)}function s(p){return J(p)?He(e,u)(p):u(p)}function u(p){return ar(e,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(Fl,f,f)(p)}function f(p){return M(p)?q(e,h,"whitespace")(p):h(p)}function h(p){return p===null||L(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Ol(e,n,t){return r;function r(a){return J(a)?He(e,i)(a):t(a)}function i(a){return sr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return M(a)?q(e,o,"whitespace")(a):o(a)}function o(a){return a===null||L(a)?n(a):t(a)}}const Ml={name:"hardBreakEscape",tokenize:Rl};function Rl(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return L(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const Bl={name:"headingAtx",resolve:jl,tokenize:Hl};function jl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},ce(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Hl(e,n,t){let r=0;return i;function i(c){return e.enter("atxHeading"),l(c)}function l(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||J(c)?(e.exit("atxHeadingSequence"),a(c)):t(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||L(c)?(e.exit("atxHeading"),n(c)):M(c)?q(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||J(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}const Ul=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],bt=["pre","script","style","textarea"],Vl={concrete:!0,name:"htmlFlow",resolveTo:Yl,tokenize:Kl},ql={partial:!0,tokenize:Wl},$l={partial:!0,tokenize:Ql};function Yl(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Kl(e,n,t){const r=this;let i,l,o,a,s;return u;function u(d){return c(d)}function c(d){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(d),f}function f(d){return d===33?(e.consume(d),h):d===47?(e.consume(d),l=!0,b):d===63?(e.consume(d),i=3,r.interrupt?n:m):se(d)?(e.consume(d),o=String.fromCharCode(d),z):t(d)}function h(d){return d===45?(e.consume(d),i=2,p):d===91?(e.consume(d),i=5,a=0,S):se(d)?(e.consume(d),i=4,r.interrupt?n:m):t(d)}function p(d){return d===45?(e.consume(d),r.interrupt?n:m):t(d)}function S(d){const oe="CDATA[";return d===oe.charCodeAt(a++)?(e.consume(d),a===oe.length?r.interrupt?n:T:S):t(d)}function b(d){return se(d)?(e.consume(d),o=String.fromCharCode(d),z):t(d)}function z(d){if(d===null||d===47||d===62||J(d)){const oe=d===47,ke=o.toLowerCase();return!oe&&!l&&bt.includes(ke)?(i=1,r.interrupt?n(d):T(d)):Ul.includes(o.toLowerCase())?(i=6,oe?(e.consume(d),k):r.interrupt?n(d):T(d)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(d):l?v(d):E(d))}return d===45||te(d)?(e.consume(d),o+=String.fromCharCode(d),z):t(d)}function k(d){return d===62?(e.consume(d),r.interrupt?n:T):t(d)}function v(d){return M(d)?(e.consume(d),v):B(d)}function E(d){return d===47?(e.consume(d),B):d===58||d===95||se(d)?(e.consume(d),j):M(d)?(e.consume(d),E):B(d)}function j(d){return d===45||d===46||d===58||d===95||te(d)?(e.consume(d),j):U(d)}function U(d){return d===61?(e.consume(d),y):M(d)?(e.consume(d),U):E(d)}function y(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),s=d,O):M(d)?(e.consume(d),y):$(d)}function O(d){return d===s?(e.consume(d),s=null,R):d===null||L(d)?t(d):(e.consume(d),O)}function $(d){return d===null||d===34||d===39||d===47||d===60||d===61||d===62||d===96||J(d)?U(d):(e.consume(d),$)}function R(d){return d===47||d===62||M(d)?E(d):t(d)}function B(d){return d===62?(e.consume(d),A):t(d)}function A(d){return d===null||L(d)?T(d):M(d)?(e.consume(d),A):t(d)}function T(d){return d===45&&i===2?(e.consume(d),K):d===60&&i===1?(e.consume(d),Q):d===62&&i===4?(e.consume(d),le):d===63&&i===3?(e.consume(d),m):d===93&&i===5?(e.consume(d),pe):L(d)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(ql,fe,P)(d)):d===null||L(d)?(e.exit("htmlFlowData"),P(d)):(e.consume(d),T)}function P(d){return e.check($l,I,fe)(d)}function I(d){return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),N}function N(d){return d===null||L(d)?P(d):(e.enter("htmlFlowData"),T(d))}function K(d){return d===45?(e.consume(d),m):T(d)}function Q(d){return d===47?(e.consume(d),o="",ie):T(d)}function ie(d){if(d===62){const oe=o.toLowerCase();return bt.includes(oe)?(e.consume(d),le):T(d)}return se(d)&&o.length<8?(e.consume(d),o+=String.fromCharCode(d),ie):T(d)}function pe(d){return d===93?(e.consume(d),m):T(d)}function m(d){return d===62?(e.consume(d),le):d===45&&i===2?(e.consume(d),m):T(d)}function le(d){return d===null||L(d)?(e.exit("htmlFlowData"),fe(d)):(e.consume(d),le)}function fe(d){return e.exit("htmlFlow"),n(d)}}function Ql(e,n,t){const r=this;return i;function i(o){return L(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Wl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ze,n,t)}}const Xl={name:"htmlText",tokenize:Gl};function Gl(e,n,t){const r=this;let i,l,o;return a;function a(m){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(m),s}function s(m){return m===33?(e.consume(m),u):m===47?(e.consume(m),U):m===63?(e.consume(m),E):se(m)?(e.consume(m),$):t(m)}function u(m){return m===45?(e.consume(m),c):m===91?(e.consume(m),l=0,S):se(m)?(e.consume(m),v):t(m)}function c(m){return m===45?(e.consume(m),p):t(m)}function f(m){return m===null?t(m):m===45?(e.consume(m),h):L(m)?(o=f,Q(m)):(e.consume(m),f)}function h(m){return m===45?(e.consume(m),p):f(m)}function p(m){return m===62?K(m):m===45?h(m):f(m)}function S(m){const le="CDATA[";return m===le.charCodeAt(l++)?(e.consume(m),l===le.length?b:S):t(m)}function b(m){return m===null?t(m):m===93?(e.consume(m),z):L(m)?(o=b,Q(m)):(e.consume(m),b)}function z(m){return m===93?(e.consume(m),k):b(m)}function k(m){return m===62?K(m):m===93?(e.consume(m),k):b(m)}function v(m){return m===null||m===62?K(m):L(m)?(o=v,Q(m)):(e.consume(m),v)}function E(m){return m===null?t(m):m===63?(e.consume(m),j):L(m)?(o=E,Q(m)):(e.consume(m),E)}function j(m){return m===62?K(m):E(m)}function U(m){return se(m)?(e.consume(m),y):t(m)}function y(m){return m===45||te(m)?(e.consume(m),y):O(m)}function O(m){return L(m)?(o=O,Q(m)):M(m)?(e.consume(m),O):K(m)}function $(m){return m===45||te(m)?(e.consume(m),$):m===47||m===62||J(m)?R(m):t(m)}function R(m){return m===47?(e.consume(m),K):m===58||m===95||se(m)?(e.consume(m),B):L(m)?(o=R,Q(m)):M(m)?(e.consume(m),R):K(m)}function B(m){return m===45||m===46||m===58||m===95||te(m)?(e.consume(m),B):A(m)}function A(m){return m===61?(e.consume(m),T):L(m)?(o=A,Q(m)):M(m)?(e.consume(m),A):R(m)}function T(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),i=m,P):L(m)?(o=T,Q(m)):M(m)?(e.consume(m),T):(e.consume(m),I)}function P(m){return m===i?(e.consume(m),i=void 0,N):m===null?t(m):L(m)?(o=P,Q(m)):(e.consume(m),P)}function I(m){return m===null||m===34||m===39||m===60||m===61||m===96?t(m):m===47||m===62||J(m)?R(m):(e.consume(m),I)}function N(m){return m===47||m===62||J(m)?R(m):t(m)}function K(m){return m===62?(e.consume(m),e.exit("htmlTextData"),e.exit("htmlText"),n):t(m)}function Q(m){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),ie}function ie(m){return M(m)?q(e,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):pe(m)}function pe(m){return e.enter("htmlTextData"),o(m)}}const Bn={name:"labelEnd",resolveAll:no,resolveTo:to,tokenize:ro},Jl={tokenize:io},Zl={tokenize:lo},eo={tokenize:oo};function no(e){let n=-1;const t=[];for(;++n=3&&(u===null||L(u))?(e.exit("thematicBreak"),n(u)):t(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),M(u)?q(e,a,"whitespace")(u):a(u))}}const G={continuation:{tokenize:yo},exit:ko,name:"list",tokenize:go},ho={partial:!0,tokenize:bo},mo={partial:!0,tokenize:xo};function go(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const S=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Tn(p)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Xe,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return t(p)}function s(p){return Tn(p)&&++o<10?(e.consume(p),s):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ze,r.interrupt?t:c,e.attempt(ho,h,f))}function c(p){return r.containerState.initialBlankLine=!0,l++,h(p)}function f(p){return M(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):t(p)}function h(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function yo(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ze,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,q(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!M(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(mo,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,q(e,e.attempt(G,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function xo(e,n,t){const r=this;return q(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function ko(e){e.exit(this.containerState.type)}function bo(e,n,t){const r=this;return q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!M(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const wt={name:"setextUnderline",resolveTo:wo,tokenize:So};function wo(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function So(e,n,t){const r=this;let i;return l;function l(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,o(u)):t(u)}function o(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),M(u)?q(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||L(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const Co={tokenize:Eo};function Eo(e){const n=this,t=e.attempt(Ze,r,e.attempt(this.parser.constructs.flowInitial,i,q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Al,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Io={resolveAll:pr()},To=cr("string"),Po=cr("text");function cr(e){return{resolveAll:pr(e==="text"?Ao:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(c){return u(c)?l(c):a(c)}function a(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),s}function s(c){return u(c)?(t.exit("data"),l(c)):(t.consume(c),s)}function u(c){if(c===null)return!0;const f=i[c];let h=-1;if(f)for(;++h-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Ho(e,n){let t=-1;const r=[];let i;for(;++t0){const ae=D.tokenStack[D.tokenStack.length-1];(ae[1]||Ct).call(D,void 0,ae[0])}for(w.position={start:ye(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:ye(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(n,u),e.applyData(n,u)}function ia(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function la(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function mr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function oa(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return mr(e,n);const i={src:Ne(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,l),e.applyData(n,l)}function aa(e,n){const t={src:Ne(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function ua(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function sa(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return mr(e,n);const i={href:Ne(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const l={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function ca(e,n){const t={href:Ne(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function pa(e,n,t){const r=e.all(n),i=t?fa(t):dr(n),l={},o=[];if(typeof n.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a1}function ha(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=Dn(n.children[1]),s=Wt(n.children[n.children.length-1]);a&&s&&(o.position={start:a,end:s}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function xa(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,a=o?o.length:n.children.length;let s=-1;const u=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(Tt(n.slice(i),i>0,!1)),l.join("")}function Tt(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===Et||l===It;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===Et||l===It;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function wa(e,n){const t={type:"text",value:ba(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Sa(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Ca={blockquote:Jo,break:Zo,code:ea,delete:na,emphasis:ta,footnoteReference:ra,heading:ia,html:la,imageReference:oa,image:aa,inlineCode:ua,linkReference:sa,link:ca,listItem:pa,list:ha,paragraph:ma,root:da,strong:ga,table:ya,tableCell:ka,tableRow:xa,text:wa,thematicBreak:Sa,toml:Ke,yaml:Ke,definition:Ke,footnoteDefinition:Ke};function Ke(){}const gr=-1,en=0,Ue=1,Ge=2,jn=3,Hn=4,Un=5,Vn=6,yr=7,xr=8,Pt=typeof self=="object"?self:globalThis,Ea=(e,n)=>{const t=(i,l)=>(e.set(l,i),i),r=i=>{if(e.has(i))return e.get(i);const[l,o]=n[i];switch(l){case en:case gr:return t(o,i);case Ue:{const a=t([],i);for(const s of o)a.push(r(s));return a}case Ge:{const a=t({},i);for(const[s,u]of o)a[r(s)]=r(u);return a}case jn:return t(new Date(o),i);case Hn:{const{source:a,flags:s}=o;return t(new RegExp(a,s),i)}case Un:{const a=t(new Map,i);for(const[s,u]of o)a.set(r(s),r(u));return a}case Vn:{const a=t(new Set,i);for(const s of o)a.add(r(s));return a}case yr:{const{name:a,message:s}=o;return t(new Pt[a](s),i)}case xr:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:a}=new Uint8Array(o);return t(new DataView(a),o)}}return t(new Pt[l](o),i)};return r},At=e=>Ea(new Map,e)(0),Pe="",{toString:Ia}={},{keys:Ta}=Object,Be=e=>{const n=typeof e;if(n!=="object"||!e)return[en,n];const t=Ia.call(e).slice(8,-1);switch(t){case"Array":return[Ue,Pe];case"Object":return[Ge,Pe];case"Date":return[jn,Pe];case"RegExp":return[Hn,Pe];case"Map":return[Un,Pe];case"Set":return[Vn,Pe];case"DataView":return[Ue,t]}return t.includes("Array")?[Ue,t]:t.includes("Error")?[yr,t]:[Ge,t]},Qe=([e,n])=>e===en&&(n==="function"||n==="symbol"),Pa=(e,n,t,r)=>{const i=(o,a)=>{const s=r.push(o)-1;return t.set(a,s),s},l=o=>{if(t.has(o))return t.get(o);let[a,s]=Be(o);switch(a){case en:{let c=o;switch(s){case"bigint":a=xr,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);c=null;break;case"undefined":return i([gr],o)}return i([a,c],o)}case Ue:{if(s){let h=o;return s==="DataView"?h=new Uint8Array(o.buffer):s==="ArrayBuffer"&&(h=new Uint8Array(o)),i([s,[...h]],o)}const c=[],f=i([a,c],o);for(const h of o)c.push(l(h));return f}case Ge:{if(s)switch(s){case"BigInt":return i([s,o.toString()],o);case"Boolean":case"Number":case"String":return i([s,o.valueOf()],o)}if(n&&"toJSON"in o)return l(o.toJSON());const c=[],f=i([a,c],o);for(const h of Ta(o))(e||!Qe(Be(o[h])))&&c.push([l(h),l(o[h])]);return f}case jn:return i([a,o.toISOString()],o);case Hn:{const{source:c,flags:f}=o;return i([a,{source:c,flags:f}],o)}case Un:{const c=[],f=i([a,c],o);for(const[h,p]of o)(e||!(Qe(Be(h))||Qe(Be(p))))&&c.push([l(h),l(p)]);return f}case Vn:{const c=[],f=i([a,c],o);for(const h of o)(e||!Qe(Be(h)))&&c.push(l(h));return f}}const{message:u}=o;return i([a,{name:s,message:u}],o)};return l},vt=(e,{json:n,lossy:t}={})=>{const r=[];return Pa(!(n||t),!!n,new Map,r)(e),r},Je=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?At(vt(e,n)):structuredClone(e):(e,n)=>At(vt(e,n));function Aa(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function va(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function za(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Aa,r=e.options.footnoteBackLabel||va,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s0&&S.push({type:"text",value:" "});let v=typeof t=="string"?t:t(s,p);typeof v=="string"&&(v={type:"text",value:v}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const z=c[c.length-1];if(z&&z.type==="element"&&z.tagName==="p"){const v=z.children[z.children.length-1];v&&v.type==="text"?v.value+=" ":z.children.push({type:"text",value:" "}),z.children.push(...S)}else c.push(...S);const k={type:"element",tagName:"li",properties:{id:n+"fn-"+h},children:e.wrap(c,!0)};e.patch(u,k),a.push(k)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Je(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:` +`}]}}const kr=function(e){if(e==null)return Fa;if(typeof e=="function")return nn(e);if(typeof e=="object")return Array.isArray(e)?La(e):Na(e);if(typeof e=="string")return Da(e);throw new Error("Expected function, string, or object as test")};function La(e){const n=[];let t=-1;for(;++t":""))+")"})}return h;function h(){let p=br,S,b,z;if((!n||l(s,u,c[c.length-1]||void 0))&&(p=Ba(t(s,c)),p[0]===zt))return p;if("children"in s&&s.children){const k=s;if(k.children&&p[0]!==Ma)for(b=(r?k.children.length:-1)+o,z=c.concat(k);b>-1&&b0&&t.push({type:"text",value:` +`}),t}function Lt(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Nt(e,n){const t=Ha(e,n),r=t.one(e,void 0),i=za(t),l=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&l.children.push({type:"text",value:` +`},i),l}function Ya(e,n){return e&&"run"in e?async function(t,r){const i=Nt(t,{file:r,...n});await e.run(i,r)}:function(t,r){return Nt(t,{file:r,...e||n})}}function Dt(e){if(e)throw e}var fn,Ft;function Ka(){if(Ft)return fn;Ft=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},l=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var c=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!f)return!1;var h;for(h in u);return typeof h>"u"||e.call(u,h)},o=function(u,c){t&&c.name==="__proto__"?t(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},a=function(u,c){if(c==="__proto__")if(e.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return fn=function s(){var u,c,f,h,p,S,b=arguments[0],z=1,k=arguments.length,v=!1;for(typeof b=="boolean"&&(v=b,b=arguments[1]||{},z=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});zo.length;let s;a&&o.push(i);try{s=e.apply(this,o)}catch(u){const c=u;if(a&&t)throw c;return i(c)}a||(s&&s.then&&typeof s.then=="function"?s.then(l,i):s instanceof Error?i(s):l(s))}function i(o,...a){t||(t=!0,n(o,...a))}function l(o){i(null,o)}}const ue={basename:Ga,dirname:Ja,extname:Za,join:eu,sep:"/"};function Ga(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');$e(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Ja(e){if($e(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Za(e){$e(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const a=e.codePointAt(n);if(a===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),a===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function eu(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function tu(e,n){let t="",r=0,i=-1,l=0,o=-1,a,s;for(;++o<=e.length;){if(o2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else a===46&&l>-1?l++:l=-1}return t}function $e(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ru={cwd:iu};function iu(){return"/"}function zn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function lu(e){if(typeof e=="string")e=new URL(e);else if(!zn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return ou(e)}function ou(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t0){let[p,...S]=c;const b=r[h][1];vn(b)&&vn(p)&&(p=hn(!0,b,p)),r[h]=[u,p,...S]}}}}const cu=new qn().freeze();function yn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function kn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ot(e){if(!vn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Mt(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function We(e){return pu(e)?e:new Sr(e)}function pu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fu(e){return typeof e=="string"||hu(e)}function hu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const mu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Rt=[],Bt={allowDangerousHtml:!0},du=/^(https?|ircs?|mailto|xmpp)$/i,gu=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function yu(e){const n=xu(e),t=ku(e);return bu(n.runSync(n.parse(t),t),e)}function xu(e){const n=e.rehypePlugins||Rt,t=e.remarkPlugins||Rt,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Bt}:Bt;return cu().use(Go).use(t).use(Ya,r).use(n)}function ku(e){const n=e.children||"",t=new Sr;return typeof n=="string"&&(t.value=n),t}function bu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,l=n.disallowedElements,o=n.skipHtml,a=n.unwrapDisallowed,s=n.urlTransform||wu;for(const c of gu)Object.hasOwn(n,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+mu+c.id,void 0);return wr(e,u),vi(e,{Fragment:C.Fragment,components:i,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function u(c,f,h){if(c.type==="raw"&&h&&typeof f=="number")return o?h.children.splice(f,1):h.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let p;for(p in sn)if(Object.hasOwn(sn,p)&&Object.hasOwn(c.properties,p)){const S=c.properties[p],b=sn[p];(b===null||b.includes(c.tagName))&&(c.properties[p]=s(String(S||""),p,c))}}if(c.type==="element"){let p=t?!t.includes(c.tagName):l?l.includes(c.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(c,f,h)),p&&h&&typeof f=="number")return a&&c.children?h.children.splice(f,1,...c.children):h.children.splice(f,1),f}}}function wu(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||du.test(e.slice(0,n))?e:""}const Su=function({model:n}){const t=new Set(["path","displayName","owner","cron","cron_prev","cron_next"].filter(r=>n[r]??n.details[r]));return C.jsx(Qr,{className:"w-full py-3",children:C.jsxs("div",{className:"px-3 flex flex-col gap-2 ",children:[C.jsx(ln,{summary:"Model Details",open:!0,children:C.jsx(Wr,{"update-selector":"tbk-model-name",children:C.jsx(Xr,{children:C.jsxs(Gn,{limit:t.size,children:[Ae(n.path)&&C.jsx(ge,{label:"Path",value:n.path}),C.jsx(ge,{label:"Name",children:C.jsx(Gr,{slot:"value",text:n.displayName})}),Ae(n.details.owner)&&C.jsx(ge,{label:"Owner",value:n.details.owner}),Ae(n.details.cron)&&C.jsx(ge,{label:"Cron",children:C.jsx(Jr,{slot:"value",size:"s",variant:"info",children:n.details.cron})}),Ae(n.details.cron_prev)&&C.jsx(ge,{label:"Prev Cron",children:C.jsx(Jn,{slot:"value",date:n.details.cron_prev})}),Ae(n.details.cron_next)&&C.jsx(ge,{label:"Next Cron",children:C.jsx(Jn,{slot:"value",date:n.details.cron_next})}),Object.entries(n.details??{}).filter(([r,i])=>bn(t.has(r))).map(([r,i])=>C.jsx(ge,{className:"capitalize",label:r.replaceAll("_"," "),value:Cu(i),children:Ht(i)?C.jsx(Gn,{limit:5,children:i.map((l,o)=>C.jsx(ge,{className:"capitalize",label:l.name.replaceAll("_"," "),value:`Unique: ${Nr(l.unique)?"No":"Yes"}`},o))}):C.jsx(C.Fragment,{})},r))]})})})}),C.jsx(ln,{summary:"Columns",open:!0,children:C.jsx(qr,{nodeId:n.fqn,columns:n.columns,disabled:bn(n.isModelSQL),withHandles:!1,withSource:!1,withDescription:!0,limit:10})}),C.jsx(ln,{summary:"Description",children:C.jsx(yu,{children:n.description??"No description"})})]})})};function Cu(e){if(Ht(e))return;if(Dr(e))return"None";const n=new Date(e),t=Fr(e)&&!isNaN(n.getTime()),r=typeof e=="boolean";return r&&_r(e)?"True":r&&bn(e)?"False":t?Or(n):String(e)}function Bu(){const{modelName:e=""}=Mr(),n=Rr(),t=tn(h=>h.models),r=tn(h=>h.lastSelectedModel),i=tn(h=>h.setLastSelectedModel),{refetch:l,cancel:o,isFetching:a}=Br(e),s=we(e)||e===(r==null?void 0:r.name)?r:t.get(encodeURI(e)),u=$r(s==null?void 0:s.path,h=>{c==null||c(h.name)});jr.useEffect(()=>{if(!we(s))return l().then(({data:h})=>{s.update(h),i(s)}),()=>{o()}},[e,s==null?void 0:s.hash,s==null?void 0:s.path,s==null?void 0:s.name]);function c(h){const p=t.get(h);we(p)||n(`${Xn.DataCatalogModels}/${p.name}`)}function f(h){console.log(h==null?void 0:h.message)}return C.jsx("div",{className:"flex overflow-auto w-full h-full",children:we(s)?C.jsx(Hr,{link:Xn.DataCatalog,description:we(e)?void 0:`Model ${e} Does Not Exist`,message:"Back To Data Catalog"}):C.jsx(Yr,{showColumns:!0,handleClickModel:c,handleError:f,children:C.jsxs(Zn,{vertical:!0,className:"w-full h-full overflow-hidden",position:"60",children:[C.jsx("div",{slot:"divider"}),C.jsx("div",{slot:"start",className:"flex w-full",children:C.jsxs(Zn,{className:"w-full h-full overflow-hidden",position:"60",children:[C.jsx("div",{slot:"divider"}),C.jsx("div",{slot:"end",className:"flex flex-col h-full overflow-hidden",children:C.jsx(Su,{model:s})}),C.jsx("div",{slot:"start",className:"flex w-full h-full overflow-hidden pl-2",children:C.jsxs(Zr,{size:"2xs",variant:"primary",children:[C.jsx(et,{slot:"nav",panel:"source",children:"Source Code"}),s.isModelSQL&&C.jsx(et,{slot:"nav",panel:"compiled",children:"Compiled Query"}),C.jsx(nt,{name:"source",children:a?C.jsx("div",{className:"flex justify-center items-center w-full h-full",children:C.jsxs(Ur,{className:"inline-block",children:[C.jsx(Vr,{className:"w-5 h-5 border border-neutral-10 mr-4"}),C.jsx("h3",{className:"text-xl",children:"Waiting for Model..."})]})}):we(s.definition)&&Ae(s.path)?C.jsx(Kr,{path:s.path,children:({file:h})=>C.jsx(rn,{content:h.content,type:h.extension,extensions:u})}):C.jsx(C.Fragment,{children:we(s.definition)?C.jsx("div",{className:"flex justify-center items-center w-full h-full",children:C.jsx("h3",{className:"text-xl",children:"Definition Not Found"})}):C.jsx(rn,{content:s.definition,type:s.isModelPython?on.PY:on.SQL,extensions:u})})}),s.isModelSQL&&C.jsx(nt,{name:"compiled",children:C.jsx(rn,{type:on.SQL,content:s.sql??"",extensions:u})})]})})]})}),C.jsx("div",{slot:"end",className:"flex w-full relative",children:C.jsx(ei,{model:s})})]})})})}export{Bu as default}; diff --git a/web/client/dist/assets/Editor-BDyfpUuw.js b/web/client/dist/assets/Editor-BDyfpUuw.js new file mode 100644 index 0000000000..a9535f9b6f --- /dev/null +++ b/web/client/dist/assets/Editor-BDyfpUuw.js @@ -0,0 +1 @@ +import{r as u,R as oe,g as Le,j as t,i as k,c as b,v as H,f as mt,b as M,a as D,l as T,I as me,B as $,m as R,P as Ie,a4 as Ue,a5 as xt,a6 as ht,H as ce,S as Pe,af as Ke,ag as pt,d as et,s as gt,e as bt,q as vt,F as B,D as jt,a7 as wt,_ as Nt,ah as yt}from"./index-Dj0i1-CA.js";import{u as le,M as Tt}from"./project-BvSOI8MY.js";import{S as Ve}from"./SplitPane-CViaZmw6.js";import{E as te,M as Et}from"./file-CvJN3aZO.js";import{u as N}from"./editor-CcO28cqd.js";import{I as y}from"./Input-B-oZ6fGO.js";import{F as Pt,L as St}from"./ListboxShow-BE5-xevs.js";import{B as Ye}from"./Banner-DSRbUlO5.js";import{m as Ct,h as tt,s as kt,K as xe,ak as we,y as he,o as se,n as Te,a4 as ue,L as pe,$ as st,_ as lt,d as fe,r as Ne,a0 as Dt,a as q,g as re,T as U,q as It,W as Ft,X as Mt,Y as Rt,R as Ze}from"./popover-_Sf0yvOI.js";import{g as $e,G as Lt,F as _t,T as At}from"./help-DuPhjipa.js";import{M as $t,u as nt,a as _e,b as zt,c as Ot,C as Qt}from"./context-BctCsyGb.js";import{V as Fe,F as Bt,a as Wt}from"./PlusCircleIcon-DVXAHG8_.js";import{D as Ht}from"./ReportErrors-B7FEPzMB.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./index-C-dJH7yZ.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./help-B59vE3aE.js";import"./SourceList-DSLO6nVJ.js";function Gt({onFocus:e}){let[s,l]=u.useState(!0),n=Ct();return s?oe.createElement(tt,{as:"button",type:"button",features:kt.Focusable,onFocus:i=>{i.preventDefault();let r,a=50;function d(){if(a--<=0){r&&cancelAnimationFrame(r);return}if(e()){if(cancelAnimationFrame(r),!n.current)return;l(!1);return}r=requestAnimationFrame(d)}r=requestAnimationFrame(d)}}):null}const rt=u.createContext(null);function qt(){return{groups:new Map,get(e,s){var l;let n=this.groups.get(e);n||(n=new Map,this.groups.set(e,n));let i=(l=n.get(s))!=null?l:0;n.set(s,i+1);let r=Array.from(n.keys()).indexOf(s);function a(){let d=n.get(s);d>1?n.set(s,d-1):n.delete(s)}return[r,a]}}}function Ut({children:e}){let s=u.useRef(qt());return u.createElement(rt.Provider,{value:s},e)}function at(e){let s=u.useContext(rt);if(!s)throw new Error("You must wrap your component in a ");let l=u.useId(),[n,i]=s.current.get(e,l);return u.useEffect(()=>i,[]),n}var Vt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Vt||{}),Yt=(e=>(e[e.Less=-1]="Less",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater",e))(Yt||{}),Zt=(e=>(e[e.SetSelectedIndex=0]="SetSelectedIndex",e[e.RegisterTab=1]="RegisterTab",e[e.UnregisterTab=2]="UnregisterTab",e[e.RegisterPanel=3]="RegisterPanel",e[e.UnregisterPanel=4]="UnregisterPanel",e))(Zt||{});let Xt={0(e,s){var l;let n=ue(e.tabs,f=>f.current),i=ue(e.panels,f=>f.current),r=n.filter(f=>{var g;return!((g=f.current)!=null&&g.hasAttribute("disabled"))}),a={...e,tabs:n,panels:i};if(s.index<0||s.index>n.length-1){let f=fe(Math.sign(s.index-e.selectedIndex),{[-1]:()=>1,0:()=>fe(Math.sign(s.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(r.length===0)return a;let g=fe(f,{0:()=>n.indexOf(r[0]),1:()=>n.indexOf(r[r.length-1])});return{...a,selectedIndex:g===-1?e.selectedIndex:g}}let d=n.slice(0,s.index),p=[...n.slice(s.index),...d].find(f=>r.includes(f));if(!p)return a;let o=(l=n.indexOf(p))!=null?l:e.selectedIndex;return o===-1&&(o=e.selectedIndex),{...a,selectedIndex:o}},1(e,s){if(e.tabs.includes(s.tab))return e;let l=e.tabs[e.selectedIndex],n=ue([...e.tabs,s.tab],r=>r.current),i=e.selectedIndex;return e.info.current.isControlled||(i=n.indexOf(l),i===-1&&(i=e.selectedIndex)),{...e,tabs:n,selectedIndex:i}},2(e,s){return{...e,tabs:e.tabs.filter(l=>l!==s.tab)}},3(e,s){return e.panels.includes(s.panel)?e:{...e,panels:ue([...e.panels,s.panel],l=>l.current)}},4(e,s){return{...e,panels:e.panels.filter(l=>l!==s.panel)}}},ze=u.createContext(null);ze.displayName="TabsDataContext";function ie(e){let s=u.useContext(ze);if(s===null){let l=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,ie),l}return s}let Oe=u.createContext(null);Oe.displayName="TabsActionsContext";function Qe(e){let s=u.useContext(Oe);if(s===null){let l=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(l,Qe),l}return s}function Jt(e,s){return fe(s.type,Xt,e,s)}let Kt="div";function es(e,s){let{defaultIndex:l=0,vertical:n=!1,manual:i=!1,onChange:r,selectedIndex:a=null,...d}=e;const p=n?"vertical":"horizontal",o=i?"manual":"auto";let f=a!==null,g=we({isControlled:f}),E=he(s),[m,v]=u.useReducer(Jt,{info:g,selectedIndex:a??l,tabs:[],panels:[]}),I=u.useMemo(()=>({selectedIndex:m.selectedIndex}),[m.selectedIndex]),j=we(r||(()=>{})),c=we(m.tabs),w=u.useMemo(()=>({orientation:p,activation:o,...m}),[p,o,m]),h=se(P=>(v({type:1,tab:P}),()=>v({type:2,tab:P}))),C=se(P=>(v({type:3,panel:P}),()=>v({type:4,panel:P}))),L=se(P=>{_.current!==P&&j.current(P),f||v({type:0,index:P})}),_=we(f?e.selectedIndex:m.selectedIndex),z=u.useMemo(()=>({registerTab:h,registerPanel:C,change:L}),[]);Te(()=>{v({type:0,index:a??l})},[a]),Te(()=>{if(_.current===void 0||m.tabs.length<=0)return;let P=ue(m.tabs,G=>G.current);P.some((G,Y)=>m.tabs[Y]!==G)&&L(P.indexOf(m.tabs[_.current]))});let ne={ref:E},J=pe();return oe.createElement(Ut,null,oe.createElement(Oe.Provider,{value:z},oe.createElement(ze.Provider,{value:w},w.tabs.length<=0&&oe.createElement(Gt,{onFocus:()=>{var P,G;for(let Y of c.current)if(((P=Y.current)==null?void 0:P.tabIndex)===0)return(G=Y.current)==null||G.focus(),!0;return!1}}),J({ourProps:ne,theirProps:d,slot:I,defaultTag:Kt,name:"Tabs"}))))}let ts="div";function ss(e,s){let{orientation:l,selectedIndex:n}=ie("Tab.List"),i=he(s),r=u.useMemo(()=>({selectedIndex:n}),[n]),a=e,d={ref:i,role:"tablist","aria-orientation":l};return pe()({ourProps:d,theirProps:a,slot:r,defaultTag:ts,name:"Tabs.List"})}let ls="button";function ns(e,s){var l,n;let i=u.useId(),{id:r=`headlessui-tabs-tab-${i}`,disabled:a=!1,autoFocus:d=!1,...p}=e,{orientation:o,activation:f,selectedIndex:g,tabs:E,panels:m}=ie("Tab"),v=Qe("Tab"),I=ie("Tab"),[j,c]=u.useState(null),w=u.useRef(null),h=he(w,s,c);Te(()=>v.registerTab(w),[v,w]);let C=at("tabs"),L=E.indexOf(w);L===-1&&(L=C);let _=L===g,z=se(S=>{var Z;let je=S();if(je===Ne.Success&&f==="auto"){let ut=(Z=Dt(w))==null?void 0:Z.activeElement,qe=I.tabs.findIndex(ft=>ft.current===ut);qe!==-1&&v.change(qe)}return je}),ne=se(S=>{let Z=E.map(je=>je.current).filter(Boolean);if(S.key===q.Space||S.key===q.Enter){S.preventDefault(),S.stopPropagation(),v.change(L);return}switch(S.key){case q.Home:case q.PageUp:return S.preventDefault(),S.stopPropagation(),z(()=>re(Z,U.First));case q.End:case q.PageDown:return S.preventDefault(),S.stopPropagation(),z(()=>re(Z,U.Last))}if(z(()=>fe(o,{vertical(){return S.key===q.ArrowUp?re(Z,U.Previous|U.WrapAround):S.key===q.ArrowDown?re(Z,U.Next|U.WrapAround):Ne.Error},horizontal(){return S.key===q.ArrowLeft?re(Z,U.Previous|U.WrapAround):S.key===q.ArrowRight?re(Z,U.Next|U.WrapAround):Ne.Error}}))===Ne.Success)return S.preventDefault()}),J=u.useRef(!1),P=se(()=>{var S;J.current||(J.current=!0,(S=w.current)==null||S.focus({preventScroll:!0}),v.change(L),It(()=>{J.current=!1}))}),G=se(S=>{S.preventDefault()}),{isFocusVisible:Y,focusProps:ke}=st({autoFocus:d}),{isHovered:de,hoverProps:ve}=Ft({isDisabled:a}),{pressed:x,pressProps:F}=Mt({disabled:a}),O=u.useMemo(()=>({selected:_,hover:de,active:x,focus:Y,autofocus:d,disabled:a}),[_,de,Y,x,d,a]),De=lt({ref:h,onKeyDown:ne,onMouseDown:G,onClick:P,id:r,role:"tab",type:Rt(e,j),"aria-controls":(n=(l=m[L])==null?void 0:l.current)==null?void 0:n.id,"aria-selected":_,tabIndex:_?0:-1,disabled:a||void 0,autoFocus:d},ke,ve,F);return pe()({ourProps:De,theirProps:p,slot:O,defaultTag:ls,name:"Tabs.Tab"})}let rs="div";function as(e,s){let{selectedIndex:l}=ie("Tab.Panels"),n=he(s),i=u.useMemo(()=>({selectedIndex:l}),[l]),r=e,a={ref:n};return pe()({ourProps:a,theirProps:r,slot:i,defaultTag:rs,name:"Tabs.Panels"})}let os="div",is=Ze.RenderStrategy|Ze.Static;function cs(e,s){var l,n,i,r;let a=u.useId(),{id:d=`headlessui-tabs-panel-${a}`,tabIndex:p=0,...o}=e,{selectedIndex:f,tabs:g,panels:E}=ie("Tab.Panel"),m=Qe("Tab.Panel"),v=u.useRef(null),I=he(v,s);Te(()=>m.registerPanel(v),[m,v]);let j=at("panels"),c=E.indexOf(v);c===-1&&(c=j);let w=c===f,{isFocusVisible:h,focusProps:C}=st(),L=u.useMemo(()=>({selected:w,focus:h}),[w,h]),_=lt({ref:I,id:d,role:"tabpanel","aria-labelledby":(n=(l=g[c])==null?void 0:l.current)==null?void 0:n.id,tabIndex:w?p:-1},C),z=pe();return!w&&((i=o.unmount)==null||i)&&!((r=o.static)!=null&&r)?oe.createElement(tt,{"aria-hidden":"true",..._}):z({ourProps:_,theirProps:o,slot:L,defaultTag:os,features:is,visible:w,name:"Tabs.Panel"})}let ds=xe(ns),ot=xe(es),us=xe(ss),it=xe(as),ae=xe(cs),W=Object.assign(ds,{Group:ot,List:us,Panels:it,Panel:ae});function fs({title:e,titleId:s,...l},n){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},l),e?u.createElement("title",{id:s},e):null,u.createElement("path",{fillRule:"evenodd",d:"M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const ct=u.forwardRef(fs);function ms({title:e,titleId:s,...l},n){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},l),e?u.createElement("title",{id:s},e):null,u.createElement("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"}))}const xs=u.forwardRef(ms);function hs({title:e,titleId:s,...l},n){return u.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":s},l),e?u.createElement("title",{id:s},e):null,u.createElement("path",{d:"M15 3.75H9v16.5h6V3.75ZM16.5 20.25h3.375c1.035 0 1.875-.84 1.875-1.875V5.625c0-1.036-.84-1.875-1.875-1.875H16.5v16.5ZM4.125 3.75H7.5v16.5H4.125a1.875 1.875 0 0 1-1.875-1.875V5.625c0-1.036.84-1.875 1.875-1.875Z"}))}const ps=u.forwardRef(hs);function gs(e){switch(e){case te.SQL:return"SQL";case te.PY:return"Python";case te.YAML:case te.YML:return"YAML";default:return"Plain Text"}}function bs(e,s){return e.file.extension===te.SQL&&e.file.isLocal&&Le(s)}const A=function({text:s,children:l,className:n}){return t.jsxs("small",{className:b("font-bold whitespace-nowrap text-xs",n),children:[k(s)&&t.jsxs("span",{children:[s,": "]}),l]})};function vs({text:e,className:s}){return t.jsx("span",{className:b("font-normal",s),children:e})}function js({ok:e,className:s}){return t.jsx("span",{className:b("inline-block w-2 h-2 rounded-full",H(e)&&"bg-warning-500",mt(e)&&"bg-success-500",M(e)&&"bg-danger-500",s)})}A.Text=vs;A.Light=js;const Q={Model:"model",Test:"test",Macro:"macro",Hook:"hook",Log:"log",Config:"config",Seed:"seed",Metric:"metric",Schema:"schema",Unknown:"unknown"};function ws({tab:e}){const s=D(a=>a.isModel),l=N(a=>a.engine),n=N(a=>a.dialects),i=N(a=>a.refreshTab);u.useEffect(()=>{var d;const a=(d=n[0])==null?void 0:d.dialect_name;H(e.dialect)&&k(a)&&r(a)},[n,e]);function r(a){e.dialect=a,i(e),l.postMessage({topic:"dialect",payload:e.dialect})}return t.jsxs("div",{className:"flex w-full items-center px-2 min-h-[2rem] overflow-hidden",children:[e.file.isRemote&&t.jsx(A,{className:"mr-2",text:"Saved",children:t.jsx(A.Light,{ok:M(e.file.isChanged)})}),e.file.isRemote&&e.file.isSQL&&t.jsx(A,{className:"mr-2",text:"Formatted",children:t.jsx(A.Light,{ok:e.file.isFormatted})}),t.jsx(A,{className:"mr-2",text:"Language",children:t.jsx(A.Text,{text:gs(e.file.extension)})}),bs(e,n)&&t.jsx(A,{className:"mr-2",text:"Dialect",children:t.jsx(y,{size:T.sm,children:({className:a,size:d})=>t.jsx(y.Selector,{className:a,size:d,list:n.map(p=>({text:p.dialect_title,value:me(p.dialect_name)?"sqlglot":p.dialect_name})),onChange:r,value:e.dialect})})}),s(e.file.path)&&!me(e.dialect)&&t.jsx(A,{className:"mr-2",text:"Dialect",children:t.jsx(A.Text,{text:e.dialect})}),t.jsx(A,{className:"mr-2",text:"SQLMesh Type",children:t.jsx(A.Text,{text:Ns(e.file.path)})})]})}function Ns(e){return me(e)?Q.Unknown:e.startsWith("models")?Q.Model:e.startsWith("tests")?Q.Test:e.startsWith("logs")?Q.Log:e.startsWith("macros")?Q.Macro:e.startsWith("hooks")?Q.Hook:e.startsWith("seeds")?Q.Seed:e.startsWith("metrics")?Q.Metric:["config.yaml","config.yml","config.py"].includes(e)?Q.Config:["external_models.yaml","schema.yaml"].includes(e)?Q.Schema:Q.Unknown}function Xe({tab:e,title:s}){const l=u.useRef(null),n=D(g=>g.addConfirmation),i=le(g=>g.setSelectedFile),r=N(g=>g.closeTab),a=N(g=>g.tab),d=e.file.id===(a==null?void 0:a.file.id);return u.useEffect(()=>{H(e)||(e.el=l.current??void 0)},[l,e]),u.useEffect(()=>{H(a)||setTimeout(()=>{var g;(g=a.el)==null||g.scrollIntoView({behavior:"smooth",inline:"center"})},300)},[a]),t.jsx("li",{ref:l,className:b("inline-block py-1 pr-2 last-child:pr-0 overflow-hidden text-center overflow-ellipsis cursor-pointer"),onClick:p,children:t.jsxs("span",{className:b("flex border-2 justify-between items-center pl-1 pr-1 py-[0.125rem] min-w-[8rem] rounded-md group border-transparent border-r border-r-theme-darker dark:border-r-theme-lighter",d?"bg-neutral-200 border-neutral-200 text-neutral-900 dark:bg-dark-lighter dark:border-dark-lighter dark:text-primary-500":"bg-trasparent hover:bg-theme-darker dark:hover:bg-theme-lighter"),children:[t.jsx("small",{className:"text-xs",children:s}),t.jsx("small",{className:b("group-hover:hidden text-xs inline-block ml-3 mr-1 w-2 h-2 rounded-full",e.file.isChanged?"bg-warning-500":"bg-transparent")}),t.jsx(Pt,{className:"hidden group-hover:inline-block text-neutral-600 dark:text-neutral-100 w-4 h-4 ml-2 mr-0 cursor-pointer",onClick:o})]})});function p(g){g.stopPropagation(),i(e.file)}function o(g){g.stopPropagation(),f()}function f(){e.file.isChanged?n({headline:"Closing Tab",description:"All unsaved changes will be lost. Do you want to close the tab anyway?",yesText:"Yes, Close Tab",noText:"No, Cancel",action:()=>r(e.file)}):r(e.file)}}function ys(){const e=D(c=>c.modules),s=D(c=>c.models),l=D(c=>c.lastSelectedModel),n=D(c=>c.setLastSelectedModel),i=le(c=>c.files),r=le(c=>c.selectedFile),a=le(c=>c.setSelectedFile),d=N(c=>c.tab),p=N(c=>c.tabs),o=N(c=>c.replaceTab),f=N(c=>c.createTab),g=N(c=>c.selectTab),E=N(c=>c.addTab),[m,v]=u.useMemo(()=>{const c=[],w=[];return p.forEach(h=>{h.file.isLocal&&c.push(h),h.file.isRemote&&w.push(h)}),[c,w]},[p]);return u.useEffect(()=>{if(H(r)||(d==null?void 0:d.file)===r||r instanceof Tt||M(e.hasFiles))return;n(s.get(r.path));const c=f(r);k(d)&&d.file instanceof Et&&M(d.file.isChanged)&&d.file.isRemote&&M(p.has(r))?o(d,c):E(c),g(c)},[r,e]),u.useEffect(()=>{if(H(l))return;const c=i.get(l.path);H(c)||a(c)},[l]),t.jsxs("div",{className:"flex items-center bg-neutral-5",children:[t.jsx($,{className:"h-6 m-0 ml-1 mr-2 border-none",variant:R.Alternative,size:T.sm,onClick:I,children:t.jsx(xs,{className:"inline-block w-3 h-4"})}),t.jsxs("ul",{className:"w-full whitespace-nowrap min-h-[2rem] max-h-[2rem] overflow-hidden overflow-x-auto hover:scrollbar scrollbar--horizontal",children:[m.map((c,w)=>t.jsx(Xe,{tab:c,title:`Custom SQL ${w+1}`},c.id)),v.map(c=>t.jsx(Xe,{tab:c,title:c.file.name},c.id))]})]});function I(c){c.stopPropagation(),j()}function j(){const c=f();E(c),g(c),a(c.file)}}function Be({list:e,children:s=[],className:l,disabled:n=!1}){return t.jsxs(W.List,{className:b("w-full whitespace-nowrap px-2 flex justify-center items-center",n&&"cursor-not-allowed"),children:[t.jsx("div",{className:b("flex w-full overflow-hidden overflow-x-auto py-1 hover:scrollbar scrollbar--horizontal",l,n&&"opacity-50 pointer-events-none"),children:t.jsx("div",{className:"flex p-1 items-center bg-secondary-10 dark:bg-primary-10 cursor-pointer rounded-full overflow-hidden",children:e.map(i=>t.jsx(W,{className:({selected:r})=>b("text-xs px-2 py-0.5 mr-2 last:mr-0 rounded-full relative align-middle",r?"bg-secondary-500 text-secondary-100 cursor-default font-bold":"cursor-pointer font-medium text-secondary-400 dark:text-secondary-400"),children:i},i))})}),s]})}const Je=1440*60*1e3,Ts=1e3,Ee=50;function Es({tab:e,isOpen:s=!0,toggle:l}){const n=D(a=>a.models),i=D(a=>a.isModel),r=u.useMemo(()=>n.get(e.file.path),[e,n]);return t.jsx("div",{className:b("flex flex-col w-full h-full items-center overflow-hidden"),children:i(e.file.path)?k(r)&&t.jsx(Ps,{tab:e,model:r,isOpen:s,toggle:l}):t.jsx(Ss,{tab:e,isOpen:s,toggle:l})})}function Ps({tab:e,model:s,isOpen:l=!0,toggle:n}){const i=D(d=>d.environment),r=D(d=>d.environments),a=Array.from(r).filter(({isRemote:d})=>d).map(({name:d})=>({text:d,value:d}));return t.jsxs(W.Group,{children:[t.jsxs("div",{className:"flex w-full items-center",children:[t.jsx($,{className:b("h-6 w-6 !px-0 border-none bg-neutral-10 dark:bg-neutral-20",l?"text-secondary-500 dark:text-secondary-300":"text-neutral-500 dark:text-neutral-300"),variant:R.Info,size:T.sm,onClick:d=>{d.stopPropagation(),n==null||n()},children:t.jsx(ct,{className:"w-4 h-4"})}),l&&t.jsx(Be,{className:"flex justify-center items-center",list:["Evaluate","Columns",a.length>1&&i.isRemote&&"Diff"].filter(Boolean)})]}),l&&t.jsxs(W.Panels,{className:"h-full w-full overflow-hidden",children:[t.jsx(W.Panel,{unmount:!1,className:b("flex flex-col w-full h-full relative overflow-hidden","ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2"),children:t.jsx(Ds,{model:s})}),t.jsx(W.Panel,{unmount:!1,className:"text-xs w-full h-full ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2 px-2",children:t.jsx($t,{nodeId:s.fqn,columns:s.columns,disabled:M(s.isModelSQL),withHandles:!1,withSource:!1,withDescription:!0,limit:10})}),a.length>1&&i.isRemote&&t.jsx(W.Panel,{unmount:!1,className:b("flex flex-col w-full h-full relative overflow-hidden","ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2"),children:t.jsx(Is,{tab:e,model:s,list:a.filter(({value:d})=>i.name!==d),target:{text:i.name,value:i.name}})})]})]})}function Ss({tab:e,isOpen:s=!0,toggle:l}){return t.jsxs(W.Group,{children:[t.jsxs("div",{className:"flex w-full items-center",children:[t.jsx($,{className:b("h-6 w-6 !px-0 border-none bg-neutral-10 dark:bg-neutral-20",s?"text-secondary-500 dark:text-secondary-300":"text-neutral-500 dark:text-neutral-300"),variant:R.Info,size:T.sm,onClick:n=>{n.stopPropagation(),l==null||l()},children:t.jsx(ct,{className:"w-4 h-4"})}),s&&t.jsx(Be,{className:"flex justify-center items-center",list:["Run Query","Diff"]})]}),s&&t.jsxs(W.Panels,{className:"h-full w-full overflow-hidden",children:[t.jsx(W.Panel,{unmount:!1,className:b("flex flex-col w-full h-full relative overflow-hidden","ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2"),children:t.jsx(ks,{tab:e})}),t.jsx(W.Panel,{unmount:!1,className:b("flex flex-col w-full h-full relative overflow-hidden","ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2"),children:t.jsx(Fs,{})})]})]})}function Cs({children:e}){return t.jsx("fieldset",{className:"flex my-3",children:e})}function Se({children:e}){return t.jsx("div",{className:"flex w-full h-full py-1 overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical",children:e})}function Ce({children:e}){return t.jsx("div",{className:"flex w-full py-1 px-1 justify-end",children:e})}function ks({tab:e}){const s=N(p=>p.setPreviewQuery),l=N(p=>p.setPreviewTable),n=N(p=>p.engine),{refetch:i,isFetching:r,cancel:a}=pt({sql:e.file.content});u.useEffect(()=>()=>{a()},[]);function d(){l(void 0),s(e.file.content),i().then(({data:p})=>{l($e(p))})}return t.jsxs(t.Fragment,{children:[t.jsx(Se,{}),t.jsx(ce,{}),t.jsxs(Ce,{children:[t.jsx($,{size:T.sm,variant:R.Alternative,onClick:p=>{p.stopPropagation(),n.postMessage({topic:"format",payload:{sql:e.file.content,dialect:e.dialect}})},children:"Format"}),r?t.jsxs("div",{className:"flex items-center",children:[t.jsx(Pe,{className:"w-3"}),t.jsx("small",{className:"text-xs text-neutral-400 block mx-2",children:"Running Query..."}),t.jsx($,{size:T.sm,variant:R.Danger,onClick:p=>{p.stopPropagation(),a()},children:"Cancel"})]}):t.jsx($,{size:T.sm,variant:R.Alternative,disabled:r,onClick:p=>{p.stopPropagation(),d()},children:"Run Query"})]})]})}function Ds({model:e}){const s=D(m=>m.environment),l=D(m=>m.isModel),n=N(m=>m.setPreviewQuery),i=N(m=>m.setPreviewTable),[r,a]=u.useState({model:e.displayName,start:Ie(Ue(Date.now()-Je)),end:Ie(new Date),execution_time:Ie(Ue(Date.now()-Je)),limit:1e3}),{refetch:d}=xt({model:r.model,start:r.start,end:r.end,execution_time:r.execution_time,dialect:e.dialect,pretty:!0}),{refetch:p,isFetching:o,cancel:f}=ht(r),g=l(e.path)&&Object.values(r).every(Boolean);u.useEffect(()=>()=>{f()},[]);function E(){n(void 0),i(void 0),d().then(({data:m})=>{n(m==null?void 0:m.sql)}),p().then(({data:m})=>{i($e(m))})}return t.jsxs(t.Fragment,{children:[t.jsx(Se,{children:t.jsxs("form",{className:"w-full",children:[M(g)&&t.jsx(Cs,{children:t.jsx(Ye,{variant:R.Warning,children:t.jsxs(Ye.Description,{className:"w-full mr-2 text-sm",children:["Please fill out all fields to ",t.jsx("b",{children:"evaluate the model"}),"."]})})}),t.jsxs("fieldset",{className:"px-2 w-full text-neutral-500",children:[t.jsx(y,{className:"w-full mx-0",label:"Start Date",size:T.sm,children:({className:m})=>t.jsx(y.Textfield,{className:b(m,"w-full"),placeholder:"02/11/2023",value:r.start,onInput:v=>{v.stopPropagation(),a({...r,start:v.target.value??""})}})}),t.jsx(y,{className:"w-full mx-0",label:"End Date",size:T.sm,children:({className:m})=>t.jsx(y.Textfield,{className:b(m,"w-full"),placeholder:"02/13/2023",value:r.end,onInput:v=>{v.stopPropagation(),a({...r,end:v.target.value??""})}})}),t.jsx(y,{className:"w-full mx-0",label:"Execution Time",size:T.sm,children:({className:m})=>t.jsx(y.Textfield,{className:b(m,"w-full"),placeholder:"02/13/2023",value:r.execution_time,onInput:v=>{v.stopPropagation(),a({...r,execution_time:v.target.value??""})}})}),k(r.limit)&&t.jsx(y,{className:"w-full mx-0",label:"Limit",size:T.sm,children:({className:m})=>t.jsx(y.Textfield,{className:b(m,"w-full"),type:"number",placeholder:"1000",value:r.limit,onInput:v=>{v.stopPropagation(),a({...r,limit:v.target.valueAsNumber??Ts})}})})]})]})}),t.jsx(ce,{}),t.jsx(Ce,{children:t.jsx("div",{className:"flex w-full justify-end",children:l(e.path)&&o?t.jsxs("div",{className:"flex items-center",children:[t.jsx(Pe,{className:"w-3"}),t.jsx("small",{className:"text-xs text-neutral-400 block mx-2",children:"Evaluating..."}),t.jsx($,{size:T.sm,variant:R.Danger,onClick:m=>{m.stopPropagation(),f()},children:"Cancel"})]}):t.jsx($,{size:T.sm,variant:R.Alternative,disabled:M(g)||o||s.isInitialProd,onClick:m=>{m.stopPropagation(),E()},children:"Evaluate"})})})]})}function Is({tab:e,model:s,list:l,target:n}){const i=D(h=>h.isModel),r=N(h=>h.setPreviewDiff),[a,d]=u.useState(l[0].value),[p,o]=u.useState(Ee),[f,g]=u.useState(""),[E,m]=u.useState(""),{refetch:v,isFetching:I,cancel:j}=Ke({source:a,target:n.value,model_or_snapshot:s.name,limit:p,on:f,where:E}),c=u.useCallback(()=>{r(void 0),v().then(({data:h})=>{r(h)})},[s.name,s.hash]);u.useEffect(()=>()=>{j()},[]),u.useEffect(()=>{d(l[0].value)},[l]);const w=i(e.file.path)&&[a,n,p].every(Boolean);return t.jsxs(t.Fragment,{children:[t.jsx(Se,{children:t.jsx("form",{className:"w-full",children:t.jsxs("fieldset",{className:"px-2 w-full text-neutral-500",children:[t.jsx(y,{className:"w-full mx-0",label:"Source",disabled:l.length<2,size:T.sm,children:({disabled:h,className:C})=>t.jsx(y.Selector,{className:b(C,"w-full"),list:l,value:a,disabled:h,onChange:d})}),t.jsx(y,{className:"w-full mx-0",label:"Target",disabled:!0,children:({disabled:h,className:C})=>t.jsx(y.Textfield,{className:b(C,"w-full"),disabled:h,value:n.value})}),t.jsx(y,{className:"w-full mx-0",label:"Limit",size:T.sm,children:({className:h})=>t.jsx(y.Textfield,{className:b(h,"w-full"),type:"number",placeholder:"1000",value:p,onInput:C=>{C.stopPropagation(),o(C.target.valueAsNumber??Ee)}})}),t.jsx(y,{className:"w-full mx-0",label:"ON",size:T.sm,children:({className:h})=>t.jsx(y.Textfield,{className:b(h,"w-full"),placeholder:"s.id = t.id",value:f,onInput:C=>{C.stopPropagation(),g(C.target.value)}})}),t.jsx(y,{className:"w-full mx-0",label:"WHERE",size:T.sm,children:({className:h})=>t.jsx(y.Textfield,{className:b(h,"w-full"),placeholder:"id > 10",value:E,onInput:C=>{C.stopPropagation(),m(C.target.value)}})})]})})}),t.jsx(ce,{}),t.jsx(Ce,{children:t.jsx("div",{className:"flex w-full justify-end items-center px-2",children:I?t.jsxs("div",{className:"flex items-center",children:[t.jsx(Pe,{className:"w-3"}),t.jsx("small",{className:"text-xs text-neutral-400 block mx-2",children:"Getting Diff..."}),t.jsx($,{size:T.sm,variant:R.Danger,onClick:h=>{h.stopPropagation(),j()},children:"Cancel"})]}):t.jsx($,{className:"ml-2",size:T.sm,variant:R.Alternative,disabled:M(w)||I,onClick:h=>{h.stopPropagation(),c()},children:"Get Diff"})})})]})}function Fs(){const e=N(j=>j.setPreviewDiff),[s,l]=u.useState(""),[n,i]=u.useState(""),[r,a]=u.useState(Ee),[d,p]=u.useState(""),[o,f]=u.useState(""),{refetch:g,isFetching:E,cancel:m}=Ke({source:s,target:n,limit:r,on:d,where:o});u.useEffect(()=>()=>{m()},[]);function v(){e(void 0),g().then(({data:j})=>{e(j)})}const I=[s,n,r,d].every(Boolean);return t.jsxs(t.Fragment,{children:[t.jsx(Se,{children:t.jsx("form",{className:"w-full",children:t.jsxs("fieldset",{className:"px-2 w-full text-neutral-500",children:[t.jsx(y,{className:"w-full mx-0",label:"Source",size:T.sm,children:({className:j})=>t.jsx(y.Textfield,{className:b(j,"w-full"),placeholder:"exp.tst_model__dev",value:s,onInput:c=>{c.stopPropagation(),l(c.target.value)}})}),t.jsx(y,{className:"w-full mx-0",label:"Target",size:T.sm,children:({className:j})=>t.jsx(y.Textfield,{className:b(j,"w-full"),placeholder:"exp.tst_snapshot__1353336088",value:n,onInput:c=>{c.stopPropagation(),i(c.target.value)}})}),t.jsx(y,{className:"w-full mx-0",label:"Limit",size:T.sm,children:({className:j})=>t.jsx(y.Textfield,{className:b(j,"w-full"),type:"number",placeholder:"1000",value:r,onInput:c=>{c.stopPropagation(),a(c.target.valueAsNumber??Ee)}})}),t.jsx(y,{className:"w-full mx-0",label:"ON",size:T.sm,children:({className:j})=>t.jsx(y.Textfield,{className:b(j,"w-full"),placeholder:"s.id = t.id",value:d,onInput:c=>{c.stopPropagation(),p(c.target.value)}})}),t.jsx(y,{className:"w-full mx-0",label:"WHERE",size:T.sm,children:({className:j})=>t.jsx(y.Textfield,{className:b(j,"w-full"),placeholder:"id > 10",value:o,onInput:c=>{c.stopPropagation(),f(c.target.value)}})})]})})}),t.jsx(ce,{}),t.jsx(Ce,{children:E?t.jsxs("div",{className:"flex items-center",children:[t.jsx(Pe,{className:"w-3"}),t.jsx("small",{className:"text-xs text-neutral-400 block mx-2",children:"Getting Diff..."}),t.jsx($,{size:T.sm,variant:R.Danger,onClick:j=>{j.stopPropagation(),m()},children:"Cancel"})]}):t.jsx($,{className:"ml-2",size:T.sm,variant:R.Alternative,disabled:M(I)||E,onClick:j=>{j.stopPropagation(),v()},children:"Get Diff"})})]})}const ge="s__",be="t__",We="NULL";function Ms({source_schema:e,target_schema:s},l,n){const i=Array.from(new Set(n.flat())),r=Object.keys(e),a=Object.keys(s),p=Array.from(new Set(r.concat(a))).filter(g=>r.includes(g)&&a.includes(g)),o=r.filter(g=>!a.includes(g)),f=a.filter(g=>!r.includes(g));return{all:Array.from(new Set([i,l.modifiedColumns&&p,l.addedColumns&&f,l.removedColumns&&o].filter(Boolean).flat())),added:f.length,deleted:o.length,modified:p.length-i.length}}function Rs(e,s,l){const n=Object.values(e.row_diff.sample)[0]??{},i=[],r=[],a=[];return Object.keys(n).forEach(d=>{ee(e,d,l)?r.push(d):K(e,d,l)?i.push(d):a.push(d)}),{all:[s.modifiedRows&&a,s.addedRows&&r,s.removedRows&&i].filter(Boolean).flat(),added:r.length,deleted:i.length,modified:a.length}}function Ae(e,s,l){const n=V(e,ge,s,l),i=V(e,be,s,l);return n!==i}function K(e,s,l){return l.every(([n,i])=>{const r=V(e,ge,n,s),a=V(e,be,i,s);return k(r)&&H(a)})}function ee(e,s,l){return l.every(([n,i])=>{const r=V(e,ge,n,s),a=V(e,be,i,s);return H(r)&&k(a)})}function Me(e,s,l,n){return l in e.schema_diff.added||l in e.schema_diff.removed?!1:s.some(i=>M(ee(e,i,n))&&M(K(e,i,n))&&Ae(e,l,i))}function V(e,s,l,n){var i;return(i=e.row_diff.sample[`${s}${l}`])==null?void 0:i[n]}function Ls(e,s,l){return V(e,ge,s,l)??We}function _s(e,s,l){return V(e,be,s,l)??We}function As({diff:e}){const[s,l]=u.useState({modifiedRows:!0,addedRows:!0,removedRows:!0,modifiedColumns:!0,addedColumns:!0,removedColumns:!0}),n=Ms(e.schema_diff,s,e.on),i=Rs(e,s,e.on),r=s.addedRows&&!s.removedRows&&!s.modifiedRows,a=!s.addedRows&&s.removedRows&&!s.modifiedRows,d=Array.from(new Set(e.on.flat())),p=Object.values(e.row_diff.sample).some(o=>Object.keys(o).length>0);return t.jsxs("div",{className:"px-2 h-full flex flex-col rounded-lg",children:[p&&t.jsxs(t.Fragment,{children:[t.jsx(Os,{diff:e,rows:i,columns:n}),t.jsx("div",{className:"mt-2 mb-1 flex rounded-lg items-center",children:t.jsx("div",{className:"w-full flex justify-end items-center",children:t.jsx(St,{options:Object.keys(s).reduce((o,f)=>(o[f]=g=>l(E=>({...E,[f]:g})),o),{}),value:Object.keys(s).map(o=>M(s[o])?void 0:o).filter(Boolean)})})})]}),t.jsx("div",{className:"overflow-auto h-full hover:scrollbar scrollbar--horizontal scrollbar--vertical",children:t.jsxs("table",{cellPadding:0,cellSpacing:0,className:"w-full text-xs text-neutral-600 dark:text-neutral-200 font-normal border-separate",children:[t.jsx("thead",{className:"sticky bg-theme top-0 z-10",children:t.jsx("tr",{children:n.all.map(o=>t.jsx("th",{colSpan:Me(e,i.all,o,e.on)?2:1,className:b("text-left whitespace-nowrap py-1 px-2 font-bold",o in e.schema_diff.added?"border-t-2 border-l-2 border-r-2 border-success-500":o in e.schema_diff.removed?"border-t-2 border-l-2 border-r-2 border-danger-500":d.includes(o)?"border-brand-500 border-l-2 border-t-2 border-r-2":"border-r border-b border-neutral-100 dark:border-neutral-700 last:border-r-0",d.includes(o)?"bg-brand-10":"bg-neutral-5"),children:t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{className:"mr-2",children:[t.jsx("span",{children:o})," ",t.jsxs("small",{className:"text-neutral-500 font-medium",children:["(",e.schema_diff.source_schema[o]??e.schema_diff.target_schema[o],")"]})]}),M(d.includes(o))&&t.jsx("div",{className:"ml-2",children:t.jsxs("small",{className:"inline-block bg-neutral-10 px-2 py-0.5 rounded-full",children:[Math.round(i.all.filter(f=>Ae(e,o,f)).length/i.all.length*100),"%"]})})]})},o))})}),t.jsx("tbody",{children:Le(i.all)?i.all.map(o=>t.jsx("tr",{children:n.all.map(f=>Me(e,i.all,f,e.on)?t.jsxs(t.Fragment,{children:[t.jsx("td",{className:b("p-1 border-r border-b border-neutral-100 dark:border-neutral-700 last:border-r-0",ee(e,o,e.on)&&"bg-success-10 text-success-500",K(e,o,e.on)&&"bg-danger-5 text-danger-500"),children:t.jsx("div",{className:b("px-2 py-1 whitespace-nowrap font-bold rounded-md ",ee(e,o,e.on)&&"bg-success-10 text-success-500",K(e,o,e.on)&&"bg-danger-5 text-danger-500"),children:Ls(e,f,o)})},`${o}-${f}-source`),t.jsx("td",{className:b("p-1 border-r border-b border-neutral-100 dark:border-neutral-700 last:border-r-0",ee(e,o,e.on)&&"bg-success-10 text-success-500",K(e,o,e.on)&&"bg-danger-5 text-danger-500"),children:t.jsx("div",{className:b("px-2 py-1 whitespace-nowrap font-bold rounded-md",Ae(e,f,o)&&"bg-primary-10 text-primary-500",ee(e,o,e.on)&&"!bg-success-10 !text-success-500",K(e,o,e.on)&&"!bg-danger-5 !text-danger-500"),children:_s(e,f,o)})},`${o}-${f}-target`)]}):t.jsx("td",{className:b("p-1",f in e.schema_diff.added?"bg-success-10 border-l-2 border-r-2 border-success-500 text-success-500 font-bold":f in e.schema_diff.removed?"bg-danger-5 border-l-2 border-r-2 border-danger-500 !text-danger-500 font-bold":d.includes(f)?"border-brand-500 border-l-2 border-r-2":"border-r border-b border-neutral-100 dark:border-neutral-700 last:border-r-0",K(e,o,e.on)&&"!bg-danger-5 text-danger-500 font-bold",ee(e,o,e.on)&&"bg-success-10 text-success-500 font-bold"),children:t.jsx("div",{className:b("px-2 py-1 whitespace-nowrap rounded-md",(f in e.schema_diff.added||ee(e,o,e.on))&&"bg-success-10 text-success-500 font-bold",(f in e.schema_diff.removed||K(e,o,e.on))&&"!bg-danger-5 !text-danger-500 font-bold"),children:V(e,ge,f,o)??V(e,be,f,o)??We})},`${o}-${f}`))},o)):t.jsx(Lt,{columns:n.all.length>0?n.all.length:void 0})}),Le(i.all)&&t.jsx("tfoot",{className:"sticky bg-theme bottom-0",children:t.jsx("tr",{children:n.all.map(o=>Me(e,i.all,o,e.on)?t.jsxs(t.Fragment,{children:[t.jsx("th",{className:b("text-left whitespace-nowrap px-2 py-1 border-r border-t border-neutral-100 dark:border-neutral-700 last:border-r-0",d.includes(o)?"bg-brand-10":"bg-neutral-10"),children:"Source"},`${o}-source`),t.jsx("th",{className:b("text-left whitespace-nowrap px-2 py-1 border-r border-t border-neutral-100 dark:border-neutral-700 last:border-r-0",d.includes(o)?"bg-brand-10":"bg-primary-10"),children:"Target"},`${o}-target`)]}):t.jsxs("th",{className:b("text-left whitespace-nowrap px-2 py-1 font-bold",o in e.schema_diff.added?"border-b-2 border-l-2 border-r-2 border-success-500":o in e.schema_diff.removed?"border-b-2 border-l-2 border-r-2 border-danger-500":d.includes(o)?"border-brand-500 border-l-2 border-b-2 border-r-2":"border-r border-t border-neutral-100 dark:border-neutral-700 last:border-r-0",d.includes(o)?"bg-brand-10":"bg-neutral-10"),children:[(o in e.schema_diff.removed||a)&&t.jsx("span",{children:"Source"}),(o in e.schema_diff.added||r)&&t.jsx("span",{children:"Target"})]},o))})})]})}),t.jsxs("div",{className:"flex justify-between items-center px-2 mt-2",children:[t.jsx(_t,{count:i.all.length}),t.jsx($s,{})]})]})}function $s(){const e=[["Grain","bg-brand-500"],["Changed","bg-primary-500"],["Added","bg-success-500"],["Deleted","bg-danger-500"]];return t.jsx("div",{className:"flex text-xs",children:e.map(([s="",l])=>t.jsx(zs,{text:s,className:l},s))})}function zs({text:e,className:s}){return t.jsxs("div",{className:"flex ml-2 items-center",children:[t.jsx("span",{className:b("inline-block w-3 h-3 mr-2 rounded-full",s)}),t.jsx("small",{className:"text-neutral-600 dark:text-neutral-400",children:e})]})}function Os({diff:e,rows:s,columns:l}){return t.jsx(Fe,{defaultOpen:!1,children:({open:n})=>t.jsxs(t.Fragment,{children:[t.jsxs(Fe.Button,{className:"flex items-center w-full justify-between rounded-lg text-left text-sm px-4 pt-3 pb-2 bg-neutral-10 hover:bg-theme-darker dark:hover:bg-theme-lighter text-neutral-600 dark:text-neutral-400",children:[t.jsx("h2",{className:"whitespace-nowrap text-xl font-bold mb-1",children:"Stats"}),n?t.jsx(Bt,{className:"h-6 w-6 text-primary-500"}):t.jsx(Wt,{className:"h-6 w-6 text-primary-500"})]}),t.jsx(Fe.Panel,{className:"px-4 pb-2 text-sm text-neutral-500",children:t.jsxs("div",{className:"p-2 grid grid-cols-3 gap-4 mb-3",children:[t.jsx(Re,{text:"Row Count Change",children:t.jsxs("p",{className:"text-6xl font-light text-primary-500 mt-3",children:[Math.round(Math.abs(e.row_diff.count_pct_change)),t.jsx("small",{className:"text-sm",children:"%"})]})}),t.jsxs(Re,{text:"Column Count Change",count:s.all.length,children:[t.jsx("p",{className:"text-center text-6xl font-light text-primary-500 mt-3",children:s.modified}),t.jsx("p",{className:"text-center text-6xl font-light text-success-500 mt-3",children:s.added}),t.jsx("p",{className:"text-center text-6xl font-light text-danger-500 mt-3",children:s.deleted})]}),t.jsxs(Re,{text:"Column Changes",count:l.all.length,children:[t.jsx("p",{className:"text-center text-6xl font-light text-primary-500 mt-3",children:l.modified}),t.jsx("p",{className:"text-center text-6xl font-light text-success-500 mt-3",children:l.added}),t.jsx("p",{className:"text-center text-6xl font-light text-danger-500 mt-3",children:l.deleted})]})]})})]})})}function Re({text:e,children:s,className:l,count:n}){return t.jsxs("div",{className:b("rounded-xl overflow-hidden px-3 py-6 bg-primary-10",l),children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsx("h3",{className:"text-neutral-500 dark:text-neutral-300 text-sm font-bold",children:e}),k(n)&&t.jsx("div",{children:t.jsx("small",{className:"inline-block px-2 py-0.5 bg-neutral-10 rounded-full",children:n})})]}),t.jsx("div",{className:"grid grid-cols-3 gap-2",children:s})]})}const Qs=u.lazy(async()=>await Nt(()=>import("./ModelLineage-DkIFAYo4.js"),[])),X={Query:"Query",Table:"Data Preview",Lineage:"Lineage",Diff:"Diff",Errors:"Errors"};function Bs({tab:e,className:s}){const{errors:l,removeError:n}=et(),i=gt(),r=D(h=>h.models),a=D(h=>h.isModel),d=N(h=>h.direction),p=N(h=>h.previewQuery),o=N(h=>h.previewTable),f=N(h=>h.previewDiff),g=N(h=>h.setDirection),[E,m]=u.useState(-1),v=nt(e.file.path,h=>{i(`${bt.DataCatalogModels}/${h.name}`)}),I=r.get(e.file.path),j=M(e.file.isEmpty)&&k(I)&&a(e.file.path),c=l.size>0,w=u.useMemo(()=>[k(o)&&X.Table,k(p)&&e.file.isRemote&&X.Query,j&&X.Lineage,k(f)&&X.Diff,c&&X.Errors].filter(Boolean),[e.id,o,p,f,j,l,c]);return u.useEffect(()=>{k(o)?m(w.indexOf(X.Table)):m(0)},[o]),u.useEffect(()=>{k(f)?m(w.indexOf(X.Diff)):m(0)},[f]),u.useEffect(()=>{k(j)?m(w.indexOf(X.Lineage)):m(0)},[j]),u.useEffect(()=>{m(c?w.indexOf(X.Errors):0)},[c]),u.useEffect(()=>{for(const h of l)vt([B.Fetchdf,B.EvaluateModel,B.RenderQuery,B.ColumnLineage,B.ModelLineage,B.TableDiff,B.Table,B.SaveFile],h.key)&&n(h)},[o,f,p,j]),t.jsx("div",{className:b("w-full h-full flex flex-col text-prose overflow-auto hover:scrollbar scrollbar--vertical",s),children:jt(w)?t.jsx("div",{className:"flex justify-center items-center w-full h-full",children:t.jsx("h3",{className:"text-md",children:"No Data To Preview"})}):t.jsxs(ot,{as:u.Fragment,onChange:m,selectedIndex:E,children:[t.jsx(Be,{list:w,children:t.jsx("div",{className:"ml-2",children:t.jsx($,{className:"!m-0 !py-0.5 px-[0.25rem] border-none",variant:R.Alternative,size:T.sm,onClick:()=>{g(d==="horizontal"?"vertical":"horizontal")},children:t.jsx(ps,{"aria-label":d==="horizontal"?"Use vertical layout":"Use horizontal layout",className:"text-primary-500 w-5"})})})},w.join("-")),t.jsxs(it,{className:"h-full w-full overflow-hidden",children:[k(o)&&t.jsx(ae,{unmount:!1,className:b("w-full h-full pt-4 relative px-2","ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2"),children:t.jsx(At,{data:o})}),k(p)&&e.file.isRemote&&t.jsx(ae,{unmount:!1,className:"w-full h-full ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2 p-2",children:t.jsx("div",{className:"w-full h-full p-2 bg-primary-10 rounded-lg overflow-auto hover:scrollbar scrollbar--horizontal scrollbar--vertical",children:t.jsx(_e,{type:te.SQL,content:p??"",extensions:v,className:"text-xs"})})}),j&&t.jsx(ae,{as:"div",unmount:!1,className:b("w-full h-full ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2"),children:t.jsx(u.Suspense,{fallback:t.jsx(wt,{children:"Loading Model page..."}),children:t.jsx(Qs,{model:I})})}),k(f==null?void 0:f.row_diff)&&t.jsx(ae,{as:"div",unmount:!1,className:b("w-full h-full ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2 py-2"),children:t.jsx(As,{diff:f},e.id)}),c&&t.jsx(ae,{unmount:!1,className:"w-full h-full ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2 py-2",children:t.jsx("ul",{className:"w-full h-full p-2 overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:Array.from(l).reverse().map(h=>t.jsx("li",{className:"bg-danger-10 mb-4 last:m-0 p-2 rounded-md",children:t.jsx(Ht,{scope:h.key,error:h})},h.id))})})]})]},e.id)})}const ye=32,Ws=2;function He(){const e=N(s=>s.tab);return t.jsxs("div",{className:"w-full h-full flex flex-col overflow-hidden",children:[t.jsx(ys,{}),t.jsx(ce,{}),H(e)?t.jsx(Ge,{}):t.jsx(dt,{tab:e})]})}function Ge(){return t.jsx("div",{className:"flex justify-center items-center w-full h-full",children:t.jsx("div",{className:"p-4 text-center text-theme-darker dark:text-theme-lighter",children:t.jsx("h2",{className:"text-3xl",children:"Select File or Add New SQL Tab"})})})}function dt({tab:e}){const{errors:s,addError:l,removeError:n}=et(),i=D(x=>x.environment),r=D(x=>x.models),a=D(x=>x.isModel),d=le(x=>x.files),p=le(x=>x.selectedFile),o=le(x=>x.setSelectedFile),f=N(x=>x.direction),g=N(x=>x.engine),E=N(x=>x.previewTable),m=N(x=>x.previewDiff),v=N(x=>x.refreshTab),I=N(x=>x.updateStoredTabsIds),j=N(x=>x.setPreviewQuery),c=N(x=>x.setPreviewTable),w=N(x=>x.setPreviewDiff),h=N(x=>x.setDialects),{setManuallySelectedColumn:C}=zt(),L=u.useCallback(function(x){o(d.get(x.path))},[d]),_=u.useCallback(function(x,F){C([x,F])},[]),z=Ot(),ne=nt(e.file.path,L,_),[J,P]=u.useState(!1),G=u.useMemo(()=>[...z,{key:"Mod-Enter",win:"Ctrl-Enter",preventDefault:!0,stopPropagation:!0,run(x){const F=x.state.doc.toString();c(void 0),j(F);for(const O of s)O.key===B.Fetchdf&&n(O);return yt({sql:F}).then(O=>{c($e(O))}).catch(O=>{l(B.Fetchdf,{...O,errorKey:B.Fetchdf,trigger:"Editor -> customSQLKeymaps",message:O.message,timestamp:Date.now(),origin:"useQueryTimeout"})}),!0}}],[z,s]);u.useEffect(()=>{P(!1),H(p)&&o(e==null?void 0:e.file)},[e.id]),u.useEffect(()=>(g.addEventListener("message",ve),()=>{g.removeEventListener("message",ve)}),[e.id,e.dialect]),u.useEffect(()=>{j(void 0),c(void 0),w(void 0),I()},[e.id,e.file.fingerprint]),u.useEffect(()=>{w(void 0)},[i]);function Y(){const x=r.get(e.file.path),F=M(e.file.isEmpty)&&k(x)&&a(e.file.path);return s.size>0||[E,m].some(Boolean)||F?[70,30]:[100,0]}function ke(){const x=r.get(e==null?void 0:e.file.path);return J&&(k(x)&&a(e.file.path)||e.file.isLocal)&&M(me(e.file.content))?[70,30]:[100,0]}function de(x){e.file.content=x,v(e)}function ve(x){if(x.data.topic==="dialects"){const F=r.get(e.file.path);e.dialect=(F==null?void 0:F.dialect)??e.dialect??"",h(x.data.payload),v(e)}if(x.data.topic==="format"){if(me(x.data.payload))return;e.file.content=x.data.payload,v(e)}}return t.jsxs(Ve,{className:b("w-full h-full overflow-hidden",f==="vertical"?"flex flex-col":"flex"),sizes:Y(),direction:f,minSize:[ye,0],snapOffset:0,children:[t.jsxs("div",{className:b("flex flex-col",f==="vertical"?"w-full ":"h-full"),children:[t.jsxs(Ve,{className:"flex h-full overflow-hidden",sizes:ke(),minSize:ye,snapOffset:ye,handleDrag:(x,F)=>{const De=F.parent.getBoundingClientRect().width*(x[1]??0)/100;P(De>=ye+Ws)},children:[t.jsxs("div",{className:"flex flex-col h-full",children:[e.file.isLocal&&t.jsx(_e,{type:te.SQL,dialect:e.dialect,keymaps:G,content:e.file.content,extensions:ne,onChange:de}),e.file.isRemote&&t.jsx(Qt,{keymaps:z,path:e.file.path,children:({file:x,keymaps:F})=>t.jsx(_e,{type:x.extension,dialect:e.dialect,extensions:ne,keymaps:F,content:x.content,onChange:de})})]}),t.jsx("div",{className:"flex flex-col h-full",children:t.jsx(Es,{tab:e,toggle:()=>P(x=>!x),isOpen:J})})]},e.id),t.jsx(ce,{}),t.jsx(ws,{tab:e},e.file.fingerprint)]}),t.jsx(Bs,{tab:e,className:b(f==="vertical"?"flex flex-col":"flex")})]},f)}He.Empty=Ge;He.Loading=Ge;He.Main=dt;export{He as default}; diff --git a/web/client/dist/assets/Editor-D0jNItwC.js b/web/client/dist/assets/Editor-D0jNItwC.js new file mode 100644 index 0000000000..b6da2c921b --- /dev/null +++ b/web/client/dist/assets/Editor-D0jNItwC.js @@ -0,0 +1 @@ +import{d as f,a as i,r,v as j,F as E,j as e,L as c,S as d,_ as l}from"./index-Dj0i1-CA.js";import{u as p}from"./project-BvSOI8MY.js";import{P as v}from"./Page-C-XfU5BR.js";import"./file-CvJN3aZO.js";import"./SplitPane-CViaZmw6.js";const b=r.lazy(()=>l(()=>import("./FileExplorer-BR9IE3he.js"),[])),P=r.lazy(()=>l(()=>import("./context-DFNeGsFF.js"),[])),L=r.lazy(()=>l(()=>import("./Editor-BDyfpUuw.js"),[])),N=r.lazy(()=>l(()=>import("./context-BctCsyGb.js").then(t=>t.v),[]));function w(){const{addError:t}=f(),m=i(s=>s.modules),n=i(s=>s.models),u=i(s=>s.setLastSelectedModel),x=p(s=>s.files),h=r.useCallback(function(o){const a=n.get(o);j(a)||u(a)},[x,n]),_=r.useCallback(function(o){t(E.ColumnLineage,o)},[]);return e.jsx(v,{sidebar:m.hasFiles?e.jsx(r.Suspense,{fallback:e.jsx("div",{className:"flex justify-center items-center w-full h-full",children:e.jsxs(c,{className:"inline-block",children:[e.jsx(d,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md",children:"Getting Files..."})]})}),children:e.jsx(P,{children:e.jsx(b,{})})}):void 0,content:e.jsx(r.Suspense,{fallback:e.jsx("div",{className:"flex justify-center items-center w-full h-full",children:e.jsxs(c,{className:"inline-block",children:[e.jsx(d,{className:"w-3 h-3 border border-neutral-10 mr-4"}),e.jsx("h3",{className:"text-md",children:"Getting Editor Ready..."})]})}),children:e.jsx(N,{showColumns:!0,handleClickModel:h,handleError:_,children:e.jsx(L,{})})})})}export{w as default}; diff --git a/web/client/dist/assets/Errors-BfuFLcPi.js b/web/client/dist/assets/Errors-BfuFLcPi.js new file mode 100644 index 0000000000..d2ea6ddc55 --- /dev/null +++ b/web/client/dist/assets/Errors-BfuFLcPi.js @@ -0,0 +1 @@ +import{x as j,s as v,d as y,r as l,D as N,e as i,v as g,j as r,O as h,m,H as D,B as k,l as S,i as A}from"./index-Dj0i1-CA.js";import{P as z}from"./Page-C-XfU5BR.js";import{S as C}from"./SourceList-DSLO6nVJ.js";import{S as I}from"./SourceListItem-BHt8d9-I.js";import"./SplitPane-CViaZmw6.js";import"./Input-B-oZ6fGO.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./index-C-dJH7yZ.js";function w(){const{pathname:c}=j(),a=v(),{errors:o,removeError:u,clearErrors:f}=y(),t=l.useMemo(()=>Array.from(o).reverse(),[o]);l.useEffect(()=>{var e;if(N(t))setTimeout(()=>a(i.Home));else{const s=(e=t[0])==null?void 0:e.id;g(s)?a(i.Errors,{replace:!0}):a(i.Errors+"/"+s,{replace:!0})}},[t]);function d(e){const s=t.find(n=>n.id===e);A(s)&&u(s)}return r.jsx(z,{sidebar:r.jsxs("div",{className:"flex flex-col h-full w-full",children:[r.jsx(C,{keyId:"id",keyName:"key",keyDescription:"message",to:i.Errors,items:t,isActive:e=>`${i.Errors}/${e}`===c,types:t.reduce((e,s)=>Object.assign(e,{[s.id]:s.status}),{}),listItem:({id:e,to:s,name:n,description:p,text:x,disabled:E=!1})=>r.jsx(I,{to:s,name:n,text:x,description:p,variant:m.Danger,disabled:E,handleDelete:()=>d(e)})}),r.jsx(D,{}),o.size>0&&r.jsx("div",{className:"flex justify-end",children:r.jsx(k,{size:S.sm,variant:m.Neutral,onClick:()=>f(),children:"Clear All"})})]}),content:r.jsx(h,{})})}export{w as default}; diff --git a/web/client/dist/assets/FileExplorer-BR9IE3he.js b/web/client/dist/assets/FileExplorer-BR9IE3he.js new file mode 100644 index 0000000000..3b22e7e6c9 --- /dev/null +++ b/web/client/dist/assets/FileExplorer-BR9IE3he.js @@ -0,0 +1,2 @@ +import{r as c,j as a,a1 as Kn,c as P,V as _t,b as H,v as Vn,g as qn,a as Yn,z as Wn,L as Xn,S as zn,l as Zn,R as Qn}from"./index-Dj0i1-CA.js";import{u as N,M as Ke}from"./project-BvSOI8MY.js";import{u as te,a as mt,c as Qe,b as At,d as Jn,P as Z,e as T,f as jt,g as er,h as be,i as Ft,A as tr,j as nr,k as rr,R as or,l as sr,F as ir,D as ar,C as cr,m as ur,n as lr,o as dr,p as fr,q as gr}from"./Input-B-oZ6fGO.js";import{M as hr}from"./file-CvJN3aZO.js";import{useFileExplorer as Ie}from"./context-DFNeGsFF.js";import{u as Lt,S as pr}from"./SearchList-W_iT2G82.js";import{u as Fe}from"./editor-CcO28cqd.js";import{F as mr}from"./ChevronDownIcon-MK_nrjD_.js";import{F as vr}from"./ChevronRightIcon-CLWtT22Q.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./help-B59vE3aE.js";import"./popover-_Sf0yvOI.js";function xr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625Z"}),c.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const Dr=c.forwardRef(xr);function Cr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M19.906 9c.382 0 .749.057 1.094.162V9a3 3 0 0 0-3-3h-3.879a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H6a3 3 0 0 0-3 3v3.162A3.756 3.756 0 0 1 4.094 9h15.812ZM4.094 10.5a2.25 2.25 0 0 0-2.227 2.568l.857 6A2.25 2.25 0 0 0 4.951 21H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-2.227-2.568H4.094Z"}))}const Sr=c.forwardRef(Cr);function yr({title:t,titleId:e,...n},r){return c.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":e},n),t?c.createElement("title",{id:e},t):null,c.createElement("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"}))}const wr=c.forwardRef(yr);function Tr(t,e){return c.useReducer((n,r)=>e[n][r]??n,t)}var he=t=>{const{present:e,children:n}=t,r=br(e),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=te(r.ref,Ir(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};he.displayName="Presence";function br(t){const[e,n]=c.useState(),r=c.useRef(null),o=c.useRef(t),s=c.useRef("none"),i=t?"mounted":"unmounted",[u,d]=Tr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const h=xe(r.current);s.current=u==="mounted"?h:"none"},[u]),mt(()=>{const h=r.current,f=o.current;if(f!==t){const l=s.current,p=xe(h);t?d("MOUNT"):p==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(f&&l!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,d]),mt(()=>{if(e){let h;const f=e.ownerDocument.defaultView??window,g=p=>{const S=xe(r.current).includes(p.animationName);if(p.target===e&&S&&(d("ANIMATION_END"),!o.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",h=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},l=p=>{p.target===e&&(s.current=xe(r.current))};return e.addEventListener("animationstart",l),e.addEventListener("animationcancel",g),e.addEventListener("animationend",g),()=>{f.clearTimeout(h),e.removeEventListener("animationstart",l),e.removeEventListener("animationcancel",g),e.removeEventListener("animationend",g)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:c.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function xe(t){return(t==null?void 0:t.animationName)||"none"}function Ir(t){var r,o;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Le="rovingFocusGroup.onEntryFocus",Or={bubbles:!1,cancelable:!0},pe="RovingFocusGroup",[Ve,kt,Er]=At(pe),[Mr,Ut]=Qe(pe,[Er]),[Rr,Pr]=Mr(pe),Ht=c.forwardRef((t,e)=>a.jsx(Ve.Provider,{scope:t.__scopeRovingFocusGroup,children:a.jsx(Ve.Slot,{scope:t.__scopeRovingFocusGroup,children:a.jsx(Nr,{...t,ref:e})})}));Ht.displayName=pe;var Nr=c.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:f=!1,...g}=t,l=c.useRef(null),p=te(e,l),D=jt(s),[S,x]=er({prop:i,defaultProp:u??null,onChange:d,caller:pe}),[w,I]=c.useState(!1),b=be(h),M=kt(n),K=c.useRef(!1),[V,A]=c.useState(0);return c.useEffect(()=>{const R=l.current;if(R)return R.addEventListener(Le,b),()=>R.removeEventListener(Le,b)},[b]),a.jsx(Rr,{scope:n,orientation:r,dir:D,loop:o,currentTabStopId:S,onItemFocus:c.useCallback(R=>x(R),[x]),onItemShiftTab:c.useCallback(()=>I(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>A(R=>R-1),[]),children:a.jsx(Z.div,{tabIndex:w||V===0?-1:0,"data-orientation":r,...g,ref:p,style:{outline:"none",...t.style},onMouseDown:T(t.onMouseDown,()=>{K.current=!0}),onFocus:T(t.onFocus,R=>{const j=!K.current;if(R.target===R.currentTarget&&j&&!w){const L=new CustomEvent(Le,Or);if(R.currentTarget.dispatchEvent(L),!L.defaultPrevented){const C=M().filter(q=>q.focusable),E=C.find(q=>q.active),X=C.find(q=>q.id===S),se=[E,X,...C].filter(Boolean).map(q=>q.ref.current);Bt(se,f)}}K.current=!1}),onBlur:T(t.onBlur,()=>I(!1))})})}),Gt="RovingFocusGroupItem",$t=c.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...u}=t,d=Jn(),h=s||d,f=Pr(Gt,n),g=f.currentTabStopId===h,l=kt(n),{onFocusableItemAdd:p,onFocusableItemRemove:D,currentTabStopId:S}=f;return c.useEffect(()=>{if(r)return p(),()=>D()},[r,p,D]),a.jsx(Ve.ItemSlot,{scope:n,id:h,focusable:r,active:o,children:a.jsx(Z.span,{tabIndex:g?0:-1,"data-orientation":f.orientation,...u,ref:e,onMouseDown:T(t.onMouseDown,x=>{r?f.onItemFocus(h):x.preventDefault()}),onFocus:T(t.onFocus,()=>f.onItemFocus(h)),onKeyDown:T(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=jr(x,f.orientation,f.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let b=l().filter(M=>M.focusable).map(M=>M.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const M=b.indexOf(x.currentTarget);b=f.loop?Fr(b,M+1):b.slice(M+1)}setTimeout(()=>Bt(b))}}),children:typeof i=="function"?i({isCurrentTabStop:g,hasTabStop:S!=null}):i})})});$t.displayName=Gt;var _r={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ar(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function jr(t,e,n){const r=Ar(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _r[r]}function Bt(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function Fr(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var Lr=Ht,kr=$t,qe=["Enter"," "],Ur=["ArrowDown","PageUp","Home"],Kt=["ArrowUp","PageDown","End"],Hr=[...Ur,...Kt],Gr={ltr:[...qe,"ArrowRight"],rtl:[...qe,"ArrowLeft"]},$r={ltr:["ArrowLeft"],rtl:["ArrowRight"]},me="Menu",[de,Br,Kr]=At(me),[ne,Vt]=Qe(me,[Kr,Ft,Ut]),Oe=Ft(),qt=Ut(),[Vr,re]=ne(me),[qr,ve]=ne(me),Yt=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=t,u=Oe(e),[d,h]=c.useState(null),f=c.useRef(!1),g=be(s),l=jt(o);return c.useEffect(()=>{const p=()=>{f.current=!0,document.addEventListener("pointerdown",D,{capture:!0,once:!0}),document.addEventListener("pointermove",D,{capture:!0,once:!0})},D=()=>f.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",D,{capture:!0}),document.removeEventListener("pointermove",D,{capture:!0})}},[]),a.jsx(fr,{...u,children:a.jsx(Vr,{scope:e,open:n,onOpenChange:g,content:d,onContentChange:h,children:a.jsx(qr,{scope:e,onClose:c.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:f,dir:l,modal:i,children:r})})})};Yt.displayName=me;var Yr="MenuAnchor",Je=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Oe(n);return a.jsx(tr,{...o,...r,ref:e})});Je.displayName=Yr;var et="MenuPortal",[Wr,Wt]=ne(et,{forceMount:void 0}),Xt=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:o}=t,s=re(et,e);return a.jsx(Wr,{scope:e,forceMount:n,children:a.jsx(he,{present:n||s.open,children:a.jsx(gr,{asChild:!0,container:o,children:r})})})};Xt.displayName=et;var B="MenuContent",[Xr,tt]=ne(B),zt=c.forwardRef((t,e)=>{const n=Wt(B,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=re(B,t.__scopeMenu),i=ve(B,t.__scopeMenu);return a.jsx(de.Provider,{scope:t.__scopeMenu,children:a.jsx(he,{present:r||s.open,children:a.jsx(de.Slot,{scope:t.__scopeMenu,children:i.modal?a.jsx(zr,{...o,ref:e}):a.jsx(Zr,{...o,ref:e})})})})}),zr=c.forwardRef((t,e)=>{const n=re(B,t.__scopeMenu),r=c.useRef(null),o=te(e,r);return c.useEffect(()=>{const s=r.current;if(s)return nr(s)},[]),a.jsx(nt,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:T(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Zr=c.forwardRef((t,e)=>{const n=re(B,t.__scopeMenu);return a.jsx(nt,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qr=sr("MenuContent.ScrollLock"),nt=c.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:l,onDismiss:p,disableOutsideScroll:D,...S}=t,x=re(B,n),w=ve(B,n),I=Oe(n),b=qt(n),M=Br(n),[K,V]=c.useState(null),A=c.useRef(null),R=te(e,A,x.onContentChange),j=c.useRef(0),L=c.useRef(""),C=c.useRef(0),E=c.useRef(null),X=c.useRef("right"),Q=c.useRef(0),se=D?or:c.Fragment,q=D?{as:Qr,allowPinchZoom:!0}:void 0,Y=m=>{var ie,ht;const O=L.current+m,_=M().filter(z=>!z.disabled),U=document.activeElement,Ae=(ie=_.find(z=>z.ref.current===U))==null?void 0:ie.textValue,je=_.map(z=>z.textValue),gt=lo(je,O,Ae),ce=(ht=_.find(z=>z.textValue===gt))==null?void 0:ht.ref.current;(function z(pt){L.current=pt,window.clearTimeout(j.current),pt!==""&&(j.current=window.setTimeout(()=>z(""),1e3))})(O),ce&&setTimeout(()=>ce.focus())};c.useEffect(()=>()=>window.clearTimeout(j.current),[]),rr();const v=c.useCallback(m=>{var _,U;return X.current===((_=E.current)==null?void 0:_.side)&&go(m,(U=E.current)==null?void 0:U.area)},[]);return a.jsx(Xr,{scope:n,searchRef:L,onItemEnter:c.useCallback(m=>{v(m)&&m.preventDefault()},[v]),onItemLeave:c.useCallback(m=>{var O;v(m)||((O=A.current)==null||O.focus(),V(null))},[v]),onTriggerLeave:c.useCallback(m=>{v(m)&&m.preventDefault()},[v]),pointerGraceTimerRef:C,onPointerGraceIntentChange:c.useCallback(m=>{E.current=m},[]),children:a.jsx(se,{...q,children:a.jsx(ir,{asChild:!0,trapped:o,onMountAutoFocus:T(s,m=>{var O;m.preventDefault(),(O=A.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(ar,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:l,onDismiss:p,children:a.jsx(Lr,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:K,onCurrentTabStopIdChange:V,onEntryFocus:T(d,m=>{w.isUsingKeyboardRef.current||m.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(cr,{role:"menu","aria-orientation":"vertical","data-state":gn(x.open),"data-radix-menu-content":"",dir:w.dir,...I,...S,ref:R,style:{outline:"none",...S.style},onKeyDown:T(S.onKeyDown,m=>{const _=m.target.closest("[data-radix-menu-content]")===m.currentTarget,U=m.ctrlKey||m.altKey||m.metaKey,Ae=m.key.length===1;_&&(m.key==="Tab"&&m.preventDefault(),!U&&Ae&&Y(m.key));const je=A.current;if(m.target!==je||!Hr.includes(m.key))return;m.preventDefault();const ce=M().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Kt.includes(m.key)&&ce.reverse(),co(ce)}),onBlur:T(t.onBlur,m=>{m.currentTarget.contains(m.target)||(window.clearTimeout(j.current),L.current="")}),onPointerMove:T(t.onPointerMove,fe(m=>{const O=m.target,_=Q.current!==m.clientX;if(m.currentTarget.contains(O)&&_){const U=m.clientX>Q.current?"right":"left";X.current=U,Q.current=m.clientX}}))})})})})})})});zt.displayName=B;var Jr="MenuGroup",rt=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{role:"group",...r,ref:e})});rt.displayName=Jr;var eo="MenuLabel",Zt=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{...r,ref:e})});Zt.displayName=eo;var we="MenuItem",vt="menu.itemSelect",Ee=c.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...o}=t,s=c.useRef(null),i=ve(we,t.__scopeMenu),u=tt(we,t.__scopeMenu),d=te(e,s),h=c.useRef(!1),f=()=>{const g=s.current;if(!n&&g){const l=new CustomEvent(vt,{bubbles:!0,cancelable:!0});g.addEventListener(vt,p=>r==null?void 0:r(p),{once:!0}),dr(g,l),l.defaultPrevented?h.current=!1:i.onClose()}};return a.jsx(Qt,{...o,ref:d,disabled:n,onClick:T(t.onClick,f),onPointerDown:g=>{var l;(l=t.onPointerDown)==null||l.call(t,g),h.current=!0},onPointerUp:T(t.onPointerUp,g=>{var l;h.current||(l=g.currentTarget)==null||l.click()}),onKeyDown:T(t.onKeyDown,g=>{const l=u.searchRef.current!=="";n||l&&g.key===" "||qe.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});Ee.displayName=we;var Qt=c.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=t,i=tt(we,n),u=qt(n),d=c.useRef(null),h=te(e,d),[f,g]=c.useState(!1),[l,p]=c.useState("");return c.useEffect(()=>{const D=d.current;D&&p((D.textContent??"").trim())},[s.children]),a.jsx(de.ItemSlot,{scope:n,disabled:r,textValue:o??l,children:a.jsx(kr,{asChild:!0,...u,focusable:!r,children:a.jsx(Z.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:h,onPointerMove:T(t.onPointerMove,fe(D=>{r?i.onItemLeave(D):(i.onItemEnter(D),D.defaultPrevented||D.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:T(t.onPointerLeave,fe(D=>i.onItemLeave(D))),onFocus:T(t.onFocus,()=>g(!0)),onBlur:T(t.onBlur,()=>g(!1))})})})}),to="MenuCheckboxItem",Jt=c.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...o}=t;return a.jsx(on,{scope:t.__scopeMenu,checked:n,children:a.jsx(Ee,{role:"menuitemcheckbox","aria-checked":Te(n)?"mixed":n,...o,ref:e,"data-state":st(n),onSelect:T(o.onSelect,()=>r==null?void 0:r(Te(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Jt.displayName=to;var en="MenuRadioGroup",[no,ro]=ne(en,{value:void 0,onValueChange:()=>{}}),tn=c.forwardRef((t,e)=>{const{value:n,onValueChange:r,...o}=t,s=be(r);return a.jsx(no,{scope:t.__scopeMenu,value:n,onValueChange:s,children:a.jsx(rt,{...o,ref:e})})});tn.displayName=en;var nn="MenuRadioItem",rn=c.forwardRef((t,e)=>{const{value:n,...r}=t,o=ro(nn,t.__scopeMenu),s=n===o.value;return a.jsx(on,{scope:t.__scopeMenu,checked:s,children:a.jsx(Ee,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":st(s),onSelect:T(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});rn.displayName=nn;var ot="MenuItemIndicator",[on,oo]=ne(ot,{checked:!1}),sn=c.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...o}=t,s=oo(ot,n);return a.jsx(he,{present:r||Te(s.checked)||s.checked===!0,children:a.jsx(Z.span,{...o,ref:e,"data-state":st(s.checked)})})});sn.displayName=ot;var so="MenuSeparator",an=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return a.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});an.displayName=so;var io="MenuArrow",cn=c.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,o=Oe(n);return a.jsx(ur,{...o,...r,ref:e})});cn.displayName=io;var ao="MenuSub",[Aa,un]=ne(ao),ue="MenuSubTrigger",ln=c.forwardRef((t,e)=>{const n=re(ue,t.__scopeMenu),r=ve(ue,t.__scopeMenu),o=un(ue,t.__scopeMenu),s=tt(ue,t.__scopeMenu),i=c.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=s,h={__scopeMenu:t.__scopeMenu},f=c.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const g=u.current;return()=>{window.clearTimeout(g),d(null)}},[u,d]),a.jsx(Je,{asChild:!0,...h,children:a.jsx(Qt,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":gn(n.open),...t,ref:lr(e,o.onTriggerChange),onClick:g=>{var l;(l=t.onClick)==null||l.call(t,g),!(t.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:T(t.onPointerMove,fe(g=>{s.onItemEnter(g),!g.defaultPrevented&&!t.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:T(t.onPointerLeave,fe(g=>{var p,D;f();const l=(p=n.content)==null?void 0:p.getBoundingClientRect();if(l){const S=(D=n.content)==null?void 0:D.dataset.side,x=S==="right",w=x?-5:5,I=l[x?"left":"right"],b=l[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:g.clientX+w,y:g.clientY},{x:I,y:l.top},{x:b,y:l.top},{x:b,y:l.bottom},{x:I,y:l.bottom}],side:S}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(g),g.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:T(t.onKeyDown,g=>{var p;const l=s.searchRef.current!=="";t.disabled||l&&g.key===" "||Gr[r.dir].includes(g.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),g.preventDefault())})})})});ln.displayName=ue;var dn="MenuSubContent",fn=c.forwardRef((t,e)=>{const n=Wt(B,t.__scopeMenu),{forceMount:r=n.forceMount,...o}=t,s=re(B,t.__scopeMenu),i=ve(B,t.__scopeMenu),u=un(dn,t.__scopeMenu),d=c.useRef(null),h=te(e,d);return a.jsx(de.Provider,{scope:t.__scopeMenu,children:a.jsx(he,{present:r||s.open,children:a.jsx(de.Slot,{scope:t.__scopeMenu,children:a.jsx(nt,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:h,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var g;i.isUsingKeyboardRef.current&&((g=d.current)==null||g.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:T(t.onFocusOutside,f=>{f.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:T(t.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:T(t.onKeyDown,f=>{var p;const g=f.currentTarget.contains(f.target),l=$r[i.dir].includes(f.key);g&&l&&(s.onOpenChange(!1),(p=u.trigger)==null||p.focus(),f.preventDefault())})})})})})});fn.displayName=dn;function gn(t){return t?"open":"closed"}function Te(t){return t==="indeterminate"}function st(t){return Te(t)?"indeterminate":t?"checked":"unchecked"}function co(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function uo(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function lo(t,e,n){const o=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let i=uo(t,Math.max(s,0));o.length===1&&(i=i.filter(h=>h!==n));const d=i.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function fo(t,e){const{x:n,y:r}=t;let o=!1;for(let s=0,i=e.length-1;sr!=l>r&&n<(g-h)*(r-f)/(l-f)+h&&(o=!o)}return o}function go(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return fo(n,e)}function fe(t){return e=>e.pointerType==="mouse"?t(e):void 0}var ho=Yt,po=Je,mo=Xt,vo=zt,xo=rt,Do=Zt,Co=Ee,So=Jt,yo=tn,wo=rn,To=sn,bo=an,Io=cn,Oo=ln,Eo=fn,it="ContextMenu",[Mo,ja]=Qe(it,[Vt]),F=Vt(),[Ro,hn]=Mo(it),pn=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:r,dir:o,modal:s=!0}=t,[i,u]=c.useState(!1),d=F(e),h=be(r),f=c.useCallback(g=>{u(g),h(g)},[h]);return a.jsx(Ro,{scope:e,open:i,onOpenChange:f,modal:s,children:a.jsx(ho,{...d,dir:o,open:i,onOpenChange:f,modal:s,children:n})})};pn.displayName=it;var mn="ContextMenuTrigger",vn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=t,s=hn(mn,n),i=F(n),u=c.useRef({x:0,y:0}),d=c.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...u.current})}),h=c.useRef(0),f=c.useCallback(()=>window.clearTimeout(h.current),[]),g=l=>{u.current={x:l.clientX,y:l.clientY},s.onOpenChange(!0)};return c.useEffect(()=>f,[f]),c.useEffect(()=>void(r&&f()),[r,f]),a.jsxs(a.Fragment,{children:[a.jsx(po,{...i,virtualRef:d}),a.jsx(Z.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:T(t.onContextMenu,l=>{f(),g(l),l.preventDefault()}),onPointerDown:r?t.onPointerDown:T(t.onPointerDown,De(l=>{f(),h.current=window.setTimeout(()=>g(l),700)})),onPointerMove:r?t.onPointerMove:T(t.onPointerMove,De(f)),onPointerCancel:r?t.onPointerCancel:T(t.onPointerCancel,De(f)),onPointerUp:r?t.onPointerUp:T(t.onPointerUp,De(f))})]})});vn.displayName=mn;var Po="ContextMenuPortal",xn=t=>{const{__scopeContextMenu:e,...n}=t,r=F(e);return a.jsx(mo,{...r,...n})};xn.displayName=Po;var Dn="ContextMenuContent",Cn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=hn(Dn,n),s=F(n),i=c.useRef(!1);return a.jsx(vo,{...s,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:u=>{var d;(d=t.onCloseAutoFocus)==null||d.call(t,u),!u.defaultPrevented&&i.current&&u.preventDefault(),i.current=!1},onInteractOutside:u=>{var d;(d=t.onInteractOutside)==null||d.call(t,u),!u.defaultPrevented&&!o.modal&&(i.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cn.displayName=Dn;var No="ContextMenuGroup",_o=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(xo,{...o,...r,ref:e})});_o.displayName=No;var Ao="ContextMenuLabel",jo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Do,{...o,...r,ref:e})});jo.displayName=Ao;var Fo="ContextMenuItem",Sn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Co,{...o,...r,ref:e})});Sn.displayName=Fo;var Lo="ContextMenuCheckboxItem",ko=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(So,{...o,...r,ref:e})});ko.displayName=Lo;var Uo="ContextMenuRadioGroup",Ho=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(yo,{...o,...r,ref:e})});Ho.displayName=Uo;var Go="ContextMenuRadioItem",$o=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(wo,{...o,...r,ref:e})});$o.displayName=Go;var Bo="ContextMenuItemIndicator",Ko=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(To,{...o,...r,ref:e})});Ko.displayName=Bo;var Vo="ContextMenuSeparator",yn=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(bo,{...o,...r,ref:e})});yn.displayName=Vo;var qo="ContextMenuArrow",Yo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Io,{...o,...r,ref:e})});Yo.displayName=qo;var Wo="ContextMenuSubTrigger",Xo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Oo,{...o,...r,ref:e})});Xo.displayName=Wo;var zo="ContextMenuSubContent",Zo=c.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=F(n);return a.jsx(Eo,{...o,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zo.displayName=zo;function De(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var Qo=pn,Jo=vn,es=xn,ts=Cn,W=Sn,xt=yn;const wn=c.createContext({dragDropManager:void 0});function G(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Dt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Ct=function(){return Math.random().toString(36).substring(7).split("").join(".")},St={INIT:"@@redux/INIT"+Ct(),REPLACE:"@@redux/REPLACE"+Ct()};function ns(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Tn(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(G(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(G(1));return n(Tn)(t,e)}if(typeof t!="function")throw new Error(G(2));var o=t,s=e,i=[],u=i,d=!1;function h(){u===i&&(u=i.slice())}function f(){if(d)throw new Error(G(3));return s}function g(S){if(typeof S!="function")throw new Error(G(4));if(d)throw new Error(G(5));var x=!0;return h(),u.push(S),function(){if(x){if(d)throw new Error(G(6));x=!1,h();var I=u.indexOf(S);u.splice(I,1),i=null}}}function l(S){if(!ns(S))throw new Error(G(7));if(typeof S.type>"u")throw new Error(G(8));if(d)throw new Error(G(9));try{d=!0,s=o(s,S)}finally{d=!1}for(var x=i=u,w=0;wr&&r[o]?r[o]:n||null,t)}function ss(t,e){return t.filter(n=>n!==e)}function bn(t){return typeof t=="object"}function is(t,e){const n=new Map,r=s=>{n.set(s,n.has(s)?n.get(s)+1:1)};t.forEach(r),e.forEach(r);const o=[];return n.forEach((s,i)=>{s===1&&o.push(i)}),o}function as(t,e){return t.filter(n=>e.indexOf(n)>-1)}const at="dnd-core/INIT_COORDS",Me="dnd-core/BEGIN_DRAG",ct="dnd-core/PUBLISH_DRAG_SOURCE",Re="dnd-core/HOVER",Pe="dnd-core/DROP",Ne="dnd-core/END_DRAG";function yt(t,e){return{type:at,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const cs={type:at,payload:{clientOffset:null,sourceClientOffset:null}};function us(t){return function(n=[],r={publishSource:!0}){const{publishSource:o=!0,clientOffset:s,getSourceClientOffset:i}=r,u=t.getMonitor(),d=t.getRegistry();t.dispatch(yt(s)),ls(n,u,d);const h=gs(n,u);if(h==null){t.dispatch(cs);return}let f=null;if(s){if(!i)throw new Error("getSourceClientOffset must be defined");ds(i),f=i(h)}t.dispatch(yt(s,f));const l=d.getSource(h).beginDrag(u,h);if(l==null)return;fs(l),d.pinSource(h);const p=d.getSourceType(h);return{type:Me,payload:{itemType:p,item:l,sourceId:h,clientOffset:s||null,sourceClientOffset:f||null,isSourcePublic:!!o}}}}function ls(t,e,n){y(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){y(n.getSource(r),"Expected sourceIds to be registered.")})}function ds(t){y(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function fs(t){y(bn(t),"Item must be an object.")}function gs(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function hs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ps(t){for(var e=1;e{const d=xs(i,u,o,r),h={type:Pe,payload:{dropResult:ps({},n,d)}};t.dispatch(h)})}}function vs(t){y(t.isDragging(),"Cannot call drop while not dragging."),y(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function xs(t,e,n,r){const o=n.getTarget(t);let s=o?o.drop(r,t):void 0;return Ds(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function Ds(t){y(typeof t>"u"||bn(t),"Drop result must either be an object or undefined.")}function Cs(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Ss(t){return function(){const n=t.getMonitor(),r=t.getRegistry();ys(n);const o=n.getSourceId();return o!=null&&(r.getSource(o,!0).endDrag(n,o),r.unpinSource()),{type:Ne}}}function ys(t){y(t.isDragging(),"Cannot call endDrag while not dragging.")}function Ye(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function ws(t){return function(n,{clientOffset:r}={}){Ts(n);const o=n.slice(0),s=t.getMonitor(),i=t.getRegistry(),u=s.getItemType();return Is(o,i,u),bs(o,s,i),Os(o,s,i),{type:Re,payload:{targetIds:o,clientOffset:r||null}}}}function Ts(t){y(Array.isArray(t),"Expected targetIds to be an array.")}function bs(t,e,n){y(e.isDragging(),"Cannot call hover while not dragging."),y(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r=0;r--){const o=t[r],s=e.getTargetType(o);Ye(s,n)||t.splice(r,1)}}function Os(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Es(t){return function(){if(t.getMonitor().isDragging())return{type:ct}}}function Ms(t){return{beginDrag:us(t),publishDragSource:Es(t),hover:ws(t),drop:ms(t),endDrag:Ss(t)}}class Rs{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(s){return(...i)=>{const u=s.apply(e,i);typeof u<"u"&&n(u)}}const o=Ms(this);return Object.keys(o).reduce((s,i)=>{const u=o[i];return s[i]=r(u),s},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Ps(t,e){return{x:t.x+e.x,y:t.y+e.y}}function In(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ns(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:In(Ps(e,r),n)}function _s(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:In(e,n)}const le=[],ut=[];le.__IS_NONE__=!0;ut.__IS_ALL__=!0;function As(t,e){return t===le?!1:t===ut||typeof e>"u"?!0:as(e,t).length>0}class js{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;y(typeof e=="function","listener must be a function."),y(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const s=()=>{const i=this.store.getState(),u=i.stateId;try{u===o||u===o+1&&!As(i.dirtyHandlerIds,r)||e()}finally{o=u}};return this.store.subscribe(s)}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const o=this.store.getState().dragOffset;o!==n&&(n=o,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return y(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(y(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();return Ye(r,o)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(y(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),o=this.getItemType();return r!==o?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const o=this.registry.getTargetType(e),s=this.getItemType();if(s&&!Ye(o,s))return!1;const i=this.getTargetIds();if(!i.length)return!1;const u=i.indexOf(e);return r?u===i.length-1:u>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ns(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return _s(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const wt=typeof global<"u"?global:self,On=wt.MutationObserver||wt.WebKitMutationObserver;function En(t){return function(){const n=setTimeout(o,0),r=setInterval(o,50);function o(){clearTimeout(n),clearInterval(r),t()}}}function Fs(t){let e=1;const n=new On(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Ls=typeof On=="function"?Fs:En;class ks{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.indexthis.capacity){for(let r=0,o=e.length-this.index;r{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Ls(this.flush),this.requestErrorThrow=En(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Us{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class Hs{create(e){const n=this.freeTasks,r=n.length?n.pop():new Us(this.onError,o=>n[n.length]=o);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const Mn=new ks,Gs=new Hs(Mn.registerPendingError);function $s(t){Mn.enqueueTask(Gs.create(t))}const lt="dnd-core/ADD_SOURCE",dt="dnd-core/ADD_TARGET",ft="dnd-core/REMOVE_SOURCE",_e="dnd-core/REMOVE_TARGET";function Bs(t){return{type:lt,payload:{sourceId:t}}}function Ks(t){return{type:dt,payload:{targetId:t}}}function Vs(t){return{type:ft,payload:{sourceId:t}}}function qs(t){return{type:_e,payload:{targetId:t}}}function Ys(t){y(typeof t.canDrag=="function","Expected canDrag to be a function."),y(typeof t.beginDrag=="function","Expected beginDrag to be a function."),y(typeof t.endDrag=="function","Expected endDrag to be a function.")}function Ws(t){y(typeof t.canDrop=="function","Expected canDrop to be a function."),y(typeof t.hover=="function","Expected hover to be a function."),y(typeof t.drop=="function","Expected beginDrag to be a function.")}function We(t,e){if(e&&Array.isArray(t)){t.forEach(n=>We(n,!1));return}y(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var $;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})($||($={}));let Xs=0;function zs(){return Xs++}function Zs(t){const e=zs().toString();switch(t){case $.SOURCE:return`S${e}`;case $.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Tt(t){switch(t[0]){case"S":return $.SOURCE;case"T":return $.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function bt(t,e){const n=t.entries();let r=!1;do{const{done:o,value:[,s]}=n.next();if(s===e)return!0;r=!!o}while(!r);return!1}class Qs{addSource(e,n){We(e),Ys(n);const r=this.addHandler($.SOURCE,e,n);return this.store.dispatch(Bs(r)),r}addTarget(e,n){We(e,!0),Ws(n);const r=this.addHandler($.TARGET,e,n);return this.store.dispatch(Ks(r)),r}containsHandler(e){return bt(this.dragSources,e)||bt(this.dropTargets,e)}getSource(e,n=!1){return y(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Tt(e)===$.SOURCE}isTargetId(e){return Tt(e)===$.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(Vs(e)),$s(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(qs(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);y(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const o=Zs(e);return this.types.set(o,n),e===$.SOURCE?this.dragSources.set(o,r):e===$.TARGET&&this.dropTargets.set(o,r),o}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Js=(t,e)=>t===e;function ei(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function ti(t,e,n=Js){if(t.length!==e.length)return!1;for(let r=0;r0||!ti(n,r)))return le;const i=r[r.length-1],u=n[n.length-1];return i!==u&&(i&&o.push(i),u&&o.push(u)),o}function ri(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oi(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function vi(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,s;for(s=0;s=0)&&(n[o]=t[o]);return n}let Ot=0;const ye=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var xi=c.memo(function(e){var{children:n}=e,r=mi(e,["children"]);const[o,s]=Di(r);return c.useEffect(()=>{if(s){const i=Rn();return++Ot,()=>{--Ot===0&&(i[ye]=null)}}},[]),a.jsx(wn.Provider,{value:o,children:n})});function Di(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=Ci(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function Ci(t,e=Rn(),n,r){const o=e;return o[ye]||(o[ye]={dragDropManager:hi(t,e,n,r)}),o[ye]}function Rn(){return typeof global<"u"?global:window}var ke,Et;function Si(){return Et||(Et=1,ke=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,s;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[o]))return!1;for(o=r;o--!==0;){var i=s[o];if(!t(e[i],n[i]))return!1}return!0}return e!==e&&n!==n}),ke}var yi=Si();const wi=Kn(yi),J=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Pn(t,e,n){const[r,o]=c.useState(()=>e(t)),s=c.useCallback(()=>{const i=e(t);wi(r,i)||(o(i),n&&n())},[r,t,n]);return J(s),[r,s]}function Ti(t,e,n){const[r,o]=Pn(t,e,n);return J(function(){const i=t.getHandlerId();if(i!=null)return t.subscribeToStateChange(o,{handlerIds:[i]})},[t,o]),r}function Nn(t,e,n){return Ti(e,t||(()=>({})),()=>n.reconnect())}function _n(t,e){const n=[...e||[]];return e==null&&typeof t!="function"&&n.push(t),c.useMemo(()=>typeof t=="function"?t():t,n)}function bi(t){return c.useMemo(()=>t.hooks.dragSource(),[t])}function Ii(t){return c.useMemo(()=>t.hooks.dragPreview(),[t])}let Ue=!1,He=!1;class Oi{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Ue,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ue=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Ue=!1}}isDragging(){if(!this.sourceId)return!1;y(!He,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return He=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{He=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Ge=!1;class Ei{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;y(!Ge,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ge=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ge=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Mi(t,e,n){const r=n.getRegistry(),o=r.addTarget(t,e);return[o,()=>r.removeTarget(o)]}function Ri(t,e,n){const r=n.getRegistry(),o=r.addSource(t,e);return[o,()=>r.removeSource(o)]}function Xe(t,e,n,r){let o;if(o!==void 0)return!!o;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;const u=Object.prototype.hasOwnProperty.bind(e);for(let d=0;d, or turn it into a drag source or a drop target itself.`)}function Ni(t){return(e=null,n=null)=>{if(!c.isValidElement(e)){const s=e;return t(s,n),s}const r=e;return Pi(r),_i(r,n?s=>t(s,n):t)}}function An(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const o=Ni(r);e[n]=()=>o}}),e}function Mt(t,e){typeof t=="function"?t(e):t.current=e}function _i(t,e){const n=t.ref;return y(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?c.cloneElement(t,{ref:r=>{Mt(n,r),Mt(e,r)}}):c.cloneElement(t,{ref:e})}class Ai{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Xe(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Xe(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=An({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,ze(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,ze(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class ji{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Xe(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=An({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,ze(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function oe(){const{dragDropManager:t}=c.useContext(wn);return y(t!=null,"Expected drag drop context"),t}function Fi(t,e){const n=oe(),r=c.useMemo(()=>new Ai(n.getBackend()),[n]);return J(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),J(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function Li(){const t=oe();return c.useMemo(()=>new Oi(t),[t])}class ki{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,o=this.monitor,{isDragging:s}=r;return s?s(o):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:o}=e;o&&o(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function Ui(t,e,n){const r=c.useMemo(()=>new ki(t,e,n),[e,n]);return c.useEffect(()=>{r.spec=t},[t]),r}function Hi(t){return c.useMemo(()=>{const e=t.type;return y(e!=null,"spec.type must be defined"),e},[t])}function Gi(t,e,n){const r=oe(),o=Ui(t,e,n),s=Hi(t);J(function(){if(s!=null){const[u,d]=Ri(s,o,r);return e.receiveHandlerId(u),n.receiveHandlerId(u),d}},[r,e,n,o,s])}function jn(t,e){const n=_n(t,e);y(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Li(),o=Fi(n.options,n.previewOptions);return Gi(n,r,o),[Nn(n.collect,r,o),bi(o),Ii(o)]}function $i(t){const n=oe().getMonitor(),[r,o]=Pn(n,t);return c.useEffect(()=>n.subscribeToOffsetChange(o)),c.useEffect(()=>n.subscribeToStateChange(o)),r}function Bi(t){return c.useMemo(()=>t.hooks.dropTarget(),[t])}function Ki(t){const e=oe(),n=c.useMemo(()=>new ji(e.getBackend()),[e]);return J(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function Vi(){const t=oe();return c.useMemo(()=>new Ei(t),[t])}function qi(t){const{accept:e}=t;return c.useMemo(()=>(y(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Yi{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function Wi(t,e){const n=c.useMemo(()=>new Yi(t,e),[e]);return c.useEffect(()=>{n.spec=t},[t]),n}function Xi(t,e,n){const r=oe(),o=Wi(t,e),s=qi(t);J(function(){const[u,d]=Mi(s,o,r);return e.receiveHandlerId(u),n.receiveHandlerId(u),d},[r,e,o,n,s.map(i=>i.toString()).join("|")])}function zi(t,e){const n=_n(t,e),r=Vi(),o=Ki(n.options);return Xi(n,r,o),[Nn(n.collect,r,o),Bi(o)]}function Fn(t){let e=null;return()=>(e==null&&(e=t()),e)}function Zi(t,e){return t.filter(n=>n!==e)}function Qi(t,e){const n=new Set,r=s=>n.add(s);t.forEach(r),e.forEach(r);const o=[];return n.forEach(s=>o.push(s)),o}class Ji{enter(e){const n=this.entered.length,r=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(e));return this.entered=Qi(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Zi(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class ea{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const o=this.config.exposeProperties[r];o!=null&&(n[r]={value:o(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Ln="__NATIVE_FILE__",kn="__NATIVE_URL__",Un="__NATIVE_TEXT__",Hn="__NATIVE_HTML__",Rt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Ln,HTML:Hn,TEXT:Un,URL:kn},Symbol.toStringTag,{value:"Module"}));function $e(t,e,n){const r=e.reduce((o,s)=>o||t.getData(s),"");return r??n}const Ze={[Ln]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Hn]:{exposeProperties:{html:(t,e)=>$e(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[kn]:{exposeProperties:{urls:(t,e)=>$e(t,e,"").split(` +`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[Un]:{exposeProperties:{text:(t,e)=>$e(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function ta(t,e){const n=Ze[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new ea(n);return r.loadDataTransfer(e),r}function Be(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(Ze).filter(n=>{const r=Ze[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(o=>e.indexOf(o)>-1):!1})[0]||null}const na=Fn(()=>/firefox/i.test(navigator.userAgent)),Gn=Fn(()=>!!window.safari);class Pt{interpolate(e){const{xs:n,ys:r,c1s:o,c2s:s,c3s:i}=this;let u=n.length-1;if(e===n[u])return r[u];let d=0,h=i.length-1,f;for(;d<=h;){f=Math.floor(.5*(d+h));const p=n[f];if(pe)h=f-1;else return r[f]}u=Math.max(0,h);const g=e-n[u],l=g*g;return r[u]+o[u]*g+s[u]*l+i[u]*g*l}constructor(e,n){const{length:r}=e,o=[];for(let p=0;pe[p]{let V=new Pt([0,.5,1],[d.y,d.y/f*D,d.y+D-f]).interpolate(l);return Gn()&&s&&(V+=(window.devicePixelRatio-1)*D),V},x=()=>new Pt([0,.5,1],[d.x,d.x/h*p,d.x+p-h]).interpolate(g),{offsetX:w,offsetY:I}=o,b=w===0||w,M=I===0||I;return{x:b?w:x(),y:M?I:S()}}class aa{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function ca(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nt(t){for(var e=1;e{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const o=i=>this.handleDragStart(i,e),s=i=>this.handleSelectStart(i);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",o),n.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",o),n.removeEventListener("selectstart",s),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=i=>this.handleDragEnter(i,e),o=i=>this.handleDragOver(i,e),s=i=>this.handleDrop(i,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",o),n.addEventListener("drop",s),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",o),n.removeEventListener("drop",s)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return Nt({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return Nt({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Rt).some(n=>Rt[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=ta(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const s=this.sourceNodes.get(o);return s&&$n(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const i=Ce(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:i});const{dataTransfer:u}=o,d=Be(u);if(this.monitor.isDragging()){if(u&&typeof u.setDragImage=="function"){const f=this.monitor.getSourceId(),g=this.sourceNodes.get(f),l=this.sourcePreviewNodes.get(f)||g;if(l){const{anchorX:p,anchorY:D,offsetX:S,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),b=ia(g,l,i,{anchorX:p,anchorY:D},{offsetX:S,offsetY:x});u.setDragImage(l,b.x,b.y)}}try{u==null||u.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:h}=this.getCurrentSourcePreviewNodeOptions();h?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(d)this.beginDragNativeItem(d);else{if(u&&!u.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:u}=o,d=Be(u);d&&this.beginDragNativeItem(d,u)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:s}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,s.length>0&&this.actions.hover(s,{clientOffset:Ce(o)}),s.some(u=>this.monitor.canDropOnTarget(u))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=Ce(o),this.scheduleHover(s),(s||[]).some(u=>this.monitor.canDropOnTarget(u))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var s;o.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(o.dataTransfer)}else Be(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:Ce(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const s=o.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(o.preventDefault(),s.dragDrop()))},this.options=new aa(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Ji(this.isNodeInDocument)}}let Se;function Bn(){return Se||(Se=new Image,Se.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Se}const la=function(e,n,r){return new ua(e,n,r)};function ee({file:t,className:e,style:n}){const r=N(C=>C.selectedFile),o=N(C=>C.setSelectedFile),s=N(C=>C.activeRange),i=N(C=>C.setActiveRange),u=N(C=>C.inActiveRange),d=Fe(C=>C.addTab),h=Fe(C=>C.selectTab),f=Fe(C=>C.createTab),[g,l]=c.useState(!1),p=Lt(()=>l(!0),{threshold:50,onFinish(){l(!1)},onCancel(){l(!1)}}),{setArtifactRename:D,renameArtifact:S,artifactRename:x,selectArtifactsInRange:w,removeArtifactWithConfirmation:I}=Ie(),[b,M]=c.useState(!1),[{isDragging:K},V,A]=jn(()=>({type:"artifact",item:t,end(){l(!1)},canDrag(){return x!==t&&g},collect(C){return{isDragging:C.isDragging()}}}),[t,x,g]);c.useEffect(()=>{A(Bn(),{captureDraggingState:!0})},[A]);function R(C){C.stopPropagation(),C.shiftKey&&C.preventDefault();let E=s;C.metaKey?(u(t)?E=E.filter(X=>X!==t):E.push(t),i(E)):C.shiftKey&&E.length>0?w(t):(E.length>0&&(E=[]),E.push(t),i(E),o(t))}function j(){const C=f(t);d(C),h(C)}const L=s.length>1&&u(t);return a.jsx("div",{...p,ref:V,children:a.jsxs(k.Container,{artifact:t,isSelected:r===t,className:P(x===t&&"bg-primary-10",b&&"bg-primary-10",g&&"bg-primary-10 !cursor-grabbing outline-2 !outline-primary-500",K&&"opacity-50",e),style:n,onDoubleClick:C=>{C.stopPropagation(),j()},handleSelect:R,children:[a.jsx(ee.Icons,{}),x===t?a.jsx(k.Rename,{artifact:x,rename:S,close:()=>D(void 0)}):a.jsxs(k.ContextMenu,{trigger:a.jsx(k.ContextMenuTrigger,{children:a.jsx(ee.Display,{file:t})}),onOpenChange:M,children:[r!==t&&a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",L?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:L,onClick:C=>{C.stopPropagation()},onSelect:C=>{C.stopPropagation(),j()},children:["Open in New Tab",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",L?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:L,onClick:C=>{C.stopPropagation()},onSelect:C=>{C.stopPropagation(),D(t)},children:["Rename",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-danger-500 hover:bg-danger-500 hover:text-light",onSelect:C=>{C.stopPropagation(),I(t)},children:["Remove ",u(t)?s.length:"",a.jsx("div",{className:"ml-auto pl-5"})]})]})]})})}function da({file:t}){return a.jsx("span",{title:t.name,className:P("inline-block overflow-hidden overflow-ellipsis py-[0.125rem]"),children:_t(t.name,50,20)})}function fa(){return a.jsx("div",{className:"flex items-center",children:a.jsx(Dr,{className:"inline-block w-3 ml-1 mr-2"})})}ee.Display=da;ee.Icons=fa;const ge=function t({directory:e,className:n,style:r}){const o=N(v=>v.selectedFile),s=N(v=>v.activeRange),i=N(v=>v.setActiveRange),u=N(v=>v.inActiveRange),[d,h]=c.useState(e.isOpened),[f,g]=c.useState(!1),[l,p]=c.useState(!1),D=Lt(()=>p(!0),{threshold:50,onFinish(){p(!1)},onCancel(){p(!1)}}),{setArtifactRename:S,renameArtifact:x,artifactRename:w,createDirectory:I,createFile:b,moveArtifacts:M,removeArtifactWithConfirmation:K,selectArtifactsInRange:V}=Ie(),[{isOver:A},R]=zi(()=>({accept:"artifact",drop(v,m){if(H(m.canDrop()))return;const O=u(v)?s:[v];M(O,e),e.open()},canDrop(v,m){const O=u(v)?s:[v];return m.isOver({shallow:!0})&&qn(O)&&O.reduce((_,U)=>!(H(_)||U.parent===e||U===e||U instanceof Ke&&U.hasDirectory(e)),!0)},collect(v){return{isOver:v.isOver({shallow:!0})&&v.canDrop()}}}),[s]),[{isDragging:j},L,C]=jn(()=>({type:"artifact",item:e,end(){p(!1)},canDrag(){return w!==e&&l},collect(v){return{isDragging:v.isDragging()}}}),[e,w,l]),[E,X,Q,se]=c.useMemo(()=>{if(s.length<2)return[!1,!1,!1,!1];let v=!0,m=!0,O=!0;for(const _ of Array.from(s))_ instanceof Ke&&v?(m&&(m=_.isOpened),O&&(O=_.isClosed)):v=!1;return[v,m,O,H(m)&&H(O)]},[s]);c.useEffect(()=>{e.syncStateOpen=h},[e]),c.useEffect(()=>{C(Bn(),{captureDraggingState:!0})},[C]),c.useEffect(()=>{Vn(o)||d||e.hasFile(o)&&e.open()},[o]);function q(v){v.stopPropagation(),v.shiftKey||v.metaKey?v.preventDefault():e.toggle();let m=s;v.metaKey?(u(e)?m=m.filter(O=>O!==e):m.push(e),i(m)):v.shiftKey&&m.length>0?V(e):(m.length>0&&(m=[]),m.push(e),i(m))}const Y=s.length>1&&u(e);return a.jsx("div",{className:P("h-full",j&&"opacity-50"),children:a.jsxs("div",{ref:R,className:P(A&&H(j)&&"bg-primary-5"),children:[e.withParent&&a.jsx("div",{...D,ref:e.withParent?L:void 0,children:a.jsxs(k.Container,{artifact:e,className:P(w===e&&"bg-primary-10",l&&"bg-primary-10 !cursor-grabbing",f&&"bg-primary-10",n),style:r,handleSelect:q,children:[a.jsx(t.Icons,{isOpen:d||A&&H(j)}),w===e?a.jsx(k.Rename,{artifact:w,rename:x,close:()=>S(void 0)}):a.jsxs(k.ContextMenu,{trigger:a.jsx(k.ContextMenuTrigger,{children:a.jsx(t.Display,{directory:e})}),onOpenChange:g,children:[a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",Y&&H(E)?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:Y&&H(E),onSelect:v=>{v.stopPropagation(),s.length>1&&u(e)?s.forEach(m=>{X?m.collapse():Q?m.expand():se&&(m.isOpened?m.collapse():m.expand())}):e.isOpened?e.collapse():e.expand(),i([])},children:[E&&X&&"Collapse All",E&&Q&&"Expand All",E&&se&&"Toggle All",H(E)&&e.isOpened&&"Collapse",H(E)&&e.isClosed&&"Expand",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsx(xt,{className:"h-[1px] bg-accent-200 m-2"}),a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",Y?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:Y,onSelect:v=>{v.stopPropagation(),b(e)},children:["New File",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",Y?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:Y,onSelect:v=>{v.stopPropagation(),I(e)},children:["New Folder",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsx(xt,{className:"h-[1px] bg-accent-200 m-2"}),a.jsxs(W,{className:P("py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 ",Y?"opacity-50 cursor-not-allowed":"hover:bg-accent-500 hover:text-light"),disabled:Y,onClick:v=>{v.stopPropagation()},onSelect:v=>{v.stopPropagation(),S(e)},children:["Rename",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-danger-500 hover:bg-danger-500 hover:text-light",onSelect:v=>{v.stopPropagation(),K(e)},children:["Remove ",u(e)?s.length:"",a.jsx("div",{className:"ml-auto pl-5"})]})]})]})}),(A&&H(j)||d||!e.withParent)&&e.withDirectories&&a.jsx("ul",{className:P(u(e)&&"bg-primary-5"),children:e.directories.map(v=>a.jsx("li",{title:v.name,children:a.jsx(t,{directory:v,style:{paddingLeft:e.withParent?`${e.level/2+.25}rem`:0}},v.id)},v.id))}),(A&&H(j)||d||!e.withParent)&&e.withFiles&&a.jsx("ul",{className:P(u(e)&&"bg-primary-5"),children:e.files.map(v=>a.jsx("li",{title:v.name,children:a.jsx(ee,{file:v,style:{paddingLeft:e.withParent?`${e.level/2+.25}rem`:0}},v.id)},v.id))})]})})};function ga({directory:t}){return a.jsxs("div",{className:"w-full flex justify-between items-center py-[0.125rem]",children:[a.jsx("span",{title:t.name,className:"overflow-hidden overflow-ellipsis whitespace-nowrap",children:_t(t.name,50,20)}),a.jsx("span",{className:"inline-block text-xs rounded-full px-2 bg-neutral-10 ml-2",children:t.directories.length+t.files.length})]})}function ha({hasChevron:t=!0,hasFolder:e=!0,isOpen:n=!1,className:r}){const o=n?mr:vr,s=n?Sr:wr;return a.jsxs("div",{className:P("flex items-center mr-2",r),children:[t&&a.jsx(o,{className:"inline-block w-5"}),e&&a.jsx(s,{className:"inline-block w-4 fill-primary-500"})]})}ge.Icons=ha;ge.Display=ga;const pa={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"};function ma(){const t=N(i=>i.activeRange),e=N(i=>i.inActiveRange),{isDragging:n,currentOffset:r,artifact:o}=$i(i=>({artifact:i.getItem(),isDragging:i.isDragging(),currentOffset:i.getSourceClientOffset()})),s=c.useMemo(()=>Array.from(e(o)?t:new Set([o])).filter(Boolean),[t,o]);return a.jsx(a.Fragment,{children:n&&a.jsx("div",{style:pa,children:a.jsx("div",{style:va(r),className:"!cursor-grabbing !rounded-lg overflow-hidden",children:s.map(i=>a.jsxs("span",{children:[i instanceof Ke&&a.jsxs(k.Container,{artifact:i,className:"bg-theme",children:[a.jsx(ge.Icons,{hasChevron:!1}),a.jsx(ge.Display,{directory:i})]},i.path),i instanceof hr&&a.jsxs(k.Container,{artifact:i,className:"bg-theme",children:[a.jsx(ee.Icons,{}),a.jsx(ee.Display,{file:i})]},i.path)]},i.id))})})})}function va(t){if(t==null)return{display:"none"};const{x:e,y:n}=t;return{display:"inline-block",transform:`translate(${e}px, ${n}px)`,filter:"drop-shadow(0 2px 12px rgba(0,0,0,0.45))"}}const k=function t({className:e}){const n=N(l=>l.project),r=N(l=>l.setSelectedFile),o=N(l=>l.activeRange),s=N(l=>l.setActiveRange),i=Yn(l=>l.addConfirmation),{isFetching:u}=Wn(),{removeArtifacts:d,createDirectory:h,createFile:f}=Ie();function g(l){l.key==="Escape"&&s([]),l.ctrlKey&&l.key==="Backspace"&&o.length>0&&i({headline:"Removing Selected Files/Directories",description:`Are you sure you want to remove ${o.length} items?`,yesText:"Yes, Remove",noText:"No, Cancel",details:Array.from(o).map(p=>p.path),action:()=>{d(o)}})}return a.jsx("div",{tabIndex:0,className:P("flex flex-col w-full h-full overflow-hidden text-sm text-neutral-500 dark:text-neutral-400 font-regular select-none",e),onKeyDown:g,children:u?a.jsx("div",{className:"flex justify-center items-center w-full h-full",children:a.jsxs(Xn,{className:"inline-block",children:[a.jsx(zn,{className:"w-3 h-3 border border-neutral-10 mr-2"}),a.jsx("h3",{className:"text-md",children:"Getting Project Files..."})]})}):a.jsxs(a.Fragment,{children:[a.jsx(pr,{list:n.allFiles,searchBy:"path",displayBy:"name",size:Zn.sm,onSelect:r,direction:"top",isFullWidth:!0}),a.jsxs(t.ContextMenu,{trigger:a.jsx(t.ContextMenuTrigger,{className:"h-full pb-1",children:a.jsx(xi,{backend:la,children:a.jsxs("div",{className:"w-full relative h-full px-1 overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical",children:[a.jsx(ma,{}),a.jsx(ge,{className:"z-20 relative",directory:n},n.id)]})})}),children:[a.jsxs(W,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 hover:bg-accent-500 hover:text-light",onSelect:l=>{l.stopPropagation(),f(n)},children:["New File",a.jsx("div",{className:"ml-auto pl-5"})]}),a.jsxs(W,{className:"py-1.5 group leading-none rounded-md flex items-center relative pl-6 pr-2 select-none outline-none font-medium text-xs text-neutral-500 hover:bg-accent-500 hover:text-light",onSelect:l=>{l.stopPropagation(),h(n)},children:["New Folder",a.jsx("div",{className:"ml-auto pl-5"})]})]},n.id)]})})};function xa({trigger:t,children:e,onOpenChange:n}){return a.jsxs(Qo,{onOpenChange:n,children:[t,a.jsx(es,{children:a.jsx(ts,{className:"bg-light rounded-md overflow-hidden shadow-lg py-2 px-1 z-50",onClick:r=>{r.stopPropagation()},children:e})})]})}function Da({children:t,className:e}){return a.jsx(Jo,{className:P("flex w-full overflow-hidden",e),onContextMenu:n=>{n.stopPropagation()},children:t})}function Ca({artifact:t,rename:e,close:n}){const r=Qn.useRef(null),[o,s]=c.useState("");return c.useEffect(()=>{s(t.name),setTimeout(()=>{var i;(i=r.current)==null||i.focus()},100)},[t]),a.jsx("div",{className:"w-full flex items-center py-[0.125rem] pr-2",children:a.jsx("input",{ref:r,type:"text",className:"w-full overflow-hidden overflow-ellipsis bg-primary-900 text-primary-100",value:o,onInput:i=>{i.stopPropagation(),s(i.target.value)},onBlur:i=>{i.stopPropagation(),n()},onKeyDown:i=>{i.key==="Enter"&&(i.stopPropagation(),o.trim()!==""&&o!==t.name&&e(t,o),n()),i.key==="Escape"&&(i.stopPropagation(),n())}})})}function Sa({artifact:t,children:e,isSelected:n=!1,className:r,style:o,handleSelect:s,onDoubleClick:i}){const{setArtifactRename:u,isBottomGroupInActiveRange:d,isTopGroupInActiveRange:h,isMiddleGroupInActiveRange:f}=Ie(),g=N(p=>p.activeRange),l=N(p=>p.inActiveRange);return a.jsx("span",{tabIndex:0,className:P("w-full flex items-center group/file px-2",r,h(t)?"rounded-t-md":d(t)?"rounded-b-md":f(t)?"":l(t)&&"rounded-md",l(t)&&g.length>1&&g.indexOf(t){p.key==="Enter"&&(p.stopPropagation(),u(t),s==null||s(p)),p.key===" "&&(p.stopPropagation(),s==null||s(p))},children:e})}k.ContextMenu=xa;k.ContextMenuTrigger=Da;k.Rename=Ca;k.Container=Sa;export{k as default}; diff --git a/web/client/dist/assets/Footer-CgBEtiAh.js b/web/client/dist/assets/Footer-CgBEtiAh.js new file mode 100644 index 0000000000..ba4b6a8775 --- /dev/null +++ b/web/client/dist/assets/Footer-CgBEtiAh.js @@ -0,0 +1 @@ +import{a as n,j as e,i as r}from"./index-Dj0i1-CA.js";function i(){const s=n(t=>t.version);return e.jsxs("footer",{className:"px-2 py-1 text-xs flex justify-between",children:[e.jsx("span",{children:r(s)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"hidden sm:inline",children:"SQLMesh: "}),e.jsx("span",{title:"SQLMesh Version",className:"font-black inline-block mr-4",children:s})]})}),e.jsxs("small",{className:"text-xs",children:["© ",new Date().getFullYear()," ",e.jsx("a",{href:"https://tobikodata.com/",target:"_blank",rel:"noopener noreferrer",className:"underline",title:"Tobiko Data website",children:"Tobiko Data, Inc."}),"  All rights reserved."]})]})}export{i as default}; diff --git a/web/client/dist/assets/Header-DSqR6nSO.js b/web/client/dist/assets/Header-DSqR6nSO.js new file mode 100644 index 0000000000..3b69f386da --- /dev/null +++ b/web/client/dist/assets/Header-DSqR6nSO.js @@ -0,0 +1 @@ +import{r as a,j as e,u as o,c as i,E as r}from"./index-Dj0i1-CA.js";function n({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{fillRule:"evenodd",d:"M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z",clipRule:"evenodd"}))}const h=a.forwardRef(n);function d({title:l,titleId:t,...s},C){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:C,"aria-labelledby":t},s),l?a.createElement("title",{id:t},l):null,a.createElement("path",{d:"M12 2.25a.75.75 0 0 1 .75.75v2.25a.75.75 0 0 1-1.5 0V3a.75.75 0 0 1 .75-.75ZM7.5 12a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM18.894 6.166a.75.75 0 0 0-1.06-1.06l-1.591 1.59a.75.75 0 1 0 1.06 1.061l1.591-1.59ZM21.75 12a.75.75 0 0 1-.75.75h-2.25a.75.75 0 0 1 0-1.5H21a.75.75 0 0 1 .75.75ZM17.834 18.894a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 1 0-1.061 1.06l1.59 1.591ZM12 18a.75.75 0 0 1 .75.75V21a.75.75 0 0 1-1.5 0v-2.25A.75.75 0 0 1 12 18ZM7.758 17.303a.75.75 0 0 0-1.061-1.06l-1.591 1.59a.75.75 0 0 0 1.06 1.061l1.591-1.59ZM6 12a.75.75 0 0 1-.75.75H3a.75.75 0 0 1 0-1.5h2.25A.75.75 0 0 1 6 12ZM6.697 7.757a.75.75 0 0 0 1.06-1.06l-1.59-1.591a.75.75 0 0 0-1.061 1.06l1.59 1.591Z"}))}const c=a.forwardRef(d);function x({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,role:"img","aria-labelledby":"tobikoDataTitle",viewBox:"0 0 194 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"tobikoDataTitle",children:"Tobiko Data logo"}),e.jsx("path",{d:"M99.6773 18.8812H90.4835V43H85.3891V18.8812H76.1953V14.4236H99.6773V18.8812ZM116.433 32.5724C116.433 39.0598 112.254 43.4378 106.364 43.4378C100.473 43.4378 96.2943 39.0598 96.2943 32.5724C96.2943 26.085 100.473 21.707 106.364 21.707C112.254 21.707 116.433 26.085 116.433 32.5724ZM101.11 32.5724C101.11 36.831 103.14 39.418 106.364 39.418C109.587 39.418 111.617 36.831 111.617 32.5724C111.617 28.3138 109.587 25.7268 106.364 25.7268C103.14 25.7268 101.11 28.3138 101.11 32.5724ZM130.538 43.4378C127.832 43.4378 125.842 42.3632 124.529 40.811V43H119.753V14.4236H124.529V24.3338C125.842 22.7816 127.832 21.707 130.538 21.707C136.389 21.707 139.732 26.6422 139.732 32.5724C139.732 38.5026 136.389 43.4378 130.538 43.4378ZM124.409 31.9754V33.2092C124.409 37.0698 126.638 39.2588 129.583 39.2588C133.046 39.2588 134.916 36.5524 134.916 32.5724C134.916 28.5924 133.046 25.886 129.583 25.886C126.638 25.886 124.409 28.0352 124.409 31.9754ZM142.945 19.319V14.4236H147.88V19.319H142.945ZM147.801 22.105V43H143.025V22.105H147.801ZM157.197 14.4236V30.9008L165.237 22.105H171.088L163.207 30.2242L171.724 43H166.192L159.944 33.5674L157.197 36.3534V43H152.421V14.4236H157.197ZM191.565 32.5724C191.565 39.0598 187.386 43.4378 181.496 43.4378C175.605 43.4378 171.426 39.0598 171.426 32.5724C171.426 26.085 175.605 21.707 181.496 21.707C187.386 21.707 191.565 26.085 191.565 32.5724ZM176.242 32.5724C176.242 36.831 178.272 39.418 181.496 39.418C184.719 39.418 186.749 36.831 186.749 32.5724C186.749 28.3138 184.719 25.7268 181.496 25.7268C178.272 25.7268 176.242 28.3138 176.242 32.5724Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{d:"M7.59874 35.2C11.5752 35.2 14.7987 31.9765 14.7987 28C14.7987 24.0236 11.5752 20.8 7.59874 20.8C3.62229 20.8 0.398743 24.0236 0.398743 28C0.398743 31.9765 3.62229 35.2 7.59874 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 15.2928C14.378 15.2928 17.2792 12.3916 17.2792 8.81276C17.2792 5.23397 14.378 2.33276 10.7992 2.33276C7.22041 2.33276 4.31921 5.23397 4.31921 8.81276C4.31921 12.3916 7.22041 15.2928 10.7992 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M10.7992 53.6929C14.378 53.6929 17.2792 50.7917 17.2792 47.2129C17.2792 43.6341 14.378 40.7329 10.7992 40.7329C7.22041 40.7329 4.31921 43.6341 4.31921 47.2129C4.31921 50.7917 7.22041 53.6929 10.7992 53.6929Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 28C36.2016 31.9765 32.978 35.2 29.0016 35.2C25.0251 35.2 21.8016 31.9765 21.8016 28C21.8016 24.0236 25.0251 20.8 29.0016 20.8C32.978 20.8 36.2016 24.0236 36.2016 28Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 7.2C36.2016 11.1764 32.978 14.4 29.0016 14.4C25.0251 14.4 21.8016 11.1764 21.8016 7.2C21.8016 3.22356 25.0251 0 29.0016 0C32.978 0 36.2016 3.22356 36.2016 7.2Z",fill:"#F74808"}),e.jsx("path",{d:"M36.2016 48.7999C36.2016 52.7763 32.978 55.9999 29.0016 55.9999C25.0251 55.9999 21.8016 52.7763 21.8016 48.7999C21.8016 44.8234 25.0251 41.5999 29.0016 41.5999C32.978 41.5999 36.2016 44.8234 36.2016 48.7999Z",fill:"#F74808"}),e.jsx("path",{d:"M50.4054 35.2C54.3818 35.2 57.6054 31.9765 57.6054 28C57.6054 24.0236 54.3818 20.8 50.4054 20.8C46.4289 20.8 43.2054 24.0236 43.2054 28C43.2054 31.9765 46.4289 35.2 50.4054 35.2Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 15.2928C50.7841 15.2928 53.6853 12.3916 53.6853 8.81276C53.6853 5.23397 50.7841 2.33276 47.2053 2.33276C43.6265 2.33276 40.7253 5.23397 40.7253 8.81276C40.7253 12.3916 43.6265 15.2928 47.2053 15.2928Z",fill:"#F74808"}),e.jsx("path",{d:"M47.2053 53.6929C50.7841 53.6929 53.6853 50.7917 53.6853 47.2129C53.6853 43.6341 50.7841 40.7329 47.2053 40.7329C43.6265 40.7329 40.7253 43.6341 40.7253 47.2129C40.7253 50.7917 43.6265 53.6929 47.2053 53.6929Z",fill:"#F74808"})]})}const m=a.memo(x);function M({style:l,className:t}){return e.jsxs("svg",{style:l,className:t,viewBox:"0 0 246 56",fill:"none",role:"img","aria-labelledby":"sqlmeshTitle",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("title",{id:"sqlmeshTitle",children:"SQLMesh logo"}),e.jsx("path",{d:"M75.6874 37.4246L79.5901 34.1988C81.5814 37.3051 84.5682 39.0972 87.8338 39.0972C91.0595 39.0972 93.4888 37.6237 93.4888 34.8758C93.4888 31.9687 90.502 31.5704 86.2408 30.535C81.9398 29.4996 77.3202 28.2252 77.3202 22.6498C77.3202 17.3531 81.8601 13.9681 87.6346 13.9681C92.533 13.9681 96.3562 16.2779 98.2677 19.2647L94.5243 22.4905C92.9313 20.0214 90.8206 18.3089 87.4754 18.3089C84.4089 18.3089 82.2982 19.8621 82.2982 22.1321C82.2982 24.641 84.4885 25.1587 88.3515 26.0348C92.9711 27.0703 98.5067 28.1455 98.5067 34.3581C98.5067 39.9734 93.5685 43.4381 87.6745 43.4381C82.7761 43.4381 77.9175 41.0884 75.6874 37.4246ZM100.213 28.7031C100.213 20.0214 105.788 13.9681 113.514 13.9681C121.24 13.9681 126.816 20.0214 126.816 28.7031C126.816 34.0395 124.705 38.3804 121.28 40.969C122.435 42.4823 124.386 43.6372 126.656 44.1947L123.709 47.8187C121.081 47.0621 118.413 45.1107 117.218 42.9204C116.063 43.2788 114.828 43.4381 113.514 43.4381C105.788 43.4381 100.213 37.3848 100.213 28.7031ZM121.718 28.7031C121.718 22.4905 118.333 18.4682 113.514 18.4682C108.695 18.4682 105.31 22.4905 105.31 28.7031C105.31 34.9157 108.695 38.9379 113.514 38.9379C118.333 38.9379 121.718 34.9157 121.718 28.7031ZM130.379 43V14.4061H135.476V38.5397H148.937V43H130.379ZM168.205 43H164.063L156.576 20.8975V43H151.837V14.4061H158.846L166.214 36.3095L173.581 14.4061H180.431V43H175.692V20.8975L168.205 43ZM194.071 43.4381C188.098 43.4381 183.916 39.0176 183.916 32.566C183.916 26.4331 188.058 21.694 193.872 21.694C199.926 21.694 203.151 26.2738 203.151 32.0085V33.6015H188.496C188.854 37.1856 191.005 39.376 194.071 39.376C196.421 39.376 198.293 38.1813 198.93 36.0307L203.032 37.5839C201.558 41.2477 198.253 43.4381 194.071 43.4381ZM193.832 25.7162C191.363 25.7162 189.452 27.1897 188.735 30.0173H198.333C198.293 27.7075 196.859 25.7162 193.832 25.7162ZM204.148 39.0176L207.733 36.1502C208.967 38.1813 211.357 39.5353 213.786 39.5353C215.817 39.5353 217.689 38.8184 217.689 36.9467C217.689 35.1546 215.936 34.9555 212.631 34.2785C209.326 33.6015 205.542 32.7652 205.542 28.3048C205.542 24.4817 208.888 21.694 213.706 21.694C217.37 21.694 220.636 23.3268 222.149 25.6366L218.923 28.5438C217.729 26.672 215.737 25.5968 213.428 25.5968C211.476 25.5968 210.202 26.4729 210.202 27.8668C210.202 29.3801 211.715 29.6589 214.343 30.2164C217.888 30.9731 222.348 31.7297 222.348 36.5086C222.348 40.73 218.485 43.4381 213.746 43.4381C209.883 43.4381 206.02 41.8849 204.148 39.0176ZM225.619 43V14.4061H230.398V24.3224C231.593 22.9285 233.465 21.694 236.173 21.694C240.553 21.694 243.182 24.7206 243.182 29.2208V43H238.403V30.6146C238.403 28.0261 237.368 26.1543 234.739 26.1543C232.589 26.1543 230.398 27.7473 230.398 30.7341V43H225.619Z",fill:"#0D0D0D",className:"fill-prose"}),e.jsx("path",{opacity:"0.2",d:"M29.1758 28.2007V15.7497C29.1758 9.83436 24.3135 5.03906 18.3983 5.03906V5.03906C12.483 5.03906 7.62072 9.83436 7.62072 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.4",d:"M50.5964 28.2007V15.7497C50.5964 9.83436 45.8011 5.03906 39.8858 5.03906H18.3308C12.4155 5.03906 7.6202 9.83436 7.6202 15.7496V26.7064",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M29.0398 27.7988V40.2499C29.0398 46.1651 33.902 50.9604 39.8173 50.9604V50.9604C45.7326 50.9604 50.5949 46.1652 50.5949 40.2499V29.2931",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{opacity:"0.2",d:"M7.61914 27.799V40.2501C7.61914 46.1654 12.4144 50.9607 18.3297 50.9607H39.8848C45.8001 50.9607 50.5954 46.1654 50.5954 40.2501V29.2933",stroke:"#0830F7",strokeWidth:"4.30769"}),e.jsx("path",{d:"M7.61972 35.1497C11.6126 35.1497 14.8496 31.9129 14.8496 27.9201C14.8496 23.9273 11.6126 20.6904 7.61972 20.6904C3.6268 20.6904 0.389893 23.9273 0.389893 27.9201C0.389893 31.9129 3.6268 35.1497 7.61972 35.1497Z",fill:"#0830F7"}),e.jsx("path",{d:"M36.3908 27.9201C36.3908 31.9129 33.1539 35.1497 29.161 35.1497C25.1681 35.1497 21.9312 31.9129 21.9312 27.9201C21.9312 23.9273 25.1681 20.6904 29.161 20.6904C33.1539 20.6904 36.3908 23.9273 36.3908 27.9201Z",fill:"#0830F7"}),e.jsx("path",{d:"M50.5958 35.1497C54.5887 35.1497 57.8256 31.9129 57.8256 27.9201C57.8256 23.9273 54.5887 20.6904 50.5958 20.6904C46.6029 20.6904 43.366 23.9273 43.366 27.9201C43.366 31.9129 46.6029 35.1497 50.5958 35.1497Z",fill:"#0830F7"})]})}const f=a.memo(M);function j(){const{mode:l,toggleColorScheme:t}=o(),s=l===r.Light?h:c;return e.jsxs("header",{className:"min-h-[2rem] px-2 flex justify-between items-center",children:[e.jsxs("div",{className:"flex h-full items-center",children:[e.jsx("a",{href:"/",title:"Home",children:e.jsx(f,{style:{height:"20px"},mode:l})}),e.jsx("span",{className:"inline-block mx-1.5 text-xs font-bold pt-[3px]",children:"by"}),e.jsx("a",{href:"https://tobikodata.com/",target:"_blank",rel:"noopener noreferrer",title:"Tobiko Data website",children:e.jsx(m,{style:{height:"20px"},mode:l})})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("nav",{children:e.jsx("ul",{className:"flex items-center",children:e.jsx("li",{className:"px-2",children:e.jsx("a",{href:"http://sqlmesh.readthedocs.io/en/stable/",target:"_blank",rel:"noopener noreferrer",className:"hover:underline text-xs",children:"Documentation"})})})}),e.jsx("button",{className:i("p-1 cursor-pointer rounded-full hover:bg-theme-darker","dark:hover:bg-theme-lighter"),onClick:()=>{t==null||t()},"aria-label":l===r.Light?"Use Dark Theme":"Use Light Theme",children:e.jsx(s,{className:"h-4 w-4 text-primary-500"})})]})]})}export{j as default}; diff --git a/web/client/dist/assets/Input-B-oZ6fGO.js b/web/client/dist/assets/Input-B-oZ6fGO.js new file mode 100644 index 0000000000..2913ac2612 --- /dev/null +++ b/web/client/dist/assets/Input-B-oZ6fGO.js @@ -0,0 +1,41 @@ +import{r as o,R as J,j as f,b as En,c as re,at as yt,au as ne,av as St,aw as Pn,l as Y,i as rt}from"./index-Dj0i1-CA.js";import{r as qe,u as Rn,o as Tn,s as In,f as Nn,a as An,b as On,h as Mn,l as _n,c as Ln,R as Dn}from"./floating-ui.react-dom-CjE-JNW1.js";function jn({title:e,titleId:t,...n},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const kn=o.forwardRef(jn);function Bn({title:e,titleId:t,...n},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const Fn=o.forwardRef(Bn);function Wn({title:e,titleId:t,...n},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const Hn=o.forwardRef(Wn);function Vn({title:e,titleId:t,...n},r){return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?o.createElement("title",{id:t},e):null,o.createElement("path",{fillRule:"evenodd",d:"M11.47 7.72a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 1 1-1.06 1.06L12 9.31l-6.97 6.97a.75.75 0 0 1-1.06-1.06l7.5-7.5Z",clipRule:"evenodd"}))}const Un=o.forwardRef(Vn),$n=J.forwardRef(function({type:t="text",value:n,placeholder:r,className:a,disabled:i=!1,autoFocus:c=!1,onInput:s,onKeyDown:u},d){return n=n??"",f.jsx("input",{ref:d,className:re("placeholder:text-neutral-300 dark:placeholder:text-neutral-700",i&&"opacity-50 cursor-not-allowed",a),type:t,value:n,placeholder:r,disabled:i,autoFocus:c,readOnly:En(!!s),onInput:s,onKeyDown:u})});function ot(e,[t,n]){return Math.min(n,Math.max(t,e))}function _(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Qe(e,t=[]){let n=[];function r(i,c){const s=o.createContext(c),u=n.length;n=[...n,c];const d=m=>{var y;const{scope:g,children:S,...x}=m,l=((y=g==null?void 0:g[e])==null?void 0:y[u])||s,v=o.useMemo(()=>x,Object.values(x));return f.jsx(l.Provider,{value:v,children:S})};d.displayName=i+"Provider";function p(m,g){var l;const S=((l=g==null?void 0:g[e])==null?void 0:l[u])||s,x=o.useContext(S);if(x)return x;if(c!==void 0)return c;throw new Error(`\`${m}\` must be used within \`${i}\``)}return[d,p]}const a=()=>{const i=n.map(c=>o.createContext(c));return function(s){const u=(s==null?void 0:s[e])||i;return o.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return a.scopeName=e,[r,Kn(a,...t)]}function Kn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const c=r.reduce((s,{useScope:u,scopeName:d})=>{const m=u(i)[`__scope${d}`];return{...s,...m}},{});return o.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function at(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xt(...e){return t=>{let n=!1;const r=e.map(a=>{const i=at(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a{const{children:i,...c}=r,s=o.Children.toArray(i),u=s.find(Xn);if(u){const d=u.props.children,p=s.map(m=>m===u?o.Children.count(d)>1?o.Children.only(null):o.isValidElement(d)?d.props.children:null:m);return f.jsx(t,{...c,ref:a,children:o.isValidElement(d)?o.cloneElement(d,void 0,p):null})}return f.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function Yn(e){const t=o.forwardRef((n,r)=>{const{children:a,...i}=n;if(o.isValidElement(a)){const c=Gn(a),s=Zn(i,a.props);return a.type!==o.Fragment&&(s.ref=r?xt(r,c):c),o.cloneElement(a,s)}return o.Children.count(a)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zn=Symbol("radix.slottable");function Xn(e){return o.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zn}function Zn(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...s)=>{const u=i(...s);return a(...s),u}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function Gn(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function qn(e){const t=e+"CollectionProvider",[n,r]=Qe(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=l=>{const{scope:v,children:y}=l,h=J.useRef(null),w=J.useRef(new Map).current;return f.jsx(a,{scope:v,itemMap:w,collectionRef:h,children:y})};c.displayName=t;const s=e+"CollectionSlot",u=Ae(s),d=J.forwardRef((l,v)=>{const{scope:y,children:h}=l,w=i(s,y),b=L(v,w.collectionRef);return f.jsx(u,{ref:b,children:h})});d.displayName=s;const p=e+"CollectionItemSlot",m="data-radix-collection-item",g=Ae(p),S=J.forwardRef((l,v)=>{const{scope:y,children:h,...w}=l,b=J.useRef(null),P=L(v,b),I=i(p,y);return J.useEffect(()=>(I.itemMap.set(b,{ref:b,...w}),()=>void I.itemMap.delete(b))),f.jsx(g,{[m]:"",ref:P,children:h})});S.displayName=p;function x(l){const v=i(e+"CollectionConsumer",l);return J.useCallback(()=>{const h=v.collectionRef.current;if(!h)return[];const w=Array.from(h.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((I,C)=>w.indexOf(I.ref.current)-w.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:c,Slot:d,ItemSlot:S},x,r]}var Qn=o.createContext(void 0);function Jn(e){const t=o.useContext(Qn);return e||t||"ltr"}var er=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],M=er.reduce((e,t)=>{const n=Ae(`Primitive.${t}`),r=o.forwardRef((a,i)=>{const{asChild:c,...s}=a,u=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(u,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function tr(e,t){e&&qe.flushSync(()=>e.dispatchEvent(t))}function ie(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),o.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function nr(e,t=globalThis==null?void 0:globalThis.document){const n=ie(e);o.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var rr="DismissableLayer",$e="dismissableLayer.update",or="dismissableLayer.pointerDownOutside",ar="dismissableLayer.focusOutside",st,bt=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ct=o.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...u}=e,d=o.useContext(bt),[p,m]=o.useState(null),g=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=o.useState({}),x=L(t,C=>m(C)),l=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=l.indexOf(v),h=p?l.indexOf(p):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,b=h>=y,P=cr(C=>{const O=C.target,D=[...d.branches].some(H=>H.contains(O));!b||D||(a==null||a(C),c==null||c(C),C.defaultPrevented||s==null||s())},g),I=lr(C=>{const O=C.target;[...d.branches].some(H=>H.contains(O))||(i==null||i(C),c==null||c(C),C.defaultPrevented||s==null||s())},g);return nr(C=>{h===d.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))},g),o.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(st=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),it(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=st)}},[p,g,n,d]),o.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),it())},[p,d]),o.useEffect(()=>{const C=()=>S({});return document.addEventListener($e,C),()=>document.removeEventListener($e,C)},[]),f.jsx(M.div,{...u,ref:x,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,I.onFocusCapture),onBlurCapture:_(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,P.onPointerDownCapture)})});Ct.displayName=rr;var sr="DismissableLayerBranch",ir=o.forwardRef((e,t)=>{const n=o.useContext(bt),r=o.useRef(null),a=L(t,r);return o.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),f.jsx(M.div,{...e,ref:a})});ir.displayName=sr;function cr(e,t=globalThis==null?void 0:globalThis.document){const n=ie(e),r=o.useRef(!1),a=o.useRef(()=>{});return o.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let u=function(){Et(or,n,d,{discrete:!0})};const d={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function lr(e,t=globalThis==null?void 0:globalThis.document){const n=ie(e),r=o.useRef(!1);return o.useEffect(()=>{const a=i=>{i.target&&!r.current&&Et(ar,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function it(){const e=new CustomEvent($e);document.dispatchEvent(e)}function Et(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?tr(a,i):a.dispatchEvent(i)}var ke=0;function ur(){o.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ct()),document.body.insertAdjacentElement("beforeend",e[1]??ct()),ke++,()=>{ke===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ke--}},[])}function ct(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Be="focusScope.autoFocusOnMount",Fe="focusScope.autoFocusOnUnmount",lt={bubbles:!1,cancelable:!0},dr="FocusScope",Pt=o.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...c}=e,[s,u]=o.useState(null),d=ie(a),p=ie(i),m=o.useRef(null),g=L(t,l=>u(l)),S=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let l=function(w){if(S.paused||!s)return;const b=w.target;s.contains(b)?m.current=b:te(m.current,{select:!0})},v=function(w){if(S.paused||!s)return;const b=w.relatedTarget;b!==null&&(s.contains(b)||te(m.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const P of w)P.removedNodes.length>0&&te(s)};document.addEventListener("focusin",l),document.addEventListener("focusout",v);const h=new MutationObserver(y);return s&&h.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",l),document.removeEventListener("focusout",v),h.disconnect()}}},[r,s,S.paused]),o.useEffect(()=>{if(s){dt.add(S);const l=document.activeElement;if(!s.contains(l)){const y=new CustomEvent(Be,lt);s.addEventListener(Be,d),s.dispatchEvent(y),y.defaultPrevented||(fr(gr(Rt(s)),{select:!0}),document.activeElement===l&&te(s))}return()=>{s.removeEventListener(Be,d),setTimeout(()=>{const y=new CustomEvent(Fe,lt);s.addEventListener(Fe,p),s.dispatchEvent(y),y.defaultPrevented||te(l??document.body,{select:!0}),s.removeEventListener(Fe,p),dt.remove(S)},0)}}},[s,d,p,S]);const x=o.useCallback(l=>{if(!n&&!r||S.paused)return;const v=l.key==="Tab"&&!l.altKey&&!l.ctrlKey&&!l.metaKey,y=document.activeElement;if(v&&y){const h=l.currentTarget,[w,b]=pr(h);w&&b?!l.shiftKey&&y===b?(l.preventDefault(),n&&te(w,{select:!0})):l.shiftKey&&y===w&&(l.preventDefault(),n&&te(b,{select:!0})):y===h&&l.preventDefault()}},[n,r,S.paused]);return f.jsx(M.div,{tabIndex:-1,...c,ref:g,onKeyDown:x})});Pt.displayName=dr;function fr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(te(r,{select:t}),document.activeElement!==n)return}function pr(e){const t=Rt(e),n=ut(t,e),r=ut(t.reverse(),e);return[n,r]}function Rt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ut(e,t){for(const n of e)if(!vr(n,{upTo:t}))return n}function vr(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hr(e){return e instanceof HTMLInputElement&&"select"in e}function te(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&hr(e)&&t&&e.select()}}var dt=mr();function mr(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ft(e,t),e.unshift(t)},remove(t){var n;e=ft(e,t),(n=e[0])==null||n.resume()}}}function ft(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function gr(e){return e.filter(t=>t.tagName!=="A")}var W=globalThis!=null&&globalThis.document?o.useLayoutEffect:()=>{},wr=yt[" useId ".trim().toString()]||(()=>{}),yr=0;function Je(e){const[t,n]=o.useState(wr());return W(()=>{n(r=>r??String(yr++))},[e]),t?`radix-${t}`:""}var Sr="Arrow",Tt=o.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return f.jsx(M.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Tt.displayName=Sr;var xr=Tt;function br(e){const[t,n]=o.useState(void 0);return W(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let c,s;if("borderBoxSize"in i){const u=i.borderBoxSize,d=Array.isArray(u)?u[0]:u;c=d.inlineSize,s=d.blockSize}else c=e.offsetWidth,s=e.offsetHeight;n({width:c,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var et="Popper",[It,Nt]=Qe(et),[Cr,At]=It(et),Ot=e=>{const{__scopePopper:t,children:n}=e,[r,a]=o.useState(null);return f.jsx(Cr,{scope:t,anchor:r,onAnchorChange:a,children:n})};Ot.displayName=et;var Mt="PopperAnchor",_t=o.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=At(Mt,n),c=o.useRef(null),s=L(t,c);return o.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||c.current)}),r?null:f.jsx(M.div,{...a,ref:s})});_t.displayName=Mt;var tt="PopperContent",[Er,Pr]=It(tt),Lt=o.forwardRef((e,t)=>{var E,A,B,N,R,T;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:c=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:S="optimized",onPlaced:x,...l}=e,v=At(tt,n),[y,h]=o.useState(null),w=L(t,U=>h(U)),[b,P]=o.useState(null),I=br(b),C=(I==null?void 0:I.width)??0,O=(I==null?void 0:I.height)??0,D=r+(i!=="center"?"-"+i:""),H=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(d)?d:[d],z=$.length>0,V={padding:H,boundary:$.filter(Tr),altBoundary:z},{refs:X,floatingStyles:K,placement:j,isPositioned:F,middlewareData:k}=Rn({strategy:"fixed",placement:D,whileElementsMounted:(...U)=>Ln(...U,{animationFrame:S==="always"}),elements:{reference:v.anchor},middleware:[Tn({mainAxis:a+O,alignmentAxis:c}),u&&In({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?_n():void 0,...V}),u&&Nn({...V}),An({...V,apply:({elements:U,rects:q,availableWidth:ye,availableHeight:Se})=>{const{width:xe,height:Cn}=q.reference,Ce=U.floating.style;Ce.setProperty("--radix-popper-available-width",`${ye}px`),Ce.setProperty("--radix-popper-available-height",`${Se}px`),Ce.setProperty("--radix-popper-anchor-width",`${xe}px`),Ce.setProperty("--radix-popper-anchor-height",`${Cn}px`)}}),b&&On({element:b,padding:s}),Ir({arrowWidth:C,arrowHeight:O}),g&&Mn({strategy:"referenceHidden",...V})]}),[Z,me]=kt(j),Q=ie(x);W(()=>{F&&(Q==null||Q())},[F,Q]);const ge=(E=k.arrow)==null?void 0:E.x,we=(A=k.arrow)==null?void 0:A.y,ee=((B=k.arrow)==null?void 0:B.centerOffset)!==0,[ue,se]=o.useState();return W(()=>{y&&se(window.getComputedStyle(y).zIndex)},[y]),f.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:F?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(N=k.transformOrigin)==null?void 0:N.x,(R=k.transformOrigin)==null?void 0:R.y].join(" "),...((T=k.hide)==null?void 0:T.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(Er,{scope:n,placedSide:Z,onArrowChange:P,arrowX:ge,arrowY:we,shouldHideArrow:ee,children:f.jsx(M.div,{"data-side":Z,"data-align":me,...l,ref:w,style:{...l.style,animation:F?void 0:"none"}})})})});Lt.displayName=tt;var Dt="PopperArrow",Rr={top:"bottom",right:"left",bottom:"top",left:"right"},jt=o.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=Pr(Dt,r),c=Rr[i.placedSide];return f.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:f.jsx(xr,{...a,ref:n,style:{...a.style,display:"block"}})})});jt.displayName=Dt;function Tr(e){return e!==null}var Ir=e=>({name:"transformOrigin",options:e,fn(t){var v,y,h;const{placement:n,rects:r,middlewareData:a}=t,c=((v=a.arrow)==null?void 0:v.centerOffset)!==0,s=c?0:e.arrowWidth,u=c?0:e.arrowHeight,[d,p]=kt(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(((y=a.arrow)==null?void 0:y.x)??0)+s/2,S=(((h=a.arrow)==null?void 0:h.y)??0)+u/2;let x="",l="";return d==="bottom"?(x=c?m:`${g}px`,l=`${-u}px`):d==="top"?(x=c?m:`${g}px`,l=`${r.floating.height+u}px`):d==="right"?(x=`${-u}px`,l=c?m:`${S}px`):d==="left"&&(x=`${r.floating.width+u}px`,l=c?m:`${S}px`),{data:{x,y:l}}}});function kt(e){const[t,n="center"]=e.split("-");return[t,n]}var Nr=Ot,Ar=_t,Or=Lt,Mr=jt,_r="Portal",Bt=o.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[a,i]=o.useState(!1);W(()=>i(!0),[]);const c=n||a&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return c?Dn.createPortal(f.jsx(M.div,{...r,ref:t}),c):null});Bt.displayName=_r;var Lr=yt[" useInsertionEffect ".trim().toString()]||W;function pt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,c]=Dr({defaultProp:t,onChange:n}),s=e!==void 0,u=s?e:a;{const p=o.useRef(e!==void 0);o.useEffect(()=>{const m=p.current;m!==s&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=s},[s,r])}const d=o.useCallback(p=>{var m;if(s){const g=jr(p)?p(e):p;g!==e&&((m=c.current)==null||m.call(c,g))}else i(p)},[s,e,i,c]);return[u,d]}function Dr({defaultProp:e,onChange:t}){const[n,r]=o.useState(e),a=o.useRef(n),i=o.useRef(t);return Lr(()=>{i.current=t},[t]),o.useEffect(()=>{var c;a.current!==n&&((c=i.current)==null||c.call(i,n),a.current=n)},[n,a]),[n,r,i]}function jr(e){return typeof e=="function"}function kr(e){const t=o.useRef({value:e,previous:e});return o.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ft=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Br="VisuallyHidden",Fr=o.forwardRef((e,t)=>f.jsx(M.span,{...e,ref:t,style:{...Ft,...e.style}}));Fr.displayName=Br;var Wr=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},de=new WeakMap,Ee=new WeakMap,Pe={},We=0,Wt=function(e){return e&&(e.host||Wt(e.parentNode))},Hr=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Wt(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Vr=function(e,t,n,r){var a=Hr(t,Array.isArray(e)?e:[e]);Pe[n]||(Pe[n]=new WeakMap);var i=Pe[n],c=[],s=new Set,u=new Set(a),d=function(m){!m||s.has(m)||(s.add(m),d(m.parentNode))};a.forEach(d);var p=function(m){!m||u.has(m)||Array.prototype.forEach.call(m.children,function(g){if(s.has(g))p(g);else try{var S=g.getAttribute(r),x=S!==null&&S!=="false",l=(de.get(g)||0)+1,v=(i.get(g)||0)+1;de.set(g,l),i.set(g,v),c.push(g),l===1&&x&&Ee.set(g,!0),v===1&&g.setAttribute(n,"true"),x||g.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return p(t),s.clear(),We++,function(){c.forEach(function(m){var g=de.get(m)-1,S=i.get(m)-1;de.set(m,g),i.set(m,S),g||(Ee.has(m)||m.removeAttribute(r),Ee.delete(m)),S||m.removeAttribute(n)}),We--,We||(de=new WeakMap,de=new WeakMap,Ee=new WeakMap,Pe={})}},Ur=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Wr(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Vr(r,a,n,"aria-hidden")):function(){return null}},Ie="right-scroll-bar-position",Ne="width-before-scroll-bar",$r="with-scroll-bars-hidden",Kr="--removed-body-scroll-bar-size";function He(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yr(e,t){var n=o.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var zr=typeof window<"u"?o.useLayoutEffect:o.useEffect,vt=new WeakMap;function Xr(e,t){var n=Yr(null,function(r){return e.forEach(function(a){return He(a,r)})});return zr(function(){var r=vt.get(n);if(r){var a=new Set(r),i=new Set(e),c=n.current;a.forEach(function(s){i.has(s)||He(s,null)}),i.forEach(function(s){a.has(s)||He(s,c)})}vt.set(n,e)},[e]),n}function Zr(e){return e}function Gr(e,t){t===void 0&&(t=Zr);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(i),c=n}var u=function(){var p=c;c=[],p.forEach(i)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(p){c.push(p),d()},filter:function(p){return c=c.filter(p),n}}}};return a}function qr(e){e===void 0&&(e={});var t=Gr(null);return t.options=ne({async:!0,ssr:!1},e),t}var Ht=function(e){var t=e.sideCar,n=St(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return o.createElement(r,ne({},n))};Ht.isSideCarExport=!0;function Qr(e,t){return e.useMedium(t),Ht}var Vt=qr(),Ve=function(){},Me=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:Ve,onWheelCapture:Ve,onTouchMoveCapture:Ve}),a=r[0],i=r[1],c=e.forwardProps,s=e.children,u=e.className,d=e.removeScrollBar,p=e.enabled,m=e.shards,g=e.sideCar,S=e.noRelative,x=e.noIsolation,l=e.inert,v=e.allowPinchZoom,y=e.as,h=y===void 0?"div":y,w=e.gapMode,b=St(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=g,I=Xr([n,t]),C=ne(ne({},b),a);return o.createElement(o.Fragment,null,p&&o.createElement(P,{sideCar:Vt,removeScrollBar:d,shards:m,noRelative:S,noIsolation:x,inert:l,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:w}),c?o.cloneElement(o.Children.only(s),ne(ne({},C),{ref:I})):o.createElement(h,ne({},C,{className:u,ref:I}),s))});Me.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Me.classNames={fullWidth:Ne,zeroRight:Ie};var Jr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eo(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Jr();return t&&e.setAttribute("nonce",t),e}function to(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function no(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ro=function(){var e=0,t=null;return{add:function(n){e==0&&(t=eo())&&(to(t,n),no(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},oo=function(){var e=ro();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ut=function(){var e=oo(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},ao={left:0,top:0,right:0,gap:0},Ue=function(e){return parseInt(e||"",10)||0},so=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Ue(n),Ue(r),Ue(a)]},io=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ao;var t=so(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},co=Ut(),ve="data-scroll-locked",lo=function(e,t,n,r){var a=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat($r,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body[`).concat(ve,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(a,`px; + padding-top: `).concat(i,`px; + padding-right: `).concat(c,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(Ie,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Ne,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Ie," .").concat(Ie,` { + right: 0 `).concat(r,`; + } + + .`).concat(Ne," .").concat(Ne,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(ve,`] { + `).concat(Kr,": ").concat(s,`px; + } +`)},ht=function(){var e=parseInt(document.body.getAttribute(ve)||"0",10);return isFinite(e)?e:0},uo=function(){o.useEffect(function(){return document.body.setAttribute(ve,(ht()+1).toString()),function(){var e=ht()-1;e<=0?document.body.removeAttribute(ve):document.body.setAttribute(ve,e.toString())}},[])},fo=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;uo();var i=o.useMemo(function(){return io(a)},[a]);return o.createElement(co,{styles:lo(i,!t,a,n?"":"!important")})},Ke=!1;if(typeof window<"u")try{var Re=Object.defineProperty({},"passive",{get:function(){return Ke=!0,!0}});window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch{Ke=!1}var fe=Ke?{passive:!1}:!1,po=function(e){return e.tagName==="TEXTAREA"},$t=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!po(e)&&n[t]==="visible")},vo=function(e){return $t(e,"overflowY")},ho=function(e){return $t(e,"overflowX")},mt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=Kt(e,r);if(a){var i=Yt(e,r),c=i[1],s=i[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mo=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},go=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Kt=function(e,t){return e==="v"?vo(t):ho(t)},Yt=function(e,t){return e==="v"?mo(t):go(t)},wo=function(e,t){return e==="h"&&t==="rtl"?-1:1},yo=function(e,t,n,r,a){var i=wo(e,window.getComputedStyle(t).direction),c=i*r,s=n.target,u=t.contains(s),d=!1,p=c>0,m=0,g=0;do{if(!s)break;var S=Yt(e,s),x=S[0],l=S[1],v=S[2],y=l-v-i*x;(x||y)&&Kt(e,s)&&(m+=y,g+=x);var h=s.parentNode;s=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(p&&Math.abs(m)<1||!p&&Math.abs(g)<1)&&(d=!0),d},Te=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gt=function(e){return[e.deltaX,e.deltaY]},wt=function(e){return e&&"current"in e?e.current:e},So=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xo=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},bo=0,pe=[];function Co(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),a=o.useState(bo++)[0],i=o.useState(Ut)[0],c=o.useRef(e);o.useEffect(function(){c.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var l=Pn([e.lockRef.current],(e.shards||[]).map(wt),!0).filter(Boolean);return l.forEach(function(v){return v.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),l.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=o.useCallback(function(l,v){if("touches"in l&&l.touches.length===2||l.type==="wheel"&&l.ctrlKey)return!c.current.allowPinchZoom;var y=Te(l),h=n.current,w="deltaX"in l?l.deltaX:h[0]-y[0],b="deltaY"in l?l.deltaY:h[1]-y[1],P,I=l.target,C=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in l&&C==="h"&&I.type==="range")return!1;var O=mt(C,I);if(!O)return!0;if(O?P=C:(P=C==="v"?"h":"v",O=mt(C,I)),!O)return!1;if(!r.current&&"changedTouches"in l&&(w||b)&&(r.current=P),!P)return!0;var D=r.current||P;return yo(D,v,l,D==="h"?w:b)},[]),u=o.useCallback(function(l){var v=l;if(!(!pe.length||pe[pe.length-1]!==i)){var y="deltaY"in v?gt(v):Te(v),h=t.current.filter(function(P){return P.name===v.type&&(P.target===v.target||v.target===P.shadowParent)&&So(P.delta,y)})[0];if(h&&h.should){v.cancelable&&v.preventDefault();return}if(!h){var w=(c.current.shards||[]).map(wt).filter(Boolean).filter(function(P){return P.contains(v.target)}),b=w.length>0?s(v,w[0]):!c.current.noIsolation;b&&v.cancelable&&v.preventDefault()}}},[]),d=o.useCallback(function(l,v,y,h){var w={name:l,delta:v,target:y,should:h,shadowParent:Eo(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),p=o.useCallback(function(l){n.current=Te(l),r.current=void 0},[]),m=o.useCallback(function(l){d(l.type,gt(l),l.target,s(l,e.lockRef.current))},[]),g=o.useCallback(function(l){d(l.type,Te(l),l.target,s(l,e.lockRef.current))},[]);o.useEffect(function(){return pe.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",u,fe),document.addEventListener("touchmove",u,fe),document.addEventListener("touchstart",p,fe),function(){pe=pe.filter(function(l){return l!==i}),document.removeEventListener("wheel",u,fe),document.removeEventListener("touchmove",u,fe),document.removeEventListener("touchstart",p,fe)}},[]);var S=e.removeScrollBar,x=e.inert;return o.createElement(o.Fragment,null,x?o.createElement(i,{styles:xo(a)}):null,S?o.createElement(fo,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Eo(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Po=Qr(Vt,Co);var zt=o.forwardRef(function(e,t){return o.createElement(Me,ne({},e,{ref:t,sideCar:Po}))});zt.classNames=Me.classNames;var Ro=[" ","Enter","ArrowUp","ArrowDown"],To=[" ","Enter"],ce="Select",[_e,Le,Io]=qn(ce),[he,da]=Qe(ce,[Io,Nt]),De=Nt(),[No,oe]=he(ce),[Ao,Oo]=he(ce),Xt=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:c,defaultValue:s,onValueChange:u,dir:d,name:p,autoComplete:m,disabled:g,required:S,form:x}=e,l=De(t),[v,y]=o.useState(null),[h,w]=o.useState(null),[b,P]=o.useState(!1),I=Jn(d),[C,O]=pt({prop:r,defaultProp:a??!1,onChange:i,caller:ce}),[D,H]=pt({prop:c,defaultProp:s,onChange:u,caller:ce}),$=o.useRef(null),z=v?x||!!v.closest("form"):!0,[V,X]=o.useState(new Set),K=Array.from(V).map(j=>j.props.value).join(";");return f.jsx(Nr,{...l,children:f.jsxs(No,{required:S,scope:t,trigger:v,onTriggerChange:y,valueNode:h,onValueNodeChange:w,valueNodeHasChildren:b,onValueNodeHasChildrenChange:P,contentId:Je(),value:D,onValueChange:H,open:C,onOpenChange:O,dir:I,triggerPointerDownPosRef:$,disabled:g,children:[f.jsx(_e.Provider,{scope:t,children:f.jsx(Ao,{scope:e.__scopeSelect,onNativeOptionAdd:o.useCallback(j=>{X(F=>new Set(F).add(j))},[]),onNativeOptionRemove:o.useCallback(j=>{X(F=>{const k=new Set(F);return k.delete(j),k})},[]),children:n})}),z?f.jsxs(gn,{"aria-hidden":!0,required:S,tabIndex:-1,name:p,autoComplete:m,value:D,onChange:j=>H(j.target.value),disabled:g,form:x,children:[D===void 0?f.jsx("option",{value:""}):null,Array.from(V)]},K):null]})})};Xt.displayName=ce;var Zt="SelectTrigger",Gt=o.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,i=De(n),c=oe(Zt,n),s=c.disabled||r,u=L(t,c.onTriggerChange),d=Le(n),p=o.useRef("touch"),[m,g,S]=yn(l=>{const v=d().filter(w=>!w.disabled),y=v.find(w=>w.value===c.value),h=Sn(v,l,y);h!==void 0&&c.onValueChange(h.value)}),x=l=>{s||(c.onOpenChange(!0),S()),l&&(c.triggerPointerDownPosRef.current={x:Math.round(l.pageX),y:Math.round(l.pageY)})};return f.jsx(Ar,{asChild:!0,...i,children:f.jsx(M.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":wn(c.value)?"":void 0,...a,ref:u,onClick:_(a.onClick,l=>{l.currentTarget.focus(),p.current!=="mouse"&&x(l)}),onPointerDown:_(a.onPointerDown,l=>{p.current=l.pointerType;const v=l.target;v.hasPointerCapture(l.pointerId)&&v.releasePointerCapture(l.pointerId),l.button===0&&l.ctrlKey===!1&&l.pointerType==="mouse"&&(x(l),l.preventDefault())}),onKeyDown:_(a.onKeyDown,l=>{const v=m.current!=="";!(l.ctrlKey||l.altKey||l.metaKey)&&l.key.length===1&&g(l.key),!(v&&l.key===" ")&&Ro.includes(l.key)&&(x(),l.preventDefault())})})})});Gt.displayName=Zt;var qt="SelectValue",Qt=o.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:c="",...s}=e,u=oe(qt,n),{onValueNodeHasChildrenChange:d}=u,p=i!==void 0,m=L(t,u.onValueNodeChange);return W(()=>{d(p)},[d,p]),f.jsx(M.span,{...s,ref:m,style:{pointerEvents:"none"},children:wn(u.value)?f.jsx(f.Fragment,{children:c}):i})});Qt.displayName=qt;var Mo="SelectIcon",Jt=o.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return f.jsx(M.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});Jt.displayName=Mo;var _o="SelectPortal",en=e=>f.jsx(Bt,{asChild:!0,...e});en.displayName=_o;var le="SelectContent",tn=o.forwardRef((e,t)=>{const n=oe(le,e.__scopeSelect),[r,a]=o.useState();if(W(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?qe.createPortal(f.jsx(nn,{scope:e.__scopeSelect,children:f.jsx(_e.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),i):null}return f.jsx(rn,{...e,ref:t})});tn.displayName=le;var G=10,[nn,ae]=he(le),Lo="SelectContentImpl",Do=Ae("SelectContent.RemoveScroll"),rn=o.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:c,side:s,sideOffset:u,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:S,sticky:x,hideWhenDetached:l,avoidCollisions:v,...y}=e,h=oe(le,n),[w,b]=o.useState(null),[P,I]=o.useState(null),C=L(t,E=>b(E)),[O,D]=o.useState(null),[H,$]=o.useState(null),z=Le(n),[V,X]=o.useState(!1),K=o.useRef(!1);o.useEffect(()=>{if(w)return Ur(w)},[w]),ur();const j=o.useCallback(E=>{const[A,...B]=z().map(T=>T.ref.current),[N]=B.slice(-1),R=document.activeElement;for(const T of E)if(T===R||(T==null||T.scrollIntoView({block:"nearest"}),T===A&&P&&(P.scrollTop=0),T===N&&P&&(P.scrollTop=P.scrollHeight),T==null||T.focus(),document.activeElement!==R))return},[z,P]),F=o.useCallback(()=>j([O,w]),[j,O,w]);o.useEffect(()=>{V&&F()},[V,F]);const{onOpenChange:k,triggerPointerDownPosRef:Z}=h;o.useEffect(()=>{if(w){let E={x:0,y:0};const A=N=>{var R,T;E={x:Math.abs(Math.round(N.pageX)-(((R=Z.current)==null?void 0:R.x)??0)),y:Math.abs(Math.round(N.pageY)-(((T=Z.current)==null?void 0:T.y)??0))}},B=N=>{E.x<=10&&E.y<=10?N.preventDefault():w.contains(N.target)||k(!1),document.removeEventListener("pointermove",A),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",B,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",B,{capture:!0})}}},[w,k,Z]),o.useEffect(()=>{const E=()=>k(!1);return window.addEventListener("blur",E),window.addEventListener("resize",E),()=>{window.removeEventListener("blur",E),window.removeEventListener("resize",E)}},[k]);const[me,Q]=yn(E=>{const A=z().filter(R=>!R.disabled),B=A.find(R=>R.ref.current===document.activeElement),N=Sn(A,E,B);N&&setTimeout(()=>N.ref.current.focus())}),ge=o.useCallback((E,A,B)=>{const N=!K.current&&!B;(h.value!==void 0&&h.value===A||N)&&(D(E),N&&(K.current=!0))},[h.value]),we=o.useCallback(()=>w==null?void 0:w.focus(),[w]),ee=o.useCallback((E,A,B)=>{const N=!K.current&&!B;(h.value!==void 0&&h.value===A||N)&&$(E)},[h.value]),ue=r==="popper"?Ye:on,se=ue===Ye?{side:s,sideOffset:u,align:d,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:S,sticky:x,hideWhenDetached:l,avoidCollisions:v}:{};return f.jsx(nn,{scope:n,content:w,viewport:P,onViewportChange:I,itemRefCallback:ge,selectedItem:O,onItemLeave:we,itemTextRefCallback:ee,focusSelectedItem:F,selectedItemText:H,position:r,isPositioned:V,searchRef:me,children:f.jsx(zt,{as:Do,allowPinchZoom:!0,children:f.jsx(Pt,{asChild:!0,trapped:h.open,onMountAutoFocus:E=>{E.preventDefault()},onUnmountAutoFocus:_(a,E=>{var A;(A=h.trigger)==null||A.focus({preventScroll:!0}),E.preventDefault()}),children:f.jsx(Ct,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:E=>E.preventDefault(),onDismiss:()=>h.onOpenChange(!1),children:f.jsx(ue,{role:"listbox",id:h.contentId,"data-state":h.open?"open":"closed",dir:h.dir,onContextMenu:E=>E.preventDefault(),...y,...se,onPlaced:()=>X(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:_(y.onKeyDown,E=>{const A=E.ctrlKey||E.altKey||E.metaKey;if(E.key==="Tab"&&E.preventDefault(),!A&&E.key.length===1&&Q(E.key),["ArrowUp","ArrowDown","Home","End"].includes(E.key)){let N=z().filter(R=>!R.disabled).map(R=>R.ref.current);if(["ArrowUp","End"].includes(E.key)&&(N=N.slice().reverse()),["ArrowUp","ArrowDown"].includes(E.key)){const R=E.target,T=N.indexOf(R);N=N.slice(T+1)}setTimeout(()=>j(N)),E.preventDefault()}})})})})})})});rn.displayName=Lo;var jo="SelectItemAlignedPosition",on=o.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,i=oe(le,n),c=ae(le,n),[s,u]=o.useState(null),[d,p]=o.useState(null),m=L(t,C=>p(C)),g=Le(n),S=o.useRef(!1),x=o.useRef(!0),{viewport:l,selectedItem:v,selectedItemText:y,focusSelectedItem:h}=c,w=o.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&d&&l&&v&&y){const C=i.trigger.getBoundingClientRect(),O=d.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),H=y.getBoundingClientRect();if(i.dir!=="rtl"){const R=H.left-O.left,T=D.left-R,U=C.left-T,q=C.width+U,ye=Math.max(q,O.width),Se=window.innerWidth-G,xe=ot(T,[G,Math.max(G,Se-ye)]);s.style.minWidth=q+"px",s.style.left=xe+"px"}else{const R=O.right-H.right,T=window.innerWidth-D.right-R,U=window.innerWidth-C.right-T,q=C.width+U,ye=Math.max(q,O.width),Se=window.innerWidth-G,xe=ot(T,[G,Math.max(G,Se-ye)]);s.style.minWidth=q+"px",s.style.right=xe+"px"}const $=g(),z=window.innerHeight-G*2,V=l.scrollHeight,X=window.getComputedStyle(d),K=parseInt(X.borderTopWidth,10),j=parseInt(X.paddingTop,10),F=parseInt(X.borderBottomWidth,10),k=parseInt(X.paddingBottom,10),Z=K+j+V+k+F,me=Math.min(v.offsetHeight*5,Z),Q=window.getComputedStyle(l),ge=parseInt(Q.paddingTop,10),we=parseInt(Q.paddingBottom,10),ee=C.top+C.height/2-G,ue=z-ee,se=v.offsetHeight/2,E=v.offsetTop+se,A=K+j+E,B=Z-A;if(A<=ee){const R=$.length>0&&v===$[$.length-1].ref.current;s.style.bottom="0px";const T=d.clientHeight-l.offsetTop-l.offsetHeight,U=Math.max(ue,se+(R?we:0)+T+F),q=A+U;s.style.height=q+"px"}else{const R=$.length>0&&v===$[0].ref.current;s.style.top="0px";const U=Math.max(ee,K+l.offsetTop+(R?ge:0)+se)+B;s.style.height=U+"px",l.scrollTop=A-ee+l.offsetTop}s.style.margin=`${G}px 0`,s.style.minHeight=me+"px",s.style.maxHeight=z+"px",r==null||r(),requestAnimationFrame(()=>S.current=!0)}},[g,i.trigger,i.valueNode,s,d,l,v,y,i.dir,r]);W(()=>w(),[w]);const[b,P]=o.useState();W(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const I=o.useCallback(C=>{C&&x.current===!0&&(w(),h==null||h(),x.current=!1)},[w,h]);return f.jsx(Bo,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:S,onScrollButtonChange:I,children:f.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:f.jsx(M.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});on.displayName=jo;var ko="SelectPopperPosition",Ye=o.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=G,...i}=e,c=De(n);return f.jsx(Or,{...c,...i,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Ye.displayName=ko;var[Bo,nt]=he(le,{}),ze="SelectViewport",an=o.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,i=ae(ze,n),c=nt(ze,n),s=L(t,i.onViewportChange),u=o.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsx(_e.Slot,{scope:n,children:f.jsx(M.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:_(a.onScroll,d=>{const p=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:g}=c;if(g!=null&&g.current&&m){const S=Math.abs(u.current-p.scrollTop);if(S>0){const x=window.innerHeight-G*2,l=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),y=Math.max(l,v);if(y0?b:0,m.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});an.displayName=ze;var sn="SelectGroup",[Fo,Wo]=he(sn),Ho=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Je();return f.jsx(Fo,{scope:n,id:a,children:f.jsx(M.div,{role:"group","aria-labelledby":a,...r,ref:t})})});Ho.displayName=sn;var cn="SelectLabel",Vo=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Wo(cn,n);return f.jsx(M.div,{id:a.id,...r,ref:t})});Vo.displayName=cn;var Oe="SelectItem",[Uo,ln]=he(Oe),un=o.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...c}=e,s=oe(Oe,n),u=ae(Oe,n),d=s.value===r,[p,m]=o.useState(i??""),[g,S]=o.useState(!1),x=L(t,h=>{var w;return(w=u.itemRefCallback)==null?void 0:w.call(u,h,r,a)}),l=Je(),v=o.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(Uo,{scope:n,value:r,disabled:a,textId:l,isSelected:d,onItemTextChange:o.useCallback(h=>{m(w=>w||((h==null?void 0:h.textContent)??"").trim())},[]),children:f.jsx(_e.ItemSlot,{scope:n,value:r,disabled:a,textValue:p,children:f.jsx(M.div,{role:"option","aria-labelledby":l,"data-highlighted":g?"":void 0,"aria-selected":d&&g,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...c,ref:x,onFocus:_(c.onFocus,()=>S(!0)),onBlur:_(c.onBlur,()=>S(!1)),onClick:_(c.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:_(c.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:_(c.onPointerDown,h=>{v.current=h.pointerType}),onPointerMove:_(c.onPointerMove,h=>{var w;v.current=h.pointerType,a?(w=u.onItemLeave)==null||w.call(u):v.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(c.onPointerLeave,h=>{var w;h.currentTarget===document.activeElement&&((w=u.onItemLeave)==null||w.call(u))}),onKeyDown:_(c.onKeyDown,h=>{var b;((b=u.searchRef)==null?void 0:b.current)!==""&&h.key===" "||(To.includes(h.key)&&y(),h.key===" "&&h.preventDefault())})})})})});un.displayName=Oe;var be="SelectItemText",dn=o.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...i}=e,c=oe(be,n),s=ae(be,n),u=ln(be,n),d=Oo(be,n),[p,m]=o.useState(null),g=L(t,y=>m(y),u.onItemTextChange,y=>{var h;return(h=s.itemTextRefCallback)==null?void 0:h.call(s,y,u.value,u.disabled)}),S=p==null?void 0:p.textContent,x=o.useMemo(()=>f.jsx("option",{value:u.value,disabled:u.disabled,children:S},u.value),[u.disabled,u.value,S]),{onNativeOptionAdd:l,onNativeOptionRemove:v}=d;return W(()=>(l(x),()=>v(x)),[l,v,x]),f.jsxs(f.Fragment,{children:[f.jsx(M.span,{id:u.textId,...i,ref:g}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?qe.createPortal(i.children,c.valueNode):null]})});dn.displayName=be;var fn="SelectItemIndicator",pn=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ln(fn,n).isSelected?f.jsx(M.span,{"aria-hidden":!0,...r,ref:t}):null});pn.displayName=fn;var Xe="SelectScrollUpButton",vn=o.forwardRef((e,t)=>{const n=ae(Xe,e.__scopeSelect),r=nt(Xe,e.__scopeSelect),[a,i]=o.useState(!1),c=L(t,r.onScrollButtonChange);return W(()=>{if(n.viewport&&n.isPositioned){let s=function(){const d=u.scrollTop>0;i(d)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),a?f.jsx(mn,{...e,ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop-u.offsetHeight)}}):null});vn.displayName=Xe;var Ze="SelectScrollDownButton",hn=o.forwardRef((e,t)=>{const n=ae(Ze,e.__scopeSelect),r=nt(Ze,e.__scopeSelect),[a,i]=o.useState(!1),c=L(t,r.onScrollButtonChange);return W(()=>{if(n.viewport&&n.isPositioned){let s=function(){const d=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),a?f.jsx(mn,{...e,ref:c,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop+u.offsetHeight)}}):null});hn.displayName=Ze;var mn=o.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,i=ae("SelectScrollButton",n),c=o.useRef(null),s=Le(n),u=o.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return o.useEffect(()=>()=>u(),[u]),W(()=>{var p;const d=s().find(m=>m.ref.current===document.activeElement);(p=d==null?void 0:d.ref.current)==null||p.scrollIntoView({block:"nearest"})},[s]),f.jsx(M.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:_(a.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:_(a.onPointerMove,()=>{var d;(d=i.onItemLeave)==null||d.call(i),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:_(a.onPointerLeave,()=>{u()})})}),$o="SelectSeparator",Ko=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsx(M.div,{"aria-hidden":!0,...r,ref:t})});Ko.displayName=$o;var Ge="SelectArrow",Yo=o.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=De(n),i=oe(Ge,n),c=ae(Ge,n);return i.open&&c.position==="popper"?f.jsx(Mr,{...a,...r,ref:t}):null});Yo.displayName=Ge;var zo="SelectBubbleInput",gn=o.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=o.useRef(null),i=L(r,a),c=kr(t);return o.useEffect(()=>{const s=a.current;if(!s)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(c!==t&&p){const m=new Event("change",{bubbles:!0});p.call(s,t),s.dispatchEvent(m)}},[c,t]),f.jsx(M.select,{...n,style:{...Ft,...n.style},ref:i,defaultValue:t})});gn.displayName=zo;function wn(e){return e===""||e===void 0}function yn(e){const t=ie(e),n=o.useRef(""),r=o.useRef(0),a=o.useCallback(c=>{const s=n.current+c;t(s),function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(s)},[t]),i=o.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function Sn(e,t,n){const a=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=Xo(e,Math.max(i,0));a.length===1&&(c=c.filter(d=>d!==n));const u=c.find(d=>d.textValue.toLowerCase().startsWith(a.toLowerCase()));return u!==n?u:void 0}function Xo(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Zo=Xt,Go=Gt,qo=Qt,Qo=Jt,Jo=en,ea=tn,ta=an,na=un,ra=dn,oa=pn,aa=vn,sa=hn;const ia=J.forwardRef(function({list:t=[],required:n=!1,disabled:r=!1,autoFocus:a=!1,size:i=Y.md,name:c,value:s="default",className:u,onChange:d},p){const m=t.find(g=>g.value===s)??t[0]??{value:s};return r=r||t.length<2,f.jsxs(Zo,{name:c,value:m.value,disabled:r,required:n,onValueChange:d,children:[f.jsxs(Go,{ref:p,className:re(u,r&&"opacity-50 cursor-not-allowed"),autoFocus:a,children:[f.jsx(qo,{}),f.jsx(Qo,{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-1",children:f.jsx(Hn,{className:"w-4","aria-hidden":"true"})})]}),f.jsx(Jo,{children:f.jsxs(ea,{className:re("overflow-auto rounded-md bg-theme p-1 shadow-2xl border-2 border-neutral-200 dark:border-neutral-700 ring-opacity-5 focus:outline-none",i===Y.sm&&"text-xs",i===Y.md&&"text-sm",i===Y.lg&&"text-sm"),children:[f.jsx(aa,{className:"flex items-center justify-center h-3 cursor-default",children:f.jsx(Un,{className:"w-4","aria-hidden":"true"})}),f.jsx(ta,{className:"p-1",children:t.map(({text:g,value:S})=>f.jsx(ca,{value:S,children:g},S))}),f.jsx(sa,{className:"flex items-center justify-center h-3 cursor-default",children:f.jsx(Fn,{className:"w-4","aria-hidden":"true"})})]})})]})});function ca({disabled:e=!1,value:t,children:n,className:r}){return f.jsxs(na,{value:t,className:re("leading-none rounded-md flex items-center h-[25px] pr-[35px] pl-[25px] relative select-none data-[disabled]:pointer-events-none data-[highlighted]:outline-none data-[highlighted]:bg-brand-500 data-[highlighted]:text-brand-100",e&&"opacity-50 cursor-not-allowed",r),children:[f.jsx(ra,{children:n}),f.jsx(oa,{className:"absolute left-0 w-4 inline-flex items-center justify-center",children:f.jsx(kn,{})})]})}function je({label:e,info:t,size:n=Y.md,className:r,children:a,disabled:i=!1,required:c=!1,autoFocus:s=!1}){const u=re("text-left relative block bg-theme-lighter border-neutral-200 dark:border-neutral-700","focus:outline-none focus:border-secondary-500","ring-secondary-300 ring-opacity-60 ring-offset ring-offset-secondary-100",n===Y.sm&&"px-2 py-0.5 text-xs leading-4 border-2 focus:ring-2 rounded-[0.25rem] min-w-[7rem]",n===Y.md&&"px-3 py-2 text-sm leading-4 border-2 focus:ring-4 rounded-md min-w-[10rem]",n===Y.lg&&"px-3 py-2 text-sm leading-6 border-2 focus:ring-4 rounded-md min-w-[10rem]");return f.jsxs("div",{className:re("inline-block relative m-1 text-left",i&&"opacity-50 cursor-not-allowed",r),children:[rt(e)&&f.jsx(xn,{size:n,children:e}),typeof a=="function"?a({disabled:i,required:c,autoFocus:s,size:n,className:u}):a,rt(t)&&f.jsx(bn,{children:t})]})}function xn({htmlFor:e,className:t,children:n,size:r=Y.md}){return f.jsx("label",{htmlFor:e,className:re("block mb-1 px-2 text-sm whitespace-nowrap",r===Y.sm&&"text-xs",r===Y.md&&"text-sm",r===Y.lg&&"text-md",t),children:n})}function bn({className:e,children:t}){return f.jsx("small",{className:re("block text-xs mt-1 px-3 text-neutral-400 dark:text-neutral-600",e),children:t})}je.Label=xn;je.Info=bn;je.Textfield=$n;je.Selector=ia;export{Ar as A,Or as C,Ct as D,Pt as F,je as I,M as P,zt as R,W as a,qn as b,Qe as c,Je as d,_ as e,Jn as f,pt as g,ie as h,Nt as i,Ur as j,ur as k,Ae as l,Mr as m,xt as n,tr as o,Nr as p,Bt as q,Hn as r,Un as s,Fn as t,L as u,kn as v}; diff --git a/web/client/dist/assets/Lineage-DYQVwDbD.js b/web/client/dist/assets/Lineage-DYQVwDbD.js new file mode 100644 index 0000000000..cc4329b6f3 --- /dev/null +++ b/web/client/dist/assets/Lineage-DYQVwDbD.js @@ -0,0 +1 @@ +import{s as u,Q as c,a as n,v as a,j as s,e as f}from"./index-Dj0i1-CA.js";import{L as g}from"./context-BctCsyGb.js";import x from"./ModelLineage-DkIFAYo4.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./editor-CcO28cqd.js";import"./file-CvJN3aZO.js";import"./project-BvSOI8MY.js";import"./help-B59vE3aE.js";import"./SourceList-DSLO6nVJ.js";import"./Input-B-oZ6fGO.js";import"./index-C-dJH7yZ.js";import"./popover-_Sf0yvOI.js";import"./ListboxShow-BE5-xevs.js";import"./SearchList-W_iT2G82.js";function S(){const l=u(),{modelName:t}=c(),i=n(e=>e.models),o=n(e=>e.lastSelectedModel),r=a(t)||t===(o==null?void 0:o.name)?o:i.get(encodeURI(t));function d(e){const m=i.get(e);a(m)||l(f.LineageModels+"/"+m.name)}function p(e){console.log(e==null?void 0:e.message)}return s.jsx("div",{className:"flex overflow-hidden w-full h-full",children:s.jsx(g,{showColumns:!0,handleClickModel:d,handleError:p,children:s.jsx(x,{model:r})})})}export{S as default}; diff --git a/web/client/dist/assets/ListboxShow-BE5-xevs.js b/web/client/dist/assets/ListboxShow-BE5-xevs.js new file mode 100644 index 0000000000..9a768c31f9 --- /dev/null +++ b/web/client/dist/assets/ListboxShow-BE5-xevs.js @@ -0,0 +1 @@ +import{r as i,R as S,j as F,b as rt,c as Se}from"./index-Dj0i1-CA.js";import{o as R,p as Me,h as Ne,al as ot,s as Ae,K as G,y as W,n as z,L as X,am as lt,V as ye,an as it,I as at,aj as je,a0 as _e,ao as $e,ap as st,i as ut,c as Be,a1 as ct,a2 as ve,d as q,B as Ue,a3 as dt,a4 as pt,j as ft,S as A,C as vt,a5 as mt,a6 as bt,w as ae,ak as ht,a7 as gt,b as Ee,v as xt,aa as Ot,G as St,D as yt,a8 as $t,a9 as Et,a as I,af as wt,T as we,_ as Qe,ab as It,ac as Rt,N as Ct,ae as Lt,ad as Ft,Z as Ie,$ as Dt,W as Tt,X as kt,Y as Pt,R as Re,ah as Mt,ai as Nt,z as At}from"./popover-_Sf0yvOI.js";import{r as K}from"./floating-ui.react-dom-CjE-JNW1.js";import{t as jt,v as _t}from"./Input-B-oZ6fGO.js";function Bt({title:e,titleId:n,...t},r){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":n},t),e?i.createElement("title",{id:n},e):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}const Ut=i.forwardRef(Bt);let Qt=i.createContext(void 0);function ge(){return i.useContext(Qt)}function Vt(e,n,t){let[r,l]=i.useState(t),o=e!==void 0,a=i.useRef(o),s=i.useRef(!1),c=i.useRef(!1);return o&&!a.current&&!s.current?(s.current=!0,a.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&a.current&&!c.current&&(c.current=!0,a.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:r,R(d=>(o||l(d),n==null?void 0:n(d)))]}function Ht(e){let[n]=i.useState(e);return n}function Ve(e={},n=null,t=[]){for(let[r,l]of Object.entries(e))Ke(t,He(n,r),l);return t}function He(e,n){return e?e+"["+n+"]":n}function Ke(e,n,t){if(Array.isArray(t))for(let[r,l]of t.entries())Ke(e,He(n,r.toString()),l);else t instanceof Date?e.push([n,t.toISOString()]):typeof t=="boolean"?e.push([n,t?"1":"0"]):typeof t=="string"?e.push([n,t]):typeof t=="number"?e.push([n,`${t}`]):t==null?e.push([n,""]):Ve(t,n,e)}function Kt(e){var n,t;let r=(n=e==null?void 0:e.form)!=null?n:e.closest("form");if(r){for(let l of r.elements)if(l!==e&&(l.tagName==="INPUT"&&l.type==="submit"||l.tagName==="BUTTON"&&l.type==="submit"||l.nodeName==="INPUT"&&l.type==="image")){l.click();return}(t=r.requestSubmit)==null||t.call(r)}}let zt=i.createContext(null);function Gt({children:e}){let n=i.useContext(zt);if(!n)return S.createElement(S.Fragment,null,e);let{target:t}=n;return t?K.createPortal(S.createElement(S.Fragment,null,e),t):null}function Wt({data:e,form:n,disabled:t,onReset:r,overrides:l}){let[o,a]=i.useState(null),s=Me();return i.useEffect(()=>{if(r&&o)return s.addEventListener(o,"reset",r)},[o,n,r]),S.createElement(Gt,null,S.createElement(Xt,{setForm:a,formId:n}),Ve(e).map(([c,d])=>S.createElement(Ne,{features:Ae.Hidden,...ot({key:c,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:n,disabled:t,name:c,value:d,...l})})))}function Xt({setForm:e,formId:n}){return i.useEffect(()=>{if(n){let t=document.getElementById(n);t&&e(t)}},[e,n]),n?null:S.createElement(Ne,{features:Ae.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let r=t.closest("form");r&&e(r)}})}let Zt=i.createContext(void 0);function ze(){return i.useContext(Zt)}let se=i.createContext(null);se.displayName="DescriptionContext";function Ge(){let e=i.useContext(se);if(e===null){let n=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(n,Ge),n}return e}function qt(){var e,n;return(n=(e=i.useContext(se))==null?void 0:e.value)!=null?n:void 0}function Hn(){let[e,n]=i.useState([]);return[e.length>0?e.join(" "):void 0,i.useMemo(()=>function(t){let r=R(o=>(n(a=>[...a,o]),()=>n(a=>{let s=a.slice(),c=s.indexOf(o);return c!==-1&&s.splice(c,1),s}))),l=i.useMemo(()=>({register:r,slot:t.slot,name:t.name,props:t.props,value:t.value}),[r,t.slot,t.name,t.props,t.value]);return S.createElement(se.Provider,{value:l},t.children)},[n])]}let Yt="p";function Jt(e,n){let t=i.useId(),r=ge(),{id:l=`headlessui-description-${t}`,...o}=e,a=Ge(),s=W(n);z(()=>a.register(l),[l,a.register]);let c=r||!1,d=i.useMemo(()=>({...a.slot,disabled:c}),[a.slot,c]),p={ref:s,...a.props,id:l};return X()({ourProps:p,theirProps:o,slot:d,defaultTag:Yt,name:a.name||"Description"})}let en=G(Jt),Kn=Object.assign(en,{}),ue=i.createContext(null);ue.displayName="LabelContext";function We(){let e=i.useContext(ue);if(e===null){let n=new Error("You used a
+ `:G` +
+ + ${this._showMore?"Show Less":`Show ${this._childrenCount-this.limit} More`} + +
+ `}_handleSlotChange(n){n.stopPropagation(),this._childrenCount=this.elsSlotted.length,this._toggleChildren()}render(){return G` +
+ ${Tt(this.headline&&xt(this.short),G` + + ${this.headline} + + ${this._childrenCount} + + + + `)} +
+ + ${Tt(this._childrenCount>this.limit,this._renderShowMore())} +
+
+ `}}Y(Do,"styles",[jt(),fe("source-list-section"),$r("source-list-section"),ft(_x)]),Y(Do,"properties",{headline:{type:String},open:{type:Boolean,reflect:!0},inert:{type:Boolean,reflect:!0},short:{type:Boolean,reflect:!0},limit:{type:Number},_showMore:{type:String,state:!0},_childrenCount:{type:Number,state:!0}});const kx=`:host { + --metadata-font-size: var(--font-size); + + display: flex; + height: 100%; + width: 100%; + overflow: hidden; +} +[part='base'] { + display: flex; + flex-direction: column; + gap: var(--step-2); + font-size: var(--metadata-font-size); +} +`;class jo extends pe{constructor(){super(),this.size=Mt.S}render(){return G` + +
+ +
+
+ `}}Y(jo,"styles",[jt(),fe(),ft(kx)]),Y(jo,"properties",{size:{type:String,reflect:!0}});const Sx=`:host { + --metadata-item-background: var(--color-gray-3); + --metadata-item-color-key: var(--color-gray-500); + --metadata-item-color-description: var(--color-gray-500); + --metadata-item-color-value: var(--color-gray-700); + + display: flex; + flex-direction: column; + gap: var(--step); + width: 100%; + padding: var(--step) var(--step-2); + white-space: nowrap; + overflow: hidden; +} +:host-context([mode='dark']) { + --metadata-item-background: var(--color-gray-10); + --metadata-item-color-key: var(--color-gray-300); + --metadata-item-color-description: var(--color-gray-300); + --metadata-item-color-value: var(--color-gray-200); +} +:host(:hover) { + background-color: var(--metadata-item-background); +} + +[part='base'] { + width: 100%; + display: flex; + align-items: center; + justify-content: inherit; + overflow: hidden; + gap: var(--step-4); +} +slot[name='key'], +::slotted([slot='key']) { + display: inline-flex; + color: var(--metadata-item-color-key); + font-family: var(--font-mono); + font-size: inherit; + overflow: hidden; + flex-shrink: 0; +} +slot[name='value'], +[part='value'], +::slotted([slot='value']) { + display: inline-flex; + color: var(--metadata-item-color-value); + font-family: var(--font-sans); + font-weight: var(--text-bold); + font-size: inherit; + overflow: hidden; +} +[part='value'] { + color: var(--color-link); + text-decoration: none; +} +[part='value']:hover { + text-decoration: underline; +} +[part='description'] { + width: 100%; + display: block; + color: var(--metadata-item-color-description); + font-family: var(--font-sans); + font-size: inherit; +} +::slotted(*) { + width: 100%; + padding-top: 0; + padding-bottom: 0; +} +`;class Io extends pe{constructor(){super(),this.size=Mt.M}_renderValue(){return this.href?G`${this.value}`:G`${this.value}`}render(){return G` + ${Tt(this.label||this.value,G` +
+ ${Tt(this.label,G`${this.label}`)} + ${this._renderValue()} +
+ `)} + ${Tt(this.description,G`${this.description}`)} + + `}}Y(Io,"styles",[jt(),fe(),ft(Sx)]),Y(Io,"properties",{size:{type:String,reflect:!0},label:{type:String},value:{type:String},href:{type:String},description:{type:String}});const Cx=`:host { + font-family: var(--font-sans); + + display: flex; + width: 100%; + flex-direction: column; +} +[part='base'] { + width: 100%; + display: flex; + align-items: flex-start; + gap: var(--step-2); + padding: var(--step-2); + border-radius: var(--radius-s); +} +:host([orientation='horizontal']) [part='base'] { + flex-direction: row; +} +:host([orientation='vertical']) [part='base'] { + flex-direction: column; +} +[part='label'] { + margin: 0; + padding: var(--step) 0; + color: var(--color-gray-500); + text-transform: uppercase; + letter-spacing: 1px; + font-size: var(--text-xs); + font-weight: var(--text-bold); +} +:host-context([mode='dark']) [part='label'] { + color: var(--color-gray-500); +} +:host([orientation='horizontal']) [part='content'] { + padding: 0 var(--step-4); +} +:host([orientation='vertical']) [part='content'] { + padding: var(--step) 0; +} +[part='content'] { + width: 100%; +} +[part='actions'] { + display: flex; + gap: var(--step-2); + justify-content: center; + padding: var(--step-2) var(--step); +} +::slotted(*) { + margin: 0; + display: flex; + box-shadow: inset 0 -1px 0 0 var(--color-gray-200); + margin-bottom: var(--step); + align-items: baseline; + justify-content: space-between; +} +::slotted(:last-child) { + box-shadow: none; +} +:host-context([mode='dark']) { + ::slotted(*) { + box-shadow: inset 0 -1px 0 0 var(--color-gray-700); + } +} +`;class Uo extends pe{constructor(){super(),Y(this,"_cache",new WeakMap),this._children=[],this._showMore=!1,this.orientation=gw.Vertical,this.limit=1/0,this.hideActions=!1}_handleSlotChange(n){n.stopPropagation(),this._children=this.elsSlotted,this._toggleChildren()}_toggleChildren(){this._children.forEach((n,i)=>{xt(this._cache.has(n))&&this._cache.set(n,n.style.display),this._showMore||i + + ${`${this._showMore?"Show Less":`Show ${this._children.length-this.limit} More`}`} + + + `}render(){return G` +
+ ${Tt(this.label,G`

${this.label}

`)} +
+ + ${Tt(this._children.length>this.limit&&xt(this.hideActions),this._renderShowMore())} +
+
+ `}}Y(Uo,"styles",[jt(),ft(Cx)]),Y(Uo,"properties",{orientation:{type:String,reflect:!0},label:{type:String},limit:{type:Number},hideActions:{type:Boolean,reflect:!0,attribute:"hide-actions"},_showMore:{type:String,state:!0},_children:{type:Array,state:!0}});var zx=ar` + :host { + --divider-width: 4px; + --divider-hit-area: 12px; + --min: 0%; + --max: 100%; + + display: grid; + } + + .start, + .end { + overflow: hidden; + } + + .divider { + flex: 0 0 var(--divider-width); + display: flex; + position: relative; + align-items: center; + justify-content: center; + background-color: var(--sl-color-neutral-200); + color: var(--sl-color-neutral-900); + z-index: 1; + } + + .divider:focus { + outline: none; + } + + :host(:not([disabled])) .divider:focus-visible { + background-color: var(--sl-color-primary-600); + color: var(--sl-color-neutral-0); + } + + :host([disabled]) .divider { + cursor: not-allowed; + } + + /* Horizontal */ + :host(:not([vertical], [disabled])) .divider { + cursor: col-resize; + } + + :host(:not([vertical])) .divider::after { + display: flex; + content: ''; + position: absolute; + height: 100%; + left: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2); + width: var(--divider-hit-area); + } + + /* Vertical */ + :host([vertical]) { + flex-direction: column; + } + + :host([vertical]:not([disabled])) .divider { + cursor: row-resize; + } + + :host([vertical]) .divider::after { + content: ''; + position: absolute; + width: 100%; + top: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2); + height: var(--divider-hit-area); + } + + @media (forced-colors: active) { + .divider { + outline: solid 1px transparent; + } + } +`;function Ax(r,n){function i(c){const u=r.getBoundingClientRect(),f=r.ownerDocument.defaultView,m=u.left+f.scrollX,g=u.top+f.scrollY,w=c.pageX-m,S=c.pageY-g;n!=null&&n.onMove&&n.onMove(w,S)}function s(){document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",s),n!=null&&n.onStop&&n.onStop()}document.addEventListener("pointermove",i,{passive:!0}),document.addEventListener("pointerup",s),(n==null?void 0:n.initialEvent)instanceof PointerEvent&&i(n.initialEvent)}function zh(r,n,i){const s=c=>Object.is(c,-0)?0:c;return ri?s(i):s(r)}/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const Ge=r=>r??Wt;var ve=class extends Ae{constructor(){super(...arguments),this.localize=new mi(this),this.position=50,this.vertical=!1,this.disabled=!1,this.snapThreshold=12}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(r=>this.handleResize(r)),this.updateComplete.then(()=>this.resizeObserver.observe(this)),this.detectSize(),this.cachedPositionInPixels=this.percentageToPixels(this.position)}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.resizeObserver)==null||r.unobserve(this)}detectSize(){const{width:r,height:n}=this.getBoundingClientRect();this.size=this.vertical?n:r}percentageToPixels(r){return this.size*(r/100)}pixelsToPercentage(r){return r/this.size*100}handleDrag(r){const n=this.localize.dir()==="rtl";this.disabled||(r.cancelable&&r.preventDefault(),Ax(this,{onMove:(i,s)=>{let c=this.vertical?s:i;this.primary==="end"&&(c=this.size-c),this.snap&&this.snap.split(" ").forEach(u=>{let f;u.endsWith("%")?f=this.size*(parseFloat(u)/100):f=parseFloat(u),n&&!this.vertical&&(f=this.size-f),c>=f-this.snapThreshold&&c<=f+this.snapThreshold&&(c=f)}),this.position=zh(this.pixelsToPercentage(c),0,100)},initialEvent:r}))}handleKeyDown(r){if(!this.disabled&&["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(r.key)){let n=this.position;const i=(r.shiftKey?10:1)*(this.primary==="end"?-1:1);r.preventDefault(),(r.key==="ArrowLeft"&&!this.vertical||r.key==="ArrowUp"&&this.vertical)&&(n-=i),(r.key==="ArrowRight"&&!this.vertical||r.key==="ArrowDown"&&this.vertical)&&(n+=i),r.key==="Home"&&(n=this.primary==="end"?100:0),r.key==="End"&&(n=this.primary==="end"?0:100),this.position=zh(n,0,100)}}handleResize(r){const{width:n,height:i}=r[0].contentRect;this.size=this.vertical?i:n,(isNaN(this.cachedPositionInPixels)||this.position===1/0)&&(this.cachedPositionInPixels=Number(this.getAttribute("position-in-pixels")),this.positionInPixels=Number(this.getAttribute("position-in-pixels")),this.position=this.pixelsToPercentage(this.positionInPixels)),this.primary&&(this.position=this.pixelsToPercentage(this.cachedPositionInPixels))}handlePositionChange(){this.cachedPositionInPixels=this.percentageToPixels(this.position),this.positionInPixels=this.percentageToPixels(this.position),this.emit("sl-reposition")}handlePositionInPixelsChange(){this.position=this.pixelsToPercentage(this.positionInPixels)}handleVerticalChange(){this.detectSize()}render(){const r=this.vertical?"gridTemplateRows":"gridTemplateColumns",n=this.vertical?"gridTemplateColumns":"gridTemplateRows",i=this.localize.dir()==="rtl",s=` + clamp( + 0%, + clamp( + var(--min), + ${this.position}% - var(--divider-width) / 2, + var(--max) + ), + calc(100% - var(--divider-width)) + ) + `,c="auto";return this.primary==="end"?i&&!this.vertical?this.style[r]=`${s} var(--divider-width) ${c}`:this.style[r]=`${c} var(--divider-width) ${s}`:i&&!this.vertical?this.style[r]=`${c} var(--divider-width) ${s}`:this.style[r]=`${s} var(--divider-width) ${c}`,this.style[n]="",G` + + + + + + `}};ve.styles=[wr,zx];O([Ue(".divider")],ve.prototype,"divider",2);O([K({type:Number,reflect:!0})],ve.prototype,"position",2);O([K({attribute:"position-in-pixels",type:Number})],ve.prototype,"positionInPixels",2);O([K({type:Boolean,reflect:!0})],ve.prototype,"vertical",2);O([K({type:Boolean,reflect:!0})],ve.prototype,"disabled",2);O([K()],ve.prototype,"primary",2);O([K()],ve.prototype,"snap",2);O([K({type:Number,attribute:"snap-threshold"})],ve.prototype,"snapThreshold",2);O([de("position")],ve.prototype,"handlePositionChange",1);O([de("positionInPixels")],ve.prototype,"handlePositionInPixelsChange",1);O([de("vertical")],ve.prototype,"handleVerticalChange",1);var Bs=ve;ve.define("sl-split-panel");const Tx=`:host { + --divider-width: var(--step-6); + --divider-hit-area: var(--step-8); + + --split-pane-knob-width: calc(var(--step) + 1px); + --split-pane-knob-height: var(--step-12); + --split-pane-width: 1px; + --split-pane-height: 100%; + --split-pane-padding: var(--step-8) 1px; + --split-pane-margin: 0 var(--step-3); + + width: 100%; + height: 100%; +} +:host([vertical]) { + --split-pane-knob-width: var(--step-12); + --split-pane-knob-height: calc(var(--step) + 1px); + --split-pane-width: 100%; + --split-pane-height: 1px; + --split-pane-padding: 1px var(--step-8); + --split-pane-margin: var(--step-3) 0; +} +[part='divider'] { + margin: var(--split-pane-margin); + padding: var(--split-pane-padding); + width: var(--split-pane-width); + height: var(--split-pane-height); + background: var(--color-gray-100); +} +::slotted([slot='divider']) { + position: absolute; + border-radius: var(--radius-s); + background: var(--color-gray-200); + width: var(--split-pane-knob-width); + height: var(--split-pane-knob-height); +} +`;class No extends _r(Bs){}Y(No,"styles",[jt(),Bs.styles,ft(Tx)]),Y(No,"properties",{...Bs.properties});const Ex=`:host { + --details-background: var(--color-variant-lucid); + --details-color: var(--color-variant); + --details-summary-color: var(--color-variant); + --details-summary-background: var(--color-variant-lucid); + --details-summary-background-hover: var(--color-variant-10); + --details-border: none; + --details-summary-shadow: none; +} +:host([outline]) { + --details-border: 1px solid var(--color-gray-200); +} +:host([ghost]) { + --details-summary-background: transparent; + --details-background: transparent; + --details-summary-background-hover: var(--color-variant-lucid); +} +:host([shadow]) { + --details-summary-shadow: var(--shadow-s); +} +:host(:hover) { + --details-summary-background: var(--details-summary-background-hover); +} +details { + border-radius: var(--details-radius); + background: var(--details-background); +} +summary { + cursor: pointer; + display: flex; + align-items: center; + justify-content: space-between; + padding: var(--details-padding-y) var(--details-padding-x); + background: var(--details-summary-background); + color: var(--details-summary-color); + font-size: var(--details-font-size); + border: var(--details-border); + border-radius: var(--details-radius); + overflow: hidden; + box-shadow: var(--details-summary-shadow); +} +summary::marker { + content: none; +} +summary > [name='plus'], +[open] summary > [name='minus'] { + display: block; +} +summary > [name='minus'], +[open] summary > [name='plus'] { + display: none; +} +[part='content'] { + padding: calc(var(--details-padding-y) * 2) var(--details-padding-x); + color: var(--details-color); + display: flex; + flex-direction: column; + overflow: hidden; +} +`;class Fo extends pe{constructor(){super(),this.variant=yt.Neutral,this.shape=Je.Round,this.size=Mt.M,this.summary="Details",this.outline=!1,this.ghost=!1,this.open=!1,this.shadow=!1}connectedCallback(){super.connectedCallback(),oe(Ns(this.summary),'"summary" must be a string')}render(){return G` +
+ + ${this.summary} + + + +
+ +
+
+ `}}Y(Fo,"styles",[jt(),Vs(),Mn(),fe("details"),gi("details"),$r("details",1.25,2),ft(Ex)]),Y(Fo,"properties",{summary:{type:String},outline:{type:Boolean,reflect:!0},ghost:{type:Boolean,reflect:!0},open:{type:Boolean,reflect:!0},shape:{type:String,reflect:!0},size:{type:String,reflect:!0},shadow:{type:Boolean,reflect:!0},variant:{type:String,reflect:!0}});var Px=ar` + :host { + display: inline-block; + } + + .tab { + display: inline-flex; + align-items: center; + font-family: var(--sl-font-sans); + font-size: var(--sl-font-size-small); + font-weight: var(--sl-font-weight-semibold); + border-radius: var(--sl-border-radius-medium); + color: var(--sl-color-neutral-600); + padding: var(--sl-spacing-medium) var(--sl-spacing-large); + white-space: nowrap; + user-select: none; + -webkit-user-select: none; + cursor: pointer; + transition: + var(--transition-speed) box-shadow, + var(--transition-speed) color; + } + + .tab:hover:not(.tab--disabled) { + color: var(--sl-color-primary-600); + } + + :host(:focus) { + outline: transparent; + } + + :host(:focus-visible):not([disabled]) { + color: var(--sl-color-primary-600); + } + + :host(:focus-visible) { + outline: var(--sl-focus-ring); + outline-offset: calc(-1 * var(--sl-focus-ring-width) - var(--sl-focus-ring-offset)); + } + + .tab.tab--active:not(.tab--disabled) { + color: var(--sl-color-primary-600); + } + + .tab.tab--closable { + padding-inline-end: var(--sl-spacing-small); + } + + .tab.tab--disabled { + opacity: 0.5; + cursor: not-allowed; + } + + .tab__close-button { + font-size: var(--sl-font-size-small); + margin-inline-start: var(--sl-spacing-small); + } + + .tab__close-button::part(base) { + padding: var(--sl-spacing-3x-small); + } + + @media (forced-colors: active) { + .tab.tab--active:not(.tab--disabled) { + outline: solid 1px transparent; + outline-offset: -3px; + } + } +`,Mx=ar` + :host { + display: inline-block; + color: var(--sl-color-neutral-600); + } + + .icon-button { + flex: 0 0 auto; + display: flex; + align-items: center; + background: none; + border: none; + border-radius: var(--sl-border-radius-medium); + font-size: inherit; + color: inherit; + padding: var(--sl-spacing-x-small); + cursor: pointer; + transition: var(--sl-transition-x-fast) color; + -webkit-appearance: none; + } + + .icon-button:hover:not(.icon-button--disabled), + .icon-button:focus-visible:not(.icon-button--disabled) { + color: var(--sl-color-primary-600); + } + + .icon-button:active:not(.icon-button--disabled) { + color: var(--sl-color-primary-700); + } + + .icon-button:focus { + outline: none; + } + + .icon-button--disabled { + opacity: 0.5; + cursor: not-allowed; + } + + .icon-button:focus-visible { + outline: var(--sl-focus-ring); + outline-offset: var(--sl-focus-ring-offset); + } + + .icon-button__icon { + pointer-events: none; + } +`;/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */const vd=Symbol.for(""),Ox=r=>{if((r==null?void 0:r.r)===vd)return r==null?void 0:r._$litStatic$},Ah=(r,...n)=>({_$litStatic$:n.reduce((i,s,c)=>i+(u=>{if(u._$litStatic$!==void 0)return u._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${u}. Use 'unsafeStatic' to pass non-literal values, but + take care to ensure page security.`)})(s)+r[c+1],r[0]),r:vd}),Th=new Map,Rx=r=>(n,...i)=>{const s=i.length;let c,u;const f=[],m=[];let g,w=0,S=!1;for(;w + + + `}};ge.styles=[wr,Mx];ge.dependencies={"sl-icon":De};O([Ue(".icon-button")],ge.prototype,"button",2);O([pi()],ge.prototype,"hasFocus",2);O([K()],ge.prototype,"name",2);O([K()],ge.prototype,"library",2);O([K()],ge.prototype,"src",2);O([K()],ge.prototype,"href",2);O([K()],ge.prototype,"target",2);O([K()],ge.prototype,"download",2);O([K()],ge.prototype,"label",2);O([K({type:Boolean,reflect:!0})],ge.prototype,"disabled",2);var Bx=0,ze=class extends Ae{constructor(){super(...arguments),this.localize=new mi(this),this.attrId=++Bx,this.componentId=`sl-tab-${this.attrId}`,this.panel="",this.active=!1,this.closable=!1,this.disabled=!1,this.tabIndex=0}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleCloseClick(r){r.stopPropagation(),this.emit("sl-close")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.disabled&&!this.active?this.tabIndex=-1:this.tabIndex=0}render(){return this.id=this.id.length>0?this.id:this.componentId,G` +
+ + ${this.closable?G` + + `:""} +
+ `}};ze.styles=[wr,Px];ze.dependencies={"sl-icon-button":ge};O([Ue(".tab")],ze.prototype,"tab",2);O([K({reflect:!0})],ze.prototype,"panel",2);O([K({type:Boolean,reflect:!0})],ze.prototype,"active",2);O([K({type:Boolean,reflect:!0})],ze.prototype,"closable",2);O([K({type:Boolean,reflect:!0})],ze.prototype,"disabled",2);O([K({type:Number,reflect:!0})],ze.prototype,"tabIndex",2);O([de("active")],ze.prototype,"handleActiveChange",1);O([de("disabled")],ze.prototype,"handleDisabledChange",1);const Dx=`:host { + --tab-font-size: var(--font-size); + --tab-background: var(--color-variant-lucid); + --tab-color: var(--color-variant); + + display: block; + font-family: var(--font-mono); + font-weight: var(--text-bold); + margin: 0; + border-style: solid; + border-width: 0; + border-color: transparent; +} +:host([active]) [part='base'], +:host([active]:hover) [part='base'] { + background: var(--tab-background); + color: var(--tab-color); + cursor: default; +} +:host([active]) { + border-color: var(--color-variant); +} +[part='base'] { + width: 100%; + padding: var(--tab-padding-y) var(--tab-padding-x); + border-radius: var(--radius-2xs); + outline: none; + color: var(--color-gray-400); +} +:host(:hover) [part='base'] { + background: var(--color-gray-5); + color: var(--color-gray-400); +} +:host([active][inverse]) [part='base'] { + --tab-background: var(--color-variant); + --tab-color: var(--color-variant-light); +} +`;class Ho extends _r(ze,Qo){constructor(){super(),Y(this,"componentId",`tbk-tab-${this.attrId}`),this.size=Mt.M,this.shape=Je.Round,this.inverse=!1}}Y(Ho,"styles",[ze.styles,jt(),fe(),Mn(),gi("tab"),$r("tab",1.75,4),ft(Dx)]),Y(Ho,"properties",{...ze.properties,size:{type:String,reflect:!0},shape:{type:String,reflect:!0},inverse:{type:Boolean,reflect:!0},variant:{type:String}});const jx=`:host { + --indicator-color: transparent; + --track-color: var(--color-gray-5); + --track-width: var(--half); + --tabs-font-size: var(--font-size); + --tabs-color: var(--color-variant); + + width: 100%; + height: 100%; +} +:host-context([mode='dark']) { + --tabs-color: var(--color-variant-light); +} +[part='nav'].tab-group__nav-container { + padding-bottom: 0; + padding-top: 0; + margin-bottom: var(--step-2); + padding: 0; +} +:host([placement='bottom']) [part='nav'].tab-group__nav-container { + margin-top: var(--step); + margin-bottom: 0; +} +:host([placement='start']) [part='nav'].tab-group__nav-container, +:host([placement='end']) [part='nav'].tab-group__nav-container { + margin-bottom: 0; +} +[part='base'] { + width: 100%; + height: 100%; + font-size: var(--tabs-font-size); + font-weight: var(--text-bold); + padding: 0 var(--step); +} +:host([fullwidth]) ::slotted(tbk-tab) { + flex: 1; +} +::slotted(tbk-tab) { + padding: var(--step-3) 0; + border-bottom-width: var(--half); +} +:host([placement='start']) ::slotted(tbk-tab) { + padding: 0 var(--step-3); + border-width: 0; + border-right-width: var(--half); +} +:host([placement='end']) ::slotted(tbk-tab) { + padding: 0 var(--step-3); + border-width: 0; + border-left-width: var(--half); +} +:host([placement='bottom']) ::slotted(tbk-tab) { + padding: var(--step-3) 0; + border-width: 0; + border-top-width: var(--half); +} +[part='tabs'] { + gap: var(--step); +} +.tab-group--start .tab-group__tabs { + border: 0; + box-shadow: inset calc(var(--track-width) * -1) 0 0 0 var(--track-color); +} +.tab-group--end .tab-group__tabs { + border: 0; + box-shadow: inset calc(var(--track-width)) 0 0 0 var(--track-color); +} +.tab-group--bottom .tab-group__tabs { + border: 0; + box-shadow: inset 0 calc(var(--track-width)) 0 0 var(--track-color); +} +.tab-group--top .tab-group__tabs { + border: 0; + box-shadow: inset 0 calc(var(--track-width) * -1) 0 0 var(--track-color); +} +[part='nav'].tab-group__nav-container tbk-tab { + padding: 0; +} +`;var Ix=ar` + :host { + --indicator-color: var(--sl-color-primary-600); + --track-color: var(--sl-color-neutral-200); + --track-width: 2px; + + display: block; + } + + .tab-group { + display: flex; + border-radius: 0; + } + + .tab-group__tabs { + display: flex; + position: relative; + } + + .tab-group__indicator { + position: absolute; + transition: + var(--sl-transition-fast) translate ease, + var(--sl-transition-fast) width ease; + } + + .tab-group--has-scroll-controls .tab-group__nav-container { + position: relative; + padding: 0 var(--sl-spacing-x-large); + } + + .tab-group--has-scroll-controls .tab-group__scroll-button--start--hidden, + .tab-group--has-scroll-controls .tab-group__scroll-button--end--hidden { + visibility: hidden; + } + + .tab-group__body { + display: block; + overflow: auto; + } + + .tab-group__scroll-button { + display: flex; + align-items: center; + justify-content: center; + position: absolute; + top: 0; + bottom: 0; + width: var(--sl-spacing-x-large); + } + + .tab-group__scroll-button--start { + left: 0; + } + + .tab-group__scroll-button--end { + right: 0; + } + + .tab-group--rtl .tab-group__scroll-button--start { + left: auto; + right: 0; + } + + .tab-group--rtl .tab-group__scroll-button--end { + left: 0; + right: auto; + } + + /* + * Top + */ + + .tab-group--top { + flex-direction: column; + } + + .tab-group--top .tab-group__nav-container { + order: 1; + } + + .tab-group--top .tab-group__nav { + display: flex; + overflow-x: auto; + + /* Hide scrollbar in Firefox */ + scrollbar-width: none; + } + + /* Hide scrollbar in Chrome/Safari */ + .tab-group--top .tab-group__nav::-webkit-scrollbar { + width: 0; + height: 0; + } + + .tab-group--top .tab-group__tabs { + flex: 1 1 auto; + position: relative; + flex-direction: row; + border-bottom: solid var(--track-width) var(--track-color); + } + + .tab-group--top .tab-group__indicator { + bottom: calc(-1 * var(--track-width)); + border-bottom: solid var(--track-width) var(--indicator-color); + } + + .tab-group--top .tab-group__body { + order: 2; + } + + .tab-group--top ::slotted(sl-tab-panel) { + --padding: var(--sl-spacing-medium) 0; + } + + /* + * Bottom + */ + + .tab-group--bottom { + flex-direction: column; + } + + .tab-group--bottom .tab-group__nav-container { + order: 2; + } + + .tab-group--bottom .tab-group__nav { + display: flex; + overflow-x: auto; + + /* Hide scrollbar in Firefox */ + scrollbar-width: none; + } + + /* Hide scrollbar in Chrome/Safari */ + .tab-group--bottom .tab-group__nav::-webkit-scrollbar { + width: 0; + height: 0; + } + + .tab-group--bottom .tab-group__tabs { + flex: 1 1 auto; + position: relative; + flex-direction: row; + border-top: solid var(--track-width) var(--track-color); + } + + .tab-group--bottom .tab-group__indicator { + top: calc(-1 * var(--track-width)); + border-top: solid var(--track-width) var(--indicator-color); + } + + .tab-group--bottom .tab-group__body { + order: 1; + } + + .tab-group--bottom ::slotted(sl-tab-panel) { + --padding: var(--sl-spacing-medium) 0; + } + + /* + * Start + */ + + .tab-group--start { + flex-direction: row; + } + + .tab-group--start .tab-group__nav-container { + order: 1; + } + + .tab-group--start .tab-group__tabs { + flex: 0 0 auto; + flex-direction: column; + border-inline-end: solid var(--track-width) var(--track-color); + } + + .tab-group--start .tab-group__indicator { + right: calc(-1 * var(--track-width)); + border-right: solid var(--track-width) var(--indicator-color); + } + + .tab-group--start.tab-group--rtl .tab-group__indicator { + right: auto; + left: calc(-1 * var(--track-width)); + } + + .tab-group--start .tab-group__body { + flex: 1 1 auto; + order: 2; + } + + .tab-group--start ::slotted(sl-tab-panel) { + --padding: 0 var(--sl-spacing-medium); + } + + /* + * End + */ + + .tab-group--end { + flex-direction: row; + } + + .tab-group--end .tab-group__nav-container { + order: 2; + } + + .tab-group--end .tab-group__tabs { + flex: 0 0 auto; + flex-direction: column; + border-left: solid var(--track-width) var(--track-color); + } + + .tab-group--end .tab-group__indicator { + left: calc(-1 * var(--track-width)); + border-inline-start: solid var(--track-width) var(--indicator-color); + } + + .tab-group--end.tab-group--rtl .tab-group__indicator { + right: calc(-1 * var(--track-width)); + left: auto; + } + + .tab-group--end .tab-group__body { + flex: 1 1 auto; + order: 1; + } + + .tab-group--end ::slotted(sl-tab-panel) { + --padding: 0 var(--sl-spacing-medium); + } +`;function Ux(r,n){return{top:Math.round(r.getBoundingClientRect().top-n.getBoundingClientRect().top),left:Math.round(r.getBoundingClientRect().left-n.getBoundingClientRect().left)}}function Eh(r,n,i="vertical",s="smooth"){const c=Ux(r,n),u=c.top+n.scrollTop,f=c.left+n.scrollLeft,m=n.scrollLeft,g=n.scrollLeft+n.offsetWidth,w=n.scrollTop,S=n.scrollTop+n.offsetHeight;(i==="horizontal"||i==="both")&&(fg&&n.scrollTo({left:f-n.offsetWidth+r.clientWidth,behavior:s})),(i==="vertical"||i==="both")&&(uS&&n.scrollTo({top:u-n.offsetHeight+r.clientHeight,behavior:s}))}var Vt=class extends Ae{constructor(){super(...arguments),this.tabs=[],this.focusableTabs=[],this.panels=[],this.localize=new mi(this),this.hasScrollControls=!1,this.shouldHideScrollStartButton=!1,this.shouldHideScrollEndButton=!1,this.placement="top",this.activation="auto",this.noScrollControls=!1,this.fixedScrollControls=!1,this.scrollOffset=1}connectedCallback(){const r=Promise.all([customElements.whenDefined("sl-tab"),customElements.whenDefined("sl-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.repositionIndicator(),this.updateScrollControls()}),this.mutationObserver=new MutationObserver(n=>{n.some(i=>!["aria-labelledby","aria-controls"].includes(i.attributeName))&&setTimeout(()=>this.setAriaLabels()),n.some(i=>i.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),r.then(()=>{new IntersectionObserver((n,i)=>{var s;n[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((s=this.getActiveTab())!=null?s:this.tabs[0],{emitEvents:!1}),i.unobserve(n[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){var r,n;super.disconnectedCallback(),(r=this.mutationObserver)==null||r.disconnect(),this.nav&&((n=this.resizeObserver)==null||n.unobserve(this.nav))}getAllTabs(){return this.shadowRoot.querySelector('slot[name="nav"]').assignedElements()}getAllPanels(){return[...this.body.assignedElements()].filter(r=>r.tagName.toLowerCase()==="sl-tab-panel")}getActiveTab(){return this.tabs.find(r=>r.active)}handleClick(r){const n=r.target.closest("sl-tab");(n==null?void 0:n.closest("sl-tab-group"))===this&&n!==null&&this.setActiveTab(n,{scrollBehavior:"smooth"})}handleKeyDown(r){const n=r.target.closest("sl-tab");if((n==null?void 0:n.closest("sl-tab-group"))===this&&(["Enter"," "].includes(r.key)&&n!==null&&(this.setActiveTab(n,{scrollBehavior:"smooth"}),r.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(r.key))){const i=this.tabs.find(u=>u.matches(":focus")),s=this.localize.dir()==="rtl";let c=null;if((i==null?void 0:i.tagName.toLowerCase())==="sl-tab"){if(r.key==="Home")c=this.focusableTabs[0];else if(r.key==="End")c=this.focusableTabs[this.focusableTabs.length-1];else if(["top","bottom"].includes(this.placement)&&r.key===(s?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&r.key==="ArrowUp"){const u=this.tabs.findIndex(f=>f===i);c=this.findNextFocusableTab(u,"backward")}else if(["top","bottom"].includes(this.placement)&&r.key===(s?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&r.key==="ArrowDown"){const u=this.tabs.findIndex(f=>f===i);c=this.findNextFocusableTab(u,"forward")}if(!c)return;c.tabIndex=0,c.focus({preventScroll:!0}),this.activation==="auto"?this.setActiveTab(c,{scrollBehavior:"smooth"}):this.tabs.forEach(u=>{u.tabIndex=u===c?0:-1}),["top","bottom"].includes(this.placement)&&Eh(c,this.nav,"horizontal"),r.preventDefault()}}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(r,n){if(n=fi({emitEvents:!0,scrollBehavior:"auto"},n),r!==this.activeTab&&!r.disabled){const i=this.activeTab;this.activeTab=r,this.tabs.forEach(s=>{s.active=s===this.activeTab,s.tabIndex=s===this.activeTab?0:-1}),this.panels.forEach(s=>{var c;return s.active=s.name===((c=this.activeTab)==null?void 0:c.panel)}),this.syncIndicator(),["top","bottom"].includes(this.placement)&&Eh(this.activeTab,this.nav,"horizontal",n.scrollBehavior),n.emitEvents&&(i&&this.emit("sl-tab-hide",{detail:{name:i.panel}}),this.emit("sl-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(r=>{const n=this.panels.find(i=>i.name===r.panel);n&&(r.setAttribute("aria-controls",n.getAttribute("id")),n.setAttribute("aria-labelledby",r.getAttribute("id")))})}repositionIndicator(){const r=this.getActiveTab();if(!r)return;const n=r.clientWidth,i=r.clientHeight,s=this.localize.dir()==="rtl",c=this.getAllTabs(),u=c.slice(0,c.indexOf(r)).reduce((f,m)=>({left:f.left+m.clientWidth,top:f.top+m.clientHeight}),{left:0,top:0});switch(this.placement){case"top":case"bottom":this.indicator.style.width=`${n}px`,this.indicator.style.height="auto",this.indicator.style.translate=s?`${-1*u.left}px`:`${u.left}px`;break;case"start":case"end":this.indicator.style.width="auto",this.indicator.style.height=`${i}px`,this.indicator.style.translate=`0 ${u.top}px`;break}}syncTabsAndPanels(){this.tabs=this.getAllTabs(),this.focusableTabs=this.tabs.filter(r=>!r.disabled),this.panels=this.getAllPanels(),this.syncIndicator(),this.updateComplete.then(()=>this.updateScrollControls())}findNextFocusableTab(r,n){let i=null;const s=n==="forward"?1:-1;let c=r+s;for(;r=this.nav.scrollWidth-this.scrollOffset}scrollFromStart(){return this.localize.dir()==="rtl"?-this.nav.scrollLeft:this.nav.scrollLeft}updateScrollControls(){this.noScrollControls?this.hasScrollControls=!1:this.hasScrollControls=["top","bottom"].includes(this.placement)&&this.nav.scrollWidth>this.nav.clientWidth+1,this.updateScrollButtons()}syncIndicator(){this.getActiveTab()?(this.indicator.style.display="block",this.repositionIndicator()):this.indicator.style.display="none"}show(r){const n=this.tabs.find(i=>i.panel===r);n&&this.setActiveTab(n,{scrollBehavior:"smooth"})}render(){const r=this.localize.dir()==="rtl";return G` +
+
+ ${this.hasScrollControls?G` + + `:""} + +
+
+
+ + + +
+
+ + ${this.hasScrollControls?G` + + `:""} +
+ + +
+ `}};Vt.styles=[wr,Ix];Vt.dependencies={"sl-icon-button":ge,"sl-resize-observer":An};O([Ue(".tab-group")],Vt.prototype,"tabGroup",2);O([Ue(".tab-group__body")],Vt.prototype,"body",2);O([Ue(".tab-group__nav")],Vt.prototype,"nav",2);O([Ue(".tab-group__indicator")],Vt.prototype,"indicator",2);O([pi()],Vt.prototype,"hasScrollControls",2);O([pi()],Vt.prototype,"shouldHideScrollStartButton",2);O([pi()],Vt.prototype,"shouldHideScrollEndButton",2);O([K()],Vt.prototype,"placement",2);O([K()],Vt.prototype,"activation",2);O([K({attribute:"no-scroll-controls",type:Boolean})],Vt.prototype,"noScrollControls",2);O([K({attribute:"fixed-scroll-controls",type:Boolean})],Vt.prototype,"fixedScrollControls",2);O([Ky({passive:!0})],Vt.prototype,"updateScrollButtons",1);O([de("noScrollControls",{waitUntilFirstUpdate:!0})],Vt.prototype,"updateScrollControls",1);O([de("placement",{waitUntilFirstUpdate:!0})],Vt.prototype,"syncIndicator",1);var Nx=(r,n)=>{let i=0;return function(...s){window.clearTimeout(i),i=window.setTimeout(()=>{r.call(this,...s)},n)}},Ph=(r,n,i)=>{const s=r[n];r[n]=function(...c){s.call(this,...c),i.call(this,s,...c)}},Fx="onscrollend"in window;if(!Fx){const r=new Set,n=new WeakMap,i=c=>{for(const u of c.changedTouches)r.add(u.identifier)},s=c=>{for(const u of c.changedTouches)r.delete(u.identifier)};document.addEventListener("touchstart",i,!0),document.addEventListener("touchend",s,!0),document.addEventListener("touchcancel",s,!0),Ph(EventTarget.prototype,"addEventListener",function(c,u){if(u!=="scrollend")return;const f=Nx(()=>{r.size?f():this.dispatchEvent(new Event("scrollend"))},100);c.call(this,"scroll",f,{passive:!0}),n.set(this,f)}),Ph(EventTarget.prototype,"removeEventListener",function(c,u){if(u!=="scrollend")return;const f=n.get(this);f&&c.call(this,"scroll",f,{passive:!0})})}class Wo extends _r(Vt){constructor(){super(),this.size=Mt.M,this.inverse=!1,this.placement=mw.Top,this.variant=yt.Neutral,this.fullwidth=!1}get elSlotNav(){var n;return(n=this.renderRoot)==null?void 0:n.querySelector('slot[name="nav"]')}async firstUpdated(){this.resizeObserver=new ResizeObserver(()=>{this.repositionIndicator(),this.updateScrollControls()}),this.mutationObserver=new MutationObserver(i=>{i.some(s=>xt(["aria-labelledby","aria-controls"].includes(s.attributeName)))&&setTimeout(()=>this.setAriaLabels()),i.some(s=>s.attributeName==="disabled")&&this.syncTabsAndPanels()});const n=Promise.all([customElements.whenDefined("tbk-tab"),customElements.whenDefined("tbk-tab-panel")]);await super.firstUpdated(),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),n.then(()=>{setTimeout(()=>{new IntersectionObserver((i,s)=>{i[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab(this.getActiveTab()??this.tabs[0],{emitEvents:!1}),s.unobserve(i[0].target))}).observe(this.tabGroup),this.getAllTabs().forEach(i=>{i.setAttribute("size",this.size),qt(i.variant)&&(i.variant=this.variant),this.inverse&&(i.inverse=this.inverse)}),this.getAllPanels().forEach(i=>{i.setAttribute("size",this.size),qt(i.getAttribute("variant"))&&i.setAttribute("variant",this.variant)})},500)})})}getAllTabs(n={includeDisabled:!0}){return(this.elSlotNav?[...this.elSlotNav.assignedElements()]:[]).filter(i=>n.includeDisabled?i.tagName.toLowerCase()==="tbk-tab":i.tagName.toLowerCase()==="tbk-tab"&&!i.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(n=>n.tagName.toLowerCase()==="tbk-tab-panel")}handleClick(n){const i=n.target.closest("tbk-tab");(i==null?void 0:i.closest("tbk-tabs"))===this&&i!==null&&(this.setActiveTab(i,{scrollBehavior:"smooth"}),this.emit("tab-change",{detail:new this.emit.EventDetail(i.panel,n)}))}handleKeyDown(n){const i=n.target.closest("tbk-tab");if((i==null?void 0:i.closest("tbk-tabs"))===this&&(["Enter"," "].includes(n.key)&&i!==null&&(this.setActiveTab(i,{scrollBehavior:"smooth"}),n.preventDefault()),["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(n.key))){const s=this.tabs.find(u=>u.matches(":focus")),c=this.localize.dir()==="rtl";if((s==null?void 0:s.tagName.toLowerCase())==="tbk-tab"){let u=this.tabs.indexOf(s);n.key==="Home"?u=0:n.key==="End"?u=this.tabs.length-1:["top","bottom"].includes(this.placement)&&n.key===(c?"ArrowRight":"ArrowLeft")||["start","end"].includes(this.placement)&&n.key==="ArrowUp"?u--:(["top","bottom"].includes(this.placement)&&n.key===(c?"ArrowLeft":"ArrowRight")||["start","end"].includes(this.placement)&&n.key==="ArrowDown")&&u++,u<0&&(u=this.tabs.length-1),u>this.tabs.length-1&&(u=0),this.tabs[u].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[u],{scrollBehavior:"smooth"}),["top","bottom"].includes(this.placement)&&fw(this.tabs[u],this.nav,"horizontal"),n.preventDefault()}}}}Y(Wo,"styles",[Vt.styles,jt(),fe(),Mn(),$r("tabs",1.25,4),ft(jx)]),Y(Wo,"properties",{...Vt.properties,size:{type:String,reflect:!0},variant:{type:String,reflect:!0},inverse:{type:Boolean,reflect:!0},fullwidth:{type:Boolean,reflect:!0}});var Hx=ar` + :host { + --padding: 0; + + display: none; + } + + :host([active]) { + display: block; + } + + .tab-panel { + display: block; + padding: var(--padding); + } +`,Wx=0,nn=class extends Ae{constructor(){super(...arguments),this.attrId=++Wx,this.componentId=`sl-tab-panel-${this.attrId}`,this.name="",this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return G` + + `}};nn.styles=[wr,Hx];O([K({reflect:!0})],nn.prototype,"name",2);O([K({type:Boolean,reflect:!0})],nn.prototype,"active",2);O([de("active")],nn.prototype,"handleActiveChange",1);const qx=`:host { + --tab-panel-font-size: var(--font-size); + + width: 100%; + height: 100%; +} +[part='base'] { + width: 100%; + height: 100%; + padding-top: 0; + padding-bottom: 0; +} +`;class qo extends _r(nn,Qo){constructor(){super(),Y(this,"componentId",`tbk-tab-panel-${this.attrId}`),this.size=Mt.M}}Y(qo,"styles",[nn.styles,jt(),fe(),$r("tab-panel",1.5,3),ft(qx)]),Y(qo,"properties",{...nn.properties,size:{type:String,reflect:!0}});const Yx=`:host { + --datetime-color: var(--color-gray-800); + --datetime-background-timezone: var(--color-gray-10); + + display: inline-flex; + align-items: center; + white-space: nowrap; +} +:host-context([mode='dark']) { + --datetime-color: var(--color-gray-200); +} +[part='timezone'] { + line-height: 1; + background: var(--datetime-background-timezone); + border-radius: calc(var(--font-size) / 3); + font-weight: var(--text-black); + padding: calc(var(--step)) calc(var(--step) + var(--step-3) / 4) calc(var(--step) - var(--half)) + var(--step-2); + text-transform: uppercase; + font-size: calc(var(--font-size) * 0.8); +} +[part='date'] { + padding: calc(var(--step)) var(--step-2) calc(var(--step) - var(--half)) var(--step-2); + font-weight: var(--text-semibold); +} +[part='time'] { + margin: 0; + padding: calc(var(--step)) var(--step-2) calc(var(--step) - var(--half)) 0; +} +tbk-badge::part(base) { + color: var(--datetime-color); + padding: 0; + font-variant-numeric: slashed-zero; + font-weight: var(--text-light); +} +`;function Vx(r){const n={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,timeZoneName:"short"};return new Intl.DateTimeFormat(Kx(),n).formatToParts(r).find(i=>i.type==="timeZoneName").value}function Kx(){var r;return typeof window<"u"&&window.navigator&&(((r=window.navigator.languages)==null?void 0:r[0])||window.navigator.language||window.navigator.userLanguage||window.navigator.browserLanguage)||"en-US"}class Yo extends _r(pe,s$){constructor(){super(),Y(this,"_defaultFormat","YYYY-MM-DD HH:mm:ss"),this.label="",this.date=Date.now(),this.format=this._defaultFormat,this.size=Mt.XXS,this.side=ir.Right,this.realtime=!1,this.hideTimezone=!1,this.hideDate=!1}get hasTime(){const n=this.format.toLowerCase();return n.includes("h")||n.includes("m")||n.includes("s")}firstUpdated(){super.firstUpdated();try{this._timestamp=Kh(+this.date)?+this.date:new Date(this.date).getTime()}catch{throw new Error("Invalid date format")}this.realtime&&(this._interval=setInterval(()=>{this._timestamp=Date.now()},1e3))}willUpdate(n){n.has("timezone")&&(this._displayTimezone=this.isUTC?Xe.title(Xe.UTC):Vx(new Date(this._timestamp)))}renderTimezone(){return Tt(xt(this.hideTimezone),G`${this._displayTimezone}`)}renderContent(){let n=[];if(this.format===this._defaultFormat){const[i,s]=(this.isUTC?rh(this._timestamp,this.format):nh(this._timestamp,this.format)).split(" ");n=[G`${i}`,s&&G`${s}`].filter(Boolean)}else{const i=this.isUTC?rh(this._timestamp,this.format):nh(this._timestamp,this.format);n=[G`${i}`]}return G`${n}`}render(){return G` + ${Tt(this.side===ir.Left,this.renderTimezone())} + ${Tt(xt(this.hideDate),this.renderContent())} + ${Tt(this.side===ir.Right,this.renderTimezone())} + `}}Y(Yo,"styles",[jt(),ft(Yx)]),Y(Yo,"properties",{date:{type:[String,Number],reflect:!0},size:{type:String,reflect:!0},side:{type:String,reflect:!0},realtime:{type:Boolean,reflect:!0},format:{type:String},hideTimezone:{type:Boolean,attribute:"hide-timezone"},hideDate:{type:Boolean,attribute:"hide-date"},_timestamp:{type:Number,state:!0},_displayTimezone:{type:String,state:!0}});si.defineAs("tbk-button");So.defineAs("tbk-icon");Eo.defineAs("tbk-tooltip");Po.defineAs("tbk-information");Mo.defineAs("tbk-text-block");Yo.defineAs("tbk-datetime");Fo.defineAs("tbk-details");Ho.defineAs("tbk-tab");qo.defineAs("tbk-tab-panel");Wo.defineAs("tbk-tabs");No.defineAs("tbk-split-pane");tl.defineAs("tbk-scroll");Uo.defineAs("tbk-metadata-section");Io.defineAs("tbk-metadata-item");jo.defineAs("tbk-metadata");Co.defineAs("tbk-badge");Ro.defineAs("tbk-model-name");pd.defineAs("tbk-resize-observer");Bo.defineAs("tbk-ui-source-list");Lo.defineAs("tbk-ui-source-list-item");Do.defineAs("tbk-ui-source-list-section");Dt({tagName:"tbk-button",elementClass:si,react:Rt});Dt({tagName:"tbk-icon",elementClass:So,react:Rt});Dt({tagName:"tbk-tooltip",elementClass:Eo,react:Rt});Dt({tagName:"tbk-information",elementClass:Po,react:Rt});Dt({tagName:"tbk-text-block",elementClass:Mo,react:Rt});const ik=Dt({tagName:"tbk-datetime",elementClass:Yo,react:Rt}),ok=Dt({tagName:"tbk-details",elementClass:Fo,react:Rt}),ak=Dt({tagName:"tbk-tabs",elementClass:Wo,react:Rt}),sk=Dt({tagName:"tbk-tab",elementClass:Ho,react:Rt}),lk=Dt({tagName:"tbk-tab-panel",elementClass:qo,react:Rt}),ck=Dt({tagName:"tbk-split-pane",elementClass:No,react:Rt,events:{onChange:"sl-reposition"}}),uk=Dt({tagName:"tbk-scroll",elementClass:tl,react:Rt}),hk=Dt({tagName:"tbk-metadata-section",elementClass:Uo,react:Rt}),dk=Dt({tagName:"tbk-metadata-item",elementClass:Io,react:Rt}),fk=Dt({tagName:"tbk-metadata",elementClass:jo,react:Rt}),pk=Dt({tagName:"tbk-badge",elementClass:Co,react:Rt}),Gx=Dt({tagName:"tbk-model-name",elementClass:Ro,react:Rt}),Xx=Dt({tagName:"tbk-resize-observer",elementClass:pd,react:Rt}),vk=Dt({tagName:"tbk-ui-source-list",elementClass:Bo,react:Rt,events:{onChange:"change"}}),gk=Dt({tagName:"tbk-ui-source-list-item",elementClass:Lo,react:Rt}),mk=Dt({tagName:"tbk-ui-source-list-section",elementClass:Do,react:Rt}),Zx=Rt.forwardRef(function({value:n,type:i,placeholder:s,size:c=Ze.md,autoFocus:u=!1,onInput:f,onKeyDown:m,className:g,disabled:w},S){return Ht.jsx(Pu,{className:g,size:c,children:({className:C})=>Ht.jsx(Pu.Textfield,{ref:S,type:i,className:Xr(C,"w-full"),autoFocus:u,placeholder:s,value:n,onInput:f,onKeyDown:m,disabled:w})})});function bk({list:r,size:n=Ze.md,searchBy:i,displayBy:s,descriptionBy:c,onSelect:u,to:f,placeholder:m="Search",autoFocus:g=!1,showIndex:w=!0,isFullWidth:S=!1,isLoading:C=!1,disabled:I=!1,direction:x="bottom",className:A,onInput:_}){const k=ty(),M=ue.useRef(null),q=ue.useRef(null),N=ue.useMemo(()=>r.map(Q=>[Q,Q[i]]),[r,i]),[ot,J]=ue.useState(co),[W,B]=ue.useState(0),R=sy(()=>{J(co)}),it=ot!==co,et=oy(N,ot);function Z(){var Q;B(0),J(co),(Q=q.current)==null||Q.focus()}function pt(){var D;const Q=(D=et[W])==null?void 0:D[0];ks(Q)||(ks(f)?u==null||u(Q):k(f(Q)),Z())}return Ht.jsx("div",{className:Xr("p-1 relative",I&&"opacity-50 cursor-not-allowed",A),ref:R,onKeyDown:Q=>{Q.key==="Escape"&&Z()},children:Ht.jsxs(Ss,{className:"relative flex w-full",children:[Ht.jsx(Ss.Button,{ref:q,as:Zx,className:Xr("w-full !m-0",I&&"pointer-events-none"),type:"search",size:n,value:ot,placeholder:m,onInput:Q=>{const D=Q.target.value.trim();J(D),_==null||_(D)},onKeyDown:Q=>{var D;(Q.key==="ArrowDown"||Q.key==="ArrowUp")&&((D=M.current)==null||D.focus())},autoFocus:g,disabled:I}),Ht.jsx(ay,{show:it,as:ue.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:Ht.jsx(Ss.Panel,{static:!0,className:Xr("absolute z-50 right-0 transform cursor-pointer rounded-lg bg-theme border-2 border-neutral-200","p-2 bg-theme dark:bg-theme-lighter overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal shadow-2xl",x==="top"?"top-0":"bottom-10",n===Ze.sm&&"mt-7 max-h-[30vh]",n===Ze.md&&"mt-9 max-h-[40vh]",n===Ze.lg&&"mt-12 max-h-[50vh]",S?"w-full":"w-full max-w-[20rem]"),ref:M,onKeyDown:Q=>{Q.key==="ArrowUp"&&W>0&&B(W-1),Q.key==="ArrowDown"&&W{Q.stopPropagation();const D=Q.target.closest('[role="menuitem"]');if(ks(D))return;const j=Number(D.dataset.index);B(Number(j))},children:Ht.jsx(Xx,{"update-selector":"tbk-model-name",children:ey(et)&&it?Ht.jsx("div",{className:Xr(n===Ze.sm&&"p-1",n===Ze.md&&"p-2",n===Ze.lg&&"p-3"),children:C?"Loading...":"No Results Found"},"not-found"):et.map(([Q,D],j)=>Ht.jsx("div",{role:"menuitem","data-index":j,className:Xr("cursor-pointer rounded-lg",W===j&&"bg-neutral-5"),children:Ht.jsx(Jx,{item:Q,index:D,search:ot,displayBy:s,descriptionBy:c,size:n,showIndex:w,onClick:L=>{L.stopPropagation(),L.preventDefault(),pt()}})},Q[i]))})})})]})})}function Jx({item:r,index:n,search:i,displayBy:s,descriptionBy:c,size:u,showIndex:f=!0,onClick:m}){return Ht.jsxs("div",{onClick:m,className:Xr("font-normal w-full overflow-hidden whitespace-nowrap overflow-ellipsis px-2",u===Ze.sm&&"text-xs py-1",u===Ze.md&&"text-sm py-2",u===Ze.lg&&"text-md py-3"),children:[f?Ht.jsxs(Ht.Fragment,{children:[Ht.jsx("span",{title:r[s],className:"font-bold flex",children:iy(r.isModel)?ny(r[s],50,20):Ht.jsx(Gx,{text:r[s]})}),Ht.jsx("small",{className:"block text-neutral-600 italic overflow-hidden whitespace-nowrap overflow-ellipsis",dangerouslySetInnerHTML:{__html:Mu(n,i)}})]}):Ht.jsx("span",{title:r[s],className:"font-bold",dangerouslySetInnerHTML:{__html:Mu(r[s],i)}}),ry(c)&&Ht.jsx("small",{className:"block text-neutral-600 italic overflow-hidden whitespace-nowrap overflow-ellipsis",children:r[c]})]})}export{bk as S,uk as T,ok as a,Xx as b,fk as c,hk as d,dk as e,Gx as f,pk as g,ik as h,ck as i,ak as j,sk as k,lk as l,vk as m,Ro as n,mk as o,gk as p,nk as u}; diff --git a/web/client/dist/assets/SelectEnvironment-C65jALmO.js b/web/client/dist/assets/SelectEnvironment-C65jALmO.js new file mode 100644 index 0000000000..ddb9f9f313 --- /dev/null +++ b/web/client/dist/assets/SelectEnvironment-C65jALmO.js @@ -0,0 +1,2 @@ +import{r as l,R as _,j as n,J as ye,i as pe,c as D,V as pt,a as W,g as Le,H as Ie,W as ft,v as Je,I as vt,l as de,B as Re,m as ce,d as gt,X as xt,b as Ge,Y as ht,Z as bt,F as yt}from"./index-Dj0i1-CA.js";import{L as wt}from"./context-BctCsyGb.js";import Et from"./ModelLineage-DkIFAYo4.js";import{n as J,a0 as Xe,a1 as It,a2 as Ve,B as Ye,a3 as Rt,d as ke,a4 as et,j as jt,K as z,S as Q,y as X,C as kt,o as $,L as H,a5 as Pt,a6 as Nt,a7 as Ct,a8 as $t,a9 as Mt,b as Ue,v as St,aa as Ot,G as Dt,D as Tt,p as Ft,_ as fe,ab as _t,ac as At,N as Bt,ad as Lt,ae as Gt,c as Vt,$ as Pe,W as Ne,X as Ut,Y as zt,w as ue,R as ze,a as j,af as Ht,T as Y,ag as tt,Z as Ce,ah as Zt,ai as Qt,aj as Wt,g as He,r as Ze,ak as rt,z as Kt}from"./popover-_Sf0yvOI.js";import{c as N,f as se,C as qt,Q as ve,s as Jt,b as Xt,w as $e,y as Yt,d as er,k as tr,g as oe,H as rr,V as ar,a as at,e as nr,l as sr,T as or,p as lr,j as ir,u as dr,N as cr,U as ur}from"./ListboxShow-BE5-xevs.js";import{V as we}from"./PlusCircleIcon-DVXAHG8_.js";import{I as Qe}from"./Input-B-oZ6fGO.js";import{r as je}from"./floating-ui.react-dom-CjE-JNW1.js";import{F as mr}from"./ChevronDownIcon-MK_nrjD_.js";function pr({title:e,titleId:r,...t},a){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),e?l.createElement("title",{id:r},e):null,l.createElement("path",{fillRule:"evenodd",d:"M10 4.5c1.215 0 2.417.055 3.604.162a.68.68 0 0 1 .615.597c.124 1.038.208 2.088.25 3.15l-1.689-1.69a.75.75 0 0 0-1.06 1.061l2.999 3a.75.75 0 0 0 1.06 0l3.001-3a.75.75 0 1 0-1.06-1.06l-1.748 1.747a41.31 41.31 0 0 0-.264-3.386 2.18 2.18 0 0 0-1.97-1.913 41.512 41.512 0 0 0-7.477 0 2.18 2.18 0 0 0-1.969 1.913 41.16 41.16 0 0 0-.16 1.61.75.75 0 1 0 1.495.12c.041-.52.093-1.038.154-1.552a.68.68 0 0 1 .615-.597A40.012 40.012 0 0 1 10 4.5ZM5.281 9.22a.75.75 0 0 0-1.06 0l-3.001 3a.75.75 0 1 0 1.06 1.06l1.748-1.747c.042 1.141.13 2.27.264 3.386a2.18 2.18 0 0 0 1.97 1.913 41.533 41.533 0 0 0 7.477 0 2.18 2.18 0 0 0 1.969-1.913c.064-.534.117-1.071.16-1.61a.75.75 0 1 0-1.495-.12c-.041.52-.093 1.037-.154 1.552a.68.68 0 0 1-.615.597 40.013 40.013 0 0 1-7.208 0 .68.68 0 0 1-.615-.597 39.785 39.785 0 0 1-.25-3.15l1.689 1.69a.75.75 0 0 0 1.06-1.061l-2.999-3Z",clipRule:"evenodd"}))}const nt=l.forwardRef(pr);function fr({title:e,titleId:r,...t},a){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),e?l.createElement("title",{id:r},e):null,l.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const vr=l.forwardRef(fr);function gr({title:e,titleId:r,...t},a){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),e?l.createElement("title",{id:r},e):null,l.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM6.75 9.25a.75.75 0 0 0 0 1.5h6.5a.75.75 0 0 0 0-1.5h-6.5Z",clipRule:"evenodd"}))}const st=l.forwardRef(gr);function xr({title:e,titleId:r,...t},a){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),e?l.createElement("title",{id:r},e):null,l.createElement("path",{fillRule:"evenodd",d:"M4 10a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H4.75A.75.75 0 0 1 4 10Z",clipRule:"evenodd"}))}const hr=l.forwardRef(xr);function br({title:e,titleId:r,...t},a){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),e?l.createElement("title",{id:r},e):null,l.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z",clipRule:"evenodd"}))}const yr=l.forwardRef(br);function wr({title:e,titleId:r,...t},a){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),e?l.createElement("title",{id:r},e):null,l.createElement("path",{d:"M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z"}))}const Er=l.forwardRef(wr);function Ir({title:e,titleId:r,...t},a){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":r},t),e?l.createElement("title",{id:r},e):null,l.createElement("path",{fillRule:"evenodd",d:"M10.868 2.884c-.321-.772-1.415-.772-1.736 0l-1.83 4.401-4.753.381c-.833.067-1.171 1.107-.536 1.651l3.62 3.102-1.106 4.637c-.194.813.691 1.456 1.405 1.02L10 15.591l4.069 2.485c.713.436 1.598-.207 1.404-1.02l-1.106-4.637 3.62-3.102c.635-.544.297-1.584-.536-1.65l-4.752-.382-1.831-4.401Z",clipRule:"evenodd"}))}const Rr=l.forwardRef(Ir);function jr(e,{container:r,accept:t,walk:a}){let s=l.useRef(t),o=l.useRef(a);l.useEffect(()=>{s.current=t,o.current=a},[t,a]),J(()=>{if(!r||!e)return;let i=Xe(r);if(!i)return;let u=s.current,m=o.current,h=Object.assign(w=>u(w),{acceptNode:u}),d=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,h,!1);for(;d.nextNode();)m(d.currentNode)},[r,e,s,o])}var kr=Object.defineProperty,Pr=(e,r,t)=>r in e?kr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,We=(e,r,t)=>(Pr(e,typeof r!="symbol"?r+"":r,t),t),O=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(O||{}),me=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(me||{}),E=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItems=5]="RegisterItems",e[e.UnregisterItems=6]="UnregisterItems",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e[e.SortItems=9]="SortItems",e))(E||{});function Ke(e,r=t=>t){let t=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,a=et(r(e.items.slice()),o=>o.dataRef.current.domRef.current),s=t?a.indexOf(t):null;return s===-1&&(s=null),{items:a,activeItemIndex:s}}let Nr={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,pendingFocus:{focus:N.Nothing},menuState:1}},0(e,r){return e.menuState===0?e:{...e,__demoMode:!1,pendingFocus:r.focus,menuState:0}},2:(e,r)=>{var t,a,s,o,i;if(e.menuState===1)return e;let u={...e,searchQuery:"",activationTrigger:(t=r.trigger)!=null?t:1,__demoMode:!1};if(r.focus===N.Nothing)return{...u,activeItemIndex:null};if(r.focus===N.Specific)return{...u,activeItemIndex:e.items.findIndex(d=>d.id===r.id)};if(r.focus===N.Previous){let d=e.activeItemIndex;if(d!==null){let w=e.items[d].dataRef.current.domRef,y=se(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:v=>v.id,resolveDisabled:v=>v.dataRef.current.disabled});if(y!==null){let v=e.items[y].dataRef.current.domRef;if(((a=w.current)==null?void 0:a.previousElementSibling)===v.current||((s=v.current)==null?void 0:s.previousElementSibling)===null)return{...u,activeItemIndex:y}}}}else if(r.focus===N.Next){let d=e.activeItemIndex;if(d!==null){let w=e.items[d].dataRef.current.domRef,y=se(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:v=>v.id,resolveDisabled:v=>v.dataRef.current.disabled});if(y!==null){let v=e.items[y].dataRef.current.domRef;if(((o=w.current)==null?void 0:o.nextElementSibling)===v.current||((i=v.current)==null?void 0:i.nextElementSibling)===null)return{...u,activeItemIndex:y}}}}let m=Ke(e),h=se(r,{resolveItems:()=>m.items,resolveActiveIndex:()=>m.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});return{...u,...m,activeItemIndex:h}},3:(e,r)=>{let t=e.searchQuery!==""?0:1,a=e.searchQuery+r.value.toLowerCase(),s=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+t).concat(e.items.slice(0,e.activeItemIndex+t)):e.items).find(i=>{var u;return((u=i.dataRef.current.textValue)==null?void 0:u.startsWith(a))&&!i.dataRef.current.disabled}),o=s?e.items.indexOf(s):-1;return o===-1||o===e.activeItemIndex?{...e,searchQuery:a}:{...e,searchQuery:a,activeItemIndex:o,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,r)=>{let t=e.items.concat(r.items.map(s=>s)),a=e.activeItemIndex;return e.pendingFocus.focus!==N.Nothing&&(a=se(e.pendingFocus,{resolveItems:()=>t,resolveActiveIndex:()=>e.activeItemIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled})),{...e,items:t,activeItemIndex:a,pendingFocus:{focus:N.Nothing},pendingShouldSort:!0}},6:(e,r)=>{let t=e.items,a=[],s=new Set(r.items);for(let[o,i]of t.entries())if(s.has(i.id)&&(a.push(o),s.delete(i.id),s.size===0))break;if(a.length>0){t=t.slice();for(let o of a.reverse())t.splice(o,1)}return{...e,items:t,activationTrigger:1}},7:(e,r)=>e.buttonElement===r.element?e:{...e,buttonElement:r.element},8:(e,r)=>e.itemsElement===r.element?e:{...e,itemsElement:r.element},9:e=>e.pendingShouldSort?{...e,...Ke(e),pendingShouldSort:!1}:e};class Me extends It{constructor(r){super(r),We(this,"actions",{registerItem:Ve(()=>{let t=[],a=new Set;return[(s,o)=>{a.has(o)||(a.add(o),t.push({id:s,dataRef:o}))},()=>(a.clear(),this.send({type:5,items:t.splice(0)}))]}),unregisterItem:Ve(()=>{let t=[];return[a=>t.push(a),()=>this.send({type:6,items:t.splice(0)})]})}),We(this,"selectors",{activeDescendantId(t){var a;let s=t.activeItemIndex,o=t.items;return s===null||(a=o[s])==null?void 0:a.id},isActive(t,a){var s;let o=t.activeItemIndex,i=t.items;return o!==null?((s=i[o])==null?void 0:s.id)===a:!1},shouldScrollIntoView(t,a){return t.__demoMode||t.menuState!==0||t.activationTrigger===0?!1:this.isActive(t,a)}}),this.on(5,()=>{this.disposables.requestAnimationFrame(()=>{this.send({type:9})})});{let t=this.state.id,a=Ye.get(null);this.disposables.add(a.on(Rt.Push,s=>{!a.selectors.isTop(s,t)&&this.state.menuState===0&&this.send({type:1})})),this.on(0,()=>a.actions.push(t)),this.on(1,()=>a.actions.pop(t))}}static new({id:r,__demoMode:t=!1}){return new Me({id:r,__demoMode:t,menuState:t?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1,pendingShouldSort:!1,pendingFocus:{focus:N.Nothing}})}reduce(r,t){return ke(t.type,Nr,r,t)}}const ot=l.createContext(null);function Se(e){let r=l.useContext(ot);if(r===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,lt),t}return r}function lt({id:e,__demoMode:r=!1}){let t=l.useMemo(()=>Me.new({id:e,__demoMode:r}),[]);return jt(()=>t.dispose()),t}let Cr=l.Fragment;function $r(e,r){let t=l.useId(),{__demoMode:a=!1,...s}=e,o=lt({id:t,__demoMode:a}),[i,u,m]=Q(o,I=>[I.menuState,I.itemsElement,I.buttonElement]),h=X(r),d=Ye.get(null),w=Q(d,l.useCallback(I=>d.selectors.isTop(I,t),[d,t]));kt(w,[m,u],(I,g)=>{var k;o.send({type:E.CloseMenu}),Zt(g,Qt.Loose)||(I.preventDefault(),(k=o.state.buttonElement)==null||k.focus())});let y=$(()=>{o.send({type:E.CloseMenu})}),v=l.useMemo(()=>({open:i===O.Open,close:y}),[i,y]),c={ref:h},p=H();return _.createElement(Pt,null,_.createElement(ot.Provider,{value:o},_.createElement(Nt,{value:ke(i,{[O.Open]:ue.Open,[O.Closed]:ue.Closed})},p({ourProps:c,theirProps:s,slot:v,defaultTag:Cr,name:"Menu"}))))}let Mr="button";function Sr(e,r){let t=Se("Menu.Button"),a=l.useId(),{id:s=`headlessui-menu-button-${a}`,disabled:o=!1,autoFocus:i=!1,...u}=e,m=l.useRef(null),h=Lt(),d=X(r,m,Gt(),$(x=>t.send({type:E.SetButtonElement,element:x}))),w=$(x=>{switch(x.key){case j.Space:case j.Enter:case j.ArrowDown:x.preventDefault(),x.stopPropagation(),t.send({type:E.OpenMenu,focus:{focus:N.First}});break;case j.ArrowUp:x.preventDefault(),x.stopPropagation(),t.send({type:E.OpenMenu,focus:{focus:N.Last}});break}}),y=$(x=>{switch(x.key){case j.Space:x.preventDefault();break}}),[v,c,p]=Q(t,x=>[x.menuState,x.buttonElement,x.itemsElement]),I=v===O.Open;tr(I,{trigger:c,action:l.useCallback(x=>{if(c!=null&&c.contains(x.target))return oe.Ignore;let b=x.target.closest('[role="menuitem"]:not([data-disabled])');return Vt(b)?oe.Select(b):p!=null&&p.contains(x.target)?oe.Ignore:oe.Close},[c,p]),close:l.useCallback(()=>t.send({type:E.CloseMenu}),[]),select:l.useCallback(x=>x.click(),[])});let g=$(x=>{var b;if(x.button===0){if(Ce(x.currentTarget))return x.preventDefault();o||(v===O.Open?(je.flushSync(()=>t.send({type:E.CloseMenu})),(b=m.current)==null||b.focus({preventScroll:!0})):(x.preventDefault(),t.send({type:E.OpenMenu,focus:{focus:N.Nothing},trigger:me.Pointer})))}}),{isFocusVisible:k,focusProps:A}=Pe({autoFocus:i}),{isHovered:M,hoverProps:B}=Ne({isDisabled:o}),{pressed:T,pressProps:U}=Ut({disabled:o}),P=l.useMemo(()=>({open:v===O.Open,active:T||v===O.Open,disabled:o,hover:M,focus:k,autofocus:i}),[v,M,k,T,o,i]),C=fe(h(),{ref:d,id:s,type:zt(e,m.current),"aria-haspopup":"menu","aria-controls":p==null?void 0:p.id,"aria-expanded":v===O.Open,disabled:o||void 0,autoFocus:i,onKeyDown:w,onKeyUp:y,onPointerDown:g},A,B,U);return H()({ourProps:C,theirProps:u,slot:P,defaultTag:Mr,name:"Menu.Button"})}let Or="div",Dr=ze.RenderStrategy|ze.Static;function Tr(e,r){let t=l.useId(),{id:a=`headlessui-menu-items-${t}`,anchor:s,portal:o=!1,modal:i=!0,transition:u=!1,...m}=e,h=Ct(s),d=Se("Menu.Items"),[w,y]=$t(h),v=Mt(),[c,p]=l.useState(null),I=X(r,h?w:null,$(f=>d.send({type:E.SetItemsElement,element:f})),p),[g,k]=Q(d,f=>[f.menuState,f.buttonElement]),A=Ue(k),M=Ue(c);h&&(o=!0);let B=St(),[T,U]=Ot(u,c,B!==null?(B&ue.Open)===ue.Open:g===O.Open);Dt(T,k,()=>{d.send({type:E.CloseMenu})});let P=Q(d,f=>f.__demoMode),C=P?!1:i&&g===O.Open;Tt(C,M);let x=P?!1:i&&g===O.Open;Yt(x,{allowed:l.useCallback(()=>[k,c],[k,c])});let b=g!==O.Open,L=er(b,k)?!1:T;l.useEffect(()=>{let f=c;f&&g===O.Open&&f!==(M==null?void 0:M.activeElement)&&f.focus({preventScroll:!0})},[g,c,M]),jr(g===O.Open,{container:c,accept(f){return f.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:f.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(f){f.setAttribute("role","none")}});let G=Ft(),ge=$(f=>{var K,ae,R;switch(G.dispose(),f.key){case j.Space:if(d.state.searchQuery!=="")return f.preventDefault(),f.stopPropagation(),d.send({type:E.Search,value:f.key});case j.Enter:if(f.preventDefault(),f.stopPropagation(),d.state.activeItemIndex!==null){let{dataRef:q}=d.state.items[d.state.activeItemIndex];(ae=(K=q.current)==null?void 0:K.domRef.current)==null||ae.click()}d.send({type:E.CloseMenu}),tt(d.state.buttonElement);break;case j.ArrowDown:return f.preventDefault(),f.stopPropagation(),d.send({type:E.GoToItem,focus:N.Next});case j.ArrowUp:return f.preventDefault(),f.stopPropagation(),d.send({type:E.GoToItem,focus:N.Previous});case j.Home:case j.PageUp:return f.preventDefault(),f.stopPropagation(),d.send({type:E.GoToItem,focus:N.First});case j.End:case j.PageDown:return f.preventDefault(),f.stopPropagation(),d.send({type:E.GoToItem,focus:N.Last});case j.Escape:f.preventDefault(),f.stopPropagation(),je.flushSync(()=>d.send({type:E.CloseMenu})),(R=d.state.buttonElement)==null||R.focus({preventScroll:!0});break;case j.Tab:f.preventDefault(),f.stopPropagation(),je.flushSync(()=>d.send({type:E.CloseMenu})),Ht(d.state.buttonElement,f.shiftKey?Y.Previous:Y.Next);break;default:f.key.length===1&&(d.send({type:E.Search,value:f.key}),G.setTimeout(()=>d.send({type:E.ClearSearch}),350));break}}),re=$(f=>{switch(f.key){case j.Space:f.preventDefault();break}}),xe=l.useMemo(()=>({open:g===O.Open}),[g]),he=fe(h?v():{},{"aria-activedescendant":Q(d,d.selectors.activeDescendantId),"aria-labelledby":Q(d,f=>{var K;return(K=f.buttonElement)==null?void 0:K.id}),id:a,onKeyDown:ge,onKeyUp:re,role:"menu",tabIndex:g===O.Open?0:void 0,ref:I,style:{...m.style,...y,"--button-width":At(k,!0).width},..._t(U)}),be=H();return _.createElement(Bt,{enabled:o?e.static||T:!1,ownerDocument:A},be({ourProps:he,theirProps:m,slot:xe,defaultTag:Or,features:Dr,visible:L,name:"Menu.Items"}))}let Fr=l.Fragment;function _r(e,r){let t=l.useId(),{id:a=`headlessui-menu-item-${t}`,disabled:s=!1,...o}=e,i=Se("Menu.Item"),u=Q(i,b=>i.selectors.isActive(b,a)),m=l.useRef(null),h=X(r,m),d=Q(i,b=>i.selectors.shouldScrollIntoView(b,a));J(()=>{if(d)return Wt().requestAnimationFrame(()=>{var b,L;(L=(b=m.current)==null?void 0:b.scrollIntoView)==null||L.call(b,{block:"nearest"})})},[d,m]);let w=Jt(m),y=l.useRef({disabled:s,domRef:m,get textValue(){return w()}});J(()=>{y.current.disabled=s},[y,s]),J(()=>(i.actions.registerItem(a,y),()=>i.actions.unregisterItem(a)),[y,a]);let v=$(()=>{i.send({type:E.CloseMenu})}),c=$(b=>{if(s)return b.preventDefault();i.send({type:E.CloseMenu}),tt(i.state.buttonElement)}),p=$(()=>{if(s)return i.send({type:E.GoToItem,focus:N.Nothing});i.send({type:E.GoToItem,focus:N.Specific,id:a})}),I=Xt(),g=$(b=>{I.update(b),!s&&(u||i.send({type:E.GoToItem,focus:N.Specific,id:a,trigger:me.Pointer}))}),k=$(b=>{I.wasMoved(b)&&(s||u||i.send({type:E.GoToItem,focus:N.Specific,id:a,trigger:me.Pointer}))}),A=$(b=>{I.wasMoved(b)&&(s||u&&i.send({type:E.GoToItem,focus:N.Nothing}))}),[M,B]=ve(),[T,U]=$e(),P=l.useMemo(()=>({active:u,focus:u,disabled:s,close:v}),[u,s,v]),C={id:a,ref:h,role:"menuitem",tabIndex:s===!0?void 0:-1,"aria-disabled":s===!0?!0:void 0,"aria-labelledby":M,"aria-describedby":T,disabled:void 0,onClick:c,onFocus:p,onPointerEnter:g,onMouseEnter:g,onPointerMove:k,onMouseMove:k,onPointerLeave:A,onMouseLeave:A},x=H();return _.createElement(B,null,_.createElement(U,null,x({ourProps:C,theirProps:o,slot:P,defaultTag:Fr,name:"Menu.Item"})))}let Ar="div";function Br(e,r){let[t,a]=ve(),s=e,o={ref:r,"aria-labelledby":t,role:"group"},i=H();return _.createElement(a,null,i({ourProps:o,theirProps:s,slot:{},defaultTag:Ar,name:"Menu.Section"}))}let Lr="header";function Gr(e,r){let t=l.useId(),{id:a=`headlessui-menu-heading-${t}`,...s}=e,o=qt();J(()=>o.register(a),[a,o.register]);let i={id:a,ref:r,role:"presentation",...o.props};return H()({ourProps:i,theirProps:s,slot:{},defaultTag:Lr,name:"Menu.Heading"})}let Vr="div";function Ur(e,r){let t=e,a={ref:r,role:"separator"};return H()({ourProps:a,theirProps:t,slot:{},defaultTag:Vr,name:"Menu.Separator"})}let zr=z($r),Hr=z(Sr),Zr=z(Tr),Qr=z(_r),Wr=z(Br),Kr=z(Gr),qr=z(Ur),le=Object.assign(zr,{Button:Hr,Items:Zr,Item:Qr,Section:Wr,Heading:Kr,Separator:qr});var Jr=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(Jr||{});let Xr={0(e,r){let t=[...e.options,{id:r.id,element:r.element,propsRef:r.propsRef}];return{...e,options:et(t,a=>a.element.current)}},1(e,r){let t=e.options.slice(),a=e.options.findIndex(s=>s.id===r.id);return a===-1?e:(t.splice(a,1),{...e,options:t})}},Oe=l.createContext(null);Oe.displayName="RadioGroupDataContext";function De(e){let r=l.useContext(Oe);if(r===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,De),t}return r}let Te=l.createContext(null);Te.displayName="RadioGroupActionsContext";function Fe(e){let r=l.useContext(Te);if(r===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Fe),t}return r}function Yr(e,r){return ke(r.type,Xr,e,r)}let ea="div";function ta(e,r){let t=l.useId(),a=at(),{id:s=`headlessui-radiogroup-${t}`,value:o,form:i,name:u,onChange:m,by:h,disabled:d=a||!1,defaultValue:w,tabIndex:y=0,...v}=e,c=nr(h),[p,I]=l.useReducer(Yr,{options:[]}),g=p.options,[k,A]=ve(),[M,B]=$e(),T=l.useRef(null),U=X(T,r),P=sr(w),[C,x]=or(o,m,P),b=l.useMemo(()=>g.find(R=>!R.propsRef.current.disabled),[g]),L=l.useMemo(()=>g.some(R=>c(R.propsRef.current.value,C)),[g,C]),G=$(R=>{var q;if(d||c(R,C))return!1;let Z=(q=g.find(ne=>c(ne.propsRef.current.value,R)))==null?void 0:q.propsRef.current;return Z!=null&&Z.disabled?!1:(x==null||x(R),!0)}),ge=$(R=>{let q=T.current;if(!q)return;let Z=Xe(q),ne=g.filter(V=>V.propsRef.current.disabled===!1).map(V=>V.element.current);switch(R.key){case j.Enter:lr(R.currentTarget);break;case j.ArrowLeft:case j.ArrowUp:if(R.preventDefault(),R.stopPropagation(),He(ne,Y.Previous|Y.WrapAround)===Ze.Success){let V=g.find(ee=>ee.element.current===(Z==null?void 0:Z.activeElement));V&&G(V.propsRef.current.value)}break;case j.ArrowRight:case j.ArrowDown:if(R.preventDefault(),R.stopPropagation(),He(ne,Y.Next|Y.WrapAround)===Ze.Success){let V=g.find(ee=>ee.element.current===(Z==null?void 0:Z.activeElement));V&&G(V.propsRef.current.value)}break;case j.Space:{R.preventDefault(),R.stopPropagation();let V=g.find(ee=>ee.element.current===(Z==null?void 0:Z.activeElement));V&&G(V.propsRef.current.value)}break}}),re=$(R=>(I({type:0,...R}),()=>I({type:1,id:R.id}))),xe=l.useMemo(()=>({value:C,firstOption:b,containsCheckedOption:L,disabled:d,compare:c,tabIndex:y,...p}),[C,b,L,d,c,y,p]),he=l.useMemo(()=>({registerOption:re,change:G}),[re,G]),be={ref:U,id:s,role:"radiogroup","aria-labelledby":k,"aria-describedby":M,onKeyDown:ge},f=l.useMemo(()=>({value:C}),[C]),K=l.useCallback(()=>{if(P!==void 0)return G(P)},[G,P]),ae=H();return _.createElement(B,{name:"RadioGroup.Description"},_.createElement(A,{name:"RadioGroup.Label"},_.createElement(Te.Provider,{value:he},_.createElement(Oe.Provider,{value:xe},u!=null&&_.createElement(ir,{disabled:d,data:{[u]:C||"on"},overrides:{type:"radio",checked:C!=null},form:i,onReset:K}),ae({ourProps:be,theirProps:v,slot:f,defaultTag:ea,name:"RadioGroup"})))))}let ra="div";function aa(e,r){var t;let a=De("RadioGroup.Option"),s=Fe("RadioGroup.Option"),o=l.useId(),{id:i=`headlessui-radiogroup-option-${o}`,value:u,disabled:m=a.disabled||!1,autoFocus:h=!1,...d}=e,w=l.useRef(null),y=X(w,r),[v,c]=ve(),[p,I]=$e(),g=rt({value:u,disabled:m});J(()=>s.registerOption({id:i,element:w,propsRef:g}),[i,s,w,g]);let k=$(L=>{var G;if(Ce(L.currentTarget))return L.preventDefault();s.change(u)&&((G=w.current)==null||G.focus())}),A=((t=a.firstOption)==null?void 0:t.id)===i,{isFocusVisible:M,focusProps:B}=Pe({autoFocus:h}),{isHovered:T,hoverProps:U}=Ne({isDisabled:m}),P=a.compare(a.value,u),C=fe({ref:y,id:i,role:"radio","aria-checked":P?"true":"false","aria-labelledby":v,"aria-describedby":p,"aria-disabled":m?!0:void 0,tabIndex:m?-1:P||!a.containsCheckedOption&&A?a.tabIndex:-1,onClick:m?void 0:k,autoFocus:h},B,U),x=l.useMemo(()=>({checked:P,disabled:m,active:M,hover:T,focus:M,autofocus:h}),[P,m,T,M,h]),b=H();return _.createElement(I,{name:"RadioGroup.Description"},_.createElement(c,{name:"RadioGroup.Label"},b({ourProps:C,theirProps:d,slot:x,defaultTag:ra,name:"RadioGroup.Option"})))}let na="span";function sa(e,r){var t;let a=De("Radio"),s=Fe("Radio"),o=l.useId(),i=dr(),u=at(),{id:m=i||`headlessui-radio-${o}`,value:h,disabled:d=a.disabled||u||!1,autoFocus:w=!1,...y}=e,v=l.useRef(null),c=X(v,r),p=cr(),I=ur(),g=rt({value:h,disabled:d});J(()=>s.registerOption({id:m,element:v,propsRef:g}),[m,s,v,g]);let k=$(b=>{var L;if(Ce(b.currentTarget))return b.preventDefault();s.change(h)&&((L=v.current)==null||L.focus())}),{isFocusVisible:A,focusProps:M}=Pe({autoFocus:w}),{isHovered:B,hoverProps:T}=Ne({isDisabled:d}),U=((t=a.firstOption)==null?void 0:t.id)===m,P=a.compare(a.value,h),C=fe({ref:c,id:m,role:"radio","aria-checked":P?"true":"false","aria-labelledby":p,"aria-describedby":I,"aria-disabled":d?!0:void 0,tabIndex:d?-1:P||!a.containsCheckedOption&&U?a.tabIndex:-1,autoFocus:w,onClick:d?void 0:k},M,T),x=l.useMemo(()=>({checked:P,disabled:d,hover:B,focus:A,autofocus:w}),[P,d,B,A,w]);return H()({ourProps:C,theirProps:y,slot:x,defaultTag:na,name:"Radio"})}let oa=z(ta),la=z(aa),ia=z(sa),da=ar,ca=rr,ie=Object.assign(oa,{Option:la,Radio:ia,Label:da,Description:ca});const F={ResetPlanOptions:"reset-plan-options",ResetPlanDates:"reset-plan-dates",ResetCategories:"reset-categories",PlanOptions:"plan-options",Dates:"dates",DateStart:"date-start",DateEnd:"date-end",Category:"category",External:"external",ResetTestsReport:"reset-tests-report",TestsReportErrors:"tests-report-errors",TestsReportMessages:"tests-report-messages"},S={Add:"add",Remove:"remove",Direct:"direct",Indirect:"indirect",Metadata:"metadata",Default:"default"},Ee={Breaking:"breaking",NonBreaking:"non-breaking",ForwardOnly:"forward-only"},[ua,ma]=ga(),it={skip_tests:!1,no_gaps:!1,skip_backfill:!1,forward_only:!1,auto_apply:!1,no_auto_categorization:!1,include_unmodified:!0,restate_models:void 0,create_from:"prod"},dt={start:void 0,end:void 0},_e={...dt,...it,categories:ma,defaultCategory:ua,change_categorization:new Map,virtualUpdateDescription:"All changes and their downstream dependencies can be fully previewed before they get promoted. If during plan creation no data gaps have been detected and only references to new model versions need to be updated, then such an update is referred to as a Virtual Update. Virtual Updates impose no additional runtime overhead or cost.",isInitialPlanRun:!1,errors:[],testsReportErrors:void 0,testsReportMessages:void 0},ct=l.createContext(_e),ut=l.createContext(()=>{});function Ma({children:e}){const[r,t]=l.useReducer(fa,Object.assign(_e));return n.jsx(ct.Provider,{value:Object.assign(r),children:n.jsx(ut.Provider,{value:t,children:e})})}function Ae(){return l.useContext(ct)}function pa(){return l.useContext(ut)}function fa(e,r){return r=Array.isArray(r)?r:[r],r.reduce(va,e)}function va(e=_e,{type:r,...t}){switch(r){case F.ResetCategories:return Object.assign({},e,{change_categorization:new Map});case F.ResetPlanDates:return Object.assign({},e,dt);case F.ResetPlanOptions:return Object.assign({},e,it);case F.ResetTestsReport:return Object.assign({},e,{testsReportErrors:void 0,testsReportMessages:void 0});case F.PlanOptions:return Object.assign({},e,t);case F.Dates:return Object.assign({},e,{start:t.start,end:t.end});case F.External:return Object.assign({},e,{isInitialPlanRun:t.isInitialPlanRun??!1});case F.DateStart:return Object.assign({},e,{start:t.start});case F.DateEnd:return Object.assign({},e,{end:t.end});case F.TestsReportErrors:return Object.assign({},e,{testsReportErrors:t.testsReportErrors});case F.TestsReportMessages:return Object.assign({},e,{testsReportMessages:t.testsReportMessages});case F.Category:{const{change:a,category:s}=t;return pe(a==null?void 0:a.name)&&e.change_categorization.set(a.name,{category:s,change:a}),Object.assign({},e,{change_categorization:new Map(e.change_categorization)})}default:return Object.assign({},e)}}function ga(){const e={id:Ee.Breaking,name:"Breaking Change",description:"It will rebuild all models",value:ye.NUMBER_1},r=[e,{id:Ee.NonBreaking,name:"Non-Breaking Change",description:"It will exclude all indirect models caused by this change",value:ye.NUMBER_2},{id:Ee.ForwardOnly,name:"Forward-Only Change",description:"The change requires no rebuilding",value:ye.NUMBER_3}];return[e,r]}function te({children:e,headline:r,type:t,className:a}){return n.jsxs("div",{className:D("flex flex-col rounded-md p-4 text-xs",t===S.Add&&"bg-success-5",t===S.Remove&&"bg-danger-5",t===S.Direct&&"bg-secondary-5",t===S.Indirect&&"bg-warning-5",t===S.Default&&"bg-neutral-5",a),children:[pe(r)&&n.jsx("h4",{className:D("mb-2 font-bold whitespace-nowrap",t===S.Add&&"text-success-600 dark:text-success-300",t===S.Remove&&"text-danger-600 dark:text-danger-300",t===S.Direct&&"text-secondary-600 dark:text-secondary-300",t===S.Indirect&&"text-warning-600 dark:text-warning-300",t===S.Default&&"text-neutral-600 dark:text-neutral-300"),children:r}),e]})}function xa({changes:e=[],type:r}){return n.jsx("ul",{children:e.map(t=>n.jsxs("li",{className:D("flex items-center",r===S.Add&&"text-success-600 dark:text-success-300",r===S.Remove&&"text-danger-600 dark:text-danger-300",r===S.Direct&&"text-secondary-600 dark:text-secondary-300",r===S.Indirect&&"text-warning-600 dark:text-warning-300",r===S.Default&&"text-neutral-600 dark:text-neutral-300"),children:[r===S.Add?n.jsx(Er,{className:"h-3 mr-2"}):r===S.Remove?n.jsx(hr,{className:"h-3 mr-2"}):n.jsx(nt,{className:"h-4 mr-2"}),n.jsx("span",{title:t.displayViewName,className:"w-full whitespace-nowrap text-ellipsis overflow-hidden",children:pt(t.displayViewName,50,25)})]},t.name))})}function ha({changes:e=[],disabled:r=!1}){const t=pa(),{categories:a}=Ae(),s=W(o=>o.models);return l.useEffect(()=>{t(e.map(o=>({type:F.Category,category:a.find(({value:i})=>i===o.change_category),change:o})))},[e]),n.jsx("ul",{children:e.map(o=>n.jsx("li",{className:"text-secondary-500 dark:text-primary-500 mt-1",children:n.jsx(we,{children:({open:i})=>n.jsxs(n.Fragment,{children:[n.jsxs(we.Button,{className:"flex items-center w-full justify-between rounded-lg text-left",children:[n.jsx(Be,{className:"w-full",change:o}),(()=>{const u=i?st:yr;return n.jsx(u,{className:"max-h-[1rem] min-w-[1rem] dark:text-primary-500"})})()]}),n.jsxs(we.Panel,{className:"px-4 mb-4 overflow-hidden",children:[Le(o.direct)&&n.jsx(qe,{type:"direct",models:o.direct,className:"mt-2 ml-4"}),Le(o.indirect)&&n.jsx(qe,{type:"indirect",models:o.indirect,className:"ml-4"}),n.jsx(Ie,{className:"border-secondary-20 mt-2"}),n.jsx(ba,{change:o,disabled:r,onChange:u=>{t({type:F.Category,category:a.find(({value:m})=>m===u),change:o})}}),n.jsx(Ie,{className:"border-secondary-20 mt-2"}),n.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:[pe(o)&&ft(o.diff)&&n.jsx(mt,{diff:o.diff}),(()=>{var m,h;const u=s.get(o.name);return Je(u)?n.jsx(n.Fragment,{}):n.jsx("div",{className:"h-[16rem] bg-theme-lighter rounded-2xl overflow-hidden my-4",children:n.jsx(wt,{showColumns:!1,showConnected:!1,showControls:!1,children:n.jsx(Et,{model:u,highlightedNodes:{"border-4 border-warning-500 bg-warning-500 text-warning-500":((m=o.indirect)==null?void 0:m.map(d=>d.name))??[],"border-4 border-secondary-500 dark:border-primary-500 bg-secondary-500 dark:bg-primary-500 text-bg-secondary-500 dark:bg-primary-500 ring-8 ring-brand-50":[o.name],"border-4 border-secondary-500 dark:border-primary-500 bg-secondary-500 dark:bg-primary-500 text-bg-secondary-500 dark:bg-primary-500":((h=o.direct)==null?void 0:h.map(d=>d.name))??[],"*":["border-4 border-neutral-500 bg-neutral-500 text-neutral-600 dark:text-light"]}})})})})()]})]})]})})},o.name))})}function ba({change:e,disabled:r=!1,onChange:t}){var o,i;const{change_categorization:a,categories:s}=Ae();return n.jsx(ie,{className:D("flex flex-col mt-2",r&&"pointer-events-none opacity-50 cursor-not-allowed"),disabled:r,defaultValue:((i=(o=a.get(e.name))==null?void 0:o.category)==null?void 0:i.value)??e.change_category,onChange:t,children:s.map(u=>n.jsx(ie.Option,{value:u.value,className:()=>D("relative flex rounded-md"),children:({checked:m})=>n.jsxs("div",{className:D("text-sm flex items-center px-2 py-1 w-full rounded-lg",m?"text-secondary-500 dark:text-primary-300":"text-prose"),children:[n.jsx("div",{className:"mt-[0.125rem] mr-2 border-2 border-neutral-400 min-w-[1rem] h-4 rounded-full flex justify-center items-center",children:m&&n.jsx("span",{className:"inline-block w-2 h-2 bg-secondary-500 dark:bg-primary-300 rounded-full"})}),n.jsxs("div",{children:[n.jsx(ie.Label,{as:"p",children:u.name}),n.jsx(ie.Description,{as:"span",className:"text-xs text-neutral-500",children:u.description})]})]})},u.name))})}function ya({changes:e=[]}){return n.jsx("ul",{children:e.map(r=>n.jsx("li",{className:"text-warning-700 dark:text-warning-500",children:n.jsx(Be,{change:r})},r.name))})}function Be({change:e,className:r}){var s;const{change_categorization:t}=Ae(),a=(s=t.get(e.name))==null?void 0:s.category;return n.jsxs("div",{className:D("flex items-center font-bold",r),children:[n.jsxs("span",{className:"flex w-full whitespace-nowrap text-ellipsis overflow-hidden",children:[n.jsx(nt,{className:"h-4 mr-2"}),e.displayViewName]}),Je(a)?pe(e.indirect)&&n.jsx("span",{className:"ml-2 px-1 bg-warning-500 text-warning-100 dark:bg-warning-400 dark:text-warning-800 rounded whitespace-nowrap mr-2",children:"Categorize Manually"}):n.jsx("span",{className:"ml-2 px-1 bg-neutral-400 text-neutral-100 dark:bg-neutral-400 dark:text-neutral-800 rounded whitespace-nowrap mr-2",children:a.name})]})}function qe({type:e,models:r,className:t}){return n.jsx("ul",{className:D(e==="indirect"&&"text-warning-700 dark:text-warning-500",e==="direct"&&"text-secondary-500 dark:text-primary-500",t),children:r.map(a=>n.jsxs("li",{className:"flex",children:[n.jsx("span",{className:"h-3 w-3 border-l-2 border-b-2 inline-block mr-2"}),a.displayViewName]},a.name))})}function mt({diff:e}){return n.jsx("div",{className:"my-4 bg-dark-lighter rounded-2xl overflow-hidden",children:n.jsx("pre",{className:"p-4 text-primary-100 max-h-[30vh] text-xs overflow-auto hover:scrollbar scrollbar--vertical scrollbar--horizontal",children:e.split(` +`).map((r,t)=>n.jsx("p",{className:D(r.startsWith("+")&&"text-success-500 bg-success-500/10 px-2",r.startsWith("-")&&"text-danger-500 bg-danger-500/10 px-2",r.startsWith("@@")&&"text-primary-300 my-5 px-2"),children:r},`${r}-${t}`))})})}te.Default=xa;te.Direct=ha;te.Indirect=ya;te.Diff=mt;te.Title=Be;function wa({onAdd:e,className:r,label:t="Add",size:a=de.sm}){const s=W(c=>c.getNextEnvironment),o=W(c=>c.isExistingEnvironment),i=W(c=>c.addLocalEnvironment),[u,m]=l.useState(""),[h,d]=l.useState(s().name);function w(c){c.stopPropagation(),i(u,h),m(""),d(s().name),e==null||e()}function y(c){c.stopPropagation(),m(c.target.value)}const v=vt(u)||o(u);return n.jsxs("div",{className:D("flex w-full items-center bg-secondary-5",r),children:[n.jsx(Qe,{className:"my-0 mx-0 mr-4 min-w-[10rem] w-full",size:a,children:({className:c})=>n.jsx(Qe.Textfield,{className:D(c,"w-full"),placeholder:"Environment",value:u,onInput:y})}),n.jsx(Re,{className:"my-0 mx-0 font-bold",variant:ce.Secondary,size:a,disabled:v,onClick:w,children:t})]})}function Sa({disabled:e=!1,className:r,showAddEnvironment:t=!0,size:a=de.sm,onSelect:s}){const{addError:o}=gt(),i=W(c=>c.environment),u=W(c=>c.environments),m=W(c=>c.setEnvironment),h=W(c=>c.removeLocalEnvironment),d=xt(le.Button);function w(c,p){c.stopPropagation(),m(p),s==null||s()}function y(c,p){c.stopPropagation(),h(p)}function v(c,p){c.stopPropagation(),bt(p.name).then(()=>{h(p)}).catch(I=>{o(yt.Environments,I)})}return n.jsx(le,{as:"div",className:D("flex relative",r),children:({close:c})=>n.jsxs(n.Fragment,{children:[n.jsxs(d,{variant:ce.Info,size:a,disabled:e,className:"flex justify-between w-full mx-0 pr-1",children:[n.jsxs("span",{className:D("block overflow-hidden truncate",(i.isLocal||e)&&"text-neutral-500",i.isRemote?"text-primary-600 dark:text-primary-300":"text-neutral-600 dark:text-neutral-200"),children:[n.jsx("span",{className:"text-xs text-neutral-300 dark:text-neutral-500 mr-1",children:"Environment:"}),n.jsx("span",{children:i.name})]}),n.jsx("span",{className:"pointer-events-none inset-y-0 right-0 flex items-center pl-1",children:n.jsx(mr,{className:D("w-4",e?"text-neutral-400 dark:text-neutral-200":"text-neutral-800 dark:text-neutral-200"),"aria-hidden":"true"})})]}),n.jsx(Kt,{as:l.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:n.jsx("div",{className:"!mx-0 absolute top-10 right-0 min-w-[16rem] max-w-[100%] overflow-hidden shadow-2xl bg-theme border-0 border-neutral-100 dark:border-neutral-800 rounded-md flex flex-col z-50",children:n.jsxs(le.Items,{className:"mx-0 overflow-auto max-h-80 hover:scrollbar scrollbar--vertical",children:[Array.from(u).map(p=>n.jsx(le.Item,{disabled:p===i,children:({active:I})=>n.jsxs("div",{onClick:g=>w(g,p),className:D("flex justify-between items-center pl-2 pr-1 py-1 overflow-auto",I?"text-neutral-600 bg-neutral-10":"text-neutral-400",p===i?"cursor-default bg-neutral-5":"cursor-pointer"),children:[n.jsxs("div",{className:"flex items-start",children:[n.jsx(vr,{className:D("w-4 h-4 mt-[6px]",p===i?"opacity-100 text-primary-500":"opacity-0")}),n.jsxs("span",{className:"block",children:[n.jsxs("span",{className:"flex items-baseline",children:[n.jsx("span",{className:D("block truncate ml-2",p.isRemote&&"text-primary-500"),children:p.name}),n.jsxs("small",{className:"block ml-2",children:["(",p.type,")"]})]}),p.isProd&&n.jsx("span",{className:"flex ml-2",children:n.jsx("small",{className:"text-xs text-neutral-500",children:"Production Environment"})}),p.isDefault&&n.jsx("span",{className:"flex ml-2",children:n.jsx("small",{className:"text-xs text-neutral-500",children:"Default Environment"})})]})]}),n.jsxs("div",{className:"flex items-center",children:[p.isPinned&&n.jsx(Rr,{title:"Pinned",className:"w-4 text-primary-500 dark:text-primary-100 mx-1"}),Ge(p.isPinned)&&p.isLocal&&p!==i&&n.jsx(Re,{className:"!m-0 !px-1 bg-transparent hover:bg-transparent border-none",size:de.xs,format:ht.Ghost,variant:ce.Neutral,onClick:g=>y(g,p),children:n.jsx(st,{className:"w-4 text-neutral-500 dark:text-neutral-100"})}),Ge(p.isPinned)&&p.isRemote&&p!==i&&n.jsx(Re,{className:"!px-2 !my-0",size:de.xs,variant:ce.Danger,onClick:g=>v(g,p),children:"Delete"})]})]})},p.name)),t&&n.jsxs(n.Fragment,{children:[n.jsx(Ie,{}),n.jsx(wa,{onAdd:c,className:"p-2 pb-2"})]})]})})})]})})}export{wa as A,S as E,te as P,Sa as S,pa as a,F as b,Ma as c,Ae as u}; diff --git a/web/client/dist/assets/SourceList-DSLO6nVJ.js b/web/client/dist/assets/SourceList-DSLO6nVJ.js new file mode 100644 index 0000000000..048ec2d7d6 --- /dev/null +++ b/web/client/dist/assets/SourceList-DSLO6nVJ.js @@ -0,0 +1 @@ +import{r as f,i as V,I as q,j as s,c as v,l as y,B as A,m as G,D as H,v as J}from"./index-Dj0i1-CA.js";import{I as L}from"./Input-B-oZ6fGO.js";import{u as K}from"./index-C-dJH7yZ.js";function W({items:c=[],keyId:d="id",keyName:N="",keyDescription:x="",to:T="",disabled:S=!1,withCounter:$=!0,withFilter:B=!0,types:a,className:F,isActive:m,listItem:h}){var R;const O=f.useRef(null),[r,C]=f.useState(""),j=f.useRef(null),[o,u]=f.useMemo(()=>{let t=-1;const e=[];return c.forEach((l,p)=>{const w=n(l[d]),g=n(l[x]),Y=n(l[N]),k=n(a==null?void 0:a[w]);(Y.includes(r)||g.includes(r)||k.includes(r))&&e.push(l),V(m)&&m(l[d])&&(t=p)}),[t,e]},[c,r,m]),i=K({count:u.length,getScrollElement:()=>j.current,estimateSize:()=>32+(x.length>0?16:0)}),b=({itemIndex:t,isSmoothScroll:e=!0})=>{i.scrollToIndex(t,{align:"center",behavior:e?"smooth":"auto"})},E=({itemIndex:t,range:e})=>V(e)&&(e.startIndex>t||(e==null?void 0:e.endIndex)-1&&E({range:i.range,itemIndex:o});f.useEffect(()=>{o>-1&&E({range:i.range,itemIndex:o})&&b({itemIndex:o,isSmoothScroll:!1})},[o]);const z=i.getVirtualItems(),I=i.getTotalSize();return s.jsxs("div",{ref:O,className:v("flex flex-col w-full h-full text-sm text-neutral-600 dark:text-neutral-300",F),style:{contain:"strict"},children:[B&&s.jsxs("div",{className:"p-1 w-full flex justify-between",children:[s.jsx(L,{className:"w-full !m-0",size:y.sm,children:({className:t})=>s.jsx(L.Textfield,{className:v(t,"w-full"),value:r,placeholder:"Filter items",type:"search",onInput:e=>{C(e.target.value)}})}),$&&s.jsx("div",{className:"ml-1 px-3 bg-primary-10 text-primary-500 rounded-full text-xs flex items-center",children:u.length})]}),s.jsxs("div",{className:"w-full h-full relative p-1",children:[M&&s.jsx(A,{className:"absolute left-[50%] translate-x-[-50%] -top-2 z-10 text-ellipsis !block overflow-hidden no-wrap max-w-[90%] !border-neutral-20 shadow-md !bg-theme !hover:bg-theme text-neutral-500 dark:text-neutral-300 !focus:ring-2 !focus:ring-theme-500 !focus:ring-offset-2 !focus:ring-offset-theme-50 !focus:ring-opacity-50 !focus:outline-none !focus:ring-offset-transparent !focus:ring-offset-0 !focus:ring",onClick:()=>b({itemIndex:o}),size:y.sm,variant:G.Secondary,children:"Scroll to selected"}),s.jsx("div",{ref:j,className:"w-full h-full relative overflow-hidden overflow-y-auto hover:scrollbar scrollbar--horizontal scrollbar--vertical",style:{contain:"strict"},children:s.jsx("div",{className:"relative w-full",style:{height:I>0?`${I}px`:"100%"},children:s.jsxs("ul",{className:"w-full absolute top-0 left-0",style:{transform:`translateY(${((R=z[0])==null?void 0:R.start)??0}px)`},children:[H(u)&&s.jsx("li",{className:"px-2 py-0.5 text-center whitespace-nowrap overflow-ellipsis overflow-hidden",children:r.length>0?"No Results Found":"Empty List"},"not-found"),z.map(t=>{const e=u[t.index],l=n(e[d]),p=n(e[x]),w=n(e[N]),g=n(a==null?void 0:a[l]);return s.jsx("li",{"data-index":t.index,ref:i.measureElement,className:v("font-normal w-full",S&&"cursor-not-allowed"),tabIndex:l===r?-1:0,children:h==null?void 0:h({id:l,to:`${T}/${l}`,name:w,description:p,text:g,disabled:S,item:u[t.index]})},t.key)})]})})})]})]})}function n(c){return J(c)?"":String(c)}export{W as S}; diff --git a/web/client/dist/assets/SourceListItem-BHt8d9-I.js b/web/client/dist/assets/SourceListItem-BHt8d9-I.js new file mode 100644 index 0000000000..4d0c3778d3 --- /dev/null +++ b/web/client/dist/assets/SourceListItem-BHt8d9-I.js @@ -0,0 +1 @@ +import{j as t,N as c,i as l,c as m,m as i}from"./index-Dj0i1-CA.js";function f({name:o,description:a,to:p,text:n,variant:s,disabled:x=!1,handleDelete:r}){function d(e){(e.key==="Delete"||e.key==="Backspace")&&(e.preventDefault(),e.stopPropagation(),r==null||r())}return t.jsxs(c,{onKeyUp:d,to:p,className:({isActive:e})=>m("block overflow-hidden px-2 py-1.5 rounded-md w-full font-semibold",x&&"opacity-50 pointer-events-none",e?s===i.Primary?"text-primary-500 bg-primary-10":s===i.Danger?"text-danger-500 bg-danger-5":"text-neutral-600 dark:text-neutral-100 bg-neutral-10":"hover:bg-neutral-5 text-neutral-500 dark:text-neutral-400"),children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"whitespace-nowrap overflow-ellipsis overflow-hidden min-w-10",children:o}),l(n)&&t.jsx("span",{className:" ml-2 px-2 rounded-md leading-0 text-[0.5rem] bg-neutral-10 text-neutral-700 dark:text-neutral-200",children:n})]}),l(a)&&t.jsx("p",{className:"text-xs overflow-hidden whitespace-nowrap overflow-ellipsis text-neutral-300 dark:text-neutral-500",children:a})]})}export{f as S}; diff --git a/web/client/dist/assets/SplitPane-CViaZmw6.js b/web/client/dist/assets/SplitPane-CViaZmw6.js new file mode 100644 index 0000000000..1b4b2c2f7b --- /dev/null +++ b/web/client/dist/assets/SplitPane-CViaZmw6.js @@ -0,0 +1 @@ +import{a1 as Ae,R as le,r as we,j as Re}from"./index-Dj0i1-CA.js";var Z={exports:{}},J,ce;function De(){if(ce)return J;ce=1;var s="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return J=s,J}var K,fe;function Me(){if(fe)return K;fe=1;var s=De();function i(){}function u(){}return u.resetWarningCache=i,K=function(){function n(d,y,l,h,g,S){if(S!==s){var E=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw E.name="Invariant Violation",E}}n.isRequired=n;function o(){return n}var p={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:u,resetWarningCache:i};return p.PropTypes=p,p},K}var pe;function _e(){return pe||(pe=1,Z.exports=Me()()),Z.exports}var Pe=_e();const c=Ae(Pe);var x=typeof window<"u"?window:null,te=x===null,L=te?void 0:x.document,A="addEventListener",w="removeEventListener",Q="getBoundingClientRect",G="_a",R="_b",M="_c",$="horizontal",D=function(){return!1},Fe=te?"calc":["","-webkit-","-moz-","-o-"].filter(function(s){var i=L.createElement("div");return i.style.cssText="width:"+s+"calc(9px)",!!i.style.length}).shift()+"calc",me=function(s){return typeof s=="string"||s instanceof String},de=function(s){if(me(s)){var i=L.querySelector(s);if(!i)throw new Error("Selector "+s+" did not match a DOM element");return i}return s},m=function(s,i,u){var n=s[i];return n!==void 0?n:u},H=function(s,i,u,n){if(i){if(n==="end")return 0;if(n==="center")return s/2}else if(u){if(n==="start")return 0;if(n==="center")return s/2}return s},je=function(s,i){var u=L.createElement("div");return u.className="gutter gutter-"+i,u},Ie=function(s,i,u){var n={};return me(i)?n[s]=i:n[s]=Fe+"("+i+"% - "+u+"px)",n},Ue=function(s,i){var u;return u={},u[s]=i+"px",u},ve=function(s,i){if(i===void 0&&(i={}),te)return{};var u=s,n,o,p,d,y,l;Array.from&&(u=Array.from(u));var h=de(u[0]),g=h.parentNode,S=getComputedStyle?getComputedStyle(g):null,E=S?S.flexDirection:null,U=m(i,"sizes")||u.map(function(){return 100/u.length}),W=m(i,"minSize",100),T=Array.isArray(W)?W:u.map(function(){return W}),_=m(i,"maxSize",1/0),C=Array.isArray(_)?_:u.map(function(){return _}),z=m(i,"expandToMin",!1),O=m(i,"gutterSize",10),j=m(i,"gutterAlign","center"),Y=m(i,"snapOffset",30),ge=Array.isArray(Y)?Y:u.map(function(){return Y}),V=m(i,"dragInterval",1),I=m(i,"direction",$),X=m(i,"cursor",I===$?"col-resize":"row-resize"),ye=m(i,"gutter",je),ne=m(i,"elementStyle",Ie),he=m(i,"gutterStyle",Ue);I===$?(n="width",o="clientX",p="left",d="right",y="clientWidth"):I==="vertical"&&(n="height",o="clientY",p="top",d="bottom",y="clientHeight");function N(r,e,t,a){var v=ne(n,e,t,a);Object.keys(v).forEach(function(f){r.style[f]=v[f]})}function Se(r,e,t){var a=he(n,e,t);Object.keys(a).forEach(function(v){r.style[v]=a[v]})}function k(){return l.map(function(r){return r.size})}function ie(r){return"touches"in r?r.touches[0][o]:r[o]}function ae(r){var e=l[this.a],t=l[this.b],a=e.size+t.size;e.size=r/this.size*a,t.size=a-r/this.size*a,N(e.element,e.size,this[R],e.i),N(t.element,t.size,this[M],t.i)}function ze(r){var e,t=l[this.a],a=l[this.b];this.dragging&&(e=ie(r)-this.start+(this[R]-this.dragOffset),V>1&&(e=Math.round(e/V)*V),e<=t.minSize+t.snapOffset+this[R]?e=t.minSize+this[R]:e>=this.size-(a.minSize+a.snapOffset+this[M])&&(e=this.size-(a.minSize+this[M])),e>=t.maxSize-t.snapOffset+this[R]?e=t.maxSize+this[R]:e<=this.size-(a.maxSize-a.snapOffset+this[M])&&(e=this.size-(a.maxSize+this[M])),ae.call(this,e),m(i,"onDrag",D)(k()))}function se(){var r=l[this.a].element,e=l[this.b].element,t=r[Q](),a=e[Q]();this.size=t[n]+a[n]+this[R]+this[M],this.start=t[p],this.end=t[d]}function be(r){if(!getComputedStyle)return null;var e=getComputedStyle(r);if(!e)return null;var t=r[y];return t===0?null:(I===$?t-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight):t-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),t)}function oe(r){var e=be(g);if(e===null||T.reduce(function(f,b){return f+b},0)>e)return r;var t=0,a=[],v=r.map(function(f,b){var F=e*f/100,q=H(O,b===0,b===r.length-1,j),B=T[b]+q;return F0&&a[b]-t>0){var q=Math.min(t,a[b]-t);t-=q,F=f-q}return F/e*100})}function Oe(){var r=this,e=l[r.a].element,t=l[r.b].element;r.dragging&&m(i,"onDragEnd",D)(k()),r.dragging=!1,x[w]("mouseup",r.stop),x[w]("touchend",r.stop),x[w]("touchcancel",r.stop),x[w]("mousemove",r.move),x[w]("touchmove",r.move),r.stop=null,r.move=null,e[w]("selectstart",D),e[w]("dragstart",D),t[w]("selectstart",D),t[w]("dragstart",D),e.style.userSelect="",e.style.webkitUserSelect="",e.style.MozUserSelect="",e.style.pointerEvents="",t.style.userSelect="",t.style.webkitUserSelect="",t.style.MozUserSelect="",t.style.pointerEvents="",r.gutter.style.cursor="",r.parent.style.cursor="",L.body.style.cursor=""}function xe(r){if(!("button"in r&&r.button!==0)){var e=this,t=l[e.a].element,a=l[e.b].element;e.dragging||m(i,"onDragStart",D)(k()),r.preventDefault(),e.dragging=!0,e.move=ze.bind(e),e.stop=Oe.bind(e),x[A]("mouseup",e.stop),x[A]("touchend",e.stop),x[A]("touchcancel",e.stop),x[A]("mousemove",e.move),x[A]("touchmove",e.move),t[A]("selectstart",D),t[A]("dragstart",D),a[A]("selectstart",D),a[A]("dragstart",D),t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.MozUserSelect="none",t.style.pointerEvents="none",a.style.userSelect="none",a.style.webkitUserSelect="none",a.style.MozUserSelect="none",a.style.pointerEvents="none",e.gutter.style.cursor=X,e.parent.style.cursor=X,L.body.style.cursor=X,se.call(e),e.dragOffset=ie(r)-e.end}}U=oe(U);var P=[];l=u.map(function(r,e){var t={element:de(r),size:U[e],minSize:T[e],maxSize:C[e],snapOffset:ge[e],i:e},a;if(e>0&&(a={a:e-1,b:e,dragging:!1,direction:I,parent:g},a[R]=H(O,e-1===0,!1,j),a[M]=H(O,!1,e===u.length-1,j),E==="row-reverse"||E==="column-reverse")){var v=a.a;a.a=a.b,a.b=v}if(e>0){var f=ye(e,I,t.element);Se(f,O,e),a[G]=xe.bind(a),f[A]("mousedown",a[G]),f[A]("touchstart",a[G]),g.insertBefore(f,t.element),a.gutter=f}return N(t.element,t.size,H(O,e===0,e===u.length-1,j),e),e>0&&P.push(a),t});function ue(r){var e=r.i===P.length,t=e?P[r.i-1]:P[r.i];se.call(t);var a=e?t.size-r.minSize-t[M]:r.minSize+t[R];ae.call(t,a)}l.forEach(function(r){var e=r.element[Q]()[n];e0){var v=P[a-1],f=l[v.a],b=l[v.b];f.size=e[a-1],b.size=t,N(f.element,f.size,v[R],f.i),N(b.element,b.size,v[M],b.i)}})}function Te(r,e){P.forEach(function(t){if(e!==!0?t.parent.removeChild(t.gutter):(t.gutter[w]("mousedown",t[G]),t.gutter[w]("touchstart",t[G])),r!==!0){var a=ne(n,t.a.size,t[R]);Object.keys(a).forEach(function(v){l[t.a].element.style[v]="",l[t.b].element.style[v]=""})}})}return{setSizes:Ee,getSizes:k,collapse:function(e){ue(l[e])},destroy:Te,parent:g,pairs:P}};function ee(s,i){var u={};for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&i.indexOf(n)===-1&&(u[n]=s[n]);return u}var re=function(s){function i(){s.apply(this,arguments)}return s&&(i.__proto__=s),i.prototype=Object.create(s&&s.prototype),i.prototype.constructor=i,i.prototype.componentDidMount=function(){var n=this.props;n.children;var o=n.gutter,p=ee(n,["children","gutter"]),d=p;d.gutter=function(y,l){var h;return o?h=o(y,l):(h=document.createElement("div"),h.className="gutter gutter-"+l),h.__isSplitGutter=!0,h},this.split=ve(this.parent.children,d)},i.prototype.componentDidUpdate=function(n){var o=this,p=this.props;p.children;var d=p.minSize,y=p.sizes,l=p.collapsed,h=ee(p,["children","minSize","sizes","collapsed"]),g=h,S=n.minSize,E=n.sizes,U=n.collapsed,W=["maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor"],T=W.map(function(z){return o.props[z]!==n[z]}).reduce(function(z,O){return z||O},!1);if(Array.isArray(d)&&Array.isArray(S)){var _=!1;d.forEach(function(z,O){_=_||z!==S[O]}),T=T||_}else Array.isArray(d)||Array.isArray(S)?T=!0:T=T||d!==S;if(T)g.minSize=d,g.sizes=y||this.split.getSizes(),this.split.destroy(!0,!0),g.gutter=function(z,O,j){return j.previousSibling},this.split=ve(Array.from(this.parent.children).filter(function(z){return!z.__isSplitGutter}),g);else if(y){var C=!1;y.forEach(function(z,O){C=C||z!==E[O]}),C&&this.split.setSizes(this.props.sizes)}Number.isInteger(l)&&(l!==U||T)&&this.split.collapse(l)},i.prototype.componentWillUnmount=function(){this.split.destroy(),delete this.split},i.prototype.render=function(){var n=this,o=this.props;o.sizes,o.minSize,o.maxSize,o.expandToMin,o.gutterSize,o.gutterAlign,o.snapOffset,o.dragInterval,o.direction,o.cursor,o.gutter,o.elementStyle,o.gutterStyle,o.onDrag,o.onDragStart,o.onDragEnd,o.collapsed;var p=o.children,d=ee(o,["sizes","minSize","maxSize","expandToMin","gutterSize","gutterAlign","snapOffset","dragInterval","direction","cursor","gutter","elementStyle","gutterStyle","onDrag","onDragStart","onDragEnd","collapsed","children"]),y=d;return le.createElement("div",Object.assign({},{ref:function(l){n.parent=l}},y),p)},i}(le.Component);re.propTypes={sizes:c.arrayOf(c.number),minSize:c.oneOfType([c.number,c.arrayOf(c.number)]),maxSize:c.oneOfType([c.number,c.arrayOf(c.number)]),expandToMin:c.bool,gutterSize:c.number,gutterAlign:c.string,snapOffset:c.oneOfType([c.number,c.arrayOf(c.number)]),dragInterval:c.number,direction:c.string,cursor:c.string,gutter:c.func,elementStyle:c.func,gutterStyle:c.func,onDrag:c.func,onDragStart:c.func,onDragEnd:c.func,collapsed:c.number,children:c.arrayOf(c.element)};re.defaultProps={sizes:void 0,minSize:void 0,maxSize:void 0,expandToMin:void 0,gutterSize:void 0,gutterAlign:void 0,snapOffset:void 0,dragInterval:void 0,direction:void 0,cursor:void 0,gutter:void 0,elementStyle:void 0,gutterStyle:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0,collapsed:void 0,children:void 0};function Ce({className:s,children:i,sizes:u,minSize:n,maxSize:o,direction:p,expandToMin:d=!1,snapOffset:y,cursor:l,handleDrag:h,onDragEnd:g}){const S=we.useRef(null);return Re.jsx(re,{ref:S,className:s,sizes:u,cursor:l,expandToMin:d,gutterAlign:"center",gutterSize:2,direction:p,minSize:n,maxSize:o,snapOffset:y,onDrag:E=>h==null?void 0:h(E,S.current),onDragEnd:E=>g==null?void 0:g(E,S.current),children:i})}export{Ce as S}; diff --git a/web/client/dist/assets/Tests-DhaVt5t1.js b/web/client/dist/assets/Tests-DhaVt5t1.js new file mode 100644 index 0000000000..79772ec4a4 --- /dev/null +++ b/web/client/dist/assets/Tests-DhaVt5t1.js @@ -0,0 +1 @@ +import{x as u,j as s,O as f,e as t,H as c,B as p,m as x,l as j}from"./index-Dj0i1-CA.js";import{P as d}from"./Page-C-XfU5BR.js";import{u as h}from"./project-BvSOI8MY.js";import{S as v}from"./SourceList-DSLO6nVJ.js";import{S}from"./SourceListItem-BHt8d9-I.js";import"./SplitPane-CViaZmw6.js";import"./file-CvJN3aZO.js";import"./Input-B-oZ6fGO.js";import"./floating-ui.react-dom-CjE-JNW1.js";import"./index-C-dJH7yZ.js";function g(){const{pathname:a}=u(),i=h(e=>e.files),r=Array.from(i.values()).filter(e=>e.path.endsWith("tests"));return s.jsx(d,{sidebar:s.jsxs("div",{className:"flex flex-col w-full h-full",children:[s.jsx(v,{keyId:"basename",keyName:"basename",to:t.Tests,items:r,isActive:e=>`${t.Tests}/${e}`===a,listItem:({to:e,name:o,description:m,text:l,disabled:n=!1})=>s.jsx(S,{to:e,name:o,text:l,description:m,disabled:n})}),s.jsx(c,{}),s.jsx("div",{className:"py-1 px-1 flex justify-end",children:s.jsx(p,{size:j.sm,variant:x.Neutral,children:"Run All"})})]}),content:s.jsx(f,{})})}export{g as default}; diff --git a/web/client/dist/assets/Welcome-DvpjH-_4.js b/web/client/dist/assets/Welcome-DvpjH-_4.js new file mode 100644 index 0000000000..8f57afe7af --- /dev/null +++ b/web/client/dist/assets/Welcome-DvpjH-_4.js @@ -0,0 +1 @@ +import{j as s,i as t}from"./index-Dj0i1-CA.js";function i({headline:e,tagline:l}){return s.jsx("div",{className:"w-full h-full flex justify-center items-center",children:s.jsxs("div",{className:"p-4",children:[t(e)&&s.jsx("h1",{className:"text-2xl font-bold",children:e}),t(l)&&s.jsx("p",{className:"text-lg mt-4",children:l})]})})}export{i as default}; diff --git a/web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js b/web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js new file mode 100644 index 0000000000..f19d79e699 --- /dev/null +++ b/web/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js @@ -0,0 +1 @@ +function r(o){throw new Error('Could not dynamically require "'+o+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}export{r as c}; diff --git a/web/client/dist/assets/context-BctCsyGb.js b/web/client/dist/assets/context-BctCsyGb.js new file mode 100644 index 0000000000..7e8faf39d2 --- /dev/null +++ b/web/client/dist/assets/context-BctCsyGb.js @@ -0,0 +1,71 @@ +var OUt=Object.defineProperty;var kUt=(l,r,o)=>r in l?OUt(l,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):l[r]=o;var H1t=(l,r,o)=>kUt(l,typeof r!="symbol"?r+"":r,o);import{r as Ne,ai as q1t,a1 as Ubt,aj as Gbt,R as Nn,j as Ci,c as Tu,ak as Ec,al as th,i as Ms,V as Vve,I as SUt,v as Yi,D as xUt,am as CUt,an as TUt,ao as EUt,ap as Ybt,L as Zbt,S as Jbt,u as AUt,a as KY,E as MUt,b as Ho,aq as ewt,f as PUt,g as nR,ar as jUt,as as DUt}from"./index-Dj0i1-CA.js";import{c as qU}from"./_commonjs-dynamic-modules-TDtrdbi3.js";import"./floating-ui.react-dom-CjE-JNW1.js";import{s as twt,u as Sx}from"./editor-CcO28cqd.js";import{M as $Ut,E as QI}from"./file-CvJN3aZO.js";import{u as Xve}from"./project-BvSOI8MY.js";import{E as NUt}from"./help-B59vE3aE.js";import{S as IUt}from"./SourceList-DSLO6nVJ.js";import{U as Q1t,z as RUt}from"./popover-_Sf0yvOI.js";function LUt({title:l,titleId:r,...o},f){return Ne.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:f,"aria-labelledby":r},o),l?Ne.createElement("title",{id:r},l):null,Ne.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const BUt=Ne.forwardRef(LUt);function FUt({title:l,titleId:r,...o},f){return Ne.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:f,"aria-labelledby":r},o),l?Ne.createElement("title",{id:r},l):null,Ne.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}const _Ut=Ne.forwardRef(FUt);function HUt({title:l,titleId:r,...o},f){return Ne.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:f,"aria-labelledby":r},o),l?Ne.createElement("title",{id:r},l):null,Ne.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const qUt=Ne.forwardRef(HUt);function QUt({title:l,titleId:r,...o},f){return Ne.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:f,"aria-labelledby":r},o),l?Ne.createElement("title",{id:r},l):null,Ne.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm4.28 10.28a.75.75 0 0 0 0-1.06l-3-3a.75.75 0 1 0-1.06 1.06l1.72 1.72H8.25a.75.75 0 0 0 0 1.5h5.69l-1.72 1.72a.75.75 0 1 0 1.06 1.06l3-3Z",clipRule:"evenodd"}))}const z1t=Ne.forwardRef(QUt);function zUt({title:l,titleId:r,...o},f){return Ne.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:f,"aria-labelledby":r},o),l?Ne.createElement("title",{id:r},l):null,Ne.createElement("path",{fillRule:"evenodd",d:"m6.72 5.66 11.62 11.62A8.25 8.25 0 0 0 6.72 5.66Zm10.56 12.68L5.66 6.72a8.25 8.25 0 0 0 11.62 11.62ZM5.105 5.106c3.807-3.808 9.98-3.808 13.788 0 3.808 3.807 3.808 9.98 0 13.788-3.807 3.808-9.98 3.808-13.788 0-3.808-3.807-3.808-9.98 0-13.788Z",clipRule:"evenodd"}))}const WUt=Ne.forwardRef(zUt);var $2e={exports:{}},W1t;function KUt(){return W1t||(W1t=1,function(l,r){(function(o){l.exports=o()})(function(){return function(){function o(f,d,b){function p(C,T){if(!d[C]){if(!f[C]){var A=typeof qU=="function"&&qU;if(!T&&A)return A(C,!0);if(v)return v(C,!0);var j=new Error("Cannot find module '"+C+"'");throw j.code="MODULE_NOT_FOUND",j}var $=d[C]={exports:{}};f[C][0].call($.exports,function(L){var z=f[C][1][L];return p(z||L)},$,$.exports,o,f,d,b)}return d[C].exports}for(var v=typeof qU=="function"&&qU,O=0;O0&&arguments[0]!==void 0?arguments[0]:{},j=A.defaultLayoutOptions,$=j===void 0?{}:j,L=A.algorithms,z=L===void 0?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:L,Z=A.workerFactory,Y=A.workerUrl;if(p(this,C),this.defaultLayoutOptions=$,this.initialized=!1,typeof Y>"u"&&typeof Z>"u")throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var ne=Z;typeof Y<"u"&&typeof Z>"u"&&(ne=function(ve){return new Worker(ve)});var he=ne(Y);if(typeof he.postMessage!="function")throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new O(he),this.worker.postMessage({cmd:"register",algorithms:z}).then(function(se){return T.initialized=!0}).catch(console.err)}return b(C,[{key:"layout",value:function(A){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=j.layoutOptions,L=$===void 0?this.defaultLayoutOptions:$,z=j.logging,Z=z===void 0?!1:z,Y=j.measureExecutionTime,ne=Y===void 0?!1:Y;return A?this.worker.postMessage({cmd:"layout",graph:A,layoutOptions:L,options:{logging:Z,measureExecutionTime:ne}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),C}();d.default=v;var O=function(){function C(T){var A=this;if(p(this,C),T===void 0)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=T,this.worker.onmessage=function(j){setTimeout(function(){A.receive(A,j)},0)}}return b(C,[{key:"postMessage",value:function(A){var j=this.id||0;this.id=j+1,A.id=j;var $=this;return new Promise(function(L,z){$.resolvers[j]=function(Z,Y){Z?($.convertGwtStyleError(Z),z(Z)):L(Y)},$.worker.postMessage(A)})}},{key:"receive",value:function(A,j){var $=j.data,L=A.resolvers[$.id];L&&(delete A.resolvers[$.id],$.error?L($.error):L(null,$.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(A){if(A){var j=A.__java$exception;j&&(j.cause&&j.cause.backingJsObject&&(A.cause=j.cause.backingJsObject,this.convertGwtStyleError(A.cause)),delete A.__java$exception)}}}]),C}()},{}],2:[function(o,f,d){(function(b){(function(){var p;typeof window<"u"?p=window:typeof b<"u"?p=b:typeof self<"u"&&(p=self);var v;function O(){}function C(){}function T(){}function A(){}function j(){}function $(){}function L(){}function z(){}function Z(){}function Y(){}function ne(){}function he(){}function se(){}function ve(){}function Ce(){}function Ie(){}function nt(){}function Re(){}function ft(){}function st(){}function at(){}function ut(){}function le(){}function Ze(){}function it(){}function Tt(){}function X(){}function Je(){}function Nt(){}function Kt(){}function Ut(){}function In(){}function Bn(){}function Pi(){}function dr(){}function Ir(){}function io(){}function ks(){}function yr(){}function Hc(){}function fo(){}function qo(){}function $o(){}function Yo(){}function xf(){}function Vs(){}function gi(){}function Ac(){}function Rd(){}function t3(){}function Y2(){}function Z2(){}function U1(){}function Au(){}function Nh(){}function Ih(){}function J2(){}function n3(){}function Ww(){}function Cf(){}function Ld(){}function Kw(){}function Vw(){}function Xw(){}function f0(){}function G1(){}function i3(){}function zx(){}function r3(){}function Wx(){}function uE(){}function Uw(){}function iL(){}function rL(){}function sL(){}function oL(){}function cL(){}function lL(){}function uL(){}function fL(){}function hL(){}function aL(){}function dL(){}function gL(){}function pL(){}function bL(){}function wL(){}function mL(){}function fE(){}function vL(){}function yL(){}function OL(){}function hE(){}function kL(){}function SL(){}function xL(){}function CL(){}function S4(){}function Kx(){}function x4(){}function TL(){}function EL(){}function Vx(){}function AL(){}function aE(){}function ML(){}function C4(){}function PL(){}function Xx(){}function cke(){}function lke(){}function uke(){}function fke(){}function hke(){}function ake(){}function dke(){}function OZ(){}function gke(){}function pke(){}function bke(){}function wke(){}function mke(){}function kZ(){}function vke(){}function yke(){}function Oke(){}function kke(){}function Ske(){}function xke(){}function Cke(){}function Tke(){}function Eke(){}function Ake(){}function Mke(){}function Pke(){}function jke(){}function Dke(){}function jL(){}function $ke(){}function Nke(){}function Ike(){}function Rke(){}function Lke(){}function SZ(){}function Bke(){}function Fke(){}function _ke(){}function Hke(){}function qke(){}function Qke(){}function zke(){}function Wke(){}function Kke(){}function Vke(){}function Xke(){}function Uke(){}function Gke(){}function Yke(){}function Zke(){}function Jke(){}function e4e(){}function t4e(){}function n4e(){}function i4e(){}function r4e(){}function s4e(){}function o4e(){}function c4e(){}function l4e(){}function u4e(){}function f4e(){}function h4e(){}function a4e(){}function d4e(){}function g4e(){}function p4e(){}function b4e(){}function w4e(){}function m4e(){}function v4e(){}function y4e(){}function O4e(){}function k4e(){}function S4e(){}function x4e(){}function C4e(){}function T4e(){}function E4e(){}function A4e(){}function M4e(){}function P4e(){}function j4e(){}function D4e(){}function $4e(){}function N4e(){}function I4e(){}function R4e(){}function L4e(){}function B4e(){}function F4e(){}function _4e(){}function H4e(){}function q4e(){}function Q4e(){}function z4e(){}function W4e(){}function K4e(){}function V4e(){}function X4e(){}function U4e(){}function G4e(){}function Y4e(){}function Z4e(){}function J4e(){}function e5e(){}function t5e(){}function n5e(){}function i5e(){}function r5e(){}function s5e(){}function o5e(){}function c5e(){}function l5e(){}function u5e(){}function f5e(){}function h5e(){}function a5e(){}function d5e(){}function g5e(){}function p5e(){}function b5e(){}function w5e(){}function m5e(){}function v5e(){}function y5e(){}function O5e(){}function k5e(){}function S5e(){}function x5e(){}function C5e(){}function T5e(){}function E5e(){}function A5e(){}function M5e(){}function xZ(){}function P5e(){}function j5e(){}function D5e(){}function $5e(){}function N5e(){}function I5e(){}function R5e(){}function L5e(){}function B5e(){}function F5e(){}function _5e(){}function H5e(){}function q5e(){}function Q5e(){}function z5e(){}function W5e(){}function K5e(){}function V5e(){}function X5e(){}function U5e(){}function G5e(){}function Y5e(){}function Z5e(){}function J5e(){}function eSe(){}function tSe(){}function nSe(){}function iSe(){}function rSe(){}function sSe(){}function oSe(){}function cSe(){}function lSe(){}function uSe(){}function fSe(){}function hSe(){}function aSe(){}function dSe(){}function gSe(){}function pSe(){}function bSe(){}function wSe(){}function mSe(){}function vSe(){}function ySe(){}function OSe(){}function kSe(){}function SSe(){}function xSe(){}function CSe(){}function TSe(){}function ESe(){}function ASe(){}function MSe(){}function PSe(){}function jSe(){}function DSe(){}function $Se(){}function NSe(){}function ISe(){}function RSe(){}function LSe(){}function BSe(){}function FSe(){}function _Se(){}function HSe(){}function qSe(){}function CZ(){}function QSe(){}function zSe(){}function WSe(){}function KSe(){}function VSe(){}function XSe(){}function USe(){}function GSe(){}function YSe(){}function ZSe(){}function JSe(){}function e6e(){}function t6e(){}function n6e(){}function i6e(){}function r6e(){}function s6e(){}function o6e(){}function c6e(){}function l6e(){}function TZ(){}function u6e(){}function f6e(){}function h6e(){}function a6e(){}function d6e(){}function g6e(){}function EZ(){}function AZ(){}function p6e(){}function MZ(){}function PZ(){}function b6e(){}function w6e(){}function m6e(){}function v6e(){}function y6e(){}function O6e(){}function k6e(){}function S6e(){}function x6e(){}function jZ(){}function C6e(){}function T6e(){}function E6e(){}function A6e(){}function M6e(){}function P6e(){}function j6e(){}function D6e(){}function $6e(){}function N6e(){}function I6e(){}function R6e(){}function L6e(){}function B6e(){}function F6e(){}function _6e(){}function H6e(){}function q6e(){}function Q6e(){}function z6e(){}function W6e(){}function K6e(){}function V6e(){}function X6e(){}function U6e(){}function G6e(){}function Y6e(){}function Z6e(){}function J6e(){}function exe(){}function txe(){}function nxe(){}function ixe(){}function rxe(){}function sxe(){}function oxe(){}function cxe(){}function lxe(){}function uxe(){}function fxe(){}function hxe(){}function axe(){}function dxe(){}function gxe(){}function pxe(){}function bxe(){}function wxe(){}function mxe(){}function vxe(){}function yxe(){}function Oxe(){}function kxe(){}function Sxe(){}function xxe(){}function Cxe(){}function Txe(){}function Exe(){}function Axe(){}function Mxe(){}function Pxe(){}function jxe(){}function Dxe(){}function $xe(){}function Nxe(){}function Ixe(){}function Rxe(){}function Lxe(){}function Bxe(){}function DL(){}function $L(){}function NL(){}function Fxe(){}function _xe(){}function Hxe(){}function qxe(){}function Qxe(){}function DZ(){}function zxe(){}function Wxe(){}function iOt(){}function Kxe(){}function Vxe(){}function Xxe(){}function Uxe(){}function Gxe(){}function Yxe(){}function Zxe(){}function Y1(){}function Jxe(){}function ev(){}function $Z(){}function e8e(){}function t8e(){}function n8e(){}function i8e(){}function r8e(){}function s8e(){}function o8e(){}function c8e(){}function l8e(){}function u8e(){}function f8e(){}function h8e(){}function a8e(){}function d8e(){}function g8e(){}function p8e(){}function b8e(){}function w8e(){}function m8e(){}function v8e(){}function y8e(){}function Be(){}function O8e(){}function k8e(){}function S8e(){}function x8e(){}function C8e(){}function T8e(){}function E8e(){}function A8e(){}function M8e(){}function P8e(){}function IL(){}function j8e(){}function D8e(){}function $8e(){}function N8e(){}function I8e(){}function NZ(){}function dE(){}function gE(){}function R8e(){}function IZ(){}function pE(){}function L8e(){}function B8e(){}function F8e(){}function _8e(){}function H8e(){}function q8e(){}function bE(){}function Q8e(){}function z8e(){}function W8e(){}function wE(){}function K8e(){}function RZ(){}function V8e(){}function RL(){}function LZ(){}function X8e(){}function U8e(){}function G8e(){}function Y8e(){}function rOt(){}function Z8e(){}function J8e(){}function e9e(){}function t9e(){}function n9e(){}function i9e(){}function r9e(){}function s9e(){}function o9e(){}function c9e(){}function s3(){}function LL(){}function l9e(){}function u9e(){}function f9e(){}function h9e(){}function a9e(){}function d9e(){}function g9e(){}function p9e(){}function b9e(){}function w9e(){}function m9e(){}function v9e(){}function y9e(){}function O9e(){}function k9e(){}function S9e(){}function x9e(){}function C9e(){}function T9e(){}function E9e(){}function A9e(){}function M9e(){}function P9e(){}function j9e(){}function D9e(){}function $9e(){}function N9e(){}function I9e(){}function R9e(){}function L9e(){}function B9e(){}function F9e(){}function _9e(){}function H9e(){}function q9e(){}function Q9e(){}function z9e(){}function W9e(){}function K9e(){}function V9e(){}function X9e(){}function U9e(){}function G9e(){}function Y9e(){}function Z9e(){}function J9e(){}function e7e(){}function t7e(){}function n7e(){}function i7e(){}function r7e(){}function s7e(){}function o7e(){}function c7e(){}function l7e(){}function u7e(){}function f7e(){}function h7e(){}function a7e(){}function d7e(){}function g7e(){}function p7e(){}function b7e(){}function w7e(){}function m7e(){}function v7e(){}function y7e(){}function O7e(){}function k7e(){}function S7e(){}function x7e(){}function C7e(){}function T7e(){}function E7e(){}function A7e(){}function M7e(){}function P7e(){}function j7e(){}function D7e(){}function $7e(){}function N7e(){}function I7e(){}function R7e(){}function L7e(){}function B7e(){}function F7e(){}function _7e(){}function H7e(){}function q7e(){}function Q7e(){}function z7e(){}function W7e(){}function K7e(){}function V7e(){}function X7e(){}function U7e(){}function G7e(){}function Y7e(){}function Z7e(){}function J7e(){}function eCe(){}function BZ(){}function tCe(){}function nCe(){}function BL(){D4()}function iCe(){PH()}function rCe(){sS()}function sCe(){aj()}function oCe(){Lce()}function cCe(){gf()}function lCe(){Xoe()}function uCe(){V9()}function fCe(){a8()}function hCe(){h8()}function aCe(){B8()}function dCe(){pDe()}function gCe(){Rv()}function pCe(){VE()}function bCe(){THe()}function wCe(){FQe()}function mCe(){rqe()}function vCe(){OFe()}function yCe(){bO()}function OCe(){f1()}function kCe(){_Qe()}function SCe(){g_e()}function xCe(){Pue()}function CCe(){EVe()}function TCe(){kFe()}function ECe(){xe()}function ACe(){yFe()}function MCe(){HQe()}function PCe(){zze()}function jCe(){xFe()}function DCe(){uqe()}function $Ce(){bDe()}function NCe(){mle()}function ICe(){Db()}function RCe(){gze()}function LCe(){Y9()}function BCe(){sQ()}function FCe(){aq()}function _Ce(){sp()}function HCe(){gse()}function qCe(){SFe()}function QCe(){IYe()}function zCe(){ple()}function WCe(){Yq()}function KCe(){YM()}function VCe(){vj()}function FZ(){Dn()}function XCe(){NP()}function UCe(){koe()}function _Z(){Bj()}function rf(){fRe()}function HZ(){gH()}function GCe(){nue()}function qZ(e){vt(e)}function YCe(e){this.a=e}function mE(e){this.a=e}function ZCe(e){this.a=e}function JCe(e){this.a=e}function eTe(e){this.a=e}function tTe(e){this.a=e}function nTe(e){this.a=e}function iTe(e){this.a=e}function QZ(e){this.a=e}function zZ(e){this.a=e}function rTe(e){this.a=e}function FL(e){this.a=e}function sTe(e){this.a=e}function _L(e){this.a=e}function oTe(e){this.a=e}function HL(e){this.a=e}function cTe(e){this.a=e}function qL(e){this.a=e}function lTe(e){this.a=e}function uTe(e){this.a=e}function fTe(e){this.a=e}function WZ(e){this.b=e}function hTe(e){this.c=e}function aTe(e){this.a=e}function dTe(e){this.a=e}function gTe(e){this.a=e}function pTe(e){this.a=e}function bTe(e){this.a=e}function wTe(e){this.a=e}function mTe(e){this.a=e}function vTe(e){this.a=e}function yTe(e){this.a=e}function OTe(e){this.a=e}function kTe(e){this.a=e}function STe(e){this.a=e}function xTe(e){this.a=e}function KZ(e){this.a=e}function VZ(e){this.a=e}function vE(e){this.a=e}function Ux(e){this.a=e}function Z1(){this.a=[]}function CTe(e,t){e.a=t}function sOt(e,t){e.a=t}function oOt(e,t){e.b=t}function cOt(e,t){e.b=t}function lOt(e,t){e.b=t}function XZ(e,t){e.j=t}function uOt(e,t){e.g=t}function fOt(e,t){e.i=t}function hOt(e,t){e.c=t}function aOt(e,t){e.d=t}function dOt(e,t){e.d=t}function gOt(e,t){e.c=t}function J1(e,t){e.k=t}function pOt(e,t){e.c=t}function UZ(e,t){e.c=t}function GZ(e,t){e.a=t}function bOt(e,t){e.a=t}function wOt(e,t){e.f=t}function mOt(e,t){e.a=t}function vOt(e,t){e.b=t}function QL(e,t){e.d=t}function yE(e,t){e.i=t}function YZ(e,t){e.o=t}function yOt(e,t){e.r=t}function OOt(e,t){e.a=t}function kOt(e,t){e.b=t}function TTe(e,t){e.e=t}function SOt(e,t){e.f=t}function ZZ(e,t){e.g=t}function xOt(e,t){e.e=t}function COt(e,t){e.f=t}function TOt(e,t){e.f=t}function EOt(e,t){e.n=t}function AOt(e,t){e.a=t}function MOt(e,t){e.a=t}function POt(e,t){e.c=t}function jOt(e,t){e.c=t}function DOt(e,t){e.d=t}function $Ot(e,t){e.e=t}function NOt(e,t){e.g=t}function IOt(e,t){e.a=t}function ROt(e,t){e.c=t}function LOt(e,t){e.d=t}function BOt(e,t){e.e=t}function FOt(e,t){e.f=t}function _Ot(e,t){e.j=t}function HOt(e,t){e.a=t}function qOt(e,t){e.b=t}function QOt(e,t){e.a=t}function ETe(e){e.b=e.a}function ATe(e){e.c=e.d.d}function T4(e){this.d=e}function eg(e){this.a=e}function o3(e){this.a=e}function JZ(e){this.a=e}function ua(e){this.a=e}function Gx(e){this.a=e}function MTe(e){this.a=e}function eJ(e){this.a=e}function Yx(e){this.a=e}function tJ(e){this.a=e}function nJ(e){this.a=e}function iJ(e){this.a=e}function Jp(e){this.a=e}function Zx(e){this.a=e}function Jx(e){this.a=e}function rJ(e){this.b=e}function c3(e){this.b=e}function l3(e){this.b=e}function zL(e){this.a=e}function PTe(e){this.a=e}function sJ(e){this.a=e}function WL(e){this.c=e}function R(e){this.c=e}function jTe(e){this.c=e}function oJ(e){this.a=e}function cJ(e){this.a=e}function lJ(e){this.a=e}function uJ(e){this.a=e}function Kn(e){this.a=e}function DTe(e){this.a=e}function fJ(e){this.a=e}function hJ(e){this.a=e}function $Te(e){this.a=e}function NTe(e){this.a=e}function E4(e){this.a=e}function ITe(e){this.a=e}function RTe(e){this.a=e}function LTe(e){this.a=e}function BTe(e){this.a=e}function FTe(e){this.a=e}function _Te(e){this.a=e}function HTe(e){this.a=e}function qTe(e){this.a=e}function QTe(e){this.a=e}function zTe(e){this.a=e}function WTe(e){this.a=e}function KTe(e){this.a=e}function VTe(e){this.a=e}function XTe(e){this.a=e}function UTe(e){this.a=e}function GTe(e){this.a=e}function YTe(e){this.a=e}function e8(e){this.a=e}function ZTe(e){this.a=e}function JTe(e){this.a=e}function OE(e){this.a=e}function eEe(e){this.a=e}function tEe(e){this.a=e}function u3(e){this.a=e}function aJ(e){this.a=e}function nEe(e){this.a=e}function iEe(e){this.a=e}function rEe(e){this.a=e}function sEe(e){this.a=e}function oEe(e){this.a=e}function dJ(e){this.a=e}function gJ(e){this.a=e}function pJ(e){this.a=e}function kE(e){this.a=e}function SE(e){this.e=e}function f3(e){this.a=e}function cEe(e){this.a=e}function tv(e){this.a=e}function bJ(e){this.a=e}function lEe(e){this.a=e}function uEe(e){this.a=e}function fEe(e){this.a=e}function hEe(e){this.a=e}function aEe(e){this.a=e}function dEe(e){this.a=e}function gEe(e){this.a=e}function pEe(e){this.a=e}function bEe(e){this.a=e}function wEe(e){this.a=e}function mEe(e){this.a=e}function wJ(e){this.a=e}function vEe(e){this.a=e}function yEe(e){this.a=e}function OEe(e){this.a=e}function kEe(e){this.a=e}function SEe(e){this.a=e}function xEe(e){this.a=e}function CEe(e){this.a=e}function TEe(e){this.a=e}function EEe(e){this.a=e}function AEe(e){this.a=e}function MEe(e){this.a=e}function PEe(e){this.a=e}function jEe(e){this.a=e}function DEe(e){this.a=e}function $Ee(e){this.a=e}function NEe(e){this.a=e}function IEe(e){this.a=e}function REe(e){this.a=e}function LEe(e){this.a=e}function BEe(e){this.a=e}function FEe(e){this.a=e}function _Ee(e){this.a=e}function HEe(e){this.a=e}function qEe(e){this.a=e}function QEe(e){this.a=e}function zEe(e){this.a=e}function WEe(e){this.a=e}function KEe(e){this.a=e}function VEe(e){this.a=e}function XEe(e){this.a=e}function UEe(e){this.a=e}function GEe(e){this.a=e}function YEe(e){this.a=e}function ZEe(e){this.a=e}function JEe(e){this.a=e}function eAe(e){this.a=e}function tAe(e){this.a=e}function nAe(e){this.c=e}function iAe(e){this.b=e}function rAe(e){this.a=e}function sAe(e){this.a=e}function oAe(e){this.a=e}function cAe(e){this.a=e}function lAe(e){this.a=e}function uAe(e){this.a=e}function fAe(e){this.a=e}function hAe(e){this.a=e}function aAe(e){this.a=e}function dAe(e){this.a=e}function gAe(e){this.a=e}function pAe(e){this.a=e}function bAe(e){this.a=e}function wAe(e){this.a=e}function mAe(e){this.a=e}function vAe(e){this.a=e}function yAe(e){this.a=e}function OAe(e){this.a=e}function kAe(e){this.a=e}function SAe(e){this.a=e}function xAe(e){this.a=e}function CAe(e){this.a=e}function TAe(e){this.a=e}function EAe(e){this.a=e}function Bd(e){this.a=e}function nv(e){this.a=e}function AAe(e){this.a=e}function MAe(e){this.a=e}function PAe(e){this.a=e}function jAe(e){this.a=e}function DAe(e){this.a=e}function $Ae(e){this.a=e}function NAe(e){this.a=e}function IAe(e){this.a=e}function RAe(e){this.a=e}function LAe(e){this.a=e}function BAe(e){this.a=e}function FAe(e){this.a=e}function _Ae(e){this.a=e}function HAe(e){this.a=e}function qAe(e){this.a=e}function QAe(e){this.a=e}function xE(e){this.a=e}function zAe(e){this.a=e}function WAe(e){this.a=e}function KAe(e){this.a=e}function VAe(e){this.a=e}function XAe(e){this.a=e}function UAe(e){this.a=e}function GAe(e){this.a=e}function YAe(e){this.a=e}function ZAe(e){this.a=e}function JAe(e){this.a=e}function eMe(e){this.a=e}function tMe(e){this.a=e}function nMe(e){this.a=e}function iMe(e){this.a=e}function rMe(e){this.a=e}function sMe(e){this.a=e}function oMe(e){this.a=e}function cMe(e){this.a=e}function lMe(e){this.a=e}function uMe(e){this.a=e}function fMe(e){this.a=e}function hMe(e){this.a=e}function aMe(e){this.a=e}function dMe(e){this.a=e}function gMe(e){this.a=e}function pMe(e){this.a=e}function bMe(e){this.a=e}function wMe(e){this.a=e}function mJ(e){this.a=e}function li(e){this.b=e}function mMe(e){this.f=e}function vJ(e){this.a=e}function vMe(e){this.a=e}function yMe(e){this.a=e}function OMe(e){this.a=e}function kMe(e){this.a=e}function SMe(e){this.a=e}function xMe(e){this.a=e}function CMe(e){this.a=e}function TMe(e){this.a=e}function t8(e){this.a=e}function EMe(e){this.a=e}function AMe(e){this.b=e}function yJ(e){this.c=e}function CE(e){this.e=e}function MMe(e){this.a=e}function TE(e){this.a=e}function EE(e){this.a=e}function KL(e){this.a=e}function PMe(e){this.a=e}function jMe(e){this.d=e}function OJ(e){this.a=e}function kJ(e){this.a=e}function h0(e){this.e=e}function zOt(){this.a=0}function Gw(){fNe(this)}function pe(){ZB(this)}function Jt(){Pc(this)}function VL(){gBe(this)}function DMe(){}function a0(){this.c=n2e}function WOt(e,t){t.Wb(e)}function $Me(e,t){e.b+=t}function NMe(e){e.b=new fB}function F(e){return e.e}function KOt(e){return e.a}function VOt(e){return e.a}function XOt(e){return e.a}function UOt(e){return e.a}function GOt(e){return e.a}function YOt(){return null}function ZOt(){return null}function JOt(){lee(),fXt()}function ekt(e){e.b.tf(e.e)}function A4(e,t){e.b=t-e.b}function M4(e,t){e.a=t-e.a}function IMe(e,t){t.ad(e.a)}function tkt(e,t){Xi(t,e)}function nkt(e,t,n){e.Od(n,t)}function n8(e,t){e.e=t,t.b=e}function SJ(e){lh(),this.a=e}function RMe(e){lh(),this.a=e}function LMe(e){lh(),this.a=e}function xJ(e){bb(),this.a=e}function BMe(e){H3(),CK.be(e)}function tg(){VNe.call(this)}function CJ(){VNe.call(this)}function TJ(){tg.call(this)}function XL(){tg.call(this)}function FMe(){tg.call(this)}function i8(){tg.call(this)}function gc(){tg.call(this)}function P4(){tg.call(this)}function on(){tg.call(this)}function Nl(){tg.call(this)}function _Me(){tg.call(this)}function ro(){tg.call(this)}function HMe(){tg.call(this)}function qMe(){this.a=this}function AE(){this.Bb|=256}function QMe(){this.b=new W$e}function EJ(){EJ=X,new Jt}function AJ(){TJ.call(this)}function zMe(e,t){e.length=t}function ME(e,t){ge(e.a,t)}function ikt(e,t){Fce(e.c,t)}function rkt(e,t){Ki(e.b,t)}function skt(e,t){oj(e.a,t)}function okt(e,t){FH(e.a,t)}function h3(e,t){Hn(e.e,t)}function iv(e){kj(e.c,e.b)}function ckt(e,t){e.kc().Nb(t)}function MJ(e){this.a=sDt(e)}function Zi(){this.a=new Jt}function WMe(){this.a=new Jt}function PE(){this.a=new pe}function UL(){this.a=new pe}function PJ(){this.a=new pe}function tu(){this.a=new uE}function ng(){this.a=new kHe}function jJ(){this.a=new OZ}function DJ(){this.a=new cDe}function KMe(){this.a=new UFe}function $J(){this.a=new hFe}function NJ(){this.a=new IIe}function VMe(){this.a=new pe}function IJ(){this.a=new pe}function XMe(){this.a=new pe}function UMe(){this.a=new pe}function GMe(){this.d=new pe}function YMe(){this.a=new Zi}function ZMe(){this.a=new Jt}function JMe(){this.b=new Jt}function ePe(){this.b=new pe}function RJ(){this.e=new pe}function tPe(){this.d=new pe}function nPe(){this.a=new OCe}function iPe(){pe.call(this)}function LJ(){PE.call(this)}function rPe(){FA.call(this)}function sPe(){IJ.call(this)}function GL(){j4.call(this)}function j4(){DMe.call(this)}function rv(){DMe.call(this)}function BJ(){rv.call(this)}function oPe(){qBe.call(this)}function cPe(){qBe.call(this)}function lPe(){WJ.call(this)}function uPe(){WJ.call(this)}function fPe(){WJ.call(this)}function hPe(){KJ.call(this)}function pc(){ai.call(this)}function FJ(){I8e.call(this)}function _J(){I8e.call(this)}function aPe(){APe.call(this)}function dPe(){APe.call(this)}function gPe(){Jt.call(this)}function pPe(){Jt.call(this)}function bPe(){Jt.call(this)}function wPe(){Zi.call(this)}function YL(){RQe.call(this)}function mPe(){AE.call(this)}function ZL(){bte.call(this)}function JL(){bte.call(this)}function HJ(){Jt.call(this)}function eB(){Jt.call(this)}function vPe(){Jt.call(this)}function qJ(){wE.call(this)}function yPe(){wE.call(this)}function OPe(){qJ.call(this)}function kPe(){BZ.call(this)}function SPe(e){cQe.call(this,e)}function xPe(e){cQe.call(this,e)}function QJ(e){QZ.call(this,e)}function zJ(e){Yje.call(this,e)}function lkt(e){zJ.call(this,e)}function ukt(e){Yje.call(this,e)}function a3(){this.a=new ai}function WJ(){this.a=new Zi}function KJ(){this.a=new Jt}function CPe(){this.a=new pe}function TPe(){this.j=new pe}function VJ(){this.a=new Rxe}function EPe(){this.a=new kje}function APe(){this.a=new W8e}function tB(){tB=X,vK=new KPe}function nB(){nB=X,mK=new WPe}function D4(){D4=X,wK=new C}function jE(){jE=X,kK=new WNe}function fkt(e){zJ.call(this,e)}function hkt(e){zJ.call(this,e)}function MPe(e){D_.call(this,e)}function PPe(e){D_.call(this,e)}function jPe(e){iRe.call(this,e)}function iB(e){jLt.call(this,e)}function d0(e){nb.call(this,e)}function $4(e){QE.call(this,e)}function XJ(e){QE.call(this,e)}function DPe(e){QE.call(this,e)}function Bs(e){wLe.call(this,e)}function $Pe(e){Bs.call(this,e)}function sv(){Ux.call(this,{})}function DE(e){T3(),this.a=e}function N4(e){e.b=null,e.c=0}function akt(e,t){e.e=t,NGe(e,t)}function dkt(e,t){e.a=t,wBt(e)}function rB(e,t,n){e.a[t.g]=n}function gkt(e,t,n){$It(n,e,t)}function pkt(e,t){_St(t.i,e.n)}function NPe(e,t){HPt(e).td(t)}function bkt(e,t){return e*e/t}function IPe(e,t){return e.g-t.g}function wkt(e){return new vE(e)}function mkt(e){return new pb(e)}function $E(e){Bs.call(this,e)}function gs(e){Bs.call(this,e)}function RPe(e){Bs.call(this,e)}function sB(e){wLe.call(this,e)}function oB(e){ase(),this.a=e}function LPe(e){uRe(),this.a=e}function eb(e){RF(),this.f=e}function cB(e){RF(),this.f=e}function d3(e){Bs.call(this,e)}function Ot(e){Bs.call(this,e)}function Ps(e){Bs.call(this,e)}function BPe(e){Bs.call(this,e)}function ov(e){Bs.call(this,e)}function je(e){return vt(e),e}function oe(e){return vt(e),e}function r8(e){return vt(e),e}function UJ(e){return vt(e),e}function vkt(e){return vt(e),e}function I4(e){return e.b==e.c}function tb(e){return!!e&&e.b}function ykt(e){return!!e&&e.k}function Okt(e){return!!e&&e.j}function Jc(e){vt(e),this.a=e}function GJ(e){return Og(e),e}function R4(e){lie(e,e.length)}function Ka(e){Bs.call(this,e)}function ih(e){Bs.call(this,e)}function lB(e){Bs.call(this,e)}function Yw(e){Bs.call(this,e)}function L4(e){Bs.call(this,e)}function ln(e){Bs.call(this,e)}function uB(e){Nte.call(this,e,0)}function fB(){qie.call(this,12,3)}function YJ(){YJ=X,Zae=new ft}function FPe(){FPe=X,Yae=new O}function NE(){NE=X,o6=new se}function _Pe(){_Pe=X,wrt=new Ce}function HPe(){throw F(new on)}function ZJ(){throw F(new on)}function qPe(){throw F(new on)}function kkt(){throw F(new on)}function Skt(){throw F(new on)}function xkt(){throw F(new on)}function hB(){this.a=un(tn(Qr))}function cv(e){lh(),this.a=tn(e)}function QPe(e,t){e.Td(t),t.Sd(e)}function Ckt(e,t){e.a.ec().Mc(t)}function Tkt(e,t,n){e.c.lf(t,n)}function JJ(e){gs.call(this,e)}function rh(e){Ot.call(this,e)}function Va(){Gx.call(this,"")}function B4(){Gx.call(this,"")}function Fd(){Gx.call(this,"")}function Zw(){Gx.call(this,"")}function eee(e){gs.call(this,e)}function g3(e){c3.call(this,e)}function aB(e){PA.call(this,e)}function zPe(e){g3.call(this,e)}function WPe(){_L.call(this,null)}function KPe(){_L.call(this,null)}function IE(){IE=X,H3()}function VPe(){VPe=X,Ert=oRt()}function XPe(e){return e.a?e.b:0}function Ekt(e){return e.a?e.b:0}function Akt(e,t){return e.a-t.a}function Mkt(e,t){return e.a-t.a}function Pkt(e,t){return e.a-t.a}function RE(e,t){return Dre(e,t)}function _(e,t){return gFe(e,t)}function jkt(e,t){return t in e.a}function UPe(e,t){return e.f=t,e}function Dkt(e,t){return e.b=t,e}function GPe(e,t){return e.c=t,e}function $kt(e,t){return e.g=t,e}function tee(e,t){return e.a=t,e}function nee(e,t){return e.f=t,e}function Nkt(e,t){return e.k=t,e}function iee(e,t){return e.a=t,e}function Ikt(e,t){return e.e=t,e}function ree(e,t){return e.e=t,e}function Rkt(e,t){return e.f=t,e}function Lkt(e,t){e.b=!0,e.d=t}function Bkt(e,t){e.b=new ps(t)}function Fkt(e,t,n){t.td(e.a[n])}function _kt(e,t,n){t.we(e.a[n])}function Hkt(e,t){return e.b-t.b}function qkt(e,t){return e.g-t.g}function Qkt(e,t){return e.s-t.s}function zkt(e,t){return e?0:t-1}function YPe(e,t){return e?0:t-1}function Wkt(e,t){return e?t-1:0}function Kkt(e,t){return t.Yf(e)}function g0(e,t){return e.b=t,e}function LE(e,t){return e.a=t,e}function p0(e,t){return e.c=t,e}function b0(e,t){return e.d=t,e}function w0(e,t){return e.e=t,e}function see(e,t){return e.f=t,e}function F4(e,t){return e.a=t,e}function p3(e,t){return e.b=t,e}function b3(e,t){return e.c=t,e}function He(e,t){return e.c=t,e}function lt(e,t){return e.b=t,e}function qe(e,t){return e.d=t,e}function Qe(e,t){return e.e=t,e}function Vkt(e,t){return e.f=t,e}function ze(e,t){return e.g=t,e}function We(e,t){return e.a=t,e}function Ke(e,t){return e.i=t,e}function Ve(e,t){return e.j=t,e}function ZPe(e,t){return e.k=t,e}function Xkt(e,t){return e.j=t,e}function Ukt(e,t){f1(),_s(t,e)}function Gkt(e,t,n){z8t(e.a,t,n)}function JPe(e){bBe.call(this,e)}function oee(e){bBe.call(this,e)}function BE(e){vF.call(this,e)}function eje(e){dDt.call(this,e)}function _d(e){q0.call(this,e)}function tje(e){c_.call(this,e)}function nje(e){c_.call(this,e)}function ije(){hte.call(this,"")}function Er(){this.a=0,this.b=0}function rje(){this.b=0,this.a=0}function sje(e,t){e.b=0,Tb(e,t)}function Ykt(e,t){e.c=t,e.b=!0}function oje(e,t){return e.c._b(t)}function sf(e){return e.e&&e.e()}function dB(e){return e?e.d:null}function cje(e,t){return $We(e.b,t)}function Zkt(e){return e?e.g:null}function Jkt(e){return e?e.i:null}function Hd(e){return aa(e),e.o}function m0(){m0=X,Cdt=wIt()}function lje(){lje=X,cr=MRt()}function w3(){w3=X,t2e=vIt()}function uje(){uje=X,u1t=mIt()}function cee(){cee=X,uo=gBt()}function lee(){lee=X,R1=rO()}function fje(){throw F(new on)}function hje(){throw F(new on)}function aje(){throw F(new on)}function dje(){throw F(new on)}function gje(){throw F(new on)}function pje(){throw F(new on)}function FE(e){this.a=new lv(e)}function uee(e){fJe(),SXt(this,e)}function qd(e){this.a=new _F(e)}function Jw(e,t){for(;e.ye(t););}function fee(e,t){for(;e.sd(t););}function em(e,t){return e.a+=t,e}function gB(e,t){return e.a+=t,e}function Xa(e,t){return e.a+=t,e}function v0(e,t){return e.a+=t,e}function _4(e){return Zd(e),e.a}function _E(e){return e.b!=e.d.c}function bje(e){return e.l|e.m<<22}function hee(e,t){return e.d[t.p]}function wje(e,t){return iqt(e,t)}function aee(e,t,n){e.splice(t,n)}function mje(e){e.c?tYe(e):nYe(e)}function HE(e){this.a=0,this.b=e}function vje(){this.a=new c7(gbe)}function yje(){this.b=new c7(ebe)}function Oje(){this.b=new c7(zX)}function kje(){this.b=new c7(zX)}function Sje(){throw F(new on)}function xje(){throw F(new on)}function Cje(){throw F(new on)}function Tje(){throw F(new on)}function Eje(){throw F(new on)}function Aje(){throw F(new on)}function Mje(){throw F(new on)}function Pje(){throw F(new on)}function jje(){throw F(new on)}function Dje(){throw F(new on)}function e4t(){throw F(new ro)}function t4t(){throw F(new ro)}function s8(e){this.a=new $je(e)}function $je(e){aMt(this,e,aRt())}function o8(e){return!e||eBe(e)}function c8(e){return Jf[e]!=-1}function n4t(){s$!=0&&(s$=0),o$=-1}function Nje(){bK==null&&(bK=[])}function i4t(e,t){Kq(re(e.a),t)}function r4t(e,t){Kq(re(e.a),t)}function l8(e,t){um.call(this,e,t)}function m3(e,t){l8.call(this,e,t)}function dee(e,t){this.b=e,this.c=t}function Ije(e,t){this.b=e,this.a=t}function Rje(e,t){this.a=e,this.b=t}function Lje(e,t){this.a=e,this.b=t}function Bje(e,t){this.a=e,this.b=t}function Fje(e,t){this.a=e,this.b=t}function _je(e,t){this.a=e,this.b=t}function Hje(e,t){this.a=e,this.b=t}function qje(e,t){this.a=e,this.b=t}function Qje(e,t){this.a=e,this.b=t}function zje(e,t){this.b=e,this.a=t}function Wje(e,t){this.b=e,this.a=t}function Kje(e,t){this.b=e,this.a=t}function Vje(e,t){this.b=e,this.a=t}function bn(e,t){this.f=e,this.g=t}function v3(e,t){this.e=e,this.d=t}function y0(e,t){this.g=e,this.i=t}function pB(e,t){this.a=e,this.b=t}function Xje(e,t){this.a=e,this.f=t}function Uje(e,t){this.b=e,this.c=t}function s4t(e,t){this.a=e,this.b=t}function Gje(e,t){this.a=e,this.b=t}function bB(e,t){this.a=e,this.b=t}function Yje(e){Ste(e.dc()),this.c=e}function qE(e){this.b=u(tn(e),83)}function Zje(e){this.a=u(tn(e),83)}function nb(e){this.a=u(tn(e),15)}function Jje(e){this.a=u(tn(e),15)}function QE(e){this.b=u(tn(e),47)}function zE(){this.q=new p.Date}function Rh(){Rh=X,dde=new Je}function y3(){y3=X,pk=new Ze}function H4(e){return e.f.c+e.g.c}function u8(e,t){return e.b.Hc(t)}function eDe(e,t){return e.b.Ic(t)}function tDe(e,t){return e.b.Qc(t)}function nDe(e,t){return e.b.Hc(t)}function iDe(e,t){return e.c.uc(t)}function fa(e,t){return e.a._b(t)}function rDe(e,t){return qn(e.c,t)}function sDe(e,t){return il(e.b,t)}function oDe(e,t){return e>t&&t0}function mB(e,t){return ho(e,t)<0}function V4(e,t){return e.a.get(t)}function m4t(e,t){return t.split(e)}function CDe(e,t){return il(e.e,t)}function Oee(e){return vt(e),!1}function eA(e){gt.call(this,e,21)}function v4t(e,t){nFe.call(this,e,t)}function tA(e,t){bn.call(this,e,t)}function vB(e,t){bn.call(this,e,t)}function kee(e){JF(),iRe.call(this,e)}function See(e,t){oLe(e,e.length,t)}function g8(e,t){ILe(e,e.length,t)}function y4t(e,t,n){t.ud(e.a.Ge(n))}function O4t(e,t,n){t.we(e.a.Fe(n))}function k4t(e,t,n){t.td(e.a.Kb(n))}function S4t(e,t,n){e.Mb(n)&&t.td(n)}function X4(e,t,n){e.splice(t,0,n)}function x4t(e,t){return wc(e.e,t)}function nA(e,t){this.d=e,this.e=t}function TDe(e,t){this.b=e,this.a=t}function EDe(e,t){this.b=e,this.a=t}function xee(e,t){this.b=e,this.a=t}function ADe(e,t){this.a=e,this.b=t}function MDe(e,t){this.a=e,this.b=t}function PDe(e,t){this.a=e,this.b=t}function jDe(e,t){this.a=e,this.b=t}function fv(e,t){this.a=e,this.b=t}function Cee(e,t){this.b=e,this.a=t}function Tee(e,t){this.b=e,this.a=t}function iA(e,t){bn.call(this,e,t)}function rA(e,t){bn.call(this,e,t)}function Eee(e,t){bn.call(this,e,t)}function Aee(e,t){bn.call(this,e,t)}function tm(e,t){bn.call(this,e,t)}function yB(e,t){bn.call(this,e,t)}function OB(e,t){bn.call(this,e,t)}function kB(e,t){bn.call(this,e,t)}function sA(e,t){bn.call(this,e,t)}function Mee(e,t){bn.call(this,e,t)}function SB(e,t){bn.call(this,e,t)}function p8(e,t){bn.call(this,e,t)}function oA(e,t){bn.call(this,e,t)}function xB(e,t){bn.call(this,e,t)}function U4(e,t){bn.call(this,e,t)}function Pee(e,t){bn.call(this,e,t)}function $i(e,t){bn.call(this,e,t)}function cA(e,t){bn.call(this,e,t)}function DDe(e,t){this.a=e,this.b=t}function $De(e,t){this.a=e,this.b=t}function NDe(e,t){this.a=e,this.b=t}function IDe(e,t){this.a=e,this.b=t}function RDe(e,t){this.a=e,this.b=t}function LDe(e,t){this.a=e,this.b=t}function BDe(e,t){this.a=e,this.b=t}function FDe(e,t){this.a=e,this.b=t}function _De(e,t){this.a=e,this.b=t}function jee(e,t){this.b=e,this.a=t}function HDe(e,t){this.b=e,this.a=t}function qDe(e,t){this.b=e,this.a=t}function QDe(e,t){this.b=e,this.a=t}function S3(e,t){this.c=e,this.d=t}function zDe(e,t){this.e=e,this.d=t}function WDe(e,t){this.a=e,this.b=t}function KDe(e,t){this.b=t,this.c=e}function lA(e,t){bn.call(this,e,t)}function b8(e,t){bn.call(this,e,t)}function CB(e,t){bn.call(this,e,t)}function G4(e,t){bn.call(this,e,t)}function Dee(e,t){bn.call(this,e,t)}function TB(e,t){bn.call(this,e,t)}function EB(e,t){bn.call(this,e,t)}function w8(e,t){bn.call(this,e,t)}function $ee(e,t){bn.call(this,e,t)}function AB(e,t){bn.call(this,e,t)}function Y4(e,t){bn.call(this,e,t)}function Nee(e,t){bn.call(this,e,t)}function Z4(e,t){bn.call(this,e,t)}function J4(e,t){bn.call(this,e,t)}function rb(e,t){bn.call(this,e,t)}function MB(e,t){bn.call(this,e,t)}function PB(e,t){bn.call(this,e,t)}function Iee(e,t){bn.call(this,e,t)}function e5(e,t){bn.call(this,e,t)}function jB(e,t){bn.call(this,e,t)}function uA(e,t){bn.call(this,e,t)}function m8(e,t){bn.call(this,e,t)}function v8(e,t){bn.call(this,e,t)}function hv(e,t){bn.call(this,e,t)}function DB(e,t){bn.call(this,e,t)}function Ree(e,t){bn.call(this,e,t)}function $B(e,t){bn.call(this,e,t)}function NB(e,t){bn.call(this,e,t)}function Lee(e,t){bn.call(this,e,t)}function IB(e,t){bn.call(this,e,t)}function RB(e,t){bn.call(this,e,t)}function LB(e,t){bn.call(this,e,t)}function BB(e,t){bn.call(this,e,t)}function Bee(e,t){bn.call(this,e,t)}function VDe(e,t){this.b=e,this.a=t}function XDe(e,t){this.a=e,this.b=t}function UDe(e,t){this.a=e,this.b=t}function GDe(e,t){this.a=e,this.b=t}function YDe(e,t){this.a=e,this.b=t}function Fee(e,t){bn.call(this,e,t)}function _ee(e,t){bn.call(this,e,t)}function ZDe(e,t){this.b=e,this.d=t}function Hee(e,t){bn.call(this,e,t)}function qee(e,t){bn.call(this,e,t)}function JDe(e,t){this.a=e,this.b=t}function e$e(e,t){this.a=e,this.b=t}function fA(e,t){bn.call(this,e,t)}function t5(e,t){bn.call(this,e,t)}function Qee(e,t){bn.call(this,e,t)}function zee(e,t){bn.call(this,e,t)}function Wee(e,t){bn.call(this,e,t)}function FB(e,t){bn.call(this,e,t)}function Kee(e,t){bn.call(this,e,t)}function _B(e,t){bn.call(this,e,t)}function hA(e,t){bn.call(this,e,t)}function HB(e,t){bn.call(this,e,t)}function qB(e,t){bn.call(this,e,t)}function y8(e,t){bn.call(this,e,t)}function QB(e,t){bn.call(this,e,t)}function Vee(e,t){bn.call(this,e,t)}function O8(e,t){bn.call(this,e,t)}function Xee(e,t){bn.call(this,e,t)}function C4t(e,t){return wc(e.c,t)}function T4t(e,t){return wc(t.b,e)}function E4t(e,t){return-e.b.Je(t)}function Uee(e,t){return wc(e.g,t)}function k8(e,t){bn.call(this,e,t)}function av(e,t){bn.call(this,e,t)}function t$e(e,t){this.a=e,this.b=t}function n$e(e,t){this.a=e,this.b=t}function De(e,t){this.a=e,this.b=t}function n5(e,t){bn.call(this,e,t)}function i5(e,t){bn.call(this,e,t)}function S8(e,t){bn.call(this,e,t)}function zB(e,t){bn.call(this,e,t)}function aA(e,t){bn.call(this,e,t)}function r5(e,t){bn.call(this,e,t)}function WB(e,t){bn.call(this,e,t)}function dA(e,t){bn.call(this,e,t)}function nm(e,t){bn.call(this,e,t)}function x8(e,t){bn.call(this,e,t)}function s5(e,t){bn.call(this,e,t)}function o5(e,t){bn.call(this,e,t)}function C8(e,t){bn.call(this,e,t)}function gA(e,t){bn.call(this,e,t)}function im(e,t){bn.call(this,e,t)}function pA(e,t){bn.call(this,e,t)}function i$e(e,t){this.a=e,this.b=t}function r$e(e,t){this.a=e,this.b=t}function s$e(e,t){this.a=e,this.b=t}function o$e(e,t){this.a=e,this.b=t}function c$e(e,t){this.a=e,this.b=t}function l$e(e,t){this.a=e,this.b=t}function mr(e,t){this.a=e,this.b=t}function bA(e,t){bn.call(this,e,t)}function u$e(e,t){this.a=e,this.b=t}function f$e(e,t){this.a=e,this.b=t}function h$e(e,t){this.a=e,this.b=t}function a$e(e,t){this.a=e,this.b=t}function d$e(e,t){this.a=e,this.b=t}function g$e(e,t){this.a=e,this.b=t}function p$e(e,t){this.b=e,this.a=t}function b$e(e,t){this.b=e,this.a=t}function w$e(e,t){this.b=e,this.a=t}function m$e(e,t){this.b=e,this.a=t}function v$e(e,t){this.a=e,this.b=t}function y$e(e,t){this.a=e,this.b=t}function A4t(e,t){rHt(e.a,u(t,56))}function O$e(e,t){bAt(e.a,u(t,11))}function M4t(e,t){return j3(),t!=e}function k$e(){return VPe(),new Ert}function S$e(){m_(),this.b=new Zi}function x$e(){Mj(),this.a=new Zi}function C$e(){Hie(),Gne.call(this)}function dv(e,t){bn.call(this,e,t)}function T$e(e,t){this.a=e,this.b=t}function E$e(e,t){this.a=e,this.b=t}function wA(e,t){this.a=e,this.b=t}function A$e(e,t){this.a=e,this.b=t}function M$e(e,t){this.a=e,this.b=t}function P$e(e,t){this.a=e,this.b=t}function j$e(e,t){this.d=e,this.b=t}function Gee(e,t){this.d=e,this.e=t}function D$e(e,t){this.f=e,this.c=t}function T8(e,t){this.b=e,this.c=t}function Yee(e,t){this.i=e,this.g=t}function $$e(e,t){this.e=e,this.a=t}function N$e(e,t){this.a=e,this.b=t}function Zee(e,t){e.i=null,vP(e,t)}function P4t(e,t){e&&Qn(nT,e,t)}function I$e(e,t){return GH(e.a,t)}function mA(e){return F9(e.c,e.b)}function Xs(e){return e?e.dd():null}function ie(e){return e??null}function sb(e){return typeof e===Uv}function ob(e){return typeof e===jue}function lr(e){return typeof e===RQ}function Wd(e,t){return e.Hd().Xb(t)}function vA(e,t){return KMt(e.Kc(),t)}function k0(e,t){return ho(e,t)==0}function j4t(e,t){return ho(e,t)>=0}function c5(e,t){return ho(e,t)!=0}function D4t(e){return""+(vt(e),e)}function E8(e,t){return e.substr(t)}function R$e(e){return Wc(e),e.d.gc()}function KB(e){return AFt(e,e.c),e}function yA(e){return y5(e==null),e}function l5(e,t){return e.a+=""+t,e}function us(e,t){return e.a+=""+t,e}function u5(e,t){return e.a+=""+t,e}function so(e,t){return e.a+=""+t,e}function wn(e,t){return e.a+=""+t,e}function Jee(e,t){return e.a+=""+t,e}function L$e(e,t){ji(e,t,e.a,e.a.a)}function rg(e,t){ji(e,t,e.c.b,e.c)}function $4t(e,t,n){KVe(t,Fq(e,n))}function N4t(e,t,n){KVe(t,Fq(e,n))}function I4t(e,t){EAt(new Ft(e),t)}function B$e(e,t){e.q.setTime(F0(t))}function F$e(e,t){sie.call(this,e,t)}function _$e(e,t){sie.call(this,e,t)}function VB(e,t){sie.call(this,e,t)}function H$e(e){Pc(this),K5(this,e)}function ete(e){return pt(e,0),null}function of(e){return e.a=0,e.b=0,e}function q$e(e,t){return e.a=t.g+1,e}function R4t(e,t){return e.j[t.p]==2}function tte(e){return m9t(u(e,79))}function Q$e(){Q$e=X,Ost=vn(nq())}function z$e(){z$e=X,Bot=vn(TGe())}function W$e(){this.b=new lv(Sb(12))}function K$e(){this.b=0,this.a=!1}function V$e(){this.b=0,this.a=!1}function f5(e){this.a=e,BL.call(this)}function X$e(e){this.a=e,BL.call(this)}function ot(e,t){Wi.call(this,e,t)}function XB(e,t){hb.call(this,e,t)}function rm(e,t){Yee.call(this,e,t)}function UB(e,t){uO.call(this,e,t)}function U$e(e,t){A8.call(this,e,t)}function En(e,t){ZE(),Qn(yI,e,t)}function GB(e,t){return gl(e.a,0,t)}function G$e(e,t){return e.a.a.a.cc(t)}function Y$e(e,t){return ie(e)===ie(t)}function L4t(e,t){return Hi(e.a,t.a)}function B4t(e,t){return Zo(e.a,t.a)}function F4t(e,t){return DLe(e.a,t.a)}function sh(e,t){return e.indexOf(t)}function S0(e,t){return e==t?0:e?1:-1}function OA(e){return e<10?"0"+e:""+e}function _4t(e){return tn(e),new f5(e)}function Z$e(e){return Qo(e.l,e.m,e.h)}function x3(e){return Di((vt(e),e))}function H4t(e){return Di((vt(e),e))}function J$e(e,t){return Zo(e.g,t.g)}function js(e){return typeof e===jue}function q4t(e){return e==yp||e==rw}function Q4t(e){return e==yp||e==iw}function nte(e){return Ds(e.b.b,e,0)}function eNe(e){this.a=k$e(),this.b=e}function tNe(e){this.a=k$e(),this.b=e}function z4t(e,t){return ge(e.a,t),t}function W4t(e,t){return ge(e.c,t),e}function nNe(e,t){return yl(e.a,t),e}function K4t(e,t){return Nu(),t.a+=e}function V4t(e,t){return Nu(),t.a+=e}function X4t(e,t){return Nu(),t.c+=e}function ite(e,t){U3(e,0,e.length,t)}function ha(){fJ.call(this,new dg)}function iNe(){eM.call(this,0,0,0,0)}function gv(){Ll.call(this,0,0,0,0)}function ps(e){this.a=e.a,this.b=e.b}function Kd(e){return e==bu||e==Ku}function C3(e){return e==Ia||e==Na}function rNe(e){return e==b2||e==p2}function sm(e){return e!=Gf&&e!=D1}function el(e){return e.Lg()&&e.Mg()}function sNe(e){return bM(u(e,118))}function kA(e){return yl(new Ji,e)}function oNe(e,t){return new uO(t,e)}function U4t(e,t){return new uO(t,e)}function rte(e,t,n){hP(e,t),aP(e,n)}function SA(e,t,n){W0(e,t),z0(e,n)}function Tf(e,t,n){sc(e,t),oc(e,n)}function xA(e,t,n){J3(e,t),tO(e,n)}function CA(e,t,n){eO(e,t),nO(e,n)}function YB(e,t){pO(e,t),iO(e,e.D)}function ste(e){D$e.call(this,e,!0)}function cNe(e,t,n){Xte.call(this,e,t,n)}function Vd(e){h1(),GMt.call(this,e)}function lNe(){tA.call(this,"Head",1)}function uNe(){tA.call(this,"Tail",3)}function ZB(e){e.c=J(It,Ee,1,0,5,1)}function fNe(e){e.a=J(It,Ee,1,8,5,1)}function hNe(e){rc(e.xf(),new JTe(e))}function om(e){return e!=null?ci(e):0}function G4t(e,t){return xb(t,Mf(e))}function Y4t(e,t){return xb(t,Mf(e))}function Z4t(e,t){return e[e.length]=t}function J4t(e,t){return e[e.length]=t}function ote(e){return Zxt(e.b.Kc(),e.a)}function e5t(e,t){return mP(YF(e.d),t)}function t5t(e,t){return mP(YF(e.g),t)}function n5t(e,t){return mP(YF(e.j),t)}function Xr(e,t){Wi.call(this,e.b,t)}function x0(e){eM.call(this,e,e,e,e)}function cte(e){return e.b&&vQ(e),e.a}function lte(e){return e.b&&vQ(e),e.c}function i5t(e,t){Wf||(e.b=t)}function JB(e,t,n){return pi(e,t,n),n}function aNe(e,t,n){pi(e.c[t.g],t.g,n)}function r5t(e,t,n){u(e.c,69).Xh(t,n)}function s5t(e,t,n){Tf(n,n.i+e,n.j+t)}function o5t(e,t){rn(wo(e.a),TFe(t))}function c5t(e,t){rn(Qc(e.a),EFe(t))}function h5(e){Ln(),h0.call(this,e)}function l5t(e){return e==null?0:ci(e)}function dNe(){dNe=X,SX=new nS(mU)}function cn(){cn=X,new gNe,new pe}function gNe(){new Jt,new Jt,new Jt}function ute(){ute=X,EJ(),Jae=new Jt}function Ef(){Ef=X,p.Math.log(2)}function Il(){Il=X,oa=(yDe(),jdt)}function u5t(){throw F(new Ka(nrt))}function f5t(){throw F(new Ka(nrt))}function h5t(){throw F(new Ka(irt))}function a5t(){throw F(new Ka(irt))}function pNe(e){this.a=e,Ene.call(this,e)}function eF(e){this.a=e,qE.call(this,e)}function tF(e){this.a=e,qE.call(this,e)}function ir(e,t){DF(e.c,e.c.length,t)}function Fs(e){return e.at?1:0}function wNe(e,t){return ho(e,t)>0?e:t}function Qo(e,t,n){return{l:e,m:t,h:n}}function d5t(e,t){e.a!=null&&O$e(t,e.a)}function mNe(e){e.a=new Nt,e.c=new Nt}function TA(e){this.b=e,this.a=new pe}function vNe(e){this.b=new ML,this.a=e}function hte(e){ine.call(this),this.a=e}function yNe(){tA.call(this,"Range",2)}function ONe(){sce(),this.a=new c7(E1e)}function g5t(e,t){tn(t),hm(e).Jc(new Y)}function p5t(e,t){return pl(),t.n.b+=e}function b5t(e,t,n){return Qn(e.g,n,t)}function w5t(e,t,n){return Qn(e.k,n,t)}function m5t(e,t){return Qn(e.a,t.a,t)}function cm(e,t,n){return Coe(t,n,e.c)}function ate(e){return new De(e.c,e.d)}function v5t(e){return new De(e.c,e.d)}function Us(e){return new De(e.a,e.b)}function kNe(e,t){return qKt(e.a,t,null)}function y5t(e){Dr(e,null),gr(e,null)}function SNe(e){y_(e,null),O_(e,null)}function xNe(){A8.call(this,null,null)}function CNe(){NA.call(this,null,null)}function dte(e){this.a=e,Jt.call(this)}function O5t(e){this.b=(rt(),new WL(e))}function EA(e){e.j=J(ade,fe,310,0,0,1)}function k5t(e,t,n){e.c.Vc(t,u(n,133))}function S5t(e,t,n){e.c.ji(t,u(n,133))}function TNe(e,t){Gt(e),e.Gc(u(t,15))}function a5(e,t){return rKt(e.c,e.b,t)}function x5t(e,t){return new XNe(e.Kc(),t)}function nF(e,t){return SPt(e.Kc(),t)!=-1}function gte(e,t){return e.a.Bc(t)!=null}function AA(e){return e.Ob()?e.Pb():null}function ENe(e){return ah(e,0,e.length)}function W(e,t){return e!=null&&oq(e,t)}function C5t(e,t){e.q.setHours(t),OS(e,t)}function ANe(e,t){e.c&&(Bne(t),eFe(t))}function T5t(e,t,n){u(e.Kb(n),164).Nb(t)}function E5t(e,t,n){return IKt(e,t,n),n}function MNe(e,t,n){e.a=t^1502,e.b=n^pz}function iF(e,t,n){return e.a[t.g][n.g]}function Af(e,t){return e.a[t.c.p][t.p]}function A5t(e,t){return e.e[t.c.p][t.p]}function M5t(e,t){return e.c[t.c.p][t.p]}function P5t(e,t){return e.j[t.p]=F_t(t)}function j5t(e,t){return wre(e.f,t.tg())}function D5t(e,t){return wre(e.b,t.tg())}function $5t(e,t){return e.a0?t*t/e:t*t*100}function rSt(e,t){return e>0?t/(e*e):t*100}function sSt(e,t,n){return ge(t,ZWe(e,n))}function oSt(e,t,n){YM(),e.Xe(t)&&n.td(e)}function A3(e,t,n){var i;i=e.Zc(t),i.Rb(n)}function lb(e,t,n){return e.a+=t,e.b+=n,e}function cSt(e,t,n){return e.a*=t,e.b*=n,e}function j8(e,t,n){return e.a-=t,e.b-=n,e}function Bte(e,t){return e.a=t.a,e.b=t.b,e}function LA(e){return e.a=-e.a,e.b=-e.b,e}function oIe(e){this.c=e,this.a=1,this.b=1}function cIe(e){this.c=e,sc(e,0),oc(e,0)}function lIe(e){ai.call(this),q5(this,e)}function uIe(e){NQ(),NMe(this),this.mf(e)}function fIe(e,t){K4(),A8.call(this,e,t)}function Fte(e,t){Ua(),NA.call(this,e,t)}function hIe(e,t){Ua(),NA.call(this,e,t)}function aIe(e,t){Ua(),Fte.call(this,e,t)}function tl(e,t,n){sl.call(this,e,t,n,2)}function fF(e,t){Il(),JA.call(this,e,t)}function dIe(e,t){Il(),fF.call(this,e,t)}function _te(e,t){Il(),fF.call(this,e,t)}function gIe(e,t){Il(),_te.call(this,e,t)}function Hte(e,t){Il(),JA.call(this,e,t)}function pIe(e,t){Il(),Hte.call(this,e,t)}function bIe(e,t){Il(),JA.call(this,e,t)}function lSt(e,t){return e.c.Fc(u(t,133))}function qte(e,t,n){return Hj(d9(e,t),n)}function uSt(e,t,n){return t.Qk(e.e,e.c,n)}function fSt(e,t,n){return t.Rk(e.e,e.c,n)}function hF(e,t){return o1(e.e,u(t,49))}function hSt(e,t,n){eS(Qc(e.a),t,EFe(n))}function aSt(e,t,n){eS(wo(e.a),t,TFe(n))}function Qte(e,t){t.$modCount=e.$modCount}function w5(){w5=X,H6=new li("root")}function M3(){M3=X,rT=new aPe,new dPe}function wIe(){this.a=new L0,this.b=new L0}function zte(){RQe.call(this),this.Bb|=zr}function mIe(){bn.call(this,"GROW_TREE",0)}function dSt(e){return e==null?null:jVt(e)}function gSt(e){return e==null?null:FLt(e)}function pSt(e){return e==null?null:Ns(e)}function bSt(e){return e==null?null:Ns(e)}function aa(e){e.o==null&&d_t(e)}function Pe(e){return y5(e==null||sb(e)),e}function Oe(e){return y5(e==null||ob(e)),e}function un(e){return y5(e==null||lr(e)),e}function Wte(e){this.q=new p.Date(F0(e))}function D8(e,t){this.c=e,v3.call(this,e,t)}function BA(e,t){this.a=e,D8.call(this,e,t)}function wSt(e,t){this.d=e,ATe(this),this.b=t}function Kte(e,t){q_.call(this,e),this.a=t}function Vte(e,t){q_.call(this,e),this.a=t}function mSt(e){yoe.call(this,0,0),this.f=e}function Xte(e,t,n){UM.call(this,e,t,n,null)}function vIe(e,t,n){UM.call(this,e,t,n,null)}function vSt(e,t,n){return e.ue(t,n)<=0?n:t}function ySt(e,t,n){return e.ue(t,n)<=0?t:n}function OSt(e,t){return u(H0(e.b,t),149)}function kSt(e,t){return u(H0(e.c,t),229)}function aF(e){return u(Me(e.a,e.b),287)}function yIe(e){return new De(e.c,e.d+e.a)}function OIe(e){return pl(),rNe(u(e,197))}function ub(){ub=X,n1e=Ge((cl(),n0))}function SSt(e,t){t.a?lqt(e,t):rF(e.a,t.b)}function kIe(e,t){Wf||ge(e.a,t)}function xSt(e,t){return h8(),lO(t.d.i,e)}function CSt(e,t){return Rv(),new xYe(t,e)}function ch(e,t){return X8(t,Yue),e.f=t,e}function Ute(e,t,n){return n=Sl(e,t,3,n),n}function Gte(e,t,n){return n=Sl(e,t,6,n),n}function Yte(e,t,n){return n=Sl(e,t,9,n),n}function $8(e,t,n){++e.j,e.Ki(),__(e,t,n)}function SIe(e,t,n){++e.j,e.Hi(t,e.oi(t,n))}function xIe(e,t,n){var i;i=e.Zc(t),i.Rb(n)}function CIe(e,t,n){return hue(e.c,e.b,t,n)}function Zte(e,t){return(t&_n)%e.d.length}function Wi(e,t){li.call(this,e),this.a=t}function Jte(e,t){yJ.call(this,e),this.a=t}function dF(e,t){yJ.call(this,e),this.a=t}function TIe(e,t){this.c=e,q0.call(this,t)}function EIe(e,t){this.a=e,AMe.call(this,t)}function N8(e,t){this.a=e,AMe.call(this,t)}function AIe(e){this.a=(vl(e,Wb),new No(e))}function MIe(e){this.a=(vl(e,Wb),new No(e))}function I8(e){return!e.a&&(e.a=new ne),e.a}function PIe(e){return e>8?0:e+1}function TSt(e,t){return kt(),e==t?0:e?1:-1}function ene(e,t,n){return yv(e,u(t,22),n)}function ESt(e,t,n){return e.apply(t,n)}function jIe(e,t,n){return e.a+=ah(t,0,n),e}function tne(e,t){var n;return n=e.e,e.e=t,n}function ASt(e,t){var n;n=e[gz],n.call(e,t)}function MSt(e,t){var n;n=e[gz],n.call(e,t)}function fb(e,t){e.a.Vc(e.b,t),++e.b,e.c=-1}function DIe(e){Pc(e.e),e.d.b=e.d,e.d.a=e.d}function R8(e){e.b?R8(e.b):e.f.c.zc(e.e,e.d)}function PSt(e,t,n){ig(),CTe(e,t.Ce(e.a,n))}function jSt(e,t){return dB(gKe(e.a,t,!0))}function DSt(e,t){return dB(pKe(e.a,t,!0))}function $u(e,t){return RE(new Array(t),e)}function gF(e){return String.fromCharCode(e)}function $St(e){return e==null?null:e.message}function $Ie(){this.a=new pe,this.b=new pe}function NIe(){this.a=new OZ,this.b=new QMe}function IIe(){this.b=new Er,this.c=new pe}function nne(){this.d=new Er,this.e=new Er}function ine(){this.n=new Er,this.o=new Er}function FA(){this.n=new rv,this.i=new gv}function RIe(){this.a=new pCe,this.b=new n6e}function LIe(){this.a=new pe,this.d=new pe}function BIe(){this.b=new Zi,this.a=new Zi}function FIe(){this.b=new Jt,this.a=new Jt}function _Ie(){this.b=new yje,this.a=new rxe}function HIe(){FA.call(this),this.a=new Er}function m5(e){rPt.call(this,e,(JM(),jK))}function rne(e,t,n,i){eM.call(this,e,t,n,i)}function NSt(e,t,n){n!=null&&bP(t,wq(e,n))}function ISt(e,t,n){n!=null&&wP(t,wq(e,n))}function sne(e,t,n){return n=Sl(e,t,11,n),n}function Vn(e,t){return e.a+=t.a,e.b+=t.b,e}function ur(e,t){return e.a-=t.a,e.b-=t.b,e}function RSt(e,t){return e.n.a=(vt(t),t+10)}function LSt(e,t){return e.n.a=(vt(t),t+10)}function BSt(e,t){return t==e||MO(Tj(t),e)}function qIe(e,t){return Qn(e.a,t,"")==null}function FSt(e,t){return h8(),!lO(t.d.i,e)}function _St(e,t){Kd(e.f)?i_t(e,t):HRt(e,t)}function HSt(e,t){var n;return n=t.Hh(e.a),n}function hb(e,t){gs.call(this,YS+e+Bg+t)}function wv(e,t,n,i){we.call(this,e,t,n,i)}function one(e,t,n,i){we.call(this,e,t,n,i)}function QIe(e,t,n,i){one.call(this,e,t,n,i)}function zIe(e,t,n,i){fM.call(this,e,t,n,i)}function pF(e,t,n,i){fM.call(this,e,t,n,i)}function cne(e,t,n,i){fM.call(this,e,t,n,i)}function WIe(e,t,n,i){pF.call(this,e,t,n,i)}function lne(e,t,n,i){pF.call(this,e,t,n,i)}function dt(e,t,n,i){cne.call(this,e,t,n,i)}function KIe(e,t,n,i){lne.call(this,e,t,n,i)}function VIe(e,t,n,i){oie.call(this,e,t,n,i)}function XIe(e,t,n){this.a=e,Nte.call(this,t,n)}function UIe(e,t,n){this.c=t,this.b=n,this.a=e}function qSt(e,t,n){return e.d=u(t.Kb(n),164)}function une(e,t){return e.Aj().Nh().Kh(e,t)}function fne(e,t){return e.Aj().Nh().Ih(e,t)}function GIe(e,t){return vt(e),ie(e)===ie(t)}function et(e,t){return vt(e),ie(e)===ie(t)}function bF(e,t){return dB(gKe(e.a,t,!1))}function wF(e,t){return dB(pKe(e.a,t,!1))}function QSt(e,t){return e.b.sd(new MDe(e,t))}function zSt(e,t){return e.b.sd(new PDe(e,t))}function YIe(e,t){return e.b.sd(new jDe(e,t))}function hne(e,t,n){return e.lastIndexOf(t,n)}function WSt(e,t,n){return Hi(e[t.b],e[n.b])}function KSt(e,t){return ue(t,(xe(),yC),e)}function VSt(e,t){return Zo(t.a.d.p,e.a.d.p)}function XSt(e,t){return Zo(e.a.d.p,t.a.d.p)}function USt(e,t){return Hi(e.c-e.s,t.c-t.s)}function ZIe(e){return e.c?Ds(e.c.a,e,0):-1}function GSt(e){return e<100?null:new _d(e)}function mv(e){return e==t0||e==sa||e==jo}function JIe(e,t){return W(t,15)&&sYe(e.c,t)}function YSt(e,t){Wf||t&&(e.d=t)}function mF(e,t){var n;return n=t,!!Nse(e,n)}function ane(e,t){this.c=e,WF.call(this,e,t)}function eRe(e){this.c=e,VB.call(this,Uj,0)}function tRe(e,t){n8t.call(this,e,e.length,t)}function ZSt(e,t,n){return u(e.c,69).lk(t,n)}function _A(e,t,n){return u(e.c,69).mk(t,n)}function JSt(e,t,n){return uSt(e,u(t,332),n)}function dne(e,t,n){return fSt(e,u(t,332),n)}function e6t(e,t,n){return JVe(e,u(t,332),n)}function nRe(e,t,n){return ZRt(e,u(t,332),n)}function v5(e,t){return t==null?null:Ab(e.b,t)}function gne(e){return ob(e)?(vt(e),e):e.ke()}function HA(e){return!isNaN(e)&&!isFinite(e)}function iRe(e){lh(),this.a=(rt(),new g3(e))}function L8(e){j3(),this.d=e,this.a=new Gw}function Rl(e,t,n){this.a=e,this.b=t,this.c=n}function rRe(e,t,n){this.a=e,this.b=t,this.c=n}function sRe(e,t,n){this.d=e,this.b=n,this.a=t}function vF(e){mNe(this),ru(this),Hr(this,e)}function mc(e){ZB(this),Mne(this.c,0,e.Pc())}function oRe(e){rl(e.a),iqe(e.c,e.b),e.b=null}function cRe(e){this.a=e,Rh(),cc(Date.now())}function lRe(){lRe=X,$de=new O,d$=new O}function yF(){yF=X,xde=new Kt,Art=new Ut}function uRe(){uRe=X,Rdt=J(It,Ee,1,0,5,1)}function fRe(){fRe=X,e1t=J(It,Ee,1,0,5,1)}function pne(){pne=X,t1t=J(It,Ee,1,0,5,1)}function lh(){lh=X,new SJ((rt(),rt(),Yr))}function t6t(e){return JM(),mn((gqe(),jrt),e)}function n6t(e){return Bf(),mn(($He(),Lrt),e)}function i6t(e){return ZP(),mn((__e(),Qrt),e)}function r6t(e){return rP(),mn((H_e(),zrt),e)}function s6t(e){return Dj(),mn((Eze(),Wrt),e)}function o6t(e){return ff(),mn((PHe(),Xrt),e)}function c6t(e){return jc(),mn((jHe(),Grt),e)}function l6t(e){return ic(),mn((DHe(),Zrt),e)}function u6t(e){return Vj(),mn((Q$e(),Ost),e)}function f6t(e){return X0(),mn((bqe(),Sst),e)}function h6t(e){return qv(),mn((wqe(),Cst),e)}function a6t(e){return oS(),mn((mqe(),Ast),e)}function d6t(e){return KE(),mn((m_e(),Mst),e)}function g6t(e){return sP(),mn((q_e(),Kst),e)}function p6t(e){return _5(),mn((NHe(),dot),e)}function b6t(e){return qr(),mn((Xqe(),wot),e)}function w6t(e){return hO(),mn((pqe(),kot),e)}function m6t(e){return U0(),mn((IHe(),Aot),e)}function bne(e,t){if(!e)throw F(new Ot(t))}function v6t(e){return jt(),mn((pQe(),Dot),e)}function wne(e){eM.call(this,e.d,e.c,e.a,e.b)}function OF(e){eM.call(this,e.d,e.c,e.a,e.b)}function mne(e,t,n){this.b=e,this.c=t,this.a=n}function qA(e,t,n){this.b=e,this.a=t,this.c=n}function hRe(e,t,n){this.a=e,this.b=t,this.c=n}function vne(e,t,n){this.a=e,this.b=t,this.c=n}function aRe(e,t,n){this.a=e,this.b=t,this.c=n}function yne(e,t,n){this.a=e,this.b=t,this.c=n}function dRe(e,t,n){this.b=e,this.a=t,this.c=n}function QA(e,t,n){this.e=t,this.b=e,this.d=n}function y6t(e,t,n){return ig(),e.a.Od(t,n),t}function kF(e){var t;return t=new Uw,t.e=e,t}function One(e){var t;return t=new GMe,t.b=e,t}function B8(){B8=X,T$=new j4e,E$=new D4e}function Nu(){Nu=X,Kot=new gSe,Vot=new pSe}function O6t(e){return jP(),mn((yqe(),Hot),e)}function k6t(e){return Lf(),mn((kqe(),Got),e)}function S6t(e){return Pj(),mn((bze(),rct),e)}function x6t(e){return zv(),mn((mQe(),sct),e)}function C6t(e){return GM(),mn((X_e(),oct),e)}function T6t(e){return Iv(),mn((RHe(),cct),e)}function E6t(e){return Pm(),mn((Qqe(),Zot),e)}function A6t(e){return V0(),mn((FHe(),ict),e)}function M6t(e){return gP(),mn((LHe(),lct),e)}function P6t(e){return Ag(),mn((Hqe(),uct),e)}function j6t(e){return m9(),mn((z_e(),fct),e)}function D6t(e){return yg(),mn((BHe(),act),e)}function $6t(e){return yj(),mn((kQe(),dct),e)}function N6t(e){return f9(),mn((W_e(),gct),e)}function I6t(e){return G9(),mn((yQe(),pct),e)}function R6t(e){return jO(),mn((vQe(),bct),e)}function L6t(e){return ns(),mn((qze(),wct),e)}function B6t(e){return fO(),mn((HHe(),mct),e)}function F6t(e){return ya(),mn((_He(),yct),e)}function _6t(e){return FM(),mn((U_e(),Oct),e)}function H6t(e){return zl(),mn((zqe(),kct),e)}function q6t(e){return bj(),mn((OQe(),Lut),e)}function Q6t(e){return G5(),mn((qHe(),But),e)}function z6t(e){return jb(),mn((Sqe(),Fut),e)}function W6t(e){return es(),mn((WHe(),Wut),e)}function K6t(e){return Nm(),mn((pze(),Hut),e)}function V6t(e){return ka(),mn((zHe(),qut),e)}function X6t(e){return g9(),mn((V_e(),Qut),e)}function U6t(e){return EP(),mn((QHe(),Kut),e)}function G6t(e){return cS(),mn((qqe(),_ut),e)}function Y6t(e){return r9(),mn((K_e(),Vut),e)}function Z6t(e){return wO(),mn((VHe(),Xut),e)}function J6t(e){return CP(),mn((XHe(),Uut),e)}function ext(e){return DP(),mn((KHe(),Gut),e)}function txt(e){return K0(),mn((UHe(),uft),e)}function nxt(e){return B5(),mn((Y_e(),gft),e)}function ixt(e){return fh(),mn((Z_e(),Oft),e)}function rxt(e){return Pf(),mn((J_e(),Sft),e)}function sxt(e){return cf(),mn((G_e(),Bft),e)}function oxt(e){return R0(),mn((eHe(),Wft),e)}function cxt(e){return TO(),mn((vqe(),Kft),e)}function lxt(e){return dS(),mn((SQe(),Xft),e)}function uxt(e){return jM(),mn((iHe(),lht),e)}function fxt(e){return kP(),mn((nHe(),ght),e)}function hxt(e){return IM(),mn((tHe(),uht),e)}function axt(e){return QP(),mn((GHe(),bht),e)}function dxt(e){return ZM(),mn((rHe(),wht),e)}function gxt(e){return D9(),mn((YHe(),mht),e)}function pxt(e){return lj(),mn((Oqe(),$ht),e)}function bxt(e){return TP(),mn((JHe(),Nht),e)}function wxt(e){return qP(),mn((ZHe(),Iht),e)}function mxt(e){return LO(),mn((Vqe(),tat),e)}function vxt(e){return B9(),mn((eqe(),nat),e)}function yxt(e){return XE(),mn((b_e(),iat),e)}function Oxt(e){return UE(),mn((p_e(),sat),e)}function kxt(e){return s9(),mn((oHe(),oat),e)}function Sxt(e){return Z9(),mn((Wqe(),cat),e)}function xxt(e){return z4(),mn((w_e(),Sat),e)}function Cxt(e){return A9(),mn((sHe(),xat),e)}function Txt(e){return af(),mn((Kqe(),Pat),e)}function Ext(e){return hd(),mn((wze(),Dat),e)}function Axt(e){return Wh(),mn((wQe(),$at),e)}function Mxt(e){return Nb(),mn((bQe(),Fat),e)}function Pxt(e){return Gr(),mn((z$e(),Bot),e)}function jxt(e){return sO(),mn((Q_e(),Lot),e)}function Dxt(e){return ts(),mn((Uqe(),edt),e)}function $xt(e){return If(),mn((nqe(),tdt),e)}function Nxt(e){return Ca(),mn((Tqe(),ndt),e)}function Ixt(e){return mj(),mn((CQe(),idt),e)}function Rxt(e){return Sa(),mn((tqe(),sdt),e)}function Lxt(e){return Ol(),mn((Cqe(),cdt),e)}function Bxt(e){return Bb(),mn((Tze(),ldt),e)}function Fxt(e){return xm(),mn((Gqe(),udt),e)}function _xt(e){return br(),mn((hQe(),fdt),e)}function Hxt(e){return Dc(),mn((xQe(),hdt),e)}function qxt(e){return cl(),mn((Aqe(),wdt),e)}function Qxt(e){return Vc(),mn((Qze(),mdt),e)}function zxt(e){return ye(),mn((Yqe(),adt),e)}function Wxt(e){return KP(),mn((Eqe(),vdt),e)}function Kxt(e){return ol(),mn((xqe(),kdt),e)}function Vxt(e){return NO(),mn((mze(),Idt),e)}function Xxt(e,t){return vt(e),e+(vt(t),t)}function Uxt(e,t){return Rh(),rn(re(e.a),t)}function Gxt(e,t){return Rh(),rn(re(e.a),t)}function SF(e,t){this.c=e,this.a=t,this.b=t-e}function gRe(e,t,n){this.a=e,this.b=t,this.c=n}function kne(e,t,n){this.a=e,this.b=t,this.c=n}function Sne(e,t,n){this.a=e,this.b=t,this.c=n}function pRe(e,t,n){this.a=e,this.b=t,this.c=n}function bRe(e,t,n){this.a=e,this.b=t,this.c=n}function Ya(e,t,n){this.e=e,this.a=t,this.c=n}function wRe(e,t,n){Il(),Iie.call(this,e,t,n)}function xF(e,t,n){Il(),vie.call(this,e,t,n)}function xne(e,t,n){Il(),vie.call(this,e,t,n)}function Cne(e,t,n){Il(),vie.call(this,e,t,n)}function mRe(e,t,n){Il(),xF.call(this,e,t,n)}function Tne(e,t,n){Il(),xF.call(this,e,t,n)}function vRe(e,t,n){Il(),Tne.call(this,e,t,n)}function yRe(e,t,n){Il(),xne.call(this,e,t,n)}function ORe(e,t,n){Il(),Cne.call(this,e,t,n)}function F8(e,t){return tn(e),tn(t),new qje(e,t)}function vv(e,t){return tn(e),tn(t),new NRe(e,t)}function Yxt(e,t){return tn(e),tn(t),new IRe(e,t)}function Zxt(e,t){return tn(e),tn(t),new zje(e,t)}function u(e,t){return y5(e==null||oq(e,t)),e}function P3(e){var t;return t=new pe,J_(t,e),t}function Jxt(e){var t;return t=new Zi,J_(t,e),t}function kRe(e){var t;return t=new DJ,dH(t,e),t}function _8(e){var t;return t=new ai,dH(t,e),t}function e8t(e){return!e.e&&(e.e=new pe),e.e}function t8t(e){return!e.c&&(e.c=new s3),e.c}function ge(e,t){return e.c[e.c.length]=t,!0}function SRe(e,t){this.c=e,this.b=t,this.a=!1}function Ene(e){this.d=e,ATe(this),this.b=V8t(e.d)}function xRe(){this.a=";,;",this.b="",this.c=""}function n8t(e,t,n){CLe.call(this,t,n),this.a=e}function CRe(e,t,n){this.b=e,F$e.call(this,t,n)}function Ane(e,t,n){this.c=e,nA.call(this,t,n)}function Mne(e,t,n){Yce(n,0,e,t,n.length,!1)}function Bh(e,t,n,i,s){e.b=t,e.c=n,e.d=i,e.a=s}function i8t(e,t){t&&(e.b=t,e.a=(Zd(t),t.a))}function Pne(e,t,n,i,s){e.d=t,e.c=n,e.a=i,e.b=s}function jne(e){var t,n;t=e.b,n=e.c,e.b=n,e.c=t}function Dne(e){var t,n;n=e.d,t=e.a,e.d=t,e.a=n}function $ne(e){return i1(u9t(js(e)?su(e):e))}function r8t(e,t){return Zo(HRe(e.d),HRe(t.d))}function s8t(e,t){return t==(ye(),xt)?e.c:e.d}function j3(){j3=X,Zpe=(ye(),xt),DN=At}function TRe(){this.b=oe(Oe(Ae((gf(),XK))))}function ERe(e){return ig(),J(It,Ee,1,e,5,1)}function o8t(e){return new De(e.c+e.b,e.d+e.a)}function c8t(e,t){return VE(),Zo(e.d.p,t.d.p)}function CF(e){return Rt(e.b!=0),Hl(e,e.a.a)}function l8t(e){return Rt(e.b!=0),Hl(e,e.c.b)}function Nne(e,t){if(!e)throw F(new RPe(t))}function zA(e,t){if(!e)throw F(new Ot(t))}function Ine(e,t,n){S3.call(this,e,t),this.b=n}function H8(e,t,n){Gee.call(this,e,t),this.c=n}function ARe(e,t,n){sQe.call(this,t,n),this.d=e}function Rne(e){pne(),wE.call(this),this.th(e)}function MRe(e,t,n){this.a=e,rm.call(this,t,n)}function PRe(e,t,n){this.a=e,rm.call(this,t,n)}function WA(e,t,n){Gee.call(this,e,t),this.c=n}function jRe(){K3(),E9t.call(this,(Qd(),Su))}function DRe(e){return e!=null&&!KH(e,sx,ox)}function u8t(e,t){return(HWe(e)<<4|HWe(t))&Ni}function f8t(e,t){return pM(),gq(e,t),new sBe(e,t)}function sg(e,t){var n;e.n&&(n=t,ge(e.f,n))}function D3(e,t,n){var i;i=new pb(n),uf(e,t,i)}function h8t(e,t){var n;return n=e.c,ese(e,t),n}function Lne(e,t){return t<0?e.g=-1:e.g=t,e}function KA(e,t){return UAt(e),e.a*=t,e.b*=t,e}function $Re(e,t,n,i,s){e.c=t,e.d=n,e.b=i,e.a=s}function Tn(e,t){return ji(e,t,e.c.b,e.c),!0}function Bne(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function TF(e){this.b=e,this.a=M0(this.b.a).Ed()}function NRe(e,t){this.b=e,this.a=t,BL.call(this)}function IRe(e,t){this.a=e,this.b=t,BL.call(this)}function RRe(e,t){CLe.call(this,t,1040),this.a=e}function q8(e){return e==0||isNaN(e)?e:e<0?-1:1}function a8t(e){return Cv(),Kh(e)==bi(l1(e))}function d8t(e){return Cv(),l1(e)==bi(Kh(e))}function A0(e,t){return hS(e,new S3(t.a,t.b))}function g8t(e){return!_r(e)&&e.c.i.c==e.d.i.c}function VA(e){var t;return t=e.n,e.a.b+t.d+t.a}function LRe(e){var t;return t=e.n,e.e.b+t.d+t.a}function Fne(e){var t;return t=e.n,e.e.a+t.b+t.c}function BRe(e){return Ln(),new Fh(0,e)}function p8t(e){return e.a?e.a:o_(e)}function y5(e){if(!e)throw F(new d3(null))}function FRe(){FRe=X,DU=(rt(),new zL(cK))}function XA(){XA=X,new Roe((tB(),vK),(nB(),mK))}function _Re(){_Re=X,cde=J(Fr,fe,19,256,0,1)}function EF(e,t,n,i){hoe.call(this,e,t,n,i,0,0)}function b8t(e,t,n){return Qn(e.b,u(n.b,17),t)}function w8t(e,t,n){return Qn(e.b,u(n.b,17),t)}function m8t(e,t){return ge(e,new De(t.a,t.b))}function v8t(e,t){return e.c=t)throw F(new AJ)}function t9t(e,t,n){return pi(t,0,Qne(t[0],n[0])),t}function n9t(e,t,n){t.Ye(n,oe(Oe(Bt(e.b,n)))*e.a)}function xLe(e,t,n){return Rm(),oO(e,t)&&oO(e,n)}function C5(e){return Dc(),!e.Hc(La)&&!e.Hc($1)}function lM(e){return new De(e.c+e.b/2,e.d+e.a/2)}function FF(e,t){return t.kh()?o1(e.b,u(t,49)):t}function sie(e,t){this.e=e,this.d=(t&64)!=0?t|gh:t}function CLe(e,t){this.c=0,this.d=e,this.b=t|64|gh}function uM(e){this.b=new No(11),this.a=(am(),e)}function _F(e){this.b=null,this.a=(am(),e||Ode)}function TLe(e){this.a=UKe(e.a),this.b=new mc(e.b)}function ELe(e){this.b=e,pv.call(this,e),PNe(this)}function ALe(e){this.b=e,M8.call(this,e),jNe(this)}function gb(e,t,n){this.a=e,wv.call(this,t,n,5,6)}function oie(e,t,n,i){this.b=e,Fi.call(this,t,n,i)}function rr(e,t,n,i,s){W_.call(this,e,t,n,i,s,-1)}function T5(e,t,n,i,s){l9.call(this,e,t,n,i,s,-1)}function we(e,t,n,i){Fi.call(this,e,t,n),this.b=i}function fM(e,t,n,i){H8.call(this,e,t,n),this.b=i}function MLe(e){D$e.call(this,e,!1),this.a=!1}function PLe(e,t){this.b=e,hTe.call(this,e.b),this.a=t}function jLe(e,t){bb(),s4t.call(this,e,BP(new Jc(t)))}function hM(e,t){return Ln(),new yie(e,t,0)}function HF(e,t){return Ln(),new yie(6,e,t)}function i9t(e,t){return et(e.substr(0,t.length),t)}function il(e,t){return lr(t)?u_(e,t):!!xs(e.f,t)}function Or(e,t){for(vt(t);e.Ob();)t.td(e.Pb())}function fm(e,t,n){h1(),this.e=e,this.d=t,this.a=n}function Za(e,t,n,i){var s;s=e.i,s.i=t,s.a=n,s.b=i}function cie(e){var t;for(t=e;t.f;)t=t.f;return t}function kv(e){var t;return t=U5(e),Rt(t!=null),t}function r9t(e){var t;return t=Qjt(e),Rt(t!=null),t}function N3(e,t){var n;return n=e.a.gc(),mre(t,n),n-t}function lie(e,t){var n;for(n=0;n0?p.Math.log(e/t):-100}function DLe(e,t){return ho(e,t)<0?-1:ho(e,t)>0?1:0}function die(e,t,n){return SZe(e,u(t,46),u(n,167))}function $Le(e,t){return u(iie(M0(e.a)).Xb(t),42).cd()}function d9t(e,t){return RAt(t,e.length),new RRe(e,t)}function WF(e,t){this.d=e,Ft.call(this,e),this.e=t}function P0(e){this.d=(vt(e),e),this.a=0,this.c=Uj}function gie(e,t){h0.call(this,1),this.a=e,this.b=t}function NLe(e,t){return e.c?NLe(e.c,t):ge(e.b,t),e}function g9t(e,t,n){var i;return i=kb(e,t),M_(e,t,n),i}function pie(e,t){var n;return n=e.slice(0,t),Dre(n,e)}function ILe(e,t,n){var i;for(i=0;i=e.g}function e_(e,t,n){var i;return i=hH(e,t,n),Qle(e,i)}function Sv(e,t){var n;n=e.a.length,kb(e,n),M_(e,n,t)}function GLe(e,t){var n;n=console[e],n.call(console,t)}function YLe(e,t){var n;++e.j,n=e.Vi(),e.Ii(e.oi(n,t))}function T9t(e,t,n){u(t.b,65),rc(t.a,new kne(e,n,t))}function vie(e,t,n){CE.call(this,t),this.a=e,this.b=n}function yie(e,t,n){h0.call(this,e),this.a=t,this.b=n}function Oie(e,t,n){this.a=e,yJ.call(this,t),this.b=n}function ZLe(e,t,n){this.a=e,Yie.call(this,8,t,null,n)}function E9t(e){this.a=(vt(yn),yn),this.b=e,new HJ}function JLe(e){this.c=e,this.b=this.c.a,this.a=this.c.e}function kie(e){this.c=e,this.b=e.a.d.a,Qte(e.a.e,this)}function rl(e){cb(e.c!=-1),e.d.$c(e.c),e.b=e.c,e.c=-1}function M5(e){return p.Math.sqrt(e.a*e.a+e.b*e.b)}function D0(e,t){return $3(t,e.a.c.length),Me(e.a,t)}function uh(e,t){return ie(e)===ie(t)||e!=null&&qn(e,t)}function A9t(e){return 0>=e?new gee:gMt(e-1)}function M9t(e){return Aw?u_(Aw,e):!1}function eBe(e){return e?e.dc():!e.Kc().Ob()}function Rr(e){return!e.a&&e.c?e.c.b:e.a}function P9t(e){return!e.a&&(e.a=new Fi(N1,e,4)),e.a}function $0(e){return!e.d&&(e.d=new Fi(os,e,1)),e.d}function vt(e){if(e==null)throw F(new P4);return e}function P5(e){e.c?e.c.He():(e.d=!0,IHt(e))}function Zd(e){e.c?Zd(e.c):(xg(e),e.d=!0)}function tBe(e){Tie(e.a),e.b=J(It,Ee,1,e.b.length,5,1)}function j9t(e,t){return Zo(t.j.c.length,e.j.c.length)}function D9t(e,t){e.c<0||e.b.b=0?e.Bh(n):Jce(e,t)}function nBe(e){var t,n;return t=e.c.i.c,n=e.d.i.c,t==n}function N9t(e){if(e.p!=4)throw F(new gc);return e.e}function I9t(e){if(e.p!=3)throw F(new gc);return e.e}function R9t(e){if(e.p!=6)throw F(new gc);return e.f}function L9t(e){if(e.p!=6)throw F(new gc);return e.k}function B9t(e){if(e.p!=3)throw F(new gc);return e.j}function F9t(e){if(e.p!=4)throw F(new gc);return e.j}function Sie(e){return!e.b&&(e.b=new TE(new eB)),e.b}function N0(e){return e.c==-2&&ROt(e,iLt(e.g,e.b)),e.c}function L3(e,t){var n;return n=UF("",e),n.n=t,n.i=1,n}function _9t(e,t){NF(u(t.b,65),e),rc(t.a,new aJ(e))}function H9t(e,t){rn((!e.a&&(e.a=new N8(e,e)),e.a),t)}function iBe(e,t){this.b=e,WF.call(this,e,t),PNe(this)}function rBe(e,t){this.b=e,ane.call(this,e,t),jNe(this)}function xie(e,t,n,i){y0.call(this,e,t),this.d=n,this.a=i}function gM(e,t,n,i){y0.call(this,e,n),this.a=t,this.f=i}function sBe(e,t){O5t.call(this,pMt(tn(e),tn(t))),this.a=t}function oBe(){jce.call(this,_g,(uje(),u1t)),uKt(this)}function cBe(){jce.call(this,au,(w3(),t2e)),mWt(this)}function lBe(){bn.call(this,"DELAUNAY_TRIANGULATION",0)}function q9t(e){return String.fromCharCode.apply(null,e)}function Qn(e,t,n){return lr(t)?bs(e,t,n):Wo(e.f,t,n)}function Cie(e){return rt(),e?e.ve():(am(),am(),Sde)}function Q9t(e,t,n){return Lv(),n.pg(e,u(t.cd(),146))}function uBe(e,t){return XA(),new Roe(new zNe(e),new QNe(t))}function z9t(e){return vl(e,_Q),oP($r($r(5,e),e/10|0))}function pM(){pM=X,lrt=new iB(H(_(Hg,1),Gj,42,0,[]))}function fBe(e){return!e.d&&(e.d=new c3(e.c.Cc())),e.d}function B3(e){return!e.a&&(e.a=new zPe(e.c.vc())),e.a}function hBe(e){return!e.b&&(e.b=new g3(e.c.ec())),e.b}function Hh(e,t){for(;t-- >0;)e=e<<1|(e<0?1:0);return e}function Oo(e,t){return ie(e)===ie(t)||e!=null&&qn(e,t)}function W9t(e,t){return kt(),u(t.b,19).ai&&++i,i}function ga(e){var t,n;return n=(t=new a0,t),Z3(n,e),n}function s_(e){var t,n;return n=(t=new a0,t),Nce(n,e),n}function o7t(e,t){var n;return n=Bt(e.f,t),hse(t,n),null}function o_(e){var t;return t=wMt(e),t||null}function OBe(e){return!e.b&&(e.b=new we(nr,e,12,3)),e.b}function c7t(e){return e!=null&&u8(OI,e.toLowerCase())}function l7t(e,t){return Hi(vc(e)*nl(e),vc(t)*nl(t))}function u7t(e,t){return Hi(vc(e)*nl(e),vc(t)*nl(t))}function f7t(e,t){return Hi(e.d.c+e.d.b/2,t.d.c+t.d.b/2)}function h7t(e,t){return Hi(e.g.c+e.g.b/2,t.g.c+t.g.b/2)}function kBe(e,t,n){n.a?oc(e,t.b-e.f/2):sc(e,t.a-e.g/2)}function SBe(e,t,n,i){this.a=e,this.b=t,this.c=n,this.d=i}function xBe(e,t,n,i){this.a=e,this.b=t,this.c=n,this.d=i}function ug(e,t,n,i){this.e=e,this.a=t,this.c=n,this.d=i}function CBe(e,t,n,i){this.a=e,this.c=t,this.d=n,this.b=i}function TBe(e,t,n,i){Il(),mHe.call(this,t,n,i),this.a=e}function EBe(e,t,n,i){Il(),mHe.call(this,t,n,i),this.a=e}function ABe(e,t){this.a=e,wSt.call(this,e,u(e.d,15).Zc(t))}function c_(e){this.f=e,this.c=this.f.e,e.f>0&&_Ve(this)}function MBe(e,t,n,i){this.b=e,this.c=i,VB.call(this,t,n)}function PBe(e){return Rt(e.b=0&&et(e.substr(n,t.length),t)}function Jd(e,t,n,i,s,c,a){return new j_(e.e,t,n,i,s,c,a)}function VBe(e,t,n,i,s,c){this.a=e,rH.call(this,t,n,i,s,c)}function XBe(e,t,n,i,s,c){this.a=e,rH.call(this,t,n,i,s,c)}function UBe(e,t){this.g=e,this.d=H(_(ta,1),dd,10,0,[t])}function Ja(e,t){this.e=e,this.a=It,this.b=mYe(t),this.c=t}function GBe(e,t){FA.call(this),_re(this),this.a=e,this.c=t}function U8(e,t,n,i){pi(e.c[t.g],n.g,i),pi(e.c[n.g],t.g,i)}function a_(e,t,n,i){pi(e.c[t.g],t.g,n),pi(e.b[t.g],t.g,i)}function $7t(){return r9(),H(_(Qpe,1),de,376,0,[vX,TC])}function N7t(){return f9(),H(_(Ige,1),de,479,0,[Nge,eN])}function I7t(){return m9(),H(_(Dge,1),de,419,0,[Z$,jge])}function R7t(){return GM(),H(_(xge,1),de,422,0,[Sge,yV])}function L7t(){return FM(),H(_(Xge,1),de,420,0,[IV,Vge])}function B7t(){return g9(),H(_(Fpe,1),de,421,0,[bX,wX])}function F7t(){return B5(),H(_(dft,1),de,523,0,[I6,N6])}function _7t(){return cf(),H(_(Lft,1),de,520,0,[mw,E1])}function H7t(){return fh(),H(_(yft,1),de,516,0,[Dp,yd])}function q7t(){return Pf(),H(_(kft,1),de,515,0,[Gg,Xf])}function Q7t(){return R0(),H(_(zft,1),de,455,0,[A1,w2])}function z7t(){return IM(),H(_(dbe,1),de,425,0,[NX,abe])}function W7t(){return jM(),H(_(hbe,1),de,480,0,[$X,fbe])}function K7t(){return kP(),H(_(gbe,1),de,495,0,[qN,_k])}function V7t(){return ZM(),H(_(bbe,1),de,426,0,[pbe,BX])}function X7t(){return A9(),H(_(vwe,1),de,429,0,[YN,mwe])}function U7t(){return s9(),H(_(Ybe,1),de,430,0,[VX,UN])}function G7t(){return ZP(),H(_(Rde,1),de,428,0,[NK,Ide])}function Y7t(){return rP(),H(_(Bde,1),de,427,0,[Lde,IK])}function Z7t(){return sP(),H(_(a1e,1),de,424,0,[KK,O$])}function J7t(){return sO(),H(_(Rot,1),de,511,0,[uC,sV])}function TM(e,t,n,i){return n>=0?e.jh(t,n,i):e.Sg(null,n,i)}function d_(e){return e.b.b==0?e.a.$e():CF(e.b)}function eCt(e){if(e.p!=5)throw F(new gc);return en(e.f)}function tCt(e){if(e.p!=5)throw F(new gc);return en(e.k)}function Nie(e){return ie(e.a)===ie((gH(),MU))&&nKt(e),e.a}function YBe(e){this.a=u(tn(e),271),this.b=(rt(),new Ete(e))}function ZBe(e,t){OOt(this,new De(e.a,e.b)),kOt(this,_8(t))}function R0(){R0=X,A1=new qee(Jv,0),w2=new qee(ey,1)}function fh(){fh=X,Dp=new _ee(ey,0),yd=new _ee(Jv,1)}function L0(){hkt.call(this,new lv(Sb(12))),Ste(!0),this.a=2}function g_(e,t,n){Ln(),h0.call(this,e),this.b=t,this.a=n}function Iie(e,t,n){Il(),CE.call(this,t),this.a=e,this.b=n}function JBe(e){FA.call(this),_re(this),this.a=e,this.c=!0}function eFe(e){var t;t=e.c.d.b,e.b=t,e.a=e.c.d,t.a=e.c.d.b=e}function EM(e){var t;lMt(e.a),hNe(e.a),t=new OE(e.a),foe(t)}function nCt(e,t){uYe(e,!0),rc(e.e.wf(),new mne(e,!0,t))}function AM(e,t){return $_e(t),sMt(e,J(Zt,On,25,t,15,1),t)}function iCt(e,t){return Cv(),e==bi(Kh(t))||e==bi(l1(t))}function ko(e,t){return t==null?Xs(xs(e.f,null)):V4(e.g,t)}function rCt(e){return e.b==0?null:(Rt(e.b!=0),Hl(e,e.a.a))}function Di(e){return Math.max(Math.min(e,_n),-2147483648)|0}function sCt(e,t){var n=xK[e.charCodeAt(0)];return n??e}function MM(e,t){return OM(e,"set1"),OM(t,"set2"),new Gje(e,t)}function oCt(e,t){var n;return n=eMt(e.f,t),Vn(LA(n),e.f.d)}function D5(e,t){var n,i;return n=t,i=new Hc,YZe(e,n,i),i.d}function p_(e,t,n,i){var s;s=new HIe,t.a[n.g]=s,yv(e.b,i,s)}function Rie(e,t,n){var i;i=e.Yg(t),i>=0?e.sh(i,n):Cle(e,t,n)}function dm(e,t,n){DM(),e&&Qn(TU,e,t),e&&Qn(nT,e,n)}function tFe(e,t,n){this.i=new pe,this.b=e,this.g=t,this.a=n}function PM(e,t,n){this.c=new pe,this.e=e,this.f=t,this.b=n}function Lie(e,t,n){this.a=new pe,this.e=e,this.f=t,this.c=n}function nFe(e,t){EA(this),this.f=t,this.g=e,yM(this),this._d()}function G8(e,t){var n;n=e.q.getHours(),e.q.setDate(t),OS(e,n)}function iFe(e,t){var n;for(tn(t),n=e.a;n;n=n.c)t.Od(n.g,n.i)}function rFe(e){var t;return t=new FE(Sb(e.length)),Ase(t,e),t}function cCt(e){function t(){}return t.prototype=e||{},new t}function lCt(e,t){return $ze(e,t)?(jQe(e),!0):!1}function pa(e,t){if(t==null)throw F(new P4);return s$t(e,t)}function uCt(e){if(e.qe())return null;var t=e.n;return r$[t]}function Y8(e){return e.Db>>16!=3?null:u(e.Cb,33)}function Mf(e){return e.Db>>16!=9?null:u(e.Cb,33)}function sFe(e){return e.Db>>16!=6?null:u(e.Cb,79)}function oFe(e){return e.Db>>16!=7?null:u(e.Cb,235)}function cFe(e){return e.Db>>16!=7?null:u(e.Cb,160)}function bi(e){return e.Db>>16!=11?null:u(e.Cb,33)}function lFe(e,t){var n;return n=e.Yg(t),n>=0?e.lh(n):zq(e,t)}function uFe(e,t){var n;return n=new qne(t),fXe(n,e),new mc(n)}function Bie(e){var t;return t=e.d,t=e.si(e.f),rn(e,t),t.Ob()}function fFe(e,t){return e.b+=t.b,e.c+=t.c,e.d+=t.d,e.a+=t.a,e}function b_(e,t){return p.Math.abs(e)0}function hFe(){this.a=new ha,this.e=new Zi,this.g=0,this.i=0}function aFe(e){this.a=e,this.b=J(fft,fe,1944,e.e.length,0,2)}function w_(e,t,n){var i;i=Jze(e,t,n),e.b=new OP(i.c.length)}function Pf(){Pf=X,Gg=new Fee(Sz,0),Xf=new Fee("UP",1)}function jM(){jM=X,$X=new Qee(Att,0),fbe=new Qee("FAN",1)}function DM(){DM=X,TU=new Jt,nT=new Jt,P4t(Trt,new q8e)}function hCt(e){if(e.p!=0)throw F(new gc);return c5(e.f,0)}function aCt(e){if(e.p!=0)throw F(new gc);return c5(e.k,0)}function dFe(e){return e.Db>>16!=3?null:u(e.Cb,147)}function q3(e){return e.Db>>16!=6?null:u(e.Cb,235)}function wb(e){return e.Db>>16!=17?null:u(e.Cb,26)}function gFe(e,t){var n=e.a=e.a||[];return n[t]||(n[t]=e.le(t))}function dCt(e,t){var n;return n=e.a.get(t),n??new Array}function gCt(e,t){var n;n=e.q.getHours(),e.q.setMonth(t),OS(e,n)}function bs(e,t,n){return t==null?Wo(e.f,null,n):G0(e.g,t,n)}function $5(e,t,n,i,s,c){return new va(e.e,t,e.aj(),n,i,s,c)}function Z8(e,t,n){return e.a=gl(e.a,0,t)+(""+n)+E8(e.a,t),e}function pCt(e,t,n){return ge(e.a,(pM(),gq(t,n),new y0(t,n))),e}function Fie(e){return Cte(e.c),e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function pFe(e){return Cte(e.e),e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function gr(e,t){e.d&&nc(e.d.e,e),e.d=t,e.d&&ge(e.d.e,e)}function Dr(e,t){e.c&&nc(e.c.g,e),e.c=t,e.c&&ge(e.c.g,e)}function ws(e,t){e.c&&nc(e.c.a,e),e.c=t,e.c&&ge(e.c.a,e)}function _s(e,t){e.i&&nc(e.i.j,e),e.i=t,e.i&&ge(e.i.j,e)}function bFe(e,t,n){this.a=t,this.c=e,this.b=(tn(n),new mc(n))}function wFe(e,t,n){this.a=t,this.c=e,this.b=(tn(n),new mc(n))}function mFe(e,t){this.a=e,this.c=Us(this.a),this.b=new CM(t)}function bCt(e){var t;return xg(e),t=new Zi,ni(e,new KTe(t))}function mb(e,t){if(e<0||e>t)throw F(new gs(zue+e+Wue+t))}function _ie(e,t){return lLe(e.a,t)?fie(e,u(t,22).g,null):null}function wCt(e){return NH(),kt(),u(e.a,81).d.e!=0}function vFe(){vFe=X,hrt=vn((jE(),H(_(frt,1),de,538,0,[kK])))}function yFe(){yFe=X,Yut=Mc(new Ji,(qr(),Es),(Gr(),fC))}function Hie(){Hie=X,Zut=Mc(new Ji,(qr(),Es),(Gr(),fC))}function OFe(){OFe=X,eft=Mc(new Ji,(qr(),Es),(Gr(),fC))}function kFe(){kFe=X,pft=Fn(new Ji,(qr(),Es),(Gr(),d6))}function pl(){pl=X,mft=Fn(new Ji,(qr(),Es),(Gr(),d6))}function SFe(){SFe=X,vft=Fn(new Ji,(qr(),Es),(Gr(),d6))}function m_(){m_=X,xft=Fn(new Ji,(qr(),Es),(Gr(),d6))}function xFe(){xFe=X,fht=Mc(new Ji,(TO(),L6),(dS(),xX))}function hg(e,t,n,i){this.c=e,this.d=i,y_(this,t),O_(this,n)}function Ev(e){this.c=new ai,this.b=e.b,this.d=e.c,this.a=e.a}function v_(e){this.a=p.Math.cos(e),this.b=p.Math.sin(e)}function y_(e,t){e.a&&nc(e.a.k,e),e.a=t,e.a&&ge(e.a.k,e)}function O_(e,t){e.b&&nc(e.b.f,e),e.b=t,e.b&&ge(e.b.f,e)}function CFe(e,t){T9t(e,e.b,e.c),u(e.b.b,65),t&&u(t.b,65).b}function mCt(e,t){ioe(e,t),W(e.Cb,88)&&Lb(qc(u(e.Cb,88)),2)}function k_(e,t){W(e.Cb,88)&&Lb(qc(u(e.Cb,88)),4),Io(e,t)}function $M(e,t){W(e.Cb,179)&&(u(e.Cb,179).tb=null),Io(e,t)}function So(e,t){return Vr(),Z_(t)?new UA(t,e):new T8(t,e)}function vCt(e,t){var n,i;n=t.c,i=n!=null,i&&Sv(e,new pb(t.c))}function TFe(e){var t,n;return n=(w3(),t=new a0,t),Z3(n,e),n}function EFe(e){var t,n;return n=(w3(),t=new a0,t),Z3(n,e),n}function AFe(e,t){var n;return n=new iu(e),t.c[t.c.length]=n,n}function MFe(e,t){var n;return n=u(Ab(Tv(e.a),t),14),n?n.gc():0}function PFe(e){var t;return xg(e),t=(am(),am(),kde),lP(e,t)}function jFe(e){for(var t;;)if(t=e.Pb(),!e.Ob())return t}function qie(e,t){ukt.call(this,new lv(Sb(e))),vl(t,zJe),this.a=t}function qh(e,t,n){BWe(t,n,e.gc()),this.c=e,this.a=t,this.b=n-t}function DFe(e,t,n){var i;BWe(t,n,e.c.length),i=n-t,aee(e.c,t,i)}function yCt(e,t){MNe(e,en(Vi(Ud(t,24),Jj)),en(Vi(t,Jj)))}function pt(e,t){if(e<0||e>=t)throw F(new gs(zue+e+Wue+t))}function fn(e,t){if(e<0||e>=t)throw F(new eee(zue+e+Wue+t))}function gt(e,t){this.b=(vt(e),e),this.a=(t&Kb)==0?t|64|gh:t}function $Fe(e){fNe(this),zMe(this.a,Tse(p.Math.max(8,e))<<1)}function jf(e){return qs(H(_(tr,1),fe,8,0,[e.i.n,e.n,e.a]))}function OCt(){return Bf(),H(_(Uc,1),de,132,0,[Dde,Tl,tw])}function kCt(){return ff(),H(_(nw,1),de,232,0,[Zs,Fo,Js])}function SCt(){return jc(),H(_(Urt,1),de,461,0,[Ch,y1,Qu])}function xCt(){return ic(),H(_(Yrt,1),de,462,0,[wf,O1,zu])}function CCt(){return U0(),H(_(P1e,1),de,423,0,[n2,M1e,nV])}function TCt(){return _5(),H(_(T1e,1),de,379,0,[GK,UK,YK])}function ECt(){return G5(),H(_(Mpe,1),de,378,0,[fX,Ape,EN])}function ACt(){return Iv(),H(_(Tge,1),de,314,0,[dy,aC,Cge])}function MCt(){return gP(),H(_(Age,1),de,337,0,[Ege,Y$,OV])}function PCt(){return yg(),H(_(hct,1),de,450,0,[xV,Tk,o2])}function jCt(){return V0(),H(_(hV,1),de,361,0,[kp,S1,Op])}function DCt(){return ya(),H(_(vct,1),de,303,0,[gC,l2,gy])}function $Ct(){return fO(),H(_(NV,1),de,292,0,[DV,$V,dC])}function NCt(){return es(),H(_(zut,1),de,452,0,[j6,Nc,_o])}function ICt(){return ka(),H(_(Bpe,1),de,339,0,[T1,Lpe,pX])}function RCt(){return EP(),H(_(qpe,1),de,375,0,[_pe,mX,Hpe])}function LCt(){return DP(),H(_(Upe,1),de,377,0,[kX,Bk,ww])}function BCt(){return wO(),H(_(Wpe,1),de,336,0,[yX,zpe,D6])}function FCt(){return CP(),H(_(Xpe,1),de,338,0,[Vpe,OX,Kpe])}function _Ct(){return K0(),H(_(lft,1),de,454,0,[EC,$6,jN])}function HCt(){return QP(),H(_(pht,1),de,442,0,[LX,IX,RX])}function qCt(){return D9(),H(_(vbe,1),de,380,0,[QN,wbe,mbe])}function QCt(){return qP(),H(_(Lbe,1),de,381,0,[Rbe,QX,Ibe])}function zCt(){return TP(),H(_($be,1),de,293,0,[qX,Dbe,jbe])}function WCt(){return B9(),H(_(zX,1),de,437,0,[KN,VN,XN])}function KCt(){return Sa(),H(_(Tme,1),de,334,0,[cI,xd,G6])}function VCt(){return If(),H(_(gme,1),de,272,0,[Qk,Ow,zk])}function XCt(e,t){return p_t(e,t,W(t,99)&&(u(t,18).Bb&zr)!=0)}function UCt(e,t,n){var i;return i=xS(e,t,!1),i.b<=t&&i.a<=n}function NFe(e,t,n){var i;i=new X6e,i.b=t,i.a=n,++t.b,ge(e.d,i)}function GCt(e,t){var n;return n=(vt(e),e).g,Lte(!!n),vt(t),n(t)}function Qie(e,t){var n,i;return i=N3(e,t),n=e.a.Zc(i),new Uje(e,n)}function YCt(e){return e.Db>>16!=6?null:u(Vq(e),235)}function ZCt(e){if(e.p!=2)throw F(new gc);return en(e.f)&Ni}function JCt(e){if(e.p!=2)throw F(new gc);return en(e.k)&Ni}function eTt(e){return e.a==(K3(),CI)&&IOt(e,j_t(e.g,e.b)),e.a}function Av(e){return e.d==(K3(),CI)&&LOt(e,xQt(e.g,e.b)),e.d}function I(e){return Rt(e.ai?1:0}function IFe(e,t){var n,i;return n=V_(t),i=n,u(Bt(e.c,i),19).a}function RFe(e,t){var n;for(n=e+"";n.length0&&e.a[--e.d]==0;);e.a[e.d++]==0&&(e.e=0)}function t_e(e){return e.a?e.e.length==0?e.a.a:e.a.a+(""+e.e):e.c}function hTt(e){return!!e.a&&Qc(e.a.a).i!=0&&!(e.b&&hq(e.b))}function aTt(e){return!!e.u&&wo(e.u.a).i!=0&&!(e.n&&fq(e.n))}function n_e(e){return MF(e.e.Hd().gc()*e.c.Hd().gc(),16,new JCe(e))}function dTt(e,t){return DLe(cc(e.q.getTime()),cc(t.q.getTime()))}function hh(e){return u(Ff(e,J(iV,Fz,17,e.c.length,0,1)),474)}function J8(e){return u(Ff(e,J(ta,dd,10,e.c.length,0,1)),193)}function gTt(e){return pl(),!_r(e)&&!(!_r(e)&&e.c.i.c==e.d.i.c)}function i_e(e,t,n){var i;i=(tn(e),new mc(e)),zNt(new bFe(i,t,n))}function e9(e,t,n){var i;i=(tn(e),new mc(e)),WNt(new wFe(i,t,n))}function r_e(e,t){var n;return n=1-t,e.a[n]=yP(e.a[n],n),yP(e,t)}function s_e(e,t){var n;e.e=new VJ,n=_b(t),ir(n,e.c),ZGe(e,n,0)}function pr(e,t,n,i){var s;s=new $Z,s.a=t,s.b=n,s.c=i,Tn(e.a,s)}function ke(e,t,n,i){var s;s=new $Z,s.a=t,s.b=n,s.c=i,Tn(e.b,s)}function Ru(e){var t,n,i;return t=new FLe,n=aQ(t,e),JKt(t),i=n,i}function Uie(){var e,t,n;return t=(n=(e=new a0,e),n),ge(h2e,t),t}function RM(e){return e.j.c=J(It,Ee,1,0,5,1),Tie(e.c),X9t(e.a),e}function gm(e){return Q4(),W(e.g,10)?u(e.g,10):null}function pTt(e){return hm(e).dc()?!1:(g5t(e,new Ie),!0)}function bTt(e){if(!("stack"in e))try{throw e}catch{}return e}function t9(e,t){if(e<0||e>=t)throw F(new gs(MBt(e,t)));return e}function o_e(e,t,n){if(e<0||tn)throw F(new gs(eBt(e,t,n)))}function T_(e,t){if(Ki(e.a,t),t.d)throw F(new Bs(det));t.d=e}function E_(e,t){if(t.$modCount!=e.$modCount)throw F(new Nl)}function c_e(e,t){return W(t,42)?bq(e.a,u(t,42)):!1}function l_e(e,t){return W(t,42)?bq(e.a,u(t,42)):!1}function u_e(e,t){return W(t,42)?bq(e.a,u(t,42)):!1}function wTt(e,t){return e.a<=e.b?(t.ud(e.a++),!0):!1}function F0(e){var t;return js(e)?(t=e,t==-0?0:t):TAt(e)}function LM(e){var t;return Zd(e),t=new io,Jw(e.a,new zTe(t)),t}function f_e(e){var t;return Zd(e),t=new Ir,Jw(e.a,new QTe(t)),t}function vr(e,t){this.a=e,T4.call(this,e),mb(t,e.gc()),this.b=t}function Gie(e){this.e=e,this.b=this.e.a.entries(),this.a=new Array}function mTt(e){return MF(e.e.Hd().gc()*e.c.Hd().gc(),273,new ZCe(e))}function BM(e){return new No((vl(e,_Q),oP($r($r(5,e),e/10|0))))}function h_e(e){return u(Ff(e,J($ot,Wet,11,e.c.length,0,1)),1943)}function vTt(e,t,n){return n.f.c.length>0?die(e.a,t,n):die(e.b,t,n)}function yTt(e,t,n){e.d&&nc(e.d.e,e),e.d=t,e.d&&ab(e.d.e,n,e)}function A_(e,t){dXt(t,e),Dne(e.d),Dne(u(N(e,(xe(),yN)),207))}function I5(e,t){aXt(t,e),jne(e.d),jne(u(N(e,(xe(),yN)),207))}function _0(e,t){var n,i;return n=pa(e,t),i=null,n&&(i=n.fe()),i}function Q3(e,t){var n,i;return n=kb(e,t),i=null,n&&(i=n.ie()),i}function R5(e,t){var n,i;return n=pa(e,t),i=null,n&&(i=n.ie()),i}function ba(e,t){var n,i;return n=pa(e,t),i=null,n&&(i=Hce(n)),i}function OTt(e,t,n){var i;return i=xO(n),Ij(e.g,i,t),Ij(e.i,t,n),t}function kTt(e,t,n){var i;i=GDt();try{return ESt(e,t,n)}finally{$Tt(i)}}function a_e(e){var t;t=e.Wg(),this.a=W(t,69)?u(t,69).Zh():t.Kc()}function Ji(){TPe.call(this),this.j.c=J(It,Ee,1,0,5,1),this.a=-1}function Yie(e,t,n,i){this.d=e,this.n=t,this.g=n,this.o=i,this.p=-1}function d_e(e,t,n,i){this.e=i,this.d=null,this.c=e,this.a=t,this.b=n}function Zie(e,t,n){this.d=new tAe(this),this.e=e,this.i=t,this.f=n}function FM(){FM=X,IV=new Iee(YO,0),Vge=new Iee("TOP_LEFT",1)}function g_e(){g_e=X,Ype=uBe(me(1),me(4)),Gpe=uBe(me(1),me(2))}function p_e(){p_e=X,sat=vn((UE(),H(_(rat,1),de,551,0,[KX])))}function b_e(){b_e=X,iat=vn((XE(),H(_(Gbe,1),de,482,0,[WX])))}function w_e(){w_e=X,Sat=vn((z4(),H(_(wwe,1),de,530,0,[$C])))}function m_e(){m_e=X,Mst=vn((KE(),H(_(s1e,1),de,481,0,[HK])))}function STt(){return X0(),H(_(kst,1),de,406,0,[eC,J7,FK,_K])}function xTt(){return JM(),H(_(a$,1),de,297,0,[jK,Ade,Mde,Pde])}function CTt(){return oS(),H(_(Est,1),de,394,0,[sC,w$,m$,oC])}function TTt(){return qv(),H(_(xst,1),de,323,0,[nC,tC,iC,rC])}function ETt(){return hO(),H(_(Oot,1),de,405,0,[yp,rw,iw,t2])}function ATt(){return jP(),H(_(_ot,1),de,360,0,[uV,z$,W$,hC])}function v_e(e,t,n,i){return W(n,54)?new sIe(e,t,n,i):new nie(e,t,n,i)}function MTt(){return Lf(),H(_(Uot,1),de,411,0,[ay,Ok,kk,fV])}function PTt(e){var t;return e.j==(ye(),Xt)&&(t=HUe(e),wc(t,At))}function jTt(e,t){var n;n=t.a,Dr(n,t.c.d),gr(n,t.d.d),Cb(n.a,e.n)}function y_e(e,t){return u(E0(oM(u(Wn(e.k,t),15).Oc(),i2)),113)}function O_e(e,t){return u(E0(cM(u(Wn(e.k,t),15).Oc(),i2)),113)}function DTt(e){return new gt(MMt(u(e.a.dd(),14).gc(),e.a.cd()),16)}function z3(e){return W(e,14)?u(e,14).dc():!e.Kc().Ob()}function Mv(e){return Q4(),W(e.g,145)?u(e.g,145):null}function k_e(e){if(e.e.g!=e.b)throw F(new Nl);return!!e.c&&e.d>0}function xn(e){return Rt(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function Jie(e,t){vt(t),pi(e.a,e.c,t),e.c=e.c+1&e.a.length-1,SVe(e)}function e1(e,t){vt(t),e.b=e.b-1&e.a.length-1,pi(e.a,e.b,t),SVe(e)}function S_e(e,t){var n;for(n=e.j.c.length;n0&&vo(e.g,0,t,0,e.i),t}function E_e(e,t){ZE();var n;return n=u(Bt(yI,e),55),!n||n.wj(t)}function WTt(e){if(e.p!=1)throw F(new gc);return en(e.f)<<24>>24}function KTt(e){if(e.p!=1)throw F(new gc);return en(e.k)<<24>>24}function VTt(e){if(e.p!=7)throw F(new gc);return en(e.k)<<16>>16}function XTt(e){if(e.p!=7)throw F(new gc);return en(e.f)<<16>>16}function wa(e){var t;for(t=0;e.Ob();)e.Pb(),t=$r(t,1);return oP(t)}function A_e(e,t){var n;return n=new Zw,e.xd(n),n.a+="..",t.yd(n),n.a}function UTt(e,t,n){var i;i=u(Bt(e.g,n),57),ge(e.a.c,new mr(t,i))}function GTt(e,t,n){return BF(Oe(Xs(xs(e.f,t))),Oe(Xs(xs(e.f,n))))}function _M(e,t,n){return Lj(e,t,n,W(t,99)&&(u(t,18).Bb&zr)!=0)}function YTt(e,t,n){return _O(e,t,n,W(t,99)&&(u(t,18).Bb&zr)!=0)}function ZTt(e,t,n){return O_t(e,t,n,W(t,99)&&(u(t,18).Bb&zr)!=0)}function nre(e,t){return e==(jt(),zi)&&t==zi?4:e==zi||t==zi?8:32}function M_e(e,t){return ie(t)===ie(e)?"(this Map)":t==null?uc:Ns(t)}function JTt(e,t){return u(t==null?Xs(xs(e.f,null)):V4(e.g,t),281)}function P_e(e,t,n){var i;return i=xO(n),Qn(e.b,i,t),Qn(e.c,t,n),t}function j_e(e,t){var n;for(n=t;n;)lb(e,n.i,n.j),n=bi(n);return e}function ire(e,t){var n;return n=V8(P3(new X_(e,t))),YA(new X_(e,t)),n}function Qh(e,t){Vr();var n;return n=u(e,66).Mj(),$Lt(n,t),n.Ok(t)}function eEt(e,t,n,i,s){var c;c=T_t(s,n,i),ge(t,xBt(s,c)),pLt(e,s,t)}function D_e(e,t,n){e.i=0,e.e=0,t!=n&&(iWe(e,t,n),nWe(e,t,n))}function rre(e,t){var n;n=e.q.getHours(),e.q.setFullYear(t+g1),OS(e,n)}function tEt(e,t,n){if(n){var i=n.ee();e.a[t]=i(n)}else delete e.a[t]}function M_(e,t,n){if(n){var i=n.ee();n=i(n)}else n=void 0;e.a[t]=n}function $_e(e){if(e<0)throw F(new BPe("Negative array size: "+e))}function wo(e){return e.n||(qc(e),e.n=new aLe(e,os,e),Ss(e)),e.n}function L5(e){return Rt(e.a=0&&e.a[n]===t[n];n--);return n<0}function B_e(e,t){bO();var n;return n=e.j.g-t.j.g,n!=0?n:0}function F_e(e,t){return vt(t),e.a!=null?_8t(t.Kb(e.a)):h$}function HM(e){var t;return e?new qne(e):(t=new ha,dH(t,e),t)}function wl(e,t){var n;return t.b.Kb(jqe(e,t.c.Ee(),(n=new XTe(t),n)))}function qM(e){Cce(),MNe(this,en(Vi(Ud(e,24),Jj)),en(Vi(e,Jj)))}function __e(){__e=X,Qrt=vn((ZP(),H(_(Rde,1),de,428,0,[NK,Ide])))}function H_e(){H_e=X,zrt=vn((rP(),H(_(Bde,1),de,427,0,[Lde,IK])))}function q_e(){q_e=X,Kst=vn((sP(),H(_(a1e,1),de,424,0,[KK,O$])))}function Q_e(){Q_e=X,Lot=vn((sO(),H(_(Rot,1),de,511,0,[uC,sV])))}function z_e(){z_e=X,fct=vn((m9(),H(_(Dge,1),de,419,0,[Z$,jge])))}function W_e(){W_e=X,gct=vn((f9(),H(_(Ige,1),de,479,0,[Nge,eN])))}function K_e(){K_e=X,Vut=vn((r9(),H(_(Qpe,1),de,376,0,[vX,TC])))}function V_e(){V_e=X,Qut=vn((g9(),H(_(Fpe,1),de,421,0,[bX,wX])))}function X_e(){X_e=X,oct=vn((GM(),H(_(xge,1),de,422,0,[Sge,yV])))}function U_e(){U_e=X,Oct=vn((FM(),H(_(Xge,1),de,420,0,[IV,Vge])))}function G_e(){G_e=X,Bft=vn((cf(),H(_(Lft,1),de,520,0,[mw,E1])))}function Y_e(){Y_e=X,gft=vn((B5(),H(_(dft,1),de,523,0,[I6,N6])))}function Z_e(){Z_e=X,Oft=vn((fh(),H(_(yft,1),de,516,0,[Dp,yd])))}function J_e(){J_e=X,Sft=vn((Pf(),H(_(kft,1),de,515,0,[Gg,Xf])))}function eHe(){eHe=X,Wft=vn((R0(),H(_(zft,1),de,455,0,[A1,w2])))}function tHe(){tHe=X,uht=vn((IM(),H(_(dbe,1),de,425,0,[NX,abe])))}function nHe(){nHe=X,ght=vn((kP(),H(_(gbe,1),de,495,0,[qN,_k])))}function iHe(){iHe=X,lht=vn((jM(),H(_(hbe,1),de,480,0,[$X,fbe])))}function rHe(){rHe=X,wht=vn((ZM(),H(_(bbe,1),de,426,0,[pbe,BX])))}function sHe(){sHe=X,xat=vn((A9(),H(_(vwe,1),de,429,0,[YN,mwe])))}function oHe(){oHe=X,oat=vn((s9(),H(_(Ybe,1),de,430,0,[VX,UN])))}function B5(){B5=X,I6=new Bee("UPPER",0),N6=new Bee("LOWER",1)}function sEt(e,t){var n;n=new sv,fg(n,"x",t.a),fg(n,"y",t.b),Sv(e,n)}function oEt(e,t){var n;n=new sv,fg(n,"x",t.a),fg(n,"y",t.b),Sv(e,n)}function cEt(e,t){var n,i;i=!1;do n=Xze(e,t),i=i|n;while(n);return i}function cre(e,t){var n,i;for(n=t,i=0;n>0;)i+=e.a[n],n-=n&-n;return i}function cHe(e,t){var n;for(n=t;n;)lb(e,-n.i,-n.j),n=bi(n);return e}function Sr(e,t){var n,i;for(vt(t),i=e.Kc();i.Ob();)n=i.Pb(),t.td(n)}function lHe(e,t){var n;return n=t.cd(),new y0(n,e.e.pc(n,u(t.dd(),14)))}function ji(e,t,n,i){var s;s=new Nt,s.c=t,s.b=n,s.a=i,i.b=n.a=s,++e.b}function Fl(e,t,n){var i;return i=(pt(t,e.c.length),e.c[t]),e.c[t]=n,i}function lEt(e,t,n){return u(t==null?Wo(e.f,null,n):G0(e.g,t,n),281)}function $_(e){return e.c&&e.d?zie(e.c)+"->"+zie(e.d):"e_"+C0(e)}function W3(e,t){return(xg(e),_4(new ht(e,new jre(t,e.a)))).sd(bk)}function uEt(){return qr(),H(_(E1e,1),de,356,0,[Th,k1,Vo,Ao,Es])}function fEt(){return ye(),H(_(Wr,1),ao,61,0,[Ks,yt,At,Xt,xt])}function hEt(e){return IE(),function(){return kTt(e,this,arguments)}}function aEt(){return Date.now?Date.now():new Date().getTime()}function _r(e){return!e.c||!e.d?!1:!!e.c.i&&e.c.i==e.d.i}function uHe(e){if(!e.c.Sb())throw F(new ro);return e.a=!0,e.c.Ub()}function n9(e){e.i=0,g8(e.b,null),g8(e.c,null),e.a=null,e.e=null,++e.g}function lre(e){v4t.call(this,e==null?uc:Ns(e),W(e,78)?u(e,78):null)}function fHe(e){IJe(),NMe(this),this.a=new ai,Ise(this,e),Tn(this.a,e)}function hHe(){ZB(this),this.b=new De(Oi,Oi),this.a=new De(Li,Li)}function aHe(e,t){this.c=0,this.b=t,_$e.call(this,e,17493),this.a=this.c}function N_(e){QM(),!Wf&&(this.c=e,this.e=!0,this.a=new pe)}function QM(){QM=X,Wf=!0,$rt=!1,Nrt=!1,Rrt=!1,Irt=!1}function ure(e,t){return W(t,149)?et(e.c,u(t,149).c):!1}function fre(e,t){var n;return n=0,e&&(n+=e.f.a/2),t&&(n+=t.f.a/2),n}function I_(e,t){var n;return n=u(H0(e.d,t),23),n||u(H0(e.e,t),23)}function dHe(e){this.b=e,Ft.call(this,e),this.a=u(mt(this.b.a,4),126)}function gHe(e){this.b=e,bv.call(this,e),this.a=u(mt(this.b.a,4),126)}function qc(e){return e.t||(e.t=new xMe(e),eS(new LPe(e),0,e.t)),e.t}function dEt(){return ts(),H(_(X6,1),de,103,0,[na,Ku,bu,Na,Ia])}function gEt(){return xm(),H(_(Z6,1),de,249,0,[j1,VC,Eme,Y6,Ame])}function pEt(){return af(),H(_(Sd,1),de,175,0,[Et,or,Mh,Yg,kd])}function bEt(){return Z9(),H(_(twe,1),de,316,0,[Zbe,XX,ewe,UX,Jbe])}function wEt(){return cS(),H(_(jpe,1),de,315,0,[Ppe,dX,gX,M6,P6])}function mEt(){return Ag(),H(_(Pge,1),de,335,0,[kV,Mge,SV,b6,p6])}function vEt(){return LO(),H(_(eat,1),de,355,0,[m2,xy,Q6,q6,z6])}function yEt(){return Pm(),H(_(Yot,1),de,363,0,[V$,U$,G$,X$,K$])}function OEt(){return zl(),H(_(c0e,1),de,163,0,[vC,O6,x1,k6,lw])}function K3(){K3=X;var e,t;xI=(w3(),t=new AE,t),CI=(e=new YL,e)}function pHe(e){var t;return e.c||(t=e.r,W(t,88)&&(e.c=u(t,26))),e.c}function kEt(e){return e.e=3,e.d=e.Yb(),e.e!=2?(e.e=0,!0):!1}function R_(e){var t,n,i;return t=e&Xc,n=e>>22&Xc,i=e<0?Pa:0,Qo(t,n,i)}function SEt(e){var t,n,i,s;for(n=e,i=0,s=n.length;i0?dKe(e,t):IGe(e,-t)}function hre(e,t){return t==0||e.e==0?e:t>0?IGe(e,t):dKe(e,-t)}function nn(e){if(an(e))return e.c=e.a,e.a.Pb();throw F(new ro)}function wHe(e){var t,n;return t=e.c.i,n=e.d.i,t.k==(jt(),Ri)&&n.k==Ri}function L_(e){var t;return t=new I0,Cs(t,e),ue(t,(xe(),Os),null),t}function B_(e,t,n){var i;return i=e.Yg(t),i>=0?e._g(i,n,!0):rp(e,t,n)}function are(e,t,n,i){var s;for(s=0;st)throw F(new gs(Xce(e,t,"index")));return e}function F_(e,t,n,i){var s;return s=J(Zt,On,25,t,15,1),RRt(s,e,t,n,i),s}function CEt(e,t){var n;n=e.q.getHours()+(t/60|0),e.q.setMinutes(t),OS(e,n)}function TEt(e,t){return p.Math.min(t1(t.a,e.d.d.c),t1(t.b,e.d.d.c))}function Dv(e,t){return lr(t)?t==null?hle(e.f,null):Pze(e.g,t):hle(e.f,t)}function Nf(e){this.c=e,this.a=new R(this.c.a),this.b=new R(this.c.b)}function zM(){this.e=new pe,this.c=new pe,this.d=new pe,this.b=new pe}function kHe(){this.g=new PJ,this.b=new PJ,this.a=new pe,this.k=new pe}function SHe(e,t,n){this.a=e,this.c=t,this.d=n,ge(t.e,this),ge(n.b,this)}function xHe(e,t){F$e.call(this,t.rd(),t.qd()&-6),vt(e),this.a=e,this.b=t}function CHe(e,t){_$e.call(this,t.rd(),t.qd()&-6),vt(e),this.a=e,this.b=t}function vre(e,t){VB.call(this,t.rd(),t.qd()&-6),vt(e),this.a=e,this.b=t}function WM(e,t,n){this.a=e,this.b=t,this.c=n,ge(e.t,this),ge(t.i,this)}function KM(){this.b=new ai,this.a=new ai,this.b=new ai,this.a=new ai}function VM(){VM=X,W6=new li("org.eclipse.elk.labels.labelManager")}function THe(){THe=X,mge=new Wi("separateLayerConnections",(jP(),uV))}function cf(){cf=X,mw=new Hee("REGULAR",0),E1=new Hee("CRITICAL",1)}function r9(){r9=X,vX=new Lee("STACKED",0),TC=new Lee("SEQUENCED",1)}function s9(){s9=X,VX=new Vee("FIXED",0),UN=new Vee("CENTER_NODE",1)}function EEt(e,t){var n;return n=jKt(e,t),e.b=new OP(n.c.length),QWt(e,n)}function AEt(e,t,n){var i;return++e.e,--e.f,i=u(e.d[t].$c(n),133),i.dd()}function EHe(e){var t;return e.a||(t=e.r,W(t,148)&&(e.a=u(t,148))),e.a}function yre(e){if(e.a){if(e.e)return yre(e.e)}else return e;return null}function MEt(e,t){return e.pt.p?-1:0}function XM(e,t){return vt(t),e.c=0,"Initial capacity must not be negative")}function PHe(){PHe=X,Xrt=vn((ff(),H(_(nw,1),de,232,0,[Zs,Fo,Js])))}function jHe(){jHe=X,Grt=vn((jc(),H(_(Urt,1),de,461,0,[Ch,y1,Qu])))}function DHe(){DHe=X,Zrt=vn((ic(),H(_(Yrt,1),de,462,0,[wf,O1,zu])))}function $He(){$He=X,Lrt=vn((Bf(),H(_(Uc,1),de,132,0,[Dde,Tl,tw])))}function NHe(){NHe=X,dot=vn((_5(),H(_(T1e,1),de,379,0,[GK,UK,YK])))}function IHe(){IHe=X,Aot=vn((U0(),H(_(P1e,1),de,423,0,[n2,M1e,nV])))}function RHe(){RHe=X,cct=vn((Iv(),H(_(Tge,1),de,314,0,[dy,aC,Cge])))}function LHe(){LHe=X,lct=vn((gP(),H(_(Age,1),de,337,0,[Ege,Y$,OV])))}function BHe(){BHe=X,act=vn((yg(),H(_(hct,1),de,450,0,[xV,Tk,o2])))}function FHe(){FHe=X,ict=vn((V0(),H(_(hV,1),de,361,0,[kp,S1,Op])))}function _He(){_He=X,yct=vn((ya(),H(_(vct,1),de,303,0,[gC,l2,gy])))}function HHe(){HHe=X,mct=vn((fO(),H(_(NV,1),de,292,0,[DV,$V,dC])))}function qHe(){qHe=X,But=vn((G5(),H(_(Mpe,1),de,378,0,[fX,Ape,EN])))}function QHe(){QHe=X,Kut=vn((EP(),H(_(qpe,1),de,375,0,[_pe,mX,Hpe])))}function zHe(){zHe=X,qut=vn((ka(),H(_(Bpe,1),de,339,0,[T1,Lpe,pX])))}function WHe(){WHe=X,Wut=vn((es(),H(_(zut,1),de,452,0,[j6,Nc,_o])))}function KHe(){KHe=X,Gut=vn((DP(),H(_(Upe,1),de,377,0,[kX,Bk,ww])))}function VHe(){VHe=X,Xut=vn((wO(),H(_(Wpe,1),de,336,0,[yX,zpe,D6])))}function XHe(){XHe=X,Uut=vn((CP(),H(_(Xpe,1),de,338,0,[Vpe,OX,Kpe])))}function UHe(){UHe=X,uft=vn((K0(),H(_(lft,1),de,454,0,[EC,$6,jN])))}function GHe(){GHe=X,bht=vn((QP(),H(_(pht,1),de,442,0,[LX,IX,RX])))}function YHe(){YHe=X,mht=vn((D9(),H(_(vbe,1),de,380,0,[QN,wbe,mbe])))}function ZHe(){ZHe=X,Iht=vn((qP(),H(_(Lbe,1),de,381,0,[Rbe,QX,Ibe])))}function JHe(){JHe=X,Nht=vn((TP(),H(_($be,1),de,293,0,[qX,Dbe,jbe])))}function eqe(){eqe=X,nat=vn((B9(),H(_(zX,1),de,437,0,[KN,VN,XN])))}function tqe(){tqe=X,sdt=vn((Sa(),H(_(Tme,1),de,334,0,[cI,xd,G6])))}function nqe(){nqe=X,tdt=vn((If(),H(_(gme,1),de,272,0,[Qk,Ow,zk])))}function REt(){return br(),H(_(Mme,1),de,98,0,[D1,Gf,Kk,t0,sa,jo])}function gg(e,t){return!e.o&&(e.o=new sl((Lo(),I1),Np,e,0)),GH(e.o,t)}function LEt(e){return!e.g&&(e.g=new pE),!e.g.d&&(e.g.d=new OMe(e)),e.g.d}function BEt(e){return!e.g&&(e.g=new pE),!e.g.a&&(e.g.a=new kMe(e)),e.g.a}function FEt(e){return!e.g&&(e.g=new pE),!e.g.b&&(e.g.b=new yMe(e)),e.g.b}function o9(e){return!e.g&&(e.g=new pE),!e.g.c&&(e.g.c=new SMe(e)),e.g.c}function _Et(e,t,n){var i,s;for(s=new uO(t,e),i=0;in||t=0?e._g(n,!0,!0):rp(e,t,!0)}function iAt(e,t){return Hi(oe(Oe(N(e,(ae(),Tp)))),oe(Oe(N(t,Tp))))}function uqe(){uqe=X,hht=ep(ep(YE(new Ji,(TO(),R6)),(dS(),RN)),CX)}function rAt(e,t,n){var i;return i=Jze(e,t,n),e.b=new OP(i.c.length),Rle(e,i)}function sAt(e){if(e.b<=0)throw F(new ro);return--e.b,e.a-=e.c.c,me(e.a)}function oAt(e){var t;if(!e.a)throw F(new dBe);return t=e.a,e.a=bi(e.a),t}function cAt(e){for(;!e.a;)if(!YIe(e.c,new WTe(e)))return!1;return!0}function Nv(e){var t;return tn(e),W(e,198)?(t=u(e,198),t):new fTe(e)}function lAt(e){YM(),u(e.We((Dn(),yw)),174).Fc((Dc(),XC)),e.Ye(gU,null)}function YM(){YM=X,Eat=new Yxe,Mat=new Zxe,Aat=KPt((Dn(),gU),Eat,M1,Mat)}function ZM(){ZM=X,pbe=new Kee("LEAF_NUMBER",0),BX=new Kee("NODE_SIZE",1)}function uAt(e,t,n){e.a=t,e.c=n,e.b.a.$b(),ru(e.d),e.e.a.c=J(It,Ee,1,0,5,1)}function K_(e){e.a=J(Zt,On,25,e.b+1,15,1),e.c=J(Zt,On,25,e.b,15,1),e.d=0}function fAt(e,t){e.a.ue(t.d,e.b)>0&&(ge(e.c,new Ine(t.c,t.d,e.d)),e.b=t.d)}function Pre(e,t){if(e.g==null||t>=e.i)throw F(new XB(t,e.i));return e.g[t]}function fqe(e,t,n){if(gO(e,n),n!=null&&!e.wj(n))throw F(new XL);return n}function hqe(e){var t;if(e.Ek())for(t=e.i-1;t>=0;--t)V(e,t);return tre(e)}function hAt(e){var t,n;if(!e.b)return null;for(n=e.b;t=n.a[0];)n=t;return n}function aAt(e,t){var n,i;return $_e(t),n=(i=e.slice(0,t),Dre(i,e)),n.length=t,n}function U3(e,t,n,i){var s;i=(am(),i||Ode),s=e.slice(t,n),Uce(s,e,t,n,-t,i)}function _l(e,t,n,i,s){return t<0?rp(e,n,i):u(n,66).Nj().Pj(e,e.yh(),t,i,s)}function dAt(e){return W(e,172)?""+u(e,172).a:e==null?null:Ns(e)}function gAt(e){return W(e,172)?""+u(e,172).a:e==null?null:Ns(e)}function aqe(e,t){if(t.a)throw F(new Bs(det));Ki(e.a,t),t.a=e,!e.j&&(e.j=t)}function jre(e,t){VB.call(this,t.rd(),t.qd()&-16449),vt(e),this.a=e,this.c=t}function dqe(e,t){var n,i;return i=t/e.c.Hd().gc()|0,n=t%e.c.Hd().gc(),$v(e,i,n)}function jc(){jc=X,Ch=new OB(Jv,0),y1=new OB(YO,1),Qu=new OB(ey,2)}function JM(){JM=X,jK=new tA("All",0),Ade=new lNe,Mde=new yNe,Pde=new uNe}function gqe(){gqe=X,jrt=vn((JM(),H(_(a$,1),de,297,0,[jK,Ade,Mde,Pde])))}function pqe(){pqe=X,kot=vn((hO(),H(_(Oot,1),de,405,0,[yp,rw,iw,t2])))}function bqe(){bqe=X,Sst=vn((X0(),H(_(kst,1),de,406,0,[eC,J7,FK,_K])))}function wqe(){wqe=X,Cst=vn((qv(),H(_(xst,1),de,323,0,[nC,tC,iC,rC])))}function mqe(){mqe=X,Ast=vn((oS(),H(_(Est,1),de,394,0,[sC,w$,m$,oC])))}function vqe(){vqe=X,Kft=vn((TO(),H(_(ebe,1),de,393,0,[IN,R6,MC,L6])))}function yqe(){yqe=X,Hot=vn((jP(),H(_(_ot,1),de,360,0,[uV,z$,W$,hC])))}function Oqe(){Oqe=X,$ht=vn((lj(),H(_(Pbe,1),de,340,0,[HX,Abe,Mbe,Ebe])))}function kqe(){kqe=X,Got=vn((Lf(),H(_(Uot,1),de,411,0,[ay,Ok,kk,fV])))}function Sqe(){Sqe=X,Fut=vn((jb(),H(_(aX,1),de,197,0,[AN,hX,b2,p2])))}function xqe(){xqe=X,kdt=vn((ol(),H(_(Odt,1),de,396,0,[jl,Lme,Rme,Bme])))}function Cqe(){Cqe=X,cdt=vn((Ol(),H(_(odt,1),de,285,0,[KC,ia,P1,WC])))}function Tqe(){Tqe=X,ndt=vn((Ca(),H(_(mU,1),de,218,0,[wU,zC,Wk,My])))}function Eqe(){Eqe=X,vdt=vn((KP(),H(_(Ime,1),de,311,0,[OU,Dme,Nme,$me])))}function Aqe(){Aqe=X,wdt=vn((cl(),H(_(tx,1),de,374,0,[GC,n0,UC,kw])))}function Mqe(){Mqe=X,Bj(),v2e=Oi,x1t=Li,y2e=new Yx(Oi),C1t=new Yx(Li)}function f9(){f9=X,Nge=new Nee(ja,0),eN=new Nee("IMPROVE_STRAIGHTNESS",1)}function pAt(e,t){return j3(),ge(e,new mr(t,me(t.e.c.length+t.g.c.length)))}function bAt(e,t){return j3(),ge(e,new mr(t,me(t.e.c.length+t.g.c.length)))}function Dre(e,t){return p9(t)!=10&&H(zc(t),t.hm,t.__elementTypeId$,p9(t),e),e}function nc(e,t){var n;return n=Ds(e,t,0),n==-1?!1:(ed(e,n),!0)}function Pqe(e,t){var n;return n=u(Dv(e.e,t),387),n?(Bne(n),n.e):null}function G3(e){var t;return js(e)&&(t=0-e,!isNaN(t))?t:i1(aO(e))}function Ds(e,t,n){for(;n=0?ij(e,n,!0,!0):rp(e,t,!0)}function Lre(e,t){Q4();var n,i;return n=Mv(e),i=Mv(t),!!n&&!!i&&!KKe(n.k,i.k)}function vAt(e,t){sc(e,t==null||HA((vt(t),t))||isNaN((vt(t),t))?0:(vt(t),t))}function yAt(e,t){oc(e,t==null||HA((vt(t),t))||isNaN((vt(t),t))?0:(vt(t),t))}function OAt(e,t){W0(e,t==null||HA((vt(t),t))||isNaN((vt(t),t))?0:(vt(t),t))}function kAt(e,t){z0(e,t==null||HA((vt(t),t))||isNaN((vt(t),t))?0:(vt(t),t))}function Iqe(e){(this.q?this.q:(rt(),rt(),ea)).Ac(e.q?e.q:(rt(),rt(),ea))}function SAt(e,t){return W(t,99)&&(u(t,18).Bb&zr)!=0?new UB(t,e):new uO(t,e)}function xAt(e,t){return W(t,99)&&(u(t,18).Bb&zr)!=0?new UB(t,e):new uO(t,e)}function Rqe(e,t){i1e=new C4,Tst=t,u6=e,u(u6.b,65),Sre(u6,i1e,null),MZe(u6)}function Y_(e,t,n){var i;return i=e.g[t],d5(e,t,e.oi(t,n)),e.gi(t,n,i),e.ci(),i}function iP(e,t){var n;return n=e.Xc(t),n>=0?(e.$c(n),!0):!1}function Z_(e){var t;return e.d!=e.r&&(t=ou(e),e.e=!!t&&t.Cj()==vit,e.d=t),e.e}function J_(e,t){var n;for(tn(e),tn(t),n=!1;t.Ob();)n=n|e.Fc(t.Pb());return n}function H0(e,t){var n;return n=u(Bt(e.e,t),387),n?(ANe(e,n),n.e):null}function Lqe(e){var t,n;return t=e/60|0,n=e%60,n==0?""+t:""+t+":"+(""+n)}function Hs(e,t){var n,i;return xg(e),i=new vre(t,e.a),n=new eRe(i),new ht(e,n)}function kb(e,t){var n=e.a[t],i=(mH(),TK)[typeof n];return i?i(n):Hse(typeof n)}function CAt(e){switch(e.g){case 0:return _n;case 1:return-1;default:return 0}}function TAt(e){return rce(e,(Y3(),nde))<0?-q5t(aO(e)):e.l+e.m*Zv+e.h*Dg}function p9(e){return e.__elementTypeCategory$==null?10:e.__elementTypeCategory$}function eH(e){var t;return t=e.b.c.length==0?null:Me(e.b,0),t!=null&&fH(e,0),t}function Bqe(e,t){for(;t[0]=0;)++t[0]}function b9(e,t){this.e=t,this.a=jze(e),this.a<54?this.f=F0(e):this.c=q9(e)}function Fqe(e,t,n,i){Ln(),h0.call(this,26),this.c=e,this.a=t,this.d=n,this.b=i}function zh(e,t,n){var i,s;for(i=10,s=0;se.a[i]&&(i=n);return i}function DAt(e,t){var n;return n=Y0(e.e.c,t.e.c),n==0?Hi(e.e.d,t.e.d):n}function pm(e,t){return t.e==0||e.e==0?gk:($O(),tQ(e,t))}function $At(e,t){if(!e)throw F(new Ot(RHt("Enum constant undefined: %s",t)))}function H5(){H5=X,Cot=new Cke,Tot=new Ske,Sot=new Pke,xot=new jke,Eot=new Dke}function rP(){rP=X,Lde=new Aee("BY_SIZE",0),IK=new Aee("BY_SIZE_AND_SHAPE",1)}function sP(){sP=X,KK=new Mee("EADES",0),O$=new Mee("FRUCHTERMAN_REINGOLD",1)}function m9(){m9=X,Z$=new $ee("READING_DIRECTION",0),jge=new $ee("ROTATION",1)}function Hqe(){Hqe=X,uct=vn((Ag(),H(_(Pge,1),de,335,0,[kV,Mge,SV,b6,p6])))}function qqe(){qqe=X,_ut=vn((cS(),H(_(jpe,1),de,315,0,[Ppe,dX,gX,M6,P6])))}function Qqe(){Qqe=X,Zot=vn((Pm(),H(_(Yot,1),de,363,0,[V$,U$,G$,X$,K$])))}function zqe(){zqe=X,kct=vn((zl(),H(_(c0e,1),de,163,0,[vC,O6,x1,k6,lw])))}function Wqe(){Wqe=X,cat=vn((Z9(),H(_(twe,1),de,316,0,[Zbe,XX,ewe,UX,Jbe])))}function Kqe(){Kqe=X,Pat=vn((af(),H(_(Sd,1),de,175,0,[Et,or,Mh,Yg,kd])))}function Vqe(){Vqe=X,tat=vn((LO(),H(_(eat,1),de,355,0,[m2,xy,Q6,q6,z6])))}function Xqe(){Xqe=X,wot=vn((qr(),H(_(E1e,1),de,356,0,[Th,k1,Vo,Ao,Es])))}function Uqe(){Uqe=X,edt=vn((ts(),H(_(X6,1),de,103,0,[na,Ku,bu,Na,Ia])))}function Gqe(){Gqe=X,udt=vn((xm(),H(_(Z6,1),de,249,0,[j1,VC,Eme,Y6,Ame])))}function Yqe(){Yqe=X,adt=vn((ye(),H(_(Wr,1),ao,61,0,[Ks,yt,At,Xt,xt])))}function tH(e,t){var n;return n=u(Bt(e.a,t),134),n||(n=new Vx,Qn(e.a,t,n)),n}function Zqe(e){var t;return t=u(N(e,(ae(),Sp)),305),t?t.a==e:!1}function Jqe(e){var t;return t=u(N(e,(ae(),Sp)),305),t?t.i==e:!1}function eQe(e,t){return vt(t),rie(e),e.d.Ob()?(t.td(e.d.Pb()),!0):!1}function oP(e){return ho(e,_n)>0?_n:ho(e,Mr)<0?Mr:en(e)}function Sb(e){return e<3?(vl(e,XJe),e+1):e=0&&t=-.01&&e.a<=qf&&(e.a=0),e.b>=-.01&&e.b<=qf&&(e.b=0),e}function nQe(e,t){return t==(yF(),yF(),Art)?e.toLocaleLowerCase():e.toLowerCase()}function Fre(e){return((e.i&2)!=0?"interface ":(e.i&1)!=0?"":"class ")+(aa(e),e.o)}function vs(e){var t,n;n=(t=new ZL,t),rn((!e.q&&(e.q=new we(ku,e,11,10)),e.q),n)}function NAt(e,t){var n;return n=t>0?t-1:t,ZPe(Xkt(EQe(Lne(new a3,n),e.n),e.j),e.k)}function IAt(e,t,n,i){var s;e.j=-1,lle(e,qce(e,t,n),(Vr(),s=u(t,66).Mj(),s.Ok(i)))}function iQe(e){this.g=e,this.f=new pe,this.a=p.Math.min(this.g.c.c,this.g.d.c)}function rQe(e){this.b=new pe,this.a=new pe,this.c=new pe,this.d=new pe,this.e=e}function sQe(e,t){this.a=new Jt,this.e=new Jt,this.b=(G5(),EN),this.c=e,this.b=t}function oQe(e,t,n){FA.call(this),_re(this),this.a=e,this.c=n,this.b=t.d,this.f=t.e}function cQe(e){this.d=e,this.c=e.c.vc().Kc(),this.b=null,this.a=null,this.e=(jE(),kK)}function q0(e){if(e<0)throw F(new Ot("Illegal Capacity: "+e));this.g=this.ri(e)}function RAt(e,t){if(0>e||e>t)throw F(new JJ("fromIndex: 0, toIndex: "+e+Hue+t))}function LAt(e){var t;if(e.a==e.b.a)throw F(new ro);return t=e.a,e.c=t,e.a=e.a.e,t}function cP(e){var t;cb(!!e.c),t=e.c.a,Hl(e.d,e.c),e.b==e.c?e.b=t:--e.a,e.c=null}function lP(e,t){var n;return xg(e),n=new MBe(e,e.a.rd(),e.a.qd()|4,t),new ht(e,n)}function BAt(e,t){var n,i;return n=u(Ab(e.d,t),14),n?(i=t,e.e.pc(i,n)):null}function uP(e,t){var n,i;for(i=e.Kc();i.Ob();)n=u(i.Pb(),70),ue(n,(ae(),my),t)}function FAt(e){var t;return t=oe(Oe(N(e,(xe(),md)))),t<0&&(t=0,ue(e,md,t)),t}function _At(e,t,n){var i;i=p.Math.max(0,e.b/2-.5),uS(n,i,1),ge(t,new $De(n,i))}function HAt(e,t,n){var i;return i=e.a.e[u(t.a,10).p]-e.a.e[u(n.a,10).p],Di(q8(i))}function lQe(e,t,n,i,s,c){var a;a=L_(i),Dr(a,s),gr(a,c),Ye(e.a,i,new qA(a,t,n.f))}function uQe(e,t){var n;if(n=l7(e.Tg(),t),!n)throw F(new Ot(m1+t+FW));return n}function xb(e,t){var n;for(n=e;bi(n);)if(n=bi(n),n==t)return!0;return!1}function qAt(e,t){var n,i,s;for(i=t.a.cd(),n=u(t.a.dd(),14).gc(),s=0;s0&&(e.a/=t,e.b/=t),e}function ml(e){var t;return e.w?e.w:(t=YCt(e),t&&!t.kh()&&(e.w=t),t)}function GAt(e){var t;return e==null?null:(t=u(e,190),YRt(t,t.length))}function V(e,t){if(e.g==null||t>=e.i)throw F(new XB(t,e.i));return e.li(t,e.g[t])}function YAt(e){var t,n;for(t=e.a.d.j,n=e.c.d.j;t!=n;)Fu(e.b,t),t=_P(t);Fu(e.b,t)}function ZAt(e){var t;for(t=0;t=14&&t<=16))),e}function dQe(e,t,n){var i=function(){return e.apply(i,arguments)};return t.apply(i,n),i}function gQe(e,t,n){var i,s;i=t;do s=oe(e.p[i.p])+n,e.p[i.p]=s,i=e.a[i.p];while(i!=t)}function Z3(e,t){var n,i;i=e.a,n=Djt(e,t,null),i!=t&&!e.e&&(n=QO(e,t,n)),n&&n.Fi()}function Hre(e,t){return Ef(),Bu(d1),p.Math.abs(e-t)<=d1||e==t||isNaN(e)&&isNaN(t)}function qre(e,t){return Ef(),Bu(d1),p.Math.abs(e-t)<=d1||e==t||isNaN(e)&&isNaN(t)}function tMt(e,t){return f1(),Zo(e.b.c.length-e.e.c.length,t.b.c.length-t.e.c.length)}function bm(e,t){return Jkt(z5(e,t,en(Ar(Uh,Hh(en(Ar(t==null?0:ci(t),Gh)),15)))))}function pQe(){pQe=X,Dot=vn((jt(),H(_(rV,1),de,267,0,[zi,sr,Ri,Mo,ll,Kf])))}function bQe(){bQe=X,Fat=vn((Nb(),H(_(sU,1),de,291,0,[rU,FC,BC,iU,RC,LC])))}function wQe(){wQe=X,$at=vn((Wh(),H(_(xwe,1),de,248,0,[tU,NC,IC,eI,ZN,JN])))}function mQe(){mQe=X,sct=vn((zv(),H(_(Ck,1),de,227,0,[xk,g6,Sk,sw,s2,r2])))}function vQe(){vQe=X,bct=vn((jO(),H(_(Kge,1),de,275,0,[w6,qge,Wge,zge,Qge,Hge])))}function yQe(){yQe=X,pct=vn((G9(),H(_(_ge,1),de,274,0,[tN,Lge,Fge,Rge,Bge,PV])))}function OQe(){OQe=X,Lut=vn((bj(),H(_(Epe,1),de,313,0,[uX,Cpe,lX,xpe,Tpe,TN])))}function kQe(){kQe=X,dct=vn((yj(),H(_($ge,1),de,276,0,[TV,CV,AV,EV,MV,J$])))}function SQe(){SQe=X,Xft=vn((dS(),H(_(Vft,1),de,327,0,[RN,CX,EX,TX,AX,xX])))}function xQe(){xQe=X,hdt=vn((Dc(),H(_(lI,1),de,273,0,[$1,La,XC,ex,J6,Py])))}function CQe(){CQe=X,idt=vn((mj(),H(_(yme,1),de,312,0,[vU,wme,vme,pme,mme,bme])))}function nMt(){return Bb(),H(_(ss,1),de,93,0,[Vu,Ra,Xu,Gu,ra,mu,Al,Uu,wu])}function hP(e,t){var n;n=e.a,e.a=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,0,n,e.a))}function aP(e,t){var n;n=e.b,e.b=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,1,n,e.b))}function J3(e,t){var n;n=e.b,e.b=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,3,n,e.b))}function z0(e,t){var n;n=e.f,e.f=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,3,n,e.f))}function W0(e,t){var n;n=e.g,e.g=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,4,n,e.g))}function sc(e,t){var n;n=e.i,e.i=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,5,n,e.i))}function oc(e,t){var n;n=e.j,e.j=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,6,n,e.j))}function eO(e,t){var n;n=e.j,e.j=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,1,n,e.j))}function tO(e,t){var n;n=e.c,e.c=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,4,n,e.c))}function nO(e,t){var n;n=e.k,e.k=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new yb(e,2,n,e.k))}function iH(e,t){var n;n=e.d,e.d=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new P_(e,2,n,e.d))}function id(e,t){var n;n=e.s,e.s=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new P_(e,4,n,e.s))}function Tb(e,t){var n;n=e.t,e.t=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new P_(e,5,n,e.t))}function iO(e,t){var n;n=e.F,e.F=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,5,n,t))}function v9(e,t){var n;return n=u(Bt((ZE(),yI),e),55),n?n.xj(t):J(It,Ee,1,t,5,1)}function Oa(e,t){var n,i;return n=t in e.a,n&&(i=pa(e,t).he(),i)?i.a:null}function iMt(e,t){var n,i,s;return n=(i=(m0(),s=new IZ,s),t&&Ple(i,t),i),Yre(n,e),n}function TQe(e,t,n){if(gO(e,n),!e.Bk()&&n!=null&&!e.wj(n))throw F(new XL);return n}function EQe(e,t){return e.n=t,e.n?(e.f=new pe,e.e=new pe):(e.f=null,e.e=null),e}function hn(e,t,n,i,s,c){var a;return a=UF(e,t),MQe(n,a),a.i=s?8:0,a.f=i,a.e=s,a.g=c,a}function Qre(e,t,n,i,s){this.d=t,this.k=i,this.f=s,this.o=-1,this.p=1,this.c=e,this.a=n}function zre(e,t,n,i,s){this.d=t,this.k=i,this.f=s,this.o=-1,this.p=2,this.c=e,this.a=n}function Wre(e,t,n,i,s){this.d=t,this.k=i,this.f=s,this.o=-1,this.p=6,this.c=e,this.a=n}function Kre(e,t,n,i,s){this.d=t,this.k=i,this.f=s,this.o=-1,this.p=7,this.c=e,this.a=n}function Vre(e,t,n,i,s){this.d=t,this.j=i,this.e=s,this.o=-1,this.p=4,this.c=e,this.a=n}function AQe(e,t){var n,i,s,c;for(i=t,s=0,c=i.length;s=0),i$t(e.d,e.c)<0&&(e.a=e.a-1&e.d.a.length-1,e.b=e.d.c),e.c=-1}function Xre(e){return e.a<54?e.f<0?-1:e.f>0?1:0:(!e.c&&(e.c=$9(e.f)),e.c).e}function Bu(e){if(!(e>=0))throw F(new Ot("tolerance ("+e+") must be >= 0"));return e}function rO(){return JX||(JX=new wYe,Om(JX,H(_(e2,1),Ee,130,0,[new FZ]))),JX}function es(){es=X,j6=new $B(NS,0),Nc=new $B("INPUT",1),_o=new $B("OUTPUT",2)}function gP(){gP=X,Ege=new EB("ARD",0),Y$=new EB("MSD",1),OV=new EB("MANUAL",2)}function K0(){K0=X,EC=new BB("BARYCENTER",0),$6=new BB(itt,1),jN=new BB(rtt,2)}function y9(e,t){var n;if(n=e.gc(),t<0||t>n)throw F(new hb(t,n));return new ane(e,t)}function DQe(e,t){var n;return W(t,42)?e.c.Mc(t):(n=GH(e,t),UP(e,t),n)}function hs(e,t,n){return Sg(e,t),Io(e,n),id(e,0),Tb(e,1),cd(e,!0),od(e,!0),e}function vl(e,t){if(e<0)throw F(new Ot(t+" cannot be negative but was: "+e));return e}function $Qe(e,t){var n,i;for(n=0,i=e.gc();n0?u(Me(n.a,i-1),10):null}function Q5(e,t){var n;n=e.k,e.k=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,2,n,e.k))}function bP(e,t){var n;n=e.f,e.f=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,8,n,e.f))}function wP(e,t){var n;n=e.i,e.i=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,7,n,e.i))}function Yre(e,t){var n;n=e.a,e.a=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,8,n,e.a))}function Zre(e,t){var n;n=e.b,e.b=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,0,n,e.b))}function Jre(e,t){var n;n=e.b,e.b=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,0,n,e.b))}function ese(e,t){var n;n=e.c,e.c=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,1,n,e.c))}function tse(e,t){var n;n=e.c,e.c=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,1,n,e.c))}function sH(e,t){var n;n=e.c,e.c=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,4,n,e.c))}function nse(e,t){var n;n=e.d,e.d=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,1,n,e.d))}function oH(e,t){var n;n=e.D,e.D=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,2,n,e.D))}function cH(e,t){e.r>0&&e.c0&&e.g!=0&&cH(e.i,t/e.r*e.i.d))}function aMt(e,t,n){var i;e.b=t,e.a=n,i=(e.a&512)==512?new kPe:new BZ,e.c=Aqt(i,e.b,e.a)}function qQe(e,t){return Aa(e.e,t)?(Vr(),Z_(t)?new UA(t,e):new T8(t,e)):new N$e(t,e)}function mP(e,t){return Zkt(W5(e.a,t,en(Ar(Uh,Hh(en(Ar(t==null?0:ci(t),Gh)),15)))))}function dMt(e,t,n){return Ob(e,new FTe(t),new J2,new _Te(n),H(_(Uc,1),de,132,0,[]))}function gMt(e){var t,n;return 0>e?new gee:(t=e+1,n=new aHe(t,e),new Vte(null,n))}function pMt(e,t){rt();var n;return n=new lv(1),lr(e)?bs(n,e,t):Wo(n.f,e,t),new WL(n)}function bMt(e,t){var n,i;return n=e.o+e.p,i=t.o+t.p,nt?(t<<=1,t>0?t:MS):t}function lH(e){switch(xte(e.e!=3),e.e){case 2:return!1;case 0:return!0}return kEt(e)}function zQe(e,t){var n;return W(t,8)?(n=u(t,8),e.a==n.a&&e.b==n.b):!1}function uH(e,t,n){var i,s,c;return c=t>>5,s=t&31,i=Vi(db(e.n[n][c],en(da(s,1))),3),i}function mMt(e,t){var n,i;for(i=t.vc().Kc();i.Ob();)n=u(i.Pb(),42),dj(e,n.cd(),n.dd())}function vMt(e,t){var n;n=new C4,u(t.b,65),u(t.b,65),u(t.b,65),rc(t.a,new Sne(e,n,t))}function ise(e,t){var n;n=e.b,e.b=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,21,n,e.b))}function rse(e,t){var n;n=e.d,e.d=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,11,n,e.d))}function vP(e,t){var n;n=e.j,e.j=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,13,n,e.j))}function WQe(e,t,n){var i,s,c;for(c=e.a.length-1,s=e.b,i=0;i>>31;i!=0&&(e[n]=i)}function MMt(e,t){rt();var n,i;for(i=new pe,n=0;n0&&(this.g=this.ri(this.i+(this.i/8|0)+1),e.Qc(this.g))}function yi(e,t){WA.call(this,i1t,e,t),this.b=this,this.a=Ko(e.Tg(),ct(this.e.Tg(),this.c))}function K5(e,t){var n,i;for(vt(t),i=t.vc().Kc();i.Ob();)n=u(i.Pb(),42),e.zc(n.cd(),n.dd())}function FMt(e,t,n){var i;for(i=n.Kc();i.Ob();)if(!_M(e,t,i.Pb()))return!1;return!0}function _Mt(e,t,n,i,s){var c;return n&&(c=ui(t.Tg(),e.c),s=n.gh(t,-1-(c==-1?i:c),null,s)),s}function HMt(e,t,n,i,s){var c;return n&&(c=ui(t.Tg(),e.c),s=n.ih(t,-1-(c==-1?i:c),null,s)),s}function fze(e){var t;if(e.b==-2){if(e.e==0)t=-1;else for(t=0;e.a[t]==0;t++);e.b=t}return e.b}function hze(e){switch(e.g){case 2:return ye(),xt;case 4:return ye(),At;default:return e}}function aze(e){switch(e.g){case 1:return ye(),Xt;case 3:return ye(),yt;default:return e}}function qMt(e){var t,n,i;return e.j==(ye(),yt)&&(t=HUe(e),n=wc(t,At),i=wc(t,xt),i||i&&n)}function QMt(e){var t,n;return t=u(e.e&&e.e(),9),n=u(pie(t,t.length),9),new Rl(t,n,t.length)}function zMt(e,t){Vt(t,ntt,1),foe(f4t(new OE((q4(),new i_(e,!1,!1,new SZ))))),Ht(t)}function O9(e,t){return kt(),lr(e)?wre(e,un(t)):ob(e)?BF(e,Oe(t)):sb(e)?X8t(e,Pe(t)):e.wd(t)}function fse(e,t){t.q=e,e.d=p.Math.max(e.d,t.r),e.b+=t.d+(e.a.c.length==0?0:e.c),ge(e.a,t)}function oO(e,t){var n,i,s,c;return s=e.c,n=e.c+e.b,c=e.d,i=e.d+e.a,t.a>s&&t.ac&&t.b1||e.Ob())return++e.a,e.g=0,t=e.i,e.Ob(),t;throw F(new ro)}function nPt(e){dNe();var t;return SDe(SX,e)||(t=new G6e,t.a=e,ene(SX,e,t)),u(fs(SX,e),635)}function su(e){var t,n,i,s;return s=e,i=0,s<0&&(s+=Dg,i=Pa),n=Di(s/Zv),t=Di(s-n*Zv),Qo(t,n,i)}function k9(e){var t,n,i;for(i=0,n=new uv(e.a);n.a>22),s=e.h+t.h+(i>>22),Qo(n&Xc,i&Xc,s&Pa)}function Dze(e,t){var n,i,s;return n=e.l-t.l,i=e.m-t.m+(n>>22),s=e.h-t.h+(i>>22),Qo(n&Xc,i&Xc,s&Pa)}function T9(e){var t;return e<128?(t=(VRe(),ode)[e],!t&&(t=ode[e]=new eJ(e)),t):new eJ(e)}function fi(e){var t;return W(e,78)?e:(t=e&&e.__java$exception,t||(t=new OWe(e),BMe(t)),t)}function E9(e){if(W(e,186))return u(e,118);if(e)return null;throw F(new ov(Mnt))}function $ze(e,t){if(t==null)return!1;for(;e.a!=e.b;)if(qn(t,LP(e)))return!0;return!1}function bse(e){return e.a.Ob()?!0:e.a!=e.d?!1:(e.a=new Gie(e.e.f),e.a.Ob())}function _i(e,t){var n,i;return n=t.Pc(),i=n.length,i==0?!1:(Mne(e.c,e.c.length,n),!0)}function wPt(e,t,n){var i,s;for(s=t.vc().Kc();s.Ob();)i=u(s.Pb(),42),e.yc(i.cd(),i.dd(),n);return e}function Nze(e,t){var n,i;for(i=new R(e.b);i.a=0,"Negative initial capacity"),zA(t>=0,"Non-positive load factor"),Pc(this)}function vH(e,t,n){return e>=128?!1:e<64?c5(Vi(da(1,e),n),0):c5(Vi(da(1,e-64),t),0)}function TPt(e,t){return!e||!t||e==t?!1:Y0(e.b.c,t.b.c+t.b.b)<0&&Y0(t.b.c,e.b.c+e.b.b)<0}function Kze(e){var t,n,i;return n=e.n,i=e.o,t=e.d,new Ll(n.a-t.b,n.b-t.d,i.a+(t.b+t.c),i.b+(t.d+t.a))}function EPt(e){var t,n,i,s;for(n=e.a,i=0,s=n.length;ii)throw F(new hb(t,i));return e.hi()&&(n=uFe(e,n)),e.Vh(t,n)}function P9(e,t,n){return n==null?(!e.q&&(e.q=new Jt),Dv(e.q,t)):(!e.q&&(e.q=new Jt),Qn(e.q,t,n)),e}function ue(e,t,n){return n==null?(!e.q&&(e.q=new Jt),Dv(e.q,t)):(!e.q&&(e.q=new Jt),Qn(e.q,t,n)),e}function Vze(e){var t,n;return n=new zM,Cs(n,e),ue(n,(n1(),hy),e),t=new Jt,jzt(e,n,t),iVt(e,n,t),n}function PPt(e){Rm();var t,n,i;for(n=J(tr,fe,8,2,0,1),i=0,t=0;t<2;t++)i+=.5,n[t]=hNt(i,e);return n}function Xze(e,t){var n,i,s,c;for(n=!1,i=e.a[t].length,c=0;c>=1);return t}function Gze(e){var t,n;return n=r7(e.h),n==32?(t=r7(e.m),t==32?r7(e.l)+32:t+20-10):n-12}function U5(e){var t;return t=e.a[e.b],t==null?null:(pi(e.a,e.b,null),e.b=e.b+1&e.a.length-1,t)}function Yze(e){var t,n;return t=e.t-e.k[e.o.p]*e.d+e.j[e.o.p]>e.f,n=e.u+e.e[e.o.p]*e.d>e.f*e.s*e.d,t||n}function $P(e,t,n){var i,s;return i=new Q_(t,n),s=new Hc,e.b=qGe(e,e.b,i,s),s.b||++e.c,e.b.b=!1,s.d}function Zze(e,t,n){var i,s,c,a;for(a=Z5(t,n),c=0,s=a.Kc();s.Ob();)i=u(s.Pb(),11),Qn(e.c,i,me(c++))}function r1(e){var t,n;for(n=new R(e.a.b);n.an&&(n=e[t]);return n}function Jze(e,t,n){var i;return i=new pe,$le(e,t,i,(ye(),At),!0,!1),$le(e,n,i,xt,!1,!1),i}function OH(e,t,n){var i,s,c,a;return c=null,a=t,s=_0(a,"labels"),i=new v$e(e,n),c=(UFt(i.a,i.b,s),s),c}function DPt(e,t,n,i){var s;return s=yle(e,t,n,i),!s&&(s=$jt(e,n,i),s&&!Fm(e,t,s))?null:s}function $Pt(e,t,n,i){var s;return s=Ole(e,t,n,i),!s&&(s=BH(e,n,i),s&&!Fm(e,t,s))?null:s}function eWe(e,t){var n;for(n=0;n1||t>=0&&e.b<3)}function j9(e){var t,n,i;for(t=new pc,i=Cn(e,0);i.b!=i.d.c;)n=u(xn(i),8),A3(t,0,new ps(n));return t}function Og(e){var t,n;for(n=new R(e.a.b);n.ai?1:0}function Ise(e,t){return xGe(e,t)?(Ye(e.b,u(N(t,(ae(),ow)),21),t),Tn(e.a,t),!0):!1}function WPt(e){var t,n;t=u(N(e,(ae(),$c)),10),t&&(n=t.c,nc(n.a,t),n.a.c.length==0&&nc(Rr(t).b,n))}function oWe(e){return Wf?J(Drt,uet,572,0,0,1):u(Ff(e.a,J(Drt,uet,572,e.a.c.length,0,1)),842)}function KPt(e,t,n,i){return pM(),new iB(H(_(Hg,1),Gj,42,0,[(gq(e,t),new y0(e,t)),(gq(n,i),new y0(n,i))]))}function ym(e,t,n){var i,s;return s=(i=new ZL,i),hs(s,t,n),rn((!e.q&&(e.q=new we(ku,e,11,10)),e.q),s),s}function CH(e){var t,n,i,s;for(s=m4t(Ddt,e),n=s.length,i=J(Te,fe,2,n,6,1),t=0;t=e.b.c.length||(Rse(e,2*t+1),n=2*t+2,n=0&&e[i]===t[i];i--);return i<0?0:mB(Vi(e[i],is),Vi(t[i],is))?-1:1}function VPt(e,t){var n,i;for(i=Cn(e,0);i.b!=i.d.c;)n=u(xn(i),214),n.e.length>0&&(t.td(n),n.i&&Hjt(n))}function EH(e,t){var n,i;return i=u(mt(e.a,4),126),n=J(EU,nK,415,t,0,1),i!=null&&vo(i,0,n,0,i.length),n}function lWe(e,t){var n;return n=new rQ((e.f&256)!=0,e.i,e.a,e.d,(e.f&16)!=0,e.j,e.g,t),e.e!=null||(n.c=e),n}function XPt(e,t){var n,i;for(i=e.Zb().Cc().Kc();i.Ob();)if(n=u(i.Pb(),14),n.Hc(t))return!0;return!1}function AH(e,t,n,i,s){var c,a;for(a=n;a<=s;a++)for(c=t;c<=i;c++)if(Tm(e,c,a))return!0;return!1}function uWe(e,t,n){var i,s,c,a;for(vt(n),a=!1,c=e.Zc(t),s=n.Kc();s.Ob();)i=s.Pb(),c.Rb(i),a=!0;return a}function UPt(e,t){var n;return e===t?!0:W(t,83)?(n=u(t,83),Bce(M0(e),n.vc())):!1}function fWe(e,t,n){var i,s;for(s=n.Kc();s.Ob();)if(i=u(s.Pb(),42),e.re(t,i.dd()))return!0;return!1}function hWe(e,t,n){return e.d[t.p][n.p]||(W$t(e,t,n),e.d[t.p][n.p]=!0,e.d[n.p][t.p]=!0),e.a[t.p][n.p]}function gO(e,t){if(!e.ai()&&t==null)throw F(new Ot("The 'no null' constraint is violated"));return t}function pO(e,t){e.D==null&&e.B!=null&&(e.D=e.B,e.B=null),oH(e,t==null?null:(vt(t),t)),e.C&&e.yk(null)}function GPt(e,t){var n;return!e||e==t||!er(t,(ae(),Cp))?!1:(n=u(N(t,(ae(),Cp)),10),n!=e)}function MH(e){switch(e.i){case 2:return!0;case 1:return!1;case-1:++e.c;default:return e.pl()}}function aWe(e){switch(e.i){case-2:return!0;case-1:return!1;case 1:--e.c;default:return e.ql()}}function dWe(e){nFe.call(this,"The given string does not match the expected format for individual spacings.",e)}function ol(){ol=X,jl=new bA("ELK",0),Lme=new bA("JSON",1),Rme=new bA("DOT",2),Bme=new bA("SVG",3)}function D9(){D9=X,QN=new _B(ja,0),wbe=new _B("RADIAL_COMPACTION",1),mbe=new _B("WEDGE_COMPACTION",2)}function Bf(){Bf=X,Dde=new vB("CONCURRENT",0),Tl=new vB("IDENTITY_FINISH",1),tw=new vB("UNORDERED",2)}function PH(){PH=X,c1e=(KE(),HK),o1e=new ot(nfe,c1e),Pst=new li(ife),jst=new li(rfe),Dst=new li(sfe)}function bO(){bO=X,yge=new v5e,Oge=new y5e,zot=new O5e,Qot=new k5e,qot=new S5e,vge=(vt(qot),new Bn)}function wO(){wO=X,yX=new IB("CONSERVATIVE",0),zpe=new IB("CONSERVATIVE_SOFT",1),D6=new IB("SLOPPY",2)}function NP(){NP=X,Cme=new x0(15),rdt=new Xr((Dn(),Jg),Cme),U6=Ey,Ome=Hat,kme=Zg,xme=k2,Sme=iI}function jH(e,t,n){var i,s,c;for(i=new ai,c=Cn(n,0);c.b!=c.d.c;)s=u(xn(c),8),Tn(i,new ps(s));uWe(e,t,i)}function YPt(e){var t,n,i;for(t=0,i=J(tr,fe,8,e.b,0,1),n=Cn(e,0);n.b!=n.d.c;)i[t++]=u(xn(n),8);return i}function Bse(e){var t;return t=(!e.a&&(e.a=new we(Ba,e,9,5)),e.a),t.i!=0?p4t(u(V(t,0),678)):null}function ZPt(e,t){var n;return n=$r(e,t),mB(S_(e,t),0)|j4t(S_(e,n),0)?n:$r(Uj,S_(db(n,63),1))}function JPt(e,t){var n;n=Ae((XH(),CN))!=null&&t.wg()!=null?oe(Oe(t.wg()))/oe(Oe(Ae(CN))):1,Qn(e.b,t,n)}function ejt(e,t){var n,i;return n=u(e.d.Bc(t),14),n?(i=e.e.hc(),i.Gc(n),e.e.d-=n.gc(),n.$b(),i):null}function Fse(e,t){var n,i;if(i=e.c[t],i!=0)for(e.c[t]=0,e.d-=i,n=t+1;n0)return $3(t-1,e.a.c.length),ed(e.a,t-1);throw F(new _Me)}function tjt(e,t,n){if(t<0)throw F(new gs(Ftt+t));tt)throw F(new Ot(eD+e+fet+t));if(e<0||t>n)throw F(new JJ(eD+e+Que+t+Hue+n))}function bWe(e){if(!e.a||(e.a.i&8)==0)throw F(new Ps("Enumeration class expected for layout option "+e.f))}function Eb(e){var t;++e.j,e.i==0?e.g=null:e.iMD?e-n>MD:n-e>MD}function $H(e,t){return!e||t&&!e.j||W(e,124)&&u(e,124).a.b==0?0:e.Re()}function RP(e,t){return!e||t&&!e.k||W(e,124)&&u(e,124).a.a==0?0:e.Se()}function $9(e){return h1(),e<0?e!=-1?new Noe(-1,-e):MK:e<=10?yde[Di(e)]:new Noe(1,e)}function Hse(e){throw mH(),F(new $Pe("Unexpected typeof result '"+e+"'; please report this bug to the GWT team"))}function OWe(e){FPe(),EA(this),yM(this),this.e=e,NGe(this,e),this.g=e==null?uc:Ns(e),this.a="",this.b=e,this.a=""}function qse(){this.a=new _xe,this.f=new AAe(this),this.b=new MAe(this),this.i=new PAe(this),this.e=new jAe(this)}function kWe(){fkt.call(this,new Cre(Sb(16))),vl(2,zJe),this.b=2,this.a=new xie(null,null,0,null),n8(this.a,this.a)}function G5(){G5=X,fX=new jB("DUMMY_NODE_OVER",0),Ape=new jB("DUMMY_NODE_UNDER",1),EN=new jB("EQUAL",2)}function NH(){NH=X,JK=rFe(H(_(X6,1),de,103,0,[(ts(),bu),Ku])),eV=rFe(H(_(X6,1),de,103,0,[Ia,Na]))}function IH(e){return(ye(),hc).Hc(e.j)?oe(Oe(N(e,(ae(),jk)))):qs(H(_(tr,1),fe,8,0,[e.i.n,e.n,e.a])).b}function ojt(e){var t,n,i,s;for(i=e.b.a,n=i.a.ec().Kc();n.Ob();)t=u(n.Pb(),561),s=new gGe(t,e.e,e.f),ge(e.g,s)}function Sg(e,t){var n,i,s;i=e.nk(t,null),s=null,t&&(s=(w3(),n=new a0,n),Z3(s,e.r)),i=_f(e,s,i),i&&i.Fi()}function cjt(e,t){var n,i;for(i=Kc(e.d,1)!=0,n=!0;n;)n=!1,n=t.c.Tf(t.e,i),n=n|u7(e,t,i,!1),i=!i;ose(e)}function Qse(e,t){var n,i,s;return i=!1,n=t.q.d,t.ds&&(XVe(t.q,s),i=n!=t.q.d)),i}function SWe(e,t){var n,i,s,c,a,g,w,m;return w=t.i,m=t.j,i=e.f,s=i.i,c=i.j,a=w-s,g=m-c,n=p.Math.sqrt(a*a+g*g),n}function zse(e,t){var n,i;return i=GP(e),i||(n=(EQ(),UXe(t)),i=new jMe(n),rn(i.Vk(),e)),i}function N9(e,t){var n,i;return n=u(e.c.Bc(t),14),n?(i=e.hc(),i.Gc(n),e.d-=n.gc(),n.$b(),e.mc(i)):e.jc()}function xWe(e,t){var n;for(n=0;n=e.c.b:e.a<=e.c.b))throw F(new ro);return t=e.a,e.a+=e.c.c,++e.b,me(t)}function fjt(e){var t;return t=new iQe(e),e9(e.a,Eot,new Jc(H(_(lC,1),Ee,369,0,[t]))),t.d&&ge(t.f,t.d),t.f}function RH(e){var t;return t=new hte(e.a),Cs(t,e),ue(t,(ae(),zn),e),t.o.a=e.g,t.o.b=e.f,t.n.a=e.i,t.n.b=e.j,t}function hjt(e,t,n,i){var s,c;for(c=e.Kc();c.Ob();)s=u(c.Pb(),70),s.n.a=t.a+(i.a-s.o.a)/2,s.n.b=t.b,t.b+=s.o.b+n}function ajt(e,t,n){var i,s;for(s=t.a.a.ec().Kc();s.Ob();)if(i=u(s.Pb(),57),LBe(e,i,n))return!0;return!1}function djt(e){var t,n;for(n=new R(e.r);n.a=0?t:-t;i>0;)i%2==0?(n*=n,i=i/2|0):(s*=n,i-=1);return t<0?1/s:s}function wjt(e,t){var n,i,s;for(s=1,n=e,i=t>=0?t:-t;i>0;)i%2==0?(n*=n,i=i/2|0):(s*=n,i-=1);return t<0?1/s:s}function jWe(e){var t,n;if(e!=null)for(n=0;n0&&(n=u(Me(e.a,e.a.c.length-1),570),Ise(n,t))||ge(e.a,new fHe(t))}function kjt(e){Nu();var t,n;t=e.d.c-e.e.c,n=u(e.g,145),rc(n.b,new LEe(t)),rc(n.c,new BEe(t)),Sr(n.i,new FEe(t))}function IWe(e){var t;return t=new Fd,t.a+="VerticalSegment ",so(t,e.e),t.a+=" ",wn(t,Ote(new hB,new R(e.k))),t.a}function Sjt(e){var t;return t=u(H0(e.c.c,""),229),t||(t=new Ev(b3(p3(new ev,""),"Other")),Tg(e.c.c,"",t)),t}function Y5(e){var t;return(e.Db&64)!=0?_u(e):(t=new nu(_u(e)),t.a+=" (name: ",us(t,e.zb),t.a+=")",t.a)}function Use(e,t,n){var i,s;return s=e.sb,e.sb=t,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new rr(e,1,4,s,t),n?n.Ei(i):n=i),n}function LH(e,t){var n,i,s;for(n=0,s=Qs(e,t).Kc();s.Ob();)i=u(s.Pb(),11),n+=N(i,(ae(),$c))!=null?1:0;return n}function km(e,t,n){var i,s,c;for(i=0,c=Cn(e,0);c.b!=c.d.c&&(s=oe(Oe(xn(c))),!(s>n));)s>=t&&++i;return i}function xjt(e,t,n){var i,s;return i=new va(e.e,3,13,null,(s=t.c,s||(tt(),Zf)),ld(e,t),!1),n?n.Ei(i):n=i,n}function Cjt(e,t,n){var i,s;return i=new va(e.e,4,13,(s=t.c,s||(tt(),Zf)),null,ld(e,t),!1),n?n.Ei(i):n=i,n}function Gse(e,t,n){var i,s;return s=e.r,e.r=t,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new rr(e,1,8,s,e.r),n?n.Ei(i):n=i),n}function sd(e,t){var n,i;return n=u(t,676),i=n.vk(),!i&&n.wk(i=W(t,88)?new j$e(e,u(t,26)):new ZFe(e,u(t,148))),i}function I9(e,t,n){var i;e.qi(e.i+1),i=e.oi(t,n),t!=e.i&&vo(e.g,t,e.g,t+1,e.i-t),pi(e.g,t,i),++e.i,e.bi(t,n),e.ci()}function Tjt(e,t){var n;return t.a&&(n=t.a.a.length,e.a?wn(e.a,e.b):e.a=new dl(e.d),e_e(e.a,t.a,t.d.length,n)),e}function Ejt(e,t){var n,i,s,c;if(t.vi(e.a),c=u(mt(e.a,8),1936),c!=null)for(n=c,i=0,s=n.length;in)throw F(new gs(eD+e+Que+t+", size: "+n));if(e>t)throw F(new Ot(eD+e+fet+t))}function Ql(e,t,n){if(t<0)Jce(e,n);else{if(!n.Ij())throw F(new Ot(m1+n.ne()+XS));u(n,66).Nj().Vj(e,e.yh(),t)}}function Pjt(e,t,n,i,s,c,a,g){var w;for(w=n;c=i||t=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e>=48&&e<=57?e-48:0}function qWe(e){var t;return(e.Db&64)!=0?_u(e):(t=new nu(_u(e)),t.a+=" (source: ",us(t,e.d),t.a+=")",t.a)}function Djt(e,t,n){var i,s;return s=e.a,e.a=t,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new rr(e,1,5,s,e.a),n?vce(n,i):n=i),n}function od(e,t){var n;n=(e.Bb&256)!=0,t?e.Bb|=256:e.Bb&=-257,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new Lu(e,1,2,n,t))}function Zse(e,t){var n;n=(e.Bb&256)!=0,t?e.Bb|=256:e.Bb&=-257,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new Lu(e,1,8,n,t))}function FP(e,t){var n;n=(e.Bb&256)!=0,t?e.Bb|=256:e.Bb&=-257,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new Lu(e,1,8,n,t))}function cd(e,t){var n;n=(e.Bb&512)!=0,t?e.Bb|=512:e.Bb&=-513,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new Lu(e,1,3,n,t))}function Jse(e,t){var n;n=(e.Bb&512)!=0,t?e.Bb|=512:e.Bb&=-513,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new Lu(e,1,9,n,t))}function J5(e,t){var n;return e.b==-1&&e.a&&(n=e.a.Gj(),e.b=n?e.c.Xg(e.a.aj(),n):ui(e.c.Tg(),e.a)),e.c.Og(e.b,t)}function me(e){var t,n;return e>-129&&e<128?(t=e+128,n=(_Re(),cde)[t],!n&&(n=cde[t]=new tJ(e)),n):new tJ(e)}function mO(e){var t,n;return e>-129&&e<128?(t=e+128,n=(KRe(),hde)[t],!n&&(n=hde[t]=new iJ(e)),n):new iJ(e)}function eoe(e){var t,n;return t=e.k,t==(jt(),Ri)?(n=u(N(e,(ae(),eo)),61),n==(ye(),yt)||n==Xt):!1}function $jt(e,t,n){var i,s,c;return c=(s=IO(e.b,t),s),c&&(i=u(Hj(d9(e,c),""),26),i)?yle(e,i,t,n):null}function BH(e,t,n){var i,s,c;return c=(s=IO(e.b,t),s),c&&(i=u(Hj(d9(e,c),""),26),i)?Ole(e,i,t,n):null}function QWe(e,t){var n,i;for(i=new Ft(e);i.e!=i.i.gc();)if(n=u(Qt(i),138),ie(t)===ie(n))return!0;return!1}function eS(e,t,n){var i;if(i=e.gc(),t>i)throw F(new hb(t,i));if(e.hi()&&e.Hc(n))throw F(new Ot(z7));e.Xh(t,n)}function Njt(e,t){var n;if(n=bm(e.i,t),n==null)throw F(new ih("Node did not exist in input."));return hse(t,n),null}function Ijt(e,t){var n;if(n=l7(e,t),W(n,322))return u(n,34);throw F(new Ot(m1+t+"' is not a valid attribute"))}function Rjt(e,t,n){var i,s;for(s=W(t,99)&&(u(t,18).Bb&zr)!=0?new UB(t,e):new uO(t,e),i=0;it?1:e==t?e==0?Hi(1/e,1/t):0:isNaN(e)?isNaN(t)?0:1:-1}function Wjt(e,t){Vt(t,"Sort end labels",1),Ti(ni(Hs(new ht(null,new gt(e.b,16)),new h4e),new a4e),new d4e),Ht(t)}function tS(e,t,n){var i,s;return e.ej()?(s=e.fj(),i=Wq(e,t,n),e.$i(e.Zi(7,me(n),i,t,s)),i):Wq(e,t,n)}function FH(e,t){var n,i,s;e.d==null?(++e.e,--e.f):(s=t.cd(),n=t.Sh(),i=(n&_n)%e.d.length,AEt(e,i,cGe(e,i,n,s)))}function vO(e,t){var n;n=(e.Bb&qu)!=0,t?e.Bb|=qu:e.Bb&=-1025,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new Lu(e,1,10,n,t))}function yO(e,t){var n;n=(e.Bb&Kb)!=0,t?e.Bb|=Kb:e.Bb&=-4097,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new Lu(e,1,12,n,t))}function OO(e,t){var n;n=(e.Bb&xc)!=0,t?e.Bb|=xc:e.Bb&=-8193,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new Lu(e,1,15,n,t))}function kO(e,t){var n;n=(e.Bb&ew)!=0,t?e.Bb|=ew:e.Bb&=-2049,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new Lu(e,1,11,n,t))}function Kjt(e,t){var n;return n=Hi(e.b.c,t.b.c),n!=0||(n=Hi(e.a.a,t.a.a),n!=0)?n:Hi(e.a.b,t.a.b)}function Vjt(e,t){var n;if(n=Bt(e.k,t),n==null)throw F(new ih("Port did not exist in input."));return hse(t,n),null}function Xjt(e){var t,n;for(n=aGe(ml(e)).Kc();n.Ob();)if(t=un(n.Pb()),yS(e,t))return nEt((ODe(),zdt),t);return null}function Ujt(e,t){var n,i,s,c,a;for(a=Ko(e.e.Tg(),t),c=0,n=u(e.g,119),s=0;s>10)+E7&Ni,t[1]=(e&1023)+56320&Ni,ah(t,0,t.length)}function HP(e){var t,n;return n=u(N(e,(xe(),El)),103),n==(ts(),na)?(t=oe(Oe(N(e,fN))),t>=1?Ku:Na):n}function Zjt(e){switch(u(N(e,(xe(),$a)),218).g){case 1:return new ZSe;case 3:return new i6e;default:return new YSe}}function xg(e){if(e.c)xg(e.c);else if(e.d)throw F(new Ps("Stream already terminated, can't be modified or used"))}function qH(e){var t;return(e.Db&64)!=0?_u(e):(t=new nu(_u(e)),t.a+=" (identifier: ",us(t,e.k),t.a+=")",t.a)}function VWe(e,t,n){var i,s;return i=(m0(),s=new dE,s),hP(i,t),aP(i,n),e&&rn((!e.a&&(e.a=new Fi(yu,e,5)),e.a),i),i}function QH(e,t,n,i){var s,c;return vt(i),vt(n),s=e.xc(t),c=s==null?n:lDe(u(s,15),u(n,14)),c==null?e.Bc(t):e.zc(t,c),c}function Ge(e){var t,n,i,s;return n=(t=u(sf((i=e.gm,s=i.f,s==gn?i:s)),9),new Rl(t,u($u(t,t.length),9),0)),Fu(n,e),n}function Jjt(e,t,n){var i,s;for(s=e.a.ec().Kc();s.Ob();)if(i=u(s.Pb(),10),C9(n,u(Me(t,i.p),14)))return i;return null}function eDt(e,t,n){var i;try{NPt(e,t,n)}catch(s){throw s=fi(s),W(s,597)?(i=s,F(new lre(i))):F(s)}return t}function c1(e,t){var n;return js(e)&&js(t)&&(n=e-t,T7>1,e.k=n-1>>1}function zH(){Cce();var e,t,n;n=GXt+++Date.now(),e=Di(p.Math.floor(n*M7))&Jj,t=Di(n-e*_ue),this.a=e^1502,this.b=t^pz}function xa(e){var t,n,i;for(t=new pe,i=new R(e.j);i.a34028234663852886e22?Oi:t<-34028234663852886e22?Li:t}function XWe(e){return e-=e>>1&1431655765,e=(e>>2&858993459)+(e&858993459),e=(e>>4)+e&252645135,e+=e>>8,e+=e>>16,e&63}function UWe(e){var t,n,i,s;for(t=new MIe(e.Hd().gc()),s=0,i=Nv(e.Hd().Kc());i.Ob();)n=i.Pb(),pCt(t,n,me(s++));return _Lt(t.a)}function oDt(e,t){var n,i,s;for(s=new Jt,i=t.vc().Kc();i.Ob();)n=u(i.Pb(),42),Qn(s,n.cd(),YMt(e,u(n.dd(),15)));return s}function ooe(e,t){e.n.c.length==0&&ge(e.n,new PM(e.s,e.t,e.i)),ge(e.b,t),qoe(u(Me(e.n,e.n.c.length-1),211),t),sZe(e,t)}function Sm(e){return(e.c!=e.b.b||e.i!=e.g.b)&&(e.a.c=J(It,Ee,1,0,5,1),_i(e.a,e.b),_i(e.a,e.g),e.c=e.b.b,e.i=e.g.b),e.a}function WH(e,t){var n,i,s;for(s=0,i=u(t.Kb(e),20).Kc();i.Ob();)n=u(i.Pb(),17),je(Pe(N(n,(ae(),Vf))))||++s;return s}function cDt(e,t){var n,i,s;i=gm(t),s=oe(Oe(Pb(i,(xe(),Wu)))),n=p.Math.max(0,s/2-.5),uS(t,n,1),ge(e,new HDe(t,n))}function zl(){zl=X,vC=new v8(ja,0),O6=new v8("FIRST",1),x1=new v8(stt,2),k6=new v8("LAST",3),lw=new v8(ott,4)}function Ca(){Ca=X,wU=new aA(NS,0),zC=new aA("POLYLINE",1),Wk=new aA("ORTHOGONAL",2),My=new aA("SPLINES",3)}function qP(){qP=X,Rbe=new qB("ASPECT_RATIO_DRIVEN",0),QX=new qB("MAX_SCALE_DRIVEN",1),Ibe=new qB("AREA_DRIVEN",2)}function B9(){B9=X,KN=new QB("P1_STRUCTURE",0),VN=new QB("P2_PROCESSING_ORDER",1),XN=new QB("P3_EXECUTION",2)}function QP(){QP=X,LX=new FB("OVERLAP_REMOVAL",0),IX=new FB("COMPACTION",1),RX=new FB("GRAPH_SIZE_CALCULATION",2)}function Y0(e,t){return Ef(),Bu(d1),p.Math.abs(e-t)<=d1||e==t||isNaN(e)&&isNaN(t)?0:et?1:S0(isNaN(e),isNaN(t))}function GWe(e,t){var n,i;for(n=Cn(e,0);n.b!=n.d.c;){if(i=r8(Oe(xn(n))),i==t)return;if(i>t){C_(n);break}}z8(n,t)}function Xe(e,t){var n,i,s,c,a;if(n=t.f,Tg(e.c.d,n,t),t.g!=null)for(s=t.g,c=0,a=s.length;ct&&i.ue(e[c-1],e[c])>0;--c)a=e[c],pi(e,c,e[c-1]),pi(e,c-1,a)}function Wl(e,t,n,i){if(t<0)Cle(e,n,i);else{if(!n.Ij())throw F(new Ot(m1+n.ne()+XS));u(n,66).Nj().Tj(e,e.yh(),t,i)}}function zP(e,t){if(t==e.d)return e.e;if(t==e.e)return e.d;throw F(new Ot("Node "+t+" not part of edge "+e))}function uDt(e,t){switch(t.g){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function YWe(e,t){switch(t.g){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function coe(e,t,n,i){switch(t){case 3:return e.f;case 4:return e.g;case 5:return e.i;case 6:return e.j}return Yse(e,t,n,i)}function fDt(e){return e.k!=(jt(),zi)?!1:W3(new ht(null,new P0(new _t(qt(qi(e).a.Kc(),new L)))),new FSe)}function hDt(e){return e.e==null?e:(!e.c&&(e.c=new rQ((e.f&256)!=0,e.i,e.a,e.d,(e.f&16)!=0,e.j,e.g,null)),e.c)}function aDt(e,t){return e.h==C7&&e.m==0&&e.l==0?(t&&(v1=Qo(0,0,0)),Z$e((Y3(),tde))):(t&&(v1=Qo(e.l,e.m,e.h)),Qo(0,0,0))}function Ns(e){var t;return Array.isArray(e)&&e.im===Tt?Hd(zc(e))+"@"+(t=ci(e)>>>0,t.toString(16)):e.toString()}function nS(e){var t;this.a=(t=u(e.e&&e.e(),9),new Rl(t,u($u(t,t.length),9),0)),this.b=J(It,Ee,1,this.a.a.length,5,1)}function dDt(e){var t,n,i;for(this.a=new ha,i=new R(e);i.a0&&(fn(t-1,e.length),e.charCodeAt(t-1)==58)&&!KH(e,sx,ox))}function KH(e,t,n){var i,s;for(i=0,s=e.length;i=s)return t.c+n;return t.c+t.b.gc()}function mDt(e,t){M3();var n,i,s,c;for(i=hqe(e),s=t,U3(i,0,i.length,s),n=0;n0&&(i+=s,++n);return n>1&&(i+=e.d*(n-1)),i}function uoe(e){var t,n,i;for(i=new Va,i.a+="[",t=0,n=e.gc();t0&&this.b>0&&zne(this.c,this.b,this.a)}function aoe(e){XH(),this.c=$f(H(_(gUt,1),Ee,831,0,[Iut])),this.b=new Jt,this.a=e,Qn(this.b,CN,1),rc(Rut,new _Ae(this))}function ZWe(e,t){var n;return e.d?il(e.b,t)?u(Bt(e.b,t),51):(n=t.Kf(),Qn(e.b,t,n),n):t.Kf()}function doe(e,t){var n;return ie(e)===ie(t)?!0:W(t,91)?(n=u(t,91),e.e==n.e&&e.d==n.d&&rEt(e,n.a)):!1}function Fv(e){switch(ye(),e.g){case 4:return yt;case 1:return At;case 3:return Xt;case 2:return xt;default:return Ks}}function goe(e,t){switch(t){case 3:return e.f!=0;case 4:return e.g!=0;case 5:return e.i!=0;case 6:return e.j!=0}return dse(e,t)}function xDt(e){switch(e.g){case 0:return new $xe;case 1:return new Nxe;default:throw F(new Ot(xW+(e.f!=null?e.f:""+e.g)))}}function JWe(e){switch(e.g){case 0:return new Dxe;case 1:return new Ixe;default:throw F(new Ot(_z+(e.f!=null?e.f:""+e.g)))}}function eKe(e){switch(e.g){case 0:return new KJ;case 1:return new hPe;default:throw F(new Ot($D+(e.f!=null?e.f:""+e.g)))}}function CDt(e){switch(e.g){case 1:return new Txe;case 2:return new wIe;default:throw F(new Ot(xW+(e.f!=null?e.f:""+e.g)))}}function TDt(e){var t,n;if(e.b)return e.b;for(n=Wf?null:e.d;n;){if(t=Wf?null:n.b,t)return t;n=Wf?null:n.d}return k3(),jde}function EDt(e){var t,n,i;return e.e==0?0:(t=e.d<<5,n=e.a[e.d-1],e.e<0&&(i=fze(e),i==e.d-1&&(--n,n=n|0)),t-=r7(n),t)}function ADt(e){var t,n,i;return e>5,t=e&31,i=J(Zt,On,25,n+1,15,1),i[n]=1<3;)s*=10,--c;e=(e+(s>>1))/s|0}return i.i=e,!0}function PDt(e){return NH(),kt(),!!(YWe(u(e.a,81).j,u(e.b,103))||u(e.a,81).d.e!=0&&YWe(u(e.a,81).j,u(e.b,103)))}function jDt(e){YM(),u(e.We((Dn(),M1)),174).Hc((Vc(),hI))&&(u(e.We(yw),174).Fc((Dc(),Py)),u(e.We(M1),174).Mc(hI))}function nKe(e,t){var n,i;if(t){for(n=0;n=0;--i)for(t=n[i],s=0;s>1,this.k=t-1>>1}function LDt(e,t){Vt(t,"End label post-processing",1),Ti(ni(Hs(new ht(null,new gt(e.b,16)),new i4e),new r4e),new s4e),Ht(t)}function BDt(e,t,n){var i,s;return i=oe(e.p[t.i.p])+oe(e.d[t.i.p])+t.n.b+t.a.b,s=oe(e.p[n.i.p])+oe(e.d[n.i.p])+n.n.b+n.a.b,s-i}function FDt(e,t,n){var i,s;for(i=Vi(n,is),s=0;ho(i,0)!=0&&s0&&(fn(0,t.length),t.charCodeAt(0)==43)?t.substr(1):t))}function HDt(e){var t;return e==null?null:new Vd((t=To(e,!0),t.length>0&&(fn(0,t.length),t.charCodeAt(0)==43)?t.substr(1):t))}function Ooe(e,t){var n;return e.i>0&&(t.lengthe.i&&pi(t,e.i,null),t}function Ro(e,t,n){var i,s,c;return e.ej()?(i=e.i,c=e.fj(),I9(e,i,t),s=e.Zi(3,null,t,i,c),n?n.Ei(s):n=s):I9(e,e.i,t),n}function qDt(e,t,n){var i,s;return i=new va(e.e,4,10,(s=t.c,W(s,88)?u(s,26):(tt(),xu)),null,ld(e,t),!1),n?n.Ei(i):n=i,n}function QDt(e,t,n){var i,s;return i=new va(e.e,3,10,null,(s=t.c,W(s,88)?u(s,26):(tt(),xu)),ld(e,t),!1),n?n.Ei(i):n=i,n}function sKe(e){ub();var t;return t=new ps(u(e.e.We((Dn(),k2)),8)),e.B.Hc((Vc(),Vk))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t}function oKe(e){jb();var t;return(e.q?e.q:(rt(),rt(),ea))._b((xe(),Ap))?t=u(N(e,Ap),197):t=u(N(Rr(e),T6),197),t}function Pb(e,t){var n,i;return i=null,er(e,(xe(),SN))&&(n=u(N(e,SN),94),n.Xe(t)&&(i=n.We(t))),i==null&&(i=N(Rr(e),t)),i}function cKe(e,t){var n,i,s;return W(t,42)?(n=u(t,42),i=n.cd(),s=Ab(e.Rc(),i),uh(s,n.dd())&&(s!=null||e.Rc()._b(i))):!1}function GH(e,t){var n,i,s;return e.f>0?(e.qj(),i=t==null?0:ci(t),s=(i&_n)%e.d.length,n=cGe(e,s,i,t),n!=-1):!1}function hf(e,t){var n,i,s;return e.f>0&&(e.qj(),i=t==null?0:ci(t),s=(i&_n)%e.d.length,n=sle(e,s,i,t),n)?n.dd():null}function F9(e,t){var n,i,s,c;for(c=Ko(e.e.Tg(),t),n=u(e.g,119),s=0;s1?Df(da(t.a[1],32),Vi(t.a[0],is)):Vi(t.a[0],is),F0(Ar(t.e,n))))}function _9(e,t){var n;return js(e)&&js(t)&&(n=e%t,T7>5,t&=31,s=e.d+n+(t==0?0:1),i=J(Zt,On,25,s,15,1),zRt(i,e.a,n,t),c=new fm(e.e,s,i),N5(c),c}function Soe(e,t,n){var i,s;i=u(ko(Gk,t),117),s=u(ko(ax,t),117),n?(bs(Gk,e,i),bs(ax,e,s)):(bs(ax,e,i),bs(Gk,e,s))}function gKe(e,t,n){var i,s,c;for(s=null,c=e.b;c;){if(i=e.a.ue(t,c.d),n&&i==0)return c;i>=0?c=c.a[1]:(s=c,c=c.a[0])}return s}function pKe(e,t,n){var i,s,c;for(s=null,c=e.b;c;){if(i=e.a.ue(t,c.d),n&&i==0)return c;i<=0?c=c.a[0]:(s=c,c=c.a[1])}return s}function XDt(e,t,n,i){var s,c,a;return s=!1,MKt(e.f,n,i)&&(v$t(e.f,e.a[t][n],e.a[t][i]),c=e.a[t],a=c[i],c[i]=c[n],c[n]=a,s=!0),s}function xoe(e,t,n,i,s){var c,a,g;for(a=s;t.b!=t.c;)c=u(kv(t),10),g=u(Qs(c,i).Xb(0),11),e.d[g.p]=a++,n.c[n.c.length]=g;return a}function Coe(e,t,n){var i,s,c,a,g;return a=e.k,g=t.k,i=n[a.g][g.g],s=Oe(Pb(e,i)),c=Oe(Pb(t,i)),p.Math.max((vt(s),s),(vt(c),c))}function UDt(e,t,n){var i,s,c,a;for(i=n/e.c.length,s=0,a=new R(e);a.a2e3&&(grt=e,o$=p.setTimeout(n4t,10))),s$++==0?(PAt((YJ(),Zae)),!0):!1}function YDt(e,t){var n,i,s;for(i=new _t(qt(qi(e).a.Kc(),new L));an(i);)if(n=u(nn(i),17),s=n.d.i,s.c==t)return!1;return!0}function Toe(e,t){var n,i;if(W(t,245)){i=u(t,245);try{return n=e.vd(i),n==0}catch(s){if(s=fi(s),!W(s,205))throw F(s)}}return!1}function ZDt(){return Error.stackTraceLimit>0?(p.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function JDt(e,t){return Ef(),Ef(),Bu(d1),(p.Math.abs(e-t)<=d1||e==t||isNaN(e)&&isNaN(t)?0:et?1:S0(isNaN(e),isNaN(t)))>0}function Eoe(e,t){return Ef(),Ef(),Bu(d1),(p.Math.abs(e-t)<=d1||e==t||isNaN(e)&&isNaN(t)?0:et?1:S0(isNaN(e),isNaN(t)))<0}function mKe(e,t){return Ef(),Ef(),Bu(d1),(p.Math.abs(e-t)<=d1||e==t||isNaN(e)&&isNaN(t)?0:et?1:S0(isNaN(e),isNaN(t)))<=0}function ZH(e,t){for(var n=0;!t[n]||t[n]=="";)n++;for(var i=t[n++];nfz)return n.fh();if(i=n.Zg(),i||n==e)break}return i}function Aoe(e){return DM(),W(e,156)?u(Bt(nT,Trt),288).vg(e):il(nT,zc(e))?u(Bt(nT,zc(e)),288).vg(e):null}function t$t(e){if(YP(sk,e))return kt(),ak;if(YP(RW,e))return kt(),qg;throw F(new Ot("Expecting true or false"))}function n$t(e,t){if(t.c==e)return t.d;if(t.d==e)return t.c;throw F(new Ot("Input edge is not connected to the input port."))}function xKe(e,t){return e.e>t.e?1:e.et.d?e.e:e.d=48&&e<48+p.Math.min(10,10)?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function TKe(e,t){var n;return ie(t)===ie(e)?!0:!W(t,21)||(n=u(t,21),n.gc()!=e.gc())?!1:e.Ic(n)}function i$t(e,t){var n,i,s,c;return i=e.a.length-1,n=t-e.b&i,c=e.c-t&i,s=e.c-e.b&i,nIe(n=c?(njt(e,t),-1):(ijt(e,t),1)}function r$t(e,t){var n,i;for(n=(fn(t,e.length),e.charCodeAt(t)),i=t+1;it.e?1:e.ft.f?1:ci(e)-ci(t)}function YP(e,t){return vt(e),t==null?!1:et(e,t)?!0:e.length==t.length&&et(e.toLowerCase(),t.toLowerCase())}function d$t(e,t){var n,i,s,c;for(i=0,s=t.gc();i0&&ho(e,128)<0?(t=en(e)+128,n=(WRe(),lde)[t],!n&&(n=lde[t]=new nJ(e)),n):new nJ(e)}function AKe(e,t){var n,i;return n=t.Hh(e.a),n&&(i=un(hf((!n.b&&(n.b=new tl((tt(),Kr),to,n)),n.b),jn)),i!=null)?i:t.ne()}function g$t(e,t){var n,i;return n=t.Hh(e.a),n&&(i=un(hf((!n.b&&(n.b=new tl((tt(),Kr),to,n)),n.b),jn)),i!=null)?i:t.ne()}function p$t(e,t){m_();var n,i;for(i=new _t(qt(xa(e).a.Kc(),new L));an(i);)if(n=u(nn(i),17),n.d.i==t||n.c.i==t)return n;return null}function joe(e,t,n){this.c=e,this.f=new pe,this.e=new Er,this.j=new _ne,this.n=new _ne,this.b=t,this.g=new Ll(t.c,t.d,t.b,t.a),this.a=n}function JH(e){var t,n,i,s;for(this.a=new ha,this.d=new Zi,this.e=0,n=e,i=0,s=n.length;i0):!1}function jKe(e){var t;ie($e(e,(Dn(),v2)))===ie((Sa(),cI))&&(bi(e)?(t=u($e(bi(e),v2),334),as(e,v2,t)):as(e,v2,G6))}function v$t(e,t,n){var i,s;Nq(e.e,t,n,(ye(),xt)),Nq(e.i,t,n,At),e.a&&(s=u(N(t,(ae(),zn)),11),i=u(N(n,zn),11),x_(e.g,s,i))}function DKe(e,t,n){var i,s,c;i=t.c.p,c=t.p,e.b[i][c]=new UBe(e,t),n&&(e.a[i][c]=new nAe(t),s=u(N(t,(ae(),Cp)),10),s&&Ye(e.d,s,t))}function $Ke(e,t){var n,i,s;if(ge(y$,e),t.Fc(e),n=u(Bt(WK,e),21),n)for(s=n.Kc();s.Ob();)i=u(s.Pb(),33),Ds(y$,i,0)!=-1||$Ke(i,t)}function y$t(e,t,n){var i;($rt?(TDt(e),!0):Nrt||Rrt?(k3(),!0):Irt&&(k3(),!1))&&(i=new cRe(t),i.b=n,SLt(e,i))}function eq(e,t){var n;n=!e.A.Hc((cl(),n0))||e.q==(br(),jo),e.u.Hc((Dc(),La))?n?qVt(e,t):uJe(e,t):e.u.Hc($1)&&(n?cVt(e,t):SJe(e,t))}function CO(e,t){var n,i;if(++e.j,t!=null&&(n=(i=e.a.Cb,W(i,97)?u(i,97).Jg():null),pFt(t,n))){_v(e.a,4,n);return}_v(e.a,4,u(t,126))}function NKe(e,t,n){return new Ll(p.Math.min(e.a,t.a)-n/2,p.Math.min(e.b,t.b)-n/2,p.Math.abs(e.a-t.a)+n,p.Math.abs(e.b-t.b)+n)}function O$t(e,t){var n,i;return n=Zo(e.a.c.p,t.a.c.p),n!=0?n:(i=Zo(e.a.d.i.p,t.a.d.i.p),i!=0?i:Zo(t.a.d.p,e.a.d.p))}function k$t(e,t,n){var i,s,c,a;return c=t.j,a=n.j,c!=a?c.g-a.g:(i=e.f[t.p],s=e.f[n.p],i==0&&s==0?0:i==0?-1:s==0?1:Hi(i,s))}function IKe(e,t,n){var i,s,c;if(!n[t.d])for(n[t.d]=!0,s=new R(Sm(t));s.a=s)return s;for(t=t>0?t:0;ti&&pi(t,i,null),t}function LKe(e,t){var n,i;for(i=e.a.length,t.lengthi&&pi(t,i,null),t}function Tg(e,t,n){var i,s,c;return s=u(Bt(e.e,t),387),s?(c=tne(s,n),ANe(e,s),c):(i=new Ane(e,t,n),Qn(e.e,t,i),eFe(i),null)}function C$t(e){var t;if(e==null)return null;if(t=v_t(To(e,!0)),t==null)throw F(new lB("Invalid hexBinary value: '"+e+"'"));return t}function q9(e){return h1(),ho(e,0)<0?ho(e,-1)!=0?new bce(-1,G3(e)):MK:ho(e,10)<=0?yde[en(e)]:new bce(1,e)}function nq(){return Vj(),H(_(yst,1),de,159,0,[mst,wst,vst,ust,lst,fst,dst,ast,hst,bst,pst,gst,ost,sst,cst,ist,nst,rst,est,Jrt,tst,BK])}function BKe(e){var t;this.d=new pe,this.j=new Er,this.g=new Er,t=e.g.b,this.f=u(N(Rr(t),(xe(),El)),103),this.e=oe(Oe(ej(t,bw)))}function FKe(e){this.b=new pe,this.e=new pe,this.d=e,this.a=!_4(ni(new ht(null,new P0(new Nf(e.b))),new E4(new _Se))).sd((ig(),bk))}function af(){af=X,Et=new k8("PARENTS",0),or=new k8("NODES",1),Mh=new k8("EDGES",2),Yg=new k8("PORTS",3),kd=new k8("LABELS",4)}function xm(){xm=X,j1=new x8("DISTRIBUTED",0),VC=new x8("JUSTIFIED",1),Eme=new x8("BEGIN",2),Y6=new x8(YO,3),Ame=new x8("END",4)}function T$t(e){var t;switch(t=e.yi(null),t){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function iq(e){switch(e.g){case 1:return ts(),Ia;case 4:return ts(),bu;case 2:return ts(),Ku;case 3:return ts(),Na}return ts(),na}function E$t(e,t,n){var i;switch(i=n.q.getFullYear()-g1+g1,i<0&&(i=-i),t){case 1:e.a+=i;break;case 2:zh(e,i%100,2);break;default:zh(e,i,t)}}function Cn(e,t){var n,i;if(mb(t,e.b),t>=e.b>>1)for(i=e.c,n=e.b;n>t;--n)i=i.b;else for(i=e.a.a,n=0;n=64&&t<128&&(s=Df(s,da(1,t-64)));return s}function ej(e,t){var n,i;return i=null,er(e,(Dn(),Ay))&&(n=u(N(e,Ay),94),n.Xe(t)&&(i=n.We(t))),i==null&&Rr(e)&&(i=N(Rr(e),t)),i}function qKe(e,t){var n,i,s;s=t.d.i,i=s.k,!(i==(jt(),zi)||i==Kf)&&(n=new _t(qt(qi(s).a.Kc(),new L)),an(n)&&Qn(e.k,t,u(nn(n),17)))}function rq(e,t){var n,i,s;return i=ct(e.Tg(),t),n=t-e.Ah(),n<0?(s=e.Yg(i),s>=0?e.lh(s):zq(e,i)):n<0?zq(e,i):u(i,66).Nj().Sj(e,e.yh(),n)}function Ae(e){var t;if(W(e.a,4)){if(t=Aoe(e.a),t==null)throw F(new Ps(Htt+e.b+"'. "+_tt+(aa(iT),iT.k)+lae));return t}else return e.a}function P$t(e){var t;if(e==null)return null;if(t=GVt(To(e,!0)),t==null)throw F(new lB("Invalid base64Binary value: '"+e+"'"));return t}function Qt(e){var t;try{return t=e.i.Xb(e.e),e.mj(),e.g=e.e++,t}catch(n){throw n=fi(n),W(n,73)?(e.mj(),F(new ro)):F(n)}}function sq(e){var t;try{return t=e.c.ki(e.e),e.mj(),e.g=e.e++,t}catch(n){throw n=fi(n),W(n,73)?(e.mj(),F(new ro)):F(n)}}function sS(){sS=X,f1e=(Dn(),ome),QK=Bwe,$st=Ty,u1e=Jg,Lst=(aj(),qde),Rst=_de,Bst=zde,Ist=Fde,Nst=(PH(),o1e),qK=Pst,l1e=jst,v$=Dst}function tj(e){switch(wee(),this.c=new pe,this.d=e,e.g){case 0:case 2:this.a=Cie(A1e),this.b=Oi;break;case 3:case 1:this.a=A1e,this.b=Li}}function QKe(e,t,n){var i,s;if(e.c)sc(e.c,e.c.i+t),oc(e.c,e.c.j+n);else for(s=new R(e.b);s.a0&&(ge(e.b,new SRe(t.a,n)),i=t.a.length,0i&&(t.a+=ENe(J(Zl,ph,25,-i,15,1))))}function zKe(e,t){var n,i,s;for(n=e.o,s=u(u(Wn(e.r,t),21),84).Kc();s.Ob();)i=u(s.Pb(),111),i.e.a=$Nt(i,n.a),i.e.b=n.b*oe(Oe(i.b.We(b$)))}function D$t(e,t){var n,i,s,c;return s=e.k,n=oe(Oe(N(e,(ae(),Tp)))),c=t.k,i=oe(Oe(N(t,Tp))),c!=(jt(),Ri)?-1:s!=Ri?1:n==i?0:n=0?e.hh(t,n,i):(e.eh()&&(i=(s=e.Vg(),s>=0?e.Qg(i):e.eh().ih(e,-1-s,null,i))),e.Sg(t,n,i))}function $oe(e,t){switch(t){case 7:!e.e&&(e.e=new dt(nr,e,7,4)),Gt(e.e);return;case 8:!e.d&&(e.d=new dt(nr,e,8,5)),Gt(e.d);return}voe(e,t)}function df(e,t){var n;n=e.Zc(t);try{return n.Pb()}catch(i){throw i=fi(i),W(i,109)?F(new gs("Can't get element "+t)):F(i)}}function Noe(e,t){this.e=e,t=0&&(n.d=e.t);break;case 3:e.t>=0&&(n.a=e.t)}e.C&&(n.b=e.C.b,n.c=e.C.c)}function qv(){qv=X,nC=new rA(nD,0),tC=new rA(xz,1),iC=new rA(Cz,2),rC=new rA(Tz,3),nC.a=!1,tC.a=!0,iC.a=!1,rC.a=!0}function oS(){oS=X,sC=new iA(nD,0),w$=new iA(xz,1),m$=new iA(Cz,2),oC=new iA(Tz,3),sC.a=!1,w$.a=!0,m$.a=!1,oC.a=!0}function L$t(e){var t;t=e.a;do t=u(nn(new _t(qt($s(t).a.Kc(),new L))),17).c.i,t.k==(jt(),sr)&&e.b.Fc(t);while(t.k==(jt(),sr));e.b=wg(e.b)}function B$t(e){var t,n,i;for(i=e.c.a,e.p=(tn(i),new mc(i)),n=new R(i);n.an.b)return!0}return!1}function oq(e,t){return lr(e)?!!crt[t]:e.hm?!!e.hm[t]:ob(e)?!!ort[t]:sb(e)?!!srt[t]:!1}function as(e,t,n){return n==null?(!e.o&&(e.o=new sl((Lo(),I1),Np,e,0)),UP(e.o,t)):(!e.o&&(e.o=new sl((Lo(),I1),Np,e,0)),dj(e.o,t,n)),e}function q$t(e,t,n,i){var s,c;c=t.Xe((Dn(),O2))?u(t.We(O2),21):e.j,s=jjt(c),s!=(Vj(),BK)&&(n&&!Moe(s)||Fce(y_t(e,s,i),t))}function ij(e,t,n,i){var s,c,a;return c=ct(e.Tg(),t),s=t-e.Ah(),s<0?(a=e.Yg(c),a>=0?e._g(a,n,!0):rp(e,c,n)):u(c,66).Nj().Pj(e,e.yh(),s,n,i)}function Q$t(e,t,n,i){var s,c,a;n.mh(t)&&(Vr(),Z_(t)?(s=u(n.ah(t),153),d$t(e,s)):(c=(a=t,a?u(i,49).xh(a):null),c&&WOt(n.ah(t),c)))}function z$t(e){switch(e.g){case 1:return X0(),eC;case 3:return X0(),J7;case 2:return X0(),_K;case 4:return X0(),FK;default:return null}}function Ioe(e){switch(typeof e){case RQ:return ud(e);case jue:return Di(e);case Uv:return kt(),e?1231:1237;default:return e==null?0:C0(e)}}function W$t(e,t,n){if(e.e)switch(e.b){case 1:y7t(e.c,t,n);break;case 0:O7t(e.c,t,n)}else D_e(e.c,t,n);e.a[t.p][n.p]=e.c.i,e.a[n.p][t.p]=e.c.e}function UKe(e){var t,n;if(e==null)return null;for(n=J(ta,fe,193,e.length,0,2),t=0;t=0)return s;if(e.Fk()){for(i=0;i=s)throw F(new hb(t,s));if(e.hi()&&(i=e.Xc(n),i>=0&&i!=t))throw F(new Ot(z7));return e.mi(t,n)}function Roe(e,t){if(this.a=u(tn(e),245),this.b=u(tn(t),245),e.vd(t)>0||e==(nB(),mK)||t==(tB(),vK))throw F(new Ot("Invalid range: "+A_e(e,t)))}function GKe(e){var t,n;for(this.b=new pe,this.c=e,this.a=!1,n=new R(e.a);n.a0),(t&-t)==t)return Di(t*Kc(e,31)*4656612873077393e-25);do n=Kc(e,31),i=n%t;while(n-i+(t-1)<0);return Di(i)}function ud(e){lRe();var t,n,i;return n=":"+e,i=d$[n],i!=null?Di((vt(i),i)):(i=$de[n],t=i==null?LHt(e):Di((vt(i),i)),a7t(),d$[n]=t,t)}function ZKe(e,t,n){Vt(n,"Compound graph preprocessor",1),e.a=new L0,rJe(e,t,null),xWt(e,t),oHt(e),ue(t,(ae(),Zge),e.a),e.a=null,Pc(e.b),Ht(n)}function X$t(e,t,n){switch(n.g){case 1:e.a=t.a/2,e.b=0;break;case 2:e.a=t.a,e.b=t.b/2;break;case 3:e.a=t.a/2,e.b=t.b;break;case 4:e.a=0,e.b=t.b/2}}function U$t(e){var t,n,i;for(i=u(Wn(e.a,(Pm(),U$)),15).Kc();i.Ob();)n=u(i.Pb(),101),t=Uoe(n),I3(e,n,t[0],(V0(),Op),0),I3(e,n,t[1],kp,1)}function G$t(e){var t,n,i;for(i=u(Wn(e.a,(Pm(),G$)),15).Kc();i.Ob();)n=u(i.Pb(),101),t=Uoe(n),I3(e,n,t[0],(V0(),Op),0),I3(e,n,t[1],kp,1)}function cq(e){switch(e.g){case 0:return null;case 1:return new ZQe;case 2:return new VJ;default:throw F(new Ot(xW+(e.f!=null?e.f:""+e.g)))}}function Q9(e,t,n){var i,s;for(mPt(e,t-e.s,n-e.t),s=new R(e.n);s.a1&&(c=V$t(e,t)),c}function lq(e){var t;return e.f&&e.f.kh()&&(t=u(e.f,49),e.f=u(o1(e,t),82),e.f!=t&&(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,9,8,t,e.f))),e.f}function uq(e){var t;return e.i&&e.i.kh()&&(t=u(e.i,49),e.i=u(o1(e,t),82),e.i!=t&&(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,9,7,t,e.i))),e.i}function Ur(e){var t;return e.b&&(e.b.Db&64)!=0&&(t=e.b,e.b=u(o1(e,t),18),e.b!=t&&(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,9,21,t,e.b))),e.b}function oj(e,t){var n,i,s;e.d==null?(++e.e,++e.f):(i=t.Sh(),dHt(e,e.f+1),s=(i&_n)%e.d.length,n=e.d[s],!n&&(n=e.d[s]=e.uj()),n.Fc(t),++e.f)}function Foe(e,t,n){var i;return t.Kj()?!1:t.Zj()!=-2?(i=t.zj(),i==null?n==null:qn(i,n)):t.Hj()==e.e.Tg()&&n==null}function cj(){var e;vl(16,XJe),e=QQe(16),this.b=J(OK,S7,317,e,0,1),this.c=J(OK,S7,317,e,0,1),this.a=null,this.e=null,this.i=0,this.f=e-1,this.g=0}function Ta(e){ine.call(this),this.k=(jt(),zi),this.j=(vl(6,Wb),new No(6)),this.b=(vl(2,Wb),new No(2)),this.d=new GL,this.f=new BJ,this.a=e}function Z$t(e){var t,n;e.c.length<=1||(t=GGe(e,(ye(),Xt)),BXe(e,u(t.a,19).a,u(t.b,19).a),n=GGe(e,xt),BXe(e,u(n.a,19).a,u(n.b,19).a))}function cS(){cS=X,Ppe=new m8("SIMPLE",0),dX=new m8(qz,1),gX=new m8("LINEAR_SEGMENTS",2),M6=new m8("BRANDES_KOEPF",3),P6=new m8(ktt,4)}function _oe(e,t,n){mv(u(N(t,(xe(),Si)),98))||(Nre(e,t,fd(t,n)),Nre(e,t,fd(t,(ye(),Xt))),Nre(e,t,fd(t,yt)),rt(),ir(t.j,new eAe(e)))}function JKe(e,t,n,i){var s,c,a;for(s=u(Wn(i?e.a:e.b,t),21),a=s.Kc();a.Ob();)if(c=u(a.Pb(),33),jj(e,n,c))return!0;return!1}function fq(e){var t,n;for(n=new Ft(e);n.e!=n.i.gc();)if(t=u(Qt(n),87),t.e||(!t.d&&(t.d=new Fi(os,t,1)),t.d).i!=0)return!0;return!1}function hq(e){var t,n;for(n=new Ft(e);n.e!=n.i.gc();)if(t=u(Qt(n),87),t.e||(!t.d&&(t.d=new Fi(os,t,1)),t.d).i!=0)return!0;return!1}function J$t(e){var t,n,i;for(t=0,i=new R(e.c.a);i.a102?-1:e<=57?e-48:e<65?-1:e<=70?e-65+10:e<97?-1:e-97+10}function gq(e,t){if(e==null)throw F(new ov("null key in entry: null="+t));if(t==null)throw F(new ov("null value in entry: "+e+"=null"))}function eNt(e,t){for(var n,i;e.Ob();)if(!t.Ob()||(n=e.Pb(),i=t.Pb(),!(ie(n)===ie(i)||n!=null&&qn(n,i))))return!1;return!t.Ob()}function tVe(e,t){var n;return n=H(_(hr,1),ds,25,15,[$H(e.a[0],t),$H(e.a[1],t),$H(e.a[2],t)]),e.d&&(n[0]=p.Math.max(n[0],n[2]),n[2]=n[0]),n}function nVe(e,t){var n;return n=H(_(hr,1),ds,25,15,[RP(e.a[0],t),RP(e.a[1],t),RP(e.a[2],t)]),e.d&&(n[0]=p.Math.max(n[0],n[2]),n[2]=n[0]),n}function Ag(){Ag=X,kV=new w8("GREEDY",0),Mge=new w8(ltt,1),SV=new w8(qz,2),b6=new w8("MODEL_ORDER",3),p6=new w8("GREEDY_MODEL_ORDER",4)}function iVe(e,t){var n,i,s;for(e.b[t.g]=1,i=Cn(t.d,0);i.b!=i.d.c;)n=u(xn(i),188),s=n.c,e.b[s.g]==1?Tn(e.a,n):e.b[s.g]==2?e.b[s.g]=1:iVe(e,s)}function tNt(e,t){var n,i,s;for(s=new No(t.gc()),i=t.Kc();i.Ob();)n=u(i.Pb(),286),n.c==n.f?DO(e,n,n.c):JLt(e,n)||(s.c[s.c.length]=n);return s}function nNt(e,t,n){var i,s,c,a,g;for(g=e.r+t,e.r+=t,e.d+=n,i=n/e.n.c.length,s=0,a=new R(e.n);a.ac&&pi(t,c,null),t}function bNt(e,t){var n,i;if(i=e.gc(),t==null){for(n=0;n0&&(w+=s),m[y]=a,a+=g*(w+i)}function hVe(e){var t,n,i;for(i=e.f,e.n=J(hr,ds,25,i,15,1),e.d=J(hr,ds,25,i,15,1),t=0;t0?e.c:0),++s;e.b=i,e.d=c}function SNt(e,t){var n,i,s,c,a;for(i=0,s=0,n=0,a=new R(t);a.a0?e.g:0),++n;e.c=s,e.d=i}function bVe(e,t){var n;return n=H(_(hr,1),ds,25,15,[Boe(e,(ff(),Zs),t),Boe(e,Fo,t),Boe(e,Js,t)]),e.f&&(n[0]=p.Math.max(n[0],n[2]),n[2]=n[0]),n}function xNt(e,t,n){var i;try{Nj(e,t+e.j,n+e.k,!1,!0)}catch(s){throw s=fi(s),W(s,73)?(i=s,F(new gs(i.g+rD+t+Qr+n+")."))):F(s)}}function CNt(e,t,n){var i;try{Nj(e,t+e.j,n+e.k,!0,!1)}catch(s){throw s=fi(s),W(s,73)?(i=s,F(new gs(i.g+rD+t+Qr+n+")."))):F(s)}}function wVe(e){var t;er(e,(xe(),Ep))&&(t=u(N(e,Ep),21),t.Hc((Bb(),Vu))?(t.Mc(Vu),t.Fc(Xu)):t.Hc(Xu)&&(t.Mc(Xu),t.Fc(Vu)))}function mVe(e){var t;er(e,(xe(),Ep))&&(t=u(N(e,Ep),21),t.Hc((Bb(),Gu))?(t.Mc(Gu),t.Fc(mu)):t.Hc(mu)&&(t.Mc(mu),t.Fc(Gu)))}function TNt(e,t,n){Vt(n,"Self-Loop ordering",1),Ti(ec(ni(ni(Hs(new ht(null,new gt(t.b,16)),new T5e),new E5e),new A5e),new M5e),new AEe(e)),Ht(n)}function W9(e,t,n,i){var s,c;for(s=t;s0&&(s.b+=t),s}function fj(e,t){var n,i,s;for(s=new Er,i=e.Kc();i.Ob();)n=u(i.Pb(),37),vS(n,0,s.b),s.b+=n.f.b+t,s.a=p.Math.max(s.a,n.f.a);return s.a>0&&(s.a+=t),s}function yVe(e){var t,n,i;for(i=_n,n=new R(e.a);n.a>16==6?e.Cb.ih(e,5,vf,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||e.zh()),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function jNt(e){H3();var t=e.e;if(t&&t.stack){var n=t.stack,i=t+` +`;return n.substring(0,i.length)==i&&(n=n.substring(i.length)),n.split(` +`)}return[]}function DNt(e){var t;return t=(LQe(),vrt),t[e>>>28]|t[e>>24&15]<<4|t[e>>20&15]<<8|t[e>>16&15]<<12|t[e>>12&15]<<16|t[e>>8&15]<<20|t[e>>4&15]<<24|t[e&15]<<28}function SVe(e){var t,n,i;e.b==e.c&&(i=e.a.length,n=Tse(p.Math.max(8,i))<<1,e.b!=0?(t=$u(e.a,n),WQe(e,t,i),e.a=t,e.b=0):zMe(e.a,n),e.c=i)}function $Nt(e,t){var n;return n=e.b,n.Xe((Dn(),Gc))?n.Hf()==(ye(),xt)?-n.rf().a-oe(Oe(n.We(Gc))):t+oe(Oe(n.We(Gc))):n.Hf()==(ye(),xt)?-n.rf().a:t}function K9(e){var t;return e.b.c.length!=0&&u(Me(e.b,0),70).a?u(Me(e.b,0),70).a:(t=o_(e),t??""+(e.c?Ds(e.c.a,e,0):-1))}function hj(e){var t;return e.f.c.length!=0&&u(Me(e.f,0),70).a?u(Me(e.f,0),70).a:(t=o_(e),t??""+(e.i?Ds(e.i.j,e,0):-1))}function NNt(e,t){var n,i;if(t<0||t>=e.gc())return null;for(n=t;n0?e.c:0),s=p.Math.max(s,t.d),++i;e.e=c,e.b=s}function RNt(e){var t,n;if(!e.b)for(e.b=BM(u(e.f,118).Ag().i),n=new Ft(u(e.f,118).Ag());n.e!=n.i.gc();)t=u(Qt(n),137),ge(e.b,new cB(t));return e.b}function LNt(e,t){var n,i,s;if(t.dc())return M3(),M3(),rT;for(n=new TIe(e,t.gc()),s=new Ft(e);s.e!=s.i.gc();)i=Qt(s),t.Hc(i)&&rn(n,i);return n}function Voe(e,t,n,i){return t==0?i?(!e.o&&(e.o=new sl((Lo(),I1),Np,e,0)),e.o):(!e.o&&(e.o=new sl((Lo(),I1),Np,e,0)),o9(e.o)):ij(e,t,n,i)}function kq(e){var t,n;if(e.rb)for(t=0,n=e.rb.i;t>22),s+=i>>22,s<0)?!1:(e.l=n&Xc,e.m=i&Xc,e.h=s&Pa,!0)}function HNt(e,t,n,i,s,c,a){var g,w;return!(t.Ae()&&(w=e.a.ue(n,i),w<0||w==0)||t.Be()&&(g=e.a.ue(n,c),g>0||g==0))}function qNt(e,t){bO();var n;if(n=e.j.g-t.j.g,n!=0)return 0;switch(e.j.g){case 2:return WH(t,Oge)-WH(e,Oge);case 4:return WH(e,yge)-WH(t,yge)}return 0}function QNt(e){switch(e.g){case 0:return CV;case 1:return TV;case 2:return EV;case 3:return AV;case 4:return J$;case 5:return MV;default:return null}}function ys(e,t,n){var i,s;return i=(s=new JL,Sg(s,t),Io(s,n),rn((!e.c&&(e.c=new we(Ip,e,12,10)),e.c),s),s),id(i,0),Tb(i,1),cd(i,!0),od(i,!0),i}function Qv(e,t){var n,i;if(t>=e.i)throw F(new XB(t,e.i));return++e.j,n=e.g[t],i=e.i-t-1,i>0&&vo(e.g,t+1,e.g,t,i),pi(e.g,--e.i,null),e.fi(t,n),e.ci(),n}function xVe(e,t){var n,i;return e.Db>>16==17?e.Cb.ih(e,21,Ou,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||e.zh()),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function zNt(e){var t,n,i,s;for(rt(),ir(e.c,e.a),s=new R(e.c);s.an.a.c.length))throw F(new Ot("index must be >= 0 and <= layer node count"));e.c&&nc(e.c.a,e),e.c=n,n&&ab(n.a,t,e)}function MVe(e,t){var n,i,s;for(i=new _t(qt(xa(e).a.Kc(),new L));an(i);)return n=u(nn(i),17),s=u(t.Kb(n),10),new mE(tn(s.n.b+s.o.b/2));return D4(),D4(),wK}function PVe(e,t){this.c=new Jt,this.a=e,this.b=t,this.d=u(N(e,(ae(),h2)),304),ie(N(e,(xe(),ope)))===ie((f9(),eN))?this.e=new cPe:this.e=new oPe}function GNt(e,t){var n,i,s,c;for(c=0,i=new R(e);i.a>16==6?e.Cb.ih(e,6,nr,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(Lo(),dI)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function Joe(e,t){var n,i;return e.Db>>16==7?e.Cb.ih(e,1,JC,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(Lo(),_me)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function ece(e,t){var n,i;return e.Db>>16==9?e.Cb.ih(e,9,mi,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(Lo(),qme)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function DVe(e,t){var n,i;return e.Db>>16==5?e.Cb.ih(e,9,kI,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(tt(),Td)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function tce(e,t){var n,i;return e.Db>>16==3?e.Cb.ih(e,0,tT,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(tt(),Cd)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function $Ve(e,t){var n,i;return e.Db>>16==7?e.Cb.ih(e,6,vf,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(tt(),Ad)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function NVe(){this.a=new _8e,this.g=new cj,this.j=new cj,this.b=new Jt,this.d=new cj,this.i=new cj,this.k=new Jt,this.c=new Jt,this.e=new Jt,this.f=new Jt}function eIt(e,t,n){var i,s,c;for(n<0&&(n=0),c=e.i,s=n;sfz)return EO(e,i);if(i==e)return!0}}return!1}function nIt(e){switch(DA(),e.q.g){case 5:mUe(e,(ye(),yt)),mUe(e,Xt);break;case 4:dGe(e,(ye(),yt)),dGe(e,Xt);break;default:dJe(e,(ye(),yt)),dJe(e,Xt)}}function iIt(e){switch(DA(),e.q.g){case 5:$Ue(e,(ye(),At)),$Ue(e,xt);break;case 4:zKe(e,(ye(),At)),zKe(e,xt);break;default:gJe(e,(ye(),At)),gJe(e,xt)}}function rIt(e){var t,n;t=u(N(e,(gf(),eot)),19),t?(n=t.a,n==0?ue(e,(n1(),x$),new zH):ue(e,(n1(),x$),new qM(n))):ue(e,(n1(),x$),new qM(1))}function sIt(e,t){var n;switch(n=e.i,t.g){case 1:return-(e.n.b+e.o.b);case 2:return e.n.a-n.o.a;case 3:return e.n.b-n.o.b;case 4:return-(e.n.a+e.o.a)}return 0}function oIt(e,t){switch(e.g){case 0:return t==(zl(),x1)?z$:W$;case 1:return t==(zl(),x1)?z$:hC;case 2:return t==(zl(),x1)?hC:W$;default:return hC}}function X9(e,t){var n,i,s;for(nc(e.a,t),e.e-=t.r+(e.a.c.length==0?0:e.c),s=Hhe,i=new R(e.a);i.a>16==3?e.Cb.ih(e,12,mi,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(Lo(),Fme)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function ice(e,t){var n,i;return e.Db>>16==11?e.Cb.ih(e,10,mi,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(Lo(),Hme)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function IVe(e,t){var n,i;return e.Db>>16==10?e.Cb.ih(e,11,Ou,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(tt(),Ed)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function RVe(e,t){var n,i;return e.Db>>16==10?e.Cb.ih(e,12,ku,t):(i=Ur(u(ct((n=u(mt(e,16),26),n||(tt(),Ew)),e.Db>>16),18)),e.Cb.ih(e,i.n,i.f,t))}function ou(e){var t;return(e.Bb&1)==0&&e.r&&e.r.kh()&&(t=u(e.r,49),e.r=u(o1(e,t),138),e.r!=t&&(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,9,8,t,e.r))),e.r}function xq(e,t,n){var i;return i=H(_(hr,1),ds,25,15,[Ace(e,(ff(),Zs),t,n),Ace(e,Fo,t,n),Ace(e,Js,t,n)]),e.f&&(i[0]=p.Math.max(i[0],i[2]),i[2]=i[0]),i}function cIt(e,t){var n,i,s;if(s=tNt(e,t),s.c.length!=0)for(ir(s,new Z4e),n=s.c.length,i=0;i>19,m=t.h>>19,w!=m?m-w:(s=e.h,g=t.h,s!=g?s-g:(i=e.m,a=t.m,i!=a?i-a:(n=e.l,c=t.l,n-c)))}function aj(){aj=X,Wde=(Dj(),RK),zde=new ot(Kue,Wde),Qde=(rP(),IK),qde=new ot(Vue,Qde),Hde=(ZP(),NK),_de=new ot(Xue,Hde),Fde=new ot(Uue,(kt(),!0))}function uS(e,t,n){var i,s;i=t*n,W(e.g,145)?(s=Mv(e),s.f.d?s.f.a||(e.d.a+=i+qf):(e.d.d-=i+qf,e.d.a+=i+qf)):W(e.g,10)&&(e.d.d-=i,e.d.a+=2*i)}function LVe(e,t,n){var i,s,c,a,g;for(s=e[n.g],g=new R(t.d);g.a0?e.g:0),++n;t.b=i,t.e=s}function BVe(e){var t,n,i;if(i=e.b,oDe(e.i,i.length)){for(n=i.length*2,e.b=J(OK,S7,317,n,0,1),e.c=J(OK,S7,317,n,0,1),e.f=n-1,e.i=0,t=e.a;t;t=t.c)t7(e,t,t);++e.g}}function pIt(e,t,n,i){var s,c,a,g;for(s=0;sa&&(g=a/i),s>c&&(w=c/s),oh(e,p.Math.min(g,w)),e}function wIt(){Bj();var e,t;try{if(t=u(gce((Qd(),Su),ck),2014),t)return t}catch(n){if(n=fi(n),W(n,102))e=n,tie((cn(),e));else throw F(n)}return new R8e}function mIt(){Mqe();var e,t;try{if(t=u(gce((Qd(),Su),_g),2024),t)return t}catch(n){if(n=fi(n),W(n,102))e=n,tie((cn(),e));else throw F(n)}return new t7e}function vIt(){Bj();var e,t;try{if(t=u(gce((Qd(),Su),au),1941),t)return t}catch(n){if(n=fi(n),W(n,102))e=n,tie((cn(),e));else throw F(n)}return new l9e}function yIt(e,t,n){var i,s;return s=e.e,e.e=t,(e.Db&4)!=0&&(e.Db&1)==0&&(i=new rr(e,1,4,s,t),n?n.Ei(i):n=i),s!=t&&(t?n=QO(e,Cj(e,t),n):n=QO(e,e.a,n)),n}function FVe(){zE.call(this),this.e=-1,this.a=!1,this.p=Mr,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=Mr}function OIt(e,t){var n,i,s;if(i=e.b.d.d,e.a||(i+=e.b.d.a),s=t.b.d.d,t.a||(s+=t.b.d.a),n=Hi(i,s),n==0){if(!e.a&&t.a)return-1;if(!t.a&&e.a)return 1}return n}function kIt(e,t){var n,i,s;if(i=e.b.b.d,e.a||(i+=e.b.b.a),s=t.b.b.d,t.a||(s+=t.b.b.a),n=Hi(i,s),n==0){if(!e.a&&t.a)return-1;if(!t.a&&e.a)return 1}return n}function SIt(e,t){var n,i,s;if(i=e.b.g.d,e.a||(i+=e.b.g.a),s=t.b.g.d,t.a||(s+=t.b.g.a),n=Hi(i,s),n==0){if(!e.a&&t.a)return-1;if(!t.a&&e.a)return 1}return n}function sce(){sce=X,got=Mc(Fn(Fn(Fn(new Ji,(qr(),Ao),(Gr(),oge)),Ao,cge),Es,lge),Es,U1e),bot=Fn(Fn(new Ji,Ao,q1e),Ao,G1e),pot=Mc(new Ji,Es,Z1e)}function xIt(e){var t,n,i,s,c;for(t=u(N(e,(ae(),y6)),83),c=e.n,i=t.Cc().Kc();i.Ob();)n=u(i.Pb(),306),s=n.i,s.c+=c.a,s.d+=c.b,n.c?tYe(n):nYe(n);ue(e,y6,null)}function CIt(e,t,n){var i,s;switch(s=e.b,i=s.d,t.g){case 1:return-i.d-n;case 2:return s.o.a+i.c+n;case 3:return s.o.b+i.a+n;case 4:return-i.b-n;default:return-1}}function TIt(e){var t,n,i,s,c;if(i=0,s=JO,e.b)for(t=0;t<360;t++)n=t*.017453292519943295,Ule(e,e.d,0,0,Vm,n),c=e.b.ig(e.d),c0&&(a=(c&_n)%e.d.length,s=sle(e,a,c,t),s)?(g=s.ed(n),g):(i=e.tj(c,t,n),e.c.Fc(i),null)}function lce(e,t){var n,i,s,c;switch(sd(e,t)._k()){case 3:case 2:{for(n=Bm(t),s=0,c=n.i;s=0;i--)if(et(e[i].d,t)||et(e[i].d,n)){e.length>=i+1&&e.splice(0,i+1);break}return e}function U9(e,t){var n;return js(e)&&js(t)&&(n=e/t,T70&&(e.b+=2,e.a+=i):(e.b+=1,e.a+=p.Math.min(i,s))}function KVe(e,t){var n,i;if(i=!1,lr(t)&&(i=!0,Sv(e,new pb(un(t)))),i||W(t,236)&&(i=!0,Sv(e,(n=gne(u(t,236)),new vE(n)))),!i)throw F(new sB(Sae))}function zIt(e,t,n,i){var s,c,a;return s=new va(e.e,1,10,(a=t.c,W(a,88)?u(a,26):(tt(),xu)),(c=n.c,W(c,88)?u(c,26):(tt(),xu)),ld(e,t),!1),i?i.Ei(s):i=s,i}function hce(e){var t,n;switch(u(N(Rr(e),(xe(),Z0e)),420).g){case 0:return t=e.n,n=e.o,new De(t.a+n.a/2,t.b+n.b/2);case 1:return new ps(e.n);default:return null}}function G9(){G9=X,tN=new Z4(ja,0),Lge=new Z4("LEFTUP",1),Fge=new Z4("RIGHTUP",2),Rge=new Z4("LEFTDOWN",3),Bge=new Z4("RIGHTDOWN",4),PV=new Z4("BALANCED",5)}function WIt(e,t,n){var i,s,c;if(i=Hi(e.a[t.p],e.a[n.p]),i==0){if(s=u(N(t,(ae(),wy)),15),c=u(N(n,wy),15),s.Hc(n))return-1;if(c.Hc(t))return 1}return i}function KIt(e){switch(e.g){case 1:return new Axe;case 2:return new Mxe;case 3:return new Exe;case 0:return null;default:throw F(new Ot(xW+(e.f!=null?e.f:""+e.g)))}}function ace(e,t,n){switch(t){case 1:!e.n&&(e.n=new we(Rs,e,1,7)),Gt(e.n),!e.n&&(e.n=new we(Rs,e,1,7)),vi(e.n,u(n,14));return;case 2:Q5(e,un(n));return}Dse(e,t,n)}function dce(e,t,n){switch(t){case 3:z0(e,oe(Oe(n)));return;case 4:W0(e,oe(Oe(n)));return;case 5:sc(e,oe(Oe(n)));return;case 6:oc(e,oe(Oe(n)));return}ace(e,t,n)}function gj(e,t,n){var i,s,c;c=(i=new JL,i),s=_f(c,t,null),s&&s.Fi(),Io(c,n),rn((!e.c&&(e.c=new we(Ip,e,12,10)),e.c),c),id(c,0),Tb(c,1),cd(c,!0),od(c,!0)}function gce(e,t){var n,i,s;return n=V4(e.g,t),W(n,235)?(s=u(n,235),s.Qh()==null,s.Nh()):W(n,498)?(i=u(n,1938),s=i.b,s):null}function VIt(e,t,n,i){var s,c;return tn(t),tn(n),c=u(v5(e.d,t),19),Nqe(!!c,"Row %s not in %s",t,e.e),s=u(v5(e.b,n),19),Nqe(!!s,"Column %s not in %s",n,e.c),Fze(e,c.a,s.a,i)}function VVe(e,t,n,i,s,c,a){var g,w,m,y,k;if(y=s[c],m=c==a-1,g=m?i:0,k=gVe(g,y),i!=10&&H(_(e,a-c),t[c],n[c],g,k),!m)for(++c,w=0;w1||g==-1?(c=u(w,15),s.Wb(e$t(e,c))):s.Wb(aQ(e,u(w,56)))))}function eRt(e,t,n,i){Nje();var s=bK;function c(){for(var a=0;aOW)return n;s>-1e-6&&++n}return n}function wce(e,t){var n;t!=e.b?(n=null,e.b&&(n=TM(e.b,e,-4,n)),t&&(n=Hv(t,e,-4,n)),n=MWe(e,t,n),n&&n.Fi()):(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,3,t,t))}function GVe(e,t){var n;t!=e.f?(n=null,e.f&&(n=TM(e.f,e,-1,n)),t&&(n=Hv(t,e,-1,n)),n=PWe(e,t,n),n&&n.Fi()):(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,0,t,t))}function YVe(e){var t,n,i;if(e==null)return null;if(n=u(e,15),n.dc())return"";for(i=new Va,t=n.Kc();t.Ob();)us(i,(Un(),un(t.Pb()))),i.a+=" ";return GB(i,i.a.length-1)}function ZVe(e){var t,n,i;if(e==null)return null;if(n=u(e,15),n.dc())return"";for(i=new Va,t=n.Kc();t.Ob();)us(i,(Un(),un(t.Pb()))),i.a+=" ";return GB(i,i.a.length-1)}function lRt(e,t,n){var i,s;return i=e.c[t.c.p][t.p],s=e.c[n.c.p][n.p],i.a!=null&&s.a!=null?BF(i.a,s.a):i.a!=null?-1:s.a!=null?1:0}function uRt(e,t){var n,i,s,c,a,g;if(t)for(c=t.a.length,n=new cg(c),g=(n.b-n.a)*n.c<0?(zd(),_1):new Xd(n);g.Ob();)a=u(g.Pb(),19),s=Q3(t,a.a),i=new JAe(e),Z9t(i.a,s)}function fRt(e,t){var n,i,s,c,a,g;if(t)for(c=t.a.length,n=new cg(c),g=(n.b-n.a)*n.c<0?(zd(),_1):new Xd(n);g.Ob();)a=u(g.Pb(),19),s=Q3(t,a.a),i=new zAe(e),Y9t(i.a,s)}function hRt(e){var t;if(e!=null&&e.length>0&&kr(e,e.length-1)==33)try{return t=UXe(gl(e,0,e.length-1)),t.e==null}catch(n){if(n=fi(n),!W(n,32))throw F(n)}return!1}function JVe(e,t,n){var i,s,c;return i=t.ak(),c=t.dd(),s=i.$j()?Jd(e,3,i,null,c,_O(e,i,c,W(i,99)&&(u(i,18).Bb&zr)!=0),!0):Jd(e,1,i,i.zj(),c,-1,!0),n?n.Ei(s):n=s,n}function aRt(){var e,t,n;for(t=0,e=0;e<1;e++){if(n=ule((fn(e,1),"X".charCodeAt(e))),n==0)throw F(new ln("Unknown Option: "+"X".substr(e)));t|=n}return t}function dRt(e,t,n){var i,s,c;switch(i=Rr(t),s=HP(i),c=new mo,_s(c,t),n.g){case 1:Xi(c,L9(Fv(s)));break;case 2:Xi(c,Fv(s))}return ue(c,(xe(),dw),Oe(N(e,dw))),c}function mce(e){var t,n;return t=u(nn(new _t(qt($s(e.a).a.Kc(),new L))),17),n=u(nn(new _t(qt(qi(e.a).a.Kc(),new L))),17),je(Pe(N(t,(ae(),Vf))))||je(Pe(N(n,Vf)))}function Pm(){Pm=X,V$=new b8("ONE_SIDE",0),U$=new b8("TWO_SIDES_CORNER",1),G$=new b8("TWO_SIDES_OPPOSING",2),X$=new b8("THREE_SIDES",3),K$=new b8("FOUR_SIDES",4)}function Aq(e,t,n,i,s){var c,a;c=u(wl(ni(t.Oc(),new XSe),pg(new yr,new ks,new Au,H(_(Uc,1),de,132,0,[(Bf(),Tl)]))),15),a=u(mg(e.b,n,i),15),s==0?a.Wc(0,c):a.Gc(c)}function gRt(e,t){var n,i,s,c,a;for(c=new R(t.a);c.a0&&CVe(this,this.c-1,(ye(),At)),this.c0&&e[0].length>0&&(this.c=je(Pe(N(Rr(e[0][0]),(ae(),e0e))))),this.a=J(rft,fe,2018,e.length,0,2),this.b=J(sft,fe,2019,e.length,0,2),this.d=new kWe}function vRt(e){return e.c.length==0?!1:(pt(0,e.c.length),u(e.c[0],17)).c.i.k==(jt(),sr)?!0:W3(ec(new ht(null,new gt(e,16)),new E6e),new A6e)}function yRt(e,t,n){return Vt(n,"Tree layout",1),RM(e.b),_h(e.b,(TO(),IN),IN),_h(e.b,R6,R6),_h(e.b,MC,MC),_h(e.b,L6,L6),e.a=qj(e.b,t),UHt(e,t,xo(n,1)),Ht(n),t}function tXe(e,t){var n,i,s,c,a,g,w;for(g=_b(t),c=t.f,w=t.g,a=p.Math.sqrt(c*c+w*w),s=0,i=new R(g);i.a=0?(n=U9(e,Zj),i=_9(e,Zj)):(t=db(e,1),n=U9(t,5e8),i=_9(t,5e8),i=$r(da(i,1),Vi(e,1))),Df(da(i,32),Vi(n,is))}function rXe(e,t,n){var i,s;switch(i=(Rt(t.b!=0),u(Hl(t,t.a.a),8)),n.g){case 0:i.b=0;break;case 2:i.b=e.f;break;case 3:i.a=0;break;default:i.a=e.g}return s=Cn(t,0),z8(s,i),t}function sXe(e,t,n,i){var s,c,a,g,w;switch(w=e.b,c=t.d,a=c.j,g=Doe(a,w.d[a.g],n),s=Vn(Us(c.n),c.a),c.j.g){case 1:case 3:g.a+=s.a;break;case 2:case 4:g.b+=s.b}ji(i,g,i.c.b,i.c)}function DRt(e,t,n){var i,s,c,a;for(a=Ds(e.e,t,0),c=new RJ,c.b=n,i=new vr(e.e,a);i.b1;t>>=1)(t&1)!=0&&(i=pm(i,n)),n.d==1?n=pm(n,n):n=new MKe(BYe(n.a,n.d,J(Zt,On,25,n.d<<1,15,1)));return i=pm(i,n),i}function Cce(){Cce=X;var e,t,n,i;for(Tde=J(hr,ds,25,25,15,1),Ede=J(hr,ds,25,33,15,1),i=152587890625e-16,t=32;t>=0;t--)Ede[t]=i,i*=.5;for(n=1,e=24;e>=0;e--)Tde[e]=n,n*=.5}function BRt(e){var t,n;if(je(Pe($e(e,(xe(),aw))))){for(n=new _t(qt(Ea(e).a.Kc(),new L));an(n);)if(t=u(nn(n),79),ip(t)&&je(Pe($e(t,Kg))))return!0}return!1}function oXe(e,t){var n,i,s;Ki(e.f,t)&&(t.b=e,i=t.c,Ds(e.j,i,0)!=-1||ge(e.j,i),s=t.d,Ds(e.j,s,0)!=-1||ge(e.j,s),n=t.a.b,n.c.length!=0&&(!e.i&&(e.i=new BKe(e)),ePt(e.i,n)))}function FRt(e){var t,n,i,s,c;return n=e.c.d,i=n.j,s=e.d.d,c=s.j,i==c?n.p=0&&et(e.substr(t,3),"GMT")||t>=0&&et(e.substr(t,3),"UTC"))&&(n[0]=t+3),Zle(e,n,i)}function HRt(e,t){var n,i,s,c,a;for(c=e.g.a,a=e.g.b,i=new R(e.d);i.an;c--)e[c]|=t[c-n-1]>>>a,e[c-1]=t[c-n-1]<=e.f)break;c.c[c.c.length]=n}return c}function Ece(e){var t,n,i,s;for(t=null,s=new R(e.wf());s.a0&&vo(e.g,t,e.g,t+i,g),a=n.Kc(),e.i+=i,s=0;sc&&i9t(m,nQe(n[g],xde))&&(s=g,c=w);return s>=0&&(i[0]=t+c),s}function XRt(e,t){var n;if(n=J$e(e.b.Hf(),t.b.Hf()),n!=0)return n;switch(e.b.Hf().g){case 1:case 2:return Zo(e.b.sf(),t.b.sf());case 3:case 4:return Zo(t.b.sf(),e.b.sf())}return 0}function URt(e){var t,n,i;for(i=e.e.c.length,e.a=og(Zt,[fe,On],[48,25],15,[i,i],2),n=new R(e.c);n.a>4&15,c=e[i]&15,a[s++]=Qme[n],a[s++]=Qme[c];return ah(a,0,a.length)}function ZRt(e,t,n){var i,s,c;return i=t.ak(),c=t.dd(),s=i.$j()?Jd(e,4,i,c,null,_O(e,i,c,W(i,99)&&(u(i,18).Bb&zr)!=0),!0):Jd(e,i.Kj()?2:1,i,c,i.zj(),-1,!0),n?n.Ei(s):n=s,n}function lc(e){var t,n;return e>=zr?(t=E7+(e-zr>>10&1023)&Ni,n=56320+(e-zr&1023)&Ni,String.fromCharCode(t)+(""+String.fromCharCode(n))):String.fromCharCode(e&Ni)}function JRt(e,t){ub();var n,i,s,c;return s=u(u(Wn(e.r,t),21),84),s.gc()>=2?(i=u(s.Kc().Pb(),111),n=e.u.Hc((Dc(),ex)),c=e.u.Hc(Py),!i.a&&!n&&(s.gc()==2||c)):!1}function uXe(e,t,n,i,s){var c,a,g;for(c=KGe(e,t,n,i,s),g=!1;!c;)Sj(e,s,!0),g=!0,c=KGe(e,t,n,i,s);g&&Sj(e,s,!1),a=wH(s),a.c.length!=0&&(e.d&&e.d.lg(a),uXe(e,s,n,i,a))}function mj(){mj=X,vU=new r5(ja,0),wme=new r5("DIRECTED",1),vme=new r5("UNDIRECTED",2),pme=new r5("ASSOCIATION",3),mme=new r5("GENERALIZATION",4),bme=new r5("DEPENDENCY",5)}function eLt(e,t){var n;if(!Mf(e))throw F(new Ps(ont));switch(n=Mf(e),t.g){case 1:return-(e.j+e.f);case 2:return e.i-n.g;case 3:return e.j-n.f;case 4:return-(e.i+e.g)}return 0}function PO(e,t){var n,i;for(vt(t),i=e.b.c.length,ge(e.b,t);i>0;){if(n=i,i=(i-1)/2|0,e.a.ue(Me(e.b,i),t)<=0)return Fl(e.b,n,t),!0;Fl(e.b,n,Me(e.b,i))}return Fl(e.b,i,t),!0}function Ace(e,t,n,i){var s,c;if(s=0,n)s=RP(e.a[n.g][t.g],i);else for(c=0;c=g)}function Mce(e,t,n,i){var s;if(s=!1,lr(i)&&(s=!0,D3(t,n,un(i))),s||sb(i)&&(s=!0,Mce(e,t,n,i)),s||W(i,236)&&(s=!0,fg(t,n,u(i,236))),!s)throw F(new sB(Sae))}function nLt(e,t){var n,i,s;if(n=t.Hh(e.a),n&&(s=hf((!n.b&&(n.b=new tl((tt(),Kr),to,n)),n.b),hu),s!=null)){for(i=1;i<(Oc(),d2e).length;++i)if(et(d2e[i],s))return i}return 0}function iLt(e,t){var n,i,s;if(n=t.Hh(e.a),n&&(s=hf((!n.b&&(n.b=new tl((tt(),Kr),to,n)),n.b),hu),s!=null)){for(i=1;i<(Oc(),g2e).length;++i)if(et(g2e[i],s))return i}return 0}function fXe(e,t){var n,i,s,c;if(vt(t),c=e.a.gc(),c0?1:0;c.a[s]!=n;)c=c.a[s],s=e.a.ue(n.d,c.d)>0?1:0;c.a[s]=i,i.b=n.b,i.a[0]=n.a[0],i.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}function oLt(e){Dc();var t,n;return t=ii(La,H(_(lI,1),de,273,0,[$1])),!(k9(MM(t,e))>1||(n=ii(ex,H(_(lI,1),de,273,0,[J6,Py])),k9(MM(n,e))>1))}function jce(e,t){var n;n=ko((Qd(),Su),e),W(n,498)?bs(Su,e,new M$e(this,t)):bs(Su,e,this),Iq(this,t),t==(w3(),t2e)?(this.wb=u(this,1939),u(t,1941)):this.wb=(Yd(),bt)}function cLt(e){var t,n,i;if(e==null)return null;for(t=null,n=0;n=ad?"error":i>=900?"warn":i>=800?"info":"log"),GLe(n,e.a),e.b&&jle(t,n,e.b,"Exception: ",!0))}function N(e,t){var n,i;return i=(!e.q&&(e.q=new Jt),Bt(e.q,t)),i??(n=t.wg(),W(n,4)&&(n==null?(!e.q&&(e.q=new Jt),Dv(e.q,t)):(!e.q&&(e.q=new Jt),Qn(e.q,t,n))),n)}function qr(){qr=X,Th=new p8("P1_CYCLE_BREAKING",0),k1=new p8("P2_LAYERING",1),Vo=new p8("P3_NODE_ORDERING",2),Ao=new p8("P4_NODE_PLACEMENT",3),Es=new p8("P5_EDGE_ROUTING",4)}function gXe(e,t){var n,i,s,c,a;for(s=t==1?eV:JK,i=s.a.ec().Kc();i.Ob();)for(n=u(i.Pb(),103),a=u(Wn(e.f.c,n),21).Kc();a.Ob();)c=u(a.Pb(),46),nc(e.b.b,c.b),nc(e.b.a,u(c.b,81).d)}function lLt(e,t){H5();var n;if(e.c==t.c){if(e.b==t.b||$Mt(e.b,t.b)){if(n=q4t(e.b)?1:-1,e.a&&!t.a)return n;if(!e.a&&t.a)return-n}return Zo(e.b.g,t.b.g)}else return Hi(e.c,t.c)}function uLt(e,t){var n;Vt(t,"Hierarchical port position processing",1),n=e.b,n.c.length>0&&$Ye((pt(0,n.c.length),u(n.c[0],29)),e),n.c.length>1&&$Ye(u(Me(n,n.c.length-1),29),e),Ht(t)}function pXe(e,t){var n,i,s;if($ce(e,t))return!0;for(i=new R(t);i.a=s||t<0)throw F(new gs(GW+t+Bg+s));if(n>=s||n<0)throw F(new gs(YW+n+Bg+s));return t!=n?i=(c=e.Ti(n),e.Hi(t,c),c):i=e.Oi(n),i}function mXe(e){var t,n,i;if(i=e,e)for(t=0,n=e.Ug();n;n=n.Ug()){if(++t>fz)return mXe(n);if(i=n,n==e)throw F(new Ps("There is a cycle in the containment hierarchy of "+e))}return i}function u1(e){var t,n,i;for(i=new vg(Qr,"[","]"),n=e.Kc();n.Ob();)t=n.Pb(),ma(i,ie(t)===ie(e)?"(this Collection)":t==null?uc:Ns(t));return i.a?i.e.length==0?i.a.a:i.a.a+(""+i.e):i.c}function $ce(e,t){var n,i;if(i=!1,t.gc()<2)return!1;for(n=0;ni&&(fn(t-1,e.length),e.charCodeAt(t-1)<=32);)--t;return i>0||t1&&(e.j.b+=e.e)):(e.j.a+=n.a,e.j.b=p.Math.max(e.j.b,n.b),e.d.c.length>1&&(e.j.a+=e.e))}function f1(){f1=X,ect=H(_(Wr,1),ao,61,0,[(ye(),yt),At,Xt]),Jot=H(_(Wr,1),ao,61,0,[At,Xt,xt]),tct=H(_(Wr,1),ao,61,0,[Xt,xt,yt]),nct=H(_(Wr,1),ao,61,0,[xt,yt,At])}function hLt(e,t,n,i){var s,c,a,g,w,m,y;if(a=e.c.d,g=e.d.d,a.j!=g.j)for(y=e.b,s=a.j,w=null;s!=g.j;)w=t==0?_P(s):noe(s),c=Doe(s,y.d[s.g],n),m=Doe(w,y.d[w.g],n),Tn(i,Vn(c,m)),s=w}function aLt(e,t,n,i){var s,c,a,g,w;return a=TVe(e.a,t,n),g=u(a.a,19).a,c=u(a.b,19).a,i&&(w=u(N(t,(ae(),$c)),10),s=u(N(n,$c),10),w&&s&&(D_e(e.b,w,s),g+=e.b.i,c+=e.b.e)),g>c}function yXe(e){var t,n,i,s,c,a,g,w,m;for(this.a=UKe(e),this.b=new pe,n=e,i=0,s=n.length;iaF(e.d).c?(e.i+=e.g.c,YH(e.d)):aF(e.d).c>aF(e.g).c?(e.e+=e.d.c,YH(e.g)):(e.i+=YRe(e.g),e.e+=YRe(e.d),YH(e.g),YH(e.d))}function pLt(e,t,n){var i,s,c,a;for(c=t.q,a=t.r,new hg((cf(),E1),t,c,1),new hg(E1,c,a,1),s=new R(n);s.ag&&(w=g/i),s>c&&(m=c/s),a=p.Math.min(w,m),e.a+=a*(t.a-e.a),e.b+=a*(t.b-e.b)}function vLt(e,t,n,i,s){var c,a;for(a=!1,c=u(Me(n.b,0),33);Nzt(e,t,c,i,s)&&(a=!0,ZIt(n,c),n.b.c.length!=0);)c=u(Me(n.b,0),33);return n.b.c.length==0&&X9(n.j,n),a&&uj(t.q),a}function yLt(e,t){Rm();var n,i,s,c;if(t.b<2)return!1;for(c=Cn(t,0),n=u(xn(c),8),i=n;c.b!=c.d.c;){if(s=u(xn(c),8),eQ(e,i,s))return!0;i=s}return!!eQ(e,i,n)}function Ice(e,t,n,i){var s,c;return n==0?(!e.o&&(e.o=new sl((Lo(),I1),Np,e,0)),_A(e.o,t,i)):(c=u(ct((s=u(mt(e,16),26),s||e.zh()),n),66),c.Nj().Rj(e,zo(e),n-Lt(e.zh()),t,i))}function Iq(e,t){var n;t!=e.sb?(n=null,e.sb&&(n=u(e.sb,49).ih(e,1,ix,n)),t&&(n=u(t,49).gh(e,1,ix,n)),n=Use(e,t,n),n&&n.Fi()):(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,4,t,t))}function OLt(e,t){var n,i,s,c;if(t)s=Oa(t,"x"),n=new GAe(e),J3(n.a,(vt(s),s)),c=Oa(t,"y"),i=new YAe(e),tO(i.a,(vt(c),c));else throw F(new ih("All edge sections need an end point."))}function kLt(e,t){var n,i,s,c;if(t)s=Oa(t,"x"),n=new VAe(e),eO(n.a,(vt(s),s)),c=Oa(t,"y"),i=new XAe(e),nO(i.a,(vt(c),c));else throw F(new ih("All edge sections need a start point."))}function SLt(e,t){var n,i,s,c,a,g,w;for(i=oWe(e),c=0,g=i.length;c>22-t,s=e.h<>22-t):t<44?(n=0,i=e.l<>44-t):(n=0,i=0,s=e.l<e)throw F(new Ot("k must be smaller than n"));return t==0||t==e?1:e==0?0:uce(e)/(uce(t)*uce(e-t))}function Rce(e,t){var n,i,s,c;for(n=new ste(e);n.g==null&&!n.c?Bie(n):n.g==null||n.i!=0&&u(n.g[n.i-1],47).Ob();)if(c=u(xj(n),56),W(c,160))for(i=u(c,160),s=0;s>4],t[n*2+1]=EI[c&15];return ah(t,0,t.length)}function _Lt(e){pM();var t,n,i;switch(i=e.c.length,i){case 0:return lrt;case 1:return t=u(fUe(new R(e)),42),f8t(t.cd(),t.dd());default:return n=u(Ff(e,J(Hg,Gj,42,e.c.length,0,1)),165),new iB(n)}}function HLt(e){var t,n,i,s,c,a;for(t=new Gw,n=new Gw,e1(t,e),e1(n,e);n.b!=n.c;)for(s=u(kv(n),37),a=new R(s.a);a.a0&&h7(e,n,t),s):SFt(e,t,n)}function AXe(e,t,n){var i,s,c,a;if(t.b!=0){for(i=new ai,a=Cn(t,0);a.b!=a.d.c;)c=u(xn(a),86),Hr(i,mse(c)),s=c.e,s.a=u(N(c,(oo(),DX)),19).a,s.b=u(N(c,nbe),19).a;AXe(e,i,xo(n,i.b/e.a|0))}}function MXe(e,t){var n,i,s,c,a;if(e.e<=t||UCt(e,e.g,t))return e.g;for(c=e.r,i=e.g,a=e.r,s=(c-i)/2+i;i+11&&(e.e.b+=e.a)):(e.e.a+=n.a,e.e.b=p.Math.max(e.e.b,n.b),e.d.c.length>1&&(e.e.a+=e.a))}function KLt(e){var t,n,i,s;switch(s=e.i,t=s.b,i=s.j,n=s.g,s.a.g){case 0:n.a=(e.g.b.o.a-i.a)/2;break;case 1:n.a=t.d.n.a+t.d.a.a;break;case 2:n.a=t.d.n.a+t.d.a.a-i.a;break;case 3:n.b=t.d.n.b+t.d.a.b}}function PXe(e,t,n,i,s){if(ii&&(e.a=i),e.bs&&(e.b=s),e}function VLt(e){if(W(e,149))return kHt(u(e,149));if(W(e,229))return vDt(u(e,229));if(W(e,23))return TLt(u(e,23));throw F(new Ot(xae+u1(new Jc(H(_(It,1),Ee,1,5,[e])))))}function XLt(e,t,n,i,s){var c,a,g;for(c=!0,a=0;a>>s|n[a+i+1]<>>s,++a}return c}function _ce(e,t,n,i){var s,c,a;if(t.k==(jt(),sr)){for(c=new _t(qt($s(t).a.Kc(),new L));an(c);)if(s=u(nn(c),17),a=s.c.i.k,a==sr&&e.c.a[s.c.i.c.p]==i&&e.c.a[t.c.p]==n)return!0}return!1}function ULt(e,t){var n,i,s,c;return t&=63,n=e.h&Pa,t<22?(c=n>>>t,s=e.m>>t|n<<22-t,i=e.l>>t|e.m<<22-t):t<44?(c=0,s=n>>>t-22,i=e.m>>t-22|e.h<<44-t):(c=0,s=0,i=n>>>t-44),Qo(i&Xc,s&Xc,c&Pa)}function jXe(e,t,n,i){var s;this.b=i,this.e=e==(K0(),$6),s=t[n],this.d=og(Zc,[fe,Zh],[177,25],16,[s.length,s.length],2),this.a=og(Zt,[fe,On],[48,25],15,[s.length,s.length],2),this.c=new kce(t,n)}function GLt(e){var t,n,i;for(e.k=new qie((ye(),H(_(Wr,1),ao,61,0,[Ks,yt,At,Xt,xt])).length,e.j.c.length),i=new R(e.j);i.a=n)return DO(e,t,i.p),!0;return!1}function $Xe(e){var t;return(e.Db&64)!=0?Rq(e):(t=new dl(dae),!e.a||wn(wn((t.a+=' "',t),e.a),'"'),wn(v0(wn(v0(wn(v0(wn(v0((t.a+=" (",t),e.i),","),e.j)," | "),e.g),","),e.f),")"),t.a)}function NXe(e,t,n){var i,s,c,a,g;for(g=Ko(e.e.Tg(),t),s=u(e.g,119),i=0,a=0;an?Xce(e,n,"start index"):t<0||t>n?Xce(t,n,"end index"):mS("end index (%s) must not be less than start index (%s)",H(_(It,1),Ee,1,5,[me(t),me(e)]))}function RXe(e,t){var n,i,s,c;for(i=0,s=e.length;i0&&LXe(e,c,n));t.p=0}function Fe(e){var t;this.c=new ai,this.f=e.e,this.e=e.d,this.i=e.g,this.d=e.c,this.b=e.b,this.k=e.j,this.a=e.a,e.i?this.j=e.i:this.j=(t=u(sf(Sd),9),new Rl(t,u($u(t,t.length),9),0)),this.g=e.f}function nBt(e){var t,n,i,s;for(t=lg(wn(new dl("Predicates."),"and"),40),n=!0,s=new T4(e);s.b0?g[a-1]:J(ta,dd,10,0,0,1),s=g[a],m=a=0?e.Bh(s):Jce(e,i);else throw F(new Ot(m1+i.ne()+XS));else throw F(new Ot(wnt+t+mnt));else Ql(e,n,i)}function Hce(e){var t,n;if(n=null,t=!1,W(e,204)&&(t=!0,n=u(e,204).a),t||W(e,258)&&(t=!0,n=""+u(e,258).a),t||W(e,483)&&(t=!0,n=""+u(e,483).a),!t)throw F(new sB(Sae));return n}function HXe(e,t){var n,i;if(e.f){for(;t.Ob();)if(n=u(t.Pb(),72),i=n.ak(),W(i,99)&&(u(i,18).Bb&co)!=0&&(!e.e||i.Gj()!=Xk||i.aj()!=0)&&n.dd()!=null)return t.Ub(),!0;return!1}else return t.Ob()}function qXe(e,t){var n,i;if(e.f){for(;t.Sb();)if(n=u(t.Ub(),72),i=n.ak(),W(i,99)&&(u(i,18).Bb&co)!=0&&(!e.e||i.Gj()!=Xk||i.aj()!=0)&&n.dd()!=null)return t.Pb(),!0;return!1}else return t.Sb()}function qce(e,t,n){var i,s,c,a,g,w;for(w=Ko(e.e.Tg(),t),i=0,g=e.i,s=u(e.g,119),a=0;a1&&(t.c[t.c.length]=c))}function oBt(e){var t,n,i,s;for(n=new ai,Hr(n,e.o),i=new LJ;n.b!=0;)t=u(n.b==0?null:(Rt(n.b!=0),Hl(n,n.a.a)),508),s=OJe(e,t,!0),s&&ge(i.a,t);for(;i.a.c.length!=0;)t=u(gWe(i),508),OJe(e,t,!1)}function hd(){hd=X,Owe=new av(NS,0),jr=new av("BOOLEAN",1),lo=new av("INT",2),Hk=new av("STRING",3),As=new av("DOUBLE",4),xi=new av("ENUM",5),Cy=new av("ENUMSET",6),Uf=new av("OBJECT",7)}function aS(e,t){var n,i,s,c,a;i=p.Math.min(e.c,t.c),c=p.Math.min(e.d,t.d),s=p.Math.max(e.c+e.b,t.c+t.b),a=p.Math.max(e.d+e.a,t.d+t.a),s=(s/2|0))for(this.e=i?i.c:null,this.d=s;n++0;)Fie(this);this.b=t,this.a=null}function uBt(e,t){var n,i;t.a?DHt(e,t):(n=u(wF(e.b,t.b),57),n&&n==e.a[t.b.f]&&n.a&&n.a!=t.b.a&&n.c.Fc(t.b),i=u(bF(e.b,t.b),57),i&&e.a[i.f]==t.b&&i.a&&i.a!=t.b.a&&t.b.c.Fc(i),rF(e.b,t.b))}function zXe(e,t){var n,i;if(n=u(fs(e.b,t),124),u(u(Wn(e.r,t),21),84).dc()){n.n.b=0,n.n.c=0;return}n.n.b=e.C.b,n.n.c=e.C.c,e.A.Hc((cl(),n0))&&gYe(e,t),i=F$t(e,t),nQ(e,t)==(xm(),j1)&&(i+=2*e.w),n.a.a=i}function WXe(e,t){var n,i;if(n=u(fs(e.b,t),124),u(u(Wn(e.r,t),21),84).dc()){n.n.d=0,n.n.a=0;return}n.n.d=e.C.d,n.n.a=e.C.a,e.A.Hc((cl(),n0))&&pYe(e,t),i=_$t(e,t),nQ(e,t)==(xm(),j1)&&(i+=2*e.w),n.a.b=i}function fBt(e,t){var n,i,s,c;for(c=new pe,i=new R(t);i.an.a&&(i.Hc((Nb(),RC))?s=(t.a-n.a)/2:i.Hc(LC)&&(s=t.a-n.a)),t.b>n.b&&(i.Hc((Nb(),FC))?c=(t.b-n.b)/2:i.Hc(BC)&&(c=t.b-n.b)),Pce(e,s,c)}function JXe(e,t,n,i,s,c,a,g,w,m,y,k,E){W(e.Cb,88)&&Lb(qc(u(e.Cb,88)),4),Io(e,n),e.f=a,yO(e,g),kO(e,w),vO(e,m),OO(e,y),cd(e,k),SO(e,E),od(e,!0),id(e,s),e.ok(c),Sg(e,t),i!=null&&(e.i=null,vP(e,i))}function eUe(e){var t,n;if(e.f){for(;e.n>0;){if(t=u(e.k.Xb(e.n-1),72),n=t.ak(),W(n,99)&&(u(n,18).Bb&co)!=0&&(!e.e||n.Gj()!=Xk||n.aj()!=0)&&t.dd()!=null)return!0;--e.n}return!1}else return e.n>0}function Xce(e,t,n){if(e<0)return mS(BJe,H(_(It,1),Ee,1,5,[n,me(e)]));if(t<0)throw F(new Ot(FJe+t));return mS("%s (%s) must not be greater than size (%s)",H(_(It,1),Ee,1,5,[n,me(e),me(t)]))}function Uce(e,t,n,i,s,c){var a,g,w,m;if(a=i-n,a<7){lDt(t,n,i,c);return}if(w=n+s,g=i+s,m=w+(g-w>>1),Uce(t,e,w,m,-s,c),Uce(t,e,m,g,-s,c),c.ue(e[m-1],e[m])<=0){for(;n=0?e.sh(c,n):Cle(e,s,n);else throw F(new Ot(m1+s.ne()+XS));else throw F(new Ot(wnt+t+mnt));else Wl(e,i,s,n)}function tUe(e){var t,n,i,s;if(n=u(e,49).qh(),n)try{if(i=null,t=IO((Qd(),Su),LYe(hDt(n))),t&&(s=t.rh(),s&&(i=s.Wk(vkt(n.e)))),i&&i!=e)return tUe(i)}catch(c){if(c=fi(c),!W(c,60))throw F(c)}return e}function Wo(e,t,n){var i,s,c,a;if(a=t==null?0:e.b.se(t),s=(i=e.a.get(a),i??new Array),s.length==0)e.a.set(a,s);else if(c=wWe(e,t,s),c)return c.ed(n);return pi(s,s.length,new nA(t,n)),++e.c,xM(e.b),null}function nUe(e,t){var n,i;return RM(e.a),_h(e.a,(kP(),qN),qN),_h(e.a,_k,_k),i=new Ji,Fn(i,_k,(QP(),LX)),ie($e(t,(Db(),_X)))!==ie((D9(),QN))&&Fn(i,_k,IX),Fn(i,_k,RX),nNe(e.a,i),n=qj(e.a,t),n}function iUe(e){if(!e)return _Pe(),wrt;var t=e.valueOf?e.valueOf():e;if(t!==e){var n=TK[typeof t];return n?n(t):Hse(typeof t)}else return e instanceof Array||e instanceof p.Array?new KZ(e):new Ux(e)}function rUe(e,t,n){var i,s,c;switch(c=e.o,i=u(fs(e.p,n),244),s=i.i,s.b=i7(i),s.a=n7(i),s.b=p.Math.max(s.b,c.a),s.b>c.a&&!t&&(s.b=c.a),s.c=-(s.b-c.a)/2,n.g){case 1:s.d=-s.a;break;case 3:s.d=c.b}pQ(i),bQ(i)}function sUe(e,t,n){var i,s,c;switch(c=e.o,i=u(fs(e.p,n),244),s=i.i,s.b=i7(i),s.a=n7(i),s.a=p.Math.max(s.a,c.b),s.a>c.b&&!t&&(s.a=c.b),s.d=-(s.a-c.b)/2,n.g){case 4:s.c=-s.b;break;case 2:s.c=c.a}pQ(i),bQ(i)}function CBt(e,t){var n,i,s,c,a;if(!t.dc()){if(s=u(t.Xb(0),128),t.gc()==1){DGe(e,s,s,1,0,t);return}for(n=1;n0)try{s=kl(t,Mr,_n)}catch(c){throw c=fi(c),W(c,127)?(i=c,F(new eP(i))):F(c)}return n=(!e.a&&(e.a=new KL(e)),e.a),s=0?u(V(n,s),56):null}function MBt(e,t){if(e<0)return mS(BJe,H(_(It,1),Ee,1,5,["index",me(e)]));if(t<0)throw F(new Ot(FJe+t));return mS("%s (%s) must be less than size (%s)",H(_(It,1),Ee,1,5,["index",me(e),me(t)]))}function PBt(e){var t,n,i,s,c;if(e==null)return uc;for(c=new vg(Qr,"[","]"),n=e,i=0,s=n.length;i0)for(a=e.c.d,g=e.d.d,s=oh(ur(new De(g.a,g.b),a),1/(i+1)),c=new De(a.a,a.b),n=new R(e.a);n.a=0?e._g(n,!0,!0):rp(e,s,!0),153)),u(i,215).ol(t);else throw F(new Ot(m1+t.ne()+XS))}function ele(e){var t,n;return e>-0x800000000000&&e<0x800000000000?e==0?0:(t=e<0,t&&(e=-e),n=Di(p.Math.floor(p.Math.log(e)/.6931471805599453)),(!t||e!=p.Math.pow(2,n))&&++n,n):jze(cc(e))}function QBt(e){var t,n,i,s,c,a,g;for(c=new ha,n=new R(e);n.a2&&g.e.b+g.j.b<=2&&(s=g,i=a),c.a.zc(s,c),s.q=i);return c}function dUe(e,t){var n,i,s;return i=new Ta(e),Cs(i,t),ue(i,(ae(),lN),t),ue(i,(xe(),Si),(br(),jo)),ue(i,Eh,(Wh(),JN)),J1(i,(jt(),Ri)),n=new mo,_s(n,i),Xi(n,(ye(),xt)),s=new mo,_s(s,i),Xi(s,At),i}function gUe(e){switch(e.g){case 0:return new oB((K0(),EC));case 1:return new MCe;case 2:return new RCe;default:throw F(new Ot("No implementation is available for the crossing minimizer "+(e.f!=null?e.f:""+e.g)))}}function pUe(e,t){var n,i,s,c,a;for(e.c[t.p]=!0,ge(e.a,t),a=new R(t.j);a.a=c)a.$b();else for(s=a.Kc(),i=0;i0?ZJ():a<0&&vUe(e,t,-a),!0):!1}function n7(e){var t,n,i,s,c,a,g;if(g=0,e.b==0){for(a=tVe(e,!0),t=0,i=a,s=0,c=i.length;s0&&(g+=n,++t);t>1&&(g+=e.c*(t-1))}else g=XPe(sze(wM(ni(QF(e.a),new sL),new oL)));return g>0?g+e.n.d+e.n.a:0}function i7(e){var t,n,i,s,c,a,g;if(g=0,e.b==0)g=XPe(sze(wM(ni(QF(e.a),new iL),new rL)));else{for(a=nVe(e,!0),t=0,i=a,s=0,c=i.length;s0&&(g+=n,++t);t>1&&(g+=e.c*(t-1))}return g>0?g+e.n.b+e.n.c:0}function YBt(e,t){var n,i,s,c;for(c=u(fs(e.b,t),124),n=c.a,s=u(u(Wn(e.r,t),21),84).Kc();s.Ob();)i=u(s.Pb(),111),i.c&&(n.a=p.Math.max(n.a,Fne(i.c)));if(n.a>0)switch(t.g){case 2:c.n.c=e.s;break;case 4:c.n.b=e.s}}function ZBt(e,t){var n,i,s;return n=u(N(t,(gf(),wk)),19).a-u(N(e,wk),19).a,n==0?(i=ur(Us(u(N(e,(n1(),cC)),8)),u(N(e,h6),8)),s=ur(Us(u(N(t,cC),8)),u(N(t,h6),8)),Hi(i.a*i.b,s.a*s.b)):n}function JBt(e,t){var n,i,s;return n=u(N(t,(sp(),HN)),19).a-u(N(e,HN),19).a,n==0?(i=ur(Us(u(N(e,(oo(),PC)),8)),u(N(e,B6),8)),s=ur(Us(u(N(t,PC),8)),u(N(t,B6),8)),Hi(i.a*i.b,s.a*s.b)):n}function yUe(e){var t,n;return n=new Fd,n.a+="e_",t=lPt(e),t!=null&&(n.a+=""+t),e.c&&e.d&&(wn((n.a+=" ",n),hj(e.c)),wn(so((n.a+="[",n),e.c.i),"]"),wn((n.a+=Bz,n),hj(e.d)),wn(so((n.a+="[",n),e.d.i),"]")),n.a}function OUe(e){switch(e.g){case 0:return new jCe;case 1:return new DCe;case 2:return new PCe;case 3:return new $Ce;default:throw F(new Ot("No implementation is available for the layout phase "+(e.f!=null?e.f:""+e.g)))}}function nle(e,t,n,i,s){var c;switch(c=0,s.g){case 1:c=p.Math.max(0,t.b+e.b-(n.b+i));break;case 3:c=p.Math.max(0,-e.b-i);break;case 2:c=p.Math.max(0,-e.a-i);break;case 4:c=p.Math.max(0,t.a+e.a-(n.a+i))}return c}function eFt(e,t,n){var i,s,c,a,g;if(n)for(s=n.a.length,i=new cg(s),g=(i.b-i.a)*i.c<0?(zd(),_1):new Xd(i);g.Ob();)a=u(g.Pb(),19),c=Q3(n,a.a),wae in c.a||XW in c.a?hQt(e,c,t):wXt(e,c,t),B5t(u(Bt(e.b,xO(c)),79))}function ile(e){var t,n;switch(e.b){case-1:return!0;case 0:return n=e.t,n>1||n==-1?(e.b=-1,!0):(t=ou(e),t&&(Vr(),t.Cj()==vit)?(e.b=-1,!0):(e.b=1,!1));default:case 1:return!1}}function tFt(e,t){var n,i,s,c,a;for(i=(!t.s&&(t.s=new we(dc,t,21,17)),t.s),c=null,s=0,a=i.i;s=0&&i=0?e._g(n,!0,!0):rp(e,s,!0),153)),u(i,215).ll(t);throw F(new Ot(m1+t.ne()+FW))}function oFt(){vee();var e;return r1t?u(IO((Qd(),Su),au),1939):(En(Hg,new V9e),HKt(),e=u(W(ko((Qd(),Su),au),547)?ko(Su,au):new cBe,547),r1t=!0,LXt(e),qXt(e),Qn((mee(),e2e),e,new u9e),bs(Su,au,e),e)}function cFt(e,t){var n,i,s,c;e.j=-1,el(e.e)?(n=e.i,c=e.i!=0,i9(e,t),i=new va(e.e,3,e.c,null,t,n,c),s=t.Qk(e.e,e.c,null),s=JVe(e,t,s),s?(s.Ei(i),s.Fi()):Hn(e.e,i)):(i9(e,t),s=t.Qk(e.e,e.c,null),s&&s.Fi())}function Oj(e,t){var n,i,s;if(s=0,i=t[0],i>=e.length)return-1;for(n=(fn(i,e.length),e.charCodeAt(i));n>=48&&n<=57&&(s=s*10+(n-48),++i,!(i>=e.length));)n=(fn(i,e.length),e.charCodeAt(i));return i>t[0]?t[0]=i:s=-1,s}function lFt(e){var t,n,i,s,c;return s=u(e.a,19).a,c=u(e.b,19).a,n=s,i=c,t=p.Math.max(p.Math.abs(s),p.Math.abs(c)),s<=0&&s==c?(n=0,i=c-1):s==-t&&c!=t?(n=c,i=s,c>=0&&++n):(n=-c,i=s),new mr(me(n),me(i))}function uFt(e,t,n,i){var s,c,a,g,w,m;for(s=0;s=0&&m>=0&&w=e.i)throw F(new gs(GW+t+Bg+e.i));if(n>=e.i)throw F(new gs(YW+n+Bg+e.i));return i=e.g[n],t!=n&&(t>16),t=i>>16&16,n=16-t,e=e>>t,i=e-256,t=i>>16&8,n+=t,e<<=t,i=e-Kb,t=i>>16&4,n+=t,e<<=t,i=e-gh,t=i>>16&2,n+=t,e<<=t,i=e>>14,t=i&~(i>>1),n+2-t)}function hFt(e){Cv();var t,n,i,s;for(y$=new pe,WK=new Jt,zK=new pe,t=(!e.a&&(e.a=new we(mi,e,10,11)),e.a),QVt(t),s=new Ft(t);s.e!=s.i.gc();)i=u(Qt(s),33),Ds(y$,i,0)==-1&&(n=new pe,ge(zK,n),$Ke(i,n));return zK}function aFt(e,t,n){var i,s,c,a;e.a=n.b.d,W(t,352)?(s=Im(u(t,79),!1,!1),c=J9(s),i=new rEe(e),Sr(c,i),g7(c,s),t.We((Dn(),y2))!=null&&Sr(u(t.We(y2),74),i)):(a=u(t,470),a.Hg(a.Dg()+e.a.a),a.Ig(a.Eg()+e.a.b))}function SUe(e,t){var n,i,s,c,a,g,w,m;for(m=oe(Oe(N(t,(xe(),E6)))),w=e[0].n.a+e[0].o.a+e[0].d.c+m,g=1;g=0?n:(g=M5(ur(new De(a.c+a.b/2,a.d+a.a/2),new De(c.c+c.b/2,c.d+c.a/2))),-(WYe(c,a)-1)*g)}function gFt(e,t,n){var i;Ti(new ht(null,(!n.a&&(n.a=new we(di,n,6,6)),new gt(n.a,16))),new c$e(e,t)),Ti(new ht(null,(!n.n&&(n.n=new we(Rs,n,1,7)),new gt(n.n,16))),new l$e(e,t)),i=u($e(n,(Dn(),y2)),74),i&&lse(i,e,t)}function rp(e,t,n){var i,s,c;if(c=Fm((Oc(),Cr),e.Tg(),t),c)return Vr(),u(c,66).Oj()||(c=Av(ms(Cr,c))),s=(i=e.Yg(c),u(i>=0?e._g(i,!0,!0):rp(e,c,!0),153)),u(s,215).hl(t,n);throw F(new Ot(m1+t.ne()+FW))}function sle(e,t,n,i){var s,c,a,g,w;if(s=e.d[t],s){if(c=s.g,w=s.i,i!=null){for(g=0;g=n&&(i=t,m=(w.c+w.a)/2,a=m-n,w.c<=m-n&&(s=new SF(w.c,a),ab(e,i++,s)),g=m+n,g<=w.a&&(c=new SF(g,w.a),mb(i,e.c.length),X4(e.c,i,c)))}function ole(e){var t;if(!e.c&&e.g==null)e.d=e.si(e.f),rn(e,e.d),t=e.d;else{if(e.g==null)return!0;if(e.i==0)return!1;t=u(e.g[e.i-1],47)}return t==e.b&&null.km>=null.jm()?(xj(e),ole(e)):t.Ob()}function mFt(e,t,n){var i,s,c,a,g;if(g=n,!g&&(g=Lne(new a3,0)),Vt(g,qet,1),WZe(e.c,t),a=DKt(e.a,t),a.gc()==1)EZe(u(a.Xb(0),37),g);else for(c=1/a.gc(),s=a.Kc();s.Ob();)i=u(s.Pb(),37),EZe(i,xo(g,c));Tkt(e.a,a,t),Dqt(t),Ht(g)}function TUe(e){if(this.a=e,e.c.i.k==(jt(),Ri))this.c=e.c,this.d=u(N(e.c.i,(ae(),eo)),61);else if(e.d.i.k==Ri)this.c=e.d,this.d=u(N(e.d.i,(ae(),eo)),61);else throw F(new Ot("Edge "+e+" is not an external edge."))}function EUe(e,t){var n,i,s;s=e.b,e.b=t,(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,3,s,e.b)),t?t!=e&&(Io(e,t.zb),iH(e,t.d),n=(i=t.c,i??t.zb),sH(e,n==null||et(n,t.zb)?null:n)):(Io(e,null),iH(e,0),sH(e,null))}function AUe(e){var t,n;if(e.f){for(;e.n=a)throw F(new hb(t,a));return s=n[t],a==1?i=null:(i=J(EU,nK,415,a-1,0,1),vo(n,0,i,0,t),c=a-t-1,c>0&&vo(n,t+1,i,t,c)),CO(e,i),YXe(e,t,s),s}function Kv(){Kv=X,$y=u(V(re((cee(),uo).qb),6),34),Dy=u(V(re(uo.qb),3),34),$U=u(V(re(uo.qb),4),34),NU=u(V(re(uo.qb),5),18),pj($y),pj(Dy),pj($U),pj(NU),l1t=new Jc(H(_(dc,1),Ym,170,0,[$y,Dy]))}function DUe(e,t){var n;this.d=new j4,this.b=t,this.e=new ps(t.qf()),n=e.u.Hc((Dc(),XC)),e.u.Hc(La)?e.D?this.a=n&&!t.If():this.a=!0:e.u.Hc($1)?n?this.a=!(t.zf().Kc().Ob()||t.Bf().Kc().Ob()):this.a=!1:this.a=!1}function $Ue(e,t){var n,i,s,c;for(n=e.o.a,c=u(u(Wn(e.r,t),21),84).Kc();c.Ob();)s=u(c.Pb(),111),s.e.a=(i=s.b,i.Xe((Dn(),Gc))?i.Hf()==(ye(),xt)?-i.rf().a-oe(Oe(i.We(Gc))):n+oe(Oe(i.We(Gc))):i.Hf()==(ye(),xt)?-i.rf().a:n)}function NUe(e,t){var n,i,s,c;n=u(N(e,(xe(),El)),103),c=u($e(t,Nk),61),s=u(N(e,Si),98),s!=(br(),Gf)&&s!=D1?c==(ye(),Ks)&&(c=rue(t,n),c==Ks&&(c=Fv(n))):(i=TZe(t),i>0?c=Fv(n):c=L9(Fv(n))),as(t,Nk,c)}function kFt(e,t){var n,i,s,c,a;for(a=e.j,t.a!=t.b&&ir(a,new qSe),s=a.c.length/2|0,i=0;i0&&h7(e,n,t),c):i.a!=null?(h7(e,t,n),-1):s.a!=null?(h7(e,n,t),1):0}function IUe(e,t){var n,i,s,c;e.ej()?(n=e.Vi(),c=e.fj(),++e.j,e.Hi(n,e.oi(n,t)),i=e.Zi(3,null,t,n,c),e.bj()?(s=e.cj(t,null),s?(s.Ei(i),s.Fi()):e.$i(i)):e.$i(i)):(YLe(e,t),e.bj()&&(s=e.cj(t,null),s&&s.Fi()))}function kj(e,t){var n,i,s,c,a;for(a=Ko(e.e.Tg(),t),s=new bE,n=u(e.g,119),c=e.i;--c>=0;)i=n[c],a.rl(i.ak())&&rn(s,i);!xJe(e,s)&&el(e.e)&&h3(e,t.$j()?Jd(e,6,t,(rt(),Yr),null,-1,!1):Jd(e,t.Kj()?2:1,t,null,null,-1,!1))}function $O(){$O=X;var e,t;for(fy=J(Jm,fe,91,32,0,1),l6=J(Jm,fe,91,32,0,1),e=1,t=0;t<=18;t++)fy[t]=q9(e),l6[t]=q9(da(e,t)),e=Ar(e,5);for(;ta)||t.q&&(i=t.C,a=i.c.c.a-i.o.a/2,s=i.n.a-n,s>a)))}function CFt(e,t){var n;Vt(t,"Partition preprocessing",1),n=u(wl(ni(Hs(ni(new ht(null,new gt(e.a,16)),new p5e),new b5e),new w5e),pg(new yr,new ks,new Au,H(_(Uc,1),de,132,0,[(Bf(),Tl)]))),15),Ti(n.Oc(),new m5e),Ht(t)}function RUe(e){m_();var t,n,i,s,c,a,g;for(n=new dg,s=new R(e.e.b);s.a1?e.e*=oe(e.a):e.f/=oe(e.a),ojt(e),h$t(e),Vqt(e),ue(e.b,(sS(),v$),e.g)}function _Ue(e,t,n){var i,s,c,a,g,w;for(i=0,w=n,t||(i=n*(e.c.length-1),w*=-1),c=new R(e);c.a=0?(t||(t=new B4,i>0&&us(t,e.substr(0,i))),t.a+="\\",R3(t,n&Ni)):t&&R3(t,n&Ni);return t?t.a:e}function NFt(e){var t;if(!e.a)throw F(new Ps("IDataType class expected for layout option "+e.f));if(t=qTt(e.a),t==null)throw F(new Ps("Couldn't create new instance of property '"+e.f+"'. "+_tt+(aa(iT),iT.k)+lae));return u(t,414)}function Vq(e){var t,n,i,s,c;return c=e.eh(),c&&c.kh()&&(s=o1(e,c),s!=c)?(n=e.Vg(),i=(t=e.Vg(),t>=0?e.Qg(null):e.eh().ih(e,-1-t,null,null)),e.Rg(u(s,49),n),i&&i.Fi(),e.Lg()&&e.Mg()&&n>-1&&Hn(e,new rr(e,9,n,c,s)),s):c}function WUe(e){var t,n,i,s,c,a,g,w;for(a=0,c=e.f.e,i=0;i>5,s>=e.d)return e.e<0;if(n=e.a[s],t=1<<(t&31),e.e<0){if(i=fze(e),s>16)),15).Xc(c),g0&&(!(Kd(e.a.c)&&t.n.d)&&!(C3(e.a.c)&&t.n.b)&&(t.g.d+=p.Math.max(0,i/2-.5)),!(Kd(e.a.c)&&t.n.a)&&!(C3(e.a.c)&&t.n.c)&&(t.g.a-=i-1))}function XUe(e){var t,n,i,s,c;if(s=new pe,c=HYe(e,s),t=u(N(e,(ae(),$c)),10),t)for(i=new R(t.j);i.a>t,c=e.m>>t|n<<22-t,s=e.l>>t|e.m<<22-t):t<44?(a=i?Pa:0,c=n>>t-22,s=e.m>>t-22|n<<44-t):(a=i?Pa:0,c=i?Xc:0,s=n>>t-44),Qo(s&Xc,c&Xc,a&Pa)}function Xq(e){var t,n,i,s,c,a;for(this.c=new pe,this.d=e,i=Oi,s=Oi,t=Li,n=Li,a=Cn(e,0);a.b!=a.d.c;)c=u(xn(a),8),i=p.Math.min(i,c.a),s=p.Math.min(s,c.b),t=p.Math.max(t,c.a),n=p.Math.max(n,c.b);this.a=new Ll(i,s,t-i,n-s)}function YUe(e,t){var n,i,s,c,a,g;for(c=new R(e.b);c.a0&&W(t,42)&&(e.a.qj(),m=u(t,42),w=m.cd(),c=w==null?0:ci(w),a=Zte(e.a,c),n=e.a.d[a],n)){for(i=u(n.g,367),y=n.i,g=0;g=2)for(n=s.Kc(),t=Oe(n.Pb());n.Ob();)c=t,t=Oe(n.Pb()),i=p.Math.min(i,(vt(t),t-(vt(c),c)));return i}function WFt(e,t){var n,i,s,c,a;i=new ai,ji(i,t,i.c.b,i.c);do for(n=(Rt(i.b!=0),u(Hl(i,i.a.a),86)),e.b[n.g]=1,c=Cn(n.d,0);c.b!=c.d.c;)s=u(xn(c),188),a=s.c,e.b[a.g]==1?Tn(e.a,s):e.b[a.g]==2?e.b[a.g]=1:ji(i,a,i.c.b,i.c);while(i.b!=0)}function KFt(e,t){var n,i,s;if(ie(t)===ie(tn(e)))return!0;if(!W(t,15)||(i=u(t,15),s=e.gc(),s!=i.gc()))return!1;if(W(i,54)){for(n=0;n0&&(s=n),a=new R(e.f.e);a.a0?(t-=1,n-=1):i>=0&&s<0?(t+=1,n+=1):i>0&&s>=0?(t-=1,n+=1):(t+=1,n-=1),new mr(me(t),me(n))}function f_t(e,t){return e.ct.c?1:e.bt.b?1:e.a!=t.a?ci(e.a)-ci(t.a):e.d==(B5(),I6)&&t.d==N6?-1:e.d==N6&&t.d==I6?1:0}function rGe(e,t){var n,i,s,c,a;return c=t.a,c.c.i==t.b?a=c.d:a=c.c,c.c.i==t.b?i=c.c:i=c.d,s=BDt(e.a,a,i),s>0&&s0):s<0&&-s0):!1}function h_t(e,t,n,i){var s,c,a,g,w,m,y,k;for(s=(t-e.d)/e.c.c.length,c=0,e.a+=n,e.d=t,k=new R(e.c);k.a>24;return a}function d_t(e){if(e.pe()){var t=e.c;t.qe()?e.o="["+t.n:t.pe()?e.o="["+t.ne():e.o="[L"+t.ne()+";",e.b=t.me()+"[]",e.k=t.oe()+"[]";return}var n=e.j,i=e.d;i=i.split("/"),e.o=ZH(".",[n,ZH("$",i)]),e.b=ZH(".",[n,ZH(".",i)]),e.k=i[i.length-1]}function g_t(e,t){var n,i,s,c,a;for(a=null,c=new R(e.e.a);c.a=0;t-=2)for(n=0;n<=t;n+=2)(e.b[n]>e.b[n+2]||e.b[n]===e.b[n+2]&&e.b[n+1]>e.b[n+3])&&(i=e.b[n+2],e.b[n+2]=e.b[n],e.b[n]=i,i=e.b[n+3],e.b[n+3]=e.b[n+1],e.b[n+1]=i);e.c=!0}}function sGe(e,t){var n,i,s,c,a,g,w,m;for(a=t==1?eV:JK,c=a.a.ec().Kc();c.Ob();)for(s=u(c.Pb(),103),w=u(Wn(e.f.c,s),21).Kc();w.Ob();)switch(g=u(w.Pb(),46),i=u(g.b,81),m=u(g.a,189),n=m.c,s.g){case 2:case 1:i.g.d+=n;break;case 4:case 3:i.g.c+=n}}function w_t(e,t){var n,i,s,c,a,g,w,m,y;for(m=-1,y=0,a=e,g=0,w=a.length;g0&&++y;++m}return y}function _u(e){var t,n;return n=new dl(Hd(e.gm)),n.a+="@",wn(n,(t=ci(e)>>>0,t.toString(16))),e.kh()?(n.a+=" (eProxyURI: ",so(n,e.qh()),e.$g()&&(n.a+=" eClass: ",so(n,e.$g())),n.a+=")"):e.$g()&&(n.a+=" (eClass: ",so(n,e.$g()),n.a+=")"),n.a}function bS(e){var t,n,i,s;if(e.e)throw F(new Ps((aa($K),vz+$K.k+yz)));for(e.d==(ts(),na)&&zj(e,bu),n=new R(e.a.a);n.a>24}return n}function y_t(e,t,n){var i,s,c;if(s=u(fs(e.i,t),306),!s)if(s=new oQe(e.d,t,n),yv(e.i,t,s),Moe(t))R5t(e.a,t.c,t.b,s);else switch(c=cBt(t),i=u(fs(e.p,c),244),c.g){case 1:case 3:s.j=!0,rB(i,t.b,s);break;case 4:case 2:s.k=!0,rB(i,t.c,s)}return s}function O_t(e,t,n,i){var s,c,a,g,w,m;if(g=new bE,w=Ko(e.e.Tg(),t),s=u(e.g,119),Vr(),u(t,66).Oj())for(a=0;a=0)return s;for(c=1,g=new R(t.j);g.a0&&t.ue((pt(s-1,e.c.length),u(e.c[s-1],10)),c)>0;)Fl(e,s,(pt(s-1,e.c.length),u(e.c[s-1],10))),--s;pt(s,e.c.length),e.c[s]=c}n.a=new Jt,n.b=new Jt}function k_t(e,t,n){var i,s,c,a,g,w,m,y;for(y=(i=u(t.e&&t.e(),9),new Rl(i,u($u(i,i.length),9),0)),w=Hb(n,"[\\[\\]\\s,]+"),c=w,a=0,g=c.length;a0&&(!(Kd(e.a.c)&&t.n.d)&&!(C3(e.a.c)&&t.n.b)&&(t.g.d-=p.Math.max(0,i/2-.5)),!(Kd(e.a.c)&&t.n.a)&&!(C3(e.a.c)&&t.n.c)&&(t.g.a+=p.Math.max(0,i-1)))}function fGe(e,t,n){var i,s;if((e.c-e.b&e.a.length-1)==2)t==(ye(),yt)||t==At?(uP(u(U5(e),15),(Ol(),ia)),uP(u(U5(e),15),P1)):(uP(u(U5(e),15),(Ol(),P1)),uP(u(U5(e),15),ia));else for(s=new j5(e);s.a!=s.b;)i=u(LP(s),15),uP(i,n)}function x_t(e,t){var n,i,s,c,a,g,w;for(s=P3(new vJ(e)),g=new vr(s,s.c.length),c=P3(new vJ(t)),w=new vr(c,c.c.length),a=null;g.b>0&&w.b>0&&(n=(Rt(g.b>0),u(g.a.Xb(g.c=--g.b),33)),i=(Rt(w.b>0),u(w.a.Xb(w.c=--w.b),33)),n==i);)a=n;return a}function Kc(e,t){var n,i,s,c,a,g;return c=e.a*pz+e.b*1502,g=e.b*pz+11,n=p.Math.floor(g*M7),c+=n,g-=n*_ue,c%=_ue,e.a=c,e.b=g,t<=24?p.Math.floor(e.a*Tde[t]):(s=e.a*(1<=2147483648&&(i-=hz),i)}function hGe(e,t,n){var i,s,c,a;IFe(e,t)>IFe(e,n)?(i=Qs(n,(ye(),At)),e.d=i.dc()?0:AF(u(i.Xb(0),11)),a=Qs(t,xt),e.b=a.dc()?0:AF(u(a.Xb(0),11))):(s=Qs(n,(ye(),xt)),e.d=s.dc()?0:AF(u(s.Xb(0),11)),c=Qs(t,At),e.b=c.dc()?0:AF(u(c.Xb(0),11)))}function aGe(e){var t,n,i,s,c,a,g;if(e&&(t=e.Hh(au),t&&(a=un(hf((!t.b&&(t.b=new tl((tt(),Kr),to,t)),t.b),"conversionDelegates")),a!=null))){for(g=new pe,i=Hb(a,"\\w+"),s=0,c=i.length;se.c));a++)s.a>=e.s&&(c<0&&(c=a),g=a);return w=(e.s+e.c)/2,c>=0&&(i=cQt(e,t,c,g),w=b4t((pt(i,t.c.length),u(t.c[i],329))),wFt(t,i,n)),w}function Yq(){Yq=X,zht=new Xr((Dn(),Ty),1.3),_be=_we,Vbe=new x0(15),Yht=new Xr(Jg,Vbe),Jht=new Xr(e0,15),Wht=tI,Xht=Zg,Uht=k2,Ght=M1,Vht=O2,zbe=QC,Zht=yw,Kbe=(ple(),Hht),Qbe=Fht,Wbe=_ht,Xbe=qht,Hbe=Bht,qbe=nI,Kht=qwe,DC=Lht,Fbe=Rht,Ube=Qht}function sn(e,t,n){var i,s,c,a,g,w,m;for(a=(c=new RZ,c),nse(a,(vt(t),t)),m=(!a.b&&(a.b=new tl((tt(),Kr),to,a)),a.b),w=1;w0&&eKt(this,s)}function kle(e,t,n,i,s,c){var a,g,w;if(!s[t.b]){for(s[t.b]=!0,a=i,!a&&(a=new zM),ge(a.e,t),w=c[t.b].Kc();w.Ob();)g=u(w.Pb(),282),!(g.d==n||g.c==n)&&(g.c!=t&&kle(e,g.c,t,a,s,c),g.d!=t&&kle(e,g.d,t,a,s,c),ge(a.c,g),_i(a.d,g.b));return a}return null}function E_t(e){var t,n,i,s,c,a,g;for(t=0,s=new R(e.e);s.a=2}function A_t(e,t){var n,i,s,c;for(Vt(t,"Self-Loop pre-processing",1),i=new R(e.a);i.a1||(t=ii(Vu,H(_(ss,1),de,93,0,[Ra,Xu])),k9(MM(t,e))>1)||(i=ii(Gu,H(_(ss,1),de,93,0,[ra,mu])),k9(MM(i,e))>1))}function j_t(e,t){var n,i,s;return n=t.Hh(e.a),n&&(s=un(hf((!n.b&&(n.b=new tl((tt(),Kr),to,n)),n.b),"affiliation")),s!=null)?(i=jA(s,lc(35)),i==-1?BH(e,S5(e,ml(t.Hj())),s):i==0?BH(e,null,s.substr(1)):BH(e,s.substr(0,i),s.substr(i+1))):null}function D_t(e){var t,n,i;try{return e==null?uc:Ns(e)}catch(s){if(s=fi(s),W(s,102))return t=s,i=Hd(zc(e))+"@"+(n=(Rh(),Ioe(e)>>>0),n.toString(16)),y$t(vPt(),(k3(),"Exception during lenientFormat for "+i),t),"<"+i+" threw "+Hd(t.gm)+">";throw F(s)}}function pGe(e){switch(e.g){case 0:return new kCe;case 1:return new wCe;case 2:return new wDe;case 3:return new v6e;case 4:return new BIe;case 5:return new SCe;default:throw F(new Ot("No implementation is available for the layerer "+(e.f!=null?e.f:""+e.g)))}}function Sle(e,t,n){var i,s,c;for(c=new R(e.t);c.a0&&(i.b.n-=i.c,i.b.n<=0&&i.b.u>0&&Tn(t,i.b));for(s=new R(e.i);s.a0&&(i.a.u-=i.c,i.a.u<=0&&i.a.n>0&&Tn(n,i.a))}function xj(e){var t,n,i,s,c;if(e.g==null&&(e.d=e.si(e.f),rn(e,e.d),e.c))return c=e.f,c;if(t=u(e.g[e.i-1],47),s=t.Pb(),e.e=t,n=e.si(s),n.Ob())e.d=n,rn(e,n);else for(e.d=null;!t.Ob()&&(pi(e.g,--e.i,null),e.i!=0);)i=u(e.g[e.i-1],47),t=i;return s}function $_t(e,t){var n,i,s,c,a,g;if(i=t,s=i.ak(),Aa(e.e,s)){if(s.hi()&&_M(e,s,i.dd()))return!1}else for(g=Ko(e.e.Tg(),s),n=u(e.g,119),c=0;c1||n>1)return 2;return t+n==1?2:0}function wGe(e,t,n){var i,s,c,a,g;for(Vt(n,"ELK Force",1),je(Pe($e(t,(gf(),p1e))))||EM((i=new e8((ib(),new eb(t))),i)),g=Vze(t),rIt(g),LPt(e,u(N(g,g1e),424)),a=oZe(e.a,g),c=a.Kc();c.Ob();)s=u(c.Pb(),231),vQt(e.b,s,xo(n,1/a.gc()));g=vJe(a),bJe(g),Ht(n)}function __t(e,t){var n,i,s,c,a;if(Vt(t,"Breaking Point Processor",1),oVt(e),je(Pe(N(e,(xe(),kpe))))){for(s=new R(e.b);s.a=0?e._g(i,!0,!0):rp(e,c,!0),153)),u(s,215).ml(t,n)}else throw F(new Ot(m1+t.ne()+XS))}function z_t(e,t){var n,i,s,c,a;for(n=new pe,s=Hs(new ht(null,new gt(e,16)),new axe),c=Hs(new ht(null,new gt(e,16)),new dxe),a=wAt(DEt(wM(SHt(H(_(JXt,1),Ee,833,0,[s,c])),new gxe))),i=1;i=2*t&&ge(n,new SF(a[i-1]+t,a[i]-t));return n}function W_t(e,t,n){Vt(n,"Eades radial",1),n.n&&t&&Iu(n,Ru(t),(ol(),jl)),e.d=u($e(t,(w5(),H6)),33),e.c=oe(Oe($e(t,(Db(),WN)))),e.e=cq(u($e(t,jC),293)),e.a=xDt(u($e(t,Tbe),426)),e.b=KIt(u($e(t,Cbe),340)),TIt(e),n.n&&t&&Iu(n,Ru(t),(ol(),jl))}function K_t(e,t,n){var i,s,c,a,g,w,m,y;if(n)for(c=n.a.length,i=new cg(c),g=(i.b-i.a)*i.c<0?(zd(),_1):new Xd(i);g.Ob();)a=u(g.Pb(),19),s=Q3(n,a.a),s&&(w=zTt(e,(m=(m0(),y=new _J,y),t&&Tle(m,t),m),s),Q5(w,ba(s,Sh)),wj(s,w),Gce(s,w),OH(e,s,w))}function Tj(e){var t,n,i,s,c,a;if(!e.j){if(a=new Y8e,t=cx,c=t.a.zc(e,t),c==null){for(i=new Ft(Ss(e));i.e!=i.i.gc();)n=u(Qt(i),26),s=Tj(n),vi(a,s),rn(a,n);t.a.Bc(e)!=null}Eb(a),e.j=new rm((u(V(re((Yd(),bt).o),11),18),a.i),a.g),qc(e).b&=-33}return e.j}function V_t(e){var t,n,i,s;if(e==null)return null;if(i=To(e,!0),s=G7.length,et(i.substr(i.length-s,s),G7)){if(n=i.length,n==4){if(t=(fn(0,i.length),i.charCodeAt(0)),t==43)return y2e;if(t==45)return C1t}else if(n==3)return y2e}return new MJ(i)}function X_t(e){var t,n,i;return n=e.l,(n&n-1)!=0||(i=e.m,(i&i-1)!=0)||(t=e.h,(t&t-1)!=0)||t==0&&i==0&&n==0?-1:t==0&&i==0&&n!=0?Ure(n):t==0&&i!=0&&n==0?Ure(i)+22:t!=0&&i==0&&n==0?Ure(t)+44:-1}function U_t(e,t){var n,i,s,c,a;for(Vt(t,"Edge joining",1),n=je(Pe(N(e,(xe(),sX)))),s=new R(e.b);s.a1)for(s=new R(e.a);s.a0),c.a.Xb(c.c=--c.b),fb(c,s),Rt(c.b3&&zh(e,0,t-3))}function J_t(e){var t,n,i,s;return ie(N(e,(xe(),hw)))===ie((Sa(),xd))?!e.e&&ie(N(e,yC))!==ie((fO(),dC)):(i=u(N(e,VV),292),s=je(Pe(N(e,XV)))||ie(N(e,x6))===ie((Iv(),aC)),t=u(N(e,F0e),19).a,n=e.a.c.length,!s&&i!=(fO(),dC)&&(t==0||t>n))}function eHt(e){var t,n;for(n=0;n0);n++);if(n>0&&n0);t++);return t>0&&n>16!=6&&t){if(EO(e,t))throw F(new Ot(US+LUe(e)));i=null,e.Cb&&(i=(n=e.Db>>16,n>=0?Zoe(e,i):e.Cb.ih(e,-1-n,null,i))),t&&(i=Hv(t,e,6,i)),i=Gte(e,t,i),i&&i.Fi()}else(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,6,t,t))}function Tle(e,t){var n,i;if(t!=e.Cb||e.Db>>16!=9&&t){if(EO(e,t))throw F(new Ot(US+vYe(e)));i=null,e.Cb&&(i=(n=e.Db>>16,n>=0?ece(e,i):e.Cb.ih(e,-1-n,null,i))),t&&(i=Hv(t,e,9,i)),i=Yte(e,t,i),i&&i.Fi()}else(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,9,t,t))}function Jq(e,t){var n,i;if(t!=e.Cb||e.Db>>16!=3&&t){if(EO(e,t))throw F(new Ot(US+mZe(e)));i=null,e.Cb&&(i=(n=e.Db>>16,n>=0?nce(e,i):e.Cb.ih(e,-1-n,null,i))),t&&(i=Hv(t,e,12,i)),i=Ute(e,t,i),i&&i.Fi()}else(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,3,t,t))}function RO(e){var t,n,i,s,c;if(i=ou(e),c=e.j,c==null&&i)return e.$j()?null:i.zj();if(W(i,148)){if(n=i.Aj(),n&&(s=n.Nh(),s!=e.i)){if(t=u(i,148),t.Ej())try{e.g=s.Kh(t,c)}catch(a){if(a=fi(a),W(a,78))e.g=null;else throw F(a)}e.i=s}return e.g}return null}function yGe(e){var t;return t=new pe,ge(t,new fv(new De(e.c,e.d),new De(e.c+e.b,e.d))),ge(t,new fv(new De(e.c,e.d),new De(e.c,e.d+e.a))),ge(t,new fv(new De(e.c+e.b,e.d+e.a),new De(e.c+e.b,e.d))),ge(t,new fv(new De(e.c+e.b,e.d+e.a),new De(e.c,e.d+e.a))),t}function OGe(e,t,n,i){var s,c,a;if(a=fce(t,n),i.c[i.c.length]=t,e.j[a.p]==-1||e.j[a.p]==2||e.a[t.p])return i;for(e.j[a.p]=-1,c=new _t(qt(xa(a).a.Kc(),new L));an(c);)if(s=u(nn(c),17),!(!(!_r(s)&&!(!_r(s)&&s.c.i.c==s.d.i.c))||s==t))return OGe(e,s,a,i);return i}function tHt(e,t,n){var i,s,c;for(c=t.a.ec().Kc();c.Ob();)s=u(c.Pb(),79),i=u(Bt(e.b,s),266),!i&&(bi(Kh(s))==bi(l1(s))?bqt(e,s,n):Kh(s)==bi(l1(s))?Bt(e.c,s)==null&&Bt(e.b,l1(s))!=null&&eJe(e,s,n,!1):Bt(e.d,s)==null&&Bt(e.b,Kh(s))!=null&&eJe(e,s,n,!0))}function nHt(e,t){var n,i,s,c,a,g,w;for(s=e.Kc();s.Ob();)for(i=u(s.Pb(),10),g=new mo,_s(g,i),Xi(g,(ye(),At)),ue(g,(ae(),uN),(kt(),!0)),a=t.Kc();a.Ob();)c=u(a.Pb(),10),w=new mo,_s(w,c),Xi(w,xt),ue(w,uN,!0),n=new I0,ue(n,uN,!0),Dr(n,g),gr(n,w)}function iHt(e,t,n,i){var s,c,a,g;s=bKe(e,t,n),c=bKe(e,n,t),a=u(Bt(e.c,t),112),g=u(Bt(e.c,n),112),si.b.g&&(c.c[c.c.length]=i);return c}function LO(){LO=X,m2=new y8("CANDIDATE_POSITION_LAST_PLACED_RIGHT",0),xy=new y8("CANDIDATE_POSITION_LAST_PLACED_BELOW",1),Q6=new y8("CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT",2),q6=new y8("CANDIDATE_POSITION_WHOLE_DRAWING_BELOW",3),z6=new y8("WHOLE_DRAWING",4)}function rHt(e,t){if(W(t,239))return Njt(e,u(t,33));if(W(t,186))return Vjt(e,u(t,118));if(W(t,354))return o7t(e,u(t,137));if(W(t,352))return Pzt(e,u(t,79));if(t)return null;throw F(new Ot(xae+u1(new Jc(H(_(It,1),Ee,1,5,[t])))))}function sHt(e){var t,n,i,s,c,a,g;for(c=new ai,s=new R(e.d.a);s.a1)for(t=T0((n=new ng,++e.b,n),e.d),g=Cn(c,0);g.b!=g.d.c;)a=u(xn(g),121),Hu(ju(Pu(Du(Mu(new tu,1),0),t),a))}function Ele(e,t){var n,i;if(t!=e.Cb||e.Db>>16!=11&&t){if(EO(e,t))throw F(new Ot(US+Wle(e)));i=null,e.Cb&&(i=(n=e.Db>>16,n>=0?ice(e,i):e.Cb.ih(e,-1-n,null,i))),t&&(i=Hv(t,e,10,i)),i=sne(e,t,i),i&&i.Fi()}else(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,11,t,t))}function oHt(e){var t,n,i,s;for(i=new kg(new eg(e.b).a);i.b;)n=Q0(i),s=u(n.cd(),11),t=u(n.dd(),10),ue(t,(ae(),zn),s),ue(s,$c,t),ue(s,bC,(kt(),!0)),Xi(s,u(N(t,eo),61)),N(t,eo),ue(s.i,(xe(),Si),(br(),Kk)),u(N(Rr(s.i),Po),21).Fc((ns(),Mk))}function cHt(e,t,n){var i,s,c,a,g,w;if(c=0,a=0,e.c)for(w=new R(e.d.i.j);w.ac.a?-1:s.aw){for(y=e.d,e.d=J(Wme,$ae,63,2*w+4,0,1),c=0;c=9223372036854776e3?(Y3(),ede):(s=!1,e<0&&(s=!0,e=-e),i=0,e>=Dg&&(i=Di(e/Dg),e-=i*Dg),n=0,e>=Zv&&(n=Di(e/Zv),e-=n*Zv),t=Di(e),c=Qo(t,n,i),s&&yH(c),c)}function wHt(e,t){var n,i,s,c;for(n=!t||!e.u.Hc((Dc(),La)),c=0,s=new R(e.e.Cf());s.a=-t&&i==t?new mr(me(n-1),me(i)):new mr(me(n),me(i-1))}function TGe(){return Gr(),H(_(cUt,1),de,77,0,[X1e,W1e,a6,oV,dge,D$,q$,yk,hge,nge,uge,vk,age,J1e,gge,F1e,R$,cV,P$,F$,bge,B$,_1e,fge,wge,_$,pge,j$,G1e,cge,oge,Q$,Q1e,M$,N$,q1e,mk,rge,ege,lge,d6,K1e,z1e,sge,tge,I$,H$,H1e,L$,ige,$$,Y1e,U1e,fC,A$,Z1e,V1e])}function OHt(e,t,n){e.d=0,e.b=0,t.k==(jt(),Mo)&&n.k==Mo&&u(N(t,(ae(),zn)),10)==u(N(n,zn),10)&&(V_(t).j==(ye(),yt)?hGe(e,t,n):hGe(e,n,t)),t.k==Mo&&n.k==sr?V_(t).j==(ye(),yt)?e.d=1:e.b=1:n.k==Mo&&t.k==sr&&(V_(n).j==(ye(),yt)?e.b=1:e.d=1),lNt(e,t,n)}function kHt(e){var t,n,i,s,c,a,g,w,m,y,k;return k=Tce(e),t=e.a,w=t!=null,w&&D3(k,"category",e.a),s=o8(new o3(e.d)),a=!s,a&&(m=new Z1,uf(k,"knownOptions",m),n=new gMe(m),Sr(new o3(e.d),n)),c=o8(e.g),g=!c,g&&(y=new Z1,uf(k,"supportedFeatures",y),i=new pMe(y),Sr(e.g,i)),k}function SHt(e){var t,n,i,s,c,a,g,w,m;for(i=!1,t=336,n=0,c=new AIe(e.length),g=e,w=0,m=g.length;w>16!=7&&t){if(EO(e,t))throw F(new Ot(US+$Xe(e)));i=null,e.Cb&&(i=(n=e.Db>>16,n>=0?Joe(e,i):e.Cb.ih(e,-1-n,null,i))),t&&(i=u(t,49).gh(e,1,JC,i)),i=Yne(e,t,i),i&&i.Fi()}else(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,7,t,t))}function EGe(e,t){var n,i;if(t!=e.Cb||e.Db>>16!=3&&t){if(EO(e,t))throw F(new Ot(US+qWe(e)));i=null,e.Cb&&(i=(n=e.Db>>16,n>=0?tce(e,i):e.Cb.ih(e,-1-n,null,i))),t&&(i=u(t,49).gh(e,0,tT,i)),i=Zne(e,t,i),i&&i.Fi()}else(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,3,t,t))}function tQ(e,t){$O();var n,i,s,c,a,g,w,m,y;return t.d>e.d&&(g=e,e=t,t=g),t.d<63?dqt(e,t):(a=(e.d&-2)<<4,m=hre(e,a),y=hre(t,a),i=wQ(e,Pv(m,a)),s=wQ(t,Pv(y,a)),w=tQ(m,y),n=tQ(i,s),c=tQ(wQ(m,i),wQ(s,y)),c=CQ(CQ(c,w),n),c=Pv(c,a),w=Pv(w,a<<1),CQ(CQ(w,c),n))}function CHt(e,t,n){var i,s,c,a,g;for(a=Z5(e,n),g=J(ta,dd,10,t.length,0,1),i=0,c=a.Kc();c.Ob();)s=u(c.Pb(),11),je(Pe(N(s,(ae(),bC))))&&(g[i++]=u(N(s,$c),10));if(i=0;c+=n?1:-1)a=a|t.c.Sf(w,c,n,i&&!je(Pe(N(t.j,(ae(),xp))))&&!je(Pe(N(t.j,(ae(),f2))))),a=a|t.q._f(w,c,n),a=a|aYe(e,w[c],n,i);return Ki(e.c,t),a}function Aj(e,t,n){var i,s,c,a,g,w,m,y,k,E;for(y=h_e(e.j),k=0,E=y.length;k1&&(e.a=!0),H8t(u(n.b,65),Vn(Us(u(t.b,65).c),oh(ur(Us(u(n.b,65).a),u(t.b,65).a),s))),CFe(e,t),AGe(e,n)}function MGe(e){var t,n,i,s,c,a,g;for(c=new R(e.a.a);c.a0&&c>0?a.p=t++:i>0?a.p=n++:c>0?a.p=s++:a.p=n++}rt(),ir(e.j,new f5e)}function PHt(e){var t,n;n=null,t=u(Me(e.g,0),17);do{if(n=t.d.i,er(n,(ae(),pu)))return u(N(n,pu),11).i;if(n.k!=(jt(),zi)&&an(new _t(qt(qi(n).a.Kc(),new L))))t=u(nn(new _t(qt(qi(n).a.Kc(),new L))),17);else if(n.k!=zi)return null}while(n&&n.k!=(jt(),zi));return n}function jHt(e,t){var n,i,s,c,a,g,w,m,y;for(g=t.j,a=t.g,w=u(Me(g,g.c.length-1),113),y=(pt(0,g.c.length),u(g.c[0],113)),m=yq(e,a,w,y),c=1;cm&&(w=n,y=s,m=i);t.a=y,t.c=w}function DHt(e,t){var n,i;if(i=Q8(e.b,t.b),!i)throw F(new Ps("Invalid hitboxes for scanline constraint calculation."));(Rze(t.b,u(DSt(e.b,t.b),57))||Rze(t.b,u(jSt(e.b,t.b),57)))&&(Rh(),t.b+""),e.a[t.b.f]=u(wF(e.b,t.b),57),n=u(bF(e.b,t.b),57),n&&(e.a[n.f]=t.b)}function Hu(e){if(!e.a.d||!e.a.e)throw F(new Ps((aa(Krt),Krt.k+" must have a source and target "+(aa(t1e),t1e.k)+" specified.")));if(e.a.d==e.a.e)throw F(new Ps("Network simplex does not support self-loops: "+e.a+" "+e.a.d+" "+e.a.e));return $A(e.a.d.g,e.a),$A(e.a.e.b,e.a),e.a}function $Ht(e,t,n){var i,s,c,a,g,w,m;for(m=new qd(new dAe(e)),a=H(_($ot,1),Wet,11,0,[t,n]),g=0,w=a.length;gw-e.b&&gw-e.a&&g0&&++M;++E}return M}function QHt(e,t){var n,i,s,c,a;for(a=u(N(t,(sp(),lbe)),425),c=Cn(t.b,0);c.b!=c.d.c;)if(s=u(xn(c),86),e.b[s.g]==0){switch(a.g){case 0:iVe(e,s);break;case 1:WFt(e,s)}e.b[s.g]=2}for(i=Cn(e.a,0);i.b!=i.d.c;)n=u(xn(i),188),Mb(n.b.d,n,!0),Mb(n.c.b,n,!0);ue(t,(oo(),tbe),e.a)}function Ko(e,t){Vr();var n,i,s,c;return t?t==(Un(),S1t)||(t==h1t||t==i0||t==f1t)&&e!=m2e?new Sue(e,t):(i=u(t,677),n=i.pk(),n||(F3(ms((Oc(),Cr),t)),n=i.pk()),c=(!n.i&&(n.i=new Jt),n.i),s=u(Xs(xs(c.f,e)),1942),!s&&Qn(c,e,s=new Sue(e,t)),s):c1t}function zHt(e,t){var n,i,s,c,a,g,w,m,y;for(w=u(N(e,(ae(),zn)),11),m=qs(H(_(tr,1),fe,8,0,[w.i.n,w.n,w.a])).a,y=e.i.n.b,n=hh(e.e),s=n,c=0,a=s.length;c0?c.a?(g=c.b.rf().a,n>g&&(s=(n-g)/2,c.d.b=s,c.d.c=s)):c.d.c=e.s+n:C5(e.u)&&(i=Ece(c.b),i.c<0&&(c.d.b=-i.c),i.c+i.b>c.b.rf().a&&(c.d.c=i.c+i.b-c.b.rf().a))}function XHt(e,t){var n,i,s,c;for(Vt(t,"Semi-Interactive Crossing Minimization Processor",1),n=!1,s=new R(e.b);s.a=0){if(t==n)return new mr(me(-t-1),me(-t-1));if(t==-n)return new mr(me(-t),me(n+1))}return p.Math.abs(t)>p.Math.abs(n)?t<0?new mr(me(-t),me(n)):new mr(me(-t),me(n+1)):new mr(me(t+1),me(n))}function YHt(e){var t,n;n=u(N(e,(xe(),Xo)),163),t=u(N(e,(ae(),zg)),303),n==(zl(),x1)?(ue(e,Xo,vC),ue(e,zg,(ya(),l2))):n==lw?(ue(e,Xo,vC),ue(e,zg,(ya(),gy))):t==(ya(),l2)?(ue(e,Xo,x1),ue(e,zg,gC)):t==gy&&(ue(e,Xo,lw),ue(e,zg,gC))}function Mj(){Mj=X,AC=new Y6e,Dft=Fn(new Ji,(qr(),Vo),(Gr(),P$)),Ift=Mc(Fn(new Ji,Vo,B$),Es,L$),Rft=ep(ep(YE(Mc(Fn(new Ji,Th,q$),Es,H$),Ao),_$),Q$),$ft=Mc(Fn(Fn(Fn(new Ji,k1,D$),Ao,N$),Ao,mk),Es,$$),Nft=Mc(Fn(Fn(new Ji,Ao,mk),Ao,M$),Es,A$)}function wS(){wS=X,Fft=Fn(Mc(new Ji,(qr(),Es),(Gr(),Y1e)),Vo,P$),Qft=ep(ep(YE(Mc(Fn(new Ji,Th,q$),Es,H$),Ao),_$),Q$),_ft=Mc(Fn(Fn(Fn(new Ji,k1,D$),Ao,N$),Ao,mk),Es,$$),qft=Fn(Fn(new Ji,Vo,B$),Es,L$),Hft=Mc(Fn(Fn(new Ji,Ao,mk),Ao,M$),Es,A$)}function ZHt(e,t,n,i,s){var c,a;(!_r(t)&&t.c.i.c==t.d.i.c||!zQe(qs(H(_(tr,1),fe,8,0,[s.i.n,s.n,s.a])),n))&&!_r(t)&&(t.c==s?A3(t.a,0,new ps(n)):Tn(t.a,new ps(n)),i&&!fa(e.a,n)&&(a=u(N(t,(xe(),Os)),74),a||(a=new pc,ue(t,Os,a)),c=new ps(n),ji(a,c,a.c.b,a.c),Ki(e.a,c)))}function JHt(e){var t,n;for(n=new _t(qt($s(e).a.Kc(),new L));an(n);)if(t=u(nn(n),17),t.c.i.k!=(jt(),ll))throw F(new Yw(Hz+K9(e)+"' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen."))}function eqt(e,t,n){var i,s,c,a,g,w,m;if(s=XWe(e.Db&254),s==0)e.Eb=n;else{if(s==1)g=J(It,Ee,1,2,5,1),c=vq(e,t),c==0?(g[0]=n,g[1]=e.Eb):(g[0]=e.Eb,g[1]=n);else for(g=J(It,Ee,1,s+1,5,1),a=bg(e.Eb),i=2,w=0,m=0;i<=128;i<<=1)i==t?g[m++]=n:(e.Db&i)!=0&&(g[m++]=a[w++]);e.Eb=g}e.Db|=t}function jGe(e,t,n){var i,s,c,a;for(this.b=new pe,s=0,i=0,a=new R(e);a.a0&&(c=u(Me(this.b,0),167),s+=c.o,i+=c.p),s*=2,i*=2,t>1?s=Di(p.Math.ceil(s*t)):i=Di(p.Math.ceil(i/t)),this.a=new yoe(s,i)}function DGe(e,t,n,i,s,c){var a,g,w,m,y,k,E,M,P,D,B,q;for(y=i,t.j&&t.o?(M=u(Bt(e.f,t.A),57),D=M.d.c+M.d.b,--y):D=t.a.c+t.a.b,k=s,n.q&&n.o?(M=u(Bt(e.f,n.C),57),m=M.d.c,++k):m=n.a.c,B=m-D,w=p.Math.max(2,k-y),g=B/w,P=D+g,E=y;E=0;a+=s?1:-1){for(g=t[a],w=i==(ye(),At)?s?Qs(g,i):wg(Qs(g,i)):s?wg(Qs(g,i)):Qs(g,i),c&&(e.c[g.p]=w.gc()),k=w.Kc();k.Ob();)y=u(k.Pb(),11),e.d[y.p]=m++;_i(n,w)}}function $Ge(e,t,n){var i,s,c,a,g,w,m,y;for(c=oe(Oe(e.b.Kc().Pb())),m=oe(Oe(uPt(t.b))),i=oh(Us(e.a),m-n),s=oh(Us(t.a),n-c),y=Vn(i,s),oh(y,1/(m-c)),this.a=y,this.b=new pe,g=!0,a=e.b.Kc(),a.Pb();a.Ob();)w=oe(Oe(a.Pb())),g&&w-n>OW&&(this.b.Fc(n),g=!1),this.b.Fc(w);g&&this.b.Fc(n)}function tqt(e){var t,n,i,s;if(aQt(e,e.n),e.d.c.length>0){for(R4(e.c);ale(e,u(I(new R(e.e.a)),121))>5,t&=31,i>=e.d)return e.e<0?(h1(),MK):(h1(),gk);if(c=e.d-i,s=J(Zt,On,25,c+1,15,1),XLt(s,c,e.a,i,t),e.e<0){for(n=0;n0&&e.a[n]<<32-t!=0){for(n=0;n=0?!1:(n=Fm((Oc(),Cr),s,t),n?(i=n.Zj(),(i>1||i==-1)&&N0(ms(Cr,n))!=3):!0)):!1}function sqt(e,t,n,i){var s,c,a,g,w;return g=Ts(u(V((!t.b&&(t.b=new dt(Wt,t,4,7)),t.b),0),82)),w=Ts(u(V((!t.c&&(t.c=new dt(Wt,t,5,8)),t.c),0),82)),bi(g)==bi(w)||xb(w,g)?null:(a=Y8(t),a==n?i:(c=u(Bt(e.a,a),10),c&&(s=c.e,s)?s:null))}function oqt(e,t){var n;switch(n=u(N(e,(xe(),bN)),276),Vt(t,"Label side selection ("+n+")",1),n.g){case 0:YUe(e,(Ol(),ia));break;case 1:YUe(e,(Ol(),P1));break;case 2:aZe(e,(Ol(),ia));break;case 3:aZe(e,(Ol(),P1));break;case 4:VGe(e,(Ol(),ia));break;case 5:VGe(e,(Ol(),P1))}Ht(t)}function Nle(e,t,n){var i,s,c,a,g,w;if(i=Wkt(n,e.length),a=e[i],a[0].k==(jt(),Ri))for(c=YPe(n,a.length),w=t.j,s=0;s0&&(n[0]+=e.d,a-=n[0]),n[2]>0&&(n[2]+=e.d,a-=n[2]),c=p.Math.max(0,a),n[1]=p.Math.max(n[1],a),dre(e,Fo,s.c+i.b+n[0]-(n[1]-a)/2,n),t==Fo&&(e.c.b=c,e.c.c=s.c+i.b+(c-a)/2)}function zGe(){this.c=J(hr,ds,25,(ye(),H(_(Wr,1),ao,61,0,[Ks,yt,At,Xt,xt])).length,15,1),this.b=J(hr,ds,25,H(_(Wr,1),ao,61,0,[Ks,yt,At,Xt,xt]).length,15,1),this.a=J(hr,ds,25,H(_(Wr,1),ao,61,0,[Ks,yt,At,Xt,xt]).length,15,1),See(this.c,Oi),See(this.b,Li),See(this.a,Li)}function Co(e,t,n){var i,s,c,a;if(t<=n?(s=t,c=n):(s=n,c=t),i=0,e.b==null)e.b=J(Zt,On,25,2,15,1),e.b[0]=s,e.b[1]=c,e.c=!0;else{if(i=e.b.length,e.b[i-1]+1==s){e.b[i-1]=c;return}a=J(Zt,On,25,i+2,15,1),vo(e.b,0,a,0,i),e.b=a,e.b[i-1]>=s&&(e.c=!1,e.a=!1),e.b[i++]=s,e.b[i]=c,e.c||Dm(e)}}function gqt(e,t,n){var i,s,c,a,g,w,m;for(m=t.d,e.a=new No(m.c.length),e.c=new Jt,g=new R(m);g.a=0?e._g(m,!1,!0):rp(e,n,!1),58));e:for(c=k.Kc();c.Ob();){for(s=u(c.Pb(),56),y=0;y1;)Fb(s,s.i-1);return i}function vqt(e,t){var n,i,s,c,a,g,w;for(Vt(t,"Comment post-processing",1),c=new R(e.b);c.ae.d[a.p]&&(n+=cre(e.b,c),e1(e.a,me(c)));for(;!I4(e.a);)Bre(e.b,u(kv(e.a),19).a)}return n}function XGe(e,t,n){var i,s,c,a;for(c=(!t.a&&(t.a=new we(mi,t,10,11)),t.a).i,s=new Ft((!t.a&&(t.a=new we(mi,t,10,11)),t.a));s.e!=s.i.gc();)i=u(Qt(s),33),(!i.a&&(i.a=new we(mi,i,10,11)),i.a).i==0||(c+=XGe(e,i,!1));if(n)for(a=bi(t);a;)c+=(!a.a&&(a.a=new we(mi,a,10,11)),a.a).i,a=bi(a);return c}function Fb(e,t){var n,i,s,c;return e.ej()?(i=null,s=e.fj(),e.ij()&&(i=e.kj(e.pi(t),null)),n=e.Zi(4,c=Qv(e,t),null,t,s),e.bj()&&c!=null&&(i=e.dj(c,i)),i?(i.Ei(n),i.Fi()):e.$i(n),c):(c=Qv(e,t),e.bj()&&c!=null&&(i=e.dj(c,null),i&&i.Fi()),c)}function Oqt(e){var t,n,i,s,c,a,g,w,m,y;for(m=e.a,t=new Zi,w=0,i=new R(e.d);i.ag.d&&(y=g.d+g.a+m));n.c.d=y,t.a.zc(n,t),w=p.Math.max(w,n.c.d+n.c.a)}return w}function ns(){ns=X,nN=new rb("COMMENTS",0),Ul=new rb("EXTERNAL_PORTS",1),m6=new rb("HYPEREDGES",2),iN=new rb("HYPERNODES",3),Mk=new rb("NON_FREE_PORTS",4),c2=new rb("NORTH_SOUTH_PORTS",5),v6=new rb(ftt,6),Ek=new rb("CENTER_LABELS",7),Ak=new rb("END_LABELS",8),rN=new rb("PARTITIONS",9)}function _b(e){var t,n,i,s,c;for(s=new pe,t=new O5((!e.a&&(e.a=new we(mi,e,10,11)),e.a)),i=new _t(qt(Ea(e).a.Kc(),new L));an(i);)n=u(nn(i),79),W(V((!n.b&&(n.b=new dt(Wt,n,4,7)),n.b),0),186)||(c=Ts(u(V((!n.c&&(n.c=new dt(Wt,n,5,8)),n.c),0),82)),t.a._b(c)||(s.c[s.c.length]=c));return s}function kqt(e){var t,n,i,s,c,a;for(c=new Zi,t=new O5((!e.a&&(e.a=new we(mi,e,10,11)),e.a)),s=new _t(qt(Ea(e).a.Kc(),new L));an(s);)i=u(nn(s),79),W(V((!i.b&&(i.b=new dt(Wt,i,4,7)),i.b),0),186)||(a=Ts(u(V((!i.c&&(i.c=new dt(Wt,i,5,8)),i.c),0),82)),t.a._b(a)||(n=c.a.zc(a,c),n==null));return c}function Sqt(e,t,n,i,s){return i<0?(i=jm(e,s,H(_(Te,1),fe,2,6,[QQ,zQ,WQ,KQ,Gv,VQ,XQ,UQ,GQ,YQ,ZQ,JQ]),t),i<0&&(i=jm(e,s,H(_(Te,1),fe,2,6,["Jan","Feb","Mar","Apr",Gv,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function xqt(e,t,n,i,s){return i<0?(i=jm(e,s,H(_(Te,1),fe,2,6,[QQ,zQ,WQ,KQ,Gv,VQ,XQ,UQ,GQ,YQ,ZQ,JQ]),t),i<0&&(i=jm(e,s,H(_(Te,1),fe,2,6,["Jan","Feb","Mar","Apr",Gv,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),i<0?!1:(n.k=i,!0)):i>0?(n.k=i-1,!0):!1}function Cqt(e,t,n,i,s,c){var a,g,w,m;if(g=32,i<0){if(t[0]>=e.length||(g=kr(e,t[0]),g!=43&&g!=45)||(++t[0],i=Oj(e,t),i<0))return!1;g==45&&(i=-i)}return g==32&&t[0]-n==2&&s.b==2&&(w=new zE,m=w.q.getFullYear()-g1+g1-80,a=m%100,c.a=i==a,i+=(m/100|0)*100+(i=m&&(w=i);w&&(y=p.Math.max(y,w.a.o.a)),y>E&&(k=m,E=y)}return k}function Aqt(e,t,n){var i,s,c;if(e.e=n,e.d=0,e.b=0,e.f=1,e.i=t,(e.e&16)==16&&(e.i=gQt(e.i)),e.j=e.i.length,Rn(e),c=J0(e),e.d!=e.j)throw F(new ln(dn((cn(),Dnt))));if(e.g){for(i=0;i$tt?ir(w,e.b):i<=$tt&&i>Ntt?ir(w,e.d):i<=Ntt&&i>Itt?ir(w,e.c):i<=Itt&&ir(w,e.a),c=ZGe(e,w,c);return s}function h1(){h1=X;var e;for(l$=new td(1,1),PK=new td(1,10),gk=new td(0,0),MK=new td(-1,1),yde=H(_(Jm,1),fe,91,0,[gk,l$,new td(1,2),new td(1,3),new td(1,4),new td(1,5),new td(1,6),new td(1,7),new td(1,8),new td(1,9),PK]),u$=J(Jm,fe,91,32,0,1),e=0;e1,g&&(i=new De(s,n.b),Tn(t.a,i)),q5(t.a,H(_(tr,1),fe,8,0,[E,k]))}function iYe(e){O0(e,new Mg(w0(g0(b0(p0(new Y1,ID),"ELK Randomizer"),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new P8e))),ke(e,ID,ap,Pme),ke(e,ID,Xb,15),ke(e,ID,cD,me(0)),ke(e,ID,ny,ek)}function Lle(){Lle=X;var e,t,n,i,s,c;for(hx=J(Tc,Gm,25,255,15,1),EI=J(Zl,ph,25,16,15,1),t=0;t<255;t++)hx[t]=-1;for(n=57;n>=48;n--)hx[n]=n-48<<24>>24;for(i=70;i>=65;i--)hx[i]=i-65+10<<24>>24;for(s=102;s>=97;s--)hx[s]=s-97+10<<24>>24;for(c=0;c<10;c++)EI[c]=48+c&Ni;for(e=10;e<=15;e++)EI[e]=65+e-10&Ni}function jj(e,t,n){var i,s,c,a,g,w,m,y;return g=t.i-e.g/2,w=n.i-e.g/2,m=t.j-e.g/2,y=n.j-e.g/2,c=t.g+e.g/2,a=n.g+e.g/2,i=t.f+e.g/2,s=n.f+e.g/2,g>19!=0)return"-"+rYe(aO(e));for(n=e,i="";!(n.l==0&&n.m==0&&n.h==0);){if(s=R_(Zj),n=pue(n,s,!0),t=""+bje(v1),!(n.l==0&&n.m==0&&n.h==0))for(c=9-t.length;c>0;c--)t="0"+t;i=t+i}return i}function Nqt(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var e="__proto__",t=Object.create(null);if(t[e]!==void 0)return!1;var n=Object.getOwnPropertyNames(t);return!(n.length!=0||(t[e]=42,t[e]!==42)||Object.getOwnPropertyNames(t).length==0)}function Iqt(e){var t,n,i,s,c,a,g;for(t=!1,n=0,s=new R(e.d.b);s.a=e.a||!xce(t,n))return-1;if(z3(u(i.Kb(t),20)))return 1;for(s=0,a=u(i.Kb(t),20).Kc();a.Ob();)if(c=u(a.Pb(),17),w=c.c.i==t?c.d.i:c.c.i,g=Fle(e,w,n,i),g==-1||(s=p.Math.max(s,g),s>e.c-1))return-1;return s+1}function sYe(e,t){var n,i,s,c,a,g;if(ie(t)===ie(e))return!0;if(!W(t,15)||(i=u(t,15),g=e.gc(),i.gc()!=g))return!1;if(a=i.Kc(),e.ni()){for(n=0;n0){if(e.qj(),t!=null){for(c=0;c>24;case 97:case 98:case 99:case 100:case 101:case 102:return e-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return e-65+10<<24>>24;default:throw F(new rh("Invalid hexadecimal"))}}function Fqt(e,t,n){var i,s,c,a;for(Vt(n,"Processor order nodes",2),e.a=oe(Oe(N(t,(sp(),ube)))),s=new ai,a=Cn(t.b,0);a.b!=a.d.c;)c=u(xn(a),86),je(Pe(N(c,(oo(),vw))))&&ji(s,c,s.c.b,s.c);i=(Rt(s.b!=0),u(s.a.a.c,86)),CZe(e,i),!n.b&&cH(n,1),zle(e,i,0-oe(Oe(N(i,(oo(),FN))))/2,0),!n.b&&cH(n,1),Ht(n)}function Dj(){Dj=X,Jde=new tm("SPIRAL",0),Ude=new tm("LINE_BY_LINE",1),Gde=new tm("MANHATTAN",2),Xde=new tm("JITTER",3),RK=new tm("QUADRANTS_LINE_BY_LINE",4),Zde=new tm("QUADRANTS_MANHATTAN",5),Yde=new tm("QUADRANTS_JITTER",6),Vde=new tm("COMBINE_LINE_BY_LINE_MANHATTAN",7),Kde=new tm("COMBINE_JITTER_MANHATTAN",8)}function cYe(e,t,n,i){var s,c,a,g,w,m;for(w=Cq(e,n),m=Cq(t,n),s=!1;w&&m&&(i||INt(w,m,n));)a=Cq(w,n),g=Cq(m,n),h9(t),h9(e),c=w.c,MQ(w,!1),MQ(m,!1),n?($b(t,m.p,c),t.p=m.p,$b(e,w.p+1,c),e.p=w.p):($b(e,w.p,c),e.p=w.p,$b(t,m.p+1,c),t.p=m.p),ws(w,null),ws(m,null),w=a,m=g,s=!0;return s}function _qt(e,t,n,i){var s,c,a,g,w;for(s=!1,c=!1,g=new R(i.j);g.a=t.length)throw F(new gs("Greedy SwitchDecider: Free layer not in graph."));this.c=t[e],this.e=new L8(i),hH(this.e,this.c,(ye(),xt)),this.i=new L8(i),hH(this.i,this.c,At),this.f=new sLe(this.c),this.a=!c&&s.i&&!s.s&&this.c[0].k==(jt(),Ri),this.a&&iBt(this,e,t.length)}function uYe(e,t){var n,i,s,c,a,g;c=!e.B.Hc((Vc(),YC)),a=e.B.Hc(yU),e.a=new rKe(a,c,e.c),e.n&&Mie(e.a.n,e.n),rB(e.g,(ff(),Fo),e.a),t||(i=new rS(1,c,e.c),i.n.a=e.k,yv(e.p,(ye(),yt),i),s=new rS(1,c,e.c),s.n.d=e.k,yv(e.p,Xt,s),g=new rS(0,c,e.c),g.n.c=e.k,yv(e.p,xt,g),n=new rS(0,c,e.c),n.n.b=e.k,yv(e.p,At,n))}function qqt(e){var t,n,i;switch(t=u(N(e.d,(xe(),$a)),218),t.g){case 2:n=mXt(e);break;case 3:n=(i=new pe,Ti(ni(ec(Hs(Hs(new ht(null,new gt(e.d.b,16)),new TSe),new ESe),new ASe),new dSe),new QEe(i)),i);break;default:throw F(new Ps("Compaction not supported for "+t+" edges."))}_Wt(e,n),Sr(new o3(e.g),new HEe(e))}function Qqt(e,t){var n;return n=new Vx,t&&Cs(n,u(Bt(e.a,JC),94)),W(t,470)&&Cs(n,u(Bt(e.a,eT),94)),W(t,354)?(Cs(n,u(Bt(e.a,Rs),94)),n):(W(t,82)&&Cs(n,u(Bt(e.a,Wt),94)),W(t,239)?(Cs(n,u(Bt(e.a,mi),94)),n):W(t,186)?(Cs(n,u(Bt(e.a,Yc),94)),n):(W(t,352)&&Cs(n,u(Bt(e.a,nr),94)),n))}function gf(){gf=X,wk=new Xr((Dn(),sI),me(1)),S$=new Xr(e0,80),not=new Xr(cme,5),Vst=new Xr(Ty,ek),eot=new Xr(pU,me(1)),tot=new Xr(bU,(kt(),!0)),b1e=new x0(50),Zst=new Xr(Jg,b1e),d1e=nI,w1e=V6,Xst=new Xr(oU,!1),p1e=QC,Yst=M1,Gst=Zg,Ust=O2,Jst=yw,g1e=(Lce(),_st),XK=zst,k$=Fst,VK=Hst,m1e=Qst}function zqt(e){var t,n,i,s,c,a,g,w;for(w=new hHe,g=new R(e.a);g.a0&&t=0)return!1;if(t.p=n.b,ge(n.e,t),s==(jt(),sr)||s==Mo){for(a=new R(t.j);a.a1||a==-1)&&(c|=16),(s.Bb&co)!=0&&(c|=64)),(n.Bb&zr)!=0&&(c|=ew),c|=qu):W(t,457)?c|=512:(i=t.Bj(),i&&(i.i&1)!=0&&(c|=256)),(e.Bb&512)!=0&&(c|=128),c}function mS(e,t){var n,i,s,c,a;for(e=e==null?uc:(vt(e),e),s=0;se.d[g.p]&&(n+=cre(e.b,c),e1(e.a,me(c)))):++a;for(n+=e.b.d*a;!I4(e.a);)Bre(e.b,u(kv(e.a),19).a)}return n}function Jqt(e,t){var n;return e.f==DU?(n=N0(ms((Oc(),Cr),t)),e.e?n==4&&t!=(Kv(),$y)&&t!=(Kv(),Dy)&&t!=(Kv(),$U)&&t!=(Kv(),NU):n==2):e.d&&(e.d.Hc(t)||e.d.Hc(Av(ms((Oc(),Cr),t)))||e.d.Hc(Fm((Oc(),Cr),e.b,t)))?!0:e.f&&Ale((Oc(),e.f),K8(ms(Cr,t)))?(n=N0(ms(Cr,t)),e.e?n==4:n==2):!1}function eQt(e,t,n,i){var s,c,a,g,w,m,y,k;return a=u($e(n,(Dn(),Ey)),8),w=a.a,y=a.b+e,s=p.Math.atan2(y,w),s<0&&(s+=Vm),s+=t,s>Vm&&(s-=Vm),g=u($e(i,Ey),8),m=g.a,k=g.b+e,c=p.Math.atan2(k,m),c<0&&(c+=Vm),c+=t,c>Vm&&(c-=Vm),Ef(),Bu(1e-10),p.Math.abs(s-c)<=1e-10||s==c||isNaN(s)&&isNaN(c)?0:sc?1:S0(isNaN(s),isNaN(c))}function oQ(e){var t,n,i,s,c,a,g;for(g=new Jt,i=new R(e.a.b);i.a=e.o)throw F(new AJ);g=t>>5,a=t&31,c=da(1,en(da(a,1))),s?e.n[n][g]=Df(e.n[n][g],c):e.n[n][g]=Vi(e.n[n][g],$ne(c)),c=da(c,1),i?e.n[n][g]=Df(e.n[n][g],c):e.n[n][g]=Vi(e.n[n][g],$ne(c))}catch(w){throw w=fi(w),W(w,320)?F(new gs(Ez+e.o+"*"+e.p+Az+t+Qr+n+Mz)):F(w)}}function zle(e,t,n,i){var s,c,a;t&&(c=oe(Oe(N(t,(oo(),Od))))+i,a=n+oe(Oe(N(t,FN)))/2,ue(t,DX,me(en(cc(p.Math.round(c))))),ue(t,nbe,me(en(cc(p.Math.round(a))))),t.d.b==0||zle(e,u(AA((s=Cn(new Bd(t).a.d,0),new nv(s))),86),n+oe(Oe(N(t,FN)))+e.a,i+oe(Oe(N(t,Fk)))),N(t,jX)!=null&&zle(e,u(N(t,jX),86),n,i))}function nQt(e,t){var n,i,s,c,a,g,w,m,y,k,E;for(w=Rr(t.a),s=oe(Oe(N(w,(xe(),Ug))))*2,y=oe(Oe(N(w,g2))),m=p.Math.max(s,y),c=J(hr,ds,25,t.f-t.c+1,15,1),i=-m,n=0,g=t.b.Kc();g.Ob();)a=u(g.Pb(),10),i+=e.a[a.c.p]+m,c[n++]=i;for(i+=e.a[t.a.c.p]+m,c[n++]=i,E=new R(t.e);E.a0&&(i=(!e.n&&(e.n=new we(Rs,e,1,7)),u(V(e.n,0),137)).a,!i||wn(wn((t.a+=' "',t),i),'"'))),wn(v0(wn(v0(wn(v0(wn(v0((t.a+=" (",t),e.i),","),e.j)," | "),e.g),","),e.f),")"),t.a)}function vYe(e){var t,n,i;return(e.Db&64)!=0?Rq(e):(t=new dl(pae),n=e.k,n?wn(wn((t.a+=' "',t),n),'"'):(!e.n&&(e.n=new we(Rs,e,1,7)),e.n.i>0&&(i=(!e.n&&(e.n=new we(Rs,e,1,7)),u(V(e.n,0),137)).a,!i||wn(wn((t.a+=' "',t),i),'"'))),wn(v0(wn(v0(wn(v0(wn(v0((t.a+=" (",t),e.i),","),e.j)," | "),e.g),","),e.f),")"),t.a)}function lQ(e,t){var n,i,s,c,a,g,w;if(t==null||t.length==0)return null;if(s=u(ko(e.a,t),149),!s){for(i=(g=new ua(e.b).a.vc().Kc(),new Jp(g));i.a.Ob();)if(n=(c=u(i.a.Pb(),42),u(c.dd(),149)),a=n.c,w=t.length,et(a.substr(a.length-w,w),t)&&(t.length==a.length||kr(a,a.length-t.length-1)==46)){if(s)return null;s=n}s&&bs(e.a,t,s)}return s}function sQt(e,t){var n,i,s,c;return n=new pL,i=u(wl(ec(new ht(null,new gt(e.f,16)),n),Ob(new gi,new Ac,new Nh,new Ih,H(_(Uc,1),de,132,0,[(Bf(),tw),Tl]))),21),s=i.gc(),i=u(wl(ec(new ht(null,new gt(t.f,16)),n),Ob(new gi,new Ac,new Nh,new Ih,H(_(Uc,1),de,132,0,[tw,Tl]))),21),c=i.gc(),ss.p?(Xi(c,Xt),c.d&&(g=c.o.b,t=c.a.b,c.a.b=g-t)):c.j==Xt&&s.p>e.p&&(Xi(c,yt),c.d&&(g=c.o.b,t=c.a.b,c.a.b=-(g-t)));break}return s}function cQt(e,t,n,i){var s,c,a,g,w,m,y,k,E,M,P;if(c=n,n1,g&&(i=new De(s,n.b),Tn(t.a,i)),q5(t.a,H(_(tr,1),fe,8,0,[E,k]))}function uQ(e,t,n){var i,s,c,a,g,w;if(t)if(n<=-1){if(i=ct(t.Tg(),-1-n),W(i,99))return u(i,18);for(a=u(t.ah(i),153),g=0,w=a.gc();g0){for(s=w.length;s>0&&w[s-1]=="";)--s;s=40,a&&mzt(e),kWt(e),tqt(e),n=zWe(e),i=0;n&&i0&&Tn(e.f,c)):(e.c[a]-=m+1,e.c[a]<=0&&e.a[a]>0&&Tn(e.e,c))))}function $Qt(e){var t,n,i,s,c,a,g,w,m;for(g=new qd(u(tn(new wL),62)),m=Li,n=new R(e.d);n.a=0&&wn?t:n;m<=k;++m)m==n?g=i++:(c=s[m],y=P.rl(c.ak()),m==t&&(w=m==k&&!y?i-1:i),y&&++i);return E=u(tS(e,t,n),72),g!=w&&h3(e,new l9(e.e,7,a,me(g),M.dd(),w)),E}}else return u(Wq(e,t,n),72);return u(tS(e,t,n),72)}function LQt(e,t){var n,i,s,c,a,g,w;for(Vt(t,"Port order processing",1),w=u(N(e,(xe(),dpe)),421),i=new R(e.b);i.a=0&&(g=_Nt(e,a),!(g&&(m<22?w.l|=1<>>1,a.m=y>>>1|(k&1)<<21,a.l=E>>>1|(y&1)<<21,--m;return n&&yH(w),c&&(i?(v1=aO(e),s&&(v1=Dze(v1,(Y3(),tde)))):v1=Qo(e.l,e.m,e.h)),w}function _Qt(e,t){var n,i,s,c,a,g,w,m,y,k;for(m=e.e[t.c.p][t.p]+1,w=t.c.a.c.length+1,g=new R(e.a);g.a0&&(fn(0,e.length),e.charCodeAt(0)==45||(fn(0,e.length),e.charCodeAt(0)==43))?1:0,i=a;in)throw F(new rh(hp+e+'"'));return g}function HQt(e){var t,n,i,s,c,a,g;for(a=new ai,c=new R(e.a);c.a1)&&t==1&&u(e.a[e.b],10).k==(jt(),ll)?Xv(u(e.a[e.b],10),(Ol(),ia)):i&&(!n||(e.c-e.b&e.a.length-1)>1)&&t==1&&u(e.a[e.c-1&e.a.length-1],10).k==(jt(),ll)?Xv(u(e.a[e.c-1&e.a.length-1],10),(Ol(),P1)):(e.c-e.b&e.a.length-1)==2?(Xv(u(U5(e),10),(Ol(),ia)),Xv(u(U5(e),10),P1)):I_t(e,s),sre(e)}function zQt(e,t,n){var i,s,c,a,g;for(c=0,s=new Ft((!e.a&&(e.a=new we(mi,e,10,11)),e.a));s.e!=s.i.gc();)i=u(Qt(s),33),a="",(!i.n&&(i.n=new we(Rs,i,1,7)),i.n).i==0||(a=u(V((!i.n&&(i.n=new we(Rs,i,1,7)),i.n),0),137).a),g=new SH(c++,t,a),Cs(g,i),ue(g,(oo(),_6),i),g.e.b=i.j+i.f/2,g.f.a=p.Math.max(i.g,1),g.e.a=i.i+i.g/2,g.f.b=p.Math.max(i.f,1),Tn(t.b,g),Wo(n.f,i,g)}function WQt(e){var t,n,i,s,c;i=u(N(e,(ae(),zn)),33),c=u($e(i,(xe(),Vg)),174).Hc((cl(),n0)),e.e||(s=u(N(e,Po),21),t=new De(e.f.a+e.d.b+e.d.c,e.f.b+e.d.d+e.d.a),s.Hc((ns(),Ul))?(as(i,Si,(br(),jo)),lp(i,t.a,t.b,!1,!0)):je(Pe($e(i,tX)))||lp(i,t.a,t.b,!0,!0)),c?as(i,Vg,Ge(n0)):as(i,Vg,(n=u(sf(tx),9),new Rl(n,u($u(n,n.length),9),0)))}function Zle(e,t,n){var i,s,c,a;if(t[0]>=e.length)return n.o=0,!0;switch(kr(e,t[0])){case 43:s=1;break;case 45:s=-1;break;default:return n.o=0,!0}if(++t[0],c=t[0],a=Oj(e,t),a==0&&t[0]==c)return!1;if(t[0]=0&&g!=n&&(c=new rr(e,1,g,a,null),i?i.Ei(c):i=c),n>=0&&(c=new rr(e,1,n,g==n?a:null,t),i?i.Ei(c):i=c)),i}function LYe(e){var t,n,i;if(e.b==null){if(i=new Va,e.i!=null&&(us(i,e.i),i.a+=":"),(e.f&256)!=0){for((e.f&256)!=0&&e.a!=null&&(c7t(e.i)||(i.a+="//"),us(i,e.a)),e.d!=null&&(i.a+="/",us(i,e.d)),(e.f&16)!=0&&(i.a+="/"),t=0,n=e.j.length;tE?!1:(k=(w=xS(i,E,!1),w.a),y+g+k<=t.b&&(c9(n,c-n.s),n.c=!0,c9(i,c-n.s),Q9(i,n.s,n.t+n.d+g),i.k=!0,fse(n.q,i),M=!0,s&&(dP(t,i),i.j=t,e.c.length>a&&(X9((pt(a,e.c.length),u(e.c[a],200)),i),(pt(a,e.c.length),u(e.c[a],200)).a.c.length==0&&ed(e,a)))),M)}function JQt(e,t){var n,i,s,c,a,g;if(Vt(t,"Partition midprocessing",1),s=new L0,Ti(ni(new ht(null,new gt(e.a,16)),new a5e),new EEe(s)),s.d!=0){for(g=u(wl(PFe((c=s.i,new ht(null,(c||(s.i=new um(s,s.c))).Nc()))),pg(new yr,new ks,new Au,H(_(Uc,1),de,132,0,[(Bf(),Tl)]))),15),i=g.Kc(),n=u(i.Pb(),19);i.Ob();)a=u(i.Pb(),19),nHt(u(Wn(s,n),21),u(Wn(s,a),21)),n=a;Ht(t)}}function _Ye(e,t,n){var i,s,c,a,g,w,m,y;if(t.p==0){for(t.p=1,a=n,a||(s=new pe,c=(i=u(sf(Wr),9),new Rl(i,u($u(i,i.length),9),0)),a=new mr(s,c)),u(a.a,15).Fc(t),t.k==(jt(),Ri)&&u(a.b,21).Fc(u(N(t,(ae(),eo)),61)),w=new R(t.j);w.a0){if(s=u(e.Ab.g,1934),t==null){for(c=0;c1)for(i=new R(s);i.an.s&&gg&&(g=s,y.c=J(It,Ee,1,0,5,1)),s==g&&ge(y,new mr(n.c.i,n)));rt(),ir(y,e.c),ab(e.b,w.p,y)}}function szt(e,t){var n,i,s,c,a,g,w,m,y;for(a=new R(t.b);a.ag&&(g=s,y.c=J(It,Ee,1,0,5,1)),s==g&&ge(y,new mr(n.d.i,n)));rt(),ir(y,e.c),ab(e.f,w.p,y)}}function qYe(e){O0(e,new Mg(w0(g0(b0(p0(new Y1,pp),"ELK Box"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges."),new b8e))),ke(e,pp,ap,Mwe),ke(e,pp,Xb,15),ke(e,pp,$7,me(0)),ke(e,pp,DD,Ae(Twe)),ke(e,pp,Wm,Ae(Iat)),ke(e,pp,iy,Ae(Rat)),ke(e,pp,ny,qtt),ke(e,pp,N7,Ae(Ewe)),ke(e,pp,ry,Ae(Awe)),ke(e,pp,uae,Ae(nU)),ke(e,pp,TD,Ae(Nat))}function QYe(e,t){var n,i,s,c,a,g,w,m,y;if(s=e.i,a=s.o.a,c=s.o.b,a<=0&&c<=0)return ye(),Ks;switch(m=e.n.a,y=e.n.b,g=e.o.a,n=e.o.b,t.g){case 2:case 1:if(m<0)return ye(),xt;if(m+g>a)return ye(),At;break;case 4:case 3:if(y<0)return ye(),yt;if(y+n>c)return ye(),Xt}return w=(m+g/2)/a,i=(y+n/2)/c,w+i<=1&&w-i<=0?(ye(),xt):w+i>=1&&w-i>=0?(ye(),At):i<.5?(ye(),yt):(ye(),Xt)}function ozt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D;for(n=!1,y=oe(Oe(N(t,(xe(),jp)))),P=d1*y,s=new R(t.b);s.aw+P&&(D=k.g+E.g,E.a=(E.g*E.a+k.g*k.a)/D,E.g=D,k.f=E,n=!0)),c=g,k=E;return n}function zYe(e,t,n,i,s,c,a){var g,w,m,y,k,E;for(E=new gv,m=t.Kc();m.Ob();)for(g=u(m.Pb(),839),k=new R(g.wf());k.a0?g.a?(m=g.b.rf().b,s>m&&(e.v||g.c.d.c.length==1?(a=(s-m)/2,g.d.d=a,g.d.a=a):(n=u(Me(g.c.d,0),181).rf().b,i=(n-m)/2,g.d.d=p.Math.max(0,i),g.d.a=s-i-m))):g.d.a=e.t+s:C5(e.u)&&(c=Ece(g.b),c.d<0&&(g.d.d=-c.d),c.d+c.a>g.b.rf().b&&(g.d.a=c.d+c.a-g.b.rf().b))}function uzt(e,t){var n;switch(p9(e)){case 6:return lr(t);case 7:return ob(t);case 8:return sb(t);case 3:return Array.isArray(t)&&(n=p9(t),!(n>=14&&n<=16));case 11:return t!=null&&typeof t===LQ;case 12:return t!=null&&(typeof t===v7||typeof t==LQ);case 0:return oq(t,e.__elementTypeId$);case 2:return zF(t)&&t.im!==Tt;case 1:return zF(t)&&t.im!==Tt||oq(t,e.__elementTypeId$);default:return!0}}function WYe(e,t){var n,i,s,c;return i=p.Math.min(p.Math.abs(e.c-(t.c+t.b)),p.Math.abs(e.c+e.b-t.c)),c=p.Math.min(p.Math.abs(e.d-(t.d+t.a)),p.Math.abs(e.d+e.a-t.d)),n=p.Math.abs(e.c+e.b/2-(t.c+t.b/2)),n>e.b/2+t.b/2||(s=p.Math.abs(e.d+e.a/2-(t.d+t.a/2)),s>e.a/2+t.a/2)?1:n==0&&s==0?0:n==0?c/s+1:s==0?i/n+1:p.Math.min(i/n,c/s)+1}function KYe(e,t){var n,i,s,c,a,g;return s=Xre(e),g=Xre(t),s==g?e.e==t.e&&e.a<54&&t.a<54?e.ft.f?1:0:(i=e.e-t.e,n=(e.d>0?e.d:p.Math.floor((e.a-1)*iet)+1)-(t.d>0?t.d:p.Math.floor((t.a-1)*iet)+1),n>i+1?s:n0&&(a=pm(a,gZe(i))),xKe(c,a))):s0&&e.d!=(_5(),YK)&&(g+=a*(i.d.a+e.a[t.b][i.b]*(t.d.a-i.d.a)/n)),n>0&&e.d!=(_5(),UK)&&(w+=a*(i.d.b+e.a[t.b][i.b]*(t.d.b-i.d.b)/n)));switch(e.d.g){case 1:return new De(g/c,t.d.b);case 2:return new De(t.d.a,w/c);default:return new De(g/c,w/c)}}function VYe(e,t){bO();var n,i,s,c,a;if(a=u(N(e.i,(xe(),Si)),98),c=e.j.g-t.j.g,c!=0||!(a==(br(),t0)||a==sa||a==jo))return 0;if(a==(br(),t0)&&(n=u(N(e,vd),19),i=u(N(t,vd),19),n&&i&&(s=n.a-i.a,s!=0)))return s;switch(e.j.g){case 1:return Hi(e.n.a,t.n.a);case 2:return Hi(e.n.b,t.n.b);case 3:return Hi(t.n.a,e.n.a);case 4:return Hi(t.n.b,e.n.b);default:throw F(new Ps(mfe))}}function XYe(e){var t,n,i,s,c,a;for(n=(!e.a&&(e.a=new Fi(yu,e,5)),e.a).i+2,a=new No(n),ge(a,new De(e.j,e.k)),Ti(new ht(null,(!e.a&&(e.a=new Fi(yu,e,5)),new gt(e.a,16))),new qAe(a)),ge(a,new De(e.b,e.c)),t=1;t0&&(M9(w,!1,(ts(),bu)),M9(w,!0,Ku)),rc(t.g,new FDe(e,n)),Qn(e.g,t,n)}function GYe(){GYe=X;var e;for(ude=H(_(Zt,1),On,25,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]),EK=J(Zt,On,25,37,15,1),yrt=H(_(Zt,1),On,25,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]),fde=J(H1,uz,25,37,14,1),e=2;e<=36;e++)EK[e]=Di(p.Math.pow(e,ude[e])),fde[e]=U9(Uj,EK[e])}function hzt(e){var t;if((!e.a&&(e.a=new we(di,e,6,6)),e.a).i!=1)throw F(new Ot(cnt+(!e.a&&(e.a=new we(di,e,6,6)),e.a).i));return t=new pc,E9(u(V((!e.b&&(e.b=new dt(Wt,e,4,7)),e.b),0),82))&&Hr(t,DJe(e,E9(u(V((!e.b&&(e.b=new dt(Wt,e,4,7)),e.b),0),82)),!1)),E9(u(V((!e.c&&(e.c=new dt(Wt,e,5,8)),e.c),0),82))&&Hr(t,DJe(e,E9(u(V((!e.c&&(e.c=new dt(Wt,e,5,8)),e.c),0),82)),!0)),t}function YYe(e,t){var n,i,s,c,a;for(t.d?s=e.a.c==(fh(),Dp)?$s(t.b):qi(t.b):s=e.a.c==(fh(),yd)?$s(t.b):qi(t.b),c=!1,i=new _t(qt(s.a.Kc(),new L));an(i);)if(n=u(nn(i),17),a=je(e.a.f[e.a.g[t.b.p].p]),!(!a&&!_r(n)&&n.c.i.c==n.d.i.c)&&!(je(e.a.n[e.a.g[t.b.p].p])||je(e.a.n[e.a.g[t.b.p].p]))&&(c=!0,fa(e.b,e.a.g[ONt(n,t.b).p])))return t.c=!0,t.a=n,t;return t.c=c,t.a=null,t}function azt(e,t,n,i,s){var c,a,g,w,m,y,k;for(rt(),ir(e,new E8e),g=new vr(e,0),k=new pe,c=0;g.bc*2?(y=new fP(k),m=vc(a)/nl(a),w=$Q(y,t,new rv,n,i,s,m),Vn(of(y.e),w),k.c=J(It,Ee,1,0,5,1),c=0,k.c[k.c.length]=y,k.c[k.c.length]=a,c=vc(y)*nl(y)+vc(a)*nl(a)):(k.c[k.c.length]=a,c+=vc(a)*nl(a));return k}function eue(e,t,n){var i,s,c,a,g,w,m;if(i=n.gc(),i==0)return!1;if(e.ej())if(w=e.fj(),poe(e,t,n),a=i==1?e.Zi(3,null,n.Kc().Pb(),t,w):e.Zi(5,null,n,t,w),e.bj()){for(g=i<100?null:new _d(i),c=t+i,s=t;s0){for(a=0;a>16==-15&&e.Cb.nh()&&U_(new W_(e.Cb,9,13,n,e.c,ld(Qc(u(e.Cb,59)),e))):W(e.Cb,88)&&e.Db>>16==-23&&e.Cb.nh()&&(t=e.c,W(t,88)||(t=(tt(),xu)),W(n,88)||(n=(tt(),xu)),U_(new W_(e.Cb,9,10,n,t,ld(wo(u(e.Cb,26)),e)))))),e.c}function dzt(e,t){var n,i,s,c,a,g,w,m,y,k;for(Vt(t,"Hypernodes processing",1),s=new R(e.b);s.an);return s}function JYe(e,t){var n,i,s;i=Kc(e.d,1)!=0,!je(Pe(N(t.j,(ae(),xp))))&&!je(Pe(N(t.j,f2)))||ie(N(t.j,(xe(),C1)))===ie((ka(),T1))?t.c.Tf(t.e,i):i=je(Pe(N(t.j,xp))),u7(e,t,i,!0),je(Pe(N(t.j,f2)))&&ue(t.j,f2,(kt(),!1)),je(Pe(N(t.j,xp)))&&(ue(t.j,xp,(kt(),!1)),ue(t.j,f2,!0)),n=Hq(e,t);do{if(ose(e),n==0)return 0;i=!i,s=n,u7(e,t,i,!1),n=Hq(e,t)}while(s>n);return s}function eZe(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P;if(t==n)return!0;if(t=fle(e,t),n=fle(e,n),i=dq(t),i){if(y=dq(n),y!=i)return y?(w=i.Dj(),P=y.Dj(),w==P&&w!=null):!1;if(a=(!t.d&&(t.d=new Fi(os,t,1)),t.d),c=a.i,E=(!n.d&&(n.d=new Fi(os,n,1)),n.d),c==E.i){for(m=0;m0,g=zP(t,c),jte(n?g.b:g.g,t),Sm(g).c.length==1&&ji(i,g,i.c.b,i.c),s=new mr(c,t),e1(e.o,s),nc(e.e.a,c))}function rZe(e,t){var n,i,s,c,a,g,w;return i=p.Math.abs(lM(e.b).a-lM(t.b).a),g=p.Math.abs(lM(e.b).b-lM(t.b).b),s=0,w=0,n=1,a=1,i>e.b.b/2+t.b.b/2&&(s=p.Math.min(p.Math.abs(e.b.c-(t.b.c+t.b.b)),p.Math.abs(e.b.c+e.b.b-t.b.c)),n=1-s/i),g>e.b.a/2+t.b.a/2&&(w=p.Math.min(p.Math.abs(e.b.d-(t.b.d+t.b.a)),p.Math.abs(e.b.d+e.b.a-t.b.d)),a=1-w/g),c=p.Math.min(n,a),(1-c)*p.Math.sqrt(i*i+g*g)}function vzt(e){var t,n,i,s;for(DQ(e,e.e,e.f,(R0(),A1),!0,e.c,e.i),DQ(e,e.e,e.f,A1,!1,e.c,e.i),DQ(e,e.e,e.f,w2,!0,e.c,e.i),DQ(e,e.e,e.f,w2,!1,e.c,e.i),Ozt(e,e.c,e.e,e.f,e.i),i=new vr(e.i,0);i.b=65;n--)Jf[n]=n-65<<24>>24;for(i=122;i>=97;i--)Jf[i]=i-97+26<<24>>24;for(s=57;s>=48;s--)Jf[s]=s-48+52<<24>>24;for(Jf[43]=62,Jf[47]=63,c=0;c<=25;c++)Md[c]=65+c&Ni;for(a=26,w=0;a<=51;++a,w++)Md[a]=97+w&Ni;for(e=52,g=0;e<=61;++e,g++)Md[e]=48+g&Ni;Md[62]=43,Md[63]=47}function yzt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M;if(e.dc())return new Er;for(m=0,k=0,s=e.Kc();s.Ob();)i=u(s.Pb(),37),c=i.f,m=p.Math.max(m,c.a),k+=c.a*c.b;for(m=p.Math.max(m,p.Math.sqrt(k)*oe(Oe(N(u(e.Kc().Pb(),37),(xe(),fN))))),E=0,M=0,w=0,n=t,g=e.Kc();g.Ob();)a=u(g.Pb(),37),y=a.f,E+y.a>m&&(E=0,M+=w+t,w=0),vS(a,E,M),n=p.Math.max(n,E+y.a),w=p.Math.max(w,y.b),E+=y.a+t;return new De(n+t,M+w+t)}function Ozt(e,t,n,i,s){var c,a,g,w,m,y,k;for(a=new R(t);a.ac)return ye(),At;break;case 4:case 3:if(w<0)return ye(),yt;if(w+e.f>s)return ye(),Xt}return a=(g+e.g/2)/c,n=(w+e.f/2)/s,a+n<=1&&a-n<=0?(ye(),xt):a+n>=1&&a-n>=0?(ye(),At):n<.5?(ye(),yt):(ye(),Xt)}function kzt(e,t,n,i,s){var c,a;if(c=$r(Vi(t[0],is),Vi(i[0],is)),e[0]=en(c),c=Ud(c,32),n>=s){for(a=1;a0&&(s.b[a++]=0,s.b[a++]=c.b[0]-1),t=1;t0&&(QL(w,w.d-s.d),s.c==(cf(),E1)&&mOt(w,w.a-s.d),w.d<=0&&w.i>0&&ji(t,w,t.c.b,t.c)));for(c=new R(e.f);c.a0&&(yE(g,g.i-s.d),s.c==(cf(),E1)&&vOt(g,g.b-s.d),g.i<=0&&g.d>0&&ji(n,g,n.c.b,n.c)))}function Szt(e,t,n){var i,s,c,a,g,w,m,y;for(Vt(n,"Processor compute fanout",1),Pc(e.b),Pc(e.a),g=null,c=Cn(t.b,0);!g&&c.b!=c.d.c;)m=u(xn(c),86),je(Pe(N(m,(oo(),vw))))&&(g=m);for(w=new ai,ji(w,g,w.c.b,w.c),pJe(e,w),y=Cn(t.b,0);y.b!=y.d.c;)m=u(xn(y),86),a=un(N(m,(oo(),F6))),s=ko(e.b,a)!=null?u(ko(e.b,a),19).a:0,ue(m,LN,me(s)),i=1+(ko(e.a,a)!=null?u(ko(e.a,a),19).a:0),ue(m,Uft,me(i));Ht(n)}function xzt(e,t,n,i,s){var c,a,g,w,m,y,k,E,M,P;for(E=cRt(e,n),w=0;w0),i.a.Xb(i.c=--i.b),k>E+w&&rl(i);for(a=new R(M);a.a0),i.a.Xb(i.c=--i.b)}}function Czt(){Ln();var e,t,n,i,s,c;if(RU)return RU;for(e=new bl(4),Qb(e,a1(gK,!0)),ES(e,a1("M",!0)),ES(e,a1("C",!0)),c=new bl(4),i=0;i<11;i++)Co(c,i,i);return t=new bl(4),Qb(t,a1("M",!0)),Co(t,4448,4607),Co(t,65438,65439),s=new h5(2),Pg(s,e),Pg(s,dx),n=new h5(2),n.$l(tM(c,a1("L",!0))),n.$l(t),n=new vb(3,n),n=new gie(s,n),RU=n,RU}function Tzt(e){var t,n;if(t=un($e(e,(Dn(),K6))),!yze(t,e)&&!gg(e,qk)&&((!e.a&&(e.a=new we(mi,e,10,11)),e.a).i!=0||je(Pe($e(e,HC)))))if(t==null||Ib(t).length==0){if(!yze(Dt,e))throw n=wn(wn(new dl("Unable to load default layout algorithm "),Dt)," for unconfigured node "),Qj(e,n),F(new Yw(n.a))}else throw n=wn(wn(new dl("Layout algorithm '"),t),"' not found for "),Qj(e,n),F(new Yw(n.a))}function pQ(e){var t,n,i,s,c,a,g,w,m,y,k,E,M;if(n=e.i,t=e.n,e.b==0)for(M=n.c+t.b,E=n.b-t.b-t.c,a=e.a,w=0,y=a.length;w0&&(k-=i[0]+e.c,i[0]+=e.c),i[2]>0&&(k-=i[2]+e.c),i[1]=p.Math.max(i[1],k),iM(e.a[1],n.c+t.b+i[0]-(i[1]-k)/2,i[1]);for(c=e.a,g=0,m=c.length;g0?(e.n.c.length-1)*e.i:0,i=new R(e.n);i.a1)for(i=Cn(s,0);i.b!=i.d.c;)for(n=u(xn(i),231),c=0,w=new R(n.e);w.a0&&(t[0]+=e.c,k-=t[0]),t[2]>0&&(k-=t[2]+e.c),t[1]=p.Math.max(t[1],k),rM(e.a[1],i.d+n.d+t[0]-(t[1]-k)/2,t[1]);else for(P=i.d+n.d,M=i.a-n.d-n.a,a=e.a,w=0,y=a.length;w=0&&c!=n))throw F(new Ot(z7));for(s=0,w=0;w0||Y0(s.b.d,e.b.d+e.b.a)==0&&i.b<0||Y0(s.b.d+s.b.a,e.b.d)==0&&i.b>0){g=0;break}}else g=p.Math.min(g,lUe(e,s,i));g=p.Math.min(g,lZe(e,c,g,i))}return g}function g7(e,t){var n,i,s,c,a,g,w;if(e.b<2)throw F(new Ot("The vector chain must contain at least a source and a target point."));for(s=(Rt(e.b!=0),u(e.a.a.c,8)),CA(t,s.a,s.b),w=new pv((!t.a&&(t.a=new Fi(yu,t,5)),t.a)),a=Cn(e,1);a.aoe(Af(a.g,a.d[0]).a)?(Rt(w.b>0),w.a.Xb(w.c=--w.b),fb(w,a),s=!0):g.e&&g.e.gc()>0&&(c=(!g.e&&(g.e=new pe),g.e).Mc(t),m=(!g.e&&(g.e=new pe),g.e).Mc(n),(c||m)&&((!g.e&&(g.e=new pe),g.e).Fc(a),++a.c));s||(i.c[i.c.length]=a)}function hZe(e){var t,n,i;if(sm(u(N(e,(xe(),Si)),98)))for(n=new R(e.j);n.a>>0,"0"+t.toString(16)),i="\\x"+gl(n,n.length-2,n.length)):e>=zr?(n=(t=e>>>0,"0"+t.toString(16)),i="\\v"+gl(n,n.length-6,n.length)):i=""+String.fromCharCode(e&Ni)}return i}function wQ(e,t){var n,i,s,c,a,g,w,m,y,k;if(a=e.e,w=t.e,w==0)return e;if(a==0)return t.e==0?t:new fm(-t.e,t.d,t.a);if(c=e.d,g=t.d,c+g==2)return n=Vi(e.a[0],is),i=Vi(t.a[0],is),a<0&&(n=G3(n)),w<0&&(i=G3(i)),q9(c1(n,i));if(s=c!=g?c>g?1:-1:Lse(e.a,t.a,c),s==-1)k=-w,y=a==w?F_(t.a,g,e.a,c):H_(t.a,g,e.a,c);else if(k=a,a==w){if(s==0)return h1(),gk;y=F_(e.a,c,t.a,g)}else y=H_(e.a,c,t.a,g);return m=new fm(k,y.length,y),N5(m),m}function cue(e){var t,n,i,s,c,a;for(this.e=new pe,this.a=new pe,n=e.b-1;n<3;n++)A3(e,0,u(df(e,0),8));if(e.b<4)throw F(new Ot("At (least dimension + 1) control points are necessary!"));for(this.b=3,this.d=!0,this.c=!1,m_t(this,e.b+this.b-1),a=new pe,c=new R(this.e),t=0;t=t.o&&n.f<=t.f||t.a*.5<=n.f&&t.a*1.5>=n.f){if(a=u(Me(t.n,t.n.c.length-1),211),a.e+a.d+n.g+s<=i&&(c=u(Me(t.n,t.n.c.length-1),211),c.f-e.f+n.f<=e.b||e.a.c.length==1))return ooe(t,n),!0;if(t.s+n.g<=i&&(t.t+t.d+n.f+s<=e.b||e.a.c.length==1))return ge(t.b,n),g=u(Me(t.n,t.n.c.length-1),211),ge(t.n,new PM(t.s,g.f+g.a+t.i,t.i)),qoe(u(Me(t.n,t.n.c.length-1),211),n),sZe(t,n),!0}return!1}function dZe(e,t,n){var i,s,c,a;return e.ej()?(s=null,c=e.fj(),i=e.Zi(1,a=Y_(e,t,n),n,t,c),e.bj()&&!(e.ni()&&a!=null?qn(a,n):ie(a)===ie(n))?(a!=null&&(s=e.dj(a,s)),s=e.cj(n,s),e.ij()&&(s=e.lj(a,n,s)),s?(s.Ei(i),s.Fi()):e.$i(i)):(e.ij()&&(s=e.lj(a,n,s)),s?(s.Ei(i),s.Fi()):e.$i(i)),a):(a=Y_(e,t,n),e.bj()&&!(e.ni()&&a!=null?qn(a,n):ie(a)===ie(n))&&(s=null,a!=null&&(s=e.dj(a,null)),s=e.cj(n,s),s&&s.Fi()),a)}function OS(e,t){var n,i,s,c,a,g,w,m;t%=24,e.q.getHours()!=t&&(i=new p.Date(e.q.getTime()),i.setDate(i.getDate()+1),g=e.q.getTimezoneOffset()-i.getTimezoneOffset(),g>0&&(w=g/60|0,m=g%60,s=e.q.getDate(),n=e.q.getHours(),n+w>=24&&++s,c=new p.Date(e.q.getFullYear(),e.q.getMonth(),s,t+w,e.q.getMinutes()+m,e.q.getSeconds(),e.q.getMilliseconds()),e.q.setTime(c.getTime()))),a=e.q.getTime(),e.q.setTime(a+36e5),e.q.getHours()!=t&&e.q.setTime(a)}function Izt(e,t){var n,i,s,c,a;if(Vt(t,"Path-Like Graph Wrapping",1),e.b.c.length==0){Ht(t);return}if(s=new gle(e),a=(s.i==null&&(s.i=cse(s,new EZ)),oe(s.i)*s.f),n=a/(s.i==null&&(s.i=cse(s,new EZ)),oe(s.i)),s.b>n){Ht(t);return}switch(u(N(e,(xe(),oX)),337).g){case 2:c=new MZ;break;case 0:c=new TZ;break;default:c=new PZ}if(i=c.Vf(e,s),!c.Wf())switch(u(N(e,xN),338).g){case 2:i=uUe(s,i);break;case 1:i=lXe(s,i)}DWt(e,s,i),Ht(t)}function Rzt(e,t){var n,i,s,c;if(yCt(e.d,e.e),e.c.a.$b(),oe(Oe(N(t.j,(xe(),dN))))!=0||oe(Oe(N(t.j,dN)))!=0)for(n=JO,ie(N(t.j,C1))!==ie((ka(),T1))&&ue(t.j,(ae(),xp),(kt(),!0)),c=u(N(t.j,A6),19).a,s=0;ss&&++m,ge(a,(pt(g+m,t.c.length),u(t.c[g+m],19))),w+=(pt(g+m,t.c.length),u(t.c[g+m],19)).a-i,++n;n1&&(w>vc(g)*nl(g)/2||a.b==0)&&(k=new fP(E),y=vc(g)/nl(g),m=$Q(k,t,new rv,n,i,s,y),Vn(of(k.e),m),g=k,M.c[M.c.length]=k,w=0,E.c=J(It,Ee,1,0,5,1)));return _i(M,E),M}function Fzt(e,t,n,i){var s,c,a,g,w,m,y,k,E,M,P,D;if(n.mh(t)&&(y=(M=t,M?u(i,49).xh(M):null),y))if(D=n.bh(t,e.a),P=t.t,P>1||P==-1)if(k=u(D,69),E=u(y,69),k.dc())E.$b();else for(a=!!Ur(t),c=0,g=e.a?k.Kc():k.Zh();g.Ob();)m=u(g.Pb(),56),s=u(H0(e,m),56),s?(a?(w=E.Xc(s),w==-1?E.Xh(c,s):c!=w&&E.ji(c,s)):E.Xh(c,s),++c):e.b&&!a&&(E.Xh(c,m),++c);else D==null?y.Wb(null):(s=H0(e,D),s==null?e.b&&!Ur(t)&&y.Wb(D):y.Wb(s))}function _zt(e,t){var n,i,s,c,a,g,w,m;for(n=new P4e,s=new _t(qt($s(t).a.Kc(),new L));an(s);)if(i=u(nn(s),17),!_r(i)&&(g=i.c.i,xce(g,E$))){if(m=Fle(e,g,E$,T$),m==-1)continue;n.b=p.Math.max(n.b,m),!n.a&&(n.a=new pe),ge(n.a,g)}for(a=new _t(qt(qi(t).a.Kc(),new L));an(a);)if(c=u(nn(a),17),!_r(c)&&(w=c.d.i,xce(w,T$))){if(m=Fle(e,w,T$,E$),m==-1)continue;n.d=p.Math.max(n.d,m),!n.c&&(n.c=new pe),ge(n.c,w)}return n}function gZe(e){$O();var t,n,i,s;if(t=Di(e),e1e6)throw F(new $E("power of ten too big"));if(e<=_n)return Pv(s7(fy[1],t),t);for(i=s7(fy[1],_n),s=i,n=cc(e-_n),t=Di(e%_n);ho(n,_n)>0;)s=pm(s,i),n=c1(n,_n);for(s=pm(s,s7(fy[1],t)),s=Pv(s,_n),n=cc(e-_n);ho(n,_n)>0;)s=Pv(s,_n),n=c1(n,_n);return s=Pv(s,t),s}function Hzt(e,t){var n,i,s,c,a,g,w,m,y;for(Vt(t,"Hierarchical port dummy size processing",1),w=new pe,y=new pe,i=oe(Oe(N(e,(xe(),d2)))),n=i*2,c=new R(e.b);c.am&&i>m)y=g,m=oe(t.p[g.p])+oe(t.d[g.p])+g.o.b+g.d.a;else{s=!1,n.n&&sg(n,"bk node placement breaks on "+g+" which should have been after "+y);break}if(!s)break}return n.n&&sg(n,t+" is feasible: "+s),s}function Kzt(e,t,n,i){var s,c,a,g,w,m,y;for(g=-1,y=new R(e);y.a=B&&e.e[w.p]>P*e.b||U>=n*B)&&(E.c[E.c.length]=g,g=new pe,Hr(a,c),c.a.$b(),m-=y,M=p.Math.max(M,m*e.b+D),m+=U,G=U,U=0,y=0,D=0);return new mr(M,E)}function Gzt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M;for(n=(m=new ua(e.c.b).a.vc().Kc(),new Jp(m));n.a.Ob();)t=(g=u(n.a.Pb(),42),u(g.dd(),149)),s=t.a,s==null&&(s=""),i=kSt(e.c,s),!i&&s.length==0&&(i=Sjt(e)),i&&!Mb(i.c,t,!1)&&Tn(i.c,t);for(a=Cn(e.a,0);a.b!=a.d.c;)c=u(xn(a),478),y=I_(e.c,c.a),M=I_(e.c,c.b),y&&M&&Tn(y.c,new mr(M,c.c));for(ru(e.a),E=Cn(e.b,0);E.b!=E.d.c;)k=u(xn(E),478),t=OSt(e.c,k.a),w=I_(e.c,k.b),t&&w&&h4t(t,w,k.c);ru(e.b)}function Yzt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M;c=new Ux(e),a=new NVe,s=(n9(a.g),n9(a.j),Pc(a.b),n9(a.d),n9(a.i),Pc(a.k),Pc(a.c),Pc(a.e),M=wUe(a,c,null),oGe(a,c),M),t&&(m=new Ux(t),g=cWt(m),Rce(s,H(_(ywe,1),Ee,527,0,[g]))),E=!1,k=!1,n&&(m=new Ux(n),FD in m.a&&(E=pa(m,FD).ge().a),jnt in m.a&&(k=pa(m,jnt).ge().a)),y=ZPe(EQe(new a3,E),k),zLt(new Vxe,s,y),FD in c.a&&uf(c,FD,null),(E||k)&&(w=new sv,fZe(y,w,E,k),uf(c,FD,w)),i=new sMe(a),BPt(new ste(s),i)}function Zzt(e,t,n){var i,s,c,a,g,w,m,y,k;for(a=new FVe,m=H(_(Zt,1),On,25,15,[0]),s=-1,c=0,i=0,w=0;w0){if(s<0&&y.a&&(s=w,c=m[0],i=0),s>=0){if(g=y.b,w==s&&(g-=i++,g==0))return 0;if(!wJe(t,m,y,g,a)){w=s-1,m[0]=c;continue}}else if(s=-1,!wJe(t,m,y,0,a))return 0}else{if(s=-1,kr(y.c,0)==32){if(k=m[0],Bqe(t,m),m[0]>k)continue}else if(D7t(t,y.c,m[0])){m[0]+=y.c.length;continue}return 0}return DVt(a,n)?m[0]:0}function SS(e){var t,n,i,s,c,a,g,w;if(!e.f){if(w=new LZ,g=new LZ,t=cx,a=t.a.zc(e,t),a==null){for(c=new Ft(Ss(e));c.e!=c.i.gc();)s=u(Qt(c),26),vi(w,SS(s));t.a.Bc(e)!=null,t.a.gc()==0}for(i=(!e.s&&(e.s=new we(dc,e,21,17)),new Ft(e.s));i.e!=i.i.gc();)n=u(Qt(i),170),W(n,99)&&rn(g,u(n,18));Eb(g),e.r=new PRe(e,(u(V(re((Yd(),bt).o),6),18),g.i),g.g),vi(w,e.r),Eb(w),e.f=new rm((u(V(re(bt.o),5),18),w.i),w.g),qc(e).b&=-3}return e.f}function Jzt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P;for(a=e.o,i=J(Zt,On,25,a,15,1),s=J(Zt,On,25,a,15,1),n=e.p,t=J(Zt,On,25,n,15,1),c=J(Zt,On,25,n,15,1),m=0;m=0&&!Tm(e,y,k);)--k;s[y]=k}for(M=0;M=0&&!Tm(e,g,P);)--g;c[P]=g}for(w=0;wt[E]&&Ei[w]&&Nj(e,w,E,!1,!0)}function lue(e){var t,n,i,s,c,a,g,w;n=je(Pe(N(e,(gf(),Xst)))),c=e.a.c.d,g=e.a.d.d,n?(a=oh(ur(new De(g.a,g.b),c),.5),w=oh(Us(e.e),.5),t=ur(Vn(new De(c.a,c.b),a),w),Bte(e.d,t)):(s=oe(Oe(N(e.a,not))),i=e.d,c.a>=g.a?c.b>=g.b?(i.a=g.a+(c.a-g.a)/2+s,i.b=g.b+(c.b-g.b)/2-s-e.e.b):(i.a=g.a+(c.a-g.a)/2+s,i.b=c.b+(g.b-c.b)/2+s):c.b>=g.b?(i.a=c.a+(g.a-c.a)/2+s,i.b=g.b+(c.b-g.b)/2+s):(i.a=c.a+(g.a-c.a)/2+s,i.b=c.b+(g.b-c.b)/2-s-e.e.b))}function To(e,t){var n,i,s,c,a,g,w;if(e==null)return null;if(c=e.length,c==0)return"";for(w=J(Zl,ph,25,c,15,1),xre(0,c,e.length),xre(0,c,w.length),RLe(e,0,c,w,0),n=null,g=t,s=0,a=0;s0?gl(n.a,0,c-1):""):e.substr(0,c-1):n?n.a:e}function wZe(e){O0(e,new Mg(w0(g0(b0(p0(new Y1,Ig),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new cke))),ke(e,Ig,jz,Ae(f1e)),ke(e,Ig,Dz,Ae(QK)),ke(e,Ig,ny,Ae($st)),ke(e,Ig,ap,Ae(u1e)),ke(e,Ig,Vue,Ae(Lst)),ke(e,Ig,Xue,Ae(Rst)),ke(e,Ig,Kue,Ae(Bst)),ke(e,Ig,Uue,Ae(Ist)),ke(e,Ig,nfe,Ae(Nst)),ke(e,Ig,ife,Ae(qK)),ke(e,Ig,rfe,Ae(l1e)),ke(e,Ig,sfe,Ae(v$))}function uue(e,t,n,i){var s,c,a,g,w,m,y,k,E;if(c=new Ta(e),J1(c,(jt(),Mo)),ue(c,(xe(),Si),(br(),jo)),s=0,t){for(a=new mo,ue(a,(ae(),zn),t),ue(c,zn,t.i),Xi(a,(ye(),xt)),_s(a,c),E=hh(t.e),m=E,y=0,k=m.length;y0)if(n-=i.length-t,n>=0){for(s.a+="0.";n>Qg.length;n-=Qg.length)URe(s,Qg);jIe(s,Qg,Di(n)),wn(s,i.substr(t))}else n=t-n,wn(s,gl(i,t,Di(n))),s.a+=".",wn(s,E8(i,Di(n)));else{for(wn(s,i.substr(t));n<-Qg.length;n+=Qg.length)URe(s,Qg);jIe(s,Qg,Di(-n))}return s.a}function fue(e,t,n,i){var s,c,a,g,w,m,y,k,E;return w=ur(new De(n.a,n.b),e),m=w.a*t.b-w.b*t.a,y=t.a*i.b-t.b*i.a,k=(w.a*i.b-w.b*i.a)/y,E=m/y,y==0?m==0?(s=Vn(new De(n.a,n.b),oh(new De(i.a,i.b),.5)),c=t1(e,s),a=t1(Vn(new De(e.a,e.b),t),s),g=p.Math.sqrt(i.a*i.a+i.b*i.b)*.5,c=0&&k<=1&&E>=0&&E<=1?Vn(new De(e.a,e.b),oh(new De(t.a,t.b),k)):null}function tWt(e,t,n){var i,s,c,a,g;if(i=u(N(e,(xe(),KV)),21),n.a>t.a&&(i.Hc((Nb(),RC))?e.c.a+=(n.a-t.a)/2:i.Hc(LC)&&(e.c.a+=n.a-t.a)),n.b>t.b&&(i.Hc((Nb(),FC))?e.c.b+=(n.b-t.b)/2:i.Hc(BC)&&(e.c.b+=n.b-t.b)),u(N(e,(ae(),Po)),21).Hc((ns(),Ul))&&(n.a>t.a||n.b>t.b))for(g=new R(e.a);g.at.a&&(i.Hc((Nb(),RC))?e.c.a+=(n.a-t.a)/2:i.Hc(LC)&&(e.c.a+=n.a-t.a)),n.b>t.b&&(i.Hc((Nb(),FC))?e.c.b+=(n.b-t.b)/2:i.Hc(BC)&&(e.c.b+=n.b-t.b)),u(N(e,(ae(),Po)),21).Hc((ns(),Ul))&&(n.a>t.a||n.b>t.b))for(a=new R(e.a);a.at&&(s=0,c+=y.b+n,k.c[k.c.length]=y,y=new Vie(c,n),i=new xH(0,y.f,y,n),dP(y,i),s=0),i.b.c.length==0||w.f>=i.o&&w.f<=i.f||i.a*.5<=w.f&&i.a*1.5>=w.f?ooe(i,w):(a=new xH(i.s+i.r+n,y.f,y,n),dP(y,a),ooe(a,w)),s=w.i+w.g;return k.c[k.c.length]=y,k}function Bm(e){var t,n,i,s,c,a,g,w;if(!e.a){if(e.o=null,w=new CMe(e),t=new X8e,n=cx,g=n.a.zc(e,n),g==null){for(a=new Ft(Ss(e));a.e!=a.i.gc();)c=u(Qt(a),26),vi(w,Bm(c));n.a.Bc(e)!=null,n.a.gc()==0}for(s=(!e.s&&(e.s=new we(dc,e,21,17)),new Ft(e.s));s.e!=s.i.gc();)i=u(Qt(s),170),W(i,322)&&rn(t,u(i,34));Eb(t),e.k=new MRe(e,(u(V(re((Yd(),bt).o),7),18),t.i),t.g),vi(w,e.k),Eb(w),e.a=new rm((u(V(re(bt.o),4),18),w.i),w.g),qc(e).b&=-2}return e.a}function sWt(e,t,n,i,s,c,a){var g,w,m,y,k,E;return k=!1,w=CGe(n.q,t.f+t.b-n.q.f),E=s-(n.q.e+w-a),E=(pt(c,e.c.length),u(e.c[c],200)).e,y=(g=xS(i,E,!1),g.a),y>t.b&&!m)?!1:((m||y<=t.b)&&(m&&y>t.b?(n.d=y,c9(n,MXe(n,y))):(XVe(n.q,w),n.c=!0),c9(i,s-(n.s+n.r)),Q9(i,n.q.e+n.q.d,t.f),dP(t,i),e.c.length>c&&(X9((pt(c,e.c.length),u(e.c[c],200)),i),(pt(c,e.c.length),u(e.c[c],200)).a.c.length==0&&ed(e,c)),k=!0),k)}function hue(e,t,n,i){var s,c,a,g,w,m,y;if(y=Ko(e.e.Tg(),t),s=0,c=u(e.g,119),w=null,Vr(),u(t,66).Oj()){for(g=0;ge.o.a&&(y=(w-e.o.a)/2,g.b=p.Math.max(g.b,y),g.c=p.Math.max(g.c,y))}}function cWt(e){var t,n,i,s,c,a,g,w;for(c=new GFe,W4t(c,(Lv(),Cat)),i=(s=aH(e,J(Te,fe,2,0,6,1)),new T4(new Jc(new bB(e,s).b)));i.b0?e.i:0)>t&&w>0&&(c=0,a+=w+e.i,s=p.Math.max(s,E),i+=w+e.i,w=0,E=0,n&&(++k,ge(e.n,new PM(e.s,a,e.i))),g=0),E+=m.g+(g>0?e.i:0),w=p.Math.max(w,m.f),n&&qoe(u(Me(e.n,k),211),m),c+=m.g+(g>0?e.i:0),++g;return s=p.Math.max(s,E),i+=w,n&&(e.r=s,e.d=i,Koe(e.j)),new Ll(e.s,e.t,s,i)}function vo(e,t,n,i,s){Rh();var c,a,g,w,m,y,k,E,M;if(hie(e,"src"),hie(n,"dest"),E=zc(e),w=zc(n),Nne((E.i&4)!=0,"srcType is not an array"),Nne((w.i&4)!=0,"destType is not an array"),k=E.c,a=w.c,Nne((k.i&1)!=0?k==a:(a.i&1)==0,"Array types don't match"),M=e.length,m=n.length,t<0||i<0||s<0||t+s>M||i+s>m)throw F(new TJ);if((k.i&1)==0&&E!=w)if(y=bg(e),c=bg(n),ie(e)===ie(n)&&ti;)pi(c,g,y[--t]);else for(g=i+s;i0&&Yce(e,t,n,i,s,!0)}function OQ(){OQ=X,krt=H(_(Zt,1),On,25,15,[Mr,1162261467,MS,1220703125,362797056,1977326743,MS,387420489,Zj,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,128e7,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729e6,887503681,MS,1291467969,1544804416,1838265625,60466176]),Srt=H(_(Zt,1),On,25,15,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5])}function lWt(e){var t,n,i,s,c,a,g,w;for(s=new R(e.b);s.a=e.b.length?(c[s++]=a.b[i++],c[s++]=a.b[i++]):i>=a.b.length?(c[s++]=e.b[n++],c[s++]=e.b[n++]):a.b[i]0?e.i:0)),++t;for(yDt(e.n,w),e.d=n,e.r=i,e.g=0,e.f=0,e.e=0,e.o=Oi,e.p=Oi,c=new R(e.b);c.a0&&(s=(!e.n&&(e.n=new we(Rs,e,1,7)),u(V(e.n,0),137)).a,!s||wn(wn((t.a+=' "',t),s),'"'))),n=(!e.b&&(e.b=new dt(Wt,e,4,7)),!(e.b.i<=1&&(!e.c&&(e.c=new dt(Wt,e,5,8)),e.c.i<=1))),n?t.a+=" [":t.a+=" ",wn(t,Ote(new hB,new Ft(e.b))),n&&(t.a+="]"),t.a+=Bz,n&&(t.a+="["),wn(t,Ote(new hB,new Ft(e.c))),n&&(t.a+="]"),t.a)}function kQ(e,t){var n,i,s,c,a,g,w;if(e.a){if(g=e.a.ne(),w=null,g!=null?t.a+=""+g:(a=e.a.Dj(),a!=null&&(c=sh(a,lc(91)),c!=-1?(w=a.substr(c),t.a+=""+gl(a==null?uc:(vt(a),a),0,c)):t.a+=""+a)),e.d&&e.d.i!=0){for(s=!0,t.a+="<",i=new Ft(e.d);i.e!=i.i.gc();)n=u(Qt(i),87),s?s=!1:t.a+=Qr,kQ(n,t);t.a+=">"}w!=null&&(t.a+=""+w)}else e.e?(g=e.e.zb,g!=null&&(t.a+=""+g)):(t.a+="?",e.b?(t.a+=" super ",kQ(e.b,t)):e.f&&(t.a+=" extends ",kQ(e.f,t)))}function hWt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt;for(ce=e.c,be=t.c,n=Ds(ce.a,e,0),i=Ds(be.a,t,0),U=u(Z0(e,(es(),Nc)).Kc().Pb(),11),Ue=u(Z0(e,_o).Kc().Pb(),11),te=u(Z0(t,Nc).Kc().Pb(),11),Mt=u(Z0(t,_o).Kc().Pb(),11),q=hh(U.e),Se=hh(Ue.g),G=hh(te.e),_e=hh(Mt.g),$b(e,i,be),a=G,y=0,P=a.length;yy?new hg((cf(),mw),n,t,m-y):m>0&&y>0&&(new hg((cf(),mw),t,n,0),new hg(mw,n,t,0))),a)}function yZe(e,t){var n,i,s,c,a,g;for(a=new kg(new eg(e.f.b).a);a.b;){if(c=Q0(a),s=u(c.cd(),594),t==1){if(s.gf()!=(ts(),Ia)&&s.gf()!=Na)continue}else if(s.gf()!=(ts(),bu)&&s.gf()!=Ku)continue;switch(i=u(u(c.dd(),46).b,81),g=u(u(c.dd(),46).a,189),n=g.c,s.gf().g){case 2:i.g.c=e.e.a,i.g.b=p.Math.max(1,i.g.b+n);break;case 1:i.g.c=i.g.c+n,i.g.b=p.Math.max(1,i.g.b-n);break;case 4:i.g.d=e.e.b,i.g.a=p.Math.max(1,i.g.a+n);break;case 3:i.g.d=i.g.d+n,i.g.a=p.Math.max(1,i.g.a-n)}}}function aWt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D;for(g=J(Zt,On,25,t.b.c.length,15,1),m=J(rV,de,267,t.b.c.length,0,1),w=J(ta,dd,10,t.b.c.length,0,1),k=e.a,E=0,M=k.length;E0&&w[i]&&(P=cm(e.b,w[i],s)),D=p.Math.max(D,s.c.c.b+P);for(c=new R(y.e);c.a1)throw F(new Ot(U7));w||(c=Qh(t,i.Kc().Pb()),a.Fc(c))}return kse(e,qce(e,t,n),a)}function pWt(e,t){var n,i,s,c;for(ZAt(t.b.j),Ti(ec(new ht(null,new gt(t.d,16)),new e6e),new t6e),c=new R(t.d);c.ae.o.b||(n=Qs(e,At),g=t.d+t.a+(n.gc()-1)*a,g>e.o.b)))}function CQ(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P;if(a=e.e,w=t.e,a==0)return t;if(w==0)return e;if(c=e.d,g=t.d,c+g==2)return n=Vi(e.a[0],is),i=Vi(t.a[0],is),a==w?(y=$r(n,i),P=en(y),M=en(db(y,32)),M==0?new td(a,P):new fm(a,2,H(_(Zt,1),On,25,15,[P,M]))):q9(a<0?c1(i,n):c1(n,i));if(a==w)E=a,k=c>=g?H_(e.a,c,t.a,g):H_(t.a,g,e.a,c);else{if(s=c!=g?c>g?1:-1:Lse(e.a,t.a,c),s==0)return h1(),gk;s==1?(E=a,k=F_(e.a,c,t.a,g)):(E=w,k=F_(t.a,g,e.a,c))}return m=new fm(E,k.length,k),N5(m),m}function TQ(e,t,n,i,s,c,a){var g,w,m,y,k,E,M;return k=je(Pe(N(t,(xe(),spe)))),E=null,c==(es(),Nc)&&i.c.i==n?E=i.c:c==_o&&i.d.i==n&&(E=i.d),m=a,!m||!k||E?(y=(ye(),Ks),E?y=E.j:sm(u(N(n,Si),98))&&(y=c==Nc?xt:At),w=vWt(e,t,n,c,y,i),g=L_((Rr(n),i)),c==Nc?(Dr(g,u(Me(w.j,0),11)),gr(g,s)):(Dr(g,s),gr(g,u(Me(w.j,0),11))),m=new FWe(i,g,w,u(N(w,(ae(),zn)),11),c,!E)):(ge(m.e,i),M=p.Math.max(oe(Oe(N(m.d,md))),oe(Oe(N(i,md)))),ue(m.d,md,M)),Ye(e.a,i,new qA(m.d,t,c)),m}function Hj(e,t){var n,i,s,c,a,g,w,m,y,k;if(y=null,e.d&&(y=u(ko(e.d,t),138)),!y){if(c=e.a.Mh(),k=c.i,!e.d||H4(e.d)!=k){for(w=new Jt,e.d&&K5(w,e.d),m=w.f.c+w.g.c,g=m;g0?(M=(P-1)*n,g&&(M+=i),y&&(M+=i),M=e.b[s+1])s+=2;else if(n0)for(i=new mc(u(Wn(e.a,c),21)),rt(),ir(i,new pJ(t)),s=new vr(c.b,0);s.bce)?(w=2,a=_n):w==0?(w=1,a=Se):(w=0,a=Se)):(M=Se>=a||a-Se0?1:S0(isNaN(i),isNaN(0)))>=0^(Bu(Oh),(p.Math.abs(g)<=Oh||g==0||isNaN(g)&&isNaN(0)?0:g<0?-1:g>0?1:S0(isNaN(g),isNaN(0)))>=0)?p.Math.max(g,i):(Bu(Oh),(p.Math.abs(i)<=Oh||i==0||isNaN(i)&&isNaN(0)?0:i<0?-1:i>0?1:S0(isNaN(i),isNaN(0)))>0?p.Math.sqrt(g*g+i*i):-p.Math.sqrt(g*g+i*i))}function Pg(e,t){var n,i,s,c,a,g;if(t){if(!e.a&&(e.a=new PE),e.e==2){ME(e.a,t);return}if(t.e==1){for(s=0;s=zr?us(n,soe(i)):R3(n,i&Ni),a=new g_(10,null,0),o9t(e.a,a,g-1)):(n=(a.bm().length+c,new B4),us(n,a.bm())),t.e==0?(i=t._l(),i>=zr?us(n,soe(i)):R3(n,i&Ni)):us(n,t.bm()),u(a,521).b=n.a}}function AZe(e){var t,n,i,s,c;return e.g!=null?e.g:e.a<32?(e.g=zVt(cc(e.f),Di(e.e)),e.g):(s=IQ((!e.c&&(e.c=$9(e.f)),e.c),0),e.e==0?s:(t=(!e.c&&(e.c=$9(e.f)),e.c).e<0?2:1,n=s.length,i=-e.e+n-t,c=new Fd,c.a+=""+s,e.e>0&&i>=-6?i>=0?Z8(c,n-Di(e.e),"."):(c.a=gl(c.a,0,t-1)+"0."+E8(c.a,t-1),Z8(c,t+1,ah(Qg,0,-Di(i)-1))):(n-t>=1&&(Z8(c,t,"."),++n),Z8(c,n,"E"),i>0&&Z8(c,++n,"+"),Z8(c,++n,""+x5(cc(i)))),e.g=c.a,e.g))}function DWt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B;if(!n.dc()){for(g=0,E=0,i=n.Kc(),P=u(i.Pb(),19).a;g1&&(w=m.mg(w,e.a,g));return w.c.length==1?u(Me(w,w.c.length-1),220):w.c.length==2?OWt((pt(0,w.c.length),u(w.c[0],220)),(pt(1,w.c.length),u(w.c[1],220)),a,c):null}function MZe(e){var t,n,i,s,c,a;for(rc(e.a,new AL),n=new R(e.a);n.a=p.Math.abs(i.b)?(i.b=0,c.d+c.a>a.d&&c.da.c&&c.c0){if(t=new Yee(e.i,e.g),n=e.i,c=n<100?null:new _d(n),e.ij())for(i=0;i0){for(g=e.g,m=e.i,F5(e),c=m<100?null:new _d(m),i=0;i>13|(e.m&15)<<9,s=e.m>>4&8191,c=e.m>>17|(e.h&255)<<5,a=(e.h&1048320)>>8,g=t.l&8191,w=t.l>>13|(t.m&15)<<9,m=t.m>>4&8191,y=t.m>>17|(t.h&255)<<5,k=(t.h&1048320)>>8,_e=n*g,Ue=i*g,Mt=s*g,Pt=c*g,Yt=a*g,w!=0&&(Ue+=n*w,Mt+=i*w,Pt+=s*w,Yt+=c*w),m!=0&&(Mt+=n*m,Pt+=i*m,Yt+=s*m),y!=0&&(Pt+=n*y,Yt+=i*y),k!=0&&(Yt+=n*k),M=_e&Xc,P=(Ue&511)<<13,E=M+P,B=_e>>22,q=Ue>>9,G=(Mt&262143)<<4,U=(Pt&31)<<17,D=B+q+G+U,ce=Mt>>18,be=Pt>>5,Se=(Yt&4095)<<8,te=ce+be+Se,D+=E>>22,E&=Xc,te+=D>>22,D&=Xc,te&=Pa,Qo(E,D,te)}function PZe(e){var t,n,i,s,c,a,g;if(g=u(Me(e.j,0),11),g.g.c.length!=0&&g.e.c.length!=0)throw F(new Ps("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges."));if(g.g.c.length!=0){for(c=Oi,n=new R(g.g);n.a4)if(e.wj(t)){if(e.rk()){if(s=u(t,49),i=s.Ug(),w=i==e.e&&(e.Dk()?s.Og(s.Vg(),e.zk())==e.Ak():-1-s.Vg()==e.aj()),e.Ek()&&!w&&!i&&s.Zg()){for(c=0;c0&&(m=e.n.a/c);break;case 2:case 4:s=e.i.o.b,s>0&&(m=e.n.b/s)}ue(e,(ae(),Tp),m)}if(w=e.o,a=e.a,i)a.a=i.a,a.b=i.b,e.d=!0;else if(t!=Gf&&t!=D1&&g!=Ks)switch(g.g){case 1:a.a=w.a/2;break;case 2:a.a=w.a,a.b=w.b/2;break;case 3:a.a=w.a/2,a.b=w.b;break;case 4:a.b=w.b/2}else a.a=w.a/2,a.b=w.b/2}function TS(e){var t,n,i,s,c,a,g,w,m,y;if(e.ej())if(y=e.Vi(),w=e.fj(),y>0)if(t=new use(e.Gi()),n=y,c=n<100?null:new _d(n),$8(e,n,t.g),s=n==1?e.Zi(4,V(t,0),null,0,w):e.Zi(6,t,null,-1,w),e.bj()){for(i=new Ft(t);i.e!=i.i.gc();)c=e.dj(Qt(i),c);c?(c.Ei(s),c.Fi()):e.$i(s)}else c?(c.Ei(s),c.Fi()):e.$i(s);else $8(e,e.Vi(),e.Wi()),e.$i(e.Zi(6,(rt(),Yr),null,-1,w));else if(e.bj())if(y=e.Vi(),y>0){for(g=e.Wi(),m=y,$8(e,y,g),c=m<100?null:new _d(m),i=0;ie.d[a.p]&&(n+=cre(e.b,c)*u(w.b,19).a,e1(e.a,me(c)));for(;!I4(e.a);)Bre(e.b,u(kv(e.a),19).a)}return n}function zWt(e,t,n,i){var s,c,a,g,w,m,y,k,E,M,P,D,B;for(k=new ps(u($e(e,(vj(),Awe)),8)),k.a=p.Math.max(k.a-n.b-n.c,0),k.b=p.Math.max(k.b-n.d-n.a,0),s=Oe($e(e,Cwe)),(s==null||(vt(s),s<=0))&&(s=1.3),g=new pe,P=new Ft((!e.a&&(e.a=new we(mi,e,10,11)),e.a));P.e!=P.i.gc();)M=u(Qt(P),33),a=new cIe(M),g.c[g.c.length]=a;switch(E=u($e(e,nU),311),E.g){case 3:B=azt(g,t,k.a,k.b,(m=i,vt(s),m));break;case 1:B=Bzt(g,t,k.a,k.b,(y=i,vt(s),y));break;default:B=VWt(g,t,k.a,k.b,(w=i,vt(s),w))}c=new fP(B),D=$Q(c,t,n,k.a,k.b,i,(vt(s),s)),lp(e,D.a,D.b,!1,!0)}function WWt(e,t){var n,i,s,c;n=t.b,c=new mc(n.j),s=0,i=n.j,i.c=J(It,Ee,1,0,5,1),j0(u(mg(e.b,(ye(),yt),(V0(),kp)),15),n),s=W9(c,s,new jSe,i),j0(u(mg(e.b,yt,S1),15),n),s=W9(c,s,new PSe,i),j0(u(mg(e.b,yt,Op),15),n),j0(u(mg(e.b,At,kp),15),n),j0(u(mg(e.b,At,S1),15),n),s=W9(c,s,new DSe,i),j0(u(mg(e.b,At,Op),15),n),j0(u(mg(e.b,Xt,kp),15),n),s=W9(c,s,new $Se,i),j0(u(mg(e.b,Xt,S1),15),n),s=W9(c,s,new NSe,i),j0(u(mg(e.b,Xt,Op),15),n),j0(u(mg(e.b,xt,kp),15),n),s=W9(c,s,new WSe,i),j0(u(mg(e.b,xt,S1),15),n),j0(u(mg(e.b,xt,Op),15),n)}function KWt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D;for(Vt(t,"Layer size calculation",1),y=Oi,m=Li,s=!1,g=new R(e.b);g.a.5?q-=a*2*(P-.5):P<.5&&(q+=c*2*(.5-P)),s=g.d.b,qB.a-D-y&&(q=B.a-D-y),g.n.a=t+q}}function VWt(e,t,n,i,s){var c,a,g,w,m,y,k,E,M,P,D,B;for(g=J(hr,ds,25,e.c.length,15,1),E=new uM(new T8e),Goe(E,e),m=0,D=new pe;E.b.c.length!=0;)if(a=u(E.b.c.length==0?null:Me(E.b,0),157),m>1&&vc(a)*nl(a)/2>g[0]){for(c=0;cg[c];)++c;P=new qh(D,0,c+1),k=new fP(P),y=vc(a)/nl(a),w=$Q(k,t,new rv,n,i,s,y),Vn(of(k.e),w),V3(PO(E,k)),M=new qh(D,c+1,D.c.length),Goe(E,M),D.c=J(It,Ee,1,0,5,1),m=0,oLe(g,g.length,0)}else B=E.b.c.length==0?null:Me(E.b,0),B!=null&&fH(E,0),m>0&&(g[m]=g[m-1]),g[m]+=vc(a)*nl(a),++m,D.c[D.c.length]=a;return D}function XWt(e){var t,n,i,s,c;if(i=u(N(e,(xe(),Xo)),163),i==(zl(),x1)){for(n=new _t(qt($s(e).a.Kc(),new L));an(n);)if(t=u(nn(n),17),!wHe(t))throw F(new Yw(Hz+K9(e)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges."))}else if(i==lw){for(c=new _t(qt(qi(e).a.Kc(),new L));an(c);)if(s=u(nn(c),17),!wHe(s))throw F(new Yw(Hz+K9(e)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges."))}}function UWt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P;for(Vt(t,"Label dummy removal",1),i=oe(Oe(N(e,(xe(),Sy)))),s=oe(Oe(N(e,bw))),m=u(N(e,El),103),w=new R(e.b);w.a0&&LXe(e,g,k);for(s=new R(k);s.a>19!=0&&(t=aO(t),w=!w),a=X_t(t),c=!1,s=!1,i=!1,e.h==C7&&e.m==0&&e.l==0)if(s=!0,c=!0,a==-1)e=Z$e((Y3(),ede)),i=!0,w=!w;else return g=dle(e,a),w&&yH(g),n&&(v1=Qo(0,0,0)),g;else e.h>>19!=0&&(c=!0,e=aO(e),i=!0,w=!w);return a!=-1?IPt(e,a,w,c,n):rce(e,t)<0?(n&&(c?v1=aO(e):v1=Qo(e.l,e.m,e.h)),Qo(0,0,0)):FQt(i?e:Qo(e.l,e.m,e.h),t,w,c,s,n)}function qj(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P;if(e.e&&e.c.ct.f||t.g>e.f)){for(n=0,i=0,a=e.w.a.ec().Kc();a.Ob();)s=u(a.Pb(),11),DH(qs(H(_(tr,1),fe,8,0,[s.i.n,s.n,s.a])).b,t.g,t.f)&&++n;for(g=e.r.a.ec().Kc();g.Ob();)s=u(g.Pb(),11),DH(qs(H(_(tr,1),fe,8,0,[s.i.n,s.n,s.a])).b,t.g,t.f)&&--n;for(w=t.w.a.ec().Kc();w.Ob();)s=u(w.Pb(),11),DH(qs(H(_(tr,1),fe,8,0,[s.i.n,s.n,s.a])).b,e.g,e.f)&&++i;for(c=t.r.a.ec().Kc();c.Ob();)s=u(c.Pb(),11),DH(qs(H(_(tr,1),fe,8,0,[s.i.n,s.n,s.a])).b,e.g,e.f)&&--i;n=0)return s=rDt(e,t.substr(1,a-1)),y=t.substr(a+1,w-(a+1)),JVt(e,y,s)}else{if(n=-1,sde==null&&(sde=new RegExp("\\d")),sde.test(String.fromCharCode(g))&&(n=hne(t,lc(46),w-1),n>=0)){i=u(B_(e,uQe(e,t.substr(1,n-1)),!1),58),m=0;try{m=kl(t.substr(n+1),Mr,_n)}catch(E){throw E=fi(E),W(E,127)?(c=E,F(new eP(c))):F(E)}if(m=0)return n;switch(N0(ms(e,n))){case 2:{if(et("",sd(e,n.Hj()).ne())){if(w=K8(ms(e,n)),g=F3(ms(e,n)),y=yle(e,t,w,g),y)return y;for(s=Vle(e,t),a=0,k=s.gc();a1)throw F(new Ot(U7));for(y=Ko(e.e.Tg(),t),i=u(e.g,119),a=0;a1,m=new Nf(E.b);Fs(m.a)||Fs(m.b);)w=u(Fs(m.a)?I(m.a):I(m.b),17),k=w.c==E?w.d:w.c,p.Math.abs(qs(H(_(tr,1),fe,8,0,[k.i.n,k.n,k.a])).b-a.b)>1&&ZHt(e,w,a,c,E)}}function cKt(e){var t,n,i,s,c,a;if(s=new vr(e.e,0),i=new vr(e.a,0),e.d)for(n=0;nOW;){for(c=t,a=0;p.Math.abs(t-c)0),s.a.Xb(s.c=--s.b),xzt(e,e.b-a,c,i,s),Rt(s.b0),i.a.Xb(i.c=--i.b)}if(!e.d)for(n=0;n0?(e.f[y.p]=M/(y.e.c.length+y.g.c.length),e.c=p.Math.min(e.c,e.f[y.p]),e.b=p.Math.max(e.b,e.f[y.p])):g&&(e.f[y.p]=M)}}function uKt(e){e.b=null,e.bb=null,e.fb=null,e.qb=null,e.a=null,e.c=null,e.d=null,e.e=null,e.f=null,e.n=null,e.M=null,e.L=null,e.Q=null,e.R=null,e.K=null,e.db=null,e.eb=null,e.g=null,e.i=null,e.j=null,e.k=null,e.gb=null,e.o=null,e.p=null,e.q=null,e.r=null,e.$=null,e.ib=null,e.S=null,e.T=null,e.t=null,e.s=null,e.u=null,e.v=null,e.w=null,e.B=null,e.A=null,e.C=null,e.D=null,e.F=null,e.G=null,e.H=null,e.I=null,e.J=null,e.P=null,e.Z=null,e.U=null,e.V=null,e.W=null,e.X=null,e.Y=null,e._=null,e.ab=null,e.cb=null,e.hb=null,e.nb=null,e.lb=null,e.mb=null,e.ob=null,e.pb=null,e.jb=null,e.kb=null,e.N=!1,e.O=!1}function fKt(e,t,n){var i,s,c,a;for(Vt(n,"Graph transformation ("+e.a+")",1),a=B0(t.a),c=new R(t.b);c.a0&&(e.a=w+(M-1)*c,t.c.b+=e.a,t.f.b+=e.a)),P.a.gc()!=0&&(E=new VF(1,c),M=vue(E,t,P,D,t.f.b+w-t.c.b),M>0&&(t.f.b+=w+(M-1)*c))}function qO(e,t){var n,i,s,c;c=e.F,t==null?(e.F=null,pO(e,null)):(e.F=(vt(t),t),i=sh(t,lc(60)),i!=-1?(s=t.substr(0,i),sh(t,lc(46))==-1&&!et(s,Uv)&&!et(s,ZS)&&!et(s,qD)&&!et(s,JS)&&!et(s,e6)&&!et(s,t6)&&!et(s,n6)&&!et(s,i6)&&(s=yit),n=jA(t,lc(62)),n!=-1&&(s+=""+t.substr(n+1)),pO(e,s)):(s=t,sh(t,lc(46))==-1&&(i=sh(t,lc(91)),i!=-1&&(s=t.substr(0,i)),!et(s,Uv)&&!et(s,ZS)&&!et(s,qD)&&!et(s,JS)&&!et(s,e6)&&!et(s,t6)&&!et(s,n6)&&!et(s,i6)?(s=yit,i!=-1&&(s+=""+t.substr(i))):s=t),pO(e,s),s==t&&(e.F=e.D))),(e.Db&4)!=0&&(e.Db&1)==0&&Hn(e,new rr(e,1,5,c,t))}function aKt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U;if(D=t.b.c.length,!(D<3)){for(M=J(Zt,On,25,D,15,1),k=0,y=new R(t.b);y.aa)&&Ki(e.b,u(B.b,17));++g}c=a}}}function bue(e,t){var n;if(t==null||et(t,uc)||t.length==0&&e.k!=(hd(),Cy))return null;switch(e.k.g){case 1:return YP(t,sk)?(kt(),ak):YP(t,RW)?(kt(),qg):null;case 2:try{return me(kl(t,Mr,_n))}catch(i){if(i=fi(i),W(i,127))return null;throw F(i)}case 4:try{return Rb(t)}catch(i){if(i=fi(i),W(i,127))return null;throw F(i)}case 3:return t;case 5:return bWe(e),kUe(e,t);case 6:return bWe(e),k_t(e,e.a,t);case 7:try{return n=NFt(e),n.Jf(t),n}catch(i){if(i=fi(i),W(i,32))return null;throw F(i)}default:throw F(new Ps("Invalid type set for this layout option."))}}function dKt(e){H5();var t,n,i,s,c,a,g;for(g=new VMe,n=new R(e);n.a=g.b.c)&&(g.b=t),(!g.c||t.c<=g.c.c)&&(g.d=g.c,g.c=t),(!g.e||t.d>=g.e.d)&&(g.e=t),(!g.f||t.d<=g.f.d)&&(g.f=t);return i=new tj((hO(),yp)),e9(e,Tot,new Jc(H(_(lC,1),Ee,369,0,[i]))),a=new tj(rw),e9(e,Cot,new Jc(H(_(lC,1),Ee,369,0,[a]))),s=new tj(iw),e9(e,xot,new Jc(H(_(lC,1),Ee,369,0,[s]))),c=new tj(t2),e9(e,Sot,new Jc(H(_(lC,1),Ee,369,0,[c]))),Zq(i.c,yp),Zq(s.c,iw),Zq(c.c,t2),Zq(a.c,rw),g.a.c=J(It,Ee,1,0,5,1),_i(g.a,i.c),_i(g.a,wg(s.c)),_i(g.a,c.c),_i(g.a,wg(a.c)),g}function wue(e){var t;switch(e.d){case 1:{if(e.hj())return e.o!=-2;break}case 2:{if(e.hj())return e.o==-2;break}case 3:case 5:case 4:case 6:case 7:return e.o>-2;default:return!1}switch(t=e.gj(),e.p){case 0:return t!=null&&je(Pe(t))!=c5(e.k,0);case 1:return t!=null&&u(t,217).a!=en(e.k)<<24>>24;case 2:return t!=null&&u(t,172).a!=(en(e.k)&Ni);case 6:return t!=null&&c5(u(t,162).a,e.k);case 5:return t!=null&&u(t,19).a!=en(e.k);case 7:return t!=null&&u(t,184).a!=en(e.k)<<16>>16;case 3:return t!=null&&oe(Oe(t))!=e.j;case 4:return t!=null&&u(t,155).a!=e.j;default:return t==null?e.n!=null:!qn(t,e.n)}}function w7(e,t,n){var i,s,c,a;return e.Fk()&&e.Ek()&&(a=FF(e,u(n,56)),ie(a)!==ie(n))?(e.Oi(t),e.Ui(t,fqe(e,t,a)),e.rk()&&(c=(s=u(n,49),e.Dk()?e.Bk()?s.ih(e.b,Ur(u(ct(tc(e.b),e.aj()),18)).n,u(ct(tc(e.b),e.aj()).Yj(),26).Bj(),null):s.ih(e.b,ui(s.Tg(),Ur(u(ct(tc(e.b),e.aj()),18))),null,null):s.ih(e.b,-1-e.aj(),null,null)),!u(a,49).eh()&&(c=(i=u(a,49),e.Dk()?e.Bk()?i.gh(e.b,Ur(u(ct(tc(e.b),e.aj()),18)).n,u(ct(tc(e.b),e.aj()).Yj(),26).Bj(),c):i.gh(e.b,ui(i.Tg(),Ur(u(ct(tc(e.b),e.aj()),18))),null,c):i.gh(e.b,-1-e.aj(),null,c))),c&&c.Fi()),el(e.b)&&e.$i(e.Zi(9,n,a,t,!1)),a):n}function NZe(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te;for(y=oe(Oe(N(e,(xe(),Pp)))),i=oe(Oe(N(e,bpe))),E=new IL,ue(E,Pp,y+i),m=t,q=m.d,D=m.c.i,G=m.d.i,B=nte(D.c),U=nte(G.c),s=new pe,k=B;k<=U;k++)g=new Ta(e),J1(g,(jt(),sr)),ue(g,(ae(),zn),m),ue(g,Si,(br(),jo)),ue(g,SN,E),M=u(Me(e.b,k),29),k==B?$b(g,M.a.c.length-n,M):ws(g,M),te=oe(Oe(N(m,md))),te<0&&(te=0,ue(m,md,te)),g.o.b=te,P=p.Math.floor(te/2),a=new mo,Xi(a,(ye(),xt)),_s(a,g),a.n.b=P,w=new mo,Xi(w,At),_s(w,g),w.n.b=P,gr(m,a),c=new I0,Cs(c,m),ue(c,Os,null),Dr(c,w),gr(c,q),bIt(g,m,c),s.c[s.c.length]=c,m=c;return s}function MQ(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U;for(w=u(fd(e,(ye(),xt)).Kc().Pb(),11).e,M=u(fd(e,At).Kc().Pb(),11).g,g=w.c.length,U=jf(u(Me(e.j,0),11));g-- >0;){for(D=(pt(0,w.c.length),u(w.c[0],17)),s=(pt(0,M.c.length),u(M.c[0],17)),G=s.d.e,c=Ds(G,s,0),yTt(D,s.d,c),Dr(s,null),gr(s,null),P=D.a,t&&Tn(P,new ps(U)),i=Cn(s.a,0);i.b!=i.d.c;)n=u(xn(i),8),Tn(P,new ps(n));for(q=D.b,E=new R(s.b);E.a0&&(a=p.Math.max(a,lze(e.C.b+i.d.b,s))),y=i,k=s,E=c;e.C&&e.C.c>0&&(M=E+e.C.c,m&&(M+=y.d.c),a=p.Math.max(a,(Ef(),Bu(qf),p.Math.abs(k-1)<=qf||k==1||isNaN(k)&&isNaN(1)?0:M/(1-k)))),n.n.b=0,n.a.a=a}function RZe(e,t){var n,i,s,c,a,g,w,m,y,k,E,M;if(n=u(fs(e.b,t),124),w=u(u(Wn(e.r,t),21),84),w.dc()){n.n.d=0,n.n.a=0;return}for(m=e.u.Hc((Dc(),La)),a=0,e.A.Hc((cl(),n0))&&pYe(e,t),g=w.Kc(),y=null,E=0,k=0;g.Ob();)i=u(g.Pb(),111),c=oe(Oe(i.b.We((DA(),b$)))),s=i.b.rf().b,y?(M=k+y.d.a+e.w+i.d.d,a=p.Math.max(a,(Ef(),Bu(qf),p.Math.abs(E-c)<=qf||E==c||isNaN(E)&&isNaN(c)?0:M/(c-E)))):e.C&&e.C.d>0&&(a=p.Math.max(a,lze(e.C.d+i.d.d,c))),y=i,E=c,k=s;e.C&&e.C.a>0&&(M=k+e.C.a,m&&(M+=y.d.a),a=p.Math.max(a,(Ef(),Bu(qf),p.Math.abs(E-1)<=qf||E==1||isNaN(E)&&isNaN(1)?0:M/(1-E)))),n.n.d=0,n.a.b=a}function LZe(e,t,n){var i,s,c,a,g,w;for(this.g=e,g=t.d.length,w=n.d.length,this.d=J(ta,dd,10,g+w,0,1),a=0;a0?nH(this,this.f/this.a):Af(t.g,t.d[0]).a!=null&&Af(n.g,n.d[0]).a!=null?nH(this,(oe(Af(t.g,t.d[0]).a)+oe(Af(n.g,n.d[0]).a))/2):Af(t.g,t.d[0]).a!=null?nH(this,Af(t.g,t.d[0]).a):Af(n.g,n.d[0]).a!=null&&nH(this,Af(n.g,n.d[0]).a)}function gKt(e,t){var n,i,s,c,a,g,w,m,y,k;for(e.a=new WLe(QMt(X6)),i=new R(t.a);i.a=1&&(B-a>0&&k>=0?(w.n.a+=D,w.n.b+=c*a):B-a<0&&y>=0&&(w.n.a+=D*B,w.n.b+=c));e.o.a=t.a,e.o.b=t.b,ue(e,(xe(),Vg),(cl(),i=u(sf(tx),9),new Rl(i,u($u(i,i.length),9),0)))}function mKt(e,t,n,i,s,c){var a;if(!(t==null||!KH(t,Yme,Zme)))throw F(new Ot("invalid scheme: "+t));if(!e&&!(n!=null&&sh(n,lc(35))==-1&&n.length>0&&(fn(0,n.length),n.charCodeAt(0)!=47)))throw F(new Ot("invalid opaquePart: "+n));if(e&&!(t!=null&&u8(OI,t.toLowerCase()))&&!(n==null||!KH(n,sx,ox)))throw F(new Ot(cit+n));if(e&&t!=null&&u8(OI,t.toLowerCase())&&!hRt(n))throw F(new Ot(cit+n));if(!pDt(i))throw F(new Ot("invalid device: "+i));if(!ljt(s))throw a=s==null?"invalid segments: null":"invalid segment: "+rjt(s),F(new Ot(a));if(!(c==null||sh(c,lc(35))==-1))throw F(new Ot("invalid query: "+c))}function vKt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q;for(Vt(t,"Calculate Graph Size",1),t.n&&e&&Iu(t,Ru(e),(ol(),jl)),g=JO,w=JO,c=Hhe,a=Hhe,k=new Ft((!e.a&&(e.a=new we(mi,e,10,11)),e.a));k.e!=k.i.gc();)m=u(Qt(k),33),P=m.i,D=m.j,q=m.g,i=m.f,s=u($e(m,(Dn(),qC)),142),g=p.Math.min(g,P-s.b),w=p.Math.min(w,D-s.d),c=p.Math.max(c,P+q+s.c),a=p.Math.max(a,D+i+s.a);for(M=u($e(e,(Dn(),Jg)),116),E=new De(g-M.b,w-M.d),y=new Ft((!e.a&&(e.a=new we(mi,e,10,11)),e.a));y.e!=y.i.gc();)m=u(Qt(y),33),sc(m,m.i-E.a),oc(m,m.j-E.b);B=c-g+(M.b+M.c),n=a-w+(M.d+M.a),W0(e,B),z0(e,n),t.n&&e&&Iu(t,Ru(e),(ol(),jl))}function _Ze(e){var t,n,i,s,c,a,g,w,m,y;for(i=new pe,a=new R(e.e.a);a.a0){nj(e,n,0),n.a+=String.fromCharCode(i),s=r$t(t,c),nj(e,n,s),c+=s-1;continue}i==39?c+11)for(D=J(Zt,On,25,e.b.b.c.length,15,1),k=0,m=new R(e.b.b);m.a=g&&s<=w)g<=s&&c<=w?(n[y++]=s,n[y++]=c,i+=2):g<=s?(n[y++]=s,n[y++]=w,e.b[i]=w+1,a+=2):c<=w?(n[y++]=g,n[y++]=c,i+=2):(n[y++]=g,n[y++]=w,e.b[i]=w+1);else if(wd1)&&g<10);ree(e.c,new kke),HZe(e),l9t(e.c),bKt(e.f)}function SKt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B;if(je(Pe(N(n,(xe(),aw)))))for(g=new R(n.j);g.a=2){for(w=Cn(n,0),a=u(xn(w),8),g=u(xn(w),8);g.a0&&M9(m,!0,(ts(),Ku)),g.k==(jt(),Ri)&&gBe(m),Qn(e.f,g,t)}}function EKt(e,t,n){var i,s,c,a,g,w,m,y,k,E;switch(Vt(n,"Node promotion heuristic",1),e.g=t,$Vt(e),e.q=u(N(t,(xe(),JV)),260),y=u(N(e.g,npe),19).a,c=new c5e,e.q.g){case 2:case 1:HO(e,c);break;case 3:for(e.q=(Nm(),PN),HO(e,c),w=0,g=new R(e.a);g.ae.j&&(e.q=xC,HO(e,c));break;case 4:for(e.q=(Nm(),PN),HO(e,c),m=0,s=new R(e.b);s.ae.k&&(e.q=CC,HO(e,c));break;case 6:E=Di(p.Math.ceil(e.f.length*y/100)),HO(e,new SEe(E));break;case 5:k=Di(p.Math.ceil(e.d*y/100)),HO(e,new xEe(k));break;default:HO(e,c)}yqt(e,t),Ht(n)}function QZe(e,t,n){var i,s,c,a;this.j=e,this.e=Oce(e),this.o=this.j.e,this.i=!!this.o,this.p=this.i?u(Me(n,Rr(this.o).p),214):null,s=u(N(e,(ae(),Po)),21),this.g=s.Hc((ns(),Ul)),this.b=new pe,this.d=new hKe(this.e),a=u(N(this.j,vy),230),this.q=sPt(t,a,this.e),this.k=new aFe(this),c=$f(H(_(Xot,1),Ee,225,0,[this,this.d,this.k,this.q])),t==(K0(),EC)&&!je(Pe(N(e,(xe(),uw))))?(i=new Sce(this.e),c.c[c.c.length]=i,this.c=new Zie(i,a,u(this.q,402))):t==EC&&je(Pe(N(e,(xe(),uw))))?(i=new Sce(this.e),c.c[c.c.length]=i,this.c=new XQe(i,a,u(this.q,402))):this.c=new KDe(t,this),ge(c,this.c),xZe(c,this.e),this.s=uXt(this.k)}function AKt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te;for(k=u(AA((a=Cn(new Bd(t).a.d,0),new nv(a))),86),P=k?u(N(k,(oo(),PX)),86):null,s=1;k&&P;){for(w=0,te=0,n=k,i=P,g=0;g=e.i?(++e.i,ge(e.a,me(1)),ge(e.b,y)):(i=e.c[t.p][1],Fl(e.a,m,me(u(Me(e.a,m),19).a+1-i)),Fl(e.b,m,oe(Oe(Me(e.b,m)))+y-i*e.e)),(e.q==(Nm(),xC)&&(u(Me(e.a,m),19).a>e.j||u(Me(e.a,m-1),19).a>e.j)||e.q==CC&&(oe(Oe(Me(e.b,m)))>e.k||oe(Oe(Me(e.b,m-1)))>e.k))&&(w=!1),a=new _t(qt($s(t).a.Kc(),new L));an(a);)c=u(nn(a),17),g=c.c.i,e.f[g.p]==m&&(k=zZe(e,g),s=s+u(k.a,19).a,w=w&&je(Pe(k.b)));return e.f[t.p]=m,s=s+e.c[t.p][0],new mr(me(s),(kt(),!!w))}function vue(e,t,n,i,s){var c,a,g,w,m,y,k,E,M,P,D,B,q;for(k=new Jt,a=new pe,aUe(e,n,e.d.fg(),a,k),aUe(e,i,e.d.gg(),a,k),e.b=.2*(D=tGe(Hs(new ht(null,new gt(a,16)),new pxe)),B=tGe(Hs(new ht(null,new gt(a,16)),new bxe)),p.Math.min(D,B)),c=0,g=0;g=2&&(q=SGe(a,!0,E),!e.e&&(e.e=new EAe(e)),o$t(e.e,q,a,e.b)),iXe(a,E),zKt(a),M=-1,y=new R(a);y.ag)}function PKt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D;for(n=u(N(e,(xe(),Si)),98),a=e.f,c=e.d,g=a.a+c.b+c.c,w=0-c.d-e.c.b,y=a.b+c.d+c.a-e.c.b,m=new pe,k=new pe,s=new R(t);s.a0),u(y.a.Xb(y.c=--y.b),17));c!=i&&y.b>0;)e.a[c.p]=!0,e.a[i.p]=!0,c=(Rt(y.b>0),u(y.a.Xb(y.c=--y.b),17));y.b>0&&rl(y)}}function XZe(e,t,n){var i,s,c,a,g,w,m,y,k;if(e.a!=t.Aj())throw F(new Ot(ok+t.ne()+bp));if(i=sd((Oc(),Cr),t).$k(),i)return i.Aj().Nh().Ih(i,n);if(a=sd(Cr,t).al(),a){if(n==null)return null;if(g=u(n,15),g.dc())return"";for(k=new Va,c=g.Kc();c.Ob();)s=c.Pb(),us(k,a.Aj().Nh().Ih(a,s)),k.a+=" ";return GB(k,k.a.length-1)}if(y=sd(Cr,t).bl(),!y.dc()){for(m=y.Kc();m.Ob();)if(w=u(m.Pb(),148),w.wj(n))try{if(k=w.Aj().Nh().Ih(w,n),k!=null)return k}catch(E){if(E=fi(E),!W(E,102))throw F(E)}throw F(new Ot("Invalid value: '"+n+"' for datatype :"+t.ne()))}return u(t,834).Fj(),n==null?null:W(n,172)?""+u(n,172).a:zc(n)==c$?kNe(rx[0],u(n,199)):Ns(n)}function RKt(e){var t,n,i,s,c,a,g,w,m,y;for(m=new ai,g=new ai,c=new R(e);c.a-1){for(s=Cn(g,0);s.b!=s.d.c;)i=u(xn(s),128),i.v=a;for(;g.b!=0;)for(i=u(Sq(g,0),128),n=new R(i.i);n.a0&&(n+=w.n.a+w.o.a/2,++k),P=new R(w.j);P.a0&&(n/=k),q=J(hr,ds,25,i.a.c.length,15,1),g=0,m=new R(i.a);m.a=g&&s<=w)g<=s&&c<=w?i+=2:g<=s?(e.b[i]=w+1,a+=2):c<=w?(n[y++]=s,n[y++]=g-1,i+=2):(n[y++]=s,n[y++]=g-1,e.b[i]=w+1,a+=2);else if(w0?s-=864e5:s+=864e5,w=new Wte($r(cc(t.q.getTime()),s))),y=new Zw,m=e.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(a=c+1;a=m)throw F(new Ot("Missing trailing '"));a+10&&n.c==0&&(!t&&(t=new pe),t.c[t.c.length]=n);if(t)for(;t.c.length!=0;){if(n=u(ed(t,0),233),n.b&&n.b.c.length>0){for(c=(!n.b&&(n.b=new pe),new R(n.b));c.aDs(e,n,0))return new mr(s,n)}else if(oe(Af(s.g,s.d[0]).a)>oe(Af(n.g,n.d[0]).a))return new mr(s,n)}for(g=(!n.e&&(n.e=new pe),n.e).Kc();g.Ob();)a=u(g.Pb(),233),w=(!a.b&&(a.b=new pe),a.b),mb(0,w.c.length),X4(w.c,0,n),a.c==w.c.length&&(t.c[t.c.length]=a)}return null}function JZe(e,t){var n,i,s,c,a,g,w,m,y;if(e==null)return uc;if(w=t.a.zc(e,t),w!=null)return"[...]";for(n=new vg(Qr,"[","]"),s=e,c=0,a=s.length;c=14&&y<=16))?t.a._b(i)?(n.a?wn(n.a,n.b):n.a=new dl(n.d),u5(n.a,"[...]")):(g=bg(i),m=new O5(t),ma(n,JZe(g,m))):W(i,177)?ma(n,$Bt(u(i,177))):W(i,190)?ma(n,kRt(u(i,190))):W(i,195)?ma(n,DLt(u(i,195))):W(i,2012)?ma(n,SRt(u(i,2012))):W(i,48)?ma(n,DBt(u(i,48))):W(i,364)?ma(n,KBt(u(i,364))):W(i,832)?ma(n,jBt(u(i,832))):W(i,104)&&ma(n,PBt(u(i,104))):ma(n,i==null?uc:Ns(i));return n.a?n.e.length==0?n.a.a:n.a.a+(""+n.e):n.c}function eJe(e,t,n,i){var s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U;for(g=Im(t,!1,!1),q=J9(g),i&&(q=j9(q)),U=oe(Oe($e(t,(sS(),QK)))),B=(Rt(q.b!=0),u(q.a.a.c,8)),k=u(df(q,1),8),q.b>2?(y=new pe,_i(y,new qh(q,1,q.b)),c=$Je(y,U+e.a),G=new Xq(c),Cs(G,t),n.c[n.c.length]=G):i?G=u(Bt(e.b,Kh(t)),266):G=u(Bt(e.b,l1(t)),266),w=Kh(t),i&&(w=l1(t)),a=ZLt(B,w),m=U+e.a,a.a?(m+=p.Math.abs(B.b-k.b),D=new De(k.a,(k.b+B.b)/2)):(m+=p.Math.abs(B.a-k.a),D=new De((k.a+B.a)/2,k.b)),i?Qn(e.d,t,new zoe(G,a,D,m)):Qn(e.c,t,new zoe(G,a,D,m)),Qn(e.b,t,G),P=(!t.n&&(t.n=new we(Rs,t,1,7)),t.n),M=new Ft(P);M.e!=M.i.gc();)E=u(Qt(M),137),s=f7(e,E,!0,0,0),n.c[n.c.length]=s}function zKt(e){var t,n,i,s,c,a,g,w,m,y;for(m=new pe,g=new pe,a=new R(e);a.a-1){for(c=new R(g);c.a0)&&(YZ(w,p.Math.min(w.o,s.o-1)),yE(w,w.i-1),w.i==0&&(g.c[g.c.length]=w))}}function QO(e,t,n){var i,s,c,a,g,w,m;if(m=e.c,!t&&(t=n2e),e.c=t,(e.Db&4)!=0&&(e.Db&1)==0&&(w=new rr(e,1,2,m,e.c),n?n.Ei(w):n=w),m!=t){if(W(e.Cb,284))e.Db>>16==-10?n=u(e.Cb,284).nk(t,n):e.Db>>16==-15&&(!t&&(t=(tt(),Zf)),!m&&(m=(tt(),Zf)),e.Cb.nh()&&(w=new va(e.Cb,1,13,m,t,ld(Qc(u(e.Cb,59)),e),!1),n?n.Ei(w):n=w));else if(W(e.Cb,88))e.Db>>16==-23&&(W(t,88)||(t=(tt(),xu)),W(m,88)||(m=(tt(),xu)),e.Cb.nh()&&(w=new va(e.Cb,1,10,m,t,ld(wo(u(e.Cb,26)),e),!1),n?n.Ei(w):n=w));else if(W(e.Cb,444))for(g=u(e.Cb,836),a=(!g.b&&(g.b=new TE(new eB)),g.b),c=(i=new kg(new eg(a.a).a),new EE(i));c.a.b;)s=u(Q0(c.a).cd(),87),n=QO(s,Cj(s,g),n)}return n}function WKt(e,t){var n,i,s,c,a,g,w,m,y,k,E;for(a=je(Pe($e(e,(xe(),aw)))),E=u($e(e,gw),21),w=!1,m=!1,k=new Ft((!e.c&&(e.c=new we(Yc,e,9,9)),e.c));k.e!=k.i.gc()&&(!w||!m);){for(c=u(Qt(k),118),g=0,s=Gd(Rf(H(_(zf,1),Ee,20,0,[(!c.d&&(c.d=new dt(nr,c,8,5)),c.d),(!c.e&&(c.e=new dt(nr,c,7,4)),c.e)])));an(s)&&(i=u(nn(s),79),y=a&&ip(i)&&je(Pe($e(i,Kg))),n=jZe((!i.b&&(i.b=new dt(Wt,i,4,7)),i.b),c)?e==bi(Ts(u(V((!i.c&&(i.c=new dt(Wt,i,5,8)),i.c),0),82))):e==bi(Ts(u(V((!i.b&&(i.b=new dt(Wt,i,4,7)),i.b),0),82))),!((y||n)&&(++g,g>1))););(g>0||E.Hc((Dc(),La))&&(!c.n&&(c.n=new we(Rs,c,1,7)),c.n).i>0)&&(w=!0),g>1&&(m=!0)}w&&t.Fc((ns(),Ul)),m&&t.Fc((ns(),m6))}function tJe(e){var t,n,i,s,c,a,g,w,m,y,k,E;if(E=u($e(e,(Dn(),Zg)),21),E.dc())return null;if(g=0,a=0,E.Hc((cl(),GC))){for(y=u($e(e,V6),98),i=2,n=2,s=2,c=2,t=bi(e)?u($e(bi(e),$p),103):u($e(e,$p),103),m=new Ft((!e.c&&(e.c=new we(Yc,e,9,9)),e.c));m.e!=m.i.gc();)if(w=u(Qt(m),118),k=u($e(w,S2),61),k==(ye(),Ks)&&(k=rue(w,t),as(w,S2,k)),y==(br(),jo))switch(k.g){case 1:i=p.Math.max(i,w.i+w.g);break;case 2:n=p.Math.max(n,w.j+w.f);break;case 3:s=p.Math.max(s,w.i+w.g);break;case 4:c=p.Math.max(c,w.j+w.f)}else switch(k.g){case 1:i+=w.g+2;break;case 2:n+=w.f+2;break;case 3:s+=w.g+2;break;case 4:c+=w.f+2}g=p.Math.max(i,s),a=p.Math.max(n,c)}return lp(e,g,a,!0,!0)}function PQ(e,t,n,i,s){var c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te;for(G=u(wl(lP(ni(new ht(null,new gt(t.d,16)),new VEe(n)),new XEe(n)),pg(new yr,new ks,new Au,H(_(Uc,1),de,132,0,[(Bf(),Tl)]))),15),k=_n,y=Mr,w=new R(t.b.j);w.a0,m?m&&(E=q.p,a?++E:--E,k=u(Me(q.c.a,E),10),i=Kze(k),M=!(eQ(i,be,n[0])||xLe(i,be,n[0]))):M=!0),P=!1,ce=t.D.i,ce&&ce.c&&g.e&&(y=a&&ce.p>0||!a&&ce.p0&&(t.a+=Qr),Qj(u(Qt(g),160),t);for(t.a+=Bz,w=new pv((!i.c&&(i.c=new dt(Wt,i,5,8)),i.c));w.e!=w.i.gc();)w.e>0&&(t.a+=Qr),Qj(u(Qt(w),160),t);t.a+=")"}}function YKt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M;if(c=u(N(e,(ae(),zn)),79),!!c){for(i=e.a,s=new ps(n),Vn(s,HIt(e)),lO(e.d.i,e.c.i)?(E=e.c,k=qs(H(_(tr,1),fe,8,0,[E.n,E.a])),ur(k,n)):k=jf(e.c),ji(i,k,i.a,i.a.a),M=jf(e.d),N(e,QV)!=null&&Vn(M,u(N(e,QV),8)),ji(i,M,i.c.b,i.c),Cb(i,s),a=Im(c,!0,!0),bP(a,u(V((!c.b&&(c.b=new dt(Wt,c,4,7)),c.b),0),82)),wP(a,u(V((!c.c&&(c.c=new dt(Wt,c,5,8)),c.c),0),82)),g7(i,a),y=new R(e.b);y.a=0){for(w=null,g=new vr(y.a,m+1);g.ba?1:S0(isNaN(0),isNaN(a)))<0&&(Bu(Oh),(p.Math.abs(a-1)<=Oh||a==1||isNaN(a)&&isNaN(1)?0:a<1?-1:a>1?1:S0(isNaN(a),isNaN(1)))<0)&&(Bu(Oh),(p.Math.abs(0-g)<=Oh||g==0||isNaN(0)&&isNaN(g)?0:0g?1:S0(isNaN(0),isNaN(g)))<0)&&(Bu(Oh),(p.Math.abs(g-1)<=Oh||g==1||isNaN(g)&&isNaN(1)?0:g<1?-1:g>1?1:S0(isNaN(g),isNaN(1)))<0)),c)}function JKt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be;for(k=new kie(new hJ(e));k.b!=k.c.a.d;)for(y=oqe(k),g=u(y.d,56),t=u(y.e,56),a=g.Tg(),D=0,te=(a.i==null&&dh(a),a.i).length;D=0&&D=m.c.c.length?y=nre((jt(),zi),sr):y=nre((jt(),sr),sr),y*=2,c=n.a.g,n.a.g=p.Math.max(c,c+(y-c)),a=n.b.g,n.b.g=p.Math.max(a,a+(y-a)),s=t}}function nVt(e,t,n,i,s){var c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce;for(ce=kRe(e),y=new pe,g=e.c.length,k=g-1,E=g+1;ce.a.c!=0;){for(;n.b!=0;)U=(Rt(n.b!=0),u(Hl(n,n.a.a),112)),D5(ce.a,U)!=null,U.g=k--,sue(U,t,n,i);for(;t.b!=0;)te=(Rt(t.b!=0),u(Hl(t,t.a.a),112)),D5(ce.a,te)!=null,te.g=E++,sue(te,t,n,i);for(m=Mr,q=(a=new m5(new p5(new Zx(ce.a).a).b),new Jx(a));d8(q.a.a);){if(B=(c=RA(q.a),u(c.cd(),112)),!i&&B.b>0&&B.a<=0){y.c=J(It,Ee,1,0,5,1),y.c[y.c.length]=B;break}D=B.i-B.d,D>=m&&(D>m&&(y.c=J(It,Ee,1,0,5,1),m=D),y.c[y.c.length]=B)}y.c.length!=0&&(w=u(Me(y,sj(s,y.c.length)),112),D5(ce.a,w)!=null,w.g=E++,sue(w,t,n,i),y.c=J(It,Ee,1,0,5,1))}for(G=e.c.length+1,P=new R(e);P.a0&&(E.d+=y.n.d,E.d+=y.d),E.a>0&&(E.a+=y.n.a,E.a+=y.d),E.b>0&&(E.b+=y.n.b,E.b+=y.d),E.c>0&&(E.c+=y.n.c,E.c+=y.d),E}function iJe(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P;for(E=n.d,k=n.c,c=new De(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a),a=c.b,m=new R(e.a);m.a0&&(e.c[t.c.p][t.p].d+=Kc(e.i,24)*M7*.07000000029802322-.03500000014901161,e.c[t.c.p][t.p].a=e.c[t.c.p][t.p].d/e.c[t.c.p][t.p].b)}}function fVt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B;for(P=new R(e);P.ai.d,i.d=p.Math.max(i.d,t),g&&n&&(i.d=p.Math.max(i.d,i.a),i.a=i.d+s);break;case 3:n=t>i.a,i.a=p.Math.max(i.a,t),g&&n&&(i.a=p.Math.max(i.a,i.d),i.d=i.a+s);break;case 2:n=t>i.c,i.c=p.Math.max(i.c,t),g&&n&&(i.c=p.Math.max(i.b,i.c),i.b=i.c+s);break;case 4:n=t>i.b,i.b=p.Math.max(i.b,t),g&&n&&(i.b=p.Math.max(i.b,i.c),i.c=i.b+s)}}}function gVt(e){var t,n,i,s,c,a,g,w,m,y,k;for(m=new R(e);m.a0||y.j==xt&&y.e.c.length-y.g.c.length<0)){t=!1;break}for(s=new R(y.g);s.a=m&&ce>=B&&(E+=P.n.b+D.n.b+D.a.b-te,++g));if(n)for(a=new R(G.e);a.a=m&&ce>=B&&(E+=P.n.b+D.n.b+D.a.b-te,++g))}g>0&&(be+=E/g,++M)}M>0?(t.a=s*be/M,t.g=M):(t.a=0,t.g=0)}function bVt(e,t){var n,i,s,c,a,g,w,m,y,k,E;for(s=new R(e.a.b);s.aLi||t.o==Gg&&y0&&sc(q,te*be),ce>0&&oc(q,ce*Se);for(V5(e.b,new dke),t=new pe,g=new kg(new eg(e.c).a);g.b;)a=Q0(g),i=u(a.cd(),79),n=u(a.dd(),395).a,s=Im(i,!1,!1),k=rXe(Kh(i),J9(s),n),g7(k,s),U=bXe(i),U&&Ds(t,U,0)==-1&&(t.c[t.c.length]=U,kBe(U,(Rt(k.b!=0),u(k.a.a.c,8)),n));for(B=new kg(new eg(e.d).a);B.b;)D=Q0(B),i=u(D.cd(),79),n=u(D.dd(),395).a,s=Im(i,!1,!1),k=rXe(l1(i),j9(J9(s)),n),k=j9(k),g7(k,s),U=wXe(i),U&&Ds(t,U,0)==-1&&(t.c[t.c.length]=U,kBe(U,(Rt(k.b!=0),u(k.c.b.c,8)),n))}function oJe(e,t,n,i){var s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se;if(n.c.length!=0){for(M=new pe,E=new R(n);E.a1)for(M=new due(P,U,i),Sr(U,new JDe(e,M)),a.c[a.c.length]=M,k=U.a.ec().Kc();k.Ob();)y=u(k.Pb(),46),nc(c,y.b);if(g.a.gc()>1)for(M=new due(P,g,i),Sr(g,new e$e(e,M)),a.c[a.c.length]=M,k=g.a.ec().Kc();k.Ob();)y=u(k.Pb(),46),nc(c,y.b)}}function lJe(e){O0(e,new Mg(LE(w0(g0(b0(p0(new Y1,kh),"ELK Radial"),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new jxe),kh))),ke(e,kh,ED,Ae(jht)),ke(e,kh,Xb,Ae(Dht)),ke(e,kh,Wm,Ae(Eht)),ke(e,kh,ry,Ae(Aht)),ke(e,kh,iy,Ae(Mht)),ke(e,kh,tk,Ae(Tht)),ke(e,kh,LS,Ae(xbe)),ke(e,kh,nk,Ae(Pht)),ke(e,kh,TW,Ae(FX)),ke(e,kh,CW,Ae(_X)),ke(e,kh,Vhe,Ae(Cbe)),ke(e,kh,Qhe,Ae(zN)),ke(e,kh,zhe,Ae(WN)),ke(e,kh,Whe,Ae(jC)),ke(e,kh,Khe,Ae(Tbe))}function kue(e){var t;if(this.r=J9t(new cL,new lL),this.b=new nS(u(tn(Wr),290)),this.p=new nS(u(tn(Wr),290)),this.i=new nS(u(tn(yst),290)),this.e=e,this.o=new ps(e.rf()),this.D=e.Df()||je(Pe(e.We((Dn(),HC)))),this.A=u(e.We((Dn(),Zg)),21),this.B=u(e.We(M1),21),this.q=u(e.We(V6),98),this.u=u(e.We(yw),21),!oLt(this.u))throw F(new Yw("Invalid port label placement: "+this.u));if(this.v=je(Pe(e.We(rme))),this.j=u(e.We(O2),21),!P_t(this.j))throw F(new Yw("Invalid node label placement: "+this.j));this.n=u(lS(e,Wwe),116),this.k=oe(Oe(lS(e,oI))),this.d=oe(Oe(lS(e,lme))),this.w=oe(Oe(lS(e,dme))),this.s=oe(Oe(lS(e,ume))),this.t=oe(Oe(lS(e,fme))),this.C=u(lS(e,hme),142),this.c=2*this.d,t=!this.B.Hc((Vc(),YC)),this.f=new rS(0,t,0),this.g=new rS(1,t,0),rB(this.f,(ff(),Fo),this.g)}function CVt(e,t,n,i,s){var c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt;for(U=0,P=0,M=0,E=1,G=new Ft((!e.a&&(e.a=new we(mi,e,10,11)),e.a));G.e!=G.i.gc();)B=u(Qt(G),33),E+=wa(new _t(qt(Ea(B).a.Kc(),new L))),_e=B.g,P=p.Math.max(P,_e),k=B.f,M=p.Math.max(M,k),U+=_e*k;for(D=(!e.a&&(e.a=new we(mi,e,10,11)),e.a).i,a=U+2*i*i*E*D,c=p.Math.sqrt(a),w=p.Math.max(c*n,P),g=p.Math.max(c/n,M),q=new Ft((!e.a&&(e.a=new we(mi,e,10,11)),e.a));q.e!=q.i.gc();)B=u(Qt(q),33),Ue=s.b+(Kc(t,26)*PS+Kc(t,27)*jS)*(w-B.g),Mt=s.b+(Kc(t,26)*PS+Kc(t,27)*jS)*(g-B.f),sc(B,Ue),oc(B,Mt);for(Se=w+(s.b+s.c),be=g+(s.d+s.a),ce=new Ft((!e.a&&(e.a=new we(mi,e,10,11)),e.a));ce.e!=ce.i.gc();)for(te=u(Qt(ce),33),y=new _t(qt(Ea(te).a.Kc(),new L));an(y);)m=u(nn(y),79),pS(m)||TXt(m,t,Se,be);Se+=s.b+s.c,be+=s.d+s.a,lp(e,Se,be,!1,!0)}function Wj(e){var t,n,i,s,c,a,g,w,m,y,k;if(e==null)throw F(new rh(uc));if(m=e,c=e.length,w=!1,c>0&&(t=(fn(0,e.length),e.charCodeAt(0)),(t==45||t==43)&&(e=e.substr(1),--c,w=t==45)),c==0)throw F(new rh(hp+m+'"'));for(;e.length>0&&(fn(0,e.length),e.charCodeAt(0)==48);)e=e.substr(1),--c;if(c>(GYe(),yrt)[10])throw F(new rh(hp+m+'"'));for(s=0;s0&&(k=-parseInt(e.substr(0,i),10),e=e.substr(i),c-=i,n=!1);c>=a;){if(i=parseInt(e.substr(0,a),10),e=e.substr(a),c-=a,n)n=!1;else{if(ho(k,g)<0)throw F(new rh(hp+m+'"'));k=Ar(k,y)}k=c1(k,i)}if(ho(k,0)>0)throw F(new rh(hp+m+'"'));if(!w&&(k=G3(k),ho(k,0)<0))throw F(new rh(hp+m+'"'));return k}function Sue(e,t){FRe();var n,i,s,c,a,g,w;if(this.a=new dte(this),this.b=e,this.c=t,this.f=qF(ms((Oc(),Cr),t)),this.f.dc())if((g=lce(Cr,e))==t)for(this.e=!0,this.d=new pe,this.f=new F8e,this.f.Fc(_g),u(Hj(d9(Cr,ml(e)),""),26)==e&&this.f.Fc(S5(Cr,ml(e))),s=fQ(Cr,e).Kc();s.Ob();)switch(i=u(s.Pb(),170),N0(ms(Cr,i))){case 4:{this.d.Fc(i);break}case 5:{this.f.Gc(qF(ms(Cr,i)));break}}else if(Vr(),u(t,66).Oj())for(this.e=!0,this.f=null,this.d=new pe,a=0,w=(e.i==null&&dh(e),e.i).length;a=0&&a0&&(u(fs(e.b,t),124).a.b=n)}function TVt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q;for(Vt(t,"Comment pre-processing",1),n=0,w=new R(e.a);w.a0&&(w=(fn(0,t.length),t.charCodeAt(0)),w!=64)){if(w==37&&(k=t.lastIndexOf("%"),m=!1,k!=0&&(k==E-1||(m=(fn(k+1,t.length),t.charCodeAt(k+1)==46))))){if(a=t.substr(1,k-1),U=et("%",a)?null:Cue(a),i=0,m)try{i=kl(t.substr(k+2),Mr,_n)}catch(te){throw te=fi(te),W(te,127)?(g=te,F(new eP(g))):F(te)}for(B=sse(e.Wg());B.Ob();)if(P=MP(B),W(P,510)&&(s=u(P,590),G=s.d,(U==null?G==null:et(U,G))&&i--==0))return s;return null}if(y=t.lastIndexOf("."),M=y==-1?t:t.substr(0,y),n=0,y!=-1)try{n=kl(t.substr(y+1),Mr,_n)}catch(te){if(te=fi(te),W(te,127))M=t;else throw F(te)}for(M=et("%",M)?null:Cue(M),D=sse(e.Wg());D.Ob();)if(P=MP(D),W(P,191)&&(c=u(P,191),q=c.ne(),(M==null?q==null:et(M,q))&&n--==0))return c;return null}return $Ze(e,t)}function MVt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt;for(be=new pe,P=new R(e.b);P.a=t.length)return{done:!0};var s=t[i++];return{value:[s,n.get(s)],done:!1}}}},Nqt()||(e.prototype.createObject=function(){return{}},e.prototype.get=function(t){return this.obj[":"+t]},e.prototype.set=function(t,n){this.obj[":"+t]=n},e.prototype[gz]=function(t){delete this.obj[":"+t]},e.prototype.keys=function(){var t=[];for(var n in this.obj)n.charCodeAt(0)==58&&t.push(n.substring(1));return t}),e}function jVt(e){iue();var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B;if(e==null)return null;if(k=e.length*8,k==0)return"";for(g=k%24,M=k/24|0,E=g!=0?M+1:M,c=null,c=J(Zl,ph,25,E*4,15,1),m=0,y=0,t=0,n=0,i=0,a=0,s=0,w=0;w>24,m=(t&3)<<24>>24,P=(t&-128)==0?t>>2<<24>>24:(t>>2^192)<<24>>24,D=(n&-128)==0?n>>4<<24>>24:(n>>4^240)<<24>>24,B=(i&-128)==0?i>>6<<24>>24:(i>>6^252)<<24>>24,c[a++]=Md[P],c[a++]=Md[D|m<<4],c[a++]=Md[y<<2|B],c[a++]=Md[i&63];return g==8?(t=e[s],m=(t&3)<<24>>24,P=(t&-128)==0?t>>2<<24>>24:(t>>2^192)<<24>>24,c[a++]=Md[P],c[a++]=Md[m<<4],c[a++]=61,c[a++]=61):g==16&&(t=e[s],n=e[s+1],y=(n&15)<<24>>24,m=(t&3)<<24>>24,P=(t&-128)==0?t>>2<<24>>24:(t>>2^192)<<24>>24,D=(n&-128)==0?n>>4<<24>>24:(n>>4^240)<<24>>24,c[a++]=Md[P],c[a++]=Md[D|m<<4],c[a++]=Md[y<<2],c[a++]=61),ah(c,0,c.length)}function DVt(e,t){var n,i,s,c,a,g,w;if(e.e==0&&e.p>0&&(e.p=-(e.p-1)),e.p>Mr&&rre(t,e.p-g1),a=t.q.getDate(),G8(t,1),e.k>=0&&gCt(t,e.k),e.c>=0?G8(t,e.c):e.k>=0?(w=new Cse(t.q.getFullYear()-g1,t.q.getMonth(),35),i=35-w.q.getDate(),G8(t,p.Math.min(i,a))):G8(t,a),e.f<0&&(e.f=t.q.getHours()),e.b>0&&e.f<12&&(e.f+=12),C5t(t,e.f==24&&e.g?0:e.f),e.j>=0&&CEt(t,e.j),e.n>=0&&QEt(t,e.n),e.i>=0&&B$e(t,$r(Ar(U9(cc(t.q.getTime()),ad),ad),e.i)),e.a&&(s=new zE,rre(s,s.q.getFullYear()-g1-80),mB(cc(t.q.getTime()),cc(s.q.getTime()))&&rre(t,s.q.getFullYear()-g1+100)),e.d>=0){if(e.c==-1)n=(7+e.d-t.q.getDay())%7,n>3&&(n-=7),g=t.q.getMonth(),G8(t,t.q.getDate()+n),t.q.getMonth()!=g&&G8(t,t.q.getDate()+(n>0?-7:7));else if(t.q.getDay()!=e.d)return!1}return e.o>Mr&&(c=t.q.getTimezoneOffset(),B$e(t,$r(cc(t.q.getTime()),(e.o-c)*60*ad))),!0}function hJe(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te;if(s=N(t,(ae(),zn)),!!W(s,239)){for(P=u(s,33),D=t.e,E=new ps(t.c),c=t.d,E.a+=c.b,E.b+=c.d,te=u($e(P,(xe(),kN)),174),wc(te,(Vc(),uI))&&(M=u($e(P,lpe),116),sOt(M,c.a),dOt(M,c.d),oOt(M,c.b),gOt(M,c.c)),n=new pe,y=new R(t.a);y.a0&&ge(e.p,y),ge(e.o,y);t-=i,M=w+t,m+=t*e.e,Fl(e.a,g,me(M)),Fl(e.b,g,m),e.j=p.Math.max(e.j,M),e.k=p.Math.max(e.k,m),e.d+=t,t+=D}}function ye(){ye=X;var e;Ks=new C8(NS,0),yt=new C8(nD,1),At=new C8(xz,2),Xt=new C8(Cz,3),xt=new C8(Tz,4),Yf=(rt(),new g3((e=u(sf(Wr),9),new Rl(e,u($u(e,e.length),9),0)))),Yu=rd(ii(yt,H(_(Wr,1),ao,61,0,[]))),Gl=rd(ii(At,H(_(Wr,1),ao,61,0,[]))),Ml=rd(ii(Xt,H(_(Wr,1),ao,61,0,[]))),vu=rd(ii(xt,H(_(Wr,1),ao,61,0,[]))),hc=rd(ii(yt,H(_(Wr,1),ao,61,0,[Xt]))),Uo=rd(ii(At,H(_(Wr,1),ao,61,0,[xt]))),Zu=rd(ii(yt,H(_(Wr,1),ao,61,0,[xt]))),Ic=rd(ii(yt,H(_(Wr,1),ao,61,0,[At]))),Pl=rd(ii(Xt,H(_(Wr,1),ao,61,0,[xt]))),Yl=rd(ii(At,H(_(Wr,1),ao,61,0,[Xt]))),Rc=rd(ii(yt,H(_(Wr,1),ao,61,0,[At,xt]))),fc=rd(ii(At,H(_(Wr,1),ao,61,0,[Xt,xt]))),ac=rd(ii(yt,H(_(Wr,1),ao,61,0,[Xt,xt]))),Cc=rd(ii(yt,H(_(Wr,1),ao,61,0,[At,Xt]))),Do=rd(ii(yt,H(_(Wr,1),ao,61,0,[At,Xt,xt])))}function pJe(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U;if(t.b!=0){for(M=new ai,g=null,P=null,i=Di(p.Math.floor(p.Math.log(t.b)*p.Math.LOG10E)+1),w=0,U=Cn(t,0);U.b!=U.d.c;)for(q=u(xn(U),86),ie(P)!==ie(N(q,(oo(),F6)))&&(P=un(N(q,F6)),w=0),P!=null?g=P+RFe(w++,i):g=RFe(w++,i),ue(q,F6,g),B=(s=Cn(new Bd(q).a.d,0),new nv(s));_E(B.a);)D=u(xn(B.a),188).c,ji(M,D,M.c.b,M.c),ue(D,F6,g);for(E=new Jt,a=0;a=w){Rt(q.b>0),q.a.Xb(q.c=--q.b);break}else D.a>m&&(s?(_i(s.b,D.b),s.a=p.Math.max(s.a,D.a),rl(q)):(ge(D.b,k),D.c=p.Math.min(D.c,m),D.a=p.Math.max(D.a,w),s=D));s||(s=new ePe,s.c=m,s.a=w,fb(q,s),ge(s.b,k))}for(g=t.b,y=0,B=new R(i);B.ag?1:0:(e.b&&(e.b._b(c)&&(s=u(e.b.xc(c),19).a),e.b._b(w)&&(g=u(e.b.xc(w),19).a)),sg?1:0)):t.e.c.length!=0&&n.g.c.length!=0?1:-1}function RVt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se;for(Vt(t,ctt,1),D=new pe,be=new pe,m=new R(e.b);m.a0&&(U-=M),gue(a,U),y=0,E=new R(a.a);E.a0),g.a.Xb(g.c=--g.b)),w=.4*i*y,!c&&g.bt.d.c){if(M=e.c[t.a.d],B=e.c[k.a.d],M==B)continue;Hu(ju(Pu(Du(Mu(new tu,1),100),M),B))}}}}}function Cue(e){EQ();var t,n,i,s,c,a,g,w;if(e==null)return null;if(s=sh(e,lc(37)),s<0)return e;for(w=new dl(e.substr(0,s)),t=J(Tc,Gm,25,4,15,1),g=0,i=0,a=e.length;ss+2&&vH((fn(s+1,e.length),e.charCodeAt(s+1)),Ume,Gme)&&vH((fn(s+2,e.length),e.charCodeAt(s+2)),Ume,Gme))if(n=u8t((fn(s+1,e.length),e.charCodeAt(s+1)),(fn(s+2,e.length),e.charCodeAt(s+2))),s+=2,i>0?(n&192)==128?t[g++]=n<<24>>24:i=0:n>=128&&((n&224)==192?(t[g++]=n<<24>>24,i=2):(n&240)==224?(t[g++]=n<<24>>24,i=3):(n&248)==240&&(t[g++]=n<<24>>24,i=4)),i>0){if(g==i){switch(g){case 2:{lg(w,((t[0]&31)<<6|t[1]&63)&Ni);break}case 3:{lg(w,((t[0]&15)<<12|(t[1]&63)<<6|t[2]&63)&Ni);break}}g=0,i=0}}else{for(c=0;c0){if(a+i>e.length)return!1;g=Oj(e.substr(0,a+i),t)}else g=Oj(e,t);switch(c){case 71:return g=jm(e,a,H(_(Te,1),fe,2,6,[YJe,ZJe]),t),s.e=g,!0;case 77:return Sqt(e,t,s,g,a);case 76:return xqt(e,t,s,g,a);case 69:return pBt(e,t,a,s);case 99:return bBt(e,t,a,s);case 97:return g=jm(e,a,H(_(Te,1),fe,2,6,["AM","PM"]),t),s.b=g,!0;case 121:return Cqt(e,t,a,g,n,s);case 100:return g<=0?!1:(s.c=g,!0);case 83:return g<0?!1:MDt(g,a,t[0],s);case 104:g==12&&(g=0);case 75:case 72:return g<0?!1:(s.f=g,s.g=!1,!0);case 107:return g<0?!1:(s.f=g,s.g=!0,!0);case 109:return g<0?!1:(s.j=g,!0);case 115:return g<0?!1:(s.n=g,!0);case 90:if(abe&&(P.c=be-P.b),ge(a.d,new IF(P,toe(a,P))),G=t==yt?p.Math.max(G,D.b+m.b.rf().b):p.Math.min(G,D.b));for(G+=t==yt?e.t:-e.t,U=woe((a.e=G,a)),U>0&&(u(fs(e.b,t),124).a.b=U),y=E.Kc();y.Ob();)m=u(y.Pb(),111),!(!m.c||m.c.d.c.length<=0)&&(P=m.c.i,P.c-=m.e.a,P.d-=m.e.b)}function QVt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M;for(t=new Jt,w=new Ft(e);w.e!=w.i.gc();){for(g=u(Qt(w),33),n=new Zi,Qn(WK,g,n),M=new lke,s=u(wl(new ht(null,new P0(new _t(qt(o7(g).a.Kc(),new L)))),cLe(M,pg(new yr,new ks,new Au,H(_(Uc,1),de,132,0,[(Bf(),Tl)])))),83),PQe(n,u(s.xc((kt(),!0)),14),new uke),i=u(wl(ni(u(s.xc(!1),15).Lc(),new fke),pg(new yr,new ks,new Au,H(_(Uc,1),de,132,0,[Tl]))),15),a=i.Kc();a.Ob();)c=u(a.Pb(),79),E=bXe(c),E&&(m=u(Xs(xs(t.f,E)),21),m||(m=RGe(E),Wo(t.f,E,m)),Hr(n,m));for(s=u(wl(new ht(null,new P0(new _t(qt(Ea(g).a.Kc(),new L)))),cLe(M,pg(new yr,new ks,new Au,H(_(Uc,1),de,132,0,[Tl])))),83),PQe(n,u(s.xc(!0),14),new hke),i=u(wl(ni(u(s.xc(!1),15).Lc(),new ake),pg(new yr,new ks,new Au,H(_(Uc,1),de,132,0,[Tl]))),15),k=i.Kc();k.Ob();)y=u(k.Pb(),79),E=wXe(y),E&&(m=u(Xs(xs(t.f,E)),21),m||(m=RGe(E),Wo(t.f,E,m)),Hr(n,m))}}function zVt(e,t){OQ();var n,i,s,c,a,g,w,m,y,k,E,M,P,D;if(w=ho(e,0)<0,w&&(e=G3(e)),ho(e,0)==0)switch(t){case 0:return"0";case 1:return UO;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return M=new Fd,t<0?M.a+="0E+":M.a+="0E",M.a+=t==Mr?"2147483648":""+-t,M.a}y=18,k=J(Zl,ph,25,y+1,15,1),n=y,D=e;do m=D,D=U9(D,10),k[--n]=en($r(48,c1(m,Ar(D,10))))&Ni;while(ho(D,0)!=0);if(s=c1(c1(c1(y,n),t),1),t==0)return w&&(k[--n]=45),ah(k,n,y-n);if(t>0&&ho(s,-6)>=0){if(ho(s,0)>=0){for(c=n+en(s),g=y-1;g>=c;g--)k[g+1]=k[g];return k[++c]=46,w&&(k[--n]=45),ah(k,n,y-n+1)}for(a=2;mB(a,$r(G3(s),1));a++)k[--n]=48;return k[--n]=46,k[--n]=48,w&&(k[--n]=45),ah(k,n,y-n)}return P=n+1,i=y,E=new Zw,w&&(E.a+="-"),i-P>=1?(lg(E,k[n]),E.a+=".",E.a+=ah(k,n+1,y-n-1)):E.a+=ah(k,n,y-n),E.a+="E",ho(s,0)>0&&(E.a+="+"),E.a+=""+x5(s),E.a}function WVt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M;if(e.e.a.$b(),e.f.a.$b(),e.c.c=J(It,Ee,1,0,5,1),e.i.c=J(It,Ee,1,0,5,1),e.g.a.$b(),t)for(a=new R(t.a);a.a=1&&(ce-m>0&&P>=0?(sc(k,k.i+te),oc(k,k.j+w*m)):ce-m<0&&M>=0&&(sc(k,k.i+te*ce),oc(k,k.j+w)));return as(e,(Dn(),Zg),(cl(),c=u(sf(tx),9),new Rl(c,u($u(c,c.length),9),0))),new De(be,y)}function mJe(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P;if(M=bi(Ts(u(V((!e.b&&(e.b=new dt(Wt,e,4,7)),e.b),0),82))),P=bi(Ts(u(V((!e.c&&(e.c=new dt(Wt,e,5,8)),e.c),0),82))),k=M==P,g=new Er,t=u($e(e,(NP(),Ome)),74),t&&t.b>=2){if((!e.a&&(e.a=new we(di,e,6,6)),e.a).i==0)n=(m0(),s=new gE,s),rn((!e.a&&(e.a=new we(di,e,6,6)),e.a),n);else if((!e.a&&(e.a=new we(di,e,6,6)),e.a).i>1)for(E=new pv((!e.a&&(e.a=new we(di,e,6,6)),e.a));E.e!=E.i.gc();)fS(E);g7(t,u(V((!e.a&&(e.a=new we(di,e,6,6)),e.a),0),202))}if(k)for(i=new Ft((!e.a&&(e.a=new we(di,e,6,6)),e.a));i.e!=i.i.gc();)for(n=u(Qt(i),202),m=new Ft((!n.a&&(n.a=new Fi(yu,n,5)),n.a));m.e!=m.i.gc();)w=u(Qt(m),469),g.a=p.Math.max(g.a,w.a),g.b=p.Math.max(g.b,w.b);for(a=new Ft((!e.n&&(e.n=new we(Rs,e,1,7)),e.n));a.e!=a.i.gc();)c=u(Qt(a),137),y=u($e(c,U6),8),y&&Tf(c,y.a,y.b),k&&(g.a=p.Math.max(g.a,c.i+c.g),g.b=p.Math.max(g.b,c.j+c.f));return g}function KVt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e;for(U=t.c.length,s=new Lm(e.a,n,null,null),_e=J(hr,ds,25,U,15,1),D=J(hr,ds,25,U,15,1),P=J(hr,ds,25,U,15,1),B=0,g=0;g_e[w]&&(B=w),k=new R(e.a.b);k.aM&&(c&&(rg(be,E),rg(_e,me(m.b-1))),Jn=n.b,Gi+=E+t,E=0,y=p.Math.max(y,n.b+n.c+Yt)),sc(g,Jn),oc(g,Gi),y=p.Math.max(y,Jn+Yt+n.c),E=p.Math.max(E,k),Jn+=Yt+t;if(y=p.Math.max(y,i),Pt=Gi+E+n.a,Ptmh,Ue=p.Math.abs(E.b-P.b)>mh,(!n&&_e&&Ue||n&&(_e||Ue))&&Tn(B.a,te)),Hr(B.a,i),i.b==0?E=te:E=(Rt(i.b!=0),u(i.c.b.c,8)),fPt(M,k,D),cze(s)==Se&&(Rr(Se.i)!=s.a&&(D=new Er,Qce(D,Rr(Se.i),G)),ue(B,QV,D)),NLt(M,B,G),y.a.zc(M,y);Dr(B,ce),gr(B,Se)}for(m=y.a.ec().Kc();m.Ob();)w=u(m.Pb(),17),Dr(w,null),gr(w,null);Ht(t)}function vJe(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te;if(e.gc()==1)return u(e.Xb(0),231);if(e.gc()<=0)return new zM;for(s=e.Kc();s.Ob();){for(n=u(s.Pb(),231),P=0,y=_n,k=_n,w=Mr,m=Mr,M=new R(n.e);M.ag&&(U=0,te+=a+q,a=0),DQt(D,n,U,te),t=p.Math.max(t,U+B.a),a=p.Math.max(a,B.b),U+=B.a+q;return D}function yJe(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P;switch(y=new pc,e.a.g){case 3:E=u(N(t.e,(ae(),Wg)),15),M=u(N(t.j,Wg),15),P=u(N(t.f,Wg),15),n=u(N(t.e,a2),15),i=u(N(t.j,a2),15),s=u(N(t.f,a2),15),a=new pe,_i(a,E),M.Jc(new g6e),_i(a,W(M,152)?jv(u(M,152)):W(M,131)?u(M,131).a:W(M,54)?new d0(M):new nb(M)),_i(a,P),c=new pe,_i(c,n),_i(c,W(i,152)?jv(u(i,152)):W(i,131)?u(i,131).a:W(i,54)?new d0(i):new nb(i)),_i(c,s),ue(t.f,Wg,a),ue(t.f,a2,c),ue(t.f,o0e,t.f),ue(t.e,Wg,null),ue(t.e,a2,null),ue(t.j,Wg,null),ue(t.j,a2,null);break;case 1:Hr(y,t.e.a),Tn(y,t.i.n),Hr(y,wg(t.j.a)),Tn(y,t.a.n),Hr(y,t.f.a);break;default:Hr(y,t.e.a),Hr(y,wg(t.j.a)),Hr(y,t.f.a)}ru(t.f.a),Hr(t.f.a,y),Dr(t.f,t.e.c),g=u(N(t.e,(xe(),Os)),74),m=u(N(t.j,Os),74),w=u(N(t.f,Os),74),(g||m||w)&&(k=new pc,aie(k,w),aie(k,m),aie(k,g),ue(t.f,Os,k)),Dr(t.j,null),gr(t.j,null),Dr(t.e,null),gr(t.e,null),ws(t.a,null),ws(t.i,null),t.g&&yJe(e,t.g)}function GVt(e){iue();var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B;if(e==null||(c=nP(e),P=Ljt(c),P%4!=0))return null;if(D=P/4|0,D==0)return J(Tc,Gm,25,0,15,1);for(k=null,t=0,n=0,i=0,s=0,a=0,g=0,w=0,m=0,M=0,E=0,y=0,k=J(Tc,Gm,25,D*3,15,1);M>4)<<24>>24,k[E++]=((n&15)<<4|i>>2&15)<<24>>24,k[E++]=(i<<6|s)<<24>>24}return!c8(a=c[y++])||!c8(g=c[y++])?null:(t=Jf[a],n=Jf[g],w=c[y++],m=c[y++],Jf[w]==-1||Jf[m]==-1?w==61&&m==61?(n&15)!=0?null:(B=J(Tc,Gm,25,M*3+1,15,1),vo(k,0,B,0,M*3),B[E]=(t<<2|n>>4)<<24>>24,B):w!=61&&m==61?(i=Jf[w],(i&3)!=0?null:(B=J(Tc,Gm,25,M*3+2,15,1),vo(k,0,B,0,M*3),B[E++]=(t<<2|n>>4)<<24>>24,B[E]=((n&15)<<4|i>>2&15)<<24>>24,B)):null:(i=Jf[w],s=Jf[m],k[E++]=(t<<2|n>>4)<<24>>24,k[E++]=((n&15)<<4|i>>2&15)<<24>>24,k[E++]=(i<<6|s)<<24>>24,k))}function YVt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce;for(Vt(t,ctt,1),P=u(N(e,(xe(),$a)),218),s=new R(e.b);s.a=2){for(D=!0,E=new R(c.j),n=u(I(E),11),M=null;E.a0&&(s=u(Me(B.c.a,be-1),10),a=e.i[s.p],_e=p.Math.ceil(cm(e.n,s,B)),c=ce.a.e-B.d.d-(a.a.e+s.o.b+s.d.a)-_e),m=Oi,be0&&Se.a.e.e-Se.a.a-(Se.b.e.e-Se.b.a)<0,P=U.a.e.e-U.a.a-(U.b.e.e-U.b.a)<0&&Se.a.e.e-Se.a.a-(Se.b.e.e-Se.b.a)>0,M=U.a.e.e+U.b.aSe.b.e.e+Se.a.a,te=0,!D&&!P&&(E?c+k>0?te=k:m-i>0&&(te=i):M&&(c+g>0?te=g:m-G>0&&(te=G))),ce.a.e+=te,ce.b&&(ce.d.e+=te),!1))}function kJe(e,t,n){var i,s,c,a,g,w,m,y,k,E;if(i=new Ll(t.qf().a,t.qf().b,t.rf().a,t.rf().b),s=new gv,e.c)for(a=new R(t.wf());a.am&&(i.a+=ENe(J(Zl,ph,25,-m,15,1))),i.a+="Is",sh(w,lc(32))>=0)for(s=0;s=i.o.b/2}else G=!k;G?(q=u(N(i,(ae(),yy)),15),q?E?c=q:(s=u(N(i,py),15),s?q.gc()<=s.gc()?c=q:c=s:(c=new pe,ue(i,py,c))):(c=new pe,ue(i,yy,c))):(s=u(N(i,(ae(),py)),15),s?k?c=s:(q=u(N(i,yy),15),q?s.gc()<=q.gc()?c=s:c=q:(c=new pe,ue(i,yy,c))):(c=new pe,ue(i,py,c))),c.Fc(e),ue(e,(ae(),sN),n),t.d==n?(gr(t,null),n.e.c.length+n.g.c.length==0&&_s(n,null),WPt(n)):(Dr(t,null),n.e.c.length+n.g.c.length==0&&_s(n,null)),ru(t.a)}function tXt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt,Yt,Jn;for(G=new vr(e.b,0),y=t.Kc(),P=0,m=u(y.Pb(),19).a,ce=0,n=new Zi,Se=new ha;G.b=e.a&&(i=_zt(e,G),y=p.Math.max(y,i.b),te=p.Math.max(te,i.d),ge(g,new mr(G,i)));for(_e=new pe,m=0;m0),B.a.Xb(B.c=--B.b),Ue=new iu(e.b),fb(B,Ue),Rt(B.b0?(m=0,B&&(m+=g),m+=(Ue-1)*a,U&&(m+=g),_e&&U&&(m=p.Math.max(m,FHt(U,a,G,Se))),m0){for(E=y<100?null:new _d(y),m=new use(t),P=m.g,q=J(Zt,On,25,y,15,1),i=0,te=new q0(y),s=0;s=0;)if(M!=null?qn(M,P[w]):ie(M)===ie(P[w])){q.length<=i&&(B=q,q=J(Zt,On,25,2*q.length,15,1),vo(B,0,q,0,i)),q[i++]=s,rn(te,P[w]);break e}if(M=M,ie(M)===ie(g))break}}if(m=te,P=te.g,y=i,i>q.length&&(B=q,q=J(Zt,On,25,i,15,1),vo(B,0,q,0,i)),i>0){for(U=!0,c=0;c=0;)Qv(e,q[a]);if(i!=y){for(s=y;--s>=i;)Qv(m,s);B=q,q=J(Zt,On,25,i,15,1),vo(B,0,q,0,i)}t=m}}}else for(t=LNt(e,t),s=e.i;--s>=0;)t.Hc(e.g[s])&&(Qv(e,s),U=!0);if(U){if(q!=null){for(n=t.gc(),k=n==1?$5(e,4,t.Kc().Pb(),null,q[0],D):$5(e,6,t,q,q[0],D),E=n<100?null:new _d(n),s=t.Kc();s.Ob();)M=s.Pb(),E=dne(e,u(M,72),E);E?(E.Ei(k),E.Fi()):Hn(e.e,k)}else{for(E=GSt(t.gc()),s=t.Kc();s.Ob();)M=s.Pb(),E=dne(e,u(M,72),E);E&&E.Fi()}return!0}else return!1}function oXt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U;for(n=new GKe(t),n.a||QQt(t),m=zqt(t),w=new L0,B=new zGe,D=new R(t.a);D.a0||n.o==Xf&&s0?(k=u(Me(E.c.a,a-1),10),_e=cm(e.b,E,k),B=E.n.b-E.d.d-(k.n.b+k.o.b+k.d.a+_e)):B=E.n.b-E.d.d,m=p.Math.min(B,m),aa?BO(e,t,n):BO(e,n,t),sa?1:0}return i=u(N(t,(ae(),bo)),19).a,c=u(N(n,bo),19).a,i>c?BO(e,t,n):BO(e,n,t),ic?1:0}function Tue(e,t,n,i){var s,c,a,g,w,m,y,k,E,M,P,D,B,q,G;if(je(Pe($e(t,(Dn(),rI)))))return rt(),rt(),Yr;if(m=(!t.a&&(t.a=new we(mi,t,10,11)),t.a).i!=0,k=XBt(t),y=!k.dc(),m||y){if(s=u($e(t,qk),149),!s)throw F(new Yw("Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout."));if(G=Uee(s,(NO(),wI)),jKe(t),!m&&y&&!G)return rt(),rt(),Yr;if(w=new pe,ie($e(t,v2))===ie((Sa(),xd))&&(Uee(s,pI)||Uee(s,gI)))for(M=dYe(e,t),P=new ai,Hr(P,(!t.a&&(t.a=new we(mi,t,10,11)),t.a));P.b!=0;)E=u(P.b==0?null:(Rt(P.b!=0),Hl(P,P.a.a)),33),jKe(E),q=ie($e(E,v2))===ie(G6),q||gg(E,K6)&&!ure(s,$e(E,qk))?(g=Tue(e,E,n,i),_i(w,g),as(E,v2,G6),PYe(E)):Hr(P,(!E.a&&(E.a=new we(mi,E,10,11)),E.a));else for(M=(!t.a&&(t.a=new we(mi,t,10,11)),t.a).i,a=new Ft((!t.a&&(t.a=new we(mi,t,10,11)),t.a));a.e!=a.i.gc();)c=u(Qt(a),33),g=Tue(e,c,n,i),_i(w,g),PYe(c);for(B=new R(w);B.a=0?M=Fv(g):M=L9(Fv(g)),e.Ye(Nk,M)),m=new Er,E=!1,e.Xe(Mp)?(Bte(m,u(e.We(Mp),8)),E=!0):I5t(m,a.a/2,a.b/2),M.g){case 4:ue(y,Xo,(zl(),x1)),ue(y,cN,(yg(),o2)),y.o.b=a.b,D<0&&(y.o.a=-D),Xi(k,(ye(),At)),E||(m.a=a.a),m.a-=a.a;break;case 2:ue(y,Xo,(zl(),lw)),ue(y,cN,(yg(),Tk)),y.o.b=a.b,D<0&&(y.o.a=-D),Xi(k,(ye(),xt)),E||(m.a=0);break;case 1:ue(y,zg,(ya(),l2)),y.o.a=a.a,D<0&&(y.o.b=-D),Xi(k,(ye(),Xt)),E||(m.b=a.b),m.b-=a.b;break;case 3:ue(y,zg,(ya(),gy)),y.o.a=a.a,D<0&&(y.o.b=-D),Xi(k,(ye(),yt)),E||(m.b=0)}if(Bte(k.n,m),ue(y,Mp,m),t==t0||t==sa||t==jo){if(P=0,t==t0&&e.Xe(vd))switch(M.g){case 1:case 2:P=u(e.We(vd),19).a;break;case 3:case 4:P=-u(e.We(vd),19).a}else switch(M.g){case 4:case 2:P=c.b,t==sa&&(P/=s.b);break;case 1:case 3:P=c.a,t==sa&&(P/=s.a)}ue(y,Tp,P)}return ue(y,eo,M),y}function uXt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue;if(n=oe(Oe(N(e.a.j,(xe(),_0e)))),n<-1||!e.a.i||mv(u(N(e.a.o,Si),98))||Qs(e.a.o,(ye(),At)).gc()<2&&Qs(e.a.o,xt).gc()<2)return!0;if(e.a.c.Rf())return!1;for(ce=0,te=0,U=new pe,w=e.a.e,m=0,y=w.length;m=n}function fXt(){lee();function e(i){var s=this;this.dispatch=function(c){var a=c.data;switch(a.cmd){case"algorithms":var g=boe((rt(),new c3(new ua(R1.b))));i.postMessage({id:a.id,data:g});break;case"categories":var w=boe((rt(),new c3(new ua(R1.c))));i.postMessage({id:a.id,data:w});break;case"options":var m=boe((rt(),new c3(new ua(R1.d))));i.postMessage({id:a.id,data:m});break;case"register":wKt(a.algorithms),i.postMessage({id:a.id});break;case"layout":Yzt(a.graph,a.layoutOptions||{},a.options||{}),i.postMessage({id:a.id,data:a.graph});break}},this.saveDispatch=function(c){try{s.dispatch(c)}catch(a){i.postMessage({id:c.data.id,error:a})}}}function t(i){var s=this;this.dispatcher=new e({postMessage:function(c){s.onmessage({data:c})}}),this.postMessage=function(c){setTimeout(function(){s.dispatcher.saveDispatch({data:c})},0)}}if(typeof document===mz&&typeof self!==mz){var n=new e(self);self.onmessage=n.saveDispatch}else typeof f!==mz&&f.exports&&(Object.defineProperty(d,"__esModule",{value:!0}),f.exports={default:t,Worker:t})}function hXt(e){e.N||(e.N=!0,e.b=Ys(e,0),wi(e.b,0),wi(e.b,1),wi(e.b,2),e.bb=Ys(e,1),wi(e.bb,0),wi(e.bb,1),e.fb=Ys(e,2),wi(e.fb,3),wi(e.fb,4),ei(e.fb,5),e.qb=Ys(e,3),wi(e.qb,0),ei(e.qb,1),ei(e.qb,2),wi(e.qb,3),wi(e.qb,4),ei(e.qb,5),wi(e.qb,6),e.a=Pn(e,4),e.c=Pn(e,5),e.d=Pn(e,6),e.e=Pn(e,7),e.f=Pn(e,8),e.g=Pn(e,9),e.i=Pn(e,10),e.j=Pn(e,11),e.k=Pn(e,12),e.n=Pn(e,13),e.o=Pn(e,14),e.p=Pn(e,15),e.q=Pn(e,16),e.s=Pn(e,17),e.r=Pn(e,18),e.t=Pn(e,19),e.u=Pn(e,20),e.v=Pn(e,21),e.w=Pn(e,22),e.B=Pn(e,23),e.A=Pn(e,24),e.C=Pn(e,25),e.D=Pn(e,26),e.F=Pn(e,27),e.G=Pn(e,28),e.H=Pn(e,29),e.J=Pn(e,30),e.I=Pn(e,31),e.K=Pn(e,32),e.M=Pn(e,33),e.L=Pn(e,34),e.P=Pn(e,35),e.Q=Pn(e,36),e.R=Pn(e,37),e.S=Pn(e,38),e.T=Pn(e,39),e.U=Pn(e,40),e.V=Pn(e,41),e.X=Pn(e,42),e.W=Pn(e,43),e.Y=Pn(e,44),e.Z=Pn(e,45),e.$=Pn(e,46),e._=Pn(e,47),e.ab=Pn(e,48),e.cb=Pn(e,49),e.db=Pn(e,50),e.eb=Pn(e,51),e.gb=Pn(e,52),e.hb=Pn(e,53),e.ib=Pn(e,54),e.jb=Pn(e,55),e.kb=Pn(e,56),e.lb=Pn(e,57),e.mb=Pn(e,58),e.nb=Pn(e,59),e.ob=Pn(e,60),e.pb=Pn(e,61))}function aXt(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te;if(G=0,t.f.a==0)for(B=new R(e);B.am&&(pt(m,t.c.length),u(t.c[m],200)).a.c.length==0;)nc(t,(pt(m,t.c.length),t.c[m]));if(!w){--c;continue}if(ZQt(t,y,s,w,E,n,m,i)){k=!0;continue}if(E){if(sWt(t,y,s,w,n,m,i)){k=!0;continue}else if(Qse(y,s)){s.c=!0,k=!0;continue}}else if(Qse(y,s)){s.c=!0,k=!0;continue}if(k)continue}if(Qse(y,s)){s.c=!0,k=!0,w&&(w.k=!1);continue}else uj(s.q)}return k}function $Q(e,t,n,i,s,c,a){var g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt,Yt,Jn,Gi;for(D=0,Mt=0,m=new R(e.b);m.aD&&(c&&(rg(be,M),rg(_e,me(y.b-1)),ge(e.d,P),g.c=J(It,Ee,1,0,5,1)),Jn=n.b,Gi+=M+t,M=0,k=p.Math.max(k,n.b+n.c+Yt)),g.c[g.c.length]=w,QKe(w,Jn,Gi),k=p.Math.max(k,Jn+Yt+n.c),M=p.Math.max(M,E),Jn+=Yt+t,P=w;if(_i(e.a,g),ge(e.d,u(Me(g,g.c.length-1),157)),k=p.Math.max(k,i),Pt=Gi+M+n.a,Pt1&&(a=p.Math.min(a,p.Math.abs(u(df(g.a,1),8).b-y.b)))));else for(D=new R(t.j);D.as&&(c=E.a-s,a=_n,i.c=J(It,Ee,1,0,5,1),s=E.a),E.a>=s&&(i.c[i.c.length]=g,g.a.b>1&&(a=p.Math.min(a,p.Math.abs(u(df(g.a,g.a.b-2),8).b-E.b)))));if(i.c.length!=0&&c>t.o.a/2&&a>t.o.b/2){for(M=new mo,_s(M,t),Xi(M,(ye(),yt)),M.n.a=t.o.a/2,q=new mo,_s(q,t),Xi(q,Xt),q.n.a=t.o.a/2,q.n.b=t.o.b,w=new R(i);w.a=m.b?Dr(g,q):Dr(g,M)):(m=u(l8t(g.a),8),B=g.a.b==0?jf(g.c):u(IA(g.a),8),B.b>=m.b?gr(g,q):gr(g,M)),k=u(N(g,(xe(),Os)),74),k&&Mb(k,m,!0);t.n.a=s-t.o.a/2}}function wXt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt,Yt,Jn,Gi,Dl,Cu;if(Mt=null,Yt=t,Pt=P_e(e,T_e(n),Yt),Q5(Pt,ba(Yt,Sh)),Jn=u(bm(e.g,Wv(pa(Yt,qW))),33),E=pa(Yt,"sourcePort"),i=null,E&&(i=Wv(E)),Gi=u(bm(e.j,i),118),!Jn)throw g=xO(Yt),P="An edge must have a source node (edge id: '"+g,D=P+lk,F(new ih(D));if(Gi&&!uh(Mf(Gi),Jn))throw w=ba(Yt,Sh),B="The source port of an edge must be a port of the edge's source node (edge id: '"+w,q=B+lk,F(new ih(q));if(_e=(!Pt.b&&(Pt.b=new dt(Wt,Pt,4,7)),Pt.b),c=null,Gi?c=Gi:c=Jn,rn(_e,c),Dl=u(bm(e.g,Wv(pa(Yt,Cae))),33),M=pa(Yt,"targetPort"),s=null,M&&(s=Wv(M)),Cu=u(bm(e.j,s),118),!Dl)throw k=xO(Yt),G="An edge must have a target node (edge id: '"+k,U=G+lk,F(new ih(U));if(Cu&&!uh(Mf(Cu),Dl))throw m=ba(Yt,Sh),te="The target port of an edge must be a port of the edge's target node (edge id: '"+m,ce=te+lk,F(new ih(ce));if(Ue=(!Pt.c&&(Pt.c=new dt(Wt,Pt,5,8)),Pt.c),a=null,Cu?a=Cu:a=Dl,rn(Ue,a),(!Pt.b&&(Pt.b=new dt(Wt,Pt,4,7)),Pt.b).i==0||(!Pt.c&&(Pt.c=new dt(Wt,Pt,5,8)),Pt.c).i==0)throw y=ba(Yt,Sh),be=xnt+y,Se=be+lk,F(new ih(Se));return wj(Yt,Pt),c_t(Yt,Pt),Mt=OH(e,Yt,Pt),Mt}function EJe(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt;return k=yzt(Jo(e,(ye(),Yf)),t),P=Em(Jo(e,Yu),t),te=Em(Jo(e,Ml),t),_e=fj(Jo(e,vu),t),E=fj(Jo(e,Gl),t),G=Em(Jo(e,Zu),t),D=Em(Jo(e,Ic),t),be=Em(Jo(e,Pl),t),ce=Em(Jo(e,Yl),t),Ue=fj(Jo(e,Uo),t),q=Em(Jo(e,hc),t),U=Em(Jo(e,Rc),t),Se=Em(Jo(e,fc),t),Mt=fj(Jo(e,ac),t),M=fj(Jo(e,Cc),t),B=Em(Jo(e,Do),t),n=vm(H(_(hr,1),ds,25,15,[G.a,_e.a,be.a,Mt.a])),i=vm(H(_(hr,1),ds,25,15,[P.a,k.a,te.a,B.a])),s=q.a,c=vm(H(_(hr,1),ds,25,15,[D.a,E.a,ce.a,M.a])),m=vm(H(_(hr,1),ds,25,15,[G.b,P.b,D.b,U.b])),w=vm(H(_(hr,1),ds,25,15,[_e.b,k.b,E.b,B.b])),y=Ue.b,g=vm(H(_(hr,1),ds,25,15,[be.b,te.b,ce.b,Se.b])),nd(Jo(e,Yf),n+s,m+y),nd(Jo(e,Do),n+s,m+y),nd(Jo(e,Yu),n+s,0),nd(Jo(e,Ml),n+s,m+y+w),nd(Jo(e,vu),0,m+y),nd(Jo(e,Gl),n+s+i,m+y),nd(Jo(e,Ic),n+s+i,0),nd(Jo(e,Pl),0,m+y+w),nd(Jo(e,Yl),n+s+i,m+y+w),nd(Jo(e,Uo),0,m),nd(Jo(e,hc),n,0),nd(Jo(e,fc),0,m+y+w),nd(Jo(e,Cc),n+s+i,0),a=new Er,a.a=vm(H(_(hr,1),ds,25,15,[n+i+s+c,Ue.a,U.a,Se.a])),a.b=vm(H(_(hr,1),ds,25,15,[m+w+y+g,q.b,Mt.b,M.b])),a}function mXt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B;for(D=new pe,E=new R(e.d.b);E.as.d.d+s.d.a?y.f.d=!0:(y.f.d=!0,y.f.a=!0))),i.b!=i.d.c&&(t=n);y&&(c=u(Bt(e.f,a.d.i),57),t.bc.d.d+c.d.a?y.f.d=!0:(y.f.d=!0,y.f.a=!0))}for(g=new _t(qt($s(M).a.Kc(),new L));an(g);)a=u(nn(g),17),a.a.b!=0&&(t=u(IA(a.a),8),a.d.j==(ye(),yt)&&(B=new kS(t,new De(t.a,s.d.d),s,a),B.f.a=!0,B.a=a.d,D.c[D.c.length]=B),a.d.j==Xt&&(B=new kS(t,new De(t.a,s.d.d+s.d.a),s,a),B.f.d=!0,B.a=a.d,D.c[D.c.length]=B))}return D}function vXt(e,t,n){var i,s,c,a,g,w,m,y,k;if(Vt(n,"Network simplex node placement",1),e.e=t,e.n=u(N(t,(ae(),h2)),304),RWt(e),bRt(e),Ti(Hs(new ht(null,new gt(e.e.b,16)),new j6e),new yAe(e)),Ti(ni(Hs(ni(Hs(new ht(null,new gt(e.e.b,16)),new z6e),new W6e),new K6e),new V6e),new vAe(e)),je(Pe(N(e.e,(xe(),C6))))&&(a=xo(n,1),Vt(a,"Straight Edges Pre-Processing",1),tVt(e),Ht(a)),Y$t(e.f),c=u(N(t,A6),19).a*e.f.a.c.length,hQ(tee(nee(kF(e.f),c),!1),xo(n,1)),e.d.a.gc()!=0){for(a=xo(n,1),Vt(a,"Flexible Where Space Processing",1),g=u(E0(cM(ec(new ht(null,new gt(e.f.a,16)),new D6e),new C6e)),19).a,w=u(E0(oM(ec(new ht(null,new gt(e.f.a,16)),new $6e),new T6e)),19).a,m=w-g,y=T0(new ng,e.f),k=T0(new ng,e.f),Hu(ju(Pu(Mu(Du(new tu,2e4),m),y),k)),Ti(ni(ni(QF(e.i),new N6e),new I6e),new wBe(g,y,m,k)),s=e.d.a.ec().Kc();s.Ob();)i=u(s.Pb(),213),i.g=1;hQ(tee(nee(kF(e.f),c),!1),xo(a,1)),Ht(a)}je(Pe(N(t,C6)))&&(a=xo(n,1),Vt(a,"Straight Edges Post-Processing",1),oBt(e),Ht(a)),FKt(e),e.e=null,e.f=null,e.i=null,e.c=null,Pc(e.k),e.j=null,e.a=null,e.o=null,e.d.a.$b(),Ht(n)}function yXt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce;for(g=new R(e.a.b);g.a0)if(i=k.gc(),m=Di(p.Math.floor((i+1)/2))-1,s=Di(p.Math.ceil((i+1)/2))-1,t.o==Xf)for(y=s;y>=m;y--)t.a[te.p]==te&&(D=u(k.Xb(y),46),P=u(D.a,10),!fa(n,D.b)&&M>e.b.e[P.p]&&(t.a[P.p]=te,t.g[te.p]=t.g[P.p],t.a[te.p]=t.g[te.p],t.f[t.g[te.p].p]=(kt(),!!(je(t.f[t.g[te.p].p])&te.k==(jt(),sr))),M=e.b.e[P.p]));else for(y=m;y<=s;y++)t.a[te.p]==te&&(q=u(k.Xb(y),46),B=u(q.a,10),!fa(n,q.b)&&M=P&&(G>P&&(M.c=J(It,Ee,1,0,5,1),P=G),M.c[M.c.length]=a);M.c.length!=0&&(E=u(Me(M,sj(t,M.c.length)),128),Pt.a.Bc(E)!=null,E.s=D++,Sle(E,Ue,be),M.c=J(It,Ee,1,0,5,1))}for(te=e.c.length+1,g=new R(e);g.aMt.s&&(rl(n),nc(Mt.i,i),i.c>0&&(i.a=Mt,ge(Mt.t,i),i.b=Se,ge(Se.i,i)))}function Eue(e){var t,n,i,s,c;switch(t=e.c,t){case 11:return e.Ml();case 12:return e.Ol();case 14:return e.Ql();case 15:return e.Tl();case 16:return e.Rl();case 17:return e.Ul();case 21:return Rn(e),Ln(),Ln(),dx;case 10:switch(e.a){case 65:return e.yl();case 90:return e.Dl();case 122:return e.Kl();case 98:return e.El();case 66:return e.zl();case 60:return e.Jl();case 62:return e.Hl()}}switch(c=pXt(e),t=e.c,t){case 3:return e.Zl(c);case 4:return e.Xl(c);case 5:return e.Yl(c);case 0:if(e.a==123&&e.d=48&&t<=57){for(i=t-48;s=48&&t<=57;)if(i=i*10+t-48,i<0)throw F(new ln(dn((cn(),jae))))}else throw F(new ln(dn((cn(),Znt))));if(n=i,t==44){if(s>=e.j)throw F(new ln(dn((cn(),eit))));if((t=kr(e.i,s++))>=48&&t<=57){for(n=t-48;s=48&&t<=57;)if(n=n*10+t-48,n<0)throw F(new ln(dn((cn(),jae))));if(i>n)throw F(new ln(dn((cn(),tit))))}else n=-1}if(t!=125)throw F(new ln(dn((cn(),Jnt))));e.sl(s)?(c=(Ln(),Ln(),new vb(9,c)),e.d=s+1):(c=(Ln(),Ln(),new vb(3,c)),e.d=s),c.dm(i),c.cm(n),Rn(e)}}return c}function AJe(e,t,n,i,s){var c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt;for(D=new No(t.b),te=new No(t.b),E=new No(t.b),_e=new No(t.b),B=new No(t.b),Se=Cn(t,0);Se.b!=Se.d.c;)for(ce=u(xn(Se),11),g=new R(ce.g);g.a0,q=ce.g.c.length>0,m&&q?E.c[E.c.length]=ce:m?D.c[D.c.length]=ce:q&&(te.c[te.c.length]=ce);for(P=new R(D);P.a1)for(P=new pv((!e.a&&(e.a=new we(di,e,6,6)),e.a));P.e!=P.i.gc();)fS(P);for(a=u(V((!e.a&&(e.a=new we(di,e,6,6)),e.a),0),202),B=Jn,Jn>ce+te?B=ce+te:Jnbe+D?q=be+D:Gice-te&&Bbe-D&&qJn+Yt?_e=Jn+Yt:ceGi+Se?Ue=Gi+Se:beJn-Yt&&_eGi-Se&&Uen&&(E=n-1),M=fT+Kc(t,24)*M7*k-k/2,M<0?M=1:M>i&&(M=i-1),s=(m0(),w=new dE,w),hP(s,E),aP(s,M),rn((!a.a&&(a.a=new Fi(yu,a,5)),a.a),s)}function xe(){xe=X,nX=(Dn(),Uat),ppe=Gat,kC=ome,Wu=Yat,Sy=cme,Pp=Zat,bw=lme,Rk=ume,Lk=fme,iX=oI,jp=e0,rX=Jat,E6=dme,SN=Ay,OC=(Pue(),Klt),d2=Vlt,Ug=Xlt,g2=Ult,Dut=new Xr(sI,me(0)),Ik=Qlt,gpe=zlt,ky=Wlt,Spe=wut,bpe=Zlt,wpe=tut,oX=lut,mpe=rut,vpe=out,xN=Out,cX=mut,Ope=dut,ype=hut,kpe=put,Ap=Llt,T6=Blt,YV=tlt,K0e=ilt,upe=new x0(12),lpe=new Xr(Jg,upe),Q0e=(Ca(),Wk),$a=new Xr(Rwe,Q0e),dw=new Xr(Gc,0),$ut=new Xr(pU,me(1)),fN=new Xr(Ty,ek),Xg=rI,Si=V6,Nk=S2,Cut=_C,Eh=_at,hw=v2,Nut=new Xr(bU,(kt(),!0)),aw=HC,Kg=lU,Vg=Zg,kN=M1,tX=iI,q0e=(ts(),na),El=new Xr($p,q0e),Ep=O2,yN=Wwe,gw=yw,jut=gU,ape=rme,hpe=(xm(),VC),new Xr(Jwe,hpe),Aut=fU,Mut=hU,Put=aU,Eut=uU,sX=Ylt,ipe=Clt,JV=xlt,A6=Glt,Xo=wlt,fw=Vct,x6=Kct,uw=$ct,F0e=Nct,VV=Bct,yC=Ict,XV=zct,rpe=Tlt,spe=Elt,Z0e=hlt,ON=Hlt,eX=Plt,ZV=olt,cpe=Ilt,W0e=Jct,GV=elt,KV=tI,ope=Alt,aN=Tct,R0e=Cct,hN=xct,U0e=ult,X0e=llt,G0e=flt,Dk=k2,Os=y2,md=Bwe,Ah=cU,UV=oU,_0e=_ct,vd=dU,S6=Qat,wN=zat,Mp=tme,fpe=Wat,$k=Kat,epe=vlt,tpe=Olt,pw=Ey,zV=Sct,npe=Slt,bN=Gct,pN=Uct,vN=qC,J0e=glt,C6=Dlt,SC=hme,H0e=Xct,dpe=qlt,z0e=Yct,Tut=blt,xut=qct,Y0e=qwe,mN=mlt,gN=Qct,C1=Dct,B0e=Pct,dN=Act,L0e=Mct,WV=jct,Oy=Ect,V0e=clt}function IQ(e,t){OQ();var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se;if(U=e.e,y=e.d,s=e.a,U==0)switch(t){case 0:return"0";case 1:return UO;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return q=new Fd,q.a+="0E",q.a+=-t,q.a}if(D=y*10+1+7,B=J(Zl,ph,25,D+1,15,1),n=D,y==1)if(c=s[0],c<0){Se=Vi(c,is);do k=Se,Se=U9(Se,10),B[--n]=48+en(c1(k,Ar(Se,10)))&Ni;while(ho(Se,0)!=0)}else{Se=c;do k=Se,Se=Se/10|0,B[--n]=48+(k-Se*10)&Ni;while(Se!=0)}else{te=J(Zt,On,25,y,15,1),be=y,vo(s,0,te,0,be);e:for(;;){for(G=0,g=be-1;g>=0;g--)ce=$r(da(G,32),Vi(te[g],is)),M=jRt(ce),te[g]=en(M),G=en(Ud(M,32));P=en(G),E=n;do B[--n]=48+P%10&Ni;while((P=P/10|0)!=0&&n!=0);for(i=9-E+n,a=0;a0;a++)B[--n]=48;for(w=be-1;te[w]==0;w--)if(w==0)break e;be=w+1}for(;B[n]==48;)++n}return m=U<0,m&&(B[--n]=45),ah(B,n,D-n)}function jJe(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be;switch(e.c=t,e.g=new Jt,n=(ib(),new eb(e.c)),i=new OE(n),foe(i),U=un($e(e.c,(Y9(),swe))),w=u($e(e.c,YX),316),ce=u($e(e.c,ZX),429),a=u($e(e.c,nwe),482),te=u($e(e.c,GX),430),e.j=oe(Oe($e(e.c,fat))),g=e.a,w.g){case 0:g=e.a;break;case 1:g=e.b;break;case 2:g=e.i;break;case 3:g=e.e;break;case 4:g=e.f;break;default:throw F(new Ot($D+(w.f!=null?w.f:""+w.g)))}if(e.d=new tFe(g,ce,a),ue(e.d,(cO(),f6),Pe($e(e.c,lat))),e.d.c=je(Pe($e(e.c,iwe))),kM(e.c).i==0)return e.d;for(k=new Ft(kM(e.c));k.e!=k.i.gc();){for(y=u(Qt(k),33),M=y.g/2,E=y.f/2,be=new De(y.i+M,y.j+E);il(e.g,be);)lb(be,(p.Math.random()-.5)*mh,(p.Math.random()-.5)*mh);D=u($e(y,(Dn(),qC)),142),B=new mFe(be,new Ll(be.a-M-e.j/2-D.b,be.b-E-e.j/2-D.d,y.g+e.j+(D.b+D.c),y.f+e.j+(D.d+D.a))),ge(e.d.i,B),Qn(e.g,be,new mr(B,y))}switch(te.g){case 0:if(U==null)e.d.d=u(Me(e.d.i,0),65);else for(G=new R(e.d.i);G.a1&&ji(y,q,y.c.b,y.c),cP(s)));q=G}return y}function EXt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt,Yt,Jn,Gi,Dl,Cu,eh;for(Vt(n,"Greedy cycle removal",1),U=t.a,eh=U.c.length,e.a=J(Zt,On,25,eh,15,1),e.c=J(Zt,On,25,eh,15,1),e.b=J(Zt,On,25,eh,15,1),m=0,q=new R(U);q.a0?Yt+1:1);for(a=new R(be.g);a.a0?Yt+1:1)}e.c[m]==0?Tn(e.e,D):e.a[m]==0&&Tn(e.f,D),++m}for(P=-1,M=1,k=new pe,e.d=u(N(t,(ae(),vy)),230);eh>0;){for(;e.e.b!=0;)Gi=u(CF(e.e),10),e.b[Gi.p]=P--,Gle(e,Gi),--eh;for(;e.f.b!=0;)Dl=u(CF(e.f),10),e.b[Dl.p]=M++,Gle(e,Dl),--eh;if(eh>0){for(E=Mr,G=new R(U);G.a=E&&(te>E&&(k.c=J(It,Ee,1,0,5,1),E=te),k.c[k.c.length]=D));y=e.Zf(k),e.b[y.p]=M++,Gle(e,y),--eh}}for(Jn=U.c.length+1,m=0;me.b[Cu]&&(cp(i,!0),ue(t,pC,(kt(),!0)));e.a=null,e.c=null,e.b=null,ru(e.f),ru(e.e),Ht(n)}function $Je(e,t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q;for(i=new pe,g=new pe,B=t/2,M=e.gc(),s=u(e.Xb(0),8),q=u(e.Xb(1),8),P=Uq(s.a,s.b,q.a,q.b,B),ge(i,(pt(0,P.c.length),u(P.c[0],8))),ge(g,(pt(1,P.c.length),u(P.c[1],8))),m=2;m=0;w--)Tn(n,(pt(w,a.c.length),u(a.c[w],8)));return n}function AXt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M;if(a=!0,k=null,i=null,s=null,t=!1,M=Hdt,m=null,c=null,g=0,w=tq(e,g,Yme,Zme),w=0&&et(e.substr(g,2),"//")?(g+=2,w=tq(e,g,sx,ox),i=e.substr(g,w-g),g=w):k!=null&&(g==e.length||(fn(g,e.length),e.charCodeAt(g)!=47))&&(a=!1,w=Ate(e,lc(35),g),w==-1&&(w=e.length),i=e.substr(g,w-g),g=w);if(!n&&g0&&kr(y,y.length-1)==58&&(s=y,g=w)),g=e.j){e.a=-1,e.c=1;return}if(t=kr(e.i,e.d++),e.a=t,e.b==1){switch(t){case 92:if(i=10,e.d>=e.j)throw F(new ln(dn((cn(),_D))));e.a=kr(e.i,e.d++);break;case 45:(e.e&512)==512&&e.d=e.j||kr(e.i,e.d)!=63)break;if(++e.d>=e.j)throw F(new ln(dn((cn(),JW))));switch(t=kr(e.i,e.d++),t){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(e.d>=e.j)throw F(new ln(dn((cn(),JW))));if(t=kr(e.i,e.d++),t==61)i=16;else if(t==33)i=17;else throw F(new ln(dn((cn(),Nnt))));break;case 35:for(;e.d=e.j)throw F(new ln(dn((cn(),_D))));e.a=kr(e.i,e.d++);break;default:i=0}e.c=i}function PXt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt,Yt;if(Se=u(N(e,(xe(),Si)),98),Se!=(br(),Gf)&&Se!=D1){for(P=e.b,M=P.c.length,y=new No((vl(M+2,_Q),oP($r($r(5,M+2),(M+2)/10|0)))),D=new No((vl(M+2,_Q),oP($r($r(5,M+2),(M+2)/10|0)))),ge(y,new Jt),ge(y,new Jt),ge(D,new pe),ge(D,new pe),be=new pe,t=0;t=ce||!YDt(q,i))&&(i=AFe(t,y)),ws(q,i),c=new _t(qt($s(q).a.Kc(),new L));an(c);)s=u(nn(c),17),!e.a[s.p]&&(D=s.c.i,--e.e[D.p],e.e[D.p]==0&&V3(PO(M,D)));for(m=y.c.length-1;m>=0;--m)ge(t.b,(pt(m,y.c.length),u(y.c[m],29)));t.a.c=J(It,Ee,1,0,5,1),Ht(n)}function NJe(e){var t,n,i,s,c,a,g,w,m;for(e.b=1,Rn(e),t=null,e.c==0&&e.a==94?(Rn(e),t=(Ln(),Ln(),new bl(4)),Co(t,0,fk),g=new bl(4)):g=(Ln(),Ln(),new bl(4)),s=!0;(m=e.c)!=1;){if(m==0&&e.a==93&&!s){t&&(ES(t,g),g=t);break}if(n=e.a,i=!1,m==10)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:Qb(g,FO(n)),i=!0;break;case 105:case 73:case 99:case 67:n=(Qb(g,FO(n)),-1),n<0&&(i=!0);break;case 112:case 80:if(w=rle(e,n),!w)throw F(new ln(dn((cn(),eK))));Qb(g,w),i=!0;break;default:n=Ble(e)}else if(m==24&&!s){if(t&&(ES(t,g),g=t),c=NJe(e),ES(g,c),e.c!=0||e.a!=93)throw F(new ln(dn((cn(),znt))));break}if(Rn(e),!i){if(m==0){if(n==91)throw F(new ln(dn((cn(),Mae))));if(n==93)throw F(new ln(dn((cn(),Pae))));if(n==45&&!s&&e.a!=93)throw F(new ln(dn((cn(),tK))))}if(e.c!=0||e.a!=45||n==45&&s)Co(g,n,n);else{if(Rn(e),(m=e.c)==1)throw F(new ln(dn((cn(),HD))));if(m==0&&e.a==93)Co(g,n,n),Co(g,45,45);else{if(m==0&&e.a==93||m==24)throw F(new ln(dn((cn(),tK))));if(a=e.a,m==0){if(a==91)throw F(new ln(dn((cn(),Mae))));if(a==93)throw F(new ln(dn((cn(),Pae))));if(a==45)throw F(new ln(dn((cn(),tK))))}else m==10&&(a=Ble(e));if(Rn(e),n>a)throw F(new ln(dn((cn(),Vnt))));Co(g,n,a)}}}s=!1}if(e.c==1)throw F(new ln(dn((cn(),HD))));return Dm(g),CS(g),e.b=0,Rn(e),g}function DXt(e){sn(e.c,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#decimal"])),sn(e.d,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#integer"])),sn(e.e,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#boolean"])),sn(e.f,yn,H(_(Te,1),fe,2,6,[Pr,"EBoolean",jn,"EBoolean:Object"])),sn(e.i,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#byte"])),sn(e.g,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#hexBinary"])),sn(e.j,yn,H(_(Te,1),fe,2,6,[Pr,"EByte",jn,"EByte:Object"])),sn(e.n,yn,H(_(Te,1),fe,2,6,[Pr,"EChar",jn,"EChar:Object"])),sn(e.t,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#double"])),sn(e.u,yn,H(_(Te,1),fe,2,6,[Pr,"EDouble",jn,"EDouble:Object"])),sn(e.F,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#float"])),sn(e.G,yn,H(_(Te,1),fe,2,6,[Pr,"EFloat",jn,"EFloat:Object"])),sn(e.I,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#int"])),sn(e.J,yn,H(_(Te,1),fe,2,6,[Pr,"EInt",jn,"EInt:Object"])),sn(e.N,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#long"])),sn(e.O,yn,H(_(Te,1),fe,2,6,[Pr,"ELong",jn,"ELong:Object"])),sn(e.Z,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#short"])),sn(e.$,yn,H(_(Te,1),fe,2,6,[Pr,"EShort",jn,"EShort:Object"])),sn(e._,yn,H(_(Te,1),fe,2,6,[Pr,"http://www.w3.org/2001/XMLSchema#string"]))}function $Xt(e){var t,n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt,Yt;if(e.c.length==1)return pt(0,e.c.length),u(e.c[0],135);if(e.c.length<=0)return new KM;for(w=new R(e);w.ak&&(Pt=0,Yt+=y+Se,y=0),Q_t(ce,a,Pt,Yt),t=p.Math.max(t,Pt+be.a),y=p.Math.max(y,be.b),Pt+=be.a+Se;for(te=new Jt,n=new Jt,Ue=new R(e);Ue.aGq(c))&&(k=c);for(!k&&(k=(pt(0,B.c.length),u(B.c[0],180))),D=new R(t.b);D.a=-1900?1:0,n>=4?wn(e,H(_(Te,1),fe,2,6,[YJe,ZJe])[g]):wn(e,H(_(Te,1),fe,2,6,["BC","AD"])[g]);break;case 121:E$t(e,n,i);break;case 77:jQt(e,n,i);break;case 107:w=s.q.getHours(),w==0?zh(e,24,n):zh(e,w,n);break;case 83:Z_t(e,n,s);break;case 69:y=i.q.getDay(),n==5?wn(e,H(_(Te,1),fe,2,6,["S","M","T","W","T","F","S"])[y]):n==4?wn(e,H(_(Te,1),fe,2,6,[ez,tz,nz,iz,rz,sz,oz])[y]):wn(e,H(_(Te,1),fe,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[y]);break;case 97:s.q.getHours()>=12&&s.q.getHours()<24?wn(e,H(_(Te,1),fe,2,6,["AM","PM"])[1]):wn(e,H(_(Te,1),fe,2,6,["AM","PM"])[0]);break;case 104:k=s.q.getHours()%12,k==0?zh(e,12,n):zh(e,k,n);break;case 75:E=s.q.getHours()%12,zh(e,E,n);break;case 72:M=s.q.getHours(),zh(e,M,n);break;case 99:P=i.q.getDay(),n==5?wn(e,H(_(Te,1),fe,2,6,["S","M","T","W","T","F","S"])[P]):n==4?wn(e,H(_(Te,1),fe,2,6,[ez,tz,nz,iz,rz,sz,oz])[P]):n==3?wn(e,H(_(Te,1),fe,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[P]):zh(e,P,1);break;case 76:D=i.q.getMonth(),n==5?wn(e,H(_(Te,1),fe,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[D]):n==4?wn(e,H(_(Te,1),fe,2,6,[QQ,zQ,WQ,KQ,Gv,VQ,XQ,UQ,GQ,YQ,ZQ,JQ])[D]):n==3?wn(e,H(_(Te,1),fe,2,6,["Jan","Feb","Mar","Apr",Gv,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[D]):zh(e,D+1,n);break;case 81:B=i.q.getMonth()/3|0,n<4?wn(e,H(_(Te,1),fe,2,6,["Q1","Q2","Q3","Q4"])[B]):wn(e,H(_(Te,1),fe,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[B]);break;case 100:q=i.q.getDate(),zh(e,q,n);break;case 109:m=s.q.getMinutes(),zh(e,m,n);break;case 115:a=s.q.getSeconds(),zh(e,a,n);break;case 122:n<4?wn(e,c.c[0]):wn(e,c.c[1]);break;case 118:wn(e,c.b);break;case 90:n<3?wn(e,HBt(c)):n==3?wn(e,zBt(c)):wn(e,WBt(c.a));break;default:return!1}return!0}function Mue(e,t,n,i){var s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt,Yt,Jn;if(OYe(t),w=u(V((!t.b&&(t.b=new dt(Wt,t,4,7)),t.b),0),82),y=u(V((!t.c&&(t.c=new dt(Wt,t,5,8)),t.c),0),82),g=Ts(w),m=Ts(y),a=(!t.a&&(t.a=new we(di,t,6,6)),t.a).i==0?null:u(V((!t.a&&(t.a=new we(di,t,6,6)),t.a),0),202),Se=u(Bt(e.a,g),10),Pt=u(Bt(e.a,m),10),_e=null,Yt=null,W(w,186)&&(be=u(Bt(e.a,w),299),W(be,11)?_e=u(be,11):W(be,10)&&(Se=u(be,10),_e=u(Me(Se.j,0),11))),W(y,186)&&(Mt=u(Bt(e.a,y),299),W(Mt,11)?Yt=u(Mt,11):W(Mt,10)&&(Pt=u(Mt,10),Yt=u(Me(Pt.j,0),11))),!Se||!Pt)throw F(new L4("The source or the target of edge "+t+" could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN."));for(D=new I0,Cs(D,t),ue(D,(ae(),zn),t),ue(D,(xe(),Os),null),M=u(N(i,Po),21),Se==Pt&&M.Fc((ns(),v6)),_e||(ce=(es(),_o),Ue=null,a&&sm(u(N(Se,Si),98))&&(Ue=new De(a.j,a.k),j_e(Ue,Y8(t)),cHe(Ue,n),xb(m,g)&&(ce=Nc,Vn(Ue,Se.n))),_e=vZe(Se,Ue,ce,i)),Yt||(ce=(es(),Nc),Jn=null,a&&sm(u(N(Pt,Si),98))&&(Jn=new De(a.b,a.c),j_e(Jn,Y8(t)),cHe(Jn,n)),Yt=vZe(Pt,Jn,ce,Rr(Pt))),Dr(D,_e),gr(D,Yt),(_e.e.c.length>1||_e.g.c.length>1||Yt.e.c.length>1||Yt.g.c.length>1)&&M.Fc((ns(),m6)),E=new Ft((!t.n&&(t.n=new we(Rs,t,1,7)),t.n));E.e!=E.i.gc();)if(k=u(Qt(E),137),!je(Pe($e(k,Xg)))&&k.a)switch(B=RH(k),ge(D.b,B),u(N(B,Ah),272).g){case 1:case 2:M.Fc((ns(),Ak));break;case 0:M.Fc((ns(),Ek)),ue(B,Ah,(If(),Qk))}if(c=u(N(i,x6),314),q=u(N(i,ON),315),s=c==(Iv(),aC)||q==(cS(),dX),a&&(!a.a&&(a.a=new Fi(yu,a,5)),a.a).i!=0&&s){for(G=J9(a),P=new pc,te=Cn(G,0);te.b!=te.d.c;)U=u(xn(te),8),Tn(P,new ps(U));ue(D,t0e,P)}return D}function LXt(e){e.gb||(e.gb=!0,e.b=Ys(e,0),wi(e.b,18),ei(e.b,19),e.a=Ys(e,1),wi(e.a,1),ei(e.a,2),ei(e.a,3),ei(e.a,4),ei(e.a,5),e.o=Ys(e,2),wi(e.o,8),wi(e.o,9),ei(e.o,10),ei(e.o,11),ei(e.o,12),ei(e.o,13),ei(e.o,14),ei(e.o,15),ei(e.o,16),ei(e.o,17),ei(e.o,18),ei(e.o,19),ei(e.o,20),ei(e.o,21),ei(e.o,22),ei(e.o,23),vs(e.o),vs(e.o),vs(e.o),vs(e.o),vs(e.o),vs(e.o),vs(e.o),vs(e.o),vs(e.o),vs(e.o),e.p=Ys(e,3),wi(e.p,2),wi(e.p,3),wi(e.p,4),wi(e.p,5),ei(e.p,6),ei(e.p,7),vs(e.p),vs(e.p),e.q=Ys(e,4),wi(e.q,8),e.v=Ys(e,5),ei(e.v,9),vs(e.v),vs(e.v),vs(e.v),e.w=Ys(e,6),wi(e.w,2),wi(e.w,3),wi(e.w,4),ei(e.w,5),e.B=Ys(e,7),ei(e.B,1),vs(e.B),vs(e.B),vs(e.B),e.Q=Ys(e,8),ei(e.Q,0),vs(e.Q),e.R=Ys(e,9),wi(e.R,1),e.S=Ys(e,10),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),vs(e.S),e.T=Ys(e,11),ei(e.T,10),ei(e.T,11),ei(e.T,12),ei(e.T,13),ei(e.T,14),vs(e.T),vs(e.T),e.U=Ys(e,12),wi(e.U,2),wi(e.U,3),ei(e.U,4),ei(e.U,5),ei(e.U,6),ei(e.U,7),vs(e.U),e.V=Ys(e,13),ei(e.V,10),e.W=Ys(e,14),wi(e.W,18),wi(e.W,19),wi(e.W,20),ei(e.W,21),ei(e.W,22),ei(e.W,23),e.bb=Ys(e,15),wi(e.bb,10),wi(e.bb,11),wi(e.bb,12),wi(e.bb,13),wi(e.bb,14),wi(e.bb,15),wi(e.bb,16),ei(e.bb,17),vs(e.bb),vs(e.bb),e.eb=Ys(e,16),wi(e.eb,2),wi(e.eb,3),wi(e.eb,4),wi(e.eb,5),wi(e.eb,6),wi(e.eb,7),ei(e.eb,8),ei(e.eb,9),e.ab=Ys(e,17),wi(e.ab,0),wi(e.ab,1),e.H=Ys(e,18),ei(e.H,0),ei(e.H,1),ei(e.H,2),ei(e.H,3),ei(e.H,4),ei(e.H,5),vs(e.H),e.db=Ys(e,19),ei(e.db,2),e.c=Pn(e,20),e.d=Pn(e,21),e.e=Pn(e,22),e.f=Pn(e,23),e.i=Pn(e,24),e.g=Pn(e,25),e.j=Pn(e,26),e.k=Pn(e,27),e.n=Pn(e,28),e.r=Pn(e,29),e.s=Pn(e,30),e.t=Pn(e,31),e.u=Pn(e,32),e.fb=Pn(e,33),e.A=Pn(e,34),e.C=Pn(e,35),e.D=Pn(e,36),e.F=Pn(e,37),e.G=Pn(e,38),e.I=Pn(e,39),e.J=Pn(e,40),e.L=Pn(e,41),e.M=Pn(e,42),e.N=Pn(e,43),e.O=Pn(e,44),e.P=Pn(e,45),e.X=Pn(e,46),e.Y=Pn(e,47),e.Z=Pn(e,48),e.$=Pn(e,49),e._=Pn(e,50),e.cb=Pn(e,51),e.K=Pn(e,52))}function Dn(){Dn=X;var e,t;K6=new li(Qtt),qk=new li(ztt),jwe=(Wh(),tU),_at=new ot(bhe,jwe),Ty=new ot(ny,null),Hat=new li(fae),$we=(Nb(),ii(rU,H(_(sU,1),de,291,0,[iU]))),tI=new ot(TD,$we),_C=new ot(q7,(kt(),!1)),Nwe=(ts(),na),$p=new ot(vhe,Nwe),Lwe=(Ca(),wU),Rwe=new ot(_7,Lwe),_we=new ot(DD,!1),Hwe=(Sa(),cI),v2=new ot(CD,Hwe),Ywe=new x0(12),Jg=new ot(ap,Ywe),nI=new ot(N7,!1),qwe=new ot(mW,!1),QC=new ot(LS,!1),nme=(br(),D1),V6=new ot(Lz,nme),Ey=new li(ED),sI=new li($7),pU=new li(cD),bU=new li(RS),Qwe=new pc,y2=new ot(Ahe,Qwe),Qat=new ot(jhe,!1),zat=new ot(Dhe,!1),zwe=new j4,qC=new ot(Nhe,zwe),rI=new ot(ghe,!1),Xat=new ot(Wtt,1),new ot(Ktt,!0),me(0),new ot(Vtt,me(100)),new ot(Xtt,!1),me(0),new ot(Utt,me(4e3)),me(0),new ot(Gtt,me(400)),new ot(Ytt,!1),new ot(Ztt,!1),new ot(Jtt,!0),new ot(ent,!1),Dwe=(KP(),OU),qat=new ot(uae,Dwe),Uat=new ot(nhe,10),Gat=new ot(ihe,10),ome=new ot(jz,20),Yat=new ot(rhe,10),cme=new ot(Rz,2),Zat=new ot(she,10),lme=new ot(ohe,0),oI=new ot(uhe,5),ume=new ot(che,1),fme=new ot(lhe,1),e0=new ot(Xb,20),Jat=new ot(fhe,10),dme=new ot(hhe,10),Ay=new li(ahe),ame=new iNe,hme=new ot(Ihe,ame),Kat=new li(wW),Zwe=!1,Wat=new ot(bW,Zwe),Kwe=new x0(5),Wwe=new ot(yhe,Kwe),Vwe=(Bb(),t=u(sf(ss),9),new Rl(t,u($u(t,t.length),9),0)),O2=new ot(tk,Vwe),eme=(xm(),j1),Jwe=new ot(She,eme),fU=new li(xhe),hU=new li(Che),aU=new li(The),uU=new li(Ehe),Xwe=(e=u(sf(tx),9),new Rl(e,u($u(e,e.length),9),0)),Zg=new ot(Wm,Xwe),Gwe=Ge((Vc(),Vk)),M1=new ot(iy,Gwe),Uwe=new De(0,0),k2=new ot(ry,Uwe),iI=new ot(pW,!1),Iwe=(If(),Qk),cU=new ot(Mhe,Iwe),oU=new ot(lD,!1),me(1),new ot(tnt,null),tme=new li($he),dU=new li(Phe),sme=(ye(),Ks),S2=new ot(phe,sme),Gc=new li(dhe),ime=(Dc(),Ge($1)),yw=new ot(nk,ime),gU=new ot(Ohe,!1),rme=new ot(khe,!0),HC=new ot(whe,!1),lU=new ot(mhe,!1),Bwe=new ot(Dz,1),Fwe=(mj(),vU),new ot(nnt,Fwe),Vat=!0}function ae(){ae=X;var e,t;zn=new li(afe),Yge=new li("coordinateOrigin"),HV=new li("processors"),Gge=new Wi("compoundNode",(kt(),!1)),bC=new Wi("insideConnections",!1),t0e=new li("originalBendpoints"),n0e=new li("originalDummyNodePosition"),i0e=new li("originalLabelEdge"),mC=new li("representedLabels"),y6=new li("endLabels"),by=new li("endLabel.origin"),my=new Wi("labelSide",(Ol(),KC)),u2=new Wi("maxEdgeThickness",0),Vf=new Wi("reversed",!1),vy=new li(Bet),mf=new Wi("longEdgeSource",null),pu=new Wi("longEdgeTarget",null),cw=new Wi("longEdgeHasLabelDummies",!1),wC=new Wi("longEdgeBeforeLabelDummy",!1),cN=new Wi("edgeConstraint",(yg(),xV)),Cp=new li("inLayerLayoutUnit"),zg=new Wi("inLayerConstraint",(ya(),gC)),wy=new Wi("inLayerSuccessorConstraint",new pe),e0e=new Wi("inLayerSuccessorConstraintBetweenNonDummies",!1),$c=new li("portDummy"),oN=new Wi("crossingHint",me(0)),Po=new Wi("graphProperties",(t=u(sf(jV),9),new Rl(t,u($u(t,t.length),9),0))),eo=new Wi("externalPortSide",(ye(),Ks)),Jge=new Wi("externalPortSize",new Er),RV=new li("externalPortReplacedDummies"),lN=new li("externalPortReplacedDummy"),ow=new Wi("externalPortConnections",(e=u(sf(Wr),9),new Rl(e,u($u(e,e.length),9),0))),Tp=new Wi(Pet,0),Uge=new li("barycenterAssociates"),yy=new li("TopSideComments"),py=new li("BottomSideComments"),sN=new li("CommentConnectionPort"),BV=new Wi("inputCollect",!1),_V=new Wi("outputCollect",!1),pC=new Wi("cyclic",!1),Zge=new li("crossHierarchyMap"),QV=new li("targetOffset"),new Wi("splineLabelSize",new Er),h2=new li("spacings"),uN=new Wi("partitionConstraint",!1),Sp=new li("breakingPoint.info"),o0e=new li("splines.survivingEdge"),Wg=new li("splines.route.start"),a2=new li("splines.edgeChain"),s0e=new li("originalPortConstraints"),Pk=new li("selfLoopHolder"),jk=new li("splines.nsPortY"),bo=new li("modelOrder"),FV=new li("longEdgeTargetNode"),xp=new Wi(htt,!1),f2=new Wi(htt,!1),LV=new li("layerConstraints.hiddenNodes"),r0e=new li("layerConstraints.opposidePort"),qV=new li("targetNode.modelOrder")}function Pue(){Pue=X,w0e=(m9(),Z$),Xct=new ot(yfe,w0e),olt=new ot(Ofe,(kt(),!1)),S0e=(FM(),IV),hlt=new ot(aD,S0e),Tlt=new ot(kfe,!1),Elt=new ot(Sfe,!0),Sct=new ot(xfe,!1),j0e=(g9(),bX),qlt=new ot(Cfe,j0e),me(1),Glt=new ot(Tfe,me(7)),Ylt=new ot(Efe,!1),clt=new ot(Afe,!1),b0e=(Ag(),kV),Vct=new ot(Qz,b0e),T0e=(bj(),uX),Clt=new ot(B7,T0e),x0e=(zl(),vC),wlt=new ot(Mfe,x0e),me(-1),blt=new ot(Pfe,me(-1)),me(-1),mlt=new ot(jfe,me(-1)),me(-1),vlt=new ot(zz,me(4)),me(-1),Olt=new ot(Wz,me(2)),C0e=(Nm(),MN),xlt=new ot(Kz,C0e),me(0),Slt=new ot(Vz,me(0)),glt=new ot(Xz,me(_n)),p0e=(Iv(),dy),Kct=new ot(HS,p0e),$ct=new ot(Dfe,!1),_ct=new ot(Uz,.1),zct=new ot(Gz,!1),me(-1),qct=new ot($fe,me(-1)),me(-1),Qct=new ot(Nfe,me(-1)),me(0),Nct=new ot(Ife,me(40)),g0e=(fO(),$V),Bct=new ot(Yz,g0e),d0e=dC,Ict=new ot(dD,d0e),P0e=(cS(),M6),Hlt=new ot(Km,P0e),Dlt=new li(gD),E0e=(f9(),eN),Alt=new ot(Zz,E0e),A0e=(G9(),tN),Plt=new ot(Jz,A0e),Ilt=new ot(eW,.3),Llt=new li(tW),M0e=(jb(),AN),Blt=new ot(nW,M0e),y0e=(EP(),mX),Jct=new ot(Rfe,y0e),O0e=(r9(),vX),elt=new ot(Lfe,O0e),k0e=(wO(),D6),tlt=new ot(pD,k0e),ilt=new ot(bD,.2),Yct=new ot(iW,2),Klt=new ot(Bfe,null),Xlt=new ot(Ffe,10),Vlt=new ot(_fe,10),Ult=new ot(Hfe,20),me(0),Qlt=new ot(qfe,me(0)),me(0),zlt=new ot(Qfe,me(0)),me(0),Wlt=new ot(zfe,me(0)),xct=new ot(rW,!1),u0e=(jO(),w6),Tct=new ot(Wfe,u0e),l0e=(GM(),yV),Cct=new ot(Kfe,l0e),ult=new ot(wD,!1),me(0),llt=new ot(sW,me(16)),me(0),flt=new ot(oW,me(5)),N0e=(DP(),kX),wut=new ot(Da,N0e),Zlt=new ot(mD,10),tut=new ot(vD,1),$0e=(gP(),Y$),lut=new ot(qS,$0e),rut=new li(cW),D0e=me(1),me(0),out=new ot(lW,D0e),I0e=(CP(),OX),Out=new ot(yD,I0e),mut=new li(OD),dut=new ot(kD,!0),hut=new ot(SD,2),put=new ot(uW,!0),v0e=(yj(),J$),Gct=new ot(Vfe,v0e),m0e=(zv(),xk),Uct=new ot(Xfe,m0e),a0e=(ka(),T1),Dct=new ot(xD,a0e),jct=new ot(Ufe,!1),f0e=(U0(),n2),Ect=new ot(fW,f0e),h0e=(G5(),fX),Pct=new ot(Gfe,h0e),Act=new ot(hW,0),Mct=new ot(aW,0),dlt=SV,alt=aC,ylt=TN,klt=TN,plt=lX,Hct=(Sa(),xd),Wct=dy,Fct=dy,Rct=dy,Lct=xd,$lt=P6,Nlt=M6,Mlt=M6,jlt=M6,Rlt=gX,_lt=P6,Flt=P6,nlt=(Ca(),My),rlt=My,slt=D6,Zct=zC,Jlt=Bk,eut=ww,nut=Bk,iut=ww,uut=Bk,fut=ww,sut=OV,cut=Y$,kut=Bk,Sut=ww,vut=Bk,yut=ww,gut=ww,aut=ww,but=ww}function Gr(){Gr=X,X1e=new $i("DIRECTION_PREPROCESSOR",0),W1e=new $i("COMMENT_PREPROCESSOR",1),a6=new $i("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),oV=new $i("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),dge=new $i("PARTITION_PREPROCESSOR",4),D$=new $i("LABEL_DUMMY_INSERTER",5),q$=new $i("SELF_LOOP_PREPROCESSOR",6),yk=new $i("LAYER_CONSTRAINT_PREPROCESSOR",7),hge=new $i("PARTITION_MIDPROCESSOR",8),nge=new $i("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),uge=new $i("NODE_PROMOTION",10),vk=new $i("LAYER_CONSTRAINT_POSTPROCESSOR",11),age=new $i("PARTITION_POSTPROCESSOR",12),J1e=new $i("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),gge=new $i("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),F1e=new $i("BREAKING_POINT_INSERTER",15),R$=new $i("LONG_EDGE_SPLITTER",16),cV=new $i("PORT_SIDE_PROCESSOR",17),P$=new $i("INVERTED_PORT_PROCESSOR",18),F$=new $i("PORT_LIST_SORTER",19),bge=new $i("SORT_BY_INPUT_ORDER_OF_MODEL",20),B$=new $i("NORTH_SOUTH_PORT_PREPROCESSOR",21),_1e=new $i("BREAKING_POINT_PROCESSOR",22),fge=new $i(itt,23),wge=new $i(rtt,24),_$=new $i("SELF_LOOP_PORT_RESTORER",25),pge=new $i("SINGLE_EDGE_GRAPH_WRAPPER",26),j$=new $i("IN_LAYER_CONSTRAINT_PROCESSOR",27),G1e=new $i("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",28),cge=new $i("LABEL_AND_NODE_SIZE_PROCESSOR",29),oge=new $i("INNERMOST_NODE_MARGIN_CALCULATOR",30),Q$=new $i("SELF_LOOP_ROUTER",31),Q1e=new $i("COMMENT_NODE_MARGIN_CALCULATOR",32),M$=new $i("END_LABEL_PREPROCESSOR",33),N$=new $i("LABEL_DUMMY_SWITCHER",34),q1e=new $i("CENTER_LABEL_MANAGEMENT_PROCESSOR",35),mk=new $i("LABEL_SIDE_SELECTOR",36),rge=new $i("HYPEREDGE_DUMMY_MERGER",37),ege=new $i("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",38),lge=new $i("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",39),d6=new $i("HIERARCHICAL_PORT_POSITION_PROCESSOR",40),K1e=new $i("CONSTRAINTS_POSTPROCESSOR",41),z1e=new $i("COMMENT_POSTPROCESSOR",42),sge=new $i("HYPERNODE_PROCESSOR",43),tge=new $i("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",44),I$=new $i("LONG_EDGE_JOINER",45),H$=new $i("SELF_LOOP_POSTPROCESSOR",46),H1e=new $i("BREAKING_POINT_REMOVER",47),L$=new $i("NORTH_SOUTH_PORT_POSTPROCESSOR",48),ige=new $i("HORIZONTAL_COMPACTOR",49),$$=new $i("LABEL_DUMMY_REMOVER",50),Y1e=new $i("FINAL_SPLINE_BENDPOINTS_CALCULATOR",51),U1e=new $i("END_LABEL_SORTER",52),fC=new $i("REVERSED_EDGE_RESTORER",53),A$=new $i("END_LABEL_POSTPROCESSOR",54),Z1e=new $i("HIERARCHICAL_NODE_RESIZER",55),V1e=new $i("DIRECTION_POSTPROCESSOR",56)}function BXt(e,t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue,Mt,Pt,Yt,Jn,Gi,Dl,Cu,eh,MI,fT,gx,hT,Zk,LU,B1t,BU,Pd,Fp,Jk,aT,dT,Iy,FU,px,F1t,D2e,_p,bx,_U,Ry,wx,Pw,mx,HU,_1t;for(D2e=0,Jn=t,Cu=0,fT=Jn.length;Cu0&&(e.a[Pd.p]=D2e++)}for(wx=0,Gi=n,eh=0,gx=Gi.length;eh0;){for(Pd=(Rt(dT.b>0),u(dT.a.Xb(dT.c=--dT.b),11)),aT=0,g=new R(Pd.e);g.a0&&(Pd.j==(ye(),yt)?(e.a[Pd.p]=wx,++wx):(e.a[Pd.p]=wx+hT+LU,++LU))}wx+=LU}for(Jk=new Jt,P=new ha,Yt=t,Dl=0,MI=Yt.length;Dlm.b&&(m.b=Iy)):Pd.i.c==F1t&&(Iym.c&&(m.c=Iy));for(U3(D,0,D.length,null),Ry=J(Zt,On,25,D.length,15,1),i=J(Zt,On,25,wx+1,15,1),q=0;q0;)Se%2>0&&(s+=HU[Se+1]),Se=(Se-1)/2|0,++HU[Se];for(Ue=J(aft,Ee,362,D.length*2,0,1),te=0;te'?":et(Nnt,e)?"'(?<' or '(? toIndex: ",Que=", toIndex: ",zue="Index: ",Wue=", Size: ",GO="org.eclipse.elk.alg.common",Yn={62:1},het="org.eclipse.elk.alg.common.compaction",aet="Scanline/EventHandler",Yh="org.eclipse.elk.alg.common.compaction.oned",det="CNode belongs to another CGroup.",get="ISpacingsHandler/1",vz="The ",yz=" instance has been finished already.",pet="The direction ",bet=" is not supported by the CGraph instance.",wet="OneDimensionalCompactor",met="OneDimensionalCompactor/lambda$0$Type",vet="Quadruplet",yet="ScanlineConstraintCalculator",Oet="ScanlineConstraintCalculator/ConstraintsScanlineHandler",ket="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",xet="ScanlineConstraintCalculator/Timestamp",Cet="ScanlineConstraintCalculator/lambda$0$Type",bh={169:1,45:1},Oz="org.eclipse.elk.alg.common.compaction.options",Ws="org.eclipse.elk.core.data",Kue="org.eclipse.elk.polyomino.traversalStrategy",Vue="org.eclipse.elk.polyomino.lowLevelSort",Xue="org.eclipse.elk.polyomino.highLevelSort",Uue="org.eclipse.elk.polyomino.fill",lu={130:1},kz="polyomino",$S="org.eclipse.elk.alg.common.networksimplex",Zh={177:1,3:1,4:1},Tet="org.eclipse.elk.alg.common.nodespacing",$g="org.eclipse.elk.alg.common.nodespacing.cellsystem",YO="CENTER",Eet={212:1,326:1},Gue={3:1,4:1,5:1,595:1},Jv="LEFT",ey="RIGHT",Yue="Vertical alignment cannot be null",Zue="BOTTOM",tD="org.eclipse.elk.alg.common.nodespacing.internal",NS="UNDEFINED",qf=.01,P7="org.eclipse.elk.alg.common.nodespacing.internal.algorithm",Aet="LabelPlacer/lambda$0$Type",Met="LabelPlacer/lambda$1$Type",Pet="portRatioOrPosition",ZO="org.eclipse.elk.alg.common.overlaps",Sz="DOWN",wh="org.eclipse.elk.alg.common.polyomino",nD="NORTH",xz="EAST",Cz="SOUTH",Tz="WEST",iD="org.eclipse.elk.alg.common.polyomino.structures",Jue="Direction",Ez="Grid is only of size ",Az=". Requested point (",Mz=") is out of bounds.",rD=" Given center based coordinates were (",j7="org.eclipse.elk.graph.properties",jet="IPropertyHolder",efe={3:1,94:1,134:1},ty="org.eclipse.elk.alg.common.spore",Det="org.eclipse.elk.alg.common.utils",Ng={209:1},Qm="org.eclipse.elk.core",$et="Connected Components Compaction",Net="org.eclipse.elk.alg.disco",sD="org.eclipse.elk.alg.disco.graph",Pz="org.eclipse.elk.alg.disco.options",tfe="CompactionStrategy",nfe="org.eclipse.elk.disco.componentCompaction.strategy",ife="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",rfe="org.eclipse.elk.disco.debug.discoGraph",sfe="org.eclipse.elk.disco.debug.discoPolys",Iet="componentCompaction",Ig="org.eclipse.elk.disco",jz="org.eclipse.elk.spacing.componentComponent",Dz="org.eclipse.elk.edge.thickness",ny="org.eclipse.elk.aspectRatio",ap="org.eclipse.elk.padding",zm="org.eclipse.elk.alg.disco.transform",$z=1.5707963267948966,JO=17976931348623157e292,Vb={3:1,4:1,5:1,192:1},ofe={3:1,6:1,4:1,5:1,106:1,120:1},cfe="org.eclipse.elk.alg.force",lfe="ComponentsProcessor",Ret="ComponentsProcessor/1",D7="org.eclipse.elk.alg.force.graph",Let="Component Layout",ufe="org.eclipse.elk.alg.force.model",oD="org.eclipse.elk.force.model",ffe="org.eclipse.elk.force.iterations",hfe="org.eclipse.elk.force.repulsivePower",Nz="org.eclipse.elk.force.temperature",mh=.001,Iz="org.eclipse.elk.force.repulsion",IS="org.eclipse.elk.alg.force.options",ek=1.600000023841858,xl="org.eclipse.elk.force",$7="org.eclipse.elk.priority",Xb="org.eclipse.elk.spacing.nodeNode",Rz="org.eclipse.elk.spacing.edgeLabel",cD="org.eclipse.elk.randomSeed",RS="org.eclipse.elk.separateConnectedComponents",N7="org.eclipse.elk.interactive",Lz="org.eclipse.elk.portConstraints",lD="org.eclipse.elk.edgeLabels.inline",LS="org.eclipse.elk.omitNodeMicroLayout",iy="org.eclipse.elk.nodeSize.options",Wm="org.eclipse.elk.nodeSize.constraints",tk="org.eclipse.elk.nodeLabels.placement",nk="org.eclipse.elk.portLabels.placement",afe="origin",Bet="random",Fet="boundingBox.upLeft",_et="boundingBox.lowRight",dfe="org.eclipse.elk.stress.fixed",gfe="org.eclipse.elk.stress.desiredEdgeLength",pfe="org.eclipse.elk.stress.dimension",bfe="org.eclipse.elk.stress.epsilon",wfe="org.eclipse.elk.stress.iterationLimit",p1="org.eclipse.elk.stress",Het="ELK Stress",ry="org.eclipse.elk.nodeSize.minimum",uD="org.eclipse.elk.alg.force.stress",qet="Layered layout",sy="org.eclipse.elk.alg.layered",I7="org.eclipse.elk.alg.layered.compaction.components",BS="org.eclipse.elk.alg.layered.compaction.oned",fD="org.eclipse.elk.alg.layered.compaction.oned.algs",Rg="org.eclipse.elk.alg.layered.compaction.recthull",vh="org.eclipse.elk.alg.layered.components",ja="NONE",ao={3:1,6:1,4:1,9:1,5:1,122:1},Qet={3:1,6:1,4:1,5:1,141:1,106:1,120:1},hD="org.eclipse.elk.alg.layered.compound",ki={51:1},Bo="org.eclipse.elk.alg.layered.graph",Bz=" -> ",zet="Not supported by LGraph",mfe="Port side is undefined",Fz={3:1,6:1,4:1,5:1,474:1,141:1,106:1,120:1},dd={3:1,6:1,4:1,5:1,141:1,193:1,203:1,106:1,120:1},Wet={3:1,6:1,4:1,5:1,141:1,1943:1,203:1,106:1,120:1},Ket=`([{"' \r +`,Vet=`)]}"' \r +`,Xet="The given string contains parts that cannot be parsed as numbers.",R7="org.eclipse.elk.core.math",Uet={3:1,4:1,142:1,207:1,414:1},Get={3:1,4:1,116:1,207:1,414:1},Dt="org.eclipse.elk.layered",gd="org.eclipse.elk.alg.layered.graph.transform",Yet="ElkGraphImporter",Zet="ElkGraphImporter/lambda$0$Type",Jet="ElkGraphImporter/lambda$1$Type",ett="ElkGraphImporter/lambda$2$Type",ttt="ElkGraphImporter/lambda$4$Type",ntt="Node margin calculation",Ct="org.eclipse.elk.alg.layered.intermediate",itt="ONE_SIDED_GREEDY_SWITCH",rtt="TWO_SIDED_GREEDY_SWITCH",_z="No implementation is available for the layout processor ",vfe="IntermediateProcessorStrategy",Hz="Node '",stt="FIRST_SEPARATE",ott="LAST_SEPARATE",ctt="Odd port side processing",Bi="org.eclipse.elk.alg.layered.intermediate.compaction",FS="org.eclipse.elk.alg.layered.intermediate.greedyswitch",Jh="org.eclipse.elk.alg.layered.p3order.counting",L7={225:1},oy="org.eclipse.elk.alg.layered.intermediate.loops",Cl="org.eclipse.elk.alg.layered.intermediate.loops.ordering",b1="org.eclipse.elk.alg.layered.intermediate.loops.routing",_S="org.eclipse.elk.alg.layered.intermediate.preserveorder",yh="org.eclipse.elk.alg.layered.intermediate.wrapping",go="org.eclipse.elk.alg.layered.options",qz="INTERACTIVE",ltt="DEPTH_FIRST",utt="EDGE_LENGTH",ftt="SELF_LOOPS",htt="firstTryWithInitialOrder",yfe="org.eclipse.elk.layered.directionCongruency",Ofe="org.eclipse.elk.layered.feedbackEdges",aD="org.eclipse.elk.layered.interactiveReferencePoint",kfe="org.eclipse.elk.layered.mergeEdges",Sfe="org.eclipse.elk.layered.mergeHierarchyEdges",xfe="org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides",Cfe="org.eclipse.elk.layered.portSortingStrategy",Tfe="org.eclipse.elk.layered.thoroughness",Efe="org.eclipse.elk.layered.unnecessaryBendpoints",Afe="org.eclipse.elk.layered.generatePositionAndLayerIds",Qz="org.eclipse.elk.layered.cycleBreaking.strategy",B7="org.eclipse.elk.layered.layering.strategy",Mfe="org.eclipse.elk.layered.layering.layerConstraint",Pfe="org.eclipse.elk.layered.layering.layerChoiceConstraint",jfe="org.eclipse.elk.layered.layering.layerId",zz="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",Wz="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",Kz="org.eclipse.elk.layered.layering.nodePromotion.strategy",Vz="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",Xz="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",HS="org.eclipse.elk.layered.crossingMinimization.strategy",Dfe="org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder",Uz="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",Gz="org.eclipse.elk.layered.crossingMinimization.semiInteractive",$fe="org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint",Nfe="org.eclipse.elk.layered.crossingMinimization.positionId",Ife="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",Yz="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",dD="org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type",Km="org.eclipse.elk.layered.nodePlacement.strategy",gD="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",Zz="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",Jz="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",eW="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",tW="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",nW="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",Rfe="org.eclipse.elk.layered.edgeRouting.selfLoopDistribution",Lfe="org.eclipse.elk.layered.edgeRouting.selfLoopOrdering",pD="org.eclipse.elk.layered.edgeRouting.splines.mode",bD="org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor",iW="org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth",Bfe="org.eclipse.elk.layered.spacing.baseValue",Ffe="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",_fe="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",Hfe="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",qfe="org.eclipse.elk.layered.priority.direction",Qfe="org.eclipse.elk.layered.priority.shortness",zfe="org.eclipse.elk.layered.priority.straightness",rW="org.eclipse.elk.layered.compaction.connectedComponents",Wfe="org.eclipse.elk.layered.compaction.postCompaction.strategy",Kfe="org.eclipse.elk.layered.compaction.postCompaction.constraints",wD="org.eclipse.elk.layered.highDegreeNodes.treatment",sW="org.eclipse.elk.layered.highDegreeNodes.threshold",oW="org.eclipse.elk.layered.highDegreeNodes.treeHeight",Da="org.eclipse.elk.layered.wrapping.strategy",mD="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",vD="org.eclipse.elk.layered.wrapping.correctionFactor",qS="org.eclipse.elk.layered.wrapping.cutting.strategy",cW="org.eclipse.elk.layered.wrapping.cutting.cuts",lW="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",yD="org.eclipse.elk.layered.wrapping.validify.strategy",OD="org.eclipse.elk.layered.wrapping.validify.forbiddenIndices",kD="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",SD="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",uW="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",Vfe="org.eclipse.elk.layered.edgeLabels.sideSelection",Xfe="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",xD="org.eclipse.elk.layered.considerModelOrder.strategy",Ufe="org.eclipse.elk.layered.considerModelOrder.noModelOrder",fW="org.eclipse.elk.layered.considerModelOrder.components",Gfe="org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy",hW="org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence",aW="org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence",dW="layering",att="layering.minWidth",dtt="layering.nodePromotion",F7="crossingMinimization",CD="org.eclipse.elk.hierarchyHandling",gtt="crossingMinimization.greedySwitch",ptt="nodePlacement",btt="nodePlacement.bk",wtt="edgeRouting",_7="org.eclipse.elk.edgeRouting",Qf="spacing",Yfe="priority",Zfe="compaction",mtt="compaction.postCompaction",vtt="Specifies whether and how post-process compaction is applied.",Jfe="highDegreeNodes",ehe="wrapping",ytt="wrapping.cutting",Ott="wrapping.validify",the="wrapping.multiEdge",gW="edgeLabels",H7="considerModelOrder",nhe="org.eclipse.elk.spacing.commentComment",ihe="org.eclipse.elk.spacing.commentNode",rhe="org.eclipse.elk.spacing.edgeEdge",she="org.eclipse.elk.spacing.edgeNode",ohe="org.eclipse.elk.spacing.labelLabel",che="org.eclipse.elk.spacing.labelPortHorizontal",lhe="org.eclipse.elk.spacing.labelPortVertical",uhe="org.eclipse.elk.spacing.labelNode",fhe="org.eclipse.elk.spacing.nodeSelfLoop",hhe="org.eclipse.elk.spacing.portPort",ahe="org.eclipse.elk.spacing.individual",dhe="org.eclipse.elk.port.borderOffset",ghe="org.eclipse.elk.noLayout",phe="org.eclipse.elk.port.side",q7="org.eclipse.elk.debugMode",bhe="org.eclipse.elk.alignment",whe="org.eclipse.elk.insideSelfLoops.activate",mhe="org.eclipse.elk.insideSelfLoops.yo",pW="org.eclipse.elk.nodeSize.fixedGraphSize",vhe="org.eclipse.elk.direction",yhe="org.eclipse.elk.nodeLabels.padding",Ohe="org.eclipse.elk.portLabels.nextToPortIfPossible",khe="org.eclipse.elk.portLabels.treatAsGroup",She="org.eclipse.elk.portAlignment.default",xhe="org.eclipse.elk.portAlignment.north",Che="org.eclipse.elk.portAlignment.south",The="org.eclipse.elk.portAlignment.west",Ehe="org.eclipse.elk.portAlignment.east",TD="org.eclipse.elk.contentAlignment",Ahe="org.eclipse.elk.junctionPoints",Mhe="org.eclipse.elk.edgeLabels.placement",Phe="org.eclipse.elk.port.index",jhe="org.eclipse.elk.commentBox",Dhe="org.eclipse.elk.hypernode",$he="org.eclipse.elk.port.anchor",bW="org.eclipse.elk.partitioning.activate",wW="org.eclipse.elk.partitioning.partition",ED="org.eclipse.elk.position",Nhe="org.eclipse.elk.margins",Ihe="org.eclipse.elk.spacing.portsSurrounding",mW="org.eclipse.elk.interactiveLayout",po="org.eclipse.elk.core.util",Rhe={3:1,4:1,5:1,593:1},ktt="NETWORK_SIMPLEX",Eo={123:1,51:1},AD="org.eclipse.elk.alg.layered.p1cycles",Ub="org.eclipse.elk.alg.layered.p2layers",Lhe={402:1,225:1},Stt={832:1,3:1,4:1},Sc="org.eclipse.elk.alg.layered.p3order",rs="org.eclipse.elk.alg.layered.p4nodes",xtt={3:1,4:1,5:1,840:1},Oh=1e-5,w1="org.eclipse.elk.alg.layered.p4nodes.bk",vW="org.eclipse.elk.alg.layered.p5edges",pf="org.eclipse.elk.alg.layered.p5edges.orthogonal",yW="org.eclipse.elk.alg.layered.p5edges.orthogonal.direction",OW=1e-6,Gb="org.eclipse.elk.alg.layered.p5edges.splines",kW=.09999999999999998,MD=1e-8,Ctt=4.71238898038469,Ttt=3.141592653589793,QS="org.eclipse.elk.alg.mrtree",zS="org.eclipse.elk.alg.mrtree.graph",cy="org.eclipse.elk.alg.mrtree.intermediate",Ett="Set neighbors in level",Att="DESCENDANTS",Bhe="org.eclipse.elk.mrtree.weighting",Fhe="org.eclipse.elk.mrtree.searchOrder",PD="org.eclipse.elk.alg.mrtree.options",pd="org.eclipse.elk.mrtree",Mtt="org.eclipse.elk.tree",_he="org.eclipse.elk.alg.radial",Vm=6.283185307179586,Hhe=5e-324,Ptt="org.eclipse.elk.alg.radial.intermediate",SW="org.eclipse.elk.alg.radial.intermediate.compaction",jtt={3:1,4:1,5:1,106:1},qhe="org.eclipse.elk.alg.radial.intermediate.optimization",xW="No implementation is available for the layout option ",WS="org.eclipse.elk.alg.radial.options",Qhe="org.eclipse.elk.radial.orderId",zhe="org.eclipse.elk.radial.radius",CW="org.eclipse.elk.radial.compactor",TW="org.eclipse.elk.radial.compactionStepSize",Whe="org.eclipse.elk.radial.sorter",Khe="org.eclipse.elk.radial.wedgeCriteria",Vhe="org.eclipse.elk.radial.optimizationCriteria",kh="org.eclipse.elk.radial",Dtt="org.eclipse.elk.alg.radial.p1position.wedge",Xhe="org.eclipse.elk.alg.radial.sorting",$tt=5.497787143782138,Ntt=3.9269908169872414,Itt=2.356194490192345,Rtt="org.eclipse.elk.alg.rectpacking",jD="org.eclipse.elk.alg.rectpacking.firstiteration",EW="org.eclipse.elk.alg.rectpacking.options",Uhe="org.eclipse.elk.rectpacking.optimizationGoal",Ghe="org.eclipse.elk.rectpacking.lastPlaceShift",Yhe="org.eclipse.elk.rectpacking.currentPosition",Zhe="org.eclipse.elk.rectpacking.desiredPosition",Jhe="org.eclipse.elk.rectpacking.onlyFirstIteration",eae="org.eclipse.elk.rectpacking.rowCompaction",AW="org.eclipse.elk.rectpacking.expandToAspectRatio",tae="org.eclipse.elk.rectpacking.targetWidth",DD="org.eclipse.elk.expandNodes",uu="org.eclipse.elk.rectpacking",Q7="org.eclipse.elk.alg.rectpacking.util",$D="No implementation available for ",Yb="org.eclipse.elk.alg.spore",Zb="org.eclipse.elk.alg.spore.options",dp="org.eclipse.elk.sporeCompaction",MW="org.eclipse.elk.underlyingLayoutAlgorithm",nae="org.eclipse.elk.processingOrder.treeConstruction",iae="org.eclipse.elk.processingOrder.spanningTreeCostFunction",PW="org.eclipse.elk.processingOrder.preferredRoot",jW="org.eclipse.elk.processingOrder.rootSelection",DW="org.eclipse.elk.structure.structureExtractionStrategy",rae="org.eclipse.elk.compaction.compactionStrategy",sae="org.eclipse.elk.compaction.orthogonal",oae="org.eclipse.elk.overlapRemoval.maxIterations",cae="org.eclipse.elk.overlapRemoval.runScanline",$W="processingOrder",Ltt="overlapRemoval",ik="org.eclipse.elk.sporeOverlap",Btt="org.eclipse.elk.alg.spore.p1structure",NW="org.eclipse.elk.alg.spore.p2processingorder",IW="org.eclipse.elk.alg.spore.p3execution",Ftt="Invalid index: ",rk="org.eclipse.elk.core.alg",Xm={331:1},Jb={288:1},_tt="Make sure its type is registered with the ",lae=" utility class.",sk="true",RW="false",Htt="Couldn't clone property '",gp=.05,fu="org.eclipse.elk.core.options",qtt=1.2999999523162842,pp="org.eclipse.elk.box",uae="org.eclipse.elk.box.packingMode",Qtt="org.eclipse.elk.algorithm",ztt="org.eclipse.elk.resolvedAlgorithm",fae="org.eclipse.elk.bendPoints",QXt="org.eclipse.elk.labelManager",Wtt="org.eclipse.elk.scaleFactor",Ktt="org.eclipse.elk.animate",Vtt="org.eclipse.elk.animTimeFactor",Xtt="org.eclipse.elk.layoutAncestors",Utt="org.eclipse.elk.maxAnimTime",Gtt="org.eclipse.elk.minAnimTime",Ytt="org.eclipse.elk.progressBar",Ztt="org.eclipse.elk.validateGraph",Jtt="org.eclipse.elk.validateOptions",ent="org.eclipse.elk.zoomToFit",zXt="org.eclipse.elk.font.name",tnt="org.eclipse.elk.font.size",nnt="org.eclipse.elk.edge.type",int="partitioning",rnt="nodeLabels",ND="portAlignment",LW="nodeSize",BW="port",hae="portLabels",snt="insideSelfLoops",KS="org.eclipse.elk.fixed",ID="org.eclipse.elk.random",ont="port must have a parent node to calculate the port side",cnt="The edge needs to have exactly one edge section. Found: ",VS="org.eclipse.elk.core.util.adapters",Kl="org.eclipse.emf.ecore",Um="org.eclipse.elk.graph",lnt="EMapPropertyHolder",unt="ElkBendPoint",fnt="ElkGraphElement",hnt="ElkConnectableShape",aae="ElkEdge",ant="ElkEdgeSection",dnt="EModelElement",gnt="ENamedElement",dae="ElkLabel",gae="ElkNode",pae="ElkPort",pnt={92:1,90:1},ly="org.eclipse.emf.common.notify.impl",m1="The feature '",XS="' is not a valid changeable feature",bnt="Expecting null",FW="' is not a valid feature",wnt="The feature ID",mnt=" is not a valid feature ID",co=32768,vnt={105:1,92:1,90:1,56:1,49:1,97:1},wt="org.eclipse.emf.ecore.impl",Lg="org.eclipse.elk.graph.impl",US="Recursive containment not allowed for ",ok="The datatype '",bp="' is not a valid classifier",_W="The value '",Gm={190:1,3:1,4:1},HW="The class '",ck="http://www.eclipse.org/elk/ElkGraph",qu=1024,bae="property",GS="value",qW="source",ynt="properties",Ont="identifier",QW="height",zW="width",WW="parent",KW="text",VW="children",knt="hierarchical",wae="sources",XW="targets",mae="sections",RD="bendPoints",vae="outgoingShape",yae="incomingShape",Oae="outgoingSections",kae="incomingSections",Br="org.eclipse.emf.common.util",Sae="Severe implementation error in the Json to ElkGraph importer.",Sh="id",xr="org.eclipse.elk.graph.json",xae="Unhandled parameter types: ",Snt="startPoint",xnt="An edge must have at least one source and one target (edge id: '",lk="').",Cnt="Referenced edge section does not exist: ",Tnt=" (edge id: '",Cae="target",Ent="sourcePoint",Ant="targetPoint",LD="group",jn="name",Mnt="connectableShape cannot be null",Pnt="edge cannot be null",UW="Passed edge is not 'simple'.",BD="org.eclipse.elk.graph.util",z7="The 'no duplicates' constraint is violated",GW="targetIndex=",Bg=", size=",YW="sourceIndex=",xh={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1},ZW={3:1,4:1,20:1,28:1,52:1,14:1,47:1,15:1,54:1,67:1,63:1,58:1,588:1},FD="logging",jnt="measureExecutionTime",Dnt="parser.parse.1",$nt="parser.parse.2",_D="parser.next.1",JW="parser.next.2",Nnt="parser.next.3",Int="parser.next.4",Fg="parser.factor.1",Tae="parser.factor.2",Rnt="parser.factor.3",Lnt="parser.factor.4",Bnt="parser.factor.5",Fnt="parser.factor.6",_nt="parser.atom.1",Hnt="parser.atom.2",qnt="parser.atom.3",Eae="parser.atom.4",eK="parser.atom.5",Aae="parser.cc.1",HD="parser.cc.2",Qnt="parser.cc.3",znt="parser.cc.5",Mae="parser.cc.6",Pae="parser.cc.7",tK="parser.cc.8",Wnt="parser.ope.1",Knt="parser.ope.2",Vnt="parser.ope.3",bd="parser.descape.1",Xnt="parser.descape.2",Unt="parser.descape.3",Gnt="parser.descape.4",Ynt="parser.descape.5",Vl="parser.process.1",Znt="parser.quantifier.1",Jnt="parser.quantifier.2",eit="parser.quantifier.3",tit="parser.quantifier.4",jae="parser.quantifier.5",nit="org.eclipse.emf.common.notify",Dae={415:1,672:1},iit={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1},W7={366:1,143:1},YS="index=",nK={3:1,4:1,5:1,126:1},rit={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,58:1},$ae={3:1,6:1,4:1,5:1,192:1},sit={3:1,4:1,5:1,165:1,367:1},oit=";/?:@&=+$,",cit="invalid authority: ",lit="EAnnotation",uit="ETypedElement",fit="EStructuralFeature",hit="EAttribute",ait="EClassifier",dit="EEnumLiteral",git="EGenericType",pit="EOperation",bit="EParameter",wit="EReference",mit="ETypeParameter",ri="org.eclipse.emf.ecore.util",iK={76:1},Nae={3:1,20:1,14:1,15:1,58:1,589:1,76:1,69:1,95:1},vit="org.eclipse.emf.ecore.util.FeatureMap$Entry",xc=8192,ew=2048,ZS="byte",qD="char",JS="double",e6="float",t6="int",n6="long",i6="short",yit="java.lang.Object",Ym={3:1,4:1,5:1,247:1},Iae={3:1,4:1,5:1,673:1},Oit={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,69:1},Is={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,69:1,95:1},K7="mixed",yn="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",hu="kind",kit={3:1,4:1,5:1,674:1},Rae={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1,76:1,69:1,95:1},QD={20:1,28:1,52:1,14:1,15:1,58:1,69:1},zD={47:1,125:1,279:1},WD={72:1,332:1},KD="The value of type '",VD="' must be of type '",Zm=1316,au="http://www.eclipse.org/emf/2002/Ecore",XD=-32768,wp="constraints",Pr="baseType",Sit="getEStructuralFeature",xit="getFeatureID",r6="feature",Cit="getOperationID",Lae="operation",Tit="defaultValue",Eit="eTypeParameters",Ait="isInstance",Mit="getEEnumLiteral",Pit="eContainingClass",An={55:1},jit={3:1,4:1,5:1,119:1},Dit="org.eclipse.emf.ecore.resource",$it={92:1,90:1,591:1,1935:1},rK="org.eclipse.emf.ecore.resource.impl",Bae="unspecified",V7="simple",UD="attribute",Nit="attributeWildcard",GD="element",sK="elementWildcard",bf="collapse",oK="itemType",YD="namespace",X7="##targetNamespace",du="whiteSpace",Fae="wildcards",_g="http://www.eclipse.org/emf/2003/XMLType",cK="##any",uk="uninitialized",U7="The multiplicity constraint is violated",ZD="org.eclipse.emf.ecore.xml.type",Iit="ProcessingInstruction",Rit="SimpleAnyType",Lit="XMLTypeDocumentRoot",Ii="org.eclipse.emf.ecore.xml.type.impl",G7="INF",Bit="processing",Fit="ENTITIES_._base",_ae="minLength",Hae="ENTITY",JD="NCName",_it="IDREFS_._base",qae="integer",lK="token",uK="pattern",Hit="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",Qae="\\i\\c*",qit="[\\i-[:]][\\c-[:]]*",Qit="nonPositiveInteger",Y7="maxInclusive",zae="NMTOKEN",zit="NMTOKENS_._base",Wae="nonNegativeInteger",Z7="minInclusive",Wit="normalizedString",Kit="unsignedByte",Vit="unsignedInt",Xit="18446744073709551615",Uit="unsignedShort",Git="processingInstruction",wd="org.eclipse.emf.ecore.xml.type.internal",fk=1114111,Yit="Internal Error: shorthands: \\u",s6="xml:isDigit",fK="xml:isWord",hK="xml:isSpace",aK="xml:isNameChar",dK="xml:isInitialNameChar",Zit="09٠٩۰۹०९০৯੦੯૦૯୦୯௧௯౦౯೦೯൦൯๐๙໐໙༠༩",Jit="AZazÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁΆΆΈΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆאתװײءغفيٱڷںھۀێېۓەەۥۦअहऽऽक़ॡঅঌএঐওনপরললশহড়ঢ়য়ৡৰৱਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹਖ਼ੜਫ਼ਫ਼ੲੴઅઋઍઍએઑઓનપરલળવહઽઽૠૠଅଌଏଐଓନପରଲଳଶହଽଽଡ଼ଢ଼ୟୡஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹఅఌఎఐఒనపళవహౠౡಅಌಎಐಒನಪಳವಹೞೞೠೡഅഌഎഐഒനപഹൠൡกฮะะาำเๅກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະະາຳຽຽເໄཀཇཉཀྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼΩΩKÅ℮℮ↀↂ〇〇〡〩ぁゔァヺㄅㄬ一龥가힣",ert="Private Use",gK="ASSIGNED",pK="\0€ÿĀſƀɏɐʯʰ˿̀ͯͰϿЀӿ԰֏֐׿؀ۿ܀ݏހ޿ऀॿঀ৿਀੿઀૿଀୿஀௿ఀ౿ಀ೿ഀൿ඀෿฀๿຀໿ༀ࿿က႟Ⴀჿᄀᇿሀ፿Ꭰ᏿᐀ᙿ ᚟ᚠ᛿ក៿᠀᢯Ḁỿἀ῿ ⁰₟₠⃏⃐⃿℀⅏⅐↏←⇿∀⋿⌀⏿␀␿⑀⑟①⓿─╿▀▟■◿☀⛿✀➿⠀⣿⺀⻿⼀⿟⿰⿿ 〿぀ゟ゠ヿ㄀ㄯ㄰㆏㆐㆟ㆠㆿ㈀㋿㌀㏿㐀䶵一鿿ꀀ꒏꒐꓏가힣豈﫿ffﭏﭐ﷿︠︯︰﹏﹐﹯ﹰ﻾\uFEFF\uFEFF＀￯",Kae="UNASSIGNED",hk={3:1,117:1},trt="org.eclipse.emf.ecore.xml.type.util",e$={3:1,4:1,5:1,368:1},Vae="org.eclipse.xtext.xbase.lib",nrt="Cannot add elements to a Range",irt="Cannot set elements in a Range",rrt="Cannot remove elements from a Range",t$="locale",n$="default",i$="user.agent",h,r$,bK;p.goog=p.goog||{},p.goog.global=p.goog.global||p,bLt(),S(1,null,{},O),h.Fb=function(t){return Y$e(this,t)},h.Gb=function(){return this.gm},h.Hb=function(){return C0(this)},h.Ib=function(){var t;return Hd(zc(this))+"@"+(t=ci(this)>>>0,t.toString(16))},h.equals=function(e){return this.Fb(e)},h.hashCode=function(){return this.Hb()},h.toString=function(){return this.Ib()};var srt,ort,crt;S(290,1,{290:1,2026:1},xse),h.le=function(t){var n;return n=new xse,n.i=4,t>1?n.c=gFe(this,t-1):n.c=this,n},h.me=function(){return aa(this),this.b},h.ne=function(){return Hd(this)},h.oe=function(){return aa(this),this.k},h.pe=function(){return(this.i&4)!=0},h.qe=function(){return(this.i&1)!=0},h.Ib=function(){return Fre(this)},h.i=0;var It=x(zs,"Object",1),Xae=x(zs,"Class",290);S(1998,1,y7),x(O7,"Optional",1998),S(1170,1998,y7,C),h.Fb=function(t){return t===this},h.Hb=function(){return 2040732332},h.Ib=function(){return"Optional.absent()"},h.Jb=function(t){return tn(t),D4(),wK};var wK;x(O7,"Absent",1170),S(628,1,{},hB),x(O7,"Joiner",628);var WXt=hi(O7,"Predicate");S(582,1,{169:1,582:1,3:1,45:1},YCe),h.Mb=function(t){return eWe(this,t)},h.Lb=function(t){return eWe(this,t)},h.Fb=function(t){var n;return W(t,582)?(n=u(t,582),wle(this.a,n.a)):!1},h.Hb=function(){return Mse(this.a)+306654252},h.Ib=function(){return nBt(this.a)},x(O7,"Predicates/AndPredicate",582),S(408,1998,{408:1,3:1},mE),h.Fb=function(t){var n;return W(t,408)?(n=u(t,408),qn(this.a,n.a)):!1},h.Hb=function(){return 1502476572+ci(this.a)},h.Ib=function(){return _Je+this.a+")"},h.Jb=function(t){return new mE(OM(t.Kb(this.a),"the Function passed to Optional.transform() must not return null."))},x(O7,"Present",408),S(198,1,zO),h.Nb=function(t){Or(this,t)},h.Qb=function(){HPe()},x(Le,"UnmodifiableIterator",198),S(1978,198,WO),h.Qb=function(){HPe()},h.Rb=function(t){throw F(new on)},h.Wb=function(t){throw F(new on)},x(Le,"UnmodifiableListIterator",1978),S(386,1978,WO),h.Ob=function(){return this.c0},h.Pb=function(){if(this.c>=this.d)throw F(new ro);return this.Xb(this.c++)},h.Tb=function(){return this.c},h.Ub=function(){if(this.c<=0)throw F(new ro);return this.Xb(--this.c)},h.Vb=function(){return this.c-1},h.c=0,h.d=0,x(Le,"AbstractIndexedListIterator",386),S(699,198,zO),h.Ob=function(){return lH(this)},h.Pb=function(){return $re(this)},h.e=1,x(Le,"AbstractIterator",699),S(1986,1,{224:1}),h.Zb=function(){var t;return t=this.f,t||(this.f=this.ac())},h.Fb=function(t){return TH(this,t)},h.Hb=function(){return ci(this.Zb())},h.dc=function(){return this.gc()==0},h.ec=function(){return Ov(this)},h.Ib=function(){return Ns(this.Zb())},x(Le,"AbstractMultimap",1986),S(726,1986,jg),h.$b=function(){pP(this)},h._b=function(t){return oje(this,t)},h.ac=function(){return new v3(this,this.c)},h.ic=function(t){return this.hc()},h.bc=function(){return new um(this,this.c)},h.jc=function(){return this.mc(this.hc())},h.kc=function(){return new xPe(this)},h.lc=function(){return $q(this.c.vc().Nc(),new A,64,this.d)},h.cc=function(t){return Wn(this,t)},h.fc=function(t){return N9(this,t)},h.gc=function(){return this.d},h.mc=function(t){return rt(),new c3(t)},h.nc=function(){return new SPe(this)},h.oc=function(){return $q(this.c.Cc().Nc(),new T,64,this.d)},h.pc=function(t,n){return new UM(this,t,n,null)},h.d=0,x(Le,"AbstractMapBasedMultimap",726),S(1631,726,jg),h.hc=function(){return new No(this.a)},h.jc=function(){return rt(),rt(),Yr},h.cc=function(t){return u(Wn(this,t),15)},h.fc=function(t){return u(N9(this,t),15)},h.Zb=function(){return Tv(this)},h.Fb=function(t){return TH(this,t)},h.qc=function(t){return u(Wn(this,t),15)},h.rc=function(t){return u(N9(this,t),15)},h.mc=function(t){return V8(u(t,15))},h.pc=function(t,n){return v_e(this,t,u(n,15),null)},x(Le,"AbstractListMultimap",1631),S(732,1,fr),h.Nb=function(t){Or(this,t)},h.Ob=function(){return this.c.Ob()||this.e.Ob()},h.Pb=function(){var t;return this.e.Ob()||(t=u(this.c.Pb(),42),this.b=t.cd(),this.a=u(t.dd(),14),this.e=this.a.Kc()),this.sc(this.b,this.e.Pb())},h.Qb=function(){this.e.Qb(),this.a.dc()&&this.c.Qb(),--this.d.d},x(Le,"AbstractMapBasedMultimap/Itr",732),S(1099,732,fr,SPe),h.sc=function(t,n){return n},x(Le,"AbstractMapBasedMultimap/1",1099),S(1100,1,{},T),h.Kb=function(t){return u(t,14).Nc()},x(Le,"AbstractMapBasedMultimap/1methodref$spliterator$Type",1100),S(1101,732,fr,xPe),h.sc=function(t,n){return new y0(t,n)},x(Le,"AbstractMapBasedMultimap/2",1101);var Uae=hi(zt,"Map");S(1967,1,fp),h.wc=function(t){V5(this,t)},h.yc=function(t,n,i){return QH(this,t,n,i)},h.$b=function(){this.vc().$b()},h.tc=function(t){return bq(this,t)},h._b=function(t){return!!yce(this,t,!1)},h.uc=function(t){var n,i,s;for(i=this.vc().Kc();i.Ob();)if(n=u(i.Pb(),42),s=n.dd(),ie(t)===ie(s)||t!=null&&qn(t,s))return!0;return!1},h.Fb=function(t){var n,i,s;if(t===this)return!0;if(!W(t,83)||(s=u(t,83),this.gc()!=s.gc()))return!1;for(i=s.vc().Kc();i.Ob();)if(n=u(i.Pb(),42),!this.tc(n))return!1;return!0},h.xc=function(t){return Xs(yce(this,t,!1))},h.Hb=function(){return vse(this.vc())},h.dc=function(){return this.gc()==0},h.ec=function(){return new o3(this)},h.zc=function(t,n){throw F(new Ka("Put not supported on this map"))},h.Ac=function(t){K5(this,t)},h.Bc=function(t){return Xs(yce(this,t,!0))},h.gc=function(){return this.vc().gc()},h.Ib=function(){return nXe(this)},h.Cc=function(){return new ua(this)},x(zt,"AbstractMap",1967),S(1987,1967,fp),h.bc=function(){return new qE(this)},h.vc=function(){return mLe(this)},h.ec=function(){var t;return t=this.g,t||(this.g=this.bc())},h.Cc=function(){var t;return t=this.i,t||(this.i=new Zje(this))},x(Le,"Maps/ViewCachingAbstractMap",1987),S(389,1987,fp,v3),h.xc=function(t){return BAt(this,t)},h.Bc=function(t){return ejt(this,t)},h.$b=function(){this.d==this.e.c?this.e.$b():YA(new Hne(this))},h._b=function(t){return $We(this.d,t)},h.Ec=function(){return new tTe(this)},h.Dc=function(){return this.Ec()},h.Fb=function(t){return this===t||qn(this.d,t)},h.Hb=function(){return ci(this.d)},h.ec=function(){return this.e.ec()},h.gc=function(){return this.d.gc()},h.Ib=function(){return Ns(this.d)},x(Le,"AbstractMapBasedMultimap/AsMap",389);var zf=hi(zs,"Iterable");S(28,1,zb),h.Jc=function(t){Sr(this,t)},h.Lc=function(){return this.Oc()},h.Nc=function(){return new gt(this,0)},h.Oc=function(){return new ht(null,this.Nc())},h.Fc=function(t){throw F(new Ka("Add not supported on this collection"))},h.Gc=function(t){return Hr(this,t)},h.$b=function(){Tie(this)},h.Hc=function(t){return Mb(this,t,!1)},h.Ic=function(t){return C9(this,t)},h.dc=function(){return this.gc()==0},h.Mc=function(t){return Mb(this,t,!0)},h.Pc=function(){return eie(this)},h.Qc=function(t){return z9(this,t)},h.Ib=function(){return u1(this)},x(zt,"AbstractCollection",28);var gu=hi(zt,"Set");S(Hf,28,kc),h.Nc=function(){return new gt(this,1)},h.Fb=function(t){return TKe(this,t)},h.Hb=function(){return vse(this)},x(zt,"AbstractSet",Hf),S(1970,Hf,kc),x(Le,"Sets/ImprovedAbstractSet",1970),S(1971,1970,kc),h.$b=function(){this.Rc().$b()},h.Hc=function(t){return cKe(this,t)},h.dc=function(){return this.Rc().dc()},h.Mc=function(t){var n;return this.Hc(t)?(n=u(t,42),this.Rc().ec().Mc(n.cd())):!1},h.gc=function(){return this.Rc().gc()},x(Le,"Maps/EntrySet",1971),S(1097,1971,kc,tTe),h.Hc=function(t){return Xse(this.a.d.vc(),t)},h.Kc=function(){return new Hne(this.a)},h.Rc=function(){return this.a},h.Mc=function(t){var n;return Xse(this.a.d.vc(),t)?(n=u(t,42),xEt(this.a.e,n.cd()),!0):!1},h.Nc=function(){return F8(this.a.d.vc().Nc(),new nTe(this.a))},x(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries",1097),S(1098,1,{},nTe),h.Kb=function(t){return lHe(this.a,u(t,42))},x(Le,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",1098),S(730,1,fr,Hne),h.Nb=function(t){Or(this,t)},h.Pb=function(){var t;return t=u(this.b.Pb(),42),this.a=u(t.dd(),14),lHe(this.c,t)},h.Ob=function(){return this.b.Ob()},h.Qb=function(){mm(!!this.a),this.b.Qb(),this.c.e.d-=this.a.gc(),this.a.$b(),this.a=null},x(Le,"AbstractMapBasedMultimap/AsMap/AsMapIterator",730),S(532,1970,kc,qE),h.$b=function(){this.b.$b()},h.Hc=function(t){return this.b._b(t)},h.Jc=function(t){tn(t),this.b.wc(new vTe(t))},h.dc=function(){return this.b.dc()},h.Kc=function(){return new $4(this.b.vc().Kc())},h.Mc=function(t){return this.b._b(t)?(this.b.Bc(t),!0):!1},h.gc=function(){return this.b.gc()},x(Le,"Maps/KeySet",532),S(318,532,kc,um),h.$b=function(){var t;YA((t=this.b.vc().Kc(),new dee(this,t)))},h.Ic=function(t){return this.b.ec().Ic(t)},h.Fb=function(t){return this===t||qn(this.b.ec(),t)},h.Hb=function(){return ci(this.b.ec())},h.Kc=function(){var t;return t=this.b.vc().Kc(),new dee(this,t)},h.Mc=function(t){var n,i;return i=0,n=u(this.b.Bc(t),14),n&&(i=n.gc(),n.$b(),this.a.d-=i),i>0},h.Nc=function(){return this.b.ec().Nc()},x(Le,"AbstractMapBasedMultimap/KeySet",318),S(731,1,fr,dee),h.Nb=function(t){Or(this,t)},h.Ob=function(){return this.c.Ob()},h.Pb=function(){return this.a=u(this.c.Pb(),42),this.a.cd()},h.Qb=function(){var t;mm(!!this.a),t=u(this.a.dd(),14),this.c.Qb(),this.b.a.d-=t.gc(),t.$b(),this.a=null},x(Le,"AbstractMapBasedMultimap/KeySet/1",731),S(491,389,{83:1,161:1},D8),h.bc=function(){return this.Sc()},h.ec=function(){return this.Tc()},h.Sc=function(){return new l8(this.c,this.Uc())},h.Tc=function(){var t;return t=this.b,t||(this.b=this.Sc())},h.Uc=function(){return u(this.d,161)},x(Le,"AbstractMapBasedMultimap/SortedAsMap",491),S(542,491,HJe,BA),h.bc=function(){return new m3(this.a,u(u(this.d,161),171))},h.Sc=function(){return new m3(this.a,u(u(this.d,161),171))},h.ec=function(){var t;return t=this.b,u(t||(this.b=new m3(this.a,u(u(this.d,161),171))),271)},h.Tc=function(){var t;return t=this.b,u(t||(this.b=new m3(this.a,u(u(this.d,161),171))),271)},h.Uc=function(){return u(u(this.d,161),171)},x(Le,"AbstractMapBasedMultimap/NavigableAsMap",542),S(490,318,qJe,l8),h.Nc=function(){return this.b.ec().Nc()},x(Le,"AbstractMapBasedMultimap/SortedKeySet",490),S(388,490,Due,m3),x(Le,"AbstractMapBasedMultimap/NavigableKeySet",388),S(541,28,zb,UM),h.Fc=function(t){var n,i;return Wc(this),i=this.d.dc(),n=this.d.Fc(t),n&&(++this.f.d,i&&R8(this)),n},h.Gc=function(t){var n,i,s;return t.dc()?!1:(s=(Wc(this),this.d.gc()),n=this.d.Gc(t),n&&(i=this.d.gc(),this.f.d+=i-s,s==0&&R8(this)),n)},h.$b=function(){var t;t=(Wc(this),this.d.gc()),t!=0&&(this.d.$b(),this.f.d-=t,nM(this))},h.Hc=function(t){return Wc(this),this.d.Hc(t)},h.Ic=function(t){return Wc(this),this.d.Ic(t)},h.Fb=function(t){return t===this?!0:(Wc(this),qn(this.d,t))},h.Hb=function(){return Wc(this),ci(this.d)},h.Kc=function(){return Wc(this),new Ene(this)},h.Mc=function(t){var n;return Wc(this),n=this.d.Mc(t),n&&(--this.f.d,nM(this)),n},h.gc=function(){return R$e(this)},h.Nc=function(){return Wc(this),this.d.Nc()},h.Ib=function(){return Wc(this),Ns(this.d)},x(Le,"AbstractMapBasedMultimap/WrappedCollection",541);var Xl=hi(zt,"List");S(728,541,{20:1,28:1,14:1,15:1},nie),h.ad=function(t){wm(this,t)},h.Nc=function(){return Wc(this),this.d.Nc()},h.Vc=function(t,n){var i;Wc(this),i=this.d.dc(),u(this.d,15).Vc(t,n),++this.a.d,i&&R8(this)},h.Wc=function(t,n){var i,s,c;return n.dc()?!1:(c=(Wc(this),this.d.gc()),i=u(this.d,15).Wc(t,n),i&&(s=this.d.gc(),this.a.d+=s-c,c==0&&R8(this)),i)},h.Xb=function(t){return Wc(this),u(this.d,15).Xb(t)},h.Xc=function(t){return Wc(this),u(this.d,15).Xc(t)},h.Yc=function(){return Wc(this),new pNe(this)},h.Zc=function(t){return Wc(this),new ABe(this,t)},h.$c=function(t){var n;return Wc(this),n=u(this.d,15).$c(t),--this.a.d,nM(this),n},h._c=function(t,n){return Wc(this),u(this.d,15)._c(t,n)},h.bd=function(t,n){return Wc(this),v_e(this.a,this.e,u(this.d,15).bd(t,n),this.b?this.b:this)},x(Le,"AbstractMapBasedMultimap/WrappedList",728),S(1096,728,{20:1,28:1,14:1,15:1,54:1},sIe),x(Le,"AbstractMapBasedMultimap/RandomAccessWrappedList",1096),S(620,1,fr,Ene),h.Nb=function(t){Or(this,t)},h.Ob=function(){return _3(this),this.b.Ob()},h.Pb=function(){return _3(this),this.b.Pb()},h.Qb=function(){qNe(this)},x(Le,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",620),S(729,620,Vh,pNe,ABe),h.Qb=function(){qNe(this)},h.Rb=function(t){var n;n=R$e(this.a)==0,(_3(this),u(this.b,125)).Rb(t),++this.a.a.d,n&&R8(this.a)},h.Sb=function(){return(_3(this),u(this.b,125)).Sb()},h.Tb=function(){return(_3(this),u(this.b,125)).Tb()},h.Ub=function(){return(_3(this),u(this.b,125)).Ub()},h.Vb=function(){return(_3(this),u(this.b,125)).Vb()},h.Wb=function(t){(_3(this),u(this.b,125)).Wb(t)},x(Le,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",729),S(727,541,qJe,Xte),h.Nc=function(){return Wc(this),this.d.Nc()},x(Le,"AbstractMapBasedMultimap/WrappedSortedSet",727),S(1095,727,Due,cNe),x(Le,"AbstractMapBasedMultimap/WrappedNavigableSet",1095),S(1094,541,kc,vIe),h.Nc=function(){return Wc(this),this.d.Nc()},x(Le,"AbstractMapBasedMultimap/WrappedSet",1094),S(1103,1,{},A),h.Kb=function(t){return PEt(u(t,42))},x(Le,"AbstractMapBasedMultimap/lambda$1$Type",1103),S(1102,1,{},iTe),h.Kb=function(t){return new y0(this.a,t)},x(Le,"AbstractMapBasedMultimap/lambda$2$Type",1102);var Hg=hi(zt,"Map/Entry");S(345,1,Xj),h.Fb=function(t){var n;return W(t,42)?(n=u(t,42),uh(this.cd(),n.cd())&&uh(this.dd(),n.dd())):!1},h.Hb=function(){var t,n;return t=this.cd(),n=this.dd(),(t==null?0:ci(t))^(n==null?0:ci(n))},h.ed=function(t){throw F(new on)},h.Ib=function(){return this.cd()+"="+this.dd()},x(Le,QJe,345),S(1988,28,zb),h.$b=function(){this.fd().$b()},h.Hc=function(t){var n;return W(t,42)?(n=u(t,42),fTt(this.fd(),n.cd(),n.dd())):!1},h.Mc=function(t){var n;return W(t,42)?(n=u(t,42),JFe(this.fd(),n.cd(),n.dd())):!1},h.gc=function(){return this.fd().d},x(Le,"Multimaps/Entries",1988),S(733,1988,zb,QZ),h.Kc=function(){return this.a.kc()},h.fd=function(){return this.a},h.Nc=function(){return this.a.lc()},x(Le,"AbstractMultimap/Entries",733),S(734,733,kc,QJ),h.Nc=function(){return this.a.lc()},h.Fb=function(t){return Bce(this,t)},h.Hb=function(){return eze(this)},x(Le,"AbstractMultimap/EntrySet",734),S(735,28,zb,zZ),h.$b=function(){this.a.$b()},h.Hc=function(t){return XPt(this.a,t)},h.Kc=function(){return this.a.nc()},h.gc=function(){return this.a.d},h.Nc=function(){return this.a.oc()},x(Le,"AbstractMultimap/Values",735),S(1989,28,{835:1,20:1,28:1,14:1}),h.Jc=function(t){tn(t),hm(this).Jc(new mTe(t))},h.Nc=function(){var t;return t=hm(this).Nc(),$q(t,new nt,64|t.qd()&1296,this.a.d)},h.Fc=function(t){return ZJ(),!0},h.Gc=function(t){return tn(this),tn(t),W(t,543)?pTt(u(t,835)):!t.dc()&&J_(this,t.Kc())},h.Hc=function(t){var n;return n=u(Ab(Tv(this.a),t),14),(n?n.gc():0)>0},h.Fb=function(t){return l_t(this,t)},h.Hb=function(){return ci(hm(this))},h.dc=function(){return hm(this).dc()},h.Mc=function(t){return vUe(this,t,1)>0},h.Ib=function(){return Ns(hm(this))},x(Le,"AbstractMultiset",1989),S(1991,1970,kc),h.$b=function(){pP(this.a.a)},h.Hc=function(t){var n,i;return W(t,492)?(i=u(t,416),u(i.a.dd(),14).gc()<=0?!1:(n=MFe(this.a,i.a.cd()),n==u(i.a.dd(),14).gc())):!1},h.Mc=function(t){var n,i,s,c;return W(t,492)&&(i=u(t,416),n=i.a.cd(),s=u(i.a.dd(),14).gc(),s!=0)?(c=this.a,GBt(c,n,s)):!1},x(Le,"Multisets/EntrySet",1991),S(1109,1991,kc,rTe),h.Kc=function(){return new DPe(mLe(Tv(this.a.a)).Kc())},h.gc=function(){return Tv(this.a.a).gc()},x(Le,"AbstractMultiset/EntrySet",1109),S(619,726,jg),h.hc=function(){return this.gd()},h.jc=function(){return this.hd()},h.cc=function(t){return this.jd(t)},h.fc=function(t){return this.kd(t)},h.Zb=function(){var t;return t=this.f,t||(this.f=this.ac())},h.hd=function(){return rt(),rt(),f$},h.Fb=function(t){return TH(this,t)},h.jd=function(t){return u(Wn(this,t),21)},h.kd=function(t){return u(N9(this,t),21)},h.mc=function(t){return rt(),new g3(u(t,21))},h.pc=function(t,n){return new vIe(this,t,u(n,21))},x(Le,"AbstractSetMultimap",619),S(1657,619,jg),h.hc=function(){return new qd(this.b)},h.gd=function(){return new qd(this.b)},h.jc=function(){return wie(new qd(this.b))},h.hd=function(){return wie(new qd(this.b))},h.cc=function(t){return u(u(Wn(this,t),21),84)},h.jd=function(t){return u(u(Wn(this,t),21),84)},h.fc=function(t){return u(u(N9(this,t),21),84)},h.kd=function(t){return u(u(N9(this,t),21),84)},h.mc=function(t){return W(t,271)?wie(u(t,271)):(rt(),new Ete(u(t,84)))},h.Zb=function(){var t;return t=this.f,t||(this.f=W(this.c,171)?new BA(this,u(this.c,171)):W(this.c,161)?new D8(this,u(this.c,161)):new v3(this,this.c))},h.pc=function(t,n){return W(n,271)?new cNe(this,t,u(n,271)):new Xte(this,t,u(n,84))},x(Le,"AbstractSortedSetMultimap",1657),S(1658,1657,jg),h.Zb=function(){var t;return t=this.f,u(u(t||(this.f=W(this.c,171)?new BA(this,u(this.c,171)):W(this.c,161)?new D8(this,u(this.c,161)):new v3(this,this.c)),161),171)},h.ec=function(){var t;return t=this.i,u(u(t||(this.i=W(this.c,171)?new m3(this,u(this.c,171)):W(this.c,161)?new l8(this,u(this.c,161)):new um(this,this.c)),84),271)},h.bc=function(){return W(this.c,171)?new m3(this,u(this.c,171)):W(this.c,161)?new l8(this,u(this.c,161)):new um(this,this.c)},x(Le,"AbstractSortedKeySortedSetMultimap",1658),S(2010,1,{1947:1}),h.Fb=function(t){return FIt(this,t)},h.Hb=function(){var t;return vse((t=this.g,t||(this.g=new FL(this))))},h.Ib=function(){var t;return nXe((t=this.f,t||(this.f=new vte(this))))},x(Le,"AbstractTable",2010),S(665,Hf,kc,FL),h.$b=function(){qPe()},h.Hc=function(t){var n,i;return W(t,468)?(n=u(t,682),i=u(Ab(HLe(this.a),Wd(n.c.e,n.b)),83),!!i&&Xse(i.vc(),new y0(Wd(n.c.c,n.a),$v(n.c,n.b,n.a)))):!1},h.Kc=function(){return S7t(this.a)},h.Mc=function(t){var n,i;return W(t,468)?(n=u(t,682),i=u(Ab(HLe(this.a),Wd(n.c.e,n.b)),83),!!i&&Ojt(i.vc(),new y0(Wd(n.c.c,n.a),$v(n.c,n.b,n.a)))):!1},h.gc=function(){return JRe(this.a)},h.Nc=function(){return mTt(this.a)},x(Le,"AbstractTable/CellSet",665),S(1928,28,zb,sTe),h.$b=function(){qPe()},h.Hc=function(t){return PRt(this.a,t)},h.Kc=function(){return x7t(this.a)},h.gc=function(){return JRe(this.a)},h.Nc=function(){return n_e(this.a)},x(Le,"AbstractTable/Values",1928),S(1632,1631,jg),x(Le,"ArrayListMultimapGwtSerializationDependencies",1632),S(513,1632,jg,fB,qie),h.hc=function(){return new No(this.a)},h.a=0,x(Le,"ArrayListMultimap",513),S(664,2010,{664:1,1947:1,3:1},MUe),x(Le,"ArrayTable",664),S(1924,386,WO,RNe),h.Xb=function(t){return new Sse(this.a,t)},x(Le,"ArrayTable/1",1924),S(1925,1,{},ZCe),h.ld=function(t){return new Sse(this.a,t)},x(Le,"ArrayTable/1methodref$getCell$Type",1925),S(2011,1,{682:1}),h.Fb=function(t){var n;return t===this?!0:W(t,468)?(n=u(t,682),uh(Wd(this.c.e,this.b),Wd(n.c.e,n.b))&&uh(Wd(this.c.c,this.a),Wd(n.c.c,n.a))&&uh($v(this.c,this.b,this.a),$v(n.c,n.b,n.a))):!1},h.Hb=function(){return IP(H(_(It,1),Ee,1,5,[Wd(this.c.e,this.b),Wd(this.c.c,this.a),$v(this.c,this.b,this.a)]))},h.Ib=function(){return"("+Wd(this.c.e,this.b)+","+Wd(this.c.c,this.a)+")="+$v(this.c,this.b,this.a)},x(Le,"Tables/AbstractCell",2011),S(468,2011,{468:1,682:1},Sse),h.a=0,h.b=0,h.d=0,x(Le,"ArrayTable/2",468),S(1927,1,{},JCe),h.ld=function(t){return dqe(this.a,t)},x(Le,"ArrayTable/2methodref$getValue$Type",1927),S(1926,386,WO,LNe),h.Xb=function(t){return dqe(this.a,t)},x(Le,"ArrayTable/3",1926),S(1979,1967,fp),h.$b=function(){YA(this.kc())},h.vc=function(){return new yTe(this)},h.lc=function(){return new pBe(this.kc(),this.gc())},x(Le,"Maps/IteratorBasedAbstractMap",1979),S(828,1979,fp),h.$b=function(){throw F(new on)},h._b=function(t){return cje(this.c,t)},h.kc=function(){return new BNe(this,this.c.b.c.gc())},h.lc=function(){return MF(this.c.b.c.gc(),16,new eTe(this))},h.xc=function(t){var n;return n=u(v5(this.c,t),19),n?this.nd(n.a):null},h.dc=function(){return this.c.b.c.dc()},h.ec=function(){return LF(this.c)},h.zc=function(t,n){var i;if(i=u(v5(this.c,t),19),!i)throw F(new Ot(this.md()+" "+t+" not in "+LF(this.c)));return this.od(i.a,n)},h.Bc=function(t){throw F(new on)},h.gc=function(){return this.c.b.c.gc()},x(Le,"ArrayTable/ArrayMap",828),S(1923,1,{},eTe),h.ld=function(t){return QLe(this.a,t)},x(Le,"ArrayTable/ArrayMap/0methodref$getEntry$Type",1923),S(1921,345,Xj,Hje),h.cd=function(){return F5t(this.a,this.b)},h.dd=function(){return this.a.nd(this.b)},h.ed=function(t){return this.a.od(this.b,t)},h.b=0,x(Le,"ArrayTable/ArrayMap/1",1921),S(1922,386,WO,BNe),h.Xb=function(t){return QLe(this.a,t)},x(Le,"ArrayTable/ArrayMap/2",1922),S(1920,828,fp,PLe),h.md=function(){return"Column"},h.nd=function(t){return $v(this.b,this.a,t)},h.od=function(t,n){return Fze(this.b,this.a,t,n)},h.a=0,x(Le,"ArrayTable/Row",1920),S(829,828,fp,vte),h.nd=function(t){return new PLe(this.a,t)},h.zc=function(t,n){return u(n,83),kkt()},h.od=function(t,n){return u(n,83),Skt()},h.md=function(){return"Row"},x(Le,"ArrayTable/RowMap",829),S(1120,1,cu,qje),h.qd=function(){return this.a.qd()&-262},h.rd=function(){return this.a.rd()},h.Nb=function(t){this.a.Nb(new Lje(t,this.b))},h.sd=function(t){return this.a.sd(new Rje(t,this.b))},x(Le,"CollectSpliterators/1",1120),S(1121,1,$t,Rje),h.td=function(t){this.a.td(this.b.Kb(t))},x(Le,"CollectSpliterators/1/lambda$0$Type",1121),S(1122,1,$t,Lje),h.td=function(t){this.a.td(this.b.Kb(t))},x(Le,"CollectSpliterators/1/lambda$1$Type",1122),S(1123,1,cu,d_e),h.qd=function(){return this.a},h.rd=function(){return this.d&&(this.b=wNe(this.b,this.d.rd())),wNe(this.b,0)},h.Nb=function(t){this.d&&(this.d.Nb(t),this.d=null),this.c.Nb(new Ije(this.e,t)),this.b=0},h.sd=function(t){for(;;){if(this.d&&this.d.sd(t))return c5(this.b,Uj)&&(this.b=c1(this.b,1)),!0;if(this.d=null,!this.c.sd(new Bje(this,this.e)))return!1}},h.a=0,h.b=0,x(Le,"CollectSpliterators/1FlatMapSpliterator",1123),S(1124,1,$t,Bje),h.td=function(t){qSt(this.a,this.b,t)},x(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$0$Type",1124),S(1125,1,$t,Ije),h.td=function(t){T5t(this.b,this.a,t)},x(Le,"CollectSpliterators/1FlatMapSpliterator/lambda$1$Type",1125),S(1117,1,cu,UIe),h.qd=function(){return 16464|this.b},h.rd=function(){return this.a.rd()},h.Nb=function(t){this.a.xe(new _je(t,this.c))},h.sd=function(t){return this.a.ye(new Fje(t,this.c))},h.b=0,x(Le,"CollectSpliterators/1WithCharacteristics",1117),S(1118,1,k7,Fje),h.ud=function(t){this.a.td(this.b.ld(t))},x(Le,"CollectSpliterators/1WithCharacteristics/lambda$0$Type",1118),S(1119,1,k7,_je),h.ud=function(t){this.a.td(this.b.ld(t))},x(Le,"CollectSpliterators/1WithCharacteristics/lambda$1$Type",1119),S(245,1,BQ),h.wd=function(t){return this.vd(u(t,245))},h.vd=function(t){var n;return t==(tB(),vK)?1:t==(nB(),mK)?-1:(n=(XA(),O9(this.a,t.a)),n!=0?n:W(this,519)==W(t,519)?0:W(this,519)?1:-1)},h.zd=function(){return this.a},h.Fb=function(t){return Toe(this,t)},x(Le,"Cut",245),S(1761,245,BQ,WPe),h.vd=function(t){return t==this?0:1},h.xd=function(t){throw F(new CJ)},h.yd=function(t){t.a+="+∞)"},h.zd=function(){throw F(new Ps(WJe))},h.Hb=function(){return Rh(),Ioe(this)},h.Ad=function(t){return!1},h.Ib=function(){return"+∞"};var mK;x(Le,"Cut/AboveAll",1761),S(519,245,{245:1,519:1,3:1,35:1},QNe),h.xd=function(t){so((t.a+="(",t),this.a)},h.yd=function(t){lg(so(t,this.a),93)},h.Hb=function(){return~ci(this.a)},h.Ad=function(t){return XA(),O9(this.a,t)<0},h.Ib=function(){return"/"+this.a+"\\"},x(Le,"Cut/AboveValue",519),S(1760,245,BQ,KPe),h.vd=function(t){return t==this?0:-1},h.xd=function(t){t.a+="(-∞"},h.yd=function(t){throw F(new CJ)},h.zd=function(){throw F(new Ps(WJe))},h.Hb=function(){return Rh(),Ioe(this)},h.Ad=function(t){return!0},h.Ib=function(){return"-∞"};var vK;x(Le,"Cut/BelowAll",1760),S(1762,245,BQ,zNe),h.xd=function(t){so((t.a+="[",t),this.a)},h.yd=function(t){lg(so(t,this.a),41)},h.Hb=function(){return ci(this.a)},h.Ad=function(t){return XA(),O9(this.a,t)<=0},h.Ib=function(){return"\\"+this.a+"/"},x(Le,"Cut/BelowValue",1762),S(537,1,Xh),h.Jc=function(t){Sr(this,t)},h.Ib=function(){return Yjt(u(OM(this,"use Optional.orNull() instead of Optional.or(null)"),20).Kc())},x(Le,"FluentIterable",537),S(433,537,Xh,f5),h.Kc=function(){return new _t(qt(this.a.Kc(),new L))},x(Le,"FluentIterable/2",433),S(1046,537,Xh,X$e),h.Kc=function(){return Gd(this)},x(Le,"FluentIterable/3",1046),S(708,386,WO,yte),h.Xb=function(t){return this.a[t].Kc()},x(Le,"FluentIterable/3/1",708),S(1972,1,{}),h.Ib=function(){return Ns(this.Bd().b)},x(Le,"ForwardingObject",1972),S(1973,1972,KJe),h.Bd=function(){return this.Cd()},h.Jc=function(t){Sr(this,t)},h.Lc=function(){return this.Oc()},h.Nc=function(){return new gt(this,0)},h.Oc=function(){return new ht(null,this.Nc())},h.Fc=function(t){return this.Cd(),hje()},h.Gc=function(t){return this.Cd(),aje()},h.$b=function(){this.Cd(),dje()},h.Hc=function(t){return this.Cd().Hc(t)},h.Ic=function(t){return this.Cd().Ic(t)},h.dc=function(){return this.Cd().b.dc()},h.Kc=function(){return this.Cd().Kc()},h.Mc=function(t){return this.Cd(),gje()},h.gc=function(){return this.Cd().b.gc()},h.Pc=function(){return this.Cd().Pc()},h.Qc=function(t){return this.Cd().Qc(t)},x(Le,"ForwardingCollection",1973),S(1980,28,$ue),h.Kc=function(){return this.Ed()},h.Fc=function(t){throw F(new on)},h.Gc=function(t){throw F(new on)},h.$b=function(){throw F(new on)},h.Hc=function(t){return t!=null&&Mb(this,t,!1)},h.Dd=function(){switch(this.gc()){case 0:return bb(),bb(),yK;case 1:return bb(),new PF(tn(this.Ed().Pb()));default:return new jLe(this,this.Pc())}},h.Mc=function(t){throw F(new on)},x(Le,"ImmutableCollection",1980),S(712,1980,$ue,SJ),h.Kc=function(){return Nv(this.a.Kc())},h.Hc=function(t){return t!=null&&this.a.Hc(t)},h.Ic=function(t){return this.a.Ic(t)},h.dc=function(){return this.a.dc()},h.Ed=function(){return Nv(this.a.Kc())},h.gc=function(){return this.a.gc()},h.Pc=function(){return this.a.Pc()},h.Qc=function(t){return this.a.Qc(t)},h.Ib=function(){return Ns(this.a)},x(Le,"ForwardingImmutableCollection",712),S(152,1980,AS),h.Kc=function(){return this.Ed()},h.Yc=function(){return this.Fd(0)},h.Zc=function(t){return this.Fd(t)},h.ad=function(t){wm(this,t)},h.Nc=function(){return new gt(this,16)},h.bd=function(t,n){return this.Gd(t,n)},h.Vc=function(t,n){throw F(new on)},h.Wc=function(t,n){throw F(new on)},h.Fb=function(t){return KFt(this,t)},h.Hb=function(){return iPt(this)},h.Xc=function(t){return t==null?-1:bNt(this,t)},h.Ed=function(){return this.Fd(0)},h.Fd=function(t){return Ite(this,t)},h.$c=function(t){throw F(new on)},h._c=function(t,n){throw F(new on)},h.Gd=function(t,n){var i;return BP((i=new Jje(this),new qh(i,t,n)))};var yK;x(Le,"ImmutableList",152),S(2006,152,AS),h.Kc=function(){return Nv(this.Hd().Kc())},h.bd=function(t,n){return BP(this.Hd().bd(t,n))},h.Hc=function(t){return t!=null&&this.Hd().Hc(t)},h.Ic=function(t){return this.Hd().Ic(t)},h.Fb=function(t){return qn(this.Hd(),t)},h.Xb=function(t){return Wd(this,t)},h.Hb=function(){return ci(this.Hd())},h.Xc=function(t){return this.Hd().Xc(t)},h.dc=function(){return this.Hd().dc()},h.Ed=function(){return Nv(this.Hd().Kc())},h.gc=function(){return this.Hd().gc()},h.Gd=function(t,n){return BP(this.Hd().bd(t,n))},h.Pc=function(){return this.Hd().Qc(J(It,Ee,1,this.Hd().gc(),5,1))},h.Qc=function(t){return this.Hd().Qc(t)},h.Ib=function(){return Ns(this.Hd())},x(Le,"ForwardingImmutableList",2006),S(714,1,KO),h.vc=function(){return M0(this)},h.wc=function(t){V5(this,t)},h.ec=function(){return LF(this)},h.yc=function(t,n,i){return QH(this,t,n,i)},h.Cc=function(){return this.Ld()},h.$b=function(){throw F(new on)},h._b=function(t){return this.xc(t)!=null},h.uc=function(t){return this.Ld().Hc(t)},h.Jd=function(){return new RMe(this)},h.Kd=function(){return new LMe(this)},h.Fb=function(t){return UPt(this,t)},h.Hb=function(){return M0(this).Hb()},h.dc=function(){return this.gc()==0},h.zc=function(t,n){return xkt()},h.Bc=function(t){throw F(new on)},h.Ib=function(){return ELt(this)},h.Ld=function(){return this.e?this.e:this.e=this.Kd()},h.c=null,h.d=null,h.e=null;var lrt;x(Le,"ImmutableMap",714),S(715,714,KO),h._b=function(t){return cje(this,t)},h.uc=function(t){return iDe(this.b,t)},h.Id=function(){return DWe(new oTe(this))},h.Jd=function(){return DWe(hBe(this.b))},h.Kd=function(){return lh(),new SJ(fBe(this.b))},h.Fb=function(t){return rDe(this.b,t)},h.xc=function(t){return v5(this,t)},h.Hb=function(){return ci(this.b.c)},h.dc=function(){return this.b.c.dc()},h.gc=function(){return this.b.c.gc()},h.Ib=function(){return Ns(this.b.c)},x(Le,"ForwardingImmutableMap",715),S(1974,1973,FQ),h.Bd=function(){return this.Md()},h.Cd=function(){return this.Md()},h.Nc=function(){return new gt(this,1)},h.Fb=function(t){return t===this||this.Md().Fb(t)},h.Hb=function(){return this.Md().Hb()},x(Le,"ForwardingSet",1974),S(1069,1974,FQ,oTe),h.Bd=function(){return B3(this.a.b)},h.Cd=function(){return B3(this.a.b)},h.Hc=function(t){if(W(t,42)&&u(t,42).cd()==null)return!1;try{return nDe(B3(this.a.b),t)}catch(n){if(n=fi(n),W(n,205))return!1;throw F(n)}},h.Md=function(){return B3(this.a.b)},h.Qc=function(t){var n;return n=KBe(B3(this.a.b),t),B3(this.a.b).b.gc()=0?"+":"")+(i/60|0),n=OA(p.Math.abs(i)%60),(aXe(),xrt)[this.q.getDay()]+" "+Crt[this.q.getMonth()]+" "+OA(this.q.getDate())+" "+OA(this.q.getHours())+":"+OA(this.q.getMinutes())+":"+OA(this.q.getSeconds())+" GMT"+t+n+" "+this.q.getFullYear()};var c$=x(zt,"Date",199);S(1915,199,tet,FVe),h.a=!1,h.b=0,h.c=0,h.d=0,h.e=0,h.f=0,h.g=!1,h.i=0,h.j=0,h.k=0,h.n=0,h.o=0,h.p=0,x("com.google.gwt.i18n.shared.impl","DateRecord",1915),S(1966,1,{}),h.fe=function(){return null},h.ge=function(){return null},h.he=function(){return null},h.ie=function(){return null},h.je=function(){return null},x(Yv,"JSONValue",1966),S(216,1966,{216:1},Z1,KZ),h.Fb=function(t){return W(t,216)?Wie(this.a,u(t,216).a):!1},h.ee=function(){return KOt},h.Hb=function(){return Die(this.a)},h.fe=function(){return this},h.Ib=function(){var t,n,i;for(i=new dl("["),n=0,t=this.a.length;n0&&(i.a+=","),so(i,kb(this,n));return i.a+="]",i.a},x(Yv,"JSONArray",216),S(483,1966,{483:1},VZ),h.ee=function(){return VOt},h.ge=function(){return this},h.Ib=function(){return kt(),""+this.a},h.a=!1;var prt,brt;x(Yv,"JSONBoolean",483),S(985,60,Ma,$Pe),x(Yv,"JSONException",985),S(1023,1966,{},Ce),h.ee=function(){return ZOt},h.Ib=function(){return uc};var wrt;x(Yv,"JSONNull",1023),S(258,1966,{258:1},vE),h.Fb=function(t){return W(t,258)?this.a==u(t,258).a:!1},h.ee=function(){return XOt},h.Hb=function(){return x3(this.a)},h.he=function(){return this},h.Ib=function(){return this.a+""},h.a=0,x(Yv,"JSONNumber",258),S(183,1966,{183:1},sv,Ux),h.Fb=function(t){return W(t,183)?Wie(this.a,u(t,183).a):!1},h.ee=function(){return UOt},h.Hb=function(){return Die(this.a)},h.ie=function(){return this},h.Ib=function(){var t,n,i,s,c,a,g;for(g=new dl("{"),t=!0,a=aH(this,J(Te,fe,2,0,6,1)),i=a,s=0,c=i.length;s=0?":"+this.c:"")+")"},h.c=0;var ade=x(zs,"StackTraceElement",310);crt={3:1,475:1,35:1,2:1};var Te=x(zs,Nue,2);S(107,418,{475:1},Va,B4,nu),x(zs,"StringBuffer",107),S(100,418,{475:1},Fd,Zw,dl),x(zs,"StringBuilder",100),S(687,73,lz,eee),x(zs,"StringIndexOutOfBoundsException",687),S(2043,1,{});var dde;S(844,1,{},In),h.Kb=function(t){return u(t,78).e},x(zs,"Throwable/lambda$0$Type",844),S(41,60,{3:1,102:1,60:1,78:1,41:1},on,Ka),x(zs,"UnsupportedOperationException",41),S(240,236,{3:1,35:1,236:1,240:1},b9,uee),h.wd=function(t){return KYe(this,u(t,240))},h.ke=function(){return Rb(AZe(this))},h.Fb=function(t){var n;return this===t?!0:W(t,240)?(n=u(t,240),this.e==n.e&&KYe(this,n)==0):!1},h.Hb=function(){var t;return this.b!=0?this.b:this.a<54?(t=cc(this.f),this.b=en(Vi(t,-1)),this.b=33*this.b+en(Vi(Ud(t,32),-1)),this.b=17*this.b+Di(this.e),this.b):(this.b=17*TWe(this.c)+Di(this.e),this.b)},h.Ib=function(){return AZe(this)},h.a=0,h.b=0,h.d=0,h.e=0,h.f=0;var Ort,Qg,gde,pde,bde,wde,mde,vde,AK=x("java.math","BigDecimal",240);S(91,236,{3:1,35:1,236:1,91:1},Noe,td,fm,bce,MKe,Vd),h.wd=function(t){return xKe(this,u(t,91))},h.ke=function(){return Rb(IQ(this,0))},h.Fb=function(t){return doe(this,t)},h.Hb=function(){return TWe(this)},h.Ib=function(){return IQ(this,0)},h.b=-2,h.c=0,h.d=0,h.e=0;var MK,l$,yde,PK,u$,gk,Jm=x("java.math","BigInteger",91),krt,Srt,fy,l6;S(488,1967,fp),h.$b=function(){Pc(this)},h._b=function(t){return il(this,t)},h.uc=function(t){return fWe(this,t,this.g)||fWe(this,t,this.f)},h.vc=function(){return new eg(this)},h.xc=function(t){return Bt(this,t)},h.zc=function(t,n){return Qn(this,t,n)},h.Bc=function(t){return Dv(this,t)},h.gc=function(){return H4(this)},x(zt,"AbstractHashMap",488),S(261,Hf,kc,eg),h.$b=function(){this.a.$b()},h.Hc=function(t){return l_e(this,t)},h.Kc=function(){return new kg(this.a)},h.Mc=function(t){var n;return l_e(this,t)?(n=u(t,42).cd(),this.a.Bc(n),!0):!1},h.gc=function(){return this.a.gc()},x(zt,"AbstractHashMap/EntrySet",261),S(262,1,fr,kg),h.Nb=function(t){Or(this,t)},h.Pb=function(){return Q0(this)},h.Ob=function(){return this.b},h.Qb=function(){sqe(this)},h.b=!1,x(zt,"AbstractHashMap/EntrySetIterator",262),S(417,1,fr,T4),h.Nb=function(t){Or(this,t)},h.Ob=function(){return d8(this)},h.Pb=function(){return PBe(this)},h.Qb=function(){rl(this)},h.b=0,h.c=-1,x(zt,"AbstractList/IteratorImpl",417),S(96,417,Vh,vr),h.Qb=function(){rl(this)},h.Rb=function(t){fb(this,t)},h.Sb=function(){return this.b>0},h.Tb=function(){return this.b},h.Ub=function(){return Rt(this.b>0),this.a.Xb(this.c=--this.b)},h.Vb=function(){return this.b-1},h.Wb=function(t){cb(this.c!=-1),this.a._c(this.c,t)},x(zt,"AbstractList/ListIteratorImpl",96),S(219,52,XO,qh),h.Vc=function(t,n){mb(t,this.b),this.c.Vc(this.a+t,n),++this.b},h.Xb=function(t){return pt(t,this.b),this.c.Xb(this.a+t)},h.$c=function(t){var n;return pt(t,this.b),n=this.c.$c(this.a+t),--this.b,n},h._c=function(t,n){return pt(t,this.b),this.c._c(this.a+t,n)},h.gc=function(){return this.b},h.a=0,h.b=0,x(zt,"AbstractList/SubList",219),S(384,Hf,kc,o3),h.$b=function(){this.a.$b()},h.Hc=function(t){return this.a._b(t)},h.Kc=function(){var t;return t=this.a.vc().Kc(),new JZ(t)},h.Mc=function(t){return this.a._b(t)?(this.a.Bc(t),!0):!1},h.gc=function(){return this.a.gc()},x(zt,"AbstractMap/1",384),S(691,1,fr,JZ),h.Nb=function(t){Or(this,t)},h.Ob=function(){return this.a.Ob()},h.Pb=function(){var t;return t=u(this.a.Pb(),42),t.cd()},h.Qb=function(){this.a.Qb()},x(zt,"AbstractMap/1/1",691),S(226,28,zb,ua),h.$b=function(){this.a.$b()},h.Hc=function(t){return this.a.uc(t)},h.Kc=function(){var t;return t=this.a.vc().Kc(),new Jp(t)},h.gc=function(){return this.a.gc()},x(zt,"AbstractMap/2",226),S(294,1,fr,Jp),h.Nb=function(t){Or(this,t)},h.Ob=function(){return this.a.Ob()},h.Pb=function(){var t;return t=u(this.a.Pb(),42),t.dd()},h.Qb=function(){this.a.Qb()},x(zt,"AbstractMap/2/1",294),S(484,1,{484:1,42:1}),h.Fb=function(t){var n;return W(t,42)?(n=u(t,42),Oo(this.d,n.cd())&&Oo(this.e,n.dd())):!1},h.cd=function(){return this.d},h.dd=function(){return this.e},h.Hb=function(){return om(this.d)^om(this.e)},h.ed=function(t){return tne(this,t)},h.Ib=function(){return this.d+"="+this.e},x(zt,"AbstractMap/AbstractEntry",484),S(383,484,{484:1,383:1,42:1},nA),x(zt,"AbstractMap/SimpleEntry",383),S(1984,1,az),h.Fb=function(t){var n;return W(t,42)?(n=u(t,42),Oo(this.cd(),n.cd())&&Oo(this.dd(),n.dd())):!1},h.Hb=function(){return om(this.cd())^om(this.dd())},h.Ib=function(){return this.cd()+"="+this.dd()},x(zt,QJe,1984),S(1992,1967,HJe),h.tc=function(t){return bHe(this,t)},h._b=function(t){return mF(this,t)},h.vc=function(){return new rJ(this)},h.xc=function(t){var n;return n=t,Xs(Nse(this,n))},h.ec=function(){return new Zx(this)},x(zt,"AbstractNavigableMap",1992),S(739,Hf,kc,rJ),h.Hc=function(t){return W(t,42)&&bHe(this.b,u(t,42))},h.Kc=function(){return new m5(this.b)},h.Mc=function(t){var n;return W(t,42)?(n=u(t,42),iqe(this.b,n)):!1},h.gc=function(){return this.b.c},x(zt,"AbstractNavigableMap/EntrySet",739),S(493,Hf,Due,Zx),h.Nc=function(){return new eA(this)},h.$b=function(){N4(this.a)},h.Hc=function(t){return mF(this.a,t)},h.Kc=function(){var t;return t=new m5(new p5(this.a).b),new Jx(t)},h.Mc=function(t){return mF(this.a,t)?(D5(this.a,t),!0):!1},h.gc=function(){return this.a.c},x(zt,"AbstractNavigableMap/NavigableKeySet",493),S(494,1,fr,Jx),h.Nb=function(t){Or(this,t)},h.Ob=function(){return d8(this.a.a)},h.Pb=function(){var t;return t=RA(this.a),t.cd()},h.Qb=function(){oRe(this.a)},x(zt,"AbstractNavigableMap/NavigableKeySet/1",494),S(2004,28,zb),h.Fc=function(t){return V3(PO(this,t)),!0},h.Gc=function(t){return vt(t),zA(t!=this,"Can't add a queue to itself"),Hr(this,t)},h.$b=function(){for(;eH(this)!=null;);},x(zt,"AbstractQueue",2004),S(302,28,{4:1,20:1,28:1,14:1},Gw,$Fe),h.Fc=function(t){return Jie(this,t),!0},h.$b=function(){sre(this)},h.Hc=function(t){return $ze(new j5(this),t)},h.dc=function(){return I4(this)},h.Kc=function(){return new j5(this)},h.Mc=function(t){return lCt(new j5(this),t)},h.gc=function(){return this.c-this.b&this.a.length-1},h.Nc=function(){return new gt(this,272)},h.Qc=function(t){var n;return n=this.c-this.b&this.a.length-1,t.lengthn&&pi(t,n,null),t},h.b=0,h.c=0,x(zt,"ArrayDeque",302),S(446,1,fr,j5),h.Nb=function(t){Or(this,t)},h.Ob=function(){return this.a!=this.b},h.Pb=function(){return LP(this)},h.Qb=function(){jQe(this)},h.a=0,h.b=0,h.c=-1,x(zt,"ArrayDeque/IteratorImpl",446),S(12,52,ret,pe,No,mc),h.Vc=function(t,n){ab(this,t,n)},h.Fc=function(t){return ge(this,t)},h.Wc=function(t,n){return _se(this,t,n)},h.Gc=function(t){return _i(this,t)},h.$b=function(){this.c=J(It,Ee,1,0,5,1)},h.Hc=function(t){return Ds(this,t,0)!=-1},h.Jc=function(t){rc(this,t)},h.Xb=function(t){return Me(this,t)},h.Xc=function(t){return Ds(this,t,0)},h.dc=function(){return this.c.length==0},h.Kc=function(){return new R(this)},h.$c=function(t){return ed(this,t)},h.Mc=function(t){return nc(this,t)},h.Ud=function(t,n){DFe(this,t,n)},h._c=function(t,n){return Fl(this,t,n)},h.gc=function(){return this.c.length},h.ad=function(t){ir(this,t)},h.Pc=function(){return cF(this)},h.Qc=function(t){return Ff(this,t)};var KXt=x(zt,"ArrayList",12);S(7,1,fr,R),h.Nb=function(t){Or(this,t)},h.Ob=function(){return Fs(this)},h.Pb=function(){return I(this)},h.Qb=function(){E5(this)},h.a=0,h.b=-1,x(zt,"ArrayList/1",7),S(2013,p.Function,{},at),h.te=function(t,n){return Hi(t,n)},S(154,52,set,Jc),h.Hc=function(t){return $Qe(this,t)!=-1},h.Jc=function(t){var n,i,s,c;for(vt(t),i=this.a,s=0,c=i.length;s>>0,t.toString(16)))},h.f=0,h.i=Li;var g$=x(Yh,"CNode",57);S(814,1,{},NJ),x(Yh,"CNode/CNodeBuilder",814);var Frt;S(1525,1,{},f0),h.Oe=function(t,n){return 0},h.Pe=function(t,n){return 0},x(Yh,get,1525),S(1790,1,{},G1),h.Le=function(t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B;for(y=Oi,s=new R(t.a.b);s.as.d.c||s.d.c==a.d.c&&s.d.b0?t+this.n.d+this.n.a:0},h.Se=function(){var t,n,i,s,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].Se());else if(this.g)c=loe(this,xq(this,null,!0));else for(n=(ff(),H(_(nw,1),de,232,0,[Zs,Fo,Js])),i=0,s=n.length;i0?c+this.n.b+this.n.c:0},h.Te=function(){var t,n,i,s,c;if(this.g)for(t=xq(this,null,!1),i=(ff(),H(_(nw,1),de,232,0,[Zs,Fo,Js])),s=0,c=i.length;s0&&(s[0]+=this.d,i-=s[0]),s[2]>0&&(s[2]+=this.d,i-=s[2]),this.c.a=p.Math.max(0,i),this.c.d=n.d+t.d+(this.c.a-i)/2,s[1]=p.Math.max(s[1],i),are(this,Fo,n.d+t.d+s[0]-(s[1]-i)/2,s)},h.b=null,h.d=0,h.e=!1,h.f=!1,h.g=!1;var LK=0,p$=0;x($g,"GridContainerCell",1473),S(461,22,{3:1,35:1,22:1,461:1},OB);var y1,Ch,Qu,Urt=hn($g,"HorizontalLabelAlignment",461,gn,SCt,c6t),Grt;S(306,212,{212:1,306:1},JBe,oQe,GBe),h.Re=function(){return LRe(this)},h.Se=function(){return Fne(this)},h.a=0,h.c=!1;var nUt=x($g,"LabelCell",306);S(244,326,{212:1,326:1,244:1},rS),h.Re=function(){return n7(this)},h.Se=function(){return i7(this)},h.Te=function(){pQ(this)},h.Ue=function(){bQ(this)},h.b=0,h.c=0,h.d=!1,x($g,"StripContainerCell",244),S(1626,1,$n,iL),h.Mb=function(t){return ykt(u(t,212))},x($g,"StripContainerCell/lambda$0$Type",1626),S(1627,1,{},rL),h.Fe=function(t){return u(t,212).Se()},x($g,"StripContainerCell/lambda$1$Type",1627),S(1628,1,$n,sL),h.Mb=function(t){return Okt(u(t,212))},x($g,"StripContainerCell/lambda$2$Type",1628),S(1629,1,{},oL),h.Fe=function(t){return u(t,212).Re()},x($g,"StripContainerCell/lambda$3$Type",1629),S(462,22,{3:1,35:1,22:1,462:1},kB);var zu,O1,wf,Yrt=hn($g,"VerticalLabelAlignment",462,gn,xCt,l6t),Zrt;S(789,1,{},kue),h.c=0,h.d=0,h.k=0,h.s=0,h.t=0,h.v=!1,h.w=0,h.D=!1,x(tD,"NodeContext",789),S(1471,1,Yn,cL),h.ue=function(t,n){return J$e(u(t,61),u(n,61))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(tD,"NodeContext/0methodref$comparePortSides$Type",1471),S(1472,1,Yn,lL),h.ue=function(t,n){return XRt(u(t,111),u(n,111))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(tD,"NodeContext/1methodref$comparePortContexts$Type",1472),S(159,22,{3:1,35:1,22:1,159:1},ql);var Jrt,est,tst,nst,ist,rst,sst,ost,cst,lst,ust,fst,hst,ast,dst,gst,pst,bst,wst,mst,vst,BK,yst=hn(tD,"NodeLabelLocation",159,gn,nq,u6t),Ost;S(111,1,{111:1},DUe),h.a=!1,x(tD,"PortContext",111),S(1476,1,$t,uL),h.td=function(t){mje(u(t,306))},x(P7,Aet,1476),S(1477,1,$n,fL),h.Mb=function(t){return!!u(t,111).c},x(P7,Met,1477),S(1478,1,$t,hL),h.td=function(t){mje(u(t,111).c)},x(P7,"LabelPlacer/lambda$2$Type",1478);var n1e;S(1475,1,$t,dL),h.td=function(t){ub(),ekt(u(t,111))},x(P7,"NodeLabelAndSizeUtilities/lambda$0$Type",1475),S(790,1,$t,mne),h.td=function(t){a4t(this.b,this.c,this.a,u(t,181))},h.a=!1,h.c=!1,x(P7,"NodeLabelCellCreator/lambda$0$Type",790),S(1474,1,$t,eEe),h.td=function(t){ikt(this.a,u(t,181))},x(P7,"PortContextCreator/lambda$0$Type",1474);var b$;S(1829,1,{},gL),x(ZO,"GreedyRectangleStripOverlapRemover",1829),S(1830,1,Yn,aL),h.ue=function(t,n){return z5t(u(t,222),u(n,222))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(ZO,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1830),S(1786,1,{},GMe),h.a=5,h.e=0,x(ZO,"RectangleStripOverlapRemover",1786),S(1787,1,Yn,bL),h.ue=function(t,n){return W5t(u(t,222),u(n,222))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(ZO,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1787),S(1789,1,Yn,wL),h.ue=function(t,n){return p9t(u(t,222),u(n,222))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(ZO,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1789),S(406,22,{3:1,35:1,22:1,406:1},sA);var J7,FK,_K,eC,kst=hn(ZO,"RectangleStripOverlapRemover/OverlapRemovalDirection",406,gn,STt,f6t),Sst;S(222,1,{222:1},IF),x(ZO,"RectangleStripOverlapRemover/RectangleNode",222),S(1788,1,$t,tEe),h.td=function(t){vNt(this.a,u(t,222))},x(ZO,"RectangleStripOverlapRemover/lambda$1$Type",1788),S(1304,1,Yn,mL),h.ue=function(t,n){return CWt(u(t,167),u(n,167))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(wh,"PolyominoCompactor/CornerCasesGreaterThanRestComparator",1304),S(1307,1,{},fE),h.Kb=function(t){return u(t,324).a},x(wh,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type",1307),S(1308,1,$n,vL),h.Mb=function(t){return u(t,323).a},x(wh,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type",1308),S(1309,1,$n,yL),h.Mb=function(t){return u(t,323).a},x(wh,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type",1309),S(1302,1,Yn,OL),h.ue=function(t,n){return sQt(u(t,167),u(n,167))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(wh,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator",1302),S(1305,1,{},pL),h.Kb=function(t){return u(t,324).a},x(wh,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type",1305),S(767,1,Yn,hE),h.ue=function(t,n){return cPt(u(t,167),u(n,167))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(wh,"PolyominoCompactor/MinNumOfExtensionsComparator",767),S(1300,1,Yn,kL),h.ue=function(t,n){return bMt(u(t,321),u(n,321))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(wh,"PolyominoCompactor/MinPerimeterComparator",1300),S(1301,1,Yn,SL),h.ue=function(t,n){return K$t(u(t,321),u(n,321))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(wh,"PolyominoCompactor/MinPerimeterComparatorWithShape",1301),S(1303,1,Yn,xL),h.ue=function(t,n){return AQt(u(t,167),u(n,167))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(wh,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator",1303),S(1306,1,{},CL),h.Kb=function(t){return u(t,324).a},x(wh,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type",1306),S(777,1,{},Cee),h.Ce=function(t,n){return vTt(this,u(t,46),u(n,167))},x(wh,"SuccessorCombination",777),S(644,1,{},S4),h.Ce=function(t,n){var i;return lFt((i=u(t,46),u(n,167),i))},x(wh,"SuccessorJitter",644),S(643,1,{},Kx),h.Ce=function(t,n){var i;return GHt((i=u(t,46),u(n,167),i))},x(wh,"SuccessorLineByLine",643),S(568,1,{},x4),h.Ce=function(t,n){var i;return u_t((i=u(t,46),u(n,167),i))},x(wh,"SuccessorManhattan",568),S(1356,1,{},TL),h.Ce=function(t,n){var i;return yHt((i=u(t,46),u(n,167),i))},x(wh,"SuccessorMaxNormWindingInMathPosSense",1356),S(400,1,{},u3),h.Ce=function(t,n){return die(this,t,n)},h.c=!1,h.d=!1,h.e=!1,h.f=!1,x(wh,"SuccessorQuadrantsGeneric",400),S(1357,1,{},EL),h.Kb=function(t){return u(t,324).a},x(wh,"SuccessorQuadrantsGeneric/lambda$0$Type",1357),S(323,22,{3:1,35:1,22:1,323:1},rA),h.a=!1;var tC,nC,iC,rC,xst=hn(iD,Jue,323,gn,TTt,h6t),Cst;S(1298,1,{}),h.Ib=function(){var t,n,i,s,c,a;for(i=" ",t=me(0),c=0;c=0?"b"+t+"["+$_(this.a)+"]":"b["+$_(this.a)+"]"):"b_"+C0(this)},x(D7,"FBendpoint",559),S(282,134,{3:1,282:1,94:1,134:1},$Ie),h.Ib=function(){return $_(this)},x(D7,"FEdge",282),S(231,134,{3:1,231:1,94:1,134:1},zM);var rUt=x(D7,"FGraph",231);S(447,357,{3:1,447:1,357:1,94:1,134:1},R_e),h.Ib=function(){return this.b==null||this.b.length==0?"l["+$_(this.a)+"]":"l_"+this.b},x(D7,"FLabel",447),S(144,357,{3:1,144:1,357:1,94:1,134:1},KLe),h.Ib=function(){return zie(this)},h.b=0,x(D7,"FNode",144),S(2003,1,{}),h.bf=function(t){tue(this,t)},h.cf=function(){pVe(this)},h.d=0,x(ufe,"AbstractForceModel",2003),S(631,2003,{631:1},Cze),h.af=function(t,n){var i,s,c,a,g;return hUe(this.f,t,n),c=ur(Us(n.d),t.d),g=p.Math.sqrt(c.a*c.a+c.b*c.b),s=p.Math.max(0,g-M5(t.e)/2-M5(n.e)/2),i=tWe(this.e,t,n),i>0?a=-a9t(s,this.c)*i:a=rSt(s,this.b)*u(N(t,(gf(),wk)),19).a,oh(c,a/g),c},h.bf=function(t){tue(this,t),this.a=u(N(t,(gf(),k$)),19).a,this.c=oe(Oe(N(t,S$))),this.b=oe(Oe(N(t,VK)))},h.df=function(t){return t0&&(a-=bkt(s,this.a)*i),oh(c,a*this.b/g),c},h.bf=function(t){var n,i,s,c,a,g,w;for(tue(this,t),this.b=oe(Oe(N(t,(gf(),XK)))),this.c=this.b/u(N(t,k$),19).a,s=t.e.c.length,a=0,c=0,w=new R(t.e);w.a0},h.a=0,h.b=0,h.c=0,x(ufe,"FruchtermanReingoldModel",632),S(849,1,lu,oCe),h.Qe=function(t){Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,oD),""),"Force Model"),"Determines the model for force calculation."),h1e),(hd(),xi)),a1e),Ge((af(),Et))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,ffe),""),"Iterations"),"The number of iterations on the force model."),me(300)),lo),Fr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,hfe),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),me(0)),lo),Fr),Ge(Mh)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Nz),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),mh),As),wr),Ge(Et)))),pr(t,Nz,oD,Wst),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Iz),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),As),wr),Ge(Et)))),pr(t,Iz,oD,qst),aJe((new cCe,t))};var Fst,_st,h1e,Hst,qst,Qst,zst,Wst;x(IS,"ForceMetaDataProvider",849),S(424,22,{3:1,35:1,22:1,424:1},Mee);var KK,O$,a1e=hn(IS,"ForceModelStrategy",424,gn,Z7t,g6t),Kst;S(988,1,lu,cCe),h.Qe=function(t){aJe(t)};var Vst,Xst,d1e,k$,g1e,Ust,Gst,Yst,p1e,Zst,b1e,w1e,Jst,wk,eot,VK,m1e,tot,not,S$,XK;x(IS,"ForceOptions",988),S(989,1,{},pke),h.$e=function(){var t;return t=new jJ,t},h._e=function(t){},x(IS,"ForceOptions/ForceFactory",989);var cC,h6,hy,x$;S(850,1,lu,lCe),h.Qe=function(t){Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,dfe),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(kt(),!1)),(hd(),jr)),Ui),Ge((af(),or))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,gfe),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),As),wr),ii(Et,H(_(Sd,1),de,175,0,[Mh]))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,pfe),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),v1e),xi),T1e),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,bfe),""),"Stress Epsilon"),"Termination criterion for the iterative process."),mh),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,wfe),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),me(_n)),lo),Fr),Ge(Et)))),GZe((new uCe,t))};var iot,rot,v1e,sot,oot,cot;x(IS,"StressMetaDataProvider",850),S(992,1,lu,uCe),h.Qe=function(t){GZe(t)};var C$,y1e,O1e,k1e,S1e,x1e,lot,uot,fot,hot,C1e,aot;x(IS,"StressOptions",992),S(993,1,{},bke),h.$e=function(){var t;return t=new NIe,t},h._e=function(t){},x(IS,"StressOptions/StressFactory",993),S(1128,209,Ng,NIe),h.Ze=function(t,n){var i,s,c,a,g;for(Vt(n,Het,1),je(Pe($e(t,(V9(),S1e))))?je(Pe($e(t,C1e)))||EM((i=new e8((ib(),new eb(t))),i)):wGe(new jJ,t,xo(n,1)),c=Vze(t),s=oZe(this.a,c),g=s.Kc();g.Ob();)a=u(g.Pb(),231),!(a.e.c.length<=1)&&(SWt(this.b,a),t_t(this.b),rc(a.d,new wke));c=vJe(s),bJe(c),Ht(n)},x(uD,"StressLayoutProvider",1128),S(1129,1,$t,wke),h.td=function(t){lue(u(t,447))},x(uD,"StressLayoutProvider/lambda$0$Type",1129),S(990,1,{},QMe),h.c=0,h.e=0,h.g=0,x(uD,"StressMajorization",990),S(379,22,{3:1,35:1,22:1,379:1},SB);var UK,GK,YK,T1e=hn(uD,"StressMajorization/Dimension",379,gn,TCt,p6t),dot;S(991,1,Yn,sEe),h.ue=function(t,n){return WSt(this.a,u(t,144),u(n,144))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(uD,"StressMajorization/lambda$0$Type",991),S(1229,1,{},UFe),x(sy,"ElkLayered",1229),S(1230,1,$t,mke),h.td=function(t){nFt(u(t,37))},x(sy,"ElkLayered/lambda$0$Type",1230),S(1231,1,$t,oEe),h.td=function(t){KSt(this.a,u(t,37))},x(sy,"ElkLayered/lambda$1$Type",1231),S(1263,1,{},ONe);var got,pot,bot;x(sy,"GraphConfigurator",1263),S(759,1,$t,dJ),h.td=function(t){SXe(this.a,u(t,10))},x(sy,"GraphConfigurator/lambda$0$Type",759),S(760,1,{},kZ),h.Kb=function(t){return sce(),new ht(null,new gt(u(t,29).a,16))},x(sy,"GraphConfigurator/lambda$1$Type",760),S(761,1,$t,gJ),h.td=function(t){SXe(this.a,u(t,10))},x(sy,"GraphConfigurator/lambda$2$Type",761),S(1127,209,Ng,KMe),h.Ze=function(t,n){var i;i=zzt(new ZMe,t),ie($e(t,(xe(),hw)))===ie((Sa(),xd))?kDt(this.a,i,n):mFt(this.a,i,n),hJe(new hCe,i)},x(sy,"LayeredLayoutProvider",1127),S(356,22,{3:1,35:1,22:1,356:1},p8);var Th,k1,Vo,Ao,Es,E1e=hn(sy,"LayeredPhases",356,gn,uEt,b6t),wot;S(1651,1,{},NQe),h.i=0;var mot;x(I7,"ComponentsToCGraphTransformer",1651);var vot;S(1652,1,{},vke),h.ef=function(t,n){return p.Math.min(t.a!=null?oe(t.a):t.c.i,n.a!=null?oe(n.a):n.c.i)},h.ff=function(t,n){return p.Math.min(t.a!=null?oe(t.a):t.c.i,n.a!=null?oe(n.a):n.c.i)},x(I7,"ComponentsToCGraphTransformer/1",1652),S(81,1,{81:1}),h.i=0,h.k=!0,h.o=Li;var ZK=x(BS,"CNode",81);S(460,81,{460:1,81:1},Pte,joe),h.Ib=function(){return""},x(I7,"ComponentsToCGraphTransformer/CRectNode",460),S(1623,1,{},yke);var JK,eV;x(I7,"OneDimensionalComponentsCompaction",1623),S(1624,1,{},Oke),h.Kb=function(t){return wCt(u(t,46))},h.Fb=function(t){return this===t},x(I7,"OneDimensionalComponentsCompaction/lambda$0$Type",1624),S(1625,1,{},kke),h.Kb=function(t){return PDt(u(t,46))},h.Fb=function(t){return this===t},x(I7,"OneDimensionalComponentsCompaction/lambda$1$Type",1625),S(1654,1,{},WLe),x(BS,"CGraph",1654),S(189,1,{189:1},JH),h.b=0,h.c=0,h.e=0,h.g=!0,h.i=Li,x(BS,"CGroup",189),S(1653,1,{},Tke),h.ef=function(t,n){return p.Math.max(t.a!=null?oe(t.a):t.c.i,n.a!=null?oe(n.a):n.c.i)},h.ff=function(t,n){return p.Math.max(t.a!=null?oe(t.a):t.c.i,n.a!=null?oe(n.a):n.c.i)},x(BS,get,1653),S(1655,1,{},xUe),h.d=!1;var yot,tV=x(BS,wet,1655);S(1656,1,{},Eke),h.Kb=function(t){return bee(),kt(),u(u(t,46).a,81).d.e!=0},h.Fb=function(t){return this===t},x(BS,met,1656),S(823,1,{},_ne),h.a=!1,h.b=!1,h.c=!1,h.d=!1,x(BS,vet,823),S(1825,1,{},uLe),x(fD,yet,1825);var lC=hi(Rg,aet);S(1826,1,{369:1},_Be),h.Ke=function(t){hqt(this,u(t,466))},x(fD,Oet,1826),S(1827,1,Yn,Ake),h.ue=function(t,n){return h7t(u(t,81),u(n,81))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(fD,ket,1827),S(466,1,{466:1},jee),h.a=!1,x(fD,xet,466),S(1828,1,Yn,Mke),h.ue=function(t,n){return SIt(u(t,466),u(n,466))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(fD,Cet,1828),S(140,1,{140:1},S3,Ine),h.Fb=function(t){var n;return t==null||sUt!=zc(t)?!1:(n=u(t,140),Oo(this.c,n.c)&&Oo(this.d,n.d))},h.Hb=function(){return IP(H(_(It,1),Ee,1,5,[this.c,this.d]))},h.Ib=function(){return"("+this.c+Qr+this.d+(this.a?"cx":"")+this.b+")"},h.a=!0,h.c=0,h.d=0;var sUt=x(Rg,"Point",140);S(405,22,{3:1,35:1,22:1,405:1},oA);var yp,iw,t2,rw,Oot=hn(Rg,"Point/Quadrant",405,gn,ETt,w6t),kot;S(1642,1,{},VMe),h.b=null,h.c=null,h.d=null,h.e=null,h.f=null;var Sot,xot,Cot,Tot,Eot;x(Rg,"RectilinearConvexHull",1642),S(574,1,{369:1},tj),h.Ke=function(t){fAt(this,u(t,140))},h.b=0;var A1e;x(Rg,"RectilinearConvexHull/MaximalElementsEventHandler",574),S(1644,1,Yn,xke),h.ue=function(t,n){return e7t(Oe(t),Oe(n))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Rg,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1644),S(1643,1,{369:1},iQe),h.Ke=function(t){xHt(this,u(t,140))},h.a=0,h.b=null,h.c=null,h.d=null,h.e=null,x(Rg,"RectilinearConvexHull/RectangleEventHandler",1643),S(1645,1,Yn,Cke),h.ue=function(t,n){return iTt(u(t,140),u(n,140))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Rg,"RectilinearConvexHull/lambda$0$Type",1645),S(1646,1,Yn,Ske),h.ue=function(t,n){return rTt(u(t,140),u(n,140))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Rg,"RectilinearConvexHull/lambda$1$Type",1646),S(1647,1,Yn,Pke),h.ue=function(t,n){return oTt(u(t,140),u(n,140))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Rg,"RectilinearConvexHull/lambda$2$Type",1647),S(1648,1,Yn,jke),h.ue=function(t,n){return sTt(u(t,140),u(n,140))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Rg,"RectilinearConvexHull/lambda$3$Type",1648),S(1649,1,Yn,Dke),h.ue=function(t,n){return lLt(u(t,140),u(n,140))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Rg,"RectilinearConvexHull/lambda$4$Type",1649),S(1650,1,{},wFe),x(Rg,"Scanline",1650),S(2005,1,{}),x(vh,"AbstractGraphPlacer",2005),S(325,1,{325:1},uIe),h.mf=function(t){return this.nf(t)?(Ye(this.b,u(N(t,(ae(),ow)),21),t),!0):!1},h.nf=function(t){var n,i,s,c;for(n=u(N(t,(ae(),ow)),21),c=u(Wn(Zn,n),21),s=c.Kc();s.Ob();)if(i=u(s.Pb(),21),!u(Wn(this.b,i),15).dc())return!1;return!0};var Zn;x(vh,"ComponentGroup",325),S(765,2005,{},IJ),h.of=function(t){var n,i;for(i=new R(this.a);i.aP&&(be=0,Se+=M+c,M=0),q=g.c,vS(g,be+q.a,Se+q.b),of(q),i=p.Math.max(i,be+U.a),M=p.Math.max(M,U.b),be+=U.a+c;if(n.f.a=i,n.f.b=Se+M,je(Pe(N(a,hN)))){for(s=new jL,Aue(s,t,c),E=t.Kc();E.Ob();)k=u(E.Pb(),37),Vn(of(k.c),s.e);Vn(of(n.f),s.a)}Are(n,t)},x(vh,"SimpleRowGraphPlacer",1291),S(1292,1,Yn,Ike),h.ue=function(t,n){return oPt(u(t,37),u(n,37))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(vh,"SimpleRowGraphPlacer/1",1292);var Mot;S(1262,1,bh,Rke),h.Lb=function(t){var n;return n=u(N(u(t,243).b,(xe(),Os)),74),!!n&&n.b!=0},h.Fb=function(t){return this===t},h.Mb=function(t){var n;return n=u(N(u(t,243).b,(xe(),Os)),74),!!n&&n.b!=0},x(hD,"CompoundGraphPostprocessor/1",1262),S(1261,1,ki,JMe),h.pf=function(t,n){ZKe(this,u(t,37),n)},x(hD,"CompoundGraphPreprocessor",1261),S(441,1,{441:1},FWe),h.c=!1,x(hD,"CompoundGraphPreprocessor/ExternalPort",441),S(243,1,{243:1},qA),h.Ib=function(){return lF(this.c)+":"+yUe(this.b)},x(hD,"CrossHierarchyEdge",243),S(763,1,Yn,pJ),h.ue=function(t,n){return UNt(this,u(t,243),u(n,243))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(hD,"CrossHierarchyEdgeComparator",763),S(299,134,{3:1,299:1,94:1,134:1}),h.p=0,x(Bo,"LGraphElement",299),S(17,299,{3:1,17:1,299:1,94:1,134:1},I0),h.Ib=function(){return yUe(this)};var iV=x(Bo,"LEdge",17);S(37,299,{3:1,20:1,37:1,299:1,94:1,134:1},Gre),h.Jc=function(t){Sr(this,t)},h.Kc=function(){return new R(this.b)},h.Ib=function(){return this.b.c.length==0?"G-unlayered"+u1(this.a):this.a.c.length==0?"G-layered"+u1(this.b):"G[layerless"+u1(this.a)+", layers"+u1(this.b)+"]"};var Pot=x(Bo,"LGraph",37),jot;S(657,1,{}),h.qf=function(){return this.e.n},h.We=function(t){return N(this.e,t)},h.rf=function(){return this.e.o},h.sf=function(){return this.e.p},h.Xe=function(t){return er(this.e,t)},h.tf=function(t){this.e.n.a=t.a,this.e.n.b=t.b},h.uf=function(t){this.e.o.a=t.a,this.e.o.b=t.b},h.vf=function(t){this.e.p=t},x(Bo,"LGraphAdapters/AbstractLShapeAdapter",657),S(577,1,{839:1},kE),h.wf=function(){var t,n;if(!this.b)for(this.b=Lh(this.a.b.c.length),n=new R(this.a.b);n.a0&&CWe((fn(n-1,t.length),t.charCodeAt(n-1)),Vet);)--n;if(a> ",t),hj(i)),wn(so((t.a+="[",t),i.i),"]")),t.a},h.c=!0,h.d=!1;var $1e,N1e,I1e,R1e,L1e,B1e,$ot=x(Bo,"LPort",11);S(397,1,Xh,f3),h.Jc=function(t){Sr(this,t)},h.Kc=function(){var t;return t=new R(this.a.e),new cEe(t)},x(Bo,"LPort/1",397),S(1290,1,fr,cEe),h.Nb=function(t){Or(this,t)},h.Pb=function(){return u(I(this.a),17).c},h.Ob=function(){return Fs(this.a)},h.Qb=function(){E5(this.a)},x(Bo,"LPort/1/1",1290),S(359,1,Xh,tv),h.Jc=function(t){Sr(this,t)},h.Kc=function(){var t;return t=new R(this.a.g),new bJ(t)},x(Bo,"LPort/2",359),S(762,1,fr,bJ),h.Nb=function(t){Or(this,t)},h.Pb=function(){return u(I(this.a),17).d},h.Ob=function(){return Fs(this.a)},h.Qb=function(){E5(this.a)},x(Bo,"LPort/2/1",762),S(1283,1,Xh,_De),h.Jc=function(t){Sr(this,t)},h.Kc=function(){return new Nf(this)},x(Bo,"LPort/CombineIter",1283),S(201,1,fr,Nf),h.Nb=function(t){Or(this,t)},h.Qb=function(){fje()},h.Ob=function(){return b5(this)},h.Pb=function(){return Fs(this.a)?I(this.a):I(this.b)},x(Bo,"LPort/CombineIter/1",201),S(1285,1,bh,Bke),h.Lb=function(t){return OLe(t)},h.Fb=function(t){return this===t},h.Mb=function(t){return yc(),u(t,11).e.c.length!=0},x(Bo,"LPort/lambda$0$Type",1285),S(1284,1,bh,Fke),h.Lb=function(t){return kLe(t)},h.Fb=function(t){return this===t},h.Mb=function(t){return yc(),u(t,11).g.c.length!=0},x(Bo,"LPort/lambda$1$Type",1284),S(1286,1,bh,_ke),h.Lb=function(t){return yc(),u(t,11).j==(ye(),yt)},h.Fb=function(t){return this===t},h.Mb=function(t){return yc(),u(t,11).j==(ye(),yt)},x(Bo,"LPort/lambda$2$Type",1286),S(1287,1,bh,Hke),h.Lb=function(t){return yc(),u(t,11).j==(ye(),At)},h.Fb=function(t){return this===t},h.Mb=function(t){return yc(),u(t,11).j==(ye(),At)},x(Bo,"LPort/lambda$3$Type",1287),S(1288,1,bh,qke),h.Lb=function(t){return yc(),u(t,11).j==(ye(),Xt)},h.Fb=function(t){return this===t},h.Mb=function(t){return yc(),u(t,11).j==(ye(),Xt)},x(Bo,"LPort/lambda$4$Type",1288),S(1289,1,bh,Qke),h.Lb=function(t){return yc(),u(t,11).j==(ye(),xt)},h.Fb=function(t){return this===t},h.Mb=function(t){return yc(),u(t,11).j==(ye(),xt)},x(Bo,"LPort/lambda$5$Type",1289),S(29,299,{3:1,20:1,299:1,29:1,94:1,134:1},iu),h.Jc=function(t){Sr(this,t)},h.Kc=function(){return new R(this.a)},h.Ib=function(){return"L_"+Ds(this.b.b,this,0)+u1(this.a)},x(Bo,"Layer",29),S(1342,1,{},ZMe),x(gd,Yet,1342),S(1346,1,{},zke),h.Kb=function(t){return Ts(u(t,82))},x(gd,"ElkGraphImporter/0methodref$connectableShapeToNode$Type",1346),S(1349,1,{},Wke),h.Kb=function(t){return Ts(u(t,82))},x(gd,"ElkGraphImporter/1methodref$connectableShapeToNode$Type",1349),S(1343,1,$t,lEe),h.td=function(t){NUe(this.a,u(t,118))},x(gd,Zet,1343),S(1344,1,$t,uEe),h.td=function(t){NUe(this.a,u(t,118))},x(gd,Jet,1344),S(1345,1,{},Kke),h.Kb=function(t){return new ht(null,new gt(U9t(u(t,79)),16))},x(gd,ett,1345),S(1347,1,$n,fEe),h.Mb=function(t){return G4t(this.a,u(t,33))},x(gd,ttt,1347),S(1348,1,{},Vke),h.Kb=function(t){return new ht(null,new gt(G9t(u(t,79)),16))},x(gd,"ElkGraphImporter/lambda$5$Type",1348),S(1350,1,$n,hEe),h.Mb=function(t){return Y4t(this.a,u(t,33))},x(gd,"ElkGraphImporter/lambda$7$Type",1350),S(1351,1,$n,Xke),h.Mb=function(t){return d7t(u(t,79))},x(gd,"ElkGraphImporter/lambda$8$Type",1351),S(1278,1,{},hCe);var Not;x(gd,"ElkGraphLayoutTransferrer",1278),S(1279,1,$n,aEe),h.Mb=function(t){return FSt(this.a,u(t,17))},x(gd,"ElkGraphLayoutTransferrer/lambda$0$Type",1279),S(1280,1,$t,dEe),h.td=function(t){h8(),ge(this.a,u(t,17))},x(gd,"ElkGraphLayoutTransferrer/lambda$1$Type",1280),S(1281,1,$n,gEe),h.Mb=function(t){return xSt(this.a,u(t,17))},x(gd,"ElkGraphLayoutTransferrer/lambda$2$Type",1281),S(1282,1,$t,pEe),h.td=function(t){h8(),ge(this.a,u(t,17))},x(gd,"ElkGraphLayoutTransferrer/lambda$3$Type",1282),S(1485,1,ki,Uke),h.pf=function(t,n){TMt(u(t,37),n)},x(Ct,"CommentNodeMarginCalculator",1485),S(1486,1,{},Gke),h.Kb=function(t){return new ht(null,new gt(u(t,29).a,16))},x(Ct,"CommentNodeMarginCalculator/lambda$0$Type",1486),S(1487,1,$t,Yke),h.td=function(t){oWt(u(t,10))},x(Ct,"CommentNodeMarginCalculator/lambda$1$Type",1487),S(1488,1,ki,Zke),h.pf=function(t,n){vqt(u(t,37),n)},x(Ct,"CommentPostprocessor",1488),S(1489,1,ki,Jke),h.pf=function(t,n){TVt(u(t,37),n)},x(Ct,"CommentPreprocessor",1489),S(1490,1,ki,e4e),h.pf=function(t,n){q_t(u(t,37),n)},x(Ct,"ConstraintsPostprocessor",1490),S(1491,1,ki,t4e),h.pf=function(t,n){UMt(u(t,37),n)},x(Ct,"EdgeAndLayerConstraintEdgeReverser",1491),S(1492,1,ki,n4e),h.pf=function(t,n){LDt(u(t,37),n)},x(Ct,"EndLabelPostprocessor",1492),S(1493,1,{},i4e),h.Kb=function(t){return new ht(null,new gt(u(t,29).a,16))},x(Ct,"EndLabelPostprocessor/lambda$0$Type",1493),S(1494,1,$n,r4e),h.Mb=function(t){return j7t(u(t,10))},x(Ct,"EndLabelPostprocessor/lambda$1$Type",1494),S(1495,1,$t,s4e),h.td=function(t){xIt(u(t,10))},x(Ct,"EndLabelPostprocessor/lambda$2$Type",1495),S(1496,1,ki,o4e),h.pf=function(t,n){dBt(u(t,37),n)},x(Ct,"EndLabelPreprocessor",1496),S(1497,1,{},c4e),h.Kb=function(t){return new ht(null,new gt(u(t,29).a,16))},x(Ct,"EndLabelPreprocessor/lambda$0$Type",1497),S(1498,1,$t,aRe),h.td=function(t){d4t(this.a,this.b,this.c,u(t,10))},h.a=0,h.b=0,h.c=!1,x(Ct,"EndLabelPreprocessor/lambda$1$Type",1498),S(1499,1,$n,l4e),h.Mb=function(t){return ie(N(u(t,70),(xe(),Ah)))===ie((If(),zk))},x(Ct,"EndLabelPreprocessor/lambda$2$Type",1499),S(1500,1,$t,bEe),h.td=function(t){Tn(this.a,u(t,70))},x(Ct,"EndLabelPreprocessor/lambda$3$Type",1500),S(1501,1,$n,u4e),h.Mb=function(t){return ie(N(u(t,70),(xe(),Ah)))===ie((If(),Ow))},x(Ct,"EndLabelPreprocessor/lambda$4$Type",1501),S(1502,1,$t,wEe),h.td=function(t){Tn(this.a,u(t,70))},x(Ct,"EndLabelPreprocessor/lambda$5$Type",1502),S(1551,1,ki,fCe),h.pf=function(t,n){Wjt(u(t,37),n)};var Iot;x(Ct,"EndLabelSorter",1551),S(1552,1,Yn,f4e),h.ue=function(t,n){return O$t(u(t,456),u(n,456))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"EndLabelSorter/1",1552),S(456,1,{456:1},DBe),x(Ct,"EndLabelSorter/LabelGroup",456),S(1553,1,{},h4e),h.Kb=function(t){return a8(),new ht(null,new gt(u(t,29).a,16))},x(Ct,"EndLabelSorter/lambda$0$Type",1553),S(1554,1,$n,a4e),h.Mb=function(t){return a8(),u(t,10).k==(jt(),zi)},x(Ct,"EndLabelSorter/lambda$1$Type",1554),S(1555,1,$t,d4e),h.td=function(t){xLt(u(t,10))},x(Ct,"EndLabelSorter/lambda$2$Type",1555),S(1556,1,$n,g4e),h.Mb=function(t){return a8(),ie(N(u(t,70),(xe(),Ah)))===ie((If(),Ow))},x(Ct,"EndLabelSorter/lambda$3$Type",1556),S(1557,1,$n,p4e),h.Mb=function(t){return a8(),ie(N(u(t,70),(xe(),Ah)))===ie((If(),zk))},x(Ct,"EndLabelSorter/lambda$4$Type",1557),S(1503,1,ki,b4e),h.pf=function(t,n){wWt(this,u(t,37))},h.b=0,h.c=0,x(Ct,"FinalSplineBendpointsCalculator",1503),S(1504,1,{},w4e),h.Kb=function(t){return new ht(null,new gt(u(t,29).a,16))},x(Ct,"FinalSplineBendpointsCalculator/lambda$0$Type",1504),S(1505,1,{},m4e),h.Kb=function(t){return new ht(null,new P0(new _t(qt(qi(u(t,10)).a.Kc(),new L))))},x(Ct,"FinalSplineBendpointsCalculator/lambda$1$Type",1505),S(1506,1,$n,v4e),h.Mb=function(t){return!_r(u(t,17))},x(Ct,"FinalSplineBendpointsCalculator/lambda$2$Type",1506),S(1507,1,$n,y4e),h.Mb=function(t){return er(u(t,17),(ae(),Wg))},x(Ct,"FinalSplineBendpointsCalculator/lambda$3$Type",1507),S(1508,1,$t,mEe),h.td=function(t){PQt(this.a,u(t,128))},x(Ct,"FinalSplineBendpointsCalculator/lambda$4$Type",1508),S(1509,1,$t,O4e),h.td=function(t){_q(u(t,17).a)},x(Ct,"FinalSplineBendpointsCalculator/lambda$5$Type",1509),S(792,1,ki,wJ),h.pf=function(t,n){fKt(this,u(t,37),n)},x(Ct,"GraphTransformer",792),S(511,22,{3:1,35:1,22:1,511:1},Pee);var sV,uC,Rot=hn(Ct,"GraphTransformer/Mode",511,gn,J7t,jxt),Lot;S(1510,1,ki,k4e),h.pf=function(t,n){_Ht(u(t,37),n)},x(Ct,"HierarchicalNodeResizingProcessor",1510),S(1511,1,ki,S4e),h.pf=function(t,n){OMt(u(t,37),n)},x(Ct,"HierarchicalPortConstraintProcessor",1511),S(1512,1,Yn,x4e),h.ue=function(t,n){return D$t(u(t,10),u(n,10))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"HierarchicalPortConstraintProcessor/NodeComparator",1512),S(1513,1,ki,C4e),h.pf=function(t,n){Hzt(u(t,37),n)},x(Ct,"HierarchicalPortDummySizeProcessor",1513),S(1514,1,ki,T4e),h.pf=function(t,n){Bqt(this,u(t,37),n)},h.a=0,x(Ct,"HierarchicalPortOrthogonalEdgeRouter",1514),S(1515,1,Yn,E4e),h.ue=function(t,n){return Q5t(u(t,10),u(n,10))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"HierarchicalPortOrthogonalEdgeRouter/1",1515),S(1516,1,Yn,A4e),h.ue=function(t,n){return iAt(u(t,10),u(n,10))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"HierarchicalPortOrthogonalEdgeRouter/2",1516),S(1517,1,ki,M4e),h.pf=function(t,n){uLt(u(t,37),n)},x(Ct,"HierarchicalPortPositionProcessor",1517),S(1518,1,ki,aCe),h.pf=function(t,n){rXt(this,u(t,37))},h.a=0,h.c=0;var T$,E$;x(Ct,"HighDegreeNodeLayeringProcessor",1518),S(571,1,{571:1},P4e),h.b=-1,h.d=-1,x(Ct,"HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation",571),S(1519,1,{},j4e),h.Kb=function(t){return B8(),$s(u(t,10))},h.Fb=function(t){return this===t},x(Ct,"HighDegreeNodeLayeringProcessor/lambda$0$Type",1519),S(1520,1,{},D4e),h.Kb=function(t){return B8(),qi(u(t,10))},h.Fb=function(t){return this===t},x(Ct,"HighDegreeNodeLayeringProcessor/lambda$1$Type",1520),S(1526,1,ki,$4e),h.pf=function(t,n){pzt(this,u(t,37),n)},x(Ct,"HyperedgeDummyMerger",1526),S(793,1,{},yne),h.a=!1,h.b=!1,h.c=!1,x(Ct,"HyperedgeDummyMerger/MergeState",793),S(1527,1,{},N4e),h.Kb=function(t){return new ht(null,new gt(u(t,29).a,16))},x(Ct,"HyperedgeDummyMerger/lambda$0$Type",1527),S(1528,1,{},I4e),h.Kb=function(t){return new ht(null,new gt(u(t,10).j,16))},x(Ct,"HyperedgeDummyMerger/lambda$1$Type",1528),S(1529,1,$t,R4e),h.td=function(t){u(t,11).p=-1},x(Ct,"HyperedgeDummyMerger/lambda$2$Type",1529),S(1530,1,ki,L4e),h.pf=function(t,n){dzt(u(t,37),n)},x(Ct,"HypernodesProcessor",1530),S(1531,1,ki,B4e),h.pf=function(t,n){gzt(u(t,37),n)},x(Ct,"InLayerConstraintProcessor",1531),S(1532,1,ki,F4e),h.pf=function(t,n){zMt(u(t,37),n)},x(Ct,"InnermostNodeMarginCalculator",1532),S(1533,1,ki,_4e),h.pf=function(t,n){OVt(this,u(t,37))},h.a=Li,h.b=Li,h.c=Oi,h.d=Oi;var oUt=x(Ct,"InteractiveExternalPortPositioner",1533);S(1534,1,{},H4e),h.Kb=function(t){return u(t,17).d.i},h.Fb=function(t){return this===t},x(Ct,"InteractiveExternalPortPositioner/lambda$0$Type",1534),S(1535,1,{},vEe),h.Kb=function(t){return K5t(this.a,Oe(t))},h.Fb=function(t){return this===t},x(Ct,"InteractiveExternalPortPositioner/lambda$1$Type",1535),S(1536,1,{},q4e),h.Kb=function(t){return u(t,17).c.i},h.Fb=function(t){return this===t},x(Ct,"InteractiveExternalPortPositioner/lambda$2$Type",1536),S(1537,1,{},yEe),h.Kb=function(t){return V5t(this.a,Oe(t))},h.Fb=function(t){return this===t},x(Ct,"InteractiveExternalPortPositioner/lambda$3$Type",1537),S(1538,1,{},OEe),h.Kb=function(t){return RSt(this.a,Oe(t))},h.Fb=function(t){return this===t},x(Ct,"InteractiveExternalPortPositioner/lambda$4$Type",1538),S(1539,1,{},kEe),h.Kb=function(t){return LSt(this.a,Oe(t))},h.Fb=function(t){return this===t},x(Ct,"InteractiveExternalPortPositioner/lambda$5$Type",1539),S(77,22,{3:1,35:1,22:1,77:1,234:1},$i),h.Kf=function(){switch(this.g){case 15:return new u6e;case 22:return new f6e;case 47:return new d6e;case 28:case 35:return new J4e;case 32:return new Uke;case 42:return new Zke;case 1:return new Jke;case 41:return new e4e;case 56:return new wJ((sO(),uC));case 0:return new wJ((sO(),sV));case 2:return new t4e;case 54:return new n4e;case 33:return new o4e;case 51:return new b4e;case 55:return new k4e;case 13:return new S4e;case 38:return new C4e;case 44:return new T4e;case 40:return new M4e;case 9:return new aCe;case 49:return new ZNe;case 37:return new $4e;case 43:return new L4e;case 27:return new B4e;case 30:return new F4e;case 3:return new _4e;case 18:return new z4e;case 29:return new W4e;case 5:return new dCe;case 50:return new Q4e;case 34:return new gCe;case 36:return new e5e;case 52:return new fCe;case 11:return new n5e;case 7:return new bCe;case 39:return new i5e;case 45:return new r5e;case 16:return new s5e;case 10:return new o5e;case 48:return new l5e;case 21:return new u5e;case 23:return new oB((K0(),$6));case 8:return new h5e;case 12:return new d5e;case 4:return new g5e;case 19:return new yCe;case 17:return new x5e;case 53:return new C5e;case 6:return new L5e;case 25:return new nPe;case 46:return new P5e;case 31:return new RIe;case 14:return new W5e;case 26:return new b6e;case 20:return new G5e;case 24:return new oB((K0(),jN));default:throw F(new Ot(_z+(this.f!=null?this.f:""+this.g)))}};var F1e,_1e,H1e,q1e,Q1e,z1e,W1e,K1e,V1e,X1e,a6,A$,M$,U1e,G1e,Y1e,Z1e,J1e,ege,tge,d6,nge,ige,rge,sge,oge,oV,P$,j$,cge,D$,$$,N$,mk,vk,yk,lge,I$,R$,uge,L$,B$,fge,hge,age,dge,F$,cV,fC,_$,H$,q$,Q$,gge,pge,bge,wge,cUt=hn(Ct,vfe,77,gn,TGe,Pxt),Bot;S(1540,1,ki,z4e),h.pf=function(t,n){SVt(u(t,37),n)},x(Ct,"InvertedPortProcessor",1540),S(1541,1,ki,W4e),h.pf=function(t,n){SQt(u(t,37),n)},x(Ct,"LabelAndNodeSizeProcessor",1541),S(1542,1,$n,K4e),h.Mb=function(t){return u(t,10).k==(jt(),zi)},x(Ct,"LabelAndNodeSizeProcessor/lambda$0$Type",1542),S(1543,1,$n,V4e),h.Mb=function(t){return u(t,10).k==(jt(),Ri)},x(Ct,"LabelAndNodeSizeProcessor/lambda$1$Type",1543),S(1544,1,$t,dRe),h.td=function(t){g4t(this.b,this.a,this.c,u(t,10))},h.a=!1,h.c=!1,x(Ct,"LabelAndNodeSizeProcessor/lambda$2$Type",1544),S(1545,1,ki,dCe),h.pf=function(t,n){VKt(u(t,37),n)};var Fot;x(Ct,"LabelDummyInserter",1545),S(1546,1,bh,X4e),h.Lb=function(t){return ie(N(u(t,70),(xe(),Ah)))===ie((If(),Qk))},h.Fb=function(t){return this===t},h.Mb=function(t){return ie(N(u(t,70),(xe(),Ah)))===ie((If(),Qk))},x(Ct,"LabelDummyInserter/1",1546),S(1547,1,ki,Q4e),h.pf=function(t,n){UWt(u(t,37),n)},x(Ct,"LabelDummyRemover",1547),S(1548,1,$n,U4e),h.Mb=function(t){return je(Pe(N(u(t,70),(xe(),UV))))},x(Ct,"LabelDummyRemover/lambda$0$Type",1548),S(1359,1,ki,gCe),h.pf=function(t,n){xKt(this,u(t,37),n)},h.a=null;var lV;x(Ct,"LabelDummySwitcher",1359),S(286,1,{286:1},xYe),h.c=0,h.d=null,h.f=0,x(Ct,"LabelDummySwitcher/LabelDummyInfo",286),S(1360,1,{},G4e),h.Kb=function(t){return Rv(),new ht(null,new gt(u(t,29).a,16))},x(Ct,"LabelDummySwitcher/lambda$0$Type",1360),S(1361,1,$n,Y4e),h.Mb=function(t){return Rv(),u(t,10).k==(jt(),ll)},x(Ct,"LabelDummySwitcher/lambda$1$Type",1361),S(1362,1,{},CEe),h.Kb=function(t){return CSt(this.a,u(t,10))},x(Ct,"LabelDummySwitcher/lambda$2$Type",1362),S(1363,1,$t,TEe),h.td=function(t){x9t(this.a,u(t,286))},x(Ct,"LabelDummySwitcher/lambda$3$Type",1363),S(1364,1,Yn,Z4e),h.ue=function(t,n){return Z8t(u(t,286),u(n,286))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"LabelDummySwitcher/lambda$4$Type",1364),S(791,1,ki,J4e),h.pf=function(t,n){IEt(u(t,37),n)},x(Ct,"LabelManagementProcessor",791),S(1549,1,ki,e5e),h.pf=function(t,n){oqt(u(t,37),n)},x(Ct,"LabelSideSelector",1549),S(1550,1,$n,t5e),h.Mb=function(t){return je(Pe(N(u(t,70),(xe(),UV))))},x(Ct,"LabelSideSelector/lambda$0$Type",1550),S(1558,1,ki,n5e),h.pf=function(t,n){qzt(u(t,37),n)},x(Ct,"LayerConstraintPostprocessor",1558),S(1559,1,ki,bCe),h.pf=function(t,n){n_t(u(t,37),n)};var mge;x(Ct,"LayerConstraintPreprocessor",1559),S(360,22,{3:1,35:1,22:1,360:1},cA);var hC,z$,W$,uV,_ot=hn(Ct,"LayerConstraintPreprocessor/HiddenNodeConnections",360,gn,ATt,O6t),Hot;S(1560,1,ki,i5e),h.pf=function(t,n){KWt(u(t,37),n)},x(Ct,"LayerSizeAndGraphHeightCalculator",1560),S(1561,1,ki,r5e),h.pf=function(t,n){U_t(u(t,37),n)},x(Ct,"LongEdgeJoiner",1561),S(1562,1,ki,s5e),h.pf=function(t,n){EWt(u(t,37),n)},x(Ct,"LongEdgeSplitter",1562),S(1563,1,ki,o5e),h.pf=function(t,n){EKt(this,u(t,37),n)},h.d=0,h.e=0,h.i=0,h.j=0,h.k=0,h.n=0,x(Ct,"NodePromotion",1563),S(1564,1,{},c5e),h.Kb=function(t){return u(t,46),kt(),!0},h.Fb=function(t){return this===t},x(Ct,"NodePromotion/lambda$0$Type",1564),S(1565,1,{},SEe),h.Kb=function(t){return W9t(this.a,u(t,46))},h.Fb=function(t){return this===t},h.a=0,x(Ct,"NodePromotion/lambda$1$Type",1565),S(1566,1,{},xEe),h.Kb=function(t){return K9t(this.a,u(t,46))},h.Fb=function(t){return this===t},h.a=0,x(Ct,"NodePromotion/lambda$2$Type",1566),S(1567,1,ki,l5e),h.pf=function(t,n){YVt(u(t,37),n)},x(Ct,"NorthSouthPortPostprocessor",1567),S(1568,1,ki,u5e),h.pf=function(t,n){RVt(u(t,37),n)},x(Ct,"NorthSouthPortPreprocessor",1568),S(1569,1,Yn,f5e),h.ue=function(t,n){return hPt(u(t,11),u(n,11))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"NorthSouthPortPreprocessor/lambda$0$Type",1569),S(1570,1,ki,h5e),h.pf=function(t,n){JQt(u(t,37),n)},x(Ct,"PartitionMidprocessor",1570),S(1571,1,$n,a5e),h.Mb=function(t){return er(u(t,10),(xe(),$k))},x(Ct,"PartitionMidprocessor/lambda$0$Type",1571),S(1572,1,$t,EEe),h.td=function(t){g7t(this.a,u(t,10))},x(Ct,"PartitionMidprocessor/lambda$1$Type",1572),S(1573,1,ki,d5e),h.pf=function(t,n){pHt(u(t,37),n)},x(Ct,"PartitionPostprocessor",1573),S(1574,1,ki,g5e),h.pf=function(t,n){CFt(u(t,37),n)},x(Ct,"PartitionPreprocessor",1574),S(1575,1,$n,p5e),h.Mb=function(t){return er(u(t,10),(xe(),$k))},x(Ct,"PartitionPreprocessor/lambda$0$Type",1575),S(1576,1,{},b5e),h.Kb=function(t){return new ht(null,new P0(new _t(qt(qi(u(t,10)).a.Kc(),new L))))},x(Ct,"PartitionPreprocessor/lambda$1$Type",1576),S(1577,1,$n,w5e),h.Mb=function(t){return m$t(u(t,17))},x(Ct,"PartitionPreprocessor/lambda$2$Type",1577),S(1578,1,$t,m5e),h.td=function(t){OPt(u(t,17))},x(Ct,"PartitionPreprocessor/lambda$3$Type",1578),S(1579,1,ki,yCe),h.pf=function(t,n){LQt(u(t,37),n)};var vge,qot,Qot,zot,yge,Oge;x(Ct,"PortListSorter",1579),S(1580,1,{},v5e),h.Kb=function(t){return bO(),u(t,11).e},x(Ct,"PortListSorter/lambda$0$Type",1580),S(1581,1,{},y5e),h.Kb=function(t){return bO(),u(t,11).g},x(Ct,"PortListSorter/lambda$1$Type",1581),S(1582,1,Yn,O5e),h.ue=function(t,n){return B_e(u(t,11),u(n,11))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"PortListSorter/lambda$2$Type",1582),S(1583,1,Yn,k5e),h.ue=function(t,n){return qNt(u(t,11),u(n,11))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"PortListSorter/lambda$3$Type",1583),S(1584,1,Yn,S5e),h.ue=function(t,n){return VYe(u(t,11),u(n,11))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"PortListSorter/lambda$4$Type",1584),S(1585,1,ki,x5e),h.pf=function(t,n){GFt(u(t,37),n)},x(Ct,"PortSideProcessor",1585),S(1586,1,ki,C5e),h.pf=function(t,n){Yqt(u(t,37),n)},x(Ct,"ReversedEdgeRestorer",1586),S(1591,1,ki,nPe),h.pf=function(t,n){TNt(this,u(t,37),n)},x(Ct,"SelfLoopPortRestorer",1591),S(1592,1,{},T5e),h.Kb=function(t){return new ht(null,new gt(u(t,29).a,16))},x(Ct,"SelfLoopPortRestorer/lambda$0$Type",1592),S(1593,1,$n,E5e),h.Mb=function(t){return u(t,10).k==(jt(),zi)},x(Ct,"SelfLoopPortRestorer/lambda$1$Type",1593),S(1594,1,$n,A5e),h.Mb=function(t){return er(u(t,10),(ae(),Pk))},x(Ct,"SelfLoopPortRestorer/lambda$2$Type",1594),S(1595,1,{},M5e),h.Kb=function(t){return u(N(u(t,10),(ae(),Pk)),403)},x(Ct,"SelfLoopPortRestorer/lambda$3$Type",1595),S(1596,1,$t,AEe),h.td=function(t){ILt(this.a,u(t,403))},x(Ct,"SelfLoopPortRestorer/lambda$4$Type",1596),S(794,1,$t,xZ),h.td=function(t){GLt(u(t,101))},x(Ct,"SelfLoopPortRestorer/lambda$5$Type",794),S(1597,1,ki,P5e),h.pf=function(t,n){I$t(u(t,37),n)},x(Ct,"SelfLoopPostProcessor",1597),S(1598,1,{},j5e),h.Kb=function(t){return new ht(null,new gt(u(t,29).a,16))},x(Ct,"SelfLoopPostProcessor/lambda$0$Type",1598),S(1599,1,$n,D5e),h.Mb=function(t){return u(t,10).k==(jt(),zi)},x(Ct,"SelfLoopPostProcessor/lambda$1$Type",1599),S(1600,1,$n,$5e),h.Mb=function(t){return er(u(t,10),(ae(),Pk))},x(Ct,"SelfLoopPostProcessor/lambda$2$Type",1600),S(1601,1,$t,N5e),h.td=function(t){qIt(u(t,10))},x(Ct,"SelfLoopPostProcessor/lambda$3$Type",1601),S(1602,1,{},I5e),h.Kb=function(t){return new ht(null,new gt(u(t,101).f,1))},x(Ct,"SelfLoopPostProcessor/lambda$4$Type",1602),S(1603,1,$t,MEe),h.td=function(t){jTt(this.a,u(t,409))},x(Ct,"SelfLoopPostProcessor/lambda$5$Type",1603),S(1604,1,$n,R5e),h.Mb=function(t){return!!u(t,101).i},x(Ct,"SelfLoopPostProcessor/lambda$6$Type",1604),S(1605,1,$t,PEe),h.td=function(t){pkt(this.a,u(t,101))},x(Ct,"SelfLoopPostProcessor/lambda$7$Type",1605),S(1587,1,ki,L5e),h.pf=function(t,n){A_t(u(t,37),n)},x(Ct,"SelfLoopPreProcessor",1587),S(1588,1,{},B5e),h.Kb=function(t){return new ht(null,new gt(u(t,101).f,1))},x(Ct,"SelfLoopPreProcessor/lambda$0$Type",1588),S(1589,1,{},F5e),h.Kb=function(t){return u(t,409).a},x(Ct,"SelfLoopPreProcessor/lambda$1$Type",1589),S(1590,1,$t,_5e),h.td=function(t){y5t(u(t,17))},x(Ct,"SelfLoopPreProcessor/lambda$2$Type",1590),S(1606,1,ki,RIe),h.pf=function(t,n){CLt(this,u(t,37),n)},x(Ct,"SelfLoopRouter",1606),S(1607,1,{},H5e),h.Kb=function(t){return new ht(null,new gt(u(t,29).a,16))},x(Ct,"SelfLoopRouter/lambda$0$Type",1607),S(1608,1,$n,q5e),h.Mb=function(t){return u(t,10).k==(jt(),zi)},x(Ct,"SelfLoopRouter/lambda$1$Type",1608),S(1609,1,$n,Q5e),h.Mb=function(t){return er(u(t,10),(ae(),Pk))},x(Ct,"SelfLoopRouter/lambda$2$Type",1609),S(1610,1,{},z5e),h.Kb=function(t){return u(N(u(t,10),(ae(),Pk)),403)},x(Ct,"SelfLoopRouter/lambda$3$Type",1610),S(1611,1,$t,DDe),h.td=function(t){s7t(this.a,this.b,u(t,403))},x(Ct,"SelfLoopRouter/lambda$4$Type",1611),S(1612,1,ki,W5e),h.pf=function(t,n){XHt(u(t,37),n)},x(Ct,"SemiInteractiveCrossMinProcessor",1612),S(1613,1,$n,K5e),h.Mb=function(t){return u(t,10).k==(jt(),zi)},x(Ct,"SemiInteractiveCrossMinProcessor/lambda$0$Type",1613),S(1614,1,$n,V5e),h.Mb=function(t){return ZRe(u(t,10))._b((xe(),pw))},x(Ct,"SemiInteractiveCrossMinProcessor/lambda$1$Type",1614),S(1615,1,Yn,X5e),h.ue=function(t,n){return SMt(u(t,10),u(n,10))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Ct,"SemiInteractiveCrossMinProcessor/lambda$2$Type",1615),S(1616,1,{},U5e),h.Ce=function(t,n){return k7t(u(t,10),u(n,10))},x(Ct,"SemiInteractiveCrossMinProcessor/lambda$3$Type",1616),S(1618,1,ki,G5e),h.pf=function(t,n){Qzt(u(t,37),n)},x(Ct,"SortByInputModelProcessor",1618),S(1619,1,$n,Y5e),h.Mb=function(t){return u(t,11).g.c.length!=0},x(Ct,"SortByInputModelProcessor/lambda$0$Type",1619),S(1620,1,$t,jEe),h.td=function(t){tBt(this.a,u(t,11))},x(Ct,"SortByInputModelProcessor/lambda$1$Type",1620),S(1693,803,{},VQe),h.Me=function(t){var n,i,s,c;switch(this.c=t,this.a.g){case 2:n=new pe,Ti(ni(new ht(null,new gt(this.c.a.b,16)),new hSe),new LDe(this,n)),e7(this,new eSe),rc(n,new tSe),n.c=J(It,Ee,1,0,5,1),Ti(ni(new ht(null,new gt(this.c.a.b,16)),new nSe),new $Ee(n)),e7(this,new iSe),rc(n,new rSe),n.c=J(It,Ee,1,0,5,1),i=bNe(oze(wM(new ht(null,new gt(this.c.a.b,16)),new NEe(this))),new sSe),Ti(new ht(null,new gt(this.c.a.a,16)),new NDe(i,n)),e7(this,new cSe),rc(n,new Z5e),n.c=J(It,Ee,1,0,5,1);break;case 3:s=new pe,e7(this,new J5e),c=bNe(oze(wM(new ht(null,new gt(this.c.a.b,16)),new DEe(this))),new oSe),Ti(ni(new ht(null,new gt(this.c.a.b,16)),new lSe),new RDe(c,s)),e7(this,new uSe),rc(s,new fSe),s.c=J(It,Ee,1,0,5,1);break;default:throw F(new HMe)}},h.b=0,x(Bi,"EdgeAwareScanlineConstraintCalculation",1693),S(1694,1,bh,J5e),h.Lb=function(t){return W(u(t,57).g,145)},h.Fb=function(t){return this===t},h.Mb=function(t){return W(u(t,57).g,145)},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1694),S(1695,1,{},DEe),h.Fe=function(t){return NBt(this.a,u(t,57))},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1695),S(1703,1,Yj,$De),h.Vd=function(){uS(this.a,this.b,-1)},h.b=0,x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1703),S(1705,1,bh,eSe),h.Lb=function(t){return W(u(t,57).g,145)},h.Fb=function(t){return this===t},h.Mb=function(t){return W(u(t,57).g,145)},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1705),S(1706,1,$t,tSe),h.td=function(t){u(t,365).Vd()},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1706),S(1707,1,$n,nSe),h.Mb=function(t){return W(u(t,57).g,10)},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1707),S(1709,1,$t,$Ee),h.td=function(t){cDt(this.a,u(t,57))},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1709),S(1708,1,Yj,HDe),h.Vd=function(){uS(this.b,this.a,-1)},h.a=0,x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1708),S(1710,1,bh,iSe),h.Lb=function(t){return W(u(t,57).g,10)},h.Fb=function(t){return this===t},h.Mb=function(t){return W(u(t,57).g,10)},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1710),S(1711,1,$t,rSe),h.td=function(t){u(t,365).Vd()},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1711),S(1712,1,{},NEe),h.Fe=function(t){return IBt(this.a,u(t,57))},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1712),S(1713,1,{},sSe),h.De=function(){return 0},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1713),S(1696,1,{},oSe),h.De=function(){return 0},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1696),S(1715,1,$t,NDe),h.td=function(t){q8t(this.a,this.b,u(t,307))},h.a=0,x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1715),S(1714,1,Yj,IDe),h.Vd=function(){iGe(this.a,this.b,-1)},h.b=0,x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1714),S(1716,1,bh,cSe),h.Lb=function(t){return u(t,57),!0},h.Fb=function(t){return this===t},h.Mb=function(t){return u(t,57),!0},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1716),S(1717,1,$t,Z5e),h.td=function(t){u(t,365).Vd()},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1717),S(1697,1,$n,lSe),h.Mb=function(t){return W(u(t,57).g,10)},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1697),S(1699,1,$t,RDe),h.td=function(t){Q8t(this.a,this.b,u(t,57))},h.a=0,x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1699),S(1698,1,Yj,qDe),h.Vd=function(){uS(this.b,this.a,-1)},h.a=0,x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1698),S(1700,1,bh,uSe),h.Lb=function(t){return u(t,57),!0},h.Fb=function(t){return this===t},h.Mb=function(t){return u(t,57),!0},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1700),S(1701,1,$t,fSe),h.td=function(t){u(t,365).Vd()},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1701),S(1702,1,$n,hSe),h.Mb=function(t){return W(u(t,57).g,145)},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1702),S(1704,1,$t,LDe),h.td=function(t){_At(this.a,this.b,u(t,57))},x(Bi,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1704),S(1521,1,ki,ZNe),h.pf=function(t,n){NWt(this,u(t,37),n)};var Wot;x(Bi,"HorizontalGraphCompactor",1521),S(1522,1,{},IEe),h.Oe=function(t,n){var i,s,c;return Lre(t,n)||(i=gm(t),s=gm(n),i&&i.k==(jt(),Ri)||s&&s.k==(jt(),Ri))?0:(c=u(N(this.a.a,(ae(),h2)),304),X5t(c,i?i.k:(jt(),sr),s?s.k:(jt(),sr)))},h.Pe=function(t,n){var i,s,c;return Lre(t,n)?1:(i=gm(t),s=gm(n),c=u(N(this.a.a,(ae(),h2)),304),Dte(c,i?i.k:(jt(),sr),s?s.k:(jt(),sr)))},x(Bi,"HorizontalGraphCompactor/1",1522),S(1523,1,{},aSe),h.Ne=function(t,n){return Q4(),t.a.i==0},x(Bi,"HorizontalGraphCompactor/lambda$0$Type",1523),S(1524,1,{},REe),h.Ne=function(t,n){return m7t(this.a,t,n)},x(Bi,"HorizontalGraphCompactor/lambda$1$Type",1524),S(1664,1,{},Dqe);var Kot,Vot;x(Bi,"LGraphToCGraphTransformer",1664),S(1672,1,$n,dSe),h.Mb=function(t){return t!=null},x(Bi,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1672),S(1665,1,{},gSe),h.Kb=function(t){return Nu(),Ns(N(u(u(t,57).g,10),(ae(),zn)))},x(Bi,"LGraphToCGraphTransformer/lambda$0$Type",1665),S(1666,1,{},pSe),h.Kb=function(t){return Nu(),IWe(u(u(t,57).g,145))},x(Bi,"LGraphToCGraphTransformer/lambda$1$Type",1666),S(1675,1,$n,bSe),h.Mb=function(t){return Nu(),W(u(t,57).g,10)},x(Bi,"LGraphToCGraphTransformer/lambda$10$Type",1675),S(1676,1,$t,wSe),h.td=function(t){w7t(u(t,57))},x(Bi,"LGraphToCGraphTransformer/lambda$11$Type",1676),S(1677,1,$n,mSe),h.Mb=function(t){return Nu(),W(u(t,57).g,145)},x(Bi,"LGraphToCGraphTransformer/lambda$12$Type",1677),S(1681,1,$t,vSe),h.td=function(t){kjt(u(t,57))},x(Bi,"LGraphToCGraphTransformer/lambda$13$Type",1681),S(1678,1,$t,LEe),h.td=function(t){K4t(this.a,u(t,8))},h.a=0,x(Bi,"LGraphToCGraphTransformer/lambda$14$Type",1678),S(1679,1,$t,BEe),h.td=function(t){X4t(this.a,u(t,110))},h.a=0,x(Bi,"LGraphToCGraphTransformer/lambda$15$Type",1679),S(1680,1,$t,FEe),h.td=function(t){V4t(this.a,u(t,8))},h.a=0,x(Bi,"LGraphToCGraphTransformer/lambda$16$Type",1680),S(1682,1,{},ySe),h.Kb=function(t){return Nu(),new ht(null,new P0(new _t(qt(qi(u(t,10)).a.Kc(),new L))))},x(Bi,"LGraphToCGraphTransformer/lambda$17$Type",1682),S(1683,1,$n,OSe),h.Mb=function(t){return Nu(),_r(u(t,17))},x(Bi,"LGraphToCGraphTransformer/lambda$18$Type",1683),S(1684,1,$t,_Ee),h.td=function(t){AAt(this.a,u(t,17))},x(Bi,"LGraphToCGraphTransformer/lambda$19$Type",1684),S(1668,1,$t,HEe),h.td=function(t){lTt(this.a,u(t,145))},x(Bi,"LGraphToCGraphTransformer/lambda$2$Type",1668),S(1685,1,{},kSe),h.Kb=function(t){return Nu(),new ht(null,new gt(u(t,29).a,16))},x(Bi,"LGraphToCGraphTransformer/lambda$20$Type",1685),S(1686,1,{},SSe),h.Kb=function(t){return Nu(),new ht(null,new P0(new _t(qt(qi(u(t,10)).a.Kc(),new L))))},x(Bi,"LGraphToCGraphTransformer/lambda$21$Type",1686),S(1687,1,{},xSe),h.Kb=function(t){return Nu(),u(N(u(t,17),(ae(),Wg)),15)},x(Bi,"LGraphToCGraphTransformer/lambda$22$Type",1687),S(1688,1,$n,CSe),h.Mb=function(t){return G5t(u(t,15))},x(Bi,"LGraphToCGraphTransformer/lambda$23$Type",1688),S(1689,1,$t,qEe),h.td=function(t){CBt(this.a,u(t,15))},x(Bi,"LGraphToCGraphTransformer/lambda$24$Type",1689),S(1667,1,$t,BDe),h.td=function(t){UTt(this.a,this.b,u(t,145))},x(Bi,"LGraphToCGraphTransformer/lambda$3$Type",1667),S(1669,1,{},TSe),h.Kb=function(t){return Nu(),new ht(null,new gt(u(t,29).a,16))},x(Bi,"LGraphToCGraphTransformer/lambda$4$Type",1669),S(1670,1,{},ESe),h.Kb=function(t){return Nu(),new ht(null,new P0(new _t(qt(qi(u(t,10)).a.Kc(),new L))))},x(Bi,"LGraphToCGraphTransformer/lambda$5$Type",1670),S(1671,1,{},ASe),h.Kb=function(t){return Nu(),u(N(u(t,17),(ae(),Wg)),15)},x(Bi,"LGraphToCGraphTransformer/lambda$6$Type",1671),S(1673,1,$t,QEe),h.td=function(t){iFt(this.a,u(t,15))},x(Bi,"LGraphToCGraphTransformer/lambda$8$Type",1673),S(1674,1,$t,FDe),h.td=function(t){b5t(this.a,this.b,u(t,145))},x(Bi,"LGraphToCGraphTransformer/lambda$9$Type",1674),S(1663,1,{},MSe),h.Le=function(t){var n,i,s,c,a;for(this.a=t,this.d=new UL,this.c=J(t1e,Ee,121,this.a.a.a.c.length,0,1),this.b=0,i=new R(this.a.a.a);i.a=B&&(ge(a,me(k)),U=p.Math.max(U,te[k-1]-E),w+=D,q+=te[k-1]-q,E=te[k-1],D=m[k]),D=p.Math.max(D,m[k]),++k;w+=D}P=p.Math.min(1/U,1/n.b/w),P>s&&(s=P,i=a)}return i},h.Wf=function(){return!1},x(yh,"MSDCutIndexHeuristic",802),S(1617,1,ki,b6e),h.pf=function(t,n){Izt(u(t,37),n)},x(yh,"SingleEdgeGraphWrapper",1617),S(227,22,{3:1,35:1,22:1,227:1},G4);var r2,Sk,xk,sw,g6,s2,Ck=hn(go,"CenterEdgeLabelPlacementStrategy",227,gn,KEt,x6t),sct;S(422,22,{3:1,35:1,22:1,422:1},Dee);var Sge,yV,xge=hn(go,"ConstraintCalculationStrategy",422,gn,R7t,C6t),oct;S(314,22,{3:1,35:1,22:1,314:1,246:1,234:1},TB),h.Kf=function(){return gUe(this)},h.Xf=function(){return gUe(this)};var aC,dy,Cge,Tge=hn(go,"CrossingMinimizationStrategy",314,gn,ACt,T6t),cct;S(337,22,{3:1,35:1,22:1,337:1},EB);var Ege,OV,Y$,Age=hn(go,"CuttingStrategy",337,gn,MCt,M6t),lct;S(335,22,{3:1,35:1,22:1,335:1,246:1,234:1},w8),h.Kf=function(){return eGe(this)},h.Xf=function(){return eGe(this)};var Mge,kV,p6,SV,b6,Pge=hn(go,"CycleBreakingStrategy",335,gn,mEt,P6t),uct;S(419,22,{3:1,35:1,22:1,419:1},$ee);var Z$,jge,Dge=hn(go,"DirectionCongruency",419,gn,I7t,j6t),fct;S(450,22,{3:1,35:1,22:1,450:1},AB);var Tk,xV,o2,hct=hn(go,"EdgeConstraint",450,gn,PCt,D6t),act;S(276,22,{3:1,35:1,22:1,276:1},Y4);var CV,TV,EV,AV,J$,MV,$ge=hn(go,"EdgeLabelSideSelection",276,gn,GEt,$6t),dct;S(479,22,{3:1,35:1,22:1,479:1},Nee);var eN,Nge,Ige=hn(go,"EdgeStraighteningStrategy",479,gn,N7t,N6t),gct;S(274,22,{3:1,35:1,22:1,274:1},Z4);var PV,Rge,Lge,tN,Bge,Fge,_ge=hn(go,"FixedAlignment",274,gn,XEt,I6t),pct;S(275,22,{3:1,35:1,22:1,275:1},J4);var Hge,qge,Qge,zge,w6,Wge,Kge=hn(go,"GraphCompactionStrategy",275,gn,VEt,R6t),bct;S(256,22,{3:1,35:1,22:1,256:1},rb);var Ek,nN,Ak,Ul,m6,iN,Mk,c2,rN,v6,jV=hn(go,"GraphProperties",256,gn,IMt,L6t),wct;S(292,22,{3:1,35:1,22:1,292:1},MB);var dC,DV,$V,NV=hn(go,"GreedySwitchType",292,gn,$Ct,B6t),mct;S(303,22,{3:1,35:1,22:1,303:1},PB);var gy,gC,l2,vct=hn(go,"InLayerConstraint",303,gn,DCt,F6t),yct;S(420,22,{3:1,35:1,22:1,420:1},Iee);var IV,Vge,Xge=hn(go,"InteractiveReferencePoint",420,gn,L7t,_6t),Oct,Uge,py,Sp,sN,Gge,Yge,oN,Zge,pC,cN,y6,by,ow,RV,lN,eo,Jge,xp,Po,LV,BV,bC,zg,Cp,wy,e0e,my,wC,cw,mf,pu,FV,u2,bo,zn,t0e,n0e,i0e,r0e,s0e,_V,uN,$c,Tp,HV,vy,mC,Vf,f2,Pk,h2,a2,jk,Wg,o0e,qV,QV,yy;S(163,22,{3:1,35:1,22:1,163:1},v8);var O6,x1,k6,lw,vC,c0e=hn(go,"LayerConstraint",163,gn,OEt,H6t),kct;S(848,1,lu,xCe),h.Qe=function(t){Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,yfe),""),"Direction Congruency"),"Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."),w0e),(hd(),xi)),Dge),Ge((af(),Et))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ofe),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(kt(),!1)),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,aD),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),S0e),xi),Xge),Ge(Et)))),pr(t,aD,Qz,dlt),pr(t,aD,HS,alt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,kfe),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Sfe),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),jr),Ui),Ge(Et)))),Xe(t,new Fe(Vkt(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,xfe),""),"Allow Non-Flow Ports To Switch Sides"),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),!1),jr),Ui),Ge(Yg)),H(_(Te,1),fe,2,6,["org.eclipse.elk.layered.northOrSouthPort"])))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Cfe),""),"Port Sorting Strategy"),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),j0e),xi),Fpe),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Tfe),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),me(7)),lo),Fr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Efe),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Afe),""),"Generate Position and Layer IDs"),"If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Qz),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),b0e),xi),Pge),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,B7),dW),"Node Layering Strategy"),"Strategy for node layering."),T0e),xi),Epe),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Mfe),dW),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),x0e),xi),c0e),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Pfe),dW),"Layer Choice Constraint"),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),me(-1)),lo),Fr),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,jfe),dW),"Layer ID"),"Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),me(-1)),lo),Fr),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,zz),att),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),me(4)),lo),Fr),Ge(Et)))),pr(t,zz,B7,ylt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Wz),att),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),me(2)),lo),Fr),Ge(Et)))),pr(t,Wz,B7,klt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Kz),dtt),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),C0e),xi),Rpe),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Vz),dtt),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),me(0)),lo),Fr),Ge(Et)))),pr(t,Vz,Kz,null),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Xz),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),me(_n)),lo),Fr),Ge(Et)))),pr(t,Xz,B7,plt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,HS),F7),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),p0e),xi),Tge),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Dfe),F7),"Force Node Model Order"),"The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Uz),F7),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),As),wr),Ge(Et)))),pr(t,Uz,CD,Hct),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Gz),F7),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),jr),Ui),Ge(Et)))),pr(t,Gz,HS,Wct),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,$fe),F7),"Position Choice Constraint"),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),me(-1)),lo),Fr),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Nfe),F7),"Position ID"),"Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),me(-1)),lo),Fr),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ife),gtt),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),me(40)),lo),Fr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Yz),gtt),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),g0e),xi),NV),Ge(Et)))),pr(t,Yz,HS,Fct),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,dD),"crossingMinimization.greedySwitchHierarchical"),"Greedy Switch Crossing Minimization (hierarchical)"),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),d0e),xi),NV),Ge(Et)))),pr(t,dD,HS,Rct),pr(t,dD,CD,Lct),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Km),ptt),"Node Placement Strategy"),"Strategy for node placement."),P0e),xi),jpe),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,gD),ptt),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),jr),Ui),Ge(Et)))),pr(t,gD,Km,$lt),pr(t,gD,Km,Nlt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Zz),btt),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),E0e),xi),Ige),Ge(Et)))),pr(t,Zz,Km,Mlt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Jz),btt),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),A0e),xi),_ge),Ge(Et)))),pr(t,Jz,Km,jlt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,eW),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),As),wr),Ge(Et)))),pr(t,eW,Km,Rlt),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,tW),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),xi),aX),Ge(or)))),pr(t,tW,Km,_lt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,nW),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),M0e),xi),aX),Ge(Et)))),pr(t,nW,Km,Flt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Rfe),wtt),"Self-Loop Distribution"),"Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."),y0e),xi),qpe),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Lfe),wtt),"Self-Loop Ordering"),"Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."),O0e),xi),Qpe),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,pD),"edgeRouting.splines"),"Spline Routing Mode"),"Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."),k0e),xi),Wpe),Ge(Et)))),pr(t,pD,_7,nlt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,bD),"edgeRouting.splines.sloppy"),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.2),As),wr),Ge(Et)))),pr(t,bD,_7,rlt),pr(t,bD,pD,slt),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,iW),"edgeRouting.polyline"),"Sloped Edge Zone Width"),"Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."),2),As),wr),Ge(Et)))),pr(t,iW,_7,Zct),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,Bfe),Qf),"Spacing Base Value"),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ffe),Qf),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,_fe),Qf),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Hfe),Qf),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,qfe),Yfe),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),me(0)),lo),Fr),Ge(Mh)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Qfe),Yfe),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),me(0)),lo),Fr),Ge(Mh)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,zfe),Yfe),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),me(0)),lo),Fr),Ge(Mh)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,rW),Zfe),$et),"Tries to further compact components (disconnected sub-graphs)."),!1),jr),Ui),Ge(Et)))),pr(t,rW,RS,!0),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Wfe),mtt),"Post Compaction Strategy"),vtt),u0e),xi),Kge),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Kfe),mtt),"Post Compaction Constraint Calculation"),vtt),l0e),xi),xge),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,wD),Jfe),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,sW),Jfe),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),me(16)),lo),Fr),Ge(Et)))),pr(t,sW,wD,!0),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,oW),Jfe),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),me(5)),lo),Fr),Ge(Et)))),pr(t,oW,wD,!0),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Da),ehe),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),N0e),xi),Upe),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,mD),ehe),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),As),wr),Ge(Et)))),pr(t,mD,Da,Jlt),pr(t,mD,Da,eut),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,vD),ehe),"Correction Factor for Wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),As),wr),Ge(Et)))),pr(t,vD,Da,nut),pr(t,vD,Da,iut),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,qS),ytt),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),$0e),xi),Age),Ge(Et)))),pr(t,qS,Da,uut),pr(t,qS,Da,fut),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,cW),ytt),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),Uf),Xl),Ge(Et)))),pr(t,cW,qS,sut),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,lW),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),D0e),lo),Fr),Ge(Et)))),pr(t,lW,qS,cut),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,yD),Ott),"Validification Strategy"),"When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."),I0e),xi),Xpe),Ge(Et)))),pr(t,yD,Da,kut),pr(t,yD,Da,Sut),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,OD),Ott),"Valid Indices for Wrapping"),null),Uf),Xl),Ge(Et)))),pr(t,OD,Da,vut),pr(t,OD,Da,yut),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,kD),the),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),jr),Ui),Ge(Et)))),pr(t,kD,Da,gut),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,SD),the),"Distance Penalty When Improving Cuts"),null),2),As),wr),Ge(Et)))),pr(t,SD,Da,aut),pr(t,SD,kD,!0),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,uW),the),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),jr),Ui),Ge(Et)))),pr(t,uW,Da,but),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Vfe),gW),"Edge Label Side Selection"),"Method to decide on edge label sides."),v0e),xi),$ge),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Xfe),gW),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),m0e),xi),Ck),ii(Et,H(_(Sd,1),de,175,0,[kd]))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,xD),H7),"Consider Model Order"),"Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."),a0e),xi),Bpe),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ufe),H7),"No Model Order"),"Set on a node to not set a model order for this node even though it is a real node."),!1),jr),Ui),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,fW),H7),"Consider Model Order for Components"),"If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."),f0e),xi),P1e),Ge(Et)))),pr(t,fW,RS,null),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Gfe),H7),"Long Edge Ordering Strategy"),"Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."),h0e),xi),Mpe),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,hW),H7),"Crossing Counter Node Order Influence"),"Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."),0),As),wr),Ge(Et)))),pr(t,hW,xD,null),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,aW),H7),"Crossing Counter Port Order Influence"),"Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."),0),As),wr),Ge(Et)))),pr(t,aW,xD,null),RJe((new ECe,t))};var Sct,xct,Cct,l0e,Tct,u0e,Ect,f0e,Act,Mct,Pct,h0e,jct,Dct,a0e,$ct,Nct,Ict,d0e,Rct,Lct,Bct,g0e,Fct,_ct,Hct,qct,Qct,zct,Wct,Kct,p0e,Vct,b0e,Xct,w0e,Uct,m0e,Gct,v0e,Yct,Zct,Jct,y0e,elt,O0e,tlt,k0e,nlt,ilt,rlt,slt,olt,clt,llt,ult,flt,hlt,S0e,alt,dlt,glt,plt,blt,wlt,x0e,mlt,vlt,ylt,Olt,klt,Slt,xlt,C0e,Clt,T0e,Tlt,Elt,Alt,E0e,Mlt,Plt,A0e,jlt,Dlt,$lt,Nlt,Ilt,Rlt,Llt,Blt,M0e,Flt,_lt,Hlt,P0e,qlt,j0e,Qlt,zlt,Wlt,Klt,Vlt,Xlt,Ult,Glt,Ylt,Zlt,Jlt,eut,tut,nut,iut,rut,sut,out,D0e,cut,lut,$0e,uut,fut,hut,aut,dut,gut,put,but,wut,N0e,mut,vut,yut,Out,I0e,kut,Sut;x(go,"LayeredMetaDataProvider",848),S(986,1,lu,ECe),h.Qe=function(t){RJe(t)};var Eh,zV,fN,S6,hN,R0e,aN,Oy,dN,L0e,B0e,WV,C1,KV,uw,F0e,yC,VV,_0e,xut,gN,XV,x6,fw,Cut,El,H0e,q0e,pN,UV,Ah,bN,$a,Q0e,z0e,W0e,GV,YV,K0e,md,ZV,V0e,hw,X0e,U0e,G0e,wN,aw,Kg,Y0e,Z0e,Os,J0e,Tut,Xo,mN,epe,tpe,npe,JV,ipe,vN,rpe,spe,yN,Ep,ope,eX,C6,cpe,Ap,T6,ON,Vg,tX,Dk,kN,Xg,lpe,upe,fpe,$k,hpe,Eut,Aut,Mut,Put,Mp,dw,Si,vd,jut,gw,ape,Nk,dpe,pw,Dut,Ik,gpe,ky,$ut,Nut,OC,nX,ppe,kC,Wu,d2,Sy,Pp,Ug,SN,bw,iX,Rk,Lk,jp,g2,rX,SC,E6,A6,sX,bpe,wpe,mpe,vpe,oX,ype,Ope,kpe,Spe,cX,xN;x(go,"LayeredOptions",986),S(987,1,{},m6e),h.$e=function(){var t;return t=new KMe,t},h._e=function(t){},x(go,"LayeredOptions/LayeredFactory",987),S(1372,1,{}),h.a=0;var Iut;x(po,"ElkSpacings/AbstractSpacingsBuilder",1372),S(779,1372,{},aoe);var CN,Rut;x(go,"LayeredSpacings/LayeredSpacingsBuilder",779),S(313,22,{3:1,35:1,22:1,313:1,246:1,234:1},e5),h.Kf=function(){return pGe(this)},h.Xf=function(){return pGe(this)};var lX,xpe,Cpe,TN,uX,Tpe,Epe=hn(go,"LayeringStrategy",313,gn,UEt,q6t),Lut;S(378,22,{3:1,35:1,22:1,378:1},jB);var fX,Ape,EN,Mpe=hn(go,"LongEdgeOrderingStrategy",378,gn,ECt,Q6t),But;S(197,22,{3:1,35:1,22:1,197:1},uA);var p2,b2,AN,hX,aX=hn(go,"NodeFlexibility",197,gn,NTt,z6t),Fut;S(315,22,{3:1,35:1,22:1,315:1,246:1,234:1},m8),h.Kf=function(){return JUe(this)},h.Xf=function(){return JUe(this)};var M6,dX,gX,P6,Ppe,jpe=hn(go,"NodePlacementStrategy",315,gn,wEt,G6t),_ut;S(260,22,{3:1,35:1,22:1,260:1},hv);var Dpe,xC,$pe,Npe,CC,Ipe,MN,PN,Rpe=hn(go,"NodePromotionStrategy",260,gn,XAt,K6t),Hut;S(339,22,{3:1,35:1,22:1,339:1},DB);var Lpe,T1,pX,Bpe=hn(go,"OrderingStrategy",339,gn,ICt,V6t),qut;S(421,22,{3:1,35:1,22:1,421:1},Ree);var bX,wX,Fpe=hn(go,"PortSortingStrategy",421,gn,B7t,X6t),Qut;S(452,22,{3:1,35:1,22:1,452:1},$B);var Nc,_o,j6,zut=hn(go,"PortType",452,gn,NCt,W6t),Wut;S(375,22,{3:1,35:1,22:1,375:1},NB);var _pe,mX,Hpe,qpe=hn(go,"SelfLoopDistributionStrategy",375,gn,RCt,U6t),Kut;S(376,22,{3:1,35:1,22:1,376:1},Lee);var TC,vX,Qpe=hn(go,"SelfLoopOrderingStrategy",376,gn,$7t,Y6t),Vut;S(304,1,{304:1},BZe),x(go,"Spacings",304),S(336,22,{3:1,35:1,22:1,336:1},IB);var yX,zpe,D6,Wpe=hn(go,"SplineRoutingMode",336,gn,BCt,Z6t),Xut;S(338,22,{3:1,35:1,22:1,338:1},RB);var OX,Kpe,Vpe,Xpe=hn(go,"ValidifyStrategy",338,gn,FCt,J6t),Uut;S(377,22,{3:1,35:1,22:1,377:1},LB);var ww,kX,Bk,Upe=hn(go,"WrappingStrategy",377,gn,LCt,ext),Gut;S(1383,1,Eo,ACe),h.Yf=function(t){return u(t,37),Yut},h.pf=function(t,n){MWt(this,u(t,37),n)};var Yut;x(AD,"DepthFirstCycleBreaker",1383),S(782,1,Eo,Gne),h.Yf=function(t){return u(t,37),Zut},h.pf=function(t,n){EXt(this,u(t,37),n)},h.Zf=function(t){return u(Me(t,sj(this.d,t.c.length)),10)};var Zut;x(AD,"GreedyCycleBreaker",782),S(1386,782,Eo,C$e),h.Zf=function(t){var n,i,s,c;for(c=null,n=_n,s=new R(t);s.a1&&(je(Pe(N(Rr((pt(0,t.c.length),u(t.c[0],10))),(xe(),uw))))?uGe(t,this.d,u(this,660)):(rt(),ir(t,this.d)),Mze(this.e,t))},h.Sf=function(t,n,i,s){var c,a,g,w,m,y,k;for(n!=eLe(i,t.length)&&(a=t[n-(i?1:-1)],Ore(this.f,a,i?(es(),_o):(es(),Nc))),c=t[n][0],k=!s||c.k==(jt(),Ri),y=$f(t[n]),this.ag(y,k,!1,i),g=0,m=new R(y);m.a"),t0?w_(this.a,t[n-1],t[n]):!i&&n1&&(je(Pe(N(Rr((pt(0,t.c.length),u(t.c[0],10))),(xe(),uw))))?uGe(t,this.d,this):(rt(),ir(t,this.d)),je(Pe(N(Rr((pt(0,t.c.length),u(t.c[0],10))),uw)))||Mze(this.e,t))},x(Sc,"ModelOrderBarycenterHeuristic",660),S(1803,1,Yn,uAe),h.ue=function(t,n){return QLt(this.a,u(t,10),u(n,10))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Sc,"ModelOrderBarycenterHeuristic/lambda$0$Type",1803),S(1403,1,Eo,RCe),h.Yf=function(t){var n;return u(t,37),n=kA(hft),Fn(n,(qr(),Vo),(Gr(),F$)),n},h.pf=function(t,n){A7t((u(t,37),n))};var hft;x(Sc,"NoCrossingMinimizer",1403),S(796,402,Lhe,oee),h.$f=function(t,n,i){var s,c,a,g,w,m,y,k,E,M,P;switch(E=this.g,i.g){case 1:{for(c=0,a=0,k=new R(t.j);k.a1&&(c.j==(ye(),At)?this.b[t]=!0:c.j==xt&&t>0&&(this.b[t-1]=!0))},h.f=0,x(Jh,"AllCrossingsCounter",1798),S(587,1,{},OP),h.b=0,h.d=0,x(Jh,"BinaryIndexedTree",587),S(524,1,{},L8);var Zpe,DN;x(Jh,"CrossingsCounter",524),S(1906,1,Yn,fAe),h.ue=function(t,n){return j8t(this.a,u(t,11),u(n,11))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Jh,"CrossingsCounter/lambda$0$Type",1906),S(1907,1,Yn,hAe),h.ue=function(t,n){return D8t(this.a,u(t,11),u(n,11))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Jh,"CrossingsCounter/lambda$1$Type",1907),S(1908,1,Yn,aAe),h.ue=function(t,n){return $8t(this.a,u(t,11),u(n,11))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Jh,"CrossingsCounter/lambda$2$Type",1908),S(1909,1,Yn,dAe),h.ue=function(t,n){return N8t(this.a,u(t,11),u(n,11))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(Jh,"CrossingsCounter/lambda$3$Type",1909),S(1910,1,$t,gAe),h.td=function(t){pAt(this.a,u(t,11))},x(Jh,"CrossingsCounter/lambda$4$Type",1910),S(1911,1,$n,pAe),h.Mb=function(t){return M4t(this.a,u(t,11))},x(Jh,"CrossingsCounter/lambda$5$Type",1911),S(1912,1,$t,bAe),h.td=function(t){O$e(this,t)},x(Jh,"CrossingsCounter/lambda$6$Type",1912),S(1913,1,$t,VDe),h.td=function(t){var n;j3(),e1(this.b,(n=this.a,u(t,11),n))},x(Jh,"CrossingsCounter/lambda$7$Type",1913),S(826,1,bh,jZ),h.Lb=function(t){return j3(),er(u(t,11),(ae(),$c))},h.Fb=function(t){return this===t},h.Mb=function(t){return j3(),er(u(t,11),(ae(),$c))},x(Jh,"CrossingsCounter/lambda$8$Type",826),S(1905,1,{},wAe),x(Jh,"HyperedgeCrossingsCounter",1905),S(467,1,{35:1,467:1},LIe),h.wd=function(t){return a$t(this,u(t,467))},h.b=0,h.c=0,h.e=0,h.f=0;var lUt=x(Jh,"HyperedgeCrossingsCounter/Hyperedge",467);S(362,1,{35:1,362:1},vM),h.wd=function(t){return f_t(this,u(t,362))},h.b=0,h.c=0;var aft=x(Jh,"HyperedgeCrossingsCounter/HyperedgeCorner",362);S(523,22,{3:1,35:1,22:1,523:1},Bee);var N6,I6,dft=hn(Jh,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",523,gn,F7t,nxt),gft;S(1405,1,Eo,TCe),h.Yf=function(t){return u(N(u(t,37),(ae(),Po)),21).Hc((ns(),Ul))?pft:null},h.pf=function(t,n){jIt(this,u(t,37),n)};var pft;x(rs,"InteractiveNodePlacer",1405),S(1406,1,Eo,CCe),h.Yf=function(t){return u(N(u(t,37),(ae(),Po)),21).Hc((ns(),Ul))?bft:null},h.pf=function(t,n){pNt(this,u(t,37),n)};var bft,$N,NN;x(rs,"LinearSegmentsNodePlacer",1406),S(257,1,{35:1,257:1},RJ),h.wd=function(t){return Hkt(this,u(t,257))},h.Fb=function(t){var n;return W(t,257)?(n=u(t,257),this.b==n.b):!1},h.Hb=function(){return this.b},h.Ib=function(){return"ls"+u1(this.e)},h.a=0,h.b=0,h.c=-1,h.d=-1,h.g=0;var wft=x(rs,"LinearSegmentsNodePlacer/LinearSegment",257);S(1408,1,Eo,fLe),h.Yf=function(t){return u(N(u(t,37),(ae(),Po)),21).Hc((ns(),Ul))?mft:null},h.pf=function(t,n){vXt(this,u(t,37),n)},h.b=0,h.g=0;var mft;x(rs,"NetworkSimplexPlacer",1408),S(1427,1,Yn,C6e),h.ue=function(t,n){return Zo(u(t,19).a,u(n,19).a)},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(rs,"NetworkSimplexPlacer/0methodref$compare$Type",1427),S(1429,1,Yn,T6e),h.ue=function(t,n){return Zo(u(t,19).a,u(n,19).a)},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(rs,"NetworkSimplexPlacer/1methodref$compare$Type",1429),S(649,1,{649:1},XDe);var uUt=x(rs,"NetworkSimplexPlacer/EdgeRep",649);S(401,1,{401:1},Aie),h.b=!1;var fUt=x(rs,"NetworkSimplexPlacer/NodeRep",401);S(508,12,{3:1,4:1,20:1,28:1,52:1,12:1,14:1,15:1,54:1,508:1},iPe),x(rs,"NetworkSimplexPlacer/Path",508),S(1409,1,{},E6e),h.Kb=function(t){return u(t,17).d.i.k},x(rs,"NetworkSimplexPlacer/Path/lambda$0$Type",1409),S(1410,1,$n,A6e),h.Mb=function(t){return u(t,267)==(jt(),sr)},x(rs,"NetworkSimplexPlacer/Path/lambda$1$Type",1410),S(1411,1,{},M6e),h.Kb=function(t){return u(t,17).d.i},x(rs,"NetworkSimplexPlacer/Path/lambda$2$Type",1411),S(1412,1,$n,mAe),h.Mb=function(t){return OIe(oKe(u(t,10)))},x(rs,"NetworkSimplexPlacer/Path/lambda$3$Type",1412),S(1413,1,$n,P6e),h.Mb=function(t){return y8t(u(t,11))},x(rs,"NetworkSimplexPlacer/lambda$0$Type",1413),S(1414,1,$t,UDe),h.td=function(t){w5t(this.a,this.b,u(t,11))},x(rs,"NetworkSimplexPlacer/lambda$1$Type",1414),S(1423,1,$t,vAe),h.td=function(t){LBt(this.a,u(t,17))},x(rs,"NetworkSimplexPlacer/lambda$10$Type",1423),S(1424,1,{},j6e),h.Kb=function(t){return pl(),new ht(null,new gt(u(t,29).a,16))},x(rs,"NetworkSimplexPlacer/lambda$11$Type",1424),S(1425,1,$t,yAe),h.td=function(t){$qt(this.a,u(t,10))},x(rs,"NetworkSimplexPlacer/lambda$12$Type",1425),S(1426,1,{},D6e),h.Kb=function(t){return pl(),me(u(t,121).e)},x(rs,"NetworkSimplexPlacer/lambda$13$Type",1426),S(1428,1,{},$6e),h.Kb=function(t){return pl(),me(u(t,121).e)},x(rs,"NetworkSimplexPlacer/lambda$15$Type",1428),S(1430,1,$n,N6e),h.Mb=function(t){return pl(),u(t,401).c.k==(jt(),zi)},x(rs,"NetworkSimplexPlacer/lambda$17$Type",1430),S(1431,1,$n,I6e),h.Mb=function(t){return pl(),u(t,401).c.j.c.length>1},x(rs,"NetworkSimplexPlacer/lambda$18$Type",1431),S(1432,1,$t,wBe),h.td=function(t){SDt(this.c,this.b,this.d,this.a,u(t,401))},h.c=0,h.d=0,x(rs,"NetworkSimplexPlacer/lambda$19$Type",1432),S(1415,1,{},R6e),h.Kb=function(t){return pl(),new ht(null,new gt(u(t,29).a,16))},x(rs,"NetworkSimplexPlacer/lambda$2$Type",1415),S(1433,1,$t,OAe),h.td=function(t){p5t(this.a,u(t,11))},h.a=0,x(rs,"NetworkSimplexPlacer/lambda$20$Type",1433),S(1434,1,{},L6e),h.Kb=function(t){return pl(),new ht(null,new gt(u(t,29).a,16))},x(rs,"NetworkSimplexPlacer/lambda$21$Type",1434),S(1435,1,$t,kAe),h.td=function(t){P5t(this.a,u(t,10))},x(rs,"NetworkSimplexPlacer/lambda$22$Type",1435),S(1436,1,$n,B6e),h.Mb=function(t){return OIe(t)},x(rs,"NetworkSimplexPlacer/lambda$23$Type",1436),S(1437,1,{},F6e),h.Kb=function(t){return pl(),new ht(null,new gt(u(t,29).a,16))},x(rs,"NetworkSimplexPlacer/lambda$24$Type",1437),S(1438,1,$n,SAe),h.Mb=function(t){return R4t(this.a,u(t,10))},x(rs,"NetworkSimplexPlacer/lambda$25$Type",1438),S(1439,1,$t,GDe),h.td=function(t){sBt(this.a,this.b,u(t,10))},x(rs,"NetworkSimplexPlacer/lambda$26$Type",1439),S(1440,1,$n,_6e),h.Mb=function(t){return pl(),!_r(u(t,17))},x(rs,"NetworkSimplexPlacer/lambda$27$Type",1440),S(1441,1,$n,H6e),h.Mb=function(t){return pl(),!_r(u(t,17))},x(rs,"NetworkSimplexPlacer/lambda$28$Type",1441),S(1442,1,{},xAe),h.Ce=function(t,n){return E5t(this.a,u(t,29),u(n,29))},x(rs,"NetworkSimplexPlacer/lambda$29$Type",1442),S(1416,1,{},q6e),h.Kb=function(t){return pl(),new ht(null,new P0(new _t(qt(qi(u(t,10)).a.Kc(),new L))))},x(rs,"NetworkSimplexPlacer/lambda$3$Type",1416),S(1417,1,$n,Q6e),h.Mb=function(t){return pl(),gTt(u(t,17))},x(rs,"NetworkSimplexPlacer/lambda$4$Type",1417),S(1418,1,$t,CAe),h.td=function(t){Dzt(this.a,u(t,17))},x(rs,"NetworkSimplexPlacer/lambda$5$Type",1418),S(1419,1,{},z6e),h.Kb=function(t){return pl(),new ht(null,new gt(u(t,29).a,16))},x(rs,"NetworkSimplexPlacer/lambda$6$Type",1419),S(1420,1,$n,W6e),h.Mb=function(t){return pl(),u(t,10).k==(jt(),zi)},x(rs,"NetworkSimplexPlacer/lambda$7$Type",1420),S(1421,1,{},K6e),h.Kb=function(t){return pl(),new ht(null,new P0(new _t(qt(xa(u(t,10)).a.Kc(),new L))))},x(rs,"NetworkSimplexPlacer/lambda$8$Type",1421),S(1422,1,$n,V6e),h.Mb=function(t){return pl(),g8t(u(t,17))},x(rs,"NetworkSimplexPlacer/lambda$9$Type",1422),S(1404,1,Eo,qCe),h.Yf=function(t){return u(N(u(t,37),(ae(),Po)),21).Hc((ns(),Ul))?vft:null},h.pf=function(t,n){dWt(u(t,37),n)};var vft;x(rs,"SimpleNodePlacer",1404),S(180,1,{180:1},Lm),h.Ib=function(){var t;return t="",this.c==(fh(),Dp)?t+=ey:this.c==yd&&(t+=Jv),this.o==(Pf(),Gg)?t+=Sz:this.o==Xf?t+="UP":t+="BALANCED",t},x(w1,"BKAlignedLayout",180),S(516,22,{3:1,35:1,22:1,516:1},_ee);var yd,Dp,yft=hn(w1,"BKAlignedLayout/HDirection",516,gn,H7t,ixt),Oft;S(515,22,{3:1,35:1,22:1,515:1},Fee);var Gg,Xf,kft=hn(w1,"BKAlignedLayout/VDirection",515,gn,q7t,rxt),Sft;S(1634,1,{},YDe),x(w1,"BKAligner",1634),S(1637,1,{},PVe),x(w1,"BKCompactor",1637),S(654,1,{654:1},X6e),h.a=0,x(w1,"BKCompactor/ClassEdge",654),S(458,1,{458:1},tPe),h.a=null,h.b=0,x(w1,"BKCompactor/ClassNode",458),S(1407,1,Eo,S$e),h.Yf=function(t){return u(N(u(t,37),(ae(),Po)),21).Hc((ns(),Ul))?xft:null},h.pf=function(t,n){NXt(this,u(t,37),n)},h.d=!1;var xft;x(w1,"BKNodePlacer",1407),S(1635,1,{},U6e),h.d=0,x(w1,"NeighborhoodInformation",1635),S(1636,1,Yn,TAe),h.ue=function(t,n){return HAt(this,u(t,46),u(n,46))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(w1,"NeighborhoodInformation/NeighborComparator",1636),S(808,1,{}),x(w1,"ThresholdStrategy",808),S(1763,808,{},oPe),h.bg=function(t,n,i){return this.a.o==(Pf(),Xf)?Oi:Li},h.cg=function(){},x(w1,"ThresholdStrategy/NullThresholdStrategy",1763),S(579,1,{579:1},ZDe),h.c=!1,h.d=!1,x(w1,"ThresholdStrategy/Postprocessable",579),S(1764,808,{},cPe),h.bg=function(t,n,i){var s,c,a;return c=n==i,s=this.a.a[i.p]==n,c||s?(a=t,this.a.c==(fh(),Dp)?(c&&(a=SQ(this,n,!0)),!isNaN(a)&&!isFinite(a)&&s&&(a=SQ(this,i,!1))):(c&&(a=SQ(this,n,!0)),!isNaN(a)&&!isFinite(a)&&s&&(a=SQ(this,i,!1))),a):t},h.cg=function(){for(var t,n,i,s,c;this.d.b!=0;)c=u(rCt(this.d),579),s=YYe(this,c),s.a&&(t=s.a,i=je(this.a.f[this.a.g[c.b.p].p]),!(!i&&!_r(t)&&t.c.i.c==t.d.i.c)&&(n=rGe(this,c),n||z4t(this.e,c)));for(;this.e.a.c.length!=0;)rGe(this,u(gWe(this.e),579))},x(w1,"ThresholdStrategy/SimpleThresholdStrategy",1764),S(635,1,{635:1,246:1,234:1},G6e),h.Kf=function(){return xze(this)},h.Xf=function(){return xze(this)};var SX;x(vW,"EdgeRouterFactory",635),S(1458,1,Eo,QCe),h.Yf=function(t){return aqt(u(t,37))},h.pf=function(t,n){yWt(u(t,37),n)};var Cft,Tft,Eft,Aft,Mft,Jpe,Pft,jft;x(vW,"OrthogonalEdgeRouter",1458),S(1451,1,Eo,x$e),h.Yf=function(t){return RIt(u(t,37))},h.pf=function(t,n){_Vt(this,u(t,37),n)};var Dft,$ft,Nft,Ift,AC,Rft;x(vW,"PolylineEdgeRouter",1451),S(1452,1,bh,Y6e),h.Lb=function(t){return pse(u(t,10))},h.Fb=function(t){return this===t},h.Mb=function(t){return pse(u(t,10))},x(vW,"PolylineEdgeRouter/1",1452),S(1809,1,$n,Z6e),h.Mb=function(t){return u(t,129).c==(cf(),E1)},x(pf,"HyperEdgeCycleDetector/lambda$0$Type",1809),S(1810,1,{},J6e),h.Ge=function(t){return u(t,129).d},x(pf,"HyperEdgeCycleDetector/lambda$1$Type",1810),S(1811,1,$n,exe),h.Mb=function(t){return u(t,129).c==(cf(),E1)},x(pf,"HyperEdgeCycleDetector/lambda$2$Type",1811),S(1812,1,{},txe),h.Ge=function(t){return u(t,129).d},x(pf,"HyperEdgeCycleDetector/lambda$3$Type",1812),S(1813,1,{},nxe),h.Ge=function(t){return u(t,129).d},x(pf,"HyperEdgeCycleDetector/lambda$4$Type",1813),S(1814,1,{},ixe),h.Ge=function(t){return u(t,129).d},x(pf,"HyperEdgeCycleDetector/lambda$5$Type",1814),S(112,1,{35:1,112:1},S9),h.wd=function(t){return qkt(this,u(t,112))},h.Fb=function(t){var n;return W(t,112)?(n=u(t,112),this.g==n.g):!1},h.Hb=function(){return this.g},h.Ib=function(){var t,n,i,s;for(t=new dl("{"),s=new R(this.n);s.a"+this.b+" ("+J5t(this.c)+")"},h.d=0,x(pf,"HyperEdgeSegmentDependency",129),S(520,22,{3:1,35:1,22:1,520:1},Hee);var E1,mw,Lft=hn(pf,"HyperEdgeSegmentDependency/DependencyType",520,gn,_7t,sxt),Bft;S(1815,1,{},EAe),x(pf,"HyperEdgeSegmentSplitter",1815),S(1816,1,{},rje),h.a=0,h.b=0,x(pf,"HyperEdgeSegmentSplitter/AreaRating",1816),S(329,1,{329:1},SF),h.a=0,h.b=0,h.c=0,x(pf,"HyperEdgeSegmentSplitter/FreeArea",329),S(1817,1,Yn,hxe),h.ue=function(t,n){return USt(u(t,112),u(n,112))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(pf,"HyperEdgeSegmentSplitter/lambda$0$Type",1817),S(1818,1,$t,mBe),h.td=function(t){eEt(this.a,this.d,this.c,this.b,u(t,112))},h.b=0,x(pf,"HyperEdgeSegmentSplitter/lambda$1$Type",1818),S(1819,1,{},axe),h.Kb=function(t){return new ht(null,new gt(u(t,112).e,16))},x(pf,"HyperEdgeSegmentSplitter/lambda$2$Type",1819),S(1820,1,{},dxe),h.Kb=function(t){return new ht(null,new gt(u(t,112).j,16))},x(pf,"HyperEdgeSegmentSplitter/lambda$3$Type",1820),S(1821,1,{},gxe),h.Fe=function(t){return oe(Oe(t))},x(pf,"HyperEdgeSegmentSplitter/lambda$4$Type",1821),S(655,1,{},VF),h.a=0,h.b=0,h.c=0,x(pf,"OrthogonalRoutingGenerator",655),S(1638,1,{},pxe),h.Kb=function(t){return new ht(null,new gt(u(t,112).e,16))},x(pf,"OrthogonalRoutingGenerator/lambda$0$Type",1638),S(1639,1,{},bxe),h.Kb=function(t){return new ht(null,new gt(u(t,112).j,16))},x(pf,"OrthogonalRoutingGenerator/lambda$1$Type",1639),S(661,1,{}),x(yW,"BaseRoutingDirectionStrategy",661),S(1807,661,{},lPe),h.dg=function(t,n,i){var s,c,a,g,w,m,y,k,E,M,P,D,B;if(!(t.r&&!t.q))for(k=n+t.o*i,y=new R(t.n);y.amh&&(a=k,c=t,s=new De(E,a),Tn(g.a,s),op(this,g,c,s,!1),M=t.r,M&&(P=oe(Oe(df(M.e,0))),s=new De(P,a),Tn(g.a,s),op(this,g,c,s,!1),a=n+M.o*i,c=M,s=new De(P,a),Tn(g.a,s),op(this,g,c,s,!1)),s=new De(B,a),Tn(g.a,s),op(this,g,c,s,!1)))},h.eg=function(t){return t.i.n.a+t.n.a+t.a.a},h.fg=function(){return ye(),Xt},h.gg=function(){return ye(),yt},x(yW,"NorthToSouthRoutingStrategy",1807),S(1808,661,{},uPe),h.dg=function(t,n,i){var s,c,a,g,w,m,y,k,E,M,P,D,B;if(!(t.r&&!t.q))for(k=n-t.o*i,y=new R(t.n);y.amh&&(a=k,c=t,s=new De(E,a),Tn(g.a,s),op(this,g,c,s,!1),M=t.r,M&&(P=oe(Oe(df(M.e,0))),s=new De(P,a),Tn(g.a,s),op(this,g,c,s,!1),a=n-M.o*i,c=M,s=new De(P,a),Tn(g.a,s),op(this,g,c,s,!1)),s=new De(B,a),Tn(g.a,s),op(this,g,c,s,!1)))},h.eg=function(t){return t.i.n.a+t.n.a+t.a.a},h.fg=function(){return ye(),yt},h.gg=function(){return ye(),Xt},x(yW,"SouthToNorthRoutingStrategy",1808),S(1806,661,{},fPe),h.dg=function(t,n,i){var s,c,a,g,w,m,y,k,E,M,P,D,B;if(!(t.r&&!t.q))for(k=n+t.o*i,y=new R(t.n);y.amh&&(a=k,c=t,s=new De(a,E),Tn(g.a,s),op(this,g,c,s,!0),M=t.r,M&&(P=oe(Oe(df(M.e,0))),s=new De(a,P),Tn(g.a,s),op(this,g,c,s,!0),a=n+M.o*i,c=M,s=new De(a,P),Tn(g.a,s),op(this,g,c,s,!0)),s=new De(a,B),Tn(g.a,s),op(this,g,c,s,!0)))},h.eg=function(t){return t.i.n.b+t.n.b+t.a.b},h.fg=function(){return ye(),At},h.gg=function(){return ye(),xt},x(yW,"WestToEastRoutingStrategy",1806),S(813,1,{},cue),h.Ib=function(){return u1(this.a)},h.b=0,h.c=!1,h.d=!1,h.f=0,x(Gb,"NubSpline",813),S(407,1,{407:1},$Ge,ZBe),x(Gb,"NubSpline/PolarCP",407),S(1453,1,Eo,kVe),h.Yf=function(t){return CRt(u(t,37))},h.pf=function(t,n){sXt(this,u(t,37),n)};var Fft,_ft,Hft,qft,Qft;x(Gb,"SplineEdgeRouter",1453),S(268,1,{268:1},WM),h.Ib=function(){return this.a+" ->("+this.c+") "+this.b},h.c=0,x(Gb,"SplineEdgeRouter/Dependency",268),S(455,22,{3:1,35:1,22:1,455:1},qee);var A1,w2,zft=hn(Gb,"SplineEdgeRouter/SideToProcess",455,gn,Q7t,oxt),Wft;S(1454,1,$n,uxe),h.Mb=function(t){return wS(),!u(t,128).o},x(Gb,"SplineEdgeRouter/lambda$0$Type",1454),S(1455,1,{},lxe),h.Ge=function(t){return wS(),u(t,128).v+1},x(Gb,"SplineEdgeRouter/lambda$1$Type",1455),S(1456,1,$t,JDe),h.td=function(t){b8t(this.a,this.b,u(t,46))},x(Gb,"SplineEdgeRouter/lambda$2$Type",1456),S(1457,1,$t,e$e),h.td=function(t){w8t(this.a,this.b,u(t,46))},x(Gb,"SplineEdgeRouter/lambda$3$Type",1457),S(128,1,{35:1,128:1},GXe,due),h.wd=function(t){return Qkt(this,u(t,128))},h.b=0,h.e=!1,h.f=0,h.g=0,h.j=!1,h.k=!1,h.n=0,h.o=!1,h.p=!1,h.q=!1,h.s=0,h.u=0,h.v=0,h.F=0,x(Gb,"SplineSegment",128),S(459,1,{459:1},fxe),h.a=0,h.b=!1,h.c=!1,h.d=!1,h.e=!1,h.f=0,x(Gb,"SplineSegment/EdgeInformation",459),S(1234,1,{},rxe),x(QS,lfe,1234),S(1235,1,Yn,sxe),h.ue=function(t,n){return JBt(u(t,135),u(n,135))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(QS,Ret,1235),S(1233,1,{},yje),x(QS,"MrTree",1233),S(393,22,{3:1,35:1,22:1,393:1,246:1,234:1},fA),h.Kf=function(){return OUe(this)},h.Xf=function(){return OUe(this)};var IN,R6,MC,L6,ebe=hn(QS,"TreeLayoutPhases",393,gn,ITt,cxt),Kft;S(1130,209,Ng,_Ie),h.Ze=function(t,n){var i,s,c,a,g,w,m;for(je(Pe($e(t,(sp(),obe))))||EM((i=new e8((ib(),new eb(t))),i)),g=(w=new KM,Cs(w,t),ue(w,(oo(),_6),t),m=new Jt,zQt(t,w,m),czt(t,w,m),w),a=ezt(this.a,g),c=new R(a);c.a"+NM(this.c):"e_"+ci(this)},x(zS,"TEdge",188),S(135,134,{3:1,135:1,94:1,134:1},KM),h.Ib=function(){var t,n,i,s,c;for(c=null,s=Cn(this.b,0);s.b!=s.d.c;)i=u(xn(s),86),c+=(i.c==null||i.c.length==0?"n_"+i.g:"n_"+i.c)+` +`;for(n=Cn(this.a,0);n.b!=n.d.c;)t=u(xn(n),188),c+=(t.b&&t.c?NM(t.b)+"->"+NM(t.c):"e_"+ci(t))+` +`;return c};var hUt=x(zS,"TGraph",135);S(633,502,{3:1,502:1,633:1,94:1,134:1}),x(zS,"TShape",633),S(86,633,{3:1,502:1,86:1,633:1,94:1,134:1},SH),h.Ib=function(){return NM(this)};var aUt=x(zS,"TNode",86);S(255,1,Xh,Bd),h.Jc=function(t){Sr(this,t)},h.Kc=function(){var t;return t=Cn(this.a.d,0),new nv(t)},x(zS,"TNode/2",255),S(358,1,fr,nv),h.Nb=function(t){Or(this,t)},h.Pb=function(){return u(xn(this.a),188).c},h.Ob=function(){return _E(this.a)},h.Qb=function(){cP(this.a)},x(zS,"TNode/2/1",358),S(1840,1,ki,FIe),h.pf=function(t,n){Szt(this,u(t,135),n)},x(cy,"FanProcessor",1840),S(327,22,{3:1,35:1,22:1,327:1,234:1},t5),h.Kf=function(){switch(this.g){case 0:return new CPe;case 1:return new FIe;case 2:return new vxe;case 3:return new wxe;case 4:return new Oxe;case 5:return new kxe;default:throw F(new Ot(_z+(this.f!=null?this.f:""+this.g)))}};var xX,CX,TX,EX,AX,RN,Vft=hn(cy,vfe,327,gn,YEt,lxt),Xft;S(1843,1,ki,wxe),h.pf=function(t,n){s_t(this,u(t,135),n)},h.a=0,x(cy,"LevelHeightProcessor",1843),S(1844,1,Xh,mxe),h.Jc=function(t){Sr(this,t)},h.Kc=function(){return rt(),y3(),pk},x(cy,"LevelHeightProcessor/1",1844),S(1841,1,ki,vxe),h.pf=function(t,n){aBt(this,u(t,135),n)},h.a=0,x(cy,"NeighborsProcessor",1841),S(1842,1,Xh,yxe),h.Jc=function(t){Sr(this,t)},h.Kc=function(){return rt(),y3(),pk},x(cy,"NeighborsProcessor/1",1842),S(1845,1,ki,Oxe),h.pf=function(t,n){r_t(this,u(t,135),n)},h.a=0,x(cy,"NodePositionProcessor",1845),S(1839,1,ki,CPe),h.pf=function(t,n){PWt(this,u(t,135))},x(cy,"RootProcessor",1839),S(1846,1,ki,kxe),h.pf=function(t,n){Fjt(u(t,135))},x(cy,"Untreeifyer",1846);var PC,B6,Uft,MX,LN,F6,PX,BN,FN,Fk,_6,_N,Od,tbe,Gft,jX,vw,DX,nbe;S(851,1,lu,HCe),h.Qe=function(t){Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Bhe),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),rbe),(hd(),xi)),hbe),Ge((af(),Et))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Fhe),""),"Search Order"),"Which search order to use when computing a spanning tree."),ibe),xi),dbe),Ge(Et)))),VZe((new _Ce,t))};var Yft,ibe,Zft,rbe;x(PD,"MrTreeMetaDataProvider",851),S(994,1,lu,_Ce),h.Qe=function(t){VZe(t)};var Jft,sbe,eht,tht,nht,iht,obe,rht,cbe,sht,HN,lbe,oht,ube,cht;x(PD,"MrTreeOptions",994),S(995,1,{},Sxe),h.$e=function(){var t;return t=new _Ie,t},h._e=function(t){},x(PD,"MrTreeOptions/MrtreeFactory",995),S(480,22,{3:1,35:1,22:1,480:1},Qee);var $X,fbe,hbe=hn(PD,"OrderWeighting",480,gn,W7t,uxt),lht;S(425,22,{3:1,35:1,22:1,425:1},zee);var abe,NX,dbe=hn(PD,"TreeifyingOrder",425,gn,z7t,hxt),uht;S(1459,1,Eo,jCe),h.Yf=function(t){return u(t,135),fht},h.pf=function(t,n){BMt(this,u(t,135),n)};var fht;x("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1459),S(1460,1,Eo,DCe),h.Yf=function(t){return u(t,135),hht},h.pf=function(t,n){kBt(this,u(t,135),n)};var hht;x("org.eclipse.elk.alg.mrtree.p2order","NodeOrderer",1460),S(1461,1,Eo,PCe),h.Yf=function(t){return u(t,135),aht},h.pf=function(t,n){Fqt(this,u(t,135),n)},h.a=0;var aht;x("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1461),S(1462,1,Eo,$Ce),h.Yf=function(t){return u(t,135),dht},h.pf=function(t,n){hIt(u(t,135),n)};var dht;x("org.eclipse.elk.alg.mrtree.p4route","EdgeRouter",1462);var H6;S(495,22,{3:1,35:1,22:1,495:1,246:1,234:1},Wee),h.Kf=function(){return JWe(this)},h.Xf=function(){return JWe(this)};var qN,_k,gbe=hn(_he,"RadialLayoutPhases",495,gn,K7t,fxt),ght;S(1131,209,Ng,vje),h.Ze=function(t,n){var i,s,c,a,g,w;if(i=nUe(this,t),Vt(n,"Radial layout",i.c.length),je(Pe($e(t,(Db(),xbe))))||EM((s=new e8((ib(),new eb(t))),s)),w=ARt(t),as(t,(w5(),H6),w),!w)throw F(new Ot("The given graph is not a tree!"));for(c=oe(Oe($e(t,WN))),c==0&&(c=bUe(t)),as(t,WN,c),g=new R(nUe(this,t));g.a0&&xWe((fn(n-1,t.length),t.charCodeAt(n-1)),Vet);)--n;if(s>=n)throw F(new Ot("The given string does not contain any numbers."));if(c=Hb(t.substr(s,n-s),`,|;|\r| +`),c.length!=2)throw F(new Ot("Exactly two numbers are expected, "+c.length+" were found."));try{this.a=Rb(Ib(c[0])),this.b=Rb(Ib(c[1]))}catch(a){throw a=fi(a),W(a,127)?(i=a,F(new Ot(Xet+i))):F(a)}},h.Ib=function(){return"("+this.a+","+this.b+")"},h.a=0,h.b=0;var tr=x(R7,"KVector",8);S(74,68,{3:1,4:1,20:1,28:1,52:1,14:1,68:1,15:1,74:1,414:1},pc,BE,lIe),h.Pc=function(){return YPt(this)},h.Jf=function(t){var n,i,s,c,a,g;s=Hb(t,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | | +`),ru(this);try{for(i=0,a=0,c=0,g=0;i0&&(a%2==0?c=Rb(s[i]):g=Rb(s[i]),a>0&&a%2!=0&&Tn(this,new De(c,g)),++a),++i}catch(w){throw w=fi(w),W(w,127)?(n=w,F(new Ot("The given string does not match the expected format for vectors."+n))):F(w)}},h.Ib=function(){var t,n,i;for(t=new dl("("),n=Cn(this,0);n.b!=n.d.c;)i=u(xn(n),8),wn(t,i.a+","+i.b),n.b!=n.d.c&&(t.a+="; ");return(t.a+=")",t).a};var Swe=x(R7,"KVectorChain",74);S(248,22,{3:1,35:1,22:1,248:1},n5);var tU,ZN,JN,NC,IC,eI,xwe=hn(fu,"Alignment",248,gn,WEt,Axt),$at;S(979,1,lu,VCe),h.Qe=function(t){qYe(t)};var Cwe,nU,Nat,Twe,Ewe,Iat,Awe,Rat,Lat,Mwe,Pwe,Bat;x(fu,"BoxLayouterOptions",979),S(980,1,{},b8e),h.$e=function(){var t;return t=new x8e,t},h._e=function(t){},x(fu,"BoxLayouterOptions/BoxFactory",980),S(291,22,{3:1,35:1,22:1,291:1},i5);var RC,iU,LC,BC,FC,rU,sU=hn(fu,"ContentAlignment",291,gn,zEt,Mxt),Fat;S(684,1,lu,FZ),h.Qe=function(t){Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,Qtt),""),"Layout Algorithm"),"Select a specific layout algorithm."),(hd(),Hk)),Te),Ge((af(),Et))))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,ztt),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),Uf),pUt),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,bhe),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),jwe),xi),xwe),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,ny),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,fae),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Uf),Swe),Ge(Mh)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,TD),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),$we),Cy),sU),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,q7),""),"Debug Mode"),"Whether additional debug information shall be generated."),(kt(),!1)),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,vhe),""),Jue),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),Nwe),xi),X6),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,_7),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),Lwe),xi),mU),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,DD),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,CD),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),Hwe),xi),Tme),ii(Et,H(_(Sd,1),de,175,0,[or]))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,ap),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),Ywe),Uf),D1e),ii(Et,H(_(Sd,1),de,175,0,[or]))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,N7),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,mW),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,LS),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Lz),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),nme),xi),Mme),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,ED),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Uf),tr),ii(or,H(_(Sd,1),de,175,0,[Yg,kd]))))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,$7),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),lo),Fr),ii(or,H(_(Sd,1),de,175,0,[Mh]))))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,cD),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),lo),Fr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,RS),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ahe),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),Qwe),Uf),Swe),Ge(Mh)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,jhe),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),jr),Ui),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Dhe),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),jr),Ui),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,QXt),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),Uf),yUt),ii(Et,H(_(Sd,1),de,175,0,[kd]))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Nhe),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),zwe),Uf),j1e),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,ghe),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),jr),Ui),ii(or,H(_(Sd,1),de,175,0,[Mh,Yg,kd]))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Wtt),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),As),wr),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ktt),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Vtt),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),me(100)),lo),Fr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Xtt),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Utt),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),me(4e3)),lo),Fr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Gtt),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),me(400)),lo),Fr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ytt),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ztt),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Jtt),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,ent),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,uae),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),Dwe),xi),Ime),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,nhe),Qf),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,ihe),Qf),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,jz),Qf),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,rhe),Qf),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Rz),Qf),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,she),Qf),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,ohe),Qf),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,uhe),Qf),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,che),Qf),"Horizontal spacing between Label and Port"),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,lhe),Qf),"Vertical spacing between Label and Port"),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Xb),Qf),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,fhe),Qf),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),As),wr),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,hhe),Qf),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),As),wr),ii(Et,H(_(Sd,1),de,175,0,[or]))))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,ahe),Qf),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),Uf),ydt),ii(or,H(_(Sd,1),de,175,0,[Mh,Yg,kd]))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ihe),Qf),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),ame),Uf),j1e),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,wW),int),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),lo),Fr),ii(Et,H(_(Sd,1),de,175,0,[or]))))),pr(t,wW,bW,Vat),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,bW),int),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),Zwe),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,yhe),rnt),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),Kwe),Uf),D1e),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,tk),rnt),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),Vwe),Cy),ss),ii(or,H(_(Sd,1),de,175,0,[kd]))))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,She),ND),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),eme),xi),Z6),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,xhe),ND),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),xi),Z6),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,Che),ND),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),xi),Z6),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,The),ND),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),xi),Z6),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,Ehe),ND),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),xi),Z6),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Wm),LW),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),Xwe),Cy),tx),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,iy),LW),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),Gwe),Cy),jme),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,ry),LW),"Node Size Minimum"),"The minimal size to which a node can be reduced."),Uwe),Uf),tr),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,pW),LW),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),jr),Ui),Ge(Et)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Mhe),gW),"Edge Label Placement"),"Gives a hint on where to put edge labels."),Iwe),xi),gme),Ge(kd)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,lD),gW),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),jr),Ui),Ge(kd)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,zXt),"font"),"Font Name"),"Font name used for a label."),Hk),Te),Ge(kd)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,tnt),"font"),"Font Size"),"Font size used for a label."),lo),Fr),Ge(kd)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,$he),BW),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),Uf),tr),Ge(Yg)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,Phe),BW),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),lo),Fr),Ge(Yg)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,phe),BW),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),sme),xi),Wr),Ge(Yg)))),Xe(t,new Fe(Ke(We(Ve(He(ze(qe(Qe(new Be,dhe),BW),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),As),wr),Ge(Yg)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,nk),hae),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),ime),Cy),lI),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Ohe),hae),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),jr),Ui),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,khe),hae),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),jr),Ui),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,whe),snt),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),jr),Ui),Ge(or)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,mhe),snt),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),jr),Ui),Ge(Mh)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,Dz),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),As),wr),Ge(Mh)))),Xe(t,new Fe(Ke(We(Ve(lt(He(ze(qe(Qe(new Be,nnt),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),Fwe),xi),yme),Ge(Mh)))),W4(t,new Ev(F4(b3(p3(new ev,Dt),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),W4(t,new Ev(F4(b3(p3(new ev,"org.eclipse.elk.orthogonal"),"Orthogonal"),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),W4(t,new Ev(F4(b3(p3(new ev,xl),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),W4(t,new Ev(F4(b3(p3(new ev,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),W4(t,new Ev(F4(b3(p3(new ev,Mtt),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),W4(t,new Ev(F4(b3(p3(new ev,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),W4(t,new Ev(F4(b3(p3(new ev,kh),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),EYe((new XCe,t)),qYe((new VCe,t)),iYe((new UCe,t))};var K6,_at,jwe,Ty,Hat,qat,Dwe,Qat,tI,$we,_C,$p,Nwe,oU,cU,Iwe,Rwe,Lwe,Bwe,Fwe,_we,v2,Hwe,zat,HC,lU,nI,qwe,y2,Qwe,qC,zwe,Wwe,Kwe,O2,Vwe,Zg,Xwe,iI,k2,Uwe,M1,Gwe,rI,QC,Jg,Ywe,Wat,Zwe,Kat,Vat,Jwe,eme,uU,fU,hU,aU,tme,Gc,V6,nme,dU,gU,yw,ime,rme,S2,sme,Ey,sI,pU,qk,Xat,bU,Uat,Gat,ome,Yat,cme,Zat,Ay,lme,oI,ume,fme,e0,Jat,hme,ame,dme;x(fu,"CoreOptions",684),S(103,22,{3:1,35:1,22:1,103:1},S8);var Na,bu,Ku,na,Ia,X6=hn(fu,Jue,103,gn,dEt,Dxt),edt;S(272,22,{3:1,35:1,22:1,272:1},zB);var Qk,Ow,zk,gme=hn(fu,"EdgeLabelPlacement",272,gn,VCt,$xt),tdt;S(218,22,{3:1,35:1,22:1,218:1},aA);var Wk,zC,My,wU,mU=hn(fu,"EdgeRouting",218,gn,FTt,Nxt),ndt;S(312,22,{3:1,35:1,22:1,312:1},r5);var pme,bme,wme,mme,vU,vme,yme=hn(fu,"EdgeType",312,gn,JEt,Ixt),idt;S(977,1,lu,XCe),h.Qe=function(t){EYe(t)};var Ome,kme,Sme,xme,rdt,Cme,U6;x(fu,"FixedLayouterOptions",977),S(978,1,{},M8e),h.$e=function(){var t;return t=new k8e,t},h._e=function(t){},x(fu,"FixedLayouterOptions/FixedFactory",978),S(334,22,{3:1,35:1,22:1,334:1},WB);var xd,cI,G6,Tme=hn(fu,"HierarchyHandling",334,gn,KCt,Rxt),sdt;S(285,22,{3:1,35:1,22:1,285:1},dA);var ia,P1,WC,KC,odt=hn(fu,"LabelSide",285,gn,BTt,Lxt),cdt;S(93,22,{3:1,35:1,22:1,93:1},nm);var Ra,Vu,wu,Xu,Al,Uu,mu,ra,Gu,ss=hn(fu,"NodeLabelPlacement",93,gn,nMt,Bxt),ldt;S(249,22,{3:1,35:1,22:1,249:1},x8);var Eme,Y6,j1,Ame,VC,Z6=hn(fu,"PortAlignment",249,gn,gEt,Fxt),udt;S(98,22,{3:1,35:1,22:1,98:1},s5);var t0,jo,sa,Kk,Gf,D1,Mme=hn(fu,"PortConstraints",98,gn,REt,_xt),fdt;S(273,22,{3:1,35:1,22:1,273:1},o5);var J6,ex,La,XC,$1,Py,lI=hn(fu,"PortLabelPlacement",273,gn,ZEt,Hxt),hdt;S(61,22,{3:1,35:1,22:1,61:1},C8);var At,yt,Gl,Yl,fc,Uo,Yf,Yu,Ic,Cc,Do,Rc,hc,ac,Zu,Ml,Pl,vu,Xt,Ks,xt,Wr=hn(fu,"PortSide",61,gn,fEt,zxt),adt;S(981,1,lu,UCe),h.Qe=function(t){iYe(t)};var ddt,gdt,Pme,pdt,bdt;x(fu,"RandomLayouterOptions",981),S(982,1,{},P8e),h.$e=function(){var t;return t=new $8e,t},h._e=function(t){},x(fu,"RandomLayouterOptions/RandomFactory",982),S(374,22,{3:1,35:1,22:1,374:1},gA);var kw,UC,GC,n0,tx=hn(fu,"SizeConstraint",374,gn,LTt,qxt),wdt;S(259,22,{3:1,35:1,22:1,259:1},im);var YC,uI,Vk,yU,ZC,nx,fI,hI,aI,jme=hn(fu,"SizeOptions",259,gn,uMt,Qxt),mdt;S(370,1,{1949:1},a3),h.b=!1,h.c=0,h.d=-1,h.e=null,h.f=null,h.g=-1,h.j=!1,h.k=!1,h.n=!1,h.o=0,h.q=0,h.r=0,x(po,"BasicProgressMonitor",370),S(972,209,Ng,x8e),h.Ze=function(t,n){var i,s,c,a,g,w,m,y,k;switch(Vt(n,"Box layout",2),c=r8(Oe($e(t,(vj(),Bat)))),a=u($e(t,Lat),116),i=je(Pe($e(t,Twe))),s=je(Pe($e(t,Ewe))),u($e(t,nU),311).g){case 0:g=(w=new mc((!t.a&&(t.a=new we(mi,t,10,11)),t.a)),rt(),ir(w,new FAe(s)),w),m=Kce(t),y=Oe($e(t,Cwe)),(y==null||(vt(y),y<=0))&&(y=1.3),k=XVt(g,c,a,m.a,m.b,i,(vt(y),y)),lp(t,k.a,k.b,!1,!0);break;default:zWt(t,c,a,i)}Ht(n)},x(po,"BoxLayoutProvider",972),S(973,1,Yn,FAe),h.ue=function(t,n){return aHt(this,u(t,33),u(n,33))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},h.a=!1,x(po,"BoxLayoutProvider/1",973),S(157,1,{157:1},fP,cIe),h.Ib=function(){return this.c?Wle(this.c):u1(this.b)},x(po,"BoxLayoutProvider/Group",157),S(311,22,{3:1,35:1,22:1,311:1},pA);var Dme,$me,Nme,OU,Ime=hn(po,"BoxLayoutProvider/PackingMode",311,gn,_Tt,Wxt),vdt;S(974,1,Yn,C8e),h.ue=function(t,n){return p7t(u(t,157),u(n,157))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(po,"BoxLayoutProvider/lambda$0$Type",974),S(975,1,Yn,T8e),h.ue=function(t,n){return l7t(u(t,157),u(n,157))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(po,"BoxLayoutProvider/lambda$1$Type",975),S(976,1,Yn,E8e),h.ue=function(t,n){return u7t(u(t,157),u(n,157))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(po,"BoxLayoutProvider/lambda$2$Type",976),S(1365,1,{831:1},A8e),h.qg=function(t,n){return GE(),!W(n,160)||wje((Lv(),u(t,160)),n)},x(po,"ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type",1365),S(1366,1,$t,_Ae),h.td=function(t){JPt(this.a,u(t,146))},x(po,"ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type",1366),S(1367,1,$t,S8e),h.td=function(t){u(t,94),GE()},x(po,"ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type",1367),S(1371,1,$t,HAe),h.td=function(t){xMt(this.a,u(t,94))},x(po,"ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type",1371),S(1369,1,$n,i$e),h.Mb=function(t){return FPt(this.a,this.b,u(t,146))},x(po,"ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type",1369),S(1368,1,$n,r$e),h.Mb=function(t){return nSt(this.a,this.b,u(t,831))},x(po,"ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type",1368),S(1370,1,$t,s$e),h.td=function(t){n9t(this.a,this.b,u(t,146))},x(po,"ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type",1370),S(935,1,{},O8e),h.Kb=function(t){return sNe(t)},h.Fb=function(t){return this===t},x(po,"ElkUtil/lambda$0$Type",935),S(936,1,$t,o$e),h.td=function(t){gFt(this.a,this.b,u(t,79))},h.a=0,h.b=0,x(po,"ElkUtil/lambda$1$Type",936),S(937,1,$t,c$e),h.td=function(t){gkt(this.a,this.b,u(t,202))},h.a=0,h.b=0,x(po,"ElkUtil/lambda$2$Type",937),S(938,1,$t,l$e),h.td=function(t){s5t(this.a,this.b,u(t,137))},h.a=0,h.b=0,x(po,"ElkUtil/lambda$3$Type",938),S(939,1,$t,qAe),h.td=function(t){m8t(this.a,u(t,469))},x(po,"ElkUtil/lambda$4$Type",939),S(342,1,{35:1,342:1},zOt),h.wd=function(t){return $5t(this,u(t,236))},h.Fb=function(t){var n;return W(t,342)?(n=u(t,342),this.a==n.a):!1},h.Hb=function(){return Di(this.a)},h.Ib=function(){return this.a+" (exclusive)"},h.a=0,x(po,"ExclusiveBounds/ExclusiveLowerBound",342),S(1138,209,Ng,k8e),h.Ze=function(t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G,U,te,ce,be,Se,_e,Ue;for(Vt(n,"Fixed Layout",1),a=u($e(t,(Dn(),Rwe)),218),E=0,M=0,U=new Ft((!t.a&&(t.a=new we(mi,t,10,11)),t.a));U.e!=U.i.gc();){for(q=u(Qt(U),33),Ue=u($e(q,(NP(),U6)),8),Ue&&(Tf(q,Ue.a,Ue.b),u($e(q,kme),174).Hc((cl(),kw))&&(P=u($e(q,xme),8),P.a>0&&P.b>0&&lp(q,P.a,P.b,!0,!0))),E=p.Math.max(E,q.i+q.g),M=p.Math.max(M,q.j+q.f),y=new Ft((!q.n&&(q.n=new we(Rs,q,1,7)),q.n));y.e!=y.i.gc();)w=u(Qt(y),137),Ue=u($e(w,U6),8),Ue&&Tf(w,Ue.a,Ue.b),E=p.Math.max(E,q.i+w.i+w.g),M=p.Math.max(M,q.j+w.j+w.f);for(be=new Ft((!q.c&&(q.c=new we(Yc,q,9,9)),q.c));be.e!=be.i.gc();)for(ce=u(Qt(be),118),Ue=u($e(ce,U6),8),Ue&&Tf(ce,Ue.a,Ue.b),Se=q.i+ce.i,_e=q.j+ce.j,E=p.Math.max(E,Se+ce.g),M=p.Math.max(M,_e+ce.f),m=new Ft((!ce.n&&(ce.n=new we(Rs,ce,1,7)),ce.n));m.e!=m.i.gc();)w=u(Qt(m),137),Ue=u($e(w,U6),8),Ue&&Tf(w,Ue.a,Ue.b),E=p.Math.max(E,Se+w.i+w.g),M=p.Math.max(M,_e+w.j+w.f);for(c=new _t(qt(Ea(q).a.Kc(),new L));an(c);)i=u(nn(c),79),k=mJe(i),E=p.Math.max(E,k.a),M=p.Math.max(M,k.b);for(s=new _t(qt(o7(q).a.Kc(),new L));an(s);)i=u(nn(s),79),bi(Kh(i))!=t&&(k=mJe(i),E=p.Math.max(E,k.a),M=p.Math.max(M,k.b))}if(a==(Ca(),Wk))for(G=new Ft((!t.a&&(t.a=new we(mi,t,10,11)),t.a));G.e!=G.i.gc();)for(q=u(Qt(G),33),s=new _t(qt(Ea(q).a.Kc(),new L));an(s);)i=u(nn(s),79),g=hzt(i),g.b==0?as(i,y2,null):as(i,y2,g);je(Pe($e(t,(NP(),Sme))))||(te=u($e(t,rdt),116),B=E+te.b+te.c,D=M+te.d+te.a,lp(t,B,D,!0,!0)),Ht(n)},x(po,"FixedLayoutProvider",1138),S(373,134,{3:1,414:1,373:1,94:1,134:1},IL,Iqe),h.Jf=function(t){var n,i,s,c,a,g,w,m,y;if(t)try{for(m=Hb(t,";,;"),a=m,g=0,w=a.length;g>16&Ni|n^s<<16},h.Kc=function(){return new QAe(this)},h.Ib=function(){return this.a==null&&this.b==null?"pair(null,null)":this.a==null?"pair(null,"+Ns(this.b)+")":this.b==null?"pair("+Ns(this.a)+",null)":"pair("+Ns(this.a)+","+Ns(this.b)+")"},x(po,"Pair",46),S(983,1,fr,QAe),h.Nb=function(t){Or(this,t)},h.Ob=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},h.Pb=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw F(new ro)},h.Qb=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),F(new gc)},h.b=!1,h.c=!1,x(po,"Pair/1",983),S(448,1,{448:1},vBe),h.Fb=function(t){return Oo(this.a,u(t,448).a)&&Oo(this.c,u(t,448).c)&&Oo(this.d,u(t,448).d)&&Oo(this.b,u(t,448).b)},h.Hb=function(){return IP(H(_(It,1),Ee,1,5,[this.a,this.c,this.d,this.b]))},h.Ib=function(){return"("+this.a+Qr+this.c+Qr+this.d+Qr+this.b+")"},x(po,"Quadruple",448),S(1126,209,Ng,$8e),h.Ze=function(t,n){var i,s,c,a,g;if(Vt(n,"Random Layout",1),(!t.a&&(t.a=new we(mi,t,10,11)),t.a).i==0){Ht(n);return}a=u($e(t,(koe(),pdt)),19),a&&a.a!=0?c=new qM(a.a):c=new zH,i=r8(Oe($e(t,ddt))),g=r8(Oe($e(t,bdt))),s=u($e(t,gdt),116),CVt(t,c,i,g,s),Ht(n)},x(po,"RandomLayoutProvider",1126);var Sdt;S(553,1,{}),h.qf=function(){return new De(this.f.i,this.f.j)},h.We=function(t){return WBe(t,(Dn(),Gc))?$e(this.f,xdt):$e(this.f,t)},h.rf=function(){return new De(this.f.g,this.f.f)},h.sf=function(){return this.g},h.Xe=function(t){return gg(this.f,t)},h.tf=function(t){sc(this.f,t.a),oc(this.f,t.b)},h.uf=function(t){W0(this.f,t.a),z0(this.f,t.b)},h.vf=function(t){this.g=t},h.g=0;var xdt;x(VS,"ElkGraphAdapters/AbstractElkGraphElementAdapter",553),S(554,1,{839:1},xE),h.wf=function(){var t,n;if(!this.b)for(this.b=BM(bM(this.a).i),n=new Ft(bM(this.a));n.e!=n.i.gc();)t=u(Qt(n),137),ge(this.b,new cB(t));return this.b},h.b=null,x(VS,"ElkGraphAdapters/ElkEdgeAdapter",554),S(301,553,{},eb),h.xf=function(){return vVe(this)},h.a=null,x(VS,"ElkGraphAdapters/ElkGraphAdapter",301),S(630,553,{181:1},cB),x(VS,"ElkGraphAdapters/ElkLabelAdapter",630),S(629,553,{680:1},oF),h.wf=function(){return ENt(this)},h.Af=function(){var t;return t=u($e(this.f,(Dn(),qC)),142),!t&&(t=new j4),t},h.Cf=function(){return ANt(this)},h.Ef=function(t){var n;n=new OF(t),as(this.f,(Dn(),qC),n)},h.Ff=function(t){as(this.f,(Dn(),Jg),new wne(t))},h.yf=function(){return this.d},h.zf=function(){var t,n;if(!this.a)for(this.a=new pe,n=new _t(qt(o7(u(this.f,33)).a.Kc(),new L));an(n);)t=u(nn(n),79),ge(this.a,new xE(t));return this.a},h.Bf=function(){var t,n;if(!this.c)for(this.c=new pe,n=new _t(qt(Ea(u(this.f,33)).a.Kc(),new L));an(n);)t=u(nn(n),79),ge(this.c,new xE(t));return this.c},h.Df=function(){return kM(u(this.f,33)).i!=0||je(Pe(u(this.f,33).We((Dn(),HC))))},h.Gf=function(){mAt(this,(ib(),Sdt))},h.a=null,h.b=null,h.c=null,h.d=null,h.e=null,x(VS,"ElkGraphAdapters/ElkNodeAdapter",629),S(1266,553,{838:1},mMe),h.wf=function(){return RNt(this)},h.zf=function(){var t,n;if(!this.a)for(this.a=Lh(u(this.f,118).xg().i),n=new Ft(u(this.f,118).xg());n.e!=n.i.gc();)t=u(Qt(n),79),ge(this.a,new xE(t));return this.a},h.Bf=function(){var t,n;if(!this.c)for(this.c=Lh(u(this.f,118).yg().i),n=new Ft(u(this.f,118).yg());n.e!=n.i.gc();)t=u(Qt(n),79),ge(this.c,new xE(t));return this.c},h.Hf=function(){return u(u(this.f,118).We((Dn(),S2)),61)},h.If=function(){var t,n,i,s,c,a,g,w;for(s=Mf(u(this.f,118)),i=new Ft(u(this.f,118).yg());i.e!=i.i.gc();)for(t=u(Qt(i),79),w=new Ft((!t.c&&(t.c=new dt(Wt,t,5,8)),t.c));w.e!=w.i.gc();){if(g=u(Qt(w),82),xb(Ts(g),s))return!0;if(Ts(g)==s&&je(Pe($e(t,(Dn(),lU)))))return!0}for(n=new Ft(u(this.f,118).xg());n.e!=n.i.gc();)for(t=u(Qt(n),79),a=new Ft((!t.b&&(t.b=new dt(Wt,t,4,7)),t.b));a.e!=a.i.gc();)if(c=u(Qt(a),82),xb(Ts(c),s))return!0;return!1},h.a=null,h.b=null,h.c=null,x(VS,"ElkGraphAdapters/ElkPortAdapter",1266),S(1267,1,Yn,N8e),h.ue=function(t,n){return rQt(u(t,118),u(n,118))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(VS,"ElkGraphAdapters/PortComparator",1267);var N1=hi(Kl,"EObject"),Xk=hi(Um,lnt),yu=hi(Um,unt),JC=hi(Um,fnt),eT=hi(Um,"ElkShape"),Wt=hi(Um,hnt),nr=hi(Um,aae),di=hi(Um,ant),tT=hi(Kl,dnt),ix=hi(Kl,"EFactory"),Cdt,kU=hi(Kl,gnt),vf=hi(Kl,"EPackage"),cr,Tdt,Edt,Fme,dI,Adt,_me,Hme,qme,I1,Mdt,Pdt,Rs=hi(Um,dae),mi=hi(Um,gae),Yc=hi(Um,pae);S(90,1,pnt),h.Jg=function(){return this.Kg(),null},h.Kg=function(){return null},h.Lg=function(){return this.Kg(),!1},h.Mg=function(){return!1},h.Ng=function(t){Hn(this,t)},x(ly,"BasicNotifierImpl",90),S(97,90,vnt),h.nh=function(){return el(this)},h.Og=function(t,n){return t},h.Pg=function(){throw F(new on)},h.Qg=function(t){var n;return n=Ur(u(ct(this.Tg(),this.Vg()),18)),this.eh().ih(this,n.n,n.f,t)},h.Rg=function(t,n){throw F(new on)},h.Sg=function(t,n,i){return Sl(this,t,n,i)},h.Tg=function(){var t;return this.Pg()&&(t=this.Pg().ck(),t)?t:this.zh()},h.Ug=function(){return Vq(this)},h.Vg=function(){throw F(new on)},h.Wg=function(){var t,n;return n=this.ph().dk(),!n&&this.Pg().ik(n=(K4(),t=Nie(dh(this.Tg())),t==null?PU:new A8(this,t))),n},h.Xg=function(t,n){return t},h.Yg=function(t){var n;return n=t.Gj(),n?t.aj():ui(this.Tg(),t)},h.Zg=function(){var t;return t=this.Pg(),t?t.fk():null},h.$g=function(){return this.Pg()?this.Pg().ck():null},h._g=function(t,n,i){return ij(this,t,n,i)},h.ah=function(t){return X3(this,t)},h.bh=function(t,n){return B_(this,t,n)},h.dh=function(){var t;return t=this.Pg(),!!t&&t.gk()},h.eh=function(){throw F(new on)},h.fh=function(){return GP(this)},h.gh=function(t,n,i,s){return Hv(this,t,n,s)},h.hh=function(t,n,i){var s;return s=u(ct(this.Tg(),n),66),s.Nj().Qj(this,this.yh(),n-this.Ah(),t,i)},h.ih=function(t,n,i,s){return TM(this,t,n,s)},h.jh=function(t,n,i){var s;return s=u(ct(this.Tg(),n),66),s.Nj().Rj(this,this.yh(),n-this.Ah(),t,i)},h.kh=function(){return!!this.Pg()&&!!this.Pg().ek()},h.lh=function(t){return rq(this,t)},h.mh=function(t){return lFe(this,t)},h.oh=function(t){return $Ze(this,t)},h.ph=function(){throw F(new on)},h.qh=function(){return this.Pg()?this.Pg().ek():null},h.rh=function(){return GP(this)},h.sh=function(t,n){qq(this,t,n)},h.th=function(t){this.ph().hk(t)},h.uh=function(t){this.ph().kk(t)},h.vh=function(t){this.ph().jk(t)},h.wh=function(t,n){var i,s,c,a;return a=this.Zg(),a&&t&&(n=Lr(a.Vk(),this,n),a.Zk(this)),s=this.eh(),s&&((uQ(this,this.eh(),this.Vg()).Bb&zr)!=0?(c=s.fh(),c&&(t?!a&&c.Zk(this):c.Yk(this))):(n=(i=this.Vg(),i>=0?this.Qg(n):this.eh().ih(this,-1-i,null,n)),n=this.Sg(null,-1,n))),this.uh(t),n},h.xh=function(t){var n,i,s,c,a,g,w,m;if(i=this.Tg(),a=ui(i,t),n=this.Ah(),a>=n)return u(t,66).Nj().Uj(this,this.yh(),a-n);if(a<=-1)if(g=Fm((Oc(),Cr),i,t),g){if(Vr(),u(g,66).Oj()||(g=Av(ms(Cr,g))),c=(s=this.Yg(g),u(s>=0?this._g(s,!0,!0):rp(this,g,!0),153)),m=g.Zj(),m>1||m==-1)return u(u(c,215).hl(t,!1),76)}else throw F(new Ot(m1+t.ne()+FW));else if(t.$j())return s=this.Yg(t),u(s>=0?this._g(s,!1,!0):rp(this,t,!1),76);return w=new A$e(this,t),w},h.yh=function(){return Ire(this)},h.zh=function(){return(Yd(),bt).S},h.Ah=function(){return Lt(this.zh())},h.Bh=function(t){Lq(this,t)},h.Ib=function(){return _u(this)},x(wt,"BasicEObjectImpl",97);var jdt;S(114,97,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1}),h.Ch=function(t){var n;return n=Rre(this),n[t]},h.Dh=function(t,n){var i;i=Rre(this),pi(i,t,n)},h.Eh=function(t){var n;n=Rre(this),pi(n,t,null)},h.Jg=function(){return u(mt(this,4),126)},h.Kg=function(){throw F(new on)},h.Lg=function(){return(this.Db&4)!=0},h.Pg=function(){throw F(new on)},h.Fh=function(t){_v(this,2,t)},h.Rg=function(t,n){this.Db=n<<16|this.Db&255,this.Fh(t)},h.Tg=function(){return tc(this)},h.Vg=function(){return this.Db>>16},h.Wg=function(){var t,n;return K4(),n=Nie(dh((t=u(mt(this,16),26),t||this.zh()))),n==null?PU:new A8(this,n)},h.Mg=function(){return(this.Db&1)==0},h.Zg=function(){return u(mt(this,128),1935)},h.$g=function(){return u(mt(this,16),26)},h.dh=function(){return(this.Db&32)!=0},h.eh=function(){return u(mt(this,2),49)},h.kh=function(){return(this.Db&64)!=0},h.ph=function(){throw F(new on)},h.qh=function(){return u(mt(this,64),281)},h.th=function(t){_v(this,16,t)},h.uh=function(t){_v(this,128,t)},h.vh=function(t){_v(this,64,t)},h.yh=function(){return zo(this)},h.Db=0,x(wt,"MinimalEObjectImpl",114),S(115,114,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),h.Fh=function(t){this.Cb=t},h.eh=function(){return this.Cb},x(wt,"MinimalEObjectImpl/Container",115),S(1985,115,{105:1,413:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),h._g=function(t,n,i){return Voe(this,t,n,i)},h.jh=function(t,n,i){return Ice(this,t,n,i)},h.lh=function(t){return Kie(this,t)},h.sh=function(t,n){Dse(this,t,n)},h.zh=function(){return Lo(),Pdt},h.Bh=function(t){Ose(this,t)},h.Ve=function(){return _Ke(this)},h.We=function(t){return $e(this,t)},h.Xe=function(t){return gg(this,t)},h.Ye=function(t,n){return as(this,t,n)},x(Lg,"EMapPropertyHolderImpl",1985),S(567,115,{105:1,469:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},dE),h._g=function(t,n,i){switch(t){case 0:return this.a;case 1:return this.b}return ij(this,t,n,i)},h.lh=function(t){switch(t){case 0:return this.a!=0;case 1:return this.b!=0}return rq(this,t)},h.sh=function(t,n){switch(t){case 0:hP(this,oe(Oe(n)));return;case 1:aP(this,oe(Oe(n)));return}qq(this,t,n)},h.zh=function(){return Lo(),Tdt},h.Bh=function(t){switch(t){case 0:hP(this,0);return;case 1:aP(this,0);return}Lq(this,t)},h.Ib=function(){var t;return(this.Db&64)!=0?_u(this):(t=new nu(_u(this)),t.a+=" (x: ",em(t,this.a),t.a+=", y: ",em(t,this.b),t.a+=")",t.a)},h.a=0,h.b=0,x(Lg,"ElkBendPointImpl",567),S(723,1985,{105:1,413:1,160:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),h._g=function(t,n,i){return Yse(this,t,n,i)},h.hh=function(t,n,i){return jq(this,t,n,i)},h.jh=function(t,n,i){return pH(this,t,n,i)},h.lh=function(t){return dse(this,t)},h.sh=function(t,n){ace(this,t,n)},h.zh=function(){return Lo(),Adt},h.Bh=function(t){Vse(this,t)},h.zg=function(){return this.k},h.Ag=function(){return bM(this)},h.Ib=function(){return qH(this)},h.k=null,x(Lg,"ElkGraphElementImpl",723),S(724,723,{105:1,413:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),h._g=function(t,n,i){return coe(this,t,n,i)},h.lh=function(t){return goe(this,t)},h.sh=function(t,n){dce(this,t,n)},h.zh=function(){return Lo(),Mdt},h.Bh=function(t){voe(this,t)},h.Bg=function(){return this.f},h.Cg=function(){return this.g},h.Dg=function(){return this.i},h.Eg=function(){return this.j},h.Fg=function(t,n){SA(this,t,n)},h.Gg=function(t,n){Tf(this,t,n)},h.Hg=function(t){sc(this,t)},h.Ig=function(t){oc(this,t)},h.Ib=function(){return Rq(this)},h.f=0,h.g=0,h.i=0,h.j=0,x(Lg,"ElkShapeImpl",724),S(725,724,{105:1,413:1,82:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),h._g=function(t,n,i){return Hoe(this,t,n,i)},h.hh=function(t,n,i){return oce(this,t,n,i)},h.jh=function(t,n,i){return cce(this,t,n,i)},h.lh=function(t){return Pse(this,t)},h.sh=function(t,n){ble(this,t,n)},h.zh=function(){return Lo(),Edt},h.Bh=function(t){$oe(this,t)},h.xg=function(){return!this.d&&(this.d=new dt(nr,this,8,5)),this.d},h.yg=function(){return!this.e&&(this.e=new dt(nr,this,7,4)),this.e},x(Lg,"ElkConnectableShapeImpl",725),S(352,723,{105:1,413:1,79:1,160:1,352:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},NZ),h.Qg=function(t){return nce(this,t)},h._g=function(t,n,i){switch(t){case 3:return Y8(this);case 4:return!this.b&&(this.b=new dt(Wt,this,4,7)),this.b;case 5:return!this.c&&(this.c=new dt(Wt,this,5,8)),this.c;case 6:return!this.a&&(this.a=new we(di,this,6,6)),this.a;case 7:return kt(),!this.b&&(this.b=new dt(Wt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new dt(Wt,this,5,8)),this.c.i<=1));case 8:return kt(),!!pS(this);case 9:return kt(),!!ip(this);case 10:return kt(),!this.b&&(this.b=new dt(Wt,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new dt(Wt,this,5,8)),this.c.i!=0)}return Yse(this,t,n,i)},h.hh=function(t,n,i){var s;switch(n){case 3:return this.Cb&&(i=(s=this.Db>>16,s>=0?nce(this,i):this.Cb.ih(this,-1-s,null,i))),Ute(this,u(t,33),i);case 4:return!this.b&&(this.b=new dt(Wt,this,4,7)),Ro(this.b,t,i);case 5:return!this.c&&(this.c=new dt(Wt,this,5,8)),Ro(this.c,t,i);case 6:return!this.a&&(this.a=new we(di,this,6,6)),Ro(this.a,t,i)}return jq(this,t,n,i)},h.jh=function(t,n,i){switch(n){case 3:return Ute(this,null,i);case 4:return!this.b&&(this.b=new dt(Wt,this,4,7)),Lr(this.b,t,i);case 5:return!this.c&&(this.c=new dt(Wt,this,5,8)),Lr(this.c,t,i);case 6:return!this.a&&(this.a=new we(di,this,6,6)),Lr(this.a,t,i)}return pH(this,t,n,i)},h.lh=function(t){switch(t){case 3:return!!Y8(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new dt(Wt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new dt(Wt,this,5,8)),this.c.i<=1));case 8:return pS(this);case 9:return ip(this);case 10:return!this.b&&(this.b=new dt(Wt,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new dt(Wt,this,5,8)),this.c.i!=0)}return dse(this,t)},h.sh=function(t,n){switch(t){case 3:Jq(this,u(n,33));return;case 4:!this.b&&(this.b=new dt(Wt,this,4,7)),Gt(this.b),!this.b&&(this.b=new dt(Wt,this,4,7)),vi(this.b,u(n,14));return;case 5:!this.c&&(this.c=new dt(Wt,this,5,8)),Gt(this.c),!this.c&&(this.c=new dt(Wt,this,5,8)),vi(this.c,u(n,14));return;case 6:!this.a&&(this.a=new we(di,this,6,6)),Gt(this.a),!this.a&&(this.a=new we(di,this,6,6)),vi(this.a,u(n,14));return}ace(this,t,n)},h.zh=function(){return Lo(),Fme},h.Bh=function(t){switch(t){case 3:Jq(this,null);return;case 4:!this.b&&(this.b=new dt(Wt,this,4,7)),Gt(this.b);return;case 5:!this.c&&(this.c=new dt(Wt,this,5,8)),Gt(this.c);return;case 6:!this.a&&(this.a=new we(di,this,6,6)),Gt(this.a);return}Vse(this,t)},h.Ib=function(){return mZe(this)},x(Lg,"ElkEdgeImpl",352),S(439,1985,{105:1,413:1,202:1,439:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},gE),h.Qg=function(t){return Zoe(this,t)},h._g=function(t,n,i){switch(t){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new Fi(yu,this,5)),this.a;case 6:return sFe(this);case 7:return n?uq(this):this.i;case 8:return n?lq(this):this.f;case 9:return!this.g&&(this.g=new dt(di,this,9,10)),this.g;case 10:return!this.e&&(this.e=new dt(di,this,10,9)),this.e;case 11:return this.d}return Voe(this,t,n,i)},h.hh=function(t,n,i){var s,c,a;switch(n){case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Zoe(this,i):this.Cb.ih(this,-1-c,null,i))),Gte(this,u(t,79),i);case 9:return!this.g&&(this.g=new dt(di,this,9,10)),Ro(this.g,t,i);case 10:return!this.e&&(this.e=new dt(di,this,10,9)),Ro(this.e,t,i)}return a=u(ct((s=u(mt(this,16),26),s||(Lo(),dI)),n),66),a.Nj().Qj(this,zo(this),n-Lt((Lo(),dI)),t,i)},h.jh=function(t,n,i){switch(n){case 5:return!this.a&&(this.a=new Fi(yu,this,5)),Lr(this.a,t,i);case 6:return Gte(this,null,i);case 9:return!this.g&&(this.g=new dt(di,this,9,10)),Lr(this.g,t,i);case 10:return!this.e&&(this.e=new dt(di,this,10,9)),Lr(this.e,t,i)}return Ice(this,t,n,i)},h.lh=function(t){switch(t){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!sFe(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return Kie(this,t)},h.sh=function(t,n){switch(t){case 1:eO(this,oe(Oe(n)));return;case 2:nO(this,oe(Oe(n)));return;case 3:J3(this,oe(Oe(n)));return;case 4:tO(this,oe(Oe(n)));return;case 5:!this.a&&(this.a=new Fi(yu,this,5)),Gt(this.a),!this.a&&(this.a=new Fi(yu,this,5)),vi(this.a,u(n,14));return;case 6:vGe(this,u(n,79));return;case 7:wP(this,u(n,82));return;case 8:bP(this,u(n,82));return;case 9:!this.g&&(this.g=new dt(di,this,9,10)),Gt(this.g),!this.g&&(this.g=new dt(di,this,9,10)),vi(this.g,u(n,14));return;case 10:!this.e&&(this.e=new dt(di,this,10,9)),Gt(this.e),!this.e&&(this.e=new dt(di,this,10,9)),vi(this.e,u(n,14));return;case 11:rse(this,un(n));return}Dse(this,t,n)},h.zh=function(){return Lo(),dI},h.Bh=function(t){switch(t){case 1:eO(this,0);return;case 2:nO(this,0);return;case 3:J3(this,0);return;case 4:tO(this,0);return;case 5:!this.a&&(this.a=new Fi(yu,this,5)),Gt(this.a);return;case 6:vGe(this,null);return;case 7:wP(this,null);return;case 8:bP(this,null);return;case 9:!this.g&&(this.g=new dt(di,this,9,10)),Gt(this.g);return;case 10:!this.e&&(this.e=new dt(di,this,10,9)),Gt(this.e);return;case 11:rse(this,null);return}Ose(this,t)},h.Ib=function(){return LUe(this)},h.b=0,h.c=0,h.d=null,h.j=0,h.k=0,x(Lg,"ElkEdgeSectionImpl",439),S(150,115,{105:1,92:1,90:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1}),h._g=function(t,n,i){var s;return t==0?(!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab):_l(this,t-Lt(this.zh()),ct((s=u(mt(this,16),26),s||this.zh()),t),n,i)},h.hh=function(t,n,i){var s,c;return n==0?(!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i)):(c=u(ct((s=u(mt(this,16),26),s||this.zh()),n),66),c.Nj().Qj(this,zo(this),n-Lt(this.zh()),t,i))},h.jh=function(t,n,i){var s,c;return n==0?(!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i)):(c=u(ct((s=u(mt(this,16),26),s||this.zh()),n),66),c.Nj().Rj(this,zo(this),n-Lt(this.zh()),t,i))},h.lh=function(t){var n;return t==0?!!this.Ab&&this.Ab.i!=0:Bl(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.oh=function(t){return xue(this,t)},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return}Wl(this,t-Lt(this.zh()),ct((i=u(mt(this,16),26),i||this.zh()),t),n)},h.uh=function(t){_v(this,128,t)},h.zh=function(){return tt(),Udt},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return}Ql(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.Gh=function(){this.Bb|=1},h.Hh=function(t){return yS(this,t)},h.Bb=0,x(wt,"EModelElementImpl",150),S(704,150,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},_Z),h.Ih=function(t,n){return XZe(this,t,n)},h.Jh=function(t){var n,i,s,c,a;if(this.a!=ml(t)||(t.Bb&256)!=0)throw F(new Ot(HW+t.zb+bp));for(s=Ss(t);wo(s.a).i!=0;){if(i=u(w7(s,0,(n=u(V(wo(s.a),0),87),a=n.c,W(a,88)?u(a,26):(tt(),xu))),26),np(i))return c=ml(i).Nh().Jh(i),u(c,49).th(t),c;s=Ss(i)}return(t.D!=null?t.D:t.B)=="java.util.Map$Entry"?new QRe(t):new Rne(t)},h.Kh=function(t,n){return up(this,t,n)},h._g=function(t,n,i){var s;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.a}return _l(this,t-Lt((tt(),F1)),ct((s=u(mt(this,16),26),s||F1),t),n,i)},h.hh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i);case 1:return this.a&&(i=u(this.a,49).ih(this,4,vf,i)),Wse(this,u(t,235),i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),F1)),n),66),c.Nj().Qj(this,zo(this),n-Lt((tt(),F1)),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 1:return Wse(this,null,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),F1)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),F1)),t,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return Bl(this,t-Lt((tt(),F1)),ct((n=u(mt(this,16),26),n||F1),t))},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:vXe(this,u(n,235));return}Wl(this,t-Lt((tt(),F1)),ct((i=u(mt(this,16),26),i||F1),t),n)},h.zh=function(){return tt(),F1},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:vXe(this,null);return}Ql(this,t-Lt((tt(),F1)),ct((n=u(mt(this,16),26),n||F1),t))};var rx,Qme,Ddt;x(wt,"EFactoryImpl",704),S(qu,704,{105:1,2014:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},R8e),h.Ih=function(t,n){switch(t.yj()){case 12:return u(n,146).tg();case 13:return Ns(n);default:throw F(new Ot(ok+t.ne()+bp))}},h.Jh=function(t){var n,i,s,c,a,g,w,m;switch(t.G==-1&&(t.G=(n=ml(t),n?ld(n.Mh(),t):-1)),t.G){case 4:return a=new IZ,a;case 6:return g=new FJ,g;case 7:return w=new _J,w;case 8:return s=new NZ,s;case 9:return i=new dE,i;case 10:return c=new gE,c;case 11:return m=new L8e,m;default:throw F(new Ot(HW+t.zb+bp))}},h.Kh=function(t,n){switch(t.yj()){case 13:case 12:return null;default:throw F(new Ot(ok+t.ne()+bp))}},x(Lg,"ElkGraphFactoryImpl",qu),S(438,150,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1}),h.Wg=function(){var t,n;return n=(t=u(mt(this,16),26),Nie(dh(t||this.zh()))),n==null?(K4(),K4(),PU):new fIe(this,n)},h._g=function(t,n,i){var s;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.ne()}return _l(this,t-Lt(this.zh()),ct((s=u(mt(this,16),26),s||this.zh()),t),n,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return Bl(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:this.Lh(un(n));return}Wl(this,t-Lt(this.zh()),ct((i=u(mt(this,16),26),i||this.zh()),t),n)},h.zh=function(){return tt(),Gdt},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:this.Lh(null);return}Ql(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.ne=function(){return this.zb},h.Lh=function(t){Io(this,t)},h.Ib=function(){return Y5(this)},h.zb=null,x(wt,"ENamedElementImpl",438),S(179,438,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},zBe),h.Qg=function(t){return $Ve(this,t)},h._g=function(t,n,i){var s;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new gb(this,yf,this)),this.rb;case 6:return!this.vb&&(this.vb=new wv(vf,this,6,7)),this.vb;case 7:return n?this.Db>>16==7?u(this.Cb,235):null:oFe(this)}return _l(this,t-Lt((tt(),Ad)),ct((s=u(mt(this,16),26),s||Ad),t),n,i)},h.hh=function(t,n,i){var s,c,a;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i);case 4:return this.sb&&(i=u(this.sb,49).ih(this,1,ix,i)),Use(this,u(t,471),i);case 5:return!this.rb&&(this.rb=new gb(this,yf,this)),Ro(this.rb,t,i);case 6:return!this.vb&&(this.vb=new wv(vf,this,6,7)),Ro(this.vb,t,i);case 7:return this.Cb&&(i=(c=this.Db>>16,c>=0?$Ve(this,i):this.Cb.ih(this,-1-c,null,i))),Sl(this,t,7,i)}return a=u(ct((s=u(mt(this,16),26),s||(tt(),Ad)),n),66),a.Nj().Qj(this,zo(this),n-Lt((tt(),Ad)),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 4:return Use(this,null,i);case 5:return!this.rb&&(this.rb=new gb(this,yf,this)),Lr(this.rb,t,i);case 6:return!this.vb&&(this.vb=new wv(vf,this,6,7)),Lr(this.vb,t,i);case 7:return Sl(this,null,7,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),Ad)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),Ad)),t,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!oFe(this)}return Bl(this,t-Lt((tt(),Ad)),ct((n=u(mt(this,16),26),n||Ad),t))},h.oh=function(t){var n;return n=THt(this,t),n||xue(this,t)},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:Io(this,un(n));return;case 2:xP(this,un(n));return;case 3:SP(this,un(n));return;case 4:Iq(this,u(n,471));return;case 5:!this.rb&&(this.rb=new gb(this,yf,this)),Gt(this.rb),!this.rb&&(this.rb=new gb(this,yf,this)),vi(this.rb,u(n,14));return;case 6:!this.vb&&(this.vb=new wv(vf,this,6,7)),Gt(this.vb),!this.vb&&(this.vb=new wv(vf,this,6,7)),vi(this.vb,u(n,14));return}Wl(this,t-Lt((tt(),Ad)),ct((i=u(mt(this,16),26),i||Ad),t),n)},h.vh=function(t){var n,i;if(t&&this.rb)for(i=new Ft(this.rb);i.e!=i.i.gc();)n=Qt(i),W(n,351)&&(u(n,351).w=null);_v(this,64,t)},h.zh=function(){return tt(),Ad},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:Io(this,null);return;case 2:xP(this,null);return;case 3:SP(this,null);return;case 4:Iq(this,null);return;case 5:!this.rb&&(this.rb=new gb(this,yf,this)),Gt(this.rb);return;case 6:!this.vb&&(this.vb=new wv(vf,this,6,7)),Gt(this.vb);return}Ql(this,t-Lt((tt(),Ad)),ct((n=u(mt(this,16),26),n||Ad),t))},h.Gh=function(){kq(this)},h.Mh=function(){return!this.rb&&(this.rb=new gb(this,yf,this)),this.rb},h.Nh=function(){return this.sb},h.Oh=function(){return this.ub},h.Ph=function(){return this.xb},h.Qh=function(){return this.yb},h.Rh=function(t){this.ub=t},h.Ib=function(){var t;return(this.Db&64)!=0?Y5(this):(t=new nu(Y5(this)),t.a+=" (nsURI: ",us(t,this.yb),t.a+=", nsPrefix: ",us(t,this.xb),t.a+=")",t.a)},h.xb=null,h.yb=null,x(wt,"EPackageImpl",179),S(555,179,{105:1,2016:1,555:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},KUe),h.q=!1,h.r=!1;var $dt=!1;x(Lg,"ElkGraphPackageImpl",555),S(354,724,{105:1,413:1,160:1,137:1,470:1,354:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},IZ),h.Qg=function(t){return Joe(this,t)},h._g=function(t,n,i){switch(t){case 7:return cFe(this);case 8:return this.a}return coe(this,t,n,i)},h.hh=function(t,n,i){var s;switch(n){case 7:return this.Cb&&(i=(s=this.Db>>16,s>=0?Joe(this,i):this.Cb.ih(this,-1-s,null,i))),Yne(this,u(t,160),i)}return jq(this,t,n,i)},h.jh=function(t,n,i){return n==7?Yne(this,null,i):pH(this,t,n,i)},h.lh=function(t){switch(t){case 7:return!!cFe(this);case 8:return!et("",this.a)}return goe(this,t)},h.sh=function(t,n){switch(t){case 7:Ple(this,u(n,160));return;case 8:Yre(this,un(n));return}dce(this,t,n)},h.zh=function(){return Lo(),_me},h.Bh=function(t){switch(t){case 7:Ple(this,null);return;case 8:Yre(this,"");return}voe(this,t)},h.Ib=function(){return $Xe(this)},h.a="",x(Lg,"ElkLabelImpl",354),S(239,725,{105:1,413:1,82:1,160:1,33:1,470:1,239:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},FJ),h.Qg=function(t){return ice(this,t)},h._g=function(t,n,i){switch(t){case 9:return!this.c&&(this.c=new we(Yc,this,9,9)),this.c;case 10:return!this.a&&(this.a=new we(mi,this,10,11)),this.a;case 11:return bi(this);case 12:return!this.b&&(this.b=new we(nr,this,12,3)),this.b;case 13:return kt(),!this.a&&(this.a=new we(mi,this,10,11)),this.a.i>0}return Hoe(this,t,n,i)},h.hh=function(t,n,i){var s;switch(n){case 9:return!this.c&&(this.c=new we(Yc,this,9,9)),Ro(this.c,t,i);case 10:return!this.a&&(this.a=new we(mi,this,10,11)),Ro(this.a,t,i);case 11:return this.Cb&&(i=(s=this.Db>>16,s>=0?ice(this,i):this.Cb.ih(this,-1-s,null,i))),sne(this,u(t,33),i);case 12:return!this.b&&(this.b=new we(nr,this,12,3)),Ro(this.b,t,i)}return oce(this,t,n,i)},h.jh=function(t,n,i){switch(n){case 9:return!this.c&&(this.c=new we(Yc,this,9,9)),Lr(this.c,t,i);case 10:return!this.a&&(this.a=new we(mi,this,10,11)),Lr(this.a,t,i);case 11:return sne(this,null,i);case 12:return!this.b&&(this.b=new we(nr,this,12,3)),Lr(this.b,t,i)}return cce(this,t,n,i)},h.lh=function(t){switch(t){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!bi(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new we(mi,this,10,11)),this.a.i>0}return Pse(this,t)},h.sh=function(t,n){switch(t){case 9:!this.c&&(this.c=new we(Yc,this,9,9)),Gt(this.c),!this.c&&(this.c=new we(Yc,this,9,9)),vi(this.c,u(n,14));return;case 10:!this.a&&(this.a=new we(mi,this,10,11)),Gt(this.a),!this.a&&(this.a=new we(mi,this,10,11)),vi(this.a,u(n,14));return;case 11:Ele(this,u(n,33));return;case 12:!this.b&&(this.b=new we(nr,this,12,3)),Gt(this.b),!this.b&&(this.b=new we(nr,this,12,3)),vi(this.b,u(n,14));return}ble(this,t,n)},h.zh=function(){return Lo(),Hme},h.Bh=function(t){switch(t){case 9:!this.c&&(this.c=new we(Yc,this,9,9)),Gt(this.c);return;case 10:!this.a&&(this.a=new we(mi,this,10,11)),Gt(this.a);return;case 11:Ele(this,null);return;case 12:!this.b&&(this.b=new we(nr,this,12,3)),Gt(this.b);return}$oe(this,t)},h.Ib=function(){return Wle(this)},x(Lg,"ElkNodeImpl",239),S(186,725,{105:1,413:1,82:1,160:1,118:1,470:1,186:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},_J),h.Qg=function(t){return ece(this,t)},h._g=function(t,n,i){return t==9?Mf(this):Hoe(this,t,n,i)},h.hh=function(t,n,i){var s;switch(n){case 9:return this.Cb&&(i=(s=this.Db>>16,s>=0?ece(this,i):this.Cb.ih(this,-1-s,null,i))),Yte(this,u(t,33),i)}return oce(this,t,n,i)},h.jh=function(t,n,i){return n==9?Yte(this,null,i):cce(this,t,n,i)},h.lh=function(t){return t==9?!!Mf(this):Pse(this,t)},h.sh=function(t,n){switch(t){case 9:Tle(this,u(n,33));return}ble(this,t,n)},h.zh=function(){return Lo(),qme},h.Bh=function(t){switch(t){case 9:Tle(this,null);return}$oe(this,t)},h.Ib=function(){return vYe(this)},x(Lg,"ElkPortImpl",186);var Ndt=hi(Br,"BasicEMap/Entry");S(1092,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,114:1,115:1},L8e),h.Fb=function(t){return this===t},h.cd=function(){return this.b},h.Hb=function(){return C0(this)},h.Uh=function(t){Zre(this,u(t,146))},h._g=function(t,n,i){switch(t){case 0:return this.b;case 1:return this.c}return ij(this,t,n,i)},h.lh=function(t){switch(t){case 0:return!!this.b;case 1:return this.c!=null}return rq(this,t)},h.sh=function(t,n){switch(t){case 0:Zre(this,u(n,146));return;case 1:tse(this,n);return}qq(this,t,n)},h.zh=function(){return Lo(),I1},h.Bh=function(t){switch(t){case 0:Zre(this,null);return;case 1:tse(this,null);return}Lq(this,t)},h.Sh=function(){var t;return this.a==-1&&(t=this.b,this.a=t?ci(t):0),this.a},h.dd=function(){return this.c},h.Th=function(t){this.a=t},h.ed=function(t){var n;return n=this.c,tse(this,t),n},h.Ib=function(){var t;return(this.Db&64)!=0?_u(this):(t=new Fd,wn(wn(wn(t,this.b?this.b.tg():uc),Bz),g5(this.c)),t.a)},h.a=-1,h.c=null;var Np=x(Lg,"ElkPropertyToValueMapEntryImpl",1092);S(984,1,{},_8e),x(xr,"JsonAdapter",984),S(210,60,Ma,ih),x(xr,"JsonImportException",210),S(857,1,{},NVe),x(xr,"JsonImporter",857),S(891,1,{},u$e),x(xr,"JsonImporter/lambda$0$Type",891),S(892,1,{},f$e),x(xr,"JsonImporter/lambda$1$Type",892),S(900,1,{},zAe),x(xr,"JsonImporter/lambda$10$Type",900),S(902,1,{},h$e),x(xr,"JsonImporter/lambda$11$Type",902),S(903,1,{},a$e),x(xr,"JsonImporter/lambda$12$Type",903),S(909,1,{},xBe),x(xr,"JsonImporter/lambda$13$Type",909),S(908,1,{},SBe),x(xr,"JsonImporter/lambda$14$Type",908),S(904,1,{},d$e),x(xr,"JsonImporter/lambda$15$Type",904),S(905,1,{},g$e),x(xr,"JsonImporter/lambda$16$Type",905),S(906,1,{},p$e),x(xr,"JsonImporter/lambda$17$Type",906),S(907,1,{},b$e),x(xr,"JsonImporter/lambda$18$Type",907),S(912,1,{},WAe),x(xr,"JsonImporter/lambda$19$Type",912),S(893,1,{},KAe),x(xr,"JsonImporter/lambda$2$Type",893),S(910,1,{},VAe),x(xr,"JsonImporter/lambda$20$Type",910),S(911,1,{},XAe),x(xr,"JsonImporter/lambda$21$Type",911),S(915,1,{},UAe),x(xr,"JsonImporter/lambda$22$Type",915),S(913,1,{},GAe),x(xr,"JsonImporter/lambda$23$Type",913),S(914,1,{},YAe),x(xr,"JsonImporter/lambda$24$Type",914),S(917,1,{},ZAe),x(xr,"JsonImporter/lambda$25$Type",917),S(916,1,{},JAe),x(xr,"JsonImporter/lambda$26$Type",916),S(918,1,$t,w$e),h.td=function(t){tAt(this.b,this.a,un(t))},x(xr,"JsonImporter/lambda$27$Type",918),S(919,1,$t,m$e),h.td=function(t){nAt(this.b,this.a,un(t))},x(xr,"JsonImporter/lambda$28$Type",919),S(920,1,{},v$e),x(xr,"JsonImporter/lambda$29$Type",920),S(896,1,{},eMe),x(xr,"JsonImporter/lambda$3$Type",896),S(921,1,{},y$e),x(xr,"JsonImporter/lambda$30$Type",921),S(922,1,{},tMe),x(xr,"JsonImporter/lambda$31$Type",922),S(923,1,{},nMe),x(xr,"JsonImporter/lambda$32$Type",923),S(924,1,{},iMe),x(xr,"JsonImporter/lambda$33$Type",924),S(925,1,{},rMe),x(xr,"JsonImporter/lambda$34$Type",925),S(859,1,{},sMe),x(xr,"JsonImporter/lambda$35$Type",859),S(929,1,{},pRe),x(xr,"JsonImporter/lambda$36$Type",929),S(926,1,$t,oMe),h.td=function(t){sEt(this.a,u(t,469))},x(xr,"JsonImporter/lambda$37$Type",926),S(927,1,$t,T$e),h.td=function(t){$4t(this.a,this.b,u(t,202))},x(xr,"JsonImporter/lambda$38$Type",927),S(928,1,$t,E$e),h.td=function(t){N4t(this.a,this.b,u(t,202))},x(xr,"JsonImporter/lambda$39$Type",928),S(894,1,{},cMe),x(xr,"JsonImporter/lambda$4$Type",894),S(930,1,$t,lMe),h.td=function(t){oEt(this.a,u(t,8))},x(xr,"JsonImporter/lambda$40$Type",930),S(895,1,{},uMe),x(xr,"JsonImporter/lambda$5$Type",895),S(899,1,{},fMe),x(xr,"JsonImporter/lambda$6$Type",899),S(897,1,{},hMe),x(xr,"JsonImporter/lambda$7$Type",897),S(898,1,{},aMe),x(xr,"JsonImporter/lambda$8$Type",898),S(901,1,{},dMe),x(xr,"JsonImporter/lambda$9$Type",901),S(948,1,$t,gMe),h.td=function(t){Sv(this.a,new pb(un(t)))},x(xr,"JsonMetaDataConverter/lambda$0$Type",948),S(949,1,$t,pMe),h.td=function(t){k9t(this.a,u(t,237))},x(xr,"JsonMetaDataConverter/lambda$1$Type",949),S(950,1,$t,bMe),h.td=function(t){vCt(this.a,u(t,149))},x(xr,"JsonMetaDataConverter/lambda$2$Type",950),S(951,1,$t,wMe),h.td=function(t){S9t(this.a,u(t,175))},x(xr,"JsonMetaDataConverter/lambda$3$Type",951),S(237,22,{3:1,35:1,22:1,237:1},dv);var gI,pI,SU,bI,wI,mI,xU,CU,vI=hn(j7,"GraphFeature",237,gn,WAt,Vxt),Idt;S(13,1,{35:1,146:1},li,Wi,ot,Xr),h.wd=function(t){return D5t(this,u(t,146))},h.Fb=function(t){return WBe(this,t)},h.wg=function(){return Ae(this)},h.tg=function(){return this.b},h.Hb=function(){return ud(this.b)},h.Ib=function(){return this.b},x(j7,"Property",13),S(818,1,Yn,mJ),h.ue=function(t,n){return Gjt(this,u(t,94),u(n,94))},h.Fb=function(t){return this===t},h.ve=function(){return new Kn(this)},x(j7,"PropertyHolderComparator",818),S(695,1,fr,vJ),h.Nb=function(t){Or(this,t)},h.Pb=function(){return oAt(this)},h.Qb=function(){fje()},h.Ob=function(){return!!this.a},x(BD,"ElkGraphUtil/AncestorIterator",695);var zme=hi(Br,"EList");S(67,52,{20:1,28:1,52:1,14:1,15:1,67:1,58:1}),h.Vc=function(t,n){eS(this,t,n)},h.Fc=function(t){return rn(this,t)},h.Wc=function(t,n){return kse(this,t,n)},h.Gc=function(t){return vi(this,t)},h.Zh=function(){return new bv(this)},h.$h=function(){return new M8(this)},h._h=function(t){return y9(this,t)},h.ai=function(){return!0},h.bi=function(t,n){},h.ci=function(){},h.di=function(t,n){__(this,t,n)},h.ei=function(t,n,i){},h.fi=function(t,n){},h.gi=function(t,n,i){},h.Fb=function(t){return sYe(this,t)},h.Hb=function(){return wse(this)},h.hi=function(){return!1},h.Kc=function(){return new Ft(this)},h.Yc=function(){return new pv(this)},h.Zc=function(t){var n;if(n=this.gc(),t<0||t>n)throw F(new hb(t,n));return new WF(this,t)},h.ji=function(t,n){this.ii(t,this.Xc(n))},h.Mc=function(t){return iP(this,t)},h.li=function(t,n){return n},h._c=function(t,n){return Cm(this,t,n)},h.Ib=function(){return uoe(this)},h.ni=function(){return!0},h.oi=function(t,n){return gO(this,n)},x(Br,"AbstractEList",67),S(63,67,xh,bE,q0,use),h.Vh=function(t,n){return Dq(this,t,n)},h.Wh=function(t){return cVe(this,t)},h.Xh=function(t,n){I9(this,t,n)},h.Yh=function(t){i9(this,t)},h.pi=function(t){return Pre(this,t)},h.$b=function(){F5(this)},h.Hc=function(t){return MO(this,t)},h.Xb=function(t){return V(this,t)},h.qi=function(t){var n,i,s;++this.j,i=this.g==null?0:this.g.length,t>i&&(s=this.g,n=i+(i/2|0)+4,n=0?(this.$c(n),!0):!1},h.mi=function(t,n){return this.Ui(t,this.oi(t,n))},h.gc=function(){return this.Vi()},h.Pc=function(){return this.Wi()},h.Qc=function(t){return this.Xi(t)},h.Ib=function(){return this.Yi()},x(Br,"DelegatingEList",1995),S(1996,1995,iit),h.Vh=function(t,n){return eue(this,t,n)},h.Wh=function(t){return this.Vh(this.Vi(),t)},h.Xh=function(t,n){zUe(this,t,n)},h.Yh=function(t){IUe(this,t)},h.ai=function(){return!this.bj()},h.$b=function(){TS(this)},h.Zi=function(t,n,i,s,c){return new VBe(this,t,n,i,s,c)},h.$i=function(t){Hn(this.Ai(),t)},h._i=function(){return null},h.aj=function(){return-1},h.Ai=function(){return null},h.bj=function(){return!1},h.cj=function(t,n){return n},h.dj=function(t,n){return n},h.ej=function(){return!1},h.fj=function(){return!this.Ri()},h.ii=function(t,n){var i,s;return this.ej()?(s=this.fj(),i=Dce(this,t,n),this.$i(this.Zi(7,me(n),i,t,s)),i):Dce(this,t,n)},h.$c=function(t){var n,i,s,c;return this.ej()?(i=null,s=this.fj(),n=this.Zi(4,c=GA(this,t),null,t,s),this.bj()&&c?(i=this.dj(c,i),i?(i.Ei(n),i.Fi()):this.$i(n)):i?(i.Ei(n),i.Fi()):this.$i(n),c):(c=GA(this,t),this.bj()&&c&&(i=this.dj(c,null),i&&i.Fi()),c)},h.mi=function(t,n){return ZYe(this,t,n)},x(ly,"DelegatingNotifyingListImpl",1996),S(143,1,W7),h.Ei=function(t){return vce(this,t)},h.Fi=function(){U_(this)},h.xi=function(){return this.d},h._i=function(){return null},h.gj=function(){return null},h.yi=function(t){return-1},h.zi=function(){return BGe(this)},h.Ai=function(){return null},h.Bi=function(){return Ile(this)},h.Ci=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},h.hj=function(){return!1},h.Di=function(t){var n,i,s,c,a,g,w,m,y,k,E;switch(this.d){case 1:case 2:switch(c=t.xi(),c){case 1:case 2:if(a=t.Ai(),ie(a)===ie(this.Ai())&&this.yi(null)==t.yi(null))return this.g=t.zi(),t.xi()==1&&(this.d=1),!0}case 4:{switch(c=t.xi(),c){case 4:{if(a=t.Ai(),ie(a)===ie(this.Ai())&&this.yi(null)==t.yi(null))return y=wue(this),m=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,g=t.Ci(),this.d=6,E=new q0(2),m<=g?(rn(E,this.n),rn(E,t.Bi()),this.g=H(_(Zt,1),On,25,15,[this.o=m,g+1])):(rn(E,t.Bi()),rn(E,this.n),this.g=H(_(Zt,1),On,25,15,[this.o=g,m])),this.n=E,y||(this.o=-2-this.o-1),!0;break}}break}case 6:{switch(c=t.xi(),c){case 4:{if(a=t.Ai(),ie(a)===ie(this.Ai())&&this.yi(null)==t.yi(null)){for(y=wue(this),g=t.Ci(),k=u(this.g,48),s=J(Zt,On,25,k.length+1,15,1),n=0;n>>0,n.toString(16))),s.a+=" (eventType: ",this.d){case 1:{s.a+="SET";break}case 2:{s.a+="UNSET";break}case 3:{s.a+="ADD";break}case 5:{s.a+="ADD_MANY";break}case 4:{s.a+="REMOVE";break}case 6:{s.a+="REMOVE_MANY";break}case 7:{s.a+="MOVE";break}case 8:{s.a+="REMOVING_ADAPTER";break}case 9:{s.a+="RESOLVE";break}default:{gB(s,this.d);break}}if(TYe(this)&&(s.a+=", touch: true"),s.a+=", position: ",gB(s,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),s.a+=", notifier: ",l5(s,this.Ai()),s.a+=", feature: ",l5(s,this._i()),s.a+=", oldValue: ",l5(s,Ile(this)),s.a+=", newValue: ",this.d==6&&W(this.g,48)){for(i=u(this.g,48),s.a+="[",t=0;t10?((!this.b||this.c.j!=this.a)&&(this.b=new O5(this),this.a=this.j),fa(this.b,t)):MO(this,t)},h.ni=function(){return!0},h.a=0,x(Br,"AbstractEList/1",953),S(295,73,lz,hb),x(Br,"AbstractEList/BasicIndexOutOfBoundsException",295),S(40,1,fr,Ft),h.Nb=function(t){Or(this,t)},h.mj=function(){if(this.i.j!=this.f)throw F(new Nl)},h.nj=function(){return Qt(this)},h.Ob=function(){return this.e!=this.i.gc()},h.Pb=function(){return this.nj()},h.Qb=function(){fS(this)},h.e=0,h.f=0,h.g=-1,x(Br,"AbstractEList/EIterator",40),S(278,40,Vh,pv,WF),h.Qb=function(){fS(this)},h.Rb=function(t){uKe(this,t)},h.oj=function(){var t;try{return t=this.d.Xb(--this.e),this.mj(),this.g=this.e,t}catch(n){throw n=fi(n),W(n,73)?(this.mj(),F(new ro)):F(n)}},h.pj=function(t){fVe(this,t)},h.Sb=function(){return this.e!=0},h.Tb=function(){return this.e},h.Ub=function(){return this.oj()},h.Vb=function(){return this.e-1},h.Wb=function(t){this.pj(t)},x(Br,"AbstractEList/EListIterator",278),S(341,40,fr,bv),h.nj=function(){return sq(this)},h.Qb=function(){throw F(new on)},x(Br,"AbstractEList/NonResolvingEIterator",341),S(385,278,Vh,M8,ane),h.Rb=function(t){throw F(new on)},h.nj=function(){var t;try{return t=this.c.ki(this.e),this.mj(),this.g=this.e++,t}catch(n){throw n=fi(n),W(n,73)?(this.mj(),F(new ro)):F(n)}},h.oj=function(){var t;try{return t=this.c.ki(--this.e),this.mj(),this.g=this.e,t}catch(n){throw n=fi(n),W(n,73)?(this.mj(),F(new ro)):F(n)}},h.Qb=function(){throw F(new on)},h.Wb=function(t){throw F(new on)},x(Br,"AbstractEList/NonResolvingEListIterator",385),S(1982,67,rit),h.Vh=function(t,n){var i,s,c,a,g,w,m,y,k,E,M;if(c=n.gc(),c!=0){for(y=u(mt(this.a,4),126),k=y==null?0:y.length,M=k+c,s=EH(this,M),E=k-t,E>0&&vo(y,t,s,t+c,E),m=n.Kc(),g=0;gi)throw F(new hb(t,i));return new rBe(this,t)},h.$b=function(){var t,n;++this.j,t=u(mt(this.a,4),126),n=t==null?0:t.length,CO(this,null),__(this,n,t)},h.Hc=function(t){var n,i,s,c,a;if(n=u(mt(this.a,4),126),n!=null){if(t!=null){for(s=n,c=0,a=s.length;c=i)throw F(new hb(t,i));return n[t]},h.Xc=function(t){var n,i,s;if(n=u(mt(this.a,4),126),n!=null){if(t!=null){for(i=0,s=n.length;ii)throw F(new hb(t,i));return new iBe(this,t)},h.ii=function(t,n){var i,s,c;if(i=wKe(this),c=i==null?0:i.length,t>=c)throw F(new gs(GW+t+Bg+c));if(n>=c)throw F(new gs(YW+n+Bg+c));return s=i[n],t!=n&&(t0&&vo(t,0,n,0,i),n},h.Qc=function(t){var n,i,s;return n=u(mt(this.a,4),126),s=n==null?0:n.length,s>0&&(t.lengths&&pi(t,s,null),t};var Rdt;x(Br,"ArrayDelegatingEList",1982),S(1038,40,fr,dHe),h.mj=function(){if(this.b.j!=this.f||ie(u(mt(this.b.a,4),126))!==ie(this.a))throw F(new Nl)},h.Qb=function(){fS(this),this.a=u(mt(this.b.a,4),126)},x(Br,"ArrayDelegatingEList/EIterator",1038),S(706,278,Vh,ELe,iBe),h.mj=function(){if(this.b.j!=this.f||ie(u(mt(this.b.a,4),126))!==ie(this.a))throw F(new Nl)},h.pj=function(t){fVe(this,t),this.a=u(mt(this.b.a,4),126)},h.Qb=function(){fS(this),this.a=u(mt(this.b.a,4),126)},x(Br,"ArrayDelegatingEList/EListIterator",706),S(1039,341,fr,gHe),h.mj=function(){if(this.b.j!=this.f||ie(u(mt(this.b.a,4),126))!==ie(this.a))throw F(new Nl)},x(Br,"ArrayDelegatingEList/NonResolvingEIterator",1039),S(707,385,Vh,ALe,rBe),h.mj=function(){if(this.b.j!=this.f||ie(u(mt(this.b.a,4),126))!==ie(this.a))throw F(new Nl)},x(Br,"ArrayDelegatingEList/NonResolvingEListIterator",707),S(606,295,lz,XB),x(Br,"BasicEList/BasicIndexOutOfBoundsException",606),S(696,63,xh,Yee),h.Vc=function(t,n){throw F(new on)},h.Fc=function(t){throw F(new on)},h.Wc=function(t,n){throw F(new on)},h.Gc=function(t){throw F(new on)},h.$b=function(){throw F(new on)},h.qi=function(t){throw F(new on)},h.Kc=function(){return this.Zh()},h.Yc=function(){return this.$h()},h.Zc=function(t){return this._h(t)},h.ii=function(t,n){throw F(new on)},h.ji=function(t,n){throw F(new on)},h.$c=function(t){throw F(new on)},h.Mc=function(t){throw F(new on)},h._c=function(t,n){throw F(new on)},x(Br,"BasicEList/UnmodifiableEList",696),S(705,1,{3:1,20:1,14:1,15:1,58:1,589:1}),h.Vc=function(t,n){k5t(this,t,u(n,42))},h.Fc=function(t){return lSt(this,u(t,42))},h.Jc=function(t){Sr(this,t)},h.Xb=function(t){return u(V(this.c,t),133)},h.ii=function(t,n){return u(this.c.ii(t,n),42)},h.ji=function(t,n){S5t(this,t,u(n,42))},h.Lc=function(){return new ht(null,new gt(this,16))},h.$c=function(t){return u(this.c.$c(t),42)},h._c=function(t,n){return b9t(this,t,u(n,42))},h.ad=function(t){wm(this,t)},h.Nc=function(){return new gt(this,16)},h.Oc=function(){return new ht(null,new gt(this,16))},h.Wc=function(t,n){return this.c.Wc(t,n)},h.Gc=function(t){return this.c.Gc(t)},h.$b=function(){this.c.$b()},h.Hc=function(t){return this.c.Hc(t)},h.Ic=function(t){return C9(this.c,t)},h.qj=function(){var t,n,i;if(this.d==null){for(this.d=J(Wme,$ae,63,2*this.f+1,0,1),i=this.e,this.f=0,n=this.c.Kc();n.e!=n.i.gc();)t=u(n.nj(),133),oj(this,t);this.e=i}},h.Fb=function(t){return JIe(this,t)},h.Hb=function(){return wse(this.c)},h.Xc=function(t){return this.c.Xc(t)},h.rj=function(){this.c=new vMe(this)},h.dc=function(){return this.f==0},h.Kc=function(){return this.c.Kc()},h.Yc=function(){return this.c.Yc()},h.Zc=function(t){return this.c.Zc(t)},h.sj=function(){return o9(this)},h.tj=function(t,n,i){return new bRe(t,n,i)},h.uj=function(){return new z8e},h.Mc=function(t){return DQe(this,t)},h.gc=function(){return this.f},h.bd=function(t,n){return new qh(this.c,t,n)},h.Pc=function(){return this.c.Pc()},h.Qc=function(t){return this.c.Qc(t)},h.Ib=function(){return uoe(this.c)},h.e=0,h.f=0,x(Br,"BasicEMap",705),S(1033,63,xh,vMe),h.bi=function(t,n){skt(this,u(n,133))},h.ei=function(t,n,i){var s;++(s=this,u(n,133),s).a.e},h.fi=function(t,n){okt(this,u(n,133))},h.gi=function(t,n,i){U5t(this,u(n,133),u(i,133))},h.di=function(t,n){kze(this.a)},x(Br,"BasicEMap/1",1033),S(1034,63,xh,z8e),h.ri=function(t){return J(wUt,sit,612,t,0,1)},x(Br,"BasicEMap/2",1034),S(1035,Hf,kc,yMe),h.$b=function(){this.a.c.$b()},h.Hc=function(t){return GH(this.a,t)},h.Kc=function(){return this.a.f==0?(M3(),rT.a):new tje(this.a)},h.Mc=function(t){var n;return n=this.a.f,UP(this.a,t),this.a.f!=n},h.gc=function(){return this.a.f},x(Br,"BasicEMap/3",1035),S(1036,28,zb,OMe),h.$b=function(){this.a.c.$b()},h.Hc=function(t){return oYe(this.a,t)},h.Kc=function(){return this.a.f==0?(M3(),rT.a):new nje(this.a)},h.gc=function(){return this.a.f},x(Br,"BasicEMap/4",1036),S(1037,Hf,kc,kMe),h.$b=function(){this.a.c.$b()},h.Hc=function(t){var n,i,s,c,a,g,w,m,y;if(this.a.f>0&&W(t,42)&&(this.a.qj(),m=u(t,42),w=m.cd(),c=w==null?0:ci(w),a=Zte(this.a,c),n=this.a.d[a],n)){for(i=u(n.g,367),y=n.i,g=0;g"+this.c},h.a=0;var wUt=x(Br,"BasicEMap/EntryImpl",612);S(536,1,{},pE),x(Br,"BasicEMap/View",536);var rT;S(768,1,{}),h.Fb=function(t){return wle((rt(),Yr),t)},h.Hb=function(){return Mse((rt(),Yr))},h.Ib=function(){return u1((rt(),Yr))},x(Br,"ECollections/BasicEmptyUnmodifiableEList",768),S(1312,1,Vh,W8e),h.Nb=function(t){Or(this,t)},h.Rb=function(t){throw F(new on)},h.Ob=function(){return!1},h.Sb=function(){return!1},h.Pb=function(){throw F(new ro)},h.Tb=function(){return 0},h.Ub=function(){throw F(new ro)},h.Vb=function(){return-1},h.Qb=function(){throw F(new on)},h.Wb=function(t){throw F(new on)},x(Br,"ECollections/BasicEmptyUnmodifiableEList/1",1312),S(1310,768,{20:1,14:1,15:1,58:1},aPe),h.Vc=function(t,n){Sje()},h.Fc=function(t){return xje()},h.Wc=function(t,n){return Cje()},h.Gc=function(t){return Tje()},h.$b=function(){Eje()},h.Hc=function(t){return!1},h.Ic=function(t){return!1},h.Jc=function(t){Sr(this,t)},h.Xb=function(t){return ete((rt(),t)),null},h.Xc=function(t){return-1},h.dc=function(){return!0},h.Kc=function(){return this.a},h.Yc=function(){return this.a},h.Zc=function(t){return this.a},h.ii=function(t,n){return Aje()},h.ji=function(t,n){Mje()},h.Lc=function(){return new ht(null,new gt(this,16))},h.$c=function(t){return Pje()},h.Mc=function(t){return jje()},h._c=function(t,n){return Dje()},h.gc=function(){return 0},h.ad=function(t){wm(this,t)},h.Nc=function(){return new gt(this,16)},h.Oc=function(){return new ht(null,new gt(this,16))},h.bd=function(t,n){return rt(),new qh(Yr,t,n)},h.Pc=function(){return eie((rt(),Yr))},h.Qc=function(t){return rt(),z9(Yr,t)},x(Br,"ECollections/EmptyUnmodifiableEList",1310),S(1311,768,{20:1,14:1,15:1,58:1,589:1},dPe),h.Vc=function(t,n){Sje()},h.Fc=function(t){return xje()},h.Wc=function(t,n){return Cje()},h.Gc=function(t){return Tje()},h.$b=function(){Eje()},h.Hc=function(t){return!1},h.Ic=function(t){return!1},h.Jc=function(t){Sr(this,t)},h.Xb=function(t){return ete((rt(),t)),null},h.Xc=function(t){return-1},h.dc=function(){return!0},h.Kc=function(){return this.a},h.Yc=function(){return this.a},h.Zc=function(t){return this.a},h.ii=function(t,n){return Aje()},h.ji=function(t,n){Mje()},h.Lc=function(){return new ht(null,new gt(this,16))},h.$c=function(t){return Pje()},h.Mc=function(t){return jje()},h._c=function(t,n){return Dje()},h.gc=function(){return 0},h.ad=function(t){wm(this,t)},h.Nc=function(){return new gt(this,16)},h.Oc=function(){return new ht(null,new gt(this,16))},h.bd=function(t,n){return rt(),new qh(Yr,t,n)},h.Pc=function(){return eie((rt(),Yr))},h.Qc=function(t){return rt(),z9(Yr,t)},h.sj=function(){return rt(),rt(),ea},x(Br,"ECollections/EmptyUnmodifiableEMap",1311);var Vme=hi(Br,"Enumerator"),yI;S(281,1,{281:1},rQ),h.Fb=function(t){var n;return this===t?!0:W(t,281)?(n=u(t,281),this.f==n.f&&L8t(this.i,n.i)&&jF(this.a,(this.f&256)!=0?(n.f&256)!=0?n.a:null:(n.f&256)!=0?null:n.a)&&jF(this.d,n.d)&&jF(this.g,n.g)&&jF(this.e,n.e)&&j$t(this,n)):!1},h.Hb=function(){return this.f},h.Ib=function(){return LYe(this)},h.f=0;var Ldt=0,Bdt=0,Fdt=0,_dt=0,Xme=0,Ume=0,Gme=0,Yme=0,Zme=0,Hdt,sx=0,ox=0,qdt=0,Qdt=0,OI,Jme;x(Br,"URI",281),S(1091,43,qm,gPe),h.zc=function(t,n){return u(bs(this,un(t),u(n,281)),281)},x(Br,"URI/URICache",1091),S(497,63,xh,F8e,ZA),h.hi=function(){return!0},x(Br,"UniqueEList",497),S(581,60,Ma,eP),x(Br,"WrappedException",581);var Sn=hi(Kl,lit),Sw=hi(Kl,uit),dc=hi(Kl,fit),xw=hi(Kl,hit),yf=hi(Kl,ait),Ou=hi(Kl,"EClass"),AU=hi(Kl,"EDataType"),zdt;S(1183,43,qm,pPe),h.xc=function(t){return lr(t)?ko(this,t):Xs(xs(this.f,t))},x(Kl,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1183);var kI=hi(Kl,"EEnum"),Ba=hi(Kl,dit),os=hi(Kl,git),ku=hi(Kl,pit),Su,Ip=hi(Kl,bit),Cw=hi(Kl,wit);S(1029,1,{},B8e),h.Ib=function(){return"NIL"},x(Kl,"EStructuralFeature/Internal/DynamicValueHolder/1",1029);var Wdt;S(1028,43,qm,bPe),h.xc=function(t){return lr(t)?ko(this,t):Xs(xs(this.f,t))},x(Kl,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",1028);var Go=hi(Kl,mit),jy=hi(Kl,"EValidator/PatternMatcher"),e2e,t2e,bt,Cd,Tw,L1,Kdt,Vdt,Xdt,B1,Td,F1,Rp,Zf,Udt,Gdt,xu,Ed,Ydt,Ad,Ew,x2,Kr,Zdt,Jdt,Lp,SI=hi(ri,"FeatureMap/Entry");S(535,1,{72:1},wA),h.ak=function(){return this.a},h.dd=function(){return this.b},x(wt,"BasicEObjectImpl/1",535),S(1027,1,iK,A$e),h.Wj=function(t){return B_(this.a,this.b,t)},h.fj=function(){return lFe(this.a,this.b)},h.Wb=function(t){Rie(this.a,this.b,t)},h.Xj=function(){$9t(this.a,this.b)},x(wt,"BasicEObjectImpl/4",1027),S(1983,1,{108:1}),h.bk=function(t){this.e=t==0?e1t:J(It,Ee,1,t,5,1)},h.Ch=function(t){return this.e[t]},h.Dh=function(t,n){this.e[t]=n},h.Eh=function(t){this.e[t]=null},h.ck=function(){return this.c},h.dk=function(){throw F(new on)},h.ek=function(){throw F(new on)},h.fk=function(){return this.d},h.gk=function(){return this.e!=null},h.hk=function(t){this.c=t},h.ik=function(t){throw F(new on)},h.jk=function(t){throw F(new on)},h.kk=function(t){this.d=t};var e1t;x(wt,"BasicEObjectImpl/EPropertiesHolderBaseImpl",1983),S(185,1983,{108:1},rf),h.dk=function(){return this.a},h.ek=function(){return this.b},h.ik=function(t){this.a=t},h.jk=function(t){this.b=t},x(wt,"BasicEObjectImpl/EPropertiesHolderImpl",185),S(506,97,vnt,wE),h.Kg=function(){return this.f},h.Pg=function(){return this.k},h.Rg=function(t,n){this.g=t,this.i=n},h.Tg=function(){return(this.j&2)==0?this.zh():this.ph().ck()},h.Vg=function(){return this.i},h.Mg=function(){return(this.j&1)!=0},h.eh=function(){return this.g},h.kh=function(){return(this.j&4)!=0},h.ph=function(){return!this.k&&(this.k=new rf),this.k},h.th=function(t){this.ph().hk(t),t?this.j|=2:this.j&=-3},h.vh=function(t){this.ph().jk(t),t?this.j|=4:this.j&=-5},h.zh=function(){return(Yd(),bt).S},h.i=0,h.j=1,x(wt,"EObjectImpl",506),S(780,506,{105:1,92:1,90:1,56:1,108:1,49:1,97:1},Rne),h.Ch=function(t){return this.e[t]},h.Dh=function(t,n){this.e[t]=n},h.Eh=function(t){this.e[t]=null},h.Tg=function(){return this.d},h.Yg=function(t){return ui(this.d,t)},h.$g=function(){return this.d},h.dh=function(){return this.e!=null},h.ph=function(){return!this.k&&(this.k=new K8e),this.k},h.th=function(t){this.d=t},h.yh=function(){var t;return this.e==null&&(t=Lt(this.d),this.e=t==0?t1t:J(It,Ee,1,t,5,1)),this},h.Ah=function(){return 0};var t1t;x(wt,"DynamicEObjectImpl",780),S(1376,780,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1},QRe),h.Fb=function(t){return this===t},h.Hb=function(){return C0(this)},h.th=function(t){this.d=t,this.b=l7(t,"key"),this.c=l7(t,GS)},h.Sh=function(){var t;return this.a==-1&&(t=G_(this,this.b),this.a=t==null?0:ci(t)),this.a},h.cd=function(){return G_(this,this.b)},h.dd=function(){return G_(this,this.c)},h.Th=function(t){this.a=t},h.Uh=function(t){Rie(this,this.b,t)},h.ed=function(t){var n;return n=G_(this,this.c),Rie(this,this.c,t),n},h.a=0,x(wt,"DynamicEObjectImpl/BasicEMapEntry",1376),S(1377,1,{108:1},K8e),h.bk=function(t){throw F(new on)},h.Ch=function(t){throw F(new on)},h.Dh=function(t,n){throw F(new on)},h.Eh=function(t){throw F(new on)},h.ck=function(){throw F(new on)},h.dk=function(){return this.a},h.ek=function(){return this.b},h.fk=function(){return this.c},h.gk=function(){throw F(new on)},h.hk=function(t){throw F(new on)},h.ik=function(t){this.a=t},h.jk=function(t){this.b=t},h.kk=function(t){this.c=t},x(wt,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1377),S(510,150,{105:1,92:1,90:1,590:1,147:1,56:1,108:1,49:1,97:1,510:1,150:1,114:1,115:1},RZ),h.Qg=function(t){return tce(this,t)},h._g=function(t,n,i){var s;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.d;case 2:return i?(!this.b&&(this.b=new tl((tt(),Kr),to,this)),this.b):(!this.b&&(this.b=new tl((tt(),Kr),to,this)),o9(this.b));case 3:return dFe(this);case 4:return!this.a&&(this.a=new Fi(N1,this,4)),this.a;case 5:return!this.c&&(this.c=new lm(N1,this,5)),this.c}return _l(this,t-Lt((tt(),Cd)),ct((s=u(mt(this,16),26),s||Cd),t),n,i)},h.hh=function(t,n,i){var s,c,a;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i);case 3:return this.Cb&&(i=(c=this.Db>>16,c>=0?tce(this,i):this.Cb.ih(this,-1-c,null,i))),Zne(this,u(t,147),i)}return a=u(ct((s=u(mt(this,16),26),s||(tt(),Cd)),n),66),a.Nj().Qj(this,zo(this),n-Lt((tt(),Cd)),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 2:return!this.b&&(this.b=new tl((tt(),Kr),to,this)),_A(this.b,t,i);case 3:return Zne(this,null,i);case 4:return!this.a&&(this.a=new Fi(N1,this,4)),Lr(this.a,t,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),Cd)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),Cd)),t,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!dFe(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return Bl(this,t-Lt((tt(),Cd)),ct((n=u(mt(this,16),26),n||Cd),t))},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:k8t(this,un(n));return;case 2:!this.b&&(this.b=new tl((tt(),Kr),to,this)),AP(this.b,n);return;case 3:EGe(this,u(n,147));return;case 4:!this.a&&(this.a=new Fi(N1,this,4)),Gt(this.a),!this.a&&(this.a=new Fi(N1,this,4)),vi(this.a,u(n,14));return;case 5:!this.c&&(this.c=new lm(N1,this,5)),Gt(this.c),!this.c&&(this.c=new lm(N1,this,5)),vi(this.c,u(n,14));return}Wl(this,t-Lt((tt(),Cd)),ct((i=u(mt(this,16),26),i||Cd),t),n)},h.zh=function(){return tt(),Cd},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:nse(this,null);return;case 2:!this.b&&(this.b=new tl((tt(),Kr),to,this)),this.b.c.$b();return;case 3:EGe(this,null);return;case 4:!this.a&&(this.a=new Fi(N1,this,4)),Gt(this.a);return;case 5:!this.c&&(this.c=new lm(N1,this,5)),Gt(this.c);return}Ql(this,t-Lt((tt(),Cd)),ct((n=u(mt(this,16),26),n||Cd),t))},h.Ib=function(){return qWe(this)},h.d=null,x(wt,"EAnnotationImpl",510),S(151,705,Nae,sl),h.Xh=function(t,n){r5t(this,t,u(n,42))},h.lk=function(t,n){return ZSt(this,u(t,42),n)},h.pi=function(t){return u(u(this.c,69).pi(t),133)},h.Zh=function(){return u(this.c,69).Zh()},h.$h=function(){return u(this.c,69).$h()},h._h=function(t){return u(this.c,69)._h(t)},h.mk=function(t,n){return _A(this,t,n)},h.Wj=function(t){return u(this.c,76).Wj(t)},h.rj=function(){},h.fj=function(){return u(this.c,76).fj()},h.tj=function(t,n,i){var s;return s=u(ml(this.b).Nh().Jh(this.b),133),s.Th(t),s.Uh(n),s.ed(i),s},h.uj=function(){return new OJ(this)},h.Wb=function(t){AP(this,t)},h.Xj=function(){u(this.c,76).Xj()},x(ri,"EcoreEMap",151),S(158,151,Nae,tl),h.qj=function(){var t,n,i,s,c,a;if(this.d==null){for(a=J(Wme,$ae,63,2*this.f+1,0,1),i=this.c.Kc();i.e!=i.i.gc();)n=u(i.nj(),133),s=n.Sh(),c=(s&_n)%a.length,t=a[c],!t&&(t=a[c]=new OJ(this)),t.Fc(n);this.d=a}},x(wt,"EAnnotationImpl/1",158),S(284,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,472:1,49:1,97:1,150:1,284:1,114:1,115:1}),h._g=function(t,n,i){var s,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return kt(),(this.Bb&256)!=0;case 3:return kt(),(this.Bb&512)!=0;case 4:return me(this.s);case 5:return me(this.t);case 6:return kt(),!!this.$j();case 7:return kt(),c=this.s,c>=1;case 8:return n?ou(this):this.r;case 9:return this.q}return _l(this,t-Lt(this.zh()),ct((s=u(mt(this,16),26),s||this.zh()),t),n,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 9:return XF(this,i)}return c=u(ct((s=u(mt(this,16),26),s||this.zh()),n),66),c.Nj().Rj(this,zo(this),n-Lt(this.zh()),t,i)},h.lh=function(t){var n,i;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.$j();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&$0(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&$0(this.q).i==0)}return Bl(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.sh=function(t,n){var i,s;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:this.Lh(un(n));return;case 2:od(this,je(Pe(n)));return;case 3:cd(this,je(Pe(n)));return;case 4:id(this,u(n,19).a);return;case 5:this.ok(u(n,19).a);return;case 8:Sg(this,u(n,138));return;case 9:s=_f(this,u(n,87),null),s&&s.Fi();return}Wl(this,t-Lt(this.zh()),ct((i=u(mt(this,16),26),i||this.zh()),t),n)},h.zh=function(){return tt(),Jdt},h.Bh=function(t){var n,i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:this.Lh(null);return;case 2:od(this,!0);return;case 3:cd(this,!0);return;case 4:id(this,0);return;case 5:this.ok(1);return;case 8:Sg(this,null);return;case 9:i=_f(this,null,null),i&&i.Fi();return}Ql(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.Gh=function(){ou(this),this.Bb|=1},h.Yj=function(){return ou(this)},h.Zj=function(){return this.t},h.$j=function(){var t;return t=this.t,t>1||t==-1},h.hi=function(){return(this.Bb&512)!=0},h.nk=function(t,n){return Gse(this,t,n)},h.ok=function(t){Tb(this,t)},h.Ib=function(){return cle(this)},h.s=0,h.t=1,x(wt,"ETypedElementImpl",284),S(449,284,{105:1,92:1,90:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,449:1,284:1,114:1,115:1,677:1}),h.Qg=function(t){return xVe(this,t)},h._g=function(t,n,i){var s,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return kt(),(this.Bb&256)!=0;case 3:return kt(),(this.Bb&512)!=0;case 4:return me(this.s);case 5:return me(this.t);case 6:return kt(),!!this.$j();case 7:return kt(),c=this.s,c>=1;case 8:return n?ou(this):this.r;case 9:return this.q;case 10:return kt(),(this.Bb&qu)!=0;case 11:return kt(),(this.Bb&ew)!=0;case 12:return kt(),(this.Bb&Kb)!=0;case 13:return this.j;case 14:return RO(this);case 15:return kt(),(this.Bb&xc)!=0;case 16:return kt(),(this.Bb&gh)!=0;case 17:return wb(this)}return _l(this,t-Lt(this.zh()),ct((s=u(mt(this,16),26),s||this.zh()),t),n,i)},h.hh=function(t,n,i){var s,c,a;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i);case 17:return this.Cb&&(i=(c=this.Db>>16,c>=0?xVe(this,i):this.Cb.ih(this,-1-c,null,i))),Sl(this,t,17,i)}return a=u(ct((s=u(mt(this,16),26),s||this.zh()),n),66),a.Nj().Qj(this,zo(this),n-Lt(this.zh()),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 9:return XF(this,i);case 17:return Sl(this,null,17,i)}return c=u(ct((s=u(mt(this,16),26),s||this.zh()),n),66),c.Nj().Rj(this,zo(this),n-Lt(this.zh()),t,i)},h.lh=function(t){var n,i;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.$j();case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&$0(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&$0(this.q).i==0);case 10:return(this.Bb&qu)==0;case 11:return(this.Bb&ew)!=0;case 12:return(this.Bb&Kb)!=0;case 13:return this.j!=null;case 14:return RO(this)!=null;case 15:return(this.Bb&xc)!=0;case 16:return(this.Bb&gh)!=0;case 17:return!!wb(this)}return Bl(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.sh=function(t,n){var i,s;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:k_(this,un(n));return;case 2:od(this,je(Pe(n)));return;case 3:cd(this,je(Pe(n)));return;case 4:id(this,u(n,19).a);return;case 5:this.ok(u(n,19).a);return;case 8:Sg(this,u(n,138));return;case 9:s=_f(this,u(n,87),null),s&&s.Fi();return;case 10:vO(this,je(Pe(n)));return;case 11:kO(this,je(Pe(n)));return;case 12:yO(this,je(Pe(n)));return;case 13:Zee(this,un(n));return;case 15:OO(this,je(Pe(n)));return;case 16:SO(this,je(Pe(n)));return}Wl(this,t-Lt(this.zh()),ct((i=u(mt(this,16),26),i||this.zh()),t),n)},h.zh=function(){return tt(),Zdt},h.Bh=function(t){var n,i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:W(this.Cb,88)&&Lb(qc(u(this.Cb,88)),4),Io(this,null);return;case 2:od(this,!0);return;case 3:cd(this,!0);return;case 4:id(this,0);return;case 5:this.ok(1);return;case 8:Sg(this,null);return;case 9:i=_f(this,null,null),i&&i.Fi();return;case 10:vO(this,!0);return;case 11:kO(this,!1);return;case 12:yO(this,!1);return;case 13:this.i=null,vP(this,null);return;case 15:OO(this,!1);return;case 16:SO(this,!1);return}Ql(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.Gh=function(){F3(ms((Oc(),Cr),this)),ou(this),this.Bb|=1},h.Gj=function(){return this.f},h.zj=function(){return RO(this)},h.Hj=function(){return wb(this)},h.Lj=function(){return null},h.pk=function(){return this.k},h.aj=function(){return this.n},h.Mj=function(){return pj(this)},h.Nj=function(){var t,n,i,s,c,a,g,w,m;return this.p||(i=wb(this),(i.i==null&&dh(i),i.i).length,s=this.Lj(),s&&Lt(wb(s)),c=ou(this),g=c.Bj(),t=g?(g.i&1)!=0?g==Zc?Ui:g==Zt?Fr:g==Mw?dk:g==hr?wr:g==H1?mp:g==A2?vp:g==Tc?uy:c6:g:null,n=RO(this),w=c.zj(),nDt(this),(this.Bb&gh)!=0&&((a=lce((Oc(),Cr),i))&&a!=this||(a=Av(ms(Cr,this))))?this.p=new P$e(this,a):this.$j()?this.rk()?s?(this.Bb&xc)!=0?t?this.sk()?this.p=new ug(47,t,this,s):this.p=new ug(5,t,this,s):this.sk()?this.p=new ag(46,this,s):this.p=new ag(4,this,s):t?this.sk()?this.p=new ug(49,t,this,s):this.p=new ug(7,t,this,s):this.sk()?this.p=new ag(48,this,s):this.p=new ag(6,this,s):(this.Bb&xc)!=0?t?t==Hg?this.p=new Ya(50,Ndt,this):this.sk()?this.p=new Ya(43,t,this):this.p=new Ya(1,t,this):this.sk()?this.p=new Ja(42,this):this.p=new Ja(0,this):t?t==Hg?this.p=new Ya(41,Ndt,this):this.sk()?this.p=new Ya(45,t,this):this.p=new Ya(3,t,this):this.sk()?this.p=new Ja(44,this):this.p=new Ja(2,this):W(c,148)?t==SI?this.p=new Ja(40,this):(this.Bb&512)!=0?(this.Bb&xc)!=0?t?this.p=new Ya(9,t,this):this.p=new Ja(8,this):t?this.p=new Ya(11,t,this):this.p=new Ja(10,this):(this.Bb&xc)!=0?t?this.p=new Ya(13,t,this):this.p=new Ja(12,this):t?this.p=new Ya(15,t,this):this.p=new Ja(14,this):s?(m=s.t,m>1||m==-1?this.sk()?(this.Bb&xc)!=0?t?this.p=new ug(25,t,this,s):this.p=new ag(24,this,s):t?this.p=new ug(27,t,this,s):this.p=new ag(26,this,s):(this.Bb&xc)!=0?t?this.p=new ug(29,t,this,s):this.p=new ag(28,this,s):t?this.p=new ug(31,t,this,s):this.p=new ag(30,this,s):this.sk()?(this.Bb&xc)!=0?t?this.p=new ug(33,t,this,s):this.p=new ag(32,this,s):t?this.p=new ug(35,t,this,s):this.p=new ag(34,this,s):(this.Bb&xc)!=0?t?this.p=new ug(37,t,this,s):this.p=new ag(36,this,s):t?this.p=new ug(39,t,this,s):this.p=new ag(38,this,s)):this.sk()?(this.Bb&xc)!=0?t?this.p=new Ya(17,t,this):this.p=new Ja(16,this):t?this.p=new Ya(19,t,this):this.p=new Ja(18,this):(this.Bb&xc)!=0?t?this.p=new Ya(21,t,this):this.p=new Ja(20,this):t?this.p=new Ya(23,t,this):this.p=new Ja(22,this):this.qk()?this.sk()?this.p=new wRe(u(c,26),this,s):this.p=new Iie(u(c,26),this,s):W(c,148)?t==SI?this.p=new Ja(40,this):(this.Bb&xc)!=0?t?this.p=new pLe(n,w,this,(UH(),g==Zt?l2e:g==Zc?i2e:g==H1?u2e:g==Mw?c2e:g==hr?o2e:g==A2?f2e:g==Tc?r2e:g==Zl?s2e:jU)):this.p=new EBe(u(c,148),n,w,this):t?this.p=new gLe(n,w,this,(UH(),g==Zt?l2e:g==Zc?i2e:g==H1?u2e:g==Mw?c2e:g==hr?o2e:g==A2?f2e:g==Tc?r2e:g==Zl?s2e:jU)):this.p=new TBe(u(c,148),n,w,this):this.rk()?s?(this.Bb&xc)!=0?this.sk()?this.p=new vRe(u(c,26),this,s):this.p=new Tne(u(c,26),this,s):this.sk()?this.p=new mRe(u(c,26),this,s):this.p=new xF(u(c,26),this,s):(this.Bb&xc)!=0?this.sk()?this.p=new gIe(u(c,26),this):this.p=new _te(u(c,26),this):this.sk()?this.p=new dIe(u(c,26),this):this.p=new fF(u(c,26),this):this.sk()?s?(this.Bb&xc)!=0?this.p=new yRe(u(c,26),this,s):this.p=new xne(u(c,26),this,s):(this.Bb&xc)!=0?this.p=new pIe(u(c,26),this):this.p=new Hte(u(c,26),this):s?(this.Bb&xc)!=0?this.p=new ORe(u(c,26),this,s):this.p=new Cne(u(c,26),this,s):(this.Bb&xc)!=0?this.p=new bIe(u(c,26),this):this.p=new JA(u(c,26),this)),this.p},h.Ij=function(){return(this.Bb&qu)!=0},h.qk=function(){return!1},h.rk=function(){return!1},h.Jj=function(){return(this.Bb&gh)!=0},h.Oj=function(){return Z_(this)},h.sk=function(){return!1},h.Kj=function(){return(this.Bb&xc)!=0},h.tk=function(t){this.k=t},h.Lh=function(t){k_(this,t)},h.Ib=function(){return $j(this)},h.e=!1,h.n=0,x(wt,"EStructuralFeatureImpl",449),S(322,449,{105:1,92:1,90:1,34:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,322:1,150:1,449:1,284:1,114:1,115:1,677:1},YL),h._g=function(t,n,i){var s,c;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return kt(),(this.Bb&256)!=0;case 3:return kt(),(this.Bb&512)!=0;case 4:return me(this.s);case 5:return me(this.t);case 6:return kt(),!!ile(this);case 7:return kt(),c=this.s,c>=1;case 8:return n?ou(this):this.r;case 9:return this.q;case 10:return kt(),(this.Bb&qu)!=0;case 11:return kt(),(this.Bb&ew)!=0;case 12:return kt(),(this.Bb&Kb)!=0;case 13:return this.j;case 14:return RO(this);case 15:return kt(),(this.Bb&xc)!=0;case 16:return kt(),(this.Bb&gh)!=0;case 17:return wb(this);case 18:return kt(),(this.Bb&co)!=0;case 19:return n?bH(this):EHe(this)}return _l(this,t-Lt((tt(),Tw)),ct((s=u(mt(this,16),26),s||Tw),t),n,i)},h.lh=function(t){var n,i;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return ile(this);case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&$0(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&$0(this.q).i==0);case 10:return(this.Bb&qu)==0;case 11:return(this.Bb&ew)!=0;case 12:return(this.Bb&Kb)!=0;case 13:return this.j!=null;case 14:return RO(this)!=null;case 15:return(this.Bb&xc)!=0;case 16:return(this.Bb&gh)!=0;case 17:return!!wb(this);case 18:return(this.Bb&co)!=0;case 19:return!!EHe(this)}return Bl(this,t-Lt((tt(),Tw)),ct((n=u(mt(this,16),26),n||Tw),t))},h.sh=function(t,n){var i,s;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:k_(this,un(n));return;case 2:od(this,je(Pe(n)));return;case 3:cd(this,je(Pe(n)));return;case 4:id(this,u(n,19).a);return;case 5:sje(this,u(n,19).a);return;case 8:Sg(this,u(n,138));return;case 9:s=_f(this,u(n,87),null),s&&s.Fi();return;case 10:vO(this,je(Pe(n)));return;case 11:kO(this,je(Pe(n)));return;case 12:yO(this,je(Pe(n)));return;case 13:Zee(this,un(n));return;case 15:OO(this,je(Pe(n)));return;case 16:SO(this,je(Pe(n)));return;case 18:HH(this,je(Pe(n)));return}Wl(this,t-Lt((tt(),Tw)),ct((i=u(mt(this,16),26),i||Tw),t),n)},h.zh=function(){return tt(),Tw},h.Bh=function(t){var n,i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:W(this.Cb,88)&&Lb(qc(u(this.Cb,88)),4),Io(this,null);return;case 2:od(this,!0);return;case 3:cd(this,!0);return;case 4:id(this,0);return;case 5:this.b=0,Tb(this,1);return;case 8:Sg(this,null);return;case 9:i=_f(this,null,null),i&&i.Fi();return;case 10:vO(this,!0);return;case 11:kO(this,!1);return;case 12:yO(this,!1);return;case 13:this.i=null,vP(this,null);return;case 15:OO(this,!1);return;case 16:SO(this,!1);return;case 18:HH(this,!1);return}Ql(this,t-Lt((tt(),Tw)),ct((n=u(mt(this,16),26),n||Tw),t))},h.Gh=function(){bH(this),F3(ms((Oc(),Cr),this)),ou(this),this.Bb|=1},h.$j=function(){return ile(this)},h.nk=function(t,n){return this.b=0,this.a=null,Gse(this,t,n)},h.ok=function(t){sje(this,t)},h.Ib=function(){var t;return(this.Db&64)!=0?$j(this):(t=new nu($j(this)),t.a+=" (iD: ",Xa(t,(this.Bb&co)!=0),t.a+=")",t.a)},h.b=0,x(wt,"EAttributeImpl",322),S(351,438,{105:1,92:1,90:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,351:1,150:1,114:1,115:1,676:1}),h.uk=function(t){return t.Tg()==this},h.Qg=function(t){return Oq(this,t)},h.Rg=function(t,n){this.w=null,this.Db=n<<16|this.Db&255,this.Cb=t},h._g=function(t,n,i){var s;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return np(this);case 4:return this.zj();case 5:return this.F;case 6:return n?ml(this):q3(this);case 7:return!this.A&&(this.A=new bc(Go,this,7)),this.A}return _l(this,t-Lt(this.zh()),ct((s=u(mt(this,16),26),s||this.zh()),t),n,i)},h.hh=function(t,n,i){var s,c,a;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Oq(this,i):this.Cb.ih(this,-1-c,null,i))),Sl(this,t,6,i)}return a=u(ct((s=u(mt(this,16),26),s||this.zh()),n),66),a.Nj().Qj(this,zo(this),n-Lt(this.zh()),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 6:return Sl(this,null,6,i);case 7:return!this.A&&(this.A=new bc(Go,this,7)),Lr(this.A,t,i)}return c=u(ct((s=u(mt(this,16),26),s||this.zh()),n),66),c.Nj().Rj(this,zo(this),n-Lt(this.zh()),t,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!np(this);case 4:return this.zj()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!q3(this);case 7:return!!this.A&&this.A.i!=0}return Bl(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:$M(this,un(n));return;case 2:YB(this,un(n));return;case 5:qO(this,un(n));return;case 7:!this.A&&(this.A=new bc(Go,this,7)),Gt(this.A),!this.A&&(this.A=new bc(Go,this,7)),vi(this.A,u(n,14));return}Wl(this,t-Lt(this.zh()),ct((i=u(mt(this,16),26),i||this.zh()),t),n)},h.zh=function(){return tt(),Kdt},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:W(this.Cb,179)&&(u(this.Cb,179).tb=null),Io(this,null);return;case 2:pO(this,null),iO(this,this.D);return;case 5:qO(this,null);return;case 7:!this.A&&(this.A=new bc(Go,this,7)),Gt(this.A);return}Ql(this,t-Lt(this.zh()),ct((n=u(mt(this,16),26),n||this.zh()),t))},h.yj=function(){var t;return this.G==-1&&(this.G=(t=ml(this),t?ld(t.Mh(),this):-1)),this.G},h.zj=function(){return null},h.Aj=function(){return ml(this)},h.vk=function(){return this.v},h.Bj=function(){return np(this)},h.Cj=function(){return this.D!=null?this.D:this.B},h.Dj=function(){return this.F},h.wj=function(t){return dQ(this,t)},h.wk=function(t){this.v=t},h.xk=function(t){ize(this,t)},h.yk=function(t){this.C=t},h.Lh=function(t){$M(this,t)},h.Ib=function(){return WP(this)},h.C=null,h.D=null,h.G=-1,x(wt,"EClassifierImpl",351),S(88,351,{105:1,92:1,90:1,26:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,88:1,351:1,150:1,473:1,114:1,115:1,676:1},HZ),h.uk=function(t){return BSt(this,t.Tg())},h._g=function(t,n,i){var s;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return np(this);case 4:return null;case 5:return this.F;case 6:return n?ml(this):q3(this);case 7:return!this.A&&(this.A=new bc(Go,this,7)),this.A;case 8:return kt(),(this.Bb&256)!=0;case 9:return kt(),(this.Bb&512)!=0;case 10:return Ss(this);case 11:return!this.q&&(this.q=new we(ku,this,11,10)),this.q;case 12:return Bm(this);case 13:return SS(this);case 14:return SS(this),this.r;case 15:return Bm(this),this.k;case 16:return Vce(this);case 17:return mQ(this);case 18:return dh(this);case 19:return Tj(this);case 20:return Bm(this),this.o;case 21:return!this.s&&(this.s=new we(dc,this,21,17)),this.s;case 22:return wo(this);case 23:return iQ(this)}return _l(this,t-Lt((tt(),L1)),ct((s=u(mt(this,16),26),s||L1),t),n,i)},h.hh=function(t,n,i){var s,c,a;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i);case 6:return this.Cb&&(i=(c=this.Db>>16,c>=0?Oq(this,i):this.Cb.ih(this,-1-c,null,i))),Sl(this,t,6,i);case 11:return!this.q&&(this.q=new we(ku,this,11,10)),Ro(this.q,t,i);case 21:return!this.s&&(this.s=new we(dc,this,21,17)),Ro(this.s,t,i)}return a=u(ct((s=u(mt(this,16),26),s||(tt(),L1)),n),66),a.Nj().Qj(this,zo(this),n-Lt((tt(),L1)),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 6:return Sl(this,null,6,i);case 7:return!this.A&&(this.A=new bc(Go,this,7)),Lr(this.A,t,i);case 11:return!this.q&&(this.q=new we(ku,this,11,10)),Lr(this.q,t,i);case 21:return!this.s&&(this.s=new we(dc,this,21,17)),Lr(this.s,t,i);case 22:return Lr(wo(this),t,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),L1)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),L1)),t,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!np(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!q3(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)!=0;case 9:return(this.Bb&512)!=0;case 10:return!!this.u&&wo(this.u.a).i!=0&&!(this.n&&fq(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return Bm(this).i!=0;case 13:return SS(this).i!=0;case 14:return SS(this),this.r.i!=0;case 15:return Bm(this),this.k.i!=0;case 16:return Vce(this).i!=0;case 17:return mQ(this).i!=0;case 18:return dh(this).i!=0;case 19:return Tj(this).i!=0;case 20:return Bm(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&fq(this.n);case 23:return iQ(this).i!=0}return Bl(this,t-Lt((tt(),L1)),ct((n=u(mt(this,16),26),n||L1),t))},h.oh=function(t){var n;return n=this.i==null||this.q&&this.q.i!=0?null:l7(this,t),n||xue(this,t)},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:$M(this,un(n));return;case 2:YB(this,un(n));return;case 5:qO(this,un(n));return;case 7:!this.A&&(this.A=new bc(Go,this,7)),Gt(this.A),!this.A&&(this.A=new bc(Go,this,7)),vi(this.A,u(n,14));return;case 8:Zse(this,je(Pe(n)));return;case 9:Jse(this,je(Pe(n)));return;case 10:TS(Ss(this)),vi(Ss(this),u(n,14));return;case 11:!this.q&&(this.q=new we(ku,this,11,10)),Gt(this.q),!this.q&&(this.q=new we(ku,this,11,10)),vi(this.q,u(n,14));return;case 21:!this.s&&(this.s=new we(dc,this,21,17)),Gt(this.s),!this.s&&(this.s=new we(dc,this,21,17)),vi(this.s,u(n,14));return;case 22:Gt(wo(this)),vi(wo(this),u(n,14));return}Wl(this,t-Lt((tt(),L1)),ct((i=u(mt(this,16),26),i||L1),t),n)},h.zh=function(){return tt(),L1},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:W(this.Cb,179)&&(u(this.Cb,179).tb=null),Io(this,null);return;case 2:pO(this,null),iO(this,this.D);return;case 5:qO(this,null);return;case 7:!this.A&&(this.A=new bc(Go,this,7)),Gt(this.A);return;case 8:Zse(this,!1);return;case 9:Jse(this,!1);return;case 10:this.u&&TS(this.u);return;case 11:!this.q&&(this.q=new we(ku,this,11,10)),Gt(this.q);return;case 21:!this.s&&(this.s=new we(dc,this,21,17)),Gt(this.s);return;case 22:this.n&&Gt(this.n);return}Ql(this,t-Lt((tt(),L1)),ct((n=u(mt(this,16),26),n||L1),t))},h.Gh=function(){var t,n;if(Bm(this),SS(this),Vce(this),mQ(this),dh(this),Tj(this),iQ(this),F5(t8t(qc(this))),this.s)for(t=0,n=this.s.i;t=0;--n)V(this,n);return Ooe(this,t)},h.Xj=function(){Gt(this)},h.oi=function(t,n){return TQe(this,t,n)},x(ri,"EcoreEList",622),S(496,622,Is,H8),h.ai=function(){return!1},h.aj=function(){return this.c},h.bj=function(){return!1},h.Fk=function(){return!0},h.hi=function(){return!0},h.li=function(t,n){return n},h.ni=function(){return!1},h.c=0,x(ri,"EObjectEList",496),S(85,496,Is,Fi),h.bj=function(){return!0},h.Dk=function(){return!1},h.rk=function(){return!0},x(ri,"EObjectContainmentEList",85),S(545,85,Is,MA),h.ci=function(){this.b=!0},h.fj=function(){return this.b},h.Xj=function(){var t;Gt(this),el(this.e)?(t=this.b,this.b=!1,Hn(this.e,new Lu(this.e,2,this.c,t,!1))):this.b=!1},h.b=!1,x(ri,"EObjectContainmentEList/Unsettable",545),S(1140,545,Is,aLe),h.ii=function(t,n){var i,s;return i=u(tS(this,t,n),87),el(this.e)&&h3(this,new l9(this.a,7,(tt(),Vdt),me(n),(s=i.c,W(s,88)?u(s,26):xu),t)),i},h.jj=function(t,n){return QDt(this,u(t,87),n)},h.kj=function(t,n){return qDt(this,u(t,87),n)},h.lj=function(t,n,i){return zIt(this,u(t,87),u(n,87),i)},h.Zi=function(t,n,i,s,c){switch(t){case 3:return $5(this,t,n,i,s,this.i>1);case 5:return $5(this,t,n,i,s,this.i-u(i,15).gc()>0);default:return new va(this.e,t,this.c,n,i,s,!0)}},h.ij=function(){return!0},h.fj=function(){return fq(this)},h.Xj=function(){Gt(this)},x(wt,"EClassImpl/1",1140),S(1154,1153,Dae),h.ui=function(t){var n,i,s,c,a,g,w;if(i=t.xi(),i!=8){if(s=T$t(t),s==0)switch(i){case 1:case 9:{w=t.Bi(),w!=null&&(n=qc(u(w,473)),!n.c&&(n.c=new s3),iP(n.c,t.Ai())),g=t.zi(),g!=null&&(c=u(g,473),(c.Bb&1)==0&&(n=qc(c),!n.c&&(n.c=new s3),rn(n.c,u(t.Ai(),26))));break}case 3:{g=t.zi(),g!=null&&(c=u(g,473),(c.Bb&1)==0&&(n=qc(c),!n.c&&(n.c=new s3),rn(n.c,u(t.Ai(),26))));break}case 5:{if(g=t.zi(),g!=null)for(a=u(g,14).Kc();a.Ob();)c=u(a.Pb(),473),(c.Bb&1)==0&&(n=qc(c),!n.c&&(n.c=new s3),rn(n.c,u(t.Ai(),26)));break}case 4:{w=t.Bi(),w!=null&&(c=u(w,473),(c.Bb&1)==0&&(n=qc(c),!n.c&&(n.c=new s3),iP(n.c,t.Ai())));break}case 6:{if(w=t.Bi(),w!=null)for(a=u(w,14).Kc();a.Ob();)c=u(a.Pb(),473),(c.Bb&1)==0&&(n=qc(c),!n.c&&(n.c=new s3),iP(n.c,t.Ai()));break}}this.Hk(s)}},h.Hk=function(t){hYe(this,t)},h.b=63,x(wt,"ESuperAdapter",1154),S(1155,1154,Dae,xMe),h.Hk=function(t){Lb(this,t)},x(wt,"EClassImpl/10",1155),S(1144,696,Is),h.Vh=function(t,n){return Dq(this,t,n)},h.Wh=function(t){return cVe(this,t)},h.Xh=function(t,n){I9(this,t,n)},h.Yh=function(t){i9(this,t)},h.pi=function(t){return Pre(this,t)},h.mi=function(t,n){return Y_(this,t,n)},h.lk=function(t,n){throw F(new on)},h.Zh=function(){return new bv(this)},h.$h=function(){return new M8(this)},h._h=function(t){return y9(this,t)},h.mk=function(t,n){throw F(new on)},h.Wj=function(t){return this},h.fj=function(){return this.i!=0},h.Wb=function(t){throw F(new on)},h.Xj=function(){throw F(new on)},x(ri,"EcoreEList/UnmodifiableEList",1144),S(319,1144,Is,rm),h.ni=function(){return!1},x(ri,"EcoreEList/UnmodifiableEList/FastCompare",319),S(1147,319,Is,Uze),h.Xc=function(t){var n,i,s;if(W(t,170)&&(n=u(t,170),i=n.aj(),i!=-1)){for(s=this.i;i4)if(this.wj(t)){if(this.rk()){if(s=u(t,49),i=s.Ug(),w=i==this.b&&(this.Dk()?s.Og(s.Vg(),u(ct(tc(this.b),this.aj()).Yj(),26).Bj())==Ur(u(ct(tc(this.b),this.aj()),18)).n:-1-s.Vg()==this.aj()),this.Ek()&&!w&&!i&&s.Zg()){for(c=0;c1||s==-1)):!1},h.Dk=function(){var t,n,i;return n=ct(tc(this.b),this.aj()),W(n,99)?(t=u(n,18),i=Ur(t),!!i):!1},h.Ek=function(){var t,n;return n=ct(tc(this.b),this.aj()),W(n,99)?(t=u(n,18),(t.Bb&zr)!=0):!1},h.Xc=function(t){var n,i,s,c;if(s=this.Qi(t),s>=0)return s;if(this.Fk()){for(i=0,c=this.Vi();i=0;--t)w7(this,t,this.Oi(t));return this.Wi()},h.Qc=function(t){var n;if(this.Ek())for(n=this.Vi()-1;n>=0;--n)w7(this,n,this.Oi(n));return this.Xi(t)},h.Xj=function(){TS(this)},h.oi=function(t,n){return fqe(this,t,n)},x(ri,"DelegatingEcoreEList",742),S(1150,742,Rae,EIe),h.Hi=function(t,n){aSt(this,t,u(n,26))},h.Ii=function(t){o5t(this,u(t,26))},h.Oi=function(t){var n,i;return n=u(V(wo(this.a),t),87),i=n.c,W(i,88)?u(i,26):(tt(),xu)},h.Ti=function(t){var n,i;return n=u(Fb(wo(this.a),t),87),i=n.c,W(i,88)?u(i,26):(tt(),xu)},h.Ui=function(t,n){return dNt(this,t,u(n,26))},h.ai=function(){return!1},h.Zi=function(t,n,i,s,c){return null},h.Ji=function(){return new TMe(this)},h.Ki=function(){Gt(wo(this.a))},h.Li=function(t){return _We(this,t)},h.Mi=function(t){var n,i;for(i=t.Kc();i.Ob();)if(n=i.Pb(),!_We(this,n))return!1;return!0},h.Ni=function(t){var n,i,s;if(W(t,15)&&(s=u(t,15),s.gc()==wo(this.a).i)){for(n=s.Kc(),i=new Ft(this);n.Ob();)if(ie(n.Pb())!==ie(Qt(i)))return!1;return!0}return!1},h.Pi=function(){var t,n,i,s,c;for(i=1,n=new Ft(wo(this.a));n.e!=n.i.gc();)t=u(Qt(n),87),s=(c=t.c,W(c,88)?u(c,26):(tt(),xu)),i=31*i+(s?C0(s):0);return i},h.Qi=function(t){var n,i,s,c;for(s=0,i=new Ft(wo(this.a));i.e!=i.i.gc();){if(n=u(Qt(i),87),ie(t)===ie((c=n.c,W(c,88)?u(c,26):(tt(),xu))))return s;++s}return-1},h.Ri=function(){return wo(this.a).i==0},h.Si=function(){return null},h.Vi=function(){return wo(this.a).i},h.Wi=function(){var t,n,i,s,c,a;for(a=wo(this.a).i,c=J(It,Ee,1,a,5,1),i=0,n=new Ft(wo(this.a));n.e!=n.i.gc();)t=u(Qt(n),87),c[i++]=(s=t.c,W(s,88)?u(s,26):(tt(),xu));return c},h.Xi=function(t){var n,i,s,c,a,g,w;for(w=wo(this.a).i,t.lengthw&&pi(t,w,null),s=0,i=new Ft(wo(this.a));i.e!=i.i.gc();)n=u(Qt(i),87),a=(g=n.c,W(g,88)?u(g,26):(tt(),xu)),pi(t,s++,a);return t},h.Yi=function(){var t,n,i,s,c;for(c=new Va,c.a+="[",t=wo(this.a),n=0,s=wo(this.a).i;n>16,c>=0?Oq(this,i):this.Cb.ih(this,-1-c,null,i))),Sl(this,t,6,i);case 9:return!this.a&&(this.a=new we(Ba,this,9,5)),Ro(this.a,t,i)}return a=u(ct((s=u(mt(this,16),26),s||(tt(),B1)),n),66),a.Nj().Qj(this,zo(this),n-Lt((tt(),B1)),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 6:return Sl(this,null,6,i);case 7:return!this.A&&(this.A=new bc(Go,this,7)),Lr(this.A,t,i);case 9:return!this.a&&(this.a=new we(Ba,this,9,5)),Lr(this.a,t,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),B1)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),B1)),t,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!np(this);case 4:return!!Bse(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!q3(this);case 7:return!!this.A&&this.A.i!=0;case 8:return(this.Bb&256)==0;case 9:return!!this.a&&this.a.i!=0}return Bl(this,t-Lt((tt(),B1)),ct((n=u(mt(this,16),26),n||B1),t))},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:$M(this,un(n));return;case 2:YB(this,un(n));return;case 5:qO(this,un(n));return;case 7:!this.A&&(this.A=new bc(Go,this,7)),Gt(this.A),!this.A&&(this.A=new bc(Go,this,7)),vi(this.A,u(n,14));return;case 8:FP(this,je(Pe(n)));return;case 9:!this.a&&(this.a=new we(Ba,this,9,5)),Gt(this.a),!this.a&&(this.a=new we(Ba,this,9,5)),vi(this.a,u(n,14));return}Wl(this,t-Lt((tt(),B1)),ct((i=u(mt(this,16),26),i||B1),t),n)},h.zh=function(){return tt(),B1},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:W(this.Cb,179)&&(u(this.Cb,179).tb=null),Io(this,null);return;case 2:pO(this,null),iO(this,this.D);return;case 5:qO(this,null);return;case 7:!this.A&&(this.A=new bc(Go,this,7)),Gt(this.A);return;case 8:FP(this,!0);return;case 9:!this.a&&(this.a=new we(Ba,this,9,5)),Gt(this.a);return}Ql(this,t-Lt((tt(),B1)),ct((n=u(mt(this,16),26),n||B1),t))},h.Gh=function(){var t,n;if(this.a)for(t=0,n=this.a.i;t>16==5?u(this.Cb,671):null}return _l(this,t-Lt((tt(),Td)),ct((s=u(mt(this,16),26),s||Td),t),n,i)},h.hh=function(t,n,i){var s,c,a;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i);case 5:return this.Cb&&(i=(c=this.Db>>16,c>=0?DVe(this,i):this.Cb.ih(this,-1-c,null,i))),Sl(this,t,5,i)}return a=u(ct((s=u(mt(this,16),26),s||(tt(),Td)),n),66),a.Nj().Qj(this,zo(this),n-Lt((tt(),Td)),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 5:return Sl(this,null,5,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),Td)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),Td)),t,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&u(this.Cb,671))}return Bl(this,t-Lt((tt(),Td)),ct((n=u(mt(this,16),26),n||Td),t))},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:Io(this,un(n));return;case 2:iH(this,u(n,19).a);return;case 3:EUe(this,u(n,1940));return;case 4:sH(this,un(n));return}Wl(this,t-Lt((tt(),Td)),ct((i=u(mt(this,16),26),i||Td),t),n)},h.zh=function(){return tt(),Td},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:Io(this,null);return;case 2:iH(this,0);return;case 3:EUe(this,null);return;case 4:sH(this,null);return}Ql(this,t-Lt((tt(),Td)),ct((n=u(mt(this,16),26),n||Td),t))},h.Ib=function(){var t;return t=this.c,t??this.zb},h.b=null,h.c=null,h.d=0,x(wt,"EEnumLiteralImpl",573);var mUt=hi(wt,"EFactoryImpl/InternalEDateTimeFormat");S(489,1,{2015:1},t8),x(wt,"EFactoryImpl/1ClientInternalEDateTimeFormat",489),S(241,115,{105:1,92:1,90:1,87:1,56:1,108:1,49:1,97:1,241:1,114:1,115:1},a0),h.Sg=function(t,n,i){var s;return i=Sl(this,t,n,i),this.e&&W(t,170)&&(s=Cj(this,this.e),s!=this.c&&(i=QO(this,s,i))),i},h._g=function(t,n,i){var s;switch(t){case 0:return this.f;case 1:return!this.d&&(this.d=new Fi(os,this,1)),this.d;case 2:return n?Rj(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return n?dq(this):this.a}return _l(this,t-Lt((tt(),Rp)),ct((s=u(mt(this,16),26),s||Rp),t),n,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return PWe(this,null,i);case 1:return!this.d&&(this.d=new Fi(os,this,1)),Lr(this.d,t,i);case 3:return MWe(this,null,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),Rp)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),Rp)),t,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return Bl(this,t-Lt((tt(),Rp)),ct((n=u(mt(this,16),26),n||Rp),t))},h.sh=function(t,n){var i;switch(t){case 0:GVe(this,u(n,87));return;case 1:!this.d&&(this.d=new Fi(os,this,1)),Gt(this.d),!this.d&&(this.d=new Fi(os,this,1)),vi(this.d,u(n,14));return;case 3:wce(this,u(n,87));return;case 4:Nce(this,u(n,836));return;case 5:Z3(this,u(n,138));return}Wl(this,t-Lt((tt(),Rp)),ct((i=u(mt(this,16),26),i||Rp),t),n)},h.zh=function(){return tt(),Rp},h.Bh=function(t){var n;switch(t){case 0:GVe(this,null);return;case 1:!this.d&&(this.d=new Fi(os,this,1)),Gt(this.d);return;case 3:wce(this,null);return;case 4:Nce(this,null);return;case 5:Z3(this,null);return}Ql(this,t-Lt((tt(),Rp)),ct((n=u(mt(this,16),26),n||Rp),t))},h.Ib=function(){var t;return t=new dl(_u(this)),t.a+=" (expression: ",kQ(this,t),t.a+=")",t.a};var n2e;x(wt,"EGenericTypeImpl",241),S(1969,1964,QD),h.Xh=function(t,n){xIe(this,t,n)},h.lk=function(t,n){return xIe(this,this.gc(),t),n},h.pi=function(t){return df(this.Gi(),t)},h.Zh=function(){return this.$h()},h.Gi=function(){return new PMe(this)},h.$h=function(){return this._h(0)},h._h=function(t){return this.Gi().Zc(t)},h.mk=function(t,n){return Mb(this,t,!0),n},h.ii=function(t,n){var i,s;return s=Sq(this,n),i=this.Zc(t),i.Rb(s),s},h.ji=function(t,n){var i;Mb(this,n,!0),i=this.Zc(t),i.Rb(n)},x(ri,"AbstractSequentialInternalEList",1969),S(486,1969,QD,A8),h.pi=function(t){return df(this.Gi(),t)},h.Zh=function(){return this.b==null?(Ua(),Ua(),sT):this.Jk()},h.Gi=function(){return new U$e(this.a,this.b)},h.$h=function(){return this.b==null?(Ua(),Ua(),sT):this.Jk()},h._h=function(t){var n,i;if(this.b==null){if(t<0||t>1)throw F(new gs(YS+t+", size=0"));return Ua(),Ua(),sT}for(i=this.Jk(),n=0;n0;)if(n=this.c[--this.d],(!this.e||n.Gj()!=Xk||n.aj()!=0)&&(!this.Mk()||this.b.mh(n))){if(a=this.b.bh(n,this.Lk()),this.f=(Vr(),u(n,66).Oj()),this.f||n.$j()){if(this.Lk()?(s=u(a,15),this.k=s):(s=u(a,69),this.k=this.j=s),W(this.k,54)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j._h(this.k.gc()):this.k.Zc(this.k.gc()),this.p?qXe(this,this.p):eUe(this))return c=this.p?this.p.Ub():this.j?this.j.pi(--this.n):this.k.Xb(--this.n),this.f?(t=u(c,72),t.ak(),i=t.dd(),this.i=i):(i=c,this.i=i),this.g=-3,!0}else if(a!=null)return this.k=null,this.p=null,i=a,this.i=i,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}else return c=this.p?this.p.Ub():this.j?this.j.pi(--this.n):this.k.Xb(--this.n),this.f?(t=u(c,72),t.ak(),i=t.dd(),this.i=i):(i=c,this.i=i),this.g=-3,!0}},h.Pb=function(){return MP(this)},h.Tb=function(){return this.a},h.Ub=function(){var t;if(this.g<-1||this.Sb())return--this.a,this.g=0,t=this.i,this.Sb(),t;throw F(new ro)},h.Vb=function(){return this.a-1},h.Qb=function(){throw F(new on)},h.Lk=function(){return!1},h.Wb=function(t){throw F(new on)},h.Mk=function(){return!0},h.a=0,h.d=0,h.f=!1,h.g=0,h.n=0,h.o=0;var sT;x(ri,"EContentsEList/FeatureIteratorImpl",279),S(697,279,zD,Fte),h.Lk=function(){return!0},x(ri,"EContentsEList/ResolvingFeatureIteratorImpl",697),S(1157,697,zD,aIe),h.Mk=function(){return!1},x(wt,"ENamedElementImpl/1/1",1157),S(1158,279,zD,hIe),h.Mk=function(){return!1},x(wt,"ENamedElementImpl/1/2",1158),S(36,143,W7,yb,P_,rr,W_,va,Lu,Qre,_Fe,zre,HFe,gre,qFe,Vre,QFe,pre,zFe,Wre,WFe,T5,l9,l_,Kre,KFe,bre,VFe),h._i=function(){return Ere(this)},h.gj=function(){var t;return t=Ere(this),t?t.zj():null},h.yi=function(t){return this.b==-1&&this.a&&(this.b=this.c.Xg(this.a.aj(),this.a.Gj())),this.c.Og(this.b,t)},h.Ai=function(){return this.c},h.hj=function(){var t;return t=Ere(this),t?t.Kj():!1},h.b=-1,x(wt,"ENotificationImpl",36),S(399,284,{105:1,92:1,90:1,147:1,191:1,56:1,59:1,108:1,472:1,49:1,97:1,150:1,399:1,284:1,114:1,115:1},ZL),h.Qg=function(t){return IVe(this,t)},h._g=function(t,n,i){var s,c,a;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return kt(),(this.Bb&256)!=0;case 3:return kt(),(this.Bb&512)!=0;case 4:return me(this.s);case 5:return me(this.t);case 6:return kt(),a=this.t,a>1||a==-1;case 7:return kt(),c=this.s,c>=1;case 8:return n?ou(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,26):null;case 11:return!this.d&&(this.d=new bc(Go,this,11)),this.d;case 12:return!this.c&&(this.c=new we(Ip,this,12,10)),this.c;case 13:return!this.a&&(this.a=new N8(this,this)),this.a;case 14:return Qc(this)}return _l(this,t-Lt((tt(),Ed)),ct((s=u(mt(this,16),26),s||Ed),t),n,i)},h.hh=function(t,n,i){var s,c,a;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?IVe(this,i):this.Cb.ih(this,-1-c,null,i))),Sl(this,t,10,i);case 12:return!this.c&&(this.c=new we(Ip,this,12,10)),Ro(this.c,t,i)}return a=u(ct((s=u(mt(this,16),26),s||(tt(),Ed)),n),66),a.Nj().Qj(this,zo(this),n-Lt((tt(),Ed)),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 9:return XF(this,i);case 10:return Sl(this,null,10,i);case 11:return!this.d&&(this.d=new bc(Go,this,11)),Lr(this.d,t,i);case 12:return!this.c&&(this.c=new we(Ip,this,12,10)),Lr(this.c,t,i);case 14:return Lr(Qc(this),t,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),Ed)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),Ed)),t,i)},h.lh=function(t){var n,i,s;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return s=this.t,s>1||s==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&$0(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&$0(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,26));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Qc(this.a.a).i!=0&&!(this.b&&hq(this.b));case 14:return!!this.b&&hq(this.b)}return Bl(this,t-Lt((tt(),Ed)),ct((n=u(mt(this,16),26),n||Ed),t))},h.sh=function(t,n){var i,s;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:Io(this,un(n));return;case 2:od(this,je(Pe(n)));return;case 3:cd(this,je(Pe(n)));return;case 4:id(this,u(n,19).a);return;case 5:Tb(this,u(n,19).a);return;case 8:Sg(this,u(n,138));return;case 9:s=_f(this,u(n,87),null),s&&s.Fi();return;case 11:!this.d&&(this.d=new bc(Go,this,11)),Gt(this.d),!this.d&&(this.d=new bc(Go,this,11)),vi(this.d,u(n,14));return;case 12:!this.c&&(this.c=new we(Ip,this,12,10)),Gt(this.c),!this.c&&(this.c=new we(Ip,this,12,10)),vi(this.c,u(n,14));return;case 13:!this.a&&(this.a=new N8(this,this)),TS(this.a),!this.a&&(this.a=new N8(this,this)),vi(this.a,u(n,14));return;case 14:Gt(Qc(this)),vi(Qc(this),u(n,14));return}Wl(this,t-Lt((tt(),Ed)),ct((i=u(mt(this,16),26),i||Ed),t),n)},h.zh=function(){return tt(),Ed},h.Bh=function(t){var n,i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:Io(this,null);return;case 2:od(this,!0);return;case 3:cd(this,!0);return;case 4:id(this,0);return;case 5:Tb(this,1);return;case 8:Sg(this,null);return;case 9:i=_f(this,null,null),i&&i.Fi();return;case 11:!this.d&&(this.d=new bc(Go,this,11)),Gt(this.d);return;case 12:!this.c&&(this.c=new we(Ip,this,12,10)),Gt(this.c);return;case 13:this.a&&TS(this.a);return;case 14:this.b&&Gt(this.b);return}Ql(this,t-Lt((tt(),Ed)),ct((n=u(mt(this,16),26),n||Ed),t))},h.Gh=function(){var t,n;if(this.c)for(t=0,n=this.c.i;tw&&pi(t,w,null),s=0,i=new Ft(Qc(this.a));i.e!=i.i.gc();)n=u(Qt(i),87),a=(g=n.c,g||(tt(),Zf)),pi(t,s++,a);return t},h.Yi=function(){var t,n,i,s,c;for(c=new Va,c.a+="[",t=Qc(this.a),n=0,s=Qc(this.a).i;n1);case 5:return $5(this,t,n,i,s,this.i-u(i,15).gc()>0);default:return new va(this.e,t,this.c,n,i,s,!0)}},h.ij=function(){return!0},h.fj=function(){return hq(this)},h.Xj=function(){Gt(this)},x(wt,"EOperationImpl/2",1341),S(498,1,{1938:1,498:1},M$e),x(wt,"EPackageImpl/1",498),S(16,85,Is,we),h.zk=function(){return this.d},h.Ak=function(){return this.b},h.Dk=function(){return!0},h.b=0,x(ri,"EObjectContainmentWithInverseEList",16),S(353,16,Is,wv),h.Ek=function(){return!0},h.li=function(t,n){return Vv(this,t,u(n,56))},x(ri,"EObjectContainmentWithInverseEList/Resolving",353),S(298,353,Is,gb),h.ci=function(){this.a.tb=null},x(wt,"EPackageImpl/2",298),S(1228,1,{},rOt),x(wt,"EPackageImpl/3",1228),S(718,43,qm,HJ),h._b=function(t){return lr(t)?u_(this,t):!!xs(this.f,t)},x(wt,"EPackageRegistryImpl",718),S(509,284,{105:1,92:1,90:1,147:1,191:1,56:1,2017:1,108:1,472:1,49:1,97:1,150:1,509:1,284:1,114:1,115:1},JL),h.Qg=function(t){return RVe(this,t)},h._g=function(t,n,i){var s,c,a;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return kt(),(this.Bb&256)!=0;case 3:return kt(),(this.Bb&512)!=0;case 4:return me(this.s);case 5:return me(this.t);case 6:return kt(),a=this.t,a>1||a==-1;case 7:return kt(),c=this.s,c>=1;case 8:return n?ou(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?u(this.Cb,59):null}return _l(this,t-Lt((tt(),Ew)),ct((s=u(mt(this,16),26),s||Ew),t),n,i)},h.hh=function(t,n,i){var s,c,a;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Ro(this.Ab,t,i);case 10:return this.Cb&&(i=(c=this.Db>>16,c>=0?RVe(this,i):this.Cb.ih(this,-1-c,null,i))),Sl(this,t,10,i)}return a=u(ct((s=u(mt(this,16),26),s||(tt(),Ew)),n),66),a.Nj().Qj(this,zo(this),n-Lt((tt(),Ew)),t,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 9:return XF(this,i);case 10:return Sl(this,null,10,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),Ew)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),Ew)),t,i)},h.lh=function(t){var n,i,s;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return s=this.t,s>1||s==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&$0(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&$0(this.q).i==0);case 10:return!!(this.Db>>16==10&&u(this.Cb,59))}return Bl(this,t-Lt((tt(),Ew)),ct((n=u(mt(this,16),26),n||Ew),t))},h.zh=function(){return tt(),Ew},x(wt,"EParameterImpl",509),S(99,449,{105:1,92:1,90:1,147:1,191:1,56:1,18:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,99:1,449:1,284:1,114:1,115:1,677:1},zte),h._g=function(t,n,i){var s,c,a,g;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return kt(),(this.Bb&256)!=0;case 3:return kt(),(this.Bb&512)!=0;case 4:return me(this.s);case 5:return me(this.t);case 6:return kt(),g=this.t,g>1||g==-1;case 7:return kt(),c=this.s,c>=1;case 8:return n?ou(this):this.r;case 9:return this.q;case 10:return kt(),(this.Bb&qu)!=0;case 11:return kt(),(this.Bb&ew)!=0;case 12:return kt(),(this.Bb&Kb)!=0;case 13:return this.j;case 14:return RO(this);case 15:return kt(),(this.Bb&xc)!=0;case 16:return kt(),(this.Bb&gh)!=0;case 17:return wb(this);case 18:return kt(),(this.Bb&co)!=0;case 19:return kt(),a=Ur(this),!!(a&&(a.Bb&co)!=0);case 20:return kt(),(this.Bb&zr)!=0;case 21:return n?Ur(this):this.b;case 22:return n?Ese(this):pHe(this);case 23:return!this.a&&(this.a=new lm(xw,this,23)),this.a}return _l(this,t-Lt((tt(),x2)),ct((s=u(mt(this,16),26),s||x2),t),n,i)},h.lh=function(t){var n,i,s,c;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return(this.Bb&256)==0;case 3:return(this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return c=this.t,c>1||c==-1;case 7:return i=this.s,i>=1;case 8:return!!this.r&&!this.q.e&&$0(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&$0(this.q).i==0);case 10:return(this.Bb&qu)==0;case 11:return(this.Bb&ew)!=0;case 12:return(this.Bb&Kb)!=0;case 13:return this.j!=null;case 14:return RO(this)!=null;case 15:return(this.Bb&xc)!=0;case 16:return(this.Bb&gh)!=0;case 17:return!!wb(this);case 18:return(this.Bb&co)!=0;case 19:return s=Ur(this),!!s&&(s.Bb&co)!=0;case 20:return(this.Bb&zr)==0;case 21:return!!this.b;case 22:return!!pHe(this);case 23:return!!this.a&&this.a.i!=0}return Bl(this,t-Lt((tt(),x2)),ct((n=u(mt(this,16),26),n||x2),t))},h.sh=function(t,n){var i,s;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:k_(this,un(n));return;case 2:od(this,je(Pe(n)));return;case 3:cd(this,je(Pe(n)));return;case 4:id(this,u(n,19).a);return;case 5:Tb(this,u(n,19).a);return;case 8:Sg(this,u(n,138));return;case 9:s=_f(this,u(n,87),null),s&&s.Fi();return;case 10:vO(this,je(Pe(n)));return;case 11:kO(this,je(Pe(n)));return;case 12:yO(this,je(Pe(n)));return;case 13:Zee(this,un(n));return;case 15:OO(this,je(Pe(n)));return;case 16:SO(this,je(Pe(n)));return;case 18:mCt(this,je(Pe(n)));return;case 20:roe(this,je(Pe(n)));return;case 21:ise(this,u(n,18));return;case 23:!this.a&&(this.a=new lm(xw,this,23)),Gt(this.a),!this.a&&(this.a=new lm(xw,this,23)),vi(this.a,u(n,14));return}Wl(this,t-Lt((tt(),x2)),ct((i=u(mt(this,16),26),i||x2),t),n)},h.zh=function(){return tt(),x2},h.Bh=function(t){var n,i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:W(this.Cb,88)&&Lb(qc(u(this.Cb,88)),4),Io(this,null);return;case 2:od(this,!0);return;case 3:cd(this,!0);return;case 4:id(this,0);return;case 5:Tb(this,1);return;case 8:Sg(this,null);return;case 9:i=_f(this,null,null),i&&i.Fi();return;case 10:vO(this,!0);return;case 11:kO(this,!1);return;case 12:yO(this,!1);return;case 13:this.i=null,vP(this,null);return;case 15:OO(this,!1);return;case 16:SO(this,!1);return;case 18:ioe(this,!1),W(this.Cb,88)&&Lb(qc(u(this.Cb,88)),2);return;case 20:roe(this,!0);return;case 21:ise(this,null);return;case 23:!this.a&&(this.a=new lm(xw,this,23)),Gt(this.a);return}Ql(this,t-Lt((tt(),x2)),ct((n=u(mt(this,16),26),n||x2),t))},h.Gh=function(){Ese(this),F3(ms((Oc(),Cr),this)),ou(this),this.Bb|=1},h.Lj=function(){return Ur(this)},h.qk=function(){var t;return t=Ur(this),!!t&&(t.Bb&co)!=0},h.rk=function(){return(this.Bb&co)!=0},h.sk=function(){return(this.Bb&zr)!=0},h.nk=function(t,n){return this.c=null,Gse(this,t,n)},h.Ib=function(){var t;return(this.Db&64)!=0?$j(this):(t=new nu($j(this)),t.a+=" (containment: ",Xa(t,(this.Bb&co)!=0),t.a+=", resolveProxies: ",Xa(t,(this.Bb&zr)!=0),t.a+=")",t.a)},x(wt,"EReferenceImpl",99),S(548,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,548:1,114:1,115:1},Z8e),h.Fb=function(t){return this===t},h.cd=function(){return this.b},h.dd=function(){return this.c},h.Hb=function(){return C0(this)},h.Uh=function(t){S8t(this,un(t))},h.ed=function(t){return h8t(this,un(t))},h._g=function(t,n,i){var s;switch(t){case 0:return this.b;case 1:return this.c}return _l(this,t-Lt((tt(),Kr)),ct((s=u(mt(this,16),26),s||Kr),t),n,i)},h.lh=function(t){var n;switch(t){case 0:return this.b!=null;case 1:return this.c!=null}return Bl(this,t-Lt((tt(),Kr)),ct((n=u(mt(this,16),26),n||Kr),t))},h.sh=function(t,n){var i;switch(t){case 0:x8t(this,un(n));return;case 1:ese(this,un(n));return}Wl(this,t-Lt((tt(),Kr)),ct((i=u(mt(this,16),26),i||Kr),t),n)},h.zh=function(){return tt(),Kr},h.Bh=function(t){var n;switch(t){case 0:Jre(this,null);return;case 1:ese(this,null);return}Ql(this,t-Lt((tt(),Kr)),ct((n=u(mt(this,16),26),n||Kr),t))},h.Sh=function(){var t;return this.a==-1&&(t=this.b,this.a=t==null?0:ud(t)),this.a},h.Th=function(t){this.a=t},h.Ib=function(){var t;return(this.Db&64)!=0?_u(this):(t=new nu(_u(this)),t.a+=" (key: ",us(t,this.b),t.a+=", value: ",us(t,this.c),t.a+=")",t.a)},h.a=-1,h.b=null,h.c=null;var to=x(wt,"EStringToStringMapEntryImpl",548),i1t=hi(ri,"FeatureMap/Entry/Internal");S(565,1,WD),h.Ok=function(t){return this.Pk(u(t,49))},h.Pk=function(t){return this.Ok(t)},h.Fb=function(t){var n,i;return this===t?!0:W(t,72)?(n=u(t,72),n.ak()==this.c?(i=this.dd(),i==null?n.dd()==null:qn(i,n.dd())):!1):!1},h.ak=function(){return this.c},h.Hb=function(){var t;return t=this.dd(),ci(this.c)^(t==null?0:ci(t))},h.Ib=function(){var t,n;return t=this.c,n=ml(t.Hj()).Ph(),t.ne(),(n!=null&&n.length!=0?n+":"+t.ne():t.ne())+"="+this.dd()},x(wt,"EStructuralFeatureImpl/BasicFeatureMapEntry",565),S(776,565,WD,Jte),h.Pk=function(t){return new Jte(this.c,t)},h.dd=function(){return this.a},h.Qk=function(t,n,i){return _Mt(this,t,this.a,n,i)},h.Rk=function(t,n,i){return HMt(this,t,this.a,n,i)},x(wt,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",776),S(1314,1,{},P$e),h.Pj=function(t,n,i,s,c){var a;return a=u(X3(t,this.b),215),a.nl(this.a).Wj(s)},h.Qj=function(t,n,i,s,c){var a;return a=u(X3(t,this.b),215),a.el(this.a,s,c)},h.Rj=function(t,n,i,s,c){var a;return a=u(X3(t,this.b),215),a.fl(this.a,s,c)},h.Sj=function(t,n,i){var s;return s=u(X3(t,this.b),215),s.nl(this.a).fj()},h.Tj=function(t,n,i,s){var c;c=u(X3(t,this.b),215),c.nl(this.a).Wb(s)},h.Uj=function(t,n,i){return u(X3(t,this.b),215).nl(this.a)},h.Vj=function(t,n,i){var s;s=u(X3(t,this.b),215),s.nl(this.a).Xj()},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1314),S(89,1,{},Ya,ug,Ja,ag),h.Pj=function(t,n,i,s,c){var a;if(a=n.Ch(i),a==null&&n.Dh(i,a=Kj(this,t)),!c)switch(this.e){case 50:case 41:return u(a,589).sj();case 40:return u(a,215).kl()}return a},h.Qj=function(t,n,i,s,c){var a,g;return g=n.Ch(i),g==null&&n.Dh(i,g=Kj(this,t)),a=u(g,69).lk(s,c),a},h.Rj=function(t,n,i,s,c){var a;return a=n.Ch(i),a!=null&&(c=u(a,69).mk(s,c)),c},h.Sj=function(t,n,i){var s;return s=n.Ch(i),s!=null&&u(s,76).fj()},h.Tj=function(t,n,i,s){var c;c=u(n.Ch(i),76),!c&&n.Dh(i,c=Kj(this,t)),c.Wb(s)},h.Uj=function(t,n,i){var s,c;return c=n.Ch(i),c==null&&n.Dh(i,c=Kj(this,t)),W(c,76)?u(c,76):(s=u(n.Ch(i),15),new MMe(s))},h.Vj=function(t,n,i){var s;s=u(n.Ch(i),76),!s&&n.Dh(i,s=Kj(this,t)),s.Xj()},h.b=0,h.e=0,x(wt,"EStructuralFeatureImpl/InternalSettingDelegateMany",89),S(504,1,{}),h.Qj=function(t,n,i,s,c){throw F(new on)},h.Rj=function(t,n,i,s,c){throw F(new on)},h.Uj=function(t,n,i){return new CBe(this,t,n,i)};var oa;x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingle",504),S(1331,1,iK,CBe),h.Wj=function(t){return this.a.Pj(this.c,this.d,this.b,t,!0)},h.fj=function(){return this.a.Sj(this.c,this.d,this.b)},h.Wb=function(t){this.a.Tj(this.c,this.d,this.b,t)},h.Xj=function(){this.a.Vj(this.c,this.d,this.b)},h.b=0,x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1331),S(769,504,{},Iie),h.Pj=function(t,n,i,s,c){return uQ(t,t.eh(),t.Vg())==this.b?this.sk()&&s?Vq(t):t.eh():null},h.Qj=function(t,n,i,s,c){var a,g;return t.eh()&&(c=(a=t.Vg(),a>=0?t.Qg(c):t.eh().ih(t,-1-a,null,c))),g=ui(t.Tg(),this.e),t.Sg(s,g,c)},h.Rj=function(t,n,i,s,c){var a;return a=ui(t.Tg(),this.e),t.Sg(null,a,c)},h.Sj=function(t,n,i){var s;return s=ui(t.Tg(),this.e),!!t.eh()&&t.Vg()==s},h.Tj=function(t,n,i,s){var c,a,g,w,m;if(s!=null&&!dQ(this.a,s))throw F(new d3(KD+(W(s,56)?pce(u(s,56).Tg()):Fre(zc(s)))+VD+this.a+"'"));if(c=t.eh(),g=ui(t.Tg(),this.e),ie(s)!==ie(c)||t.Vg()!=g&&s!=null){if(EO(t,u(s,56)))throw F(new Ot(US+t.Ib()));m=null,c&&(m=(a=t.Vg(),a>=0?t.Qg(m):t.eh().ih(t,-1-a,null,m))),w=u(s,49),w&&(m=w.gh(t,ui(w.Tg(),this.b),null,m)),m=t.Sg(w,g,m),m&&m.Fi()}else t.Lg()&&t.Mg()&&Hn(t,new rr(t,1,g,s,s))},h.Vj=function(t,n,i){var s,c,a,g;s=t.eh(),s?(g=(c=t.Vg(),c>=0?t.Qg(null):t.eh().ih(t,-1-c,null,null)),a=ui(t.Tg(),this.e),g=t.Sg(null,a,g),g&&g.Fi()):t.Lg()&&t.Mg()&&Hn(t,new T5(t,1,this.e,null,null))},h.sk=function(){return!1},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",769),S(1315,769,{},wRe),h.sk=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1315),S(563,504,{}),h.Pj=function(t,n,i,s,c){var a;return a=n.Ch(i),a==null?this.b:ie(a)===ie(oa)?null:a},h.Sj=function(t,n,i){var s;return s=n.Ch(i),s!=null&&(ie(s)===ie(oa)||!qn(s,this.b))},h.Tj=function(t,n,i,s){var c,a;t.Lg()&&t.Mg()?(c=(a=n.Ch(i),a==null?this.b:ie(a)===ie(oa)?null:a),s==null?this.c!=null?(n.Dh(i,null),s=this.b):this.b!=null?n.Dh(i,oa):n.Dh(i,null):(this.Sk(s),n.Dh(i,s)),Hn(t,this.d.Tk(t,1,this.e,c,s))):s==null?this.c!=null?n.Dh(i,null):this.b!=null?n.Dh(i,oa):n.Dh(i,null):(this.Sk(s),n.Dh(i,s))},h.Vj=function(t,n,i){var s,c;t.Lg()&&t.Mg()?(s=(c=n.Ch(i),c==null?this.b:ie(c)===ie(oa)?null:c),n.Eh(i),Hn(t,this.d.Tk(t,1,this.e,s,this.b))):n.Eh(i)},h.Sk=function(t){throw F(new FMe)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",563),S(Zm,1,{},J8e),h.Tk=function(t,n,i,s,c){return new T5(t,n,i,s,c)},h.Uk=function(t,n,i,s,c,a){return new l_(t,n,i,s,c,a)};var i2e,r2e,s2e,o2e,c2e,l2e,u2e,jU,f2e;x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",Zm),S(1332,Zm,{},e9e),h.Tk=function(t,n,i,s,c){return new bre(t,n,i,je(Pe(s)),je(Pe(c)))},h.Uk=function(t,n,i,s,c,a){return new VFe(t,n,i,je(Pe(s)),je(Pe(c)),a)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1332),S(1333,Zm,{},t9e),h.Tk=function(t,n,i,s,c){return new Qre(t,n,i,u(s,217).a,u(c,217).a)},h.Uk=function(t,n,i,s,c,a){return new _Fe(t,n,i,u(s,217).a,u(c,217).a,a)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1333),S(1334,Zm,{},n9e),h.Tk=function(t,n,i,s,c){return new zre(t,n,i,u(s,172).a,u(c,172).a)},h.Uk=function(t,n,i,s,c,a){return new HFe(t,n,i,u(s,172).a,u(c,172).a,a)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1334),S(1335,Zm,{},i9e),h.Tk=function(t,n,i,s,c){return new gre(t,n,i,oe(Oe(s)),oe(Oe(c)))},h.Uk=function(t,n,i,s,c,a){return new qFe(t,n,i,oe(Oe(s)),oe(Oe(c)),a)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1335),S(1336,Zm,{},r9e),h.Tk=function(t,n,i,s,c){return new Vre(t,n,i,u(s,155).a,u(c,155).a)},h.Uk=function(t,n,i,s,c,a){return new QFe(t,n,i,u(s,155).a,u(c,155).a,a)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1336),S(1337,Zm,{},s9e),h.Tk=function(t,n,i,s,c){return new pre(t,n,i,u(s,19).a,u(c,19).a)},h.Uk=function(t,n,i,s,c,a){return new zFe(t,n,i,u(s,19).a,u(c,19).a,a)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1337),S(1338,Zm,{},o9e),h.Tk=function(t,n,i,s,c){return new Wre(t,n,i,u(s,162).a,u(c,162).a)},h.Uk=function(t,n,i,s,c,a){return new WFe(t,n,i,u(s,162).a,u(c,162).a,a)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1338),S(1339,Zm,{},c9e),h.Tk=function(t,n,i,s,c){return new Kre(t,n,i,u(s,184).a,u(c,184).a)},h.Uk=function(t,n,i,s,c,a){return new KFe(t,n,i,u(s,184).a,u(c,184).a,a)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1339),S(1317,563,{},TBe),h.Sk=function(t){if(!this.a.wj(t))throw F(new d3(KD+zc(t)+VD+this.a+"'"))},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1317),S(1318,563,{},gLe),h.Sk=function(t){},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1318),S(770,563,{}),h.Sj=function(t,n,i){var s;return s=n.Ch(i),s!=null},h.Tj=function(t,n,i,s){var c,a;t.Lg()&&t.Mg()?(c=!0,a=n.Ch(i),a==null?(c=!1,a=this.b):ie(a)===ie(oa)&&(a=null),s==null?this.c!=null?(n.Dh(i,null),s=this.b):n.Dh(i,oa):(this.Sk(s),n.Dh(i,s)),Hn(t,this.d.Uk(t,1,this.e,a,s,!c))):s==null?this.c!=null?n.Dh(i,null):n.Dh(i,oa):(this.Sk(s),n.Dh(i,s))},h.Vj=function(t,n,i){var s,c;t.Lg()&&t.Mg()?(s=!0,c=n.Ch(i),c==null?(s=!1,c=this.b):ie(c)===ie(oa)&&(c=null),n.Eh(i),Hn(t,this.d.Uk(t,2,this.e,c,this.b,s))):n.Eh(i)},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",770),S(1319,770,{},EBe),h.Sk=function(t){if(!this.a.wj(t))throw F(new d3(KD+zc(t)+VD+this.a+"'"))},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1319),S(1320,770,{},pLe),h.Sk=function(t){},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1320),S(398,504,{},JA),h.Pj=function(t,n,i,s,c){var a,g,w,m,y;if(y=n.Ch(i),this.Kj()&&ie(y)===ie(oa))return null;if(this.sk()&&s&&y!=null){if(w=u(y,49),w.kh()&&(m=o1(t,w),w!=m)){if(!dQ(this.a,m))throw F(new d3(KD+zc(m)+VD+this.a+"'"));n.Dh(i,y=m),this.rk()&&(a=u(m,49),g=w.ih(t,this.b?ui(w.Tg(),this.b):-1-ui(t.Tg(),this.e),null,null),!a.eh()&&(g=a.gh(t,this.b?ui(a.Tg(),this.b):-1-ui(t.Tg(),this.e),null,g)),g&&g.Fi()),t.Lg()&&t.Mg()&&Hn(t,new T5(t,9,this.e,w,m))}return y}else return y},h.Qj=function(t,n,i,s,c){var a,g;return g=n.Ch(i),ie(g)===ie(oa)&&(g=null),n.Dh(i,s),this.bj()?ie(g)!==ie(s)&&g!=null&&(a=u(g,49),c=a.ih(t,ui(a.Tg(),this.b),null,c)):this.rk()&&g!=null&&(c=u(g,49).ih(t,-1-ui(t.Tg(),this.e),null,c)),t.Lg()&&t.Mg()&&(!c&&(c=new _d(4)),c.Ei(new T5(t,1,this.e,g,s))),c},h.Rj=function(t,n,i,s,c){var a;return a=n.Ch(i),ie(a)===ie(oa)&&(a=null),n.Eh(i),t.Lg()&&t.Mg()&&(!c&&(c=new _d(4)),this.Kj()?c.Ei(new T5(t,2,this.e,a,null)):c.Ei(new T5(t,1,this.e,a,null))),c},h.Sj=function(t,n,i){var s;return s=n.Ch(i),s!=null},h.Tj=function(t,n,i,s){var c,a,g,w,m;if(s!=null&&!dQ(this.a,s))throw F(new d3(KD+(W(s,56)?pce(u(s,56).Tg()):Fre(zc(s)))+VD+this.a+"'"));m=n.Ch(i),w=m!=null,this.Kj()&&ie(m)===ie(oa)&&(m=null),g=null,this.bj()?ie(m)!==ie(s)&&(m!=null&&(c=u(m,49),g=c.ih(t,ui(c.Tg(),this.b),null,g)),s!=null&&(c=u(s,49),g=c.gh(t,ui(c.Tg(),this.b),null,g))):this.rk()&&ie(m)!==ie(s)&&(m!=null&&(g=u(m,49).ih(t,-1-ui(t.Tg(),this.e),null,g)),s!=null&&(g=u(s,49).gh(t,-1-ui(t.Tg(),this.e),null,g))),s==null&&this.Kj()?n.Dh(i,oa):n.Dh(i,s),t.Lg()&&t.Mg()?(a=new l_(t,1,this.e,m,s,this.Kj()&&!w),g?(g.Ei(a),g.Fi()):Hn(t,a)):g&&g.Fi()},h.Vj=function(t,n,i){var s,c,a,g,w;w=n.Ch(i),g=w!=null,this.Kj()&&ie(w)===ie(oa)&&(w=null),a=null,w!=null&&(this.bj()?(s=u(w,49),a=s.ih(t,ui(s.Tg(),this.b),null,a)):this.rk()&&(a=u(w,49).ih(t,-1-ui(t.Tg(),this.e),null,a))),n.Eh(i),t.Lg()&&t.Mg()?(c=new l_(t,this.Kj()?2:1,this.e,w,null,g),a?(a.Ei(c),a.Fi()):Hn(t,c)):a&&a.Fi()},h.bj=function(){return!1},h.rk=function(){return!1},h.sk=function(){return!1},h.Kj=function(){return!1},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",398),S(564,398,{},fF),h.rk=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",564),S(1323,564,{},dIe),h.sk=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1323),S(772,564,{},_te),h.Kj=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",772),S(1325,772,{},gIe),h.sk=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1325),S(640,564,{},xF),h.bj=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",640),S(1324,640,{},mRe),h.sk=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1324),S(773,640,{},Tne),h.Kj=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",773),S(1326,773,{},vRe),h.sk=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1326),S(641,398,{},Hte),h.sk=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",641),S(1327,641,{},pIe),h.Kj=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1327),S(774,641,{},xne),h.bj=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",774),S(1328,774,{},yRe),h.Kj=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1328),S(1321,398,{},bIe),h.Kj=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1321),S(771,398,{},Cne),h.bj=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",771),S(1322,771,{},ORe),h.Kj=function(){return!0},x(wt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1322),S(775,565,WD,Oie),h.Pk=function(t){return new Oie(this.a,this.c,t)},h.dd=function(){return this.b},h.Qk=function(t,n,i){return HEt(this,t,this.b,i)},h.Rk=function(t,n,i){return qEt(this,t,this.b,i)},x(wt,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",775),S(1329,1,iK,MMe),h.Wj=function(t){return this.a},h.fj=function(){return W(this.a,95)?u(this.a,95).fj():!this.a.dc()},h.Wb=function(t){this.a.$b(),this.a.Gc(u(t,15))},h.Xj=function(){W(this.a,95)?u(this.a,95).Xj():this.a.$b()},x(wt,"EStructuralFeatureImpl/SettingMany",1329),S(1330,565,WD,I_e),h.Ok=function(t){return new dF((Un(),fx),this.b.Ih(this.a,t))},h.dd=function(){return null},h.Qk=function(t,n,i){return i},h.Rk=function(t,n,i){return i},x(wt,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1330),S(642,565,WD,dF),h.Ok=function(t){return new dF(this.c,t)},h.dd=function(){return this.a},h.Qk=function(t,n,i){return i},h.Rk=function(t,n,i){return i},x(wt,"EStructuralFeatureImpl/SimpleFeatureMapEntry",642),S(391,497,xh,s3),h.ri=function(t){return J(Ou,Ee,26,t,0,1)},h.ni=function(){return!1},x(wt,"ESuperAdapter/1",391),S(444,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,836:1,49:1,97:1,150:1,444:1,114:1,115:1},LL),h._g=function(t,n,i){var s;switch(t){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new k5(this,os,this)),this.a}return _l(this,t-Lt((tt(),Lp)),ct((s=u(mt(this,16),26),s||Lp),t),n,i)},h.jh=function(t,n,i){var s,c;switch(n){case 0:return!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Lr(this.Ab,t,i);case 2:return!this.a&&(this.a=new k5(this,os,this)),Lr(this.a,t,i)}return c=u(ct((s=u(mt(this,16),26),s||(tt(),Lp)),n),66),c.Nj().Rj(this,zo(this),n-Lt((tt(),Lp)),t,i)},h.lh=function(t){var n;switch(t){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return Bl(this,t-Lt((tt(),Lp)),ct((n=u(mt(this,16),26),n||Lp),t))},h.sh=function(t,n){var i;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab),!this.Ab&&(this.Ab=new we(Sn,this,0,3)),vi(this.Ab,u(n,14));return;case 1:Io(this,un(n));return;case 2:!this.a&&(this.a=new k5(this,os,this)),Gt(this.a),!this.a&&(this.a=new k5(this,os,this)),vi(this.a,u(n,14));return}Wl(this,t-Lt((tt(),Lp)),ct((i=u(mt(this,16),26),i||Lp),t),n)},h.zh=function(){return tt(),Lp},h.Bh=function(t){var n;switch(t){case 0:!this.Ab&&(this.Ab=new we(Sn,this,0,3)),Gt(this.Ab);return;case 1:Io(this,null);return;case 2:!this.a&&(this.a=new k5(this,os,this)),Gt(this.a);return}Ql(this,t-Lt((tt(),Lp)),ct((n=u(mt(this,16),26),n||Lp),t))},x(wt,"ETypeParameterImpl",444),S(445,85,Is,k5),h.cj=function(t,n){return qRt(this,u(t,87),n)},h.dj=function(t,n){return QRt(this,u(t,87),n)},x(wt,"ETypeParameterImpl/1",445),S(634,43,qm,eB),h.ec=function(){return new TE(this)},x(wt,"ETypeParameterImpl/2",634),S(556,Hf,kc,TE),h.Fc=function(t){return qIe(this,u(t,87))},h.Gc=function(t){var n,i,s;for(s=!1,i=t.Kc();i.Ob();)n=u(i.Pb(),87),Qn(this.a,n,"")==null&&(s=!0);return s},h.$b=function(){Pc(this.a)},h.Hc=function(t){return il(this.a,t)},h.Kc=function(){var t;return t=new kg(new eg(this.a).a),new EE(t)},h.Mc=function(t){return AHe(this,t)},h.gc=function(){return H4(this.a)},x(wt,"ETypeParameterImpl/2/1",556),S(557,1,fr,EE),h.Nb=function(t){Or(this,t)},h.Pb=function(){return u(Q0(this.a).cd(),87)},h.Ob=function(){return this.a.b},h.Qb=function(){sqe(this.a)},x(wt,"ETypeParameterImpl/2/1/1",557),S(1276,43,qm,vPe),h._b=function(t){return lr(t)?u_(this,t):!!xs(this.f,t)},h.xc=function(t){var n,i;return n=lr(t)?ko(this,t):Xs(xs(this.f,t)),W(n,837)?(i=u(n,837),n=i._j(),Qn(this,u(t,235),n),n):n??(t==null?(wB(),s1t):null)},x(wt,"EValidatorRegistryImpl",1276),S(1313,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,1941:1,49:1,97:1,150:1,114:1,115:1},l9e),h.Ih=function(t,n){switch(t.yj()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return n==null?null:Ns(n);case 25:return GAt(n);case 27:return dAt(n);case 28:return gAt(n);case 29:return n==null?null:kNe(rx[0],u(n,199));case 41:return n==null?"":Hd(u(n,290));case 42:return Ns(n);case 50:return un(n);default:throw F(new Ot(ok+t.ne()+bp))}},h.Jh=function(t){var n,i,s,c,a,g,w,m,y,k,E,M,P,D,B,q;switch(t.G==-1&&(t.G=(M=ml(t),M?ld(M.Mh(),t):-1)),t.G){case 0:return i=new YL,i;case 1:return n=new RZ,n;case 2:return s=new HZ,s;case 4:return c=new AE,c;case 5:return a=new mPe,a;case 6:return g=new qMe,g;case 7:return w=new _Z,w;case 10:return y=new wE,y;case 11:return k=new ZL,k;case 12:return E=new zBe,E;case 13:return P=new JL,P;case 14:return D=new zte,D;case 17:return B=new Z8e,B;case 18:return m=new a0,m;case 19:return q=new LL,q;default:throw F(new Ot(HW+t.zb+bp))}},h.Kh=function(t,n){switch(t.yj()){case 20:return n==null?null:new uee(n);case 21:return n==null?null:new Vd(n);case 23:case 22:return n==null?null:t$t(n);case 26:case 24:return n==null?null:w9(kl(n,-128,127)<<24>>24);case 25:return a_t(n);case 27:return BNt(n);case 28:return FNt(n);case 29:return cLt(n);case 32:case 31:return n==null?null:Rb(n);case 38:case 37:return n==null?null:new MJ(n);case 40:case 39:return n==null?null:me(kl(n,Mr,_n));case 41:return null;case 42:return n==null,null;case 44:case 43:return n==null?null:Cg(Wj(n));case 49:case 48:return n==null?null:mO(kl(n,XD,32767)<<16>>16);case 50:return n;default:throw F(new Ot(ok+t.ne()+bp))}},x(wt,"EcoreFactoryImpl",1313),S(547,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,1939:1,49:1,97:1,150:1,179:1,547:1,114:1,115:1,675:1},cBe),h.gb=!1,h.hb=!1;var h2e,r1t=!1;x(wt,"EcorePackageImpl",547),S(1184,1,{837:1},u9e),h._j=function(){return KNe(),o1t},x(wt,"EcorePackageImpl/1",1184),S(1193,1,An,f9e),h.wj=function(t){return W(t,147)},h.xj=function(t){return J(tT,Ee,147,t,0,1)},x(wt,"EcorePackageImpl/10",1193),S(1194,1,An,h9e),h.wj=function(t){return W(t,191)},h.xj=function(t){return J(kU,Ee,191,t,0,1)},x(wt,"EcorePackageImpl/11",1194),S(1195,1,An,a9e),h.wj=function(t){return W(t,56)},h.xj=function(t){return J(N1,Ee,56,t,0,1)},x(wt,"EcorePackageImpl/12",1195),S(1196,1,An,d9e),h.wj=function(t){return W(t,399)},h.xj=function(t){return J(ku,Iae,59,t,0,1)},x(wt,"EcorePackageImpl/13",1196),S(1197,1,An,g9e),h.wj=function(t){return W(t,235)},h.xj=function(t){return J(vf,Ee,235,t,0,1)},x(wt,"EcorePackageImpl/14",1197),S(1198,1,An,p9e),h.wj=function(t){return W(t,509)},h.xj=function(t){return J(Ip,Ee,2017,t,0,1)},x(wt,"EcorePackageImpl/15",1198),S(1199,1,An,b9e),h.wj=function(t){return W(t,99)},h.xj=function(t){return J(Cw,Ym,18,t,0,1)},x(wt,"EcorePackageImpl/16",1199),S(1200,1,An,w9e),h.wj=function(t){return W(t,170)},h.xj=function(t){return J(dc,Ym,170,t,0,1)},x(wt,"EcorePackageImpl/17",1200),S(1201,1,An,m9e),h.wj=function(t){return W(t,472)},h.xj=function(t){return J(Sw,Ee,472,t,0,1)},x(wt,"EcorePackageImpl/18",1201),S(1202,1,An,v9e),h.wj=function(t){return W(t,548)},h.xj=function(t){return J(to,sit,548,t,0,1)},x(wt,"EcorePackageImpl/19",1202),S(1185,1,An,y9e),h.wj=function(t){return W(t,322)},h.xj=function(t){return J(xw,Ym,34,t,0,1)},x(wt,"EcorePackageImpl/2",1185),S(1203,1,An,O9e),h.wj=function(t){return W(t,241)},h.xj=function(t){return J(os,kit,87,t,0,1)},x(wt,"EcorePackageImpl/20",1203),S(1204,1,An,k9e),h.wj=function(t){return W(t,444)},h.xj=function(t){return J(Go,Ee,836,t,0,1)},x(wt,"EcorePackageImpl/21",1204),S(1205,1,An,S9e),h.wj=function(t){return sb(t)},h.xj=function(t){return J(Ui,fe,476,t,8,1)},x(wt,"EcorePackageImpl/22",1205),S(1206,1,An,x9e),h.wj=function(t){return W(t,190)},h.xj=function(t){return J(Tc,fe,190,t,0,2)},x(wt,"EcorePackageImpl/23",1206),S(1207,1,An,C9e),h.wj=function(t){return W(t,217)},h.xj=function(t){return J(uy,fe,217,t,0,1)},x(wt,"EcorePackageImpl/24",1207),S(1208,1,An,T9e),h.wj=function(t){return W(t,172)},h.xj=function(t){return J(c6,fe,172,t,0,1)},x(wt,"EcorePackageImpl/25",1208),S(1209,1,An,E9e),h.wj=function(t){return W(t,199)},h.xj=function(t){return J(c$,fe,199,t,0,1)},x(wt,"EcorePackageImpl/26",1209),S(1210,1,An,A9e),h.wj=function(t){return!1},h.xj=function(t){return J(M2e,Ee,2110,t,0,1)},x(wt,"EcorePackageImpl/27",1210),S(1211,1,An,M9e),h.wj=function(t){return ob(t)},h.xj=function(t){return J(wr,fe,333,t,7,1)},x(wt,"EcorePackageImpl/28",1211),S(1212,1,An,P9e),h.wj=function(t){return W(t,58)},h.xj=function(t){return J(zme,Vb,58,t,0,1)},x(wt,"EcorePackageImpl/29",1212),S(1186,1,An,j9e),h.wj=function(t){return W(t,510)},h.xj=function(t){return J(Sn,{3:1,4:1,5:1,1934:1},590,t,0,1)},x(wt,"EcorePackageImpl/3",1186),S(1213,1,An,D9e),h.wj=function(t){return W(t,573)},h.xj=function(t){return J(Vme,Ee,1940,t,0,1)},x(wt,"EcorePackageImpl/30",1213),S(1214,1,An,$9e),h.wj=function(t){return W(t,153)},h.xj=function(t){return J(b2e,Vb,153,t,0,1)},x(wt,"EcorePackageImpl/31",1214),S(1215,1,An,N9e),h.wj=function(t){return W(t,72)},h.xj=function(t){return J(SI,jit,72,t,0,1)},x(wt,"EcorePackageImpl/32",1215),S(1216,1,An,I9e),h.wj=function(t){return W(t,155)},h.xj=function(t){return J(dk,fe,155,t,0,1)},x(wt,"EcorePackageImpl/33",1216),S(1217,1,An,R9e),h.wj=function(t){return W(t,19)},h.xj=function(t){return J(Fr,fe,19,t,0,1)},x(wt,"EcorePackageImpl/34",1217),S(1218,1,An,L9e),h.wj=function(t){return W(t,290)},h.xj=function(t){return J(Xae,Ee,290,t,0,1)},x(wt,"EcorePackageImpl/35",1218),S(1219,1,An,B9e),h.wj=function(t){return W(t,162)},h.xj=function(t){return J(mp,fe,162,t,0,1)},x(wt,"EcorePackageImpl/36",1219),S(1220,1,An,F9e),h.wj=function(t){return W(t,83)},h.xj=function(t){return J(Uae,Ee,83,t,0,1)},x(wt,"EcorePackageImpl/37",1220),S(1221,1,An,_9e),h.wj=function(t){return W(t,591)},h.xj=function(t){return J(a2e,Ee,591,t,0,1)},x(wt,"EcorePackageImpl/38",1221),S(1222,1,An,H9e),h.wj=function(t){return!1},h.xj=function(t){return J(P2e,Ee,2111,t,0,1)},x(wt,"EcorePackageImpl/39",1222),S(1187,1,An,q9e),h.wj=function(t){return W(t,88)},h.xj=function(t){return J(Ou,Ee,26,t,0,1)},x(wt,"EcorePackageImpl/4",1187),S(1223,1,An,Q9e),h.wj=function(t){return W(t,184)},h.xj=function(t){return J(vp,fe,184,t,0,1)},x(wt,"EcorePackageImpl/40",1223),S(1224,1,An,z9e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(wt,"EcorePackageImpl/41",1224),S(1225,1,An,W9e),h.wj=function(t){return W(t,588)},h.xj=function(t){return J(Kme,Ee,588,t,0,1)},x(wt,"EcorePackageImpl/42",1225),S(1226,1,An,K9e),h.wj=function(t){return!1},h.xj=function(t){return J(j2e,fe,2112,t,0,1)},x(wt,"EcorePackageImpl/43",1226),S(1227,1,An,V9e),h.wj=function(t){return W(t,42)},h.xj=function(t){return J(Hg,Gj,42,t,0,1)},x(wt,"EcorePackageImpl/44",1227),S(1188,1,An,X9e),h.wj=function(t){return W(t,138)},h.xj=function(t){return J(yf,Ee,138,t,0,1)},x(wt,"EcorePackageImpl/5",1188),S(1189,1,An,U9e),h.wj=function(t){return W(t,148)},h.xj=function(t){return J(AU,Ee,148,t,0,1)},x(wt,"EcorePackageImpl/6",1189),S(1190,1,An,G9e),h.wj=function(t){return W(t,457)},h.xj=function(t){return J(kI,Ee,671,t,0,1)},x(wt,"EcorePackageImpl/7",1190),S(1191,1,An,Y9e),h.wj=function(t){return W(t,573)},h.xj=function(t){return J(Ba,Ee,678,t,0,1)},x(wt,"EcorePackageImpl/8",1191),S(1192,1,An,Z9e),h.wj=function(t){return W(t,471)},h.xj=function(t){return J(ix,Ee,471,t,0,1)},x(wt,"EcorePackageImpl/9",1192),S(1025,1982,rit,LPe),h.bi=function(t,n){Ejt(this,u(n,415))},h.fi=function(t,n){YXe(this,t,u(n,415))},x(wt,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",1025),S(1026,143,W7,ZLe),h.Ai=function(){return this.a.a},x(wt,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",1026),S(1053,1052,{},gNe),x("org.eclipse.emf.ecore.plugin","EcorePlugin",1053);var a2e=hi(Dit,"Resource");S(781,1378,$it),h.Yk=function(t){},h.Zk=function(t){},h.Vk=function(){return!this.a&&(this.a=new KL(this)),this.a},h.Wk=function(t){var n,i,s,c,a;if(s=t.length,s>0)if(fn(0,t.length),t.charCodeAt(0)==47){for(a=new No(4),c=1,n=1;n0&&(t=t.substr(0,i)));return UBt(this,t)},h.Xk=function(){return this.c},h.Ib=function(){var t;return Hd(this.gm)+"@"+(t=ci(this)>>>0,t.toString(16))+" uri='"+this.d+"'"},h.b=!1,x(rK,"ResourceImpl",781),S(1379,781,$it,jMe),x(rK,"BinaryResourceImpl",1379),S(1169,694,ZW),h.si=function(t){return W(t,56)?P7t(this,u(t,56)):W(t,591)?new Ft(u(t,591).Vk()):ie(t)===ie(this.f)?u(t,14).Kc():(M3(),rT.a)},h.Ob=function(){return ole(this)},h.a=!1,x(ri,"EcoreUtil/ContentTreeIterator",1169),S(1380,1169,ZW,MLe),h.si=function(t){return ie(t)===ie(this.f)?u(t,15).Kc():new a_e(u(t,56))},x(rK,"ResourceImpl/5",1380),S(648,1994,Oit,KL),h.Hc=function(t){return this.i<=4?MO(this,t):W(t,49)&&u(t,49).Zg()==this.a},h.bi=function(t,n){t==this.i-1&&(this.a.b||(this.a.b=!0))},h.di=function(t,n){t==0?this.a.b||(this.a.b=!0):__(this,t,n)},h.fi=function(t,n){},h.gi=function(t,n,i){},h.aj=function(){return 2},h.Ai=function(){return this.a},h.bj=function(){return!0},h.cj=function(t,n){var i;return i=u(t,49),n=i.wh(this.a,n),n},h.dj=function(t,n){var i;return i=u(t,49),i.wh(null,n)},h.ej=function(){return!1},h.hi=function(){return!0},h.ri=function(t){return J(N1,Ee,56,t,0,1)},h.ni=function(){return!1},x(rK,"ResourceImpl/ContentsEList",648),S(957,1964,XO,PMe),h.Zc=function(t){return this.a._h(t)},h.gc=function(){return this.a.gc()},x(ri,"AbstractSequentialInternalEList/1",957);var d2e,g2e,Cr,p2e;S(624,1,{},jRe);var xI,CI;x(ri,"BasicExtendedMetaData",624),S(1160,1,{},j$e),h.$k=function(){return null},h._k=function(){return this.a==-2&&AOt(this,nLt(this.d,this.b)),this.a},h.al=function(){return null},h.bl=function(){return rt(),rt(),Yr},h.ne=function(){return this.c==uk&&POt(this,AKe(this.d,this.b)),this.c},h.cl=function(){return 0},h.a=-2,h.c=uk,x(ri,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1160),S(1161,1,{},ZFe),h.$k=function(){return this.a==(K3(),xI)&&MOt(this,mHt(this.f,this.b)),this.a},h._k=function(){return 0},h.al=function(){return this.c==(K3(),xI)&&jOt(this,vHt(this.f,this.b)),this.c},h.bl=function(){return!this.d&&DOt(this,mQt(this.f,this.b)),this.d},h.ne=function(){return this.e==uk&&$Ot(this,AKe(this.f,this.b)),this.e},h.cl=function(){return this.g==-2&&NOt(this,ORt(this.f,this.b)),this.g},h.e=uk,h.g=-2,x(ri,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",1161),S(1159,1,{},$$e),h.b=!1,h.c=!1,x(ri,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1159),S(1162,1,{},YFe),h.c=-2,h.e=uk,h.f=uk,x(ri,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1162),S(585,622,Is,WA),h.aj=function(){return this.c},h.Fk=function(){return!1},h.li=function(t,n){return n},h.c=0,x(ri,"EDataTypeEList",585);var b2e=hi(ri,"FeatureMap");S(75,585,{3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},yi),h.Vc=function(t,n){gHt(this,t,u(n,72))},h.Fc=function(t){return $_t(this,u(t,72))},h.Yh=function(t){v9t(this,u(t,72))},h.cj=function(t,n){return JSt(this,u(t,72),n)},h.dj=function(t,n){return dne(this,u(t,72),n)},h.ii=function(t,n){return RQt(this,t,n)},h.li=function(t,n){return pKt(this,t,u(n,72))},h._c=function(t,n){return rqt(this,t,u(n,72))},h.jj=function(t,n){return e6t(this,u(t,72),n)},h.kj=function(t,n){return nRe(this,u(t,72),n)},h.lj=function(t,n,i){return rRt(this,u(t,72),u(n,72),i)},h.oi=function(t,n){return Pq(this,t,u(n,72))},h.dl=function(t,n){return Xle(this,t,n)},h.Wc=function(t,n){var i,s,c,a,g,w,m,y,k;for(y=new q0(n.gc()),c=n.Kc();c.Ob();)if(s=u(c.Pb(),72),a=s.ak(),Aa(this.e,a))(!a.hi()||!_M(this,a,s.dd())&&!MO(y,s))&&rn(y,s);else{for(k=Ko(this.e.Tg(),a),i=u(this.g,119),g=!0,w=0;w=0;)if(n=t[this.c],this.k.rl(n.ak()))return this.j=this.f?n:n.dd(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},x(ri,"BasicFeatureMap/FeatureEIterator",410),S(662,410,Vh,UB),h.Lk=function(){return!0},x(ri,"BasicFeatureMap/ResolvingFeatureEIterator",662),S(955,486,QD,xNe),h.Gi=function(){return this},x(ri,"EContentsEList/1",955),S(956,486,QD,U$e),h.Lk=function(){return!1},x(ri,"EContentsEList/2",956),S(954,279,zD,CNe),h.Nk=function(t){},h.Ob=function(){return!1},h.Sb=function(){return!1},x(ri,"EContentsEList/FeatureIteratorImpl/1",954),S(825,585,Is,mte),h.ci=function(){this.a=!0},h.fj=function(){return this.a},h.Xj=function(){var t;Gt(this),el(this.e)?(t=this.a,this.a=!1,Hn(this.e,new Lu(this.e,2,this.c,t,!1))):this.a=!1},h.a=!1,x(ri,"EDataTypeEList/Unsettable",825),S(1849,585,Is,$Ne),h.hi=function(){return!0},x(ri,"EDataTypeUniqueEList",1849),S(1850,825,Is,NNe),h.hi=function(){return!0},x(ri,"EDataTypeUniqueEList/Unsettable",1850),S(139,85,Is,bc),h.Ek=function(){return!0},h.li=function(t,n){return Vv(this,t,u(n,56))},x(ri,"EObjectContainmentEList/Resolving",139),S(1163,545,Is,DNe),h.Ek=function(){return!0},h.li=function(t,n){return Vv(this,t,u(n,56))},x(ri,"EObjectContainmentEList/Unsettable/Resolving",1163),S(748,16,Is,one),h.ci=function(){this.a=!0},h.fj=function(){return this.a},h.Xj=function(){var t;Gt(this),el(this.e)?(t=this.a,this.a=!1,Hn(this.e,new Lu(this.e,2,this.c,t,!1))):this.a=!1},h.a=!1,x(ri,"EObjectContainmentWithInverseEList/Unsettable",748),S(1173,748,Is,QIe),h.Ek=function(){return!0},h.li=function(t,n){return Vv(this,t,u(n,56))},x(ri,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1173),S(743,496,Is,wte),h.ci=function(){this.a=!0},h.fj=function(){return this.a},h.Xj=function(){var t;Gt(this),el(this.e)?(t=this.a,this.a=!1,Hn(this.e,new Lu(this.e,2,this.c,t,!1))):this.a=!1},h.a=!1,x(ri,"EObjectEList/Unsettable",743),S(328,496,Is,lm),h.Ek=function(){return!0},h.li=function(t,n){return Vv(this,t,u(n,56))},x(ri,"EObjectResolvingEList",328),S(1641,743,Is,INe),h.Ek=function(){return!0},h.li=function(t,n){return Vv(this,t,u(n,56))},x(ri,"EObjectResolvingEList/Unsettable",1641),S(1381,1,{},J9e);var s1t;x(ri,"EObjectValidator",1381),S(546,496,Is,fM),h.zk=function(){return this.d},h.Ak=function(){return this.b},h.bj=function(){return!0},h.Dk=function(){return!0},h.b=0,x(ri,"EObjectWithInverseEList",546),S(1176,546,Is,zIe),h.Ck=function(){return!0},x(ri,"EObjectWithInverseEList/ManyInverse",1176),S(625,546,Is,pF),h.ci=function(){this.a=!0},h.fj=function(){return this.a},h.Xj=function(){var t;Gt(this),el(this.e)?(t=this.a,this.a=!1,Hn(this.e,new Lu(this.e,2,this.c,t,!1))):this.a=!1},h.a=!1,x(ri,"EObjectWithInverseEList/Unsettable",625),S(1175,625,Is,WIe),h.Ck=function(){return!0},x(ri,"EObjectWithInverseEList/Unsettable/ManyInverse",1175),S(749,546,Is,cne),h.Ek=function(){return!0},h.li=function(t,n){return Vv(this,t,u(n,56))},x(ri,"EObjectWithInverseResolvingEList",749),S(31,749,Is,dt),h.Ck=function(){return!0},x(ri,"EObjectWithInverseResolvingEList/ManyInverse",31),S(750,625,Is,lne),h.Ek=function(){return!0},h.li=function(t,n){return Vv(this,t,u(n,56))},x(ri,"EObjectWithInverseResolvingEList/Unsettable",750),S(1174,750,Is,KIe),h.Ck=function(){return!0},x(ri,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1174),S(1164,622,Is),h.ai=function(){return(this.b&1792)==0},h.ci=function(){this.b|=1},h.Bk=function(){return(this.b&4)!=0},h.bj=function(){return(this.b&40)!=0},h.Ck=function(){return(this.b&16)!=0},h.Dk=function(){return(this.b&8)!=0},h.Ek=function(){return(this.b&ew)!=0},h.rk=function(){return(this.b&32)!=0},h.Fk=function(){return(this.b&qu)!=0},h.wj=function(t){return this.d?E_e(this.d,t):this.ak().Yj().wj(t)},h.fj=function(){return(this.b&2)!=0?(this.b&1)!=0:this.i!=0},h.hi=function(){return(this.b&128)!=0},h.Xj=function(){var t;Gt(this),(this.b&2)!=0&&(el(this.e)?(t=(this.b&1)!=0,this.b&=-2,h3(this,new Lu(this.e,2,ui(this.e.Tg(),this.ak()),t,!1))):this.b&=-2)},h.ni=function(){return(this.b&1536)==0},h.b=0,x(ri,"EcoreEList/Generic",1164),S(1165,1164,Is,RBe),h.ak=function(){return this.a},x(ri,"EcoreEList/Dynamic",1165),S(747,63,xh,OJ),h.ri=function(t){return v9(this.a.a,t)},x(ri,"EcoreEMap/1",747),S(746,85,Is,oie),h.bi=function(t,n){oj(this.b,u(n,133))},h.di=function(t,n){kze(this.b)},h.ei=function(t,n,i){var s;++(s=this.b,u(n,133),s).e},h.fi=function(t,n){FH(this.b,u(n,133))},h.gi=function(t,n,i){FH(this.b,u(i,133)),ie(i)===ie(n)&&u(i,133).Th(l5t(u(n,133).cd())),oj(this.b,u(n,133))},x(ri,"EcoreEMap/DelegateEObjectContainmentEList",746),S(1171,151,Nae,IQe),x(ri,"EcoreEMap/Unsettable",1171),S(1172,746,Is,VIe),h.ci=function(){this.a=!0},h.fj=function(){return this.a},h.Xj=function(){var t;Gt(this),el(this.e)?(t=this.a,this.a=!1,Hn(this.e,new Lu(this.e,2,this.c,t,!1))):this.a=!1},h.a=!1,x(ri,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1172),S(1168,228,qm,FLe),h.a=!1,h.b=!1,x(ri,"EcoreUtil/Copier",1168),S(745,1,fr,a_e),h.Nb=function(t){Or(this,t)},h.Ob=function(){return lKe(this)},h.Pb=function(){var t;return lKe(this),t=this.b,this.b=null,t},h.Qb=function(){this.a.Qb()},x(ri,"EcoreUtil/ProperContentIterator",745),S(1382,1381,{},GCe);var o1t;x(ri,"EcoreValidator",1382);var c1t;hi(ri,"FeatureMapUtil/Validator"),S(1260,1,{1942:1},e7e),h.rl=function(t){return!0},x(ri,"FeatureMapUtil/1",1260),S(757,1,{1942:1},Sue),h.rl=function(t){var n;return this.c==t?!0:(n=Pe(Bt(this.a,t)),n==null?Jqt(this,t)?(yHe(this.a,t,(kt(),ak)),!0):(yHe(this.a,t,(kt(),qg)),!1):n==(kt(),ak))},h.e=!1;var DU;x(ri,"FeatureMapUtil/BasicValidator",757),S(758,43,qm,dte),x(ri,"FeatureMapUtil/BasicValidator/Cache",758),S(501,52,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,69:1,95:1},T8),h.Vc=function(t,n){LGe(this.c,this.b,t,n)},h.Fc=function(t){return Xle(this.c,this.b,t)},h.Wc=function(t,n){return gWt(this.c,this.b,t,n)},h.Gc=function(t){return a5(this,t)},h.Xh=function(t,n){IAt(this.c,this.b,t,n)},h.lk=function(t,n){return qle(this.c,this.b,t,n)},h.pi=function(t){return Fj(this.c,this.b,t,!1)},h.Zh=function(){return oNe(this.c,this.b)},h.$h=function(){return U4t(this.c,this.b)},h._h=function(t){return _Et(this.c,this.b,t)},h.mk=function(t,n){return CIe(this,t,n)},h.$b=function(){iv(this)},h.Hc=function(t){return _M(this.c,this.b,t)},h.Ic=function(t){return FMt(this.c,this.b,t)},h.Xb=function(t){return Fj(this.c,this.b,t,!0)},h.Wj=function(t){return this},h.Xc=function(t){return YTt(this.c,this.b,t)},h.dc=function(){return mA(this)},h.fj=function(){return!F9(this.c,this.b)},h.Kc=function(){return SAt(this.c,this.b)},h.Yc=function(){return xAt(this.c,this.b)},h.Zc=function(t){return Rjt(this.c,this.b,t)},h.ii=function(t,n){return tZe(this.c,this.b,t,n)},h.ji=function(t,n){NEt(this.c,this.b,t,n)},h.$c=function(t){return NXe(this.c,this.b,t)},h.Mc=function(t){return yQt(this.c,this.b,t)},h._c=function(t,n){return cZe(this.c,this.b,t,n)},h.Wb=function(t){kj(this.c,this.b),a5(this,u(t,15))},h.gc=function(){return Ujt(this.c,this.b)},h.Pc=function(){return XCt(this.c,this.b)},h.Qc=function(t){return ZTt(this.c,this.b,t)},h.Ib=function(){var t,n;for(n=new Va,n.a+="[",t=oNe(this.c,this.b);MH(t);)us(n,g5(rj(t))),MH(t)&&(n.a+=Qr);return n.a+="]",n.a},h.Xj=function(){kj(this.c,this.b)},x(ri,"FeatureMapUtil/FeatureEList",501),S(627,36,W7,j_),h.yi=function(t){return J5(this,t)},h.Di=function(t){var n,i,s,c,a,g,w;switch(this.d){case 1:case 2:{if(a=t.Ai(),ie(a)===ie(this.c)&&J5(this,null)==t.yi(null))return this.g=t.zi(),t.xi()==1&&(this.d=1),!0;break}case 3:{switch(c=t.xi(),c){case 3:{if(a=t.Ai(),ie(a)===ie(this.c)&&J5(this,null)==t.yi(null))return this.d=5,n=new q0(2),rn(n,this.g),rn(n,t.zi()),this.g=n,!0;break}}break}case 5:{switch(c=t.xi(),c){case 3:{if(a=t.Ai(),ie(a)===ie(this.c)&&J5(this,null)==t.yi(null))return i=u(this.g,14),i.Fc(t.zi()),!0;break}}break}case 4:{switch(c=t.xi(),c){case 3:{if(a=t.Ai(),ie(a)===ie(this.c)&&J5(this,null)==t.yi(null))return this.d=1,this.g=t.zi(),!0;break}case 4:{if(a=t.Ai(),ie(a)===ie(this.c)&&J5(this,null)==t.yi(null))return this.d=6,w=new q0(2),rn(w,this.n),rn(w,t.Bi()),this.n=w,g=H(_(Zt,1),On,25,15,[this.o,t.Ci()]),this.g=g,!0;break}}break}case 6:{switch(c=t.xi(),c){case 4:{if(a=t.Ai(),ie(a)===ie(this.c)&&J5(this,null)==t.yi(null))return i=u(this.n,14),i.Fc(t.Bi()),g=u(this.g,48),s=J(Zt,On,25,g.length+1,15,1),vo(g,0,s,0,g.length),s[g.length]=t.Ci(),this.g=s,!0;break}}break}}return!1},x(ri,"FeatureMapUtil/FeatureENotificationImpl",627),S(552,501,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},UA),h.dl=function(t,n){return Xle(this.c,t,n)},h.el=function(t,n,i){return qle(this.c,t,n,i)},h.fl=function(t,n,i){return hue(this.c,t,n,i)},h.gl=function(){return this},h.hl=function(t,n){return b7(this.c,t,n)},h.il=function(t){return u(Fj(this.c,this.b,t,!1),72).ak()},h.jl=function(t){return u(Fj(this.c,this.b,t,!1),72).dd()},h.kl=function(){return this.a},h.ll=function(t){return!F9(this.c,t)},h.ml=function(t,n){_j(this.c,t,n)},h.nl=function(t){return qQe(this.c,t)},h.ol=function(t){aVe(this.c,t)},x(ri,"FeatureMapUtil/FeatureFeatureMap",552),S(1259,1,iK,N$e),h.Wj=function(t){return Fj(this.b,this.a,-1,t)},h.fj=function(){return!F9(this.b,this.a)},h.Wb=function(t){_j(this.b,this.a,t)},h.Xj=function(){kj(this.b,this.a)},x(ri,"FeatureMapUtil/FeatureValue",1259);var Dy,$U,NU,$y,l1t,oT=hi(ZD,"AnyType");S(666,60,Ma,lB),x(ZD,"InvalidDatatypeValueException",666);var TI=hi(ZD,Iit),cT=hi(ZD,Rit),w2e=hi(ZD,Lit),u1t,uo,m2e,i0,f1t,h1t,a1t,d1t,g1t,p1t,b1t,w1t,m1t,v1t,y1t,C2,O1t,T2,lx,k1t,Bp,lT,uT,S1t,ux,fx;S(830,506,{105:1,92:1,90:1,56:1,49:1,97:1,843:1},qJ),h._g=function(t,n,i){switch(t){case 0:return i?(!this.c&&(this.c=new yi(this,0)),this.c):(!this.c&&(this.c=new yi(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new yi(this,0)),u(So(this.c,(Un(),i0)),153)):(!this.c&&(this.c=new yi(this,0)),u(u(So(this.c,(Un(),i0)),153),215)).kl();case 2:return i?(!this.b&&(this.b=new yi(this,2)),this.b):(!this.b&&(this.b=new yi(this,2)),this.b.b)}return _l(this,t-Lt(this.zh()),ct((this.j&2)==0?this.zh():(!this.k&&(this.k=new rf),this.k).ck(),t),n,i)},h.jh=function(t,n,i){var s;switch(n){case 0:return!this.c&&(this.c=new yi(this,0)),a7(this.c,t,i);case 1:return(!this.c&&(this.c=new yi(this,0)),u(u(So(this.c,(Un(),i0)),153),69)).mk(t,i);case 2:return!this.b&&(this.b=new yi(this,2)),a7(this.b,t,i)}return s=u(ct((this.j&2)==0?this.zh():(!this.k&&(this.k=new rf),this.k).ck(),n),66),s.Nj().Rj(this,Ire(this),n-Lt(this.zh()),t,i)},h.lh=function(t){switch(t){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new yi(this,0)),u(So(this.c,(Un(),i0)),153)).dc();case 2:return!!this.b&&this.b.i!=0}return Bl(this,t-Lt(this.zh()),ct((this.j&2)==0?this.zh():(!this.k&&(this.k=new rf),this.k).ck(),t))},h.sh=function(t,n){switch(t){case 0:!this.c&&(this.c=new yi(this,0)),W8(this.c,n);return;case 1:(!this.c&&(this.c=new yi(this,0)),u(u(So(this.c,(Un(),i0)),153),215)).Wb(n);return;case 2:!this.b&&(this.b=new yi(this,2)),W8(this.b,n);return}Wl(this,t-Lt(this.zh()),ct((this.j&2)==0?this.zh():(!this.k&&(this.k=new rf),this.k).ck(),t),n)},h.zh=function(){return Un(),m2e},h.Bh=function(t){switch(t){case 0:!this.c&&(this.c=new yi(this,0)),Gt(this.c);return;case 1:(!this.c&&(this.c=new yi(this,0)),u(So(this.c,(Un(),i0)),153)).$b();return;case 2:!this.b&&(this.b=new yi(this,2)),Gt(this.b);return}Ql(this,t-Lt(this.zh()),ct((this.j&2)==0?this.zh():(!this.k&&(this.k=new rf),this.k).ck(),t))},h.Ib=function(){var t;return(this.j&4)!=0?_u(this):(t=new nu(_u(this)),t.a+=" (mixed: ",l5(t,this.c),t.a+=", anyAttribute: ",l5(t,this.b),t.a+=")",t.a)},x(Ii,"AnyTypeImpl",830),S(667,506,{105:1,92:1,90:1,56:1,49:1,97:1,2021:1,667:1},n7e),h._g=function(t,n,i){switch(t){case 0:return this.a;case 1:return this.b}return _l(this,t-Lt((Un(),C2)),ct((this.j&2)==0?C2:(!this.k&&(this.k=new rf),this.k).ck(),t),n,i)},h.lh=function(t){switch(t){case 0:return this.a!=null;case 1:return this.b!=null}return Bl(this,t-Lt((Un(),C2)),ct((this.j&2)==0?C2:(!this.k&&(this.k=new rf),this.k).ck(),t))},h.sh=function(t,n){switch(t){case 0:HOt(this,un(n));return;case 1:qOt(this,un(n));return}Wl(this,t-Lt((Un(),C2)),ct((this.j&2)==0?C2:(!this.k&&(this.k=new rf),this.k).ck(),t),n)},h.zh=function(){return Un(),C2},h.Bh=function(t){switch(t){case 0:this.a=null;return;case 1:this.b=null;return}Ql(this,t-Lt((Un(),C2)),ct((this.j&2)==0?C2:(!this.k&&(this.k=new rf),this.k).ck(),t))},h.Ib=function(){var t;return(this.j&4)!=0?_u(this):(t=new nu(_u(this)),t.a+=" (data: ",us(t,this.a),t.a+=", target: ",us(t,this.b),t.a+=")",t.a)},h.a=null,h.b=null,x(Ii,"ProcessingInstructionImpl",667),S(668,830,{105:1,92:1,90:1,56:1,49:1,97:1,843:1,2022:1,668:1},OPe),h._g=function(t,n,i){switch(t){case 0:return i?(!this.c&&(this.c=new yi(this,0)),this.c):(!this.c&&(this.c=new yi(this,0)),this.c.b);case 1:return i?(!this.c&&(this.c=new yi(this,0)),u(So(this.c,(Un(),i0)),153)):(!this.c&&(this.c=new yi(this,0)),u(u(So(this.c,(Un(),i0)),153),215)).kl();case 2:return i?(!this.b&&(this.b=new yi(this,2)),this.b):(!this.b&&(this.b=new yi(this,2)),this.b.b);case 3:return!this.c&&(this.c=new yi(this,0)),un(b7(this.c,(Un(),lx),!0));case 4:return une(this.a,(!this.c&&(this.c=new yi(this,0)),un(b7(this.c,(Un(),lx),!0))));case 5:return this.a}return _l(this,t-Lt((Un(),T2)),ct((this.j&2)==0?T2:(!this.k&&(this.k=new rf),this.k).ck(),t),n,i)},h.lh=function(t){switch(t){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new yi(this,0)),u(So(this.c,(Un(),i0)),153)).dc();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new yi(this,0)),un(b7(this.c,(Un(),lx),!0))!=null;case 4:return une(this.a,(!this.c&&(this.c=new yi(this,0)),un(b7(this.c,(Un(),lx),!0))))!=null;case 5:return!!this.a}return Bl(this,t-Lt((Un(),T2)),ct((this.j&2)==0?T2:(!this.k&&(this.k=new rf),this.k).ck(),t))},h.sh=function(t,n){switch(t){case 0:!this.c&&(this.c=new yi(this,0)),W8(this.c,n);return;case 1:(!this.c&&(this.c=new yi(this,0)),u(u(So(this.c,(Un(),i0)),153),215)).Wb(n);return;case 2:!this.b&&(this.b=new yi(this,2)),W8(this.b,n);return;case 3:Xie(this,un(n));return;case 4:Xie(this,fne(this.a,n));return;case 5:QOt(this,u(n,148));return}Wl(this,t-Lt((Un(),T2)),ct((this.j&2)==0?T2:(!this.k&&(this.k=new rf),this.k).ck(),t),n)},h.zh=function(){return Un(),T2},h.Bh=function(t){switch(t){case 0:!this.c&&(this.c=new yi(this,0)),Gt(this.c);return;case 1:(!this.c&&(this.c=new yi(this,0)),u(So(this.c,(Un(),i0)),153)).$b();return;case 2:!this.b&&(this.b=new yi(this,2)),Gt(this.b);return;case 3:!this.c&&(this.c=new yi(this,0)),_j(this.c,(Un(),lx),null);return;case 4:Xie(this,fne(this.a,null));return;case 5:this.a=null;return}Ql(this,t-Lt((Un(),T2)),ct((this.j&2)==0?T2:(!this.k&&(this.k=new rf),this.k).ck(),t))},x(Ii,"SimpleAnyTypeImpl",668),S(669,506,{105:1,92:1,90:1,56:1,49:1,97:1,2023:1,669:1},yPe),h._g=function(t,n,i){switch(t){case 0:return i?(!this.a&&(this.a=new yi(this,0)),this.a):(!this.a&&(this.a=new yi(this,0)),this.a.b);case 1:return i?(!this.b&&(this.b=new sl((tt(),Kr),to,this,1)),this.b):(!this.b&&(this.b=new sl((tt(),Kr),to,this,1)),o9(this.b));case 2:return i?(!this.c&&(this.c=new sl((tt(),Kr),to,this,2)),this.c):(!this.c&&(this.c=new sl((tt(),Kr),to,this,2)),o9(this.c));case 3:return!this.a&&(this.a=new yi(this,0)),So(this.a,(Un(),lT));case 4:return!this.a&&(this.a=new yi(this,0)),So(this.a,(Un(),uT));case 5:return!this.a&&(this.a=new yi(this,0)),So(this.a,(Un(),ux));case 6:return!this.a&&(this.a=new yi(this,0)),So(this.a,(Un(),fx))}return _l(this,t-Lt((Un(),Bp)),ct((this.j&2)==0?Bp:(!this.k&&(this.k=new rf),this.k).ck(),t),n,i)},h.jh=function(t,n,i){var s;switch(n){case 0:return!this.a&&(this.a=new yi(this,0)),a7(this.a,t,i);case 1:return!this.b&&(this.b=new sl((tt(),Kr),to,this,1)),_A(this.b,t,i);case 2:return!this.c&&(this.c=new sl((tt(),Kr),to,this,2)),_A(this.c,t,i);case 5:return!this.a&&(this.a=new yi(this,0)),CIe(So(this.a,(Un(),ux)),t,i)}return s=u(ct((this.j&2)==0?(Un(),Bp):(!this.k&&(this.k=new rf),this.k).ck(),n),66),s.Nj().Rj(this,Ire(this),n-Lt((Un(),Bp)),t,i)},h.lh=function(t){switch(t){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new yi(this,0)),!mA(So(this.a,(Un(),lT)));case 4:return!this.a&&(this.a=new yi(this,0)),!mA(So(this.a,(Un(),uT)));case 5:return!this.a&&(this.a=new yi(this,0)),!mA(So(this.a,(Un(),ux)));case 6:return!this.a&&(this.a=new yi(this,0)),!mA(So(this.a,(Un(),fx)))}return Bl(this,t-Lt((Un(),Bp)),ct((this.j&2)==0?Bp:(!this.k&&(this.k=new rf),this.k).ck(),t))},h.sh=function(t,n){switch(t){case 0:!this.a&&(this.a=new yi(this,0)),W8(this.a,n);return;case 1:!this.b&&(this.b=new sl((tt(),Kr),to,this,1)),AP(this.b,n);return;case 2:!this.c&&(this.c=new sl((tt(),Kr),to,this,2)),AP(this.c,n);return;case 3:!this.a&&(this.a=new yi(this,0)),iv(So(this.a,(Un(),lT))),!this.a&&(this.a=new yi(this,0)),a5(So(this.a,lT),u(n,14));return;case 4:!this.a&&(this.a=new yi(this,0)),iv(So(this.a,(Un(),uT))),!this.a&&(this.a=new yi(this,0)),a5(So(this.a,uT),u(n,14));return;case 5:!this.a&&(this.a=new yi(this,0)),iv(So(this.a,(Un(),ux))),!this.a&&(this.a=new yi(this,0)),a5(So(this.a,ux),u(n,14));return;case 6:!this.a&&(this.a=new yi(this,0)),iv(So(this.a,(Un(),fx))),!this.a&&(this.a=new yi(this,0)),a5(So(this.a,fx),u(n,14));return}Wl(this,t-Lt((Un(),Bp)),ct((this.j&2)==0?Bp:(!this.k&&(this.k=new rf),this.k).ck(),t),n)},h.zh=function(){return Un(),Bp},h.Bh=function(t){switch(t){case 0:!this.a&&(this.a=new yi(this,0)),Gt(this.a);return;case 1:!this.b&&(this.b=new sl((tt(),Kr),to,this,1)),this.b.c.$b();return;case 2:!this.c&&(this.c=new sl((tt(),Kr),to,this,2)),this.c.c.$b();return;case 3:!this.a&&(this.a=new yi(this,0)),iv(So(this.a,(Un(),lT)));return;case 4:!this.a&&(this.a=new yi(this,0)),iv(So(this.a,(Un(),uT)));return;case 5:!this.a&&(this.a=new yi(this,0)),iv(So(this.a,(Un(),ux)));return;case 6:!this.a&&(this.a=new yi(this,0)),iv(So(this.a,(Un(),fx)));return}Ql(this,t-Lt((Un(),Bp)),ct((this.j&2)==0?Bp:(!this.k&&(this.k=new rf),this.k).ck(),t))},h.Ib=function(){var t;return(this.j&4)!=0?_u(this):(t=new nu(_u(this)),t.a+=" (mixed: ",l5(t,this.a),t.a+=")",t.a)},x(Ii,"XMLTypeDocumentRootImpl",669),S(1919,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1,2024:1},t7e),h.Ih=function(t,n){switch(t.yj()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return n==null?null:Ns(n);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return un(n);case 6:return dSt(u(n,190));case 12:case 47:case 49:case 11:return XZe(this,t,n);case 13:return n==null?null:eWt(u(n,240));case 15:case 14:return n==null?null:f9t(oe(Oe(n)));case 17:return YVe((Un(),n));case 18:return YVe(n);case 21:case 20:return n==null?null:h9t(u(n,155).a);case 27:return gSt(u(n,190));case 30:return dVe((Un(),u(n,15)));case 31:return dVe(u(n,15));case 40:return bSt((Un(),n));case 42:return ZVe((Un(),n));case 43:return ZVe(n);case 59:case 48:return pSt((Un(),n));default:throw F(new Ot(ok+t.ne()+bp))}},h.Jh=function(t){var n,i,s,c,a;switch(t.G==-1&&(t.G=(i=ml(t),i?ld(i.Mh(),t):-1)),t.G){case 0:return n=new qJ,n;case 1:return s=new n7e,s;case 2:return c=new OPe,c;case 3:return a=new yPe,a;default:throw F(new Ot(HW+t.zb+bp))}},h.Kh=function(t,n){var i,s,c,a,g,w,m,y,k,E,M,P,D,B,q,G;switch(t.yj()){case 5:case 52:case 4:return n;case 6:return P$t(n);case 8:case 7:return n==null?null:wRt(n);case 9:return n==null?null:w9(kl((s=To(n,!0),s.length>0&&(fn(0,s.length),s.charCodeAt(0)==43)?s.substr(1):s),-128,127)<<24>>24);case 10:return n==null?null:w9(kl((c=To(n,!0),c.length>0&&(fn(0,c.length),c.charCodeAt(0)==43)?c.substr(1):c),-128,127)<<24>>24);case 11:return un(up(this,(Un(),a1t),n));case 12:return un(up(this,(Un(),d1t),n));case 13:return n==null?null:new uee(To(n,!0));case 15:case 14:return B_t(n);case 16:return un(up(this,(Un(),g1t),n));case 17:return vKe((Un(),n));case 18:return vKe(n);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return To(n,!0);case 21:case 20:return V_t(n);case 22:return un(up(this,(Un(),p1t),n));case 23:return un(up(this,(Un(),b1t),n));case 24:return un(up(this,(Un(),w1t),n));case 25:return un(up(this,(Un(),m1t),n));case 26:return un(up(this,(Un(),v1t),n));case 27:return C$t(n);case 30:return yKe((Un(),n));case 31:return yKe(n);case 32:return n==null?null:me(kl((k=To(n,!0),k.length>0&&(fn(0,k.length),k.charCodeAt(0)==43)?k.substr(1):k),Mr,_n));case 33:return n==null?null:new Vd((E=To(n,!0),E.length>0&&(fn(0,E.length),E.charCodeAt(0)==43)?E.substr(1):E));case 34:return n==null?null:me(kl((M=To(n,!0),M.length>0&&(fn(0,M.length),M.charCodeAt(0)==43)?M.substr(1):M),Mr,_n));case 36:return n==null?null:Cg(Wj((P=To(n,!0),P.length>0&&(fn(0,P.length),P.charCodeAt(0)==43)?P.substr(1):P)));case 37:return n==null?null:Cg(Wj((D=To(n,!0),D.length>0&&(fn(0,D.length),D.charCodeAt(0)==43)?D.substr(1):D)));case 40:return HDt((Un(),n));case 42:return OKe((Un(),n));case 43:return OKe(n);case 44:return n==null?null:new Vd((B=To(n,!0),B.length>0&&(fn(0,B.length),B.charCodeAt(0)==43)?B.substr(1):B));case 45:return n==null?null:new Vd((q=To(n,!0),q.length>0&&(fn(0,q.length),q.charCodeAt(0)==43)?q.substr(1):q));case 46:return To(n,!1);case 47:return un(up(this,(Un(),y1t),n));case 59:case 48:return _Dt((Un(),n));case 49:return un(up(this,(Un(),O1t),n));case 50:return n==null?null:mO(kl((G=To(n,!0),G.length>0&&(fn(0,G.length),G.charCodeAt(0)==43)?G.substr(1):G),XD,32767)<<16>>16);case 51:return n==null?null:mO(kl((a=To(n,!0),a.length>0&&(fn(0,a.length),a.charCodeAt(0)==43)?a.substr(1):a),XD,32767)<<16>>16);case 53:return un(up(this,(Un(),k1t),n));case 55:return n==null?null:mO(kl((g=To(n,!0),g.length>0&&(fn(0,g.length),g.charCodeAt(0)==43)?g.substr(1):g),XD,32767)<<16>>16);case 56:return n==null?null:mO(kl((w=To(n,!0),w.length>0&&(fn(0,w.length),w.charCodeAt(0)==43)?w.substr(1):w),XD,32767)<<16>>16);case 57:return n==null?null:Cg(Wj((m=To(n,!0),m.length>0&&(fn(0,m.length),m.charCodeAt(0)==43)?m.substr(1):m)));case 58:return n==null?null:Cg(Wj((y=To(n,!0),y.length>0&&(fn(0,y.length),y.charCodeAt(0)==43)?y.substr(1):y)));case 60:return n==null?null:me(kl((i=To(n,!0),i.length>0&&(fn(0,i.length),i.charCodeAt(0)==43)?i.substr(1):i),Mr,_n));case 61:return n==null?null:me(kl(To(n,!0),Mr,_n));default:throw F(new Ot(ok+t.ne()+bp))}};var x1t,v2e,C1t,y2e;x(Ii,"XMLTypeFactoryImpl",1919),S(586,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1,1945:1,586:1},oBe),h.N=!1,h.O=!1;var T1t=!1;x(Ii,"XMLTypePackageImpl",586),S(1852,1,{837:1},i7e),h._j=function(){return nue(),I1t},x(Ii,"XMLTypePackageImpl/1",1852),S(1861,1,An,r7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/10",1861),S(1862,1,An,s7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/11",1862),S(1863,1,An,o7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/12",1863),S(1864,1,An,c7e),h.wj=function(t){return ob(t)},h.xj=function(t){return J(wr,fe,333,t,7,1)},x(Ii,"XMLTypePackageImpl/13",1864),S(1865,1,An,l7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/14",1865),S(1866,1,An,u7e),h.wj=function(t){return W(t,15)},h.xj=function(t){return J(Xl,Vb,15,t,0,1)},x(Ii,"XMLTypePackageImpl/15",1866),S(1867,1,An,f7e),h.wj=function(t){return W(t,15)},h.xj=function(t){return J(Xl,Vb,15,t,0,1)},x(Ii,"XMLTypePackageImpl/16",1867),S(1868,1,An,h7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/17",1868),S(1869,1,An,a7e),h.wj=function(t){return W(t,155)},h.xj=function(t){return J(dk,fe,155,t,0,1)},x(Ii,"XMLTypePackageImpl/18",1869),S(1870,1,An,d7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/19",1870),S(1853,1,An,g7e),h.wj=function(t){return W(t,843)},h.xj=function(t){return J(oT,Ee,843,t,0,1)},x(Ii,"XMLTypePackageImpl/2",1853),S(1871,1,An,p7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/20",1871),S(1872,1,An,b7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/21",1872),S(1873,1,An,w7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/22",1873),S(1874,1,An,m7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/23",1874),S(1875,1,An,v7e),h.wj=function(t){return W(t,190)},h.xj=function(t){return J(Tc,fe,190,t,0,2)},x(Ii,"XMLTypePackageImpl/24",1875),S(1876,1,An,y7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/25",1876),S(1877,1,An,O7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/26",1877),S(1878,1,An,k7e),h.wj=function(t){return W(t,15)},h.xj=function(t){return J(Xl,Vb,15,t,0,1)},x(Ii,"XMLTypePackageImpl/27",1878),S(1879,1,An,S7e),h.wj=function(t){return W(t,15)},h.xj=function(t){return J(Xl,Vb,15,t,0,1)},x(Ii,"XMLTypePackageImpl/28",1879),S(1880,1,An,x7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/29",1880),S(1854,1,An,C7e),h.wj=function(t){return W(t,667)},h.xj=function(t){return J(TI,Ee,2021,t,0,1)},x(Ii,"XMLTypePackageImpl/3",1854),S(1881,1,An,T7e),h.wj=function(t){return W(t,19)},h.xj=function(t){return J(Fr,fe,19,t,0,1)},x(Ii,"XMLTypePackageImpl/30",1881),S(1882,1,An,E7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/31",1882),S(1883,1,An,A7e),h.wj=function(t){return W(t,162)},h.xj=function(t){return J(mp,fe,162,t,0,1)},x(Ii,"XMLTypePackageImpl/32",1883),S(1884,1,An,M7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/33",1884),S(1885,1,An,P7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/34",1885),S(1886,1,An,j7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/35",1886),S(1887,1,An,D7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/36",1887),S(1888,1,An,$7e),h.wj=function(t){return W(t,15)},h.xj=function(t){return J(Xl,Vb,15,t,0,1)},x(Ii,"XMLTypePackageImpl/37",1888),S(1889,1,An,N7e),h.wj=function(t){return W(t,15)},h.xj=function(t){return J(Xl,Vb,15,t,0,1)},x(Ii,"XMLTypePackageImpl/38",1889),S(1890,1,An,I7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/39",1890),S(1855,1,An,R7e),h.wj=function(t){return W(t,668)},h.xj=function(t){return J(cT,Ee,2022,t,0,1)},x(Ii,"XMLTypePackageImpl/4",1855),S(1891,1,An,L7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/40",1891),S(1892,1,An,B7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/41",1892),S(1893,1,An,F7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/42",1893),S(1894,1,An,_7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/43",1894),S(1895,1,An,H7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/44",1895),S(1896,1,An,q7e),h.wj=function(t){return W(t,184)},h.xj=function(t){return J(vp,fe,184,t,0,1)},x(Ii,"XMLTypePackageImpl/45",1896),S(1897,1,An,Q7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/46",1897),S(1898,1,An,z7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/47",1898),S(1899,1,An,W7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/48",1899),S(g1,1,An,K7e),h.wj=function(t){return W(t,184)},h.xj=function(t){return J(vp,fe,184,t,0,1)},x(Ii,"XMLTypePackageImpl/49",g1),S(1856,1,An,V7e),h.wj=function(t){return W(t,669)},h.xj=function(t){return J(w2e,Ee,2023,t,0,1)},x(Ii,"XMLTypePackageImpl/5",1856),S(1901,1,An,X7e),h.wj=function(t){return W(t,162)},h.xj=function(t){return J(mp,fe,162,t,0,1)},x(Ii,"XMLTypePackageImpl/50",1901),S(1902,1,An,U7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/51",1902),S(1903,1,An,G7e),h.wj=function(t){return W(t,19)},h.xj=function(t){return J(Fr,fe,19,t,0,1)},x(Ii,"XMLTypePackageImpl/52",1903),S(1857,1,An,Y7e),h.wj=function(t){return lr(t)},h.xj=function(t){return J(Te,fe,2,t,6,1)},x(Ii,"XMLTypePackageImpl/6",1857),S(1858,1,An,Z7e),h.wj=function(t){return W(t,190)},h.xj=function(t){return J(Tc,fe,190,t,0,2)},x(Ii,"XMLTypePackageImpl/7",1858),S(1859,1,An,J7e),h.wj=function(t){return sb(t)},h.xj=function(t){return J(Ui,fe,476,t,8,1)},x(Ii,"XMLTypePackageImpl/8",1859),S(1860,1,An,eCe),h.wj=function(t){return W(t,217)},h.xj=function(t){return J(uy,fe,217,t,0,1)},x(Ii,"XMLTypePackageImpl/9",1860);var Jf,Md,hx,EI,Q;S(50,60,Ma,ln),x(wd,"RegEx/ParseException",50),S(820,1,{},BZ),h.sl=function(t){return ti*16)throw F(new ln(dn((cn(),Xnt))));i=i*16+c}while(!0);if(this.a!=125)throw F(new ln(dn((cn(),Unt))));if(i>fk)throw F(new ln(dn((cn(),Gnt))));t=i}else{if(c=0,this.c!=0||(c=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(i=c,Rn(this),this.c!=0||(c=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));i=i*16+c,t=i}break;case 117:if(s=0,Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(n=s,Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(n=n*16+s,Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(n=n*16+s,Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));n=n*16+s,t=n;break;case 118:if(Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(n=s,Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(n=n*16+s,Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(n=n*16+s,Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(n=n*16+s,Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(n=n*16+s,Rn(this),this.c!=0||(s=Eg(this.a))<0)throw F(new ln(dn((cn(),bd))));if(n=n*16+s,n>fk)throw F(new ln(dn((cn(),"parser.descappe.4"))));t=n;break;case 65:case 90:case 122:throw F(new ln(dn((cn(),Ynt))))}return t},h.ul=function(t){var n,i;switch(t){case 100:i=(this.e&32)==32?a1("Nd",!0):(Ln(),AI);break;case 68:i=(this.e&32)==32?a1("Nd",!1):(Ln(),T2e);break;case 119:i=(this.e&32)==32?a1("IsWord",!0):(Ln(),Yk);break;case 87:i=(this.e&32)==32?a1("IsWord",!1):(Ln(),A2e);break;case 115:i=(this.e&32)==32?a1("IsSpace",!0):(Ln(),Ny);break;case 83:i=(this.e&32)==32?a1("IsSpace",!1):(Ln(),E2e);break;default:throw F(new Bs((n=t,Yit+n.toString(16))))}return i},h.vl=function(t){var n,i,s,c,a,g,w,m,y,k,E,M;for(this.b=1,Rn(this),n=null,this.c==0&&this.a==94?(Rn(this),t?k=(Ln(),Ln(),new bl(5)):(n=(Ln(),Ln(),new bl(4)),Co(n,0,fk),k=new bl(4))):k=(Ln(),Ln(),new bl(4)),c=!0;(M=this.c)!=1&&!(M==0&&this.a==93&&!c);){if(c=!1,i=this.a,s=!1,M==10)switch(i){case 100:case 68:case 119:case 87:case 115:case 83:Qb(k,this.ul(i)),s=!0;break;case 105:case 73:case 99:case 67:i=this.Ll(k,i),i<0&&(s=!0);break;case 112:case 80:if(E=rle(this,i),!E)throw F(new ln(dn((cn(),eK))));Qb(k,E),s=!0;break;default:i=this.tl()}else if(M==20){if(g=E3(this.i,58,this.d),g<0)throw F(new ln(dn((cn(),Aae))));if(w=!0,kr(this.i,this.d)==94&&(++this.d,w=!1),a=gl(this.i,this.d,g),m=cqe(a,w,(this.e&512)==512),!m)throw F(new ln(dn((cn(),Qnt))));if(Qb(k,m),s=!0,g+1>=this.j||kr(this.i,g+1)!=93)throw F(new ln(dn((cn(),Aae))));this.d=g+2}if(Rn(this),!s)if(this.c!=0||this.a!=45)Co(k,i,i);else{if(Rn(this),(M=this.c)==1)throw F(new ln(dn((cn(),HD))));M==0&&this.a==93?(Co(k,i,i),Co(k,45,45)):(y=this.a,M==10&&(y=this.tl()),Rn(this),Co(k,i,y))}(this.e&qu)==qu&&this.c==0&&this.a==44&&Rn(this)}if(this.c==1)throw F(new ln(dn((cn(),HD))));return n&&(ES(n,k),k=n),Dm(k),CS(k),this.b=0,Rn(this),k},h.wl=function(){var t,n,i,s;for(i=this.vl(!1);(s=this.c)!=7;)if(t=this.a,s==0&&(t==45||t==38)||s==4){if(Rn(this),this.c!=9)throw F(new ln(dn((cn(),Wnt))));if(n=this.vl(!1),s==4)Qb(i,n);else if(t==45)ES(i,n);else if(t==38)qZe(i,n);else throw F(new Bs("ASSERT"))}else throw F(new ln(dn((cn(),Knt))));return Rn(this),i},h.xl=function(){var t,n;return t=this.a-48,n=(Ln(),Ln(),new g_(12,null,t)),!this.g&&(this.g=new PE),ME(this.g,new kJ(t)),Rn(this),n},h.yl=function(){return Rn(this),Ln(),M1t},h.zl=function(){return Rn(this),Ln(),A1t},h.Al=function(){throw F(new ln(dn((cn(),Vl))))},h.Bl=function(){throw F(new ln(dn((cn(),Vl))))},h.Cl=function(){return Rn(this),qPt()},h.Dl=function(){return Rn(this),Ln(),j1t},h.El=function(){return Rn(this),Ln(),$1t},h.Fl=function(){var t;if(this.d>=this.j||((t=kr(this.i,this.d++))&65504)!=64)throw F(new ln(dn((cn(),_nt))));return Rn(this),Ln(),Ln(),new Fh(0,t-64)},h.Gl=function(){return Rn(this),Czt()},h.Hl=function(){return Rn(this),Ln(),N1t},h.Il=function(){var t;return t=(Ln(),Ln(),new Fh(0,105)),Rn(this),t},h.Jl=function(){return Rn(this),Ln(),D1t},h.Kl=function(){return Rn(this),Ln(),P1t},h.Ll=function(t,n){return this.tl()},h.Ml=function(){return Rn(this),Ln(),x2e},h.Nl=function(){var t,n,i,s,c;if(this.d+1>=this.j)throw F(new ln(dn((cn(),Lnt))));if(s=-1,n=null,t=kr(this.i,this.d),49<=t&&t<=57){if(s=t-48,!this.g&&(this.g=new PE),ME(this.g,new kJ(s)),++this.d,kr(this.i,this.d)!=41)throw F(new ln(dn((cn(),Fg))));++this.d}else switch(t==63&&--this.d,Rn(this),n=Eue(this),n.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw F(new ln(dn((cn(),Fg))));break;default:throw F(new ln(dn((cn(),Bnt))))}if(Rn(this),c=J0(this),i=null,c.e==2){if(c.em()!=2)throw F(new ln(dn((cn(),Fnt))));i=c.am(1),c=c.am(0)}if(this.c!=7)throw F(new ln(dn((cn(),Fg))));return Rn(this),Ln(),Ln(),new Fqe(s,n,c,i)},h.Ol=function(){return Rn(this),Ln(),C2e},h.Pl=function(){var t;if(Rn(this),t=hM(24,J0(this)),this.c!=7)throw F(new ln(dn((cn(),Fg))));return Rn(this),t},h.Ql=function(){var t;if(Rn(this),t=hM(20,J0(this)),this.c!=7)throw F(new ln(dn((cn(),Fg))));return Rn(this),t},h.Rl=function(){var t;if(Rn(this),t=hM(22,J0(this)),this.c!=7)throw F(new ln(dn((cn(),Fg))));return Rn(this),t},h.Sl=function(){var t,n,i,s,c;for(t=0,i=0,n=-1;this.d=this.j)throw F(new ln(dn((cn(),Tae))));if(n==45){for(++this.d;this.d=this.j)throw F(new ln(dn((cn(),Tae))))}if(n==58){if(++this.d,Rn(this),s=zLe(J0(this),t,i),this.c!=7)throw F(new ln(dn((cn(),Fg))));Rn(this)}else if(n==41)++this.d,Rn(this),s=zLe(J0(this),t,i);else throw F(new ln(dn((cn(),Rnt))));return s},h.Tl=function(){var t;if(Rn(this),t=hM(21,J0(this)),this.c!=7)throw F(new ln(dn((cn(),Fg))));return Rn(this),t},h.Ul=function(){var t;if(Rn(this),t=hM(23,J0(this)),this.c!=7)throw F(new ln(dn((cn(),Fg))));return Rn(this),t},h.Vl=function(){var t,n;if(Rn(this),t=this.f++,n=HF(J0(this),t),this.c!=7)throw F(new ln(dn((cn(),Fg))));return Rn(this),n},h.Wl=function(){var t;if(Rn(this),t=HF(J0(this),0),this.c!=7)throw F(new ln(dn((cn(),Fg))));return Rn(this),t},h.Xl=function(t){return Rn(this),this.c==5?(Rn(this),tM(t,(Ln(),Ln(),new vb(9,t)))):tM(t,(Ln(),Ln(),new vb(3,t)))},h.Yl=function(t){var n;return Rn(this),n=(Ln(),Ln(),new h5(2)),this.c==5?(Rn(this),Pg(n,dx),Pg(n,t)):(Pg(n,t),Pg(n,dx)),n},h.Zl=function(t){return Rn(this),this.c==5?(Rn(this),Ln(),Ln(),new vb(9,t)):(Ln(),Ln(),new vb(3,t))},h.a=0,h.b=0,h.c=0,h.d=0,h.e=0,h.f=1,h.g=null,h.j=0,x(wd,"RegEx/RegexParser",820),S(1824,820,{},kPe),h.sl=function(t){return!1},h.tl=function(){return Ble(this)},h.ul=function(t){return FO(t)},h.vl=function(t){return NJe(this)},h.wl=function(){throw F(new ln(dn((cn(),Vl))))},h.xl=function(){throw F(new ln(dn((cn(),Vl))))},h.yl=function(){throw F(new ln(dn((cn(),Vl))))},h.zl=function(){throw F(new ln(dn((cn(),Vl))))},h.Al=function(){return Rn(this),FO(67)},h.Bl=function(){return Rn(this),FO(73)},h.Cl=function(){throw F(new ln(dn((cn(),Vl))))},h.Dl=function(){throw F(new ln(dn((cn(),Vl))))},h.El=function(){throw F(new ln(dn((cn(),Vl))))},h.Fl=function(){return Rn(this),FO(99)},h.Gl=function(){throw F(new ln(dn((cn(),Vl))))},h.Hl=function(){throw F(new ln(dn((cn(),Vl))))},h.Il=function(){return Rn(this),FO(105)},h.Jl=function(){throw F(new ln(dn((cn(),Vl))))},h.Kl=function(){throw F(new ln(dn((cn(),Vl))))},h.Ll=function(t,n){return Qb(t,FO(n)),-1},h.Ml=function(){return Rn(this),Ln(),Ln(),new Fh(0,94)},h.Nl=function(){throw F(new ln(dn((cn(),Vl))))},h.Ol=function(){return Rn(this),Ln(),Ln(),new Fh(0,36)},h.Pl=function(){throw F(new ln(dn((cn(),Vl))))},h.Ql=function(){throw F(new ln(dn((cn(),Vl))))},h.Rl=function(){throw F(new ln(dn((cn(),Vl))))},h.Sl=function(){throw F(new ln(dn((cn(),Vl))))},h.Tl=function(){throw F(new ln(dn((cn(),Vl))))},h.Ul=function(){throw F(new ln(dn((cn(),Vl))))},h.Vl=function(){var t;if(Rn(this),t=HF(J0(this),0),this.c!=7)throw F(new ln(dn((cn(),Fg))));return Rn(this),t},h.Wl=function(){throw F(new ln(dn((cn(),Vl))))},h.Xl=function(t){return Rn(this),tM(t,(Ln(),Ln(),new vb(3,t)))},h.Yl=function(t){var n;return Rn(this),n=(Ln(),Ln(),new h5(2)),Pg(n,t),Pg(n,dx),n},h.Zl=function(t){return Rn(this),Ln(),Ln(),new vb(3,t)};var E2=null,Uk=null;x(wd,"RegEx/ParserForXMLSchema",1824),S(117,1,hk,h0),h.$l=function(t){throw F(new Bs("Not supported."))},h._l=function(){return-1},h.am=function(t){return null},h.bm=function(){return null},h.cm=function(t){},h.dm=function(t){},h.em=function(){return 0},h.Ib=function(){return this.fm(0)},h.fm=function(t){return this.e==11?".":""},h.e=0;var O2e,Gk,ax,E1t,k2e,Aw=null,AI,IU=null,S2e,dx,RU=null,x2e,C2e,T2e,E2e,A2e,A1t,Ny,M1t,P1t,j1t,D1t,Yk,$1t,N1t,vUt=x(wd,"RegEx/Token",117);S(136,117,{3:1,136:1,117:1},bl),h.fm=function(t){var n,i,s;if(this.e==4)if(this==S2e)i=".";else if(this==AI)i="\\d";else if(this==Yk)i="\\w";else if(this==Ny)i="\\s";else{for(s=new Va,s.a+="[",n=0;n0&&(s.a+=","),this.b[n]===this.b[n+1]?us(s,p7(this.b[n])):(us(s,p7(this.b[n])),s.a+="-",us(s,p7(this.b[n+1])));s.a+="]",i=s.a}else if(this==T2e)i="\\D";else if(this==A2e)i="\\W";else if(this==E2e)i="\\S";else{for(s=new Va,s.a+="[^",n=0;n0&&(s.a+=","),this.b[n]===this.b[n+1]?us(s,p7(this.b[n])):(us(s,p7(this.b[n])),s.a+="-",us(s,p7(this.b[n+1])));s.a+="]",i=s.a}return i},h.a=!1,h.c=!1,x(wd,"RegEx/RangeToken",136),S(584,1,{584:1},kJ),h.a=0,x(wd,"RegEx/RegexParser/ReferencePosition",584),S(583,1,{3:1,583:1},$je),h.Fb=function(t){var n;return t==null||!W(t,583)?!1:(n=u(t,583),et(this.b,n.b)&&this.a==n.a)},h.Hb=function(){return ud(this.b+"/"+Dle(this.a))},h.Ib=function(){return this.c.fm(this.a)},h.a=0,x(wd,"RegEx/RegularExpression",583),S(223,117,hk,Fh),h._l=function(){return this.a},h.fm=function(t){var n,i,s;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:s="\\"+gF(this.a&Ni);break;case 12:s="\\f";break;case 10:s="\\n";break;case 13:s="\\r";break;case 9:s="\\t";break;case 27:s="\\e";break;default:this.a>=zr?(i=(n=this.a>>>0,"0"+n.toString(16)),s="\\v"+gl(i,i.length-6,i.length)):s=""+gF(this.a&Ni)}break;case 8:this==x2e||this==C2e?s=""+gF(this.a&Ni):s="\\"+gF(this.a&Ni);break;default:s=null}return s},h.a=0,x(wd,"RegEx/Token/CharToken",223),S(309,117,hk,vb),h.am=function(t){return this.a},h.cm=function(t){this.b=t},h.dm=function(t){this.c=t},h.em=function(){return 1},h.fm=function(t){var n;if(this.e==3)if(this.c<0&&this.b<0)n=this.a.fm(t)+"*";else if(this.c==this.b)n=this.a.fm(t)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)n=this.a.fm(t)+"{"+this.c+","+this.b+"}";else if(this.c>=0&&this.b<0)n=this.a.fm(t)+"{"+this.c+",}";else throw F(new Bs("Token#toString(): CLOSURE "+this.c+Qr+this.b));else if(this.c<0&&this.b<0)n=this.a.fm(t)+"*?";else if(this.c==this.b)n=this.a.fm(t)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)n=this.a.fm(t)+"{"+this.c+","+this.b+"}?";else if(this.c>=0&&this.b<0)n=this.a.fm(t)+"{"+this.c+",}?";else throw F(new Bs("Token#toString(): NONGREEDYCLOSURE "+this.c+Qr+this.b));return n},h.b=0,h.c=0,x(wd,"RegEx/Token/ClosureToken",309),S(821,117,hk,gie),h.am=function(t){return t==0?this.a:this.b},h.em=function(){return 2},h.fm=function(t){var n;return this.b.e==3&&this.b.am(0)==this.a?n=this.a.fm(t)+"+":this.b.e==9&&this.b.am(0)==this.a?n=this.a.fm(t)+"+?":n=this.a.fm(t)+(""+this.b.fm(t)),n},x(wd,"RegEx/Token/ConcatToken",821),S(1822,117,hk,Fqe),h.am=function(t){if(t==0)return this.d;if(t==1)return this.b;throw F(new Bs("Internal Error: "+t))},h.em=function(){return this.b?2:1},h.fm=function(t){var n;return this.c>0?n="(?("+this.c+")":this.a.e==8?n="(?("+this.a+")":n="(?"+this.a,this.b?n+=this.d+"|"+this.b+")":n+=this.d+")",n},h.c=0,x(wd,"RegEx/Token/ConditionToken",1822),S(1823,117,hk,FFe),h.am=function(t){return this.b},h.em=function(){return 1},h.fm=function(t){return"(?"+(this.a==0?"":Dle(this.a))+(this.c==0?"":Dle(this.c))+":"+this.b.fm(t)+")"},h.a=0,h.c=0,x(wd,"RegEx/Token/ModifierToken",1823),S(822,117,hk,yie),h.am=function(t){return this.a},h.em=function(){return 1},h.fm=function(t){var n;switch(n=null,this.e){case 6:this.b==0?n="(?:"+this.a.fm(t)+")":n="("+this.a.fm(t)+")";break;case 20:n="(?="+this.a.fm(t)+")";break;case 21:n="(?!"+this.a.fm(t)+")";break;case 22:n="(?<="+this.a.fm(t)+")";break;case 23:n="(?"+this.a.fm(t)+")"}return n},h.b=0,x(wd,"RegEx/Token/ParenToken",822),S(521,117,{3:1,117:1,521:1},g_),h.bm=function(){return this.b},h.fm=function(t){return this.e==12?"\\"+this.a:$Ft(this.b)},h.a=0,x(wd,"RegEx/Token/StringToken",521),S(465,117,hk,h5),h.$l=function(t){Pg(this,t)},h.am=function(t){return u(D0(this.a,t),117)},h.em=function(){return this.a?this.a.a.c.length:0},h.fm=function(t){var n,i,s,c,a;if(this.e==1){if(this.a.a.c.length==2)n=u(D0(this.a,0),117),i=u(D0(this.a,1),117),i.e==3&&i.am(0)==n?c=n.fm(t)+"+":i.e==9&&i.am(0)==n?c=n.fm(t)+"+?":c=n.fm(t)+(""+i.fm(t));else{for(a=new Va,s=0;s=this.c.b:this.a<=this.c.b},h.Sb=function(){return this.b>0},h.Tb=function(){return this.b},h.Vb=function(){return this.b-1},h.Qb=function(){throw F(new Ka(rrt))},h.a=0,h.b=0,x(Vae,"ExclusiveRange/RangeIterator",254);var Zl=L3(qD,"C"),Zt=L3(t6,"I"),Zc=L3(Uv,"Z"),H1=L3(n6,"J"),Tc=L3(ZS,"B"),hr=L3(JS,"D"),Mw=L3(e6,"F"),A2=L3(i6,"S"),yUt=hi("org.eclipse.elk.core.labels","ILabelManager"),M2e=hi(Br,"DiagnosticChain"),P2e=hi(Dit,"ResourceSet"),j2e=x(Br,"InvocationTargetException",null),R1t=(IE(),hEt),L1t=L1t=eRt;oMt(JOt),DMt("permProps",[[[t$,n$],[i$,"gecko1_8"]],[[t$,n$],[i$,"ie10"]],[[t$,n$],[i$,"ie8"]],[[t$,n$],[i$,"ie9"]],[[t$,n$],[i$,"safari"]]]),L1t(null,"elk",null)}).call(this)}).call(this,typeof q1t<"u"?q1t:typeof self<"u"?self:typeof window<"u"?window:{})},{}],3:[function(o,f,d){function b(T,A){if(!(T instanceof A))throw new TypeError("Cannot call a class as a function")}function p(T,A){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:T}function v(T,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);T.prototype=Object.create(A&&A.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(T,A):T.__proto__=A)}var O=o("./elk-api.js").default,C=function(T){v(A,T);function A(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};b(this,A);var $=Object.assign({},j),L=!1;try{o.resolve("web-worker"),L=!0}catch{}if(j.workerUrl)if(L){var z=o("web-worker");$.workerFactory=function(ne){return new z(ne)}}else console.warn(`Web worker requested but 'web-worker' package not installed. +Consider installing the package or pass your own 'workerFactory' to ELK's constructor. +... Falling back to non-web worker version.`);if(!$.workerFactory){var Z=o("./elk-worker.min.js"),Y=Z.Worker;$.workerFactory=function(ne){return new Y(ne)}}return p(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,$))}return A}(O);Object.defineProperty(f.exports,"__esModule",{value:!0}),f.exports=C,C.default=C},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(o,f,d){f.exports=Worker},{}]},{},[3])(3)})}($2e)),$2e.exports}var VUt=KUt();const XUt=Ubt(VUt);function Yp(l){if(typeof l=="string"||typeof l=="number")return""+l;let r="";if(Array.isArray(l))for(let o=0,f;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?C:v;return L2e.useSyncExternalStore=l.useSyncExternalStore!==void 0?l.useSyncExternalStore:T,L2e}var V1t;function GUt(){return V1t||(V1t=1,R2e.exports=UUt()),R2e.exports}/** + * @license React + * use-sync-external-store-shim/with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var X1t;function YUt(){if(X1t)return I2e;X1t=1;var l=Gbt(),r=GUt();function o(C,T){return C===T&&(C!==0||1/C===1/T)||C!==C&&T!==T}var f=typeof Object.is=="function"?Object.is:o,d=r.useSyncExternalStore,b=l.useRef,p=l.useEffect,v=l.useMemo,O=l.useDebugValue;return I2e.useSyncExternalStoreWithSelector=function(C,T,A,j,$){var L=b(null);if(L.current===null){var z={hasValue:!1,value:null};L.current=z}else z=L.current;L=v(function(){function Y(Ce){if(!ne){if(ne=!0,he=Ce,Ce=j(Ce),$!==void 0&&z.hasValue){var Ie=z.value;if($(Ie,Ce))return se=Ie}return se=Ce}if(Ie=se,f(he,Ce))return Ie;var nt=j(Ce);return $!==void 0&&$(Ie,nt)?(he=Ce,Ie):(he=Ce,se=nt)}var ne=!1,he,se,ve=A===void 0?null:A;return[function(){return Y(T())},ve===null?void 0:function(){return Y(ve())}]},[T,A,j,$]);var Z=d(C,L[0],L[1]);return p(function(){z.hasValue=!0,z.value=Z},[Z]),O(Z),Z},I2e}var U1t;function ZUt(){return U1t||(U1t=1,N2e.exports=YUt()),N2e.exports}var JUt=ZUt();const eGt=Ubt(JUt),tGt={},G1t=l=>{let r;const o=new Set,f=(T,A)=>{const j=typeof T=="function"?T(r):T;if(!Object.is(j,r)){const $=r;r=A??(typeof j!="object"||j===null)?j:Object.assign({},r,j),o.forEach(L=>L(r,$))}},d=()=>r,O={setState:f,getState:d,getInitialState:()=>C,subscribe:T=>(o.add(T),()=>o.delete(T)),destroy:()=>{(tGt?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),o.clear()}},C=r=l(f,d,O);return O},nGt=l=>l?G1t(l):G1t,{useDebugValue:iGt}=Nn,{useSyncExternalStoreWithSelector:rGt}=eGt,sGt=l=>l;function nwt(l,r=sGt,o){const f=rGt(l.subscribe,l.getState,l.getServerState||l.getInitialState,r,o);return iGt(f),f}const Y1t=(l,r)=>{const o=nGt(l),f=(d,b=r)=>nwt(o,d,b);return Object.assign(f,o),f},oGt=(l,r)=>l?Y1t(l,r):Y1t;function X1(l,r){if(Object.is(l,r))return!0;if(typeof l!="object"||l===null||typeof r!="object"||r===null)return!1;if(l instanceof Map&&r instanceof Map){if(l.size!==r.size)return!1;for(const[f,d]of l)if(!Object.is(d,r.get(f)))return!1;return!0}if(l instanceof Set&&r instanceof Set){if(l.size!==r.size)return!1;for(const f of l)if(!r.has(f))return!1;return!0}const o=Object.keys(l);if(o.length!==Object.keys(r).length)return!1;for(const f of o)if(!Object.prototype.hasOwnProperty.call(r,f)||!Object.is(l[f],r[f]))return!1;return!0}var cGt={value:()=>{}};function VY(){for(var l=0,r=arguments.length,o={},f;l=0&&(f=o.slice(d+1),o=o.slice(0,d)),o&&!r.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:f}})}NG.prototype=VY.prototype={constructor:NG,on:function(l,r){var o=this._,f=lGt(l+"",o),d,b=-1,p=f.length;if(arguments.length<2){for(;++b0)for(var o=new Array(d),f=0,d,b;f=0&&(r=l.slice(0,o))!=="xmlns"&&(l=l.slice(o+1)),J1t.hasOwnProperty(r)?{space:J1t[r],local:l}:l}function fGt(l){return function(){var r=this.ownerDocument,o=this.namespaceURI;return o===Uve&&r.documentElement.namespaceURI===Uve?r.createElement(l):r.createElementNS(o,l)}}function hGt(l){return function(){return this.ownerDocument.createElementNS(l.space,l.local)}}function iwt(l){var r=XY(l);return(r.local?hGt:fGt)(r)}function aGt(){}function q3e(l){return l==null?aGt:function(){return this.querySelector(l)}}function dGt(l){typeof l!="function"&&(l=q3e(l));for(var r=this._groups,o=r.length,f=new Array(o),d=0;d=he&&(he=ne+1);!(ve=Z[he])&&++he=0;)(p=f[d])&&(b&&p.compareDocumentPosition(b)^4&&b.parentNode.insertBefore(p,b),b=p);return this}function BGt(l){l||(l=FGt);function r(A,j){return A&&j?l(A.__data__,j.__data__):!A-!j}for(var o=this._groups,f=o.length,d=new Array(f),b=0;br?1:l>=r?0:NaN}function _Gt(){var l=arguments[0];return arguments[0]=this,l.apply(null,arguments),this}function HGt(){return Array.from(this)}function qGt(){for(var l=this._groups,r=0,o=l.length;r1?this.each((r==null?JGt:typeof r=="function"?tYt:eYt)(l,r,o??"")):_T(this.node(),l)}function _T(l,r){return l.style.getPropertyValue(r)||lwt(l).getComputedStyle(l,null).getPropertyValue(r)}function iYt(l){return function(){delete this[l]}}function rYt(l,r){return function(){this[l]=r}}function sYt(l,r){return function(){var o=r.apply(this,arguments);o==null?delete this[l]:this[l]=o}}function oYt(l,r){return arguments.length>1?this.each((r==null?iYt:typeof r=="function"?sYt:rYt)(l,r)):this.node()[l]}function uwt(l){return l.trim().split(/^|\s+/)}function Q3e(l){return l.classList||new fwt(l)}function fwt(l){this._node=l,this._names=uwt(l.getAttribute("class")||"")}fwt.prototype={add:function(l){var r=this._names.indexOf(l);r<0&&(this._names.push(l),this._node.setAttribute("class",this._names.join(" ")))},remove:function(l){var r=this._names.indexOf(l);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(l){return this._names.indexOf(l)>=0}};function hwt(l,r){for(var o=Q3e(l),f=-1,d=r.length;++f=0&&(o=r.slice(f+1),r=r.slice(0,f)),{type:r,name:o}})}function NYt(l){return function(){var r=this.__on;if(r){for(var o=0,f=-1,d=r.length,b;o()=>l;function Gve(l,{sourceEvent:r,subject:o,target:f,identifier:d,active:b,x:p,y:v,dx:O,dy:C,dispatch:T}){Object.defineProperties(this,{type:{value:l,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:o,enumerable:!0,configurable:!0},target:{value:f,enumerable:!0,configurable:!0},identifier:{value:d,enumerable:!0,configurable:!0},active:{value:b,enumerable:!0,configurable:!0},x:{value:p,enumerable:!0,configurable:!0},y:{value:v,enumerable:!0,configurable:!0},dx:{value:O,enumerable:!0,configurable:!0},dy:{value:C,enumerable:!0,configurable:!0},_:{value:T}})}Gve.prototype.on=function(){var l=this._.on.apply(this._,arguments);return l===this._?this:l};function zYt(l){return!l.ctrlKey&&!l.button}function WYt(){return this.parentNode}function KYt(l,r){return r??{x:l.x,y:l.y}}function VYt(){return navigator.maxTouchPoints||"ontouchstart"in this}function XYt(){var l=zYt,r=WYt,o=KYt,f=VYt,d={},b=VY("start","drag","end"),p=0,v,O,C,T,A=0;function j(se){se.on("mousedown.drag",$).filter(f).on("touchstart.drag",Z).on("touchmove.drag",Y,QYt).on("touchend.drag touchcancel.drag",ne).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function $(se,ve){if(!(T||!l.call(this,se,ve))){var Ce=he(this,r.call(this,se,ve),se,ve,"mouse");Ce&&(Dw(se.view).on("mousemove.drag",L,aR).on("mouseup.drag",z,aR),pwt(se.view),B2e(se),C=!1,v=se.clientX,O=se.clientY,Ce("start",se))}}function L(se){if(AT(se),!C){var ve=se.clientX-v,Ce=se.clientY-O;C=ve*ve+Ce*Ce>A}d.mouse("drag",se)}function z(se){Dw(se.view).on("mousemove.drag mouseup.drag",null),bwt(se.view,C),AT(se),d.mouse("end",se)}function Z(se,ve){if(l.call(this,se,ve)){var Ce=se.changedTouches,Ie=r.call(this,se,ve),nt=Ce.length,Re,ft;for(Re=0;Re>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):o===8?zU(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):o===4?zU(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=GYt.exec(l))?new z1(r[1],r[2],r[3],1):(r=YYt.exec(l))?new z1(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=ZYt.exec(l))?zU(r[1],r[2],r[3],r[4]):(r=JYt.exec(l))?zU(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=eZt.exec(l))?ogt(r[1],r[2]/100,r[3]/100,1):(r=tZt.exec(l))?ogt(r[1],r[2]/100,r[3]/100,r[4]):egt.hasOwnProperty(l)?igt(egt[l]):l==="transparent"?new z1(NaN,NaN,NaN,0):null}function igt(l){return new z1(l>>16&255,l>>8&255,l&255,1)}function zU(l,r,o,f){return f<=0&&(l=r=o=NaN),new z1(l,r,o,f)}function rZt(l){return l instanceof QR||(l=pR(l)),l?(l=l.rgb(),new z1(l.r,l.g,l.b,l.opacity)):new z1}function Yve(l,r,o,f){return arguments.length===1?rZt(l):new z1(l,r,o,f??1)}function z1(l,r,o,f){this.r=+l,this.g=+r,this.b=+o,this.opacity=+f}z3e(z1,Yve,wwt(QR,{brighter(l){return l=l==null?sY:Math.pow(sY,l),new z1(this.r*l,this.g*l,this.b*l,this.opacity)},darker(l){return l=l==null?dR:Math.pow(dR,l),new z1(this.r*l,this.g*l,this.b*l,this.opacity)},rgb(){return this},clamp(){return new z1(jx(this.r),jx(this.g),jx(this.b),oY(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rgt,formatHex:rgt,formatHex8:sZt,formatRgb:sgt,toString:sgt}));function rgt(){return`#${Tx(this.r)}${Tx(this.g)}${Tx(this.b)}`}function sZt(){return`#${Tx(this.r)}${Tx(this.g)}${Tx(this.b)}${Tx((isNaN(this.opacity)?1:this.opacity)*255)}`}function sgt(){const l=oY(this.opacity);return`${l===1?"rgb(":"rgba("}${jx(this.r)}, ${jx(this.g)}, ${jx(this.b)}${l===1?")":`, ${l})`}`}function oY(l){return isNaN(l)?1:Math.max(0,Math.min(1,l))}function jx(l){return Math.max(0,Math.min(255,Math.round(l)||0))}function Tx(l){return l=jx(l),(l<16?"0":"")+l.toString(16)}function ogt(l,r,o,f){return f<=0?l=r=o=NaN:o<=0||o>=1?l=r=NaN:r<=0&&(l=NaN),new $w(l,r,o,f)}function mwt(l){if(l instanceof $w)return new $w(l.h,l.s,l.l,l.opacity);if(l instanceof QR||(l=pR(l)),!l)return new $w;if(l instanceof $w)return l;l=l.rgb();var r=l.r/255,o=l.g/255,f=l.b/255,d=Math.min(r,o,f),b=Math.max(r,o,f),p=NaN,v=b-d,O=(b+d)/2;return v?(r===b?p=(o-f)/v+(o0&&O<1?0:p,new $w(p,v,O,l.opacity)}function oZt(l,r,o,f){return arguments.length===1?mwt(l):new $w(l,r,o,f??1)}function $w(l,r,o,f){this.h=+l,this.s=+r,this.l=+o,this.opacity=+f}z3e($w,oZt,wwt(QR,{brighter(l){return l=l==null?sY:Math.pow(sY,l),new $w(this.h,this.s,this.l*l,this.opacity)},darker(l){return l=l==null?dR:Math.pow(dR,l),new $w(this.h,this.s,this.l*l,this.opacity)},rgb(){var l=this.h%360+(this.h<0)*360,r=isNaN(l)||isNaN(this.s)?0:this.s,o=this.l,f=o+(o<.5?o:1-o)*r,d=2*o-f;return new z1(F2e(l>=240?l-240:l+120,d,f),F2e(l,d,f),F2e(l<120?l+240:l-120,d,f),this.opacity)},clamp(){return new $w(cgt(this.h),WU(this.s),WU(this.l),oY(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const l=oY(this.opacity);return`${l===1?"hsl(":"hsla("}${cgt(this.h)}, ${WU(this.s)*100}%, ${WU(this.l)*100}%${l===1?")":`, ${l})`}`}}));function cgt(l){return l=(l||0)%360,l<0?l+360:l}function WU(l){return Math.max(0,Math.min(1,l||0))}function F2e(l,r,o){return(l<60?r+(o-r)*l/60:l<180?o:l<240?r+(o-r)*(240-l)/60:r)*255}const vwt=l=>()=>l;function cZt(l,r){return function(o){return l+o*r}}function lZt(l,r,o){return l=Math.pow(l,o),r=Math.pow(r,o)-l,o=1/o,function(f){return Math.pow(l+f*r,o)}}function uZt(l){return(l=+l)==1?ywt:function(r,o){return o-r?lZt(r,o,l):vwt(isNaN(r)?o:r)}}function ywt(l,r){var o=r-l;return o?cZt(l,o):vwt(isNaN(l)?r:l)}const lgt=function l(r){var o=uZt(r);function f(d,b){var p=o((d=Yve(d)).r,(b=Yve(b)).r),v=o(d.g,b.g),O=o(d.b,b.b),C=ywt(d.opacity,b.opacity);return function(T){return d.r=p(T),d.g=v(T),d.b=O(T),d.opacity=C(T),d+""}}return f.gamma=l,f}(1);function t4(l,r){return l=+l,r=+r,function(o){return l*(1-o)+r*o}}var Zve=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_2e=new RegExp(Zve.source,"g");function fZt(l){return function(){return l}}function hZt(l){return function(r){return l(r)+""}}function aZt(l,r){var o=Zve.lastIndex=_2e.lastIndex=0,f,d,b,p=-1,v=[],O=[];for(l=l+"",r=r+"";(f=Zve.exec(l))&&(d=_2e.exec(r));)(b=d.index)>o&&(b=r.slice(o,b),v[p]?v[p]+=b:v[++p]=b),(f=f[0])===(d=d[0])?v[p]?v[p]+=d:v[++p]=d:(v[++p]=null,O.push({i:p,x:t4(f,d)})),o=_2e.lastIndex;return o180?T+=360:T-C>180&&(C+=360),j.push({i:A.push(d(A)+"rotate(",null,f)-2,x:t4(C,T)})):T&&A.push(d(A)+"rotate("+T+f)}function v(C,T,A,j){C!==T?j.push({i:A.push(d(A)+"skewX(",null,f)-2,x:t4(C,T)}):T&&A.push(d(A)+"skewX("+T+f)}function O(C,T,A,j,$,L){if(C!==A||T!==j){var z=$.push(d($)+"scale(",null,",",null,")");L.push({i:z-4,x:t4(C,A)},{i:z-2,x:t4(T,j)})}else(A!==1||j!==1)&&$.push(d($)+"scale("+A+","+j+")")}return function(C,T){var A=[],j=[];return C=l(C),T=l(T),b(C.translateX,C.translateY,T.translateX,T.translateY,A,j),p(C.rotate,T.rotate,A,j),v(C.skewX,T.skewX,A,j),O(C.scaleX,C.scaleY,T.scaleX,T.scaleY,A,j),C=T=null,function($){for(var L=-1,z=j.length,Z;++L=0&&l._call.call(void 0,r),l=l._next;--HT}function hgt(){$x=(lY=bR.now())+UY,HT=zI=0;try{kZt()}finally{HT=0,xZt(),$x=0}}function SZt(){var l=bR.now(),r=l-lY;r>Swt&&(UY-=r,lY=l)}function xZt(){for(var l,r=cY,o,f=1/0;r;)r._call?(f>r._time&&(f=r._time),l=r,r=r._next):(o=r._next,r._next=null,r=l?l._next=o:cY=o);WI=l,eye(f)}function eye(l){if(!HT){zI&&(zI=clearTimeout(zI));var r=l-$x;r>24?(l<1/0&&(zI=setTimeout(hgt,l-bR.now()-UY)),PI&&(PI=clearInterval(PI))):(PI||(lY=bR.now(),PI=setInterval(SZt,Swt)),HT=1,xwt(hgt))}}function agt(l,r,o){var f=new uY;return r=r==null?0:+r,f.restart(d=>{f.stop(),l(d+r)},r,o),f}var CZt=VY("start","end","cancel","interrupt"),TZt=[],Twt=0,dgt=1,tye=2,IG=3,ggt=4,nye=5,RG=6;function GY(l,r,o,f,d,b){var p=l.__transition;if(!p)l.__transition={};else if(o in p)return;EZt(l,o,{name:r,index:f,group:d,on:CZt,tween:TZt,time:b.time,delay:b.delay,duration:b.duration,ease:b.ease,timer:null,state:Twt})}function K3e(l,r){var o=Hw(l,r);if(o.state>Twt)throw new Error("too late; already scheduled");return o}function X2(l,r){var o=Hw(l,r);if(o.state>IG)throw new Error("too late; already running");return o}function Hw(l,r){var o=l.__transition;if(!o||!(o=o[r]))throw new Error("transition not found");return o}function EZt(l,r,o){var f=l.__transition,d;f[r]=o,o.timer=Cwt(b,0,o.time);function b(C){o.state=dgt,o.timer.restart(p,o.delay,o.time),o.delay<=C&&p(C-o.delay)}function p(C){var T,A,j,$;if(o.state!==dgt)return O();for(T in f)if($=f[T],$.name===o.name){if($.state===IG)return agt(p);$.state===ggt?($.state=RG,$.timer.stop(),$.on.call("interrupt",l,l.__data__,$.index,$.group),delete f[T]):+Ttye&&f.state=0&&(r=r.slice(0,o)),!r||r==="start"})}function iJt(l,r,o){var f,d,b=nJt(r)?K3e:X2;return function(){var p=b(this,l),v=p.on;v!==f&&(d=(f=v).copy()).on(r,o),p.on=d}}function rJt(l,r){var o=this._id;return arguments.length<2?Hw(this.node(),o).on.on(l):this.each(iJt(o,l,r))}function sJt(l){return function(){var r=this.parentNode;for(var o in this.__transition)if(+o!==l)return;r&&r.removeChild(this)}}function oJt(){return this.on("end.remove",sJt(this._id))}function cJt(l){var r=this._name,o=this._id;typeof l!="function"&&(l=q3e(l));for(var f=this._groups,d=f.length,b=new Array(d),p=0;p()=>l;function DJt(l,{sourceEvent:r,target:o,transform:f,dispatch:d}){Object.defineProperties(this,{type:{value:l,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:f,enumerable:!0,configurable:!0},_:{value:d}})}function Ky(l,r,o){this.k=l,this.x=r,this.y=o}Ky.prototype={constructor:Ky,scale:function(l){return l===1?this:new Ky(this.k*l,this.x,this.y)},translate:function(l,r){return l===0&r===0?this:new Ky(this.k,this.x+this.k*l,this.y+this.k*r)},apply:function(l){return[l[0]*this.k+this.x,l[1]*this.k+this.y]},applyX:function(l){return l*this.k+this.x},applyY:function(l){return l*this.k+this.y},invert:function(l){return[(l[0]-this.x)/this.k,(l[1]-this.y)/this.k]},invertX:function(l){return(l-this.x)/this.k},invertY:function(l){return(l-this.y)/this.k},rescaleX:function(l){return l.copy().domain(l.range().map(this.invertX,this).map(l.invert,l))},rescaleY:function(l){return l.copy().domain(l.range().map(this.invertY,this).map(l.invert,l))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var d4=new Ky(1,0,0);Ky.prototype;function H2e(l){l.stopImmediatePropagation()}function jI(l){l.preventDefault(),l.stopImmediatePropagation()}function $Jt(l){return(!l.ctrlKey||l.type==="wheel")&&!l.button}function NJt(){var l=this;return l instanceof SVGElement?(l=l.ownerSVGElement||l,l.hasAttribute("viewBox")?(l=l.viewBox.baseVal,[[l.x,l.y],[l.x+l.width,l.y+l.height]]):[[0,0],[l.width.baseVal.value,l.height.baseVal.value]]):[[0,0],[l.clientWidth,l.clientHeight]]}function pgt(){return this.__zoom||d4}function IJt(l){return-l.deltaY*(l.deltaMode===1?.05:l.deltaMode?1:.002)*(l.ctrlKey?10:1)}function RJt(){return navigator.maxTouchPoints||"ontouchstart"in this}function LJt(l,r,o){var f=l.invertX(r[0][0])-o[0][0],d=l.invertX(r[1][0])-o[1][0],b=l.invertY(r[0][1])-o[0][1],p=l.invertY(r[1][1])-o[1][1];return l.translate(d>f?(f+d)/2:Math.min(0,f)||Math.max(0,d),p>b?(b+p)/2:Math.min(0,b)||Math.max(0,p))}function BJt(){var l=$Jt,r=NJt,o=LJt,f=IJt,d=RJt,b=[0,1/0],p=[[-1/0,-1/0],[1/0,1/0]],v=250,O=yZt,C=VY("start","zoom","end"),T,A,j,$=500,L=150,z=0,Z=10;function Y(le){le.property("__zoom",pgt).on("wheel.zoom",nt,{passive:!1}).on("mousedown.zoom",Re).on("dblclick.zoom",ft).filter(d).on("touchstart.zoom",st).on("touchmove.zoom",at).on("touchend.zoom touchcancel.zoom",ut).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}Y.transform=function(le,Ze,it,Tt){var X=le.selection?le.selection():le;X.property("__zoom",pgt),le!==X?ve(le,Ze,it,Tt):X.interrupt().each(function(){Ce(this,arguments).event(Tt).start().zoom(null,typeof Ze=="function"?Ze.apply(this,arguments):Ze).end()})},Y.scaleBy=function(le,Ze,it,Tt){Y.scaleTo(le,function(){var X=this.__zoom.k,Je=typeof Ze=="function"?Ze.apply(this,arguments):Ze;return X*Je},it,Tt)},Y.scaleTo=function(le,Ze,it,Tt){Y.transform(le,function(){var X=r.apply(this,arguments),Je=this.__zoom,Nt=it==null?se(X):typeof it=="function"?it.apply(this,arguments):it,Kt=Je.invert(Nt),Ut=typeof Ze=="function"?Ze.apply(this,arguments):Ze;return o(he(ne(Je,Ut),Nt,Kt),X,p)},it,Tt)},Y.translateBy=function(le,Ze,it,Tt){Y.transform(le,function(){return o(this.__zoom.translate(typeof Ze=="function"?Ze.apply(this,arguments):Ze,typeof it=="function"?it.apply(this,arguments):it),r.apply(this,arguments),p)},null,Tt)},Y.translateTo=function(le,Ze,it,Tt,X){Y.transform(le,function(){var Je=r.apply(this,arguments),Nt=this.__zoom,Kt=Tt==null?se(Je):typeof Tt=="function"?Tt.apply(this,arguments):Tt;return o(d4.translate(Kt[0],Kt[1]).scale(Nt.k).translate(typeof Ze=="function"?-Ze.apply(this,arguments):-Ze,typeof it=="function"?-it.apply(this,arguments):-it),Je,p)},Tt,X)};function ne(le,Ze){return Ze=Math.max(b[0],Math.min(b[1],Ze)),Ze===le.k?le:new Ky(Ze,le.x,le.y)}function he(le,Ze,it){var Tt=Ze[0]-it[0]*le.k,X=Ze[1]-it[1]*le.k;return Tt===le.x&&X===le.y?le:new Ky(le.k,Tt,X)}function se(le){return[(+le[0][0]+ +le[1][0])/2,(+le[0][1]+ +le[1][1])/2]}function ve(le,Ze,it,Tt){le.on("start.zoom",function(){Ce(this,arguments).event(Tt).start()}).on("interrupt.zoom end.zoom",function(){Ce(this,arguments).event(Tt).end()}).tween("zoom",function(){var X=this,Je=arguments,Nt=Ce(X,Je).event(Tt),Kt=r.apply(X,Je),Ut=it==null?se(Kt):typeof it=="function"?it.apply(X,Je):it,In=Math.max(Kt[1][0]-Kt[0][0],Kt[1][1]-Kt[0][1]),Bn=X.__zoom,Pi=typeof Ze=="function"?Ze.apply(X,Je):Ze,dr=O(Bn.invert(Ut).concat(In/Bn.k),Pi.invert(Ut).concat(In/Pi.k));return function(Ir){if(Ir===1)Ir=Pi;else{var io=dr(Ir),ks=In/io[2];Ir=new Ky(ks,Ut[0]-io[0]*ks,Ut[1]-io[1]*ks)}Nt.zoom(null,Ir)}})}function Ce(le,Ze,it){return!it&&le.__zooming||new Ie(le,Ze)}function Ie(le,Ze){this.that=le,this.args=Ze,this.active=0,this.sourceEvent=null,this.extent=r.apply(le,Ze),this.taps=0}Ie.prototype={event:function(le){return le&&(this.sourceEvent=le),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(le,Ze){return this.mouse&&le!=="mouse"&&(this.mouse[1]=Ze.invert(this.mouse[0])),this.touch0&&le!=="touch"&&(this.touch0[1]=Ze.invert(this.touch0[0])),this.touch1&&le!=="touch"&&(this.touch1[1]=Ze.invert(this.touch1[0])),this.that.__zoom=Ze,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(le){var Ze=Dw(this.that).datum();C.call(le,this.that,new DJt(le,{sourceEvent:this.sourceEvent,target:Y,transform:this.that.__zoom,dispatch:C}),Ze)}};function nt(le,...Ze){if(!l.apply(this,arguments))return;var it=Ce(this,Ze).event(le),Tt=this.__zoom,X=Math.max(b[0],Math.min(b[1],Tt.k*Math.pow(2,f.apply(this,arguments)))),Je=I2(le);if(it.wheel)(it.mouse[0][0]!==Je[0]||it.mouse[0][1]!==Je[1])&&(it.mouse[1]=Tt.invert(it.mouse[0]=Je)),clearTimeout(it.wheel);else{if(Tt.k===X)return;it.mouse=[Je,Tt.invert(Je)],LG(this),it.start()}jI(le),it.wheel=setTimeout(Nt,L),it.zoom("mouse",o(he(ne(Tt,X),it.mouse[0],it.mouse[1]),it.extent,p));function Nt(){it.wheel=null,it.end()}}function Re(le,...Ze){if(j||!l.apply(this,arguments))return;var it=le.currentTarget,Tt=Ce(this,Ze,!0).event(le),X=Dw(le.view).on("mousemove.zoom",Ut,!0).on("mouseup.zoom",In,!0),Je=I2(le,it),Nt=le.clientX,Kt=le.clientY;pwt(le.view),H2e(le),Tt.mouse=[Je,this.__zoom.invert(Je)],LG(this),Tt.start();function Ut(Bn){if(jI(Bn),!Tt.moved){var Pi=Bn.clientX-Nt,dr=Bn.clientY-Kt;Tt.moved=Pi*Pi+dr*dr>z}Tt.event(Bn).zoom("mouse",o(he(Tt.that.__zoom,Tt.mouse[0]=I2(Bn,it),Tt.mouse[1]),Tt.extent,p))}function In(Bn){X.on("mousemove.zoom mouseup.zoom",null),bwt(Bn.view,Tt.moved),jI(Bn),Tt.event(Bn).end()}}function ft(le,...Ze){if(l.apply(this,arguments)){var it=this.__zoom,Tt=I2(le.changedTouches?le.changedTouches[0]:le,this),X=it.invert(Tt),Je=it.k*(le.shiftKey?.5:2),Nt=o(he(ne(it,Je),Tt,X),r.apply(this,Ze),p);jI(le),v>0?Dw(this).transition().duration(v).call(ve,Nt,Tt,le):Dw(this).call(Y.transform,Nt,Tt,le)}}function st(le,...Ze){if(l.apply(this,arguments)){var it=le.touches,Tt=it.length,X=Ce(this,Ze,le.changedTouches.length===Tt).event(le),Je,Nt,Kt,Ut;for(H2e(le),Nt=0;Nt"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:l=>`Node type "${l}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:l=>`The old edge with id=${l} does not exist.`,error009:l=>`Marker type "${l}" doesn't exist.`,error008:(l,r)=>`Couldn't create edge for ${l?"target":"source"} handle id: "${l?r.targetHandle:r.sourceHandle}", edge id: ${r.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:l=>`Edge type "${l}" not found. Using fallback type "default".`,error012:l=>`Node with id "${l}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},Pwt=Uy.error001();function nf(l,r){const o=Ne.useContext(YY);if(o===null)throw new Error(Pwt);return nwt(o,l,r)}const $h=()=>{const l=Ne.useContext(YY);if(l===null)throw new Error(Pwt);return Ne.useMemo(()=>({getState:l.getState,setState:l.setState,subscribe:l.subscribe,destroy:l.destroy}),[l])},_Jt=l=>l.userSelectionActive?"none":"all";function HJt({position:l,children:r,className:o,style:f,...d}){const b=nf(_Jt),p=`${l}`.split("-");return Nn.createElement("div",{className:Yp(["react-flow__panel",o,...p]),style:{...f,pointerEvents:b},...d},r)}function qJt({proOptions:l,position:r="bottom-right"}){return l!=null&&l.hideAttribution?null:Nn.createElement(HJt,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},Nn.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const QJt=({x:l,y:r,label:o,labelStyle:f={},labelShowBg:d=!0,labelBgStyle:b={},labelBgPadding:p=[2,4],labelBgBorderRadius:v=2,children:O,className:C,...T})=>{const A=Ne.useRef(null),[j,$]=Ne.useState({x:0,y:0,width:0,height:0}),L=Yp(["react-flow__edge-textwrapper",C]);return Ne.useEffect(()=>{if(A.current){const z=A.current.getBBox();$({x:z.x,y:z.y,width:z.width,height:z.height})}},[o]),typeof o>"u"||!o?null:Nn.createElement("g",{transform:`translate(${l-j.width/2} ${r-j.height/2})`,className:L,visibility:j.width?"visible":"hidden",...T},d&&Nn.createElement("rect",{width:j.width+2*p[0],x:-p[0],y:-p[1],height:j.height+2*p[1],className:"react-flow__edge-textbg",style:b,rx:v,ry:v}),Nn.createElement("text",{className:"react-flow__edge-text",y:j.height/2,dy:"0.3em",ref:A,style:f},o),O)};var zJt=Ne.memo(QJt);const X3e=l=>({width:l.offsetWidth,height:l.offsetHeight}),qT=(l,r=0,o=1)=>Math.min(Math.max(l,r),o),U3e=(l={x:0,y:0},r)=>({x:qT(l.x,r[0][0],r[1][0]),y:qT(l.y,r[0][1],r[1][1])}),bgt=(l,r,o)=>lo?-qT(Math.abs(l-o),1,50)/50:0,jwt=(l,r)=>{const o=bgt(l.x,35,r.width-35)*20,f=bgt(l.y,35,r.height-35)*20;return[o,f]},Dwt=l=>{var r;return((r=l.getRootNode)==null?void 0:r.call(l))||(window==null?void 0:window.document)},WJt=(l,r)=>({x:Math.min(l.x,r.x),y:Math.min(l.y,r.y),x2:Math.max(l.x2,r.x2),y2:Math.max(l.y2,r.y2)}),G3e=({x:l,y:r,width:o,height:f})=>({x:l,y:r,x2:l+o,y2:r+f}),KJt=({x:l,y:r,x2:o,y2:f})=>({x:l,y:r,width:o-l,height:f-r}),wgt=l=>({...l.positionAbsolute||{x:0,y:0},width:l.width||0,height:l.height||0}),iye=(l,r)=>{const o=Math.max(0,Math.min(l.x+l.width,r.x+r.width)-Math.max(l.x,r.x)),f=Math.max(0,Math.min(l.y+l.height,r.y+r.height)-Math.max(l.y,r.y));return Math.ceil(o*f)},VJt=l=>Qp(l.width)&&Qp(l.height)&&Qp(l.x)&&Qp(l.y),Qp=l=>!isNaN(l)&&isFinite(l),Eu=Symbol.for("internals"),$wt=["Enter"," ","Escape"],XJt=(l,r)=>{},UJt=l=>"nativeEvent"in l;function rye(l){var d,b;const r=UJt(l)?l.nativeEvent:l,o=((b=(d=r.composedPath)==null?void 0:d.call(r))==null?void 0:b[0])||l.target;return["INPUT","SELECT","TEXTAREA"].includes(o==null?void 0:o.nodeName)||(o==null?void 0:o.hasAttribute("contenteditable"))||!!(o!=null&&o.closest(".nokey"))}const Nwt=l=>"clientX"in l,g4=(l,r)=>{var b,p;const o=Nwt(l),f=o?l.clientX:(b=l.touches)==null?void 0:b[0].clientX,d=o?l.clientY:(p=l.touches)==null?void 0:p[0].clientY;return{x:f-((r==null?void 0:r.left)??0),y:d-((r==null?void 0:r.top)??0)}},fY=()=>{var l;return typeof navigator<"u"&&((l=navigator==null?void 0:navigator.userAgent)==null?void 0:l.indexOf("Mac"))>=0},zR=({id:l,path:r,labelX:o,labelY:f,label:d,labelStyle:b,labelShowBg:p,labelBgStyle:v,labelBgPadding:O,labelBgBorderRadius:C,style:T,markerEnd:A,markerStart:j,interactionWidth:$=20})=>Nn.createElement(Nn.Fragment,null,Nn.createElement("path",{id:l,style:T,d:r,fill:"none",className:"react-flow__edge-path",markerEnd:A,markerStart:j}),$&&Nn.createElement("path",{d:r,fill:"none",strokeOpacity:0,strokeWidth:$,className:"react-flow__edge-interaction"}),d&&Qp(o)&&Qp(f)?Nn.createElement(zJt,{x:o,y:f,label:d,labelStyle:b,labelShowBg:p,labelBgStyle:v,labelBgPadding:O,labelBgBorderRadius:C}):null);zR.displayName="BaseEdge";function DI(l,r,o){return o===void 0?o:f=>{const d=r().edges.find(b=>b.id===l);d&&o(f,{...d})}}function Iwt({sourceX:l,sourceY:r,targetX:o,targetY:f}){const d=Math.abs(o-l)/2,b=o{const[Z,Y,ne]=Lwt({sourceX:l,sourceY:r,sourcePosition:d,targetX:o,targetY:f,targetPosition:b});return Nn.createElement(zR,{path:Z,labelX:Y,labelY:ne,label:p,labelStyle:v,labelShowBg:O,labelBgStyle:C,labelBgPadding:T,labelBgBorderRadius:A,style:j,markerEnd:$,markerStart:L,interactionWidth:z})});Y3e.displayName="SimpleBezierEdge";const vgt={[Ai.Left]:{x:-1,y:0},[Ai.Right]:{x:1,y:0},[Ai.Top]:{x:0,y:-1},[Ai.Bottom]:{x:0,y:1}},GJt=({source:l,sourcePosition:r=Ai.Bottom,target:o})=>r===Ai.Left||r===Ai.Right?l.xMath.sqrt(Math.pow(r.x-l.x,2)+Math.pow(r.y-l.y,2));function YJt({source:l,sourcePosition:r=Ai.Bottom,target:o,targetPosition:f=Ai.Top,center:d,offset:b}){const p=vgt[r],v=vgt[f],O={x:l.x+p.x*b,y:l.y+p.y*b},C={x:o.x+v.x*b,y:o.y+v.y*b},T=GJt({source:O,sourcePosition:r,target:C}),A=T.x!==0?"x":"y",j=T[A];let $=[],L,z;const Z={x:0,y:0},Y={x:0,y:0},[ne,he,se,ve]=Iwt({sourceX:l.x,sourceY:l.y,targetX:o.x,targetY:o.y});if(p[A]*v[A]===-1){L=d.x??ne,z=d.y??he;const Ie=[{x:L,y:O.y},{x:L,y:C.y}],nt=[{x:O.x,y:z},{x:C.x,y:z}];p[A]===j?$=A==="x"?Ie:nt:$=A==="x"?nt:Ie}else{const Ie=[{x:O.x,y:C.y}],nt=[{x:C.x,y:O.y}];if(A==="x"?$=p.x===j?nt:Ie:$=p.y===j?Ie:nt,r===f){const ut=Math.abs(l[A]-o[A]);if(ut<=b){const le=Math.min(b-1,b-ut);p[A]===j?Z[A]=(O[A]>l[A]?-1:1)*le:Y[A]=(C[A]>o[A]?-1:1)*le}}if(r!==f){const ut=A==="x"?"y":"x",le=p[A]===v[ut],Ze=O[ut]>C[ut],it=O[ut]=at?(L=(Re.x+ft.x)/2,z=$[0].y):(L=$[0].x,z=(Re.y+ft.y)/2)}return[[l,{x:O.x+Z.x,y:O.y+Z.y},...$,{x:C.x+Y.x,y:C.y+Y.y},o],L,z,se,ve]}function ZJt(l,r,o,f){const d=Math.min(ygt(l,r)/2,ygt(r,o)/2,f),{x:b,y:p}=r;if(l.x===b&&b===o.x||l.y===p&&p===o.y)return`L${b} ${p}`;if(l.y===p){const C=l.x{let he="";return ne>0&&ne{const[Y,ne,he]=sye({sourceX:l,sourceY:r,sourcePosition:A,targetX:o,targetY:f,targetPosition:j,borderRadius:z==null?void 0:z.borderRadius,offset:z==null?void 0:z.offset});return Nn.createElement(zR,{path:Y,labelX:ne,labelY:he,label:d,labelStyle:b,labelShowBg:p,labelBgStyle:v,labelBgPadding:O,labelBgBorderRadius:C,style:T,markerEnd:$,markerStart:L,interactionWidth:Z})});ZY.displayName="SmoothStepEdge";const Z3e=Ne.memo(l=>{var r;return Nn.createElement(ZY,{...l,pathOptions:Ne.useMemo(()=>{var o;return{borderRadius:0,offset:(o=l.pathOptions)==null?void 0:o.offset}},[(r=l.pathOptions)==null?void 0:r.offset])})});Z3e.displayName="StepEdge";function JJt({sourceX:l,sourceY:r,targetX:o,targetY:f}){const[d,b,p,v]=Iwt({sourceX:l,sourceY:r,targetX:o,targetY:f});return[`M ${l},${r}L ${o},${f}`,d,b,p,v]}const J3e=Ne.memo(({sourceX:l,sourceY:r,targetX:o,targetY:f,label:d,labelStyle:b,labelShowBg:p,labelBgStyle:v,labelBgPadding:O,labelBgBorderRadius:C,style:T,markerEnd:A,markerStart:j,interactionWidth:$})=>{const[L,z,Z]=JJt({sourceX:l,sourceY:r,targetX:o,targetY:f});return Nn.createElement(zR,{path:L,labelX:z,labelY:Z,label:d,labelStyle:b,labelShowBg:p,labelBgStyle:v,labelBgPadding:O,labelBgBorderRadius:C,style:T,markerEnd:A,markerStart:j,interactionWidth:$})});J3e.displayName="StraightEdge";function XU(l,r){return l>=0?.5*l:r*25*Math.sqrt(-l)}function Ogt({pos:l,x1:r,y1:o,x2:f,y2:d,c:b}){switch(l){case Ai.Left:return[r-XU(r-f,b),o];case Ai.Right:return[r+XU(f-r,b),o];case Ai.Top:return[r,o-XU(o-d,b)];case Ai.Bottom:return[r,o+XU(d-o,b)]}}function Bwt({sourceX:l,sourceY:r,sourcePosition:o=Ai.Bottom,targetX:f,targetY:d,targetPosition:b=Ai.Top,curvature:p=.25}){const[v,O]=Ogt({pos:o,x1:l,y1:r,x2:f,y2:d,c:p}),[C,T]=Ogt({pos:b,x1:f,y1:d,x2:l,y2:r,c:p}),[A,j,$,L]=Rwt({sourceX:l,sourceY:r,targetX:f,targetY:d,sourceControlX:v,sourceControlY:O,targetControlX:C,targetControlY:T});return[`M${l},${r} C${v},${O} ${C},${T} ${f},${d}`,A,j,$,L]}const aY=Ne.memo(({sourceX:l,sourceY:r,targetX:o,targetY:f,sourcePosition:d=Ai.Bottom,targetPosition:b=Ai.Top,label:p,labelStyle:v,labelShowBg:O,labelBgStyle:C,labelBgPadding:T,labelBgBorderRadius:A,style:j,markerEnd:$,markerStart:L,pathOptions:z,interactionWidth:Z})=>{const[Y,ne,he]=Bwt({sourceX:l,sourceY:r,sourcePosition:d,targetX:o,targetY:f,targetPosition:b,curvature:z==null?void 0:z.curvature});return Nn.createElement(zR,{path:Y,labelX:ne,labelY:he,label:p,labelStyle:v,labelShowBg:O,labelBgStyle:C,labelBgPadding:T,labelBgBorderRadius:A,style:j,markerEnd:$,markerStart:L,interactionWidth:Z})});aY.displayName="BezierEdge";const eOe=Ne.createContext(null),een=eOe.Provider;eOe.Consumer;const ten=()=>Ne.useContext(eOe),nen=l=>"id"in l&&"source"in l&&"target"in l,ien=({source:l,sourceHandle:r,target:o,targetHandle:f})=>`reactflow__edge-${l}${r||""}-${o}${f||""}`,oye=(l,r)=>typeof l>"u"?"":typeof l=="string"?l:`${r?`${r}__`:""}${Object.keys(l).sort().map(f=>`${f}=${l[f]}`).join("&")}`,ren=(l,r)=>r.some(o=>o.source===l.source&&o.target===l.target&&(o.sourceHandle===l.sourceHandle||!o.sourceHandle&&!l.sourceHandle)&&(o.targetHandle===l.targetHandle||!o.targetHandle&&!l.targetHandle)),sen=(l,r)=>{if(!l.source||!l.target)return r;let o;return nen(l)?o={...l}:o={...l,id:ien(l)},ren(o,r)?r:r.concat(o)},cye=({x:l,y:r},[o,f,d],b,[p,v])=>{const O={x:(l-o)/d,y:(r-f)/d};return b?{x:p*Math.round(O.x/p),y:v*Math.round(O.y/v)}:O},Fwt=({x:l,y:r},[o,f,d])=>({x:l*d+o,y:r*d+f}),PT=(l,r=[0,0])=>{if(!l)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const o=(l.width??0)*r[0],f=(l.height??0)*r[1],d={x:l.position.x-o,y:l.position.y-f};return{...d,positionAbsolute:l.positionAbsolute?{x:l.positionAbsolute.x-o,y:l.positionAbsolute.y-f}:d}},tOe=(l,r=[0,0])=>{if(l.length===0)return{x:0,y:0,width:0,height:0};const o=l.reduce((f,d)=>{const{x:b,y:p}=PT(d,r).positionAbsolute;return WJt(f,G3e({x:b,y:p,width:d.width||0,height:d.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return KJt(o)},_wt=(l,r,[o,f,d]=[0,0,1],b=!1,p=!1,v=[0,0])=>{const O={x:(r.x-o)/d,y:(r.y-f)/d,width:r.width/d,height:r.height/d},C=[];return l.forEach(T=>{const{width:A,height:j,selectable:$=!0,hidden:L=!1}=T;if(p&&!$||L)return!1;const{positionAbsolute:z}=PT(T,v),Z={x:z.x,y:z.y,width:A||0,height:j||0},Y=iye(O,Z),ne=typeof A>"u"||typeof j>"u"||A===null||j===null,he=b&&Y>0,se=(A||0)*(j||0);(ne||he||Y>=se||T.dragging)&&C.push(T)}),C},Hwt=(l,r)=>{const o=l.map(f=>f.id);return r.filter(f=>o.includes(f.source)||o.includes(f.target))},qwt=(l,r,o,f,d,b=.1)=>{const p=r/(l.width*(1+b)),v=o/(l.height*(1+b)),O=Math.min(p,v),C=qT(O,f,d),T=l.x+l.width/2,A=l.y+l.height/2,j=r/2-T*C,$=o/2-A*C;return{x:j,y:$,zoom:C}},Ox=(l,r=0)=>l.transition().duration(r);function kgt(l,r,o,f){return(r[o]||[]).reduce((d,b)=>{var p,v;return`${l.id}-${b.id}-${o}`!==f&&d.push({id:b.id||null,type:o,nodeId:l.id,x:(((p=l.positionAbsolute)==null?void 0:p.x)??0)+b.x+b.width/2,y:(((v=l.positionAbsolute)==null?void 0:v.y)??0)+b.y+b.height/2}),d},[])}function oen(l,r,o,f,d,b){const{x:p,y:v}=g4(l),C=r.elementsFromPoint(p,v).find(L=>L.classList.contains("react-flow__handle"));if(C){const L=C.getAttribute("data-nodeid");if(L){const z=nOe(void 0,C),Z=C.getAttribute("data-handleid"),Y=b({nodeId:L,id:Z,type:z});if(Y){const ne=d.find(he=>he.nodeId===L&&he.type===z&&he.id===Z);return{handle:{id:Z,type:z,nodeId:L,x:(ne==null?void 0:ne.x)||o.x,y:(ne==null?void 0:ne.y)||o.y},validHandleResult:Y}}}}let T=[],A=1/0;if(d.forEach(L=>{const z=Math.sqrt((L.x-o.x)**2+(L.y-o.y)**2);if(z<=f){const Z=b(L);z<=A&&(zL.isValid),$=T.some(({handle:L})=>L.type==="target");return T.find(({handle:L,validHandleResult:z})=>$?L.type==="target":j?z.isValid:!0)||T[0]}const cen={source:null,target:null,sourceHandle:null,targetHandle:null},Qwt=()=>({handleDomNode:null,isValid:!1,connection:cen,endHandle:null});function zwt(l,r,o,f,d,b,p){const v=d==="target",O=p.querySelector(`.react-flow__handle[data-id="${l==null?void 0:l.nodeId}-${l==null?void 0:l.id}-${l==null?void 0:l.type}"]`),C={...Qwt(),handleDomNode:O};if(O){const T=nOe(void 0,O),A=O.getAttribute("data-nodeid"),j=O.getAttribute("data-handleid"),$=O.classList.contains("connectable"),L=O.classList.contains("connectableend"),z={source:v?A:o,sourceHandle:v?j:f,target:v?o:A,targetHandle:v?f:j};C.connection=z,$&&L&&(r===Nx.Strict?v&&T==="source"||!v&&T==="target":A!==o||j!==f)&&(C.endHandle={nodeId:A,handleId:j,type:T},C.isValid=b(z))}return C}function len({nodes:l,nodeId:r,handleId:o,handleType:f}){return l.reduce((d,b)=>{if(b[Eu]){const{handleBounds:p}=b[Eu];let v=[],O=[];p&&(v=kgt(b,p,"source",`${r}-${o}-${f}`),O=kgt(b,p,"target",`${r}-${o}-${f}`)),d.push(...v,...O)}return d},[])}function nOe(l,r){return l||(r!=null&&r.classList.contains("target")?"target":r!=null&&r.classList.contains("source")?"source":null)}function q2e(l){l==null||l.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function uen(l,r){let o=null;return r?o="valid":l&&!r&&(o="invalid"),o}function Wwt({event:l,handleId:r,nodeId:o,onConnect:f,isTarget:d,getState:b,setState:p,isValidConnection:v,edgeUpdaterType:O,onReconnectEnd:C}){const T=Dwt(l.target),{connectionMode:A,domNode:j,autoPanOnConnect:$,connectionRadius:L,onConnectStart:z,panBy:Z,getNodes:Y,cancelConnection:ne}=b();let he=0,se;const{x:ve,y:Ce}=g4(l),Ie=T==null?void 0:T.elementFromPoint(ve,Ce),nt=nOe(O,Ie),Re=j==null?void 0:j.getBoundingClientRect();if(!Re||!nt)return;let ft,st=g4(l,Re),at=!1,ut=null,le=!1,Ze=null;const it=len({nodes:Y(),nodeId:o,handleId:r,handleType:nt}),Tt=()=>{if(!$)return;const[Nt,Kt]=jwt(st,Re);Z({x:Nt,y:Kt}),he=requestAnimationFrame(Tt)};p({connectionPosition:st,connectionStatus:null,connectionNodeId:o,connectionHandleId:r,connectionHandleType:nt,connectionStartHandle:{nodeId:o,handleId:r,type:nt},connectionEndHandle:null}),z==null||z(l,{nodeId:o,handleId:r,handleType:nt});function X(Nt){const{transform:Kt}=b();st=g4(Nt,Re);const{handle:Ut,validHandleResult:In}=oen(Nt,T,cye(st,Kt,!1,[1,1]),L,it,Bn=>zwt(Bn,A,o,r,d?"target":"source",v,T));if(se=Ut,at||(Tt(),at=!0),Ze=In.handleDomNode,ut=In.connection,le=In.isValid,p({connectionPosition:se&&le?Fwt({x:se.x,y:se.y},Kt):st,connectionStatus:uen(!!se,le),connectionEndHandle:In.endHandle}),!se&&!le&&!Ze)return q2e(ft);ut.source!==ut.target&&Ze&&(q2e(ft),ft=Ze,Ze.classList.add("connecting","react-flow__handle-connecting"),Ze.classList.toggle("valid",le),Ze.classList.toggle("react-flow__handle-valid",le))}function Je(Nt){var Kt,Ut;(se||Ze)&&ut&&le&&(f==null||f(ut)),(Ut=(Kt=b()).onConnectEnd)==null||Ut.call(Kt,Nt),O&&(C==null||C(Nt)),q2e(ft),ne(),cancelAnimationFrame(he),at=!1,le=!1,ut=null,Ze=null,T.removeEventListener("mousemove",X),T.removeEventListener("mouseup",Je),T.removeEventListener("touchmove",X),T.removeEventListener("touchend",Je)}T.addEventListener("mousemove",X),T.addEventListener("mouseup",Je),T.addEventListener("touchmove",X),T.addEventListener("touchend",Je)}const Sgt=()=>!0,fen=l=>({connectionStartHandle:l.connectionStartHandle,connectOnClick:l.connectOnClick,noPanClassName:l.noPanClassName}),hen=(l,r,o)=>f=>{const{connectionStartHandle:d,connectionEndHandle:b,connectionClickStartHandle:p}=f;return{connecting:(d==null?void 0:d.nodeId)===l&&(d==null?void 0:d.handleId)===r&&(d==null?void 0:d.type)===o||(b==null?void 0:b.nodeId)===l&&(b==null?void 0:b.handleId)===r&&(b==null?void 0:b.type)===o,clickConnecting:(p==null?void 0:p.nodeId)===l&&(p==null?void 0:p.handleId)===r&&(p==null?void 0:p.type)===o}},Kwt=Ne.forwardRef(({type:l="source",position:r=Ai.Top,isValidConnection:o,isConnectable:f=!0,isConnectableStart:d=!0,isConnectableEnd:b=!0,id:p,onConnect:v,children:O,className:C,onMouseDown:T,onTouchStart:A,...j},$)=>{var Re,ft;const L=p||null,z=l==="target",Z=$h(),Y=ten(),{connectOnClick:ne,noPanClassName:he}=nf(fen,X1),{connecting:se,clickConnecting:ve}=nf(hen(Y,L,l),X1);Y||(ft=(Re=Z.getState()).onError)==null||ft.call(Re,"010",Uy.error010());const Ce=st=>{const{defaultEdgeOptions:at,onConnect:ut,hasDefaultEdges:le}=Z.getState(),Ze={...at,...st};if(le){const{edges:it,setEdges:Tt}=Z.getState();Tt(sen(Ze,it))}ut==null||ut(Ze),v==null||v(Ze)},Ie=st=>{if(!Y)return;const at=Nwt(st);d&&(at&&st.button===0||!at)&&Wwt({event:st,handleId:L,nodeId:Y,onConnect:Ce,isTarget:z,getState:Z.getState,setState:Z.setState,isValidConnection:o||Z.getState().isValidConnection||Sgt}),at?T==null||T(st):A==null||A(st)},nt=st=>{const{onClickConnectStart:at,onClickConnectEnd:ut,connectionClickStartHandle:le,connectionMode:Ze,isValidConnection:it}=Z.getState();if(!Y||!le&&!d)return;if(!le){at==null||at(st,{nodeId:Y,handleId:L,handleType:l}),Z.setState({connectionClickStartHandle:{nodeId:Y,type:l,handleId:L}});return}const Tt=Dwt(st.target),X=o||it||Sgt,{connection:Je,isValid:Nt}=zwt({nodeId:Y,id:L,type:l},Ze,le.nodeId,le.handleId||null,le.type,X,Tt);Nt&&Ce(Je),ut==null||ut(st),Z.setState({connectionClickStartHandle:null})};return Nn.createElement("div",{"data-handleid":L,"data-nodeid":Y,"data-handlepos":r,"data-id":`${Y}-${L}-${l}`,className:Yp(["react-flow__handle",`react-flow__handle-${r}`,"nodrag",he,C,{source:!z,target:z,connectable:f,connectablestart:d,connectableend:b,connecting:ve,connectionindicator:f&&(d&&!se||b&&se)}]),onMouseDown:Ie,onTouchStart:Ie,onClick:ne?nt:void 0,ref:$,...j},O)});Kwt.displayName="Handle";var w4=Ne.memo(Kwt);const Vwt=({data:l,isConnectable:r,targetPosition:o=Ai.Top,sourcePosition:f=Ai.Bottom})=>Nn.createElement(Nn.Fragment,null,Nn.createElement(w4,{type:"target",position:o,isConnectable:r}),l==null?void 0:l.label,Nn.createElement(w4,{type:"source",position:f,isConnectable:r}));Vwt.displayName="DefaultNode";var lye=Ne.memo(Vwt);const Xwt=({data:l,isConnectable:r,sourcePosition:o=Ai.Bottom})=>Nn.createElement(Nn.Fragment,null,l==null?void 0:l.label,Nn.createElement(w4,{type:"source",position:o,isConnectable:r}));Xwt.displayName="InputNode";var Uwt=Ne.memo(Xwt);const Gwt=({data:l,isConnectable:r,targetPosition:o=Ai.Top})=>Nn.createElement(Nn.Fragment,null,Nn.createElement(w4,{type:"target",position:o,isConnectable:r}),l==null?void 0:l.label);Gwt.displayName="OutputNode";var Ywt=Ne.memo(Gwt);const iOe=()=>null;iOe.displayName="GroupNode";const aen=l=>({selectedNodes:l.getNodes().filter(r=>r.selected),selectedEdges:l.edges.filter(r=>r.selected).map(r=>({...r}))}),UU=l=>l.id;function den(l,r){return X1(l.selectedNodes.map(UU),r.selectedNodes.map(UU))&&X1(l.selectedEdges.map(UU),r.selectedEdges.map(UU))}const Zwt=Ne.memo(({onSelectionChange:l})=>{const r=$h(),{selectedNodes:o,selectedEdges:f}=nf(aen,den);return Ne.useEffect(()=>{const d={nodes:o,edges:f};l==null||l(d),r.getState().onSelectionChange.forEach(b=>b(d))},[o,f,l]),null});Zwt.displayName="SelectionListener";const gen=l=>!!l.onSelectionChange;function pen({onSelectionChange:l}){const r=nf(gen);return l||r?Nn.createElement(Zwt,{onSelectionChange:l}):null}const ben=l=>({setNodes:l.setNodes,setEdges:l.setEdges,setDefaultNodesAndEdges:l.setDefaultNodesAndEdges,setMinZoom:l.setMinZoom,setMaxZoom:l.setMaxZoom,setTranslateExtent:l.setTranslateExtent,setNodeExtent:l.setNodeExtent,reset:l.reset});function gT(l,r){Ne.useEffect(()=>{typeof l<"u"&&r(l)},[l])}function Ls(l,r,o){Ne.useEffect(()=>{typeof r<"u"&&o({[l]:r})},[r])}const wen=({nodes:l,edges:r,defaultNodes:o,defaultEdges:f,onConnect:d,onConnectStart:b,onConnectEnd:p,onClickConnectStart:v,onClickConnectEnd:O,nodesDraggable:C,nodesConnectable:T,nodesFocusable:A,edgesFocusable:j,edgesUpdatable:$,elevateNodesOnSelect:L,minZoom:z,maxZoom:Z,nodeExtent:Y,onNodesChange:ne,onEdgesChange:he,elementsSelectable:se,connectionMode:ve,snapGrid:Ce,snapToGrid:Ie,translateExtent:nt,connectOnClick:Re,defaultEdgeOptions:ft,fitView:st,fitViewOptions:at,onNodesDelete:ut,onEdgesDelete:le,onNodeDrag:Ze,onNodeDragStart:it,onNodeDragStop:Tt,onSelectionDrag:X,onSelectionDragStart:Je,onSelectionDragStop:Nt,noPanClassName:Kt,nodeOrigin:Ut,rfId:In,autoPanOnConnect:Bn,autoPanOnNodeDrag:Pi,onError:dr,connectionRadius:Ir,isValidConnection:io,nodeDragThreshold:ks})=>{const{setNodes:yr,setEdges:Hc,setDefaultNodesAndEdges:fo,setMinZoom:qo,setMaxZoom:$o,setTranslateExtent:Yo,setNodeExtent:xf,reset:Vs}=nf(ben,X1),gi=$h();return Ne.useEffect(()=>{const Ac=f==null?void 0:f.map(Rd=>({...Rd,...ft}));return fo(o,Ac),()=>{Vs()}},[]),Ls("defaultEdgeOptions",ft,gi.setState),Ls("connectionMode",ve,gi.setState),Ls("onConnect",d,gi.setState),Ls("onConnectStart",b,gi.setState),Ls("onConnectEnd",p,gi.setState),Ls("onClickConnectStart",v,gi.setState),Ls("onClickConnectEnd",O,gi.setState),Ls("nodesDraggable",C,gi.setState),Ls("nodesConnectable",T,gi.setState),Ls("nodesFocusable",A,gi.setState),Ls("edgesFocusable",j,gi.setState),Ls("edgesUpdatable",$,gi.setState),Ls("elementsSelectable",se,gi.setState),Ls("elevateNodesOnSelect",L,gi.setState),Ls("snapToGrid",Ie,gi.setState),Ls("snapGrid",Ce,gi.setState),Ls("onNodesChange",ne,gi.setState),Ls("onEdgesChange",he,gi.setState),Ls("connectOnClick",Re,gi.setState),Ls("fitViewOnInit",st,gi.setState),Ls("fitViewOnInitOptions",at,gi.setState),Ls("onNodesDelete",ut,gi.setState),Ls("onEdgesDelete",le,gi.setState),Ls("onNodeDrag",Ze,gi.setState),Ls("onNodeDragStart",it,gi.setState),Ls("onNodeDragStop",Tt,gi.setState),Ls("onSelectionDrag",X,gi.setState),Ls("onSelectionDragStart",Je,gi.setState),Ls("onSelectionDragStop",Nt,gi.setState),Ls("noPanClassName",Kt,gi.setState),Ls("nodeOrigin",Ut,gi.setState),Ls("rfId",In,gi.setState),Ls("autoPanOnConnect",Bn,gi.setState),Ls("autoPanOnNodeDrag",Pi,gi.setState),Ls("onError",dr,gi.setState),Ls("connectionRadius",Ir,gi.setState),Ls("isValidConnection",io,gi.setState),Ls("nodeDragThreshold",ks,gi.setState),gT(l,yr),gT(r,Hc),gT(z,qo),gT(Z,$o),gT(nt,Yo),gT(Y,xf),null},xgt={display:"none"},men={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Jwt="react-flow__node-desc",emt="react-flow__edge-desc",ven="react-flow__aria-live",yen=l=>l.ariaLiveMessage;function Oen({rfId:l}){const r=nf(yen);return Nn.createElement("div",{id:`${ven}-${l}`,"aria-live":"assertive","aria-atomic":"true",style:men},r)}function ken({rfId:l,disableKeyboardA11y:r}){return Nn.createElement(Nn.Fragment,null,Nn.createElement("div",{id:`${Jwt}-${l}`,style:xgt},"Press enter or space to select a node.",!r&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),Nn.createElement("div",{id:`${emt}-${l}`,style:xgt},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!r&&Nn.createElement(Oen,{rfId:l}))}var mR=(l=null,r={actInsideInputWithModifier:!0})=>{const[o,f]=Ne.useState(!1),d=Ne.useRef(!1),b=Ne.useRef(new Set([])),[p,v]=Ne.useMemo(()=>{if(l!==null){const C=(Array.isArray(l)?l:[l]).filter(A=>typeof A=="string").map(A=>A.split("+")),T=C.reduce((A,j)=>A.concat(...j),[]);return[C,T]}return[[],[]]},[l]);return Ne.useEffect(()=>{const O=typeof document<"u"?document:null,C=(r==null?void 0:r.target)||O;if(l!==null){const T=$=>{if(d.current=$.ctrlKey||$.metaKey||$.shiftKey,(!d.current||d.current&&!r.actInsideInputWithModifier)&&rye($))return!1;const z=Tgt($.code,v);b.current.add($[z]),Cgt(p,b.current,!1)&&($.preventDefault(),f(!0))},A=$=>{if((!d.current||d.current&&!r.actInsideInputWithModifier)&&rye($))return!1;const z=Tgt($.code,v);Cgt(p,b.current,!0)?(f(!1),b.current.clear()):b.current.delete($[z]),$.key==="Meta"&&b.current.clear(),d.current=!1},j=()=>{b.current.clear(),f(!1)};return C==null||C.addEventListener("keydown",T),C==null||C.addEventListener("keyup",A),window.addEventListener("blur",j),()=>{C==null||C.removeEventListener("keydown",T),C==null||C.removeEventListener("keyup",A),window.removeEventListener("blur",j)}}},[l,f]),o};function Cgt(l,r,o){return l.filter(f=>o||f.length===r.size).some(f=>f.every(d=>r.has(d)))}function Tgt(l,r){return r.includes(l)?"code":"key"}function tmt(l,r,o,f){var v,O;const d=l.parentNode||l.parentId;if(!d)return o;const b=r.get(d),p=PT(b,f);return tmt(b,r,{x:(o.x??0)+p.x,y:(o.y??0)+p.y,z:(((v=b[Eu])==null?void 0:v.z)??0)>(o.z??0)?((O=b[Eu])==null?void 0:O.z)??0:o.z??0},f)}function nmt(l,r,o){l.forEach(f=>{var b;const d=f.parentNode||f.parentId;if(d&&!l.has(d))throw new Error(`Parent node ${d} not found`);if(d||o!=null&&o[f.id]){const{x:p,y:v,z:O}=tmt(f,l,{...f.position,z:((b=f[Eu])==null?void 0:b.z)??0},r);f.positionAbsolute={x:p,y:v},f[Eu].z=O,o!=null&&o[f.id]&&(f[Eu].isParent=!0)}})}function Q2e(l,r,o,f){const d=new Map,b={},p=f?1e3:0;return l.forEach(v=>{var $;const O=(Qp(v.zIndex)?v.zIndex:0)+(v.selected?p:0),C=r.get(v.id),T={...v,positionAbsolute:{x:v.position.x,y:v.position.y}},A=v.parentNode||v.parentId;A&&(b[A]=!0);const j=(C==null?void 0:C.type)&&(C==null?void 0:C.type)!==v.type;Object.defineProperty(T,Eu,{enumerable:!1,value:{handleBounds:j||($=C==null?void 0:C[Eu])==null?void 0:$.handleBounds,z:O}}),d.set(v.id,T)}),nmt(d,o,b),d}function imt(l,r={}){const{getNodes:o,width:f,height:d,minZoom:b,maxZoom:p,d3Zoom:v,d3Selection:O,fitViewOnInitDone:C,fitViewOnInit:T,nodeOrigin:A}=l(),j=r.initial&&!C&&T;if(v&&O&&(j||!r.initial)){const L=o().filter(Z=>{var ne;const Y=r.includeHiddenNodes?Z.width&&Z.height:!Z.hidden;return(ne=r.nodes)!=null&&ne.length?Y&&r.nodes.some(he=>he.id===Z.id):Y}),z=L.every(Z=>Z.width&&Z.height);if(L.length>0&&z){const Z=tOe(L,A),{x:Y,y:ne,zoom:he}=qwt(Z,f,d,r.minZoom??b,r.maxZoom??p,r.padding??.1),se=d4.translate(Y,ne).scale(he);return typeof r.duration=="number"&&r.duration>0?v.transform(Ox(O,r.duration),se):v.transform(O,se),!0}}return!1}function Sen(l,r){return l.forEach(o=>{const f=r.get(o.id);f&&r.set(f.id,{...f,[Eu]:f[Eu],selected:o.selected})}),new Map(r)}function xen(l,r){return r.map(o=>{const f=l.find(d=>d.id===o.id);return f&&(o.selected=f.selected),o})}function GU({changedNodes:l,changedEdges:r,get:o,set:f}){const{nodeInternals:d,edges:b,onNodesChange:p,onEdgesChange:v,hasDefaultNodes:O,hasDefaultEdges:C}=o();l!=null&&l.length&&(O&&f({nodeInternals:Sen(l,d)}),p==null||p(l)),r!=null&&r.length&&(C&&f({edges:xen(r,b)}),v==null||v(r))}const pT=()=>{},Cen={zoomIn:pT,zoomOut:pT,zoomTo:pT,getZoom:()=>1,setViewport:pT,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:pT,fitBounds:pT,project:l=>l,screenToFlowPosition:l=>l,flowToScreenPosition:l=>l,viewportInitialized:!1},Ten=l=>({d3Zoom:l.d3Zoom,d3Selection:l.d3Selection}),Een=()=>{const l=$h(),{d3Zoom:r,d3Selection:o}=nf(Ten,X1);return Ne.useMemo(()=>o&&r?{zoomIn:d=>r.scaleBy(Ox(o,d==null?void 0:d.duration),1.2),zoomOut:d=>r.scaleBy(Ox(o,d==null?void 0:d.duration),1/1.2),zoomTo:(d,b)=>r.scaleTo(Ox(o,b==null?void 0:b.duration),d),getZoom:()=>l.getState().transform[2],setViewport:(d,b)=>{const[p,v,O]=l.getState().transform,C=d4.translate(d.x??p,d.y??v).scale(d.zoom??O);r.transform(Ox(o,b==null?void 0:b.duration),C)},getViewport:()=>{const[d,b,p]=l.getState().transform;return{x:d,y:b,zoom:p}},fitView:d=>imt(l.getState,d),setCenter:(d,b,p)=>{const{width:v,height:O,maxZoom:C}=l.getState(),T=typeof(p==null?void 0:p.zoom)<"u"?p.zoom:C,A=v/2-d*T,j=O/2-b*T,$=d4.translate(A,j).scale(T);r.transform(Ox(o,p==null?void 0:p.duration),$)},fitBounds:(d,b)=>{const{width:p,height:v,minZoom:O,maxZoom:C}=l.getState(),{x:T,y:A,zoom:j}=qwt(d,p,v,O,C,(b==null?void 0:b.padding)??.1),$=d4.translate(T,A).scale(j);r.transform(Ox(o,b==null?void 0:b.duration),$)},project:d=>{const{transform:b,snapToGrid:p,snapGrid:v}=l.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),cye(d,b,p,v)},screenToFlowPosition:d=>{const{transform:b,snapToGrid:p,snapGrid:v,domNode:O}=l.getState();if(!O)return d;const{x:C,y:T}=O.getBoundingClientRect(),A={x:d.x-C,y:d.y-T};return cye(A,b,p,v)},flowToScreenPosition:d=>{const{transform:b,domNode:p}=l.getState();if(!p)return d;const{x:v,y:O}=p.getBoundingClientRect(),C=Fwt(d,b);return{x:C.x+v,y:C.y+O}},viewportInitialized:!0}:Cen,[r,o])};function rmt(){const l=Een(),r=$h(),o=Ne.useCallback(()=>r.getState().getNodes().map(z=>({...z})),[]),f=Ne.useCallback(z=>r.getState().nodeInternals.get(z),[]),d=Ne.useCallback(()=>{const{edges:z=[]}=r.getState();return z.map(Z=>({...Z}))},[]),b=Ne.useCallback(z=>{const{edges:Z=[]}=r.getState();return Z.find(Y=>Y.id===z)},[]),p=Ne.useCallback(z=>{const{getNodes:Z,setNodes:Y,hasDefaultNodes:ne,onNodesChange:he}=r.getState(),se=Z(),ve=typeof z=="function"?z(se):z;if(ne)Y(ve);else if(he){const Ce=ve.length===0?se.map(Ie=>({type:"remove",id:Ie.id})):ve.map(Ie=>({item:Ie,type:"reset"}));he(Ce)}},[]),v=Ne.useCallback(z=>{const{edges:Z=[],setEdges:Y,hasDefaultEdges:ne,onEdgesChange:he}=r.getState(),se=typeof z=="function"?z(Z):z;if(ne)Y(se);else if(he){const ve=se.length===0?Z.map(Ce=>({type:"remove",id:Ce.id})):se.map(Ce=>({item:Ce,type:"reset"}));he(ve)}},[]),O=Ne.useCallback(z=>{const Z=Array.isArray(z)?z:[z],{getNodes:Y,setNodes:ne,hasDefaultNodes:he,onNodesChange:se}=r.getState();if(he){const Ce=[...Y(),...Z];ne(Ce)}else if(se){const ve=Z.map(Ce=>({item:Ce,type:"add"}));se(ve)}},[]),C=Ne.useCallback(z=>{const Z=Array.isArray(z)?z:[z],{edges:Y=[],setEdges:ne,hasDefaultEdges:he,onEdgesChange:se}=r.getState();if(he)ne([...Y,...Z]);else if(se){const ve=Z.map(Ce=>({item:Ce,type:"add"}));se(ve)}},[]),T=Ne.useCallback(()=>{const{getNodes:z,edges:Z=[],transform:Y}=r.getState(),[ne,he,se]=Y;return{nodes:z().map(ve=>({...ve})),edges:Z.map(ve=>({...ve})),viewport:{x:ne,y:he,zoom:se}}},[]),A=Ne.useCallback(({nodes:z,edges:Z})=>{const{nodeInternals:Y,getNodes:ne,edges:he,hasDefaultNodes:se,hasDefaultEdges:ve,onNodesDelete:Ce,onEdgesDelete:Ie,onNodesChange:nt,onEdgesChange:Re}=r.getState(),ft=(z||[]).map(Ze=>Ze.id),st=(Z||[]).map(Ze=>Ze.id),at=ne().reduce((Ze,it)=>{const Tt=it.parentNode||it.parentId,X=!ft.includes(it.id)&&Tt&&Ze.find(Nt=>Nt.id===Tt);return(typeof it.deletable=="boolean"?it.deletable:!0)&&(ft.includes(it.id)||X)&&Ze.push(it),Ze},[]),ut=he.filter(Ze=>typeof Ze.deletable=="boolean"?Ze.deletable:!0),le=ut.filter(Ze=>st.includes(Ze.id));if(at||le){const Ze=Hwt(at,ut),it=[...le,...Ze],Tt=it.reduce((X,Je)=>(X.includes(Je.id)||X.push(Je.id),X),[]);if((ve||se)&&(ve&&r.setState({edges:he.filter(X=>!Tt.includes(X.id))}),se&&(at.forEach(X=>{Y.delete(X.id)}),r.setState({nodeInternals:new Map(Y)}))),Tt.length>0&&(Ie==null||Ie(it),Re&&Re(Tt.map(X=>({id:X,type:"remove"})))),at.length>0&&(Ce==null||Ce(at),nt)){const X=at.map(Je=>({id:Je.id,type:"remove"}));nt(X)}}},[]),j=Ne.useCallback(z=>{const Z=VJt(z),Y=Z?null:r.getState().nodeInternals.get(z.id);return!Z&&!Y?[null,null,Z]:[Z?z:wgt(Y),Y,Z]},[]),$=Ne.useCallback((z,Z=!0,Y)=>{const[ne,he,se]=j(z);return ne?(Y||r.getState().getNodes()).filter(ve=>{if(!se&&(ve.id===he.id||!ve.positionAbsolute))return!1;const Ce=wgt(ve),Ie=iye(Ce,ne);return Z&&Ie>0||Ie>=ne.width*ne.height}):[]},[]),L=Ne.useCallback((z,Z,Y=!0)=>{const[ne]=j(z);if(!ne)return!1;const he=iye(ne,Z);return Y&&he>0||he>=ne.width*ne.height},[]);return Ne.useMemo(()=>({...l,getNodes:o,getNode:f,getEdges:d,getEdge:b,setNodes:p,setEdges:v,addNodes:O,addEdges:C,toObject:T,deleteElements:A,getIntersectingNodes:$,isNodeIntersecting:L}),[l,o,f,d,b,p,v,O,C,T,A,$,L])}const Aen={actInsideInputWithModifier:!1};var Men=({deleteKeyCode:l,multiSelectionKeyCode:r})=>{const o=$h(),{deleteElements:f}=rmt(),d=mR(l,Aen),b=mR(r);Ne.useEffect(()=>{if(d){const{edges:p,getNodes:v}=o.getState(),O=v().filter(T=>T.selected),C=p.filter(T=>T.selected);f({nodes:O,edges:C}),o.setState({nodesSelectionActive:!1})}},[d]),Ne.useEffect(()=>{o.setState({multiSelectionActive:b})},[b])};function Pen(l){const r=$h();Ne.useEffect(()=>{let o;const f=()=>{var b,p;if(!l.current)return;const d=X3e(l.current);(d.height===0||d.width===0)&&((p=(b=r.getState()).onError)==null||p.call(b,"004",Uy.error004())),r.setState({width:d.width||500,height:d.height||500})};return f(),window.addEventListener("resize",f),l.current&&(o=new ResizeObserver(()=>f()),o.observe(l.current)),()=>{window.removeEventListener("resize",f),o&&l.current&&o.unobserve(l.current)}},[])}const rOe={position:"absolute",width:"100%",height:"100%",top:0,left:0},jen=(l,r)=>l.x!==r.x||l.y!==r.y||l.zoom!==r.k,YU=l=>({x:l.x,y:l.y,zoom:l.k}),bT=(l,r)=>l.target.closest(`.${r}`),Egt=(l,r)=>r===2&&Array.isArray(l)&&l.includes(2),Agt=l=>{const r=l.ctrlKey&&fY()?10:1;return-l.deltaY*(l.deltaMode===1?.05:l.deltaMode?1:.002)*r},Den=l=>({d3Zoom:l.d3Zoom,d3Selection:l.d3Selection,d3ZoomHandler:l.d3ZoomHandler,userSelectionActive:l.userSelectionActive}),$en=({onMove:l,onMoveStart:r,onMoveEnd:o,onPaneContextMenu:f,zoomOnScroll:d=!0,zoomOnPinch:b=!0,panOnScroll:p=!1,panOnScrollSpeed:v=.5,panOnScrollMode:O=Ex.Free,zoomOnDoubleClick:C=!0,elementsSelectable:T,panOnDrag:A=!0,defaultViewport:j,translateExtent:$,minZoom:L,maxZoom:z,zoomActivationKeyCode:Z,preventScrolling:Y=!0,children:ne,noWheelClassName:he,noPanClassName:se})=>{const ve=Ne.useRef(),Ce=$h(),Ie=Ne.useRef(!1),nt=Ne.useRef(!1),Re=Ne.useRef(null),ft=Ne.useRef({x:0,y:0,zoom:0}),{d3Zoom:st,d3Selection:at,d3ZoomHandler:ut,userSelectionActive:le}=nf(Den,X1),Ze=mR(Z),it=Ne.useRef(0),Tt=Ne.useRef(!1),X=Ne.useRef();return Pen(Re),Ne.useEffect(()=>{if(Re.current){const Je=Re.current.getBoundingClientRect(),Nt=BJt().scaleExtent([L,z]).translateExtent($),Kt=Dw(Re.current).call(Nt),Ut=d4.translate(j.x,j.y).scale(qT(j.zoom,L,z)),In=[[0,0],[Je.width,Je.height]],Bn=Nt.constrain()(Ut,In,$);Nt.transform(Kt,Bn),Nt.wheelDelta(Agt),Ce.setState({d3Zoom:Nt,d3Selection:Kt,d3ZoomHandler:Kt.on("wheel.zoom"),transform:[Bn.x,Bn.y,Bn.k],domNode:Re.current.closest(".react-flow")})}},[]),Ne.useEffect(()=>{at&&st&&(p&&!Ze&&!le?at.on("wheel.zoom",Je=>{if(bT(Je,he))return!1;Je.preventDefault(),Je.stopImmediatePropagation();const Nt=at.property("__zoom").k||1;if(Je.ctrlKey&&b){const io=I2(Je),ks=Agt(Je),yr=Nt*Math.pow(2,ks);st.scaleTo(at,yr,io,Je);return}const Kt=Je.deltaMode===1?20:1;let Ut=O===Ex.Vertical?0:Je.deltaX*Kt,In=O===Ex.Horizontal?0:Je.deltaY*Kt;!fY()&&Je.shiftKey&&O!==Ex.Vertical&&(Ut=Je.deltaY*Kt,In=0),st.translateBy(at,-(Ut/Nt)*v,-(In/Nt)*v,{internal:!0});const Bn=YU(at.property("__zoom")),{onViewportChangeStart:Pi,onViewportChange:dr,onViewportChangeEnd:Ir}=Ce.getState();clearTimeout(X.current),Tt.current||(Tt.current=!0,r==null||r(Je,Bn),Pi==null||Pi(Bn)),Tt.current&&(l==null||l(Je,Bn),dr==null||dr(Bn),X.current=setTimeout(()=>{o==null||o(Je,Bn),Ir==null||Ir(Bn),Tt.current=!1},150))},{passive:!1}):typeof ut<"u"&&at.on("wheel.zoom",function(Je,Nt){if(!Y&&Je.type==="wheel"&&!Je.ctrlKey||bT(Je,he))return null;Je.preventDefault(),ut.call(this,Je,Nt)},{passive:!1}))},[le,p,O,at,st,ut,Ze,b,Y,he,r,l,o]),Ne.useEffect(()=>{st&&st.on("start",Je=>{var Ut,In;if(!Je.sourceEvent||Je.sourceEvent.internal)return null;it.current=(Ut=Je.sourceEvent)==null?void 0:Ut.button;const{onViewportChangeStart:Nt}=Ce.getState(),Kt=YU(Je.transform);Ie.current=!0,ft.current=Kt,((In=Je.sourceEvent)==null?void 0:In.type)==="mousedown"&&Ce.setState({paneDragging:!0}),Nt==null||Nt(Kt),r==null||r(Je.sourceEvent,Kt)})},[st,r]),Ne.useEffect(()=>{st&&(le&&!Ie.current?st.on("zoom",null):le||st.on("zoom",Je=>{var Kt;const{onViewportChange:Nt}=Ce.getState();if(Ce.setState({transform:[Je.transform.x,Je.transform.y,Je.transform.k]}),nt.current=!!(f&&Egt(A,it.current??0)),(l||Nt)&&!((Kt=Je.sourceEvent)!=null&&Kt.internal)){const Ut=YU(Je.transform);Nt==null||Nt(Ut),l==null||l(Je.sourceEvent,Ut)}}))},[le,st,l,A,f]),Ne.useEffect(()=>{st&&st.on("end",Je=>{if(!Je.sourceEvent||Je.sourceEvent.internal)return null;const{onViewportChangeEnd:Nt}=Ce.getState();if(Ie.current=!1,Ce.setState({paneDragging:!1}),f&&Egt(A,it.current??0)&&!nt.current&&f(Je.sourceEvent),nt.current=!1,(o||Nt)&&jen(ft.current,Je.transform)){const Kt=YU(Je.transform);ft.current=Kt,clearTimeout(ve.current),ve.current=setTimeout(()=>{Nt==null||Nt(Kt),o==null||o(Je.sourceEvent,Kt)},p?150:0)}})},[st,p,A,o,f]),Ne.useEffect(()=>{st&&st.filter(Je=>{const Nt=Ze||d,Kt=b&&Je.ctrlKey;if((A===!0||Array.isArray(A)&&A.includes(1))&&Je.button===1&&Je.type==="mousedown"&&(bT(Je,"react-flow__node")||bT(Je,"react-flow__edge")))return!0;if(!A&&!Nt&&!p&&!C&&!b||le||!C&&Je.type==="dblclick"||bT(Je,he)&&Je.type==="wheel"||bT(Je,se)&&(Je.type!=="wheel"||p&&Je.type==="wheel"&&!Ze)||!b&&Je.ctrlKey&&Je.type==="wheel"||!Nt&&!p&&!Kt&&Je.type==="wheel"||!A&&(Je.type==="mousedown"||Je.type==="touchstart")||Array.isArray(A)&&!A.includes(Je.button)&&Je.type==="mousedown")return!1;const Ut=Array.isArray(A)&&A.includes(Je.button)||!Je.button||Je.button<=1;return(!Je.ctrlKey||Je.type==="wheel")&&Ut})},[le,st,d,b,p,C,A,T,Ze]),Nn.createElement("div",{className:"react-flow__renderer",ref:Re,style:rOe},ne)},Nen=l=>({userSelectionActive:l.userSelectionActive,userSelectionRect:l.userSelectionRect});function Ien(){const{userSelectionActive:l,userSelectionRect:r}=nf(Nen,X1);return l&&r?Nn.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:r.width,height:r.height,transform:`translate(${r.x}px, ${r.y}px)`}}):null}function Mgt(l,r){const o=r.parentNode||r.parentId,f=l.find(d=>d.id===o);if(f){const d=r.position.x+r.width-f.width,b=r.position.y+r.height-f.height;if(d>0||b>0||r.position.x<0||r.position.y<0){if(f.style={...f.style},f.style.width=f.style.width??f.width,f.style.height=f.style.height??f.height,d>0&&(f.style.width+=d),b>0&&(f.style.height+=b),r.position.x<0){const p=Math.abs(r.position.x);f.position.x=f.position.x-p,f.style.width+=p,r.position.x=0}if(r.position.y<0){const p=Math.abs(r.position.y);f.position.y=f.position.y-p,f.style.height+=p,r.position.y=0}f.width=f.style.width,f.height=f.style.height}}}function smt(l,r){if(l.some(f=>f.type==="reset"))return l.filter(f=>f.type==="reset").map(f=>f.item);const o=l.filter(f=>f.type==="add").map(f=>f.item);return r.reduce((f,d)=>{const b=l.filter(v=>v.id===d.id);if(b.length===0)return f.push(d),f;const p={...d};for(const v of b)if(v)switch(v.type){case"select":{p.selected=v.selected;break}case"position":{typeof v.position<"u"&&(p.position=v.position),typeof v.positionAbsolute<"u"&&(p.positionAbsolute=v.positionAbsolute),typeof v.dragging<"u"&&(p.dragging=v.dragging),p.expandParent&&Mgt(f,p);break}case"dimensions":{typeof v.dimensions<"u"&&(p.width=v.dimensions.width,p.height=v.dimensions.height),typeof v.updateStyle<"u"&&(p.style={...p.style||{},...v.dimensions}),typeof v.resizing=="boolean"&&(p.resizing=v.resizing),p.expandParent&&Mgt(f,p);break}case"remove":return f}return f.push(p),f},o)}function Ren(l,r){return smt(l,r)}function Wdn(l,r){return smt(l,r)}const n4=(l,r)=>({id:l,type:"select",selected:r});function ST(l,r){return l.reduce((o,f)=>{const d=r.includes(f.id);return!f.selected&&d?(f.selected=!0,o.push(n4(f.id,!0))):f.selected&&!d&&(f.selected=!1,o.push(n4(f.id,!1))),o},[])}const z2e=(l,r)=>o=>{o.target===r.current&&(l==null||l(o))},Len=l=>({userSelectionActive:l.userSelectionActive,elementsSelectable:l.elementsSelectable,dragging:l.paneDragging}),omt=Ne.memo(({isSelecting:l,selectionMode:r=wR.Full,panOnDrag:o,onSelectionStart:f,onSelectionEnd:d,onPaneClick:b,onPaneContextMenu:p,onPaneScroll:v,onPaneMouseEnter:O,onPaneMouseMove:C,onPaneMouseLeave:T,children:A})=>{const j=Ne.useRef(null),$=$h(),L=Ne.useRef(0),z=Ne.useRef(0),Z=Ne.useRef(),{userSelectionActive:Y,elementsSelectable:ne,dragging:he}=nf(Len,X1),se=()=>{$.setState({userSelectionActive:!1,userSelectionRect:null}),L.current=0,z.current=0},ve=ut=>{b==null||b(ut),$.getState().resetSelectedElements(),$.setState({nodesSelectionActive:!1})},Ce=ut=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){ut.preventDefault();return}p==null||p(ut)},Ie=v?ut=>v(ut):void 0,nt=ut=>{const{resetSelectedElements:le,domNode:Ze}=$.getState();if(Z.current=Ze==null?void 0:Ze.getBoundingClientRect(),!ne||!l||ut.button!==0||ut.target!==j.current||!Z.current)return;const{x:it,y:Tt}=g4(ut,Z.current);le(),$.setState({userSelectionRect:{width:0,height:0,startX:it,startY:Tt,x:it,y:Tt}}),f==null||f(ut)},Re=ut=>{const{userSelectionRect:le,nodeInternals:Ze,edges:it,transform:Tt,onNodesChange:X,onEdgesChange:Je,nodeOrigin:Nt,getNodes:Kt}=$.getState();if(!l||!Z.current||!le)return;$.setState({userSelectionActive:!0,nodesSelectionActive:!1});const Ut=g4(ut,Z.current),In=le.startX??0,Bn=le.startY??0,Pi={...le,x:Ut.xyr.id),ks=Ir.map(yr=>yr.id);if(L.current!==ks.length){L.current=ks.length;const yr=ST(dr,ks);yr.length&&(X==null||X(yr))}if(z.current!==io.length){z.current=io.length;const yr=ST(it,io);yr.length&&(Je==null||Je(yr))}$.setState({userSelectionRect:Pi})},ft=ut=>{if(ut.button!==0)return;const{userSelectionRect:le}=$.getState();!Y&&le&&ut.target===j.current&&(ve==null||ve(ut)),$.setState({nodesSelectionActive:L.current>0}),se(),d==null||d(ut)},st=ut=>{Y&&($.setState({nodesSelectionActive:L.current>0}),d==null||d(ut)),se()},at=ne&&(l||Y);return Nn.createElement("div",{className:Yp(["react-flow__pane",{dragging:he,selection:l}]),onClick:at?void 0:z2e(ve,j),onContextMenu:z2e(Ce,j),onWheel:z2e(Ie,j),onMouseEnter:at?void 0:O,onMouseDown:at?nt:void 0,onMouseMove:at?Re:C,onMouseUp:at?ft:void 0,onMouseLeave:at?st:T,ref:j,style:rOe},A,Nn.createElement(Ien,null))});omt.displayName="Pane";function cmt(l,r){const o=l.parentNode||l.parentId;if(!o)return!1;const f=r.get(o);return f?f.selected?!0:cmt(f,r):!1}function Pgt(l,r,o){let f=l;do{if(f!=null&&f.matches(r))return!0;if(f===o.current)return!1;f=f.parentElement}while(f);return!1}function Ben(l,r,o,f){return Array.from(l.values()).filter(d=>(d.selected||d.id===f)&&(!d.parentNode||d.parentId||!cmt(d,l))&&(d.draggable||r&&typeof d.draggable>"u")).map(d=>{var b,p;return{id:d.id,position:d.position||{x:0,y:0},positionAbsolute:d.positionAbsolute||{x:0,y:0},distance:{x:o.x-(((b=d.positionAbsolute)==null?void 0:b.x)??0),y:o.y-(((p=d.positionAbsolute)==null?void 0:p.y)??0)},delta:{x:0,y:0},extent:d.extent,parentNode:d.parentNode||d.parentId,parentId:d.parentNode||d.parentId,width:d.width,height:d.height,expandParent:d.expandParent}})}function Fen(l,r){return!r||r==="parent"?r:[r[0],[r[1][0]-(l.width||0),r[1][1]-(l.height||0)]]}function lmt(l,r,o,f,d=[0,0],b){const p=Fen(l,l.extent||f);let v=p;const O=l.parentNode||l.parentId;if(l.extent==="parent"&&!l.expandParent)if(O&&l.width&&l.height){const A=o.get(O),{x:j,y:$}=PT(A,d).positionAbsolute;v=A&&Qp(j)&&Qp($)&&Qp(A.width)&&Qp(A.height)?[[j+l.width*d[0],$+l.height*d[1]],[j+A.width-l.width+l.width*d[0],$+A.height-l.height+l.height*d[1]]]:v}else b==null||b("005",Uy.error005()),v=p;else if(l.extent&&O&&l.extent!=="parent"){const A=o.get(O),{x:j,y:$}=PT(A,d).positionAbsolute;v=[[l.extent[0][0]+j,l.extent[0][1]+$],[l.extent[1][0]+j,l.extent[1][1]+$]]}let C={x:0,y:0};if(O){const A=o.get(O);C=PT(A,d).positionAbsolute}const T=v&&v!=="parent"?U3e(r,v):r;return{position:{x:T.x-C.x,y:T.y-C.y},positionAbsolute:T}}function W2e({nodeId:l,dragItems:r,nodeInternals:o}){const f=r.map(d=>({...o.get(d.id),position:d.position,positionAbsolute:d.positionAbsolute}));return[l?f.find(d=>d.id===l):f[0],f]}const jgt=(l,r,o,f)=>{const d=r.querySelectorAll(l);if(!d||!d.length)return null;const b=Array.from(d),p=r.getBoundingClientRect(),v={x:p.width*f[0],y:p.height*f[1]};return b.map(O=>{const C=O.getBoundingClientRect();return{id:O.getAttribute("data-handleid"),position:O.getAttribute("data-handlepos"),x:(C.left-p.left-v.x)/o,y:(C.top-p.top-v.y)/o,...X3e(O)}})};function $I(l,r,o){return o===void 0?o:f=>{const d=r().nodeInternals.get(l);d&&o(f,{...d})}}function uye({id:l,store:r,unselect:o=!1,nodeRef:f}){const{addSelectedNodes:d,unselectNodesAndEdges:b,multiSelectionActive:p,nodeInternals:v,onError:O}=r.getState(),C=v.get(l);if(!C){O==null||O("012",Uy.error012(l));return}r.setState({nodesSelectionActive:!1}),C.selected?(o||C.selected&&p)&&(b({nodes:[C],edges:[]}),requestAnimationFrame(()=>{var T;return(T=f==null?void 0:f.current)==null?void 0:T.blur()})):d([l])}function _en(){const l=$h();return Ne.useCallback(({sourceEvent:o})=>{const{transform:f,snapGrid:d,snapToGrid:b}=l.getState(),p=o.touches?o.touches[0].clientX:o.clientX,v=o.touches?o.touches[0].clientY:o.clientY,O={x:(p-f[0])/f[2],y:(v-f[1])/f[2]};return{xSnapped:b?d[0]*Math.round(O.x/d[0]):O.x,ySnapped:b?d[1]*Math.round(O.y/d[1]):O.y,...O}},[])}function K2e(l){return(r,o,f)=>l==null?void 0:l(r,f)}function umt({nodeRef:l,disabled:r=!1,noDragClassName:o,handleSelector:f,nodeId:d,isSelectable:b,selectNodesOnDrag:p}){const v=$h(),[O,C]=Ne.useState(!1),T=Ne.useRef([]),A=Ne.useRef({x:null,y:null}),j=Ne.useRef(0),$=Ne.useRef(null),L=Ne.useRef({x:0,y:0}),z=Ne.useRef(null),Z=Ne.useRef(!1),Y=Ne.useRef(!1),ne=Ne.useRef(!1),he=_en();return Ne.useEffect(()=>{if(l!=null&&l.current){const se=Dw(l.current),ve=({x:nt,y:Re})=>{const{nodeInternals:ft,onNodeDrag:st,onSelectionDrag:at,updateNodePositions:ut,nodeExtent:le,snapGrid:Ze,snapToGrid:it,nodeOrigin:Tt,onError:X}=v.getState();A.current={x:nt,y:Re};let Je=!1,Nt={x:0,y:0,x2:0,y2:0};if(T.current.length>1&&le){const Ut=tOe(T.current,Tt);Nt=G3e(Ut)}if(T.current=T.current.map(Ut=>{const In={x:nt-Ut.distance.x,y:Re-Ut.distance.y};it&&(In.x=Ze[0]*Math.round(In.x/Ze[0]),In.y=Ze[1]*Math.round(In.y/Ze[1]));const Bn=[[le[0][0],le[0][1]],[le[1][0],le[1][1]]];T.current.length>1&&le&&!Ut.extent&&(Bn[0][0]=Ut.positionAbsolute.x-Nt.x+le[0][0],Bn[1][0]=Ut.positionAbsolute.x+(Ut.width??0)-Nt.x2+le[1][0],Bn[0][1]=Ut.positionAbsolute.y-Nt.y+le[0][1],Bn[1][1]=Ut.positionAbsolute.y+(Ut.height??0)-Nt.y2+le[1][1]);const Pi=lmt(Ut,In,ft,Bn,Tt,X);return Je=Je||Ut.position.x!==Pi.position.x||Ut.position.y!==Pi.position.y,Ut.position=Pi.position,Ut.positionAbsolute=Pi.positionAbsolute,Ut}),!Je)return;ut(T.current,!0,!0),C(!0);const Kt=d?st:K2e(at);if(Kt&&z.current){const[Ut,In]=W2e({nodeId:d,dragItems:T.current,nodeInternals:ft});Kt(z.current,Ut,In)}},Ce=()=>{if(!$.current)return;const[nt,Re]=jwt(L.current,$.current);if(nt!==0||Re!==0){const{transform:ft,panBy:st}=v.getState();A.current.x=(A.current.x??0)-nt/ft[2],A.current.y=(A.current.y??0)-Re/ft[2],st({x:nt,y:Re})&&ve(A.current)}j.current=requestAnimationFrame(Ce)},Ie=nt=>{var Tt;const{nodeInternals:Re,multiSelectionActive:ft,nodesDraggable:st,unselectNodesAndEdges:at,onNodeDragStart:ut,onSelectionDragStart:le}=v.getState();Y.current=!0;const Ze=d?ut:K2e(le);(!p||!b)&&!ft&&d&&((Tt=Re.get(d))!=null&&Tt.selected||at()),d&&b&&p&&uye({id:d,store:v,nodeRef:l});const it=he(nt);if(A.current=it,T.current=Ben(Re,st,it,d),Ze&&T.current){const[X,Je]=W2e({nodeId:d,dragItems:T.current,nodeInternals:Re});Ze(nt.sourceEvent,X,Je)}};if(r)se.on(".drag",null);else{const nt=XYt().on("start",Re=>{const{domNode:ft,nodeDragThreshold:st}=v.getState();st===0&&Ie(Re),ne.current=!1;const at=he(Re);A.current=at,$.current=(ft==null?void 0:ft.getBoundingClientRect())||null,L.current=g4(Re.sourceEvent,$.current)}).on("drag",Re=>{var ut,le;const ft=he(Re),{autoPanOnNodeDrag:st,nodeDragThreshold:at}=v.getState();if(Re.sourceEvent.type==="touchmove"&&Re.sourceEvent.touches.length>1&&(ne.current=!0),!ne.current){if(!Z.current&&Y.current&&st&&(Z.current=!0,Ce()),!Y.current){const Ze=ft.xSnapped-(((ut=A==null?void 0:A.current)==null?void 0:ut.x)??0),it=ft.ySnapped-(((le=A==null?void 0:A.current)==null?void 0:le.y)??0);Math.sqrt(Ze*Ze+it*it)>at&&Ie(Re)}(A.current.x!==ft.xSnapped||A.current.y!==ft.ySnapped)&&T.current&&Y.current&&(z.current=Re.sourceEvent,L.current=g4(Re.sourceEvent,$.current),ve(ft))}}).on("end",Re=>{if(!(!Y.current||ne.current)&&(C(!1),Z.current=!1,Y.current=!1,cancelAnimationFrame(j.current),T.current)){const{updateNodePositions:ft,nodeInternals:st,onNodeDragStop:at,onSelectionDragStop:ut}=v.getState(),le=d?at:K2e(ut);if(ft(T.current,!1,!1),le){const[Ze,it]=W2e({nodeId:d,dragItems:T.current,nodeInternals:st});le(Re.sourceEvent,Ze,it)}}}).filter(Re=>{const ft=Re.target;return!Re.button&&(!o||!Pgt(ft,`.${o}`,l))&&(!f||Pgt(ft,f,l))});return se.call(nt),()=>{se.on(".drag",null)}}}},[l,r,o,f,b,v,d,p,he]),O}function fmt(){const l=$h();return Ne.useCallback(o=>{const{nodeInternals:f,nodeExtent:d,updateNodePositions:b,getNodes:p,snapToGrid:v,snapGrid:O,onError:C,nodesDraggable:T}=l.getState(),A=p().filter(ne=>ne.selected&&(ne.draggable||T&&typeof ne.draggable>"u")),j=v?O[0]:5,$=v?O[1]:5,L=o.isShiftPressed?4:1,z=o.x*j*L,Z=o.y*$*L,Y=A.map(ne=>{if(ne.positionAbsolute){const he={x:ne.positionAbsolute.x+z,y:ne.positionAbsolute.y+Z};v&&(he.x=O[0]*Math.round(he.x/O[0]),he.y=O[1]*Math.round(he.y/O[1]));const{positionAbsolute:se,position:ve}=lmt(ne,he,f,d,void 0,C);ne.position=ve,ne.positionAbsolute=se}return ne});b(Y,!0,!1)},[])}const jT={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var NI=l=>{const r=({id:o,type:f,data:d,xPos:b,yPos:p,xPosOrigin:v,yPosOrigin:O,selected:C,onClick:T,onMouseEnter:A,onMouseMove:j,onMouseLeave:$,onContextMenu:L,onDoubleClick:z,style:Z,className:Y,isDraggable:ne,isSelectable:he,isConnectable:se,isFocusable:ve,selectNodesOnDrag:Ce,sourcePosition:Ie,targetPosition:nt,hidden:Re,resizeObserver:ft,dragHandle:st,zIndex:at,isParent:ut,noDragClassName:le,noPanClassName:Ze,initialized:it,disableKeyboardA11y:Tt,ariaLabel:X,rfId:Je,hasHandleBounds:Nt})=>{const Kt=$h(),Ut=Ne.useRef(null),In=Ne.useRef(null),Bn=Ne.useRef(Ie),Pi=Ne.useRef(nt),dr=Ne.useRef(f),Ir=he||ne||T||A||j||$,io=fmt(),ks=$I(o,Kt.getState,A),yr=$I(o,Kt.getState,j),Hc=$I(o,Kt.getState,$),fo=$I(o,Kt.getState,L),qo=$I(o,Kt.getState,z),$o=Vs=>{const{nodeDragThreshold:gi}=Kt.getState();if(he&&(!Ce||!ne||gi>0)&&uye({id:o,store:Kt,nodeRef:Ut}),T){const Ac=Kt.getState().nodeInternals.get(o);Ac&&T(Vs,{...Ac})}},Yo=Vs=>{if(!rye(Vs)&&!Tt)if($wt.includes(Vs.key)&&he){const gi=Vs.key==="Escape";uye({id:o,store:Kt,unselect:gi,nodeRef:Ut})}else ne&&C&&Object.prototype.hasOwnProperty.call(jT,Vs.key)&&(Kt.setState({ariaLiveMessage:`Moved selected node ${Vs.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~b}, y: ${~~p}`}),io({x:jT[Vs.key].x,y:jT[Vs.key].y,isShiftPressed:Vs.shiftKey}))};Ne.useEffect(()=>()=>{In.current&&(ft==null||ft.unobserve(In.current),In.current=null)},[]),Ne.useEffect(()=>{if(Ut.current&&!Re){const Vs=Ut.current;(!it||!Nt||In.current!==Vs)&&(In.current&&(ft==null||ft.unobserve(In.current)),ft==null||ft.observe(Vs),In.current=Vs)}},[Re,it,Nt]),Ne.useEffect(()=>{const Vs=dr.current!==f,gi=Bn.current!==Ie,Ac=Pi.current!==nt;Ut.current&&(Vs||gi||Ac)&&(Vs&&(dr.current=f),gi&&(Bn.current=Ie),Ac&&(Pi.current=nt),Kt.getState().updateNodeDimensions([{id:o,nodeElement:Ut.current,forceUpdate:!0}]))},[o,f,Ie,nt]);const xf=umt({nodeRef:Ut,disabled:Re||!ne,noDragClassName:le,handleSelector:st,nodeId:o,isSelectable:he,selectNodesOnDrag:Ce});return Re?null:Nn.createElement("div",{className:Yp(["react-flow__node",`react-flow__node-${f}`,{[Ze]:ne},Y,{selected:C,selectable:he,parent:ut,dragging:xf}]),ref:Ut,style:{zIndex:at,transform:`translate(${v}px,${O}px)`,pointerEvents:Ir?"all":"none",visibility:it?"visible":"hidden",...Z},"data-id":o,"data-testid":`rf__node-${o}`,onMouseEnter:ks,onMouseMove:yr,onMouseLeave:Hc,onContextMenu:fo,onClick:$o,onDoubleClick:qo,onKeyDown:ve?Yo:void 0,tabIndex:ve?0:void 0,role:ve?"button":void 0,"aria-describedby":Tt?void 0:`${Jwt}-${Je}`,"aria-label":X},Nn.createElement(een,{value:o},Nn.createElement(l,{id:o,data:d,type:f,xPos:b,yPos:p,selected:C,isConnectable:se,sourcePosition:Ie,targetPosition:nt,dragging:xf,dragHandle:st,zIndex:at})))};return r.displayName="NodeWrapper",Ne.memo(r)};const Hen=l=>{const r=l.getNodes().filter(o=>o.selected);return{...tOe(r,l.nodeOrigin),transformString:`translate(${l.transform[0]}px,${l.transform[1]}px) scale(${l.transform[2]})`,userSelectionActive:l.userSelectionActive}};function qen({onSelectionContextMenu:l,noPanClassName:r,disableKeyboardA11y:o}){const f=$h(),{width:d,height:b,x:p,y:v,transformString:O,userSelectionActive:C}=nf(Hen,X1),T=fmt(),A=Ne.useRef(null);if(Ne.useEffect(()=>{var L;o||(L=A.current)==null||L.focus({preventScroll:!0})},[o]),umt({nodeRef:A}),C||!d||!b)return null;const j=l?L=>{const z=f.getState().getNodes().filter(Z=>Z.selected);l(L,z)}:void 0,$=L=>{Object.prototype.hasOwnProperty.call(jT,L.key)&&T({x:jT[L.key].x,y:jT[L.key].y,isShiftPressed:L.shiftKey})};return Nn.createElement("div",{className:Yp(["react-flow__nodesselection","react-flow__container",r]),style:{transform:O}},Nn.createElement("div",{ref:A,className:"react-flow__nodesselection-rect",onContextMenu:j,tabIndex:o?void 0:-1,onKeyDown:o?void 0:$,style:{width:d,height:b,top:v,left:p}}))}var Qen=Ne.memo(qen);const zen=l=>l.nodesSelectionActive,hmt=({children:l,onPaneClick:r,onPaneMouseEnter:o,onPaneMouseMove:f,onPaneMouseLeave:d,onPaneContextMenu:b,onPaneScroll:p,deleteKeyCode:v,onMove:O,onMoveStart:C,onMoveEnd:T,selectionKeyCode:A,selectionOnDrag:j,selectionMode:$,onSelectionStart:L,onSelectionEnd:z,multiSelectionKeyCode:Z,panActivationKeyCode:Y,zoomActivationKeyCode:ne,elementsSelectable:he,zoomOnScroll:se,zoomOnPinch:ve,panOnScroll:Ce,panOnScrollSpeed:Ie,panOnScrollMode:nt,zoomOnDoubleClick:Re,panOnDrag:ft,defaultViewport:st,translateExtent:at,minZoom:ut,maxZoom:le,preventScrolling:Ze,onSelectionContextMenu:it,noWheelClassName:Tt,noPanClassName:X,disableKeyboardA11y:Je})=>{const Nt=nf(zen),Kt=mR(A),Ut=mR(Y),In=Ut||ft,Bn=Ut||Ce,Pi=Kt||j&&In!==!0;return Men({deleteKeyCode:v,multiSelectionKeyCode:Z}),Nn.createElement($en,{onMove:O,onMoveStart:C,onMoveEnd:T,onPaneContextMenu:b,elementsSelectable:he,zoomOnScroll:se,zoomOnPinch:ve,panOnScroll:Bn,panOnScrollSpeed:Ie,panOnScrollMode:nt,zoomOnDoubleClick:Re,panOnDrag:!Kt&&In,defaultViewport:st,translateExtent:at,minZoom:ut,maxZoom:le,zoomActivationKeyCode:ne,preventScrolling:Ze,noWheelClassName:Tt,noPanClassName:X},Nn.createElement(omt,{onSelectionStart:L,onSelectionEnd:z,onPaneClick:r,onPaneMouseEnter:o,onPaneMouseMove:f,onPaneMouseLeave:d,onPaneContextMenu:b,onPaneScroll:p,panOnDrag:In,isSelecting:!!Pi,selectionMode:$},l,Nt&&Nn.createElement(Qen,{onSelectionContextMenu:it,noPanClassName:X,disableKeyboardA11y:Je})))};hmt.displayName="FlowRenderer";var Wen=Ne.memo(hmt);function Ken(l){return nf(Ne.useCallback(o=>l?_wt(o.nodeInternals,{x:0,y:0,width:o.width,height:o.height},o.transform,!0):o.getNodes(),[l]))}function Ven(l){const r={input:NI(l.input||Uwt),default:NI(l.default||lye),output:NI(l.output||Ywt),group:NI(l.group||iOe)},o={},f=Object.keys(l).filter(d=>!["input","default","output","group"].includes(d)).reduce((d,b)=>(d[b]=NI(l[b]||lye),d),o);return{...r,...f}}const Xen=({x:l,y:r,width:o,height:f,origin:d})=>!o||!f?{x:l,y:r}:d[0]<0||d[1]<0||d[0]>1||d[1]>1?{x:l,y:r}:{x:l-o*d[0],y:r-f*d[1]},Uen=l=>({nodesDraggable:l.nodesDraggable,nodesConnectable:l.nodesConnectable,nodesFocusable:l.nodesFocusable,elementsSelectable:l.elementsSelectable,updateNodeDimensions:l.updateNodeDimensions,onError:l.onError}),amt=l=>{const{nodesDraggable:r,nodesConnectable:o,nodesFocusable:f,elementsSelectable:d,updateNodeDimensions:b,onError:p}=nf(Uen,X1),v=Ken(l.onlyRenderVisibleElements),O=Ne.useRef(),C=Ne.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const T=new ResizeObserver(A=>{const j=A.map($=>({id:$.target.getAttribute("data-id"),nodeElement:$.target,forceUpdate:!0}));b(j)});return O.current=T,T},[]);return Ne.useEffect(()=>()=>{var T;(T=O==null?void 0:O.current)==null||T.disconnect()},[]),Nn.createElement("div",{className:"react-flow__nodes",style:rOe},v.map(T=>{var ve,Ce,Ie;let A=T.type||"default";l.nodeTypes[A]||(p==null||p("003",Uy.error003(A)),A="default");const j=l.nodeTypes[A]||l.nodeTypes.default,$=!!(T.draggable||r&&typeof T.draggable>"u"),L=!!(T.selectable||d&&typeof T.selectable>"u"),z=!!(T.connectable||o&&typeof T.connectable>"u"),Z=!!(T.focusable||f&&typeof T.focusable>"u"),Y=l.nodeExtent?U3e(T.positionAbsolute,l.nodeExtent):T.positionAbsolute,ne=(Y==null?void 0:Y.x)??0,he=(Y==null?void 0:Y.y)??0,se=Xen({x:ne,y:he,width:T.width??0,height:T.height??0,origin:l.nodeOrigin});return Nn.createElement(j,{key:T.id,id:T.id,className:T.className,style:T.style,type:A,data:T.data,sourcePosition:T.sourcePosition||Ai.Bottom,targetPosition:T.targetPosition||Ai.Top,hidden:T.hidden,xPos:ne,yPos:he,xPosOrigin:se.x,yPosOrigin:se.y,selectNodesOnDrag:l.selectNodesOnDrag,onClick:l.onNodeClick,onMouseEnter:l.onNodeMouseEnter,onMouseMove:l.onNodeMouseMove,onMouseLeave:l.onNodeMouseLeave,onContextMenu:l.onNodeContextMenu,onDoubleClick:l.onNodeDoubleClick,selected:!!T.selected,isDraggable:$,isSelectable:L,isConnectable:z,isFocusable:Z,resizeObserver:C,dragHandle:T.dragHandle,zIndex:((ve=T[Eu])==null?void 0:ve.z)??0,isParent:!!((Ce=T[Eu])!=null&&Ce.isParent),noDragClassName:l.noDragClassName,noPanClassName:l.noPanClassName,initialized:!!T.width&&!!T.height,rfId:l.rfId,disableKeyboardA11y:l.disableKeyboardA11y,ariaLabel:T.ariaLabel,hasHandleBounds:!!((Ie=T[Eu])!=null&&Ie.handleBounds)})}))};amt.displayName="NodeRenderer";var Gen=Ne.memo(amt);const Yen=(l,r,o)=>o===Ai.Left?l-r:o===Ai.Right?l+r:l,Zen=(l,r,o)=>o===Ai.Top?l-r:o===Ai.Bottom?l+r:l,Dgt="react-flow__edgeupdater",$gt=({position:l,centerX:r,centerY:o,radius:f=10,onMouseDown:d,onMouseEnter:b,onMouseOut:p,type:v})=>Nn.createElement("circle",{onMouseDown:d,onMouseEnter:b,onMouseOut:p,className:Yp([Dgt,`${Dgt}-${v}`]),cx:Yen(r,f,l),cy:Zen(o,f,l),r:f,stroke:"transparent",fill:"transparent"}),Jen=()=>!0;var wT=l=>{const r=({id:o,className:f,type:d,data:b,onClick:p,onEdgeDoubleClick:v,selected:O,animated:C,label:T,labelStyle:A,labelShowBg:j,labelBgStyle:$,labelBgPadding:L,labelBgBorderRadius:z,style:Z,source:Y,target:ne,sourceX:he,sourceY:se,targetX:ve,targetY:Ce,sourcePosition:Ie,targetPosition:nt,elementsSelectable:Re,hidden:ft,sourceHandleId:st,targetHandleId:at,onContextMenu:ut,onMouseEnter:le,onMouseMove:Ze,onMouseLeave:it,reconnectRadius:Tt,onReconnect:X,onReconnectStart:Je,onReconnectEnd:Nt,markerEnd:Kt,markerStart:Ut,rfId:In,ariaLabel:Bn,isFocusable:Pi,isReconnectable:dr,pathOptions:Ir,interactionWidth:io,disableKeyboardA11y:ks})=>{const yr=Ne.useRef(null),[Hc,fo]=Ne.useState(!1),[qo,$o]=Ne.useState(!1),Yo=$h(),xf=Ne.useMemo(()=>`url('#${oye(Ut,In)}')`,[Ut,In]),Vs=Ne.useMemo(()=>`url('#${oye(Kt,In)}')`,[Kt,In]);if(ft)return null;const gi=Cf=>{var G1;const{edges:Ld,addSelectedEdges:Kw,unselectNodesAndEdges:Vw,multiSelectionActive:Xw}=Yo.getState(),f0=Ld.find(i3=>i3.id===o);f0&&(Re&&(Yo.setState({nodesSelectionActive:!1}),f0.selected&&Xw?(Vw({nodes:[],edges:[f0]}),(G1=yr.current)==null||G1.blur()):Kw([o])),p&&p(Cf,f0))},Ac=DI(o,Yo.getState,v),Rd=DI(o,Yo.getState,ut),t3=DI(o,Yo.getState,le),Y2=DI(o,Yo.getState,Ze),Z2=DI(o,Yo.getState,it),U1=(Cf,Ld)=>{if(Cf.button!==0)return;const{edges:Kw,isValidConnection:Vw}=Yo.getState(),Xw=Ld?ne:Y,f0=(Ld?at:st)||null,G1=Ld?"target":"source",i3=Vw||Jen,zx=Ld,r3=Kw.find(Uw=>Uw.id===o);$o(!0),Je==null||Je(Cf,r3,G1);const Wx=Uw=>{$o(!1),Nt==null||Nt(Uw,r3,G1)};Wwt({event:Cf,handleId:f0,nodeId:Xw,onConnect:Uw=>X==null?void 0:X(r3,Uw),isTarget:zx,getState:Yo.getState,setState:Yo.setState,isValidConnection:i3,edgeUpdaterType:G1,onReconnectEnd:Wx})},Au=Cf=>U1(Cf,!0),Nh=Cf=>U1(Cf,!1),Ih=()=>fo(!0),J2=()=>fo(!1),n3=!Re&&!p,Ww=Cf=>{var Ld;if(!ks&&$wt.includes(Cf.key)&&Re){const{unselectNodesAndEdges:Kw,addSelectedEdges:Vw,edges:Xw}=Yo.getState();Cf.key==="Escape"?((Ld=yr.current)==null||Ld.blur(),Kw({edges:[Xw.find(G1=>G1.id===o)]})):Vw([o])}};return Nn.createElement("g",{className:Yp(["react-flow__edge",`react-flow__edge-${d}`,f,{selected:O,animated:C,inactive:n3,updating:Hc}]),onClick:gi,onDoubleClick:Ac,onContextMenu:Rd,onMouseEnter:t3,onMouseMove:Y2,onMouseLeave:Z2,onKeyDown:Pi?Ww:void 0,tabIndex:Pi?0:void 0,role:Pi?"button":"img","data-testid":`rf__edge-${o}`,"aria-label":Bn===null?void 0:Bn||`Edge from ${Y} to ${ne}`,"aria-describedby":Pi?`${emt}-${In}`:void 0,ref:yr},!qo&&Nn.createElement(l,{id:o,source:Y,target:ne,selected:O,animated:C,label:T,labelStyle:A,labelShowBg:j,labelBgStyle:$,labelBgPadding:L,labelBgBorderRadius:z,data:b,style:Z,sourceX:he,sourceY:se,targetX:ve,targetY:Ce,sourcePosition:Ie,targetPosition:nt,sourceHandleId:st,targetHandleId:at,markerStart:xf,markerEnd:Vs,pathOptions:Ir,interactionWidth:io}),dr&&Nn.createElement(Nn.Fragment,null,(dr==="source"||dr===!0)&&Nn.createElement($gt,{position:Ie,centerX:he,centerY:se,radius:Tt,onMouseDown:Au,onMouseEnter:Ih,onMouseOut:J2,type:"source"}),(dr==="target"||dr===!0)&&Nn.createElement($gt,{position:nt,centerX:ve,centerY:Ce,radius:Tt,onMouseDown:Nh,onMouseEnter:Ih,onMouseOut:J2,type:"target"})))};return r.displayName="EdgeWrapper",Ne.memo(r)};function etn(l){const r={default:wT(l.default||aY),straight:wT(l.bezier||J3e),step:wT(l.step||Z3e),smoothstep:wT(l.step||ZY),simplebezier:wT(l.simplebezier||Y3e)},o={},f=Object.keys(l).filter(d=>!["default","bezier"].includes(d)).reduce((d,b)=>(d[b]=wT(l[b]||aY),d),o);return{...r,...f}}function Ngt(l,r,o=null){const f=((o==null?void 0:o.x)||0)+r.x,d=((o==null?void 0:o.y)||0)+r.y,b=(o==null?void 0:o.width)||r.width,p=(o==null?void 0:o.height)||r.height;switch(l){case Ai.Top:return{x:f+b/2,y:d};case Ai.Right:return{x:f+b,y:d+p/2};case Ai.Bottom:return{x:f+b/2,y:d+p};case Ai.Left:return{x:f,y:d+p/2}}}function Igt(l,r){return l?l.length===1||!r?l[0]:r&&l.find(o=>o.id===r)||null:null}const ttn=(l,r,o,f,d,b)=>{const p=Ngt(o,l,r),v=Ngt(b,f,d);return{sourceX:p.x,sourceY:p.y,targetX:v.x,targetY:v.y}};function ntn({sourcePos:l,targetPos:r,sourceWidth:o,sourceHeight:f,targetWidth:d,targetHeight:b,width:p,height:v,transform:O}){const C={x:Math.min(l.x,r.x),y:Math.min(l.y,r.y),x2:Math.max(l.x+o,r.x+d),y2:Math.max(l.y+f,r.y+b)};C.x===C.x2&&(C.x2+=1),C.y===C.y2&&(C.y2+=1);const T=G3e({x:(0-O[0])/O[2],y:(0-O[1])/O[2],width:p/O[2],height:v/O[2]}),A=Math.max(0,Math.min(T.x2,C.x2)-Math.max(T.x,C.x)),j=Math.max(0,Math.min(T.y2,C.y2)-Math.max(T.y,C.y));return Math.ceil(A*j)>0}function Rgt(l){var f,d,b,p,v;const r=((f=l==null?void 0:l[Eu])==null?void 0:f.handleBounds)||null,o=r&&(l==null?void 0:l.width)&&(l==null?void 0:l.height)&&typeof((d=l==null?void 0:l.positionAbsolute)==null?void 0:d.x)<"u"&&typeof((b=l==null?void 0:l.positionAbsolute)==null?void 0:b.y)<"u";return[{x:((p=l==null?void 0:l.positionAbsolute)==null?void 0:p.x)||0,y:((v=l==null?void 0:l.positionAbsolute)==null?void 0:v.y)||0,width:(l==null?void 0:l.width)||0,height:(l==null?void 0:l.height)||0},r,!!o]}const itn=[{level:0,isMaxLevel:!0,edges:[]}];function rtn(l,r,o=!1){let f=-1;const d=l.reduce((p,v)=>{var T,A;const O=Qp(v.zIndex);let C=O?v.zIndex:0;if(o){const j=r.get(v.target),$=r.get(v.source),L=v.selected||(j==null?void 0:j.selected)||($==null?void 0:$.selected),z=Math.max(((T=$==null?void 0:$[Eu])==null?void 0:T.z)||0,((A=j==null?void 0:j[Eu])==null?void 0:A.z)||0,1e3);C=(O?v.zIndex:0)+(L?z:0)}return p[C]?p[C].push(v):p[C]=[v],f=C>f?C:f,p},{}),b=Object.entries(d).map(([p,v])=>{const O=+p;return{edges:v,level:O,isMaxLevel:O===f}});return b.length===0?itn:b}function stn(l,r,o){const f=nf(Ne.useCallback(d=>l?d.edges.filter(b=>{const p=r.get(b.source),v=r.get(b.target);return(p==null?void 0:p.width)&&(p==null?void 0:p.height)&&(v==null?void 0:v.width)&&(v==null?void 0:v.height)&&ntn({sourcePos:p.positionAbsolute||{x:0,y:0},targetPos:v.positionAbsolute||{x:0,y:0},sourceWidth:p.width,sourceHeight:p.height,targetWidth:v.width,targetHeight:v.height,width:d.width,height:d.height,transform:d.transform})}):d.edges,[l,r]));return rtn(f,r,o)}const otn=({color:l="none",strokeWidth:r=1})=>Nn.createElement("polyline",{style:{stroke:l,strokeWidth:r},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),ctn=({color:l="none",strokeWidth:r=1})=>Nn.createElement("polyline",{style:{stroke:l,fill:l,strokeWidth:r},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Lgt={[hY.Arrow]:otn,[hY.ArrowClosed]:ctn};function ltn(l){const r=$h();return Ne.useMemo(()=>{var d,b;return Object.prototype.hasOwnProperty.call(Lgt,l)?Lgt[l]:((b=(d=r.getState()).onError)==null||b.call(d,"009",Uy.error009(l)),null)},[l])}const utn=({id:l,type:r,color:o,width:f=12.5,height:d=12.5,markerUnits:b="strokeWidth",strokeWidth:p,orient:v="auto-start-reverse"})=>{const O=ltn(r);return O?Nn.createElement("marker",{className:"react-flow__arrowhead",id:l,markerWidth:`${f}`,markerHeight:`${d}`,viewBox:"-10 -10 20 20",markerUnits:b,orient:v,refX:"0",refY:"0"},Nn.createElement(O,{color:o,strokeWidth:p})):null},ftn=({defaultColor:l,rfId:r})=>o=>{const f=[];return o.edges.reduce((d,b)=>([b.markerStart,b.markerEnd].forEach(p=>{if(p&&typeof p=="object"){const v=oye(p,r);f.includes(v)||(d.push({id:v,color:p.color||l,...p}),f.push(v))}}),d),[]).sort((d,b)=>d.id.localeCompare(b.id))},dmt=({defaultColor:l,rfId:r})=>{const o=nf(Ne.useCallback(ftn({defaultColor:l,rfId:r}),[l,r]),(f,d)=>!(f.length!==d.length||f.some((b,p)=>b.id!==d[p].id)));return Nn.createElement("defs",null,o.map(f=>Nn.createElement(utn,{id:f.id,key:f.id,type:f.type,color:f.color,width:f.width,height:f.height,markerUnits:f.markerUnits,strokeWidth:f.strokeWidth,orient:f.orient})))};dmt.displayName="MarkerDefinitions";var htn=Ne.memo(dmt);const atn=l=>({nodesConnectable:l.nodesConnectable,edgesFocusable:l.edgesFocusable,edgesUpdatable:l.edgesUpdatable,elementsSelectable:l.elementsSelectable,width:l.width,height:l.height,connectionMode:l.connectionMode,nodeInternals:l.nodeInternals,onError:l.onError}),gmt=({defaultMarkerColor:l,onlyRenderVisibleElements:r,elevateEdgesOnSelect:o,rfId:f,edgeTypes:d,noPanClassName:b,onEdgeContextMenu:p,onEdgeMouseEnter:v,onEdgeMouseMove:O,onEdgeMouseLeave:C,onEdgeClick:T,onEdgeDoubleClick:A,onReconnect:j,onReconnectStart:$,onReconnectEnd:L,reconnectRadius:z,children:Z,disableKeyboardA11y:Y})=>{const{edgesFocusable:ne,edgesUpdatable:he,elementsSelectable:se,width:ve,height:Ce,connectionMode:Ie,nodeInternals:nt,onError:Re}=nf(atn,X1),ft=stn(r,nt,o);return ve?Nn.createElement(Nn.Fragment,null,ft.map(({level:st,edges:at,isMaxLevel:ut})=>Nn.createElement("svg",{key:st,style:{zIndex:st},width:ve,height:Ce,className:"react-flow__edges react-flow__container"},ut&&Nn.createElement(htn,{defaultColor:l,rfId:f}),Nn.createElement("g",null,at.map(le=>{const[Ze,it,Tt]=Rgt(nt.get(le.source)),[X,Je,Nt]=Rgt(nt.get(le.target));if(!Tt||!Nt)return null;let Kt=le.type||"default";d[Kt]||(Re==null||Re("011",Uy.error011(Kt)),Kt="default");const Ut=d[Kt]||d.default,In=Ie===Nx.Strict?Je.target:(Je.target??[]).concat(Je.source??[]),Bn=Igt(it.source,le.sourceHandle),Pi=Igt(In,le.targetHandle),dr=(Bn==null?void 0:Bn.position)||Ai.Bottom,Ir=(Pi==null?void 0:Pi.position)||Ai.Top,io=!!(le.focusable||ne&&typeof le.focusable>"u"),ks=le.reconnectable||le.updatable,yr=typeof j<"u"&&(ks||he&&typeof ks>"u");if(!Bn||!Pi)return Re==null||Re("008",Uy.error008(Bn,le)),null;const{sourceX:Hc,sourceY:fo,targetX:qo,targetY:$o}=ttn(Ze,Bn,dr,X,Pi,Ir);return Nn.createElement(Ut,{key:le.id,id:le.id,className:Yp([le.className,b]),type:Kt,data:le.data,selected:!!le.selected,animated:!!le.animated,hidden:!!le.hidden,label:le.label,labelStyle:le.labelStyle,labelShowBg:le.labelShowBg,labelBgStyle:le.labelBgStyle,labelBgPadding:le.labelBgPadding,labelBgBorderRadius:le.labelBgBorderRadius,style:le.style,source:le.source,target:le.target,sourceHandleId:le.sourceHandle,targetHandleId:le.targetHandle,markerEnd:le.markerEnd,markerStart:le.markerStart,sourceX:Hc,sourceY:fo,targetX:qo,targetY:$o,sourcePosition:dr,targetPosition:Ir,elementsSelectable:se,onContextMenu:p,onMouseEnter:v,onMouseMove:O,onMouseLeave:C,onClick:T,onEdgeDoubleClick:A,onReconnect:j,onReconnectStart:$,onReconnectEnd:L,reconnectRadius:z,rfId:f,ariaLabel:le.ariaLabel,isFocusable:io,isReconnectable:yr,pathOptions:"pathOptions"in le?le.pathOptions:void 0,interactionWidth:le.interactionWidth,disableKeyboardA11y:Y})})))),Z):null};gmt.displayName="EdgeRenderer";var dtn=Ne.memo(gmt);const gtn=l=>`translate(${l.transform[0]}px,${l.transform[1]}px) scale(${l.transform[2]})`;function ptn({children:l}){const r=nf(gtn);return Nn.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},l)}function btn(l){const r=rmt(),o=Ne.useRef(!1);Ne.useEffect(()=>{!o.current&&r.viewportInitialized&&l&&(setTimeout(()=>l(r),1),o.current=!0)},[l,r.viewportInitialized])}const wtn={[Ai.Left]:Ai.Right,[Ai.Right]:Ai.Left,[Ai.Top]:Ai.Bottom,[Ai.Bottom]:Ai.Top},pmt=({nodeId:l,handleType:r,style:o,type:f=s4.Bezier,CustomComponent:d,connectionStatus:b})=>{var Ce,Ie,nt;const{fromNode:p,handleId:v,toX:O,toY:C,connectionMode:T}=nf(Ne.useCallback(Re=>({fromNode:Re.nodeInternals.get(l),handleId:Re.connectionHandleId,toX:(Re.connectionPosition.x-Re.transform[0])/Re.transform[2],toY:(Re.connectionPosition.y-Re.transform[1])/Re.transform[2],connectionMode:Re.connectionMode}),[l]),X1),A=(Ce=p==null?void 0:p[Eu])==null?void 0:Ce.handleBounds;let j=A==null?void 0:A[r];if(T===Nx.Loose&&(j=j||(A==null?void 0:A[r==="source"?"target":"source"])),!p||!j)return null;const $=v?j.find(Re=>Re.id===v):j[0],L=$?$.x+$.width/2:(p.width??0)/2,z=$?$.y+$.height/2:p.height??0,Z=(((Ie=p.positionAbsolute)==null?void 0:Ie.x)??0)+L,Y=(((nt=p.positionAbsolute)==null?void 0:nt.y)??0)+z,ne=$==null?void 0:$.position,he=ne?wtn[ne]:null;if(!ne||!he)return null;if(d)return Nn.createElement(d,{connectionLineType:f,connectionLineStyle:o,fromNode:p,fromHandle:$,fromX:Z,fromY:Y,toX:O,toY:C,fromPosition:ne,toPosition:he,connectionStatus:b});let se="";const ve={sourceX:Z,sourceY:Y,sourcePosition:ne,targetX:O,targetY:C,targetPosition:he};return f===s4.Bezier?[se]=Bwt(ve):f===s4.Step?[se]=sye({...ve,borderRadius:0}):f===s4.SmoothStep?[se]=sye(ve):f===s4.SimpleBezier?[se]=Lwt(ve):se=`M${Z},${Y} ${O},${C}`,Nn.createElement("path",{d:se,fill:"none",className:"react-flow__connection-path",style:o})};pmt.displayName="ConnectionLine";const mtn=l=>({nodeId:l.connectionNodeId,handleType:l.connectionHandleType,nodesConnectable:l.nodesConnectable,connectionStatus:l.connectionStatus,width:l.width,height:l.height});function vtn({containerStyle:l,style:r,type:o,component:f}){const{nodeId:d,handleType:b,nodesConnectable:p,width:v,height:O,connectionStatus:C}=nf(mtn,X1);return!(d&&b&&v&&p)?null:Nn.createElement("svg",{style:l,width:v,height:O,className:"react-flow__edges react-flow__connectionline react-flow__container"},Nn.createElement("g",{className:Yp(["react-flow__connection",C])},Nn.createElement(pmt,{nodeId:d,handleType:b,style:r,type:o,CustomComponent:f,connectionStatus:C})))}function Bgt(l,r){return Ne.useRef(null),$h(),Ne.useMemo(()=>r(l),[l])}const bmt=({nodeTypes:l,edgeTypes:r,onMove:o,onMoveStart:f,onMoveEnd:d,onInit:b,onNodeClick:p,onEdgeClick:v,onNodeDoubleClick:O,onEdgeDoubleClick:C,onNodeMouseEnter:T,onNodeMouseMove:A,onNodeMouseLeave:j,onNodeContextMenu:$,onSelectionContextMenu:L,onSelectionStart:z,onSelectionEnd:Z,connectionLineType:Y,connectionLineStyle:ne,connectionLineComponent:he,connectionLineContainerStyle:se,selectionKeyCode:ve,selectionOnDrag:Ce,selectionMode:Ie,multiSelectionKeyCode:nt,panActivationKeyCode:Re,zoomActivationKeyCode:ft,deleteKeyCode:st,onlyRenderVisibleElements:at,elementsSelectable:ut,selectNodesOnDrag:le,defaultViewport:Ze,translateExtent:it,minZoom:Tt,maxZoom:X,preventScrolling:Je,defaultMarkerColor:Nt,zoomOnScroll:Kt,zoomOnPinch:Ut,panOnScroll:In,panOnScrollSpeed:Bn,panOnScrollMode:Pi,zoomOnDoubleClick:dr,panOnDrag:Ir,onPaneClick:io,onPaneMouseEnter:ks,onPaneMouseMove:yr,onPaneMouseLeave:Hc,onPaneScroll:fo,onPaneContextMenu:qo,onEdgeContextMenu:$o,onEdgeMouseEnter:Yo,onEdgeMouseMove:xf,onEdgeMouseLeave:Vs,onReconnect:gi,onReconnectStart:Ac,onReconnectEnd:Rd,reconnectRadius:t3,noDragClassName:Y2,noWheelClassName:Z2,noPanClassName:U1,elevateEdgesOnSelect:Au,disableKeyboardA11y:Nh,nodeOrigin:Ih,nodeExtent:J2,rfId:n3})=>{const Ww=Bgt(l,Ven),Cf=Bgt(r,etn);return btn(b),Nn.createElement(Wen,{onPaneClick:io,onPaneMouseEnter:ks,onPaneMouseMove:yr,onPaneMouseLeave:Hc,onPaneContextMenu:qo,onPaneScroll:fo,deleteKeyCode:st,selectionKeyCode:ve,selectionOnDrag:Ce,selectionMode:Ie,onSelectionStart:z,onSelectionEnd:Z,multiSelectionKeyCode:nt,panActivationKeyCode:Re,zoomActivationKeyCode:ft,elementsSelectable:ut,onMove:o,onMoveStart:f,onMoveEnd:d,zoomOnScroll:Kt,zoomOnPinch:Ut,zoomOnDoubleClick:dr,panOnScroll:In,panOnScrollSpeed:Bn,panOnScrollMode:Pi,panOnDrag:Ir,defaultViewport:Ze,translateExtent:it,minZoom:Tt,maxZoom:X,onSelectionContextMenu:L,preventScrolling:Je,noDragClassName:Y2,noWheelClassName:Z2,noPanClassName:U1,disableKeyboardA11y:Nh},Nn.createElement(ptn,null,Nn.createElement(dtn,{edgeTypes:Cf,onEdgeClick:v,onEdgeDoubleClick:C,onlyRenderVisibleElements:at,onEdgeContextMenu:$o,onEdgeMouseEnter:Yo,onEdgeMouseMove:xf,onEdgeMouseLeave:Vs,onReconnect:gi,onReconnectStart:Ac,onReconnectEnd:Rd,reconnectRadius:t3,defaultMarkerColor:Nt,noPanClassName:U1,elevateEdgesOnSelect:!!Au,disableKeyboardA11y:Nh,rfId:n3},Nn.createElement(vtn,{style:ne,type:Y,component:he,containerStyle:se})),Nn.createElement("div",{className:"react-flow__edgelabel-renderer"}),Nn.createElement(Gen,{nodeTypes:Ww,onNodeClick:p,onNodeDoubleClick:O,onNodeMouseEnter:T,onNodeMouseMove:A,onNodeMouseLeave:j,onNodeContextMenu:$,selectNodesOnDrag:le,onlyRenderVisibleElements:at,noPanClassName:U1,noDragClassName:Y2,disableKeyboardA11y:Nh,nodeOrigin:Ih,nodeExtent:J2,rfId:n3})))};bmt.displayName="GraphView";var ytn=Ne.memo(bmt);const fye=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],e4={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:fye,nodeExtent:fye,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Nx.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:XJt,isValidConnection:void 0},Otn=()=>oGt((l,r)=>({...e4,setNodes:o=>{const{nodeInternals:f,nodeOrigin:d,elevateNodesOnSelect:b}=r();l({nodeInternals:Q2e(o,f,d,b)})},getNodes:()=>Array.from(r().nodeInternals.values()),setEdges:o=>{const{defaultEdgeOptions:f={}}=r();l({edges:o.map(d=>({...f,...d}))})},setDefaultNodesAndEdges:(o,f)=>{const d=typeof o<"u",b=typeof f<"u",p=d?Q2e(o,new Map,r().nodeOrigin,r().elevateNodesOnSelect):new Map;l({nodeInternals:p,edges:b?f:[],hasDefaultNodes:d,hasDefaultEdges:b})},updateNodeDimensions:o=>{const{onNodesChange:f,nodeInternals:d,fitViewOnInit:b,fitViewOnInitDone:p,fitViewOnInitOptions:v,domNode:O,nodeOrigin:C}=r(),T=O==null?void 0:O.querySelector(".react-flow__viewport");if(!T)return;const A=window.getComputedStyle(T),{m22:j}=new window.DOMMatrixReadOnly(A.transform),$=o.reduce((z,Z)=>{const Y=d.get(Z.id);if(Y!=null&&Y.hidden)d.set(Y.id,{...Y,[Eu]:{...Y[Eu],handleBounds:void 0}});else if(Y){const ne=X3e(Z.nodeElement);!!(ne.width&&ne.height&&(Y.width!==ne.width||Y.height!==ne.height||Z.forceUpdate))&&(d.set(Y.id,{...Y,[Eu]:{...Y[Eu],handleBounds:{source:jgt(".source",Z.nodeElement,j,C),target:jgt(".target",Z.nodeElement,j,C)}},...ne}),z.push({id:Y.id,type:"dimensions",dimensions:ne}))}return z},[]);nmt(d,C);const L=p||b&&!p&&imt(r,{initial:!0,...v});l({nodeInternals:new Map(d),fitViewOnInitDone:L}),($==null?void 0:$.length)>0&&(f==null||f($))},updateNodePositions:(o,f=!0,d=!1)=>{const{triggerNodeChanges:b}=r(),p=o.map(v=>{const O={id:v.id,type:"position",dragging:d};return f&&(O.positionAbsolute=v.positionAbsolute,O.position=v.position),O});b(p)},triggerNodeChanges:o=>{const{onNodesChange:f,nodeInternals:d,hasDefaultNodes:b,nodeOrigin:p,getNodes:v,elevateNodesOnSelect:O}=r();if(o!=null&&o.length){if(b){const C=Ren(o,v()),T=Q2e(C,d,p,O);l({nodeInternals:T})}f==null||f(o)}},addSelectedNodes:o=>{const{multiSelectionActive:f,edges:d,getNodes:b}=r();let p,v=null;f?p=o.map(O=>n4(O,!0)):(p=ST(b(),o),v=ST(d,[])),GU({changedNodes:p,changedEdges:v,get:r,set:l})},addSelectedEdges:o=>{const{multiSelectionActive:f,edges:d,getNodes:b}=r();let p,v=null;f?p=o.map(O=>n4(O,!0)):(p=ST(d,o),v=ST(b(),[])),GU({changedNodes:v,changedEdges:p,get:r,set:l})},unselectNodesAndEdges:({nodes:o,edges:f}={})=>{const{edges:d,getNodes:b}=r(),p=o||b(),v=f||d,O=p.map(T=>(T.selected=!1,n4(T.id,!1))),C=v.map(T=>n4(T.id,!1));GU({changedNodes:O,changedEdges:C,get:r,set:l})},setMinZoom:o=>{const{d3Zoom:f,maxZoom:d}=r();f==null||f.scaleExtent([o,d]),l({minZoom:o})},setMaxZoom:o=>{const{d3Zoom:f,minZoom:d}=r();f==null||f.scaleExtent([d,o]),l({maxZoom:o})},setTranslateExtent:o=>{var f;(f=r().d3Zoom)==null||f.translateExtent(o),l({translateExtent:o})},resetSelectedElements:()=>{const{edges:o,getNodes:f}=r(),b=f().filter(v=>v.selected).map(v=>n4(v.id,!1)),p=o.filter(v=>v.selected).map(v=>n4(v.id,!1));GU({changedNodes:b,changedEdges:p,get:r,set:l})},setNodeExtent:o=>{const{nodeInternals:f}=r();f.forEach(d=>{d.positionAbsolute=U3e(d.position,o)}),l({nodeExtent:o,nodeInternals:new Map(f)})},panBy:o=>{const{transform:f,width:d,height:b,d3Zoom:p,d3Selection:v,translateExtent:O}=r();if(!p||!v||!o.x&&!o.y)return!1;const C=d4.translate(f[0]+o.x,f[1]+o.y).scale(f[2]),T=[[0,0],[d,b]],A=p==null?void 0:p.constrain()(C,T,O);return p.transform(v,A),f[0]!==A.x||f[1]!==A.y||f[2]!==A.k},cancelConnection:()=>l({connectionNodeId:e4.connectionNodeId,connectionHandleId:e4.connectionHandleId,connectionHandleType:e4.connectionHandleType,connectionStatus:e4.connectionStatus,connectionStartHandle:e4.connectionStartHandle,connectionEndHandle:e4.connectionEndHandle}),reset:()=>l({...e4})}),Object.is),wmt=({children:l})=>{const r=Ne.useRef(null);return r.current||(r.current=Otn()),Nn.createElement(FJt,{value:r.current},l)};wmt.displayName="ReactFlowProvider";const mmt=({children:l})=>Ne.useContext(YY)?Nn.createElement(Nn.Fragment,null,l):Nn.createElement(wmt,null,l);mmt.displayName="ReactFlowWrapper";const ktn={input:Uwt,default:lye,output:Ywt,group:iOe},Stn={default:aY,straight:J3e,step:Z3e,smoothstep:ZY,simplebezier:Y3e},xtn=[0,0],Ctn=[15,15],Ttn={x:0,y:0,zoom:1},Etn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Atn=Ne.forwardRef(({nodes:l,edges:r,defaultNodes:o,defaultEdges:f,className:d,nodeTypes:b=ktn,edgeTypes:p=Stn,onNodeClick:v,onEdgeClick:O,onInit:C,onMove:T,onMoveStart:A,onMoveEnd:j,onConnect:$,onConnectStart:L,onConnectEnd:z,onClickConnectStart:Z,onClickConnectEnd:Y,onNodeMouseEnter:ne,onNodeMouseMove:he,onNodeMouseLeave:se,onNodeContextMenu:ve,onNodeDoubleClick:Ce,onNodeDragStart:Ie,onNodeDrag:nt,onNodeDragStop:Re,onNodesDelete:ft,onEdgesDelete:st,onSelectionChange:at,onSelectionDragStart:ut,onSelectionDrag:le,onSelectionDragStop:Ze,onSelectionContextMenu:it,onSelectionStart:Tt,onSelectionEnd:X,connectionMode:Je=Nx.Strict,connectionLineType:Nt=s4.Bezier,connectionLineStyle:Kt,connectionLineComponent:Ut,connectionLineContainerStyle:In,deleteKeyCode:Bn="Backspace",selectionKeyCode:Pi="Shift",selectionOnDrag:dr=!1,selectionMode:Ir=wR.Full,panActivationKeyCode:io="Space",multiSelectionKeyCode:ks=fY()?"Meta":"Control",zoomActivationKeyCode:yr=fY()?"Meta":"Control",snapToGrid:Hc=!1,snapGrid:fo=Ctn,onlyRenderVisibleElements:qo=!1,selectNodesOnDrag:$o=!0,nodesDraggable:Yo,nodesConnectable:xf,nodesFocusable:Vs,nodeOrigin:gi=xtn,edgesFocusable:Ac,edgesUpdatable:Rd,elementsSelectable:t3,defaultViewport:Y2=Ttn,minZoom:Z2=.5,maxZoom:U1=2,translateExtent:Au=fye,preventScrolling:Nh=!0,nodeExtent:Ih,defaultMarkerColor:J2="#b1b1b7",zoomOnScroll:n3=!0,zoomOnPinch:Ww=!0,panOnScroll:Cf=!1,panOnScrollSpeed:Ld=.5,panOnScrollMode:Kw=Ex.Free,zoomOnDoubleClick:Vw=!0,panOnDrag:Xw=!0,onPaneClick:f0,onPaneMouseEnter:G1,onPaneMouseMove:i3,onPaneMouseLeave:zx,onPaneScroll:r3,onPaneContextMenu:Wx,children:uE,onEdgeContextMenu:Uw,onEdgeDoubleClick:iL,onEdgeMouseEnter:rL,onEdgeMouseMove:sL,onEdgeMouseLeave:oL,onEdgeUpdate:cL,onEdgeUpdateStart:lL,onEdgeUpdateEnd:uL,onReconnect:fL,onReconnectStart:hL,onReconnectEnd:aL,reconnectRadius:dL=10,edgeUpdaterRadius:gL=10,onNodesChange:pL,onEdgesChange:bL,noDragClassName:wL="nodrag",noWheelClassName:mL="nowheel",noPanClassName:fE="nopan",fitView:vL=!1,fitViewOptions:yL,connectOnClick:OL=!0,attributionPosition:hE,proOptions:kL,defaultEdgeOptions:SL,elevateNodesOnSelect:xL=!0,elevateEdgesOnSelect:CL=!1,disableKeyboardA11y:S4=!1,autoPanOnConnect:Kx=!0,autoPanOnNodeDrag:x4=!0,connectionRadius:TL=20,isValidConnection:EL,onError:Vx,style:AL,id:aE,nodeDragThreshold:ML,...C4},PL)=>{const Xx=aE||"1";return Nn.createElement("div",{...C4,style:{...AL,...Etn},ref:PL,className:Yp(["react-flow",d]),"data-testid":"rf__wrapper",id:aE},Nn.createElement(mmt,null,Nn.createElement(ytn,{onInit:C,onMove:T,onMoveStart:A,onMoveEnd:j,onNodeClick:v,onEdgeClick:O,onNodeMouseEnter:ne,onNodeMouseMove:he,onNodeMouseLeave:se,onNodeContextMenu:ve,onNodeDoubleClick:Ce,nodeTypes:b,edgeTypes:p,connectionLineType:Nt,connectionLineStyle:Kt,connectionLineComponent:Ut,connectionLineContainerStyle:In,selectionKeyCode:Pi,selectionOnDrag:dr,selectionMode:Ir,deleteKeyCode:Bn,multiSelectionKeyCode:ks,panActivationKeyCode:io,zoomActivationKeyCode:yr,onlyRenderVisibleElements:qo,selectNodesOnDrag:$o,defaultViewport:Y2,translateExtent:Au,minZoom:Z2,maxZoom:U1,preventScrolling:Nh,zoomOnScroll:n3,zoomOnPinch:Ww,zoomOnDoubleClick:Vw,panOnScroll:Cf,panOnScrollSpeed:Ld,panOnScrollMode:Kw,panOnDrag:Xw,onPaneClick:f0,onPaneMouseEnter:G1,onPaneMouseMove:i3,onPaneMouseLeave:zx,onPaneScroll:r3,onPaneContextMenu:Wx,onSelectionContextMenu:it,onSelectionStart:Tt,onSelectionEnd:X,onEdgeContextMenu:Uw,onEdgeDoubleClick:iL,onEdgeMouseEnter:rL,onEdgeMouseMove:sL,onEdgeMouseLeave:oL,onReconnect:fL??cL,onReconnectStart:hL??lL,onReconnectEnd:aL??uL,reconnectRadius:dL??gL,defaultMarkerColor:J2,noDragClassName:wL,noWheelClassName:mL,noPanClassName:fE,elevateEdgesOnSelect:CL,rfId:Xx,disableKeyboardA11y:S4,nodeOrigin:gi,nodeExtent:Ih}),Nn.createElement(wen,{nodes:l,edges:r,defaultNodes:o,defaultEdges:f,onConnect:$,onConnectStart:L,onConnectEnd:z,onClickConnectStart:Z,onClickConnectEnd:Y,nodesDraggable:Yo,nodesConnectable:xf,nodesFocusable:Vs,edgesFocusable:Ac,edgesUpdatable:Rd,elementsSelectable:t3,elevateNodesOnSelect:xL,minZoom:Z2,maxZoom:U1,nodeExtent:Ih,onNodesChange:pL,onEdgesChange:bL,snapToGrid:Hc,snapGrid:fo,connectionMode:Je,translateExtent:Au,connectOnClick:OL,defaultEdgeOptions:SL,fitView:vL,fitViewOptions:yL,onNodesDelete:ft,onEdgesDelete:st,onNodeDragStart:Ie,onNodeDrag:nt,onNodeDragStop:Re,onSelectionDrag:le,onSelectionDragStart:ut,onSelectionDragStop:Ze,noPanClassName:fE,nodeOrigin:gi,rfId:Xx,autoPanOnConnect:Kx,autoPanOnNodeDrag:x4,onError:Vx,connectionRadius:TL,isValidConnection:EL,nodeDragThreshold:ML}),Nn.createElement(pen,{onSelectionChange:at}),uE,Nn.createElement(qJt,{proOptions:kL,position:hE}),Nn.createElement(ken,{rfId:Xx,disableKeyboardA11y:S4})))});Atn.displayName="ReactFlow";function Mtn(){const l=$h();return Ne.useCallback(r=>{const{domNode:o,updateNodeDimensions:f}=l.getState(),b=(Array.isArray(r)?r:[r]).reduce((p,v)=>{const O=o==null?void 0:o.querySelector(`.react-flow__node[data-id="${v}"]`);return O&&p.push({id:v,nodeElement:O,forceUpdate:!0}),p},[]);requestAnimationFrame(()=>f(b))},[])}function Ptn({id:l,className:r,hasLeft:o=!1,hasRight:f=!1,isSelected:d=!1,isDraggable:b=!1,label:p,type:v,count:O,handleClick:C,handleSelect:T}){return Ci.jsxs("div",{className:Tu("flex w-full relative items-center",r),children:[o&&Ci.jsx(w4,{type:"target",id:Ec(th.Left,l),position:Ai.Left,isConnectable:!1,className:"-ml-2 border rounded-full overflow-hidden border-current",children:Ci.jsx(z1t,{className:"w-5 text-light dark:text-dark-lighter"})}),Ci.jsxs("div",{className:Tu("w-full flex items-center",o?"pl-3":"pl-1",f?"pr-3":"pr-1"),children:[Ms(T)&&Ci.jsx("span",{onClick:T,className:"mx-2 w-4 h-4 rounded-full cursor-pointer p-0.5 border-2 border-current",children:Ci.jsx("span",{className:Tu("flex w-2 h-2 rounded-full",d?"bg-current":"bg-neutral-10")})}),Ci.jsxs("span",{className:Tu("flex w-full overflow-hidden py-2",b&&"drag-handle"),children:[Ms(v)&&Ci.jsx("span",{className:"inline-block ml-1 mr-2 px-1 rounded-[0.25rem] text-[0.5rem] bg-neutral-10",children:$dn(v)}),Ci.jsx("span",{title:decodeURI(p),className:Tu("inline-block whitespace-nowrap overflow-hidden overflow-ellipsis pr-2 font-black",Ms(C)&&"cursor-pointer hover:underline"),onClick:C,children:Vve(decodeURI(p),50,20)}),Ms(O)&&Ci.jsx("span",{className:"flex justify-between ml-2 mr-1 px-2 rounded-full bg-neutral-10",children:O})]})]}),f&&Ci.jsx(w4,{type:"source",id:Ec(th.Right,l),position:Ai.Right,isConnectable:!1,className:"-mr-2 border rounded-full overflow-hidden border-current",children:Ci.jsx(z1t,{className:"w-5 text-light dark:text-dark-lighter"})})]})}function hye(){return hye=Object.assign?Object.assign.bind():function(l){for(var r=1;r{let l="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(r=>r?parseInt(r,36):1);for(let r=0,o=0;r>1;if(l=vmt[f])r=f+1;else return!0;if(r==o)return!1}}function Fgt(l){return l>=127462&&l<=127487}const _gt=8205;function $tn(l,r,o=!0,f=!0){return(o?ymt:Ntn)(l,r,f)}function ymt(l,r,o){if(r==l.length)return r;r&&Omt(l.charCodeAt(r))&&kmt(l.charCodeAt(r-1))&&r--;let f=V2e(l,r);for(r+=Hgt(f);r=0&&Fgt(V2e(l,p));)b++,p-=2;if(b%2==0)break;r+=2}else break}return r}function Ntn(l,r,o){for(;r>0;){let f=ymt(l,r-2,o);if(f=56320&&l<57344}function kmt(l){return l>=55296&&l<56320}function Hgt(l){return l<65536?1:2}class Nr{lineAt(r){if(r<0||r>this.length)throw new RangeError(`Invalid position ${r} in document of length ${this.length}`);return this.lineInner(r,!1,1,0)}line(r){if(r<1||r>this.lines)throw new RangeError(`Invalid line number ${r} in ${this.lines}-line document`);return this.lineInner(r,!0,1,0)}replace(r,o,f){[r,o]=QT(this,r,o);let d=[];return this.decompose(0,r,d,2),f.length&&f.decompose(0,f.length,d,3),this.decompose(o,this.length,d,1),R2.from(d,this.length-(o-r)+f.length)}append(r){return this.replace(this.length,this.length,r)}slice(r,o=this.length){[r,o]=QT(this,r,o);let f=[];return this.decompose(r,o,f,0),R2.from(f,o-r)}eq(r){if(r==this)return!0;if(r.length!=this.length||r.lines!=this.lines)return!1;let o=this.scanIdentical(r,1),f=this.length-this.scanIdentical(r,-1),d=new iR(this),b=new iR(r);for(let p=o,v=o;;){if(d.next(p),b.next(p),p=0,d.lineBreak!=b.lineBreak||d.done!=b.done||d.value!=b.value)return!1;if(v+=d.value.length,d.done||v>=f)return!0}}iter(r=1){return new iR(this,r)}iterRange(r,o=this.length){return new Smt(this,r,o)}iterLines(r,o){let f;if(r==null)f=this.iter();else{o==null&&(o=this.lines+1);let d=this.line(r).from;f=this.iterRange(d,Math.max(d,o==this.lines+1?this.length:o<=1?0:this.line(o-1).to))}return new xmt(f)}toString(){return this.sliceString(0)}toJSON(){let r=[];return this.flatten(r),r}constructor(){}static of(r){if(r.length==0)throw new RangeError("A document must have at least one line");return r.length==1&&!r[0]?Nr.empty:r.length<=32?new Ju(r):R2.from(Ju.split(r,[]))}}class Ju extends Nr{constructor(r,o=Itn(r)){super(),this.text=r,this.length=o}get lines(){return this.text.length}get children(){return null}lineInner(r,o,f,d){for(let b=0;;b++){let p=this.text[b],v=d+p.length;if((o?f:v)>=r)return new Rtn(d,v,f,p);d=v+1,f++}}decompose(r,o,f,d){let b=r<=0&&o>=this.length?this:new Ju(qgt(this.text,r,o),Math.min(o,this.length)-Math.max(0,r));if(d&1){let p=f.pop(),v=BG(b.text,p.text.slice(),0,b.length);if(v.length<=32)f.push(new Ju(v,p.length+b.length));else{let O=v.length>>1;f.push(new Ju(v.slice(0,O)),new Ju(v.slice(O)))}}else f.push(b)}replace(r,o,f){if(!(f instanceof Ju))return super.replace(r,o,f);[r,o]=QT(this,r,o);let d=BG(this.text,BG(f.text,qgt(this.text,0,r)),o),b=this.length+f.length-(o-r);return d.length<=32?new Ju(d,b):R2.from(Ju.split(d,[]),b)}sliceString(r,o=this.length,f=` +`){[r,o]=QT(this,r,o);let d="";for(let b=0,p=0;b<=o&&pr&&p&&(d+=f),rb&&(d+=v.slice(Math.max(0,r-b),o-b)),b=O+1}return d}flatten(r){for(let o of this.text)r.push(o)}scanIdentical(){return 0}static split(r,o){let f=[],d=-1;for(let b of r)f.push(b),d+=b.length+1,f.length==32&&(o.push(new Ju(f,d)),f=[],d=-1);return d>-1&&o.push(new Ju(f,d)),o}}class R2 extends Nr{constructor(r,o){super(),this.children=r,this.length=o,this.lines=0;for(let f of r)this.lines+=f.lines}lineInner(r,o,f,d){for(let b=0;;b++){let p=this.children[b],v=d+p.length,O=f+p.lines-1;if((o?O:v)>=r)return p.lineInner(r,o,f,d);d=v+1,f=O+1}}decompose(r,o,f,d){for(let b=0,p=0;p<=o&&b=p){let C=d&((p<=r?1:0)|(O>=o?2:0));p>=r&&O<=o&&!C?f.push(v):v.decompose(r-p,o-p,f,C)}p=O+1}}replace(r,o,f){if([r,o]=QT(this,r,o),f.lines=b&&o<=v){let O=p.replace(r-b,o-b,f),C=this.lines-p.lines+O.lines;if(O.lines>4&&O.lines>C>>6){let T=this.children.slice();return T[d]=O,new R2(T,this.length-(o-r)+f.length)}return super.replace(b,v,O)}b=v+1}return super.replace(r,o,f)}sliceString(r,o=this.length,f=` +`){[r,o]=QT(this,r,o);let d="";for(let b=0,p=0;br&&b&&(d+=f),rp&&(d+=v.sliceString(r-p,o-p,f)),p=O+1}return d}flatten(r){for(let o of this.children)o.flatten(r)}scanIdentical(r,o){if(!(r instanceof R2))return 0;let f=0,[d,b,p,v]=o>0?[0,0,this.children.length,r.children.length]:[this.children.length-1,r.children.length-1,-1,-1];for(;;d+=o,b+=o){if(d==p||b==v)return f;let O=this.children[d],C=r.children[b];if(O!=C)return f+O.scanIdentical(C,o);f+=O.length+1}}static from(r,o=r.reduce((f,d)=>f+d.length+1,-1)){let f=0;for(let $ of r)f+=$.lines;if(f<32){let $=[];for(let L of r)L.flatten($);return new Ju($,o)}let d=Math.max(32,f>>5),b=d<<1,p=d>>1,v=[],O=0,C=-1,T=[];function A($){let L;if($.lines>b&&$ instanceof R2)for(let z of $.children)A(z);else $.lines>p&&(O>p||!O)?(j(),v.push($)):$ instanceof Ju&&O&&(L=T[T.length-1])instanceof Ju&&$.lines+L.lines<=32?(O+=$.lines,C+=$.length+1,T[T.length-1]=new Ju(L.text.concat($.text),L.length+1+$.length)):(O+$.lines>d&&j(),O+=$.lines,C+=$.length+1,T.push($))}function j(){O!=0&&(v.push(T.length==1?T[0]:R2.from(T,C)),C=-1,O=T.length=0)}for(let $ of r)A($);return j(),v.length==1?v[0]:new R2(v,o)}}Nr.empty=new Ju([""],0);function Itn(l){let r=-1;for(let o of l)r+=o.length+1;return r}function BG(l,r,o=0,f=1e9){for(let d=0,b=0,p=!0;b=o&&(O>f&&(v=v.slice(0,f-d)),d0?1:(r instanceof Ju?r.text.length:r.children.length)<<1]}nextInner(r,o){for(this.done=this.lineBreak=!1;;){let f=this.nodes.length-1,d=this.nodes[f],b=this.offsets[f],p=b>>1,v=d instanceof Ju?d.text.length:d.children.length;if(p==(o>0?v:0)){if(f==0)return this.done=!0,this.value="",this;o>0&&this.offsets[f-1]++,this.nodes.pop(),this.offsets.pop()}else if((b&1)==(o>0?0:1)){if(this.offsets[f]+=o,r==0)return this.lineBreak=!0,this.value=` +`,this;r--}else if(d instanceof Ju){let O=d.text[p+(o<0?-1:0)];if(this.offsets[f]+=o,O.length>Math.max(0,r))return this.value=r==0?O:o>0?O.slice(r):O.slice(0,O.length-r),this;r-=O.length}else{let O=d.children[p+(o<0?-1:0)];r>O.length?(r-=O.length,this.offsets[f]+=o):(o<0&&this.offsets[f]--,this.nodes.push(O),this.offsets.push(o>0?1:(O instanceof Ju?O.text.length:O.children.length)<<1))}}}next(r=0){return r<0&&(this.nextInner(-r,-this.dir),r=this.value.length),this.nextInner(r,this.dir)}}class Smt{constructor(r,o,f){this.value="",this.done=!1,this.cursor=new iR(r,o>f?-1:1),this.pos=o>f?r.length:0,this.from=Math.min(o,f),this.to=Math.max(o,f)}nextInner(r,o){if(o<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;r+=Math.max(0,o<0?this.pos-this.to:this.from-this.pos);let f=o<0?this.pos-this.from:this.to-this.pos;r>f&&(r=f),f-=r;let{value:d}=this.cursor.next(r);return this.pos+=(d.length+r)*o,this.value=d.length<=f?d:o<0?d.slice(d.length-f):d.slice(0,f),this.done=!this.value,this}next(r=0){return r<0?r=Math.max(r,this.from-this.pos):r>0&&(r=Math.min(r,this.to-this.pos)),this.nextInner(r,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class xmt{constructor(r){this.inner=r,this.afterBreak=!0,this.value="",this.done=!1}next(r=0){let{done:o,lineBreak:f,value:d}=this.inner.next(r);return o&&this.afterBreak?(this.value="",this.afterBreak=!1):o?(this.done=!0,this.value=""):f?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=d,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Nr.prototype[Symbol.iterator]=function(){return this.iter()},iR.prototype[Symbol.iterator]=Smt.prototype[Symbol.iterator]=xmt.prototype[Symbol.iterator]=function(){return this});class Rtn{constructor(r,o,f,d){this.from=r,this.to=o,this.number=f,this.text=d}get length(){return this.to-this.from}}function QT(l,r,o){return r=Math.max(0,Math.min(l.length,r)),[r,Math.max(r,Math.min(l.length,o))]}function eu(l,r,o=!0,f=!0){return $tn(l,r,o,f)}function Ltn(l){return l>=56320&&l<57344}function Btn(l){return l>=55296&&l<56320}function Dd(l,r){let o=l.charCodeAt(r);if(!Btn(o)||r+1==l.length)return o;let f=l.charCodeAt(r+1);return Ltn(f)?(o-55296<<10)+(f-56320)+65536:o}function sOe(l){return l<=65535?String.fromCharCode(l):(l-=65536,String.fromCharCode((l>>10)+55296,(l&1023)+56320))}function Nw(l){return l<65536?1:2}const dye=/\r\n?|\n/;var Jl=function(l){return l[l.Simple=0]="Simple",l[l.TrackDel=1]="TrackDel",l[l.TrackBefore=2]="TrackBefore",l[l.TrackAfter=3]="TrackAfter",l}(Jl||(Jl={}));class Q2{constructor(r){this.sections=r}get length(){let r=0;for(let o=0;or)return b+(r-d);b+=v}else{if(f!=Jl.Simple&&C>=r&&(f==Jl.TrackDel&&dr||f==Jl.TrackBefore&&dr))return null;if(C>r||C==r&&o<0&&!v)return r==d||o<0?b:b+O;b+=O}d=C}if(r>d)throw new RangeError(`Position ${r} is out of range for changeset of length ${d}`);return b}touchesRange(r,o=r){for(let f=0,d=0;f=0&&d<=o&&v>=r)return do?"cover":!0;d=v}return!1}toString(){let r="";for(let o=0;o=0?":"+d:"")}return r}toJSON(){return this.sections}static fromJSON(r){if(!Array.isArray(r)||r.length%2||r.some(o=>typeof o!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Q2(r)}static create(r){return new Q2(r)}}class ef extends Q2{constructor(r,o){super(r),this.inserted=o}apply(r){if(this.length!=r.length)throw new RangeError("Applying change set to a document with the wrong length");return gye(this,(o,f,d,b,p)=>r=r.replace(d,d+(f-o),p),!1),r}mapDesc(r,o=!1){return pye(this,r,o,!0)}invert(r){let o=this.sections.slice(),f=[];for(let d=0,b=0;d=0){o[d]=v,o[d+1]=p;let O=d>>1;for(;f.length0&&u4(f,o,b.text),b.forward(T),v+=T}let C=r[p++];for(;v>1].toJSON()))}return r}static of(r,o,f){let d=[],b=[],p=0,v=null;function O(T=!1){if(!T&&!d.length)return;pj||A<0||j>o)throw new RangeError(`Invalid change range ${A} to ${j} (in doc of length ${o})`);let L=$?typeof $=="string"?Nr.of($.split(f||dye)):$:Nr.empty,z=L.length;if(A==j&&z==0)return;Ap&&Fa(d,A-p,-1),Fa(d,j-A,z),u4(b,d,L),p=j}}return C(r),O(!v),v}static empty(r){return new ef(r?[r,-1]:[],[])}static fromJSON(r){if(!Array.isArray(r))throw new RangeError("Invalid JSON representation of ChangeSet");let o=[],f=[];for(let d=0;dv&&typeof p!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(b.length==1)o.push(b[0],0);else{for(;f.length=0&&o<=0&&o==l[d+1]?l[d]+=r:d>=0&&r==0&&l[d]==0?l[d+1]+=o:f?(l[d]+=r,l[d+1]+=o):l.push(r,o)}function u4(l,r,o){if(o.length==0)return;let f=r.length-2>>1;if(f>1])),!(o||p==l.sections.length||l.sections[p+1]<0);)v=l.sections[p++],O=l.sections[p++];r(d,C,b,T,A),d=C,b=T}}}function pye(l,r,o,f=!1){let d=[],b=f?[]:null,p=new vR(l),v=new vR(r);for(let O=-1;;){if(p.done&&v.len||v.done&&p.len)throw new Error("Mismatched change set lengths");if(p.ins==-1&&v.ins==-1){let C=Math.min(p.len,v.len);Fa(d,C,-1),p.forward(C),v.forward(C)}else if(v.ins>=0&&(p.ins<0||O==p.i||p.off==0&&(v.len=0&&O=0){let C=0,T=p.len;for(;T;)if(v.ins==-1){let A=Math.min(T,v.len);C+=A,T-=A,v.forward(A)}else if(v.ins==0&&v.lenO||p.ins>=0&&p.len>O)&&(v||f.length>C),b.forward2(O),p.forward(O)}}}}class vR{constructor(r){this.set=r,this.i=0,this.next()}next(){let{sections:r}=this.set;this.i>1;return o>=r.length?Nr.empty:r[o]}textBit(r){let{inserted:o}=this.set,f=this.i-2>>1;return f>=o.length&&!r?Nr.empty:o[f].slice(this.off,r==null?void 0:this.off+r)}forward(r){r==this.len?this.next():(this.len-=r,this.off+=r)}forward2(r){this.ins==-1?this.forward(r):r==this.ins?this.next():(this.ins-=r,this.off+=r)}}class Ax{constructor(r,o,f){this.from=r,this.to=o,this.flags=f}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let r=this.flags&7;return r==7?null:r}get goalColumn(){let r=this.flags>>6;return r==16777215?void 0:r}map(r,o=-1){let f,d;return this.empty?f=d=r.mapPos(this.from,o):(f=r.mapPos(this.from,1),d=r.mapPos(this.to,-1)),f==this.from&&d==this.to?this:new Ax(f,d,this.flags)}extend(r,o=r){if(r<=this.anchor&&o>=this.anchor)return St.range(r,o);let f=Math.abs(r-this.anchor)>Math.abs(o-this.anchor)?r:o;return St.range(this.anchor,f)}eq(r,o=!1){return this.anchor==r.anchor&&this.head==r.head&&(!o||!this.empty||this.assoc==r.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(r){if(!r||typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return St.range(r.anchor,r.head)}static create(r,o,f){return new Ax(r,o,f)}}class St{constructor(r,o){this.ranges=r,this.mainIndex=o}map(r,o=-1){return r.empty?this:St.create(this.ranges.map(f=>f.map(r,o)),this.mainIndex)}eq(r,o=!1){if(this.ranges.length!=r.ranges.length||this.mainIndex!=r.mainIndex)return!1;for(let f=0;fr.toJSON()),main:this.mainIndex}}static fromJSON(r){if(!r||!Array.isArray(r.ranges)||typeof r.main!="number"||r.main>=r.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new St(r.ranges.map(o=>Ax.fromJSON(o)),r.main)}static single(r,o=r){return new St([St.range(r,o)],0)}static create(r,o=0){if(r.length==0)throw new RangeError("A selection needs at least one range");for(let f=0,d=0;dr?8:0)|b)}static normalized(r,o=0){let f=r[o];r.sort((d,b)=>d.from-b.from),o=r.indexOf(f);for(let d=1;db.head?St.range(O,v):St.range(v,O))}}return new St(r,o)}}function Tmt(l,r){for(let o of l.ranges)if(o.to>r)throw new RangeError("Selection points outside of document")}let oOe=0;class pn{constructor(r,o,f,d,b){this.combine=r,this.compareInput=o,this.compare=f,this.isStatic=d,this.id=oOe++,this.default=r([]),this.extensions=typeof b=="function"?b(this):b}get reader(){return this}static define(r={}){return new pn(r.combine||(o=>o),r.compareInput||((o,f)=>o===f),r.compare||(r.combine?(o,f)=>o===f:cOe),!!r.static,r.enables)}of(r){return new FG([],this,0,r)}compute(r,o){if(this.isStatic)throw new Error("Can't compute a static facet");return new FG(r,this,1,o)}computeN(r,o){if(this.isStatic)throw new Error("Can't compute a static facet");return new FG(r,this,2,o)}from(r,o){return o||(o=f=>f),this.compute([r],f=>o(f.field(r)))}}function cOe(l,r){return l==r||l.length==r.length&&l.every((o,f)=>o===r[f])}class FG{constructor(r,o,f,d){this.dependencies=r,this.facet=o,this.type=f,this.value=d,this.id=oOe++}dynamicSlot(r){var o;let f=this.value,d=this.facet.compareInput,b=this.id,p=r[b]>>1,v=this.type==2,O=!1,C=!1,T=[];for(let A of this.dependencies)A=="doc"?O=!0:A=="selection"?C=!0:(((o=r[A.id])!==null&&o!==void 0?o:1)&1)==0&&T.push(r[A.id]);return{create(A){return A.values[p]=f(A),1},update(A,j){if(O&&j.docChanged||C&&(j.docChanged||j.selection)||bye(A,T)){let $=f(A);if(v?!Qgt($,A.values[p],d):!d($,A.values[p]))return A.values[p]=$,1}return 0},reconfigure:(A,j)=>{let $,L=j.config.address[b];if(L!=null){let z=gY(j,L);if(this.dependencies.every(Z=>Z instanceof pn?j.facet(Z)===A.facet(Z):Z instanceof Sf?j.field(Z,!1)==A.field(Z,!1):!0)||(v?Qgt($=f(A),z,d):d($=f(A),z)))return A.values[p]=z,0}else $=f(A);return A.values[p]=$,1}}}}function Qgt(l,r,o){if(l.length!=r.length)return!1;for(let f=0;fl[O.id]),d=o.map(O=>O.type),b=f.filter(O=>!(O&1)),p=l[r.id]>>1;function v(O){let C=[];for(let T=0;Tf===d),r);return r.provide&&(o.provides=r.provide(o)),o}create(r){let o=r.facet(ZU).find(f=>f.field==this);return((o==null?void 0:o.create)||this.createF)(r)}slot(r){let o=r[this.id]>>1;return{create:f=>(f.values[o]=this.create(f),1),update:(f,d)=>{let b=f.values[o],p=this.updateF(b,d);return this.compareF(b,p)?0:(f.values[o]=p,1)},reconfigure:(f,d)=>{let b=f.facet(ZU),p=d.facet(ZU),v;return(v=b.find(O=>O.field==this))&&v!=p.find(O=>O.field==this)?(f.values[o]=v.create(f),1):d.config.address[this.id]!=null?(f.values[o]=d.field(this),0):(f.values[o]=this.create(f),1)}}}init(r){return[this,ZU.of({field:this,create:r})]}get extension(){return this}}const xx={lowest:4,low:3,default:2,high:1,highest:0};function II(l){return r=>new Emt(r,l)}const qw={highest:II(xx.highest),high:II(xx.high),default:II(xx.default),low:II(xx.low),lowest:II(xx.lowest)};class Emt{constructor(r,o){this.inner=r,this.prec=o}}class JY{of(r){return new wye(this,r)}reconfigure(r){return JY.reconfigure.of({compartment:this,extension:r})}get(r){return r.config.compartments.get(this)}}class wye{constructor(r,o){this.compartment=r,this.inner=o}}class dY{constructor(r,o,f,d,b,p){for(this.base=r,this.compartments=o,this.dynamicSlots=f,this.address=d,this.staticValues=b,this.facets=p,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(r,o,f){let d=[],b=Object.create(null),p=new Map;for(let j of _tn(r,o,p))j instanceof Sf?d.push(j):(b[j.facet.id]||(b[j.facet.id]=[])).push(j);let v=Object.create(null),O=[],C=[];for(let j of d)v[j.id]=C.length<<1,C.push($=>j.slot($));let T=f==null?void 0:f.config.facets;for(let j in b){let $=b[j],L=$[0].facet,z=T&&T[j]||[];if($.every(Z=>Z.type==0))if(v[L.id]=O.length<<1|1,cOe(z,$))O.push(f.facet(L));else{let Z=L.combine($.map(Y=>Y.value));O.push(f&&L.compare(Z,f.facet(L))?f.facet(L):Z)}else{for(let Z of $)Z.type==0?(v[Z.id]=O.length<<1|1,O.push(Z.value)):(v[Z.id]=C.length<<1,C.push(Y=>Z.dynamicSlot(Y)));v[L.id]=C.length<<1,C.push(Z=>Ftn(Z,L,$))}}let A=C.map(j=>j(v));return new dY(r,p,A,v,O,b)}}function _tn(l,r,o){let f=[[],[],[],[],[]],d=new Map;function b(p,v){let O=d.get(p);if(O!=null){if(O<=v)return;let C=f[O].indexOf(p);C>-1&&f[O].splice(C,1),p instanceof wye&&o.delete(p.compartment)}if(d.set(p,v),Array.isArray(p))for(let C of p)b(C,v);else if(p instanceof wye){if(o.has(p.compartment))throw new RangeError("Duplicate use of compartment in extensions");let C=r.get(p.compartment)||p.inner;o.set(p.compartment,C),b(C,v)}else if(p instanceof Emt)b(p.inner,p.prec);else if(p instanceof Sf)f[v].push(p),p.provides&&b(p.provides,v);else if(p instanceof FG)f[v].push(p),p.facet.extensions&&b(p.facet.extensions,xx.default);else{let C=p.extension;if(!C)throw new Error(`Unrecognized extension value in extension set (${p}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);b(C,v)}}return b(l,xx.default),f.reduce((p,v)=>p.concat(v))}function rR(l,r){if(r&1)return 2;let o=r>>1,f=l.status[o];if(f==4)throw new Error("Cyclic dependency between fields and/or facets");if(f&2)return f;l.status[o]=4;let d=l.computeSlot(l,l.config.dynamicSlots[o]);return l.status[o]=2|d}function gY(l,r){return r&1?l.config.staticValues[r>>1]:l.values[r>>1]}const Amt=pn.define(),mye=pn.define({combine:l=>l.some(r=>r),static:!0}),Mmt=pn.define({combine:l=>l.length?l[0]:void 0,static:!0}),Pmt=pn.define(),jmt=pn.define(),Dmt=pn.define(),$mt=pn.define({combine:l=>l.length?l[0]:!1});class Qw{constructor(r,o){this.type=r,this.value=o}static define(){return new Htn}}class Htn{of(r){return new Qw(this,r)}}class qtn{constructor(r){this.map=r}of(r){return new ar(this,r)}}class ar{constructor(r,o){this.type=r,this.value=o}map(r){let o=this.type.map(this.value,r);return o===void 0?void 0:o==this.value?this:new ar(this.type,o)}is(r){return this.type==r}static define(r={}){return new qtn(r.map||(o=>o))}static mapEffects(r,o){if(!r.length)return r;let f=[];for(let d of r){let b=d.map(o);b&&f.push(b)}return f}}ar.reconfigure=ar.define();ar.appendConfig=ar.define();class tf{constructor(r,o,f,d,b,p){this.startState=r,this.changes=o,this.selection=f,this.effects=d,this.annotations=b,this.scrollIntoView=p,this._doc=null,this._state=null,f&&Tmt(f,o.newLength),b.some(v=>v.type==tf.time)||(this.annotations=b.concat(tf.time.of(Date.now())))}static create(r,o,f,d,b,p){return new tf(r,o,f,d,b,p)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(r){for(let o of this.annotations)if(o.type==r)return o.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(r){let o=this.annotation(tf.userEvent);return!!(o&&(o==r||o.length>r.length&&o.slice(0,r.length)==r&&o[r.length]=="."))}}tf.time=Qw.define();tf.userEvent=Qw.define();tf.addToHistory=Qw.define();tf.remote=Qw.define();function Qtn(l,r){let o=[];for(let f=0,d=0;;){let b,p;if(f=l[f]))b=l[f++],p=l[f++];else if(d=0;d--){let b=f[d](l);b instanceof tf?l=b:Array.isArray(b)&&b.length==1&&b[0]instanceof tf?l=b[0]:l=Imt(r,DT(b),!1)}return l}function Wtn(l){let r=l.startState,o=r.facet(Dmt),f=l;for(let d=o.length-1;d>=0;d--){let b=o[d](l);b&&Object.keys(b).length&&(f=Nmt(f,vye(r,b,l.changes.newLength),!0))}return f==l?l:tf.create(r,l.changes,l.selection,f.effects,f.annotations,f.scrollIntoView)}const Ktn=[];function DT(l){return l==null?Ktn:Array.isArray(l)?l:[l]}var hl=function(l){return l[l.Word=0]="Word",l[l.Space=1]="Space",l[l.Other=2]="Other",l}(hl||(hl={}));const Vtn=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let yye;try{yye=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Xtn(l){if(yye)return yye.test(l);for(let r=0;r"€"&&(o.toUpperCase()!=o.toLowerCase()||Vtn.test(o)))return!0}return!1}function Utn(l){return r=>{if(!/\S/.test(r))return hl.Space;if(Xtn(r))return hl.Word;for(let o=0;o-1)return hl.Word;return hl.Other}}class Zr{constructor(r,o,f,d,b,p){this.config=r,this.doc=o,this.selection=f,this.values=d,this.status=r.statusTemplate.slice(),this.computeSlot=b,p&&(p._state=this);for(let v=0;vd.set(C,O)),o=null),d.set(v.value.compartment,v.value.extension)):v.is(ar.reconfigure)?(o=null,f=v.value):v.is(ar.appendConfig)&&(o=null,f=DT(f).concat(v.value));let b;o?b=r.startState.values.slice():(o=dY.resolve(f,d,this),b=new Zr(o,this.doc,this.selection,o.dynamicSlots.map(()=>null),(O,C)=>C.reconfigure(O,this),null).values);let p=r.startState.facet(mye)?r.newSelection:r.newSelection.asSingle();new Zr(o,r.newDoc,p,b,(v,O)=>O.update(v,r),r)}replaceSelection(r){return typeof r=="string"&&(r=this.toText(r)),this.changeByRange(o=>({changes:{from:o.from,to:o.to,insert:r},range:St.cursor(o.from+r.length)}))}changeByRange(r){let o=this.selection,f=r(o.ranges[0]),d=this.changes(f.changes),b=[f.range],p=DT(f.effects);for(let v=1;vp.spec.fromJSON(v,O)))}}return Zr.create({doc:r.doc,selection:St.fromJSON(r.selection),extensions:o.extensions?d.concat([o.extensions]):d})}static create(r={}){let o=dY.resolve(r.extensions||[],new Map),f=r.doc instanceof Nr?r.doc:Nr.of((r.doc||"").split(o.staticFacet(Zr.lineSeparator)||dye)),d=r.selection?r.selection instanceof St?r.selection:St.single(r.selection.anchor,r.selection.head):St.single(0);return Tmt(d,f.length),o.staticFacet(mye)||(d=d.asSingle()),new Zr(o,f,d,o.dynamicSlots.map(()=>null),(b,p)=>p.create(b),null)}get tabSize(){return this.facet(Zr.tabSize)}get lineBreak(){return this.facet(Zr.lineSeparator)||` +`}get readOnly(){return this.facet($mt)}phrase(r,...o){for(let f of this.facet(Zr.phrases))if(Object.prototype.hasOwnProperty.call(f,r)){r=f[r];break}return o.length&&(r=r.replace(/\$(\$|\d*)/g,(f,d)=>{if(d=="$")return"$";let b=+(d||1);return!b||b>o.length?f:o[b-1]})),r}languageDataAt(r,o,f=-1){let d=[];for(let b of this.facet(Amt))for(let p of b(this,o,f))Object.prototype.hasOwnProperty.call(p,r)&&d.push(p[r]);return d}charCategorizer(r){return Utn(this.languageDataAt("wordChars",r).join(""))}wordAt(r){let{text:o,from:f,length:d}=this.doc.lineAt(r),b=this.charCategorizer(r),p=r-f,v=r-f;for(;p>0;){let O=eu(o,p,!1);if(b(o.slice(O,p))!=hl.Word)break;p=O}for(;vl.length?l[0]:4});Zr.lineSeparator=Mmt;Zr.readOnly=$mt;Zr.phrases=pn.define({compare(l,r){let o=Object.keys(l),f=Object.keys(r);return o.length==f.length&&o.every(d=>l[d]==r[d])}});Zr.languageData=Amt;Zr.changeFilter=Pmt;Zr.transactionFilter=jmt;Zr.transactionExtender=Dmt;JY.reconfigure=ar.define();function U2(l,r,o={}){let f={};for(let d of l)for(let b of Object.keys(d)){let p=d[b],v=f[b];if(v===void 0)f[b]=p;else if(!(v===p||p===void 0))if(Object.hasOwnProperty.call(o,b))f[b]=o[b](v,p);else throw new Error("Config merge conflict for field "+b)}for(let d in r)f[d]===void 0&&(f[d]=r[d]);return f}class Gy{eq(r){return this==r}range(r,o=r){return Oye.create(r,o,this)}}Gy.prototype.startSide=Gy.prototype.endSide=0;Gy.prototype.point=!1;Gy.prototype.mapMode=Jl.TrackDel;let Oye=class Rmt{constructor(r,o,f){this.from=r,this.to=o,this.value=f}static create(r,o,f){return new Rmt(r,o,f)}};function kye(l,r){return l.from-r.from||l.value.startSide-r.value.startSide}class lOe{constructor(r,o,f,d){this.from=r,this.to=o,this.value=f,this.maxPoint=d}get length(){return this.to[this.to.length-1]}findIndex(r,o,f,d=0){let b=f?this.to:this.from;for(let p=d,v=b.length;;){if(p==v)return p;let O=p+v>>1,C=b[O]-r||(f?this.value[O].endSide:this.value[O].startSide)-o;if(O==p)return C>=0?p:v;C>=0?v=O:p=O+1}}between(r,o,f,d){for(let b=this.findIndex(o,-1e9,!0),p=this.findIndex(f,1e9,!1,b);b$||j==$&&C.startSide>0&&C.endSide<=0)continue;($-j||C.endSide-C.startSide)<0||(p<0&&(p=j),C.point&&(v=Math.max(v,$-j)),f.push(C),d.push(j-p),b.push($-p))}return{mapped:f.length?new lOe(d,b,f,v):null,pos:p}}}class Jr{constructor(r,o,f,d){this.chunkPos=r,this.chunk=o,this.nextLayer=f,this.maxPoint=d}static create(r,o,f,d){return new Jr(r,o,f,d)}get length(){let r=this.chunk.length-1;return r<0?0:Math.max(this.chunkEnd(r),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let r=this.nextLayer.size;for(let o of this.chunk)r+=o.value.length;return r}chunkEnd(r){return this.chunkPos[r]+this.chunk[r].length}update(r){let{add:o=[],sort:f=!1,filterFrom:d=0,filterTo:b=this.length}=r,p=r.filter;if(o.length==0&&!p)return this;if(f&&(o=o.slice().sort(kye)),this.isEmpty)return o.length?Jr.of(o):this;let v=new Lmt(this,null,-1).goto(0),O=0,C=[],T=new W2;for(;v.value||O=0){let A=o[O++];T.addInner(A.from,A.to,A.value)||C.push(A)}else v.rangeIndex==1&&v.chunkIndexthis.chunkEnd(v.chunkIndex)||bv.to||b=b&&r<=b+p.length&&p.between(b,r-b,o-b,f)===!1)return}this.nextLayer.between(r,o,f)}}iter(r=0){return yR.from([this]).goto(r)}get isEmpty(){return this.nextLayer==this}static iter(r,o=0){return yR.from(r).goto(o)}static compare(r,o,f,d,b=-1){let p=r.filter(A=>A.maxPoint>0||!A.isEmpty&&A.maxPoint>=b),v=o.filter(A=>A.maxPoint>0||!A.isEmpty&&A.maxPoint>=b),O=zgt(p,v,f),C=new RI(p,O,b),T=new RI(v,O,b);f.iterGaps((A,j,$)=>Wgt(C,A,T,j,$,d)),f.empty&&f.length==0&&Wgt(C,0,T,0,0,d)}static eq(r,o,f=0,d){d==null&&(d=999999999);let b=r.filter(T=>!T.isEmpty&&o.indexOf(T)<0),p=o.filter(T=>!T.isEmpty&&r.indexOf(T)<0);if(b.length!=p.length)return!1;if(!b.length)return!0;let v=zgt(b,p),O=new RI(b,v,0).goto(f),C=new RI(p,v,0).goto(f);for(;;){if(O.to!=C.to||!Sye(O.active,C.active)||O.point&&(!C.point||!O.point.eq(C.point)))return!1;if(O.to>d)return!0;O.next(),C.next()}}static spans(r,o,f,d,b=-1){let p=new RI(r,null,b).goto(o),v=o,O=p.openStart;for(;;){let C=Math.min(p.to,f);if(p.point){let T=p.activeForPoint(p.to),A=p.pointFromv&&(d.span(v,C,p.active,O),O=p.openEnd(C));if(p.to>f)return O+(p.point&&p.to>f?1:0);v=p.to,p.next()}}static of(r,o=!1){let f=new W2;for(let d of r instanceof Oye?[r]:o?Gtn(r):r)f.add(d.from,d.to,d.value);return f.finish()}static join(r){if(!r.length)return Jr.empty;let o=r[r.length-1];for(let f=r.length-2;f>=0;f--)for(let d=r[f];d!=Jr.empty;d=d.nextLayer)o=new Jr(d.chunkPos,d.chunk,o,Math.max(d.maxPoint,o.maxPoint));return o}}Jr.empty=new Jr([],[],null,-1);function Gtn(l){if(l.length>1)for(let r=l[0],o=1;o0)return l.slice().sort(kye);r=f}return l}Jr.empty.nextLayer=Jr.empty;class W2{finishChunk(r){this.chunks.push(new lOe(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,r&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(r,o,f){this.addInner(r,o,f)||(this.nextLayer||(this.nextLayer=new W2)).add(r,o,f)}addInner(r,o,f){let d=r-this.lastTo||f.startSide-this.last.endSide;if(d<=0&&(r-this.lastFrom||f.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return d<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=r),this.from.push(r-this.chunkStart),this.to.push(o-this.chunkStart),this.last=f,this.lastFrom=r,this.lastTo=o,this.value.push(f),f.point&&(this.maxPoint=Math.max(this.maxPoint,o-r)),!0)}addChunk(r,o){if((r-this.lastTo||o.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,o.maxPoint),this.chunks.push(o),this.chunkPos.push(r);let f=o.value.length-1;return this.last=o.value[f],this.lastFrom=o.from[f]+r,this.lastTo=o.to[f]+r,!0}finish(){return this.finishInner(Jr.empty)}finishInner(r){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return r;let o=Jr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(r):r,this.setMaxPoint);return this.from=null,o}}function zgt(l,r,o){let f=new Map;for(let b of l)for(let p=0;p=this.minPoint)break}}setRangeIndex(r){if(r==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=f&&d.push(new Lmt(p,o,f,b));return d.length==1?d[0]:new yR(d)}get startSide(){return this.value?this.value.startSide:0}goto(r,o=-1e9){for(let f of this.heap)f.goto(r,o);for(let f=this.heap.length>>1;f>=0;f--)X2e(this.heap,f);return this.next(),this}forward(r,o){for(let f of this.heap)f.forward(r,o);for(let f=this.heap.length>>1;f>=0;f--)X2e(this.heap,f);(this.to-r||this.value.endSide-o)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let r=this.heap[0];this.from=r.from,this.to=r.to,this.value=r.value,this.rank=r.rank,r.value&&r.next(),X2e(this.heap,0)}}}function X2e(l,r){for(let o=l[r];;){let f=(r<<1)+1;if(f>=l.length)break;let d=l[f];if(f+1=0&&(d=l[f+1],f++),o.compare(d)<0)break;l[f]=o,l[r]=d,r=f}}class RI{constructor(r,o,f){this.minPoint=f,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=yR.from(r,o,f)}goto(r,o=-1e9){return this.cursor.goto(r,o),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=r,this.endSide=o,this.openStart=-1,this.next(),this}forward(r,o){for(;this.minActive>-1&&(this.activeTo[this.minActive]-r||this.active[this.minActive].endSide-o)<0;)this.removeActive(this.minActive);this.cursor.forward(r,o)}removeActive(r){JU(this.active,r),JU(this.activeTo,r),JU(this.activeRank,r),this.minActive=Kgt(this.active,this.activeTo)}addActive(r){let o=0,{value:f,to:d,rank:b}=this.cursor;for(;o0;)o++;eG(this.active,o,f),eG(this.activeTo,o,d),eG(this.activeRank,o,b),r&&eG(r,o,this.cursor.from),this.minActive=Kgt(this.active,this.activeTo)}next(){let r=this.to,o=this.point;this.point=null;let f=this.openStart<0?[]:null;for(;;){let d=this.minActive;if(d>-1&&(this.activeTo[d]-this.cursor.from||this.active[d].endSide-this.cursor.startSide)<0){if(this.activeTo[d]>r){this.to=this.activeTo[d],this.endSide=this.active[d].endSide;break}this.removeActive(d),f&&JU(f,d)}else if(this.cursor.value)if(this.cursor.from>r){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let b=this.cursor.value;if(!b.point)this.addActive(f),this.cursor.next();else if(o&&this.cursor.to==this.to&&this.cursor.from=0&&f[d]=0&&!(this.activeRank[f]r||this.activeTo[f]==r&&this.active[f].endSide>=this.point.endSide)&&o.push(this.active[f]);return o.reverse()}openEnd(r){let o=0;for(let f=this.activeTo.length-1;f>=0&&this.activeTo[f]>r;f--)o++;return o}}function Wgt(l,r,o,f,d,b){l.goto(r),o.goto(f);let p=f+d,v=f,O=f-r;for(;;){let C=l.to+O-o.to,T=C||l.endSide-o.endSide,A=T<0?l.to+O:o.to,j=Math.min(A,p);if(l.point||o.point?l.point&&o.point&&(l.point==o.point||l.point.eq(o.point))&&Sye(l.activeForPoint(l.to),o.activeForPoint(o.to))||b.comparePoint(v,j,l.point,o.point):j>v&&!Sye(l.active,o.active)&&b.compareRange(v,j,l.active,o.active),A>p)break;(C||l.openEnd!=o.openEnd)&&b.boundChange&&b.boundChange(A),v=A,T<=0&&l.next(),T>=0&&o.next()}}function Sye(l,r){if(l.length!=r.length)return!1;for(let o=0;o=r;f--)l[f+1]=l[f];l[r]=o}function Kgt(l,r){let o=-1,f=1e9;for(let d=0;d=r)return d;if(d==l.length)break;b+=l.charCodeAt(d)==9?o-b%o:1,d=eu(l,d)}return f===!0?-1:l.length}const xye="ͼ",Vgt=typeof Symbol>"u"?"__"+xye:Symbol.for(xye),Cye=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Xgt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class qa{constructor(r,o){this.rules=[];let{finish:f}=o||{};function d(p){return/^@/.test(p)?[p]:p.split(/,\s*/)}function b(p,v,O,C){let T=[],A=/^@(\w+)\b/.exec(p[0]),j=A&&A[1]=="keyframes";if(A&&v==null)return O.push(p[0]+";");for(let $ in v){let L=v[$];if(/&/.test($))b($.split(/,\s*/).map(z=>p.map(Z=>z.replace(/&/,Z))).reduce((z,Z)=>z.concat(Z)),L,O);else if(L&&typeof L=="object"){if(!A)throw new RangeError("The value of a property ("+$+") should be a primitive value.");b(d($),L,T,j)}else L!=null&&T.push($.replace(/_.*/,"").replace(/[A-Z]/g,z=>"-"+z.toLowerCase())+": "+L+";")}(T.length||j)&&O.push((f&&!A&&!C?p.map(f):p).join(", ")+" {"+T.join(" ")+"}")}for(let p in r)b(d(p),r[p],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let r=Xgt[Vgt]||1;return Xgt[Vgt]=r+1,xye+r.toString(36)}static mount(r,o,f){let d=r[Cye],b=f&&f.nonce;d?b&&d.setNonce(b):d=new Ytn(r,b),d.mount(Array.isArray(o)?o:[o],r)}}let Ugt=new Map;class Ytn{constructor(r,o){let f=r.ownerDocument||r,d=f.defaultView;if(!r.head&&r.adoptedStyleSheets&&d.CSSStyleSheet){let b=Ugt.get(f);if(b)return r[Cye]=b;this.sheet=new d.CSSStyleSheet,Ugt.set(f,this)}else this.styleTag=f.createElement("style"),o&&this.styleTag.setAttribute("nonce",o);this.modules=[],r[Cye]=this}mount(r,o){let f=this.sheet,d=0,b=0;for(let p=0;p-1&&(this.modules.splice(O,1),b--,O=-1),O==-1){if(this.modules.splice(b++,0,v),f)for(let C=0;C",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ztn=typeof navigator<"u"&&/Mac/.test(navigator.platform),Jtn=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var la=0;la<10;la++)Yy[48+la]=Yy[96+la]=String(la);for(var la=1;la<=24;la++)Yy[la+111]="F"+la;for(var la=65;la<=90;la++)Yy[la]=String.fromCharCode(la+32),zT[la]=String.fromCharCode(la);for(var U2e in Yy)zT.hasOwnProperty(U2e)||(zT[U2e]=Yy[U2e]);function Bmt(l){var r=Ztn&&l.metaKey&&l.shiftKey&&!l.ctrlKey&&!l.altKey||Jtn&&l.shiftKey&&l.key&&l.key.length==1||l.key=="Unidentified",o=!r&&l.key||(l.shiftKey?zT:Yy)[l.keyCode]||l.key||"Unidentified";return o=="Esc"&&(o="Escape"),o=="Del"&&(o="Delete"),o=="Left"&&(o="ArrowLeft"),o=="Up"&&(o="ArrowUp"),o=="Right"&&(o="ArrowRight"),o=="Down"&&(o="ArrowDown"),o}function Lc(){var l=arguments[0];typeof l=="string"&&(l=document.createElement(l));var r=1,o=arguments[1];if(o&&typeof o=="object"&&o.nodeType==null&&!Array.isArray(o)){for(var f in o)if(Object.prototype.hasOwnProperty.call(o,f)){var d=o[f];typeof d=="string"?l.setAttribute(f,d):d!=null&&(l[f]=d)}r++}for(;r.995&&o<1.005||!isFinite(o)||Math.abs(r.width-l.offsetWidth)<1)&&(o=1),(f>.995&&f<1.005||!isFinite(f)||Math.abs(r.height-l.offsetHeight)<1)&&(f=1),{scaleX:o,scaleY:f}}function tnn(l,r,o,f,d,b,p,v){let O=l.ownerDocument,C=O.defaultView||window;for(let T=l,A=!1;T&&!A;)if(T.nodeType==1){let j,$=T==O.body,L=1,z=1;if($)j=enn(C);else{if(/^(fixed|sticky)$/.test(getComputedStyle(T).position)&&(A=!0),T.scrollHeight<=T.clientHeight&&T.scrollWidth<=T.clientWidth){T=T.assignedSlot||T.parentNode;continue}let ne=T.getBoundingClientRect();({scaleX:L,scaleY:z}=_mt(T,ne)),j={left:ne.left,right:ne.left+T.clientWidth*L,top:ne.top,bottom:ne.top+T.clientHeight*z}}let Z=0,Y=0;if(d=="nearest")r.top0&&r.bottom>j.bottom+Y&&(Y=r.bottom-j.bottom+p)):r.bottom>j.bottom&&(Y=r.bottom-j.bottom+p,o<0&&r.top-Y0&&r.right>j.right+Z&&(Z=r.right-j.right+b)):r.right>j.right&&(Z=r.right-j.right+b,o<0&&r.leftj.bottom||r.leftj.right)&&(r={left:Math.max(r.left,j.left),right:Math.min(r.right,j.right),top:Math.max(r.top,j.top),bottom:Math.min(r.bottom,j.bottom)}),T=T.assignedSlot||T.parentNode}else if(T.nodeType==11)T=T.host;else break}function nnn(l){let r=l.ownerDocument,o,f;for(let d=l.parentNode;d&&!(d==r.body||o&&f);)if(d.nodeType==1)!f&&d.scrollHeight>d.clientHeight&&(f=d),!o&&d.scrollWidth>d.clientWidth&&(o=d),d=d.assignedSlot||d.parentNode;else if(d.nodeType==11)d=d.host;else break;return{x:o,y:f}}let inn=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(r){return this.anchorNode==r.anchorNode&&this.anchorOffset==r.anchorOffset&&this.focusNode==r.focusNode&&this.focusOffset==r.focusOffset}setRange(r){let{anchorNode:o,focusNode:f}=r;this.set(o,Math.min(r.anchorOffset,o?K2(o):0),f,Math.min(r.focusOffset,f?K2(f):0))}set(r,o,f,d){this.anchorNode=r,this.anchorOffset=o,this.focusNode=f,this.focusOffset=d}},mT=null;function Hmt(l){if(l.setActive)return l.setActive();if(mT)return l.focus(mT);let r=[];for(let o=l;o&&(r.push(o,o.scrollTop,o.scrollLeft),o!=o.ownerDocument);o=o.parentNode);if(l.focus(mT==null?{get preventScroll(){return mT={preventScroll:!0},!0}}:void 0),!mT){mT=!1;for(let o=0;oMath.max(1,l.scrollHeight-l.clientHeight-4)}function zmt(l,r){for(let o=l,f=r;;){if(o.nodeType==3&&f>0)return{node:o,offset:f};if(o.nodeType==1&&f>0){if(o.contentEditable=="false")return null;o=o.childNodes[f-1],f=K2(o)}else if(o.parentNode&&!bY(o))f=Ix(o),o=o.parentNode;else return null}}function Wmt(l,r){for(let o=l,f=r;;){if(o.nodeType==3&&fo)return A.domBoundsAround(r,o,C);if(j>=r&&d==-1&&(d=O,b=C),C>o&&A.dom.parentNode==this.dom){p=O,v=T;break}T=j,C=j+A.breakAfter}return{from:b,to:v<0?f+this.length:v,startDOM:(d?this.children[d-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:p=0?this.children[p].dom:null}}markDirty(r=!1){this.flags|=2,this.markParentsDirty(r)}markParentsDirty(r){for(let o=this.parent;o;o=o.parent){if(r&&(o.flags|=2),o.flags&1)return;o.flags|=1,r=!1}}setParent(r){this.parent!=r&&(this.parent=r,this.flags&7&&this.markParentsDirty(!0))}setDOM(r){this.dom!=r&&(this.dom&&(this.dom.cmView=null),this.dom=r,r.cmView=this)}get rootView(){for(let r=this;;){let o=r.parent;if(!o)return r;r=o}}replaceChildren(r,o,f=uOe){this.markDirty();for(let d=r;dthis.pos||r==this.pos&&(o>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=r-this.pos,this;let f=this.children[--this.i];this.pos-=f.length+f.breakAfter}}};function Vmt(l,r,o,f,d,b,p,v,O){let{children:C}=l,T=C.length?C[r]:null,A=b.length?b[b.length-1]:null,j=A?A.breakAfter:p;if(!(r==f&&T&&!p&&!j&&b.length<2&&T.merge(o,d,b.length?A:null,o==0,v,O))){if(f0&&(!p&&b.length&&T.merge(o,T.length,b[0],!1,v,0)?T.breakAfter=b.shift().breakAfter:(o2);var si={mac:e0t||/Mac/.test(q1.platform),windows:/Win/.test(q1.platform),linux:/Linux|X11/.test(q1.platform),ie:eZ,ie_version:Umt?Mye.documentMode||6:jye?+jye[1]:Pye?+Pye[1]:0,gecko:Jgt,gecko_version:Jgt?+(/Firefox\/(\d+)/.exec(q1.userAgent)||[0,0])[1]:0,chrome:!!G2e,chrome_version:G2e?+G2e[1]:0,ios:e0t,android:/Android\b/.test(q1.userAgent),safari:Gmt,webkit_version:onn?+(/\bAppleWebKit\/(\d+)/.exec(q1.userAgent)||[0,0])[1]:0,tabSize:Mye.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const cnn=256;let m4=class Dye extends $l{constructor(r){super(),this.text=r}get length(){return this.text.length}createDOM(r){this.setDOM(r||document.createTextNode(this.text))}sync(r,o){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(o&&o.node==this.dom&&(o.written=!0),this.dom.nodeValue=this.text)}reuseDOM(r){r.nodeType==3&&this.createDOM(r)}merge(r,o,f){return this.flags&8||f&&(!(f instanceof Dye)||this.length-(o-r)+f.length>cnn||f.flags&8)?!1:(this.text=this.text.slice(0,r)+(f?f.text:"")+this.text.slice(o),this.markDirty(),!0)}split(r){let o=new Dye(this.text.slice(r));return this.text=this.text.slice(0,r),this.markDirty(),o.flags|=this.flags&8,o}localPosFromDOM(r,o){return r==this.dom?o:o?this.text.length:0}domAtPos(r){return new c0(this.dom,r)}domBoundsAround(r,o,f){return{from:f,to:f+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(r,o){return lnn(this.dom,r,o)}},KT=class $ye extends $l{constructor(r,o=[],f=0){super(),this.mark=r,this.children=o,this.length=f;for(let d of o)d.setParent(this)}setAttrs(r){if(qmt(r),this.mark.class&&(r.className=this.mark.class),this.mark.attrs)for(let o in this.mark.attrs)r.setAttribute(o,this.mark.attrs[o]);return r}canReuseDOM(r){return super.canReuseDOM(r)&&!((this.flags|r.flags)&8)}reuseDOM(r){r.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(r),this.flags|=6)}sync(r,o){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(r,o)}merge(r,o,f,d,b,p){return f&&(!(f instanceof $ye&&f.mark.eq(this.mark))||r&&b<=0||or&&o.push(f=r&&(d=b),f=O,b++}let p=this.length-r;return this.length=r,d>-1&&(this.children.length=d,this.markDirty()),new $ye(this.mark,o,p)}domAtPos(r){return Ymt(this,r)}coordsAt(r,o){return Jmt(this,r,o)}};function lnn(l,r,o){let f=l.nodeValue.length;r>f&&(r=f);let d=r,b=r,p=0;r==0&&o<0||r==f&&o>=0?si.chrome||si.gecko||(r?(d--,p=1):b=0)?0:v.length-1];return si.safari&&!p&&O.width==0&&(O=Array.prototype.find.call(v,C=>C.width)||O),p?WR(O,p<0):O||null}let fOe=class KI extends $l{static create(r,o,f){return new KI(r,o,f)}constructor(r,o,f){super(),this.widget=r,this.length=o,this.side=f,this.prevWidget=null}split(r){let o=KI.create(this.widget,this.length-r,this.side);return this.length-=r,o}sync(r){(!this.dom||!this.widget.updateDOM(this.dom,r))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(r)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(r,o,f,d,b,p){return f&&(!(f instanceof KI)||!this.widget.compare(f.widget)||r>0&&b<=0||o0)?c0.before(this.dom):c0.after(this.dom,r==this.length)}domBoundsAround(){return null}coordsAt(r,o){let f=this.widget.coordsAt(this.dom,r,o);if(f)return f;let d=this.dom.getClientRects(),b=null;if(!d.length)return null;let p=this.side?this.side<0:r>0;for(let v=p?d.length-1:0;b=d[v],!(r>0?v==0:v==d.length-1||b.top0?c0.before(this.dom):c0.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(r){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Nr.empty}get isHidden(){return!0}};m4.prototype.children=fOe.prototype.children=Nye.prototype.children=uOe;function Ymt(l,r){let o=l.dom,{children:f}=l,d=0;for(let b=0;db&&r0;b--){let p=f[b-1];if(p.dom.parentNode==o)return p.domAtPos(p.length)}for(let b=d;b0&&r instanceof KT&&d.length&&(f=d[d.length-1])instanceof KT&&f.mark.eq(r.mark)?Zmt(f,r.children[0],o-1):(d.push(r),r.setParent(l)),l.length+=r.length}function Jmt(l,r,o){let f=null,d=-1,b=null,p=-1;function v(C,T){for(let A=0,j=0;A=T&&($.children.length?v($,T-j):(!b||b.isHidden&&(o>0||fnn(b,$)))&&(L>T||j==L&&$.getSide()>0)?(b=$,p=T-j):(j-1?1:0)!=d.length-(o&&d.indexOf(o)>-1?1:0))return!1;for(let b of f)if(b!=o&&(d.indexOf(b)==-1||l[b]!==r[b]))return!1;return!0}function Lye(l,r,o){let f=!1;if(r)for(let d in r)o&&d in o||(f=!0,d=="style"?l.style.cssText="":l.removeAttribute(d));if(o)for(let d in o)r&&r[d]==o[d]||(f=!0,d=="style"?l.style.cssText=o[d]:l.setAttribute(d,o[d]));return f}function hnn(l){let r=Object.create(null);for(let o=0;o0?3e8:-4e8:o>0?1e8:-1e8,new VT(r,o,o,f,r.widget||null,!1)}static replace(r){let o=!!r.block,f,d;if(r.isBlockGap)f=-5e8,d=4e8;else{let{start:b,end:p}=i2t(r,o);f=(b?o?-3e8:-1:5e8)-1,d=(p?o?2e8:1:-6e8)+1}return new VT(r,f,d,o,r.widget||null,!0)}static line(r){return new aOe(r)}static set(r,o=!1){return Jr.of(r,o)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};cs.none=Jr.empty;let hOe=class e2t extends cs{constructor(r){let{start:o,end:f}=i2t(r);super(o?-1:5e8,f?1:-6e8,null,r),this.tagName=r.tagName||"span",this.class=r.class||"",this.attrs=r.attributes||null}eq(r){var o,f;return this==r||r instanceof e2t&&this.tagName==r.tagName&&(this.class||((o=this.attrs)===null||o===void 0?void 0:o.class))==(r.class||((f=r.attrs)===null||f===void 0?void 0:f.class))&&wY(this.attrs,r.attrs,"class")}range(r,o=r){if(r>=o)throw new RangeError("Mark decorations may not be empty");return super.range(r,o)}};hOe.prototype.point=!1;let aOe=class t2t extends cs{constructor(r){super(-2e8,-2e8,null,r)}eq(r){return r instanceof t2t&&this.spec.class==r.spec.class&&wY(this.spec.attributes,r.spec.attributes)}range(r,o=r){if(o!=r)throw new RangeError("Line decoration ranges must be zero-length");return super.range(r,o)}};aOe.prototype.mapMode=Jl.TrackBefore;aOe.prototype.point=!0;let VT=class n2t extends cs{constructor(r,o,f,d,b,p){super(o,f,b,r),this.block=d,this.isReplace=p,this.mapMode=d?o<=0?Jl.TrackBefore:Jl.TrackAfter:Jl.TrackDel}get type(){return this.startSide!=this.endSide?Nd.WidgetRange:this.startSide<=0?Nd.WidgetBefore:Nd.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(r){return r instanceof n2t&&ann(this.widget,r.widget)&&this.block==r.block&&this.startSide==r.startSide&&this.endSide==r.endSide}range(r,o=r){if(this.isReplace&&(r>o||r==o&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&o!=r)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(r,o)}};VT.prototype.point=!0;function i2t(l,r=!1){let{inclusiveStart:o,inclusiveEnd:f}=l;return o==null&&(o=l.inclusive),f==null&&(f=l.inclusive),{start:o??r,end:f??r}}function ann(l,r){return l==r||!!(l&&r&&l.compare(r))}function HG(l,r,o,f=0){let d=o.length-1;d>=0&&o[d]+f>=l?o[d]=Math.max(o[d],r):o.push(l,r)}let jd=class VI extends $l{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(r,o,f,d,b,p){if(f){if(!(f instanceof VI))return!1;this.dom||f.transferDOM(this)}return d&&this.setDeco(f?f.attrs:null),Xmt(this,r,o,f?f.children.slice():[],b,p),!0}split(r){let o=new VI;if(o.breakAfter=this.breakAfter,this.length==0)return o;let{i:f,off:d}=this.childPos(r);d&&(o.append(this.children[f].split(d),0),this.children[f].merge(d,this.children[f].length,null,!1,0,0),f++);for(let b=f;b0&&this.children[f-1].length==0;)this.children[--f].destroy();return this.children.length=f,this.markDirty(),this.length=r,o}transferDOM(r){this.dom&&(this.markDirty(),r.setDOM(this.dom),r.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(r){wY(this.attrs,r)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=r)}append(r,o){Zmt(this,r,o)}addLineDeco(r){let o=r.spec.attributes,f=r.spec.class;o&&(this.attrs=Rye(o,this.attrs||{})),f&&(this.attrs=Rye({class:f},this.attrs||{}))}domAtPos(r){return Ymt(this,r)}reuseDOM(r){r.nodeName=="DIV"&&(this.setDOM(r),this.flags|=6)}sync(r,o){var f;this.dom?this.flags&4&&(qmt(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Lye(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(r,o);let d=this.dom.lastChild;for(;d&&$l.get(d)instanceof KT;)d=d.lastChild;if(!d||!this.length||d.nodeName!="BR"&&((f=$l.get(d))===null||f===void 0?void 0:f.isEditable)==!1&&(!si.ios||!this.children.some(b=>b instanceof m4))){let b=document.createElement("BR");b.cmIgnore=!0,this.dom.appendChild(b)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let r=0,o;for(let f of this.children){if(!(f instanceof m4)||/[^ -~]/.test(f.text))return null;let d=WT(f.dom);if(d.length!=1)return null;r+=d[0].width,o=d[0].height}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length,textHeight:o}:null}coordsAt(r,o){let f=Jmt(this,r,o);if(!this.children.length&&f&&this.parent){let{heightOracle:d}=this.parent.view.viewState,b=f.bottom-f.top;if(Math.abs(b-d.lineHeight)<2&&d.textHeight=o){if(b instanceof VI)return b;if(p>o)break}d=p+b.breakAfter}return null}},oR=class qG extends $l{constructor(r,o,f){super(),this.widget=r,this.length=o,this.deco=f,this.breakAfter=0,this.prevWidget=null}merge(r,o,f,d,b,p){return f&&(!(f instanceof qG)||!this.widget.compare(f.widget)||r>0&&b<=0||o0}},Bye=class extends e3{constructor(r){super(),this.height=r}toDOM(){let r=document.createElement("div");return r.className="cm-gap",this.updateDOM(r),r}eq(r){return r.height==this.height}updateDOM(r){return r.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}},Y2e=class r2t{constructor(r,o,f,d){this.doc=r,this.pos=o,this.end=f,this.disallowBlockEffectsFor=d,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=r.iter(),this.skip=o}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let r=this.content[this.content.length-1];return!(r.breakAfter||r instanceof oR&&r.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new jd),this.atCursorPos=!0),this.curLine}flushBuffer(r=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(tG(new Nye(-1),r),r.length),this.pendingBuffer=0)}addBlockWidget(r){this.flushBuffer(),this.curLine=null,this.content.push(r)}finish(r){this.pendingBuffer&&r<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(r&&this.content.length&&this.content[this.content.length-1]instanceof oR)&&this.getLine()}buildText(r,o,f){for(;r>0;){if(this.textOff==this.text.length){let{value:b,lineBreak:p,done:v}=this.cursor.next(this.skip);if(this.skip=0,v)throw new Error("Ran out of text content when drawing inline views");if(p){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,r--;continue}else this.text=b,this.textOff=0}let d=Math.min(this.text.length-this.textOff,r,512);this.flushBuffer(o.slice(o.length-f)),this.getLine().append(tG(new m4(this.text.slice(this.textOff,this.textOff+d)),o),f),this.atCursorPos=!0,this.textOff+=d,r-=d,f=0}}span(r,o,f,d){this.buildText(o-r,f,d),this.pos=o,this.openStart<0&&(this.openStart=d)}point(r,o,f,d,b,p){if(this.disallowBlockEffectsFor[p]&&f instanceof VT){if(f.block)throw new RangeError("Block decorations may not be specified via plugins");if(o>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let v=o-r;if(f instanceof VT)if(f.block)f.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new oR(f.widget||XT.block,v,f));else{let O=fOe.create(f.widget||XT.inline,v,v?0:f.startSide),C=this.atCursorPos&&!O.isEditable&&b<=d.length&&(r0),T=!O.isEditable&&(rd.length||f.startSide<=0),A=this.getLine();this.pendingBuffer==2&&!C&&!O.isEditable&&(this.pendingBuffer=0),this.flushBuffer(d),C&&(A.append(tG(new Nye(1),d),b),b=d.length+Math.max(0,b-d.length)),A.append(tG(O,d),b),this.atCursorPos=T,this.pendingBuffer=T?rd.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=d.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(f);v&&(this.textOff+v<=this.text.length?this.textOff+=v:(this.skip+=v-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=o),this.openStart<0&&(this.openStart=b)}static build(r,o,f,d,b){let p=new r2t(r,o,f,b);return p.openEnd=Jr.spans(d,o,f,p),p.openStart<0&&(p.openStart=p.openEnd),p.finish(p.openEnd),p}};function tG(l,r){for(let o of r)l=new KT(o,[l],l.length);return l}let XT=class extends e3{constructor(r){super(),this.tag=r}eq(r){return r.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(r){return r.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};XT.inline=new XT("span");XT.block=new XT("div");var al=function(l){return l[l.LTR=0]="LTR",l[l.RTL=1]="RTL",l}(al||(al={}));const Lx=al.LTR,dOe=al.RTL;function s2t(l){let r=[];for(let o=0;o=o){if(v.level==f)return p;(b<0||(d!=0?d<0?v.fromo:r[b].level>v.level))&&(b=p)}}if(b<0)throw new RangeError("Index out of range");return b}};function c2t(l,r){if(l.length!=r.length)return!1;for(let o=0;o=0;z-=3)if(M2[z+1]==-$){let Z=M2[z+2],Y=Z&2?d:Z&4?Z&1?b:d:0;Y&&(Bc[A]=Bc[M2[z]]=Y),v=z;break}}else{if(M2.length==189)break;M2[v++]=A,M2[v++]=j,M2[v++]=O}else if((L=Bc[A])==2||L==1){let z=L==d;O=z?0:1;for(let Z=v-3;Z>=0;Z-=3){let Y=M2[Z+2];if(Y&2)break;if(z)M2[Z+2]|=2;else{if(Y&4)break;M2[Z+2]|=4}}}}}function mnn(l,r,o,f){for(let d=0,b=f;d<=o.length;d++){let p=d?o[d-1].to:l,v=dO;)L==Z&&(L=o[--z].from,Z=z?o[z-1].to:l),Bc[--L]=$;O=T}else b=C,O++}}}function _ye(l,r,o,f,d,b,p){let v=f%2?2:1;if(f%2==d%2)for(let O=r,C=0;OO&&p.push(new f4(O,z.from,$));let Z=z.direction==Lx!=!($%2);Hye(l,Z?f+1:f,d,z.inner,z.from,z.to,p),O=z.to}L=z.to}else{if(L==o||(T?Bc[L]!=v:Bc[L]==v))break;L++}j?_ye(l,O,L,f+1,d,j,p):Or;){let T=!0,A=!1;if(!C||O>b[C-1].to){let z=Bc[O-1];z!=v&&(T=!1,A=z==16)}let j=!T&&v==1?[]:null,$=T?f:f+1,L=O;e:for(;;)if(C&&L==b[C-1].to){if(A)break e;let z=b[--C];if(!T)for(let Z=z.from,Y=C;;){if(Z==r)break e;if(Y&&b[Y-1].to==Z)Z=b[--Y].from;else{if(Bc[Z-1]==v)break e;break}}if(j)j.push(z);else{z.toBc.length;)Bc[Bc.length]=256;let f=[],d=r==Lx?0:1;return Hye(l,d,d,o,0,l.length,f),f}function l2t(l){return[new f4(0,l,0)]}let u2t="";function ynn(l,r,o,f,d){var b;let p=f.head-l.from,v=f4.find(r,p,(b=f.bidiLevel)!==null&&b!==void 0?b:-1,f.assoc),O=r[v],C=O.side(d,o);if(p==C){let j=v+=d?1:-1;if(j<0||j>=r.length)return null;O=r[v=j],p=O.side(!d,o),C=O.side(d,o)}let T=eu(l.text,p,O.forward(d,o));(TO.to)&&(T=C),u2t=l.text.slice(Math.min(p,T),Math.max(p,T));let A=v==(d?r.length-1:0)?null:r[v+(d?1:-1)];return A&&T==C&&A.level+(d?0:1)l.some(r=>r)}),w2t=pn.define({combine:l=>l.some(r=>r)}),m2t=pn.define();let Z2e=class Qye{constructor(r,o="nearest",f="nearest",d=5,b=5,p=!1){this.range=r,this.y=o,this.x=f,this.yMargin=d,this.xMargin=b,this.isSnapshot=p}map(r){return r.empty?this:new Qye(this.range.map(r),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(r){return this.range.to<=r.doc.length?this:new Qye(St.cursor(r.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}};const nG=ar.define({map:(l,r)=>l.map(r)}),v2t=ar.define();function W1(l,r,o){let f=l.facet(d2t);f.length?f[0](r):window.onerror&&window.onerror(String(r),o,void 0,void 0,r)||(o?console.error(o+":",r):console.error(r))}const zy=pn.define({combine:l=>l.length?l[0]:!0});let knn=0;const xT=pn.define({combine(l){return l.filter((r,o)=>{for(let f=0;f{let O=[];return p&&O.push(kR.of(C=>{let T=C.plugin(v);return T?p(T):cs.none})),b&&O.push(b(v)),O})}static fromClass(r,o){return zye.define((f,d)=>new r(f,d),o)}},J2e=class{constructor(r){this.spec=r,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(r){if(this.value){if(this.mustUpdate){let o=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(o)}catch(f){if(W1(o.state,f,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(r,this.spec.arg)}catch(o){W1(r.state,o,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(r){var o;if(!((o=this.value)===null||o===void 0)&&o.destroy)try{this.value.destroy()}catch(f){W1(r.state,f,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}};const y2t=pn.define(),bOe=pn.define(),kR=pn.define(),O2t=pn.define(),wOe=pn.define(),k2t=pn.define();function n0t(l,r){let o=l.state.facet(k2t);if(!o.length)return o;let f=o.map(b=>b instanceof Function?b(l):b),d=[];return Jr.spans(f,r.from,r.to,{point(){},span(b,p,v,O){let C=b-r.from,T=p-r.from,A=d;for(let j=v.length-1;j>=0;j--,O--){let $=v[j].spec.bidiIsolate,L;if($==null&&($=Onn(r.text,C,T)),O>0&&A.length&&(L=A[A.length-1]).to==C&&L.direction==$)L.to=T,A=L.inner;else{let z={from:C,to:T,direction:$,inner:[]};A.push(z),A=z.inner}}}}),d}const S2t=pn.define();function mOe(l){let r=0,o=0,f=0,d=0;for(let b of l.state.facet(S2t)){let p=b(l);p&&(p.left!=null&&(r=Math.max(r,p.left)),p.right!=null&&(o=Math.max(o,p.right)),p.top!=null&&(f=Math.max(f,p.top)),p.bottom!=null&&(d=Math.max(d,p.bottom)))}return{left:r,right:o,top:f,bottom:d}}const XI=pn.define();let p4=class QG{constructor(r,o,f,d){this.fromA=r,this.toA=o,this.fromB=f,this.toB=d}join(r){return new QG(Math.min(this.fromA,r.fromA),Math.max(this.toA,r.toA),Math.min(this.fromB,r.fromB),Math.max(this.toB,r.toB))}addToSet(r){let o=r.length,f=this;for(;o>0;o--){let d=r[o-1];if(!(d.fromA>f.toA)){if(d.toAT)break;b+=2}if(!O)return f;new QG(O.fromA,O.toA,O.fromB,O.toB).addToSet(f),p=O.toA,v=O.toB}}},i0t=class x2t{constructor(r,o,f){this.view=r,this.state=o,this.transactions=f,this.flags=0,this.startState=r.state,this.changes=ef.empty(this.startState.doc.length);for(let b of f)this.changes=this.changes.compose(b.changes);let d=[];this.changes.iterChangedRanges((b,p,v,O)=>d.push(new p4(b,p,v,O))),this.changedRanges=d}static create(r,o,f){return new x2t(r,o,f)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(r=>r.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},r0t=class extends $l{get length(){return this.view.state.doc.length}constructor(r){super(),this.view=r,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=cs.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(r.contentDOM),this.children=[new jd],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new p4(0,0,0,r.state.doc.length)],0,null)}update(r){var o;let f=r.changedRanges;this.minWidth>0&&f.length&&(f.every(({fromA:C,toA:T})=>Tthis.minWidthTo)?(this.minWidthFrom=r.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=r.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(r);let d=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((o=this.domChanged)===null||o===void 0)&&o.newSel?d=this.domChanged.newSel.head:!Mnn(r.changes,this.hasComposition)&&!r.selectionSet&&(d=r.state.selection.main.head));let b=d>-1?xnn(this.view,r.changes,d):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:C,to:T}=this.hasComposition;f=new p4(C,T,r.changes.mapPos(C,-1),r.changes.mapPos(T,1)).addToSet(f.slice())}this.hasComposition=b?{from:b.range.fromB,to:b.range.toB}:null,(si.ie||si.chrome)&&!b&&r&&r.state.doc.lines!=r.startState.doc.lines&&(this.forceSelection=!0);let p=this.decorations,v=this.updateDeco(),O=Enn(p,v,r.changes);return f=p4.extendWithRanges(f,O),!(this.flags&7)&&f.length==0?!1:(this.updateInner(f,r.startState.doc.length,b),r.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(r,o,f){this.view.viewState.mustMeasureContent=!0,this.updateChildren(r,o,f);let{observer:d}=this.view;d.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let p=si.chrome||si.ios?{node:d.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,p),this.flags&=-8,p&&(p.written||d.selectionRange.focusNode!=p.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(p=>p.flags&=-9);let b=[];if(this.view.viewport.from||this.view.viewport.to=0?d[p]:null;if(!v)break;let{fromA:O,toA:C,fromB:T,toB:A}=v,j,$,L,z;if(f&&f.range.fromBT){let se=Y2e.build(this.view.state.doc,T,f.range.fromB,this.decorations,this.dynamicDecorationMap),ve=Y2e.build(this.view.state.doc,f.range.toB,A,this.decorations,this.dynamicDecorationMap);$=se.breakAtStart,L=se.openStart,z=ve.openEnd;let Ce=this.compositionView(f);ve.breakAtStart?Ce.breakAfter=1:ve.content.length&&Ce.merge(Ce.length,Ce.length,ve.content[0],!1,ve.openStart,0)&&(Ce.breakAfter=ve.content[0].breakAfter,ve.content.shift()),se.content.length&&Ce.merge(0,0,se.content[se.content.length-1],!0,0,se.openEnd)&&se.content.pop(),j=se.content.concat(Ce).concat(ve.content)}else({content:j,breakAtStart:$,openStart:L,openEnd:z}=Y2e.build(this.view.state.doc,T,A,this.decorations,this.dynamicDecorationMap));let{i:Z,off:Y}=b.findPos(C,1),{i:ne,off:he}=b.findPos(O,-1);Vmt(this,ne,he,Z,Y,j,$,L,z)}f&&this.fixCompositionDOM(f)}updateEditContextFormatting(r){this.editContextFormatting=this.editContextFormatting.map(r.changes);for(let o of r.transactions)for(let f of o.effects)f.is(v2t)&&(this.editContextFormatting=f.value)}compositionView(r){let o=new m4(r.text.nodeValue);o.flags|=8;for(let{deco:d}of r.marks)o=new KT(d,[o],o.length);let f=new jd;return f.append(o,0),f}fixCompositionDOM(r){let o=(b,p)=>{p.flags|=8|(p.children.some(O=>O.flags&7)?1:0),this.markedForComposition.add(p);let v=$l.get(b);v&&v!=p&&(v.dom=null),p.setDOM(b)},f=this.childPos(r.range.fromB,1),d=this.children[f.i];o(r.line,d);for(let b=r.marks.length-1;b>=-1;b--)f=d.childPos(f.off,1),d=d.children[f.i],o(b>=0?r.marks[b].node:r.text,d)}updateSelection(r=!1,o=!1){(r||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let f=this.view.root.activeElement,d=f==this.dom,b=!d&&!(this.view.state.facet(zy)||this.dom.tabIndex>-1)&&_G(this.dom,this.view.observer.selectionRange)&&!(f&&this.dom.contains(f));if(!(d||o||b))return;let p=this.forceSelection;this.forceSelection=!1;let v=this.view.state.selection.main,O=this.moveToLine(this.domAtPos(v.anchor)),C=v.empty?O:this.moveToLine(this.domAtPos(v.head));if(si.gecko&&v.empty&&!this.hasComposition&&Snn(O)){let A=document.createTextNode("");this.view.observer.ignore(()=>O.node.insertBefore(A,O.node.childNodes[O.offset]||null)),O=C=new c0(A,0),p=!0}let T=this.view.observer.selectionRange;(p||!T.focusNode||(!sR(O.node,O.offset,T.anchorNode,T.anchorOffset)||!sR(C.node,C.offset,T.focusNode,T.focusOffset))&&!this.suppressWidgetCursorChange(T,v))&&(this.view.observer.ignore(()=>{si.android&&si.chrome&&this.dom.contains(T.focusNode)&&Ann(T.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let A=OR(this.view.root);if(A)if(v.empty){if(si.gecko){let j=Cnn(O.node,O.offset);if(j&&j!=3){let $=(j==1?zmt:Wmt)(O.node,O.offset);$&&(O=new c0($.node,$.offset))}}A.collapse(O.node,O.offset),v.bidiLevel!=null&&A.caretBidiLevel!==void 0&&(A.caretBidiLevel=v.bidiLevel)}else if(A.extend){A.collapse(O.node,O.offset);try{A.extend(C.node,C.offset)}catch{}}else{let j=document.createRange();v.anchor>v.head&&([O,C]=[C,O]),j.setEnd(C.node,C.offset),j.setStart(O.node,O.offset),A.removeAllRanges(),A.addRange(j)}b&&this.view.root.activeElement==this.dom&&(this.dom.blur(),f&&f.focus())}),this.view.observer.setSelectionRange(O,C)),this.impreciseAnchor=O.precise?null:new c0(T.anchorNode,T.anchorOffset),this.impreciseHead=C.precise?null:new c0(T.focusNode,T.focusOffset)}suppressWidgetCursorChange(r,o){return this.hasComposition&&o.empty&&sR(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)&&this.posFromDOM(r.focusNode,r.focusOffset)==o.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:r}=this,o=r.state.selection.main,f=OR(r.root),{anchorNode:d,anchorOffset:b}=r.observer.selectionRange;if(!f||!o.empty||!o.assoc||!f.modify)return;let p=jd.find(this,o.head);if(!p)return;let v=p.posAtStart;if(o.head==v||o.head==v+p.length)return;let O=this.coordsAt(o.head,-1),C=this.coordsAt(o.head,1);if(!O||!C||O.bottom>C.top)return;let T=this.domAtPos(o.head+o.assoc);f.collapse(T.node,T.offset),f.modify("move",o.assoc<0?"forward":"backward","lineboundary"),r.observer.readSelectionRange();let A=r.observer.selectionRange;r.docView.posFromDOM(A.anchorNode,A.anchorOffset)!=o.from&&f.collapse(d,b)}moveToLine(r){let o=this.dom,f;if(r.node!=o)return r;for(let d=r.offset;!f&&d=0;d--){let b=$l.get(o.childNodes[d]);b instanceof jd&&(f=b.domAtPos(b.length))}return f?new c0(f.node,f.offset,!0):r}nearest(r){for(let o=r;o;){let f=$l.get(o);if(f&&f.rootView==this)return f;o=o.parentNode}return null}posFromDOM(r,o){let f=this.nearest(r);if(!f)throw new RangeError("Trying to find position for a DOM position outside of the document");return f.localPosFromDOM(r,o)+f.posAtStart}domAtPos(r){let{i:o,off:f}=this.childCursor().findPos(r,-1);for(;o=0;p--){let v=this.children[p],O=b-v.breakAfter,C=O-v.length;if(Or||v.covers(1))&&(!f||v instanceof jd&&!(f instanceof jd&&o>=0)))f=v,d=C;else if(f&&C==r&&O==r&&v instanceof oR&&Math.abs(o)<2){if(v.deco.startSide<0)break;p&&(f=null)}b=C}return f?f.coordsAt(r-d,o):null}coordsForChar(r){let{i:o,off:f}=this.childPos(r,1),d=this.children[o];if(!(d instanceof jd))return null;for(;d.children.length;){let{i:v,off:O}=d.childPos(f,1);for(;;v++){if(v==d.children.length)return null;if((d=d.children[v]).length)break}f=O}if(!(d instanceof m4))return null;let b=eu(d.text,f);if(b==f)return null;let p=Rx(d.dom,f,b).getClientRects();for(let v=0;vMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,v=-1,O=this.view.textDirection==al.LTR;for(let C=0,T=0;Td)break;if(C>=f){let $=A.dom.getBoundingClientRect();if(o.push($.height),p){let L=A.dom.lastChild,z=L?WT(L):[];if(z.length){let Z=z[z.length-1],Y=O?Z.right-$.left:$.right-Z.left;Y>v&&(v=Y,this.minWidth=b,this.minWidthFrom=C,this.minWidthTo=j)}}}C=j+A.breakAfter}return o}textDirectionAt(r){let{i:o}=this.childPos(r,1);return getComputedStyle(this.children[o].dom).direction=="rtl"?al.RTL:al.LTR}measureTextSize(){for(let b of this.children)if(b instanceof jd){let p=b.measureTextSize();if(p)return p}let r=document.createElement("div"),o,f,d;return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let b=WT(r.firstChild)[0];o=r.getBoundingClientRect().height,f=b?b.width/27:7,d=b?b.height:o,r.remove()}),{lineHeight:o,charWidth:f,textHeight:d}}childCursor(r=this.length){let o=this.children.length;return o&&(r-=this.children[--o].length),new Kmt(this.children,r,o)}computeBlockGapDeco(){let r=[],o=this.view.viewState;for(let f=0,d=0;;d++){let b=d==o.viewports.length?null:o.viewports[d],p=b?b.from-1:this.length;if(p>f){let v=(o.lineBlockAt(p).bottom-o.lineBlockAt(f).top)/this.view.scaleY;r.push(cs.replace({widget:new Bye(v),block:!0,inclusive:!0,isBlockGap:!0}).range(f,p))}if(!b)break;f=b.to+1}return cs.set(r)}updateDeco(){let r=1,o=this.view.state.facet(kR).map(b=>(this.dynamicDecorationMap[r++]=typeof b=="function")?b(this.view):b),f=!1,d=this.view.state.facet(O2t).map((b,p)=>{let v=typeof b=="function";return v&&(f=!0),v?b(this.view):b});for(d.length&&(this.dynamicDecorationMap[r++]=f,o.push(Jr.join(d))),this.decorations=[this.editContextFormatting,...o,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ro.anchor?-1:1),d;if(!f)return;!o.empty&&(d=this.coordsAt(o.anchor,o.anchor>o.head?-1:1))&&(f={left:Math.min(f.left,d.left),top:Math.min(f.top,d.top),right:Math.max(f.right,d.right),bottom:Math.max(f.bottom,d.bottom)});let b=mOe(this.view),p={left:f.left-b.left,top:f.top-b.top,right:f.right+b.right,bottom:f.bottom+b.bottom},{offsetWidth:v,offsetHeight:O}=this.view.scrollDOM;tnn(this.view.scrollDOM,p,o.head{fr.from&&(o=!0)}),o}function Pnn(l,r,o=1){let f=l.charCategorizer(r),d=l.doc.lineAt(r),b=r-d.from;if(d.length==0)return St.cursor(r);b==0?o=1:b==d.length&&(o=-1);let p=b,v=b;o<0?p=eu(d.text,b,!1):v=eu(d.text,b);let O=f(d.text.slice(p,v));for(;p>0;){let C=eu(d.text,p,!1);if(f(d.text.slice(C,p))!=O)break;p=C}for(;vl?r.left-l:Math.max(0,l-r.right)}function Dnn(l,r){return r.top>l?r.top-l:Math.max(0,l-r.bottom)}function eve(l,r){return l.topr.top+1}function s0t(l,r){return rl.bottom?{top:l.top,left:l.left,right:l.right,bottom:r}:l}function Wye(l,r,o){let f,d,b,p,v=!1,O,C,T,A;for(let L=l.firstChild;L;L=L.nextSibling){let z=WT(L);for(let Z=0;Zhe||p==he&&b>ne)&&(f=L,d=Y,b=ne,p=he,v=ne?r0:ZY.bottom&&(!T||T.bottomY.top)&&(C=L,A=Y):T&&eve(T,Y)?T=o0t(T,Y.bottom):A&&eve(A,Y)&&(A=s0t(A,Y.top))}}if(T&&T.bottom>=o?(f=O,d=T):A&&A.top<=o&&(f=C,d=A),!f)return{node:l,offset:0};let j=Math.max(d.left,Math.min(d.right,r));if(f.nodeType==3)return c0t(f,j,o);if(v&&f.contentEditable!="false")return Wye(f,j,o);let $=Array.prototype.indexOf.call(l.childNodes,f)+(r>=(d.left+d.right)/2?1:0);return{node:l,offset:$}}function c0t(l,r,o){let f=l.nodeValue.length,d=-1,b=1e9,p=0;for(let v=0;vo?T.top-o:o-T.bottom)-1;if(T.left-1<=r&&T.right+1>=r&&A=(T.left+T.right)/2,$=j;if((si.chrome||si.gecko)&&Rx(l,v).getBoundingClientRect().left==T.right&&($=!j),A<=0)return{node:l,offset:v+($?1:0)};d=v+($?1:0),b=A}}}return{node:l,offset:d>-1?d:p>0?l.nodeValue.length:0}}function T2t(l,r,o,f=-1){var d,b;let p=l.contentDOM.getBoundingClientRect(),v=p.top+l.viewState.paddingTop,O,{docHeight:C}=l.viewState,{x:T,y:A}=r,j=A-v;if(j<0)return 0;if(j>C)return l.state.doc.length;for(let se=l.viewState.heightOracle.textHeight/2,ve=!1;O=l.elementAtHeight(j),O.type!=Nd.Text;)for(;j=f>0?O.bottom+se:O.top-se,!(j>=0&&j<=C);){if(ve)return o?null:0;ve=!0,f=-f}A=v+j;let $=O.from;if($l.viewport.to)return l.viewport.to==l.state.doc.length?l.state.doc.length:o?null:l0t(l,p,O,T,A);let L=l.dom.ownerDocument,z=l.root.elementFromPoint?l.root:L,Z=z.elementFromPoint(T,A);Z&&!l.contentDOM.contains(Z)&&(Z=null),Z||(T=Math.max(p.left+1,Math.min(p.right-1,T)),Z=z.elementFromPoint(T,A),Z&&!l.contentDOM.contains(Z)&&(Z=null));let Y,ne=-1;if(Z&&((d=l.docView.nearest(Z))===null||d===void 0?void 0:d.isEditable)!=!1){if(L.caretPositionFromPoint){let se=L.caretPositionFromPoint(T,A);se&&({offsetNode:Y,offset:ne}=se)}else if(L.caretRangeFromPoint){let se=L.caretRangeFromPoint(T,A);se&&({startContainer:Y,startOffset:ne}=se,(!l.contentDOM.contains(Y)||si.safari&&$nn(Y,ne,T)||si.chrome&&Nnn(Y,ne,T))&&(Y=void 0))}Y&&(ne=Math.min(K2(Y),ne))}if(!Y||!l.docView.dom.contains(Y)){let se=jd.find(l.docView,$);if(!se)return j>O.top+O.height/2?O.to:O.from;({node:Y,offset:ne}=Wye(se.dom,T,A))}let he=l.docView.nearest(Y);if(!he)return null;if(he.isWidget&&((b=he.dom)===null||b===void 0?void 0:b.nodeType)==1){let se=he.dom.getBoundingClientRect();return r.yl.defaultLineHeight*1.5){let v=l.viewState.heightOracle.textHeight,O=Math.floor((d-o.top-(l.defaultLineHeight-v)*.5)/v);b+=O*l.viewState.heightOracle.lineLength}let p=l.state.sliceDoc(o.from,o.to);return o.from+pY(p,b,l.state.tabSize)}function $nn(l,r,o){let f,d=l;if(l.nodeType!=3||r!=(f=l.nodeValue.length))return!1;for(;;){let b=d.nextSibling;if(b){if(b.nodeName=="BR")break;return!1}else{let p=d.parentNode;if(!p||p.nodeName=="DIV")break;d=p}}return Rx(l,f-1,f).getBoundingClientRect().right>o}function Nnn(l,r,o){if(r!=0)return!1;for(let d=l;;){let b=d.parentNode;if(!b||b.nodeType!=1||b.firstChild!=d)return!1;if(b.classList.contains("cm-line"))break;d=b}let f=l.nodeType==1?l.getBoundingClientRect():Rx(l,0,Math.max(l.nodeValue.length,1)).getBoundingClientRect();return o-f.left>5}function Kye(l,r,o){let f=l.lineBlockAt(r);if(Array.isArray(f.type)){let d;for(let b of f.type){if(b.from>r)break;if(!(b.tor)return b;(!d||b.type==Nd.Text&&(d.type!=b.type||(o<0?b.fromr)))&&(d=b)}}return d||f}return f}function Inn(l,r,o,f){let d=Kye(l,r.head,r.assoc||-1),b=!f||d.type!=Nd.Text||!(l.lineWrapping||d.widgetLineBreaks)?null:l.coordsAtPos(r.assoc<0&&r.head>d.from?r.head-1:r.head);if(b){let p=l.dom.getBoundingClientRect(),v=l.textDirectionAt(d.from),O=l.posAtCoords({x:o==(v==al.LTR)?p.right-1:p.left+1,y:(b.top+b.bottom)/2});if(O!=null)return St.cursor(O,o?-1:1)}return St.cursor(o?d.to:d.from,o?-1:1)}function u0t(l,r,o,f){let d=l.state.doc.lineAt(r.head),b=l.bidiSpans(d),p=l.textDirectionAt(d.from);for(let v=r,O=null;;){let C=ynn(d,b,p,v,o),T=u2t;if(!C){if(d.number==(o?l.state.doc.lines:1))return v;T=` +`,d=l.state.doc.line(d.number+(o?1:-1)),b=l.bidiSpans(d),C=l.visualLineSide(d,!o)}if(O){if(!O(T))return v}else{if(!f)return C;O=f(T)}v=C}}function Rnn(l,r,o){let f=l.state.charCategorizer(r),d=f(o);return b=>{let p=f(b);return d==hl.Space&&(d=p),d==p}}function Lnn(l,r,o,f){let d=r.head,b=o?1:-1;if(d==(o?l.state.doc.length:0))return St.cursor(d,r.assoc);let p=r.goalColumn,v,O=l.contentDOM.getBoundingClientRect(),C=l.coordsAtPos(d,r.assoc||-1),T=l.documentTop;if(C)p==null&&(p=C.left-O.left),v=b<0?C.top:C.bottom;else{let $=l.viewState.lineBlockAt(d);p==null&&(p=Math.min(O.right-O.left,l.defaultCharacterWidth*(d-$.from))),v=(b<0?$.top:$.bottom)+T}let A=O.left+p,j=f??l.viewState.heightOracle.textHeight>>1;for(let $=0;;$+=10){let L=v+(j+$)*b,z=T2t(l,{x:A,y:L},!1,b);if(LO.bottom||(b<0?zd)){let Z=l.docView.coordsForChar(z),Y=!Z||L{if(r>b&&rd(l)),o.from,r.head>o.from?-1:1);return f==o.from?o:St.cursor(f,fb)&&this.lineBreak(),d=p}return this.findPointBefore(f,o),this}readTextNode(r){let o=r.nodeValue;for(let f of this.points)f.node==r&&(f.pos=this.text.length+Math.min(f.offset,o.length));for(let f=0,d=this.lineSeparator?null:/\r\n?|\n/g;;){let b=-1,p=1,v;if(this.lineSeparator?(b=o.indexOf(this.lineSeparator,f),p=this.lineSeparator.length):(v=d.exec(o))&&(b=v.index,p=v[0].length),this.append(o.slice(f,b<0?o.length:b)),b<0)break;if(this.lineBreak(),p>1)for(let O of this.points)O.node==r&&O.pos>this.text.length&&(O.pos-=p-1);f=b+p}}readNode(r){if(r.cmIgnore)return;let o=$l.get(r),f=o&&o.overrideDOMText;if(f!=null){this.findPointInside(r,f.length);for(let d=f.iter();!d.next().done;)d.lineBreak?this.lineBreak():this.append(d.value)}else r.nodeType==3?this.readTextNode(r):r.nodeName=="BR"?r.nextSibling&&this.lineBreak():r.nodeType==1&&this.readRange(r.firstChild,null)}findPointBefore(r,o){for(let f of this.points)f.node==r&&r.childNodes[f.offset]==o&&(f.pos=this.text.length)}findPointInside(r,o){for(let f of this.points)(r.nodeType==3?f.node==r:r.contains(f.node))&&(f.pos=this.text.length+(Fnn(r,f.node,f.offset)?o:0))}};function Fnn(l,r,o){for(;;){if(!r||o-1;let{impreciseHead:b,impreciseAnchor:p}=r.docView;if(r.state.readOnly&&o>-1)this.newSel=null;else if(o>-1&&(this.bounds=r.docView.domBoundsAround(o,f,0))){let v=b||p?[]:Qnn(r),O=new Bnn(v,r.state);O.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=O.text,this.newSel=znn(v,this.bounds.from)}else{let v=r.observer.selectionRange,O=b&&b.node==v.focusNode&&b.offset==v.focusOffset||!Tye(r.contentDOM,v.focusNode)?r.state.selection.main.head:r.docView.posFromDOM(v.focusNode,v.focusOffset),C=p&&p.node==v.anchorNode&&p.offset==v.anchorOffset||!Tye(r.contentDOM,v.anchorNode)?r.state.selection.main.anchor:r.docView.posFromDOM(v.anchorNode,v.anchorOffset),T=r.viewport;if((si.ios||si.chrome)&&r.state.selection.main.empty&&O!=C&&(T.from>0||T.toDate.now()-100?l.inputState.lastKeyCode:-1;if(r.bounds){let{from:p,to:v}=r.bounds,O=d.from,C=null;(b===8||si.android&&r.text.length=d.from&&o.to<=d.to&&(o.from!=d.from||o.to!=d.to)&&d.to-d.from-(o.to-o.from)<=4?o={from:d.from,to:d.to,insert:l.state.doc.slice(d.from,o.from).append(o.insert).append(l.state.doc.slice(o.to,d.to))}:si.chrome&&o&&o.from==o.to&&o.from==d.head&&o.insert.toString()==` + `&&l.lineWrapping&&(f&&(f=St.single(f.main.anchor-1,f.main.head-1)),o={from:d.from,to:d.to,insert:Nr.of([" "])}),o)return vOe(l,o,f,b);if(f&&!f.main.eq(d)){let p=!1,v="select";return l.inputState.lastSelectionTime>Date.now()-50&&(l.inputState.lastSelectionOrigin=="select"&&(p=!0),v=l.inputState.lastSelectionOrigin),l.dispatch({selection:f,scrollIntoView:p,userEvent:v}),!0}else return!1}function vOe(l,r,o,f=-1){if(si.ios&&l.inputState.flushIOSKey(r))return!0;let d=l.state.selection.main;if(si.android&&(r.to==d.to&&(r.from==d.from||r.from==d.from-1&&l.state.sliceDoc(r.from,d.from)==" ")&&r.insert.length==1&&r.insert.lines==2&&$T(l.contentDOM,"Enter",13)||(r.from==d.from-1&&r.to==d.to&&r.insert.length==0||f==8&&r.insert.lengthd.head)&&$T(l.contentDOM,"Backspace",8)||r.from==d.from&&r.to==d.to+1&&r.insert.length==0&&$T(l.contentDOM,"Delete",46)))return!0;let b=r.insert.toString();l.inputState.composing>=0&&l.inputState.composing++;let p,v=()=>p||(p=Hnn(l,r,o));return l.state.facet(g2t).some(O=>O(l,r.from,r.to,b,v))||l.dispatch(v()),!0}function Hnn(l,r,o){let f,d=l.state,b=d.selection.main;if(r.from>=b.from&&r.to<=b.to&&r.to-r.from>=(b.to-b.from)/3&&(!o||o.main.empty&&o.main.from==r.from+r.insert.length)&&l.inputState.composing<0){let v=b.fromr.to?d.sliceDoc(r.to,b.to):"";f=d.replaceSelection(l.state.toText(v+r.insert.sliceString(0,void 0,l.state.lineBreak)+O))}else{let v=d.changes(r),O=o&&o.main.to<=v.newLength?o.main:void 0;if(d.selection.ranges.length>1&&l.inputState.composing>=0&&r.to<=b.to&&r.to>=b.to-10){let C=l.state.sliceDoc(r.from,r.to),T,A=o&&C2t(l,o.main.head);if(A){let L=r.insert.length-(r.to-r.from);T={from:A.from,to:A.to-L}}else T=l.state.doc.lineAt(b.head);let j=b.to-r.to,$=b.to-b.from;f=d.changeByRange(L=>{if(L.from==b.from&&L.to==b.to)return{changes:v,range:O||L.map(v)};let z=L.to-j,Z=z-C.length;if(L.to-L.from!=$||l.state.sliceDoc(Z,z)!=C||L.to>=T.from&&L.from<=T.to)return{range:L};let Y=d.changes({from:Z,to:z,insert:r.insert}),ne=L.to-b.to;return{changes:Y,range:O?St.range(Math.max(0,O.anchor+ne),Math.max(0,O.head+ne)):L.map(Y)}})}else f={changes:v,selection:O&&d.selection.replaceRange(O)}}let p="input.type";return(l.composing||l.inputState.compositionPendingChange&&l.inputState.compositionEndedAt>Date.now()-50)&&(l.inputState.compositionPendingChange=!1,p+=".compose",l.inputState.compositionFirstChange&&(p+=".start",l.inputState.compositionFirstChange=!1)),d.update(f,{userEvent:p,scrollIntoView:!0})}function qnn(l,r,o,f){let d=Math.min(l.length,r.length),b=0;for(;b0&&v>0&&l.charCodeAt(p-1)==r.charCodeAt(v-1);)p--,v--;if(f=="end"){let O=Math.max(0,b-Math.min(p,v));o-=p+O-b}if(p=p?b-o:0;b-=O,v=b+(v-p),p=b}else if(v=v?b-o:0;b-=O,p=b+(p-v),v=b}return{from:b,toA:p,toB:v}}function Qnn(l){let r=[];if(l.root.activeElement!=l.contentDOM)return r;let{anchorNode:o,anchorOffset:f,focusNode:d,focusOffset:b}=l.observer.selectionRange;return o&&(r.push(new f0t(o,f)),(d!=o||b!=f)&&r.push(new f0t(d,b))),r}function znn(l,r){if(l.length==0)return null;let o=l[0].pos,f=l.length==2?l[1].pos:o;return o>-1&&f>-1?St.single(o+r,f+r):null}let Wnn=class{setSelectionOrigin(r){this.lastSelectionOrigin=r,this.lastSelectionTime=Date.now()}constructor(r){this.view=r,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=r.hasFocus,si.safari&&r.contentDOM.addEventListener("input",()=>null),si.gecko&&cin(r.contentDOM.ownerDocument)}handleEvent(r){!Jnn(this.view,r)||this.ignoreDuringComposition(r)||r.type=="keydown"&&this.keydown(r)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(r.type,r)):this.runHandlers(r.type,r))}runHandlers(r,o){let f=this.handlers[r];if(f){for(let d of f.observers)d(this.view,o);for(let d of f.handlers){if(o.defaultPrevented)break;if(d(this.view,o)){o.preventDefault();break}}}}ensureHandlers(r){let o=Knn(r),f=this.handlers,d=this.view.contentDOM;for(let b in o)if(b!="scroll"){let p=!o[b].handlers.length,v=f[b];v&&p!=!v.handlers.length&&(d.removeEventListener(b,this.handleEvent),v=null),v||d.addEventListener(b,this.handleEvent,{passive:p})}for(let b in f)b!="scroll"&&!o[b]&&d.removeEventListener(b,this.handleEvent);this.handlers=o}keydown(r){if(this.lastKeyCode=r.keyCode,this.lastKeyTime=Date.now(),r.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&r.keyCode!=27&&M2t.indexOf(r.keyCode)<0&&(this.tabFocusMode=-1),si.android&&si.chrome&&!r.synthetic&&(r.keyCode==13||r.keyCode==8))return this.view.observer.delayAndroidKey(r.key,r.keyCode),!0;let o;return si.ios&&!r.synthetic&&!r.altKey&&!r.metaKey&&((o=A2t.find(f=>f.keyCode==r.keyCode))&&!r.ctrlKey||Vnn.indexOf(r.key)>-1&&r.ctrlKey&&!r.shiftKey)?(this.pendingIOSKey=o||r,setTimeout(()=>this.flushIOSKey(),250),!0):(r.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(r){let o=this.pendingIOSKey;return!o||o.key=="Enter"&&r&&r.from0?!0:si.safari&&!si.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(r){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=r}update(r){this.view.observer.update(r),this.mouseSelection&&this.mouseSelection.update(r),this.draggedContent&&r.docChanged&&(this.draggedContent=this.draggedContent.map(r.changes)),r.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function h0t(l,r){return(o,f)=>{try{return r.call(l,f,o)}catch(d){W1(o.state,d)}}}function Knn(l){let r=Object.create(null);function o(f){return r[f]||(r[f]={observers:[],handlers:[]})}for(let f of l){let d=f.spec,b=d&&d.plugin.domEventHandlers,p=d&&d.plugin.domEventObservers;if(b)for(let v in b){let O=b[v];O&&o(v).handlers.push(h0t(f.value,O))}if(p)for(let v in p){let O=p[v];O&&o(v).observers.push(h0t(f.value,O))}}for(let f in Bw)o(f).handlers.push(Bw[f]);for(let f in Xp)o(f).observers.push(Xp[f]);return r}const A2t=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Vnn="dthko",M2t=[16,17,18,20,91,92,224,225],iG=6;function rG(l){return Math.max(0,l)*.7+8}function Xnn(l,r){return Math.max(Math.abs(l.clientX-r.clientX),Math.abs(l.clientY-r.clientY))}let Unn=class{constructor(r,o,f,d){this.view=r,this.startEvent=o,this.style=f,this.mustSelect=d,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=o,this.scrollParents=nnn(r.contentDOM),this.atoms=r.state.facet(wOe).map(p=>p(r));let b=r.contentDOM.ownerDocument;b.addEventListener("mousemove",this.move=this.move.bind(this)),b.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=o.shiftKey,this.multiple=r.state.facet(Zr.allowMultipleSelections)&&Gnn(r,o),this.dragging=Znn(r,o)&&D2t(o)==1?null:!1}start(r){this.dragging===!1&&this.select(r)}move(r){if(r.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Xnn(this.startEvent,r)<10)return;this.select(this.lastEvent=r);let o=0,f=0,d=0,b=0,p=this.view.win.innerWidth,v=this.view.win.innerHeight;this.scrollParents.x&&({left:d,right:p}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:b,bottom:v}=this.scrollParents.y.getBoundingClientRect());let O=mOe(this.view);r.clientX-O.left<=d+iG?o=-rG(d-r.clientX):r.clientX+O.right>=p-iG&&(o=rG(r.clientX-p)),r.clientY-O.top<=b+iG?f=-rG(b-r.clientY):r.clientY+O.bottom>=v-iG&&(f=rG(r.clientY-v)),this.setScrollSpeed(o,f)}up(r){this.dragging==null&&this.select(this.lastEvent),this.dragging||r.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let r=this.view.contentDOM.ownerDocument;r.removeEventListener("mousemove",this.move),r.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(r,o){this.scrollSpeed={x:r,y:o},r||o?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:r,y:o}=this.scrollSpeed;r&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=r,r=0),o&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=o,o=0),(r||o)&&this.view.win.scrollBy(r,o),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(r){let o=null;for(let f=0;fo.isUserEvent("input.type"))?this.destroy():this.style.update(r)&&setTimeout(()=>this.select(this.lastEvent),20)}};function Gnn(l,r){let o=l.state.facet(f2t);return o.length?o[0](r):si.mac?r.metaKey:r.ctrlKey}function Ynn(l,r){let o=l.state.facet(h2t);return o.length?o[0](r):si.mac?!r.altKey:!r.ctrlKey}function Znn(l,r){let{main:o}=l.state.selection;if(o.empty)return!1;let f=OR(l.root);if(!f||f.rangeCount==0)return!0;let d=f.getRangeAt(0).getClientRects();for(let b=0;b=r.clientX&&p.top<=r.clientY&&p.bottom>=r.clientY)return!0}return!1}function Jnn(l,r){if(!r.bubbles)return!0;if(r.defaultPrevented)return!1;for(let o=r.target,f;o!=l.contentDOM;o=o.parentNode)if(!o||o.nodeType==11||(f=$l.get(o))&&f.ignoreEvent(r))return!1;return!0}const Bw=Object.create(null),Xp=Object.create(null),P2t=si.ie&&si.ie_version<15||si.ios&&si.webkit_version<604;function ein(l){let r=l.dom.parentNode;if(!r)return;let o=r.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout(()=>{l.focus(),o.remove(),j2t(l,o.value)},50)}function tZ(l,r,o){for(let f of l.facet(r))o=f(o,l);return o}function j2t(l,r){r=tZ(l.state,gOe,r);let{state:o}=l,f,d=1,b=o.toText(r),p=b.lines==o.selection.ranges.length;if(Vye!=null&&o.selection.ranges.every(O=>O.empty)&&Vye==b.toString()){let O=-1;f=o.changeByRange(C=>{let T=o.doc.lineAt(C.from);if(T.from==O)return{range:C};O=T.from;let A=o.toText((p?b.line(d++).text:r)+o.lineBreak);return{changes:{from:T.from,insert:A},range:St.cursor(C.from+A.length)}})}else p?f=o.changeByRange(O=>{let C=b.line(d++);return{changes:{from:O.from,to:O.to,insert:C.text},range:St.cursor(O.from+C.length)}}):f=o.replaceSelection(b);l.dispatch(f,{userEvent:"input.paste",scrollIntoView:!0})}Xp.scroll=l=>{l.inputState.lastScrollTop=l.scrollDOM.scrollTop,l.inputState.lastScrollLeft=l.scrollDOM.scrollLeft};Bw.keydown=(l,r)=>(l.inputState.setSelectionOrigin("select"),r.keyCode==27&&l.inputState.tabFocusMode!=0&&(l.inputState.tabFocusMode=Date.now()+2e3),!1);Xp.touchstart=(l,r)=>{l.inputState.lastTouchTime=Date.now(),l.inputState.setSelectionOrigin("select.pointer")};Xp.touchmove=l=>{l.inputState.setSelectionOrigin("select.pointer")};Bw.mousedown=(l,r)=>{if(l.observer.flush(),l.inputState.lastTouchTime>Date.now()-2e3)return!1;let o=null;for(let f of l.state.facet(a2t))if(o=f(l,r),o)break;if(!o&&r.button==0&&(o=iin(l,r)),o){let f=!l.hasFocus;l.inputState.startMouseSelection(new Unn(l,r,o,f)),f&&l.observer.ignore(()=>{Hmt(l.contentDOM);let b=l.root.activeElement;b&&!b.contains(l.contentDOM)&&b.blur()});let d=l.inputState.mouseSelection;if(d)return d.start(r),d.dragging===!1}return!1};function a0t(l,r,o,f){if(f==1)return St.cursor(r,o);if(f==2)return Pnn(l.state,r,o);{let d=jd.find(l.docView,r),b=l.state.doc.lineAt(d?d.posAtEnd:r),p=d?d.posAtStart:b.from,v=d?d.posAtEnd:b.to;return vr>=o.top&&r<=o.bottom&&l>=o.left&&l<=o.right;function tin(l,r,o,f){let d=jd.find(l.docView,r);if(!d)return 1;let b=r-d.posAtStart;if(b==0)return 1;if(b==d.length)return-1;let p=d.coordsAt(b,-1);if(p&&d0t(o,f,p))return-1;let v=d.coordsAt(b,1);return v&&d0t(o,f,v)?1:p&&p.bottom>=f?-1:1}function g0t(l,r){let o=l.posAtCoords({x:r.clientX,y:r.clientY},!1);return{pos:o,bias:tin(l,o,r.clientX,r.clientY)}}const nin=si.ie&&si.ie_version<=11;let p0t=null,b0t=0,w0t=0;function D2t(l){if(!nin)return l.detail;let r=p0t,o=w0t;return p0t=l,w0t=Date.now(),b0t=!r||o>Date.now()-400&&Math.abs(r.clientX-l.clientX)<2&&Math.abs(r.clientY-l.clientY)<2?(b0t+1)%3:1}function iin(l,r){let o=g0t(l,r),f=D2t(r),d=l.state.selection;return{update(b){b.docChanged&&(o.pos=b.changes.mapPos(o.pos),d=d.map(b.changes))},get(b,p,v){let O=g0t(l,b),C,T=a0t(l,O.pos,O.bias,f);if(o.pos!=O.pos&&!p){let A=a0t(l,o.pos,o.bias,f),j=Math.min(A.from,T.from),$=Math.max(A.to,T.to);T=j1&&(C=rin(d,O.pos))?C:v?d.addRange(T):St.create([T])}}}function rin(l,r){for(let o=0;o=r)return St.create(l.ranges.slice(0,o).concat(l.ranges.slice(o+1)),l.mainIndex==o?0:l.mainIndex-(l.mainIndex>o?1:0))}return null}Bw.dragstart=(l,r)=>{let{selection:{main:o}}=l.state;if(r.target.draggable){let d=l.docView.nearest(r.target);if(d&&d.isWidget){let b=d.posAtStart,p=b+d.length;(b>=o.to||p<=o.from)&&(o=St.range(b,p))}}let{inputState:f}=l;return f.mouseSelection&&(f.mouseSelection.dragging=!0),f.draggedContent=o,r.dataTransfer&&(r.dataTransfer.setData("Text",tZ(l.state,pOe,l.state.sliceDoc(o.from,o.to))),r.dataTransfer.effectAllowed="copyMove"),!1};Bw.dragend=l=>(l.inputState.draggedContent=null,!1);function m0t(l,r,o,f){if(o=tZ(l.state,gOe,o),!o)return;let d=l.posAtCoords({x:r.clientX,y:r.clientY},!1),{draggedContent:b}=l.inputState,p=f&&b&&Ynn(l,r)?{from:b.from,to:b.to}:null,v={from:d,insert:o},O=l.state.changes(p?[p,v]:v);l.focus(),l.dispatch({changes:O,selection:{anchor:O.mapPos(d,-1),head:O.mapPos(d,1)},userEvent:p?"move.drop":"input.drop"}),l.inputState.draggedContent=null}Bw.drop=(l,r)=>{if(!r.dataTransfer)return!1;if(l.state.readOnly)return!0;let o=r.dataTransfer.files;if(o&&o.length){let f=Array(o.length),d=0,b=()=>{++d==o.length&&m0t(l,r,f.filter(p=>p!=null).join(l.state.lineBreak),!1)};for(let p=0;p{/[\x00-\x08\x0e-\x1f]{2}/.test(v.result)||(f[p]=v.result),b()},v.readAsText(o[p])}return!0}else{let f=r.dataTransfer.getData("Text");if(f)return m0t(l,r,f,!0),!0}return!1};Bw.paste=(l,r)=>{if(l.state.readOnly)return!0;l.observer.flush();let o=P2t?null:r.clipboardData;return o?(j2t(l,o.getData("text/plain")||o.getData("text/uri-list")),!0):(ein(l),!1)};function sin(l,r){let o=l.dom.parentNode;if(!o)return;let f=o.appendChild(document.createElement("textarea"));f.style.cssText="position: fixed; left: -10000px; top: 10px",f.value=r,f.focus(),f.selectionEnd=r.length,f.selectionStart=0,setTimeout(()=>{f.remove(),l.focus()},50)}function oin(l){let r=[],o=[],f=!1;for(let d of l.selection.ranges)d.empty||(r.push(l.sliceDoc(d.from,d.to)),o.push(d));if(!r.length){let d=-1;for(let{from:b}of l.selection.ranges){let p=l.doc.lineAt(b);p.number>d&&(r.push(p.text),o.push({from:p.from,to:Math.min(l.doc.length,p.to+1)})),d=p.number}f=!0}return{text:tZ(l,pOe,r.join(l.lineBreak)),ranges:o,linewise:f}}let Vye=null;Bw.copy=Bw.cut=(l,r)=>{let{text:o,ranges:f,linewise:d}=oin(l.state);if(!o&&!d)return!1;Vye=d?o:null,r.type=="cut"&&!l.state.readOnly&&l.dispatch({changes:f,scrollIntoView:!0,userEvent:"delete.cut"});let b=P2t?null:r.clipboardData;return b?(b.clearData(),b.setData("text/plain",o),!0):(sin(l,o),!1)};const $2t=Qw.define();function N2t(l,r){let o=[];for(let f of l.facet(p2t)){let d=f(l,r);d&&o.push(d)}return o.length?l.update({effects:o,annotations:$2t.of(!0)}):null}function I2t(l){setTimeout(()=>{let r=l.hasFocus;if(r!=l.inputState.notifiedFocused){let o=N2t(l.state,r);o?l.dispatch(o):l.update([])}},10)}Xp.focus=l=>{l.inputState.lastFocusTime=Date.now(),!l.scrollDOM.scrollTop&&(l.inputState.lastScrollTop||l.inputState.lastScrollLeft)&&(l.scrollDOM.scrollTop=l.inputState.lastScrollTop,l.scrollDOM.scrollLeft=l.inputState.lastScrollLeft),I2t(l)};Xp.blur=l=>{l.observer.clearSelectionRange(),I2t(l)};Xp.compositionstart=Xp.compositionupdate=l=>{l.observer.editContext||(l.inputState.compositionFirstChange==null&&(l.inputState.compositionFirstChange=!0),l.inputState.composing<0&&(l.inputState.composing=0))};Xp.compositionend=l=>{l.observer.editContext||(l.inputState.composing=-1,l.inputState.compositionEndedAt=Date.now(),l.inputState.compositionPendingKey=!0,l.inputState.compositionPendingChange=l.observer.pendingRecords().length>0,l.inputState.compositionFirstChange=null,si.chrome&&si.android?l.observer.flushSoon():l.inputState.compositionPendingChange?Promise.resolve().then(()=>l.observer.flush()):setTimeout(()=>{l.inputState.composing<0&&l.docView.hasComposition&&l.update([])},50))};Xp.contextmenu=l=>{l.inputState.lastContextMenu=Date.now()};Bw.beforeinput=(l,r)=>{var o,f;if(r.inputType=="insertReplacementText"&&l.observer.editContext){let b=(o=r.dataTransfer)===null||o===void 0?void 0:o.getData("text/plain"),p=r.getTargetRanges();if(b&&p.length){let v=p[0],O=l.posAtDOM(v.startContainer,v.startOffset),C=l.posAtDOM(v.endContainer,v.endOffset);return vOe(l,{from:O,to:C,insert:l.state.toText(b)},null),!0}}let d;if(si.chrome&&si.android&&(d=A2t.find(b=>b.inputType==r.inputType))&&(l.observer.delayAndroidKey(d.key,d.keyCode),d.key=="Backspace"||d.key=="Delete")){let b=((f=window.visualViewport)===null||f===void 0?void 0:f.height)||0;setTimeout(()=>{var p;(((p=window.visualViewport)===null||p===void 0?void 0:p.height)||0)>b+10&&l.hasFocus&&(l.contentDOM.blur(),l.focus())},100)}return si.ios&&r.inputType=="deleteContentForward"&&l.observer.flushSoon(),si.safari&&r.inputType=="insertText"&&l.inputState.composing>=0&&setTimeout(()=>Xp.compositionend(l,r),20),!1};const v0t=new Set;function cin(l){v0t.has(l)||(v0t.add(l),l.addEventListener("copy",()=>{}),l.addEventListener("cut",()=>{}))}const y0t=["pre-wrap","normal","pre-line","break-spaces"];let UT=!1;function O0t(){UT=!1}let lin=class{constructor(r){this.lineWrapping=r,this.doc=Nr.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(r,o){let f=this.doc.lineAt(o).number-this.doc.lineAt(r).number+1;return this.lineWrapping&&(f+=Math.max(0,Math.ceil((o-r-f*this.lineLength*.5)/this.lineLength))),this.lineHeight*f}heightForLine(r){return this.lineWrapping?(1+Math.max(0,Math.ceil((r-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(r){return this.doc=r,this}mustRefreshForWrapping(r){return y0t.indexOf(r)>-1!=this.lineWrapping}mustRefreshForHeights(r){let o=!1;for(let f=0;f-1,O=Math.round(o)!=Math.round(this.lineHeight)||this.lineWrapping!=v;if(this.lineWrapping=v,this.lineHeight=o,this.charWidth=f,this.textHeight=d,this.lineLength=b,O){this.heightSamples={};for(let C=0;C0}set outdated(r){this.flags=(r?2:0)|this.flags&-3}setHeight(r){this.height!=r&&(Math.abs(this.height-r)>WG&&(UT=!0),this.height=r)}replace(r,o,f){return KG.of(f)}decomposeLeft(r,o){o.push(this)}decomposeRight(r,o){o.push(this)}applyChanges(r,o,f,d){let b=this,p=f.doc;for(let v=d.length-1;v>=0;v--){let{fromA:O,toA:C,fromB:T,toB:A}=d[v],j=b.lineAt(O,ul.ByPosNoHeight,f.setDoc(o),0,0),$=j.to>=C?j:b.lineAt(C,ul.ByPosNoHeight,f,0,0);for(A+=$.to-C,C=$.to;v>0&&j.from<=d[v-1].toA;)O=d[v-1].fromA,T=d[v-1].fromB,v--,Ob*2){let v=r[o-1];v.break?r.splice(--o,1,v.left,null,v.right):r.splice(--o,1,v.left,v.right),f+=1+v.break,d-=v.size}else if(b>d*2){let v=r[f];v.break?r.splice(f,1,v.left,null,v.right):r.splice(f,1,v.left,v.right),f+=2+v.break,b-=v.size}else break;else if(d=b&&p(this.blockAt(0,f,d,b))}updateHeight(r,o=0,f=!1,d){return d&&d.from<=o&&d.more&&this.setHeight(d.heights[d.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}},N2=class Xye extends L2t{constructor(r,o){super(r,o,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(r,o,f,d){return new o4(d,this.length,f,this.height,this.breaks)}replace(r,o,f){let d=f[0];return f.length==1&&(d instanceof Xye||d instanceof NT&&d.flags&4)&&Math.abs(this.length-d.length)<10?(d instanceof NT?d=new Xye(d.length,this.height):d.height=this.height,this.outdated||(d.outdated=!1),d):Rw.of(f)}updateHeight(r,o=0,f=!1,d){return d&&d.from<=o&&d.more?this.setHeight(d.heights[d.index++]):(f||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,r.heightForLine(this.length-this.collapsed))+this.breaks*r.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}},NT=class jw extends Rw{constructor(r){super(r,0)}heightMetrics(r,o){let f=r.doc.lineAt(o).number,d=r.doc.lineAt(o+this.length).number,b=d-f+1,p,v=0;if(r.lineWrapping){let O=Math.min(this.height,r.lineHeight*b);p=O/b,this.length>b+1&&(v=(this.height-O)/(this.length-b-1))}else p=this.height/b;return{firstLine:f,lastLine:d,perLine:p,perChar:v}}blockAt(r,o,f,d){let{firstLine:b,lastLine:p,perLine:v,perChar:O}=this.heightMetrics(o,d);if(o.lineWrapping){let C=d+(r0){let b=f[f.length-1];b instanceof jw?f[f.length-1]=new jw(b.length+d):f.push(null,new jw(d-1))}if(r>0){let b=f[0];b instanceof jw?f[0]=new jw(r+b.length):f.unshift(new jw(r-1),null)}return Rw.of(f)}decomposeLeft(r,o){o.push(new jw(r-1),null)}decomposeRight(r,o){o.push(null,new jw(this.length-r-1))}updateHeight(r,o=0,f=!1,d){let b=o+this.length;if(d&&d.from<=o+this.length&&d.more){let p=[],v=Math.max(o,d.from),O=-1;for(d.from>o&&p.push(new jw(d.from-o-1).updateHeight(r,o));v<=b&&d.more;){let T=r.doc.lineAt(v).length;p.length&&p.push(null);let A=d.heights[d.index++];O==-1?O=A:Math.abs(A-O)>=WG&&(O=-2);let j=new N2(T,A);j.outdated=!1,p.push(j),v+=T+1}v<=b&&p.push(null,new jw(b-v).updateHeight(r,v));let C=Rw.of(p);return(O<0||Math.abs(C.height-this.height)>=WG||Math.abs(O-this.heightMetrics(r,o).perLine)>=WG)&&(UT=!0),mY(this,C)}else(f||this.outdated)&&(this.setHeight(r.heightForGap(o,o+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},fin=class extends Rw{constructor(r,o,f){super(r.length+o+f.length,r.height+f.height,o|(r.outdated||f.outdated?2:0)),this.left=r,this.right=f,this.size=r.size+f.size}get break(){return this.flags&1}blockAt(r,o,f,d){let b=f+this.left.height;return rv))return C;let T=o==ul.ByPosNoHeight?ul.ByPosNoHeight:ul.ByPos;return O?C.join(this.right.lineAt(v,T,f,p,v)):this.left.lineAt(v,T,f,d,b).join(C)}forEachLine(r,o,f,d,b,p){let v=d+this.left.height,O=b+this.left.length+this.break;if(this.break)r=O&&this.right.forEachLine(r,o,f,v,O,p);else{let C=this.lineAt(O,ul.ByPos,f,d,b);r=r&&C.from<=o&&p(C),o>C.to&&this.right.forEachLine(C.to+1,o,f,v,O,p)}}replace(r,o,f){let d=this.left.length+this.break;if(othis.left.length)return this.balanced(this.left,this.right.replace(r-d,o-d,f));let b=[];r>0&&this.decomposeLeft(r,b);let p=b.length;for(let v of f)b.push(v);if(r>0&&k0t(b,p-1),o=f&&o.push(null)),r>f&&this.right.decomposeLeft(r-f,o)}decomposeRight(r,o){let f=this.left.length,d=f+this.break;if(r>=d)return this.right.decomposeRight(r-d,o);r2*o.size||o.size>2*r.size?Rw.of(this.break?[r,null,o]:[r,o]):(this.left=mY(this.left,r),this.right=mY(this.right,o),this.setHeight(r.height+o.height),this.outdated=r.outdated||o.outdated,this.size=r.size+o.size,this.length=r.length+this.break+o.length,this)}updateHeight(r,o=0,f=!1,d){let{left:b,right:p}=this,v=o+b.length+this.break,O=null;return d&&d.from<=o+b.length&&d.more?O=b=b.updateHeight(r,o,f,d):b.updateHeight(r,o,f),d&&d.from<=v+p.length&&d.more?O=p=p.updateHeight(r,v,f,d):p.updateHeight(r,v,f),O?this.balanced(b,p):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}};function k0t(l,r){let o,f;l[r]==null&&(o=l[r-1])instanceof NT&&(f=l[r+1])instanceof NT&&l.splice(r-1,3,new NT(o.length+1+f.length))}const hin=5;let ain=class B2t{constructor(r,o){this.pos=r,this.oracle=o,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=r}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(r,o){if(this.lineStart>-1){let f=Math.min(o,this.lineEnd),d=this.nodes[this.nodes.length-1];d instanceof N2?d.length+=f-this.pos:(f>this.pos||!this.isCovered)&&this.nodes.push(new N2(f-this.pos,-1)),this.writtenTo=f,o>f&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=o}point(r,o,f){if(r=hin)&&this.addLineDeco(d,b,p)}else o>r&&this.span(r,o);this.lineEnd>-1&&this.lineEnd-1)return;let{from:r,to:o}=this.oracle.doc.lineAt(this.pos);this.lineStart=r,this.lineEnd=o,this.writtenTor&&this.nodes.push(new N2(this.pos-r,-1)),this.writtenTo=this.pos}blankContent(r,o){let f=new NT(o-r);return this.oracle.doc.lineAt(r).to==o&&(f.flags|=4),f}ensureLine(){this.enterLine();let r=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(r instanceof N2)return r;let o=new N2(0,-1);return this.nodes.push(o),o}addBlock(r){this.enterLine();let o=r.deco;o&&o.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(r),this.writtenTo=this.pos=this.pos+r.length,o&&o.endSide>0&&(this.covering=r)}addLineDeco(r,o,f){let d=this.ensureLine();d.length+=f,d.collapsed+=f,d.widgetHeight=Math.max(d.widgetHeight,r),d.breaks+=o,this.writtenTo=this.pos=this.pos+f}finish(r){let o=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(o instanceof N2)&&!this.isCovered?this.nodes.push(new N2(0,-1)):(this.writtenToT.clientHeight||T.scrollWidth>T.clientWidth)&&A.overflow!="visible"){let j=T.getBoundingClientRect();b=Math.max(b,j.left),p=Math.min(p,j.right),v=Math.max(v,j.top),O=Math.min(C==l.parentNode?d.innerHeight:O,j.bottom)}C=A.position=="absolute"||A.position=="fixed"?T.offsetParent:T.parentNode}else if(C.nodeType==11)C=C.host;else break;return{left:b-o.left,right:Math.max(b,p)-o.left,top:v-(o.top+r),bottom:Math.max(v,O)-(o.top+r)}}function bin(l){let r=l.getBoundingClientRect(),o=l.ownerDocument.defaultView||window;return r.left0&&r.top0}function win(l,r){let o=l.getBoundingClientRect();return{left:0,right:o.right-o.left,top:r,bottom:o.bottom-(o.top+r)}}let nve=class{constructor(r,o,f,d){this.from=r,this.to=o,this.size=f,this.displaySize=d}static same(r,o){if(r.length!=o.length)return!1;for(let f=0;ftypeof f!="function"&&f.class=="cm-lineWrapping");this.heightOracle=new lin(o),this.stateDeco=r.facet(kR).filter(f=>typeof f!="function"),this.heightMap=Rw.empty().applyChanges(this.stateDeco,Nr.empty,this.heightOracle.setDoc(r.doc),[new p4(0,0,0,r.doc.length)]);for(let f=0;f<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());f++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=cs.set(this.lineGaps.map(f=>f.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let r=[this.viewport],{main:o}=this.state.selection;for(let f=0;f<=1;f++){let d=f?o.head:o.anchor;if(!r.some(({from:b,to:p})=>d>=b&&d<=p)){let{from:b,to:p}=this.lineBlockAt(d);r.push(new sG(b,p))}}return this.viewports=r.sort((f,d)=>f.from-d.from),this.updateScaler()}updateScaler(){let r=this.scaler;return this.scaler=this.heightMap.height<=7e6?x0t:new Oin(this.heightOracle,this.heightMap,this.viewports),r.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,r=>{this.viewportLines.push(GI(r,this.scaler))})}update(r,o=null){this.state=r.state;let f=this.stateDeco;this.stateDeco=this.state.facet(kR).filter(T=>typeof T!="function");let d=r.changedRanges,b=p4.extendWithRanges(d,din(f,this.stateDeco,r?r.changes:ef.empty(this.state.doc.length))),p=this.heightMap.height,v=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);O0t(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,r.startState.doc,this.heightOracle.setDoc(this.state.doc),b),(this.heightMap.height!=p||UT)&&(r.flags|=2),v?(this.scrollAnchorPos=r.changes.mapPos(v.from,-1),this.scrollAnchorHeight=v.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=p);let O=b.length?this.mapViewport(this.viewport,r.changes):this.viewport;(o&&(o.range.headO.to)||!this.viewportIsAppropriate(O))&&(O=this.getViewport(0,o));let C=O.from!=this.viewport.from||O.to!=this.viewport.to;this.viewport=O,r.flags|=this.updateForViewport(),(C||!r.changes.empty||r.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,r.changes))),r.flags|=this.computeVisibleRanges(r.changes),o&&(this.scrollTarget=o),!this.mustEnforceCursorAssoc&&r.selectionSet&&r.view.lineWrapping&&r.state.selection.main.empty&&r.state.selection.main.assoc&&!r.state.facet(w2t)&&(this.mustEnforceCursorAssoc=!0)}measure(r){let o=r.contentDOM,f=window.getComputedStyle(o),d=this.heightOracle,b=f.whiteSpace;this.defaultTextDirection=f.direction=="rtl"?al.RTL:al.LTR;let p=this.heightOracle.mustRefreshForWrapping(b),v=o.getBoundingClientRect(),O=p||this.mustMeasureContent||this.contentDOMHeight!=v.height;this.contentDOMHeight=v.height,this.mustMeasureContent=!1;let C=0,T=0;if(v.width&&v.height){let{scaleX:se,scaleY:ve}=_mt(o,v);(se>.005&&Math.abs(this.scaleX-se)>.005||ve>.005&&Math.abs(this.scaleY-ve)>.005)&&(this.scaleX=se,this.scaleY=ve,C|=16,p=O=!0)}let A=(parseInt(f.paddingTop)||0)*this.scaleY,j=(parseInt(f.paddingBottom)||0)*this.scaleY;(this.paddingTop!=A||this.paddingBottom!=j)&&(this.paddingTop=A,this.paddingBottom=j,C|=18),this.editorWidth!=r.scrollDOM.clientWidth&&(d.lineWrapping&&(O=!0),this.editorWidth=r.scrollDOM.clientWidth,C|=16);let $=r.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=$&&(this.scrollAnchorHeight=-1,this.scrollTop=$),this.scrolledToBottom=Qmt(r.scrollDOM);let L=(this.printing?win:pin)(o,this.paddingTop),z=L.top-this.pixelViewport.top,Z=L.bottom-this.pixelViewport.bottom;this.pixelViewport=L;let Y=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Y!=this.inView&&(this.inView=Y,Y&&(O=!0)),!this.inView&&!this.scrollTarget&&!bin(r.dom))return 0;let ne=v.width;if((this.contentDOMWidth!=ne||this.editorHeight!=r.scrollDOM.clientHeight)&&(this.contentDOMWidth=v.width,this.editorHeight=r.scrollDOM.clientHeight,C|=16),O){let se=r.docView.measureVisibleLineHeights(this.viewport);if(d.mustRefreshForHeights(se)&&(p=!0),p||d.lineWrapping&&Math.abs(ne-this.contentDOMWidth)>d.charWidth){let{lineHeight:ve,charWidth:Ce,textHeight:Ie}=r.docView.measureTextSize();p=ve>0&&d.refresh(b,ve,Ce,Ie,Math.max(5,ne/Ce),se),p&&(r.docView.minWidth=0,C|=16)}z>0&&Z>0?T=Math.max(z,Z):z<0&&Z<0&&(T=Math.min(z,Z)),O0t();for(let ve of this.viewports){let Ce=ve.from==this.viewport.from?se:r.docView.measureVisibleLineHeights(ve);this.heightMap=(p?Rw.empty().applyChanges(this.stateDeco,Nr.empty,this.heightOracle,[new p4(0,0,0,r.state.doc.length)]):this.heightMap).updateHeight(d,0,p,new uin(ve.from,Ce))}UT&&(C|=2)}let he=!this.viewportIsAppropriate(this.viewport,T)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return he&&(C&2&&(C|=this.updateScaler()),this.viewport=this.getViewport(T,this.scrollTarget),C|=this.updateForViewport()),(C&2||he)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(p?[]:this.lineGaps,r)),C|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,r.docView.enforceCursorAssoc()),C}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(r,o){let f=.5-Math.max(-.5,Math.min(.5,r/1e3/2)),d=this.heightMap,b=this.heightOracle,{visibleTop:p,visibleBottom:v}=this,O=new sG(d.lineAt(p-f*1e3,ul.ByHeight,b,0,0).from,d.lineAt(v+(1-f)*1e3,ul.ByHeight,b,0,0).to);if(o){let{head:C}=o.range;if(CO.to){let T=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),A=d.lineAt(C,ul.ByPos,b,0,0),j;o.y=="center"?j=(A.top+A.bottom)/2-T/2:o.y=="start"||o.y=="nearest"&&C=v+Math.max(10,Math.min(f,250)))&&d>p-2*1e3&&b>1,p=d<<1;if(this.defaultTextDirection!=al.LTR&&!f)return[];let v=[],O=(T,A,j,$)=>{if(A-TT&&YY.from>=j.from&&Y.to<=j.to&&Math.abs(Y.from-T)Y.fromne));if(!Z){if(Ahe.from<=A&&he.to>=A)){let he=o.moveToLineBoundary(St.cursor(A),!1,!0).head;he>T&&(A=he)}let Y=this.gapSize(j,T,A,$),ne=f||Y<2e6?Y:2e6;Z=new nve(T,A,Y,ne)}v.push(Z)},C=T=>{if(T.length2e6)for(let Ce of r)Ce.from>=T.from&&Ce.fromT.from&&O(T.from,$,T,A),Lo.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(r){let o=this.stateDeco;this.lineGaps.length&&(o=o.concat(this.lineGapDeco));let f=[];Jr.spans(o,this.viewport.from,this.viewport.to,{span(b,p){f.push({from:b,to:p})},point(){}},20);let d=0;if(f.length!=this.visibleRanges.length)d=12;else for(let b=0;b=this.viewport.from&&r<=this.viewport.to&&this.viewportLines.find(o=>o.from<=r&&o.to>=r)||GI(this.heightMap.lineAt(r,ul.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(r){return r>=this.viewportLines[0].top&&r<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(o=>o.top<=r&&o.bottom>=r)||GI(this.heightMap.lineAt(this.scaler.fromDOM(r),ul.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(r){let o=this.lineBlockAtHeight(r+8);return o.from>=this.viewport.from||this.viewportLines[0].top-r>200?o:this.viewportLines[0]}elementAtHeight(r){return GI(this.heightMap.blockAt(this.scaler.fromDOM(r),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},sG=class{constructor(r,o){this.from=r,this.to=o}};function vin(l,r,o){let f=[],d=l,b=0;return Jr.spans(o,l,r,{span(){},point(p,v){p>d&&(f.push({from:d,to:p}),b+=p-d),d=v}},20),d=1)return r[r.length-1].to;let f=Math.floor(l*o);for(let d=0;;d++){let{from:b,to:p}=r[d],v=p-b;if(f<=v)return b+f;f-=v}}function cG(l,r){let o=0;for(let{from:f,to:d}of l.ranges){if(r<=d){o+=r-f;break}o+=d-f}return o/l.total}function yin(l,r){for(let o of l)if(r(o))return o}const x0t={toDOM(l){return l},fromDOM(l){return l},scale:1,eq(l){return l==this}};let Oin=class F2t{constructor(r,o,f){let d=0,b=0,p=0;this.viewports=f.map(({from:v,to:O})=>{let C=o.lineAt(v,ul.ByPos,r,0,0).top,T=o.lineAt(O,ul.ByPos,r,0,0).bottom;return d+=T-C,{from:v,to:O,top:C,bottom:T,domTop:0,domBottom:0}}),this.scale=(7e6-d)/(o.height-d);for(let v of this.viewports)v.domTop=p+(v.top-b)*this.scale,p=v.domBottom=v.domTop+(v.bottom-v.top),b=v.bottom}toDOM(r){for(let o=0,f=0,d=0;;o++){let b=oo.from==r.viewports[f].from&&o.to==r.viewports[f].to):!1}};function GI(l,r){if(r.scale==1)return l;let o=r.toDOM(l.top),f=r.toDOM(l.bottom);return new o4(l.from,l.length,o,f-o,Array.isArray(l._content)?l._content.map(d=>GI(d,r)):l._content)}const lG=pn.define({combine:l=>l.join(" ")}),Uye=pn.define({combine:l=>l.indexOf(!0)>-1}),Gye=qa.newName(),_2t=qa.newName(),H2t=qa.newName(),q2t={"&light":"."+_2t,"&dark":"."+H2t};function Yye(l,r,o){return new qa(r,{finish(f){return/&/.test(f)?f.replace(/&\w*/,d=>{if(d=="&")return l;if(!o||!o[d])throw new RangeError(`Unsupported selector: ${d}`);return o[d]}):l+" "+f}})}const kin=Yye("."+Gye,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},q2t),Sin={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},ive=si.ie&&si.ie_version<=11;let xin=class{constructor(r){this.view=r,this.active=!1,this.editContext=null,this.selectionRange=new inn,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=r.contentDOM,this.observer=new MutationObserver(o=>{for(let f of o)this.queue.push(f);(si.ie&&si.ie_version<=11||si.ios&&r.composing)&&o.some(f=>f.type=="childList"&&f.removedNodes.length||f.type=="characterData"&&f.oldValue.length>f.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&si.android&&r.constructor.EDIT_CONTEXT!==!1&&!(si.chrome&&si.chrome_version<126)&&(this.editContext=new Tin(r),r.state.facet(zy)&&(r.contentDOM.editContext=this.editContext.editContext)),ive&&(this.onCharData=o=>{this.queue.push({target:o.target,type:"characterData",oldValue:o.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var o;((o=this.view.docView)===null||o===void 0?void 0:o.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),o.length>0&&o[o.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(o=>{o.length>0&&o[o.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(r){this.view.inputState.runHandlers("scroll",r),this.intersecting&&this.view.measure()}onScroll(r){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(r)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(r){(r.type=="change"||!r.type)&&!r.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(r){if(this.gapIntersection&&(r.length!=this.gaps.length||this.gaps.some((o,f)=>o!=r[f]))){this.gapIntersection.disconnect();for(let o of r)this.gapIntersection.observe(o);this.gaps=r}}onSelectionChange(r){let o=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:f}=this,d=this.selectionRange;if(f.state.facet(zy)?f.root.activeElement!=this.dom:!_G(this.dom,d))return;let b=d.anchorNode&&f.docView.nearest(d.anchorNode);if(b&&b.ignoreEvent(r)){o||(this.selectionChanged=!1);return}(si.ie&&si.ie_version<=11||si.android&&si.chrome)&&!f.state.selection.main.empty&&d.focusNode&&sR(d.focusNode,d.focusOffset,d.anchorNode,d.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:r}=this,o=OR(r.root);if(!o)return!1;let f=si.safari&&r.root.nodeType==11&&r.root.activeElement==this.dom&&Cin(this.view,o)||o;if(!f||this.selectionRange.eq(f))return!1;let d=_G(this.dom,f);return d&&!this.selectionChanged&&r.inputState.lastFocusTime>Date.now()-200&&r.inputState.lastTouchTime{let b=this.delayedAndroidKey;b&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=b.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&b.force&&$T(this.dom,b.key,b.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(d)}(!this.delayedAndroidKey||r=="Enter")&&(this.delayedAndroidKey={key:r,keyCode:o,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let r of this.observer.takeRecords())this.queue.push(r);return this.queue}processRecords(){let r=this.pendingRecords();r.length&&(this.queue=[]);let o=-1,f=-1,d=!1;for(let b of r){let p=this.readMutation(b);p&&(p.typeOver&&(d=!0),o==-1?{from:o,to:f}=p:(o=Math.min(p.from,o),f=Math.max(p.to,f)))}return{from:o,to:f,typeOver:d}}readChange(){let{from:r,to:o,typeOver:f}=this.processRecords(),d=this.selectionChanged&&_G(this.dom,this.selectionRange);if(r<0&&!d)return null;r>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let b=new _nn(this.view,r,o,f);return this.view.docView.domChanged={newSel:b.newSel?b.newSel.main:null},b}flush(r=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;r&&this.readSelectionRange();let o=this.readChange();if(!o)return this.view.requestMeasure(),!1;let f=this.view.state,d=E2t(this.view,o);return this.view.state==f&&(o.domChanged||o.newSel&&!o.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),d}readMutation(r){let o=this.view.docView.nearest(r.target);if(!o||o.ignoreMutation(r))return null;if(o.markDirty(r.type=="attributes"),r.type=="attributes"&&(o.flags|=4),r.type=="childList"){let f=C0t(o,r.previousSibling||r.target.previousSibling,-1),d=C0t(o,r.nextSibling||r.target.nextSibling,1);return{from:f?o.posAfter(f):o.posAtStart,to:d?o.posBefore(d):o.posAtEnd,typeOver:!1}}else return r.type=="characterData"?{from:o.posAtStart,to:o.posAtEnd,typeOver:r.target.nodeValue==r.oldValue}:null}setWindow(r){r!=this.win&&(this.removeWindowListeners(this.win),this.win=r,this.addWindowListeners(this.win))}addWindowListeners(r){r.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):r.addEventListener("beforeprint",this.onPrint),r.addEventListener("scroll",this.onScroll),r.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(r){r.removeEventListener("scroll",this.onScroll),r.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):r.removeEventListener("beforeprint",this.onPrint),r.document.removeEventListener("selectionchange",this.onSelectionChange)}update(r){this.editContext&&(this.editContext.update(r),r.startState.facet(zy)!=r.state.facet(zy)&&(r.view.contentDOM.editContext=r.state.facet(zy)?this.editContext.editContext:null))}destroy(){var r,o,f;this.stop(),(r=this.intersection)===null||r===void 0||r.disconnect(),(o=this.gapIntersection)===null||o===void 0||o.disconnect(),(f=this.resizeScroll)===null||f===void 0||f.disconnect();for(let d of this.scrollTargets)d.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function C0t(l,r,o){for(;r;){let f=$l.get(r);if(f&&f.parent==l)return f;let d=r.parentNode;r=d!=l.dom?d:o>0?r.nextSibling:r.previousSibling}return null}function T0t(l,r){let o=r.startContainer,f=r.startOffset,d=r.endContainer,b=r.endOffset,p=l.docView.domAtPos(l.state.selection.main.anchor);return sR(p.node,p.offset,d,b)&&([o,f,d,b]=[d,b,o,f]),{anchorNode:o,anchorOffset:f,focusNode:d,focusOffset:b}}function Cin(l,r){if(r.getComposedRanges){let d=r.getComposedRanges(l.root)[0];if(d)return T0t(l,d)}let o=null;function f(d){d.preventDefault(),d.stopImmediatePropagation(),o=d.getTargetRanges()[0]}return l.contentDOM.addEventListener("beforeinput",f,!0),l.dom.ownerDocument.execCommand("indent"),l.contentDOM.removeEventListener("beforeinput",f,!0),o?T0t(l,o):null}let Tin=class{constructor(r){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(r.state);let o=this.editContext=new window.EditContext({text:r.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,r.state.selection.main.anchor))),selectionEnd:this.toContextPos(r.state.selection.main.head)});this.handlers.textupdate=f=>{let d=r.state.selection.main,{anchor:b,head:p}=d,v=this.toEditorPos(f.updateRangeStart),O=this.toEditorPos(f.updateRangeEnd);r.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:f.updateRangeStart,editorBase:v,drifted:!1});let C={from:v,to:O,insert:Nr.of(f.text.split(` +`))};if(C.from==this.from&&bthis.to&&(C.to=b),C.from==C.to&&!C.insert.length){let T=St.single(this.toEditorPos(f.selectionStart),this.toEditorPos(f.selectionEnd));T.main.eq(d)||r.dispatch({selection:T,userEvent:"select"});return}if((si.mac||si.android)&&C.from==p-1&&/^\. ?$/.test(f.text)&&r.contentDOM.getAttribute("autocorrect")=="off"&&(C={from:v,to:O,insert:Nr.of([f.text.replace("."," ")])}),this.pendingContextChange=C,!r.state.readOnly){let T=this.to-this.from+(C.to-C.from+C.insert.length);vOe(r,C,St.single(this.toEditorPos(f.selectionStart,T),this.toEditorPos(f.selectionEnd,T)))}this.pendingContextChange&&(this.revertPending(r.state),this.setSelection(r.state))},this.handlers.characterboundsupdate=f=>{let d=[],b=null;for(let p=this.toEditorPos(f.rangeStart),v=this.toEditorPos(f.rangeEnd);p{let d=[];for(let b of f.getTextFormats()){let p=b.underlineStyle,v=b.underlineThickness;if(p!="None"&&v!="None"){let O=this.toEditorPos(b.rangeStart),C=this.toEditorPos(b.rangeEnd);if(O{r.inputState.composing<0&&(r.inputState.composing=0,r.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(r.inputState.composing=-1,r.inputState.compositionFirstChange=null,this.composing){let{drifted:f}=this.composing;this.composing=null,f&&this.reset(r.state)}};for(let f in this.handlers)o.addEventListener(f,this.handlers[f]);this.measureReq={read:f=>{this.editContext.updateControlBounds(f.contentDOM.getBoundingClientRect());let d=OR(f.root);d&&d.rangeCount&&this.editContext.updateSelectionBounds(d.getRangeAt(0).getBoundingClientRect())}}}applyEdits(r){let o=0,f=!1,d=this.pendingContextChange;return r.changes.iterChanges((b,p,v,O,C)=>{if(f)return;let T=C.length-(p-b);if(d&&p>=d.to)if(d.from==b&&d.to==p&&d.insert.eq(C)){d=this.pendingContextChange=null,o+=T,this.to+=T;return}else d=null,this.revertPending(r.state);if(b+=o,p+=o,p<=this.from)this.from+=T,this.to+=T;else if(bthis.to||this.to-this.from+C.length>3e4){f=!0;return}this.editContext.updateText(this.toContextPos(b),this.toContextPos(p),C.toString()),this.to+=T}o+=T}),d&&!f&&this.revertPending(r.state),!f}update(r){let o=this.pendingContextChange,f=r.startState.selection.main;this.composing&&(this.composing.drifted||!r.changes.touchesRange(f.from,f.to)&&r.transactions.some(d=>!d.isUserEvent("input.type")&&d.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=r.changes.mapPos(this.composing.editorBase)):!this.applyEdits(r)||!this.rangeIsValid(r.state)?(this.pendingContextChange=null,this.reset(r.state)):(r.docChanged||r.selectionSet||o)&&this.setSelection(r.state),(r.geometryChanged||r.docChanged||r.selectionSet)&&r.view.requestMeasure(this.measureReq)}resetRange(r){let{head:o}=r.selection.main;this.from=Math.max(0,o-1e4),this.to=Math.min(r.doc.length,o+1e4)}reset(r){this.resetRange(r),this.editContext.updateText(0,this.editContext.text.length,r.doc.sliceString(this.from,this.to)),this.setSelection(r)}revertPending(r){let o=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(o.from),this.toContextPos(o.from+o.insert.length),r.doc.sliceString(o.from,o.to))}setSelection(r){let{main:o}=r.selection,f=this.toContextPos(Math.max(this.from,Math.min(this.to,o.anchor))),d=this.toContextPos(o.head);(this.editContext.selectionStart!=f||this.editContext.selectionEnd!=d)&&this.editContext.updateSelection(f,d)}rangeIsValid(r){let{head:o}=r.selection.main;return!(this.from>0&&o-this.from<500||this.to1e4*3)}toEditorPos(r,o=this.to-this.from){r=Math.min(r,o);let f=this.composing;return f&&f.drifted?f.editorBase+(r-f.contextBase):r+this.from}toContextPos(r){let o=this.composing;return o&&o.drifted?o.contextBase+(r-o.editorBase):r-this.from}destroy(){for(let r in this.handlers)this.editContext.removeEventListener(r,this.handlers[r])}},Mi=class Zye{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(r={}){var o;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),r.parent&&r.parent.appendChild(this.dom);let{dispatch:f}=r;this.dispatchTransactions=r.dispatchTransactions||f&&(d=>d.forEach(b=>f(b,this)))||(d=>this.update(d)),this.dispatch=this.dispatch.bind(this),this._root=r.root||rnn(r.parent)||document,this.viewState=new S0t(r.state||Zr.create(r)),r.scrollTo&&r.scrollTo.is(nG)&&(this.viewState.scrollTarget=r.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(xT).map(d=>new J2e(d));for(let d of this.plugins)d.update(this);this.observer=new xin(this),this.inputState=new Wnn(this),this.inputState.ensureHandlers(this.plugins),this.docView=new r0t(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((o=document.fonts)===null||o===void 0)&&o.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...r){let o=r.length==1&&r[0]instanceof tf?r:r.length==1&&Array.isArray(r[0])?r[0]:[this.state.update(...r)];this.dispatchTransactions(o,this)}update(r){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let o=!1,f=!1,d,b=this.state;for(let j of r){if(j.startState!=b)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");b=j.state}if(this.destroyed){this.viewState.state=b;return}let p=this.hasFocus,v=0,O=null;r.some(j=>j.annotation($2t))?(this.inputState.notifiedFocused=p,v=1):p!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=p,O=N2t(b,p),O||(v=1));let C=this.observer.delayedAndroidKey,T=null;if(C?(this.observer.clearDelayedAndroidKey(),T=this.observer.readChange(),(T&&!this.state.doc.eq(b.doc)||!this.state.selection.eq(b.selection))&&(T=null)):this.observer.clear(),b.facet(Zr.phrases)!=this.state.facet(Zr.phrases))return this.setState(b);d=i0t.create(this,b,r),d.flags|=v;let A=this.viewState.scrollTarget;try{this.updateState=2;for(let j of r){if(A&&(A=A.map(j.changes)),j.scrollIntoView){let{main:$}=j.state.selection;A=new Z2e($.empty?$:St.cursor($.head,$.head>$.anchor?-1:1))}for(let $ of j.effects)$.is(nG)&&(A=$.value.clip(this.state))}this.viewState.update(d,A),this.bidiCache=A0t.update(this.bidiCache,d.changes),d.empty||(this.updatePlugins(d),this.inputState.update(d)),o=this.docView.update(d),this.state.facet(XI)!=this.styleModules&&this.mountStyles(),f=this.updateAttrs(),this.showAnnouncements(r),this.docView.updateSelection(o,r.some(j=>j.isUserEvent("select.pointer")))}finally{this.updateState=0}if(d.startState.facet(lG)!=d.state.facet(lG)&&(this.viewState.mustMeasureContent=!0),(o||f||A||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),o&&this.docViewUpdate(),!d.empty)for(let j of this.state.facet(qye))try{j(d)}catch($){W1(this.state,$,"update listener")}(O||T)&&Promise.resolve().then(()=>{O&&this.state==O.startState&&this.dispatch(O),T&&!E2t(this,T)&&C.force&&$T(this.contentDOM,C.key,C.keyCode)})}setState(r){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=r;return}this.updateState=2;let o=this.hasFocus;try{for(let f of this.plugins)f.destroy(this);this.viewState=new S0t(r),this.plugins=r.facet(xT).map(f=>new J2e(f)),this.pluginMap.clear();for(let f of this.plugins)f.update(this);this.docView.destroy(),this.docView=new r0t(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}o&&this.focus(),this.requestMeasure()}updatePlugins(r){let o=r.startState.facet(xT),f=r.state.facet(xT);if(o!=f){let d=[];for(let b of f){let p=o.indexOf(b);if(p<0)d.push(new J2e(b));else{let v=this.plugins[p];v.mustUpdate=r,d.push(v)}}for(let b of this.plugins)b.mustUpdate!=r&&b.destroy(this);this.plugins=d,this.pluginMap.clear()}else for(let d of this.plugins)d.mustUpdate=r;for(let d=0;d-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,r&&this.observer.forceFlush();let o=null,f=this.scrollDOM,d=f.scrollTop*this.scaleY,{scrollAnchorPos:b,scrollAnchorHeight:p}=this.viewState;Math.abs(d-this.viewState.scrollTop)>1&&(p=-1),this.viewState.scrollAnchorHeight=-1;try{for(let v=0;;v++){if(p<0)if(Qmt(f))b=-1,p=this.viewState.heightMap.height;else{let $=this.viewState.scrollAnchorAt(d);b=$.from,p=$.top}this.updateState=1;let O=this.viewState.measure(this);if(!O&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(v>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let C=[];O&4||([this.measureRequests,C]=[C,this.measureRequests]);let T=C.map($=>{try{return $.read(this)}catch(L){return W1(this.state,L),E0t}}),A=i0t.create(this,this.state,[]),j=!1;A.flags|=O,o?o.flags|=O:o=A,this.updateState=2,A.empty||(this.updatePlugins(A),this.inputState.update(A),this.updateAttrs(),j=this.docView.update(A),j&&this.docViewUpdate());for(let $=0;$1||L<-1){d=d+L,f.scrollTop=d/this.scaleY,p=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(o&&!o.empty)for(let v of this.state.facet(qye))v(o)}get themeClasses(){return Gye+" "+(this.state.facet(Uye)?H2t:_2t)+" "+this.state.facet(lG)}updateAttrs(){let r=M0t(this,y2t,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),o={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(zy)?"true":"false",class:"cm-content",style:`${si.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(o["aria-readonly"]="true"),M0t(this,bOe,o);let f=this.observer.ignore(()=>{let d=Lye(this.contentDOM,this.contentAttrs,o),b=Lye(this.dom,this.editorAttrs,r);return d||b});return this.editorAttrs=r,this.contentAttrs=o,f}showAnnouncements(r){let o=!0;for(let f of r)for(let d of f.effects)if(d.is(Zye.announce)){o&&(this.announceDOM.textContent=""),o=!1;let b=this.announceDOM.appendChild(document.createElement("div"));b.textContent=d.value}}mountStyles(){this.styleModules=this.state.facet(XI);let r=this.state.facet(Zye.cspNonce);qa.mount(this.root,this.styleModules.concat(kin).reverse(),r?{nonce:r}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(r){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),r){if(this.measureRequests.indexOf(r)>-1)return;if(r.key!=null){for(let o=0;of.plugin==r)||null),o&&o.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(r){return this.readMeasured(),this.viewState.elementAtHeight(r)}lineBlockAtHeight(r){return this.readMeasured(),this.viewState.lineBlockAtHeight(r)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(r){return this.viewState.lineBlockAt(r)}get contentHeight(){return this.viewState.contentHeight}moveByChar(r,o,f){return tve(this,r,u0t(this,r,o,f))}moveByGroup(r,o){return tve(this,r,u0t(this,r,o,f=>Rnn(this,r.head,f)))}visualLineSide(r,o){let f=this.bidiSpans(r),d=this.textDirectionAt(r.from),b=f[o?f.length-1:0];return St.cursor(b.side(o,d)+r.from,b.forward(!o,d)?1:-1)}moveToLineBoundary(r,o,f=!0){return Inn(this,r,o,f)}moveVertically(r,o,f){return tve(this,r,Lnn(this,r,o,f))}domAtPos(r){return this.docView.domAtPos(r)}posAtDOM(r,o=0){return this.docView.posFromDOM(r,o)}posAtCoords(r,o=!0){return this.readMeasured(),T2t(this,r,o)}coordsAtPos(r,o=1){this.readMeasured();let f=this.docView.coordsAt(r,o);if(!f||f.left==f.right)return f;let d=this.state.doc.lineAt(r),b=this.bidiSpans(d),p=b[f4.find(b,r-d.from,-1,o)];return WR(f,p.dir==al.LTR==o>0)}coordsForChar(r){return this.readMeasured(),this.docView.coordsForChar(r)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(r){return!this.state.facet(b2t)||rthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(r))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(r){if(r.length>Ein)return l2t(r.length);let o=this.textDirectionAt(r.from),f;for(let b of this.bidiCache)if(b.from==r.from&&b.dir==o&&(b.fresh||c2t(b.isolates,f=n0t(this,r))))return b.order;f||(f=n0t(this,r));let d=vnn(r.text,o,f);return this.bidiCache.push(new A0t(r.from,r.to,o,f,!0,d)),d}get hasFocus(){var r;return(this.dom.ownerDocument.hasFocus()||si.safari&&((r=this.inputState)===null||r===void 0?void 0:r.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Hmt(this.contentDOM),this.docView.updateSelection()})}setRoot(r){this._root!=r&&(this._root=r,this.observer.setWindow((r.nodeType==9?r:r.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let r of this.plugins)r.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(r,o={}){return nG.of(new Z2e(typeof r=="number"?St.cursor(r):r,o.y,o.x,o.yMargin,o.xMargin))}scrollSnapshot(){let{scrollTop:r,scrollLeft:o}=this.scrollDOM,f=this.viewState.scrollAnchorAt(r);return nG.of(new Z2e(St.cursor(f.from),"start","start",f.top-r,o,!0))}setTabFocusMode(r){r==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof r=="boolean"?this.inputState.tabFocusMode=r?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+r)}static domEventHandlers(r){return Qa.define(()=>({}),{eventHandlers:r})}static domEventObservers(r){return Qa.define(()=>({}),{eventObservers:r})}static theme(r,o){let f=qa.newName(),d=[lG.of(f),XI.of(Yye(`.${f}`,r))];return o&&o.dark&&d.push(Uye.of(!0)),d}static baseTheme(r){return qw.lowest(XI.of(Yye("."+Gye,r,q2t)))}static findFromDOM(r){var o;let f=r.querySelector(".cm-content"),d=f&&$l.get(f)||$l.get(r);return((o=d==null?void 0:d.rootView)===null||o===void 0?void 0:o.view)||null}};Mi.styleModule=XI;Mi.inputHandler=g2t;Mi.clipboardInputFilter=gOe;Mi.clipboardOutputFilter=pOe;Mi.scrollHandler=m2t;Mi.focusChangeEffect=p2t;Mi.perLineTextDirection=b2t;Mi.exceptionSink=d2t;Mi.updateListener=qye;Mi.editable=zy;Mi.mouseSelectionStyle=a2t;Mi.dragMovesSelection=h2t;Mi.clickAddsSelectionRange=f2t;Mi.decorations=kR;Mi.outerDecorations=O2t;Mi.atomicRanges=wOe;Mi.bidiIsolatedRanges=k2t;Mi.scrollMargins=S2t;Mi.darkTheme=Uye;Mi.cspNonce=pn.define({combine:l=>l.length?l[0]:""});Mi.contentAttributes=bOe;Mi.editorAttributes=y2t;Mi.lineWrapping=Mi.contentAttributes.of({class:"cm-lineWrapping"});Mi.announce=ar.define();const Ein=4096,E0t={};let A0t=class Q2t{constructor(r,o,f,d,b,p){this.from=r,this.to=o,this.dir=f,this.isolates=d,this.fresh=b,this.order=p}static update(r,o){if(o.empty&&!r.some(b=>b.fresh))return r;let f=[],d=r.length?r[r.length-1].dir:al.LTR;for(let b=Math.max(0,r.length-10);b=0;d--){let b=f[d],p=typeof b=="function"?b(l):b;p&&Rye(p,o)}return o}const Ain=si.mac?"mac":si.windows?"win":si.linux?"linux":"key";function Min(l,r){const o=l.split(/-(?!$)/);let f=o[o.length-1];f=="Space"&&(f=" ");let d,b,p,v;for(let O=0;Of.concat(d),[]))),o}let c4=null;const Din=4e3;function $in(l,r=Ain){let o=Object.create(null),f=Object.create(null),d=(p,v)=>{let O=f[p];if(O==null)f[p]=v;else if(O!=v)throw new Error("Key binding "+p+" is used both as a regular binding and as a multi-stroke prefix")},b=(p,v,O,C,T)=>{var A,j;let $=o[p]||(o[p]=Object.create(null)),L=v.split(/ (?!$)/).map(Y=>Min(Y,r));for(let Y=1;Y{let se=c4={view:he,prefix:ne,scope:p};return setTimeout(()=>{c4==se&&(c4=null)},Din),!0}]})}let z=L.join(" ");d(z,!1);let Z=$[z]||($[z]={preventDefault:!1,stopPropagation:!1,run:((j=(A=$._any)===null||A===void 0?void 0:A.run)===null||j===void 0?void 0:j.slice())||[]});O&&Z.run.push(O),C&&(Z.preventDefault=!0),T&&(Z.stopPropagation=!0)};for(let p of l){let v=p.scope?p.scope.split(" "):["editor"];if(p.any)for(let C of v){let T=o[C]||(o[C]=Object.create(null));T._any||(T._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:A}=p;for(let j in T)T[j].run.push($=>A($,Jye))}let O=p[r]||p.key;if(O)for(let C of v)b(C,O,p.run,p.preventDefault,p.stopPropagation),p.shift&&b(C,"Shift-"+O,p.shift,p.preventDefault,p.stopPropagation)}return o}let Jye=null;function Nin(l,r,o,f){Jye=r;let d=Bmt(r),b=Dd(d,0),p=Nw(b)==d.length&&d!=" ",v="",O=!1,C=!1,T=!1;c4&&c4.view==o&&c4.scope==f&&(v=c4.prefix+" ",M2t.indexOf(r.keyCode)<0&&(C=!0,c4=null));let A=new Set,j=Z=>{if(Z){for(let Y of Z.run)if(!A.has(Y)&&(A.add(Y),Y(o)))return Z.stopPropagation&&(T=!0),!0;Z.preventDefault&&(Z.stopPropagation&&(T=!0),C=!0)}return!1},$=l[f],L,z;return $&&(j($[v+uG(d,r,!p)])?O=!0:p&&(r.altKey||r.metaKey||r.ctrlKey)&&!(si.windows&&r.ctrlKey&&r.altKey)&&!(si.mac&&r.altKey&&!r.ctrlKey)&&(L=Yy[r.keyCode])&&L!=d?(j($[v+uG(L,r,!0)])||r.shiftKey&&(z=zT[r.keyCode])!=d&&z!=L&&j($[v+uG(z,r,!1)]))&&(O=!0):p&&r.shiftKey&&j($[v+uG(d,r,!0)])&&(O=!0),!O&&j($._any)&&(O=!0)),C&&(O=!0),O&&T&&r.stopPropagation(),Jye=null,O}class KR{constructor(r,o,f,d,b){this.className=r,this.left=o,this.top=f,this.width=d,this.height=b}draw(){let r=document.createElement("div");return r.className=this.className,this.adjust(r),r}update(r,o){return o.className!=this.className?!1:(this.adjust(r),!0)}adjust(r){r.style.left=this.left+"px",r.style.top=this.top+"px",this.width!=null&&(r.style.width=this.width+"px"),r.style.height=this.height+"px"}eq(r){return this.left==r.left&&this.top==r.top&&this.width==r.width&&this.height==r.height&&this.className==r.className}static forRange(r,o,f){if(f.empty){let d=r.coordsAtPos(f.head,f.assoc||1);if(!d)return[];let b=z2t(r);return[new KR(o,d.left-b.left,d.top-b.top,null,d.bottom-d.top)]}else return Iin(r,o,f)}}function z2t(l){let r=l.scrollDOM.getBoundingClientRect();return{left:(l.textDirection==al.LTR?r.left:r.right-l.scrollDOM.clientWidth*l.scaleX)-l.scrollDOM.scrollLeft*l.scaleX,top:r.top-l.scrollDOM.scrollTop*l.scaleY}}function j0t(l,r,o,f){let d=l.coordsAtPos(r,o*2);if(!d)return f;let b=l.dom.getBoundingClientRect(),p=(d.top+d.bottom)/2,v=l.posAtCoords({x:b.left+1,y:p}),O=l.posAtCoords({x:b.right-1,y:p});return v==null||O==null?f:{from:Math.max(f.from,Math.min(v,O)),to:Math.min(f.to,Math.max(v,O))}}function Iin(l,r,o){if(o.to<=l.viewport.from||o.from>=l.viewport.to)return[];let f=Math.max(o.from,l.viewport.from),d=Math.min(o.to,l.viewport.to),b=l.textDirection==al.LTR,p=l.contentDOM,v=p.getBoundingClientRect(),O=z2t(l),C=p.querySelector(".cm-line"),T=C&&window.getComputedStyle(C),A=v.left+(T?parseInt(T.paddingLeft)+Math.min(0,parseInt(T.textIndent)):0),j=v.right-(T?parseInt(T.paddingRight):0),$=Kye(l,f,1),L=Kye(l,d,-1),z=$.type==Nd.Text?$:null,Z=L.type==Nd.Text?L:null;if(z&&(l.lineWrapping||$.widgetLineBreaks)&&(z=j0t(l,f,1,z)),Z&&(l.lineWrapping||L.widgetLineBreaks)&&(Z=j0t(l,d,-1,Z)),z&&Z&&z.from==Z.from&&z.to==Z.to)return ne(he(o.from,o.to,z));{let ve=z?he(o.from,null,z):se($,!1),Ce=Z?he(null,o.to,Z):se(L,!0),Ie=[];return(z||$).to<(Z||L).from-(z&&Z?1:0)||$.widgetLineBreaks>1&&ve.bottom+l.defaultLineHeight/2at&&le.from=it)break;Nt>Ze&&st(Math.max(Je,Ze),ve==null&&Je<=at,Math.min(Nt,it),Ce==null&&Nt>=ut,X.dir)}if(Ze=Tt.to+1,Ze>=it)break}return ft.length==0&&st(at,ve==null,ut,Ce==null,l.textDirection),{top:nt,bottom:Re,horizontal:ft}}function se(ve,Ce){let Ie=v.top+(Ce?ve.top:ve.bottom);return{top:Ie,bottom:Ie,horizontal:[]}}}function Rin(l,r){return l.constructor==r.constructor&&l.eq(r)}class Lin{constructor(r,o){this.view=r,this.layer=o,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=r.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),o.above&&this.dom.classList.add("cm-layer-above"),o.class&&this.dom.classList.add(o.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(r.state),r.requestMeasure(this.measureReq),o.mount&&o.mount(this.dom,r)}update(r){r.startState.facet(VG)!=r.state.facet(VG)&&this.setOrder(r.state),(this.layer.update(r,this.dom)||r.geometryChanged)&&(this.scale(),r.view.requestMeasure(this.measureReq))}docViewUpdate(r){this.layer.updateOnDocViewUpdate!==!1&&r.requestMeasure(this.measureReq)}setOrder(r){let o=0,f=r.facet(VG);for(;o!Rin(o,this.drawn[f]))){let o=this.dom.firstChild,f=0;for(let d of r)d.update&&o&&d.constructor&&this.drawn[f].constructor&&d.update(o,this.drawn[f])?(o=o.nextSibling,f++):this.dom.insertBefore(d.draw(),o);for(;o;){let d=o.nextSibling;o.remove(),o=d}this.drawn=r}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const VG=pn.define();function W2t(l){return[Qa.define(r=>new Lin(r,l)),VG.of(l)]}const SR=pn.define({combine(l){return U2(l,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(r,o)=>Math.min(r,o),drawRangeCursor:(r,o)=>r||o})}});function Bin(l={}){return[SR.of(l),Fin,_in,Hin,w2t.of(!0)]}function K2t(l){return l.startState.facet(SR)!=l.state.facet(SR)}const Fin=W2t({above:!0,markers(l){let{state:r}=l,o=r.facet(SR),f=[];for(let d of r.selection.ranges){let b=d==r.selection.main;if(d.empty||o.drawRangeCursor){let p=b?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",v=d.empty?d:St.cursor(d.head,d.head>d.anchor?-1:1);for(let O of KR.forRange(l,p,v))f.push(O)}}return f},update(l,r){l.transactions.some(f=>f.selection)&&(r.style.animationName=r.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let o=K2t(l);return o&&D0t(l.state,r),l.docChanged||l.selectionSet||o},mount(l,r){D0t(r.state,l)},class:"cm-cursorLayer"});function D0t(l,r){r.style.animationDuration=l.facet(SR).cursorBlinkRate+"ms"}const _in=W2t({above:!1,markers(l){return l.state.selection.ranges.map(r=>r.empty?[]:KR.forRange(l,"cm-selectionBackground",r)).reduce((r,o)=>r.concat(o))},update(l,r){return l.docChanged||l.selectionSet||l.viewportChanged||K2t(l)},class:"cm-selectionLayer"}),Hin=qw.highest(Mi.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),V2t=ar.define({map(l,r){return l==null?null:r.mapPos(l)}}),YI=Sf.define({create(){return null},update(l,r){return l!=null&&(l=r.changes.mapPos(l)),r.effects.reduce((o,f)=>f.is(V2t)?f.value:o,l)}}),qin=Qa.fromClass(class{constructor(l){this.view=l,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(l){var r;let o=l.state.field(YI);o==null?this.cursor!=null&&((r=this.cursor)===null||r===void 0||r.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(l.startState.field(YI)!=o||l.docChanged||l.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:l}=this,r=l.state.field(YI),o=r!=null&&l.coordsAtPos(r);if(!o)return null;let f=l.scrollDOM.getBoundingClientRect();return{left:o.left-f.left+l.scrollDOM.scrollLeft*l.scaleX,top:o.top-f.top+l.scrollDOM.scrollTop*l.scaleY,height:o.bottom-o.top}}drawCursor(l){if(this.cursor){let{scaleX:r,scaleY:o}=this.view;l?(this.cursor.style.left=l.left/r+"px",this.cursor.style.top=l.top/o+"px",this.cursor.style.height=l.height/o+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(l){this.view.state.field(YI)!=l&&this.view.dispatch({effects:V2t.of(l)})}},{eventObservers:{dragover(l){this.setDropPos(this.view.posAtCoords({x:l.clientX,y:l.clientY}))},dragleave(l){(l.target==this.view.contentDOM||!this.view.contentDOM.contains(l.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Qin(){return[YI,qin]}function $0t(l,r,o,f,d){r.lastIndex=0;for(let b=l.iterRange(o,f),p=o,v;!b.next().done;p+=b.value.length)if(!b.lineBreak)for(;v=r.exec(b.value);)d(p+v.index,v)}function zin(l,r){let o=l.visibleRanges;if(o.length==1&&o[0].from==l.viewport.from&&o[0].to==l.viewport.to)return o;let f=[];for(let{from:d,to:b}of o)d=Math.max(l.state.doc.lineAt(d).from,d-r),b=Math.min(l.state.doc.lineAt(b).to,b+r),f.length&&f[f.length-1].to>=d?f[f.length-1].to=b:f.push({from:d,to:b});return f}class Win{constructor(r){const{regexp:o,decoration:f,decorate:d,boundary:b,maxLength:p=1e3}=r;if(!o.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=o,d)this.addMatch=(v,O,C,T)=>d(T,C,C+v[0].length,v,O);else if(typeof f=="function")this.addMatch=(v,O,C,T)=>{let A=f(v,O,C);A&&T(C,C+v[0].length,A)};else if(f)this.addMatch=(v,O,C,T)=>T(C,C+v[0].length,f);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=b,this.maxLength=p}createDeco(r){let o=new W2,f=o.add.bind(o);for(let{from:d,to:b}of zin(r,this.maxLength))$0t(r.state.doc,this.regexp,d,b,(p,v)=>this.addMatch(v,r,p,f));return o.finish()}updateDeco(r,o){let f=1e9,d=-1;return r.docChanged&&r.changes.iterChanges((b,p,v,O)=>{O>=r.view.viewport.from&&v<=r.view.viewport.to&&(f=Math.min(v,f),d=Math.max(O,d))}),r.viewportMoved||d-f>1e3?this.createDeco(r.view):d>-1?this.updateRange(r.view,o.map(r.changes),f,d):o}updateRange(r,o,f,d){for(let b of r.visibleRanges){let p=Math.max(b.from,f),v=Math.min(b.to,d);if(v>=p){let O=r.state.doc.lineAt(p),C=O.toO.from;p--)if(this.boundary.test(O.text[p-1-O.from])){T=p;break}for(;vj.push(Y.range(z,Z));if(O==C)for(this.regexp.lastIndex=T-O.from;($=this.regexp.exec(O.text))&&$.indexthis.addMatch(Z,r,z,L));o=o.update({filterFrom:T,filterTo:A,filter:(z,Z)=>zA,add:j})}}return o}}const e3e=/x/.unicode!=null?"gu":"g",Kin=new RegExp(`[\0-\b +--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,e3e),Vin={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let rve=null;function Xin(){var l;if(rve==null&&typeof document<"u"&&document.body){let r=document.body.style;rve=((l=r.tabSize)!==null&&l!==void 0?l:r.MozTabSize)!=null}return rve||!1}const XG=pn.define({combine(l){let r=U2(l,{render:null,specialChars:Kin,addSpecialChars:null});return(r.replaceTabs=!Xin())&&(r.specialChars=new RegExp(" |"+r.specialChars.source,e3e)),r.addSpecialChars&&(r.specialChars=new RegExp(r.specialChars.source+"|"+r.addSpecialChars.source,e3e)),r}});function Uin(l={}){return[XG.of(l),Gin()]}let N0t=null;function Gin(){return N0t||(N0t=Qa.fromClass(class{constructor(l){this.view=l,this.decorations=cs.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(l.state.facet(XG)),this.decorations=this.decorator.createDeco(l)}makeDecorator(l){return new Win({regexp:l.specialChars,decoration:(r,o,f)=>{let{doc:d}=o.state,b=Dd(r[0],0);if(b==9){let p=d.lineAt(f),v=o.state.tabSize,O=rE(p.text,v,f-p.from);return cs.replace({widget:new ern((v-O%v)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[b]||(this.decorationCache[b]=cs.replace({widget:new Jin(l,b)}))},boundary:l.replaceTabs?void 0:/[^]/})}update(l){let r=l.state.facet(XG);l.startState.facet(XG)!=r?(this.decorator=this.makeDecorator(r),this.decorations=this.decorator.createDeco(l.view)):this.decorations=this.decorator.updateDeco(l,this.decorations)}},{decorations:l=>l.decorations}))}const Yin="•";function Zin(l){return l>=32?Yin:l==10?"␤":String.fromCharCode(9216+l)}class Jin extends e3{constructor(r,o){super(),this.options=r,this.code=o}eq(r){return r.code==this.code}toDOM(r){let o=Zin(this.code),f=r.state.phrase("Control character")+" "+(Vin[this.code]||"0x"+this.code.toString(16)),d=this.options.render&&this.options.render(this.code,f,o);if(d)return d;let b=document.createElement("span");return b.textContent=o,b.title=f,b.setAttribute("aria-label",f),b.className="cm-specialChar",b}ignoreEvent(){return!1}}class ern extends e3{constructor(r){super(),this.width=r}eq(r){return r.width==this.width}toDOM(){let r=document.createElement("span");return r.textContent=" ",r.className="cm-tab",r.style.width=this.width+"px",r}ignoreEvent(){return!1}}function trn(){return irn}const nrn=cs.line({class:"cm-activeLine"}),irn=Qa.fromClass(class{constructor(l){this.decorations=this.getDeco(l)}update(l){(l.docChanged||l.selectionSet)&&(this.decorations=this.getDeco(l.view))}getDeco(l){let r=-1,o=[];for(let f of l.state.selection.ranges){let d=l.lineBlockAt(f.head);d.from>r&&(o.push(nrn.range(d.from)),r=d.from)}return cs.set(o)}},{decorations:l=>l.decorations});class rrn extends e3{constructor(r){super(),this.content=r}toDOM(r){let o=document.createElement("span");return o.className="cm-placeholder",o.style.pointerEvents="none",o.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(r):this.content.cloneNode(!0)),o.setAttribute("aria-hidden","true"),o}coordsAt(r){let o=r.firstChild?WT(r.firstChild):[];if(!o.length)return null;let f=window.getComputedStyle(r.parentNode),d=WR(o[0],f.direction!="rtl"),b=parseInt(f.lineHeight);return d.bottom-d.top>b*1.5?{left:d.left,right:d.right,top:d.top,bottom:d.top+b}:d}ignoreEvent(){return!1}}function srn(l){let r=Qa.fromClass(class{constructor(o){this.view=o,this.placeholder=l?cs.set([cs.widget({widget:new rrn(l),side:1}).range(0)]):cs.none}get decorations(){return this.view.state.doc.length?cs.none:this.placeholder}},{decorations:o=>o.decorations});return typeof l=="string"?[r,Mi.contentAttributes.of({"aria-placeholder":l})]:r}const t3e=2e3;function orn(l,r,o){let f=Math.min(r.line,o.line),d=Math.max(r.line,o.line),b=[];if(r.off>t3e||o.off>t3e||r.col<0||o.col<0){let p=Math.min(r.off,o.off),v=Math.max(r.off,o.off);for(let O=f;O<=d;O++){let C=l.doc.line(O);C.length<=v&&b.push(St.range(C.from+p,C.to+v))}}else{let p=Math.min(r.col,o.col),v=Math.max(r.col,o.col);for(let O=f;O<=d;O++){let C=l.doc.line(O),T=pY(C.text,p,l.tabSize,!0);if(T<0)b.push(St.cursor(C.to));else{let A=pY(C.text,v,l.tabSize);b.push(St.range(C.from+T,C.from+A))}}}return b}function crn(l,r){let o=l.coordsAtPos(l.viewport.from);return o?Math.round(Math.abs((o.left-r)/l.defaultCharacterWidth)):-1}function I0t(l,r){let o=l.posAtCoords({x:r.clientX,y:r.clientY},!1),f=l.state.doc.lineAt(o),d=o-f.from,b=d>t3e?-1:d==f.length?crn(l,r.clientX):rE(f.text,l.state.tabSize,o-f.from);return{line:f.number,col:b,off:d}}function lrn(l,r){let o=I0t(l,r),f=l.state.selection;return o?{update(d){if(d.docChanged){let b=d.changes.mapPos(d.startState.doc.line(o.line).from),p=d.state.doc.lineAt(b);o={line:p.number,col:o.col,off:Math.min(o.off,p.length)},f=f.map(d.changes)}},get(d,b,p){let v=I0t(l,d);if(!v)return f;let O=orn(l.state,o,v);return O.length?p?St.create(O.concat(f.ranges)):St.create(O):f}}:null}function urn(l){let r=o=>o.altKey&&o.button==0;return Mi.mouseSelectionStyle.of((o,f)=>r(f)?lrn(o,f):null)}const frn={Alt:[18,l=>!!l.altKey],Control:[17,l=>!!l.ctrlKey],Shift:[16,l=>!!l.shiftKey],Meta:[91,l=>!!l.metaKey]},hrn={style:"cursor: crosshair"};function arn(l={}){let[r,o]=frn[l.key||"Alt"],f=Qa.fromClass(class{constructor(d){this.view=d,this.isDown=!1}set(d){this.isDown!=d&&(this.isDown=d,this.view.update([]))}},{eventObservers:{keydown(d){this.set(d.keyCode==r||o(d))},keyup(d){(d.keyCode==r||!o(d))&&this.set(!1)},mousemove(d){this.set(o(d))}}});return[f,Mi.contentAttributes.of(d=>{var b;return!((b=d.plugin(f))===null||b===void 0)&&b.isDown?hrn:null})]}const LI="-10000px";let X2t=class{constructor(r,o,f,d){this.facet=o,this.createTooltipView=f,this.removeTooltipView=d,this.input=r.state.facet(o),this.tooltips=this.input.filter(p=>p);let b=null;this.tooltipViews=this.tooltips.map(p=>b=f(p,b))}update(r,o){var f;let d=r.state.facet(this.facet),b=d.filter(O=>O);if(d===this.input){for(let O of this.tooltipViews)O.update&&O.update(r);return!1}let p=[],v=o?[]:null;for(let O=0;Oo[C]=O),o.length=v.length),this.input=d,this.tooltips=b,this.tooltipViews=p,!0}};function drn(l){let r=l.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:r.clientHeight,right:r.clientWidth}}const sve=pn.define({combine:l=>{var r,o,f;return{position:si.ios?"absolute":((r=l.find(d=>d.position))===null||r===void 0?void 0:r.position)||"fixed",parent:((o=l.find(d=>d.parent))===null||o===void 0?void 0:o.parent)||null,tooltipSpace:((f=l.find(d=>d.tooltipSpace))===null||f===void 0?void 0:f.tooltipSpace)||drn}}}),R0t=new WeakMap,yOe=Qa.fromClass(class{constructor(l){this.view=l,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let r=l.state.facet(sve);this.position=r.position,this.parent=r.parent,this.classes=l.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new X2t(l,OOe,(o,f)=>this.createTooltip(o,f),o=>{this.resizeObserver&&this.resizeObserver.unobserve(o.dom),o.dom.remove()}),this.above=this.manager.tooltips.map(o=>!!o.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(o=>{Date.now()>this.lastTransaction-50&&o.length>0&&o[o.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),l.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let l of this.manager.tooltipViews)this.intersectionObserver.observe(l.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(l){l.transactions.length&&(this.lastTransaction=Date.now());let r=this.manager.update(l,this.above);r&&this.observeIntersection();let o=r||l.geometryChanged,f=l.state.facet(sve);if(f.position!=this.position&&!this.madeAbsolute){this.position=f.position;for(let d of this.manager.tooltipViews)d.dom.style.position=this.position;o=!0}if(f.parent!=this.parent){this.parent&&this.container.remove(),this.parent=f.parent,this.createContainer();for(let d of this.manager.tooltipViews)this.container.appendChild(d.dom);o=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);o&&this.maybeMeasure()}createTooltip(l,r){let o=l.create(this.view),f=r?r.dom:null;if(o.dom.classList.add("cm-tooltip"),l.arrow&&!o.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let d=document.createElement("div");d.className="cm-tooltip-arrow",o.dom.appendChild(d)}return o.dom.style.position=this.position,o.dom.style.top=LI,o.dom.style.left="0px",this.container.insertBefore(o.dom,f),o.mount&&o.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(o.dom),o}destroy(){var l,r,o;this.view.win.removeEventListener("resize",this.measureSoon);for(let f of this.manager.tooltipViews)f.dom.remove(),(l=f.destroy)===null||l===void 0||l.call(f);this.parent&&this.container.remove(),(r=this.resizeObserver)===null||r===void 0||r.disconnect(),(o=this.intersectionObserver)===null||o===void 0||o.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let l=1,r=1,o=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:b}=this.manager.tooltipViews[0];if(si.gecko)o=b.offsetParent!=this.container.ownerDocument.body;else if(b.style.top==LI&&b.style.left=="0px"){let p=b.getBoundingClientRect();o=Math.abs(p.top+1e4)>1||Math.abs(p.left)>1}}if(o||this.position=="absolute")if(this.parent){let b=this.parent.getBoundingClientRect();b.width&&b.height&&(l=b.width/this.parent.offsetWidth,r=b.height/this.parent.offsetHeight)}else({scaleX:l,scaleY:r}=this.view.viewState);let f=this.view.scrollDOM.getBoundingClientRect(),d=mOe(this.view);return{visible:{left:f.left+d.left,top:f.top+d.top,right:f.right-d.right,bottom:f.bottom-d.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((b,p)=>{let v=this.manager.tooltipViews[p];return v.getCoords?v.getCoords(b.pos):this.view.coordsAtPos(b.pos)}),size:this.manager.tooltipViews.map(({dom:b})=>b.getBoundingClientRect()),space:this.view.state.facet(sve).tooltipSpace(this.view),scaleX:l,scaleY:r,makeAbsolute:o}}writeMeasure(l){var r;if(l.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let v of this.manager.tooltipViews)v.dom.style.position="absolute"}let{visible:o,space:f,scaleX:d,scaleY:b}=l,p=[];for(let v=0;v=Math.min(o.bottom,f.bottom)||A.rightMath.min(o.right,f.right)+.1)){T.style.top=LI;continue}let $=O.arrow?C.dom.querySelector(".cm-tooltip-arrow"):null,L=$?7:0,z=j.right-j.left,Z=(r=R0t.get(C))!==null&&r!==void 0?r:j.bottom-j.top,Y=C.offset||prn,ne=this.view.textDirection==al.LTR,he=j.width>f.right-f.left?ne?f.left:f.right-j.width:ne?Math.max(f.left,Math.min(A.left-($?14:0)+Y.x,f.right-z)):Math.min(Math.max(f.left,A.left-z+($?14:0)-Y.x),f.right-z),se=this.above[v];!O.strictSide&&(se?A.top-Z-L-Y.yf.bottom)&&se==f.bottom-A.bottom>A.top-f.top&&(se=this.above[v]=!se);let ve=(se?A.top-f.top:f.bottom-A.bottom)-L;if(vehe&&nt.topCe&&(Ce=se?nt.top-Z-2-L:nt.bottom+L+2);if(this.position=="absolute"?(T.style.top=(Ce-l.parent.top)/b+"px",L0t(T,(he-l.parent.left)/d)):(T.style.top=Ce/b+"px",L0t(T,he/d)),$){let nt=A.left+(ne?Y.x:-Y.x)-(he+14-7);$.style.left=nt/d+"px"}C.overlap!==!0&&p.push({left:he,top:Ce,right:Ie,bottom:Ce+Z}),T.classList.toggle("cm-tooltip-above",se),T.classList.toggle("cm-tooltip-below",!se),C.positioned&&C.positioned(l.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let l of this.manager.tooltipViews)l.dom.style.top=LI}},{eventObservers:{scroll(){this.maybeMeasure()}}});function L0t(l,r){let o=parseInt(l.style.left,10);(isNaN(o)||Math.abs(r-o)>1)&&(l.style.left=r+"px")}const grn=Mi.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),prn={x:0,y:0},OOe=pn.define({enables:[yOe,grn]}),vY=pn.define({combine:l=>l.reduce((r,o)=>r.concat(o),[])});let U2t=class G2t{static create(r){return new G2t(r)}constructor(r){this.view=r,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new X2t(r,vY,(o,f)=>this.createHostedView(o,f),o=>o.dom.remove())}createHostedView(r,o){let f=r.create(this.view);return f.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(f.dom,o?o.dom.nextSibling:this.dom.firstChild),this.mounted&&f.mount&&f.mount(this.view),f}mount(r){for(let o of this.manager.tooltipViews)o.mount&&o.mount(r);this.mounted=!0}positioned(r){for(let o of this.manager.tooltipViews)o.positioned&&o.positioned(r)}update(r){this.manager.update(r)}destroy(){var r;for(let o of this.manager.tooltipViews)(r=o.destroy)===null||r===void 0||r.call(o)}passProp(r){let o;for(let f of this.manager.tooltipViews){let d=f[r];if(d!==void 0){if(o===void 0)o=d;else if(o!==d)return}}return o}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}};const brn=OOe.compute([vY],l=>{let r=l.facet(vY);return r.length===0?null:{pos:Math.min(...r.map(o=>o.pos)),end:Math.max(...r.map(o=>{var f;return(f=o.end)!==null&&f!==void 0?f:o.pos})),create:U2t.create,above:r[0].above,arrow:r.some(o=>o.arrow)}});let wrn=class{constructor(r,o,f,d,b){this.view=r,this.source=o,this.field=f,this.setHover=d,this.hoverTime=b,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:r.dom,time:0},this.checkHover=this.checkHover.bind(this),r.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),r.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let r=Date.now()-this.lastMove.time;rv.bottom||o.xv.right+r.defaultCharacterWidth)return;let O=r.bidiSpans(r.state.doc.lineAt(d)).find(T=>T.from<=d&&T.to>=d),C=O&&O.dir==al.RTL?-1:1;b=o.x{this.pending==v&&(this.pending=null,O&&!(Array.isArray(O)&&!O.length)&&r.dispatch({effects:this.setHover.of(Array.isArray(O)?O:[O])}))},O=>W1(r.state,O,"hover tooltip"))}else p&&!(Array.isArray(p)&&!p.length)&&r.dispatch({effects:this.setHover.of(Array.isArray(p)?p:[p])})}get tooltip(){let r=this.view.plugin(yOe),o=r?r.manager.tooltips.findIndex(f=>f.create==U2t.create):-1;return o>-1?r.manager.tooltipViews[o]:null}mousemove(r){var o,f;this.lastMove={x:r.clientX,y:r.clientY,target:r.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:d,tooltip:b}=this;if(d.length&&b&&!mrn(b.dom,r)||this.pending){let{pos:p}=d[0]||this.pending,v=(f=(o=d[0])===null||o===void 0?void 0:o.end)!==null&&f!==void 0?f:p;(p==v?this.view.posAtCoords(this.lastMove)!=p:!vrn(this.view,p,v,r.clientX,r.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(r){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:o}=this;if(o.length){let{tooltip:f}=this;f&&f.dom.contains(r.relatedTarget)?this.watchTooltipLeave(f.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(r){let o=f=>{r.removeEventListener("mouseleave",o),this.active.length&&!this.view.dom.contains(f.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};r.addEventListener("mouseleave",o)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}};const fG=4;function mrn(l,r){let{left:o,right:f,top:d,bottom:b}=l.getBoundingClientRect(),p;if(p=l.querySelector(".cm-tooltip-arrow")){let v=p.getBoundingClientRect();d=Math.min(v.top,d),b=Math.max(v.bottom,b)}return r.clientX>=o-fG&&r.clientX<=f+fG&&r.clientY>=d-fG&&r.clientY<=b+fG}function vrn(l,r,o,f,d,b){let p=l.scrollDOM.getBoundingClientRect(),v=l.documentTop+l.documentPadding.top+l.contentHeight;if(p.left>f||p.rightd||Math.min(p.bottom,v)=r&&O<=o}function yrn(l,r={}){let o=ar.define(),f=Sf.define({create(){return[]},update(d,b){if(d.length&&(r.hideOnChange&&(b.docChanged||b.selection)?d=[]:r.hideOn&&(d=d.filter(p=>!r.hideOn(b,p))),b.docChanged)){let p=[];for(let v of d){let O=b.changes.mapPos(v.pos,-1,Jl.TrackDel);if(O!=null){let C=Object.assign(Object.create(null),v);C.pos=O,C.end!=null&&(C.end=b.changes.mapPos(C.end)),p.push(C)}}d=p}for(let p of b.effects)p.is(o)&&(d=p.value),p.is(Orn)&&(d=[]);return d},provide:d=>vY.from(d)});return{active:f,extension:[f,Qa.define(d=>new wrn(d,l,f,o,r.hoverTime||300)),brn]}}function Y2t(l,r){let o=l.plugin(yOe);if(!o)return null;let f=o.manager.tooltips.indexOf(r);return f<0?null:o.manager.tooltipViews[f]}const Orn=ar.define();let Zy=class extends Gy{compare(r){return this==r||this.constructor==r.constructor&&this.eq(r)}eq(r){return!1}destroy(r){}};Zy.prototype.elementClass="";Zy.prototype.toDOM=void 0;Zy.prototype.mapMode=Jl.TrackBefore;Zy.prototype.startSide=Zy.prototype.endSide=-1;Zy.prototype.point=!0;const UG=pn.define(),krn=pn.define(),Srn={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Jr.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},cR=pn.define();function xrn(l){return[Z2t(),cR.of({...Srn,...l})]}const B0t=pn.define({combine:l=>l.some(r=>r)});function Z2t(l){return[Crn]}const Crn=Qa.fromClass(class{constructor(l){this.view=l,this.domAfter=null,this.prevViewport=l.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=l.state.facet(cR).map(r=>new _0t(l,r)),this.fixed=!l.state.facet(B0t);for(let r of this.gutters)r.config.side=="after"?this.getDOMAfter().appendChild(r.dom):this.dom.appendChild(r.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),l.scrollDOM.insertBefore(this.dom,l.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(l){if(this.updateGutters(l)){let r=this.prevViewport,o=l.view.viewport,f=Math.min(r.to,o.to)-Math.max(r.from,o.from);this.syncGutters(f<(o.to-o.from)*.8)}if(l.geometryChanged){let r=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=r,this.domAfter&&(this.domAfter.style.minHeight=r)}this.view.state.facet(B0t)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=l.view.viewport}syncGutters(l){let r=this.dom.nextSibling;l&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let o=Jr.iter(this.view.state.facet(UG),this.view.viewport.from),f=[],d=this.gutters.map(b=>new Trn(b,this.view.viewport,-this.view.documentPadding.top));for(let b of this.view.viewportLineBlocks)if(f.length&&(f=[]),Array.isArray(b.type)){let p=!0;for(let v of b.type)if(v.type==Nd.Text&&p){n3e(o,f,v.from);for(let O of d)O.line(this.view,v,f);p=!1}else if(v.widget)for(let O of d)O.widget(this.view,v)}else if(b.type==Nd.Text){n3e(o,f,b.from);for(let p of d)p.line(this.view,b,f)}else if(b.widget)for(let p of d)p.widget(this.view,b);for(let b of d)b.finish();l&&(this.view.scrollDOM.insertBefore(this.dom,r),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(l){let r=l.startState.facet(cR),o=l.state.facet(cR),f=l.docChanged||l.heightChanged||l.viewportChanged||!Jr.eq(l.startState.facet(UG),l.state.facet(UG),l.view.viewport.from,l.view.viewport.to);if(r==o)for(let d of this.gutters)d.update(l)&&(f=!0);else{f=!0;let d=[];for(let b of o){let p=r.indexOf(b);p<0?d.push(new _0t(this.view,b)):(this.gutters[p].update(l),d.push(this.gutters[p]))}for(let b of this.gutters)b.dom.remove(),d.indexOf(b)<0&&b.destroy();for(let b of d)b.config.side=="after"?this.getDOMAfter().appendChild(b.dom):this.dom.appendChild(b.dom);this.gutters=d}return f}destroy(){for(let l of this.gutters)l.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:l=>Mi.scrollMargins.of(r=>{let o=r.plugin(l);if(!o||o.gutters.length==0||!o.fixed)return null;let f=o.dom.offsetWidth*r.scaleX,d=o.domAfter?o.domAfter.offsetWidth*r.scaleX:0;return r.textDirection==al.LTR?{left:f,right:d}:{right:f,left:d}})});function F0t(l){return Array.isArray(l)?l:[l]}function n3e(l,r,o){for(;l.value&&l.from<=o;)l.from==o&&r.push(l.value),l.next()}class Trn{constructor(r,o,f){this.gutter=r,this.height=f,this.i=0,this.cursor=Jr.iter(r.markers,o.from)}addElement(r,o,f){let{gutter:d}=this,b=(o.top-this.height)/r.scaleY,p=o.height/r.scaleY;if(this.i==d.elements.length){let v=new J2t(r,p,b,f);d.elements.push(v),d.dom.appendChild(v.dom)}else d.elements[this.i].update(r,p,b,f);this.height=o.bottom,this.i++}line(r,o,f){let d=[];n3e(this.cursor,d,o.from),f.length&&(d=d.concat(f));let b=this.gutter.config.lineMarker(r,o,d);b&&d.unshift(b);let p=this.gutter;d.length==0&&!p.config.renderEmptyElements||this.addElement(r,o,d)}widget(r,o){let f=this.gutter.config.widgetMarker(r,o.widget,o),d=f?[f]:null;for(let b of r.state.facet(krn)){let p=b(r,o.widget,o);p&&(d||(d=[])).push(p)}d&&this.addElement(r,o,d)}finish(){let r=this.gutter;for(;r.elements.length>this.i;){let o=r.elements.pop();r.dom.removeChild(o.dom),o.destroy()}}}class _0t{constructor(r,o){this.view=r,this.config=o,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let f in o.domEventHandlers)this.dom.addEventListener(f,d=>{let b=d.target,p;if(b!=this.dom&&this.dom.contains(b)){for(;b.parentNode!=this.dom;)b=b.parentNode;let O=b.getBoundingClientRect();p=(O.top+O.bottom)/2}else p=d.clientY;let v=r.lineBlockAtHeight(p-r.documentTop);o.domEventHandlers[f](r,v,d)&&d.preventDefault()});this.markers=F0t(o.markers(r)),o.initialSpacer&&(this.spacer=new J2t(r,0,0,[o.initialSpacer(r)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(r){let o=this.markers;if(this.markers=F0t(this.config.markers(r.view)),this.spacer&&this.config.updateSpacer){let d=this.config.updateSpacer(this.spacer.markers[0],r);d!=this.spacer.markers[0]&&this.spacer.update(r.view,0,0,[d])}let f=r.view.viewport;return!Jr.eq(this.markers,o,f.from,f.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(r):!1)}destroy(){for(let r of this.elements)r.destroy()}}class J2t{constructor(r,o,f,d){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(r,o,f,d)}update(r,o,f,d){this.height!=o&&(this.height=o,this.dom.style.height=o+"px"),this.above!=f&&(this.dom.style.marginTop=(this.above=f)?f+"px":""),Ern(this.markers,d)||this.setMarkers(r,d)}setMarkers(r,o){let f="cm-gutterElement",d=this.dom.firstChild;for(let b=0,p=0;;){let v=p,O=bb(v,O,C)||p(v,O,C):p}return f}})}});class ove extends Zy{constructor(r){super(),this.number=r}eq(r){return this.number==r.number}toDOM(){return document.createTextNode(this.number)}}function cve(l,r){return l.state.facet(CT).formatNumber(r,l.state)}const Prn=cR.compute([CT],l=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(r){return r.state.facet(Arn)},lineMarker(r,o,f){return f.some(d=>d.toDOM)?null:new ove(cve(r,r.state.doc.lineAt(o.from).number))},widgetMarker:(r,o,f)=>{for(let d of r.state.facet(Mrn)){let b=d(r,o,f);if(b)return b}return null},lineMarkerChange:r=>r.startState.facet(CT)!=r.state.facet(CT),initialSpacer(r){return new ove(cve(r,H0t(r.state.doc.lines)))},updateSpacer(r,o){let f=cve(o.view,H0t(o.view.state.doc.lines));return f==r.number?r:new ove(f)},domEventHandlers:l.facet(CT).domEventHandlers,side:"before"}));function jrn(l={}){return[CT.of(l),Z2t(),Prn]}function H0t(l){let r=9;for(;r{let r=[],o=-1;for(let f of l.selection.ranges){let d=l.doc.lineAt(f.head).from;d>o&&(o=d,r.push(Drn.range(d)))}return Jr.of(r)});function Nrn(){return $rn}const evt=1024;let Irn=0;class lve{constructor(r,o){this.from=r,this.to=o}}class ls{constructor(r={}){this.id=Irn++,this.perNode=!!r.perNode,this.deserialize=r.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(r){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof r!="function"&&(r=jh.match(r)),o=>{let f=r(o);return f===void 0?null:[this,f]}}}ls.closedBy=new ls({deserialize:l=>l.split(" ")});ls.openedBy=new ls({deserialize:l=>l.split(" ")});ls.group=new ls({deserialize:l=>l.split(" ")});ls.isolate=new ls({deserialize:l=>{if(l&&l!="rtl"&&l!="ltr"&&l!="auto")throw new RangeError("Invalid value for isolate: "+l);return l||"auto"}});ls.contextHash=new ls({perNode:!0});ls.lookAhead=new ls({perNode:!0});ls.mounted=new ls({perNode:!0});class yY{constructor(r,o,f){this.tree=r,this.overlay=o,this.parser=f}static get(r){return r&&r.props&&r.props[ls.mounted.id]}}const Rrn=Object.create(null);class jh{constructor(r,o,f,d=0){this.name=r,this.props=o,this.id=f,this.flags=d}static define(r){let o=r.props&&r.props.length?Object.create(null):Rrn,f=(r.top?1:0)|(r.skipped?2:0)|(r.error?4:0)|(r.name==null?8:0),d=new jh(r.name||"",o,r.id,f);if(r.props){for(let b of r.props)if(Array.isArray(b)||(b=b(d)),b){if(b[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");o[b[0].id]=b[1]}}return d}prop(r){return this.props[r.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(r){if(typeof r=="string"){if(this.name==r)return!0;let o=this.prop(ls.group);return o?o.indexOf(r)>-1:!1}return this.id==r}static match(r){let o=Object.create(null);for(let f in r)for(let d of f.split(" "))o[d]=r[f];return f=>{for(let d=f.prop(ls.group),b=-1;b<(d?d.length:0);b++){let p=o[b<0?f.name:d[b]];if(p)return p}}}}jh.none=new jh("",Object.create(null),0,8);class nZ{constructor(r){this.types=r;for(let o=0;o0;for(let O=this.cursor(p|kf.IncludeAnonymous);;){let C=!1;if(O.from<=b&&O.to>=d&&(!v&&O.type.isAnonymous||o(O)!==!1)){if(O.firstChild())continue;C=!0}for(;C&&f&&(v||!O.type.isAnonymous)&&f(O),!O.nextSibling();){if(!O.parent())return;C=!0}}}prop(r){return r.perNode?this.props?this.props[r.id]:void 0:this.type.prop(r)}get propValues(){let r=[];if(this.props)for(let o in this.props)r.push([+o,this.props[o]]);return r}balance(r={}){return this.children.length<=8?this:xOe(jh.none,this.children,this.positions,0,this.children.length,0,this.length,(o,f,d)=>new yo(this.type,o,f,d,this.propValues),r.makeTree||((o,f,d)=>new yo(jh.none,o,f,d)))}static build(r){return _rn(r)}}yo.empty=new yo(jh.none,[],[],0);class kOe{constructor(r,o){this.buffer=r,this.index=o}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new kOe(this.buffer,this.index)}}class v4{constructor(r,o,f){this.buffer=r,this.length=o,this.set=f}get type(){return jh.none}toString(){let r=[];for(let o=0;o0));O=p[O+3]);return v}slice(r,o,f){let d=this.buffer,b=new Uint16Array(o-r),p=0;for(let v=r,O=0;v=r&&or;case 1:return o<=r&&f>r;case 2:return f>r;case 4:return!0}}function xR(l,r,o,f){for(var d;l.from==l.to||(o<1?l.from>=r:l.from>r)||(o>-1?l.to<=r:l.to0?v.length:-1;r!=C;r+=o){let T=v[r],A=O[r]+p.from;if(tvt(d,f,A,A+T.length)){if(T instanceof v4){if(b&kf.ExcludeBuffers)continue;let j=T.findChild(0,T.buffer.length,o,f-A,d);if(j>-1)return new B2(new Lrn(p,T,r,A),null,j)}else if(b&kf.IncludeAnonymous||!T.type.isAnonymous||SOe(T)){let j;if(!(b&kf.IgnoreMounts)&&(j=yY.get(T))&&!j.overlay)return new V1(j.tree,A,r,p);let $=new V1(T,A,r,p);return b&kf.IncludeAnonymous||!$.type.isAnonymous?$:$.nextChild(o<0?T.children.length-1:0,o,f,d)}}}if(b&kf.IncludeAnonymous||!p.type.isAnonymous||(p.index>=0?r=p.index+o:r=o<0?-1:p._parent._tree.children.length,p=p._parent,!p))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(r){return this.nextChild(0,1,r,2)}childBefore(r){return this.nextChild(this._tree.children.length-1,-1,r,-2)}enter(r,o,f=0){let d;if(!(f&kf.IgnoreOverlays)&&(d=yY.get(this._tree))&&d.overlay){let b=r-this.from;for(let{from:p,to:v}of d.overlay)if((o>0?p<=b:p=b:v>b))return new V1(d.tree,d.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,r,o,f)}nextSignificantParent(){let r=this;for(;r.type.isAnonymous&&r._parent;)r=r._parent;return r}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Q0t(l,r,o,f){let d=l.cursor(),b=[];if(!d.firstChild())return b;if(o!=null){for(let p=!1;!p;)if(p=d.type.is(o),!d.nextSibling())return b}for(;;){if(f!=null&&d.type.is(f))return b;if(d.type.is(r)&&b.push(d.node),!d.nextSibling())return f==null?b:[]}}function i3e(l,r,o=r.length-1){for(let f=l;o>=0;f=f.parent){if(!f)return!1;if(!f.type.isAnonymous){if(r[o]&&r[o]!=f.name)return!1;o--}}return!0}class Lrn{constructor(r,o,f,d){this.parent=r,this.buffer=o,this.index=f,this.start=d}}class B2 extends nvt{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(r,o,f){super(),this.context=r,this._parent=o,this.index=f,this.type=r.buffer.set.types[r.buffer.buffer[f]]}child(r,o,f){let{buffer:d}=this.context,b=d.findChild(this.index+4,d.buffer[this.index+3],r,o-this.context.start,f);return b<0?null:new B2(this.context,this,b)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(r){return this.child(1,r,2)}childBefore(r){return this.child(-1,r,-2)}enter(r,o,f=0){if(f&kf.ExcludeBuffers)return null;let{buffer:d}=this.context,b=d.findChild(this.index+4,d.buffer[this.index+3],o>0?1:-1,r-this.context.start,o);return b<0?null:new B2(this.context,this,b)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(r){return this._parent?null:this.context.parent.nextChild(this.context.index+r,r,0,4)}get nextSibling(){let{buffer:r}=this.context,o=r.buffer[this.index+3];return o<(this._parent?r.buffer[this._parent.index+3]:r.buffer.length)?new B2(this.context,this._parent,o):this.externalSibling(1)}get prevSibling(){let{buffer:r}=this.context,o=this._parent?this._parent.index+4:0;return this.index==o?this.externalSibling(-1):new B2(this.context,this._parent,r.findChild(o,this.index,-1,0,4))}get tree(){return null}toTree(){let r=[],o=[],{buffer:f}=this.context,d=this.index+4,b=f.buffer[this.index+3];if(b>d){let p=f.buffer[this.index+1];r.push(f.slice(d,b,p)),o.push(0)}return new yo(this.type,r,o,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function ivt(l){if(!l.length)return null;let r=0,o=l[0];for(let b=1;bo.from||p.to=r){let v=new V1(p.tree,p.overlay[0].from+b.from,-1,b);(d||(d=[f])).push(xR(v,r,o,!1))}}return d?ivt(d):f}class r3e{get name(){return this.type.name}constructor(r,o=0){if(this.mode=o,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,r instanceof V1)this.yieldNode(r);else{this._tree=r.context.parent,this.buffer=r.context;for(let f=r._parent;f;f=f._parent)this.stack.unshift(f.index);this.bufferNode=r,this.yieldBuf(r.index)}}yieldNode(r){return r?(this._tree=r,this.type=r.type,this.from=r.from,this.to=r.to,!0):!1}yieldBuf(r,o){this.index=r;let{start:f,buffer:d}=this.buffer;return this.type=o||d.set.types[d.buffer[r]],this.from=f+d.buffer[r+1],this.to=f+d.buffer[r+2],!0}yield(r){return r?r instanceof V1?(this.buffer=null,this.yieldNode(r)):(this.buffer=r.context,this.yieldBuf(r.index,r.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(r,o,f){if(!this.buffer)return this.yield(this._tree.nextChild(r<0?this._tree._tree.children.length-1:0,r,o,f,this.mode));let{buffer:d}=this.buffer,b=d.findChild(this.index+4,d.buffer[this.index+3],r,o-this.buffer.start,f);return b<0?!1:(this.stack.push(this.index),this.yieldBuf(b))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(r){return this.enterChild(1,r,2)}childBefore(r){return this.enterChild(-1,r,-2)}enter(r,o,f=this.mode){return this.buffer?f&kf.ExcludeBuffers?!1:this.enterChild(1,r,o):this.yield(this._tree.enter(r,o,f))}parent(){if(!this.buffer)return this.yieldNode(this.mode&kf.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let r=this.mode&kf.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(r)}sibling(r){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+r,r,0,4,this.mode)):!1;let{buffer:o}=this.buffer,f=this.stack.length-1;if(r<0){let d=f<0?0:this.stack[f]+4;if(this.index!=d)return this.yieldBuf(o.findChild(d,this.index,-1,0,4))}else{let d=o.buffer[this.index+3];if(d<(f<0?o.buffer.length:o.buffer[this.stack[f]+3]))return this.yieldBuf(d)}return f<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+r,r,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(r){let o,f,{buffer:d}=this;if(d){if(r>0){if(this.index-1)for(let b=o+r,p=r<0?-1:f._tree.children.length;b!=p;b+=r){let v=f._tree.children[b];if(this.mode&kf.IncludeAnonymous||v instanceof v4||!v.type.isAnonymous||SOe(v))return!1}return!0}move(r,o){if(o&&this.enterChild(r,0,4))return!0;for(;;){if(this.sibling(r))return!0;if(this.atLastNode(r)||!this.parent())return!1}}next(r=!0){return this.move(1,r)}prev(r=!0){return this.move(-1,r)}moveTo(r,o=0){for(;(this.from==this.to||(o<1?this.from>=r:this.from>r)||(o>-1?this.to<=r:this.to=0;){for(let p=r;p;p=p._parent)if(p.index==d){if(d==this.index)return p;o=p,f=b+1;break e}d=this.stack[--b]}for(let d=f;d=0;b--){if(b<0)return i3e(this._tree,r,d);let p=f[o.buffer[this.stack[b]]];if(!p.isAnonymous){if(r[d]&&r[d]!=p.name)return!1;d--}}return!0}}function SOe(l){return l.children.some(r=>r instanceof v4||!r.type.isAnonymous||SOe(r))}function _rn(l){var r;let{buffer:o,nodeSet:f,maxBufferLength:d=evt,reused:b=[],minRepeatType:p=f.types.length}=l,v=Array.isArray(o)?new kOe(o,o.length):o,O=f.types,C=0,T=0;function A(ve,Ce,Ie,nt,Re,ft){let{id:st,start:at,end:ut,size:le}=v,Ze=T,it=C;for(;le<0;)if(v.next(),le==-1){let Kt=b[st];Ie.push(Kt),nt.push(at-ve);return}else if(le==-3){C=st;return}else if(le==-4){T=st;return}else throw new RangeError(`Unrecognized record size: ${le}`);let Tt=O[st],X,Je,Nt=at-ve;if(ut-at<=d&&(Je=Z(v.pos-Ce,Re))){let Kt=new Uint16Array(Je.size-Je.skip),Ut=v.pos-Je.size,In=Kt.length;for(;v.pos>Ut;)In=Y(Je.start,Kt,In);X=new v4(Kt,ut-Je.start,f),Nt=Je.start-ve}else{let Kt=v.pos-le;v.next();let Ut=[],In=[],Bn=st>=p?st:-1,Pi=0,dr=ut;for(;v.pos>Kt;)Bn>=0&&v.id==Bn&&v.size>=0?(v.end<=dr-d&&(L(Ut,In,at,Pi,v.end,dr,Bn,Ze,it),Pi=Ut.length,dr=v.end),v.next()):ft>2500?j(at,Kt,Ut,In):A(at,Kt,Ut,In,Bn,ft+1);if(Bn>=0&&Pi>0&&Pi-1&&Pi>0){let Ir=$(Tt,it);X=xOe(Tt,Ut,In,0,Ut.length,0,ut-at,Ir,Ir)}else X=z(Tt,Ut,In,ut-at,Ze-ut,it)}Ie.push(X),nt.push(Nt)}function j(ve,Ce,Ie,nt){let Re=[],ft=0,st=-1;for(;v.pos>Ce;){let{id:at,start:ut,end:le,size:Ze}=v;if(Ze>4)v.next();else{if(st>-1&&ut=0;le-=3)at[Ze++]=Re[le],at[Ze++]=Re[le+1]-ut,at[Ze++]=Re[le+2]-ut,at[Ze++]=Ze;Ie.push(new v4(at,Re[2]-ut,f)),nt.push(ut-ve)}}function $(ve,Ce){return(Ie,nt,Re)=>{let ft=0,st=Ie.length-1,at,ut;if(st>=0&&(at=Ie[st])instanceof yo){if(!st&&at.type==ve&&at.length==Re)return at;(ut=at.prop(ls.lookAhead))&&(ft=nt[st]+at.length+ut)}return z(ve,Ie,nt,Re,ft,Ce)}}function L(ve,Ce,Ie,nt,Re,ft,st,at,ut){let le=[],Ze=[];for(;ve.length>nt;)le.push(ve.pop()),Ze.push(Ce.pop()+Ie-Re);ve.push(z(f.types[st],le,Ze,ft-Re,at-ft,ut)),Ce.push(Re-Ie)}function z(ve,Ce,Ie,nt,Re,ft,st){if(ft){let at=[ls.contextHash,ft];st=st?[at].concat(st):[at]}if(Re>25){let at=[ls.lookAhead,Re];st=st?[at].concat(st):[at]}return new yo(ve,Ce,Ie,nt,st)}function Z(ve,Ce){let Ie=v.fork(),nt=0,Re=0,ft=0,st=Ie.end-d,at={size:0,start:0,skip:0};e:for(let ut=Ie.pos-ve;Ie.pos>ut;){let le=Ie.size;if(Ie.id==Ce&&le>=0){at.size=nt,at.start=Re,at.skip=ft,ft+=4,nt+=4,Ie.next();continue}let Ze=Ie.pos-le;if(le<0||Ze=p?4:0,Tt=Ie.start;for(Ie.next();Ie.pos>Ze;){if(Ie.size<0)if(Ie.size==-3)it+=4;else break e;else Ie.id>=p&&(it+=4);Ie.next()}Re=Tt,nt+=le,ft+=it}return(Ce<0||nt==ve)&&(at.size=nt,at.start=Re,at.skip=ft),at.size>4?at:void 0}function Y(ve,Ce,Ie){let{id:nt,start:Re,end:ft,size:st}=v;if(v.next(),st>=0&&nt4){let ut=v.pos-(st-4);for(;v.pos>ut;)Ie=Y(ve,Ce,Ie)}Ce[--Ie]=at,Ce[--Ie]=ft-ve,Ce[--Ie]=Re-ve,Ce[--Ie]=nt}else st==-3?C=nt:st==-4&&(T=nt);return Ie}let ne=[],he=[];for(;v.pos>0;)A(l.start||0,l.bufferStart||0,ne,he,-1,0);let se=(r=l.length)!==null&&r!==void 0?r:ne.length?he[0]+ne[0].length:0;return new yo(O[l.topID],ne.reverse(),he.reverse(),se)}const z0t=new WeakMap;function GG(l,r){if(!l.isAnonymous||r instanceof v4||r.type!=l)return 1;let o=z0t.get(r);if(o==null){o=1;for(let f of r.children){if(f.type!=l||!(f instanceof yo)){o=1;break}o+=GG(l,f)}z0t.set(r,o)}return o}function xOe(l,r,o,f,d,b,p,v,O){let C=0;for(let L=f;L=T)break;Ce+=Ie}if(he==se+1){if(Ce>T){let Ie=L[se];$(Ie.children,Ie.positions,0,Ie.children.length,z[se]+ne);continue}A.push(L[se])}else{let Ie=z[he-1]+L[he-1].length-ve;A.push(xOe(l,L,z,se,he,ve,Ie,null,O))}j.push(ve+ne-b)}}return $(r,o,f,d,0),(v||O)(A,j,p)}class Hrn{constructor(){this.map=new WeakMap}setBuffer(r,o,f){let d=this.map.get(r);d||this.map.set(r,d=new Map),d.set(o,f)}getBuffer(r,o){let f=this.map.get(r);return f&&f.get(o)}set(r,o){r instanceof B2?this.setBuffer(r.context.buffer,r.index,o):r instanceof V1&&this.map.set(r.tree,o)}get(r){return r instanceof B2?this.getBuffer(r.context.buffer,r.index):r instanceof V1?this.map.get(r.tree):void 0}cursorSet(r,o){r.buffer?this.setBuffer(r.buffer.buffer,r.index,o):this.map.set(r.tree,o)}cursorGet(r){return r.buffer?this.getBuffer(r.buffer.buffer,r.index):this.map.get(r.tree)}}class Lw{constructor(r,o,f,d,b=!1,p=!1){this.from=r,this.to=o,this.tree=f,this.offset=d,this.open=(b?1:0)|(p?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(r,o=[],f=!1){let d=[new Lw(0,r.length,r,0,!1,f)];for(let b of o)b.to>r.length&&d.push(b);return d}static applyChanges(r,o,f=128){if(!o.length)return r;let d=[],b=1,p=r.length?r[0]:null;for(let v=0,O=0,C=0;;v++){let T=v=f)for(;p&&p.from=j.from||A<=j.to||C){let $=Math.max(j.from,O)-C,L=Math.min(j.to,A)-C;j=$>=L?null:new Lw($,L,j.tree,j.offset+C,v>0,!!T)}if(j&&d.push(j),p.to>A)break;p=bnew lve(d.from,d.to)):[new lve(0,0)]:[new lve(0,r.length)],this.createParse(r,o||[],f)}parse(r,o,f){let d=this.startParse(r,o,f);for(;;){let b=d.advance();if(b)return b}}}class qrn{constructor(r){this.string=r}get length(){return this.string.length}chunk(r){return this.string.slice(r)}get lineChunks(){return!1}read(r,o){return this.string.slice(r,o)}}new ls({perNode:!0});let Qrn=0;class qp{constructor(r,o,f,d){this.name=r,this.set=o,this.base=f,this.modified=d,this.id=Qrn++}toString(){let{name:r}=this;for(let o of this.modified)o.name&&(r=`${o.name}(${r})`);return r}static define(r,o){let f=typeof r=="string"?r:"?";if(r instanceof qp&&(o=r),o!=null&&o.base)throw new Error("Can not derive from a modified tag");let d=new qp(f,[],null,[]);if(d.set.push(d),o)for(let b of o.set)d.set.push(b);return d}static defineModifier(r){let o=new OY(r);return f=>f.modified.indexOf(o)>-1?f:OY.get(f.base||f,f.modified.concat(o).sort((d,b)=>d.id-b.id))}}let zrn=0;class OY{constructor(r){this.name=r,this.instances=[],this.id=zrn++}static get(r,o){if(!o.length)return r;let f=o[0].instances.find(v=>v.base==r&&Wrn(o,v.modified));if(f)return f;let d=[],b=new qp(r.name,d,r,o);for(let v of o)v.instances.push(b);let p=Krn(o);for(let v of r.set)if(!v.modified.length)for(let O of p)d.push(OY.get(v,O));return b}}function Wrn(l,r){return l.length==r.length&&l.every((o,f)=>o==r[f])}function Krn(l){let r=[[]];for(let o=0;of.length-o.length)}function rZ(l){let r=Object.create(null);for(let o in l){let f=l[o];Array.isArray(f)||(f=[f]);for(let d of o.split(" "))if(d){let b=[],p=2,v=d;for(let A=0;;){if(v=="..."&&A>0&&A+3==d.length){p=1;break}let j=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(v);if(!j)throw new RangeError("Invalid path: "+d);if(b.push(j[0]=="*"?"":j[0][0]=='"'?JSON.parse(j[0]):j[0]),A+=j[0].length,A==d.length)break;let $=d[A++];if(A==d.length&&$=="!"){p=0;break}if($!="/")throw new RangeError("Invalid path: "+d);v=d.slice(A)}let O=b.length-1,C=b[O];if(!C)throw new RangeError("Invalid path: "+d);let T=new kY(f,p,O>0?b.slice(0,O):null);r[C]=T.sort(r[C])}}return rvt.add(r)}const rvt=new ls;class kY{constructor(r,o,f,d){this.tags=r,this.mode=o,this.context=f,this.next=d}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(r){return!r||r.depth{let p=d;for(let v of b)for(let O of v.set){let C=o[O.id];if(C){p=p?p+" "+C:C;break}}return p},scope:f}}function Vrn(l,r){let o=null;for(let f of l){let d=f.style(r);d&&(o=o?o+" "+d:d)}return o}function svt(l,r,o,f=0,d=l.length){let b=new Xrn(f,Array.isArray(r)?r:[r],o);b.highlightRange(l.cursor(),f,d,"",b.highlighters),b.flush(d)}class Xrn{constructor(r,o,f){this.at=r,this.highlighters=o,this.span=f,this.class=""}startSpan(r,o){o!=this.class&&(this.flush(r),r>this.at&&(this.at=r),this.class=o)}flush(r){r>this.at&&this.class&&this.span(this.at,r,this.class)}highlightRange(r,o,f,d,b){let{type:p,from:v,to:O}=r;if(v>=f||O<=o)return;p.isTop&&(b=this.highlighters.filter($=>!$.scope||$.scope(p)));let C=d,T=Urn(r)||kY.empty,A=Vrn(b,T.tags);if(A&&(C&&(C+=" "),C+=A,T.mode==1&&(d+=(d?" ":"")+A)),this.startSpan(Math.max(o,v),C),T.opaque)return;let j=r.tree&&r.tree.prop(ls.mounted);if(j&&j.overlay){let $=r.node.enter(j.overlay[0].from+v,1),L=this.highlighters.filter(Z=>!Z.scope||Z.scope(j.tree.type)),z=r.firstChild();for(let Z=0,Y=v;;Z++){let ne=Z=he||!r.nextSibling())););if(!ne||he>f)break;Y=ne.to+v,Y>o&&(this.highlightRange($.cursor(),Math.max(o,ne.from+v),Math.min(f,Y),"",L),this.startSpan(Math.min(f,Y),C))}z&&r.parent()}else if(r.firstChild()){j&&(d="");do if(!(r.to<=o)){if(r.from>=f)break;this.highlightRange(r,o,f,d,b),this.startSpan(Math.min(f,r.to),C)}while(r.nextSibling());r.parent()}}}function Urn(l){let r=l.type.prop(rvt);for(;r&&r.context&&!l.matchContext(r.context);)r=r.next;return r||null}const Gn=qp.define,aG=Gn(),i4=Gn(),W0t=Gn(i4),K0t=Gn(i4),r4=Gn(),dG=Gn(r4),uve=Gn(r4),$2=Gn(),vx=Gn($2),P2=Gn(),j2=Gn(),s3e=Gn(),BI=Gn(s3e),gG=Gn(),K={comment:aG,lineComment:Gn(aG),blockComment:Gn(aG),docComment:Gn(aG),name:i4,variableName:Gn(i4),typeName:W0t,tagName:Gn(W0t),propertyName:K0t,attributeName:Gn(K0t),className:Gn(i4),labelName:Gn(i4),namespace:Gn(i4),macroName:Gn(i4),literal:r4,string:dG,docString:Gn(dG),character:Gn(dG),attributeValue:Gn(dG),number:uve,integer:Gn(uve),float:Gn(uve),bool:Gn(r4),regexp:Gn(r4),escape:Gn(r4),color:Gn(r4),url:Gn(r4),keyword:P2,self:Gn(P2),null:Gn(P2),atom:Gn(P2),unit:Gn(P2),modifier:Gn(P2),operatorKeyword:Gn(P2),controlKeyword:Gn(P2),definitionKeyword:Gn(P2),moduleKeyword:Gn(P2),operator:j2,derefOperator:Gn(j2),arithmeticOperator:Gn(j2),logicOperator:Gn(j2),bitwiseOperator:Gn(j2),compareOperator:Gn(j2),updateOperator:Gn(j2),definitionOperator:Gn(j2),typeOperator:Gn(j2),controlOperator:Gn(j2),punctuation:s3e,separator:Gn(s3e),bracket:BI,angleBracket:Gn(BI),squareBracket:Gn(BI),paren:Gn(BI),brace:Gn(BI),content:$2,heading:vx,heading1:Gn(vx),heading2:Gn(vx),heading3:Gn(vx),heading4:Gn(vx),heading5:Gn(vx),heading6:Gn(vx),contentSeparator:Gn($2),list:Gn($2),quote:Gn($2),emphasis:Gn($2),strong:Gn($2),link:Gn($2),monospace:Gn($2),strikethrough:Gn($2),inserted:Gn(),deleted:Gn(),changed:Gn(),invalid:Gn(),meta:gG,documentMeta:Gn(gG),annotation:Gn(gG),processingInstruction:Gn(gG),definition:qp.defineModifier("definition"),constant:qp.defineModifier("constant"),function:qp.defineModifier("function"),standard:qp.defineModifier("standard"),local:qp.defineModifier("local"),special:qp.defineModifier("special")};for(let l in K){let r=K[l];r instanceof qp&&(r.name=l)}COe([{tag:K.link,class:"tok-link"},{tag:K.heading,class:"tok-heading"},{tag:K.emphasis,class:"tok-emphasis"},{tag:K.strong,class:"tok-strong"},{tag:K.keyword,class:"tok-keyword"},{tag:K.atom,class:"tok-atom"},{tag:K.bool,class:"tok-bool"},{tag:K.url,class:"tok-url"},{tag:K.labelName,class:"tok-labelName"},{tag:K.inserted,class:"tok-inserted"},{tag:K.deleted,class:"tok-deleted"},{tag:K.literal,class:"tok-literal"},{tag:K.string,class:"tok-string"},{tag:K.number,class:"tok-number"},{tag:[K.regexp,K.escape,K.special(K.string)],class:"tok-string2"},{tag:K.variableName,class:"tok-variableName"},{tag:K.local(K.variableName),class:"tok-variableName tok-local"},{tag:K.definition(K.variableName),class:"tok-variableName tok-definition"},{tag:K.special(K.variableName),class:"tok-variableName2"},{tag:K.definition(K.propertyName),class:"tok-propertyName tok-definition"},{tag:K.typeName,class:"tok-typeName"},{tag:K.namespace,class:"tok-namespace"},{tag:K.className,class:"tok-className"},{tag:K.macroName,class:"tok-macroName"},{tag:K.propertyName,class:"tok-propertyName"},{tag:K.operator,class:"tok-operator"},{tag:K.comment,class:"tok-comment"},{tag:K.meta,class:"tok-meta"},{tag:K.invalid,class:"tok-invalid"},{tag:K.punctuation,class:"tok-punctuation"}]);var fve;const Mx=new ls;function ovt(l){return pn.define({combine:l?r=>r.concat(l):void 0})}const Grn=new ls;let zp=class{constructor(r,o,f=[],d=""){this.data=r,this.name=d,Zr.prototype.hasOwnProperty("tree")||Object.defineProperty(Zr.prototype,"tree",{get(){return Dh(this)}}),this.parser=o,this.extension=[y4.of(this),Zr.languageData.of((b,p,v)=>{let O=V0t(b,p,v),C=O.type.prop(Mx);if(!C)return[];let T=b.facet(C),A=O.type.prop(Grn);if(A){let j=O.resolve(p-O.from,v);for(let $ of A)if($.test(j,b)){let L=b.facet($.facet);return $.type=="replace"?L:L.concat(T)}}return T})].concat(f)}isActiveAt(r,o,f=-1){return V0t(r,o,f).type.prop(Mx)==this.data}findRegions(r){let o=r.facet(y4);if((o==null?void 0:o.data)==this.data)return[{from:0,to:r.doc.length}];if(!o||!o.allowsNesting)return[];let f=[],d=(b,p)=>{if(b.prop(Mx)==this.data){f.push({from:p,to:p+b.length});return}let v=b.prop(ls.mounted);if(v){if(v.tree.prop(Mx)==this.data){if(v.overlay)for(let O of v.overlay)f.push({from:O.from+p,to:O.to+p});else f.push({from:p,to:p+b.length});return}else if(v.overlay){let O=f.length;if(d(v.tree,v.overlay[0].from+p),f.length>O)return}}for(let O=0;Of.isTop?o:void 0)]}),r.name)}configure(r,o){return new CR(this.data,this.parser.configure(r),o||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Dh(l){let r=l.field(zp.state,!1);return r?r.tree:yo.empty}let Yrn=class{constructor(r){this.doc=r,this.cursorPos=0,this.string="",this.cursor=r.iter()}get length(){return this.doc.length}syncTo(r){return this.string=this.cursor.next(r-this.cursorPos).value,this.cursorPos=r+this.string.length,this.cursorPos-this.string.length}chunk(r){return this.syncTo(r),this.string}get lineChunks(){return!0}read(r,o){let f=this.cursorPos-this.string.length;return r=this.cursorPos?this.doc.sliceString(r,o):this.string.slice(r-f,o-f)}},FI=null,o3e=class c3e{constructor(r,o,f=[],d,b,p,v,O){this.parser=r,this.state=o,this.fragments=f,this.tree=d,this.treeLen=b,this.viewport=p,this.skipped=v,this.scheduleOn=O,this.parse=null,this.tempSkipped=[]}static create(r,o,f){return new c3e(r,o,[],yo.empty,0,f,[],null)}startParse(){return this.parser.startParse(new Yrn(this.state.doc),this.fragments)}work(r,o){return o!=null&&o>=this.state.doc.length&&(o=void 0),this.tree!=yo.empty&&this.isDone(o??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var f;if(typeof r=="number"){let d=Date.now()+r;r=()=>Date.now()>d}for(this.parse||(this.parse=this.startParse()),o!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>o)&&o=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>r)&&this.parse.stopAt(r),this.withContext(()=>{for(;!(o=this.parse.advance()););}),this.treeLen=r,this.tree=o,this.fragments=this.withoutTempSkipped(Lw.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(r){let o=FI;FI=this;try{return r()}finally{FI=o}}withoutTempSkipped(r){for(let o;o=this.tempSkipped.pop();)r=X0t(r,o.from,o.to);return r}changes(r,o){let{fragments:f,tree:d,treeLen:b,viewport:p,skipped:v}=this;if(this.takeTree(),!r.empty){let O=[];if(r.iterChangedRanges((C,T,A,j)=>O.push({fromA:C,toA:T,fromB:A,toB:j})),f=Lw.applyChanges(f,O),d=yo.empty,b=0,p={from:r.mapPos(p.from,-1),to:r.mapPos(p.to,1)},this.skipped.length){v=[];for(let C of this.skipped){let T=r.mapPos(C.from,1),A=r.mapPos(C.to,-1);Tr.from&&(this.fragments=X0t(this.fragments,d,b),this.skipped.splice(f--,1))}return this.skipped.length>=o?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(r,o){this.skipped.push({from:r,to:o})}static getSkippingParser(r){return new class extends iZ{createParse(o,f,d){let b=d[0].from,p=d[d.length-1].to;return{parsedPos:b,advance(){let O=FI;if(O){for(let C of d)O.tempSkipped.push(C);r&&(O.scheduleOn=O.scheduleOn?Promise.all([O.scheduleOn,r]):r)}return this.parsedPos=p,new yo(jh.none,[],[],p-b)},stoppedAt:null,stopAt(){}}}}}isDone(r){r=Math.min(r,this.state.doc.length);let o=this.fragments;return this.treeLen>=r&&o.length&&o[0].from==0&&o[0].to>=r}static get(){return FI}};function X0t(l,r,o){return Lw.applyChanges(l,[{fromA:r,toA:o,fromB:r,toB:o}])}let l3e=class u3e{constructor(r){this.context=r,this.tree=r.tree}apply(r){if(!r.docChanged&&this.tree==this.context.tree)return this;let o=this.context.changes(r.changes,r.state),f=this.context.treeLen==r.startState.doc.length?void 0:Math.max(r.changes.mapPos(this.context.treeLen),o.viewport.to);return o.work(20,f)||o.takeTree(),new u3e(o)}static init(r){let o=Math.min(3e3,r.doc.length),f=o3e.create(r.facet(y4).parser,r,{from:0,to:o});return f.work(20,o)||f.takeTree(),new u3e(f)}};zp.state=Sf.define({create:l3e.init,update(l,r){for(let o of r.effects)if(o.is(zp.setState))return o.value;return r.startState.facet(y4)!=r.state.facet(y4)?l3e.init(r.state):l.apply(r)}});let cvt=l=>{let r=setTimeout(()=>l(),500);return()=>clearTimeout(r)};typeof requestIdleCallback<"u"&&(cvt=l=>{let r=-1,o=setTimeout(()=>{r=requestIdleCallback(l,{timeout:400})},100);return()=>r<0?clearTimeout(o):cancelIdleCallback(r)});const hve=typeof navigator<"u"&&(!((fve=navigator.scheduling)===null||fve===void 0)&&fve.isInputPending)?()=>navigator.scheduling.isInputPending():null,Zrn=Qa.fromClass(class{constructor(r){this.view=r,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(r){let o=this.view.state.field(zp.state).context;(o.updateViewport(r.view.viewport)||this.view.viewport.to>o.treeLen)&&this.scheduleWork(),(r.docChanged||r.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(o)}scheduleWork(){if(this.working)return;let{state:r}=this.view,o=r.field(zp.state);(o.tree!=o.context.tree||!o.context.isDone(r.doc.length))&&(this.working=cvt(this.work))}work(r){this.working=null;let o=Date.now();if(this.chunkEndd+1e3,O=b.context.work(()=>hve&&hve()||Date.now()>p,d+(v?0:1e5));this.chunkBudget-=Date.now()-o,(O||this.chunkBudget<=0)&&(b.context.takeTree(),this.view.dispatch({effects:zp.setState.of(new l3e(b.context))})),this.chunkBudget>0&&!(O&&!v)&&this.scheduleWork(),this.checkAsyncSchedule(b.context)}checkAsyncSchedule(r){r.scheduleOn&&(this.workScheduled++,r.scheduleOn.then(()=>this.scheduleWork()).catch(o=>W1(this.view.state,o)).then(()=>this.workScheduled--),r.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),y4=pn.define({combine(l){return l.length?l[0]:null},enables:l=>[zp.state,Zrn,Mi.contentAttributes.compute([l],r=>{let o=r.facet(l);return o&&o.name?{"data-language":o.name}:{}})]});class lvt{constructor(r,o=[]){this.language=r,this.support=o,this.extension=[r,o]}}const Jrn=pn.define(),VR=pn.define({combine:l=>{if(!l.length)return" ";let r=l[0];if(!r||/\S/.test(r)||Array.from(r).some(o=>o!=r[0]))throw new Error("Invalid indent unit: "+JSON.stringify(l[0]));return r}});function Bx(l){let r=l.facet(VR);return r.charCodeAt(0)==9?l.tabSize*r.length:r.length}function TR(l,r){let o="",f=l.tabSize,d=l.facet(VR)[0];if(d==" "){for(;r>=f;)o+=" ",r-=f;d=" "}for(let b=0;b=r?esn(l,o,r):null}class sZ{constructor(r,o={}){this.state=r,this.options=o,this.unit=Bx(r)}lineAt(r,o=1){let f=this.state.doc.lineAt(r),{simulateBreak:d,simulateDoubleBreak:b}=this.options;return d!=null&&d>=f.from&&d<=f.to?b&&d==r?{text:"",from:r}:(o<0?d-1&&(b+=p-this.countColumn(f,f.search(/\S|$/))),b}countColumn(r,o=r.length){return rE(r,this.state.tabSize,o)}lineIndent(r,o=1){let{text:f,from:d}=this.lineAt(r,o),b=this.options.overrideIndentation;if(b){let p=b(d);if(p>-1)return p}return this.countColumn(f,f.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const oZ=new ls;function esn(l,r,o){let f=r.resolveStack(o),d=r.resolveInner(o,-1).resolve(o,0).enterUnfinishedNodesBefore(o);if(d!=f.node){let b=[];for(let p=d;p&&!(p.fromf.node.to||p.from==f.node.from&&p.type==f.node.type);p=p.parent)b.push(p);for(let p=b.length-1;p>=0;p--)f={node:b[p],next:f}}return uvt(f,l,o)}function uvt(l,r,o){for(let f=l;f;f=f.next){let d=nsn(f.node);if(d)return d(EOe.create(r,o,f))}return 0}function tsn(l){return l.pos==l.options.simulateBreak&&l.options.simulateDoubleBreak}function nsn(l){let r=l.type.prop(oZ);if(r)return r;let o=l.firstChild,f;if(o&&(f=o.type.prop(ls.closedBy))){let d=l.lastChild,b=d&&f.indexOf(d.name)>-1;return p=>fvt(p,!0,1,void 0,b&&!tsn(p)?d.from:void 0)}return l.parent==null?isn:null}function isn(){return 0}class EOe extends sZ{constructor(r,o,f){super(r.state,r.options),this.base=r,this.pos=o,this.context=f}get node(){return this.context.node}static create(r,o,f){return new EOe(r,o,f)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(r){let o=this.state.doc.lineAt(r.from);for(;;){let f=r.resolve(o.from);for(;f.parent&&f.parent.from==f.from;)f=f.parent;if(rsn(f,r))break;o=this.state.doc.lineAt(f.from)}return this.lineIndent(o.from)}continue(){return uvt(this.context.next,this.base,this.pos)}}function rsn(l,r){for(let o=r;o;o=o.parent)if(l==o)return!0;return!1}function ssn(l){let r=l.node,o=r.childAfter(r.from),f=r.lastChild;if(!o)return null;let d=l.options.simulateBreak,b=l.state.doc.lineAt(o.from),p=d==null||d<=b.from?b.to:Math.min(b.to,d);for(let v=o.to;;){let O=r.childAfter(v);if(!O||O==f)return null;if(!O.type.isSkipped){if(O.from>=p)return null;let C=/^ */.exec(b.text.slice(o.to-b.from))[0].length;return{from:o.from,to:o.to+C}}v=O.to}}function ave({closing:l,align:r=!0,units:o=1}){return f=>fvt(f,r,o,l)}function fvt(l,r,o,f,d){let b=l.textAfter,p=b.match(/^\s*/)[0].length,v=f&&b.slice(p,p+f.length)==f||d==l.pos+p,O=r?ssn(l):null;return O?v?l.column(O.from):l.column(O.to):l.baseIndent+(v?0:l.unit*o)}function osn({except:l,units:r=1}={}){return o=>{let f=l&&l.test(o.textAfter);return o.baseIndent+(f?0:r*o.unit)}}const csn=200;function lsn(){return Zr.transactionFilter.of(l=>{if(!l.docChanged||!l.isUserEvent("input.type")&&!l.isUserEvent("input.complete"))return l;let r=l.startState.languageDataAt("indentOnInput",l.startState.selection.main.head);if(!r.length)return l;let o=l.newDoc,{head:f}=l.newSelection.main,d=o.lineAt(f);if(f>d.from+csn)return l;let b=o.sliceString(d.from,f);if(!r.some(C=>C.test(b)))return l;let{state:p}=l,v=-1,O=[];for(let{head:C}of p.selection.ranges){let T=p.doc.lineAt(C);if(T.from==v)continue;v=T.from;let A=TOe(p,T.from);if(A==null)continue;let j=/^\s*/.exec(T.text)[0],$=TR(p,A);j!=$&&O.push({from:T.from,to:T.from+j.length,insert:$})}return O.length?[l,{changes:O,sequential:!0}]:l})}const usn=pn.define(),AOe=new ls;function fsn(l){let r=l.firstChild,o=l.lastChild;return r&&r.too)continue;if(b&&v.from=r&&C.to>o&&(b=C)}}return b}function asn(l){let r=l.lastChild;return r&&r.to==l.to&&r.type.isError}function SY(l,r,o){for(let f of l.facet(usn)){let d=f(l,r,o);if(d)return d}return hsn(l,r,o)}function hvt(l,r){let o=r.mapPos(l.from,1),f=r.mapPos(l.to,-1);return o>=f?void 0:{from:o,to:f}}const cZ=ar.define({map:hvt}),XR=ar.define({map:hvt});function avt(l){let r=[];for(let{head:o}of l.state.selection.ranges)r.some(f=>f.from<=o&&f.to>=o)||r.push(l.lineBlockAt(o));return r}const Fx=Sf.define({create(){return cs.none},update(l,r){r.isUserEvent("delete")&&r.changes.iterChangedRanges((o,f)=>l=U0t(l,o,f)),l=l.map(r.changes);for(let o of r.effects)if(o.is(cZ)&&!dsn(l,o.value.from,o.value.to)){let{preparePlaceholder:f}=r.state.facet(pvt),d=f?cs.replace({widget:new ysn(f(r.state,o.value))}):G0t;l=l.update({add:[d.range(o.value.from,o.value.to)]})}else o.is(XR)&&(l=l.update({filter:(f,d)=>o.value.from!=f||o.value.to!=d,filterFrom:o.value.from,filterTo:o.value.to}));return r.selection&&(l=U0t(l,r.selection.main.head)),l},provide:l=>Mi.decorations.from(l),toJSON(l,r){let o=[];return l.between(0,r.doc.length,(f,d)=>{o.push(f,d)}),o},fromJSON(l){if(!Array.isArray(l)||l.length%2)throw new RangeError("Invalid JSON for fold state");let r=[];for(let o=0;o{dr&&(f=!0)}),f?l.update({filterFrom:r,filterTo:o,filter:(d,b)=>d>=o||b<=r}):l}function xY(l,r,o){var f;let d=null;return(f=l.field(Fx,!1))===null||f===void 0||f.between(r,o,(b,p)=>{(!d||d.from>b)&&(d={from:b,to:p})}),d}function dsn(l,r,o){let f=!1;return l.between(r,r,(d,b)=>{d==r&&b==o&&(f=!0)}),f}function dvt(l,r){return l.field(Fx,!1)?r:r.concat(ar.appendConfig.of(bvt()))}const gsn=l=>{for(let r of avt(l)){let o=SY(l.state,r.from,r.to);if(o)return l.dispatch({effects:dvt(l.state,[cZ.of(o),gvt(l,o)])}),!0}return!1},psn=l=>{if(!l.state.field(Fx,!1))return!1;let r=[];for(let o of avt(l)){let f=xY(l.state,o.from,o.to);f&&r.push(XR.of(f),gvt(l,f,!1))}return r.length&&l.dispatch({effects:r}),r.length>0};function gvt(l,r,o=!0){let f=l.state.doc.lineAt(r.from).number,d=l.state.doc.lineAt(r.to).number;return Mi.announce.of(`${l.state.phrase(o?"Folded lines":"Unfolded lines")} ${f} ${l.state.phrase("to")} ${d}.`)}const bsn=l=>{let{state:r}=l,o=[];for(let f=0;f{let r=l.state.field(Fx,!1);if(!r||!r.size)return!1;let o=[];return r.between(0,l.state.doc.length,(f,d)=>{o.push(XR.of({from:f,to:d}))}),l.dispatch({effects:o}),!0},msn=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:gsn},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:psn},{key:"Ctrl-Alt-[",run:bsn},{key:"Ctrl-Alt-]",run:wsn}],vsn={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},pvt=pn.define({combine(l){return U2(l,vsn)}});function bvt(l){return[Fx,Ssn]}function wvt(l,r){let{state:o}=l,f=o.facet(pvt),d=p=>{let v=l.lineBlockAt(l.posAtDOM(p.target)),O=xY(l.state,v.from,v.to);O&&l.dispatch({effects:XR.of(O)}),p.preventDefault()};if(f.placeholderDOM)return f.placeholderDOM(l,d,r);let b=document.createElement("span");return b.textContent=f.placeholderText,b.setAttribute("aria-label",o.phrase("folded code")),b.title=o.phrase("unfold"),b.className="cm-foldPlaceholder",b.onclick=d,b}const G0t=cs.replace({widget:new class extends e3{toDOM(l){return wvt(l,null)}}});class ysn extends e3{constructor(r){super(),this.value=r}eq(r){return this.value==r.value}toDOM(r){return wvt(r,this.value)}}const Osn={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class dve extends Zy{constructor(r,o){super(),this.config=r,this.open=o}eq(r){return this.config==r.config&&this.open==r.open}toDOM(r){if(this.config.markerDOM)return this.config.markerDOM(this.open);let o=document.createElement("span");return o.textContent=this.open?this.config.openText:this.config.closedText,o.title=r.state.phrase(this.open?"Fold line":"Unfold line"),o}}function ksn(l={}){let r={...Osn,...l},o=new dve(r,!0),f=new dve(r,!1),d=Qa.fromClass(class{constructor(p){this.from=p.viewport.from,this.markers=this.buildMarkers(p)}update(p){(p.docChanged||p.viewportChanged||p.startState.facet(y4)!=p.state.facet(y4)||p.startState.field(Fx,!1)!=p.state.field(Fx,!1)||Dh(p.startState)!=Dh(p.state)||r.foldingChanged(p))&&(this.markers=this.buildMarkers(p.view))}buildMarkers(p){let v=new W2;for(let O of p.viewportLineBlocks){let C=xY(p.state,O.from,O.to)?f:SY(p.state,O.from,O.to)?o:null;C&&v.add(O.from,O.from,C)}return v.finish()}}),{domEventHandlers:b}=r;return[d,xrn({class:"cm-foldGutter",markers(p){var v;return((v=p.plugin(d))===null||v===void 0?void 0:v.markers)||Jr.empty},initialSpacer(){return new dve(r,!1)},domEventHandlers:{...b,click:(p,v,O)=>{if(b.click&&b.click(p,v,O))return!0;let C=xY(p.state,v.from,v.to);if(C)return p.dispatch({effects:XR.of(C)}),!0;let T=SY(p.state,v.from,v.to);return T?(p.dispatch({effects:cZ.of(T)}),!0):!1}}}),bvt()]}const Ssn=Mi.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});let MOe=class mvt{constructor(r,o){this.specs=r;let f;function d(v){let O=qa.newName();return(f||(f=Object.create(null)))["."+O]=v,O}const b=typeof o.all=="string"?o.all:o.all?d(o.all):void 0,p=o.scope;this.scope=p instanceof zp?v=>v.prop(Mx)==p.data:p?v=>v==p:void 0,this.style=COe(r.map(v=>({tag:v.tag,class:v.class||d(Object.assign({},v,{tag:null}))})),{all:b}).style,this.module=f?new qa(f):null,this.themeType=o.themeType}static define(r,o){return new mvt(r,o||{})}};const f3e=pn.define(),vvt=pn.define({combine(l){return l.length?[l[0]]:null}});function gve(l){let r=l.facet(f3e);return r.length?r:l.facet(vvt)}function yvt(l,r){let o=[Csn],f;return l instanceof MOe&&(l.module&&o.push(Mi.styleModule.of(l.module)),f=l.themeType),r!=null&&r.fallback?o.push(vvt.of(l)):f?o.push(f3e.computeN([Mi.darkTheme],d=>d.facet(Mi.darkTheme)==(f=="dark")?[l]:[])):o.push(f3e.of(l)),o}let xsn=class{constructor(r){this.markCache=Object.create(null),this.tree=Dh(r.state),this.decorations=this.buildDeco(r,gve(r.state)),this.decoratedTo=r.viewport.to}update(r){let o=Dh(r.state),f=gve(r.state),d=f!=gve(r.startState),{viewport:b}=r.view,p=r.changes.mapPos(this.decoratedTo,1);o.length=b.to?(this.decorations=this.decorations.map(r.changes),this.decoratedTo=p):(o!=this.tree||r.viewportChanged||d)&&(this.tree=o,this.decorations=this.buildDeco(r.view,f),this.decoratedTo=b.to)}buildDeco(r,o){if(!o||!this.tree.length)return cs.none;let f=new W2;for(let{from:d,to:b}of r.visibleRanges)svt(this.tree,o,(p,v,O)=>{f.add(p,v,this.markCache[O]||(this.markCache[O]=cs.mark({class:O})))},d,b);return f.finish()}};const Csn=qw.high(Qa.fromClass(xsn,{decorations:l=>l.decorations})),Tsn=MOe.define([{tag:K.meta,color:"#404740"},{tag:K.link,textDecoration:"underline"},{tag:K.heading,textDecoration:"underline",fontWeight:"bold"},{tag:K.emphasis,fontStyle:"italic"},{tag:K.strong,fontWeight:"bold"},{tag:K.strikethrough,textDecoration:"line-through"},{tag:K.keyword,color:"#708"},{tag:[K.atom,K.bool,K.url,K.contentSeparator,K.labelName],color:"#219"},{tag:[K.literal,K.inserted],color:"#164"},{tag:[K.string,K.deleted],color:"#a11"},{tag:[K.regexp,K.escape,K.special(K.string)],color:"#e40"},{tag:K.definition(K.variableName),color:"#00f"},{tag:K.local(K.variableName),color:"#30a"},{tag:[K.typeName,K.namespace],color:"#085"},{tag:K.className,color:"#167"},{tag:[K.special(K.variableName),K.macroName],color:"#256"},{tag:K.definition(K.propertyName),color:"#00c"},{tag:K.comment,color:"#940"},{tag:K.invalid,color:"#f00"}]),Esn=Mi.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Ovt=1e4,kvt="()[]{}",Svt=pn.define({combine(l){return U2(l,{afterCursor:!0,brackets:kvt,maxScanDistance:Ovt,renderMatch:Psn})}}),Asn=cs.mark({class:"cm-matchingBracket"}),Msn=cs.mark({class:"cm-nonmatchingBracket"});function Psn(l){let r=[],o=l.matched?Asn:Msn;return r.push(o.range(l.start.from,l.start.to)),l.end&&r.push(o.range(l.end.from,l.end.to)),r}const jsn=Sf.define({create(){return cs.none},update(l,r){if(!r.docChanged&&!r.selection)return l;let o=[],f=r.state.facet(Svt);for(let d of r.state.selection.ranges){if(!d.empty)continue;let b=F2(r.state,d.head,-1,f)||d.head>0&&F2(r.state,d.head-1,1,f)||f.afterCursor&&(F2(r.state,d.head,1,f)||d.headMi.decorations.from(l)}),Dsn=[jsn,Esn];function $sn(l={}){return[Svt.of(l),Dsn]}const Nsn=new ls;function h3e(l,r,o){let f=l.prop(r<0?ls.openedBy:ls.closedBy);if(f)return f;if(l.name.length==1){let d=o.indexOf(l.name);if(d>-1&&d%2==(r<0?1:0))return[o[d+r]]}return null}function a3e(l){let r=l.type.prop(Nsn);return r?r(l.node):l}function F2(l,r,o,f={}){let d=f.maxScanDistance||Ovt,b=f.brackets||kvt,p=Dh(l),v=p.resolveInner(r,o);for(let O=v;O;O=O.parent){let C=h3e(O.type,o,b);if(C&&O.from0?r>=T.from&&rT.from&&r<=T.to))return Isn(l,r,o,O,T,C,b)}}return Rsn(l,r,o,p,v.type,d,b)}function Isn(l,r,o,f,d,b,p){let v=f.parent,O={from:d.from,to:d.to},C=0,T=v==null?void 0:v.cursor();if(T&&(o<0?T.childBefore(f.from):T.childAfter(f.to)))do if(o<0?T.to<=f.from:T.from>=f.to){if(C==0&&b.indexOf(T.type.name)>-1&&T.from0)return null;let C={from:o<0?r-1:r,to:o>0?r+1:r},T=l.doc.iterRange(r,o>0?l.doc.length:0),A=0;for(let j=0;!T.next().done&&j<=b;){let $=T.value;o<0&&(j+=$.length);let L=r+j*o;for(let z=o>0?0:$.length-1,Z=o>0?$.length:-1;z!=Z;z+=o){let Y=p.indexOf($[z]);if(!(Y<0||f.resolveInner(L+z,1).type!=d))if(Y%2==0==o>0)A++;else{if(A==1)return{start:C,end:{from:L+z,to:L+z+1},matched:Y>>1==O>>1};A--}}o>0&&(j+=$.length)}return T.done?{start:C,matched:!1}:null}function Y0t(l,r,o,f=0,d=0){r==null&&(r=l.search(/[^\s\u00a0]/),r==-1&&(r=l.length));let b=d;for(let p=f;p=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.poso}eatSpace(){let r=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>r}skipToEnd(){this.pos=this.string.length}skipTo(r){let o=this.string.indexOf(r,this.pos);if(o>-1)return this.pos=o,!0}backUp(r){this.pos-=r}column(){return this.lastColumnPosf?p.toLowerCase():p,b=this.string.substr(this.pos,r.length);return d(b)==d(r)?(o!==!1&&(this.pos+=r.length),!0):null}else{let d=this.string.slice(this.pos).match(r);return d&&d.index>0?null:(d&&o!==!1&&(this.pos+=d[0].length),d)}}current(){return this.string.slice(this.start,this.pos)}}function Lsn(l){return{name:l.name||"",token:l.token,blankLine:l.blankLine||(()=>{}),startState:l.startState||(()=>!0),copyState:l.copyState||Bsn,indent:l.indent||(()=>null),languageData:l.languageData||{},tokenTable:l.tokenTable||jOe,mergeTokens:l.mergeTokens!==!1}}function Bsn(l){if(typeof l!="object")return l;let r={};for(let o in l){let f=l[o];r[o]=f instanceof Array?f.slice():f}return r}const Z0t=new WeakMap;class CY extends zp{constructor(r){let o=ovt(r.languageData),f=Lsn(r),d,b=new class extends iZ{createParse(p,v,O){return new _sn(d,p,v,O)}};super(o,b,[],r.name),this.topNode=Qsn(o,this),d=this,this.streamParser=f,this.stateAfter=new ls({perNode:!0}),this.tokenTable=r.tokenTable?new Avt(f.tokenTable):qsn}static define(r){return new CY(r)}getIndent(r){let o,{overrideIndentation:f}=r.options;f&&(o=Z0t.get(r.state),o!=null&&o1e4)return null;for(;b=f&&o+r.length<=d&&r.prop(l.stateAfter);if(b)return{state:l.streamParser.copyState(b),pos:o+r.length};for(let p=r.children.length-1;p>=0;p--){let v=r.children[p],O=o+r.positions[p],C=v instanceof yo&&O=r.length)return r;!d&&o==0&&r.type==l.topNode&&(d=!0);for(let b=r.children.length-1;b>=0;b--){let p=r.positions[b],v=r.children[b],O;if(po&&POe(l,b.tree,0-b.offset,o,v),C;if(O&&O.pos<=f&&(C=Cvt(l,b.tree,o+b.offset,O.pos+b.offset,!1)))return{state:O.state,tree:C}}return{state:l.streamParser.startState(d?Bx(d):4),tree:yo.empty}}let _sn=class{constructor(r,o,f,d){this.lang=r,this.input=o,this.fragments=f,this.ranges=d,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=d[d.length-1].to;let b=o3e.get(),p=d[0].from,{state:v,tree:O}=Fsn(r,f,p,this.to,b==null?void 0:b.state);this.state=v,this.parsedPos=this.chunkStart=p+O.length;for(let C=0;CC.from<=b.viewport.from&&C.to>=b.viewport.from)&&(this.state=this.lang.streamParser.startState(Bx(b.state)),b.skipUntilInView(this.parsedPos,b.viewport.from),this.parsedPos=b.viewport.from),this.moveRangeIndex()}advance(){let r=o3e.get(),o=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),f=Math.min(o,this.chunkStart+2048);for(r&&(f=Math.min(f,r.viewport.to));this.parsedPos=o?this.finish():r&&this.parsedPos>=r.viewport.to?(r.skipUntilInView(this.parsedPos,o),this.finish()):null}stopAt(r){this.stoppedAt=r}lineAfter(r){let o=this.input.chunk(r);if(this.input.lineChunks)o==` +`&&(o="");else{let f=o.indexOf(` +`);f>-1&&(o=o.slice(0,f))}return r+o.length<=this.to?o:o.slice(0,this.to-r)}nextLine(){let r=this.parsedPos,o=this.lineAfter(r),f=r+o.length;for(let d=this.rangeIndex;;){let b=this.ranges[d].to;if(b>=f||(o=o.slice(0,b-(f-o.length)),d++,d==this.ranges.length))break;let p=this.ranges[d].from,v=this.lineAfter(p);o+=v,f=p+v.length}return{line:o,end:f}}skipGapsTo(r,o,f){for(;;){let d=this.ranges[this.rangeIndex].to,b=r+o;if(f>0?d>b:d>=b)break;let p=this.ranges[++this.rangeIndex].from;o+=p-d}return o}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to1){d=this.skipGapsTo(o,d,1),o+=d;let v=this.chunk.length;d=this.skipGapsTo(f,d,-1),f+=d,b+=this.chunk.length-v}let p=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&b==4&&p>=0&&this.chunk[p]==r&&this.chunk[p+2]==o?this.chunk[p+2]=f:this.chunk.push(r,o,f,b),d}parseLine(r){let{line:o,end:f}=this.nextLine(),d=0,{streamParser:b}=this.lang,p=new xvt(o,r?r.state.tabSize:4,r?Bx(r.state):2);if(p.eol())b.blankLine(this.state,p.indentUnit);else for(;!p.eol();){let v=Tvt(b.token,p,this.state);if(v&&(d=this.emitToken(this.lang.tokenTable.resolve(v),this.parsedPos+p.start,this.parsedPos+p.pos,d)),p.start>1e4)break}this.parsedPos=f,this.moveRangeIndex(),this.parsedPosr.start)return d}throw new Error("Stream parser failed to advance stream.")}const jOe=Object.create(null),ER=[jh.none],Hsn=new nZ(ER),J0t=[],ept=Object.create(null),Evt=Object.create(null);for(let[l,r]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Evt[l]=Mvt(jOe,r);class Avt{constructor(r){this.extra=r,this.table=Object.assign(Object.create(null),Evt)}resolve(r){return r?this.table[r]||(this.table[r]=Mvt(this.extra,r)):0}}const qsn=new Avt(jOe);function pve(l,r){J0t.indexOf(l)>-1||(J0t.push(l),console.warn(r))}function Mvt(l,r){let o=[];for(let v of r.split(" ")){let O=[];for(let C of v.split(".")){let T=l[C]||K[C];T?typeof T=="function"?O.length?O=O.map(T):pve(C,`Modifier ${C} used at start of tag`):O.length?pve(C,`Tag ${C} used as modifier`):O=Array.isArray(T)?T:[T]:pve(C,`Unknown highlighting tag ${C}`)}for(let C of O)o.push(C)}if(!o.length)return 0;let f=r.replace(/ /g,"_"),d=f+" "+o.map(v=>v.id),b=ept[d];if(b)return b.id;let p=ept[d]=jh.define({id:ER.length,name:f,props:[rZ({[f]:o})]});return ER.push(p),p.id}function Qsn(l,r){let o=jh.define({id:ER.length,name:"Document",props:[Mx.add(()=>l),oZ.add(()=>f=>r.getIndent(f))],top:!0});return ER.push(o),o}al.RTL,al.LTR;const zsn=l=>{let{state:r}=l,o=r.doc.lineAt(r.selection.main.from),f=$Oe(l.state,o.from);return f.line?Wsn(l):f.block?Vsn(l):!1};function DOe(l,r){return({state:o,dispatch:f})=>{if(o.readOnly)return!1;let d=l(r,o);return d?(f(o.update(d)),!0):!1}}const Wsn=DOe(Gsn,0),Ksn=DOe(Pvt,0),Vsn=DOe((l,r)=>Pvt(l,r,Usn(r)),0);function $Oe(l,r){let o=l.languageDataAt("commentTokens",r,1);return o.length?o[0]:{}}const _I=50;function Xsn(l,{open:r,close:o},f,d){let b=l.sliceDoc(f-_I,f),p=l.sliceDoc(d,d+_I),v=/\s*$/.exec(b)[0].length,O=/^\s*/.exec(p)[0].length,C=b.length-v;if(b.slice(C-r.length,C)==r&&p.slice(O,O+o.length)==o)return{open:{pos:f-v,margin:v&&1},close:{pos:d+O,margin:O&&1}};let T,A;d-f<=2*_I?T=A=l.sliceDoc(f,d):(T=l.sliceDoc(f,f+_I),A=l.sliceDoc(d-_I,d));let j=/^\s*/.exec(T)[0].length,$=/\s*$/.exec(A)[0].length,L=A.length-$-o.length;return T.slice(j,j+r.length)==r&&A.slice(L,L+o.length)==o?{open:{pos:f+j+r.length,margin:/\s/.test(T.charAt(j+r.length))?1:0},close:{pos:d-$-o.length,margin:/\s/.test(A.charAt(L-1))?1:0}}:null}function Usn(l){let r=[];for(let o of l.selection.ranges){let f=l.doc.lineAt(o.from),d=o.to<=f.to?f:l.doc.lineAt(o.to);d.from>f.from&&d.from==o.to&&(d=o.to==f.to+1?f:l.doc.lineAt(o.to-1));let b=r.length-1;b>=0&&r[b].to>f.from?r[b].to=d.to:r.push({from:f.from+/^\s*/.exec(f.text)[0].length,to:d.to})}return r}function Pvt(l,r,o=r.selection.ranges){let f=o.map(b=>$Oe(r,b.from).block);if(!f.every(b=>b))return null;let d=o.map((b,p)=>Xsn(r,f[p],b.from,b.to));if(l!=2&&!d.every(b=>b))return{changes:r.changes(o.map((b,p)=>d[p]?[]:[{from:b.from,insert:f[p].open+" "},{from:b.to,insert:" "+f[p].close}]))};if(l!=1&&d.some(b=>b)){let b=[];for(let p=0,v;pd&&(b==p||p>A.from)){d=A.from;let j=/^\s*/.exec(A.text)[0].length,$=j==A.length,L=A.text.slice(j,j+C.length)==C?j:-1;jb.comment<0&&(!b.empty||b.single))){let b=[];for(let{line:v,token:O,indent:C,empty:T,single:A}of f)(A||!T)&&b.push({from:v.from+C,insert:O+" "});let p=r.changes(b);return{changes:p,selection:r.selection.map(p,1)}}else if(l!=1&&f.some(b=>b.comment>=0)){let b=[];for(let{line:p,comment:v,token:O}of f)if(v>=0){let C=p.from+v,T=C+O.length;p.text[T-p.from]==" "&&T++,b.push({from:C,to:T})}return{changes:b}}return null}const d3e=Qw.define(),Ysn=Qw.define(),Zsn=pn.define(),jvt=pn.define({combine(l){return U2(l,{minDepth:100,newGroupDelay:500,joinToEvent:(r,o)=>o},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(r,o)=>(f,d)=>r(f,d)||o(f,d)})}}),Dvt=Sf.define({create(){return _2.empty},update(l,r){let o=r.state.facet(jvt),f=r.annotation(d3e);if(f){let O=K1.fromTransaction(r,f.selection),C=f.side,T=C==0?l.undone:l.done;return O?T=TY(T,T.length,o.minDepth,O):T=Ivt(T,r.startState.selection),new _2(C==0?f.rest:T,C==0?T:f.rest)}let d=r.annotation(Ysn);if((d=="full"||d=="before")&&(l=l.isolate()),r.annotation(tf.addToHistory)===!1)return r.changes.empty?l:l.addMapping(r.changes.desc);let b=K1.fromTransaction(r),p=r.annotation(tf.time),v=r.annotation(tf.userEvent);return b?l=l.addChanges(b,p,v,o,r):r.selection&&(l=l.addSelection(r.startState.selection,p,v,o.newGroupDelay)),(d=="full"||d=="after")&&(l=l.isolate()),l},toJSON(l){return{done:l.done.map(r=>r.toJSON()),undone:l.undone.map(r=>r.toJSON())}},fromJSON(l){return new _2(l.done.map(K1.fromJSON),l.undone.map(K1.fromJSON))}});function Jsn(l={}){return[Dvt,jvt.of(l),Mi.domEventHandlers({beforeinput(r,o){let f=r.inputType=="historyUndo"?$vt:r.inputType=="historyRedo"?g3e:null;return f?(r.preventDefault(),f(o)):!1}})]}function lZ(l,r){return function({state:o,dispatch:f}){if(!r&&o.readOnly)return!1;let d=o.field(Dvt,!1);if(!d)return!1;let b=d.pop(l,o,r);return b?(f(b),!0):!1}}const $vt=lZ(0,!1),g3e=lZ(1,!1),eon=lZ(0,!0),ton=lZ(1,!0);class K1{constructor(r,o,f,d,b){this.changes=r,this.effects=o,this.mapped=f,this.startSelection=d,this.selectionsAfter=b}setSelAfter(r){return new K1(this.changes,this.effects,this.mapped,this.startSelection,r)}toJSON(){var r,o,f;return{changes:(r=this.changes)===null||r===void 0?void 0:r.toJSON(),mapped:(o=this.mapped)===null||o===void 0?void 0:o.toJSON(),startSelection:(f=this.startSelection)===null||f===void 0?void 0:f.toJSON(),selectionsAfter:this.selectionsAfter.map(d=>d.toJSON())}}static fromJSON(r){return new K1(r.changes&&ef.fromJSON(r.changes),[],r.mapped&&Q2.fromJSON(r.mapped),r.startSelection&&St.fromJSON(r.startSelection),r.selectionsAfter.map(St.fromJSON))}static fromTransaction(r,o){let f=Wp;for(let d of r.startState.facet(Zsn)){let b=d(r);b.length&&(f=f.concat(b))}return!f.length&&r.changes.empty?null:new K1(r.changes.invert(r.startState.doc),f,void 0,o||r.startState.selection,Wp)}static selection(r){return new K1(void 0,Wp,void 0,void 0,r)}}function TY(l,r,o,f){let d=r+1>o+20?r-o-1:0,b=l.slice(d,r);return b.push(f),b}function non(l,r){let o=[],f=!1;return l.iterChangedRanges((d,b)=>o.push(d,b)),r.iterChangedRanges((d,b,p,v)=>{for(let O=0;O=C&&p<=T&&(f=!0)}}),f}function ion(l,r){return l.ranges.length==r.ranges.length&&l.ranges.filter((o,f)=>o.empty!=r.ranges[f].empty).length===0}function Nvt(l,r){return l.length?r.length?l.concat(r):l:r}const Wp=[],ron=200;function Ivt(l,r){if(l.length){let o=l[l.length-1],f=o.selectionsAfter.slice(Math.max(0,o.selectionsAfter.length-ron));return f.length&&f[f.length-1].eq(r)?l:(f.push(r),TY(l,l.length-1,1e9,o.setSelAfter(f)))}else return[K1.selection([r])]}function son(l){let r=l[l.length-1],o=l.slice();return o[l.length-1]=r.setSelAfter(r.selectionsAfter.slice(0,r.selectionsAfter.length-1)),o}function bve(l,r){if(!l.length)return l;let o=l.length,f=Wp;for(;o;){let d=oon(l[o-1],r,f);if(d.changes&&!d.changes.empty||d.effects.length){let b=l.slice(0,o);return b[o-1]=d,b}else r=d.mapped,o--,f=d.selectionsAfter}return f.length?[K1.selection(f)]:Wp}function oon(l,r,o){let f=Nvt(l.selectionsAfter.length?l.selectionsAfter.map(v=>v.map(r)):Wp,o);if(!l.changes)return K1.selection(f);let d=l.changes.map(r),b=r.mapDesc(l.changes,!0),p=l.mapped?l.mapped.composeDesc(b):b;return new K1(d,ar.mapEffects(l.effects,r),p,l.startSelection.map(b),f)}const con=/^(input\.type|delete)($|\.)/;class _2{constructor(r,o,f=0,d=void 0){this.done=r,this.undone=o,this.prevTime=f,this.prevUserEvent=d}isolate(){return this.prevTime?new _2(this.done,this.undone):this}addChanges(r,o,f,d,b){let p=this.done,v=p[p.length-1];return v&&v.changes&&!v.changes.empty&&r.changes&&(!f||con.test(f))&&(!v.selectionsAfter.length&&o-this.prevTime0&&o-this.prevTimeo.empty?l.moveByChar(o,r):uZ(o,r))}function za(l){return l.textDirectionAt(l.state.selection.main.head)==al.LTR}const Bvt=l=>Lvt(l,!za(l)),Fvt=l=>Lvt(l,za(l));function _vt(l,r){return zw(l,o=>o.empty?l.moveByGroup(o,r):uZ(o,r))}const lon=l=>_vt(l,!za(l)),uon=l=>_vt(l,za(l));function fon(l,r,o){if(r.type.prop(o))return!0;let f=r.to-r.from;return f&&(f>2||/[^\s,.;:]/.test(l.sliceDoc(r.from,r.to)))||r.firstChild}function fZ(l,r,o){let f=Dh(l).resolveInner(r.head),d=o?ls.closedBy:ls.openedBy;for(let O=r.head;;){let C=o?f.childAfter(O):f.childBefore(O);if(!C)break;fon(l,C,d)?f=C:O=o?C.to:C.from}let b=f.type.prop(d),p,v;return b&&(p=o?F2(l,f.from,1):F2(l,f.to,-1))&&p.matched?v=o?p.end.to:p.end.from:v=o?f.to:f.from,St.cursor(v,o?-1:1)}const hon=l=>zw(l,r=>fZ(l.state,r,!za(l))),aon=l=>zw(l,r=>fZ(l.state,r,za(l)));function Hvt(l,r){return zw(l,o=>{if(!o.empty)return uZ(o,r);let f=l.moveVertically(o,r);return f.head!=o.head?f:l.moveToLineBoundary(o,r)})}const qvt=l=>Hvt(l,!1),Qvt=l=>Hvt(l,!0);function zvt(l){let r=l.scrollDOM.clientHeightp.empty?l.moveVertically(p,r,o.height):uZ(p,r));if(d.eq(f.selection))return!1;let b;if(o.selfScroll){let p=l.coordsAtPos(f.selection.main.head),v=l.scrollDOM.getBoundingClientRect(),O=v.top+o.marginTop,C=v.bottom-o.marginBottom;p&&p.top>O&&p.bottomWvt(l,!1),p3e=l=>Wvt(l,!0);function k4(l,r,o){let f=l.lineBlockAt(r.head),d=l.moveToLineBoundary(r,o);if(d.head==r.head&&d.head!=(o?f.to:f.from)&&(d=l.moveToLineBoundary(r,o,!1)),!o&&d.head==f.from&&f.length){let b=/^\s*/.exec(l.state.sliceDoc(f.from,Math.min(f.from+100,f.to)))[0].length;b&&r.head!=f.from+b&&(d=St.cursor(f.from+b))}return d}const don=l=>zw(l,r=>k4(l,r,!0)),gon=l=>zw(l,r=>k4(l,r,!1)),pon=l=>zw(l,r=>k4(l,r,!za(l))),bon=l=>zw(l,r=>k4(l,r,za(l))),won=l=>zw(l,r=>St.cursor(l.lineBlockAt(r.head).from,1)),mon=l=>zw(l,r=>St.cursor(l.lineBlockAt(r.head).to,-1));function von(l,r,o){let f=!1,d=oE(l.selection,b=>{let p=F2(l,b.head,-1)||F2(l,b.head,1)||b.head>0&&F2(l,b.head-1,1)||b.headvon(l,r);function Zp(l,r){let o=oE(l.state.selection,f=>{let d=r(f);return St.range(f.anchor,d.head,d.goalColumn,d.bidiLevel||void 0)});return o.eq(l.state.selection)?!1:(l.dispatch(G2(l.state,o)),!0)}function Kvt(l,r){return Zp(l,o=>l.moveByChar(o,r))}const Vvt=l=>Kvt(l,!za(l)),Xvt=l=>Kvt(l,za(l));function Uvt(l,r){return Zp(l,o=>l.moveByGroup(o,r))}const Oon=l=>Uvt(l,!za(l)),kon=l=>Uvt(l,za(l)),Son=l=>Zp(l,r=>fZ(l.state,r,!za(l))),xon=l=>Zp(l,r=>fZ(l.state,r,za(l)));function Gvt(l,r){return Zp(l,o=>l.moveVertically(o,r))}const Yvt=l=>Gvt(l,!1),Zvt=l=>Gvt(l,!0);function Jvt(l,r){return Zp(l,o=>l.moveVertically(o,r,zvt(l).height))}const npt=l=>Jvt(l,!1),ipt=l=>Jvt(l,!0),Con=l=>Zp(l,r=>k4(l,r,!0)),Ton=l=>Zp(l,r=>k4(l,r,!1)),Eon=l=>Zp(l,r=>k4(l,r,!za(l))),Aon=l=>Zp(l,r=>k4(l,r,za(l))),Mon=l=>Zp(l,r=>St.cursor(l.lineBlockAt(r.head).from)),Pon=l=>Zp(l,r=>St.cursor(l.lineBlockAt(r.head).to)),rpt=({state:l,dispatch:r})=>(r(G2(l,{anchor:0})),!0),spt=({state:l,dispatch:r})=>(r(G2(l,{anchor:l.doc.length})),!0),opt=({state:l,dispatch:r})=>(r(G2(l,{anchor:l.selection.main.anchor,head:0})),!0),cpt=({state:l,dispatch:r})=>(r(G2(l,{anchor:l.selection.main.anchor,head:l.doc.length})),!0),jon=({state:l,dispatch:r})=>(r(l.update({selection:{anchor:0,head:l.doc.length},userEvent:"select"})),!0),Don=({state:l,dispatch:r})=>{let o=hZ(l).map(({from:f,to:d})=>St.range(f,Math.min(d+1,l.doc.length)));return r(l.update({selection:St.create(o),userEvent:"select"})),!0},$on=({state:l,dispatch:r})=>{let o=oE(l.selection,f=>{let d=Dh(l),b=d.resolveStack(f.from,1);if(f.empty){let p=d.resolveStack(f.from,-1);p.node.from>=b.node.from&&p.node.to<=b.node.to&&(b=p)}for(let p=b;p;p=p.next){let{node:v}=p;if((v.from=f.to||v.to>f.to&&v.from<=f.from)&&p.next)return St.range(v.to,v.from)}return f});return o.eq(l.selection)?!1:(r(G2(l,o)),!0)},Non=({state:l,dispatch:r})=>{let o=l.selection,f=null;return o.ranges.length>1?f=St.create([o.main]):o.main.empty||(f=St.create([St.cursor(o.main.head)])),f?(r(G2(l,f)),!0):!1};function UR(l,r){if(l.state.readOnly)return!1;let o="delete.selection",{state:f}=l,d=f.changeByRange(b=>{let{from:p,to:v}=b;if(p==v){let O=r(b);Op&&(o="delete.forward",O=pG(l,O,!0)),p=Math.min(p,O),v=Math.max(v,O)}else p=pG(l,p,!1),v=pG(l,v,!0);return p==v?{range:b}:{changes:{from:p,to:v},range:St.cursor(p,pd(l)))f.between(r,r,(d,b)=>{dr&&(r=o?b:d)});return r}const eyt=(l,r,o)=>UR(l,f=>{let d=f.from,{state:b}=l,p=b.doc.lineAt(d),v,O;if(o&&!r&&d>p.from&&deyt(l,!1,!0),tyt=l=>eyt(l,!0,!1),nyt=(l,r)=>UR(l,o=>{let f=o.head,{state:d}=l,b=d.doc.lineAt(f),p=d.charCategorizer(f);for(let v=null;;){if(f==(r?b.to:b.from)){f==o.head&&b.number!=(r?d.doc.lines:1)&&(f+=r?1:-1);break}let O=eu(b.text,f-b.from,r)+b.from,C=b.text.slice(Math.min(f,O)-b.from,Math.max(f,O)-b.from),T=p(C);if(v!=null&&T!=v)break;(C!=" "||f!=o.head)&&(v=T),f=O}return f}),iyt=l=>nyt(l,!1),Ion=l=>nyt(l,!0),Ron=l=>UR(l,r=>{let o=l.lineBlockAt(r.head).to;return r.headUR(l,r=>{let o=l.moveToLineBoundary(r,!1).head;return r.head>o?o:Math.max(0,r.head-1)}),Bon=l=>UR(l,r=>{let o=l.moveToLineBoundary(r,!0).head;return r.head{if(l.readOnly)return!1;let o=l.changeByRange(f=>({changes:{from:f.from,to:f.to,insert:Nr.of(["",""])},range:St.cursor(f.from)}));return r(l.update(o,{scrollIntoView:!0,userEvent:"input"})),!0},_on=({state:l,dispatch:r})=>{if(l.readOnly)return!1;let o=l.changeByRange(f=>{if(!f.empty||f.from==0||f.from==l.doc.length)return{range:f};let d=f.from,b=l.doc.lineAt(d),p=d==b.from?d-1:eu(b.text,d-b.from,!1)+b.from,v=d==b.to?d+1:eu(b.text,d-b.from,!0)+b.from;return{changes:{from:p,to:v,insert:l.doc.slice(d,v).append(l.doc.slice(p,d))},range:St.cursor(v)}});return o.changes.empty?!1:(r(l.update(o,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function hZ(l){let r=[],o=-1;for(let f of l.selection.ranges){let d=l.doc.lineAt(f.from),b=l.doc.lineAt(f.to);if(!f.empty&&f.to==b.from&&(b=l.doc.lineAt(f.to-1)),o>=d.number){let p=r[r.length-1];p.to=b.to,p.ranges.push(f)}else r.push({from:d.from,to:b.to,ranges:[f]});o=b.number+1}return r}function ryt(l,r,o){if(l.readOnly)return!1;let f=[],d=[];for(let b of hZ(l)){if(o?b.to==l.doc.length:b.from==0)continue;let p=l.doc.lineAt(o?b.to+1:b.from-1),v=p.length+1;if(o){f.push({from:b.to,to:p.to},{from:b.from,insert:p.text+l.lineBreak});for(let O of b.ranges)d.push(St.range(Math.min(l.doc.length,O.anchor+v),Math.min(l.doc.length,O.head+v)))}else{f.push({from:p.from,to:b.from},{from:b.to,insert:l.lineBreak+p.text});for(let O of b.ranges)d.push(St.range(O.anchor-v,O.head-v))}}return f.length?(r(l.update({changes:f,scrollIntoView:!0,selection:St.create(d,l.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Hon=({state:l,dispatch:r})=>ryt(l,r,!1),qon=({state:l,dispatch:r})=>ryt(l,r,!0);function syt(l,r,o){if(l.readOnly)return!1;let f=[];for(let d of hZ(l))o?f.push({from:d.from,insert:l.doc.slice(d.from,d.to)+l.lineBreak}):f.push({from:d.to,insert:l.lineBreak+l.doc.slice(d.from,d.to)});return r(l.update({changes:f,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Qon=({state:l,dispatch:r})=>syt(l,r,!1),zon=({state:l,dispatch:r})=>syt(l,r,!0),Won=l=>{if(l.state.readOnly)return!1;let{state:r}=l,o=r.changes(hZ(r).map(({from:d,to:b})=>(d>0?d--:b{let b;if(l.lineWrapping){let p=l.lineBlockAt(d.head),v=l.coordsAtPos(d.head,d.assoc||1);v&&(b=p.bottom+l.documentTop-v.bottom+l.defaultLineHeight/2)}return l.moveVertically(d,!0,b)}).map(o);return l.dispatch({changes:o,selection:f,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Kon(l,r){if(/\(\)|\[\]|\{\}/.test(l.sliceDoc(r-1,r+1)))return{from:r,to:r};let o=Dh(l).resolveInner(r),f=o.childBefore(r),d=o.childAfter(r),b;return f&&d&&f.to<=r&&d.from>=r&&(b=f.type.prop(ls.closedBy))&&b.indexOf(d.name)>-1&&l.doc.lineAt(f.to).from==l.doc.lineAt(d.from).from&&!/\S/.test(l.sliceDoc(f.to,d.from))?{from:f.to,to:d.from}:null}const lpt=oyt(!1),Von=oyt(!0);function oyt(l){return({state:r,dispatch:o})=>{if(r.readOnly)return!1;let f=r.changeByRange(d=>{let{from:b,to:p}=d,v=r.doc.lineAt(b),O=!l&&b==p&&Kon(r,b);l&&(b=p=(p<=v.to?v:r.doc.lineAt(p)).to);let C=new sZ(r,{simulateBreak:b,simulateDoubleBreak:!!O}),T=TOe(C,b);for(T==null&&(T=rE(/^\s*/.exec(r.doc.lineAt(b).text)[0],r.tabSize));pv.from&&b{let d=[];for(let p=f.from;p<=f.to;){let v=l.doc.lineAt(p);v.number>o&&(f.empty||f.to>v.from)&&(r(v,d,f),o=v.number),p=v.to+1}let b=l.changes(d);return{changes:d,range:St.range(b.mapPos(f.anchor,1),b.mapPos(f.head,1))}})}const Xon=({state:l,dispatch:r})=>{if(l.readOnly)return!1;let o=Object.create(null),f=new sZ(l,{overrideIndentation:b=>{let p=o[b];return p??-1}}),d=NOe(l,(b,p,v)=>{let O=TOe(f,b.from);if(O==null)return;/\S/.test(b.text)||(O=0);let C=/^\s*/.exec(b.text)[0],T=TR(l,O);(C!=T||v.froml.readOnly?!1:(r(l.update(NOe(l,(o,f)=>{f.push({from:o.from,insert:l.facet(VR)})}),{userEvent:"input.indent"})),!0),cyt=({state:l,dispatch:r})=>l.readOnly?!1:(r(l.update(NOe(l,(o,f)=>{let d=/^\s*/.exec(o.text)[0];if(!d)return;let b=rE(d,l.tabSize),p=0,v=TR(l,Math.max(0,b-Bx(l)));for(;p(l.setTabFocusMode(),!0),Gon=[{key:"Ctrl-b",run:Bvt,shift:Vvt,preventDefault:!0},{key:"Ctrl-f",run:Fvt,shift:Xvt},{key:"Ctrl-p",run:qvt,shift:Yvt},{key:"Ctrl-n",run:Qvt,shift:Zvt},{key:"Ctrl-a",run:won,shift:Mon},{key:"Ctrl-e",run:mon,shift:Pon},{key:"Ctrl-d",run:tyt},{key:"Ctrl-h",run:b3e},{key:"Ctrl-k",run:Ron},{key:"Ctrl-Alt-h",run:iyt},{key:"Ctrl-o",run:Fon},{key:"Ctrl-t",run:_on},{key:"Ctrl-v",run:p3e}],Yon=[{key:"ArrowLeft",run:Bvt,shift:Vvt,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:lon,shift:Oon,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:pon,shift:Eon,preventDefault:!0},{key:"ArrowRight",run:Fvt,shift:Xvt,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:uon,shift:kon,preventDefault:!0},{mac:"Cmd-ArrowRight",run:bon,shift:Aon,preventDefault:!0},{key:"ArrowUp",run:qvt,shift:Yvt,preventDefault:!0},{mac:"Cmd-ArrowUp",run:rpt,shift:opt},{mac:"Ctrl-ArrowUp",run:tpt,shift:npt},{key:"ArrowDown",run:Qvt,shift:Zvt,preventDefault:!0},{mac:"Cmd-ArrowDown",run:spt,shift:cpt},{mac:"Ctrl-ArrowDown",run:p3e,shift:ipt},{key:"PageUp",run:tpt,shift:npt},{key:"PageDown",run:p3e,shift:ipt},{key:"Home",run:gon,shift:Ton,preventDefault:!0},{key:"Mod-Home",run:rpt,shift:opt},{key:"End",run:don,shift:Con,preventDefault:!0},{key:"Mod-End",run:spt,shift:cpt},{key:"Enter",run:lpt,shift:lpt},{key:"Mod-a",run:jon},{key:"Backspace",run:b3e,shift:b3e},{key:"Delete",run:tyt},{key:"Mod-Backspace",mac:"Alt-Backspace",run:iyt},{key:"Mod-Delete",mac:"Alt-Delete",run:Ion},{mac:"Mod-Backspace",run:Lon},{mac:"Mod-Delete",run:Bon}].concat(Gon.map(l=>({mac:l.key,run:l.run,shift:l.shift}))),lyt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:hon,shift:Son},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:aon,shift:xon},{key:"Alt-ArrowUp",run:Hon},{key:"Shift-Alt-ArrowUp",run:Qon},{key:"Alt-ArrowDown",run:qon},{key:"Shift-Alt-ArrowDown",run:zon},{key:"Escape",run:Non},{key:"Mod-Enter",run:Von},{key:"Alt-l",mac:"Ctrl-l",run:Don},{key:"Mod-i",run:$on,preventDefault:!0},{key:"Mod-[",run:cyt},{key:"Mod-]",run:IOe},{key:"Mod-Alt-\\",run:Xon},{key:"Shift-Mod-k",run:Won},{key:"Shift-Mod-\\",run:yon},{key:"Mod-/",run:zsn},{key:"Alt-A",run:Ksn},{key:"Ctrl-m",mac:"Shift-Alt-m",run:Uon}].concat(Yon),Zon={key:"Tab",run:IOe,shift:cyt};function AR(l){let r;return l.nodeType==11?r=l.getSelection?l:l.ownerDocument:r=l,r.getSelection()}function w3e(l,r){return r?l==r||l.contains(r.nodeType!=1?r.parentNode:r):!1}function YG(l,r){if(!r.anchorNode)return!1;try{return w3e(l,r.anchorNode)}catch{return!1}}function MR(l){return l.nodeType==3?Hx(l,0,l.nodeValue.length).getClientRects():l.nodeType==1?l.getClientRects():[]}function lR(l,r,o,f){return o?upt(l,r,o,f,-1)||upt(l,r,o,f,1):!1}function _x(l){for(var r=0;;r++)if(l=l.previousSibling,!l)return r}function EY(l){return l.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(l.nodeName)}function upt(l,r,o,f,d){for(;;){if(l==o&&r==f)return!0;if(r==(d<0?0:V2(l))){if(l.nodeName=="DIV")return!1;let b=l.parentNode;if(!b||b.nodeType!=1)return!1;r=_x(l)+(d<0?0:1),l=b}else if(l.nodeType==1){if(l=l.childNodes[r+(d<0?-1:0)],l.nodeType==1&&l.contentEditable=="false")return!1;r=d<0?V2(l):0}else return!1}}function V2(l){return l.nodeType==3?l.nodeValue.length:l.childNodes.length}function aZ(l,r){let o=r?l.left:l.right;return{left:o,right:o,top:l.top,bottom:l.bottom}}function Jon(l){let r=l.visualViewport;return r?{left:0,right:r.width,top:0,bottom:r.height}:{left:0,right:l.innerWidth,top:0,bottom:l.innerHeight}}function uyt(l,r){let o=r.width/l.offsetWidth,f=r.height/l.offsetHeight;return(o>.995&&o<1.005||!isFinite(o)||Math.abs(r.width-l.offsetWidth)<1)&&(o=1),(f>.995&&f<1.005||!isFinite(f)||Math.abs(r.height-l.offsetHeight)<1)&&(f=1),{scaleX:o,scaleY:f}}function ecn(l,r,o,f,d,b,p,v){let O=l.ownerDocument,C=O.defaultView||window;for(let T=l,A=!1;T&&!A;)if(T.nodeType==1){let j,$=T==O.body,L=1,z=1;if($)j=Jon(C);else{if(/^(fixed|sticky)$/.test(getComputedStyle(T).position)&&(A=!0),T.scrollHeight<=T.clientHeight&&T.scrollWidth<=T.clientWidth){T=T.assignedSlot||T.parentNode;continue}let ne=T.getBoundingClientRect();({scaleX:L,scaleY:z}=uyt(T,ne)),j={left:ne.left,right:ne.left+T.clientWidth*L,top:ne.top,bottom:ne.top+T.clientHeight*z}}let Z=0,Y=0;if(d=="nearest")r.top0&&r.bottom>j.bottom+Y&&(Y=r.bottom-j.bottom+p)):r.bottom>j.bottom&&(Y=r.bottom-j.bottom+p,o<0&&r.top-Y0&&r.right>j.right+Z&&(Z=r.right-j.right+b)):r.right>j.right&&(Z=r.right-j.right+b,o<0&&r.leftj.bottom||r.leftj.right)&&(r={left:Math.max(r.left,j.left),right:Math.min(r.right,j.right),top:Math.max(r.top,j.top),bottom:Math.min(r.bottom,j.bottom)}),T=T.assignedSlot||T.parentNode}else if(T.nodeType==11)T=T.host;else break}function tcn(l){let r=l.ownerDocument,o,f;for(let d=l.parentNode;d&&!(d==r.body||o&&f);)if(d.nodeType==1)!f&&d.scrollHeight>d.clientHeight&&(f=d),!o&&d.scrollWidth>d.clientWidth&&(o=d),d=d.assignedSlot||d.parentNode;else if(d.nodeType==11)d=d.host;else break;return{x:o,y:f}}class ncn{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(r){return this.anchorNode==r.anchorNode&&this.anchorOffset==r.anchorOffset&&this.focusNode==r.focusNode&&this.focusOffset==r.focusOffset}setRange(r){let{anchorNode:o,focusNode:f}=r;this.set(o,Math.min(r.anchorOffset,o?V2(o):0),f,Math.min(r.focusOffset,f?V2(f):0))}set(r,o,f,d){this.anchorNode=r,this.anchorOffset=o,this.focusNode=f,this.focusOffset=d}}let vT=null;function fyt(l){if(l.setActive)return l.setActive();if(vT)return l.focus(vT);let r=[];for(let o=l;o&&(r.push(o,o.scrollTop,o.scrollLeft),o!=o.ownerDocument);o=o.parentNode);if(l.focus(vT==null?{get preventScroll(){return vT={preventScroll:!0},!0}}:void 0),!vT){vT=!1;for(let o=0;oMath.max(1,l.scrollHeight-l.clientHeight-4)}function dyt(l,r){for(let o=l,f=r;;){if(o.nodeType==3&&f>0)return{node:o,offset:f};if(o.nodeType==1&&f>0){if(o.contentEditable=="false")return null;o=o.childNodes[f-1],f=V2(o)}else if(o.parentNode&&!EY(o))f=_x(o),o=o.parentNode;else return null}}function gyt(l,r){for(let o=l,f=r;;){if(o.nodeType==3&&fo)return A.domBoundsAround(r,o,C);if(j>=r&&d==-1&&(d=O,b=C),C>o&&A.dom.parentNode==this.dom){p=O,v=T;break}T=j,C=j+A.breakAfter}return{from:b,to:v<0?f+this.length:v,startDOM:(d?this.children[d-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:p=0?this.children[p].dom:null}}markDirty(r=!1){this.flags|=2,this.markParentsDirty(r)}markParentsDirty(r){for(let o=this.parent;o;o=o.parent){if(r&&(o.flags|=2),o.flags&1)return;o.flags|=1,r=!1}}setParent(r){this.parent!=r&&(this.parent=r,this.flags&7&&this.markParentsDirty(!0))}setDOM(r){this.dom!=r&&(this.dom&&(this.dom.cmView=null),this.dom=r,r.cmView=this)}get rootView(){for(let r=this;;){let o=r.parent;if(!o)return r;r=o}}replaceChildren(r,o,f=ROe){this.markDirty();for(let d=r;dthis.pos||r==this.pos&&(o>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=r-this.pos,this;let f=this.children[--this.i];this.pos-=f.length+f.breakAfter}}}function byt(l,r,o,f,d,b,p,v,O){let{children:C}=l,T=C.length?C[r]:null,A=b.length?b[b.length-1]:null,j=A?A.breakAfter:p;if(!(r==f&&T&&!p&&!j&&b.length<2&&T.merge(o,d,b.length?A:null,o==0,v,O))){if(f0&&(!p&&b.length&&T.merge(o,T.length,b[0],!1,v,0)?T.breakAfter=b.shift().breakAfter:(o2);var oi={mac:dpt||/Mac/.test(Q1.platform),windows:/Win/.test(Q1.platform),linux:/Linux|X11/.test(Q1.platform),ie:dZ,ie_version:myt?m3e.documentMode||6:y3e?+y3e[1]:v3e?+v3e[1]:0,gecko:apt,gecko_version:apt?+(/Firefox\/(\d+)/.exec(Q1.userAgent)||[0,0])[1]:0,chrome:!!wve,chrome_version:wve?+wve[1]:0,ios:dpt,android:/Android\b/.test(Q1.userAgent),safari:vyt,webkit_version:scn?+(/\bAppleWebKit\/(\d+)/.exec(Q1.userAgent)||[0,0])[1]:0,tabSize:m3e.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const ocn=256;class Fw extends _c{constructor(r){super(),this.text=r}get length(){return this.text.length}createDOM(r){this.setDOM(r||document.createTextNode(this.text))}sync(r,o){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(o&&o.node==this.dom&&(o.written=!0),this.dom.nodeValue=this.text)}reuseDOM(r){r.nodeType==3&&this.createDOM(r)}merge(r,o,f){return this.flags&8||f&&(!(f instanceof Fw)||this.length-(o-r)+f.length>ocn||f.flags&8)?!1:(this.text=this.text.slice(0,r)+(f?f.text:"")+this.text.slice(o),this.markDirty(),!0)}split(r){let o=new Fw(this.text.slice(r));return this.text=this.text.slice(0,r),this.markDirty(),o.flags|=this.flags&8,o}localPosFromDOM(r,o){return r==this.dom?o:o?this.text.length:0}domAtPos(r){return new Ha(this.dom,r)}domBoundsAround(r,o,f){return{from:f,to:f+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(r,o){return ccn(this.dom,r,o)}}class Jy extends _c{constructor(r,o=[],f=0){super(),this.mark=r,this.children=o,this.length=f;for(let d of o)d.setParent(this)}setAttrs(r){if(hyt(r),this.mark.class&&(r.className=this.mark.class),this.mark.attrs)for(let o in this.mark.attrs)r.setAttribute(o,this.mark.attrs[o]);return r}canReuseDOM(r){return super.canReuseDOM(r)&&!((this.flags|r.flags)&8)}reuseDOM(r){r.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(r),this.flags|=6)}sync(r,o){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(r,o)}merge(r,o,f,d,b,p){return f&&(!(f instanceof Jy&&f.mark.eq(this.mark))||r&&b<=0||or&&o.push(f=r&&(d=b),f=O,b++}let p=this.length-r;return this.length=r,d>-1&&(this.children.length=d,this.markDirty()),new Jy(this.mark,o,p)}domAtPos(r){return yyt(this,r)}coordsAt(r,o){return kyt(this,r,o)}}function ccn(l,r,o){let f=l.nodeValue.length;r>f&&(r=f);let d=r,b=r,p=0;r==0&&o<0||r==f&&o>=0?oi.chrome||oi.gecko||(r?(d--,p=1):b=0)?0:v.length-1];return oi.safari&&!p&&O.width==0&&(O=Array.prototype.find.call(v,C=>C.width)||O),p?aZ(O,p<0):O||null}class h4 extends _c{static create(r,o,f){return new h4(r,o,f)}constructor(r,o,f){super(),this.widget=r,this.length=o,this.side=f,this.prevWidget=null}split(r){let o=h4.create(this.widget,this.length-r,this.side);return this.length-=r,o}sync(r){(!this.dom||!this.widget.updateDOM(this.dom,r))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(r)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(r,o,f,d,b,p){return f&&(!(f instanceof h4)||!this.widget.compare(f.widget)||r>0&&b<=0||o0)?Ha.before(this.dom):Ha.after(this.dom,r==this.length)}domBoundsAround(){return null}coordsAt(r,o){let f=this.widget.coordsAt(this.dom,r,o);if(f)return f;let d=this.dom.getClientRects(),b=null;if(!d.length)return null;let p=this.side?this.side<0:r>0;for(let v=p?d.length-1:0;b=d[v],!(r>0?v==0:v==d.length-1||b.top0?Ha.before(this.dom):Ha.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(r){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Nr.empty}get isHidden(){return!0}}Fw.prototype.children=h4.prototype.children=GT.prototype.children=ROe;function yyt(l,r){let o=l.dom,{children:f}=l,d=0;for(let b=0;db&&r0;b--){let p=f[b-1];if(p.dom.parentNode==o)return p.domAtPos(p.length)}for(let b=d;b0&&r instanceof Jy&&d.length&&(f=d[d.length-1])instanceof Jy&&f.mark.eq(r.mark)?Oyt(f,r.children[0],o-1):(d.push(r),r.setParent(l)),l.length+=r.length}function kyt(l,r,o){let f=null,d=-1,b=null,p=-1;function v(C,T){for(let A=0,j=0;A=T&&($.children.length?v($,T-j):(!b||b.isHidden&&(o>0||ucn(b,$)))&&(L>T||j==L&&$.getSide()>0)?(b=$,p=T-j):(j-1?1:0)!=d.length-(o&&d.indexOf(o)>-1?1:0))return!1;for(let b of f)if(b!=o&&(d.indexOf(b)==-1||l[b]!==r[b]))return!1;return!0}function k3e(l,r,o){let f=!1;if(r)for(let d in r)o&&d in o||(f=!0,d=="style"?l.style.cssText="":l.removeAttribute(d));if(o)for(let d in o)r&&r[d]==o[d]||(f=!0,d=="style"?l.style.cssText=o[d]:l.setAttribute(d,o[d]));return f}function fcn(l){let r=Object.create(null);for(let o=0;o0?3e8:-4e8:o>0?1e8:-1e8,new O4(r,o,o,f,r.widget||null,!1)}static replace(r){let o=!!r.block,f,d;if(r.isBlockGap)f=-5e8,d=4e8;else{let{start:b,end:p}=Syt(r,o);f=(b?o?-3e8:-1:5e8)-1,d=(p?o?2e8:1:-6e8)+1}return new O4(r,f,d,o,r.widget||null,!0)}static line(r){return new YR(r)}static set(r,o=!1){return Jr.of(r,o)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}no.none=Jr.empty;class GR extends no{constructor(r){let{start:o,end:f}=Syt(r);super(o?-1:5e8,f?1:-6e8,null,r),this.tagName=r.tagName||"span",this.class=r.class||"",this.attrs=r.attributes||null}eq(r){var o,f;return this==r||r instanceof GR&&this.tagName==r.tagName&&(this.class||((o=this.attrs)===null||o===void 0?void 0:o.class))==(r.class||((f=r.attrs)===null||f===void 0?void 0:f.class))&&AY(this.attrs,r.attrs,"class")}range(r,o=r){if(r>=o)throw new RangeError("Mark decorations may not be empty");return super.range(r,o)}}GR.prototype.point=!1;class YR extends no{constructor(r){super(-2e8,-2e8,null,r)}eq(r){return r instanceof YR&&this.spec.class==r.spec.class&&AY(this.spec.attributes,r.spec.attributes)}range(r,o=r){if(o!=r)throw new RangeError("Line decoration ranges must be zero-length");return super.range(r,o)}}YR.prototype.mapMode=Jl.TrackBefore;YR.prototype.point=!0;class O4 extends no{constructor(r,o,f,d,b,p){super(o,f,b,r),this.block=d,this.isReplace=p,this.mapMode=d?o<=0?Jl.TrackBefore:Jl.TrackAfter:Jl.TrackDel}get type(){return this.startSide!=this.endSide?z2.WidgetRange:this.startSide<=0?z2.WidgetBefore:z2.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(r){return r instanceof O4&&hcn(this.widget,r.widget)&&this.block==r.block&&this.startSide==r.startSide&&this.endSide==r.endSide}range(r,o=r){if(this.isReplace&&(r>o||r==o&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&o!=r)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(r,o)}}O4.prototype.point=!0;function Syt(l,r=!1){let{inclusiveStart:o,inclusiveEnd:f}=l;return o==null&&(o=l.inclusive),f==null&&(f=l.inclusive),{start:o??r,end:f??r}}function hcn(l,r){return l==r||!!(l&&r&&l.compare(r))}function ZG(l,r,o,f=0){let d=o.length-1;d>=0&&o[d]+f>=l?o[d]=Math.max(o[d],r):o.push(l,r)}class Of extends _c{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(r,o,f,d,b,p){if(f){if(!(f instanceof Of))return!1;this.dom||f.transferDOM(this)}return d&&this.setDeco(f?f.attrs:null),wyt(this,r,o,f?f.children.slice():[],b,p),!0}split(r){let o=new Of;if(o.breakAfter=this.breakAfter,this.length==0)return o;let{i:f,off:d}=this.childPos(r);d&&(o.append(this.children[f].split(d),0),this.children[f].merge(d,this.children[f].length,null,!1,0,0),f++);for(let b=f;b0&&this.children[f-1].length==0;)this.children[--f].destroy();return this.children.length=f,this.markDirty(),this.length=r,o}transferDOM(r){this.dom&&(this.markDirty(),r.setDOM(this.dom),r.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(r){AY(this.attrs,r)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=r)}append(r,o){Oyt(this,r,o)}addLineDeco(r){let o=r.spec.attributes,f=r.spec.class;o&&(this.attrs=O3e(o,this.attrs||{})),f&&(this.attrs=O3e({class:f},this.attrs||{}))}domAtPos(r){return yyt(this,r)}reuseDOM(r){r.nodeName=="DIV"&&(this.setDOM(r),this.flags|=6)}sync(r,o){var f;this.dom?this.flags&4&&(hyt(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(k3e(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(r,o);let d=this.dom.lastChild;for(;d&&_c.get(d)instanceof Jy;)d=d.lastChild;if(!d||!this.length||d.nodeName!="BR"&&((f=_c.get(d))===null||f===void 0?void 0:f.isEditable)==!1&&(!oi.ios||!this.children.some(b=>b instanceof Fw))){let b=document.createElement("BR");b.cmIgnore=!0,this.dom.appendChild(b)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let r=0,o;for(let f of this.children){if(!(f instanceof Fw)||/[^ -~]/.test(f.text))return null;let d=MR(f.dom);if(d.length!=1)return null;r+=d[0].width,o=d[0].height}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length,textHeight:o}:null}coordsAt(r,o){let f=kyt(this,r,o);if(!this.children.length&&f&&this.parent){let{heightOracle:d}=this.parent.view.viewState,b=f.bottom-f.top;if(Math.abs(b-d.lineHeight)<2&&d.textHeight=o){if(b instanceof Of)return b;if(p>o)break}d=p+b.breakAfter}return null}}class Vy extends _c{constructor(r,o,f){super(),this.widget=r,this.length=o,this.deco=f,this.breakAfter=0,this.prevWidget=null}merge(r,o,f,d,b,p){return f&&(!(f instanceof Vy)||!this.widget.compare(f.widget)||r>0&&b<=0||o0}}class S3e extends gZ{constructor(r){super(),this.height=r}toDOM(){let r=document.createElement("div");return r.className="cm-gap",this.updateDOM(r),r}eq(r){return r.height==this.height}updateDOM(r){return r.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class uR{constructor(r,o,f,d){this.doc=r,this.pos=o,this.end=f,this.disallowBlockEffectsFor=d,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=r.iter(),this.skip=o}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let r=this.content[this.content.length-1];return!(r.breakAfter||r instanceof Vy&&r.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Of),this.atCursorPos=!0),this.curLine}flushBuffer(r=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(bG(new GT(-1),r),r.length),this.pendingBuffer=0)}addBlockWidget(r){this.flushBuffer(),this.curLine=null,this.content.push(r)}finish(r){this.pendingBuffer&&r<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(r&&this.content.length&&this.content[this.content.length-1]instanceof Vy)&&this.getLine()}buildText(r,o,f){for(;r>0;){if(this.textOff==this.text.length){let{value:p,lineBreak:v,done:O}=this.cursor.next(this.skip);if(this.skip=0,O)throw new Error("Ran out of text content when drawing inline views");if(v){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,r--;continue}else this.text=p,this.textOff=0}let d=Math.min(this.text.length-this.textOff,r),b=Math.min(d,512);this.flushBuffer(o.slice(o.length-f)),this.getLine().append(bG(new Fw(this.text.slice(this.textOff,this.textOff+b)),o),f),this.atCursorPos=!0,this.textOff+=b,r-=b,f=d<=b?0:o.length}}span(r,o,f,d){this.buildText(o-r,f,d),this.pos=o,this.openStart<0&&(this.openStart=d)}point(r,o,f,d,b,p){if(this.disallowBlockEffectsFor[p]&&f instanceof O4){if(f.block)throw new RangeError("Block decorations may not be specified via plugins");if(o>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let v=o-r;if(f instanceof O4)if(f.block)f.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Vy(f.widget||YT.block,v,f));else{let O=h4.create(f.widget||YT.inline,v,v?0:f.startSide),C=this.atCursorPos&&!O.isEditable&&b<=d.length&&(r0),T=!O.isEditable&&(rd.length||f.startSide<=0),A=this.getLine();this.pendingBuffer==2&&!C&&!O.isEditable&&(this.pendingBuffer=0),this.flushBuffer(d),C&&(A.append(bG(new GT(1),d),b),b=d.length+Math.max(0,b-d.length)),A.append(bG(O,d),b),this.atCursorPos=T,this.pendingBuffer=T?rd.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=d.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(f);v&&(this.textOff+v<=this.text.length?this.textOff+=v:(this.skip+=v-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=o),this.openStart<0&&(this.openStart=b)}static build(r,o,f,d,b){let p=new uR(r,o,f,b);return p.openEnd=Jr.spans(d,o,f,p),p.openStart<0&&(p.openStart=p.openEnd),p.finish(p.openEnd),p}}function bG(l,r){for(let o of r)l=new Jy(o,[l],l.length);return l}class YT extends gZ{constructor(r){super(),this.tag=r}eq(r){return r.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(r){return r.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}YT.inline=new YT("span");YT.block=new YT("div");var nh=function(l){return l[l.LTR=0]="LTR",l[l.RTL=1]="RTL",l}(nh||(nh={}));const qx=nh.LTR,LOe=nh.RTL;function xyt(l){let r=[];for(let o=0;o=o){if(v.level==f)return p;(b<0||(d!=0?d<0?v.fromo:r[b].level>v.level))&&(b=p)}}if(b<0)throw new RangeError("Index out of range");return b}}function Tyt(l,r){if(l.length!=r.length)return!1;for(let o=0;o=0;z-=3)if(D2[z+1]==-$){let Z=D2[z+2],Y=Z&2?d:Z&4?Z&1?b:d:0;Y&&(Fc[A]=Fc[D2[z]]=Y),v=z;break}}else{if(D2.length==189)break;D2[v++]=A,D2[v++]=j,D2[v++]=O}else if((L=Fc[A])==2||L==1){let z=L==d;O=z?0:1;for(let Z=v-3;Z>=0;Z-=3){let Y=D2[Z+2];if(Y&2)break;if(z)D2[Z+2]|=2;else{if(Y&4)break;D2[Z+2]|=4}}}}}function wcn(l,r,o,f){for(let d=0,b=f;d<=o.length;d++){let p=d?o[d-1].to:l,v=dO;)L==Z&&(L=o[--z].from,Z=z?o[z-1].to:l),Fc[--L]=$;O=T}else b=C,O++}}}function C3e(l,r,o,f,d,b,p){let v=f%2?2:1;if(f%2==d%2)for(let O=r,C=0;OO&&p.push(new a4(O,z.from,$));let Z=z.direction==qx!=!($%2);T3e(l,Z?f+1:f,d,z.inner,z.from,z.to,p),O=z.to}L=z.to}else{if(L==o||(T?Fc[L]!=v:Fc[L]==v))break;L++}j?C3e(l,O,L,f+1,d,j,p):Or;){let T=!0,A=!1;if(!C||O>b[C-1].to){let z=Fc[O-1];z!=v&&(T=!1,A=z==16)}let j=!T&&v==1?[]:null,$=T?f:f+1,L=O;e:for(;;)if(C&&L==b[C-1].to){if(A)break e;let z=b[--C];if(!T)for(let Z=z.from,Y=C;;){if(Z==r)break e;if(Y&&b[Y-1].to==Z)Z=b[--Y].from;else{if(Fc[Z-1]==v)break e;break}}if(j)j.push(z);else{z.toFc.length;)Fc[Fc.length]=256;let f=[],d=r==qx?0:1;return T3e(l,d,d,o,0,l.length,f),f}function Eyt(l){return[new a4(0,l,0)]}let Ayt="";function vcn(l,r,o,f,d){var b;let p=f.head-l.from,v=a4.find(r,p,(b=f.bidiLevel)!==null&&b!==void 0?b:-1,f.assoc),O=r[v],C=O.side(d,o);if(p==C){let j=v+=d?1:-1;if(j<0||j>=r.length)return null;O=r[v=j],p=O.side(!d,o),C=O.side(d,o)}let T=eu(l.text,p,O.forward(d,o));(TO.to)&&(T=C),Ayt=l.text.slice(Math.min(p,T),Math.max(p,T));let A=v==(d?r.length-1:0)?null:r[v+(d?1:-1)];return A&&T==C&&A.level+(d?0:1)l.some(r=>r)}),Ocn=pn.define({combine:l=>l.some(r=>r)}),Ryt=pn.define();class RT{constructor(r,o="nearest",f="nearest",d=5,b=5,p=!1){this.range=r,this.y=o,this.x=f,this.yMargin=d,this.xMargin=b,this.isSnapshot=p}map(r){return r.empty?this:new RT(this.range.map(r),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(r){return this.range.to<=r.doc.length?this:new RT(St.cursor(r.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const wG=ar.define({map:(l,r)=>l.map(r)}),Lyt=ar.define();function Iw(l,r,o){let f=l.facet(Dyt);f.length?f[0](r):window.onerror&&window.onerror(String(r),o,void 0,void 0,r)||(o?console.error(o+":",r):console.error(r))}const Wy=pn.define({combine:l=>l.length?l[0]:!0});let kcn=0;const TT=pn.define({combine(l){return l.filter((r,o)=>{for(let f=0;f{let O=[];return p&&O.push(PR.of(C=>{let T=C.plugin(v);return T?p(T):no.none})),b&&O.push(b(v)),O})}static fromClass(r,o){return Up.define((f,d)=>new r(f,d),o)}}class mve{constructor(r){this.spec=r,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(r){if(this.value){if(this.mustUpdate){let o=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(o)}catch(f){if(Iw(o.state,f,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(r,this.spec.arg)}catch(o){Iw(r.state,o,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(r){var o;if(!((o=this.value)===null||o===void 0)&&o.destroy)try{this.value.destroy()}catch(f){Iw(r.state,f,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Byt=pn.define(),_Oe=pn.define(),PR=pn.define(),Fyt=pn.define(),ZR=pn.define(),_yt=pn.define();function ppt(l,r){let o=l.state.facet(_yt);if(!o.length)return o;let f=o.map(b=>b instanceof Function?b(l):b),d=[];return Jr.spans(f,r.from,r.to,{point(){},span(b,p,v,O){let C=b-r.from,T=p-r.from,A=d;for(let j=v.length-1;j>=0;j--,O--){let $=v[j].spec.bidiIsolate,L;if($==null&&($=ycn(r.text,C,T)),O>0&&A.length&&(L=A[A.length-1]).to==C&&L.direction==$)L.to=T,A=L.inner;else{let z={from:C,to:T,direction:$,inner:[]};A.push(z),A=z.inner}}}}),d}const Hyt=pn.define();function HOe(l){let r=0,o=0,f=0,d=0;for(let b of l.state.facet(Hyt)){let p=b(l);p&&(p.left!=null&&(r=Math.max(r,p.left)),p.right!=null&&(o=Math.max(o,p.right)),p.top!=null&&(f=Math.max(f,p.top)),p.bottom!=null&&(d=Math.max(d,p.bottom)))}return{left:r,right:o,top:f,bottom:d}}const ZI=pn.define();class Vp{constructor(r,o,f,d){this.fromA=r,this.toA=o,this.fromB=f,this.toB=d}join(r){return new Vp(Math.min(this.fromA,r.fromA),Math.max(this.toA,r.toA),Math.min(this.fromB,r.fromB),Math.max(this.toB,r.toB))}addToSet(r){let o=r.length,f=this;for(;o>0;o--){let d=r[o-1];if(!(d.fromA>f.toA)){if(d.toAT)break;b+=2}if(!O)return f;new Vp(O.fromA,O.toA,O.fromB,O.toB).addToSet(f),p=O.toA,v=O.toB}}}class MY{constructor(r,o,f){this.view=r,this.state=o,this.transactions=f,this.flags=0,this.startState=r.state,this.changes=ef.empty(this.startState.doc.length);for(let b of f)this.changes=this.changes.compose(b.changes);let d=[];this.changes.iterChangedRanges((b,p,v,O)=>d.push(new Vp(b,p,v,O))),this.changedRanges=d}static create(r,o,f){return new MY(r,o,f)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(r=>r.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class bpt extends _c{get length(){return this.view.state.doc.length}constructor(r){super(),this.view=r,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=no.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(r.contentDOM),this.children=[new Of],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Vp(0,0,0,r.state.doc.length)],0,null)}update(r){var o;let f=r.changedRanges;this.minWidth>0&&f.length&&(f.every(({fromA:C,toA:T})=>Tthis.minWidthTo)?(this.minWidthFrom=r.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=r.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(r);let d=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((o=this.domChanged)===null||o===void 0)&&o.newSel?d=this.domChanged.newSel.head:!Mcn(r.changes,this.hasComposition)&&!r.selectionSet&&(d=r.state.selection.main.head));let b=d>-1?xcn(this.view,r.changes,d):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:C,to:T}=this.hasComposition;f=new Vp(C,T,r.changes.mapPos(C,-1),r.changes.mapPos(T,1)).addToSet(f.slice())}this.hasComposition=b?{from:b.range.fromB,to:b.range.toB}:null,(oi.ie||oi.chrome)&&!b&&r&&r.state.doc.lines!=r.startState.doc.lines&&(this.forceSelection=!0);let p=this.decorations,v=this.updateDeco(),O=Ecn(p,v,r.changes);return f=Vp.extendWithRanges(f,O),!(this.flags&7)&&f.length==0?!1:(this.updateInner(f,r.startState.doc.length,b),r.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(r,o,f){this.view.viewState.mustMeasureContent=!0,this.updateChildren(r,o,f);let{observer:d}=this.view;d.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let p=oi.chrome||oi.ios?{node:d.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,p),this.flags&=-8,p&&(p.written||d.selectionRange.focusNode!=p.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(p=>p.flags&=-9);let b=[];if(this.view.viewport.from||this.view.viewport.to=0?d[p]:null;if(!v)break;let{fromA:O,toA:C,fromB:T,toB:A}=v,j,$,L,z;if(f&&f.range.fromBT){let se=uR.build(this.view.state.doc,T,f.range.fromB,this.decorations,this.dynamicDecorationMap),ve=uR.build(this.view.state.doc,f.range.toB,A,this.decorations,this.dynamicDecorationMap);$=se.breakAtStart,L=se.openStart,z=ve.openEnd;let Ce=this.compositionView(f);ve.breakAtStart?Ce.breakAfter=1:ve.content.length&&Ce.merge(Ce.length,Ce.length,ve.content[0],!1,ve.openStart,0)&&(Ce.breakAfter=ve.content[0].breakAfter,ve.content.shift()),se.content.length&&Ce.merge(0,0,se.content[se.content.length-1],!0,0,se.openEnd)&&se.content.pop(),j=se.content.concat(Ce).concat(ve.content)}else({content:j,breakAtStart:$,openStart:L,openEnd:z}=uR.build(this.view.state.doc,T,A,this.decorations,this.dynamicDecorationMap));let{i:Z,off:Y}=b.findPos(C,1),{i:ne,off:he}=b.findPos(O,-1);byt(this,ne,he,Z,Y,j,$,L,z)}f&&this.fixCompositionDOM(f)}updateEditContextFormatting(r){this.editContextFormatting=this.editContextFormatting.map(r.changes);for(let o of r.transactions)for(let f of o.effects)f.is(Lyt)&&(this.editContextFormatting=f.value)}compositionView(r){let o=new Fw(r.text.nodeValue);o.flags|=8;for(let{deco:d}of r.marks)o=new Jy(d,[o],o.length);let f=new Of;return f.append(o,0),f}fixCompositionDOM(r){let o=(b,p)=>{p.flags|=8|(p.children.some(O=>O.flags&7)?1:0),this.markedForComposition.add(p);let v=_c.get(b);v&&v!=p&&(v.dom=null),p.setDOM(b)},f=this.childPos(r.range.fromB,1),d=this.children[f.i];o(r.line,d);for(let b=r.marks.length-1;b>=-1;b--)f=d.childPos(f.off,1),d=d.children[f.i],o(b>=0?r.marks[b].node:r.text,d)}updateSelection(r=!1,o=!1){(r||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let f=this.view.root.activeElement,d=f==this.dom,b=!d&&!(this.view.state.facet(Wy)||this.dom.tabIndex>-1)&&YG(this.dom,this.view.observer.selectionRange)&&!(f&&this.dom.contains(f));if(!(d||o||b))return;let p=this.forceSelection;this.forceSelection=!1;let v=this.view.state.selection.main,O=this.moveToLine(this.domAtPos(v.anchor)),C=v.empty?O:this.moveToLine(this.domAtPos(v.head));if(oi.gecko&&v.empty&&!this.hasComposition&&Scn(O)){let A=document.createTextNode("");this.view.observer.ignore(()=>O.node.insertBefore(A,O.node.childNodes[O.offset]||null)),O=C=new Ha(A,0),p=!0}let T=this.view.observer.selectionRange;(p||!T.focusNode||(!lR(O.node,O.offset,T.anchorNode,T.anchorOffset)||!lR(C.node,C.offset,T.focusNode,T.focusOffset))&&!this.suppressWidgetCursorChange(T,v))&&(this.view.observer.ignore(()=>{oi.android&&oi.chrome&&this.dom.contains(T.focusNode)&&Acn(T.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let A=AR(this.view.root);if(A)if(v.empty){if(oi.gecko){let j=Ccn(O.node,O.offset);if(j&&j!=3){let $=(j==1?dyt:gyt)(O.node,O.offset);$&&(O=new Ha($.node,$.offset))}}A.collapse(O.node,O.offset),v.bidiLevel!=null&&A.caretBidiLevel!==void 0&&(A.caretBidiLevel=v.bidiLevel)}else if(A.extend){A.collapse(O.node,O.offset);try{A.extend(C.node,C.offset)}catch{}}else{let j=document.createRange();v.anchor>v.head&&([O,C]=[C,O]),j.setEnd(C.node,C.offset),j.setStart(O.node,O.offset),A.removeAllRanges(),A.addRange(j)}b&&this.view.root.activeElement==this.dom&&(this.dom.blur(),f&&f.focus())}),this.view.observer.setSelectionRange(O,C)),this.impreciseAnchor=O.precise?null:new Ha(T.anchorNode,T.anchorOffset),this.impreciseHead=C.precise?null:new Ha(T.focusNode,T.focusOffset)}suppressWidgetCursorChange(r,o){return this.hasComposition&&o.empty&&lR(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)&&this.posFromDOM(r.focusNode,r.focusOffset)==o.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:r}=this,o=r.state.selection.main,f=AR(r.root),{anchorNode:d,anchorOffset:b}=r.observer.selectionRange;if(!f||!o.empty||!o.assoc||!f.modify)return;let p=Of.find(this,o.head);if(!p)return;let v=p.posAtStart;if(o.head==v||o.head==v+p.length)return;let O=this.coordsAt(o.head,-1),C=this.coordsAt(o.head,1);if(!O||!C||O.bottom>C.top)return;let T=this.domAtPos(o.head+o.assoc);f.collapse(T.node,T.offset),f.modify("move",o.assoc<0?"forward":"backward","lineboundary"),r.observer.readSelectionRange();let A=r.observer.selectionRange;r.docView.posFromDOM(A.anchorNode,A.anchorOffset)!=o.from&&f.collapse(d,b)}moveToLine(r){let o=this.dom,f;if(r.node!=o)return r;for(let d=r.offset;!f&&d=0;d--){let b=_c.get(o.childNodes[d]);b instanceof Of&&(f=b.domAtPos(b.length))}return f?new Ha(f.node,f.offset,!0):r}nearest(r){for(let o=r;o;){let f=_c.get(o);if(f&&f.rootView==this)return f;o=o.parentNode}return null}posFromDOM(r,o){let f=this.nearest(r);if(!f)throw new RangeError("Trying to find position for a DOM position outside of the document");return f.localPosFromDOM(r,o)+f.posAtStart}domAtPos(r){let{i:o,off:f}=this.childCursor().findPos(r,-1);for(;o=0;p--){let v=this.children[p],O=b-v.breakAfter,C=O-v.length;if(Or||v.covers(1))&&(!f||v instanceof Of&&!(f instanceof Of&&o>=0)))f=v,d=C;else if(f&&C==r&&O==r&&v instanceof Vy&&Math.abs(o)<2){if(v.deco.startSide<0)break;p&&(f=null)}b=C}return f?f.coordsAt(r-d,o):null}coordsForChar(r){let{i:o,off:f}=this.childPos(r,1),d=this.children[o];if(!(d instanceof Of))return null;for(;d.children.length;){let{i:v,off:O}=d.childPos(f,1);for(;;v++){if(v==d.children.length)return null;if((d=d.children[v]).length)break}f=O}if(!(d instanceof Fw))return null;let b=eu(d.text,f);if(b==f)return null;let p=Hx(d.dom,f,b).getClientRects();for(let v=0;vMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,v=-1,O=this.view.textDirection==nh.LTR;for(let C=0,T=0;Td)break;if(C>=f){let $=A.dom.getBoundingClientRect();if(o.push($.height),p){let L=A.dom.lastChild,z=L?MR(L):[];if(z.length){let Z=z[z.length-1],Y=O?Z.right-$.left:$.right-Z.left;Y>v&&(v=Y,this.minWidth=b,this.minWidthFrom=C,this.minWidthTo=j)}}}C=j+A.breakAfter}return o}textDirectionAt(r){let{i:o}=this.childPos(r,1);return getComputedStyle(this.children[o].dom).direction=="rtl"?nh.RTL:nh.LTR}measureTextSize(){for(let b of this.children)if(b instanceof Of){let p=b.measureTextSize();if(p)return p}let r=document.createElement("div"),o,f,d;return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let b=MR(r.firstChild)[0];o=r.getBoundingClientRect().height,f=b?b.width/27:7,d=b?b.height:o,r.remove()}),{lineHeight:o,charWidth:f,textHeight:d}}childCursor(r=this.length){let o=this.children.length;return o&&(r-=this.children[--o].length),new pyt(this.children,r,o)}computeBlockGapDeco(){let r=[],o=this.view.viewState;for(let f=0,d=0;;d++){let b=d==o.viewports.length?null:o.viewports[d],p=b?b.from-1:this.length;if(p>f){let v=(o.lineBlockAt(p).bottom-o.lineBlockAt(f).top)/this.view.scaleY;r.push(no.replace({widget:new S3e(v),block:!0,inclusive:!0,isBlockGap:!0}).range(f,p))}if(!b)break;f=b.to+1}return no.set(r)}updateDeco(){let r=1,o=this.view.state.facet(PR).map(b=>(this.dynamicDecorationMap[r++]=typeof b=="function")?b(this.view):b),f=!1,d=this.view.state.facet(Fyt).map((b,p)=>{let v=typeof b=="function";return v&&(f=!0),v?b(this.view):b});for(d.length&&(this.dynamicDecorationMap[r++]=f,o.push(Jr.join(d))),this.decorations=[this.editContextFormatting,...o,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ro.anchor?-1:1),d;if(!f)return;!o.empty&&(d=this.coordsAt(o.anchor,o.anchor>o.head?-1:1))&&(f={left:Math.min(f.left,d.left),top:Math.min(f.top,d.top),right:Math.max(f.right,d.right),bottom:Math.max(f.bottom,d.bottom)});let b=HOe(this.view),p={left:f.left-b.left,top:f.top-b.top,right:f.right+b.right,bottom:f.bottom+b.bottom},{offsetWidth:v,offsetHeight:O}=this.view.scrollDOM;ecn(this.view.scrollDOM,p,o.head{fr.from&&(o=!0)}),o}function Pcn(l,r,o=1){let f=l.charCategorizer(r),d=l.doc.lineAt(r),b=r-d.from;if(d.length==0)return St.cursor(r);b==0?o=1:b==d.length&&(o=-1);let p=b,v=b;o<0?p=eu(d.text,b,!1):v=eu(d.text,b);let O=f(d.text.slice(p,v));for(;p>0;){let C=eu(d.text,p,!1);if(f(d.text.slice(C,p))!=O)break;p=C}for(;vl?r.left-l:Math.max(0,l-r.right)}function Dcn(l,r){return r.top>l?r.top-l:Math.max(0,l-r.bottom)}function vve(l,r){return l.topr.top+1}function wpt(l,r){return rl.bottom?{top:l.top,left:l.left,right:l.right,bottom:r}:l}function A3e(l,r,o){let f,d,b,p,v=!1,O,C,T,A;for(let L=l.firstChild;L;L=L.nextSibling){let z=MR(L);for(let Z=0;Zhe||p==he&&b>ne)&&(f=L,d=Y,b=ne,p=he,v=ne?r0:ZY.bottom&&(!T||T.bottomY.top)&&(C=L,A=Y):T&&vve(T,Y)?T=mpt(T,Y.bottom):A&&vve(A,Y)&&(A=wpt(A,Y.top))}}if(T&&T.bottom>=o?(f=O,d=T):A&&A.top<=o&&(f=C,d=A),!f)return{node:l,offset:0};let j=Math.max(d.left,Math.min(d.right,r));if(f.nodeType==3)return vpt(f,j,o);if(v&&f.contentEditable!="false")return A3e(f,j,o);let $=Array.prototype.indexOf.call(l.childNodes,f)+(r>=(d.left+d.right)/2?1:0);return{node:l,offset:$}}function vpt(l,r,o){let f=l.nodeValue.length,d=-1,b=1e9,p=0;for(let v=0;vo?T.top-o:o-T.bottom)-1;if(T.left-1<=r&&T.right+1>=r&&A=(T.left+T.right)/2,$=j;if((oi.chrome||oi.gecko)&&Hx(l,v).getBoundingClientRect().left==T.right&&($=!j),A<=0)return{node:l,offset:v+($?1:0)};d=v+($?1:0),b=A}}}return{node:l,offset:d>-1?d:p>0?l.nodeValue.length:0}}function Qyt(l,r,o,f=-1){var d,b;let p=l.contentDOM.getBoundingClientRect(),v=p.top+l.viewState.paddingTop,O,{docHeight:C}=l.viewState,{x:T,y:A}=r,j=A-v;if(j<0)return 0;if(j>C)return l.state.doc.length;for(let se=l.viewState.heightOracle.textHeight/2,ve=!1;O=l.elementAtHeight(j),O.type!=z2.Text;)for(;j=f>0?O.bottom+se:O.top-se,!(j>=0&&j<=C);){if(ve)return o?null:0;ve=!0,f=-f}A=v+j;let $=O.from;if($l.viewport.to)return l.viewport.to==l.state.doc.length?l.state.doc.length:o?null:ypt(l,p,O,T,A);let L=l.dom.ownerDocument,z=l.root.elementFromPoint?l.root:L,Z=z.elementFromPoint(T,A);Z&&!l.contentDOM.contains(Z)&&(Z=null),Z||(T=Math.max(p.left+1,Math.min(p.right-1,T)),Z=z.elementFromPoint(T,A),Z&&!l.contentDOM.contains(Z)&&(Z=null));let Y,ne=-1;if(Z&&((d=l.docView.nearest(Z))===null||d===void 0?void 0:d.isEditable)!=!1){if(L.caretPositionFromPoint){let se=L.caretPositionFromPoint(T,A);se&&({offsetNode:Y,offset:ne}=se)}else if(L.caretRangeFromPoint){let se=L.caretRangeFromPoint(T,A);se&&({startContainer:Y,startOffset:ne}=se)}Y&&(!l.contentDOM.contains(Y)||oi.safari&&$cn(Y,ne,T)||oi.chrome&&Ncn(Y,ne,T))&&(Y=void 0),Y&&(ne=Math.min(V2(Y),ne))}if(!Y||!l.docView.dom.contains(Y)){let se=Of.find(l.docView,$);if(!se)return j>O.top+O.height/2?O.to:O.from;({node:Y,offset:ne}=A3e(se.dom,T,A))}let he=l.docView.nearest(Y);if(!he)return null;if(he.isWidget&&((b=he.dom)===null||b===void 0?void 0:b.nodeType)==1){let se=he.dom.getBoundingClientRect();return r.yl.defaultLineHeight*1.5){let v=l.viewState.heightOracle.textHeight,O=Math.floor((d-o.top-(l.defaultLineHeight-v)*.5)/v);b+=O*l.viewState.heightOracle.lineLength}let p=l.state.sliceDoc(o.from,o.to);return o.from+pY(p,b,l.state.tabSize)}function zyt(l,r,o){let f,d=l;if(l.nodeType!=3||r!=(f=l.nodeValue.length))return!1;for(;;){let b=d.nextSibling;if(b){if(b.nodeName=="BR")break;return!1}else{let p=d.parentNode;if(!p||p.nodeName=="DIV")break;d=p}}return Hx(l,f-1,f).getBoundingClientRect().right>o}function $cn(l,r,o){return zyt(l,r,o)}function Ncn(l,r,o){if(r!=0)return zyt(l,r,o);for(let d=l;;){let b=d.parentNode;if(!b||b.nodeType!=1||b.firstChild!=d)return!1;if(b.classList.contains("cm-line"))break;d=b}let f=l.nodeType==1?l.getBoundingClientRect():Hx(l,0,Math.max(l.nodeValue.length,1)).getBoundingClientRect();return o-f.left>5}function Icn(l,r,o){let f=l.lineBlockAt(r);if(Array.isArray(f.type)){let d;for(let b of f.type){if(b.from>r)break;if(!(b.tor)return b;(!d||b.type==z2.Text&&(d.type!=b.type||(o<0?b.fromr)))&&(d=b)}}return d||f}return f}function Rcn(l,r,o,f){let d=Icn(l,r.head,r.assoc||-1),b=!f||d.type!=z2.Text||!(l.lineWrapping||d.widgetLineBreaks)?null:l.coordsAtPos(r.assoc<0&&r.head>d.from?r.head-1:r.head);if(b){let p=l.dom.getBoundingClientRect(),v=l.textDirectionAt(d.from),O=l.posAtCoords({x:o==(v==nh.LTR)?p.right-1:p.left+1,y:(b.top+b.bottom)/2});if(O!=null)return St.cursor(O,o?-1:1)}return St.cursor(o?d.to:d.from,o?-1:1)}function Opt(l,r,o,f){let d=l.state.doc.lineAt(r.head),b=l.bidiSpans(d),p=l.textDirectionAt(d.from);for(let v=r,O=null;;){let C=vcn(d,b,p,v,o),T=Ayt;if(!C){if(d.number==(o?l.state.doc.lines:1))return v;T=` +`,d=l.state.doc.line(d.number+(o?1:-1)),b=l.bidiSpans(d),C=l.visualLineSide(d,!o)}if(O){if(!O(T))return v}else{if(!f)return C;O=f(T)}v=C}}function Lcn(l,r,o){let f=l.state.charCategorizer(r),d=f(o);return b=>{let p=f(b);return d==hl.Space&&(d=p),d==p}}function Bcn(l,r,o,f){let d=r.head,b=o?1:-1;if(d==(o?l.state.doc.length:0))return St.cursor(d,r.assoc);let p=r.goalColumn,v,O=l.contentDOM.getBoundingClientRect(),C=l.coordsAtPos(d,r.assoc||-1),T=l.documentTop;if(C)p==null&&(p=C.left-O.left),v=b<0?C.top:C.bottom;else{let $=l.viewState.lineBlockAt(d);p==null&&(p=Math.min(O.right-O.left,l.defaultCharacterWidth*(d-$.from))),v=(b<0?$.top:$.bottom)+T}let A=O.left+p,j=f??l.viewState.heightOracle.textHeight>>1;for(let $=0;;$+=10){let L=v+(j+$)*b,z=Qyt(l,{x:A,y:L},!1,b);if(LO.bottom||(b<0?zd)){let Z=l.docView.coordsForChar(z),Y=!Z||L{if(r>b&&rd(l)),o.from,r.head>o.from?-1:1);return f==o.from?o:St.cursor(f,fb)&&this.lineBreak(),d=p}return this.findPointBefore(f,o),this}readTextNode(r){let o=r.nodeValue;for(let f of this.points)f.node==r&&(f.pos=this.text.length+Math.min(f.offset,o.length));for(let f=0,d=this.lineSeparator?null:/\r\n?|\n/g;;){let b=-1,p=1,v;if(this.lineSeparator?(b=o.indexOf(this.lineSeparator,f),p=this.lineSeparator.length):(v=d.exec(o))&&(b=v.index,p=v[0].length),this.append(o.slice(f,b<0?o.length:b)),b<0)break;if(this.lineBreak(),p>1)for(let O of this.points)O.node==r&&O.pos>this.text.length&&(O.pos-=p-1);f=b+p}}readNode(r){if(r.cmIgnore)return;let o=_c.get(r),f=o&&o.overrideDOMText;if(f!=null){this.findPointInside(r,f.length);for(let d=f.iter();!d.next().done;)d.lineBreak?this.lineBreak():this.append(d.value)}else r.nodeType==3?this.readTextNode(r):r.nodeName=="BR"?r.nextSibling&&this.lineBreak():r.nodeType==1&&this.readRange(r.firstChild,null)}findPointBefore(r,o){for(let f of this.points)f.node==r&&r.childNodes[f.offset]==o&&(f.pos=this.text.length)}findPointInside(r,o){for(let f of this.points)(r.nodeType==3?f.node==r:r.contains(f.node))&&(f.pos=this.text.length+(_cn(r,f.node,f.offset)?o:0))}}function _cn(l,r,o){for(;;){if(!r||o-1;let{impreciseHead:b,impreciseAnchor:p}=r.docView;if(r.state.readOnly&&o>-1)this.newSel=null;else if(o>-1&&(this.bounds=r.docView.domBoundsAround(o,f,0))){let v=b||p?[]:zcn(r),O=new Fcn(v,r.state);O.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=O.text,this.newSel=Wcn(v,this.bounds.from)}else{let v=r.observer.selectionRange,O=b&&b.node==v.focusNode&&b.offset==v.focusOffset||!w3e(r.contentDOM,v.focusNode)?r.state.selection.main.head:r.docView.posFromDOM(v.focusNode,v.focusOffset),C=p&&p.node==v.anchorNode&&p.offset==v.anchorOffset||!w3e(r.contentDOM,v.anchorNode)?r.state.selection.main.anchor:r.docView.posFromDOM(v.anchorNode,v.anchorOffset),T=r.viewport;if((oi.ios||oi.chrome)&&r.state.selection.main.empty&&O!=C&&(T.from>0||T.toDate.now()-100?l.inputState.lastKeyCode:-1;if(r.bounds){let{from:p,to:v}=r.bounds,O=d.from,C=null;(b===8||oi.android&&r.text.length=d.from&&o.to<=d.to&&(o.from!=d.from||o.to!=d.to)&&d.to-d.from-(o.to-o.from)<=4?o={from:d.from,to:d.to,insert:l.state.doc.slice(d.from,o.from).append(o.insert).append(l.state.doc.slice(o.to,d.to))}:oi.chrome&&o&&o.from==o.to&&o.from==d.head&&o.insert.toString()==` + `&&l.lineWrapping&&(f&&(f=St.single(f.main.anchor-1,f.main.head-1)),o={from:d.from,to:d.to,insert:Nr.of([" "])}),o)return qOe(l,o,f,b);if(f&&!f.main.eq(d)){let p=!1,v="select";return l.inputState.lastSelectionTime>Date.now()-50&&(l.inputState.lastSelectionOrigin=="select"&&(p=!0),v=l.inputState.lastSelectionOrigin,v=="select.pointer"&&(f=Wyt(l.state.facet(ZR).map(O=>O(l)),f))),l.dispatch({selection:f,scrollIntoView:p,userEvent:v}),!0}else return!1}function qOe(l,r,o,f=-1){if(oi.ios&&l.inputState.flushIOSKey(r))return!0;let d=l.state.selection.main;if(oi.android&&(r.to==d.to&&(r.from==d.from||r.from==d.from-1&&l.state.sliceDoc(r.from,d.from)==" ")&&r.insert.length==1&&r.insert.lines==2&&IT(l.contentDOM,"Enter",13)||(r.from==d.from-1&&r.to==d.to&&r.insert.length==0||f==8&&r.insert.lengthd.head)&&IT(l.contentDOM,"Backspace",8)||r.from==d.from&&r.to==d.to+1&&r.insert.length==0&&IT(l.contentDOM,"Delete",46)))return!0;let b=r.insert.toString();l.inputState.composing>=0&&l.inputState.composing++;let p,v=()=>p||(p=qcn(l,r,o));return l.state.facet($yt).some(O=>O(l,r.from,r.to,b,v))||l.dispatch(v()),!0}function qcn(l,r,o){let f,d=l.state,b=d.selection.main,p=-1;if(r.from==r.to&&r.fromb.to){let O=r.fromA(l)),C,O);r.from==T&&(p=T)}if(p>-1)f={changes:r,selection:St.cursor(r.from+r.insert.length,-1)};else if(r.from>=b.from&&r.to<=b.to&&r.to-r.from>=(b.to-b.from)/3&&(!o||o.main.empty&&o.main.from==r.from+r.insert.length)&&l.inputState.composing<0){let O=b.fromr.to?d.sliceDoc(r.to,b.to):"";f=d.replaceSelection(l.state.toText(O+r.insert.sliceString(0,void 0,l.state.lineBreak)+C))}else{let O=d.changes(r),C=o&&o.main.to<=O.newLength?o.main:void 0;if(d.selection.ranges.length>1&&l.inputState.composing>=0&&r.to<=b.to&&r.to>=b.to-10){let T=l.state.sliceDoc(r.from,r.to),A,j=o&&qyt(l,o.main.head);if(j){let z=r.insert.length-(r.to-r.from);A={from:j.from,to:j.to-z}}else A=l.state.doc.lineAt(b.head);let $=b.to-r.to,L=b.to-b.from;f=d.changeByRange(z=>{if(z.from==b.from&&z.to==b.to)return{changes:O,range:C||z.map(O)};let Z=z.to-$,Y=Z-T.length;if(z.to-z.from!=L||l.state.sliceDoc(Y,Z)!=T||z.to>=A.from&&z.from<=A.to)return{range:z};let ne=d.changes({from:Y,to:Z,insert:r.insert}),he=z.to-b.to;return{changes:ne,range:C?St.range(Math.max(0,C.anchor+he),Math.max(0,C.head+he)):z.map(ne)}})}else f={changes:O,selection:C&&d.selection.replaceRange(C)}}let v="input.type";return(l.composing||l.inputState.compositionPendingChange&&l.inputState.compositionEndedAt>Date.now()-50)&&(l.inputState.compositionPendingChange=!1,v+=".compose",l.inputState.compositionFirstChange&&(v+=".start",l.inputState.compositionFirstChange=!1)),d.update(f,{userEvent:v,scrollIntoView:!0})}function Qcn(l,r,o,f){let d=Math.min(l.length,r.length),b=0;for(;b0&&v>0&&l.charCodeAt(p-1)==r.charCodeAt(v-1);)p--,v--;if(f=="end"){let O=Math.max(0,b-Math.min(p,v));o-=p+O-b}if(p=p?b-o:0;b-=O,v=b+(v-p),p=b}else if(v=v?b-o:0;b-=O,p=b+(p-v),v=b}return{from:b,toA:p,toB:v}}function zcn(l){let r=[];if(l.root.activeElement!=l.contentDOM)return r;let{anchorNode:o,anchorOffset:f,focusNode:d,focusOffset:b}=l.observer.selectionRange;return o&&(r.push(new kpt(o,f)),(d!=o||b!=f)&&r.push(new kpt(d,b))),r}function Wcn(l,r){if(l.length==0)return null;let o=l[0].pos,f=l.length==2?l[1].pos:o;return o>-1&&f>-1?St.single(o+r,f+r):null}class Kcn{setSelectionOrigin(r){this.lastSelectionOrigin=r,this.lastSelectionTime=Date.now()}constructor(r){this.view=r,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=r.hasFocus,oi.safari&&r.contentDOM.addEventListener("input",()=>null),oi.gecko&&lln(r.contentDOM.ownerDocument)}handleEvent(r){!eln(this.view,r)||this.ignoreDuringComposition(r)||r.type=="keydown"&&this.keydown(r)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(r.type,r)):this.runHandlers(r.type,r))}runHandlers(r,o){let f=this.handlers[r];if(f){for(let d of f.observers)d(this.view,o);for(let d of f.handlers){if(o.defaultPrevented)break;if(d(this.view,o)){o.preventDefault();break}}}}ensureHandlers(r){let o=Vcn(r),f=this.handlers,d=this.view.contentDOM;for(let b in o)if(b!="scroll"){let p=!o[b].handlers.length,v=f[b];v&&p!=!v.handlers.length&&(d.removeEventListener(b,this.handleEvent),v=null),v||d.addEventListener(b,this.handleEvent,{passive:p})}for(let b in f)b!="scroll"&&!o[b]&&d.removeEventListener(b,this.handleEvent);this.handlers=o}keydown(r){if(this.lastKeyCode=r.keyCode,this.lastKeyTime=Date.now(),r.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&r.keyCode!=27&&Xyt.indexOf(r.keyCode)<0&&(this.tabFocusMode=-1),oi.android&&oi.chrome&&!r.synthetic&&(r.keyCode==13||r.keyCode==8))return this.view.observer.delayAndroidKey(r.key,r.keyCode),!0;let o;return oi.ios&&!r.synthetic&&!r.altKey&&!r.metaKey&&((o=Vyt.find(f=>f.keyCode==r.keyCode))&&!r.ctrlKey||Xcn.indexOf(r.key)>-1&&r.ctrlKey&&!r.shiftKey)?(this.pendingIOSKey=o||r,setTimeout(()=>this.flushIOSKey(),250),!0):(r.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(r){let o=this.pendingIOSKey;return!o||o.key=="Enter"&&r&&r.from0?!0:oi.safari&&!oi.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(r){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=r}update(r){this.view.observer.update(r),this.mouseSelection&&this.mouseSelection.update(r),this.draggedContent&&r.docChanged&&(this.draggedContent=this.draggedContent.map(r.changes)),r.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Spt(l,r){return(o,f)=>{try{return r.call(l,f,o)}catch(d){Iw(o.state,d)}}}function Vcn(l){let r=Object.create(null);function o(f){return r[f]||(r[f]={observers:[],handlers:[]})}for(let f of l){let d=f.spec,b=d&&d.plugin.domEventHandlers,p=d&&d.plugin.domEventObservers;if(b)for(let v in b){let O=b[v];O&&o(v).handlers.push(Spt(f.value,O))}if(p)for(let v in p){let O=p[v];O&&o(v).observers.push(Spt(f.value,O))}}for(let f in _w)o(f).handlers.push(_w[f]);for(let f in Gp)o(f).observers.push(Gp[f]);return r}const Vyt=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Xcn="dthko",Xyt=[16,17,18,20,91,92,224,225],mG=6;function vG(l){return Math.max(0,l)*.7+8}function Ucn(l,r){return Math.max(Math.abs(l.clientX-r.clientX),Math.abs(l.clientY-r.clientY))}class Gcn{constructor(r,o,f,d){this.view=r,this.startEvent=o,this.style=f,this.mustSelect=d,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=o,this.scrollParents=tcn(r.contentDOM),this.atoms=r.state.facet(ZR).map(p=>p(r));let b=r.contentDOM.ownerDocument;b.addEventListener("mousemove",this.move=this.move.bind(this)),b.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=o.shiftKey,this.multiple=r.state.facet(Zr.allowMultipleSelections)&&Ycn(r,o),this.dragging=Jcn(r,o)&&Yyt(o)==1?null:!1}start(r){this.dragging===!1&&this.select(r)}move(r){if(r.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Ucn(this.startEvent,r)<10)return;this.select(this.lastEvent=r);let o=0,f=0,d=0,b=0,p=this.view.win.innerWidth,v=this.view.win.innerHeight;this.scrollParents.x&&({left:d,right:p}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:b,bottom:v}=this.scrollParents.y.getBoundingClientRect());let O=HOe(this.view);r.clientX-O.left<=d+mG?o=-vG(d-r.clientX):r.clientX+O.right>=p-mG&&(o=vG(r.clientX-p)),r.clientY-O.top<=b+mG?f=-vG(b-r.clientY):r.clientY+O.bottom>=v-mG&&(f=vG(r.clientY-v)),this.setScrollSpeed(o,f)}up(r){this.dragging==null&&this.select(this.lastEvent),this.dragging||r.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let r=this.view.contentDOM.ownerDocument;r.removeEventListener("mousemove",this.move),r.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(r,o){this.scrollSpeed={x:r,y:o},r||o?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:r,y:o}=this.scrollSpeed;r&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=r,r=0),o&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=o,o=0),(r||o)&&this.view.win.scrollBy(r,o),this.dragging===!1&&this.select(this.lastEvent)}select(r){let{view:o}=this,f=Wyt(this.atoms,this.style.get(r,this.extend,this.multiple));(this.mustSelect||!f.eq(o.state.selection,this.dragging===!1))&&this.view.dispatch({selection:f,userEvent:"select.pointer"}),this.mustSelect=!1}update(r){r.transactions.some(o=>o.isUserEvent("input.type"))?this.destroy():this.style.update(r)&&setTimeout(()=>this.select(this.lastEvent),20)}}function Ycn(l,r){let o=l.state.facet(Myt);return o.length?o[0](r):oi.mac?r.metaKey:r.ctrlKey}function Zcn(l,r){let o=l.state.facet(Pyt);return o.length?o[0](r):oi.mac?!r.altKey:!r.ctrlKey}function Jcn(l,r){let{main:o}=l.state.selection;if(o.empty)return!1;let f=AR(l.root);if(!f||f.rangeCount==0)return!0;let d=f.getRangeAt(0).getClientRects();for(let b=0;b=r.clientX&&p.top<=r.clientY&&p.bottom>=r.clientY)return!0}return!1}function eln(l,r){if(!r.bubbles)return!0;if(r.defaultPrevented)return!1;for(let o=r.target,f;o!=l.contentDOM;o=o.parentNode)if(!o||o.nodeType==11||(f=_c.get(o))&&f.ignoreEvent(r))return!1;return!0}const _w=Object.create(null),Gp=Object.create(null),Uyt=oi.ie&&oi.ie_version<15||oi.ios&&oi.webkit_version<604;function tln(l){let r=l.dom.parentNode;if(!r)return;let o=r.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus(),setTimeout(()=>{l.focus(),o.remove(),Gyt(l,o.value)},50)}function pZ(l,r,o){for(let f of l.facet(r))o=f(o,l);return o}function Gyt(l,r){r=pZ(l.state,BOe,r);let{state:o}=l,f,d=1,b=o.toText(r),p=b.lines==o.selection.ranges.length;if(M3e!=null&&o.selection.ranges.every(O=>O.empty)&&M3e==b.toString()){let O=-1;f=o.changeByRange(C=>{let T=o.doc.lineAt(C.from);if(T.from==O)return{range:C};O=T.from;let A=o.toText((p?b.line(d++).text:r)+o.lineBreak);return{changes:{from:T.from,insert:A},range:St.cursor(C.from+A.length)}})}else p?f=o.changeByRange(O=>{let C=b.line(d++);return{changes:{from:O.from,to:O.to,insert:C.text},range:St.cursor(O.from+C.length)}}):f=o.replaceSelection(b);l.dispatch(f,{userEvent:"input.paste",scrollIntoView:!0})}Gp.scroll=l=>{l.inputState.lastScrollTop=l.scrollDOM.scrollTop,l.inputState.lastScrollLeft=l.scrollDOM.scrollLeft};_w.keydown=(l,r)=>(l.inputState.setSelectionOrigin("select"),r.keyCode==27&&l.inputState.tabFocusMode!=0&&(l.inputState.tabFocusMode=Date.now()+2e3),!1);Gp.touchstart=(l,r)=>{l.inputState.lastTouchTime=Date.now(),l.inputState.setSelectionOrigin("select.pointer")};Gp.touchmove=l=>{l.inputState.setSelectionOrigin("select.pointer")};_w.mousedown=(l,r)=>{if(l.observer.flush(),l.inputState.lastTouchTime>Date.now()-2e3)return!1;let o=null;for(let f of l.state.facet(jyt))if(o=f(l,r),o)break;if(!o&&r.button==0&&(o=rln(l,r)),o){let f=!l.hasFocus;l.inputState.startMouseSelection(new Gcn(l,r,o,f)),f&&l.observer.ignore(()=>{fyt(l.contentDOM);let b=l.root.activeElement;b&&!b.contains(l.contentDOM)&&b.blur()});let d=l.inputState.mouseSelection;if(d)return d.start(r),d.dragging===!1}else l.inputState.setSelectionOrigin("select.pointer");return!1};function xpt(l,r,o,f){if(f==1)return St.cursor(r,o);if(f==2)return Pcn(l.state,r,o);{let d=Of.find(l.docView,r),b=l.state.doc.lineAt(d?d.posAtEnd:r),p=d?d.posAtStart:b.from,v=d?d.posAtEnd:b.to;return vr>=o.top&&r<=o.bottom&&l>=o.left&&l<=o.right;function nln(l,r,o,f){let d=Of.find(l.docView,r);if(!d)return 1;let b=r-d.posAtStart;if(b==0)return 1;if(b==d.length)return-1;let p=d.coordsAt(b,-1);if(p&&Cpt(o,f,p))return-1;let v=d.coordsAt(b,1);return v&&Cpt(o,f,v)?1:p&&p.bottom>=f?-1:1}function Tpt(l,r){let o=l.posAtCoords({x:r.clientX,y:r.clientY},!1);return{pos:o,bias:nln(l,o,r.clientX,r.clientY)}}const iln=oi.ie&&oi.ie_version<=11;let Ept=null,Apt=0,Mpt=0;function Yyt(l){if(!iln)return l.detail;let r=Ept,o=Mpt;return Ept=l,Mpt=Date.now(),Apt=!r||o>Date.now()-400&&Math.abs(r.clientX-l.clientX)<2&&Math.abs(r.clientY-l.clientY)<2?(Apt+1)%3:1}function rln(l,r){let o=Tpt(l,r),f=Yyt(r),d=l.state.selection;return{update(b){b.docChanged&&(o.pos=b.changes.mapPos(o.pos),d=d.map(b.changes))},get(b,p,v){let O=Tpt(l,b),C,T=xpt(l,O.pos,O.bias,f);if(o.pos!=O.pos&&!p){let A=xpt(l,o.pos,o.bias,f),j=Math.min(A.from,T.from),$=Math.max(A.to,T.to);T=j1&&(C=sln(d,O.pos))?C:v?d.addRange(T):St.create([T])}}}function sln(l,r){for(let o=0;o=r)return St.create(l.ranges.slice(0,o).concat(l.ranges.slice(o+1)),l.mainIndex==o?0:l.mainIndex-(l.mainIndex>o?1:0))}return null}_w.dragstart=(l,r)=>{let{selection:{main:o}}=l.state;if(r.target.draggable){let d=l.docView.nearest(r.target);if(d&&d.isWidget){let b=d.posAtStart,p=b+d.length;(b>=o.to||p<=o.from)&&(o=St.range(b,p))}}let{inputState:f}=l;return f.mouseSelection&&(f.mouseSelection.dragging=!0),f.draggedContent=o,r.dataTransfer&&(r.dataTransfer.setData("Text",pZ(l.state,FOe,l.state.sliceDoc(o.from,o.to))),r.dataTransfer.effectAllowed="copyMove"),!1};_w.dragend=l=>(l.inputState.draggedContent=null,!1);function Ppt(l,r,o,f){if(o=pZ(l.state,BOe,o),!o)return;let d=l.posAtCoords({x:r.clientX,y:r.clientY},!1),{draggedContent:b}=l.inputState,p=f&&b&&Zcn(l,r)?{from:b.from,to:b.to}:null,v={from:d,insert:o},O=l.state.changes(p?[p,v]:v);l.focus(),l.dispatch({changes:O,selection:{anchor:O.mapPos(d,-1),head:O.mapPos(d,1)},userEvent:p?"move.drop":"input.drop"}),l.inputState.draggedContent=null}_w.drop=(l,r)=>{if(!r.dataTransfer)return!1;if(l.state.readOnly)return!0;let o=r.dataTransfer.files;if(o&&o.length){let f=Array(o.length),d=0,b=()=>{++d==o.length&&Ppt(l,r,f.filter(p=>p!=null).join(l.state.lineBreak),!1)};for(let p=0;p{/[\x00-\x08\x0e-\x1f]{2}/.test(v.result)||(f[p]=v.result),b()},v.readAsText(o[p])}return!0}else{let f=r.dataTransfer.getData("Text");if(f)return Ppt(l,r,f,!0),!0}return!1};_w.paste=(l,r)=>{if(l.state.readOnly)return!0;l.observer.flush();let o=Uyt?null:r.clipboardData;return o?(Gyt(l,o.getData("text/plain")||o.getData("text/uri-list")),!0):(tln(l),!1)};function oln(l,r){let o=l.dom.parentNode;if(!o)return;let f=o.appendChild(document.createElement("textarea"));f.style.cssText="position: fixed; left: -10000px; top: 10px",f.value=r,f.focus(),f.selectionEnd=r.length,f.selectionStart=0,setTimeout(()=>{f.remove(),l.focus()},50)}function cln(l){let r=[],o=[],f=!1;for(let d of l.selection.ranges)d.empty||(r.push(l.sliceDoc(d.from,d.to)),o.push(d));if(!r.length){let d=-1;for(let{from:b}of l.selection.ranges){let p=l.doc.lineAt(b);p.number>d&&(r.push(p.text),o.push({from:p.from,to:Math.min(l.doc.length,p.to+1)})),d=p.number}f=!0}return{text:pZ(l,FOe,r.join(l.lineBreak)),ranges:o,linewise:f}}let M3e=null;_w.copy=_w.cut=(l,r)=>{let{text:o,ranges:f,linewise:d}=cln(l.state);if(!o&&!d)return!1;M3e=d?o:null,r.type=="cut"&&!l.state.readOnly&&l.dispatch({changes:f,scrollIntoView:!0,userEvent:"delete.cut"});let b=Uyt?null:r.clipboardData;return b?(b.clearData(),b.setData("text/plain",o),!0):(oln(l,o),!1)};const Zyt=Qw.define();function Jyt(l,r){let o=[];for(let f of l.facet(Nyt)){let d=f(l,r);d&&o.push(d)}return o.length?l.update({effects:o,annotations:Zyt.of(!0)}):null}function e3t(l){setTimeout(()=>{let r=l.hasFocus;if(r!=l.inputState.notifiedFocused){let o=Jyt(l.state,r);o?l.dispatch(o):l.update([])}},10)}Gp.focus=l=>{l.inputState.lastFocusTime=Date.now(),!l.scrollDOM.scrollTop&&(l.inputState.lastScrollTop||l.inputState.lastScrollLeft)&&(l.scrollDOM.scrollTop=l.inputState.lastScrollTop,l.scrollDOM.scrollLeft=l.inputState.lastScrollLeft),e3t(l)};Gp.blur=l=>{l.observer.clearSelectionRange(),e3t(l)};Gp.compositionstart=Gp.compositionupdate=l=>{l.observer.editContext||(l.inputState.compositionFirstChange==null&&(l.inputState.compositionFirstChange=!0),l.inputState.composing<0&&(l.inputState.composing=0))};Gp.compositionend=l=>{l.observer.editContext||(l.inputState.composing=-1,l.inputState.compositionEndedAt=Date.now(),l.inputState.compositionPendingKey=!0,l.inputState.compositionPendingChange=l.observer.pendingRecords().length>0,l.inputState.compositionFirstChange=null,oi.chrome&&oi.android?l.observer.flushSoon():l.inputState.compositionPendingChange?Promise.resolve().then(()=>l.observer.flush()):setTimeout(()=>{l.inputState.composing<0&&l.docView.hasComposition&&l.update([])},50))};Gp.contextmenu=l=>{l.inputState.lastContextMenu=Date.now()};_w.beforeinput=(l,r)=>{var o,f;if(r.inputType=="insertReplacementText"&&l.observer.editContext){let b=(o=r.dataTransfer)===null||o===void 0?void 0:o.getData("text/plain"),p=r.getTargetRanges();if(b&&p.length){let v=p[0],O=l.posAtDOM(v.startContainer,v.startOffset),C=l.posAtDOM(v.endContainer,v.endOffset);return qOe(l,{from:O,to:C,insert:l.state.toText(b)},null),!0}}let d;if(oi.chrome&&oi.android&&(d=Vyt.find(b=>b.inputType==r.inputType))&&(l.observer.delayAndroidKey(d.key,d.keyCode),d.key=="Backspace"||d.key=="Delete")){let b=((f=window.visualViewport)===null||f===void 0?void 0:f.height)||0;setTimeout(()=>{var p;(((p=window.visualViewport)===null||p===void 0?void 0:p.height)||0)>b+10&&l.hasFocus&&(l.contentDOM.blur(),l.focus())},100)}return oi.ios&&r.inputType=="deleteContentForward"&&l.observer.flushSoon(),oi.safari&&r.inputType=="insertText"&&l.inputState.composing>=0&&setTimeout(()=>Gp.compositionend(l,r),20),!1};const jpt=new Set;function lln(l){jpt.has(l)||(jpt.add(l),l.addEventListener("copy",()=>{}),l.addEventListener("cut",()=>{}))}const Dpt=["pre-wrap","normal","pre-line","break-spaces"];let ZT=!1;function $pt(){ZT=!1}class uln{constructor(r){this.lineWrapping=r,this.doc=Nr.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(r,o){let f=this.doc.lineAt(o).number-this.doc.lineAt(r).number+1;return this.lineWrapping&&(f+=Math.max(0,Math.ceil((o-r-f*this.lineLength*.5)/this.lineLength))),this.lineHeight*f}heightForLine(r){return this.lineWrapping?(1+Math.max(0,Math.ceil((r-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(r){return this.doc=r,this}mustRefreshForWrapping(r){return Dpt.indexOf(r)>-1!=this.lineWrapping}mustRefreshForHeights(r){let o=!1;for(let f=0;f-1,O=Math.round(o)!=Math.round(this.lineHeight)||this.lineWrapping!=v;if(this.lineWrapping=v,this.lineHeight=o,this.charWidth=f,this.textHeight=d,this.lineLength=b,O){this.heightSamples={};for(let C=0;C0}set outdated(r){this.flags=(r?2:0)|this.flags&-3}setHeight(r){this.height!=r&&(Math.abs(this.height-r)>JG&&(ZT=!0),this.height=r)}replace(r,o,f){return Id.of(f)}decomposeLeft(r,o){o.push(this)}decomposeRight(r,o){o.push(this)}applyChanges(r,o,f,d){let b=this,p=f.doc;for(let v=d.length-1;v>=0;v--){let{fromA:O,toA:C,fromB:T,toB:A}=d[v],j=b.lineAt(O,fl.ByPosNoHeight,f.setDoc(o),0,0),$=j.to>=C?j:b.lineAt(C,fl.ByPosNoHeight,f,0,0);for(A+=$.to-C,C=$.to;v>0&&j.from<=d[v-1].toA;)O=d[v-1].fromA,T=d[v-1].fromB,v--,Ob*2){let v=r[o-1];v.break?r.splice(--o,1,v.left,null,v.right):r.splice(--o,1,v.left,v.right),f+=1+v.break,d-=v.size}else if(b>d*2){let v=r[f];v.break?r.splice(f,1,v.left,null,v.right):r.splice(f,1,v.left,v.right),f+=2+v.break,b-=v.size}else break;else if(d=b&&p(this.blockAt(0,f,d,b))}updateHeight(r,o=0,f=!1,d){return d&&d.from<=o&&d.more&&this.setHeight(d.heights[d.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class o0 extends t3t{constructor(r,o){super(r,o,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(r,o,f,d){return new L2(d,this.length,f,this.height,this.breaks)}replace(r,o,f){let d=f[0];return f.length==1&&(d instanceof o0||d instanceof ca&&d.flags&4)&&Math.abs(this.length-d.length)<10?(d instanceof ca?d=new o0(d.length,this.height):d.height=this.height,this.outdated||(d.outdated=!1),d):Id.of(f)}updateHeight(r,o=0,f=!1,d){return d&&d.from<=o&&d.more?this.setHeight(d.heights[d.index++]):(f||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,r.heightForLine(this.length-this.collapsed))+this.breaks*r.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ca extends Id{constructor(r){super(r,0)}heightMetrics(r,o){let f=r.doc.lineAt(o).number,d=r.doc.lineAt(o+this.length).number,b=d-f+1,p,v=0;if(r.lineWrapping){let O=Math.min(this.height,r.lineHeight*b);p=O/b,this.length>b+1&&(v=(this.height-O)/(this.length-b-1))}else p=this.height/b;return{firstLine:f,lastLine:d,perLine:p,perChar:v}}blockAt(r,o,f,d){let{firstLine:b,lastLine:p,perLine:v,perChar:O}=this.heightMetrics(o,d);if(o.lineWrapping){let C=d+(r0){let b=f[f.length-1];b instanceof ca?f[f.length-1]=new ca(b.length+d):f.push(null,new ca(d-1))}if(r>0){let b=f[0];b instanceof ca?f[0]=new ca(r+b.length):f.unshift(new ca(r-1),null)}return Id.of(f)}decomposeLeft(r,o){o.push(new ca(r-1),null)}decomposeRight(r,o){o.push(null,new ca(this.length-r-1))}updateHeight(r,o=0,f=!1,d){let b=o+this.length;if(d&&d.from<=o+this.length&&d.more){let p=[],v=Math.max(o,d.from),O=-1;for(d.from>o&&p.push(new ca(d.from-o-1).updateHeight(r,o));v<=b&&d.more;){let T=r.doc.lineAt(v).length;p.length&&p.push(null);let A=d.heights[d.index++];O==-1?O=A:Math.abs(A-O)>=JG&&(O=-2);let j=new o0(T,A);j.outdated=!1,p.push(j),v+=T+1}v<=b&&p.push(null,new ca(b-v).updateHeight(r,v));let C=Id.of(p);return(O<0||Math.abs(C.height-this.height)>=JG||Math.abs(O-this.heightMetrics(r,o).perLine)>=JG)&&(ZT=!0),PY(this,C)}else(f||this.outdated)&&(this.setHeight(r.heightForGap(o,o+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class hln extends Id{constructor(r,o,f){super(r.length+o+f.length,r.height+f.height,o|(r.outdated||f.outdated?2:0)),this.left=r,this.right=f,this.size=r.size+f.size}get break(){return this.flags&1}blockAt(r,o,f,d){let b=f+this.left.height;return rv))return C;let T=o==fl.ByPosNoHeight?fl.ByPosNoHeight:fl.ByPos;return O?C.join(this.right.lineAt(v,T,f,p,v)):this.left.lineAt(v,T,f,d,b).join(C)}forEachLine(r,o,f,d,b,p){let v=d+this.left.height,O=b+this.left.length+this.break;if(this.break)r=O&&this.right.forEachLine(r,o,f,v,O,p);else{let C=this.lineAt(O,fl.ByPos,f,d,b);r=r&&C.from<=o&&p(C),o>C.to&&this.right.forEachLine(C.to+1,o,f,v,O,p)}}replace(r,o,f){let d=this.left.length+this.break;if(othis.left.length)return this.balanced(this.left,this.right.replace(r-d,o-d,f));let b=[];r>0&&this.decomposeLeft(r,b);let p=b.length;for(let v of f)b.push(v);if(r>0&&Npt(b,p-1),o=f&&o.push(null)),r>f&&this.right.decomposeLeft(r-f,o)}decomposeRight(r,o){let f=this.left.length,d=f+this.break;if(r>=d)return this.right.decomposeRight(r-d,o);r2*o.size||o.size>2*r.size?Id.of(this.break?[r,null,o]:[r,o]):(this.left=PY(this.left,r),this.right=PY(this.right,o),this.setHeight(r.height+o.height),this.outdated=r.outdated||o.outdated,this.size=r.size+o.size,this.length=r.length+this.break+o.length,this)}updateHeight(r,o=0,f=!1,d){let{left:b,right:p}=this,v=o+b.length+this.break,O=null;return d&&d.from<=o+b.length&&d.more?O=b=b.updateHeight(r,o,f,d):b.updateHeight(r,o,f),d&&d.from<=v+p.length&&d.more?O=p=p.updateHeight(r,v,f,d):p.updateHeight(r,v,f),O?this.balanced(b,p):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Npt(l,r){let o,f;l[r]==null&&(o=l[r-1])instanceof ca&&(f=l[r+1])instanceof ca&&l.splice(r-1,3,new ca(o.length+1+f.length))}const aln=5;class QOe{constructor(r,o){this.pos=r,this.oracle=o,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=r}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(r,o){if(this.lineStart>-1){let f=Math.min(o,this.lineEnd),d=this.nodes[this.nodes.length-1];d instanceof o0?d.length+=f-this.pos:(f>this.pos||!this.isCovered)&&this.nodes.push(new o0(f-this.pos,-1)),this.writtenTo=f,o>f&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=o}point(r,o,f){if(r=aln)&&this.addLineDeco(d,b,p)}else o>r&&this.span(r,o);this.lineEnd>-1&&this.lineEnd-1)return;let{from:r,to:o}=this.oracle.doc.lineAt(this.pos);this.lineStart=r,this.lineEnd=o,this.writtenTor&&this.nodes.push(new o0(this.pos-r,-1)),this.writtenTo=this.pos}blankContent(r,o){let f=new ca(o-r);return this.oracle.doc.lineAt(r).to==o&&(f.flags|=4),f}ensureLine(){this.enterLine();let r=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(r instanceof o0)return r;let o=new o0(0,-1);return this.nodes.push(o),o}addBlock(r){this.enterLine();let o=r.deco;o&&o.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(r),this.writtenTo=this.pos=this.pos+r.length,o&&o.endSide>0&&(this.covering=r)}addLineDeco(r,o,f){let d=this.ensureLine();d.length+=f,d.collapsed+=f,d.widgetHeight=Math.max(d.widgetHeight,r),d.breaks+=o,this.writtenTo=this.pos=this.pos+f}finish(r){let o=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(o instanceof o0)&&!this.isCovered?this.nodes.push(new o0(0,-1)):(this.writtenToT.clientHeight||T.scrollWidth>T.clientWidth)&&A.overflow!="visible"){let j=T.getBoundingClientRect();b=Math.max(b,j.left),p=Math.min(p,j.right),v=Math.max(v,j.top),O=Math.min(C==l.parentNode?d.innerHeight:O,j.bottom)}C=A.position=="absolute"||A.position=="fixed"?T.offsetParent:T.parentNode}else if(C.nodeType==11)C=C.host;else break;return{left:b-o.left,right:Math.max(b,p)-o.left,top:v-(o.top+r),bottom:Math.max(v,O)-(o.top+r)}}function bln(l){let r=l.getBoundingClientRect(),o=l.ownerDocument.defaultView||window;return r.left0&&r.top0}function wln(l,r){let o=l.getBoundingClientRect();return{left:0,right:o.right-o.left,top:r,bottom:o.bottom-(o.top+r)}}class Ove{constructor(r,o,f,d){this.from=r,this.to=o,this.size=f,this.displaySize=d}static same(r,o){if(r.length!=o.length)return!1;for(let f=0;ftypeof f!="function"&&f.class=="cm-lineWrapping");this.heightOracle=new uln(o),this.stateDeco=r.facet(PR).filter(f=>typeof f!="function"),this.heightMap=Id.empty().applyChanges(this.stateDeco,Nr.empty,this.heightOracle.setDoc(r.doc),[new Vp(0,0,0,r.doc.length)]);for(let f=0;f<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());f++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=no.set(this.lineGaps.map(f=>f.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let r=[this.viewport],{main:o}=this.state.selection;for(let f=0;f<=1;f++){let d=f?o.head:o.anchor;if(!r.some(({from:b,to:p})=>d>=b&&d<=p)){let{from:b,to:p}=this.lineBlockAt(d);r.push(new yG(b,p))}}return this.viewports=r.sort((f,d)=>f.from-d.from),this.updateScaler()}updateScaler(){let r=this.scaler;return this.scaler=this.heightMap.height<=7e6?Rpt:new zOe(this.heightOracle,this.heightMap,this.viewports),r.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,r=>{this.viewportLines.push(eR(r,this.scaler))})}update(r,o=null){this.state=r.state;let f=this.stateDeco;this.stateDeco=this.state.facet(PR).filter(T=>typeof T!="function");let d=r.changedRanges,b=Vp.extendWithRanges(d,dln(f,this.stateDeco,r?r.changes:ef.empty(this.state.doc.length))),p=this.heightMap.height,v=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);$pt(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,r.startState.doc,this.heightOracle.setDoc(this.state.doc),b),(this.heightMap.height!=p||ZT)&&(r.flags|=2),v?(this.scrollAnchorPos=r.changes.mapPos(v.from,-1),this.scrollAnchorHeight=v.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=p);let O=b.length?this.mapViewport(this.viewport,r.changes):this.viewport;(o&&(o.range.headO.to)||!this.viewportIsAppropriate(O))&&(O=this.getViewport(0,o));let C=O.from!=this.viewport.from||O.to!=this.viewport.to;this.viewport=O,r.flags|=this.updateForViewport(),(C||!r.changes.empty||r.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,r.changes))),r.flags|=this.computeVisibleRanges(r.changes),o&&(this.scrollTarget=o),!this.mustEnforceCursorAssoc&&r.selectionSet&&r.view.lineWrapping&&r.state.selection.main.empty&&r.state.selection.main.assoc&&!r.state.facet(Ocn)&&(this.mustEnforceCursorAssoc=!0)}measure(r){let o=r.contentDOM,f=window.getComputedStyle(o),d=this.heightOracle,b=f.whiteSpace;this.defaultTextDirection=f.direction=="rtl"?nh.RTL:nh.LTR;let p=this.heightOracle.mustRefreshForWrapping(b),v=o.getBoundingClientRect(),O=p||this.mustMeasureContent||this.contentDOMHeight!=v.height;this.contentDOMHeight=v.height,this.mustMeasureContent=!1;let C=0,T=0;if(v.width&&v.height){let{scaleX:se,scaleY:ve}=uyt(o,v);(se>.005&&Math.abs(this.scaleX-se)>.005||ve>.005&&Math.abs(this.scaleY-ve)>.005)&&(this.scaleX=se,this.scaleY=ve,C|=16,p=O=!0)}let A=(parseInt(f.paddingTop)||0)*this.scaleY,j=(parseInt(f.paddingBottom)||0)*this.scaleY;(this.paddingTop!=A||this.paddingBottom!=j)&&(this.paddingTop=A,this.paddingBottom=j,C|=18),this.editorWidth!=r.scrollDOM.clientWidth&&(d.lineWrapping&&(O=!0),this.editorWidth=r.scrollDOM.clientWidth,C|=16);let $=r.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=$&&(this.scrollAnchorHeight=-1,this.scrollTop=$),this.scrolledToBottom=ayt(r.scrollDOM);let L=(this.printing?wln:pln)(o,this.paddingTop),z=L.top-this.pixelViewport.top,Z=L.bottom-this.pixelViewport.bottom;this.pixelViewport=L;let Y=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(Y!=this.inView&&(this.inView=Y,Y&&(O=!0)),!this.inView&&!this.scrollTarget&&!bln(r.dom))return 0;let ne=v.width;if((this.contentDOMWidth!=ne||this.editorHeight!=r.scrollDOM.clientHeight)&&(this.contentDOMWidth=v.width,this.editorHeight=r.scrollDOM.clientHeight,C|=16),O){let se=r.docView.measureVisibleLineHeights(this.viewport);if(d.mustRefreshForHeights(se)&&(p=!0),p||d.lineWrapping&&Math.abs(ne-this.contentDOMWidth)>d.charWidth){let{lineHeight:ve,charWidth:Ce,textHeight:Ie}=r.docView.measureTextSize();p=ve>0&&d.refresh(b,ve,Ce,Ie,Math.max(5,ne/Ce),se),p&&(r.docView.minWidth=0,C|=16)}z>0&&Z>0?T=Math.max(z,Z):z<0&&Z<0&&(T=Math.min(z,Z)),$pt();for(let ve of this.viewports){let Ce=ve.from==this.viewport.from?se:r.docView.measureVisibleLineHeights(ve);this.heightMap=(p?Id.empty().applyChanges(this.stateDeco,Nr.empty,this.heightOracle,[new Vp(0,0,0,r.state.doc.length)]):this.heightMap).updateHeight(d,0,p,new fln(ve.from,Ce))}ZT&&(C|=2)}let he=!this.viewportIsAppropriate(this.viewport,T)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return he&&(C&2&&(C|=this.updateScaler()),this.viewport=this.getViewport(T,this.scrollTarget),C|=this.updateForViewport()),(C&2||he)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(p?[]:this.lineGaps,r)),C|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,r.docView.enforceCursorAssoc()),C}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(r,o){let f=.5-Math.max(-.5,Math.min(.5,r/1e3/2)),d=this.heightMap,b=this.heightOracle,{visibleTop:p,visibleBottom:v}=this,O=new yG(d.lineAt(p-f*1e3,fl.ByHeight,b,0,0).from,d.lineAt(v+(1-f)*1e3,fl.ByHeight,b,0,0).to);if(o){let{head:C}=o.range;if(CO.to){let T=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),A=d.lineAt(C,fl.ByPos,b,0,0),j;o.y=="center"?j=(A.top+A.bottom)/2-T/2:o.y=="start"||o.y=="nearest"&&C=v+Math.max(10,Math.min(f,250)))&&d>p-2*1e3&&b>1,p=d<<1;if(this.defaultTextDirection!=nh.LTR&&!f)return[];let v=[],O=(T,A,j,$)=>{if(A-TT&&YY.from>=j.from&&Y.to<=j.to&&Math.abs(Y.from-T)Y.fromne));if(!Z){if(Ahe.from<=A&&he.to>=A)){let he=o.moveToLineBoundary(St.cursor(A),!1,!0).head;he>T&&(A=he)}let Y=this.gapSize(j,T,A,$),ne=f||Y<2e6?Y:2e6;Z=new Ove(T,A,Y,ne)}v.push(Z)},C=T=>{if(T.length2e6)for(let Ce of r)Ce.from>=T.from&&Ce.fromT.from&&O(T.from,$,T,A),Lo.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(r){let o=this.stateDeco;this.lineGaps.length&&(o=o.concat(this.lineGapDeco));let f=[];Jr.spans(o,this.viewport.from,this.viewport.to,{span(b,p){f.push({from:b,to:p})},point(){}},20);let d=0;if(f.length!=this.visibleRanges.length)d=12;else for(let b=0;b=this.viewport.from&&r<=this.viewport.to&&this.viewportLines.find(o=>o.from<=r&&o.to>=r)||eR(this.heightMap.lineAt(r,fl.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(r){return r>=this.viewportLines[0].top&&r<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(o=>o.top<=r&&o.bottom>=r)||eR(this.heightMap.lineAt(this.scaler.fromDOM(r),fl.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(r){let o=this.lineBlockAtHeight(r+8);return o.from>=this.viewport.from||this.viewportLines[0].top-r>200?o:this.viewportLines[0]}elementAtHeight(r){return eR(this.heightMap.blockAt(this.scaler.fromDOM(r),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class yG{constructor(r,o){this.from=r,this.to=o}}function vln(l,r,o){let f=[],d=l,b=0;return Jr.spans(o,l,r,{span(){},point(p,v){p>d&&(f.push({from:d,to:p}),b+=p-d),d=v}},20),d=1)return r[r.length-1].to;let f=Math.floor(l*o);for(let d=0;;d++){let{from:b,to:p}=r[d],v=p-b;if(f<=v)return b+f;f-=v}}function kG(l,r){let o=0;for(let{from:f,to:d}of l.ranges){if(r<=d){o+=r-f;break}o+=d-f}return o/l.total}function yln(l,r){for(let o of l)if(r(o))return o}const Rpt={toDOM(l){return l},fromDOM(l){return l},scale:1,eq(l){return l==this}};class zOe{constructor(r,o,f){let d=0,b=0,p=0;this.viewports=f.map(({from:v,to:O})=>{let C=o.lineAt(v,fl.ByPos,r,0,0).top,T=o.lineAt(O,fl.ByPos,r,0,0).bottom;return d+=T-C,{from:v,to:O,top:C,bottom:T,domTop:0,domBottom:0}}),this.scale=(7e6-d)/(o.height-d);for(let v of this.viewports)v.domTop=p+(v.top-b)*this.scale,p=v.domBottom=v.domTop+(v.bottom-v.top),b=v.bottom}toDOM(r){for(let o=0,f=0,d=0;;o++){let b=oo.from==r.viewports[f].from&&o.to==r.viewports[f].to):!1}}function eR(l,r){if(r.scale==1)return l;let o=r.toDOM(l.top),f=r.toDOM(l.bottom);return new L2(l.from,l.length,o,f-o,Array.isArray(l._content)?l._content.map(d=>eR(d,r)):l._content)}const SG=pn.define({combine:l=>l.join(" ")}),P3e=pn.define({combine:l=>l.indexOf(!0)>-1}),j3e=qa.newName(),n3t=qa.newName(),i3t=qa.newName(),r3t={"&light":"."+n3t,"&dark":"."+i3t};function D3e(l,r,o){return new qa(r,{finish(f){return/&/.test(f)?f.replace(/&\w*/,d=>{if(d=="&")return l;if(!o||!o[d])throw new RangeError(`Unsupported selector: ${d}`);return o[d]}):l+" "+f}})}const Oln=D3e("."+j3e,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},r3t),kln={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},kve=oi.ie&&oi.ie_version<=11;class Sln{constructor(r){this.view=r,this.active=!1,this.editContext=null,this.selectionRange=new ncn,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=r.contentDOM,this.observer=new MutationObserver(o=>{for(let f of o)this.queue.push(f);(oi.ie&&oi.ie_version<=11||oi.ios&&r.composing)&&o.some(f=>f.type=="childList"&&f.removedNodes.length||f.type=="characterData"&&f.oldValue.length>f.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&oi.android&&r.constructor.EDIT_CONTEXT!==!1&&!(oi.chrome&&oi.chrome_version<126)&&(this.editContext=new Cln(r),r.state.facet(Wy)&&(r.contentDOM.editContext=this.editContext.editContext)),kve&&(this.onCharData=o=>{this.queue.push({target:o.target,type:"characterData",oldValue:o.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var o;((o=this.view.docView)===null||o===void 0?void 0:o.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),o.length>0&&o[o.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(o=>{o.length>0&&o[o.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(r){this.view.inputState.runHandlers("scroll",r),this.intersecting&&this.view.measure()}onScroll(r){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(r)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(r){(r.type=="change"||!r.type)&&!r.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(r){if(this.gapIntersection&&(r.length!=this.gaps.length||this.gaps.some((o,f)=>o!=r[f]))){this.gapIntersection.disconnect();for(let o of r)this.gapIntersection.observe(o);this.gaps=r}}onSelectionChange(r){let o=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:f}=this,d=this.selectionRange;if(f.state.facet(Wy)?f.root.activeElement!=this.dom:!YG(this.dom,d))return;let b=d.anchorNode&&f.docView.nearest(d.anchorNode);if(b&&b.ignoreEvent(r)){o||(this.selectionChanged=!1);return}(oi.ie&&oi.ie_version<=11||oi.android&&oi.chrome)&&!f.state.selection.main.empty&&d.focusNode&&lR(d.focusNode,d.focusOffset,d.anchorNode,d.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:r}=this,o=AR(r.root);if(!o)return!1;let f=oi.safari&&r.root.nodeType==11&&r.root.activeElement==this.dom&&xln(this.view,o)||o;if(!f||this.selectionRange.eq(f))return!1;let d=YG(this.dom,f);return d&&!this.selectionChanged&&r.inputState.lastFocusTime>Date.now()-200&&r.inputState.lastTouchTime{let b=this.delayedAndroidKey;b&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=b.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&b.force&&IT(this.dom,b.key,b.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(d)}(!this.delayedAndroidKey||r=="Enter")&&(this.delayedAndroidKey={key:r,keyCode:o,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let r of this.observer.takeRecords())this.queue.push(r);return this.queue}processRecords(){let r=this.pendingRecords();r.length&&(this.queue=[]);let o=-1,f=-1,d=!1;for(let b of r){let p=this.readMutation(b);p&&(p.typeOver&&(d=!0),o==-1?{from:o,to:f}=p:(o=Math.min(p.from,o),f=Math.max(p.to,f)))}return{from:o,to:f,typeOver:d}}readChange(){let{from:r,to:o,typeOver:f}=this.processRecords(),d=this.selectionChanged&&YG(this.dom,this.selectionRange);if(r<0&&!d)return null;r>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let b=new Hcn(this.view,r,o,f);return this.view.docView.domChanged={newSel:b.newSel?b.newSel.main:null},b}flush(r=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;r&&this.readSelectionRange();let o=this.readChange();if(!o)return this.view.requestMeasure(),!1;let f=this.view.state,d=Kyt(this.view,o);return this.view.state==f&&(o.domChanged||o.newSel&&!o.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),d}readMutation(r){let o=this.view.docView.nearest(r.target);if(!o||o.ignoreMutation(r))return null;if(o.markDirty(r.type=="attributes"),r.type=="attributes"&&(o.flags|=4),r.type=="childList"){let f=Lpt(o,r.previousSibling||r.target.previousSibling,-1),d=Lpt(o,r.nextSibling||r.target.nextSibling,1);return{from:f?o.posAfter(f):o.posAtStart,to:d?o.posBefore(d):o.posAtEnd,typeOver:!1}}else return r.type=="characterData"?{from:o.posAtStart,to:o.posAtEnd,typeOver:r.target.nodeValue==r.oldValue}:null}setWindow(r){r!=this.win&&(this.removeWindowListeners(this.win),this.win=r,this.addWindowListeners(this.win))}addWindowListeners(r){r.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):r.addEventListener("beforeprint",this.onPrint),r.addEventListener("scroll",this.onScroll),r.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(r){r.removeEventListener("scroll",this.onScroll),r.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):r.removeEventListener("beforeprint",this.onPrint),r.document.removeEventListener("selectionchange",this.onSelectionChange)}update(r){this.editContext&&(this.editContext.update(r),r.startState.facet(Wy)!=r.state.facet(Wy)&&(r.view.contentDOM.editContext=r.state.facet(Wy)?this.editContext.editContext:null))}destroy(){var r,o,f;this.stop(),(r=this.intersection)===null||r===void 0||r.disconnect(),(o=this.gapIntersection)===null||o===void 0||o.disconnect(),(f=this.resizeScroll)===null||f===void 0||f.disconnect();for(let d of this.scrollTargets)d.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Lpt(l,r,o){for(;r;){let f=_c.get(r);if(f&&f.parent==l)return f;let d=r.parentNode;r=d!=l.dom?d:o>0?r.nextSibling:r.previousSibling}return null}function Bpt(l,r){let o=r.startContainer,f=r.startOffset,d=r.endContainer,b=r.endOffset,p=l.docView.domAtPos(l.state.selection.main.anchor);return lR(p.node,p.offset,d,b)&&([o,f,d,b]=[d,b,o,f]),{anchorNode:o,anchorOffset:f,focusNode:d,focusOffset:b}}function xln(l,r){if(r.getComposedRanges){let d=r.getComposedRanges(l.root)[0];if(d)return Bpt(l,d)}let o=null;function f(d){d.preventDefault(),d.stopImmediatePropagation(),o=d.getTargetRanges()[0]}return l.contentDOM.addEventListener("beforeinput",f,!0),l.dom.ownerDocument.execCommand("indent"),l.contentDOM.removeEventListener("beforeinput",f,!0),o?Bpt(l,o):null}class Cln{constructor(r){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(r.state);let o=this.editContext=new window.EditContext({text:r.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,r.state.selection.main.anchor))),selectionEnd:this.toContextPos(r.state.selection.main.head)});this.handlers.textupdate=f=>{let d=r.state.selection.main,{anchor:b,head:p}=d,v=this.toEditorPos(f.updateRangeStart),O=this.toEditorPos(f.updateRangeEnd);r.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:f.updateRangeStart,editorBase:v,drifted:!1});let C={from:v,to:O,insert:Nr.of(f.text.split(` +`))};if(C.from==this.from&&bthis.to&&(C.to=b),C.from==C.to&&!C.insert.length){let T=St.single(this.toEditorPos(f.selectionStart),this.toEditorPos(f.selectionEnd));T.main.eq(d)||r.dispatch({selection:T,userEvent:"select"});return}if((oi.mac||oi.android)&&C.from==p-1&&/^\. ?$/.test(f.text)&&r.contentDOM.getAttribute("autocorrect")=="off"&&(C={from:v,to:O,insert:Nr.of([f.text.replace("."," ")])}),this.pendingContextChange=C,!r.state.readOnly){let T=this.to-this.from+(C.to-C.from+C.insert.length);qOe(r,C,St.single(this.toEditorPos(f.selectionStart,T),this.toEditorPos(f.selectionEnd,T)))}this.pendingContextChange&&(this.revertPending(r.state),this.setSelection(r.state)),C.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(o.text.slice(Math.max(0,f.updateRangeStart-1),Math.min(o.text.length,f.updateRangeStart+1)))&&this.handlers.compositionend(f)},this.handlers.characterboundsupdate=f=>{let d=[],b=null;for(let p=this.toEditorPos(f.rangeStart),v=this.toEditorPos(f.rangeEnd);p{let d=[];for(let b of f.getTextFormats()){let p=b.underlineStyle,v=b.underlineThickness;if(!/none/i.test(p)&&!/none/i.test(v)){let O=this.toEditorPos(b.rangeStart),C=this.toEditorPos(b.rangeEnd);if(O{r.inputState.composing<0&&(r.inputState.composing=0,r.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(r.inputState.composing=-1,r.inputState.compositionFirstChange=null,this.composing){let{drifted:f}=this.composing;this.composing=null,f&&this.reset(r.state)}};for(let f in this.handlers)o.addEventListener(f,this.handlers[f]);this.measureReq={read:f=>{this.editContext.updateControlBounds(f.contentDOM.getBoundingClientRect());let d=AR(f.root);d&&d.rangeCount&&this.editContext.updateSelectionBounds(d.getRangeAt(0).getBoundingClientRect())}}}applyEdits(r){let o=0,f=!1,d=this.pendingContextChange;return r.changes.iterChanges((b,p,v,O,C)=>{if(f)return;let T=C.length-(p-b);if(d&&p>=d.to)if(d.from==b&&d.to==p&&d.insert.eq(C)){d=this.pendingContextChange=null,o+=T,this.to+=T;return}else d=null,this.revertPending(r.state);if(b+=o,p+=o,p<=this.from)this.from+=T,this.to+=T;else if(bthis.to||this.to-this.from+C.length>3e4){f=!0;return}this.editContext.updateText(this.toContextPos(b),this.toContextPos(p),C.toString()),this.to+=T}o+=T}),d&&!f&&this.revertPending(r.state),!f}update(r){let o=this.pendingContextChange,f=r.startState.selection.main;this.composing&&(this.composing.drifted||!r.changes.touchesRange(f.from,f.to)&&r.transactions.some(d=>!d.isUserEvent("input.type")&&d.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=r.changes.mapPos(this.composing.editorBase)):!this.applyEdits(r)||!this.rangeIsValid(r.state)?(this.pendingContextChange=null,this.reset(r.state)):(r.docChanged||r.selectionSet||o)&&this.setSelection(r.state),(r.geometryChanged||r.docChanged||r.selectionSet)&&r.view.requestMeasure(this.measureReq)}resetRange(r){let{head:o}=r.selection.main;this.from=Math.max(0,o-1e4),this.to=Math.min(r.doc.length,o+1e4)}reset(r){this.resetRange(r),this.editContext.updateText(0,this.editContext.text.length,r.doc.sliceString(this.from,this.to)),this.setSelection(r)}revertPending(r){let o=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(o.from),this.toContextPos(o.from+o.insert.length),r.doc.sliceString(o.from,o.to))}setSelection(r){let{main:o}=r.selection,f=this.toContextPos(Math.max(this.from,Math.min(this.to,o.anchor))),d=this.toContextPos(o.head);(this.editContext.selectionStart!=f||this.editContext.selectionEnd!=d)&&this.editContext.updateSelection(f,d)}rangeIsValid(r){let{head:o}=r.selection.main;return!(this.from>0&&o-this.from<500||this.to1e4*3)}toEditorPos(r,o=this.to-this.from){r=Math.min(r,o);let f=this.composing;return f&&f.drifted?f.editorBase+(r-f.contextBase):r+this.from}toContextPos(r){let o=this.composing;return o&&o.drifted?o.contextBase+(r-o.editorBase):r-this.from}destroy(){for(let r in this.handlers)this.editContext.removeEventListener(r,this.handlers[r])}}class Tr{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(r={}){var o;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),r.parent&&r.parent.appendChild(this.dom);let{dispatch:f}=r;this.dispatchTransactions=r.dispatchTransactions||f&&(d=>d.forEach(b=>f(b,this)))||(d=>this.update(d)),this.dispatch=this.dispatch.bind(this),this._root=r.root||icn(r.parent)||document,this.viewState=new Ipt(r.state||Zr.create(r)),r.scrollTo&&r.scrollTo.is(wG)&&(this.viewState.scrollTarget=r.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(TT).map(d=>new mve(d));for(let d of this.plugins)d.update(this);this.observer=new Sln(this),this.inputState=new Kcn(this),this.inputState.ensureHandlers(this.plugins),this.docView=new bpt(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((o=document.fonts)===null||o===void 0)&&o.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...r){let o=r.length==1&&r[0]instanceof tf?r:r.length==1&&Array.isArray(r[0])?r[0]:[this.state.update(...r)];this.dispatchTransactions(o,this)}update(r){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let o=!1,f=!1,d,b=this.state;for(let j of r){if(j.startState!=b)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");b=j.state}if(this.destroyed){this.viewState.state=b;return}let p=this.hasFocus,v=0,O=null;r.some(j=>j.annotation(Zyt))?(this.inputState.notifiedFocused=p,v=1):p!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=p,O=Jyt(b,p),O||(v=1));let C=this.observer.delayedAndroidKey,T=null;if(C?(this.observer.clearDelayedAndroidKey(),T=this.observer.readChange(),(T&&!this.state.doc.eq(b.doc)||!this.state.selection.eq(b.selection))&&(T=null)):this.observer.clear(),b.facet(Zr.phrases)!=this.state.facet(Zr.phrases))return this.setState(b);d=MY.create(this,b,r),d.flags|=v;let A=this.viewState.scrollTarget;try{this.updateState=2;for(let j of r){if(A&&(A=A.map(j.changes)),j.scrollIntoView){let{main:$}=j.state.selection;A=new RT($.empty?$:St.cursor($.head,$.head>$.anchor?-1:1))}for(let $ of j.effects)$.is(wG)&&(A=$.value.clip(this.state))}this.viewState.update(d,A),this.bidiCache=jY.update(this.bidiCache,d.changes),d.empty||(this.updatePlugins(d),this.inputState.update(d)),o=this.docView.update(d),this.state.facet(ZI)!=this.styleModules&&this.mountStyles(),f=this.updateAttrs(),this.showAnnouncements(r),this.docView.updateSelection(o,r.some(j=>j.isUserEvent("select.pointer")))}finally{this.updateState=0}if(d.startState.facet(SG)!=d.state.facet(SG)&&(this.viewState.mustMeasureContent=!0),(o||f||A||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),o&&this.docViewUpdate(),!d.empty)for(let j of this.state.facet(E3e))try{j(d)}catch($){Iw(this.state,$,"update listener")}(O||T)&&Promise.resolve().then(()=>{O&&this.state==O.startState&&this.dispatch(O),T&&!Kyt(this,T)&&C.force&&IT(this.contentDOM,C.key,C.keyCode)})}setState(r){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=r;return}this.updateState=2;let o=this.hasFocus;try{for(let f of this.plugins)f.destroy(this);this.viewState=new Ipt(r),this.plugins=r.facet(TT).map(f=>new mve(f)),this.pluginMap.clear();for(let f of this.plugins)f.update(this);this.docView.destroy(),this.docView=new bpt(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}o&&this.focus(),this.requestMeasure()}updatePlugins(r){let o=r.startState.facet(TT),f=r.state.facet(TT);if(o!=f){let d=[];for(let b of f){let p=o.indexOf(b);if(p<0)d.push(new mve(b));else{let v=this.plugins[p];v.mustUpdate=r,d.push(v)}}for(let b of this.plugins)b.mustUpdate!=r&&b.destroy(this);this.plugins=d,this.pluginMap.clear()}else for(let d of this.plugins)d.mustUpdate=r;for(let d=0;d-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,r&&this.observer.forceFlush();let o=null,f=this.scrollDOM,d=f.scrollTop*this.scaleY,{scrollAnchorPos:b,scrollAnchorHeight:p}=this.viewState;Math.abs(d-this.viewState.scrollTop)>1&&(p=-1),this.viewState.scrollAnchorHeight=-1;try{for(let v=0;;v++){if(p<0)if(ayt(f))b=-1,p=this.viewState.heightMap.height;else{let $=this.viewState.scrollAnchorAt(d);b=$.from,p=$.top}this.updateState=1;let O=this.viewState.measure(this);if(!O&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(v>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let C=[];O&4||([this.measureRequests,C]=[C,this.measureRequests]);let T=C.map($=>{try{return $.read(this)}catch(L){return Iw(this.state,L),Fpt}}),A=MY.create(this,this.state,[]),j=!1;A.flags|=O,o?o.flags|=O:o=A,this.updateState=2,A.empty||(this.updatePlugins(A),this.inputState.update(A),this.updateAttrs(),j=this.docView.update(A),j&&this.docViewUpdate());for(let $=0;$1||L<-1){d=d+L,f.scrollTop=d/this.scaleY,p=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(o&&!o.empty)for(let v of this.state.facet(E3e))v(o)}get themeClasses(){return j3e+" "+(this.state.facet(P3e)?i3t:n3t)+" "+this.state.facet(SG)}updateAttrs(){let r=_pt(this,Byt,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),o={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Wy)?"true":"false",class:"cm-content",style:`${oi.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(o["aria-readonly"]="true"),_pt(this,_Oe,o);let f=this.observer.ignore(()=>{let d=k3e(this.contentDOM,this.contentAttrs,o),b=k3e(this.dom,this.editorAttrs,r);return d||b});return this.editorAttrs=r,this.contentAttrs=o,f}showAnnouncements(r){let o=!0;for(let f of r)for(let d of f.effects)if(d.is(Tr.announce)){o&&(this.announceDOM.textContent=""),o=!1;let b=this.announceDOM.appendChild(document.createElement("div"));b.textContent=d.value}}mountStyles(){this.styleModules=this.state.facet(ZI);let r=this.state.facet(Tr.cspNonce);qa.mount(this.root,this.styleModules.concat(Oln).reverse(),r?{nonce:r}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(r){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),r){if(this.measureRequests.indexOf(r)>-1)return;if(r.key!=null){for(let o=0;of.plugin==r)||null),o&&o.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(r){return this.readMeasured(),this.viewState.elementAtHeight(r)}lineBlockAtHeight(r){return this.readMeasured(),this.viewState.lineBlockAtHeight(r)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(r){return this.viewState.lineBlockAt(r)}get contentHeight(){return this.viewState.contentHeight}moveByChar(r,o,f){return yve(this,r,Opt(this,r,o,f))}moveByGroup(r,o){return yve(this,r,Opt(this,r,o,f=>Lcn(this,r.head,f)))}visualLineSide(r,o){let f=this.bidiSpans(r),d=this.textDirectionAt(r.from),b=f[o?f.length-1:0];return St.cursor(b.side(o,d)+r.from,b.forward(!o,d)?1:-1)}moveToLineBoundary(r,o,f=!0){return Rcn(this,r,o,f)}moveVertically(r,o,f){return yve(this,r,Bcn(this,r,o,f))}domAtPos(r){return this.docView.domAtPos(r)}posAtDOM(r,o=0){return this.docView.posFromDOM(r,o)}posAtCoords(r,o=!0){return this.readMeasured(),Qyt(this,r,o)}coordsAtPos(r,o=1){this.readMeasured();let f=this.docView.coordsAt(r,o);if(!f||f.left==f.right)return f;let d=this.state.doc.lineAt(r),b=this.bidiSpans(d),p=b[a4.find(b,r-d.from,-1,o)];return aZ(f,p.dir==nh.LTR==o>0)}coordsForChar(r){return this.readMeasured(),this.docView.coordsForChar(r)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(r){return!this.state.facet(Iyt)||rthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(r))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(r){if(r.length>Tln)return Eyt(r.length);let o=this.textDirectionAt(r.from),f;for(let b of this.bidiCache)if(b.from==r.from&&b.dir==o&&(b.fresh||Tyt(b.isolates,f=ppt(this,r))))return b.order;f||(f=ppt(this,r));let d=mcn(r.text,o,f);return this.bidiCache.push(new jY(r.from,r.to,o,f,!0,d)),d}get hasFocus(){var r;return(this.dom.ownerDocument.hasFocus()||oi.safari&&((r=this.inputState)===null||r===void 0?void 0:r.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{fyt(this.contentDOM),this.docView.updateSelection()})}setRoot(r){this._root!=r&&(this._root=r,this.observer.setWindow((r.nodeType==9?r:r.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let r of this.plugins)r.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(r,o={}){return wG.of(new RT(typeof r=="number"?St.cursor(r):r,o.y,o.x,o.yMargin,o.xMargin))}scrollSnapshot(){let{scrollTop:r,scrollLeft:o}=this.scrollDOM,f=this.viewState.scrollAnchorAt(r);return wG.of(new RT(St.cursor(f.from),"start","start",f.top-r,o,!0))}setTabFocusMode(r){r==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof r=="boolean"?this.inputState.tabFocusMode=r?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+r)}static domEventHandlers(r){return Up.define(()=>({}),{eventHandlers:r})}static domEventObservers(r){return Up.define(()=>({}),{eventObservers:r})}static theme(r,o){let f=qa.newName(),d=[SG.of(f),ZI.of(D3e(`.${f}`,r))];return o&&o.dark&&d.push(P3e.of(!0)),d}static baseTheme(r){return qw.lowest(ZI.of(D3e("."+j3e,r,r3t)))}static findFromDOM(r){var o;let f=r.querySelector(".cm-content"),d=f&&_c.get(f)||_c.get(r);return((o=d==null?void 0:d.rootView)===null||o===void 0?void 0:o.view)||null}}Tr.styleModule=ZI;Tr.inputHandler=$yt;Tr.clipboardInputFilter=BOe;Tr.clipboardOutputFilter=FOe;Tr.scrollHandler=Ryt;Tr.focusChangeEffect=Nyt;Tr.perLineTextDirection=Iyt;Tr.exceptionSink=Dyt;Tr.updateListener=E3e;Tr.editable=Wy;Tr.mouseSelectionStyle=jyt;Tr.dragMovesSelection=Pyt;Tr.clickAddsSelectionRange=Myt;Tr.decorations=PR;Tr.outerDecorations=Fyt;Tr.atomicRanges=ZR;Tr.bidiIsolatedRanges=_yt;Tr.scrollMargins=Hyt;Tr.darkTheme=P3e;Tr.cspNonce=pn.define({combine:l=>l.length?l[0]:""});Tr.contentAttributes=_Oe;Tr.editorAttributes=Byt;Tr.lineWrapping=Tr.contentAttributes.of({class:"cm-lineWrapping"});Tr.announce=ar.define();const Tln=4096,Fpt={};class jY{constructor(r,o,f,d,b,p){this.from=r,this.to=o,this.dir=f,this.isolates=d,this.fresh=b,this.order=p}static update(r,o){if(o.empty&&!r.some(b=>b.fresh))return r;let f=[],d=r.length?r[r.length-1].dir:nh.LTR;for(let b=Math.max(0,r.length-10);b=0;d--){let b=f[d],p=typeof b=="function"?b(l):b;p&&O3e(p,o)}return o}const Eln=oi.mac?"mac":oi.windows?"win":oi.linux?"linux":"key";function Aln(l,r){const o=l.split(/-(?!$)/);let f=o[o.length-1];f=="Space"&&(f=" ");let d,b,p,v;for(let O=0;Of.concat(d),[]))),o}function jln(l,r,o){return o3t(s3t(l.state),r,l,o)}let l4=null;const Dln=4e3;function $ln(l,r=Eln){let o=Object.create(null),f=Object.create(null),d=(p,v)=>{let O=f[p];if(O==null)f[p]=v;else if(O!=v)throw new Error("Key binding "+p+" is used both as a regular binding and as a multi-stroke prefix")},b=(p,v,O,C,T)=>{var A,j;let $=o[p]||(o[p]=Object.create(null)),L=v.split(/ (?!$)/).map(Y=>Aln(Y,r));for(let Y=1;Y{let se=l4={view:he,prefix:ne,scope:p};return setTimeout(()=>{l4==se&&(l4=null)},Dln),!0}]})}let z=L.join(" ");d(z,!1);let Z=$[z]||($[z]={preventDefault:!1,stopPropagation:!1,run:((j=(A=$._any)===null||A===void 0?void 0:A.run)===null||j===void 0?void 0:j.slice())||[]});O&&Z.run.push(O),C&&(Z.preventDefault=!0),T&&(Z.stopPropagation=!0)};for(let p of l){let v=p.scope?p.scope.split(" "):["editor"];if(p.any)for(let C of v){let T=o[C]||(o[C]=Object.create(null));T._any||(T._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:A}=p;for(let j in T)T[j].run.push($=>A($,$3e))}let O=p[r]||p.key;if(O)for(let C of v)b(C,O,p.run,p.preventDefault,p.stopPropagation),p.shift&&b(C,"Shift-"+O,p.shift,p.preventDefault,p.stopPropagation)}return o}let $3e=null;function o3t(l,r,o,f){$3e=r;let d=Bmt(r),b=Dd(d,0),p=Nw(b)==d.length&&d!=" ",v="",O=!1,C=!1,T=!1;l4&&l4.view==o&&l4.scope==f&&(v=l4.prefix+" ",Xyt.indexOf(r.keyCode)<0&&(C=!0,l4=null));let A=new Set,j=Z=>{if(Z){for(let Y of Z.run)if(!A.has(Y)&&(A.add(Y),Y(o)))return Z.stopPropagation&&(T=!0),!0;Z.preventDefault&&(Z.stopPropagation&&(T=!0),C=!0)}return!1},$=l[f],L,z;return $&&(j($[v+xG(d,r,!p)])?O=!0:p&&(r.altKey||r.metaKey||r.ctrlKey)&&!(oi.windows&&r.ctrlKey&&r.altKey)&&!(oi.mac&&r.altKey&&!(r.ctrlKey||r.metaKey))&&(L=Yy[r.keyCode])&&L!=d?(j($[v+xG(L,r,!0)])||r.shiftKey&&(z=zT[r.keyCode])!=d&&z!=L&&j($[v+xG(z,r,!1)]))&&(O=!0):p&&r.shiftKey&&j($[v+xG(d,r,!0)])&&(O=!0),!O&&j($._any)&&(O=!0)),C&&(O=!0),O&&T&&r.stopPropagation(),$3e=null,O}const HI="-10000px";class c3t{constructor(r,o,f,d){this.facet=o,this.createTooltipView=f,this.removeTooltipView=d,this.input=r.state.facet(o),this.tooltips=this.input.filter(p=>p);let b=null;this.tooltipViews=this.tooltips.map(p=>b=f(p,b))}update(r,o){var f;let d=r.state.facet(this.facet),b=d.filter(O=>O);if(d===this.input){for(let O of this.tooltipViews)O.update&&O.update(r);return!1}let p=[],v=o?[]:null;for(let O=0;Oo[C]=O),o.length=v.length),this.input=d,this.tooltips=b,this.tooltipViews=p,!0}}function Nln(l){let r=l.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:r.clientHeight,right:r.clientWidth}}const Sve=pn.define({combine:l=>{var r,o,f;return{position:oi.ios?"absolute":((r=l.find(d=>d.position))===null||r===void 0?void 0:r.position)||"fixed",parent:((o=l.find(d=>d.parent))===null||o===void 0?void 0:o.parent)||null,tooltipSpace:((f=l.find(d=>d.tooltipSpace))===null||f===void 0?void 0:f.tooltipSpace)||Nln}}}),qpt=new WeakMap,l3t=Up.fromClass(class{constructor(l){this.view=l,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let r=l.state.facet(Sve);this.position=r.position,this.parent=r.parent,this.classes=l.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new c3t(l,u3t,(o,f)=>this.createTooltip(o,f),o=>{this.resizeObserver&&this.resizeObserver.unobserve(o.dom),o.dom.remove()}),this.above=this.manager.tooltips.map(o=>!!o.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(o=>{Date.now()>this.lastTransaction-50&&o.length>0&&o[o.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),l.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let l of this.manager.tooltipViews)this.intersectionObserver.observe(l.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(l){l.transactions.length&&(this.lastTransaction=Date.now());let r=this.manager.update(l,this.above);r&&this.observeIntersection();let o=r||l.geometryChanged,f=l.state.facet(Sve);if(f.position!=this.position&&!this.madeAbsolute){this.position=f.position;for(let d of this.manager.tooltipViews)d.dom.style.position=this.position;o=!0}if(f.parent!=this.parent){this.parent&&this.container.remove(),this.parent=f.parent,this.createContainer();for(let d of this.manager.tooltipViews)this.container.appendChild(d.dom);o=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);o&&this.maybeMeasure()}createTooltip(l,r){let o=l.create(this.view),f=r?r.dom:null;if(o.dom.classList.add("cm-tooltip"),l.arrow&&!o.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let d=document.createElement("div");d.className="cm-tooltip-arrow",o.dom.appendChild(d)}return o.dom.style.position=this.position,o.dom.style.top=HI,o.dom.style.left="0px",this.container.insertBefore(o.dom,f),o.mount&&o.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(o.dom),o}destroy(){var l,r,o;this.view.win.removeEventListener("resize",this.measureSoon);for(let f of this.manager.tooltipViews)f.dom.remove(),(l=f.destroy)===null||l===void 0||l.call(f);this.parent&&this.container.remove(),(r=this.resizeObserver)===null||r===void 0||r.disconnect(),(o=this.intersectionObserver)===null||o===void 0||o.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let l=1,r=1,o=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:b}=this.manager.tooltipViews[0];if(oi.gecko)o=b.offsetParent!=this.container.ownerDocument.body;else if(b.style.top==HI&&b.style.left=="0px"){let p=b.getBoundingClientRect();o=Math.abs(p.top+1e4)>1||Math.abs(p.left)>1}}if(o||this.position=="absolute")if(this.parent){let b=this.parent.getBoundingClientRect();b.width&&b.height&&(l=b.width/this.parent.offsetWidth,r=b.height/this.parent.offsetHeight)}else({scaleX:l,scaleY:r}=this.view.viewState);let f=this.view.scrollDOM.getBoundingClientRect(),d=HOe(this.view);return{visible:{left:f.left+d.left,top:f.top+d.top,right:f.right-d.right,bottom:f.bottom-d.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((b,p)=>{let v=this.manager.tooltipViews[p];return v.getCoords?v.getCoords(b.pos):this.view.coordsAtPos(b.pos)}),size:this.manager.tooltipViews.map(({dom:b})=>b.getBoundingClientRect()),space:this.view.state.facet(Sve).tooltipSpace(this.view),scaleX:l,scaleY:r,makeAbsolute:o}}writeMeasure(l){var r;if(l.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let v of this.manager.tooltipViews)v.dom.style.position="absolute"}let{visible:o,space:f,scaleX:d,scaleY:b}=l,p=[];for(let v=0;v=Math.min(o.bottom,f.bottom)||A.rightMath.min(o.right,f.right)+.1)){T.style.top=HI;continue}let $=O.arrow?C.dom.querySelector(".cm-tooltip-arrow"):null,L=$?7:0,z=j.right-j.left,Z=(r=qpt.get(C))!==null&&r!==void 0?r:j.bottom-j.top,Y=C.offset||Rln,ne=this.view.textDirection==nh.LTR,he=j.width>f.right-f.left?ne?f.left:f.right-j.width:ne?Math.max(f.left,Math.min(A.left-($?14:0)+Y.x,f.right-z)):Math.min(Math.max(f.left,A.left-z+($?14:0)-Y.x),f.right-z),se=this.above[v];!O.strictSide&&(se?A.top-Z-L-Y.yf.bottom)&&se==f.bottom-A.bottom>A.top-f.top&&(se=this.above[v]=!se);let ve=(se?A.top-f.top:f.bottom-A.bottom)-L;if(vehe&&nt.topCe&&(Ce=se?nt.top-Z-2-L:nt.bottom+L+2);if(this.position=="absolute"?(T.style.top=(Ce-l.parent.top)/b+"px",Qpt(T,(he-l.parent.left)/d)):(T.style.top=Ce/b+"px",Qpt(T,he/d)),$){let nt=A.left+(ne?Y.x:-Y.x)-(he+14-7);$.style.left=nt/d+"px"}C.overlap!==!0&&p.push({left:he,top:Ce,right:Ie,bottom:Ce+Z}),T.classList.toggle("cm-tooltip-above",se),T.classList.toggle("cm-tooltip-below",!se),C.positioned&&C.positioned(l.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let l of this.manager.tooltipViews)l.dom.style.top=HI}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Qpt(l,r){let o=parseInt(l.style.left,10);(isNaN(o)||Math.abs(r-o)>1)&&(l.style.left=r+"px")}const Iln=Tr.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Rln={x:0,y:0},u3t=pn.define({enables:[l3t,Iln]}),DY=pn.define({combine:l=>l.reduce((r,o)=>r.concat(o),[])});class bZ{static create(r){return new bZ(r)}constructor(r){this.view=r,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new c3t(r,DY,(o,f)=>this.createHostedView(o,f),o=>o.dom.remove())}createHostedView(r,o){let f=r.create(this.view);return f.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(f.dom,o?o.dom.nextSibling:this.dom.firstChild),this.mounted&&f.mount&&f.mount(this.view),f}mount(r){for(let o of this.manager.tooltipViews)o.mount&&o.mount(r);this.mounted=!0}positioned(r){for(let o of this.manager.tooltipViews)o.positioned&&o.positioned(r)}update(r){this.manager.update(r)}destroy(){var r;for(let o of this.manager.tooltipViews)(r=o.destroy)===null||r===void 0||r.call(o)}passProp(r){let o;for(let f of this.manager.tooltipViews){let d=f[r];if(d!==void 0){if(o===void 0)o=d;else if(o!==d)return}}return o}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Lln=u3t.compute([DY],l=>{let r=l.facet(DY);return r.length===0?null:{pos:Math.min(...r.map(o=>o.pos)),end:Math.max(...r.map(o=>{var f;return(f=o.end)!==null&&f!==void 0?f:o.pos})),create:bZ.create,above:r[0].above,arrow:r.some(o=>o.arrow)}});class Bln{constructor(r,o,f,d,b){this.view=r,this.source=o,this.field=f,this.setHover=d,this.hoverTime=b,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:r.dom,time:0},this.checkHover=this.checkHover.bind(this),r.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),r.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let r=Date.now()-this.lastMove.time;rv.bottom||o.xv.right+r.defaultCharacterWidth)return;let O=r.bidiSpans(r.state.doc.lineAt(d)).find(T=>T.from<=d&&T.to>=d),C=O&&O.dir==nh.RTL?-1:1;b=o.x{this.pending==v&&(this.pending=null,O&&!(Array.isArray(O)&&!O.length)&&r.dispatch({effects:this.setHover.of(Array.isArray(O)?O:[O])}))},O=>Iw(r.state,O,"hover tooltip"))}else p&&!(Array.isArray(p)&&!p.length)&&r.dispatch({effects:this.setHover.of(Array.isArray(p)?p:[p])})}get tooltip(){let r=this.view.plugin(l3t),o=r?r.manager.tooltips.findIndex(f=>f.create==bZ.create):-1;return o>-1?r.manager.tooltipViews[o]:null}mousemove(r){var o,f;this.lastMove={x:r.clientX,y:r.clientY,target:r.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:d,tooltip:b}=this;if(d.length&&b&&!Fln(b.dom,r)||this.pending){let{pos:p}=d[0]||this.pending,v=(f=(o=d[0])===null||o===void 0?void 0:o.end)!==null&&f!==void 0?f:p;(p==v?this.view.posAtCoords(this.lastMove)!=p:!_ln(this.view,p,v,r.clientX,r.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(r){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:o}=this;if(o.length){let{tooltip:f}=this;f&&f.dom.contains(r.relatedTarget)?this.watchTooltipLeave(f.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(r){let o=f=>{r.removeEventListener("mouseleave",o),this.active.length&&!this.view.dom.contains(f.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};r.addEventListener("mouseleave",o)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const CG=4;function Fln(l,r){let{left:o,right:f,top:d,bottom:b}=l.getBoundingClientRect(),p;if(p=l.querySelector(".cm-tooltip-arrow")){let v=p.getBoundingClientRect();d=Math.min(v.top,d),b=Math.max(v.bottom,b)}return r.clientX>=o-CG&&r.clientX<=f+CG&&r.clientY>=d-CG&&r.clientY<=b+CG}function _ln(l,r,o,f,d,b){let p=l.scrollDOM.getBoundingClientRect(),v=l.documentTop+l.documentPadding.top+l.contentHeight;if(p.left>f||p.rightd||Math.min(p.bottom,v)=r&&O<=o}function Hln(l,r={}){let o=ar.define(),f=Sf.define({create(){return[]},update(d,b){if(d.length&&(r.hideOnChange&&(b.docChanged||b.selection)?d=[]:r.hideOn&&(d=d.filter(p=>!r.hideOn(b,p))),b.docChanged)){let p=[];for(let v of d){let O=b.changes.mapPos(v.pos,-1,Jl.TrackDel);if(O!=null){let C=Object.assign(Object.create(null),v);C.pos=O,C.end!=null&&(C.end=b.changes.mapPos(C.end)),p.push(C)}}d=p}for(let p of b.effects)p.is(o)&&(d=p.value),p.is(qln)&&(d=[]);return d},provide:d=>DY.from(d)});return{active:f,extension:[f,Up.define(d=>new Bln(d,l,f,o,r.hoverTime||300)),Lln]}}const qln=ar.define(),zpt=pn.define({combine(l){let r,o;for(let f of l)r=r||f.topContainer,o=o||f.bottomContainer;return{topContainer:r,bottomContainer:o}}});function jR(l,r){let o=l.plugin(f3t),f=o?o.specs.indexOf(r):-1;return f>-1?o.panels[f]:null}const f3t=Up.fromClass(class{constructor(l){this.input=l.state.facet(DR),this.specs=this.input.filter(o=>o),this.panels=this.specs.map(o=>o(l));let r=l.state.facet(zpt);this.top=new TG(l,!0,r.topContainer),this.bottom=new TG(l,!1,r.bottomContainer),this.top.sync(this.panels.filter(o=>o.top)),this.bottom.sync(this.panels.filter(o=>!o.top));for(let o of this.panels)o.dom.classList.add("cm-panel"),o.mount&&o.mount()}update(l){let r=l.state.facet(zpt);this.top.container!=r.topContainer&&(this.top.sync([]),this.top=new TG(l.view,!0,r.topContainer)),this.bottom.container!=r.bottomContainer&&(this.bottom.sync([]),this.bottom=new TG(l.view,!1,r.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let o=l.state.facet(DR);if(o!=this.input){let f=o.filter(O=>O),d=[],b=[],p=[],v=[];for(let O of f){let C=this.specs.indexOf(O),T;C<0?(T=O(l.view),v.push(T)):(T=this.panels[C],T.update&&T.update(l)),d.push(T),(T.top?b:p).push(T)}this.specs=f,this.panels=d,this.top.sync(b),this.bottom.sync(p);for(let O of v)O.dom.classList.add("cm-panel"),O.mount&&O.mount()}else for(let f of this.panels)f.update&&f.update(l)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:l=>Tr.scrollMargins.of(r=>{let o=r.plugin(l);return o&&{top:o.top.scrollMargin(),bottom:o.bottom.scrollMargin()}})});class TG{constructor(r,o,f){this.view=r,this.top=o,this.container=f,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(r){for(let o of this.panels)o.destroy&&r.indexOf(o)<0&&o.destroy();this.panels=r,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let o=this.container||this.view.dom;o.insertBefore(this.dom,this.top?o.firstChild:null)}let r=this.dom.firstChild;for(let o of this.panels)if(o.dom.parentNode==this.dom){for(;r!=o.dom;)r=Wpt(r);r=r.nextSibling}else this.dom.insertBefore(o.dom,r);for(;r;)r=Wpt(r)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let r of this.classes.split(" "))r&&this.container.classList.remove(r);for(let r of(this.classes=this.view.themeClasses).split(" "))r&&this.container.classList.add(r)}}}function Wpt(l){let r=l.nextSibling;return l.remove(),r}const DR=pn.define({enables:f3t});class JT extends Gy{compare(r){return this==r||this.constructor==r.constructor&&this.eq(r)}eq(r){return!1}destroy(r){}}JT.prototype.elementClass="";JT.prototype.toDOM=void 0;JT.prototype.mapMode=Jl.TrackBefore;JT.prototype.startSide=JT.prototype.endSide=-1;JT.prototype.point=!0;const Kpt=typeof String.prototype.normalize=="function"?l=>l.normalize("NFKD"):l=>l;class eE{constructor(r,o,f=0,d=r.length,b,p){this.test=p,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=r.iterRange(f,d),this.bufferStart=f,this.normalize=b?v=>b(Kpt(v)):Kpt,this.query=this.normalize(o)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Dd(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let r=this.peek();if(r<0)return this.done=!0,this;let o=sOe(r),f=this.bufferStart+this.bufferPos;this.bufferPos+=Nw(r);let d=this.normalize(o);if(d.length)for(let b=0,p=f;;b++){let v=d.charCodeAt(b),O=this.match(v,p,this.bufferPos+this.bufferStart);if(b==d.length-1){if(O)return this.value=O,this;break}p==f&&bthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let r=this.matchPos-this.curLineStart;;){this.re.lastIndex=r;let o=this.matchPos<=this.to&&this.re.exec(this.curLine);if(o){let f=this.curLineStart+o.index,d=f+o[0].length;if(this.matchPos=$Y(this.text,d+(f==d?1:0)),f==this.curLineStart+this.curLine.length&&this.nextLine(),(fthis.value.to)&&(!this.test||this.test(f,d,o)))return this.value={from:f,to:d,match:o},this;r=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=f||d.to<=o){let v=new LT(o,r.sliceString(o,f));return xve.set(r,v),v}if(d.from==o&&d.to==f)return d;let{text:b,from:p}=d;return p>o&&(b=r.sliceString(o,p)+b,p=o),d.to=this.to?this.to:this.text.lineAt(r).to}next(){for(;;){let r=this.re.lastIndex=this.matchPos-this.flat.from,o=this.re.exec(this.flat.text);if(o&&!o[0]&&o.index==r&&(this.re.lastIndex=r+1,o=this.re.exec(this.flat.text)),o){let f=this.flat.from+o.index,d=f+o[0].length;if((this.flat.to>=this.to||o.index+o[0].length<=this.flat.text.length-10)&&(!this.test||this.test(f,d,o)))return this.value={from:f,to:d,match:o},this.matchPos=$Y(this.text,d+(f==d?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=LT.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(a3t.prototype[Symbol.iterator]=d3t.prototype[Symbol.iterator]=function(){return this});function Qln(l){try{return new RegExp(l,WOe),!0}catch{return!1}}function $Y(l,r){if(r>=l.length)return r;let o=l.lineAt(r),f;for(;r=56320&&f<57344;)r++;return r}function N3e(l){let r=String(l.state.doc.lineAt(l.state.selection.main.head).number),o=Lc("input",{class:"cm-textfield",name:"line",value:r}),f=Lc("form",{class:"cm-gotoLine",onkeydown:b=>{b.keyCode==27?(b.preventDefault(),l.dispatch({effects:hR.of(!1)}),l.focus()):b.keyCode==13&&(b.preventDefault(),d())},onsubmit:b=>{b.preventDefault(),d()}},Lc("label",l.state.phrase("Go to line"),": ",o)," ",Lc("button",{class:"cm-button",type:"submit"},l.state.phrase("go")),Lc("button",{name:"close",onclick:()=>{l.dispatch({effects:hR.of(!1)}),l.focus()},"aria-label":l.state.phrase("close"),type:"button"},["×"]));function d(){let b=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(o.value);if(!b)return;let{state:p}=l,v=p.doc.lineAt(p.selection.main.head),[,O,C,T,A]=b,j=T?+T.slice(1):0,$=C?+C:v.number;if(C&&A){let Z=$/100;O&&(Z=Z*(O=="-"?-1:1)+v.number/p.doc.lines),$=Math.round(p.doc.lines*Z)}else C&&O&&($=$*(O=="-"?-1:1)+v.number);let L=p.doc.line(Math.max(1,Math.min(p.doc.lines,$))),z=St.cursor(L.from+Math.max(0,Math.min(j,L.length)));l.dispatch({effects:[hR.of(!1),Tr.scrollIntoView(z.from,{y:"center"})],selection:z}),l.focus()}return{dom:f}}const hR=ar.define(),Vpt=Sf.define({create(){return!0},update(l,r){for(let o of r.effects)o.is(hR)&&(l=o.value);return l},provide:l=>DR.from(l,r=>r?N3e:null)}),zln=l=>{let r=jR(l,N3e);if(!r){let o=[hR.of(!0)];l.state.field(Vpt,!1)==null&&o.push(ar.appendConfig.of([Vpt,Wln])),l.dispatch({effects:o}),r=jR(l,N3e)}return r&&r.dom.querySelector("input").select(),!0},Wln=Tr.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),Kln={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Vln=pn.define({combine(l){return U2(l,Kln,{highlightWordAroundCursor:(r,o)=>r||o,minSelectionLength:Math.min,maxMatches:Math.min})}});function Xln(l){return[Jln,Zln]}const Uln=no.mark({class:"cm-selectionMatch"}),Gln=no.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Xpt(l,r,o,f){return(o==0||l(r.sliceDoc(o-1,o))!=hl.Word)&&(f==r.doc.length||l(r.sliceDoc(f,f+1))!=hl.Word)}function Yln(l,r,o,f){return l(r.sliceDoc(o,o+1))==hl.Word&&l(r.sliceDoc(f-1,f))==hl.Word}const Zln=Up.fromClass(class{constructor(l){this.decorations=this.getDeco(l)}update(l){(l.selectionSet||l.docChanged||l.viewportChanged)&&(this.decorations=this.getDeco(l.view))}getDeco(l){let r=l.state.facet(Vln),{state:o}=l,f=o.selection;if(f.ranges.length>1)return no.none;let d=f.main,b,p=null;if(d.empty){if(!r.highlightWordAroundCursor)return no.none;let O=o.wordAt(d.head);if(!O)return no.none;p=o.charCategorizer(d.head),b=o.sliceDoc(O.from,O.to)}else{let O=d.to-d.from;if(O200)return no.none;if(r.wholeWords){if(b=o.sliceDoc(d.from,d.to),p=o.charCategorizer(d.head),!(Xpt(p,o,d.from,d.to)&&Yln(p,o,d.from,d.to)))return no.none}else if(b=o.sliceDoc(d.from,d.to),!b)return no.none}let v=[];for(let O of l.visibleRanges){let C=new eE(o.doc,b,O.from,O.to);for(;!C.next().done;){let{from:T,to:A}=C.value;if((!p||Xpt(p,o,T,A))&&(d.empty&&T<=d.from&&A>=d.to?v.push(Gln.range(T,A)):(T>=d.to||A<=d.from)&&v.push(Uln.range(T,A)),v.length>r.maxMatches))return no.none}}return no.set(v)}},{decorations:l=>l.decorations}),Jln=Tr.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),eun=({state:l,dispatch:r})=>{let{selection:o}=l,f=St.create(o.ranges.map(d=>l.wordAt(d.head)||St.cursor(d.head)),o.mainIndex);return f.eq(o)?!1:(r(l.update({selection:f})),!0)};function tun(l,r){let{main:o,ranges:f}=l.selection,d=l.wordAt(o.head),b=d&&d.from==o.from&&d.to==o.to;for(let p=!1,v=new eE(l.doc,r,f[f.length-1].to);;)if(v.next(),v.done){if(p)return null;v=new eE(l.doc,r,0,Math.max(0,f[f.length-1].from-1)),p=!0}else{if(p&&f.some(O=>O.from==v.value.from))continue;if(b){let O=l.wordAt(v.value.from);if(!O||O.from!=v.value.from||O.to!=v.value.to)continue}return v.value}}const nun=({state:l,dispatch:r})=>{let{ranges:o}=l.selection;if(o.some(b=>b.from===b.to))return eun({state:l,dispatch:r});let f=l.sliceDoc(o[0].from,o[0].to);if(l.selection.ranges.some(b=>l.sliceDoc(b.from,b.to)!=f))return!1;let d=tun(l,f);return d?(r(l.update({selection:l.selection.addRange(St.range(d.from,d.to),!1),effects:Tr.scrollIntoView(d.to)})),!0):!1},cE=pn.define({combine(l){return U2(l,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:r=>new gun(r),scrollToMatch:r=>Tr.scrollIntoView(r)})}});class g3t{constructor(r){this.search=r.search,this.caseSensitive=!!r.caseSensitive,this.literal=!!r.literal,this.regexp=!!r.regexp,this.replace=r.replace||"",this.valid=!!this.search&&(!this.regexp||Qln(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!r.wholeWord}unquote(r){return this.literal?r:r.replace(/\\([nrt\\])/g,(o,f)=>f=="n"?` +`:f=="r"?"\r":f=="t"?" ":"\\")}eq(r){return this.search==r.search&&this.replace==r.replace&&this.caseSensitive==r.caseSensitive&&this.regexp==r.regexp&&this.wholeWord==r.wholeWord}create(){return this.regexp?new oun(this):new run(this)}getCursor(r,o=0,f){let d=r.doc?r:Zr.create({doc:r});return f==null&&(f=d.doc.length),this.regexp?kT(this,d,o,f):OT(this,d,o,f)}}class p3t{constructor(r){this.spec=r}}function OT(l,r,o,f){return new eE(r.doc,l.unquoted,o,f,l.caseSensitive?void 0:d=>d.toLowerCase(),l.wholeWord?iun(r.doc,r.charCategorizer(r.selection.main.head)):void 0)}function iun(l,r){return(o,f,d,b)=>((b>o||b+d.length=o)return null;d.push(f.value)}return d}highlight(r,o,f,d){let b=OT(this.spec,r,Math.max(0,o-this.spec.unquoted.length),Math.min(f+this.spec.unquoted.length,r.doc.length));for(;!b.next().done;)d(b.value.from,b.value.to)}}function kT(l,r,o,f){return new a3t(r.doc,l.search,{ignoreCase:!l.caseSensitive,test:l.wholeWord?sun(r.charCategorizer(r.selection.main.head)):void 0},o,f)}function NY(l,r){return l.slice(eu(l,r,!1),r)}function IY(l,r){return l.slice(r,eu(l,r))}function sun(l){return(r,o,f)=>!f[0].length||(l(NY(f.input,f.index))!=hl.Word||l(IY(f.input,f.index))!=hl.Word)&&(l(IY(f.input,f.index+f[0].length))!=hl.Word||l(NY(f.input,f.index+f[0].length))!=hl.Word)}class oun extends p3t{nextMatch(r,o,f){let d=kT(this.spec,r,f,r.doc.length).next();return d.done&&(d=kT(this.spec,r,0,o).next()),d.done?null:d.value}prevMatchInRange(r,o,f){for(let d=1;;d++){let b=Math.max(o,f-d*1e4),p=kT(this.spec,r,b,f),v=null;for(;!p.next().done;)v=p.value;if(v&&(b==o||v.from>b+10))return v;if(b==o)return null}}prevMatch(r,o,f){return this.prevMatchInRange(r,0,o)||this.prevMatchInRange(r,f,r.doc.length)}getReplacement(r){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(o,f)=>{if(f=="&")return r.match[0];if(f=="$")return"$";for(let d=f.length;d>0;d--){let b=+f.slice(0,d);if(b>0&&b=o)return null;d.push(f.value)}return d}highlight(r,o,f,d){let b=kT(this.spec,r,Math.max(0,o-250),Math.min(f+250,r.doc.length));for(;!b.next().done;)d(b.value.from,b.value.to)}}const $R=ar.define(),KOe=ar.define(),b4=Sf.define({create(l){return new Cve(I3e(l).create(),null)},update(l,r){for(let o of r.effects)o.is($R)?l=new Cve(o.value.create(),l.panel):o.is(KOe)&&(l=new Cve(l.query,o.value?VOe:null));return l},provide:l=>DR.from(l,r=>r.panel)});class Cve{constructor(r,o){this.query=r,this.panel=o}}const cun=no.mark({class:"cm-searchMatch"}),lun=no.mark({class:"cm-searchMatch cm-searchMatch-selected"}),uun=Up.fromClass(class{constructor(l){this.view=l,this.decorations=this.highlight(l.state.field(b4))}update(l){let r=l.state.field(b4);(r!=l.startState.field(b4)||l.docChanged||l.selectionSet||l.viewportChanged)&&(this.decorations=this.highlight(r))}highlight({query:l,panel:r}){if(!r||!l.spec.valid)return no.none;let{view:o}=this,f=new W2;for(let d=0,b=o.visibleRanges,p=b.length;db[d+1].from-500;)O=b[++d].to;l.highlight(o.state,v,O,(C,T)=>{let A=o.state.selection.ranges.some(j=>j.from==C&&j.to==T);f.add(C,T,A?lun:cun)})}return f.finish()}},{decorations:l=>l.decorations});function JR(l){return r=>{let o=r.state.field(b4,!1);return o&&o.query.spec.valid?l(r,o):m3t(r)}}const RY=JR((l,{query:r})=>{let{to:o}=l.state.selection.main,f=r.nextMatch(l.state,o,o);if(!f)return!1;let d=St.single(f.from,f.to),b=l.state.facet(cE);return l.dispatch({selection:d,effects:[XOe(l,f),b.scrollToMatch(d.main,l)],userEvent:"select.search"}),w3t(l),!0}),LY=JR((l,{query:r})=>{let{state:o}=l,{from:f}=o.selection.main,d=r.prevMatch(o,f,f);if(!d)return!1;let b=St.single(d.from,d.to),p=l.state.facet(cE);return l.dispatch({selection:b,effects:[XOe(l,d),p.scrollToMatch(b.main,l)],userEvent:"select.search"}),w3t(l),!0}),fun=JR((l,{query:r})=>{let o=r.matchAll(l.state,1e3);return!o||!o.length?!1:(l.dispatch({selection:St.create(o.map(f=>St.range(f.from,f.to))),userEvent:"select.search.matches"}),!0)}),hun=({state:l,dispatch:r})=>{let o=l.selection;if(o.ranges.length>1||o.main.empty)return!1;let{from:f,to:d}=o.main,b=[],p=0;for(let v=new eE(l.doc,l.sliceDoc(f,d));!v.next().done;){if(b.length>1e3)return!1;v.value.from==f&&(p=b.length),b.push(St.range(v.value.from,v.value.to))}return r(l.update({selection:St.create(b,p),userEvent:"select.search.matches"})),!0},Upt=JR((l,{query:r})=>{let{state:o}=l,{from:f,to:d}=o.selection.main;if(o.readOnly)return!1;let b=r.nextMatch(o,f,f);if(!b)return!1;let p=b,v=[],O,C,T=[];if(p.from==f&&p.to==d&&(C=o.toText(r.getReplacement(p)),v.push({from:p.from,to:p.to,insert:C}),p=r.nextMatch(o,p.from,p.to),T.push(Tr.announce.of(o.phrase("replaced match on line $",o.doc.lineAt(f).number)+"."))),p){let A=v.length==0||v[0].from>=b.to?0:b.to-b.from-C.length;O=St.single(p.from-A,p.to-A),T.push(XOe(l,p)),T.push(o.facet(cE).scrollToMatch(O.main,l))}return l.dispatch({changes:v,selection:O,effects:T,userEvent:"input.replace"}),!0}),aun=JR((l,{query:r})=>{if(l.state.readOnly)return!1;let o=r.matchAll(l.state,1e9).map(d=>{let{from:b,to:p}=d;return{from:b,to:p,insert:r.getReplacement(d)}});if(!o.length)return!1;let f=l.state.phrase("replaced $ matches",o.length)+".";return l.dispatch({changes:o,effects:Tr.announce.of(f),userEvent:"input.replace.all"}),!0});function VOe(l){return l.state.facet(cE).createPanel(l)}function I3e(l,r){var o,f,d,b,p;let v=l.selection.main,O=v.empty||v.to>v.from+100?"":l.sliceDoc(v.from,v.to);if(r&&!O)return r;let C=l.facet(cE);return new g3t({search:((o=r==null?void 0:r.literal)!==null&&o!==void 0?o:C.literal)?O:O.replace(/\n/g,"\\n"),caseSensitive:(f=r==null?void 0:r.caseSensitive)!==null&&f!==void 0?f:C.caseSensitive,literal:(d=r==null?void 0:r.literal)!==null&&d!==void 0?d:C.literal,regexp:(b=r==null?void 0:r.regexp)!==null&&b!==void 0?b:C.regexp,wholeWord:(p=r==null?void 0:r.wholeWord)!==null&&p!==void 0?p:C.wholeWord})}function b3t(l){let r=jR(l,VOe);return r&&r.dom.querySelector("[main-field]")}function w3t(l){let r=b3t(l);r&&r==l.root.activeElement&&r.select()}const m3t=l=>{let r=l.state.field(b4,!1);if(r&&r.panel){let o=b3t(l);if(o&&o!=l.root.activeElement){let f=I3e(l.state,r.query.spec);f.valid&&l.dispatch({effects:$R.of(f)}),o.focus(),o.select()}}else l.dispatch({effects:[KOe.of(!0),r?$R.of(I3e(l.state,r.query.spec)):ar.appendConfig.of(bun)]});return!0},v3t=l=>{let r=l.state.field(b4,!1);if(!r||!r.panel)return!1;let o=jR(l,VOe);return o&&o.dom.contains(l.root.activeElement)&&l.focus(),l.dispatch({effects:KOe.of(!1)}),!0},dun=[{key:"Mod-f",run:m3t,scope:"editor search-panel"},{key:"F3",run:RY,shift:LY,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:RY,shift:LY,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:v3t,scope:"editor search-panel"},{key:"Mod-Shift-l",run:hun},{key:"Mod-Alt-g",run:zln},{key:"Mod-d",run:nun,preventDefault:!0}];class gun{constructor(r){this.view=r;let o=this.query=r.state.field(b4).query.spec;this.commit=this.commit.bind(this),this.searchField=Lc("input",{value:o.search,placeholder:r0(r,"Find"),"aria-label":r0(r,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Lc("input",{value:o.replace,placeholder:r0(r,"Replace"),"aria-label":r0(r,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Lc("input",{type:"checkbox",name:"case",form:"",checked:o.caseSensitive,onchange:this.commit}),this.reField=Lc("input",{type:"checkbox",name:"re",form:"",checked:o.regexp,onchange:this.commit}),this.wordField=Lc("input",{type:"checkbox",name:"word",form:"",checked:o.wholeWord,onchange:this.commit});function f(d,b,p){return Lc("button",{class:"cm-button",name:d,onclick:b,type:"button"},p)}this.dom=Lc("div",{onkeydown:d=>this.keydown(d),class:"cm-search"},[this.searchField,f("next",()=>RY(r),[r0(r,"next")]),f("prev",()=>LY(r),[r0(r,"previous")]),f("select",()=>fun(r),[r0(r,"all")]),Lc("label",null,[this.caseField,r0(r,"match case")]),Lc("label",null,[this.reField,r0(r,"regexp")]),Lc("label",null,[this.wordField,r0(r,"by word")]),...r.state.readOnly?[]:[Lc("br"),this.replaceField,f("replace",()=>Upt(r),[r0(r,"replace")]),f("replaceAll",()=>aun(r),[r0(r,"replace all")])],Lc("button",{name:"close",onclick:()=>v3t(r),"aria-label":r0(r,"close"),type:"button"},["×"])])}commit(){let r=new g3t({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});r.eq(this.query)||(this.query=r,this.view.dispatch({effects:$R.of(r)}))}keydown(r){jln(this.view,r,"search-panel")?r.preventDefault():r.keyCode==13&&r.target==this.searchField?(r.preventDefault(),(r.shiftKey?LY:RY)(this.view)):r.keyCode==13&&r.target==this.replaceField&&(r.preventDefault(),Upt(this.view))}update(r){for(let o of r.transactions)for(let f of o.effects)f.is($R)&&!f.value.eq(this.query)&&this.setQuery(f.value)}setQuery(r){this.query=r,this.searchField.value=r.search,this.replaceField.value=r.replace,this.caseField.checked=r.caseSensitive,this.reField.checked=r.regexp,this.wordField.checked=r.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(cE).top}}function r0(l,r){return l.state.phrase(r)}const EG=30,AG=/[\s\.,:;?!]/;function XOe(l,{from:r,to:o}){let f=l.state.doc.lineAt(r),d=l.state.doc.lineAt(o).to,b=Math.max(f.from,r-EG),p=Math.min(d,o+EG),v=l.state.sliceDoc(b,p);if(b!=f.from){for(let O=0;Ov.length-EG;O--)if(!AG.test(v[O-1])&&AG.test(v[O])){v=v.slice(0,O);break}}return Tr.announce.of(`${l.state.phrase("current match")}. ${v} ${l.state.phrase("on line")} ${f.number}.`)}const pun=Tr.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),bun=[b4,qw.low(uun),pun];class y3t{constructor(r,o,f,d){this.state=r,this.pos=o,this.explicit=f,this.view=d,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(r){let o=Dh(this.state).resolveInner(this.pos,-1);for(;o&&r.indexOf(o.name)<0;)o=o.parent;return o?{from:o.from,to:this.pos,text:this.state.sliceDoc(o.from,this.pos),type:o.type}:null}matchBefore(r){let o=this.state.doc.lineAt(this.pos),f=Math.max(o.from,this.pos-250),d=o.text.slice(f-o.from,this.pos-o.from),b=d.search(k3t(r,!1));return b<0?null:{from:f+b,to:this.pos,text:d.slice(b)}}get aborted(){return this.abortListeners==null}addEventListener(r,o,f){r=="abort"&&this.abortListeners&&(this.abortListeners.push(o),f&&f.onDocChange&&(this.abortOnDocChange=!0))}}function Gpt(l){let r=Object.keys(l).join(""),o=/\w/.test(r);return o&&(r=r.replace(/\w/g,"")),`[${o?"\\w":""}${r.replace(/[^\w\s]/g,"\\$&")}]`}function wun(l){let r=Object.create(null),o=Object.create(null);for(let{label:d}of l){r[d[0]]=!0;for(let b=1;btypeof d=="string"?{label:d}:d),[o,f]=r.every(d=>/^\w+$/.test(d.label))?[/\w*$/,/\w+$/]:wun(r);return d=>{let b=d.matchBefore(f);return b||d.explicit?{from:b?b.from:d.pos,options:r,validFor:o}:null}}function O3t(l,r){return o=>{for(let f=Dh(o.state).resolveInner(o.pos,-1);f;f=f.parent){if(l.indexOf(f.name)>-1)return null;if(f.type.isTop)break}return r(o)}}class Ypt{constructor(r,o,f,d){this.completion=r,this.source=o,this.match=f,this.score=d}}function Dx(l){return l.selection.main.from}function k3t(l,r){var o;let{source:f}=l,d=r&&f[0]!="^",b=f[f.length-1]!="$";return!d&&!b?l:new RegExp(`${d?"^":""}(?:${f})${b?"$":""}`,(o=l.flags)!==null&&o!==void 0?o:l.ignoreCase?"i":"")}const UOe=Qw.define();function mun(l,r,o,f){let{main:d}=l.selection,b=o-d.from,p=f-d.from;return Object.assign(Object.assign({},l.changeByRange(v=>{if(v!=d&&o!=f&&l.sliceDoc(v.from+b,v.from+p)!=l.sliceDoc(o,f))return{range:v};let O=l.toText(r);return{changes:{from:v.from+b,to:f==d.from?v.to:v.from+p,insert:O},range:St.cursor(v.from+b+O.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const Zpt=new WeakMap;function vun(l){if(!Array.isArray(l))return l;let r=Zpt.get(l);return r||Zpt.set(l,r=wZ(l)),r}const BY=ar.define(),NR=ar.define();class yun{constructor(r){this.pattern=r,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let o=0;o=48&&ve<=57||ve>=97&&ve<=122?2:ve>=65&&ve<=90?1:0:(Ce=sOe(ve))!=Ce.toLowerCase()?1:Ce!=Ce.toUpperCase()?2:0;(!ne||Ie==1&&Z||se==0&&Ie!=0)&&(o[A]==ve||f[A]==ve&&(j=!0)?p[A++]=ne:p.length&&(Y=!1)),se=Ie,ne+=Nw(ve)}return A==O&&p[0]==0&&Y?this.result(-100+(j?-200:0),p,r):$==O&&L==0?this.ret(-200-r.length+(z==r.length?0:-100),[0,z]):v>-1?this.ret(-700-r.length,[v,v+this.pattern.length]):$==O?this.ret(-900-r.length,[L,z]):A==O?this.result(-100+(j?-200:0)+-700+(Y?0:-1100),p,r):o.length==2?null:this.result((d[0]?-700:0)+-200+-1100,d,r)}result(r,o,f){let d=[],b=0;for(let p of o){let v=p+(this.astral?Nw(Dd(f,p)):1);b&&d[b-1]==p?d[b-1]=v:(d[b++]=p,d[b++]=v)}return this.ret(r-f.length,d)}}class Oun{constructor(r){this.pattern=r,this.matched=[],this.score=0,this.folded=r.toLowerCase()}match(r){if(r.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:kun,filterStrict:!1,compareCompletions:(r,o)=>r.label.localeCompare(o.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(r,o)=>r&&o,closeOnBlur:(r,o)=>r&&o,icons:(r,o)=>r&&o,tooltipClass:(r,o)=>f=>Jpt(r(f),o(f)),optionClass:(r,o)=>f=>Jpt(r(f),o(f)),addToOptions:(r,o)=>r.concat(o),filterStrict:(r,o)=>r||o})}});function Jpt(l,r){return l?r?l+" "+r:l:r}function kun(l,r,o,f,d,b){let p=l.textDirection==al.RTL,v=p,O=!1,C="top",T,A,j=r.left-d.left,$=d.right-r.right,L=f.right-f.left,z=f.bottom-f.top;if(v&&j=z||ne>r.top?T=o.bottom-r.top:(C="bottom",T=r.bottom-o.top)}let Z=(r.bottom-r.top)/b.offsetHeight,Y=(r.right-r.left)/b.offsetWidth;return{style:`${C}: ${T/Z}px; max-width: ${A/Y}px`,class:"cm-completionInfo-"+(O?p?"left-narrow":"right-narrow":v?"left":"right")}}function Sun(l){let r=l.addToOptions.slice();return l.icons&&r.push({render(o){let f=document.createElement("div");return f.classList.add("cm-completionIcon"),o.type&&f.classList.add(...o.type.split(/\s+/g).map(d=>"cm-completionIcon-"+d)),f.setAttribute("aria-hidden","true"),f},position:20}),r.push({render(o,f,d,b){let p=document.createElement("span");p.className="cm-completionLabel";let v=o.displayLabel||o.label,O=0;for(let C=0;CO&&p.appendChild(document.createTextNode(v.slice(O,T)));let j=p.appendChild(document.createElement("span"));j.appendChild(document.createTextNode(v.slice(T,A))),j.className="cm-completionMatchedText",O=A}return Oo.position-f.position).map(o=>o.render)}function Tve(l,r,o){if(l<=o)return{from:0,to:l};if(r<0&&(r=0),r<=l>>1){let d=Math.floor(r/o);return{from:d*o,to:(d+1)*o}}let f=Math.floor((l-r)/o);return{from:l-(f+1)*o,to:l-f*o}}class xun{constructor(r,o,f){this.view=r,this.stateField=o,this.applyCompletion=f,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:O=>this.placeInfo(O),key:this},this.space=null,this.currentClass="";let d=r.state.field(o),{options:b,selected:p}=d.open,v=r.state.facet(Ph);this.optionContent=Sun(v),this.optionClass=v.optionClass,this.tooltipClass=v.tooltipClass,this.range=Tve(b.length,p,v.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(r.state),this.dom.addEventListener("mousedown",O=>{let{options:C}=r.state.field(o).open;for(let T=O.target,A;T&&T!=this.dom;T=T.parentNode)if(T.nodeName=="LI"&&(A=/-(\d+)$/.exec(T.id))&&+A[1]{let C=r.state.field(this.stateField,!1);C&&C.tooltip&&r.state.facet(Ph).closeOnBlur&&O.relatedTarget!=r.contentDOM&&r.dispatch({effects:NR.of(null)})}),this.showOptions(b,d.id)}mount(){this.updateSel()}showOptions(r,o){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(r,o,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(r){var o;let f=r.state.field(this.stateField),d=r.startState.field(this.stateField);if(this.updateTooltipClass(r.state),f!=d){let{options:b,selected:p,disabled:v}=f.open;(!d.open||d.open.options!=b)&&(this.range=Tve(b.length,p,r.state.facet(Ph).maxRenderedOptions),this.showOptions(b,f.id)),this.updateSel(),v!=((o=d.open)===null||o===void 0?void 0:o.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!v)}}updateTooltipClass(r){let o=this.tooltipClass(r);if(o!=this.currentClass){for(let f of this.currentClass.split(" "))f&&this.dom.classList.remove(f);for(let f of o.split(" "))f&&this.dom.classList.add(f);this.currentClass=o}}positioned(r){this.space=r,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let r=this.view.state.field(this.stateField),o=r.open;if((o.selected>-1&&o.selected=this.range.to)&&(this.range=Tve(o.options.length,o.selected,this.view.state.facet(Ph).maxRenderedOptions),this.showOptions(o.options,r.id)),this.updateSelectedOption(o.selected)){this.destroyInfo();let{completion:f}=o.options[o.selected],{info:d}=f;if(!d)return;let b=typeof d=="string"?document.createTextNode(d):d(f);if(!b)return;"then"in b?b.then(p=>{p&&this.view.state.field(this.stateField,!1)==r&&this.addInfoPane(p,f)}).catch(p=>W1(this.view.state,p,"completion info")):this.addInfoPane(b,f)}}addInfoPane(r,o){this.destroyInfo();let f=this.info=document.createElement("div");if(f.className="cm-tooltip cm-completionInfo",r.nodeType!=null)f.appendChild(r),this.infoDestroy=null;else{let{dom:d,destroy:b}=r;f.appendChild(d),this.infoDestroy=b||null}this.dom.appendChild(f),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(r){let o=null;for(let f=this.list.firstChild,d=this.range.from;f;f=f.nextSibling,d++)f.nodeName!="LI"||!f.id?d--:d==r?f.hasAttribute("aria-selected")||(f.setAttribute("aria-selected","true"),o=f):f.hasAttribute("aria-selected")&&f.removeAttribute("aria-selected");return o&&Tun(this.list,o),o}measureInfo(){let r=this.dom.querySelector("[aria-selected]");if(!r||!this.info)return null;let o=this.dom.getBoundingClientRect(),f=this.info.getBoundingClientRect(),d=r.getBoundingClientRect(),b=this.space;if(!b){let p=this.dom.ownerDocument.documentElement;b={left:0,top:0,right:p.clientWidth,bottom:p.clientHeight}}return d.top>Math.min(b.bottom,o.bottom)-10||d.bottom{p.target==d&&p.preventDefault()});let b=null;for(let p=f.from;pf.from||f.from==0))if(b=j,typeof C!="string"&&C.header)d.appendChild(C.header(C));else{let $=d.appendChild(document.createElement("completion-section"));$.textContent=j}}const T=d.appendChild(document.createElement("li"));T.id=o+"-"+p,T.setAttribute("role","option");let A=this.optionClass(v);A&&(T.className=A);for(let j of this.optionContent){let $=j(v,this.view.state,this.view,O);$&&T.appendChild($)}}return f.from&&d.classList.add("cm-completionListIncompleteTop"),f.tonew xun(o,l,r)}function Tun(l,r){let o=l.getBoundingClientRect(),f=r.getBoundingClientRect(),d=o.height/l.offsetHeight;f.topo.bottom&&(l.scrollTop+=(f.bottom-o.bottom)/d)}function ebt(l){return(l.boost||0)*100+(l.apply?10:0)+(l.info?5:0)+(l.type?1:0)}function Eun(l,r){let o=[],f=null,d=C=>{o.push(C);let{section:T}=C.completion;if(T){f||(f=[]);let A=typeof T=="string"?T:T.name;f.some(j=>j.name==A)||f.push(typeof T=="string"?{name:A}:T)}},b=r.facet(Ph);for(let C of l)if(C.hasResult()){let T=C.result.getMatch;if(C.result.filter===!1)for(let A of C.result.options)d(new Ypt(A,C.source,T?T(A):[],1e9-o.length));else{let A=r.sliceDoc(C.from,C.to),j,$=b.filterStrict?new Oun(A):new yun(A);for(let L of C.result.options)if(j=$.match(L.label)){let z=L.displayLabel?T?T(L,j.matched):[]:j.matched;d(new Ypt(L,C.source,z,j.score+(L.boost||0)))}}}if(f){let C=Object.create(null),T=0,A=(j,$)=>{var L,z;return((L=j.rank)!==null&&L!==void 0?L:1e9)-((z=$.rank)!==null&&z!==void 0?z:1e9)||(j.name<$.name?-1:1)};for(let j of f.sort(A))T-=1e5,C[j.name]=T;for(let j of o){let{section:$}=j.completion;$&&(j.score+=C[typeof $=="string"?$:$.name])}}let p=[],v=null,O=b.compareCompletions;for(let C of o.sort((T,A)=>A.score-T.score||O(T.completion,A.completion))){let T=C.completion;!v||v.label!=T.label||v.detail!=T.detail||v.type!=null&&T.type!=null&&v.type!=T.type||v.apply!=T.apply||v.boost!=T.boost?p.push(C):ebt(C.completion)>ebt(v)&&(p[p.length-1]=C),v=C.completion}return p}class ET{constructor(r,o,f,d,b,p){this.options=r,this.attrs=o,this.tooltip=f,this.timestamp=d,this.selected=b,this.disabled=p}setSelected(r,o){return r==this.selected||r>=this.options.length?this:new ET(this.options,tbt(o,r),this.tooltip,this.timestamp,r,this.disabled)}static build(r,o,f,d,b,p){if(d&&!p&&r.some(C=>C.isPending))return d.setDisabled();let v=Eun(r,o);if(!v.length)return d&&r.some(C=>C.isPending)?d.setDisabled():null;let O=o.facet(Ph).selectOnOpen?0:-1;if(d&&d.selected!=O&&d.selected!=-1){let C=d.options[d.selected].completion;for(let T=0;TT.hasResult()?Math.min(C,T.from):C,1e8),create:$un,above:b.aboveCursor},d?d.timestamp:Date.now(),O,!1)}map(r){return new ET(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:r.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new ET(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class FY{constructor(r,o,f){this.active=r,this.id=o,this.open=f}static start(){return new FY(jun,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(r){let{state:o}=r,f=o.facet(Ph),b=(f.override||o.languageDataAt("autocomplete",Dx(o)).map(vun)).map(O=>(this.active.find(T=>T.source==O)||new Kp(O,this.active.some(T=>T.state!=0)?1:0)).update(r,f));b.length==this.active.length&&b.every((O,C)=>O==this.active[C])&&(b=this.active);let p=this.open,v=r.effects.some(O=>O.is(GOe));p&&r.docChanged&&(p=p.map(r.changes)),r.selection||b.some(O=>O.hasResult()&&r.changes.touchesRange(O.from,O.to))||!Aun(b,this.active)||v?p=ET.build(b,o,this.id,p,f,v):p&&p.disabled&&!b.some(O=>O.isPending)&&(p=null),!p&&b.every(O=>!O.isPending)&&b.some(O=>O.hasResult())&&(b=b.map(O=>O.hasResult()?new Kp(O.source,0):O));for(let O of r.effects)O.is(x3t)&&(p=p&&p.setSelected(O.value,this.id));return b==this.active&&p==this.open?this:new FY(b,this.id,p)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Mun:Pun}}function Aun(l,r){if(l==r)return!0;for(let o=0,f=0;;){for(;o-1&&(o["aria-activedescendant"]=l+"-"+r),o}const jun=[];function S3t(l,r){if(l.isUserEvent("input.complete")){let f=l.annotation(UOe);if(f&&r.activateOnCompletion(f))return 12}let o=l.isUserEvent("input.type");return o&&r.activateOnTyping?5:o?1:l.isUserEvent("delete.backward")?2:l.selection?8:l.docChanged?16:0}class Kp{constructor(r,o,f=!1){this.source=r,this.state=o,this.explicit=f}hasResult(){return!1}get isPending(){return this.state==1}update(r,o){let f=S3t(r,o),d=this;(f&8||f&16&&this.touches(r))&&(d=new Kp(d.source,0)),f&4&&d.state==0&&(d=new Kp(this.source,1)),d=d.updateFor(r,f);for(let b of r.effects)if(b.is(BY))d=new Kp(d.source,1,b.value);else if(b.is(NR))d=new Kp(d.source,0);else if(b.is(GOe))for(let p of b.value)p.source==d.source&&(d=p);return d}updateFor(r,o){return this.map(r.changes)}map(r){return this}touches(r){return r.changes.touchesRange(Dx(r.state))}}class BT extends Kp{constructor(r,o,f,d,b,p){super(r,3,o),this.limit=f,this.result=d,this.from=b,this.to=p}hasResult(){return!0}updateFor(r,o){var f;if(!(o&3))return this.map(r.changes);let d=this.result;d.map&&!r.changes.empty&&(d=d.map(d,r.changes));let b=r.changes.mapPos(this.from),p=r.changes.mapPos(this.to,1),v=Dx(r.state);if(v>p||!d||o&2&&(Dx(r.startState)==this.from||vo.map(r))}}),x3t=ar.define(),$d=Sf.define({create(){return FY.start()},update(l,r){return l.update(r)},provide:l=>[OOe.from(l,r=>r.tooltip),Mi.contentAttributes.from(l,r=>r.attrs)]});function YOe(l,r){const o=r.completion.apply||r.completion.label;let f=l.state.field($d).active.find(d=>d.source==r.source);return f instanceof BT?(typeof o=="string"?l.dispatch(Object.assign(Object.assign({},mun(l.state,o,f.from,f.to)),{annotations:UOe.of(r.completion)})):o(l,r.completion,f.from,f.to),!0):!1}const $un=Cun($d,YOe);function MG(l,r="option"){return o=>{let f=o.state.field($d,!1);if(!f||!f.open||f.open.disabled||Date.now()-f.open.timestamp-1?f.open.selected+d*(l?1:-1):l?0:p-1;return v<0?v=r=="page"?0:p-1:v>=p&&(v=r=="page"?p-1:0),o.dispatch({effects:x3t.of(v)}),!0}}const C3t=l=>{let r=l.state.field($d,!1);return l.state.readOnly||!r||!r.open||r.open.selected<0||r.open.disabled||Date.now()-r.open.timestampl.state.field($d,!1)?(l.dispatch({effects:BY.of(!0)}),!0):!1,Nun=l=>{let r=l.state.field($d,!1);return!r||!r.active.some(o=>o.state!=0)?!1:(l.dispatch({effects:NR.of(null)}),!0)};class Iun{constructor(r,o){this.active=r,this.context=o,this.time=Date.now(),this.updates=[],this.done=void 0}}const Run=50,Lun=1e3,Bun=Qa.fromClass(class{constructor(l){this.view=l,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let r of l.state.field($d).active)r.isPending&&this.startQuery(r)}update(l){let r=l.state.field($d),o=l.state.facet(Ph);if(!l.selectionSet&&!l.docChanged&&l.startState.field($d)==r)return;let f=l.transactions.some(b=>{let p=S3t(b,o);return p&8||(b.selection||b.docChanged)&&!(p&3)});for(let b=0;bRun&&Date.now()-p.time>Lun){for(let v of p.context.abortListeners)try{v()}catch(O){W1(this.view.state,O)}p.context.abortListeners=null,this.running.splice(b--,1)}else p.updates.push(...l.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),l.transactions.some(b=>b.effects.some(p=>p.is(BY)))&&(this.pendingStart=!0);let d=this.pendingStart?50:o.activateOnTypingDelay;if(this.debounceUpdate=r.active.some(b=>b.isPending&&!this.running.some(p=>p.active.source==b.source))?setTimeout(()=>this.startUpdate(),d):-1,this.composing!=0)for(let b of l.transactions)b.isUserEvent("input.type")?this.composing=2:this.composing==2&&b.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:l}=this.view,r=l.field($d);for(let o of r.active)o.isPending&&!this.running.some(f=>f.active.source==o.source)&&this.startQuery(o);this.running.length&&r.open&&r.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ph).updateSyncTime))}startQuery(l){let{state:r}=this.view,o=Dx(r),f=new y3t(r,o,l.explicit,this.view),d=new Iun(l,f);this.running.push(d),Promise.resolve(l.source(f)).then(b=>{d.context.aborted||(d.done=b||null,this.scheduleAccept())},b=>{this.view.dispatch({effects:NR.of(null)}),W1(this.view.state,b)})}scheduleAccept(){this.running.every(l=>l.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ph).updateSyncTime))}accept(){var l;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let r=[],o=this.view.state.facet(Ph),f=this.view.state.field($d);for(let d=0;dv.source==b.active.source);if(p&&p.isPending)if(b.done==null){let v=new Kp(b.active.source,0);for(let O of b.updates)v=v.update(O,o);v.isPending||r.push(v)}else this.startQuery(p)}(r.length||f.open&&f.open.disabled)&&this.view.dispatch({effects:GOe.of(r)})}},{eventHandlers:{blur(l){let r=this.view.state.field($d,!1);if(r&&r.tooltip&&this.view.state.facet(Ph).closeOnBlur){let o=r.open&&Y2t(this.view,r.open.tooltip);(!o||!o.dom.contains(l.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:NR.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:BY.of(!1)}),20),this.composing=0}}}),Fun=typeof navigator=="object"&&/Win/.test(navigator.platform),_un=qw.highest(Mi.domEventHandlers({keydown(l,r){let o=r.state.field($d,!1);if(!o||!o.open||o.open.disabled||o.open.selected<0||l.key.length>1||l.ctrlKey&&!(Fun&&l.altKey)||l.metaKey)return!1;let f=o.open.options[o.open.selected],d=o.active.find(p=>p.source==f.source),b=f.completion.commitCharacters||d.result.commitCharacters;return b&&b.indexOf(l.key)>-1&&YOe(r,f),!1}})),T3t=Mi.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Hun{constructor(r,o,f,d){this.field=r,this.line=o,this.from=f,this.to=d}}class ZOe{constructor(r,o,f){this.field=r,this.from=o,this.to=f}map(r){let o=r.mapPos(this.from,-1,Jl.TrackDel),f=r.mapPos(this.to,1,Jl.TrackDel);return o==null||f==null?null:new ZOe(this.field,o,f)}}class JOe{constructor(r,o){this.lines=r,this.fieldPositions=o}instantiate(r,o){let f=[],d=[o],b=r.doc.lineAt(o),p=/^\s*/.exec(b.text)[0];for(let O of this.lines){if(f.length){let C=p,T=/^\t*/.exec(O)[0].length;for(let A=0;Anew ZOe(O.field,d[O.line]+O.from,d[O.line]+O.to));return{text:f,ranges:v}}static parse(r){let o=[],f=[],d=[],b;for(let p of r.split(/\r\n?|\n/)){for(;b=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(p);){let v=b[1]?+b[1]:null,O=b[2]||b[3]||"",C=-1,T=O.replace(/\\[{}]/g,A=>A[1]);for(let A=0;A=C&&j.field++}d.push(new Hun(C,f.length,b.index,b.index+T.length)),p=p.slice(0,b.index)+O+p.slice(b.index+b[0].length)}p=p.replace(/\\([{}])/g,(v,O,C)=>{for(let T of d)T.line==f.length&&T.from>C&&(T.from--,T.to--);return O}),f.push(p)}return new JOe(f,d)}}let qun=cs.widget({widget:new class extends e3{toDOM(){let l=document.createElement("span");return l.className="cm-snippetFieldPosition",l}ignoreEvent(){return!1}}}),Qun=cs.mark({class:"cm-snippetField"});class lE{constructor(r,o){this.ranges=r,this.active=o,this.deco=cs.set(r.map(f=>(f.from==f.to?qun:Qun).range(f.from,f.to)))}map(r){let o=[];for(let f of this.ranges){let d=f.map(r);if(!d)return null;o.push(d)}return new lE(o,this.active)}selectionInsideField(r){return r.ranges.every(o=>this.ranges.some(f=>f.field==this.active&&f.from<=o.from&&f.to>=o.to))}}const eL=ar.define({map(l,r){return l&&l.map(r)}}),zun=ar.define(),IR=Sf.define({create(){return null},update(l,r){for(let o of r.effects){if(o.is(eL))return o.value;if(o.is(zun)&&l)return new lE(l.ranges,o.value)}return l&&r.docChanged&&(l=l.map(r.changes)),l&&r.selection&&!l.selectionInsideField(r.selection)&&(l=null),l},provide:l=>Mi.decorations.from(l,r=>r?r.deco:cs.none)});function eke(l,r){return St.create(l.filter(o=>o.field==r).map(o=>St.range(o.from,o.to)))}function Wun(l){let r=JOe.parse(l);return(o,f,d,b)=>{let{text:p,ranges:v}=r.instantiate(o.state,d),{main:O}=o.state.selection,C={changes:{from:d,to:b==O.from?O.to:b,insert:Nr.of(p)},scrollIntoView:!0,annotations:f?[UOe.of(f),tf.userEvent.of("input.complete")]:void 0};if(v.length&&(C.selection=eke(v,0)),v.some(T=>T.field>0)){let T=new lE(v,0),A=C.effects=[eL.of(T)];o.state.field(IR,!1)===void 0&&A.push(ar.appendConfig.of([IR,Gun,Yun,T3t]))}o.dispatch(o.state.update(C))}}function E3t(l){return({state:r,dispatch:o})=>{let f=r.field(IR,!1);if(!f||l<0&&f.active==0)return!1;let d=f.active+l,b=l>0&&!f.ranges.some(p=>p.field==d+l);return o(r.update({selection:eke(f.ranges,d),effects:eL.of(b?null:new lE(f.ranges,d)),scrollIntoView:!0})),!0}}const Kun=({state:l,dispatch:r})=>l.field(IR,!1)?(r(l.update({effects:eL.of(null)})),!0):!1,Vun=E3t(1),Xun=E3t(-1),Uun=[{key:"Tab",run:Vun,shift:Xun},{key:"Escape",run:Kun}],ibt=pn.define({combine(l){return l.length?l[0]:Uun}}),Gun=qw.highest(sE.compute([ibt],l=>l.facet(ibt)));function By(l,r){return Object.assign(Object.assign({},r),{apply:Wun(l)})}const Yun=Mi.domEventHandlers({mousedown(l,r){let o=r.state.field(IR,!1),f;if(!o||(f=r.posAtCoords({x:l.clientX,y:l.clientY}))==null)return!1;let d=o.ranges.find(b=>b.from<=f&&b.to>=f);return!d||d.field==o.active?!1:(r.dispatch({selection:eke(o.ranges,d.field),effects:eL.of(o.ranges.some(b=>b.field>d.field)?new lE(o.ranges,d.field):null),scrollIntoView:!0}),!0)}}),RR={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Px=ar.define({map(l,r){let o=r.mapPos(l,-1,Jl.TrackAfter);return o??void 0}}),tke=new class extends Gy{};tke.startSide=1;tke.endSide=-1;const A3t=Sf.define({create(){return Jr.empty},update(l,r){if(l=l.map(r.changes),r.selection){let o=r.state.doc.lineAt(r.selection.main.head);l=l.update({filter:f=>f>=o.from&&f<=o.to})}for(let o of r.effects)o.is(Px)&&(l=l.update({add:[tke.range(o.value,o.value+1)]}));return l}});function Zun(){return[efn,A3t]}const Eve="()[]{}<>«»»«[]{}";function M3t(l){for(let r=0;r{if((Jun?l.composing:l.compositionStarted)||l.state.readOnly)return!1;let d=l.state.selection.main;if(f.length>2||f.length==2&&Nw(Dd(f,0))==1||r!=d.from||o!=d.to)return!1;let b=ifn(l.state,f);return b?(l.dispatch(b),!0):!1}),tfn=({state:l,dispatch:r})=>{if(l.readOnly)return!1;let f=P3t(l,l.selection.main.head).brackets||RR.brackets,d=null,b=l.changeByRange(p=>{if(p.empty){let v=rfn(l.doc,p.head);for(let O of f)if(O==v&&mZ(l.doc,p.head)==M3t(Dd(O,0)))return{changes:{from:p.head-O.length,to:p.head+O.length},range:St.cursor(p.head-O.length)}}return{range:d=p}});return d||r(l.update(b,{scrollIntoView:!0,userEvent:"delete.backward"})),!d},nfn=[{key:"Backspace",run:tfn}];function ifn(l,r){let o=P3t(l,l.selection.main.head),f=o.brackets||RR.brackets;for(let d of f){let b=M3t(Dd(d,0));if(r==d)return b==d?cfn(l,d,f.indexOf(d+d+d)>-1,o):sfn(l,d,b,o.before||RR.before);if(r==b&&j3t(l,l.selection.main.from))return ofn(l,d,b)}return null}function j3t(l,r){let o=!1;return l.field(A3t).between(0,l.doc.length,f=>{f==r&&(o=!0)}),o}function mZ(l,r){let o=l.sliceString(r,r+2);return o.slice(0,Nw(Dd(o,0)))}function rfn(l,r){let o=l.sliceString(r-2,r);return Nw(Dd(o,0))==o.length?o:o.slice(1)}function sfn(l,r,o,f){let d=null,b=l.changeByRange(p=>{if(!p.empty)return{changes:[{insert:r,from:p.from},{insert:o,from:p.to}],effects:Px.of(p.to+r.length),range:St.range(p.anchor+r.length,p.head+r.length)};let v=mZ(l.doc,p.head);return!v||/\s/.test(v)||f.indexOf(v)>-1?{changes:{insert:r+o,from:p.head},effects:Px.of(p.head+r.length),range:St.cursor(p.head+r.length)}:{range:d=p}});return d?null:l.update(b,{scrollIntoView:!0,userEvent:"input.type"})}function ofn(l,r,o){let f=null,d=l.changeByRange(b=>b.empty&&mZ(l.doc,b.head)==o?{changes:{from:b.head,to:b.head+o.length,insert:o},range:St.cursor(b.head+o.length)}:f={range:b});return f?null:l.update(d,{scrollIntoView:!0,userEvent:"input.type"})}function cfn(l,r,o,f){let d=f.stringPrefixes||RR.stringPrefixes,b=null,p=l.changeByRange(v=>{if(!v.empty)return{changes:[{insert:r,from:v.from},{insert:r,from:v.to}],effects:Px.of(v.to+r.length),range:St.range(v.anchor+r.length,v.head+r.length)};let O=v.head,C=mZ(l.doc,O),T;if(C==r){if(rbt(l,O))return{changes:{insert:r+r,from:O},effects:Px.of(O+r.length),range:St.cursor(O+r.length)};if(j3t(l,O)){let j=o&&l.sliceDoc(O,O+r.length*3)==r+r+r?r+r+r:r;return{changes:{from:O,to:O+j.length,insert:j},range:St.cursor(O+j.length)}}}else{if(o&&l.sliceDoc(O-2*r.length,O)==r+r&&(T=sbt(l,O-2*r.length,d))>-1&&rbt(l,T))return{changes:{insert:r+r+r+r,from:O},effects:Px.of(O+r.length),range:St.cursor(O+r.length)};if(l.charCategorizer(O)(C)!=hl.Word&&sbt(l,O,d)>-1&&!lfn(l,O,r,d))return{changes:{insert:r+r,from:O},effects:Px.of(O+r.length),range:St.cursor(O+r.length)}}return{range:b=v}});return b?null:l.update(p,{scrollIntoView:!0,userEvent:"input.type"})}function rbt(l,r){let o=Dh(l).resolveInner(r+1);return o.parent&&o.from==r}function lfn(l,r,o,f){let d=Dh(l).resolveInner(r,-1),b=f.reduce((p,v)=>Math.max(p,v.length),0);for(let p=0;p<5;p++){let v=l.sliceDoc(d.from,Math.min(d.to,d.from+o.length+b)),O=v.indexOf(o);if(!O||O>-1&&f.indexOf(v.slice(0,O))>-1){let T=d.firstChild;for(;T&&T.from==d.from&&T.to-T.from>o.length+O;){if(l.sliceDoc(T.to-o.length,T.to)==o)return!1;T=T.firstChild}return!0}let C=d.to==r&&d.parent;if(!C)break;d=C}return!1}function sbt(l,r,o){let f=l.charCategorizer(r);if(f(l.sliceDoc(r-1,r))!=hl.Word)return r;for(let d of o){let b=r-d.length;if(l.sliceDoc(b,r)==d&&f(l.sliceDoc(b-1,b))!=hl.Word)return b}return-1}function D3t(l={}){return[_un,$d,Ph.of(l),Bun,ufn,T3t]}const $3t=[{key:"Ctrl-Space",run:nbt},{mac:"Alt-`",run:nbt},{key:"Escape",run:Nun},{key:"ArrowDown",run:MG(!0)},{key:"ArrowUp",run:MG(!1)},{key:"PageDown",run:MG(!0,"page")},{key:"PageUp",run:MG(!1,"page")},{key:"Enter",run:C3t}],ufn=qw.highest(sE.computeN([Ph],l=>l.facet(Ph).defaultKeymap?[$3t]:[]));function ffn(l){let r=l.field($d,!1);return r&&r.active.some(o=>o.isPending)?"pending":r&&r.active.some(o=>o.state!=0)?"active":null}class obt{constructor(r,o,f){this.from=r,this.to=o,this.diagnostic=f}}class Cx{constructor(r,o,f){this.diagnostics=r,this.panel=o,this.selected=f}static init(r,o,f){let d=f.facet(LR).markerFilter;d&&(r=d(r,f));let b=r.slice().sort((T,A)=>T.from-A.from||T.to-A.to),p=new W2,v=[],O=0;for(let T=0;;){let A=T==b.length?null:b[T];if(!A&&!v.length)break;let j,$;for(v.length?(j=O,$=v.reduce((z,Z)=>Math.min(z,Z.to),A&&A.from>j?A.from:1e8)):(j=A.from,$=A.to,v.push(A),T++);Tz.from||z.to==j))v.push(z),T++,$=Math.min(z.to,$);else{$=Math.min(z.from,$);break}}let L=Sfn(v);if(v.some(z=>z.from==z.to||z.from==z.to-1&&f.doc.lineAt(z.from).to==z.from))p.add(j,j,no.widget({widget:new vfn(L),diagnostics:v.slice()}));else{let z=v.reduce((Z,Y)=>Y.markClass?Z+" "+Y.markClass:Z,"");p.add(j,$,no.mark({class:"cm-lintRange cm-lintRange-"+L+z,diagnostics:v.slice(),inclusiveEnd:v.some(Z=>Z.to>$)}))}O=$;for(let z=0;z{if(!(r&&p.diagnostics.indexOf(r)<0))if(!f)f=new obt(d,b,r||p.diagnostics[0]);else{if(p.diagnostics.indexOf(f.diagnostic)<0)return!1;f=new obt(f.from,b,f.diagnostic)}}),f}function hfn(l,r){let o=r.pos,f=r.end||o,d=l.state.facet(LR).hideOn(l,o,f);if(d!=null)return d;let b=l.startState.doc.lineAt(r.pos);return!!(l.effects.some(p=>p.is(N3t))||l.changes.touchesRange(b.from,Math.max(b.to,f)))}function afn(l,r){return l.field(l0,!1)?r:r.concat(ar.appendConfig.of(xfn))}const N3t=ar.define(),nke=ar.define(),I3t=ar.define(),l0=Sf.define({create(){return new Cx(no.none,null,null)},update(l,r){if(r.docChanged&&l.diagnostics.size){let o=l.diagnostics.map(r.changes),f=null,d=l.panel;if(l.selected){let b=r.changes.mapPos(l.selected.from,1);f=tE(o,l.selected.diagnostic,b)||tE(o,null,b)}!o.size&&d&&r.state.facet(LR).autoPanel&&(d=null),l=new Cx(o,d,f)}for(let o of r.effects)if(o.is(N3t)){let f=r.state.facet(LR).autoPanel?o.value.length?BR.open:null:l.panel;l=Cx.init(o.value,f,r.state)}else o.is(nke)?l=new Cx(l.diagnostics,o.value?BR.open:null,l.selected):o.is(I3t)&&(l=new Cx(l.diagnostics,l.panel,o.value));return l},provide:l=>[DR.from(l,r=>r.panel),Tr.decorations.from(l,r=>r.diagnostics)]}),dfn=no.mark({class:"cm-lintRange cm-lintRange-active"});function gfn(l,r,o){let{diagnostics:f}=l.state.field(l0),d,b=-1,p=-1;f.between(r-(o<0?1:0),r+(o>0?1:0),(O,C,{spec:T})=>{if(r>=O&&r<=C&&(O==C||(r>O||o>0)&&(rL3t(l,o,!1)))}const bfn=l=>{let r=l.state.field(l0,!1);(!r||!r.panel)&&l.dispatch({effects:afn(l.state,[nke.of(!0)])});let o=jR(l,BR.open);return o&&o.dom.querySelector(".cm-panel-lint ul").focus(),!0},cbt=l=>{let r=l.state.field(l0,!1);return!r||!r.panel?!1:(l.dispatch({effects:nke.of(!1)}),!0)},wfn=l=>{let r=l.state.field(l0,!1);if(!r)return!1;let o=l.state.selection.main,f=r.diagnostics.iter(o.to+1);return!f.value&&(f=r.diagnostics.iter(0),!f.value||f.from==o.from&&f.to==o.to)?!1:(l.dispatch({selection:{anchor:f.from,head:f.to},scrollIntoView:!0}),!0)},mfn=[{key:"Mod-Shift-m",run:bfn,preventDefault:!0},{key:"F8",run:wfn}],LR=pn.define({combine(l){return Object.assign({sources:l.map(r=>r.source).filter(r=>r!=null)},U2(l.map(r=>r.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(r,o)=>r?o?f=>r(f)||o(f):r:o}))}});function R3t(l){let r=[];if(l)e:for(let{name:o}of l){for(let f=0;fb.toLowerCase()==d.toLowerCase())){r.push(d);continue e}}r.push("")}return r}function L3t(l,r,o){var f;let d=o?R3t(r.actions):[];return Lc("li",{class:"cm-diagnostic cm-diagnostic-"+r.severity},Lc("span",{class:"cm-diagnosticText"},r.renderMessage?r.renderMessage(l):r.message),(f=r.actions)===null||f===void 0?void 0:f.map((b,p)=>{let v=!1,O=j=>{if(j.preventDefault(),v)return;v=!0;let $=tE(l.state.field(l0).diagnostics,r);$&&b.apply(l,$.from,$.to)},{name:C}=b,T=d[p]?C.indexOf(d[p]):-1,A=T<0?C:[C.slice(0,T),Lc("u",C.slice(T,T+1)),C.slice(T+1)];return Lc("button",{type:"button",class:"cm-diagnosticAction",onclick:O,onmousedown:O,"aria-label":` Action: ${C}${T<0?"":` (access key "${d[p]})"`}.`},A)}),r.source&&Lc("div",{class:"cm-diagnosticSource"},r.source))}class vfn extends gZ{constructor(r){super(),this.sev=r}eq(r){return r.sev==this.sev}toDOM(){return Lc("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class lbt{constructor(r,o){this.diagnostic=o,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=L3t(r,o,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class BR{constructor(r){this.view=r,this.items=[];let o=d=>{if(d.keyCode==27)cbt(this.view),this.view.focus();else if(d.keyCode==38||d.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(d.keyCode==40||d.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(d.keyCode==36)this.moveSelection(0);else if(d.keyCode==35)this.moveSelection(this.items.length-1);else if(d.keyCode==13)this.view.focus();else if(d.keyCode>=65&&d.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:b}=this.items[this.selectedIndex],p=R3t(b.actions);for(let v=0;v{for(let b=0;bcbt(this.view)},"×")),this.update()}get selectedIndex(){let r=this.view.state.field(l0).selected;if(!r)return-1;for(let o=0;o{for(let T of C.diagnostics){if(p.has(T))continue;p.add(T);let A=-1,j;for(let $=f;$f&&(this.items.splice(f,A-f),d=!0)),o&&j.diagnostic==o.diagnostic?j.dom.hasAttribute("aria-selected")||(j.dom.setAttribute("aria-selected","true"),b=j):j.dom.hasAttribute("aria-selected")&&j.dom.removeAttribute("aria-selected"),f++}});f({sel:b.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:v,panel:O})=>{let C=O.height/this.list.offsetHeight;v.topO.bottom&&(this.list.scrollTop+=(v.bottom-O.bottom)/C)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),d&&this.sync()}sync(){let r=this.list.firstChild;function o(){let f=r;r=f.nextSibling,f.remove()}for(let f of this.items)if(f.dom.parentNode==this.list){for(;r!=f.dom;)o();r=f.dom.nextSibling}else this.list.insertBefore(f.dom,r);for(;r;)o()}moveSelection(r){if(this.selectedIndex<0)return;let o=this.view.state.field(l0),f=tE(o.diagnostics,this.items[r].diagnostic);f&&this.view.dispatch({selection:{anchor:f.from,head:f.to},scrollIntoView:!0,effects:I3t.of(f)})}static open(r){return new BR(r)}}function yfn(l,r='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(l)}')`}function PG(l){return yfn(``,'width="6" height="3"')}const Ofn=Tr.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:PG("#d11")},".cm-lintRange-warning":{backgroundImage:PG("orange")},".cm-lintRange-info":{backgroundImage:PG("#999")},".cm-lintRange-hint":{backgroundImage:PG("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function kfn(l){return l=="error"?4:l=="warning"?3:l=="info"?2:1}function Sfn(l){let r="hint",o=1;for(let f of l){let d=kfn(f.severity);d>o&&(o=d,r=f.severity)}return r}const xfn=[l0,Tr.decorations.compute([l0],l=>{let{selected:r,panel:o}=l.field(l0);return!r||!o||r.from==r.to?no.none:no.set([dfn.range(r.from,r.to)])}),Hln(gfn,{hideOn:hfn}),Ofn];var ubt=function(r){r===void 0&&(r={});var{crosshairCursor:o=!1}=r,f=[];r.closeBracketsKeymap!==!1&&(f=f.concat(nfn)),r.defaultKeymap!==!1&&(f=f.concat(lyt)),r.searchKeymap!==!1&&(f=f.concat(dun)),r.historyKeymap!==!1&&(f=f.concat(Rvt)),r.foldKeymap!==!1&&(f=f.concat(msn)),r.completionKeymap!==!1&&(f=f.concat($3t)),r.lintKeymap!==!1&&(f=f.concat(mfn));var d=[];return r.lineNumbers!==!1&&d.push(jrn()),r.highlightActiveLineGutter!==!1&&d.push(Nrn()),r.highlightSpecialChars!==!1&&d.push(Uin()),r.history!==!1&&d.push(Jsn()),r.foldGutter!==!1&&d.push(ksn()),r.drawSelection!==!1&&d.push(Bin()),r.dropCursor!==!1&&d.push(Qin()),r.allowMultipleSelections!==!1&&d.push(Zr.allowMultipleSelections.of(!0)),r.indentOnInput!==!1&&d.push(lsn()),r.syntaxHighlighting!==!1&&d.push(yvt(Tsn,{fallback:!0})),r.bracketMatching!==!1&&d.push($sn()),r.closeBrackets!==!1&&d.push(Zun()),r.autocompletion!==!1&&d.push(D3t()),r.rectangularSelection!==!1&&d.push(urn()),o!==!1&&d.push(arn()),r.highlightActiveLine!==!1&&d.push(trn()),r.highlightSelectionMatches!==!1&&d.push(Xln()),r.tabSize&&typeof r.tabSize=="number"&&d.push(VR.of(" ".repeat(r.tabSize))),d.concat([sE.of(f.flat())]).filter(Boolean)},Ave;const tR=new ls,Cfn=new ls;class H2{constructor(r,o,f=[],d=""){this.data=r,this.name=d,Zr.prototype.hasOwnProperty("tree")||Object.defineProperty(Zr.prototype,"tree",{get(){return FR(this)}}),this.parser=o,this.extension=[iE.of(this),Zr.languageData.of((b,p,v)=>{let O=fbt(b,p,v),C=O.type.prop(tR);if(!C)return[];let T=b.facet(C),A=O.type.prop(Cfn);if(A){let j=O.resolve(p-O.from,v);for(let $ of A)if($.test(j,b)){let L=b.facet($.facet);return $.type=="replace"?L:L.concat(T)}}return T})].concat(f)}isActiveAt(r,o,f=-1){return fbt(r,o,f).type.prop(tR)==this.data}findRegions(r){let o=r.facet(iE);if((o==null?void 0:o.data)==this.data)return[{from:0,to:r.doc.length}];if(!o||!o.allowsNesting)return[];let f=[],d=(b,p)=>{if(b.prop(tR)==this.data){f.push({from:p,to:p+b.length});return}let v=b.prop(ls.mounted);if(v){if(v.tree.prop(tR)==this.data){if(v.overlay)for(let O of v.overlay)f.push({from:O.from+p,to:O.to+p});else f.push({from:p,to:p+b.length});return}else if(v.overlay){let O=f.length;if(d(v.tree,v.overlay[0].from+p),f.length>O)return}}for(let O=0;O=this.cursorPos?this.doc.sliceString(r,o):this.string.slice(r-f,o-f)}}let qI=null;class _Y{constructor(r,o,f=[],d,b,p,v,O){this.parser=r,this.state=o,this.fragments=f,this.tree=d,this.treeLen=b,this.viewport=p,this.skipped=v,this.scheduleOn=O,this.parse=null,this.tempSkipped=[]}static create(r,o,f){return new _Y(r,o,[],yo.empty,0,f,[],null)}startParse(){return this.parser.startParse(new Tfn(this.state.doc),this.fragments)}work(r,o){return o!=null&&o>=this.state.doc.length&&(o=void 0),this.tree!=yo.empty&&this.isDone(o??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var f;if(typeof r=="number"){let d=Date.now()+r;r=()=>Date.now()>d}for(this.parse||(this.parse=this.startParse()),o!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>o)&&o=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>r)&&this.parse.stopAt(r),this.withContext(()=>{for(;!(o=this.parse.advance()););}),this.treeLen=r,this.tree=o,this.fragments=this.withoutTempSkipped(Lw.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(r){let o=qI;qI=this;try{return r()}finally{qI=o}}withoutTempSkipped(r){for(let o;o=this.tempSkipped.pop();)r=hbt(r,o.from,o.to);return r}changes(r,o){let{fragments:f,tree:d,treeLen:b,viewport:p,skipped:v}=this;if(this.takeTree(),!r.empty){let O=[];if(r.iterChangedRanges((C,T,A,j)=>O.push({fromA:C,toA:T,fromB:A,toB:j})),f=Lw.applyChanges(f,O),d=yo.empty,b=0,p={from:r.mapPos(p.from,-1),to:r.mapPos(p.to,1)},this.skipped.length){v=[];for(let C of this.skipped){let T=r.mapPos(C.from,1),A=r.mapPos(C.to,-1);Tr.from&&(this.fragments=hbt(this.fragments,d,b),this.skipped.splice(f--,1))}return this.skipped.length>=o?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(r,o){this.skipped.push({from:r,to:o})}static getSkippingParser(r){return new class extends iZ{createParse(o,f,d){let b=d[0].from,p=d[d.length-1].to;return{parsedPos:b,advance(){let O=qI;if(O){for(let C of d)O.tempSkipped.push(C);r&&(O.scheduleOn=O.scheduleOn?Promise.all([O.scheduleOn,r]):r)}return this.parsedPos=p,new yo(jh.none,[],[],p-b)},stoppedAt:null,stopAt(){}}}}}isDone(r){r=Math.min(r,this.state.doc.length);let o=this.fragments;return this.treeLen>=r&&o.length&&o[0].from==0&&o[0].to>=r}static get(){return qI}}function hbt(l,r,o){return Lw.applyChanges(l,[{fromA:r,toA:o,fromB:r,toB:o}])}class nE{constructor(r){this.context=r,this.tree=r.tree}apply(r){if(!r.docChanged&&this.tree==this.context.tree)return this;let o=this.context.changes(r.changes,r.state),f=this.context.treeLen==r.startState.doc.length?void 0:Math.max(r.changes.mapPos(this.context.treeLen),o.viewport.to);return o.work(20,f)||o.takeTree(),new nE(o)}static init(r){let o=Math.min(3e3,r.doc.length),f=_Y.create(r.facet(iE).parser,r,{from:0,to:o});return f.work(20,o)||f.takeTree(),new nE(f)}}H2.state=Sf.define({create:nE.init,update(l,r){for(let o of r.effects)if(o.is(H2.setState))return o.value;return r.startState.facet(iE)!=r.state.facet(iE)?nE.init(r.state):l.apply(r)}});let B3t=l=>{let r=setTimeout(()=>l(),500);return()=>clearTimeout(r)};typeof requestIdleCallback<"u"&&(B3t=l=>{let r=-1,o=setTimeout(()=>{r=requestIdleCallback(l,{timeout:400})},100);return()=>r<0?clearTimeout(o):cancelIdleCallback(r)});const Mve=typeof navigator<"u"&&(!((Ave=navigator.scheduling)===null||Ave===void 0)&&Ave.isInputPending)?()=>navigator.scheduling.isInputPending():null,Efn=Up.fromClass(class{constructor(r){this.view=r,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(r){let o=this.view.state.field(H2.state).context;(o.updateViewport(r.view.viewport)||this.view.viewport.to>o.treeLen)&&this.scheduleWork(),(r.docChanged||r.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(o)}scheduleWork(){if(this.working)return;let{state:r}=this.view,o=r.field(H2.state);(o.tree!=o.context.tree||!o.context.isDone(r.doc.length))&&(this.working=B3t(this.work))}work(r){this.working=null;let o=Date.now();if(this.chunkEndd+1e3,O=b.context.work(()=>Mve&&Mve()||Date.now()>p,d+(v?0:1e5));this.chunkBudget-=Date.now()-o,(O||this.chunkBudget<=0)&&(b.context.takeTree(),this.view.dispatch({effects:H2.setState.of(new nE(b.context))})),this.chunkBudget>0&&!(O&&!v)&&this.scheduleWork(),this.checkAsyncSchedule(b.context)}checkAsyncSchedule(r){r.scheduleOn&&(this.workScheduled++,r.scheduleOn.then(()=>this.scheduleWork()).catch(o=>Iw(this.view.state,o)).then(()=>this.workScheduled--),r.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),iE=pn.define({combine(l){return l.length?l[0]:null},enables:l=>[H2.state,Efn,Tr.contentAttributes.compute([l],r=>{let o=r.facet(l);return o&&o.name?{"data-language":o.name}:{}})]});class vZ{constructor(r,o){this.specs=r;let f;function d(v){let O=qa.newName();return(f||(f=Object.create(null)))["."+O]=v,O}const b=typeof o.all=="string"?o.all:o.all?d(o.all):void 0,p=o.scope;this.scope=p instanceof H2?v=>v.prop(tR)==p.data:p?v=>v==p:void 0,this.style=COe(r.map(v=>({tag:v.tag,class:v.class||d(Object.assign({},v,{tag:null}))})),{all:b}).style,this.module=f?new qa(f):null,this.themeType=o.themeType}static define(r,o){return new vZ(r,o||{})}}const R3e=pn.define(),Afn=pn.define({combine(l){return l.length?[l[0]]:null}});function Pve(l){let r=l.facet(R3e);return r.length?r:l.facet(Afn)}function Mfn(l,r){let o=[jfn],f;return l instanceof vZ&&(l.module&&o.push(Tr.styleModule.of(l.module)),f=l.themeType),f?o.push(R3e.computeN([Tr.darkTheme],d=>d.facet(Tr.darkTheme)==(f=="dark")?[l]:[])):o.push(R3e.of(l)),o}class Pfn{constructor(r){this.markCache=Object.create(null),this.tree=FR(r.state),this.decorations=this.buildDeco(r,Pve(r.state)),this.decoratedTo=r.viewport.to}update(r){let o=FR(r.state),f=Pve(r.state),d=f!=Pve(r.startState),{viewport:b}=r.view,p=r.changes.mapPos(this.decoratedTo,1);o.length=b.to?(this.decorations=this.decorations.map(r.changes),this.decoratedTo=p):(o!=this.tree||r.viewportChanged||d)&&(this.tree=o,this.decorations=this.buildDeco(r.view,f),this.decoratedTo=b.to)}buildDeco(r,o){if(!o||!this.tree.length)return no.none;let f=new W2;for(let{from:d,to:b}of r.visibleRanges)svt(this.tree,o,(p,v,O)=>{f.add(p,v,this.markCache[O]||(this.markCache[O]=no.mark({class:O})))},d,b);return f.finish()}}const jfn=qw.high(Up.fromClass(Pfn,{decorations:l=>l.decorations})),Dfn=Object.create(null),abt=[jh.none],dbt=[],gbt=Object.create(null),$fn=Object.create(null);for(let[l,r]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])$fn[l]=Nfn(Dfn,r);function jve(l,r){dbt.indexOf(l)>-1||(dbt.push(l),console.warn(r))}function Nfn(l,r){let o=[];for(let v of r.split(" ")){let O=[];for(let C of v.split(".")){let T=l[C]||K[C];T?typeof T=="function"?O.length?O=O.map(T):jve(C,`Modifier ${C} used at start of tag`):O.length?jve(C,`Tag ${C} used as modifier`):O=Array.isArray(T)?T:[T]:jve(C,`Unknown highlighting tag ${C}`)}for(let C of O)o.push(C)}if(!o.length)return 0;let f=r.replace(/ /g,"_"),d=f+" "+o.map(v=>v.id),b=gbt[d];if(b)return b.id;let p=gbt[d]=jh.define({id:abt.length,name:f,props:[rZ({[f]:o})]});return abt.push(p),p.id}nh.RTL,nh.LTR;const Ifn="#e5c07b",pbt="#e06c75",Rfn="#56b6c2",Lfn="#ffffff",eY="#abb2bf",L3e="#7d8799",Bfn="#61afef",Ffn="#98c379",bbt="#d19a66",_fn="#c678dd",Hfn="#21252b",wbt="#2c313a",mbt="#282c34",Dve="#353a42",qfn="#3E4451",vbt="#528bff",Qfn=Tr.theme({"&":{color:eY,backgroundColor:mbt},".cm-content":{caretColor:vbt},".cm-cursor, .cm-dropCursor":{borderLeftColor:vbt},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:qfn},".cm-panels":{backgroundColor:Hfn,color:eY},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:mbt,color:L3e,border:"none"},".cm-activeLineGutter":{backgroundColor:wbt},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Dve},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Dve,borderBottomColor:Dve},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:wbt,color:eY}}},{dark:!0}),zfn=vZ.define([{tag:K.keyword,color:_fn},{tag:[K.name,K.deleted,K.character,K.propertyName,K.macroName],color:pbt},{tag:[K.function(K.variableName),K.labelName],color:Bfn},{tag:[K.color,K.constant(K.name),K.standard(K.name)],color:bbt},{tag:[K.definition(K.name),K.separator],color:eY},{tag:[K.typeName,K.className,K.number,K.changed,K.annotation,K.modifier,K.self,K.namespace],color:Ifn},{tag:[K.operator,K.operatorKeyword,K.url,K.escape,K.regexp,K.link,K.special(K.string)],color:Rfn},{tag:[K.meta,K.comment],color:L3e},{tag:K.strong,fontWeight:"bold"},{tag:K.emphasis,fontStyle:"italic"},{tag:K.strikethrough,textDecoration:"line-through"},{tag:K.link,color:L3e,textDecoration:"underline"},{tag:K.heading,fontWeight:"bold",color:pbt},{tag:[K.atom,K.bool,K.special(K.variableName)],color:bbt},{tag:[K.processingInstruction,K.string,K.inserted],color:Ffn},{tag:K.invalid,color:Lfn}]),Wfn=[Qfn,Mfn(zfn)];var Kfn=Mi.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Vfn=function(r){r===void 0&&(r={});var{indentWithTab:o=!0,editable:f=!0,readOnly:d=!1,theme:b="light",placeholder:p="",basicSetup:v=!0}=r,O=[];switch(o&&O.unshift(sE.of([Zon])),v&&(typeof v=="boolean"?O.unshift(ubt()):O.unshift(ubt(v))),p&&O.unshift(srn(p)),b){case"light":O.push(Kfn);break;case"dark":O.push(Wfn);break;case"none":break;default:O.push(b);break}return f===!1&&O.push(Mi.editable.of(!1)),d&&O.push(Zr.readOnly.of(!0)),[...O]},Xfn=l=>({line:l.state.doc.lineAt(l.state.selection.main.from),lineCount:l.state.doc.lines,lineBreak:l.state.lineBreak,length:l.state.doc.length,readOnly:l.state.readOnly,tabSize:l.state.tabSize,selection:l.state.selection,selectionAsSingle:l.state.selection.asSingle().main,ranges:l.state.selection.ranges,selectionCode:l.state.sliceDoc(l.state.selection.main.from,l.state.selection.main.to),selections:l.state.selection.ranges.map(r=>l.state.sliceDoc(r.from,r.to)),selectedText:l.state.selection.ranges.some(r=>!r.empty)});class Ufn{constructor(r,o){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=o,this.timeoutMS=o,this.callbacks.push(r)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var r=this.callbacks.slice();this.callbacks.length=0,r.forEach(o=>{try{o()}catch(f){console.error("TimeoutLatch callback error:",f)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class ybt{constructor(){this.interval=null,this.latches=new Set}add(r){this.latches.add(r),this.start()}remove(r){this.latches.delete(r),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(r=>{r.tick(),r.isDone&&this.remove(r)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var $ve=null,Gfn=()=>typeof window>"u"?new ybt:($ve||($ve=new ybt),$ve),Obt=Qw.define(),Yfn=200,Zfn=[];function Jfn(l){var{value:r,selection:o,onChange:f,onStatistics:d,onCreateEditor:b,onUpdate:p,extensions:v=Zfn,autoFocus:O,theme:C="light",height:T=null,minHeight:A=null,maxHeight:j=null,width:$=null,minWidth:L=null,maxWidth:z=null,placeholder:Z="",editable:Y=!0,readOnly:ne=!1,indentWithTab:he=!0,basicSetup:se=!0,root:ve,initialState:Ce}=l,[Ie,nt]=Ne.useState(),[Re,ft]=Ne.useState(),[st,at]=Ne.useState(),ut=Ne.useState(()=>({current:null}))[0],le=Ne.useState(()=>({current:null}))[0],Ze=Mi.theme({"&":{height:T,minHeight:A,maxHeight:j,width:$,minWidth:L,maxWidth:z},"& .cm-scroller":{height:"100% !important"}}),it=Mi.updateListener.of(Je=>{if(Je.docChanged&&typeof f=="function"&&!Je.transactions.some(Ut=>Ut.annotation(Obt))){ut.current?ut.current.reset():(ut.current=new Ufn(()=>{if(le.current){var Ut=le.current;le.current=null,Ut()}ut.current=null},Yfn),Gfn().add(ut.current));var Nt=Je.state.doc,Kt=Nt.toString();f(Kt,Je)}d&&d(Xfn(Je))}),Tt=Vfn({theme:C,editable:Y,readOnly:ne,placeholder:Z,indentWithTab:he,basicSetup:se}),X=[it,Ze,...Tt];return p&&typeof p=="function"&&X.push(Mi.updateListener.of(p)),X=X.concat(v),Ne.useLayoutEffect(()=>{if(Ie&&!st){var Je={doc:r,selection:o,extensions:X},Nt=Ce?Zr.fromJSON(Ce.json,Je,Ce.fields):Zr.create(Je);if(at(Nt),!Re){var Kt=new Mi({state:Nt,parent:Ie,root:ve});ft(Kt),b&&b(Kt,Nt)}}return()=>{Re&&(at(void 0),ft(void 0))}},[Ie,st]),Ne.useEffect(()=>{l.container&&nt(l.container)},[l.container]),Ne.useEffect(()=>()=>{Re&&(Re.destroy(),ft(void 0)),ut.current&&(ut.current.cancel(),ut.current=null)},[Re]),Ne.useEffect(()=>{O&&Re&&Re.focus()},[O,Re]),Ne.useEffect(()=>{Re&&Re.dispatch({effects:ar.reconfigure.of(X)})},[C,v,T,A,j,$,L,z,Z,Y,ne,he,se,f,p]),Ne.useEffect(()=>{if(r!==void 0){var Je=Re?Re.state.doc.toString():"";if(Re&&r!==Je){var Nt=ut.current&&!ut.current.isDone,Kt=()=>{Re&&r!==Re.state.doc.toString()&&Re.dispatch({changes:{from:0,to:Re.state.doc.toString().length,insert:r||""},annotations:[Obt.of(!0)]})};Nt?le.current=Kt:Kt()}}},[r,Re]),{state:st,setState:at,view:Re,setView:ft,container:Ie,setContainer:nt}}var ehn=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],F3t=Ne.forwardRef((l,r)=>{var{className:o,value:f="",selection:d,extensions:b=[],onChange:p,onStatistics:v,onCreateEditor:O,onUpdate:C,autoFocus:T,theme:A="light",height:j,minHeight:$,maxHeight:L,width:z,minWidth:Z,maxWidth:Y,basicSetup:ne,placeholder:he,indentWithTab:se,editable:ve,readOnly:Ce,root:Ie,initialState:nt}=l,Re=jtn(l,ehn),ft=Ne.useRef(null),{state:st,view:at,container:ut,setContainer:le}=Jfn({root:Ie,value:f,autoFocus:T,theme:A,height:j,minHeight:$,maxHeight:L,width:z,minWidth:Z,maxWidth:Y,basicSetup:ne,placeholder:he,indentWithTab:se,editable:ve,readOnly:Ce,selection:d,onChange:p,onStatistics:v,onCreateEditor:O,onUpdate:C,extensions:b,initialState:nt});Ne.useImperativeHandle(r,()=>({editor:ft.current,state:st,view:at}),[ft,ut,st,at]);var Ze=Ne.useCallback(Tt=>{ft.current=Tt,le(Tt)},[le]);if(typeof f!="string")throw new Error("value must be typeof string but got "+typeof f);var it=typeof A=="string"?"cm-theme-"+A:"cm-theme";return Ci.jsx("div",hye({ref:Ze,className:""+it+(o?" "+o:"")},Re))});F3t.displayName="CodeMirror";const Wa=({variant:l,settings:r,styles:o})=>{const f=Mi.theme({"&":{backgroundColor:r.background,color:r.foreground},".cm-content":{caretColor:r.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:r.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:r.selection},".cm-activeLine":{backgroundColor:r.lineHighlight},".cm-gutters":{backgroundColor:r.gutterBackground,color:r.gutterForeground},".cm-activeLineGutter":{backgroundColor:r.lineHighlight}},{dark:l==="dark"}),d=MOe.define(o);return[f,yvt(d)]};Wa({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:K.comment,color:"#404080"},{tag:[K.string,K.regexp],color:"#999999"},{tag:K.number,color:"#7090B0"},{tag:[K.bool,K.null],color:"#8080A0"},{tag:[K.punctuation,K.derefOperator],color:"#805080"},{tag:K.keyword,color:"#60B0FF"},{tag:K.definitionKeyword,color:"#B0FFF0"},{tag:K.moduleKeyword,color:"#60B0FF"},{tag:K.operator,color:"#A0A0FF"},{tag:[K.variableName,K.self],color:"#008080"},{tag:K.operatorKeyword,color:"#A0A0FF"},{tag:K.controlKeyword,color:"#80A0FF"},{tag:K.className,color:"#70E080"},{tag:[K.function(K.propertyName),K.propertyName],color:"#50A0A0"},{tag:K.tagName,color:"#009090"},{tag:K.modifier,color:"#B0FFF0"},{tag:[K.squareBracket,K.attributeName],color:"#D0D0FF"}]});Wa({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:K.comment,color:"#787b8099"},{tag:K.string,color:"#86b300"},{tag:K.regexp,color:"#4cbf99"},{tag:[K.number,K.bool,K.null],color:"#ffaa33"},{tag:K.variableName,color:"#5c6166"},{tag:[K.definitionKeyword,K.modifier],color:"#fa8d3e"},{tag:[K.keyword,K.special(K.brace)],color:"#fa8d3e"},{tag:K.operator,color:"#ed9366"},{tag:K.separator,color:"#5c6166b3"},{tag:K.punctuation,color:"#5c6166"},{tag:[K.definition(K.propertyName),K.function(K.variableName)],color:"#f2ae49"},{tag:[K.className,K.definition(K.typeName)],color:"#22a4e6"},{tag:[K.tagName,K.typeName,K.self,K.labelName],color:"#55b4d4"},{tag:K.angleBracket,color:"#55b4d480"},{tag:K.attributeName,color:"#f2ae49"}]});Wa({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:K.comment,color:"#6E6E6E"},{tag:[K.string,K.regexp,K.special(K.brace)],color:"#5C81B3"},{tag:K.number,color:"#C1E1B8"},{tag:K.bool,color:"#53667D"},{tag:[K.definitionKeyword,K.modifier,K.function(K.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[K.keyword,K.moduleKeyword,K.operatorKeyword,K.operator],color:"#697A8E",fontWeight:"bold"},{tag:[K.variableName,K.attributeName],color:"#708E67"},{tag:[K.function(K.variableName),K.definition(K.propertyName),K.derefOperator],color:"#fff"},{tag:K.tagName,color:"#A3D295"}]});Wa({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:K.comment,color:"#666666"},{tag:[K.string,K.special(K.brace)],color:"#54BE0D"},{tag:K.regexp,color:"#E9C062"},{tag:K.number,color:"#CF6A4C"},{tag:[K.keyword,K.operator],color:"#5EA6EA"},{tag:K.variableName,color:"#7587A6"},{tag:[K.definitionKeyword,K.modifier],color:"#F9EE98"},{tag:[K.propertyName,K.function(K.variableName)],color:"#937121"},{tag:[K.typeName,K.angleBracket,K.tagName],color:"#9B859D"}]});Wa({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:K.comment,color:"#6B4E32"},{tag:[K.keyword,K.operator,K.derefOperator],color:"#EF5D32"},{tag:K.className,color:"#EFAC32",fontWeight:"bold"},{tag:[K.typeName,K.propertyName,K.function(K.variableName),K.definition(K.variableName)],color:"#EFAC32"},{tag:K.definition(K.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:K.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[K.number,K.bool],color:"#6C99BB"},{tag:[K.variableName,K.self],color:"#7DAF9C"},{tag:[K.string,K.special(K.brace),K.regexp],color:"#D9D762"},{tag:[K.angleBracket,K.tagName,K.attributeName],color:"#EFCB43"}]});Wa({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:K.comment,color:"#404040"},{tag:[K.string,K.special(K.brace),K.regexp],color:"#00D8FF"},{tag:K.number,color:"#E62286"},{tag:[K.variableName,K.attributeName,K.self],color:"#E62286",fontWeight:"bold"},{tag:K.function(K.variableName),color:"#fff",fontWeight:"bold"}]});Wa({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:K.comment,color:"#BCC8BA"},{tag:[K.string,K.special(K.brace),K.regexp],color:"#5D90CD"},{tag:[K.number,K.bool,K.null],color:"#46A609"},{tag:K.keyword,color:"#AF956F"},{tag:[K.definitionKeyword,K.modifier],color:"#C52727"},{tag:[K.angleBracket,K.tagName,K.attributeName],color:"#606060"},{tag:K.self,color:"#000"}]});Wa({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:K.comment,color:"#0088FF"},{tag:K.string,color:"#3AD900"},{tag:K.regexp,color:"#80FFC2"},{tag:[K.number,K.bool,K.null],color:"#FF628C"},{tag:[K.definitionKeyword,K.modifier],color:"#FFEE80"},{tag:K.variableName,color:"#CCCCCC"},{tag:K.self,color:"#FF80E1"},{tag:[K.className,K.definition(K.propertyName),K.function(K.variableName),K.definition(K.typeName),K.labelName],color:"#FFDD00"},{tag:[K.keyword,K.operator],color:"#FF9D00"},{tag:[K.propertyName,K.typeName],color:"#80FFBB"},{tag:K.special(K.brace),color:"#EDEF7D"},{tag:K.attributeName,color:"#9EFFFF"},{tag:K.derefOperator,color:"#fff"}]});Wa({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:K.comment,color:"#AEAEAE"},{tag:[K.string,K.special(K.brace),K.regexp],color:"#8DFF8E"},{tag:[K.className,K.definition(K.propertyName),K.function(K.variableName),K.function(K.definition(K.variableName)),K.definition(K.typeName)],color:"#A3EBFF"},{tag:[K.number,K.bool,K.null],color:"#62E9BD"},{tag:[K.keyword,K.operator],color:"#2BF1DC"},{tag:[K.definitionKeyword,K.modifier],color:"#F8FBB1"},{tag:[K.variableName,K.self],color:"#B683CA"},{tag:[K.angleBracket,K.tagName,K.typeName,K.propertyName],color:"#60A4F1"},{tag:K.derefOperator,color:"#E0E0E0"},{tag:K.attributeName,color:"#7BACCA"}]});const thn=Wa({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:K.comment,color:"#6272a4"},{tag:[K.string,K.special(K.brace)],color:"#f1fa8c"},{tag:[K.number,K.self,K.bool,K.null],color:"#bd93f9"},{tag:[K.keyword,K.operator],color:"#ff79c6"},{tag:[K.definitionKeyword,K.typeName],color:"#8be9fd"},{tag:K.definition(K.typeName),color:"#f8f8f2"},{tag:[K.className,K.definition(K.propertyName),K.function(K.variableName),K.attributeName],color:"#50fa7b"}]});Wa({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:K.comment,color:"#AAAAAA"},{tag:[K.keyword,K.operator,K.typeName,K.tagName,K.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[K.attributeName,K.definition(K.propertyName)],color:"#4F9FD0"},{tag:[K.className,K.string,K.special(K.brace)],color:"#CF4F5F"},{tag:K.number,color:"#CF4F5F",fontWeight:"bold"},{tag:K.variableName,fontWeight:"bold"}]});Wa({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:K.comment,color:"#9995b7"},{tag:K.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[K.definitionKeyword,K.modifier],color:"#ff5792"},{tag:[K.className,K.tagName,K.definition(K.typeName)],color:"#0094f0"},{tag:[K.number,K.bool,K.null,K.special(K.brace)],color:"#5842ff"},{tag:[K.definition(K.propertyName),K.function(K.variableName)],color:"#0095a8"},{tag:K.typeName,color:"#b3694d"},{tag:[K.propertyName,K.variableName],color:"#fa8900"},{tag:K.operator,color:"#ff5792"},{tag:K.self,color:"#e64100"},{tag:[K.string,K.regexp],color:"#00b368"},{tag:[K.paren,K.bracket],color:"#0431fa"},{tag:K.labelName,color:"#00bdd6"},{tag:K.attributeName,color:"#e64100"},{tag:K.angleBracket,color:"#9995b7"}]});Wa({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:K.comment,color:"#9893a5"},{tag:[K.bool,K.null],color:"#286983"},{tag:K.number,color:"#d7827e"},{tag:K.className,color:"#d7827e"},{tag:[K.angleBracket,K.tagName,K.typeName],color:"#56949f"},{tag:K.attributeName,color:"#907aa9"},{tag:K.punctuation,color:"#797593"},{tag:[K.keyword,K.modifier],color:"#286983"},{tag:[K.string,K.regexp],color:"#ea9d34"},{tag:K.variableName,color:"#d7827e"}]});Wa({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:K.comment,color:"#CFCFCF"},{tag:[K.number,K.bool,K.null],color:"#E66C29"},{tag:[K.className,K.definition(K.propertyName),K.function(K.variableName),K.labelName,K.definition(K.typeName)],color:"#2EB43B"},{tag:K.keyword,color:"#D8B229"},{tag:K.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[K.definitionKeyword,K.modifier],color:"#925A47"},{tag:K.string,color:"#704D3D"},{tag:K.typeName,color:"#2F8996"},{tag:[K.variableName,K.propertyName],color:"#77ACB0"},{tag:K.self,color:"#77ACB0",fontWeight:"bold"},{tag:K.regexp,color:"#E3965E"},{tag:[K.tagName,K.angleBracket],color:"#BAA827"},{tag:K.attributeName,color:"#B06520"},{tag:K.derefOperator,color:"#000"}]});Wa({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:K.comment,color:"#93A1A1"},{tag:K.string,color:"#2AA198"},{tag:K.regexp,color:"#D30102"},{tag:K.number,color:"#D33682"},{tag:K.variableName,color:"#268BD2"},{tag:[K.keyword,K.operator,K.punctuation],color:"#859900"},{tag:[K.definitionKeyword,K.modifier],color:"#073642",fontWeight:"bold"},{tag:[K.className,K.self,K.definition(K.propertyName)],color:"#268BD2"},{tag:K.function(K.variableName),color:"#268BD2"},{tag:[K.bool,K.null],color:"#B58900"},{tag:K.tagName,color:"#268BD2",fontWeight:"bold"},{tag:K.angleBracket,color:"#93A1A1"},{tag:K.attributeName,color:"#93A1A1"},{tag:K.typeName,color:"#859900"}]});const nhn=Wa({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:K.comment,color:"#8E908C"},{tag:[K.variableName,K.self,K.propertyName,K.attributeName,K.regexp],color:"#C82829"},{tag:[K.number,K.bool,K.null],color:"#F5871F"},{tag:[K.className,K.typeName,K.definition(K.typeName)],color:"#C99E00"},{tag:[K.string,K.special(K.brace)],color:"#718C00"},{tag:K.operator,color:"#3E999F"},{tag:[K.definition(K.propertyName),K.function(K.variableName)],color:"#4271AE"},{tag:K.keyword,color:"#8959A8"},{tag:K.derefOperator,color:"#4D4D4C"}]});var kbt={};class HY{constructor(r,o,f,d,b,p,v,O,C,T=0,A){this.p=r,this.stack=o,this.state=f,this.reducePos=d,this.pos=b,this.score=p,this.buffer=v,this.bufferBase=O,this.curContext=C,this.lookAhead=T,this.parent=A}toString(){return`[${this.stack.filter((r,o)=>o%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(r,o,f=0){let d=r.parser.context;return new HY(r,[],o,f,f,0,[],0,d?new Sbt(d,d.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(r,o){this.stack.push(this.state,o,this.bufferBase+this.buffer.length),this.state=r}reduce(r){var o;let f=r>>19,d=r&65535,{parser:b}=this.p,p=this.reducePos=2e3&&!(!((o=this.p.parser.nodeSet.types[d])===null||o===void 0)&&o.isAnonymous)&&(C==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=T):this.p.lastBigReductionSizeO;)this.stack.pop();this.reduceContext(d,C)}storeNode(r,o,f,d=4,b=!1){if(r==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&p.buffer[v-4]==0&&p.buffer[v-1]>-1){if(o==f)return;if(p.buffer[v-2]>=o){p.buffer[v-2]=f;return}}}if(!b||this.pos==f)this.buffer.push(r,o,f,d);else{let p=this.buffer.length;if(p>0&&this.buffer[p-4]!=0){let v=!1;for(let O=p;O>0&&this.buffer[O-2]>f;O-=4)if(this.buffer[O-1]>=0){v=!0;break}if(v)for(;p>0&&this.buffer[p-2]>f;)this.buffer[p]=this.buffer[p-4],this.buffer[p+1]=this.buffer[p-3],this.buffer[p+2]=this.buffer[p-2],this.buffer[p+3]=this.buffer[p-1],p-=4,d>4&&(d-=4)}this.buffer[p]=r,this.buffer[p+1]=o,this.buffer[p+2]=f,this.buffer[p+3]=d}}shift(r,o,f,d){if(r&131072)this.pushState(r&65535,this.pos);else if((r&262144)==0){let b=r,{parser:p}=this.p;(d>this.pos||o<=p.maxNode)&&(this.pos=d,p.stateFlag(b,1)||(this.reducePos=d)),this.pushState(b,f),this.shiftContext(o,f),o<=p.maxNode&&this.buffer.push(o,f,d,4)}else this.pos=d,this.shiftContext(o,f),o<=this.p.parser.maxNode&&this.buffer.push(o,f,d,4)}apply(r,o,f,d){r&65536?this.reduce(r):this.shift(r,o,f,d)}useNode(r,o){let f=this.p.reused.length-1;(f<0||this.p.reused[f]!=r)&&(this.p.reused.push(r),f++);let d=this.pos;this.reducePos=this.pos=d+r.length,this.pushState(o,d),this.buffer.push(f,d,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,r,this,this.p.stream.reset(this.pos-r.length)))}split(){let r=this,o=r.buffer.length;for(;o>0&&r.buffer[o-2]>r.reducePos;)o-=4;let f=r.buffer.slice(o),d=r.bufferBase+o;for(;r&&d==r.bufferBase;)r=r.parent;return new HY(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,f,d,this.curContext,this.lookAhead,r)}recoverByDelete(r,o){let f=r<=this.p.parser.maxNode;f&&this.storeNode(r,this.pos,o,4),this.storeNode(0,this.pos,o,f?8:4),this.pos=this.reducePos=o,this.score-=190}canShift(r){for(let o=new ihn(this);;){let f=this.p.parser.stateSlot(o.state,4)||this.p.parser.hasAction(o.state,r);if(f==0)return!1;if((f&65536)==0)return!0;o.reduce(f)}}recoverByInsert(r){if(this.stack.length>=300)return[];let o=this.p.parser.nextStates(this.state);if(o.length>8||this.stack.length>=120){let d=[];for(let b=0,p;bO&1&&v==p)||d.push(o[b],p)}o=d}let f=[];for(let d=0;d>19,d=o&65535,b=this.stack.length-f*3;if(b<0||r.getGoto(this.stack[b],d,!1)<0){let p=this.findForcedReduction();if(p==null)return!1;o=p}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(o),!0}findForcedReduction(){let{parser:r}=this.p,o=[],f=(d,b)=>{if(!o.includes(d))return o.push(d),r.allActions(d,p=>{if(!(p&393216))if(p&65536){let v=(p>>19)-b;if(v>1){let O=p&65535,C=this.stack.length-v*3;if(C>=0&&r.getGoto(this.stack[C],O,!1)>=0)return v<<19|65536|O}}else{let v=f(p,b+1);if(v!=null)return v}})};return f(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:r}=this.p;return r.data[r.stateSlot(this.state,1)]==65535&&!r.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(r){if(this.state!=r.state||this.stack.length!=r.stack.length)return!1;for(let o=0;othis.lookAhead&&(this.emitLookAhead(),this.lookAhead=r)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Sbt{constructor(r,o){this.tracker=r,this.context=o,this.hash=r.strict?r.hash(o):0}}class ihn{constructor(r){this.start=r,this.state=r.state,this.stack=r.stack,this.base=this.stack.length}reduce(r){let o=r&65535,f=r>>19;f==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(f-1)*3;let d=this.start.p.parser.getGoto(this.stack[this.base-3],o,!0);this.state=d}}class qY{constructor(r,o,f){this.stack=r,this.pos=o,this.index=f,this.buffer=r.buffer,this.index==0&&this.maybeNext()}static create(r,o=r.bufferBase+r.buffer.length){return new qY(r,o,o-r.bufferBase)}maybeNext(){let r=this.stack.parent;r!=null&&(this.index=this.stack.bufferBase-r.bufferBase,this.stack=r,this.buffer=r.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new qY(this.stack,this.pos,this.index)}}function jG(l,r=Uint16Array){if(typeof l!="string")return l;let o=null;for(let f=0,d=0;f=92&&p--,p>=34&&p--;let O=p-32;if(O>=46&&(O-=46,v=!0),b+=O,v)break;b*=46}o?o[d++]=b:o=new r(b)}return o}class tY{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const xbt=new tY;class rhn{constructor(r,o){this.input=r,this.ranges=o,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=xbt,this.rangeIndex=0,this.pos=this.chunkPos=o[0].from,this.range=o[0],this.end=o[o.length-1].to,this.readNext()}resolveOffset(r,o){let f=this.range,d=this.rangeIndex,b=this.pos+r;for(;bf.to:b>=f.to;){if(d==this.ranges.length-1)return null;let p=this.ranges[++d];b+=p.from-f.to,f=p}return b}clipPos(r){if(r>=this.range.from&&rr)return Math.max(r,o.from);return this.end}peek(r){let o=this.chunkOff+r,f,d;if(o>=0&&o=this.chunk2Pos&&fv.to&&(this.chunk2=this.chunk2.slice(0,v.to-f)),d=this.chunk2.charCodeAt(0)}}return f>=this.token.lookAhead&&(this.token.lookAhead=f+1),d}acceptToken(r,o=0){let f=o?this.resolveOffset(o,-1):this.pos;if(f==null||f=this.chunk2Pos&&this.posthis.range.to?r.slice(0,this.range.to-this.pos):r,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(r=1){for(this.chunkOff+=r;this.pos+r>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();r-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=r,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(r,o){if(o?(this.token=o,o.start=r,o.lookAhead=r+1,o.value=o.extended=-1):this.token=xbt,this.pos!=r){if(this.pos=r,r==this.end)return this.setDone(),this;for(;r=this.range.to;)this.range=this.ranges[++this.rangeIndex];r>=this.chunkPos&&r=this.chunkPos&&o<=this.chunkPos+this.chunk.length)return this.chunk.slice(r-this.chunkPos,o-this.chunkPos);if(r>=this.chunk2Pos&&o<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(r-this.chunk2Pos,o-this.chunk2Pos);if(r>=this.range.from&&o<=this.range.to)return this.input.read(r,o);let f="";for(let d of this.ranges){if(d.from>=o)break;d.to>r&&(f+=this.input.read(Math.max(d.from,r),Math.min(d.to,o)))}return f}}class FT{constructor(r,o){this.data=r,this.id=o}token(r,o){let{parser:f}=o.p;shn(this.data,r,o,this.id,f.data,f.tokenPrecTable)}}FT.prototype.contextual=FT.prototype.fallback=FT.prototype.extend=!1;FT.prototype.fallback=FT.prototype.extend=!1;class tL{constructor(r,o={}){this.token=r,this.contextual=!!o.contextual,this.fallback=!!o.fallback,this.extend=!!o.extend}}function shn(l,r,o,f,d,b){let p=0,v=1<0){let L=l[$];if(O.allows(L)&&(r.token.value==-1||r.token.value==L||ohn(L,r.token.value,d,b))){r.acceptToken(L);break}}let T=r.next,A=0,j=l[p+2];if(r.next<0&&j>A&&l[C+j*3-3]==65535){p=l[C+j*3-1];continue e}for(;A>1,L=C+$+($<<1),z=l[L],Z=l[L+1]||65536;if(T=Z)A=$+1;else{p=l[L+2],r.advance();continue e}}break}}function Cbt(l,r,o){for(let f=r,d;(d=l[f])!=65535;f++)if(d==o)return f-r;return-1}function ohn(l,r,o,f){let d=Cbt(o,f,r);return d<0||Cbt(o,f,l)r)&&!f.type.isError)return o<0?Math.max(0,Math.min(f.to-1,r-25)):Math.min(l.length,Math.max(f.from+1,r+25));if(o<0?f.prevSibling():f.nextSibling())break;if(!f.parent())return o<0?0:l.length}}class chn{constructor(r,o){this.fragments=r,this.nodeSet=o,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let r=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(r){for(this.safeFrom=r.openStart?Tbt(r.tree,r.from+r.offset,1)-r.offset:r.from,this.safeTo=r.openEnd?Tbt(r.tree,r.to+r.offset,-1)-r.offset:r.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(r.tree),this.start.push(-r.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(r){if(rr)return this.nextStart=p,null;if(b instanceof yo){if(p==r){if(p=Math.max(this.safeFrom,r)&&(this.trees.push(b),this.start.push(p),this.index.push(0))}else this.index[o]++,this.nextStart=p+b.length}}}class lhn{constructor(r,o){this.stream=o,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=r.tokenizers.map(f=>new tY)}getActions(r){let o=0,f=null,{parser:d}=r.p,{tokenizers:b}=d,p=d.stateSlot(r.state,3),v=r.curContext?r.curContext.hash:0,O=0;for(let C=0;CA.end+25&&(O=Math.max(A.lookAhead,O)),A.value!=0)){let j=o;if(A.extended>-1&&(o=this.addActions(r,A.extended,A.end,o)),o=this.addActions(r,A.value,A.end,o),!T.extend&&(f=A,o>j))break}}for(;this.actions.length>o;)this.actions.pop();return O&&r.setLookAhead(O),!f&&r.pos==this.stream.end&&(f=new tY,f.value=r.p.parser.eofTerm,f.start=f.end=r.pos,o=this.addActions(r,f.value,f.end,o)),this.mainToken=f,this.actions}getMainToken(r){if(this.mainToken)return this.mainToken;let o=new tY,{pos:f,p:d}=r;return o.start=f,o.end=Math.min(f+1,d.stream.end),o.value=f==d.stream.end?d.parser.eofTerm:0,o}updateCachedToken(r,o,f){let d=this.stream.clipPos(f.pos);if(o.token(this.stream.reset(d,r),f),r.value>-1){let{parser:b}=f.p;for(let p=0;p=0&&f.p.parser.dialect.allows(v>>1)){(v&1)==0?r.value=v>>1:r.extended=v>>1;break}}}else r.value=0,r.end=this.stream.clipPos(d+1)}putAction(r,o,f,d){for(let b=0;br.bufferLength*4?new chn(f,r.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let r=this.stacks,o=this.minStackPos,f=this.stacks=[],d,b;if(this.bigReductionCount>300&&r.length==1){let[p]=r;for(;p.forceReduce()&&p.stack.length&&p.stack[p.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let p=0;po)f.push(v);else{if(this.advanceStack(v,f,r))continue;{d||(d=[],b=[]),d.push(v);let O=this.tokens.getMainToken(v);b.push(O.value,O.end)}}break}}if(!f.length){let p=d&&ahn(d);if(p)return s0&&console.log("Finish with "+this.stackID(p)),this.stackToTree(p);if(this.parser.strict)throw s0&&d&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+o);this.recovering||(this.recovering=5)}if(this.recovering&&d){let p=this.stoppedAt!=null&&d[0].pos>this.stoppedAt?d[0]:this.runRecovery(d,b,f);if(p)return s0&&console.log("Force-finish "+this.stackID(p)),this.stackToTree(p.forceAll())}if(this.recovering){let p=this.recovering==1?1:this.recovering*3;if(f.length>p)for(f.sort((v,O)=>O.score-v.score);f.length>p;)f.pop();f.some(v=>v.reducePos>o)&&this.recovering--}else if(f.length>1){e:for(let p=0;p500&&C.buffer.length>500)if((v.score-C.score||v.buffer.length-C.buffer.length)>0)f.splice(O--,1);else{f.splice(p--,1);continue e}}}f.length>12&&f.splice(12,f.length-12)}this.minStackPos=f[0].pos;for(let p=1;p ":"";if(this.stoppedAt!=null&&d>this.stoppedAt)return r.forceReduce()?r:null;if(this.fragments){let C=r.curContext&&r.curContext.tracker.strict,T=C?r.curContext.hash:0;for(let A=this.fragments.nodeAt(d);A;){let j=this.parser.nodeSet.types[A.type.id]==A.type?b.getGoto(r.state,A.type.id):-1;if(j>-1&&A.length&&(!C||(A.prop(ls.contextHash)||0)==T))return r.useNode(A,j),s0&&console.log(p+this.stackID(r)+` (via reuse of ${b.getName(A.type.id)})`),!0;if(!(A instanceof yo)||A.children.length==0||A.positions[0]>0)break;let $=A.children[0];if($ instanceof yo&&A.positions[0]==0)A=$;else break}}let v=b.stateSlot(r.state,4);if(v>0)return r.reduce(v),s0&&console.log(p+this.stackID(r)+` (via always-reduce ${b.getName(v&65535)})`),!0;if(r.stack.length>=8400)for(;r.stack.length>6e3&&r.forceReduce(););let O=this.tokens.getActions(r);for(let C=0;Cd?o.push(L):f.push(L)}return!1}advanceFully(r,o){let f=r.pos;for(;;){if(!this.advanceStack(r,null,null))return!1;if(r.pos>f)return Ebt(r,o),!0}}runRecovery(r,o,f){let d=null,b=!1;for(let p=0;p ":"";if(v.deadEnd&&(b||(b=!0,v.restart(),s0&&console.log(T+this.stackID(v)+" (restarted)"),this.advanceFully(v,f))))continue;let A=v.split(),j=T;for(let $=0;A.forceReduce()&&$<10&&(s0&&console.log(j+this.stackID(A)+" (via force-reduce)"),!this.advanceFully(A,f));$++)s0&&(j=this.stackID(A)+" -> ");for(let $ of v.recoverByInsert(O))s0&&console.log(T+this.stackID($)+" (via recover-insert)"),this.advanceFully($,f);this.stream.end>v.pos?(C==v.pos&&(C++,O=0),v.recoverByDelete(O,C),s0&&console.log(T+this.stackID(v)+` (via recover-delete ${this.parser.getName(O)})`),Ebt(v,f)):(!d||d.scorel;class hhn{constructor(r){this.start=r.start,this.shift=r.shift||Ive,this.reduce=r.reduce||Ive,this.reuse=r.reuse||Ive,this.hash=r.hash||(()=>0),this.strict=r.strict!==!1}}class _R extends iZ{constructor(r){if(super(),this.wrappers=[],r.version!=14)throw new RangeError(`Parser version (${r.version}) doesn't match runtime version (14)`);let o=r.nodeNames.split(" ");this.minRepeatTerm=o.length;for(let v=0;vr.topRules[v][1]),d=[];for(let v=0;v=0)b(T,O,v[C++]);else{let A=v[C+-T];for(let j=-T;j>0;j--)b(v[C++],O,A);C++}}}this.nodeSet=new nZ(o.map((v,O)=>jh.define({name:O>=this.minRepeatTerm?void 0:v,id:O,props:d[O],top:f.indexOf(O)>-1,error:O==0,skipped:r.skippedNodes&&r.skippedNodes.indexOf(O)>-1}))),r.propSources&&(this.nodeSet=this.nodeSet.extend(...r.propSources)),this.strict=!1,this.bufferLength=evt;let p=jG(r.tokenData);this.context=r.context,this.specializerSpecs=r.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let v=0;vtypeof v=="number"?new FT(p,v):v),this.topRules=r.topRules,this.dialects=r.dialects||{},this.dynamicPrecedences=r.dynamicPrecedences||null,this.tokenPrecTable=r.tokenPrec,this.termNames=r.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(r,o,f){let d=new uhn(this,r,o,f);for(let b of this.wrappers)d=b(d,r,o,f);return d}getGoto(r,o,f=!1){let d=this.goto;if(o>=d[0])return-1;for(let b=d[o+1];;){let p=d[b++],v=p&1,O=d[b++];if(v&&f)return O;for(let C=b+(p>>1);b0}validAction(r,o){return!!this.allActions(r,f=>f==o?!0:null)}allActions(r,o){let f=this.stateSlot(r,4),d=f?o(f):void 0;for(let b=this.stateSlot(r,1);d==null;b+=3){if(this.data[b]==65535)if(this.data[b+1]==1)b=Qy(this.data,b+2);else break;d=o(Qy(this.data,b+1))}return d}nextStates(r){let o=[];for(let f=this.stateSlot(r,1);;f+=3){if(this.data[f]==65535)if(this.data[f+1]==1)f=Qy(this.data,f+2);else break;if((this.data[f+2]&1)==0){let d=this.data[f+1];o.some((b,p)=>p&1&&b==d)||o.push(this.data[f],d)}}return o}configure(r){let o=Object.assign(Object.create(_R.prototype),this);if(r.props&&(o.nodeSet=this.nodeSet.extend(...r.props)),r.top){let f=this.topRules[r.top];if(!f)throw new RangeError(`Invalid top rule name ${r.top}`);o.top=f}return r.tokenizers&&(o.tokenizers=this.tokenizers.map(f=>{let d=r.tokenizers.find(b=>b.from==f);return d?d.to:f})),r.specializers&&(o.specializers=this.specializers.slice(),o.specializerSpecs=this.specializerSpecs.map((f,d)=>{let b=r.specializers.find(v=>v.from==f.external);if(!b)return f;let p=Object.assign(Object.assign({},f),{external:b.to});return o.specializers[d]=Abt(p),p})),r.contextTracker&&(o.context=r.contextTracker),r.dialect&&(o.dialect=this.parseDialect(r.dialect)),r.strict!=null&&(o.strict=r.strict),r.wrap&&(o.wrappers=o.wrappers.concat(r.wrap)),r.bufferLength!=null&&(o.bufferLength=r.bufferLength),o}hasWrappers(){return this.wrappers.length>0}getName(r){return this.termNames?this.termNames[r]:String(r<=this.maxNode&&this.nodeSet.types[r].name||r)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(r){let o=this.dynamicPrecedences;return o==null?0:o[r]||0}parseDialect(r){let o=Object.keys(this.dialects),f=o.map(()=>!1);if(r)for(let b of r.split(" ")){let p=o.indexOf(b);p>=0&&(f[p]=!0)}let d=null;for(let b=0;bf)&&o.p.parser.stateFlag(o.state,2)&&(!r||r.scorel.external(o,f)<<1|r}return l.get}const dhn=1,_3t=194,H3t=195,ghn=196,Mbt=197,phn=198,bhn=199,whn=200,mhn=2,q3t=3,Pbt=201,vhn=24,yhn=25,Ohn=49,khn=50,Shn=55,xhn=56,Chn=57,Thn=59,Ehn=60,Ahn=61,Mhn=62,Phn=63,jhn=65,Dhn=238,$hn=71,Nhn=241,Ihn=242,Rhn=243,Lhn=244,Bhn=245,Fhn=246,_hn=247,Hhn=248,Q3t=72,qhn=249,Qhn=250,zhn=251,Whn=252,Khn=253,Vhn=254,Xhn=255,Uhn=256,Ghn=73,Yhn=77,Zhn=263,Jhn=112,ean=130,tan=151,nan=152,ian=155,Qx=10,HR=13,ike=32,yZ=9,rke=35,ran=40,san=46,B3e=123,jbt=125,z3t=39,W3t=34,Dbt=92,oan=111,can=120,lan=78,uan=117,fan=85,han=new Set([yhn,Ohn,khn,Zhn,jhn,ean,xhn,Chn,Dhn,Mhn,Phn,Q3t,Ghn,Yhn,Ehn,Ahn,tan,nan,ian,Jhn]);function Rve(l){return l==Qx||l==HR}function Lve(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}const aan=new tL((l,r)=>{let o;if(l.next<0)l.acceptToken(bhn);else if(r.context.flags&nY)Rve(l.next)&&l.acceptToken(phn,1);else if(((o=l.peek(-1))<0||Rve(o))&&r.canShift(Mbt)){let f=0;for(;l.next==ike||l.next==yZ;)l.advance(),f++;(l.next==Qx||l.next==HR||l.next==rke)&&l.acceptToken(Mbt,-f)}else Rve(l.next)&&l.acceptToken(ghn,1)},{contextual:!0}),dan=new tL((l,r)=>{let o=r.context;if(o.flags)return;let f=l.peek(-1);if(f==Qx||f==HR){let d=0,b=0;for(;;){if(l.next==ike)d++;else if(l.next==yZ)d+=8-d%8;else break;l.advance(),b++}d!=o.indent&&l.next!=Qx&&l.next!=HR&&l.next!=rke&&(d[l,r|K3t])),ban=new hhn({start:gan,reduce(l,r,o,f){return l.flags&nY&&han.has(r)||(r==$hn||r==Q3t)&&l.flags&K3t?l.parent:l},shift(l,r,o,f){return r==_3t?new iY(l,pan(f.read(f.pos,o.pos)),0):r==H3t?l.parent:r==vhn||r==Shn||r==Thn||r==q3t?new iY(l,0,nY):$bt.has(r)?new iY(l,0,$bt.get(r)|l.flags&nY):l},hash(l){return l.hash}}),wan=new tL(l=>{for(let r=0;r<5;r++){if(l.next!="print".charCodeAt(r))return;l.advance()}if(!/\w/.test(String.fromCharCode(l.next)))for(let r=0;;r++){let o=l.peek(r);if(!(o==ike||o==yZ)){o!=ran&&o!=san&&o!=Qx&&o!=HR&&o!=rke&&l.acceptToken(dhn);return}}}),man=new tL((l,r)=>{let{flags:o}=r.context,f=o&Fy?W3t:z3t,d=(o&_y)>0,b=!(o&Hy),p=(o&qy)>0,v=l.pos;for(;!(l.next<0);)if(p&&l.next==B3e)if(l.peek(1)==B3e)l.advance(2);else{if(l.pos==v){l.acceptToken(q3t,1);return}break}else if(b&&l.next==Dbt){if(l.pos==v){l.advance();let O=l.next;O>=0&&(l.advance(),van(l,O)),l.acceptToken(mhn);return}break}else if(l.next==Dbt&&!b&&l.peek(1)>-1)l.advance(2);else if(l.next==f&&(!d||l.peek(1)==f&&l.peek(2)==f)){if(l.pos==v){l.acceptToken(Pbt,d?3:1);return}break}else if(l.next==Qx){if(d)l.advance();else if(l.pos==v){l.acceptToken(Pbt);return}break}else l.advance();l.pos>v&&l.acceptToken(whn)});function van(l,r){if(r==oan)for(let o=0;o<2&&l.next>=48&&l.next<=55;o++)l.advance();else if(r==can)for(let o=0;o<2&&Lve(l.next);o++)l.advance();else if(r==uan)for(let o=0;o<4&&Lve(l.next);o++)l.advance();else if(r==fan)for(let o=0;o<8&&Lve(l.next);o++)l.advance();else if(r==lan&&l.next==B3e){for(l.advance();l.next>=0&&l.next!=jbt&&l.next!=z3t&&l.next!=W3t&&l.next!=Qx;)l.advance();l.next==jbt&&l.advance()}}const yan=rZ({'async "*" "**" FormatConversion FormatSpec':K.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":K.controlKeyword,"in not and or is del":K.operatorKeyword,"from def class global nonlocal lambda":K.definitionKeyword,import:K.moduleKeyword,"with as print":K.keyword,Boolean:K.bool,None:K.null,VariableName:K.variableName,"CallExpression/VariableName":K.function(K.variableName),"FunctionDefinition/VariableName":K.function(K.definition(K.variableName)),"ClassDefinition/VariableName":K.definition(K.className),PropertyName:K.propertyName,"CallExpression/MemberExpression/PropertyName":K.function(K.propertyName),Comment:K.lineComment,Number:K.number,String:K.string,FormatString:K.special(K.string),Escape:K.escape,UpdateOp:K.updateOperator,"ArithOp!":K.arithmeticOperator,BitOp:K.bitwiseOperator,CompareOp:K.compareOperator,AssignOp:K.definitionOperator,Ellipsis:K.punctuation,At:K.meta,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace,".":K.derefOperator,", ;":K.separator}),Oan={__proto__:null,await:44,or:54,and:56,in:60,not:62,is:64,if:70,else:72,lambda:76,yield:94,from:96,async:102,for:104,None:162,True:164,False:164,del:178,pass:182,break:186,continue:190,return:194,raise:202,import:206,as:208,global:212,nonlocal:214,assert:218,type:223,elif:236,while:240,try:246,except:248,finally:250,with:254,def:258,class:268,match:279,case:285},kan=_R.deserialize({version:14,states:"##jO`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O2wQdO'#E`O3_QdO'#EdO3rQdO'#EfO3zQtO'#EfO1XQdO'#EiO0rQdO'#ElO1XQdO'#EnO0rQdO'#EtO0rQdO'#EwO4VQdO'#EyO4^QdO'#FOO4iQdO'#EzO0rQdO'#FOO1XQdO'#FQO1XQdO'#FVO4nQdO'#F[P4uOdO'#GpPOOO)CBd)CBdOOQS'#Ce'#CeOOQS'#Cf'#CfOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Cl'#ClO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO'vQdO,59OO5TQdO'#DoOOQS,5:Y,5:YO5hQdO'#HdOOQS,5:],5:]O5uQ!fO,5:]O5zQtO,59YO1lQdO,59bO1lQdO,59bO1lQdO,59bO8jQdO,59bO8oQdO,59bO8vQdO,59jO8}QdO'#HTO:TQdO'#HSOOQS'#HS'#HSOOQS'#D['#D[O:lQdO,59aO'vQdO,59aO:zQdO,59aOOQS,59y,59yO;PQdO,5:RO'vQdO,5:ROOQS,5:Q,5:QO;_QdO,5:QO;dQdO,5:XO'vQdO,5:XO'vQdO,5:VOOQS,5:U,5:UO;uQdO,5:UO;zQdO,5:WOOOW'#Fy'#FyOOOOQS'#Ds'#DsOOQS1G/w1G/wOOQS1G.|1G.|O!/[QtO1G.|O!/cQtO1G.|O1lQdO1G.|O!0OQdO1G/UOOQS'#DZ'#DZO0rQdO,59tOOQS1G.{1G.{O!0VQdO1G/eO!0gQdO1G/eO!0oQdO1G/fO'vQdO'#H[O!0tQdO'#H[O!0yQtO1G.{O!1ZQdO,59iO!2aQdO,5=zO!2qQdO,5=zO!2yQdO1G/mO!3OQtO1G/mOOQS1G/l1G/lO!3`QdO,5=uO!4VQdO,5=uO0rQdO1G/qO!4tQdO1G/sO!4yQtO1G/sO!5ZQtO1G/qOOQS1G/p1G/pOOQS1G/r1G/rOOOW-E9w-E9wOOQS1G/{1G/{O!5kQdO'#HxO0rQdO'#HxO!5|QdO,5>cOOOW-E9x-E9xOOQS1G/|1G/|OOQS-E9{-E9{O!6[Q#xO1G2zO!6{QtO1G2zO'vQdO,5kOOQS1G1`1G1`O!8RQdO1G1`OOQS'#DV'#DVO0rQdO,5=qOOQS,5=q,5=qO!8WQdO'#FrO!8cQdO,59oO!8kQdO1G/XO!8uQtO,5=uOOQS1G3`1G3`OOQS,5:m,5:mO!9fQdO'#GtOOQS,5jO!;ZQdO,5>jO1XQdO,5>jO!;lQdO,5>iOOQS-E:R-E:RO!;qQdO1G0lO!;|QdO1G0lO!lO!lO!hO!=VQdO,5>hO!=hQdO'#EpO0rQdO1G0tO!=sQdO1G0tO!=xQgO1G0zO!AvQgO1G0}O!EqQdO,5>oO!E{QdO,5>oO!FTQtO,5>oO0rQdO1G1PO!F_QdO1G1PO4iQdO1G1UO!!vQdO1G1WOOQV,5;a,5;aO!FdQfO,5;aO!FiQgO1G1QO!JjQdO'#GZO4iQdO1G1QO4iQdO1G1QO!JzQdO,5>pO!KXQdO,5>pO1XQdO,5>pOOQV1G1U1G1UO!KaQdO'#FSO!KrQ!fO1G1WO!KzQdO1G1WOOQV1G1]1G1]O4iQdO1G1]O!LPQdO1G1]O!LXQdO'#F^OOQV1G1b1G1bO!#ZQtO1G1bPOOO1G2v1G2vP!L^OSO1G2vOOQS,5=},5=}OOQS'#Dp'#DpO0rQdO,5=}O!LfQdO,5=|O!LyQdO,5=|OOQS1G/u1G/uO!MRQdO,5>PO!McQdO,5>PO!MkQdO,5>PO!NOQdO,5>PO!N`QdO,5>POOQS1G3j1G3jOOQS7+$h7+$hO!8kQdO7+$pO#!RQdO1G.|O#!YQdO1G.|OOQS1G/`1G/`OOQS,5<`,5<`O'vQdO,5<`OOQS7+%P7+%PO#!aQdO7+%POOQS-E9r-E9rOOQS7+%Q7+%QO#!qQdO,5=vO'vQdO,5=vOOQS7+$g7+$gO#!vQdO7+%PO##OQdO7+%QO##TQdO1G3fOOQS7+%X7+%XO##eQdO1G3fO##mQdO7+%XOOQS,5<_,5<_O'vQdO,5<_O##rQdO1G3aOOQS-E9q-E9qO#$iQdO7+%]OOQS7+%_7+%_O#$wQdO1G3aO#%fQdO7+%_O#%kQdO1G3gO#%{QdO1G3gO#&TQdO7+%]O#&YQdO,5>dO#&sQdO,5>dO#&sQdO,5>dOOQS'#Dx'#DxO#'UO&jO'#DzO#'aO`O'#HyOOOW1G3}1G3}O#'fQdO1G3}O#'nQdO1G3}O#'yQ#xO7+(fO#(jQtO1G2UP#)TQdO'#GOOOQS,5nQdO,5sQdO1G4OOOQS-E9y-E9yO#?^QdO1G4OO<[QdO'#H{OOOO'#D{'#D{OOOO'#F|'#F|O#?oO&jO,5:fOOOW,5>e,5>eOOOW7+)i7+)iO#?zQdO7+)iO#@SQdO1G2zO#@mQdO1G2zP'vQdO'#FuO0rQdO<mO#BQQdO,5>mOOQS1G0v1G0vOOQS<rO#KgQdO,5>rO#KrQdO,5>rO#K}QdO,5>qO#L`QdO,5>qOOQS1G1Y1G1YOOQS,5;p,5;pOOQV<VAN>VO$ oQdO<cAN>cO0rQdO1G1|O$!PQtO1G1|P$!ZQdO'#FvOOQS1G2R1G2RP$!hQdO'#F{O$!uQdO7+)jO$#`QdO,5>gOOOO-E9z-E9zOOOW<tO$4{QdO,5>tO1XQdO,5vO$)nQdO,5>vOOQS1G1p1G1pOOQS,5<[,5<[OOQU7+'P7+'PO$+zQdO1G/iO$)nQdO,5wO$8zQdO,5>wOOQS1G1s1G1sOOQS7+'S7+'SP$)nQdO'#GdO$9SQdO1G4bO$9^QdO1G4bO$9fQdO1G4bOOQS7+%T7+%TO$9tQdO1G1tO$:SQtO'#FaO$:ZQdO,5<}OOQS,5<},5<}O$:iQdO1G4cOOQS-E:a-E:aO$)nQdO,5<|O$:pQdO,5<|O$:uQdO7+)|OOQS-E:`-E:`O$;PQdO7+)|O$)nQdO,5S~O%cOS%^OSSOS%]PQ~OPdOVaOfoOhYOopOs!POvqO!PrO!Q{O!T!SO!U!RO!XZO!][O!h`O!r`O!s`O!t`O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#l!QO#o!TO#s!UO#u!VO#z!WO#}hO$P!XO%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~O%]!YO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%j![O%k!]O%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aO~Ok%xXl%xXm%xXn%xXo%xXp%xXs%xXz%xX{%xX!x%xX#g%xX%[%xX%_%xX%z%xXg%xX!T%xX!U%xX%{%xX!W%xX![%xX!Q%xX#[%xXt%xX!m%xX~P%SOfoOhYO!XZO!][O!h`O!r`O!s`O!t`O%oRO%pRO%tSO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O~Oz%wX{%wX#g%wX%[%wX%_%wX%z%wX~Ok!pOl!qOm!oOn!oOo!rOp!sOs!tO!x%wX~P)pOV!zOg!|Oo0cOv0qO!PrO~P'vOV#OOo0cOv0qO!W#PO~P'vOV#SOa#TOo0cOv0qO![#UO~P'vOQ#XO%`#XO%a#ZO~OQ#^OR#[O%`#^O%a#`O~OV%iX_%iXa%iXh%iXk%iXl%iXm%iXn%iXo%iXp%iXs%iXz%iX!X%iX!f%iX%j%iX%k%iX%l%iX%m%iX%n%iX%o%iX%p%iX%q%iX%r%iX%s%iXg%iX!T%iX!U%iX~O&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O&c^O&d^O&e^O&f^O&g^O&h^O&i^O&j^O{%iX!x%iX#g%iX%[%iX%_%iX%z%iX%{%iX!W%iX![%iX!Q%iX#[%iXt%iX!m%iX~P,eOz#dO{%hX!x%hX#g%hX%[%hX%_%hX%z%hX~Oo0cOv0qO~P'vO#g#gO%[#iO%_#iO~O%uWO~O!T#nO#u!VO#z!WO#}hO~OopO~P'vOV#sOa#tO%uWO{wP~OV#xOo0cOv0qO!Q#yO~P'vO{#{O!x$QO%z#|O#g!yX%[!yX%_!yX~OV#xOo0cOv0qO#g#SX%[#SX%_#SX~P'vOo0cOv0qO#g#WX%[#WX%_#WX~P'vOh$WO%uWO~O!f$YO!r$YO%uWO~OV$eO~P'vO!U$gO#s$hO#u$iO~O{$jO~OV$qO~P'vOS$sO%[$rO%_$rO%c$tO~OV$}Oa$}Og%POo0cOv0qO~P'vOo0cOv0qO{%SO~P'vO&Y%UO~Oa!bOh!iO!X!kO!f!mOVba_bakbalbambanbaobapbasbazba{ba!xba#gba%[ba%_ba%jba%kba%lba%mba%nba%oba%pba%qba%rba%sba%zbagba!Tba!Uba%{ba!Wba![ba!Qba#[batba!mba~On%ZO~Oo%ZO~P'vOo0cO~P'vOk0eOl0fOm0dOn0dOo0mOp0nOs0rOg%wX!T%wX!U%wX%{%wX!W%wX![%wX!Q%wX#[%wX!m%wX~P)pO%{%]Og%vXz%vX!T%vX!U%vX!W%vX{%vX~Og%_Oz%`O!T%dO!U%cO~Og%_O~Oz%gO!T%dO!U%cO!W&SX~O!W%kO~Oz%lO{%nO!T%dO!U%cO![%}X~O![%rO~O![%sO~OQ#XO%`#XO%a%uO~OV%wOo0cOv0qO!PrO~P'vOQ#^OR#[O%`#^O%a%zO~OV!qa_!qaa!qah!qak!qal!qam!qan!qao!qap!qas!qaz!qa{!qa!X!qa!f!qa!x!qa#g!qa%[!qa%_!qa%j!qa%k!qa%l!qa%m!qa%n!qa%o!qa%p!qa%q!qa%r!qa%s!qa%z!qag!qa!T!qa!U!qa%{!qa!W!qa![!qa!Q!qa#[!qat!qa!m!qa~P#yOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P%SOV&OOopOvqO{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~P'vOz%|O{%ha!x%ha#g%ha%[%ha%_%ha%z%ha~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO#g$zX%[$zX%_$zX~P'vO#g#gO%[&TO%_&TO~O!f&UOh&sX%[&sXz&sX#[&sX#g&sX%_&sX#Z&sXg&sX~Oh!iO%[&WO~Okealeameaneaoeapeaseazea{ea!xea#gea%[ea%_ea%zeagea!Tea!Uea%{ea!Wea![ea!Qea#[eatea!mea~P%SOsqazqa{qa#gqa%[qa%_qa%zqa~Ok!pOl!qOm!oOn!oOo!rOp!sO!xqa~PEcO%z&YOz%yX{%yX~O%uWOz%yX{%yX~Oz&]O{wX~O{&_O~Oz%lO#g%}X%[%}X%_%}Xg%}X{%}X![%}X!m%}X%z%}X~OV0lOo0cOv0qO!PrO~P'vO%z#|O#gUa%[Ua%_Ua~Oz&hO#g&PX%[&PX%_&PXn&PX~P%SOz&kO!Q&jO#g#Wa%[#Wa%_#Wa~Oz&lO#[&nO#g&rX%[&rX%_&rXg&rX~O!f$YO!r$YO#Z&qO%uWO~O#Z&qO~Oz&sO#g&tX%[&tX%_&tX~Oz&uO#g&pX%[&pX%_&pX{&pX~O!X&wO%z&xO~Oz&|On&wX~P%SOn'PO~OPdOVaOopOvqO!PrO!Q{O!{tO!}uO#PvO#RwO#TxO#XyO#ZzO#^|O#_|O#a}O#c!OO%['UO~P'vOt'YO#p'WO#q'XOP#naV#naf#nah#nao#nas#nav#na!P#na!Q#na!T#na!U#na!X#na!]#na!h#na!r#na!s#na!t#na!{#na!}#na#P#na#R#na#T#na#X#na#Z#na#^#na#_#na#a#na#c#na#l#na#o#na#s#na#u#na#z#na#}#na$P#na%X#na%o#na%p#na%t#na%u#na&Z#na&[#na&]#na&^#na&_#na&`#na&a#na&b#na&c#na&d#na&e#na&f#na&g#na&h#na&i#na&j#na%Z#na%_#na~Oz'ZO#[']O{&xX~Oh'_O!X&wO~Oh!iO{$jO!X&wO~O{'eO~P%SO%['hO%_'hO~OS'iO%['hO%_'hO~OV!aO_!aOa!bOh!iO!X!kO!f!mO%l!^O%m!_O%n!_O%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%k!]O~P!#uO%kWi~P!#uOV!aO_!aOa!bOh!iO!X!kO!f!mO%o!`O%p!`O%q!aO%r!aO%s!aOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~O%m!_O%n!_O~P!&pO%mWi%nWi~P!&pOa!bOh!iO!X!kO!f!mOkWilWimWinWioWipWisWizWi{Wi!xWi#gWi%[Wi%_Wi%jWi%kWi%lWi%mWi%nWi%oWi%pWi%zWigWi!TWi!UWi%{Wi!WWi![Wi!QWi#[WitWi!mWi~OV!aO_!aO%q!aO%r!aO%s!aO~P!)nOVWi_Wi%qWi%rWi%sWi~P!)nO!T%dO!U%cOg&VXz&VX~O%z'kO%{'kO~P,eOz'mOg&UX~Og'oO~Oz'pO{'rO!W&XX~Oo0cOv0qOz'pO{'sO!W&XX~P'vO!W'uO~Om!oOn!oOo!rOp!sOkjisjizji{ji!xji#gji%[ji%_ji%zji~Ol!qO~P!.aOlji~P!.aOk0eOl0fOm0dOn0dOo0mOp0nO~Ot'wO~P!/jOV'|Og'}Oo0cOv0qO~P'vOg'}Oz(OO~Og(QO~O!U(SO~Og(TOz(OO!T%dO!U%cO~P%SOk0eOl0fOm0dOn0dOo0mOp0nOgqa!Tqa!Uqa%{qa!Wqa![qa!Qqa#[qatqa!mqa~PEcOV'|Oo0cOv0qO!W&Sa~P'vOz(WO!W&Sa~O!W(XO~Oz(WO!T%dO!U%cO!W&Sa~P%SOV(]Oo0cOv0qO![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~P'vOz(^O![%}a#g%}a%[%}a%_%}ag%}a{%}a!m%}a%z%}a~O![(aO~Oz(^O!T%dO!U%cO![%}a~P%SOz(dO!T%dO!U%cO![&Ta~P%SOz(gO{&lX![&lX!m&lX%z&lX~O{(kO![(mO!m(nO%z(jO~OV&OOopOvqO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~P'vOz(pO{%hi!x%hi#g%hi%[%hi%_%hi%z%hi~O!f&UOh&sa%[&saz&sa#[&sa#g&sa%_&sa#Z&sag&sa~O%[(uO~OV#sOa#tO%uWO~Oz&]O{wa~OopOvqO~P'vOz(^O#g%}a%[%}a%_%}ag%}a{%}a![%}a!m%}a%z%}a~P%SOz(zO#g%hX%[%hX%_%hX%z%hX~O%z#|O#gUi%[Ui%_Ui~O#g&Pa%[&Pa%_&Pan&Pa~P'vOz(}O#g&Pa%[&Pa%_&Pan&Pa~O%uWO#g&ra%[&ra%_&rag&ra~Oz)SO#g&ra%[&ra%_&rag&ra~Og)VO~OV)WOh$WO%uWO~O#Z)XO~O%uWO#g&ta%[&ta%_&ta~Oz)ZO#g&ta%[&ta%_&ta~Oo0cOv0qO#g&pa%[&pa%_&pa{&pa~P'vOz)^O#g&pa%[&pa%_&pa{&pa~OV)`Oa)`O%uWO~O%z)eO~Ot)hO#j)gOP#hiV#hif#hih#hio#his#hiv#hi!P#hi!Q#hi!T#hi!U#hi!X#hi!]#hi!h#hi!r#hi!s#hi!t#hi!{#hi!}#hi#P#hi#R#hi#T#hi#X#hi#Z#hi#^#hi#_#hi#a#hi#c#hi#l#hi#o#hi#s#hi#u#hi#z#hi#}#hi$P#hi%X#hi%o#hi%p#hi%t#hi%u#hi&Z#hi&[#hi&]#hi&^#hi&_#hi&`#hi&a#hi&b#hi&c#hi&d#hi&e#hi&f#hi&g#hi&h#hi&i#hi&j#hi%Z#hi%_#hi~Ot)iOP#kiV#kif#kih#kio#kis#kiv#ki!P#ki!Q#ki!T#ki!U#ki!X#ki!]#ki!h#ki!r#ki!s#ki!t#ki!{#ki!}#ki#P#ki#R#ki#T#ki#X#ki#Z#ki#^#ki#_#ki#a#ki#c#ki#l#ki#o#ki#s#ki#u#ki#z#ki#}#ki$P#ki%X#ki%o#ki%p#ki%t#ki%u#ki&Z#ki&[#ki&]#ki&^#ki&_#ki&`#ki&a#ki&b#ki&c#ki&d#ki&e#ki&f#ki&g#ki&h#ki&i#ki&j#ki%Z#ki%_#ki~OV)kOn&wa~P'vOz)lOn&wa~Oz)lOn&wa~P%SOn)pO~O%Y)tO~Ot)wO#p'WO#q)vOP#niV#nif#nih#nio#nis#niv#ni!P#ni!Q#ni!T#ni!U#ni!X#ni!]#ni!h#ni!r#ni!s#ni!t#ni!{#ni!}#ni#P#ni#R#ni#T#ni#X#ni#Z#ni#^#ni#_#ni#a#ni#c#ni#l#ni#o#ni#s#ni#u#ni#z#ni#}#ni$P#ni%X#ni%o#ni%p#ni%t#ni%u#ni&Z#ni&[#ni&]#ni&^#ni&_#ni&`#ni&a#ni&b#ni&c#ni&d#ni&e#ni&f#ni&g#ni&h#ni&i#ni&j#ni%Z#ni%_#ni~OV)zOo0cOv0qO{$jO~P'vOo0cOv0qO{&xa~P'vOz*OO{&xa~OV*SOa*TOg*WO%q*UO%uWO~O{$jO&{*YO~Oh'_O~Oh!iO{$jO~O%[*_O~O%[*aO%_*aO~OV$}Oa$}Oo0cOv0qOg&Ua~P'vOz*dOg&Ua~Oo0cOv0qO{*gO!W&Xa~P'vOz*hO!W&Xa~Oo0cOv0qOz*hO{*kO!W&Xa~P'vOo0cOv0qOz*hO!W&Xa~P'vOz*hO{*kO!W&Xa~Om0dOn0dOo0mOp0nOgjikjisjizji!Tji!Uji%{ji!Wji{ji![ji#gji%[ji%_ji!Qji#[jitji!mji%zji~Ol0fO~P!NkOlji~P!NkOV'|Og*pOo0cOv0qO~P'vOn*rO~Og*pOz*tO~Og*uO~OV'|Oo0cOv0qO!W&Si~P'vOz*vO!W&Si~O!W*wO~OV(]Oo0cOv0qO![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~P'vOz*zO!T%dO!U%cO![&Ti~Oz*}O![%}i#g%}i%[%}i%_%}ig%}i{%}i!m%}i%z%}i~O![+OO~Oa+QOo0cOv0qO![&Ti~P'vOz*zO![&Ti~O![+SO~OV+UOo0cOv0qO{&la![&la!m&la%z&la~P'vOz+VO{&la![&la!m&la%z&la~O!]+YO&n+[O![!nX~O![+^O~O{(kO![+_O~O{(kO![+_O!m+`O~OV&OOopOvqO{%hq!x%hq#g%hq%[%hq%_%hq%z%hq~P'vOz$ri{$ri!x$ri#g$ri%[$ri%_$ri%z$ri~P%SOV&OOopOvqO~P'vOV&OOo0cOv0qO#g%ha%[%ha%_%ha%z%ha~P'vOz+aO#g%ha%[%ha%_%ha%z%ha~Oz$ia#g$ia%[$ia%_$ian$ia~P%SO#g&Pi%[&Pi%_&Pin&Pi~P'vOz+dO#g#Wq%[#Wq%_#Wq~O#[+eOz$va#g$va%[$va%_$vag$va~O%uWO#g&ri%[&ri%_&rig&ri~Oz+gO#g&ri%[&ri%_&rig&ri~OV+iOh$WO%uWO~O%uWO#g&ti%[&ti%_&ti~Oo0cOv0qO#g&pi%[&pi%_&pi{&pi~P'vO{#{Oz#eX!W#eX~Oz+mO!W&uX~O!W+oO~Ot+rO#j)gOP#hqV#hqf#hqh#hqo#hqs#hqv#hq!P#hq!Q#hq!T#hq!U#hq!X#hq!]#hq!h#hq!r#hq!s#hq!t#hq!{#hq!}#hq#P#hq#R#hq#T#hq#X#hq#Z#hq#^#hq#_#hq#a#hq#c#hq#l#hq#o#hq#s#hq#u#hq#z#hq#}#hq$P#hq%X#hq%o#hq%p#hq%t#hq%u#hq&Z#hq&[#hq&]#hq&^#hq&_#hq&`#hq&a#hq&b#hq&c#hq&d#hq&e#hq&f#hq&g#hq&h#hq&i#hq&j#hq%Z#hq%_#hq~On$|az$|a~P%SOV)kOn&wi~P'vOz+yOn&wi~Oz,TO{$jO#[,TO~O#q,VOP#nqV#nqf#nqh#nqo#nqs#nqv#nq!P#nq!Q#nq!T#nq!U#nq!X#nq!]#nq!h#nq!r#nq!s#nq!t#nq!{#nq!}#nq#P#nq#R#nq#T#nq#X#nq#Z#nq#^#nq#_#nq#a#nq#c#nq#l#nq#o#nq#s#nq#u#nq#z#nq#}#nq$P#nq%X#nq%o#nq%p#nq%t#nq%u#nq&Z#nq&[#nq&]#nq&^#nq&_#nq&`#nq&a#nq&b#nq&c#nq&d#nq&e#nq&f#nq&g#nq&h#nq&i#nq&j#nq%Z#nq%_#nq~O#[,WOz%Oa{%Oa~Oo0cOv0qO{&xi~P'vOz,YO{&xi~O{#{O%z,[Og&zXz&zX~O%uWOg&zXz&zX~Oz,`Og&yX~Og,bO~O%Y,eO~O!T%dO!U%cOg&Viz&Vi~OV$}Oa$}Oo0cOv0qOg&Ui~P'vO{,hOz$la!W$la~Oo0cOv0qO{,iOz$la!W$la~P'vOo0cOv0qO{*gO!W&Xi~P'vOz,lO!W&Xi~Oo0cOv0qOz,lO!W&Xi~P'vOz,lO{,oO!W&Xi~Og$hiz$hi!W$hi~P%SOV'|Oo0cOv0qO~P'vOn,qO~OV'|Og,rOo0cOv0qO~P'vOV'|Oo0cOv0qO!W&Sq~P'vOz$gi![$gi#g$gi%[$gi%_$gig$gi{$gi!m$gi%z$gi~P%SOV(]Oo0cOv0qO~P'vOa+QOo0cOv0qO![&Tq~P'vOz,sO![&Tq~O![,tO~OV(]Oo0cOv0qO![%}q#g%}q%[%}q%_%}qg%}q{%}q!m%}q%z%}q~P'vO{,uO~OV+UOo0cOv0qO{&li![&li!m&li%z&li~P'vOz,zO{&li![&li!m&li%z&li~O!]+YO&n+[O![!na~O{(kO![,}O~OV&OOo0cOv0qO#g%hi%[%hi%_%hi%z%hi~P'vOz-OO#g%hi%[%hi%_%hi%z%hi~O%uWO#g&rq%[&rq%_&rqg&rq~Oz-RO#g&rq%[&rq%_&rqg&rq~OV)`Oa)`O%uWO!W&ua~Oz-TO!W&ua~On$|iz$|i~P%SOV)kO~P'vOV)kOn&wq~P'vOt-XOP#myV#myf#myh#myo#mys#myv#my!P#my!Q#my!T#my!U#my!X#my!]#my!h#my!r#my!s#my!t#my!{#my!}#my#P#my#R#my#T#my#X#my#Z#my#^#my#_#my#a#my#c#my#l#my#o#my#s#my#u#my#z#my#}#my$P#my%X#my%o#my%p#my%t#my%u#my&Z#my&[#my&]#my&^#my&_#my&`#my&a#my&b#my&c#my&d#my&e#my&f#my&g#my&h#my&i#my&j#my%Z#my%_#my~O%Z-]O%_-]O~P`O#q-^OP#nyV#nyf#nyh#nyo#nys#nyv#ny!P#ny!Q#ny!T#ny!U#ny!X#ny!]#ny!h#ny!r#ny!s#ny!t#ny!{#ny!}#ny#P#ny#R#ny#T#ny#X#ny#Z#ny#^#ny#_#ny#a#ny#c#ny#l#ny#o#ny#s#ny#u#ny#z#ny#}#ny$P#ny%X#ny%o#ny%p#ny%t#ny%u#ny&Z#ny&[#ny&]#ny&^#ny&_#ny&`#ny&a#ny&b#ny&c#ny&d#ny&e#ny&f#ny&g#ny&h#ny&i#ny&j#ny%Z#ny%_#ny~Oz-aO{$jO#[-aO~Oo0cOv0qO{&xq~P'vOz-dO{&xq~O%z,[Og&zaz&za~O{#{Og&zaz&za~OV*SOa*TO%q*UO%uWOg&ya~Oz-hOg&ya~O$S-lO~OV$}Oa$}Oo0cOv0qO~P'vOo0cOv0qO{-mOz$li!W$li~P'vOo0cOv0qOz$li!W$li~P'vO{-mOz$li!W$li~Oo0cOv0qO{*gO~P'vOo0cOv0qO{*gO!W&Xq~P'vOz-pO!W&Xq~Oo0cOv0qOz-pO!W&Xq~P'vOs-sO!T%dO!U%cOg&Oq!W&Oq![&Oqz&Oq~P!/jOa+QOo0cOv0qO![&Ty~P'vOz$ji![$ji~P%SOa+QOo0cOv0qO~P'vOV+UOo0cOv0qO~P'vOV+UOo0cOv0qO{&lq![&lq!m&lq%z&lq~P'vO{(kO![-xO!m-yO%z-wO~OV&OOo0cOv0qO#g%hq%[%hq%_%hq%z%hq~P'vO%uWO#g&ry%[&ry%_&ryg&ry~OV)`Oa)`O%uWO!W&ui~Ot-}OP#m!RV#m!Rf#m!Rh#m!Ro#m!Rs#m!Rv#m!R!P#m!R!Q#m!R!T#m!R!U#m!R!X#m!R!]#m!R!h#m!R!r#m!R!s#m!R!t#m!R!{#m!R!}#m!R#P#m!R#R#m!R#T#m!R#X#m!R#Z#m!R#^#m!R#_#m!R#a#m!R#c#m!R#l#m!R#o#m!R#s#m!R#u#m!R#z#m!R#}#m!R$P#m!R%X#m!R%o#m!R%p#m!R%t#m!R%u#m!R&Z#m!R&[#m!R&]#m!R&^#m!R&_#m!R&`#m!R&a#m!R&b#m!R&c#m!R&d#m!R&e#m!R&f#m!R&g#m!R&h#m!R&i#m!R&j#m!R%Z#m!R%_#m!R~Oo0cOv0qO{&xy~P'vOV*SOa*TO%q*UO%uWOg&yi~O$S-lO%Z.VO%_.VO~OV.aOh._O!X.^O!].`O!h.YO!s.[O!t.[O%p.XO%uWO&Z]O&[]O&]]O&^]O&_]O&`]O&a]O&b]O~Oo0cOv0qOz$lq!W$lq~P'vO{.fOz$lq!W$lq~Oo0cOv0qO{*gO!W&Xy~P'vOz.gO!W&Xy~Oo0cOv.kO~P'vOs-sO!T%dO!U%cOg&Oy!W&Oy![&Oyz&Oy~P!/jO{(kO![.nO~O{(kO![.nO!m.oO~OV*SOa*TO%q*UO%uWO~Oh.tO!f.rOz$TX#[$TX%j$TXg$TX~Os$TX{$TX!W$TX![$TX~P$-bO%o.vO%p.vOs$UXz$UX{$UX#[$UX%j$UX!W$UXg$UX![$UX~O!h.xO~Oz.|O#[/OO%j.yOs&|X{&|X!W&|Xg&|X~Oa/RO~P$)zOh.tOs&}Xz&}X{&}X#[&}X%j&}X!W&}Xg&}X![&}X~Os/VO{$jO~Oo0cOv0qOz$ly!W$ly~P'vOo0cOv0qO{*gO!W&X!R~P'vOz/ZO!W&X!R~Og&RXs&RX!T&RX!U&RX!W&RX![&RXz&RX~P!/jOs-sO!T%dO!U%cOg&Qa!W&Qa![&Qaz&Qa~O{(kO![/^O~O!f.rOh$[as$[az$[a{$[a#[$[a%j$[a!W$[ag$[a![$[a~O!h/eO~O%o.vO%p.vOs$Uaz$Ua{$Ua#[$Ua%j$Ua!W$Uag$Ua![$Ua~O%j.yOs$Yaz$Ya{$Ya#[$Ya!W$Yag$Ya![$Ya~Os&|a{&|a!W&|ag&|a~P$)nOz/jOs&|a{&|a!W&|ag&|a~O!W/mO~Og/mO~O{/oO~O![/pO~Oo0cOv0qO{*gO!W&X!Z~P'vO{/sO~O%z/tO~P$-bOz/uO#[/OO%j.yOg'PX~Oz/uOg'PX~Og/wO~O!h/xO~O#[/OOs%Saz%Sa{%Sa%j%Sa!W%Sag%Sa![%Sa~O#[/OO%j.yOs%Waz%Wa{%Wa!W%Wag%Wa~Os&|i{&|i!W&|ig&|i~P$)nOz/zO#[/OO%j.yO!['Oa~Og'Pa~P$)nOz0SOg'Pa~Oa0UO!['Oi~P$)zOz0WO!['Oi~Oz0WO#[/OO%j.yO!['Oi~O#[/OO%j.yOg$biz$bi~O%z0ZO~P$-bO#[/OO%j.yOg%Vaz%Va~Og'Pi~P$)nO{0^O~Oa0UO!['Oq~P$)zOz0`O!['Oq~O#[/OO%j.yOz%Ui![%Ui~Oa0UO~P$)zOa0UO!['Oy~P$)zO#[/OO%j.yOg$ciz$ci~O#[/OO%j.yOz%Uq![%Uq~Oz+aO#g%ha%[%ha%_%ha%z%ha~P%SOV&OOo0cOv0qO~P'vOn0hO~Oo0hO~P'vO{0iO~Ot0jO~P!/jO&]&Z&j&h&i&g&f&d&e&c&b&`&a&_&^&[%u~",goto:"!=j'QPPPPPP'RP'Z*s+[+t,_,y-fP.SP'Z.r.r'ZPPP'Z2[PPPPPP2[5PPP5PP7b7k=sPP=v>h>kPP'Z'ZPP>zPP'Z'ZPP'Z'Z'Z'Z'Z?O?w'ZP?zP@QDXGuGyPG|HWH['ZPPPH_Hk'RP'R'RP'RP'RP'RP'RP'R'R'RP'RPP'RPP'RP'RPHqH}IVPI^IdPI^PI^I^PPPI^PKrPK{LVL]KrPI^LfPI^PLmLsPLwM]MzNeLwLwNkNxLwLwLwLw! ^! d! g! l! o! y!!P!!]!!o!!u!#P!#V!#s!#y!$P!$Z!$a!$g!$y!%T!%Z!%a!%k!%q!%w!%}!&T!&Z!&e!&k!&u!&{!'U!'[!'k!'s!'}!(UPPPPPPPPPPP!([!(_!(e!(n!(x!)TPPPPPPPPPPPP!-u!/Z!3^!6oPP!6w!7W!7a!8Y!8P!8c!8i!8l!8o!8r!8z!9jPPPPPPPPPPPPPPPPP!9m!9q!9wP!:]!:a!:m!:v!;S!;j!;m!;p!;v!;|!_![!]Do!]!^Es!^!_FZ!_!`Gk!`!aHX!a!b%T!b!cIf!c!dJU!d!eK^!e!hJU!h!i!#f!i!tJU!t!u!,|!u!wJU!w!x!.t!x!}JU!}#O!0S#O#P&o#P#Q!0j#Q#R!1Q#R#SJU#S#T%T#T#UJU#U#VK^#V#YJU#Y#Z!#f#Z#fJU#f#g!,|#g#iJU#i#j!.t#j#oJU#o#p!1n#p#q!1s#q#r!2a#r#s!2f#s$g%T$g;'SJU;'S;=`KW<%lOJU`%YT&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T`%lP;=`<%l%To%v]&n`%c_OX%TXY%oY[%T[]%o]p%Tpq%oq#O%T#O#P&o#P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To&tX&n`OY%TYZ%oZ]%T]^%o^#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc'f[&n`O!_%T!_!`([!`#T%T#T#U(r#U#f%T#f#g(r#g#h(r#h#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(cTmR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc(yT!mR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk)aV&n`&[ZOr%Trs)vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk){V&n`Or%Trs*bs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk*iT&n`&^ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To+PZS_&n`OY*xYZ%TZ]*x]^%T^#o*x#o#p+r#p#q*x#q#r+r#r;'S*x;'S;=`,^<%lO*x_+wTS_OY+rZ]+r^;'S+r;'S;=`,W<%lO+r_,ZP;=`<%l+ro,aP;=`<%l*xj,kV%rQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-XT!xY&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj-oV%lQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.]V&n`&ZZOw%Twx.rx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk.wV&n`Ow%Twx/^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/eT&n`&]ZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk/{ThZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc0cTgR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk0yXVZ&n`Oz%Tz{1f{!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk1mVaR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk2ZV%oZ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc2wTzR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To3_W%pZ&n`O!_%T!_!`-Q!`!a3w!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Td4OT&{S&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk4fX!fQ&n`O!O%T!O!P5R!P!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5WV&n`O!O%T!O!P5m!P#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk5tT!rZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti6[a!hX&n`O!Q%T!Q![6T![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S6T#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti7fZ&n`O{%T{|8X|}%T}!O8X!O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8^V&n`O!Q%T!Q![8s![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti8z]!hX&n`O!Q%T!Q![8s![!l%T!l!m9s!m#R%T#R#S8s#S#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti9zT!hX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk:bX%qR&n`O!P%T!P!Q:}!Q!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj;UV%sQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti;ro!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!d%T!d!e?q!e!g%T!g!h7a!h!l%T!l!m9s!m!q%T!q!rA]!r!z%T!z!{Bq!{#R%T#R#S>_#S#U%T#U#V?q#V#X%T#X#Y7a#Y#^%T#^#_9s#_#c%T#c#dA]#d#l%T#l#mBq#m#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti=xV&n`O!Q%T!Q![6T![#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti>fc!hX&n`O!O%T!O!P=s!P!Q%T!Q![>_![!g%T!g!h7a!h!l%T!l!m9s!m#R%T#R#S>_#S#X%T#X#Y7a#Y#^%T#^#_9s#_#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti?vY&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Ti@mY!hX&n`O!Q%T!Q!R@f!R!S@f!S#R%T#R#S@f#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiAbX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBUX!hX&n`O!Q%T!Q!YA}!Y#R%T#R#SA}#S#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiBv]&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TiCv]!hX&n`O!Q%T!Q![Co![!c%T!c!iCo!i#R%T#R#SCo#S#T%T#T#ZCo#Z#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToDvV{_&n`O!_%T!_!`E]!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TcEdT%{R&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkEzT#gZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkFbXmR&n`O!^%T!^!_F}!_!`([!`!a([!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjGUV%mQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkGrV%zZ&n`O!_%T!_!`([!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkH`WmR&n`O!_%T!_!`([!`!aHx!a#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TjIPV%nQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkIoV_Q#}P&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%ToJ_]&n`&YS%uZO!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoKZP;=`<%lJUoKge&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!tJU!t!uLx!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#gLx#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUoMRa&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUkN_V&n`&`ZOr%TrsNts#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%TkNyV&n`Or%Trs! `s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! gT&n`&bZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk! }V&n`&_ZOw%Twx!!dx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!!iV&n`Ow%Twx!#Ox#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!#VT&n`&aZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!#oe&n`&YS%uZOr%Trs!%Qsw%Twx!&px!Q%T!Q![JU![!c%T!c!tJU!t!u!(`!u!}JU!}#R%T#R#SJU#S#T%T#T#fJU#f#g!(`#g#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!%XV&n`&dZOr%Trs!%ns#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!%sV&n`Or%Trs!&Ys#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&aT&n`&fZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!&wV&n`&cZOw%Twx!'^x#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!'cV&n`Ow%Twx!'xx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!(PT&n`&eZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!(ia&n`&YS%uZOr%Trs!)nsw%Twx!+^x!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!)uV&n`&hZOr%Trs!*[s#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*aV&n`Or%Trs!*vs#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!*}T&n`&jZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!+eV&n`&gZOw%Twx!+zx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,PV&n`Ow%Twx!,fx#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tk!,mT&n`&iZO#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%To!-Vi&n`&YS%uZOr%TrsNWsw%Twx! vx!Q%T!Q![JU![!c%T!c!dJU!d!eLx!e!hJU!h!i!(`!i!}JU!}#R%T#R#SJU#S#T%T#T#UJU#U#VLx#V#YJU#Y#Z!(`#Z#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUo!.}a&n`&YS%uZOr%Trs)Ysw%Twx.Ux!Q%T!Q![JU![!c%T!c!}JU!}#R%T#R#SJU#S#T%T#T#oJU#p#q%T#r$g%T$g;'SJU;'S;=`KW<%lOJUk!0ZT!XZ&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tc!0qT!WR&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%Tj!1XV%kQ&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!1sO!]~k!1zV%jR&n`O!_%T!_!`-Q!`#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T~!2fO![~i!2mT%tX&n`O#o%T#p#q%T#r;'S%T;'S;=`%i<%lO%T",tokenizers:[wan,dan,aan,man,0,1,2,3,4],topRules:{Script:[0,5]},specialized:[{term:221,get:l=>Oan[l]||-1}],tokenPrec:7668}),Nbt=new Hrn,V3t=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function DG(l){return(r,o,f)=>{if(f)return!1;let d=r.node.getChild("VariableName");return d&&o(d,l),!0}}const San={FunctionDefinition:DG("function"),ClassDefinition:DG("class"),ForStatement(l,r,o){if(o){for(let f=l.node.firstChild;f;f=f.nextSibling)if(f.name=="VariableName")r(f,"variable");else if(f.name=="in")break}},ImportStatement(l,r){var o,f;let{node:d}=l,b=((o=d.firstChild)===null||o===void 0?void 0:o.name)=="from";for(let p=d.getChild("import");p;p=p.nextSibling)p.name=="VariableName"&&((f=p.nextSibling)===null||f===void 0?void 0:f.name)!="as"&&r(p,b?"variable":"namespace")},AssignStatement(l,r){for(let o=l.node.firstChild;o;o=o.nextSibling)if(o.name=="VariableName")r(o,"variable");else if(o.name==":"||o.name=="AssignOp")break},ParamList(l,r){for(let o=null,f=l.node.firstChild;f;f=f.nextSibling)f.name=="VariableName"&&(!o||!/\*|AssignOp/.test(o.name))&&r(f,"variable"),o=f},CapturePattern:DG("variable"),AsPattern:DG("variable"),__proto__:null};function X3t(l,r){let o=Nbt.get(r);if(o)return o;let f=[],d=!0;function b(p,v){let O=l.sliceString(p.from,p.to);f.push({label:O,type:v})}return r.cursor(kf.IncludeAnonymous).iterate(p=>{if(p.name){let v=San[p.name];if(v&&v(p,b,d)||!d&&V3t.has(p.name))return!1;d=!1}else if(p.to-p.from>8192){for(let v of X3t(l,p.node))f.push(v);return!1}}),Nbt.set(r,f),f}const Ibt=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,U3t=["String","FormatString","Comment","PropertyName"];function xan(l){let r=Dh(l.state).resolveInner(l.pos,-1);if(U3t.indexOf(r.name)>-1)return null;let o=r.name=="VariableName"||r.to-r.from<20&&Ibt.test(l.state.sliceDoc(r.from,r.to));if(!o&&!l.explicit)return null;let f=[];for(let d=r;d;d=d.parent)V3t.has(d.name)&&(f=f.concat(X3t(l.state.doc,d)));return{options:f,from:o?r.from:l.pos,validFor:Ibt}}const Can=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(l=>({label:l,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(l=>({label:l,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(l=>({label:l,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(l=>({label:l,type:"function"}))),Tan=[By("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),By("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),By("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),By("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),By(`if \${}: + +`,{label:"if",detail:"block",type:"keyword"}),By("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),By("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),By("import ${module}",{label:"import",detail:"statement",type:"keyword"}),By("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],Ean=O3t(U3t,wZ(Can.concat(Tan)));function Bve(l){let{node:r,pos:o}=l,f=l.lineIndent(o,-1),d=null;for(;;){let b=r.childBefore(o);if(b)if(b.name=="Comment")o=b.from;else if(b.name=="Body"||b.name=="MatchBody")l.baseIndentFor(b)+l.unit<=f&&(d=b),r=b;else if(b.name=="MatchClause")r=b;else if(b.type.is("Statement"))r=b;else break;else break}return d}function Fve(l,r){let o=l.baseIndentFor(r),f=l.lineAt(l.pos,-1),d=f.from+f.text.length;return/^\s*($|#)/.test(f.text)&&l.node.too?null:o+l.unit}const _ve=CR.define({name:"python",parser:kan.configure({props:[oZ.add({Body:l=>{var r;let o=/^\s*(#|$)/.test(l.textAfter)&&Bve(l)||l.node;return(r=Fve(l,o))!==null&&r!==void 0?r:l.continue()},MatchBody:l=>{var r;let o=Bve(l);return(r=Fve(l,o||l.node))!==null&&r!==void 0?r:l.continue()},IfStatement:l=>/^\s*(else:|elif )/.test(l.textAfter)?l.baseIndent:l.continue(),"ForStatement WhileStatement":l=>/^\s*else:/.test(l.textAfter)?l.baseIndent:l.continue(),TryStatement:l=>/^\s*(except[ :]|finally:|else:)/.test(l.textAfter)?l.baseIndent:l.continue(),MatchStatement:l=>/^\s*case /.test(l.textAfter)?l.baseIndent+l.unit:l.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":ave({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":ave({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":ave({closing:"]"}),MemberExpression:l=>l.baseIndent+l.unit,"String FormatString":()=>null,Script:l=>{var r;let o=Bve(l);return(r=o&&Fve(l,o))!==null&&r!==void 0?r:l.continue()}}),AOe.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":fsn,Body:(l,r)=>({from:l.from+1,to:l.to-(l.to==r.doc.length?0:1)}),"String FormatString":(l,r)=>({from:r.doc.lineAt(l.from).to,to:l.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Aan(){return new lvt(_ve,[_ve.data.of({autocomplete:xan}),_ve.data.of({autocomplete:Ean})])}var Man=["true","false","on","off","yes","no"],Pan=new RegExp("\\b(("+Man.join(")|(")+"))$","i");const Rbt={name:"yaml",token:function(l,r){var o=l.peek(),f=r.escaped;if(r.escaped=!1,o=="#"&&(l.pos==0||/\s/.test(l.string.charAt(l.pos-1))))return l.skipToEnd(),"comment";if(l.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(r.literal&&l.indentation()>r.keyCol)return l.skipToEnd(),"string";if(r.literal&&(r.literal=!1),l.sol()){if(r.keyCol=0,r.pair=!1,r.pairStart=!1,l.match("---")||l.match("..."))return"def";if(l.match(/^\s*-\s+/))return"meta"}if(l.match(/^(\{|\}|\[|\])/))return o=="{"?r.inlinePairs++:o=="}"?r.inlinePairs--:o=="["?r.inlineList++:r.inlineList--,"meta";if(r.inlineList>0&&!f&&o==",")return l.next(),"meta";if(r.inlinePairs>0&&!f&&o==",")return r.keyCol=0,r.pair=!1,r.pairStart=!1,l.next(),"meta";if(r.pairStart){if(l.match(/^\s*(\||\>)\s*/))return r.literal=!0,"meta";if(l.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(r.inlinePairs==0&&l.match(/^\s*-?[0-9\.\,]+\s?$/)||r.inlinePairs>0&&l.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(l.match(Pan))return"keyword"}return!r.pair&&l.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(r.pair=!0,r.keyCol=l.indentation(),"atom"):r.pair&&l.match(/^:\s*/)?(r.pairStart=!0,"meta"):(r.pairStart=!1,r.escaped=o=="\\",l.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}},jan=36,Lbt=1,Dan=2,yT=3,Hve=4,$an=5,Nan=6,Ian=7,Ran=8,Lan=9,Ban=10,Fan=11,_an=12,Han=13,qan=14,Qan=15,zan=16,Wan=17,Bbt=18,Kan=19,G3t=20,Y3t=21,Fbt=22,Van=23,Xan=24;function F3e(l){return l>=65&&l<=90||l>=97&&l<=122||l>=48&&l<=57}function Uan(l){return l>=48&&l<=57||l>=97&&l<=102||l>=65&&l<=70}function kx(l,r,o){for(let f=!1;;){if(l.next<0)return;if(l.next==r&&!f){l.advance();return}f=o&&!f&&l.next==92,l.advance()}}function Gan(l,r){e:for(;;){if(l.next<0)return;if(l.next==36){l.advance();for(let o=0;o)".charCodeAt(o);for(;;){if(l.next<0)return;if(l.next==f&&l.peek(1)==39){l.advance(2);return}l.advance()}}function _3e(l,r){for(;!(l.next!=95&&!F3e(l.next));)r!=null&&(r+=String.fromCharCode(l.next)),l.advance();return r}function Zan(l){if(l.next==39||l.next==34||l.next==96){let r=l.next;l.advance(),kx(l,r,!1)}else _3e(l)}function _bt(l,r){for(;l.next==48||l.next==49;)l.advance();r&&l.next==r&&l.advance()}function Hbt(l,r){for(;;){if(l.next==46){if(r)break;r=!0}else if(l.next<48||l.next>57)break;l.advance()}if(l.next==69||l.next==101)for(l.advance(),(l.next==43||l.next==45)&&l.advance();l.next>=48&&l.next<=57;)l.advance()}function qbt(l){for(;!(l.next<0||l.next==10);)l.advance()}function yx(l,r){for(let o=0;o!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:Z3t(edn,Jan)};function tdn(l,r,o,f){let d={};for(let b in H3e)d[b]=(l.hasOwnProperty(b)?l:H3e)[b];return r&&(d.words=Z3t(r,o||"",f)),d}function J3t(l){return new tL(r=>{var o;let{next:f}=r;if(r.advance(),yx(f,qve)){for(;yx(r.next,qve);)r.advance();r.acceptToken(jan)}else if(f==36&&l.doubleDollarQuotedStrings){let d=_3e(r,"");r.next==36&&(r.advance(),Gan(r,d),r.acceptToken(yT))}else if(f==39||f==34&&l.doubleQuotedStrings)kx(r,f,l.backslashEscapes),r.acceptToken(yT);else if(f==35&&l.hashComments||f==47&&r.next==47&&l.slashComments)qbt(r),r.acceptToken(Lbt);else if(f==45&&r.next==45&&(!l.spaceAfterDashes||r.peek(1)==32))qbt(r),r.acceptToken(Lbt);else if(f==47&&r.next==42){r.advance();for(let d=1;;){let b=r.next;if(r.next<0)break;if(r.advance(),b==42&&r.next==47){if(d--,r.advance(),!d)break}else b==47&&r.next==42&&(d++,r.advance())}r.acceptToken(Dan)}else if((f==101||f==69)&&r.next==39)r.advance(),kx(r,39,!0),r.acceptToken(yT);else if((f==110||f==78)&&r.next==39&&l.charSetCasts)r.advance(),kx(r,39,l.backslashEscapes),r.acceptToken(yT);else if(f==95&&l.charSetCasts)for(let d=0;;d++){if(r.next==39&&d>1){r.advance(),kx(r,39,l.backslashEscapes),r.acceptToken(yT);break}if(!F3e(r.next))break;r.advance()}else if(l.plsqlQuotingMechanism&&(f==113||f==81)&&r.next==39&&r.peek(1)>0&&!yx(r.peek(1),qve)){let d=r.peek(1);r.advance(2),Yan(r,d),r.acceptToken(yT)}else if(f==40)r.acceptToken(Ian);else if(f==41)r.acceptToken(Ran);else if(f==123)r.acceptToken(Lan);else if(f==125)r.acceptToken(Ban);else if(f==91)r.acceptToken(Fan);else if(f==93)r.acceptToken(_an);else if(f==59)r.acceptToken(Han);else if(l.unquotedBitLiterals&&f==48&&r.next==98)r.advance(),_bt(r),r.acceptToken(Fbt);else if((f==98||f==66)&&(r.next==39||r.next==34)){const d=r.next;r.advance(),l.treatBitsAsBytes?(kx(r,d,l.backslashEscapes),r.acceptToken(Van)):(_bt(r,d),r.acceptToken(Fbt))}else if(f==48&&(r.next==120||r.next==88)||(f==120||f==88)&&r.next==39){let d=r.next==39;for(r.advance();Uan(r.next);)r.advance();d&&r.next==39&&r.advance(),r.acceptToken(Hve)}else if(f==46&&r.next>=48&&r.next<=57)Hbt(r,!0),r.acceptToken(Hve);else if(f==46)r.acceptToken(qan);else if(f>=48&&f<=57)Hbt(r,!1),r.acceptToken(Hve);else if(yx(f,l.operatorChars)){for(;yx(r.next,l.operatorChars);)r.advance();r.acceptToken(Qan)}else if(yx(f,l.specialVar))r.next==f&&r.advance(),Zan(r),r.acceptToken(Wan);else if(yx(f,l.identifierQuotes))kx(r,f,!1),r.acceptToken(Kan);else if(f==58||f==44)r.acceptToken(zan);else if(F3e(f)){let d=_3e(r,String.fromCharCode(f));r.acceptToken(r.next==46||r.peek(-d.length-1)==46?Bbt:(o=l.words[d.toLowerCase()])!==null&&o!==void 0?o:Bbt)}})}const eOt=J3t(H3e),ndn=_R.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,nodeProps:[["isolate",-4,1,2,3,19,""]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,eOt],topRules:{Script:[0,25]},tokenPrec:0});function idn(l){return l==Y3t?"type":l==G3t?"keyword":"variable"}function rdn(l,r,o){let f=Object.keys(l).map(d=>o(r?d.toUpperCase():d,idn(l[d])));return O3t(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],wZ(f))}let sdn=ndn.configure({props:[oZ.add({Statement:osn()}),AOe.add({Statement(l,r){return{from:Math.min(l.from+100,r.doc.lineAt(l.from).to),to:l.to}},BlockComment(l){return{from:l.from+2,to:l.to-2}}}),rZ({Keyword:K.keyword,Type:K.typeName,Builtin:K.standard(K.name),Bits:K.number,Bytes:K.string,Bool:K.bool,Null:K.null,Number:K.number,String:K.string,Identifier:K.name,QuotedIdentifier:K.special(K.string),SpecialVar:K.special(K.name),LineComment:K.lineComment,BlockComment:K.blockComment,Operator:K.operator,"Semi Punctuation":K.punctuation,"( )":K.paren,"{ }":K.brace,"[ ]":K.squareBracket})]});class QY{constructor(r,o,f){this.dialect=r,this.language=o,this.spec=f}get extension(){return this.language.extension}configureLanguage(r,o){return new QY(this.dialect,this.language.configure(r,o),this.spec)}static define(r){let o=tdn(r,r.keywords,r.types,r.builtin),f=CR.define({name:"sql",parser:sdn.configure({tokenizers:[{from:eOt,to:J3t(o)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new QY(o,f,r)}}function odn(l,r){return{label:l,type:r,boost:-1}}function cdn(l,r=!1,o){return rdn(l.dialect.words,r,odn)}const tOt=new Map,Qbt=" ",ldn=function(r,o,f,d={types:"",keywords:""},b){const p=d.keywords+" coalesce sum count avg min max cast round",v=d.types+" string",O=udn(b),A=QY.define({keywords:(p+Qbt+"path threshold jinja_query_begin number_of_rows jinja_end not_null forall criteria length unique_values interval_unit unique_key columns grain grains references metric tags audit model name kind owner cron start storage_format time_column partitioned_by pre post batch_size audits dialect").toLowerCase(),types:(v+Qbt+"expression seed full incremental_by_time_range incremental_by_unique_key view embedded").toLowerCase()});nOt();const j=function(L){L.data.topic};return tOt.set("message",j),twt.addEventListener("message",j),new lvt(A.language,[A.language.data.of({autocomplete($){const L=$.matchBefore(/[A-Za-z0-9_.]*\.(\w+)?\s*$/i);if(Ms(L)){const Re=L.text.split("."),ft=Re.pop(),st=Re.join("."),at=r.get(st)??r.get(L.text);let ut=f,le=SUt(ft)?L.to:L.to-L.text.length;return Ms(at)?ut=at.columns.map(Ze=>({label:Ze.name,type:"column"})):zve(o,L.text)&&(ut=o.filter(Ze=>Ze.label.startsWith(L.text)),le=L.from),{from:le,to:L.to,options:ut}}const z=$.matchBefore(/\w*$/);if(Yi(z)||(z==null?void 0:z.from)===(z==null?void 0:z.to)&&!$.explicit)return;const Z=Qve($,"kind"),Y=Qve($,"dialect"),ne=Qve($,"model"),he=$.state.doc.toJSON().join(` +`),se=he.match(/MODEL \(([\s\S]+?)\);/g)??[];if(se.filter(Re=>Re.includes(z.text)).map(Re=>[he.indexOf(Re),he.indexOf(Re)+Re.length]).some(([Re,ft])=>$.pos>=Re&&$.pos<=ft)){let Re=O.get("keywords");return Ms(Z)?Re=O.get("kind"):Ms(Y)&&(Re=O.get("dialect")),wZ(Re??[])($)}let Ce=[];Ms(ne)&&xUt(se)&&(Ce=[{label:"model",type:"keyword",apply:`MODEL ( +\r);`}]),zve(o,z.text)&&Ce.push(...o),zve(f,z.text)&&Ce.push(...f);const Ie=z.text.trim().slice(-1),nt=cdn(A,Ie===Ie.toUpperCase())($);if(Ms(nt)){const Re=nt.options??[];nt.options=Re.concat(Ce),nt.map=()=>null}return nt}})])};function nOt(){const l=tOt.get("message");Yi(l)||twt.removeEventListener("message",l)}function udn(l=[]){return new Map([["kind",[{label:"FULL",type:"keyword",apply:"FULL,"},{label:"INCREMENTAL_BY_TIME_RANGE",type:"keyword",apply:"INCREMENTAL_BY_TIME_RANGE ()"},{label:"INCREMENTAL_BY_UNIQUE_KEY",type:"keyword",apply:"INCREMENTAL_BY_UNIQUE_KEY ()"},{label:"VIEW",type:"keyword",apply:"VIEW,"},{label:"SEED",type:"keyword",apply:"SEED ()"},{label:"EMBEDDED",type:"keyword",apply:"EMBEDDED, "}]],["dialect",l.map(r=>({label:r,type:"keyword",apply:`${r}, `}))],["keywords",[{label:"from",type:"keyword",apply:"from "},{label:"model",type:"keyword",apply:`MODEL ( +\r)`},{label:"name",type:"keyword",apply:"name ,"},{label:"kind",type:"keyword",apply:"kind "},{label:"dialect",type:"keyword",apply:"dialect "}]]])}function Qve(l,r){return l.matchBefore(new RegExp(`${r}\\s*(?=\\S)([^ ]+)`,"i"))}function zve(l,r){return l.some(o=>o.label.toLowerCase().includes(r.toLowerCase()))}class fdn{diff(r,o,f={}){let d;typeof f=="function"?(d=f,f={}):"callback"in f&&(d=f.callback);const b=this.castInput(r,f),p=this.castInput(o,f),v=this.removeEmpty(this.tokenize(b,f)),O=this.removeEmpty(this.tokenize(p,f));return this.diffWithOptionsObj(v,O,f,d)}diffWithOptionsObj(r,o,f,d){var b;const p=ne=>{if(ne=this.postProcess(ne,f),d){setTimeout(function(){d(ne)},0);return}else return ne},v=o.length,O=r.length;let C=1,T=v+O;f.maxEditLength!=null&&(T=Math.min(T,f.maxEditLength));const A=(b=f.timeout)!==null&&b!==void 0?b:1/0,j=Date.now()+A,$=[{oldPos:-1,lastComponent:void 0}];let L=this.extractCommon($[0],o,r,0,f);if($[0].oldPos+1>=O&&L+1>=v)return p(this.buildValues($[0].lastComponent,o,r));let z=-1/0,Z=1/0;const Y=()=>{for(let ne=Math.max(z,-C);ne<=Math.min(Z,C);ne+=2){let he;const se=$[ne-1],ve=$[ne+1];se&&($[ne-1]=void 0);let Ce=!1;if(ve){const nt=ve.oldPos-ne;Ce=ve&&0<=nt&&nt=O&&L+1>=v)return p(this.buildValues(he.lastComponent,o,r))||!0;$[ne]=he,he.oldPos+1>=O&&(Z=Math.min(Z,ne-1)),L+1>=v&&(z=Math.max(z,ne+1))}C++};if(d)(function ne(){setTimeout(function(){if(C>T||Date.now()>j)return d(void 0);Y()||ne()},0)})();else for(;C<=T&&Date.now()<=j;){const ne=Y();if(ne)return ne}}addToPath(r,o,f,d,b){const p=r.lastComponent;return p&&!b.oneChangePerToken&&p.added===o&&p.removed===f?{oldPos:r.oldPos+d,lastComponent:{count:p.count+1,added:o,removed:f,previousComponent:p.previousComponent}}:{oldPos:r.oldPos+d,lastComponent:{count:1,added:o,removed:f,previousComponent:p}}}extractCommon(r,o,f,d,b){const p=o.length,v=f.length;let O=r.oldPos,C=O-d,T=0;for(;C+1j.length?L:j}),T.value=this.join(A)}else T.value=this.join(o.slice(O,O+T.count));O+=T.count,T.added||(C+=T.count)}}return d}}class hdn extends fdn{}const adn=new hdn;function ddn(l,r,o){return adn.diff(l,r,o)}function gdn({type:l,dialect:r="",content:o="",className:f,keymaps:d,extensions:b,onChange:p}){const{mode:v}=AUt(),O=KY(nt=>nt.models),C=Sx(nt=>nt.engine),T=Sx(nt=>nt.dialects),[A,j]=Ne.useState(),[$,L]=Ne.useState(),z=Ne.useCallback(nt=>{nt.data.topic==="dialect"&&L(nt.data.payload)},[]),Z=Ne.useMemo(()=>[D3t({selectOnOpen:!1,maxRenderedOptions:50}),v===MUt.Dark?thn:nhn,l===QI.PY&&Aan(),l===QI.YAML&&CY.define(Rbt),l===QI.YML&&CY.define(Rbt)].filter(Boolean),[l,v]),Y=Ne.useMemo(()=>T.map(nt=>nt.dialect_title),[T]),ne=Ne.useMemo(()=>{const nt=[lyt,Rvt,...d??[],[{key:"Tab",preventDefault:!0,run(Re){return Yi(ffn(Re.state))?IOe(Re):C3t(Re)}}]].flat().reduce((Re,ft)=>(Ms(ft.key)&&(Re[ft.key]=ft),Re),{});return sE.of(Object.values(nt))},[d]),he=Ne.useMemo(()=>Array.from(O.values()),[O]),se=Ne.useMemo(()=>he.map(nt=>({label:nt.name,type:"model"})),[he]),ve=Ne.useMemo(()=>Array.from(new Set(he.flatMap(nt=>nt.columns.map(Re=>Re.name)))).map(nt=>({label:nt,type:"column"})),[he]),Ce=Ne.useMemo(()=>[Mi.lineWrapping,...Z,b,l===QI.SQL&&ldn(O,se,ve,$,Y),ne].filter(Boolean).flat(),[O,l,Y,$,Z,b,ne,se,ve]);Ne.useEffect(()=>(C.postMessage({topic:"dialects"}),()=>{nOt()}),[]),Ne.useEffect(()=>(C.addEventListener("message",z),()=>{C.removeEventListener("message",z)}),[z]),Ne.useEffect(()=>{C.postMessage({topic:"dialect",payload:r})},[r]),Ne.useEffect(()=>{Ie(o)},[A,o,Ce]);function Ie(nt=""){if(Yi(A))return;const ft=A.state.doc.toString();if(ft===nt)return;const st=[];if(ft===NUt)st.push({from:0,to:0,insert:nt});else{const at=ddn(ft,nt);let ut=0;at.forEach(le=>{const Ze=le.count??0;if(Ms(le.removed)){const it=ut+Ze,Tt={from:ut,to:it};ut=it,st.push(Tt)}else Ms(le.added)?st.push({from:ut,to:ut,insert:le.value}):ut=ut+Ze})}A.dispatch({changes:st,scrollIntoView:!0})}return Ci.jsx("div",{className:Tu("flex w-full h-full",f),children:Ci.jsx(F3t,{height:"100%",width:"100%",className:Tu("flex w-full h-full font-mono text-xs",f),indentWithTab:!1,extensions:Ce,onChange:p,readOnly:Yi(p),onCreateEditor:j,basicSetup:{autocompletion:!1,defaultKeymap:!1},autoFocus:!0})})}function A1n({path:l,children:r,keymaps:o}){const f=CUt(),d=Xve($=>$.files),b=Xve($=>$.refreshFiles),{refetch:p,isFetching:v,cancel:O}=TUt(l),C=EUt(f),T=Ne.useCallback(Ybt(function(L){C.mutate({path:l,body:{content:L.state.doc.toString()}})},500,!0),[l]),A=Ne.useMemo(()=>(o??[]).concat([{key:"Mod-s",preventDefault:!0,run($){return T($),!0}}]),[o,T]);Ne.useEffect(()=>(p().then(({data:$})=>{if(Yi($))return;const L=d.get($.path);Yi(L)?d.set(l,new $Ut($)):L.update($),b(Array.from(d.values()))}),()=>{O()}),[l]);const j=d.get(l);return v?Ci.jsx("div",{className:"flex justify-center items-center w-full h-full",children:Ci.jsxs(Zbt,{className:"inline-block",children:[Ci.jsx(Jbt,{className:"w-5 h-5 border border-neutral-10 mr-4"}),Ci.jsx("h3",{className:"text-xl",children:"Waiting for File..."})]})}):Yi(j)?Ci.jsx("div",{className:"flex justify-center items-center w-full h-full",children:Ci.jsx("h3",{className:"text-xl",children:"File Not Found"})}):r({file:j,keymaps:A})}function pdn(l,r){var d;if(Yi(l.target))return;const o=l.target,f=o.getAttribute("model")??((d=o.parentElement)==null?void 0:d.getAttribute("model"));if(!Yi(f))return r.get(f)}function bdn(l,r){var d;if(Yi(l.target))return;const o=l.target,f=o.getAttribute("column")??((d=o.parentElement)==null?void 0:d.getAttribute("column"));if(!Yi(f))return r.columns.find(b=>b.name===f)}function zbt(l,r,o,f,d){const b=[],p=Array.from(o),O=Array.from(new Set(l.values())).map(j=>j.name),C=(d==null?void 0:d.columns.map(j=>j.name.toLowerCase()))??[],T=new Set([".","(","["," ",` +`]),A=new Set([":",")",",","]"," ",` +`]);for(const j of r.visibleRanges)Wbt(O,r.state.doc.sliceString(j.from,j.to),j,({from:$,to:L,name:z})=>{b.push(wdn({model:z,isActionMode:f,isActiveModel:(d==null?void 0:d.name)===z}).range($,L))}),Wbt(Yi(d)?p:C,r.state.doc.sliceString(j.from,j.to),j,({from:$,to:L,key:z})=>{const Z=r.state.doc.sliceString($,L),Y=r.state.doc.sliceString($-1,L+1),ne=r.state.doc.sliceString($-1,$),he=r.state.doc.sliceString(L,L+1);Ms(ne)&&Ho(T.has(ne))||Ms(he)&&Ho(A.has(he))||b.push(mdn({column:Z,isOriginalColumn:vdn(Y),isActiveModel:C.includes(z),isActionMode:f}).range($,L))});return cs.set(b.sort((j,$)=>j.from-$.from))}function Wbt(l,r,o,f){const d=new Set;for(const b of l){const p=b.toLowerCase();if(d.has(p))continue;d.add(p);const v=new RegExp(`\\b${b}\\b`,"ig"),O=new RegExp(`\\b${ydn(b)}\\b`,"ig");let C;for(;Ms(C=O.exec(r)??v.exec(r));){const T=o.from+C.index,A=T+C[0].length,j={from:T,to:A,name:b,key:p};Ms(f)&&f(j)}}}function wdn({model:l,isActionMode:r,isActiveModel:o}){return cs.mark({attributes:{class:Tu("sqlmesh-model",o&&"--is-active-model",r&&"--is-action-mode"),model:l}})}function mdn({column:l,isOriginalColumn:r,isActionMode:o,isActiveModel:f}){return cs.mark({attributes:{class:Tu("sqlmesh-model__column",r?"--is-original":"--is-alias",f&&"--is-active-model",o&&"--is-action-mode"),column:l}})}function vdn(l){return l.startsWith(".")||l.endsWith(":")||l.startsWith("(")||l.endsWith(")")}function ydn(l){return l.includes('"')?l:l.split(".").map(r=>`"${r}"`).join(".")}function Odn(l,r,o,f){return Qa.fromClass(class{constructor(b){H1t(this,"decorations",cs.set([]));this.view=b,this.decorations=zbt(l,b,r,o,f)}update(b){this.decorations=zbt(l,b.view,r,o,f)}},{decorations:d=>d.decorations})}function Wve(l){return Mi.domEventHandlers(l)}function kdn(l){return yrn((r,o,f)=>{const{from:d,to:b,text:p}=r.state.doc.lineAt(o);let v=o,O=o;for(;v>d&&/\w|\./.test(p[v-d-1]);)v--;for(;O0)return null;const C=r.state.doc.sliceString(v,O),T=l.get(C);return Yi(T)?null:{pos:v,end:O,above:!0,create(){const A=document.createElement("div"),j=` +
+ Model Name: + ${T.name} +
+ `;return A.className="text-xs font-bold px-3 py-3 bg-white border-2 border-secondary-100 rounded outline-none shadow-lg mb-2",A.innerHTML=j,{dom:A}}}},{hoverTime:50})}function P1n(){const l=KY(C=>C.addConfirmation),r=Sx(C=>C.tab),o=Sx(C=>C.selectTab),f=Sx(C=>C.closeTab),d=Sx(C=>C.createTab),b=Sx(C=>C.addTab),p=r==null?void 0:r.file,v=Ne.useCallback(function(){Yi(p)||(PUt(p.isChanged)?l({headline:"Closing Tab",description:"All unsaved changes will be lost. Do you want to close the tab anyway?",yesText:"Yes, Close Tab",noText:"No, Cancel",action:()=>{f(p)}}):f(p))},[p]);return Ne.useMemo(()=>Yi(p)?[]:[{key:"Shift-Mod-.",preventDefault:!0,run(){const C=d();return b(C),o(C),!0}},{key:"Shift-Mod-,",preventDefault:!0,run(){return v(),!0}}],[p,o,f,d,b])}function Sdn(l,r,o){const{lineage:f}=nL(),d=KY(T=>T.models),b=Xve(T=>T.files),p=Yi(l)?void 0:d.get(l),[v,O]=Ne.useState(!1);return Ne.useMemo(()=>{const T=new Set(Yi(f)||ewt(f)?Array.from(new Set(d.values())).flatMap($=>$.columns.map(L=>L.name)):Object.keys(f).flatMap($=>{var L;return(L=d.get($))==null?void 0:L.columns.map(z=>z.name)}).filter(Boolean));function A($){if($.metaKey){const L=pdn($,d);if(Yi(L))return;r==null||r(L)}}function j($){if($.metaKey){if(Yi(p))return;const L=bdn($,p);if(Yi(L))return;o==null||o(p,L)}}return[d.size>0&&v&&kdn(d),Wve({keydown:$=>{$.metaKey&&O(!0)},keyup:$=>{Ho($.metaKey)&&O(!1)}}),Ms(r)&&Wve({click:A}),Ms(o)&&Wve({click:j}),Odn(d,T,v,p)].filter(Boolean)},[r,o,p,d,b,v])}function xdn({nodeId:l,columns:r,disabled:o,className:f,limit:d=5,withHandles:b=!1,withSource:p=!1,withDescription:v=!0,maxHeight:O="50vh"}){const{mainNode:C,connections:T,isActiveColumn:A,setConnections:j,manuallySelectedColumn:$,setManuallySelectedColumn:L,setLineage:z,removeActiveEdges:Z,addActiveEdges:Y,lineage:ne,lineageCache:he,setLineageCache:se}=nL(),[ve=[],Ce=[]]=Ne.useMemo(()=>{const ft=[],st=[];return r.forEach(at=>{A(l,at.name)?ft.push(at):st.push(at)}),[ft,st]},[l,r,A]);function Ie(ft={}){let st=he,at,ut;if(Yi(he)){const Tt=Yi(C)?void 0:ne[C]??(he==null?void 0:he[C]);st=ne,at=new Map,ut=Yi(C)||Yi(Tt)?{}:{[C]:{models:[]}}}else at=T,ut=structuredClone(ne);const{connections:le,activeEdges:Ze}=jdn(at,ft);le.size===0&&Ze.length===0?(ut=structuredClone(ne),st=void 0):(j(le),Y(Ze));const it=Pdn(ut,ft);se(st),z(it)}const nt=Ne.useCallback(function(st){if(Yi($))return!1;const[at,ut]=$;return Yi(at)||Yi(ut)?!1:at.name===l&&ut.name===st},[l,$]),Re=Ne.useCallback(function(st){const at=new Set;Z(ut(st,th.Left).concat(ut(st,th.Right))),T.size===0&&Ms(he)&&(z(he),se(void 0)),j(T);function ut(le,Ze){var Tt;if(at.has(le))return[];const it=((Tt=T.get(le))==null?void 0:Tt[Ze])??[];return T.delete(le),at.add(le),it.map(X=>[Ze===th.Left?[Ec(th.Left,le),Ec(th.Right,X)]:[Ec(th.Left,X),Ec(th.Right,le)]].concat(ut(X,Ze))).flat()}},[Z,T]);return Ci.jsxs("div",{className:Tu("overflow-hidden",f),children:[nR(ve)&&Ci.jsx("div",{className:Tu("w-full h-full overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical border-b border-t border-neutral-10",b&&"w-full cursor-default"),children:ve.map(ft=>{var st,at,ut,le,Ze;return Ci.jsx(Kve,{id:Ec(l,ft.name),nodeId:l,column:ft,disabled:o,updateColumnLineage:Ie,removeEdges:Re,isActive:!0,hasLeft:nR((st=T.get(Ec(l,ft.name)))==null?void 0:st.left),hasRight:nR((at=T.get(Ec(l,ft.name)))==null?void 0:at.right),selectManually:nt(ft.name)?L:void 0,withHandles:b,withDescription:v,expression:p?(ut=Hp(ne,l,ft.name))==null?void 0:ut.expression:void 0,source:p?(le=Hp(ne,l,ft.name))==null?void 0:le.source:void 0,isEmpty:Ms(Hp(ne,l,ft.name))&&Object.keys(((Ze=Hp(ne,l,ft.name))==null?void 0:Ze.models)??{}).length===0,className:"border-t border-neutral-10 first:border-0"},Ec(l,ft.name))})}),Ce.length<=d&&Ci.jsx("div",{className:Tu("w-full h-full overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical py-2",b&&"w-full cursor-default"),children:Ce.map(ft=>{var st,at,ut;return Ci.jsx(Kve,{id:Ec(l,ft.name),nodeId:l,column:ft,disabled:o,updateColumnLineage:Ie,removeEdges:Re,isActive:!1,hasLeft:!1,hasRight:!1,selectManually:nt(ft.name)?L:void 0,withHandles:b,withDescription:v,expression:p?(st=Hp(ne,l,ft.name))==null?void 0:st.expression:void 0,source:p?(at=Hp(ne,l,ft.name))==null?void 0:at.source:void 0,isEmpty:Ms(Hp(ne,l,ft.name))&&Object.keys(((ut=Hp(ne,l,ft.name))==null?void 0:ut.models)??{}).length===0,className:"border-t border-neutral-10 first:border-0 rounded-md"},Ec(l,ft.name))})}),Ce.length>d&&Ci.jsx("div",{className:Tu("w-full h-full overflow-hidden overflow-y-auto hover:scrollbar scrollbar--vertical pb-2",b&&"w-full cursor-default"),style:{height:O},children:Ci.jsx(IUt,{keyId:"name",keyName:"name",items:Ce,withCounter:!1,withFilter:Ce.length>d,disabled:o,listItem:({disabled:ft,item:st})=>{var at,ut,le;return Ci.jsx(Kve,{id:Ec(l,st.name),nodeId:l,column:st,disabled:ft,updateColumnLineage:Ie,removeEdges:Re,isActive:!1,hasLeft:!1,hasRight:!1,selectManually:nt(st.name)?L:void 0,withHandles:b,withDescription:v,expression:p?(at=Hp(ne,l,st.name))==null?void 0:at.expression:void 0,source:p?(ut=Hp(ne,l,st.name))==null?void 0:ut.source:void 0,isEmpty:Ms(Hp(ne,l,st.name))&&Object.keys(((le=Hp(ne,l,st.name))==null?void 0:le.models)??{}).length===0,className:"border-t border-neutral-10 first:border-0 rounded-md"},Ec(l,st.name))}})})]})}function Kve({id:l,nodeId:r,column:o,className:f,disabled:d=!1,isActive:b=!1,hasLeft:p=!1,hasRight:v=!1,isEmpty:O=!1,updateColumnLineage:C,removeEdges:T,selectManually:A,withHandles:j=!1,withDescription:$=!0,source:L,expression:z}){const{refetch:Z,isFetching:Y,isError:ne,isTimeout:he}=jUt(r,o.name);Ne.useEffect(()=>{Yi(A)||(se(),A(void 0))},[A]);function se(){d||(b?T(l):Z().then(({data:Ce})=>C(Ce??{})))}const ve=j&&(p||v);return Ci.jsx("div",{className:Tu("transition-colors duration-200 cursor-pointer",d?"cursor-not-allowed":"hover:bg-neutral-5",b&&"bg-neutral-5",ve?"px-0 py-0.5":"px-2 py-0.5",f),onClick:Ybt(se,500,!0),children:Ci.jsx("div",{className:"flex w-full items-center relative",children:ve?Ci.jsxs(Cdn,{id:l,nodeId:r,hasLeft:p,hasRight:v,disabled:d,className:"px-2",children:[Ms(L)&&Ci.jsx(Tdn,{source:L,expression:z}),Ci.jsx(Vbt,{isFetching:Y,isError:ne,isTimeout:he}),Ci.jsx(Kbt,{columnName:o.name,columnType:o.type,columnDescription:o.description,disabled:d,withDescription:$,className:Tu(ne?"text-danger-500":he?"text-warning-500":O?"text-neutral-400 dark:text-neutral-600":"text-prose")})]}):Ci.jsxs(Ci.Fragment,{children:[Ci.jsx(Vbt,{isFetching:Y,isError:ne,isTimeout:he}),Ci.jsx(Kbt,{columnName:o.name,columnType:o.type,columnDescription:o.description,disabled:d,withDescription:$,className:Tu(ne?"text-danger-500":he?"text-warning-500":O?"text-neutral-400 dark:text-neutral-600":"text-prose")})]})})})}function Cdn({nodeId:l,id:r,hasLeft:o=!1,hasRight:f=!1,disabled:d=!1,children:b,className:p}){const v=Mtn();return Ne.useEffect(()=>{setTimeout(()=>{v(l)},100)},[o,f]),Ci.jsxs("div",{className:Tu("flex w-full items-center",d?"cursor-not-allowed":"inherit",p),children:[o&&Ci.jsx(w4,{type:"target",id:Ec(th.Left,r),position:Ai.Left,isConnectable:!1,className:"w-2 h-2 rounded-full"}),b,f&&Ci.jsx(w4,{type:"source",id:Ec(th.Right,r),position:Ai.Right,isConnectable:!1,className:"w-2 h-2 rounded-full"})]})}function Kbt({columnName:l,columnType:r,columnDescription:o,className:f,disabled:d=!1,withDescription:b=!0}){let p=l;try{p=decodeURI(l)}catch{}return Ci.jsxs("div",{className:Tu("block w-full",d?"cursor-not-allowed":"inherit",f),children:[Ci.jsxs("div",{className:"w-full flex justify-between items-center",children:[Ci.jsxs("span",{title:p,className:Tu("flex items-center",d&&"opacity-50"),children:[d&&Ci.jsx(WUt,{title:"No column level lineage for Python models",className:"w-3 h-3 mr-2"}),Vve(p,50,20)]}),Ci.jsx("span",{title:r,className:"inline-block ml-2 text-[0.6rem] font-black opacity-60",children:Vve(r,20,10)})]}),Ms(o)&&b&&Ci.jsx("p",{className:"block opacity-60 text-[0.65rem]",children:o})]})}function Vbt({isFetching:l=!1,isError:r=!1,isTimeout:o=!1}){return Ci.jsxs(Ci.Fragment,{children:[l&&Ci.jsx(Zbt,{className:"inline-block mr-1",children:Ci.jsx(Jbt,{className:"w-3 h-3 border border-neutral-10"})}),o&&Ho(l)&&Ci.jsx(BUt,{className:"w-4 h-4 text-warning-500 mr-1"}),r&&Ho(l)&&Ci.jsx(_Ut,{className:"w-4 h-4 text-danger-500 mr-1"})]})}function Tdn({source:l,expression:r}){const o=Ne.useRef(null),{handleClickModel:f}=nL(),d=Sdn(void 0,O=>{f==null||f(O.name)}),[b,p]=Ne.useState(!1);Ne.useEffect(()=>{b&&v()},[b,r]);function v(){setTimeout(()=>{var C,T,A;const O=Array.from(((T=(C=o.current)==null?void 0:C.querySelector('[role="textbox"].cm-content'))==null?void 0:T.children)??[]);for(const j of O)if(((A=j.textContent)==null?void 0:A.trim())===r){j.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}),setTimeout(()=>j.classList.add("sqlmesh-expression"),500);return}},300)}return Ci.jsxs(Q1t,{onMouseLeave:()=>p(!1),onMouseOver:()=>p(!0),className:"flex",children:[Ci.jsx(qUt,{className:Tu("inline-block mr-3 w-4 h-4",b?"text-inherit":"text-prose")}),Ci.jsx(RUt,{show:b,as:Ne.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 -translate-y-[40%]",enterTo:"opacity-100 -translate-y-[50%]",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 -translate-y-[50%]",leaveTo:"opacity-0 -translate-y-[40%]",children:Ci.jsx(Q1t.Panel,{ref:o,className:"fixed -translate-x-[100%] -translate-y-[50%] z-10 content transform cursor-pointer rounded-lg bg-theme border-4 border-neutral-200 dark:border-neutral-600",onClick:O=>O.stopPropagation(),children:Ci.jsx(gdn,{content:l,type:QI.SQL,className:"w-full h-[25rem] text-xs rounded-lg scrollbar scrollbar--vertical scrollbar--horizontal overflow-auto max-w-[40rem]",extensions:d})})})]})}function Hp(l,r,o){var f,d;return(d=(f=l==null?void 0:l[r])==null?void 0:f.columns)==null?void 0:d[encodeURI(o)]}const _a={...DUt,cte:"cte",unknown:"unknown"},$G={UNKNOWN:"UNKNOWN",STRUCT:"STRUCT"};function j1n({id:l,data:r,sourcePosition:o,targetPosition:f}){const d=r??{},{connections:b,models:p,handleClickModel:v,lineage:O,lineageCache:C,selectedNodes:T,setSelectedNodes:A,mainNode:j,withConnected:$,connectedNodes:L,highlightedNodes:z,activeNodes:Z}=nL(),Y=Ne.useMemo(()=>{var Pi;const In=p.get(l),Bn=(In==null?void 0:In.columns)??[];return Object.keys(((Pi=O[l])==null?void 0:Pi.columns)??{}).forEach(dr=>{const Ir=Bn.find(({name:io})=>{try{return io===decodeURI(dr)}catch{return io===dr}});Yi(Ir)&&Bn.push({name:dr,type:$G.UNKNOWN})}),Bn.forEach(dr=>{let Ir=dr.type??$G.UNKNOWN;Ir.startsWith($G.STRUCT)&&(Ir=$G.STRUCT),dr.type=Ir}),Bn},[l,p,O]),ne=Ne.useMemo(()=>Object.values(z).flat(),[z]),[he,se]=Ne.useState(!1),ve=Ne.useCallback(In=>{In.stopPropagation(),v==null||v(l)},[v,l,r.isInteractive]),Ce=Ne.useCallback(In=>{In.stopPropagation(),!(ne.includes(l)||j===l)&&A(Bn=>(Bn.has(l)?Bn.delete(l):Bn.add(l),new Set(Bn)))},[A,ne]),Ie=z["*"],nt=Y.some(({name:In})=>b.get(Ec(l,In))),Re=Object.keys(z).length>0,ft=Object.keys(z).find(In=>z[In].includes(l)),st=j===l,at=ne.includes(l),ut=T.has(l),le=d.type===_a.sql,Ze=d.type===_a.cte,it=d.type===_a.external,Tt=d.type===_a.seed,X=d.type===_a.unknown,Je=(nt||d.withColumns||he||ut||st)&&nR(Y)&&Ho(Re),Nt=T.size>0||Z.size>0||$?ut||Z.has(l)||$&&L.has(l):L.has(l),Kt=j!==l&&Ms(v)&&Ho(Ze)&&Ho(X),Ut=Ho(le);return Ci.jsxs("div",{onMouseEnter:()=>se(!0),onMouseLeave:()=>se(!1),className:Tu("text-xs font-semibold border-4",he?"z-50":"z-1",Je?"rounded-xl":"rounded-2xl",(Re?at:Nt)||st?"opacity-100":"opacity-40 hover:opacity-100",Yi(ft)?Re?Ie:[Ze?"border-accent-500 bg-accent-500 text-accent-500 dark:border-accent-300 dark:bg-accent-300 dark:text-accent-300":X?"border-neutral-500 bg-neutral-500 text-neutral-500 dark:border-neutral-300 dark:bg-neutral-300 dark:text-neutral-300":"border-secondary-500 bg-secondary-500 text-secondary-500 dark:bg-primary-500 dark:border-primary-500 dark:text-primary-500",st?"ring-8 ring-brand-50":it||Tt?"ring-8 ring-accent-50":""]:ft,ut&&Ze?"ring-8 ring-accent-50":ut&&X?"ring-8 ring-neutral-50":ut&&"ring-8 ring-secondary-50 dark:ring-primary-50"),style:{maxWidth:Yi(d.width)?"auto":`${d.width}px`},children:[Ci.jsx(Ptn,{id:l,type:d.type,label:d.label,isSelected:ut,isDraggable:!0,className:Tu("bg-theme-lighter",Je?"rounded-t-[8px]":"rounded-xl"),hasLeft:f===Ai.Left&&Yi(C),hasRight:o===Ai.Right&&Yi(C),handleClick:Kt?ve:void 0,handleSelect:j===l||Ze||Re||Ms(C)?void 0:Ce,count:Re?void 0:Y.length}),Je&&Ci.jsx(xdn,{className:"nowheel rounded-b-lg bg-theme-lighter text-xs",nodeId:l,columns:Y,disabled:Ut,withHandles:!0,withSource:!0,withDescription:!1,maxHeight:"10rem"})]})}function D1n({nodesMap:l,nodes:r=[],edges:o=[]}){const f=new XUt;return{terminate:()=>f.worker.terminate(),create:async()=>new Promise((d,b)=>{f.layout({id:"root",layoutOptions:{"elk.algorithm":"layered","elk.layered.layering.strategy":"NETWORK_SIMPLEX","elk.layered.crossingMinimization.strategy":"INTERACTIVE","elk.direction":"RIGHT","elk.layered.considerModelOrder.strategy":"PREFER_NODES","elk.layered.nodePlacement.strategy":"SIMPLE"},children:r.map(p=>({id:p.id,width:p.data.width,height:p.data.height})),edges:o.map(p=>({id:p.id,sources:[p.source],targets:[p.target]}))}).then(p=>d({edges:o,nodes:Adn(p.children,l)})).catch(b)})}}function $1n(l={}){const r=Object.keys(l),o=[];for(const f of r){const d=l[f];d.models.forEach(b=>{o.push(Xbt(b,f))});for(const b in d.columns){const p=d.columns[b];if(!(Yi(p)||Yi(p.models)))for(const v in p.models){const O=p.models[v];if(!Yi(O))for(const C of O){const T=Ec(th.Right,v,C),A=Ec(th.Left,f,b);o.push(Xbt(v,f,T,A,!0,{columnSource:C,columnTarget:b}))}}}}return o}function Edn({lineage:l,models:r,unknownModels:o,withColumns:f}){if(Yi(l))return{};const d=64,b=24,p=8,v=5,O=new Set(Object.values(l).flatMap($=>$.models));return Object.keys(l).reduce(($,L)=>{var se,ve,Ce;const z=r.get(L),Z=Mdn(L,{label:(z==null?void 0:z.displayName)??L,withColumns:f,type:Ms(z)?z.type:o.has(L)?_a.unknown:_a.cte}),Y=f?((ve=(se=r.get(L))==null?void 0:se.columns)==null?void 0:ve.length)??0:0,ne=Math.min(T(L,Y===0),320),he=A(Y);return Z.data.width=ne+d*3,Z.data.height=f?he+d*2:d,nR((Ce=l[Z.id])==null?void 0:Ce.models)&&(Z.targetPosition=Ai.Left),O.has(Z.id)&&(Z.sourcePosition=Ai.Right),$[L]=Z,$},{});function T($,L=!1){var Y;const z=$.length*p,Z=((Y=r.get($))==null?void 0:Y.columns)??[];return L?Math.max(...Z.map(j),z):z}function A($){return b*Math.min($,v)+d}function j($){return($.name.length+$.type.length)*p+d}}function Adn(l=[],r){const o=[];return l.forEach(f=>{const d=r[f.id];Yi(d)||(Ms(f.x)&&d.position.x===0&&(d.position.x=f.x),Ms(f.y)&&d.position.y===0&&(d.position.y=f.y),o.push(d))}),o}function Mdn(l,r,o={x:0,y:0},f=!1){return{id:l,dragHandle:".drag-handle",type:"model",position:o,hidden:f,data:r,connectable:!1,selectable:!1,deletable:!1,focusable:!1,zIndex:-1}}function Xbt(l,r,o,f,d=!1,b){const p={id:Ec(l,r,o,f),source:l,target:r,hidden:d,data:b,type:"smoothstep",style:{strokeWidth:Yi(o)||Yi(f)?2:4}};return o!=null&&(p.sourceHandle=o),f!=null&&(p.targetHandle=f),p}function Pdn(l={},r={}){for(const o in r){const f=encodeURI(o);Yi(l[f])&&(l[f]={columns:{},models:[]});const d=l[f],b=r[o];for(const p in b){const v=encodeURI(p),O=b[p];if(Yi(d.columns)&&(d.columns={}),d.columns[v]={expression:O.expression,source:O.source,models:{}},ewt(O.models))continue;const T=d.columns[v].models;for(const A in O.models){const j=encodeURI(A),$=T[j],L=O.models[A];T[j]=Array.from(new Set(Yi($)?L:$.concat(L))).map(encodeURI)}}}return l}function jdn(l,r={}){const o=[];for(const f in r){const d=encodeURI(f),b=r[f];for(const p in b){const v=encodeURI(p),O=b[p];if(Yi(O==null?void 0:O.models))continue;const C=Ec(d,v),T=l.get(C)??{left:[],right:[]};Object.entries(O.models).forEach(([A,j])=>{const $=encodeURI(A);j.forEach(L=>{const z=encodeURI(L),Z=Ec($,z),Y=l.get(Z)??{left:[],right:[]};Y.right=Array.from(new Set(Y.right.concat(C))),T.left=Array.from(new Set(T.left.concat(Z))),l.set(Z,Y),l.set(C,T),Y.left.forEach(ne=>{o.push([Ec(th.Left,Z),Ec(th.Right,ne)])}),Y.right.forEach(ne=>{o.push([Ec(th.Left,ne),Ec(th.Right,Z)])})})})}}return{connections:l,activeEdges:o}}function N1n(l={}){return Object.keys(l).reduce((r,o)=>{const{models:f=[],columns:d={}}=l[o],b=new Set;return f.forEach(p=>b.add(p)),Ms(d)&&Object.keys(d).forEach(p=>{const v=d[p];Ms(v)&&Ms(v.models)&&Object.keys(v.models).forEach(O=>b.add(O))}),r.concat(Array.from(b))},[]).sort().join("")}function Ddn(l={},r,o=new Set){const f=l[r],d=(f==null?void 0:f.models)??[];for(const b of d)o.has(b)||Ddn(l,b,o).add(b);return o}function I1n(l=[],r,o,f){return new Set(l.reduce((d,b)=>{const p=Yi(b.sourceHandle)?void 0:f[b.sourceHandle],v=Yi(b.targetHandle)?void 0:f[b.targetHandle];return Ms(p)&&Ms(b.sourceHandle)&&p.data.type===_a.external&&zY(r,b.sourceHandle)?d.push(b.source):Ms(v)&&Ms(b.targetHandle)&&v.data.type===_a.external&&zY(r,b.targetHandle)?d.push(b.target):(ske(r,[b.targetHandle,b.sourceHandle])||WY(o,b.id))&&(Ms(b.source)&&d.push(b.source),Ms(b.target)&&d.push(b.target)),d},[]))}function R1n(l=[],r,o,f,d,b,p,v=!1,O=!1,C=!1){return l.map(A=>{const j=ske(o,[A.targetHandle,A.sourceHandle]);if(A.hidden=!0,Yi(A.sourceHandle)&&Yi(A.targetHandle)){const Y=b.size>0||r.size>0||f.size>0,ne=p.has(A.source)||p.has(A.target),he=Ho(p.has(A.source))||Ho(p.has(A.target)),se=Ho(O)&&Ho(v)&&Ho(Y),ve=Ho(C)&&Ho(Y),Ce=he&&ve,Ie=ne&&se,nt=b.size>0&&WY(d,A.id)&&f.has(A.source)&&f.has(A.target);Ho(Ie)&&Ho(Ce)&&(Ho(Y)||nt)&&(A.hidden=!1)}else r.size>0&&j&&(A.hidden=!1);let $="var(--color-graph-edge-main)",L=2;const z=p.has(A.source),Z=p.has(A.target);return WY(d,A.id)||v&&z&&Z?(L=4,$="var(--color-graph-edge-selected)",A.zIndex=10):j?$="var(--color-graph-edge-secondary)":z&&Z&&(L=4,$="var(--color-graph-edge-direct)",A.zIndex=10),A.style={...A.style,stroke:$,strokeWidth:L},A})}function L1n(l=[],r,o,f,d,b,p,v,O){return l.map(C=>{C.hidden=!0;const T=d.size>0||b.size>0,A=r.size===0||r.has(C.id),j=f.has(C.id),$=Ho(f.has(C.id)),L=Ho(v)&&Ho(p)&&Ho(T),z=Ho(O)&&Ho(T),Z=$&&z;return Ho(j&&L)&&Ho(Z)&&(C.hidden=Ho(A)),C.data.type===_a.cte&&(C.hidden=Ho(r.has(C.id))),o===C.id&&(C.hidden=!1),C})}function ske(l=new Map,[r,o]){if(Yi(r)&&Yi(o))return!1;const f=Yi(r)?void 0:l.get(r),d=Yi(o)?void 0:l.get(o);if(Yi(f)&&Yi(d))return!1;const b=!!(f!=null&&f.some(([v,O])=>v===r&&O===o)),p=!!(d!=null&&d.some(([v,O])=>v===r&&O===o));return b||p}function zY(l=new Map,r){return(l.get(r)??[]).length>0}function $dn(l){return l===_a.python?"PYTHON":l===_a.sql?"SQL":l===_a.seed?"SEED":l===_a.cte?"CTE":l===_a.external?"EXTERNAL":l===_a.source?"SOURCE":"UNKNOWN"}function WY(l,r){return l.some(o=>o.id===r||WY(o.edges,r))}const oke=Ne.createContext({selectedEdges:[],lineage:{},lineageCache:void 0,withColumns:!1,withConnected:!1,withImpacted:!0,withSecondary:!1,hasBackground:!0,mainNode:void 0,activeEdges:new Map,activeNodes:new Set,models:new Map,unknownModels:new Set,manuallySelectedColumn:void 0,connections:new Map,selectedNodes:new Set,connectedNodes:new Set,highlightedNodes:{},nodesMap:{},showControls:!0,setHighlightedNodes:()=>{},setWithColumns:()=>!1,setHasBackground:()=>!1,setWithImpacted:()=>!1,setWithSecondary:()=>!1,setWithConnected:()=>!1,hasActiveEdge:()=>!1,addActiveEdges:()=>{},removeActiveEdges:()=>{},setActiveEdges:()=>{},handleClickModel:()=>{},setManuallySelectedColumn:()=>{},handleError:()=>{},setLineage:()=>{},setLineageCache:()=>{},isActiveColumn:()=>!1,setConnections:()=>{},setSelectedNodes:()=>{},setMainNode:()=>{},setActiveNodes:()=>{},setNodeConnections:()=>{},setUnknownModels:()=>{}});function Ndn({handleError:l,handleClickModel:r,children:o,showColumns:f=!1,showConnected:d=!1,showControls:b=!0}){const p=KY(yr=>yr.models),[v,O]=Ne.useState({}),[C,T]=Ne.useState(new Set),[A,j]=Ne.useState(void 0),[$,L]=Ne.useState({}),[z,Z]=Ne.useState(f),[Y,ne]=Ne.useState(),[he,se]=Ne.useState(),[ve,Ce]=Ne.useState(new Map),[Ie,nt]=Ne.useState(new Map),[Re,ft]=Ne.useState(d),[st,at]=Ne.useState(new Set),[ut,le]=Ne.useState(new Set),[Ze,it]=Ne.useState({}),[Tt,X]=Ne.useState(!0),[Je,Nt]=Ne.useState(!0),[Kt,Ut]=Ne.useState(!1),In=Ne.useMemo(()=>Edn({lineage:v,models:p,unknownModels:C,withColumns:z}),[v,p,z,C]),Bn=Ne.useCallback(function(Hc){return ske(ve,Hc)},[ve]),Pi=Ne.useCallback(function(Hc){Ce(fo=>(Hc.forEach(([qo,$o])=>{const Yo=fo.get(qo)??[],xf=fo.get($o)??[],Vs=Yo.some(([Ac,Rd])=>Ac===qo&&Rd===$o),gi=xf.some(([Ac,Rd])=>Ac===qo&&Rd===$o);Ho(Vs)&&Yo.push([qo,$o]),Ho(gi)&&xf.push([qo,$o]),fo.set(qo,Yo),fo.set($o,xf)}),new Map(fo)))},[Ce]),dr=Ne.useCallback(function(Hc){Ce(fo=>(Hc.forEach(([qo,$o])=>{const Yo=(fo.get(qo)??[]).filter(Vs=>Vs[0]!==qo&&Vs[1]!==$o),xf=(fo.get($o)??[]).filter(Vs=>Vs[0]!==qo&&Vs[1]!==$o);fo.set(qo,Yo),fo.set($o,xf)}),new Map(fo))),nt(fo=>(Hc.forEach(([qo,$o])=>{fo.delete(qo),fo.delete($o)}),new Map(fo)))},[Ce,nt]),Ir=Ne.useCallback(function(Hc,fo){const qo=Ec(th.Left,Hc,fo),$o=Ec(th.Right,Hc,fo);return zY(ve,qo)||zY(ve,$o)},[Bn,ve]),io=Ne.useMemo(()=>new Set(Object.keys($)),[$]),ks=Ne.useMemo(()=>Array.from(st).flatMap(yr=>$[yr]).filter(Boolean),[$,st]);return Ci.jsx(oke.Provider,{value:{highlightedNodes:Ze,connectedNodes:io,activeEdges:ve,selectedEdges:ks,activeNodes:ut,selectedNodes:st,mainNode:Y,connections:Ie,lineage:v,lineageCache:A,models:p,manuallySelectedColumn:he,withColumns:z,withConnected:Re,withImpacted:Je,withSecondary:Kt,showControls:b,hasBackground:Tt,nodesMap:In,unknownModels:C,setHighlightedNodes:it,setActiveNodes:le,setNodeConnections:L,setLineageCache:j,setUnknownModels:T,setWithConnected:ft,setWithImpacted:Nt,setWithSecondary:Ut,setHasBackground:X,setSelectedNodes:at,setMainNode:ne,setConnections:nt,setLineage:O,setWithColumns:Z,setActiveEdges:Ce,setManuallySelectedColumn:se,addActiveEdges:Pi,removeActiveEdges:dr,hasActiveEdge:Bn,handleClickModel:r,handleError:l,isActiveColumn:Ir},children:o})}function nL(){return Ne.useContext(oke)}const B1n=Object.freeze(Object.defineProperty({__proto__:null,LineageFlowContext:oke,default:Ndn,useLineageFlow:nL},Symbol.toStringTag,{value:"Module"}));export{A1n as C,_a as E,_Ut as F,Ndn as L,xdn as M,HJt as P,wmt as R,gdn as a,nL as b,P1n as c,$h as d,nf as e,rmt as f,$dn as g,Yp as h,Ddn as i,j1n as j,$1n as k,N1n as l,I1n as m,L1n as n,R1n as o,D1n as p,Atn as q,Wdn as r,X1 as s,Ren as t,Sdn as u,B1n as v}; diff --git a/web/client/dist/assets/context-DFNeGsFF.js b/web/client/dist/assets/context-DFNeGsFF.js new file mode 100644 index 0000000000..40f61988f2 --- /dev/null +++ b/web/client/dist/assets/context-DFNeGsFF.js @@ -0,0 +1 @@ +import{r as E,d as z,a as H,j as J,a8 as O,ab as P,v as y,F as R,ac as C,I as Q,i as x,ad as Z,ae as k,b,g as ee}from"./index-Dj0i1-CA.js";import{u as h,M as g}from"./project-BvSOI8MY.js";import{M as V}from"./file-CvJN3aZO.js";import{u as te}from"./editor-CcO28cqd.js";const le={Added:1,Modified:2,Deleted:3},G=E.createContext({artifactRename:void 0,setArtifactRename:()=>{},selectArtifactsInRange:()=>new Set,createDirectory:()=>{},createFile:()=>{},renameArtifact:()=>{},removeArtifacts:()=>{},removeArtifactWithConfirmation:()=>{},moveArtifacts:()=>{},isTopGroupInActiveRange:()=>!1,isBottomGroupInActiveRange:()=>!1,isMiddleGroupInActiveRange:()=>!1});function re({children:$}){const{addError:v}=z(),A=h(e=>e.activeRange),l=h(e=>e.project),_=h(e=>e.files),D=h(e=>e.setActiveRange),M=h(e=>e.setSelectedFile),I=h(e=>e.setFiles),c=h(e=>e.inActiveRange),S=H(e=>e.addConfirmation),p=te(e=>e.tab),[F,r]=E.useState(!1),[N,w]=E.useState();E.useEffect(()=>{M(p==null?void 0:p.file)},[p==null?void 0:p.id]);function L(e){const n=A.length-1,s=l.allVisibleArtifacts,u=A[0],a=A[n],i=s.indexOf(e),o=u==null?0:s.indexOf(u),m=a==null?n:s.indexOf(a),f=i>o?o:i,d=i>m||i>o&&i{y(n)||e.open()}).catch(n=>v(R.FileExplorer,n)).finally(()=>{r(!1)})}function W(e,t){if(F)return;y(t)&&(e.isModels?t=".sql":e.isTests?t=".yaml":t=".py"),r(!0);const n=O("new_file",t);C(`${e.path}/${n}`,{content:""}).then(s=>{y(s)||e.open()}).catch(s=>v(R.FileExplorer,s)).finally(()=>{r(!1)})}function Y(e,t){var i;t=t==null?void 0:t.replaceAll("/","").trim();const s=(((i=e.parent)==null?void 0:i.artifacts)??[]).some(o=>o.name===t);if(F||Q(t)||s)return;r(!0);const u=e.name,a=e.path;e.rename(t),e instanceof g&&P(a,{new_path:e.path}).catch(o=>{v(R.FileExplorer,o),e.rename(u)}).finally(()=>{r(!1),x(p)&&e.hasFile(p.file)&&M(p.file),I(l.allFiles)}),e instanceof V&&C(a,{new_path:e.path}).then(o=>{e.update(o),_.set(e.path,e),_.delete(a)}).catch(o=>{v(R.FileExplorer,o),e.rename(u)}).finally(()=>{r(!1),I(l.allFiles)})}function T(e){if(F)return;r(!0);const t=e.map(n=>n instanceof V?Z(n.path):k(n.path));Promise.all(t).then(()=>{D([])}).catch(n=>v(R.FileExplorer,n)).finally(()=>{r(!1)})}function q(e){c(e)?S({headline:"Removing Selected Files/Directories",description:`Are you sure you want to remove ${A.length} items?`,yesText:"Yes, Remove",noText:"No, Cancel",details:A.map(t=>t.path),action:()=>{T(A)}}):S({headline:`Removing ${e instanceof g?"Directory":"File"}`,description:`Are you sure you want to remove the ${e instanceof g?"directory":"file"} "${e.name}"?`,yesText:"Yes, Remove",noText:"No, Cancel",action:()=>{x(e.parent)&&T([e])}})}function j(e,t,n=!1){if(F)return;r(!0);const s=[],u=[],a=[];if(e.forEach(i=>{const o=t.containsName(i.name),m=i.path;if(o&&b(n))return a.push(i);n&&i.rename(i.copyName());let f=[t.path,i.name].join("/");for(;f.startsWith("/");)f=f.slice(1).trim();i instanceof g&&(s.push(()=>{var d;(d=i.parent)==null||d.removeDirectory(i),t.addDirectory(i)}),u.push(P(m,{new_path:f})),i.allVisibleArtifacts.forEach(d=>e.splice(e.indexOf(d),1))),i instanceof V&&(s.push(()=>{var d;(d=i.parent)==null||d.removeFile(i),t.addFile(i)}),u.push(C(m,{new_path:f})))}),ee(a)){S({headline:"Moving Duplicates",description:"All duplicated names will be renamed!",yesText:"Yes, Rename",noText:"No, Cancel",details:a.map(i=>i.path),action:()=>{j(e,t,!0)}});return}Promise.all(u).then(i=>{i.forEach((o,m)=>{var f;return(f=s[m])==null?void 0:f.call(s)})}).catch(i=>{console.log(i)}).finally(()=>{r(!1),D([]),I(l.allFiles)})}function B(e){const t=l.allVisibleArtifacts.indexOf(e),n=l.allVisibleArtifacts[t-1],s=l.allVisibleArtifacts[t+1];return c(e)&&(y(n)||b(c(n)))&&x(s)&&c(s)}function K(e){const t=l.allVisibleArtifacts.indexOf(e),n=l.allVisibleArtifacts[t-1],s=l.allVisibleArtifacts[t+1];return c(e)&&(y(s)||b(c(s)))&&x(n)&&c(n)}function U(e){const t=l.allVisibleArtifacts.indexOf(e),n=l.allVisibleArtifacts[t-1],s=l.allVisibleArtifacts[t+1];return c(e)&&x(s)&&c(s)&&x(n)&&c(n)}return J.jsx(G.Provider,{value:{artifactRename:N,setArtifactRename:w,createDirectory:X,createFile:W,renameArtifact:Y,removeArtifacts:T,removeArtifactWithConfirmation:q,moveArtifacts:j,selectArtifactsInRange:L,isTopGroupInActiveRange:B,isBottomGroupInActiveRange:K,isMiddleGroupInActiveRange:U},children:$})}function ce(){return E.useContext(G)}export{le as EnumFileExplorerChange,G as FileExplorerContext,re as default,ce as useFileExplorer}; diff --git a/web/client/dist/assets/editor-CcO28cqd.js b/web/client/dist/assets/editor-CcO28cqd.js new file mode 100644 index 0000000000..04124edc79 --- /dev/null +++ b/web/client/dist/assets/editor-CcO28cqd.js @@ -0,0 +1,6 @@ +import{a0 as W,ay as y,v as l,b as m,az as A}from"./index-Dj0i1-CA.js";import{M as Z}from"./file-CvJN3aZO.js";const I=`(function(){"use strict";function l(n){return n===!1}function w(n){return n===""}function y(n){return a(n)||w(n)}function a(n){return n==null}function D(...n){return n.filter(Boolean).join("__")}const r={Upstream:"upstream",Downstream:"downstream"},m=self;m.onmessage=async n=>{if(n.data.topic==="lineage")try{const{currentLineage:t,newLineage:s,mainNode:o}=n.data.payload,e=await g(t,s),c=await N(o,e);m.postMessage({topic:"lineage",payload:{lineage:e,nodesConnections:c}})}catch(t){m.postMessage({topic:"error",error:t})}};async function g(n={},t={}){return Object.entries(t).reduce((s,[o,e=[]])=>{var c;return o=encodeURI(o),s[o]={models:e.map(encodeURI),columns:((c=n==null?void 0:n[o])==null?void 0:c.columns)??void 0},s},{})}async function N(n,t={}){return new Promise((s,o)=>{if(a(t)||a(n))return{};const e={};try{f(r.Upstream,n,t,e),f(r.Downstream,n,t,e)}catch(c){o(c)}s(e)})}function f(n=r.Downstream,t,s={},o={}){var u;const e=n===r.Downstream;let c=[];e?c=Object.keys(s).filter(i=>s[i].models.includes(t)):c=((u=s[t])==null?void 0:u.models)??[],l(t in o)&&(o[t]=d());for(const i of c){const p=e?d(t,i,[o[t]]):d(i,t,[o[t]]);i in o?o[i].edges.push(p):(o[i]=p,f(n,i,s,o))}}function d(n,t,s=[]){const o=D(n,t);return{id:y(o)?void 0:o,edges:s}}})(); +`,r=typeof self<"u"&&self.Blob&&new Blob([I],{type:"text/javascript;charset=utf-8"});function F(t){let s;try{if(s=r&&(self.URL||self.webkitURL).createObjectURL(r),!s)throw"";const e=new Worker(s,{name:t==null?void 0:t.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(s)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(I),{name:t==null?void 0:t.name})}finally{s&&(self.URL||self.webkitURL).revokeObjectURL(s)}}const b=`(function(){"use strict";const g=self;import("https://cdn.jsdelivr.net/pyodide/v0.23.2/full/pyodide.js").then(()=>{const c=s();g.onmessage=async a=>{var i,l,t;const{sqlglot:C}=await c;if(a.data.topic==="validate"){let I;try{I=JSON.parse((i=C.get("validate"))==null?void 0:i(a.data.payload))}catch{I=!1}g.postMessage({topic:"validate",payload:I})}if(a.data.topic==="dialect"){let I;try{I=JSON.parse((l=C.get("get_dialect"))==null?void 0:l(a.data.payload))}catch{I={keywords:"",types:""}}g.postMessage({topic:"dialect",payload:I})}if(a.data.topic==="dialects"){let I;try{I=JSON.parse(C.get("dialects"))}catch{I=[]}g.postMessage({topic:"dialects",payload:I})}a.data.topic==="format"&&g.postMessage({topic:"format",payload:((t=C.get("format"))==null?void 0:t(a.data.payload.sql,a.data.payload.dialect))??""}),a.data.topic==="init"&&g.postMessage({topic:"init"})}}).catch(console.error);async function s(){g.pyodide=await g.loadPyodide(),await g.pyodide.loadPackage("micropip");const c=g.pyodide.pyimport("micropip");await c.install("sqlglot"),await c.install("typing-extensions");const a=await(await fetch(new URL("data:application/octet-stream;base64,aW1wb3J0IGpzb24KCmltcG9ydCBzcWxnbG90CmZyb20gc3FsZ2xvdCBpbXBvcnQgZXhwCmZyb20gc3FsZ2xvdC5kaWFsZWN0cy5kaWFsZWN0IGltcG9ydCBEaWFsZWN0LCBEaWFsZWN0VHlwZQoKZGlhbGVjdHMgPSBqc29uLmR1bXBzKAogICAgWwogICAgICAgIHsKICAgICAgICAgICAgImRpYWxlY3RfdGl0bGUiOiAiU1FMR2xvdCIgaWYgZGlhbGVjdCA9PSAiIiBlbHNlIGRpYWxlY3RfY2xhc3MuX19uYW1lX18sCiAgICAgICAgICAgICJkaWFsZWN0X25hbWUiOiBkaWFsZWN0LAogICAgICAgIH0KICAgICAgICBmb3IgZGlhbGVjdCwgZGlhbGVjdF9jbGFzcyBpbiBEaWFsZWN0LmNsYXNzZXMuaXRlbXMoKQogICAgXQopCgoKZGVmIHBhcnNlX3RvX2pzb24oc3FsOiBzdHIsIHJlYWQ6IERpYWxlY3RUeXBlID0gTm9uZSkgLT4gc3RyOgogICAgcmV0dXJuIGpzb24uZHVtcHMoCiAgICAgICAgW2V4cC5kdW1wKCkgaWYgZXhwIGVsc2Uge30gZm9yIGV4cCBpbiBzcWxnbG90LnBhcnNlKHNxbCwgcmVhZD1yZWFkLCBlcnJvcl9sZXZlbD0iaWdub3JlIildCiAgICApCgoKZGVmIGdldF9kaWFsZWN0KG5hbWU6IHN0ciA9ICIiKSAtPiBzdHI6CiAgICBkaWFsZWN0ID0gRGlhbGVjdC5jbGFzc2VzLmdldChuYW1lLCBEaWFsZWN0KQogICAga2V5d29yZHMgPSBkaWFsZWN0LnRva2VuaXplcl9jbGFzcy5LRVlXT1JEUwogICAgdHlwZV9tYXBwaW5nID0gZGlhbGVjdC5nZW5lcmF0b3JfY2xhc3MuVFlQRV9NQVBQSU5HCgogICAgcmV0dXJuIGpzb24uZHVtcHMoCiAgICAgICAgewogICAgICAgICAgICAia2V5d29yZHMiOiAiICIuam9pbihrZXl3b3JkcyksCiAgICAgICAgICAgICJ0eXBlcyI6ICIgIi5qb2luKHR5cGVfbWFwcGluZy5nZXQodCwgdC52YWx1ZSkgZm9yIHQgaW4gZXhwLkRhdGFUeXBlLlR5cGUpLAogICAgICAgIH0KICAgICkKCgpkZWYgZm9ybWF0KHNxbDogc3RyID0gIiIsIHJlYWQ6IERpYWxlY3RUeXBlID0gTm9uZSkgLT4gc3RyOgogICAgcmV0dXJuICJcbiIuam9pbigKICAgICAgICBzcWxnbG90LnRyYW5zcGlsZShzcWwsIHJlYWQ9cmVhZCwgZXJyb3JfbGV2ZWw9c3FsZ2xvdC5lcnJvcnMuRXJyb3JMZXZlbC5JR05PUkUsIHByZXR0eT1UcnVlKQogICAgKQoKCmRlZiB2YWxpZGF0ZShzcWw6IHN0ciA9ICIiLCByZWFkOiBEaWFsZWN0VHlwZSA9IE5vbmUpIC0+IHN0cjoKICAgIHRyeToKICAgICAgICBzcWxnbG90LnRyYW5zcGlsZSgKICAgICAgICAgICAgc3FsLCByZWFkPXJlYWQsIHByZXR0eT1GYWxzZSwgdW5zdXBwb3J0ZWRfbGV2ZWw9c3FsZ2xvdC5lcnJvcnMuRXJyb3JMZXZlbC5JTU1FRElBVEUKICAgICAgICApCiAgICBleGNlcHQgc3FsZ2xvdC5lcnJvcnMuUGFyc2VFcnJvcjoKICAgICAgICByZXR1cm4ganNvbi5kdW1wcyhGYWxzZSkKCiAgICByZXR1cm4ganNvbi5kdW1wcyhUcnVlKQoKCnsKICAgICJkaWFsZWN0cyI6IGRpYWxlY3RzLAogICAgImdldF9kaWFsZWN0IjogZ2V0X2RpYWxlY3QsCiAgICAicGFyc2VfdG9fanNvbiI6IHBhcnNlX3RvX2pzb24sCiAgICAidmFsaWRhdGUiOiB2YWxpZGF0ZSwKICAgICJmb3JtYXQiOiBmb3JtYXQsCn0K",self.location.href))).text();return g.postMessage({topic:"init"}),{sqlglot:g.pyodide.runPython(a)}}})(); +`,d=typeof self<"u"&&self.Blob&&new Blob([b],{type:"text/javascript;charset=utf-8"});function w(t){let s;try{if(s=d&&(self.URL||self.webkitURL).createObjectURL(d),!s)throw"";const e=new Worker(s,{name:t==null?void 0:t.name});return e.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(s)}),e}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(b),{name:t==null?void 0:t.name})}finally{s&&(self.URL||self.webkitURL).revokeObjectURL(s)}}const R=w(),[v,g]=y("tabs"),{tabs:h=[],id:G}=v()??{},C=p(),f=u(C),B=new Map([[C,f]]),U=W((t,s)=>({storedTabs:h,storedTabId:G,tab:f,tabs:B,engine:R,dialects:[],previewQuery:void 0,previewTable:void 0,previewDiff:void 0,direction:"vertical",inTabs(e){return s().tabs.has(e)},replaceTab(e,a){const n=s(),i=Array.from(n.tabs.entries()),o=i.findIndex(([c])=>c===e.file);i[o]=[a.file,a],t(()=>({tabs:new Map(i)})),n.updateStoredTabsIds()},updateStoredTabsIds(){const e=s();if(l(e.tab)){g({id:void 0,tabs:[]}),t(()=>({storedTabId:void 0,storedTabs:[]}));return}const a=[];for(const i of e.tabs.values())m(i.file.isChanged)&&i.file.isLocal||a.push({id:i.file.id,content:i.file.content});const n=e.tab.file.isChanged||e.tab.file.isRemote?e.tab.file.id:void 0;g({id:n,tabs:a}),t(()=>({storedTabId:n,storedTabs:a}))},refreshTab(e){l(e)||s().selectTab({...e})},setDialects(e){t(()=>({dialects:e}))},selectTab(e){const a=s();t(()=>({tab:e})),a.updateStoredTabsIds()},addTabs(e){const a=s();for(const n of e)a.tabs.set(n.file,n);t(()=>({tabs:new Map(a.tabs)}))},addTab(e){const a=s();if(a.tabs.has(e.file))a.tabs.set(e.file,e),t(()=>({tabs:new Map(a.tabs)}));else{const n=Array.from(a.tabs.entries()),i=n.findIndex(([o])=>{var c;return o===((c=a.tab)==null?void 0:c.file)});n.splice(i<0?n.length:i+1,0,[e.file,e]),t(()=>({tabs:new Map(n)}))}a.updateStoredTabsIds()},closeTab(e){var n;const a=s();if(e.removeChanges(),a.tabs.delete(e),a.tabs.size===0)a.selectTab(void 0);else if(a.tabs.size===1){const i=Array.from(a.tabs.values());a.selectTab(i.at(0))}else if(e.id===((n=a.tab)==null?void 0:n.file.id)){const i=Array.from(a.tabs.values()),o=i.findIndex(c=>c.file===e);a.selectTab(i.at(o-1))}t(()=>({tabs:new Map(a.tabs)})),a.updateStoredTabsIds()},createTab:u,setPreviewQuery(e){t(()=>({previewQuery:e}))},setPreviewTable(e){t(()=>({previewTable:e}))},setPreviewDiff(e){t(()=>({previewDiff:e}))},setDirection(e){t(()=>({direction:e}))}}));function u(t=p()){return{id:A(),file:t,isValid:!0}}function p(t){return new Z({id:t,name:"",path:"",content:`-- Create arbitrary SQL queries +-- and execute them against different environments + +`})}export{F as W,p as c,R as s,U as u}; diff --git a/web/client/dist/assets/file-CvJN3aZO.js b/web/client/dist/assets/file-CvJN3aZO.js new file mode 100644 index 0000000000..58b23e1b51 --- /dev/null +++ b/web/client/dist/assets/file-CvJN3aZO.js @@ -0,0 +1 @@ +var u=Object.defineProperty;var g=(r,e,t)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var h=(r,e,t)=>g(r,typeof e!="symbol"?e+"":e,t);import{$ as _,I as x,a8 as m,a9 as n,aa as c,W as d,b as f}from"./index-Dj0i1-CA.js";class y extends _{constructor(t,s){super(t!=null&&t.isModel?t.initial:{...t,name:(t==null?void 0:t.name)??"",path:(t==null?void 0:t.path)??""});h(this,"_path");h(this,"_name");h(this,"parent");h(this,"remove",!1);this._path=(t==null?void 0:t.path)??this.initial.path,this._name=(t==null?void 0:t.name)??this.initial.name,this.parent=s}get id(){return x(this.path)?this.initial.id:this.path}get name(){return this._name}get path(){return this._path}get isUntitled(){return this.name===""}get isLocal(){return this.path===""}get isRemote(){return this.path!==""}get withParent(){var t;return!!((t=this.parent)!=null&&t.isModel)}copyName(){return`Copy of ${this.name}__${m()}`}rename(t){this.isRemote&&(this._path=this._path.replace(this.name,t)),this._name=t}static findArtifactByPath(t,s){return t.path===s?t:t.allArtifacts.find(a=>a.path===s)}}const p={SQL:".sql",PY:".py",YAML:".yaml",YML:".yml"};class o extends y{constructor(t,s){super(o.getInitialArtifact(t),s);h(this,"_content","");h(this,"content");h(this,"extension");h(this,"isFormatted");this.content=this._content=n((t==null?void 0:t.content)??this.initial.content),this.extension=n((t==null?void 0:t.extension)??this.initial.extension),this.isFormatted=t==null?void 0:t.isFormatted}get basename(){return this.name.replace(this.extension,"")}get isEmpty(){return c(this.content)}get isChanged(){return d(this._content)&&this.content!==this._content}get isSQL(){return this.extension===p.SQL}get fingerprint(){return`${this._content}${this.name}${this.path}`}removeChanges(){this.content=this._content}copyName(){return`Copy of ${n(this.name.split(this.extension)[0])}__${m()}${this.extension}`}update(t){const s=n(t==null?void 0:t.content);(c(this._content)||f(this.isChanged))&&(this.content=s),this._content=s,this.extension=n(t==null?void 0:t.extension)}static getInitialArtifact(t){return o.isModelFile(t)?t.initial:{name:n(t==null?void 0:t.name),path:n(t==null?void 0:t.path),extension:(t==null?void 0:t.extension)??p.SQL,content:n(t==null?void 0:t.content)}}static isModelFile(t){return t instanceof o}}export{p as E,o as M,y as a}; diff --git a/web/client/dist/assets/floating-ui.react-dom-CjE-JNW1.js b/web/client/dist/assets/floating-ui.react-dom-CjE-JNW1.js new file mode 100644 index 0000000000..ae97fb2c07 --- /dev/null +++ b/web/client/dist/assets/floating-ui.react-dom-CjE-JNW1.js @@ -0,0 +1 @@ +import{ax as Xt,a1 as Ut,r as E}from"./index-Dj0i1-CA.js";var $t=Xt();const Je=Ut($t);function at(){return typeof window<"u"}function tt(t){return Wt(t)?(t.nodeName||"").toLowerCase():"#document"}function $(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function I(t){var e;return(e=(Wt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Wt(t){return at()?t instanceof Node||t instanceof $(t).Node:!1}function V(t){return at()?t instanceof Element||t instanceof $(t).Element:!1}function j(t){return at()?t instanceof HTMLElement||t instanceof $(t).HTMLElement:!1}function Ct(t){return!at()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof $(t).ShadowRoot}const Kt=new Set(["inline","contents"]);function ot(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=H(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Kt.has(i)}const Gt=new Set(["table","td","th"]);function Jt(t){return Gt.has(tt(t))}const Qt=[":popover-open",":modal"];function ut(t){return Qt.some(e=>{try{return t.matches(e)}catch{return!1}})}const Zt=["transform","translate","scale","rotate","perspective"],te=["transform","translate","scale","rotate","perspective","filter"],ee=["paint","layout","strict","content"];function xt(t){const e=yt(),n=V(t)?H(t):t;return Zt.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||te.some(o=>(n.willChange||"").includes(o))||ee.some(o=>(n.contain||"").includes(o))}function ne(t){let e=U(t);for(;j(e)&&!Q(e);){if(xt(e))return e;if(ut(e))return null;e=U(e)}return null}function yt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const oe=new Set(["html","body","#document"]);function Q(t){return oe.has(tt(t))}function H(t){return $(t).getComputedStyle(t)}function dt(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function U(t){if(tt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ct(t)&&t.host||I(t);return Ct(e)?e.host:e}function Bt(t){const e=U(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&ot(e)?e:Bt(e)}function nt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Bt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=$(i);if(r){const c=gt(s);return e.concat(s,s.visualViewport||[],ot(i)?i:[],c&&n?nt(c):[])}return e.concat(i,nt(i,[],n))}function gt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const ie=["top","right","bottom","left"],K=Math.min,F=Math.max,st=Math.round,it=Math.floor,z=t=>({x:t,y:t}),re={left:"right",right:"left",bottom:"top",top:"bottom"},se={start:"end",end:"start"};function pt(t,e,n){return F(t,K(e,n))}function Y(t,e){return typeof t=="function"?t(e):t}function q(t){return t.split("-")[0]}function et(t){return t.split("-")[1]}function vt(t){return t==="x"?"y":"x"}function bt(t){return t==="y"?"height":"width"}const ce=new Set(["top","bottom"]);function _(t){return ce.has(q(t))?"y":"x"}function At(t){return vt(_(t))}function le(t,e,n){n===void 0&&(n=!1);const o=et(t),i=At(t),r=bt(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ct(s)),[s,ct(s)]}function fe(t){const e=ct(t);return[wt(t),e,wt(e)]}function wt(t){return t.replace(/start|end/g,e=>se[e])}const St=["left","right"],Et=["right","left"],ae=["top","bottom"],ue=["bottom","top"];function de(t,e,n){switch(t){case"top":case"bottom":return n?e?Et:St:e?St:Et;case"left":case"right":return e?ae:ue;default:return[]}}function me(t,e,n,o){const i=et(t);let r=de(q(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(wt)))),r}function ct(t){return t.replace(/left|right|bottom|top/g,e=>re[e])}function he(t){return{top:0,right:0,bottom:0,left:0,...t}}function Vt(t){return typeof t!="number"?he(t):{top:t,right:t,bottom:t,left:t}}function lt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Dt(t,e,n){let{reference:o,floating:i}=t;const r=_(e),s=At(e),c=bt(s),f=q(e),l=r==="y",a=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let u;switch(f){case"top":u={x:a,y:o.y-i.height};break;case"bottom":u={x:a,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:d};break;case"left":u={x:o.x-i.width,y:d};break;default:u={x:o.x,y:o.y}}switch(et(e)){case"start":u[s]-=m*(n&&l?-1:1);break;case"end":u[s]+=m*(n&&l?-1:1);break}return u}const ge=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:d}=Dt(l,o,f),m=o,u={},h=0;for(let g=0;g({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:f}=e,{element:l,padding:a=0}=Y(t,e)||{};if(l==null)return{};const d=Vt(a),m={x:n,y:o},u=At(i),h=bt(u),g=await s.getDimensions(l),p=u==="y",w=p?"top":"left",x=p?"bottom":"right",v=p?"clientHeight":"clientWidth",b=r.reference[h]+r.reference[u]-m[u]-r.floating[h],y=m[u]-r.reference[u],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let R=O?O[v]:0;(!R||!await(s.isElement==null?void 0:s.isElement(O)))&&(R=c.floating[v]||r.floating[h]);const P=b/2-y/2,W=R/2-g[h]/2-1,D=K(d[w],W),B=K(d[x],W),M=D,L=R-g[h]-B,C=R/2-g[h]/2+P,N=pt(M,C,L),S=!f.arrow&&et(i)!=null&&C!==N&&r.reference[h]/2-(CC<=0)){var B,M;const C=(((B=r.flip)==null?void 0:B.index)||0)+1,N=R[C];if(N&&(!(d==="alignment"?x!==_(N):!1)||D.every(A=>A.overflows[0]>0&&_(A.placement)===x)))return{data:{index:C,overflows:D},reset:{placement:N}};let S=(M=D.filter(T=>T.overflows[0]<=0).sort((T,A)=>T.overflows[1]-A.overflows[1])[0])==null?void 0:M.placement;if(!S)switch(u){case"bestFit":{var L;const T=(L=D.filter(A=>{if(O){const k=_(A.placement);return k===x||k==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(k=>k>0).reduce((k,X)=>k+X,0)]).sort((A,k)=>A[1]-k[1])[0])==null?void 0:L[0];T&&(S=T);break}case"initialPlacement":S=c;break}if(i!==S)return{reset:{placement:S}}}return{}}}};function Pt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Lt(t){return ie.some(e=>t[e]>=0)}const xe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=Y(t,e);switch(o){case"referenceHidden":{const r=await Z(e,{...i,elementContext:"reference"}),s=Pt(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Lt(s)}}}case"escaped":{const r=await Z(e,{...i,altBoundary:!0}),s=Pt(r,n.floating);return{data:{escapedOffsets:s,escaped:Lt(s)}}}default:return{}}}}},Ht=new Set(["left","top"]);async function ye(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=q(n),c=et(n),f=_(n)==="y",l=Ht.has(s)?-1:1,a=r&&f?-1:1,d=Y(e,t);let{mainAxis:m,crossAxis:u,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof h=="number"&&(u=c==="end"?h*-1:h),f?{x:u*a,y:m*l}:{x:m*l,y:u*a}}const ve=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:c}=e,f=await ye(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:r+f.y,data:{...f,placement:s}}}}},be=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...f}=Y(t,e),l={x:n,y:o},a=await Z(e,f),d=_(q(i)),m=vt(d);let u=l[m],h=l[d];if(r){const p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=u+a[p],v=u-a[w];u=pt(x,u,v)}if(s){const p=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=h+a[p],v=h-a[w];h=pt(x,h,v)}const g=c.fn({...e,[m]:u,[d]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[m]:r,[d]:s}}}}}},Ae=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:c=0,mainAxis:f=!0,crossAxis:l=!0}=Y(t,e),a={x:n,y:o},d=_(i),m=vt(d);let u=a[m],h=a[d];const g=Y(c,e),p=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(f){const v=m==="y"?"height":"width",b=r.reference[m]-r.floating[v]+p.mainAxis,y=r.reference[m]+r.reference[v]-p.mainAxis;uy&&(u=y)}if(l){var w,x;const v=m==="y"?"width":"height",b=Ht.has(q(i)),y=r.reference[d]-r.floating[v]+(b&&((w=s.offset)==null?void 0:w[d])||0)+(b?0:p.crossAxis),O=r.reference[d]+r.reference[v]+(b?0:((x=s.offset)==null?void 0:x[d])||0)-(b?p.crossAxis:0);hO&&(h=O)}return{[m]:u,[d]:h}}}},Re=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:c}=e,{apply:f=()=>{},...l}=Y(t,e),a=await Z(e,l),d=q(i),m=et(i),u=_(i)==="y",{width:h,height:g}=r.floating;let p,w;d==="top"||d==="bottom"?(p=d,w=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(w=d,p=m==="end"?"top":"bottom");const x=g-a.top-a.bottom,v=h-a.left-a.right,b=K(g-a[p],x),y=K(h-a[w],v),O=!e.middlewareData.shift;let R=b,P=y;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(P=v),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(R=x),O&&!m){const D=F(a.left,0),B=F(a.right,0),M=F(a.top,0),L=F(a.bottom,0);u?P=h-2*(D!==0||B!==0?D+B:F(a.left,a.right)):R=g-2*(M!==0||L!==0?M+L:F(a.top,a.bottom))}await f({...e,availableWidth:P,availableHeight:R});const W=await s.getDimensions(c.floating);return h!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function Nt(t){const e=H(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=j(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=st(n)!==r||st(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Rt(t){return V(t)?t:t.contextElement}function J(t){const e=Rt(t);if(!j(e))return z(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Nt(e);let s=(r?st(n.width):n.width)/o,c=(r?st(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Oe=z(0);function _t(t){const e=$(t);return!yt()||!e.visualViewport?Oe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ce(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==$(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=Rt(t);let s=z(1);e&&(o?V(o)&&(s=J(o)):s=J(t));const c=Ce(r,n,o)?_t(r):z(0);let f=(i.left+c.x)/s.x,l=(i.top+c.y)/s.y,a=i.width/s.x,d=i.height/s.y;if(r){const m=$(r),u=o&&V(o)?$(o):o;let h=m,g=gt(h);for(;g&&o&&u!==h;){const p=J(g),w=g.getBoundingClientRect(),x=H(g),v=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(g.clientTop+parseFloat(x.paddingTop))*p.y;f*=p.x,l*=p.y,a*=p.x,d*=p.y,f+=v,l+=b,h=$(g),g=gt(h)}}return lt({width:a,height:d,x:f,y:l})}function Ot(t,e){const n=dt(t).scrollLeft;return e?e.left+n:G(I(t)).left+n}function zt(t,e,n){n===void 0&&(n=!1);const o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(n?0:Ot(t,o)),r=o.top+e.scrollTop;return{x:i,y:r}}function Se(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=I(o),c=e?ut(e.floating):!1;if(o===s||c&&r)return n;let f={scrollLeft:0,scrollTop:0},l=z(1);const a=z(0),d=j(o);if((d||!d&&!r)&&((tt(o)!=="body"||ot(s))&&(f=dt(o)),j(o))){const u=G(o);l=J(o),a.x=u.x+o.clientLeft,a.y=u.y+o.clientTop}const m=s&&!d&&!r?zt(s,f,!0):z(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-f.scrollLeft*l.x+a.x+m.x,y:n.y*l.y-f.scrollTop*l.y+a.y+m.y}}function Ee(t){return Array.from(t.getClientRects())}function De(t){const e=I(t),n=dt(t),o=t.ownerDocument.body,i=F(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=F(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Ot(t);const c=-n.scrollTop;return H(o).direction==="rtl"&&(s+=F(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}function Pe(t,e){const n=$(t),o=I(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,c=0,f=0;if(i){r=i.width,s=i.height;const l=yt();(!l||l&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}return{width:r,height:s,x:c,y:f}}const Le=new Set(["absolute","fixed"]);function Te(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=j(t)?J(t):z(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,f=i*r.x,l=o*r.y;return{width:s,height:c,x:f,y:l}}function Tt(t,e,n){let o;if(e==="viewport")o=Pe(t,n);else if(e==="document")o=De(I(t));else if(V(e))o=Te(e,n);else{const i=_t(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return lt(o)}function jt(t,e){const n=U(t);return n===e||!V(n)||Q(n)?!1:H(n).position==="fixed"||jt(n,e)}function Me(t,e){const n=e.get(t);if(n)return n;let o=nt(t,[],!1).filter(c=>V(c)&&tt(c)!=="body"),i=null;const r=H(t).position==="fixed";let s=r?U(t):t;for(;V(s)&&!Q(s);){const c=H(s),f=xt(s);!f&&c.position==="fixed"&&(i=null),(r?!f&&!i:!f&&c.position==="static"&&!!i&&Le.has(i.position)||ot(s)&&!f&&jt(t,s))?o=o.filter(a=>a!==s):i=c,s=U(s)}return e.set(t,o),o}function ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?ut(e)?[]:Me(e,this._c):[].concat(n),o],c=s[0],f=s.reduce((l,a)=>{const d=Tt(e,a,i);return l.top=F(d.top,l.top),l.right=K(d.right,l.right),l.bottom=K(d.bottom,l.bottom),l.left=F(d.left,l.left),l},Tt(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Fe(t){const{width:e,height:n}=Nt(t);return{width:e,height:n}}function $e(t,e,n){const o=j(e),i=I(e),r=n==="fixed",s=G(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=z(0);function l(){f.x=Ot(i)}if(o||!o&&!r)if((tt(e)!=="body"||ot(i))&&(c=dt(e)),o){const u=G(e,!0,r,e);f.x=u.x+e.clientLeft,f.y=u.y+e.clientTop}else i&&l();r&&!o&&i&&l();const a=i&&!o&&!r?zt(i,c):z(0),d=s.left+c.scrollLeft-f.x-a.x,m=s.top+c.scrollTop-f.y-a.y;return{x:d,y:m,width:s.width,height:s.height}}function mt(t){return H(t).position==="static"}function Mt(t,e){if(!j(t)||H(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return I(t)===n&&(n=n.ownerDocument.body),n}function It(t,e){const n=$(t);if(ut(t))return n;if(!j(t)){let i=U(t);for(;i&&!Q(i);){if(V(i)&&!mt(i))return i;i=U(i)}return n}let o=Mt(t,e);for(;o&&Jt(o)&&mt(o);)o=Mt(o,e);return o&&Q(o)&&mt(o)&&!xt(o)?n:o||ne(t)||n}const We=async function(t){const e=this.getOffsetParent||It,n=this.getDimensions,o=await n(t.floating);return{reference:$e(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Be(t){return H(t).direction==="rtl"}const Ve={convertOffsetParentRelativeRectToViewportRelativeRect:Se,getDocumentElement:I,getClippingRect:ke,getOffsetParent:It,getElementRects:We,getClientRects:Ee,getDimensions:Fe,getScale:J,isElement:V,isRTL:Be};function Yt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function He(t,e){let n=null,o;const i=I(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const l=t.getBoundingClientRect(),{left:a,top:d,width:m,height:u}=l;if(c||e(),!m||!u)return;const h=it(d),g=it(i.clientWidth-(a+m)),p=it(i.clientHeight-(d+u)),w=it(a),v={rootMargin:-h+"px "+-g+"px "+-p+"px "+-w+"px",threshold:F(0,K(1,f))||1};let b=!0;function y(O){const R=O[0].intersectionRatio;if(R!==f){if(!b)return s();R?s(!1,R):o=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Yt(l,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(y,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(y,v)}n.observe(t)}return s(!0),r}function Qe(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,l=Rt(t),a=i||r?[...l?nt(l):[],...nt(e)]:[];a.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const d=l&&c?He(l,n):null;let m=-1,u=null;s&&(u=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&u&&(u.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=u)==null||v.observe(e)})),n()}),l&&!f&&u.observe(l),u.observe(e));let h,g=f?G(t):null;f&&p();function p(){const w=G(t);g&&!Yt(g,w)&&n(),g=w,h=requestAnimationFrame(p)}return n(),()=>{var w;a.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),d==null||d(),(w=u)==null||w.disconnect(),u=null,f&&cancelAnimationFrame(h)}}const Ze=Z,Ne=ve,_e=be,ze=we,je=Re,Ie=xe,kt=pe,Ye=Ae,qe=(t,e,n)=>{const o=new Map,i={platform:Ve,...n},r={...i.platform,_c:o};return ge(t,e,{...i,platform:r})};var Xe=typeof document<"u",Ue=function(){},rt=Xe?E.useLayoutEffect:Ue;function ft(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!ft(t[o],e[o]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,i[o]))return!1;for(o=n;o--!==0;){const r=i[o];if(!(r==="_owner"&&t.$$typeof)&&!ft(t[r],e[r]))return!1}return!0}return t!==t&&e!==e}function qt(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ft(t,e){const n=qt(t);return Math.round(e*n)/n}function ht(t){const e=E.useRef(t);return rt(()=>{e.current=t}),e}function tn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:r,floating:s}={},transform:c=!0,whileElementsMounted:f,open:l}=t,[a,d]=E.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,u]=E.useState(o);ft(m,o)||u(o);const[h,g]=E.useState(null),[p,w]=E.useState(null),x=E.useCallback(A=>{A!==O.current&&(O.current=A,g(A))},[]),v=E.useCallback(A=>{A!==R.current&&(R.current=A,w(A))},[]),b=r||h,y=s||p,O=E.useRef(null),R=E.useRef(null),P=E.useRef(a),W=f!=null,D=ht(f),B=ht(i),M=ht(l),L=E.useCallback(()=>{if(!O.current||!R.current)return;const A={placement:e,strategy:n,middleware:m};B.current&&(A.platform=B.current),qe(O.current,R.current,A).then(k=>{const X={...k,isPositioned:M.current!==!1};C.current&&!ft(P.current,X)&&(P.current=X,$t.flushSync(()=>{d(X)}))})},[m,e,n,B,M]);rt(()=>{l===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[l]);const C=E.useRef(!1);rt(()=>(C.current=!0,()=>{C.current=!1}),[]),rt(()=>{if(b&&(O.current=b),y&&(R.current=y),b&&y){if(D.current)return D.current(b,y,L);L()}},[b,y,L,D,W]);const N=E.useMemo(()=>({reference:O,floating:R,setReference:x,setFloating:v}),[x,v]),S=E.useMemo(()=>({reference:b,floating:y}),[b,y]),T=E.useMemo(()=>{const A={position:n,left:0,top:0};if(!S.floating)return A;const k=Ft(S.floating,a.x),X=Ft(S.floating,a.y);return c?{...A,transform:"translate("+k+"px, "+X+"px)",...qt(S.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:k,top:X}},[n,c,S.floating,a.x,a.y]);return E.useMemo(()=>({...a,update:L,refs:N,elements:S,floatingStyles:T}),[a,L,N,S,T])}const Ke=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:i}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?kt({element:o.current,padding:i}).fn(n):{}:o?kt({element:o,padding:i}).fn(n):{}}}},en=(t,e)=>({...Ne(t),options:[t,e]}),nn=(t,e)=>({..._e(t),options:[t,e]}),on=(t,e)=>({...Ye(t),options:[t,e]}),rn=(t,e)=>({...ze(t),options:[t,e]}),sn=(t,e)=>({...je(t),options:[t,e]}),cn=(t,e)=>({...Ie(t),options:[t,e]}),ln=(t,e)=>({...Ke(t),options:[t,e]});export{Je as R,sn as a,ln as b,Qe as c,Ze as d,Y as e,rn as f,st as g,cn as h,V as i,K as j,on as l,F as m,en as o,$t as r,nn as s,tn as u}; diff --git a/web/client/dist/assets/help-B59vE3aE.js b/web/client/dist/assets/help-B59vE3aE.js new file mode 100644 index 0000000000..dc7f8556ac --- /dev/null +++ b/web/client/dist/assets/help-B59vE3aE.js @@ -0,0 +1 @@ +const r="";function L(e,t){return e.replaceAll(t,`${t}`)}function E(e=[],t){return t=t.toLocaleLowerCase(),e.reduce((T,[_,n])=>{const l=n.toLocaleLowerCase().indexOf(t);if(l<0)return T;if(n.length<40)T.push([_,n]);else{const o=Math.max(0,l-40),s=Math.min(n.length-1,l+t.length+40);T.push([_,`${o>0?"...":""}${n.slice(o,s)}${s{o.setState(n=>({...n,[e]:y(t,n[e])}))}}function O(e){return e instanceof Function}function Ie(e){return Array.isArray(e)&&e.every(o=>typeof o=="number")}function ye(e,o){const t=[],n=r=>{r.forEach(i=>{t.push(i);const l=o(i);l!=null&&l.length&&n(l)})};return n(e),t}function S(e,o,t){let n=[],r;return i=>{let l;t.key&&t.debug&&(l=Date.now());const u=e(i);if(!(u.length!==n.length||u.some((c,m)=>n[m]!==c)))return r;n=u;let g;if(t.key&&t.debug&&(g=Date.now()),r=o(...u),t==null||t.onChange==null||t.onChange(r),t.key&&t.debug&&t!=null&&t.debug()){const c=Math.round((Date.now()-l)*100)/100,m=Math.round((Date.now()-g)*100)/100,d=m/16,s=(f,p)=>{for(f=String(f);f.length{var r;return(r=e==null?void 0:e.debugAll)!=null?r:e[o]},key:!1,onChange:n}}function De(e,o,t,n){const r=()=>{var l;return(l=i.getValue())!=null?l:e.options.renderFallbackValue},i={id:`${o.id}_${t.id}`,row:o,column:t,getValue:()=>o.getValue(n),renderValue:r,getContext:S(()=>[e,t,o,i],(l,u,a,g)=>({table:l,column:u,row:a,cell:g,getValue:g.getValue,renderValue:g.renderValue}),C(e.options,"debugCells"))};return e._features.forEach(l=>{l.createCell==null||l.createCell(i,t,o,e)},{}),i}function Ee(e,o,t,n){var r,i;const u={...e._getDefaultColumnDef(),...o},a=u.accessorKey;let g=(r=(i=u.id)!=null?i:a?typeof String.prototype.replaceAll=="function"?a.replaceAll(".","_"):a.replace(/\./g,"_"):void 0)!=null?r:typeof u.header=="string"?u.header:void 0,c;if(u.accessorFn?c=u.accessorFn:a&&(a.includes(".")?c=d=>{let s=d;for(const p of a.split(".")){var f;s=(f=s)==null?void 0:f[p]}return s}:c=d=>d[u.accessorKey]),!g)throw new Error;let m={id:`${String(g)}`,accessorFn:c,parent:n,depth:t,columnDef:u,columns:[],getFlatColumns:S(()=>[!0],()=>{var d;return[m,...(d=m.columns)==null?void 0:d.flatMap(s=>s.getFlatColumns())]},C(e.options,"debugColumns")),getLeafColumns:S(()=>[e._getOrderColumnsFn()],d=>{var s;if((s=m.columns)!=null&&s.length){let f=m.columns.flatMap(p=>p.getLeafColumns());return d(f)}return[m]},C(e.options,"debugColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(m,e);return m}const $="debugHeaders";function ue(e,o,t){var n;let i={id:(n=t.id)!=null?n:o.id,column:o,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],u=a=>{a.subHeaders&&a.subHeaders.length&&a.subHeaders.map(u),l.push(a)};return u(i),l},getContext:()=>({table:e,header:i,column:o})};return e._features.forEach(l=>{l.createHeader==null||l.createHeader(i,e)}),i}const Ge={createTable:e=>{e.getHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n,r)=>{var i,l;const u=(i=n==null?void 0:n.map(m=>t.find(d=>d.id===m)).filter(Boolean))!=null?i:[],a=(l=r==null?void 0:r.map(m=>t.find(d=>d.id===m)).filter(Boolean))!=null?l:[],g=t.filter(m=>!(n!=null&&n.includes(m.id))&&!(r!=null&&r.includes(m.id)));return A(o,[...u,...g,...a],e)},C(e.options,$)),e.getCenterHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n,r)=>(t=t.filter(i=>!(n!=null&&n.includes(i.id))&&!(r!=null&&r.includes(i.id))),A(o,t,e,"center")),C(e.options,$)),e.getLeftHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(o,t,n)=>{var r;const i=(r=n==null?void 0:n.map(l=>t.find(u=>u.id===l)).filter(Boolean))!=null?r:[];return A(o,i,e,"left")},C(e.options,$)),e.getRightHeaderGroups=S(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(o,t,n)=>{var r;const i=(r=n==null?void 0:n.map(l=>t.find(u=>u.id===l)).filter(Boolean))!=null?r:[];return A(o,i,e,"right")},C(e.options,$)),e.getFooterGroups=S(()=>[e.getHeaderGroups()],o=>[...o].reverse(),C(e.options,$)),e.getLeftFooterGroups=S(()=>[e.getLeftHeaderGroups()],o=>[...o].reverse(),C(e.options,$)),e.getCenterFooterGroups=S(()=>[e.getCenterHeaderGroups()],o=>[...o].reverse(),C(e.options,$)),e.getRightFooterGroups=S(()=>[e.getRightHeaderGroups()],o=>[...o].reverse(),C(e.options,$)),e.getFlatHeaders=S(()=>[e.getHeaderGroups()],o=>o.map(t=>t.headers).flat(),C(e.options,$)),e.getLeftFlatHeaders=S(()=>[e.getLeftHeaderGroups()],o=>o.map(t=>t.headers).flat(),C(e.options,$)),e.getCenterFlatHeaders=S(()=>[e.getCenterHeaderGroups()],o=>o.map(t=>t.headers).flat(),C(e.options,$)),e.getRightFlatHeaders=S(()=>[e.getRightHeaderGroups()],o=>o.map(t=>t.headers).flat(),C(e.options,$)),e.getCenterLeafHeaders=S(()=>[e.getCenterFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),C(e.options,$)),e.getLeftLeafHeaders=S(()=>[e.getLeftFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),C(e.options,$)),e.getRightLeafHeaders=S(()=>[e.getRightFlatHeaders()],o=>o.filter(t=>{var n;return!((n=t.subHeaders)!=null&&n.length)}),C(e.options,$)),e.getLeafHeaders=S(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(o,t,n)=>{var r,i,l,u,a,g;return[...(r=(i=o[0])==null?void 0:i.headers)!=null?r:[],...(l=(u=t[0])==null?void 0:u.headers)!=null?l:[],...(a=(g=n[0])==null?void 0:g.headers)!=null?a:[]].map(c=>c.getLeafHeaders()).flat()},C(e.options,$))}};function A(e,o,t,n){var r,i;let l=0;const u=function(d,s){s===void 0&&(s=1),l=Math.max(l,s),d.filter(f=>f.getIsVisible()).forEach(f=>{var p;(p=f.columns)!=null&&p.length&&u(f.columns,s+1)},0)};u(e);let a=[];const g=(d,s)=>{const f={depth:s,id:[n,`${s}`].filter(Boolean).join("_"),headers:[]},p=[];d.forEach(R=>{const h=[...p].reverse()[0],_=R.column.depth===f.depth;let v,F=!1;if(_&&R.column.parent?v=R.column.parent:(v=R.column,F=!0),h&&(h==null?void 0:h.column)===v)h.subHeaders.push(R);else{const x=ue(t,v,{id:[n,s,v.id,R==null?void 0:R.id].filter(Boolean).join("_"),isPlaceholder:F,placeholderId:F?`${p.filter(E=>E.column===v).length}`:void 0,depth:s,index:p.length});x.subHeaders.push(R),p.push(x)}f.headers.push(R),R.headerGroup=f}),a.push(f),s>0&&g(p,s-1)},c=o.map((d,s)=>ue(t,d,{depth:l,index:s}));g(c,l-1),a.reverse();const m=d=>d.filter(f=>f.column.getIsVisible()).map(f=>{let p=0,R=0,h=[0];f.subHeaders&&f.subHeaders.length?(h=[],m(f.subHeaders).forEach(v=>{let{colSpan:F,rowSpan:x}=v;p+=F,h.push(x)})):p=1;const _=Math.min(...h);return R=R+_,f.colSpan=p,f.rowSpan=R,{colSpan:p,rowSpan:R}});return m((r=(i=a[0])==null?void 0:i.headers)!=null?r:[]),a}const b=(e,o,t,n,r,i,l)=>{let u={id:o,index:n,original:t,depth:r,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:a=>{if(u._valuesCache.hasOwnProperty(a))return u._valuesCache[a];const g=e.getColumn(a);if(g!=null&&g.accessorFn)return u._valuesCache[a]=g.accessorFn(u.original,n),u._valuesCache[a]},getUniqueValues:a=>{if(u._uniqueValuesCache.hasOwnProperty(a))return u._uniqueValuesCache[a];const g=e.getColumn(a);if(g!=null&&g.accessorFn)return g.columnDef.getUniqueValues?(u._uniqueValuesCache[a]=g.columnDef.getUniqueValues(u.original,n),u._uniqueValuesCache[a]):(u._uniqueValuesCache[a]=[u.getValue(a)],u._uniqueValuesCache[a])},renderValue:a=>{var g;return(g=u.getValue(a))!=null?g:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>ye(u.subRows,a=>a.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let a=[],g=u;for(;;){const c=g.getParentRow();if(!c)break;a.push(c),g=c}return a.reverse()},getAllCells:S(()=>[e.getAllLeafColumns()],a=>a.map(g=>De(e,u,g,g.id)),C(e.options,"debugRows")),_getAllCellsByColumnId:S(()=>[u.getAllCells()],a=>a.reduce((g,c)=>(g[c.column.id]=c,g),{}),C(e.options,"debugRows"))};for(let a=0;a{e._getFacetedRowModel=o.options.getFacetedRowModel&&o.options.getFacetedRowModel(o,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():o.getPreFilteredRowModel(),e._getFacetedUniqueValues=o.options.getFacetedUniqueValues&&o.options.getFacetedUniqueValues(o,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=o.options.getFacetedMinMaxValues&&o.options.getFacetedMinMaxValues(o,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ce=(e,o,t)=>{var n,r;const i=t==null||(n=t.toString())==null?void 0:n.toLowerCase();return!!(!((r=e.getValue(o))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(i))};ce.autoRemove=e=>M(e);const fe=(e,o,t)=>{var n;return!!(!((n=e.getValue(o))==null||(n=n.toString())==null)&&n.includes(t))};fe.autoRemove=e=>M(e);const pe=(e,o,t)=>{var n;return((n=e.getValue(o))==null||(n=n.toString())==null?void 0:n.toLowerCase())===(t==null?void 0:t.toLowerCase())};pe.autoRemove=e=>M(e);const me=(e,o,t)=>{var n;return(n=e.getValue(o))==null?void 0:n.includes(t)};me.autoRemove=e=>M(e);const Se=(e,o,t)=>!t.some(n=>{var r;return!((r=e.getValue(o))!=null&&r.includes(n))});Se.autoRemove=e=>M(e)||!(e!=null&&e.length);const Ce=(e,o,t)=>t.some(n=>{var r;return(r=e.getValue(o))==null?void 0:r.includes(n)});Ce.autoRemove=e=>M(e)||!(e!=null&&e.length);const Re=(e,o,t)=>e.getValue(o)===t;Re.autoRemove=e=>M(e);const he=(e,o,t)=>e.getValue(o)==t;he.autoRemove=e=>M(e);const ee=(e,o,t)=>{let[n,r]=t;const i=e.getValue(o);return i>=n&&i<=r};ee.resolveFilterValue=e=>{let[o,t]=e,n=typeof o!="number"?parseFloat(o):o,r=typeof t!="number"?parseFloat(t):t,i=o===null||Number.isNaN(n)?-1/0:n,l=t===null||Number.isNaN(r)?1/0:r;if(i>l){const u=i;i=l,l=u}return[i,l]};ee.autoRemove=e=>M(e)||M(e[0])&&M(e[1]);const P={includesString:ce,includesStringSensitive:fe,equalsString:pe,arrIncludes:me,arrIncludesAll:Se,arrIncludesSome:Ce,equals:Re,weakEquals:he,inNumberRange:ee};function M(e){return e==null||e===""}const Ae={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:V("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,o)=>{e.getAutoFilterFn=()=>{const t=o.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);return typeof n=="string"?P.includesString:typeof n=="number"?P.inNumberRange:typeof n=="boolean"||n!==null&&typeof n=="object"?P.equals:Array.isArray(n)?P.arrIncludes:P.weakEquals},e.getFilterFn=()=>{var t,n;return O(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(n=o.options.filterFns)==null?void 0:n[e.columnDef.filterFn])!=null?t:P[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,n,r;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((n=o.options.enableColumnFilters)!=null?n:!0)&&((r=o.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=o.getState().columnFilters)==null||(t=t.find(n=>n.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,n;return(t=(n=o.getState().columnFilters)==null?void 0:n.findIndex(r=>r.id===e.id))!=null?t:-1},e.setFilterValue=t=>{o.setColumnFilters(n=>{const r=e.getFilterFn(),i=n==null?void 0:n.find(c=>c.id===e.id),l=y(t,i?i.value:void 0);if(ae(r,l,e)){var u;return(u=n==null?void 0:n.filter(c=>c.id!==e.id))!=null?u:[]}const a={id:e.id,value:l};if(i){var g;return(g=n==null?void 0:n.map(c=>c.id===e.id?a:c))!=null?g:[]}return n!=null&&n.length?[...n,a]:[a]})}},createRow:(e,o)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=o=>{const t=e.getAllLeafColumns(),n=r=>{var i;return(i=y(o,r))==null?void 0:i.filter(l=>{const u=t.find(a=>a.id===l.id);if(u){const a=u.getFilterFn();if(ae(a,l.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(n)},e.resetColumnFilters=o=>{var t,n;e.setColumnFilters(o?[]:(t=(n=e.initialState)==null?void 0:n.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function ae(e,o,t){return(e&&e.autoRemove?e.autoRemove(o,t):!1)||typeof o>"u"||typeof o=="string"&&!o}const ze=(e,o,t)=>t.reduce((n,r)=>{const i=r.getValue(e);return n+(typeof i=="number"?i:0)},0),Le=(e,o,t)=>{let n;return t.forEach(r=>{const i=r.getValue(e);i!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}),n},Oe=(e,o,t)=>{let n;return t.forEach(r=>{const i=r.getValue(e);i!=null&&(n=i)&&(n=i)}),n},je=(e,o,t)=>{let n,r;return t.forEach(i=>{const l=i.getValue(e);l!=null&&(n===void 0?l>=l&&(n=r=l):(n>l&&(n=l),r{let t=0,n=0;if(o.forEach(r=>{let i=r.getValue(e);i!=null&&(i=+i)>=i&&(++t,n+=i)}),t)return n/t},Te=(e,o)=>{if(!o.length)return;const t=o.map(i=>i.getValue(e));if(!Ie(t))return;if(t.length===1)return t[0];const n=Math.floor(t.length/2),r=t.sort((i,l)=>i-l);return t.length%2!==0?r[n]:(r[n-1]+r[n])/2},Be=(e,o)=>Array.from(new Set(o.map(t=>t.getValue(e))).values()),ke=(e,o)=>new Set(o.map(t=>t.getValue(e))).size,qe=(e,o)=>o.length,j={sum:ze,min:Le,max:Oe,extent:je,mean:Ne,median:Te,unique:Be,uniqueCount:ke,count:qe},Ue={getDefaultColumnDef:()=>({aggregatedCell:e=>{var o,t;return(o=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?o:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:V("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,o)=>{e.toggleGrouping=()=>{o.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(n=>n!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,n;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((n=o.options.enableGrouping)!=null?n:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=o.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=o.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=o.getCoreRowModel().flatRows[0],n=t==null?void 0:t.getValue(e.id);if(typeof n=="number")return j.sum;if(Object.prototype.toString.call(n)==="[object Date]")return j.extent},e.getAggregationFn=()=>{var t,n;if(!e)throw new Error;return O(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(n=o.options.aggregationFns)==null?void 0:n[e.columnDef.aggregationFn])!=null?t:j[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=o=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(o),e.resetGrouping=o=>{var t,n;e.setGrouping(o?[]:(t=(n=e.initialState)==null?void 0:n.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,o)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const n=o.getColumn(t);return n!=null&&n.columnDef.getGroupingValue?(e._groupingValuesCache[t]=n.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,o,t,n)=>{e.getIsGrouped=()=>o.getIsGrouped()&&o.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&o.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=t.subRows)!=null&&r.length)}}};function Xe(e,o,t){if(!(o!=null&&o.length)||!t)return e;const n=e.filter(i=>!o.includes(i.id));return t==="remove"?n:[...o.map(i=>e.find(l=>l.id===i)).filter(Boolean),...n]}const Ke={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:V("columnOrder",e)}),createColumn:(e,o)=>{e.getIndex=S(t=>[H(o,t)],t=>t.findIndex(n=>n.id===e.id),C(o.options,"debugColumns")),e.getIsFirstColumn=t=>{var n;return((n=H(o,t)[0])==null?void 0:n.id)===e.id},e.getIsLastColumn=t=>{var n;const r=H(o,t);return((n=r[r.length-1])==null?void 0:n.id)===e.id}},createTable:e=>{e.setColumnOrder=o=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(o),e.resetColumnOrder=o=>{var t;e.setColumnOrder(o?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=S(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(o,t,n)=>r=>{let i=[];if(!(o!=null&&o.length))i=r;else{const l=[...o],u=[...r];for(;u.length&&l.length;){const a=l.shift(),g=u.findIndex(c=>c.id===a);g>-1&&i.push(u.splice(g,1)[0])}i=[...i,...u]}return Xe(i,t,n)},C(e.options,"debugTable"))}},N=()=>({left:[],right:[]}),We={getInitialState:e=>({columnPinning:N(),...e}),getDefaultOptions:e=>({onColumnPinningChange:V("columnPinning",e)}),createColumn:(e,o)=>{e.pin=t=>{const n=e.getLeafColumns().map(r=>r.id).filter(Boolean);o.setColumnPinning(r=>{var i,l;if(t==="right"){var u,a;return{left:((u=r==null?void 0:r.left)!=null?u:[]).filter(m=>!(n!=null&&n.includes(m))),right:[...((a=r==null?void 0:r.right)!=null?a:[]).filter(m=>!(n!=null&&n.includes(m))),...n]}}if(t==="left"){var g,c;return{left:[...((g=r==null?void 0:r.left)!=null?g:[]).filter(m=>!(n!=null&&n.includes(m))),...n],right:((c=r==null?void 0:r.right)!=null?c:[]).filter(m=>!(n!=null&&n.includes(m)))}}return{left:((i=r==null?void 0:r.left)!=null?i:[]).filter(m=>!(n!=null&&n.includes(m))),right:((l=r==null?void 0:r.right)!=null?l:[]).filter(m=>!(n!=null&&n.includes(m)))}})},e.getCanPin=()=>e.getLeafColumns().some(n=>{var r,i,l;return((r=n.columnDef.enablePinning)!=null?r:!0)&&((i=(l=o.options.enableColumnPinning)!=null?l:o.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(u=>u.id),{left:n,right:r}=o.getState().columnPinning,i=t.some(u=>n==null?void 0:n.includes(u)),l=t.some(u=>r==null?void 0:r.includes(u));return i?"left":l?"right":!1},e.getPinnedIndex=()=>{var t,n;const r=e.getIsPinned();return r?(t=(n=o.getState().columnPinning)==null||(n=n[r])==null?void 0:n.indexOf(e.id))!=null?t:-1:0}},createRow:(e,o)=>{e.getCenterVisibleCells=S(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left,o.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(l=>!i.includes(l.column.id))},C(o.options,"debugRows")),e.getLeftVisibleCells=S(()=>[e._getAllVisibleCells(),o.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),C(o.options,"debugRows")),e.getRightVisibleCells=S(()=>[e._getAllVisibleCells(),o.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(l=>l.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),C(o.options,"debugRows"))},createTable:e=>{e.setColumnPinning=o=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(o),e.resetColumnPinning=o=>{var t,n;return e.setColumnPinning(o?N():(t=(n=e.initialState)==null?void 0:n.columnPinning)!=null?t:N())},e.getIsSomeColumnsPinned=o=>{var t;const n=e.getState().columnPinning;if(!o){var r,i;return!!((r=n.left)!=null&&r.length||(i=n.right)!=null&&i.length)}return!!((t=n[o])!=null&&t.length)},e.getLeftLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(o,t)=>(t??[]).map(n=>o.find(r=>r.id===n)).filter(Boolean),C(e.options,"debugColumns")),e.getRightLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(o,t)=>(t??[]).map(n=>o.find(r=>r.id===n)).filter(Boolean),C(e.options,"debugColumns")),e.getCenterLeafColumns=S(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(o,t,n)=>{const r=[...t??[],...n??[]];return o.filter(i=>!r.includes(i.id))},C(e.options,"debugColumns"))}};function Je(e){return e||(typeof document<"u"?document:null)}const z={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},T=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Qe={getDefaultColumnDef:()=>z,getInitialState:e=>({columnSizing:{},columnSizingInfo:T(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:V("columnSizing",e),onColumnSizingInfoChange:V("columnSizingInfo",e)}),createColumn:(e,o)=>{e.getSize=()=>{var t,n,r;const i=o.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:z.minSize,(n=i??e.columnDef.size)!=null?n:z.size),(r=e.columnDef.maxSize)!=null?r:z.maxSize)},e.getStart=S(t=>[t,H(o,t),o.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((r,i)=>r+i.getSize(),0),C(o.options,"debugColumns")),e.getAfter=S(t=>[t,H(o,t),o.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((r,i)=>r+i.getSize(),0),C(o.options,"debugColumns")),e.resetSize=()=>{o.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var t,n;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((n=o.options.enableColumnResizing)!=null?n:!0)},e.getIsResizing=()=>o.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,o)=>{e.getSize=()=>{let t=0;const n=r=>{if(r.subHeaders.length)r.subHeaders.forEach(n);else{var i;t+=(i=r.column.getSize())!=null?i:0}};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const n=o.getColumn(e.column.id),r=n==null?void 0:n.getCanResize();return i=>{if(!n||!r||(i.persist==null||i.persist(),B(i)&&i.touches&&i.touches.length>1))return;const l=e.getSize(),u=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[n.id,n.getSize()]],a=B(i)?Math.round(i.touches[0].clientX):i.clientX,g={},c=(h,_)=>{typeof _=="number"&&(o.setColumnSizingInfo(v=>{var F,x;const E=o.options.columnResizeDirection==="rtl"?-1:1,oe=(_-((F=v==null?void 0:v.startOffset)!=null?F:0))*E,re=Math.max(oe/((x=v==null?void 0:v.startSize)!=null?x:0),-.999999);return v.columnSizingStart.forEach(ve=>{let[_e,ie]=ve;g[_e]=Math.round(Math.max(ie+ie*re,0)*100)/100}),{...v,deltaOffset:oe,deltaPercentage:re}}),(o.options.columnResizeMode==="onChange"||h==="end")&&o.setColumnSizing(v=>({...v,...g})))},m=h=>c("move",h),d=h=>{c("end",h),o.setColumnSizingInfo(_=>({..._,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},s=Je(t),f={moveHandler:h=>m(h.clientX),upHandler:h=>{s==null||s.removeEventListener("mousemove",f.moveHandler),s==null||s.removeEventListener("mouseup",f.upHandler),d(h.clientX)}},p={moveHandler:h=>(h.cancelable&&(h.preventDefault(),h.stopPropagation()),m(h.touches[0].clientX),!1),upHandler:h=>{var _;s==null||s.removeEventListener("touchmove",p.moveHandler),s==null||s.removeEventListener("touchend",p.upHandler),h.cancelable&&(h.preventDefault(),h.stopPropagation()),d((_=h.touches[0])==null?void 0:_.clientX)}},R=Ye()?{passive:!1}:!1;B(i)?(s==null||s.addEventListener("touchmove",p.moveHandler,R),s==null||s.addEventListener("touchend",p.upHandler,R)):(s==null||s.addEventListener("mousemove",f.moveHandler,R),s==null||s.addEventListener("mouseup",f.upHandler,R)),o.setColumnSizingInfo(h=>({...h,startOffset:a,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=o=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(o),e.setColumnSizingInfo=o=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(o),e.resetColumnSizing=o=>{var t;e.setColumnSizing(o?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=o=>{var t;e.setColumnSizingInfo(o?T():(t=e.initialState.columnSizingInfo)!=null?t:T())},e.getTotalSize=()=>{var o,t;return(o=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getLeftTotalSize=()=>{var o,t;return(o=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getCenterTotalSize=()=>{var o,t;return(o=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0},e.getRightTotalSize=()=>{var o,t;return(o=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((n,r)=>n+r.getSize(),0))!=null?o:0}}};let L=null;function Ye(){if(typeof L=="boolean")return L;let e=!1;try{const o={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,o),window.removeEventListener("test",t)}catch{e=!1}return L=e,L}function B(e){return e.type==="touchstart"}const Ze={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:V("columnVisibility",e)}),createColumn:(e,o)=>{e.toggleVisibility=t=>{e.getCanHide()&&o.setColumnVisibility(n=>({...n,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,n;const r=e.columns;return(t=r.length?r.some(i=>i.getIsVisible()):(n=o.getState().columnVisibility)==null?void 0:n[e.id])!=null?t:!0},e.getCanHide=()=>{var t,n;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((n=o.options.enableHiding)!=null?n:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,o)=>{e._getAllVisibleCells=S(()=>[e.getAllCells(),o.getState().columnVisibility],t=>t.filter(n=>n.column.getIsVisible()),C(o.options,"debugRows")),e.getVisibleCells=S(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,n,r)=>[...t,...n,...r],C(o.options,"debugRows"))},createTable:e=>{const o=(t,n)=>S(()=>[n(),n().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),C(e.options,"debugColumns"));e.getVisibleFlatColumns=o("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=o("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=o("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=o("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=o("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:(n=e.initialState.columnVisibility)!=null?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=(n=t)!=null?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,i)=>({...r,[i.id]:t||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible((n=t.target)==null?void 0:n.checked)}}};function H(e,o){return o?o==="center"?e.getCenterVisibleLeafColumns():o==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const be={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},et={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:V("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:o=>{var t;const n=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[o.id])==null?void 0:t.getValue();return typeof n=="string"||typeof n=="number"}}),createColumn:(e,o)=>{e.getCanGlobalFilter=()=>{var t,n,r,i;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((n=o.options.enableGlobalFilter)!=null?n:!0)&&((r=o.options.enableFilters)!=null?r:!0)&&((i=o.options.getColumnCanGlobalFilter==null?void 0:o.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>P.includesString,e.getGlobalFilterFn=()=>{var o,t;const{globalFilterFn:n}=e.options;return O(n)?n:n==="auto"?e.getGlobalAutoFilterFn():(o=(t=e.options.filterFns)==null?void 0:t[n])!=null?o:P[n]},e.setGlobalFilter=o=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(o)},e.resetGlobalFilter=o=>{e.setGlobalFilter(o?void 0:e.initialState.globalFilter)}}},tt={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:V("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let o=!1,t=!1;e._autoResetExpanded=()=>{var n,r;if(!o){e._queue(()=>{o=!0});return}if((n=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?n:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=n=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(n),e.toggleAllRowsExpanded=n=>{n??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=n=>{var r,i;e.setExpanded(n?{}:(r=(i=e.initialState)==null?void 0:i.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(n=>n.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>n=>{n.persist==null||n.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const n=e.getState().expanded;return n===!0||Object.values(n).some(Boolean)},e.getIsAllRowsExpanded=()=>{const n=e.getState().expanded;return typeof n=="boolean"?n===!0:!(!Object.keys(n).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let n=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const l=i.split(".");n=Math.max(n,l.length)}),n},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,o)=>{e.toggleExpanded=t=>{o.setExpanded(n=>{var r;const i=n===!0?!0:!!(n!=null&&n[e.id]);let l={};if(n===!0?Object.keys(o.getRowModel().rowsById).forEach(u=>{l[u]=!0}):l=n,t=(r=t)!=null?r:!i,!i&&t)return{...l,[e.id]:!0};if(i&&!t){const{[e.id]:u,...a}=l;return a}return n})},e.getIsExpanded=()=>{var t;const n=o.getState().expanded;return!!((t=o.options.getIsRowExpanded==null?void 0:o.options.getIsRowExpanded(e))!=null?t:n===!0||n!=null&&n[e.id])},e.getCanExpand=()=>{var t,n,r;return(t=o.options.getRowCanExpand==null?void 0:o.options.getRowCanExpand(e))!=null?t:((n=o.options.enableExpanding)!=null?n:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let t=!0,n=e;for(;t&&n.parentId;)n=o.getRow(n.parentId,!0),t=n.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},K=0,W=10,k=()=>({pageIndex:K,pageSize:W}),nt={getInitialState:e=>({...e,pagination:{...k(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:V("pagination",e)}),createTable:e=>{let o=!1,t=!1;e._autoResetPageIndex=()=>{var n,r;if(!o){e._queue(()=>{o=!0});return}if((n=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?n:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=n=>{const r=i=>y(n,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=n=>{var r;e.setPagination(n?k():(r=e.initialState.pagination)!=null?r:k())},e.setPageIndex=n=>{e.setPagination(r=>{let i=y(n,r.pageIndex);const l=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,l)),{...r,pageIndex:i}})},e.resetPageIndex=n=>{var r,i;e.setPageIndex(n?K:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?r:K)},e.resetPageSize=n=>{var r,i;e.setPageSize(n?W:(r=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?r:W)},e.setPageSize=n=>{e.setPagination(r=>{const i=Math.max(1,y(n,r.pageSize)),l=r.pageSize*r.pageIndex,u=Math.floor(l/i);return{...r,pageIndex:u,pageSize:i}})},e.setPageCount=n=>e.setPagination(r=>{var i;let l=y(n,(i=e.options.pageCount)!=null?i:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...r,pageCount:l}}),e.getPageOptions=S(()=>[e.getPageCount()],n=>{let r=[];return n&&n>0&&(r=[...new Array(n)].fill(null).map((i,l)=>l)),r},C(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:n}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:ne.setPageIndex(n=>n-1),e.nextPage=()=>e.setPageIndex(n=>n+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var n;return(n=e.options.pageCount)!=null?n:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var n;return(n=e.options.rowCount)!=null?n:e.getPrePaginationRowModel().rows.length}}},q=()=>({top:[],bottom:[]}),ot={getInitialState:e=>({rowPinning:q(),...e}),getDefaultOptions:e=>({onRowPinningChange:V("rowPinning",e)}),createRow:(e,o)=>{e.pin=(t,n,r)=>{const i=n?e.getLeafRows().map(a=>{let{id:g}=a;return g}):[],l=r?e.getParentRows().map(a=>{let{id:g}=a;return g}):[],u=new Set([...l,e.id,...i]);o.setRowPinning(a=>{var g,c;if(t==="bottom"){var m,d;return{top:((m=a==null?void 0:a.top)!=null?m:[]).filter(p=>!(u!=null&&u.has(p))),bottom:[...((d=a==null?void 0:a.bottom)!=null?d:[]).filter(p=>!(u!=null&&u.has(p))),...Array.from(u)]}}if(t==="top"){var s,f;return{top:[...((s=a==null?void 0:a.top)!=null?s:[]).filter(p=>!(u!=null&&u.has(p))),...Array.from(u)],bottom:((f=a==null?void 0:a.bottom)!=null?f:[]).filter(p=>!(u!=null&&u.has(p)))}}return{top:((g=a==null?void 0:a.top)!=null?g:[]).filter(p=>!(u!=null&&u.has(p))),bottom:((c=a==null?void 0:a.bottom)!=null?c:[]).filter(p=>!(u!=null&&u.has(p)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:n,enablePinning:r}=o.options;return typeof n=="function"?n(e):(t=n??r)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:n,bottom:r}=o.getState().rowPinning,i=t.some(u=>n==null?void 0:n.includes(u)),l=t.some(u=>r==null?void 0:r.includes(u));return i?"top":l?"bottom":!1},e.getPinnedIndex=()=>{var t,n;const r=e.getIsPinned();if(!r)return-1;const i=(t=r==="top"?o.getTopRows():o.getBottomRows())==null?void 0:t.map(l=>{let{id:u}=l;return u});return(n=i==null?void 0:i.indexOf(e.id))!=null?n:-1}},createTable:e=>{e.setRowPinning=o=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(o),e.resetRowPinning=o=>{var t,n;return e.setRowPinning(o?q():(t=(n=e.initialState)==null?void 0:n.rowPinning)!=null?t:q())},e.getIsSomeRowsPinned=o=>{var t;const n=e.getState().rowPinning;if(!o){var r,i;return!!((r=n.top)!=null&&r.length||(i=n.bottom)!=null&&i.length)}return!!((t=n[o])!=null&&t.length)},e._getPinnedRows=(o,t,n)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(t??[]).map(l=>{const u=e.getRow(l,!0);return u.getIsAllParentsExpanded()?u:null}):(t??[]).map(l=>o.find(u=>u.id===l))).filter(Boolean).map(l=>({...l,position:n}))},e.getTopRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(o,t)=>e._getPinnedRows(o,t,"top"),C(e.options,"debugRows")),e.getBottomRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(o,t)=>e._getPinnedRows(o,t,"bottom"),C(e.options,"debugRows")),e.getCenterRows=S(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(o,t,n)=>{const r=new Set([...t??[],...n??[]]);return o.filter(i=>!r.has(i.id))},C(e.options,"debugRows"))}},rt={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:V("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=o=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(o),e.resetRowSelection=o=>{var t;return e.setRowSelection(o?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=o=>{e.setRowSelection(t=>{o=typeof o<"u"?o:!e.getIsAllRowsSelected();const n={...t},r=e.getPreGroupedRowModel().flatRows;return o?r.forEach(i=>{i.getCanSelect()&&(n[i.id]=!0)}):r.forEach(i=>{delete n[i.id]}),n})},e.toggleAllPageRowsSelected=o=>e.setRowSelection(t=>{const n=typeof o<"u"?o:!e.getIsAllPageRowsSelected(),r={...t};return e.getRowModel().rows.forEach(i=>{J(r,i.id,n,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=S(()=>[e.getState().rowSelection,e.getCoreRowModel()],(o,t)=>Object.keys(o).length?U(e,t):{rows:[],flatRows:[],rowsById:{}},C(e.options,"debugTable")),e.getFilteredSelectedRowModel=S(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(o,t)=>Object.keys(o).length?U(e,t):{rows:[],flatRows:[],rowsById:{}},C(e.options,"debugTable")),e.getGroupedSelectedRowModel=S(()=>[e.getState().rowSelection,e.getSortedRowModel()],(o,t)=>Object.keys(o).length?U(e,t):{rows:[],flatRows:[],rowsById:{}},C(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const o=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let n=!!(o.length&&Object.keys(t).length);return n&&o.some(r=>r.getCanSelect()&&!t[r.id])&&(n=!1),n},e.getIsAllPageRowsSelected=()=>{const o=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:t}=e.getState();let n=!!o.length;return n&&o.some(r=>!t[r.id])&&(n=!1),n},e.getIsSomeRowsSelected=()=>{var o;const t=Object.keys((o=e.getState().rowSelection)!=null?o:{}).length;return t>0&&t{const o=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:o.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>o=>{e.toggleAllRowsSelected(o.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>o=>{e.toggleAllPageRowsSelected(o.target.checked)}},createRow:(e,o)=>{e.toggleSelected=(t,n)=>{const r=e.getIsSelected();o.setRowSelection(i=>{var l;if(t=typeof t<"u"?t:!r,e.getCanSelect()&&r===t)return i;const u={...i};return J(u,e.id,t,(l=n==null?void 0:n.selectChildren)!=null?l:!0,o),u})},e.getIsSelected=()=>{const{rowSelection:t}=o.getState();return te(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=o.getState();return Q(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=o.getState();return Q(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof o.options.enableRowSelection=="function"?o.options.enableRowSelection(e):(t=o.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof o.options.enableSubRowSelection=="function"?o.options.enableSubRowSelection(e):(t=o.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof o.options.enableMultiRowSelection=="function"?o.options.enableMultiRowSelection(e):(t=o.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected((r=n.target)==null?void 0:r.checked)}}}},J=(e,o,t,n,r)=>{var i;const l=r.getRow(o,!0);t?(l.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),l.getCanSelect()&&(e[o]=!0)):delete e[o],n&&(i=l.subRows)!=null&&i.length&&l.getCanSelectSubRows()&&l.subRows.forEach(u=>J(e,u.id,t,n,r))};function U(e,o){const t=e.getState().rowSelection,n=[],r={},i=function(l,u){return l.map(a=>{var g;const c=te(a,t);if(c&&(n.push(a),r[a.id]=a),(g=a.subRows)!=null&&g.length&&(a={...a,subRows:i(a.subRows)}),c)return a}).filter(Boolean)};return{rows:i(o.rows),flatRows:n,rowsById:r}}function te(e,o){var t;return(t=o[e.id])!=null?t:!1}function Q(e,o,t){var n;if(!((n=e.subRows)!=null&&n.length))return!1;let r=!0,i=!1;return e.subRows.forEach(l=>{if(!(i&&!r)&&(l.getCanSelect()&&(te(l,o)?i=!0:r=!1),l.subRows&&l.subRows.length)){const u=Q(l,o);u==="all"?i=!0:(u==="some"&&(i=!0),r=!1)}}),r?"all":i?"some":!1}const Y=/([0-9]+)/gm,it=(e,o,t)=>we(D(e.getValue(t)).toLowerCase(),D(o.getValue(t)).toLowerCase()),lt=(e,o,t)=>we(D(e.getValue(t)),D(o.getValue(t))),st=(e,o,t)=>ne(D(e.getValue(t)).toLowerCase(),D(o.getValue(t)).toLowerCase()),ut=(e,o,t)=>ne(D(e.getValue(t)),D(o.getValue(t))),at=(e,o,t)=>{const n=e.getValue(t),r=o.getValue(t);return n>r?1:nne(e.getValue(t),o.getValue(t));function ne(e,o){return e===o?0:e>o?1:-1}function D(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function we(e,o){const t=e.split(Y).filter(Boolean),n=o.split(Y).filter(Boolean);for(;t.length&&n.length;){const r=t.shift(),i=n.shift(),l=parseInt(r,10),u=parseInt(i,10),a=[l,u].sort();if(isNaN(a[0])){if(r>i)return 1;if(i>r)return-1;continue}if(isNaN(a[1]))return isNaN(l)?-1:1;if(l>u)return 1;if(u>l)return-1}return t.length-n.length}const G={alphanumeric:it,alphanumericCaseSensitive:lt,text:st,textCaseSensitive:ut,datetime:at,basic:gt},dt={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:V("sorting",e),isMultiSortEvent:o=>o.shiftKey}),createColumn:(e,o)=>{e.getAutoSortingFn=()=>{const t=o.getFilteredRowModel().flatRows.slice(10);let n=!1;for(const r of t){const i=r==null?void 0:r.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return G.datetime;if(typeof i=="string"&&(n=!0,i.split(Y).length>1))return G.alphanumeric}return n?G.text:G.basic},e.getAutoSortDir=()=>{const t=o.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,n;if(!e)throw new Error;return O(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(n=o.options.sortingFns)==null?void 0:n[e.columnDef.sortingFn])!=null?t:G[e.columnDef.sortingFn]},e.toggleSorting=(t,n)=>{const r=e.getNextSortingOrder(),i=typeof t<"u"&&t!==null;o.setSorting(l=>{const u=l==null?void 0:l.find(s=>s.id===e.id),a=l==null?void 0:l.findIndex(s=>s.id===e.id);let g=[],c,m=i?t:r==="desc";if(l!=null&&l.length&&e.getCanMultiSort()&&n?u?c="toggle":c="add":l!=null&&l.length&&a!==l.length-1?c="replace":u?c="toggle":c="replace",c==="toggle"&&(i||r||(c="remove")),c==="add"){var d;g=[...l,{id:e.id,desc:m}],g.splice(0,g.length-((d=o.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else c==="toggle"?g=l.map(s=>s.id===e.id?{...s,desc:m}:s):c==="remove"?g=l.filter(s=>s.id!==e.id):g=[{id:e.id,desc:m}];return g})},e.getFirstSortDir=()=>{var t,n;return((t=(n=e.columnDef.sortDescFirst)!=null?n:o.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var n,r;const i=e.getFirstSortDir(),l=e.getIsSorted();return l?l!==i&&((n=o.options.enableSortingRemoval)==null||n)&&(!(t&&(r=o.options.enableMultiRemove)!=null)||r)?!1:l==="desc"?"asc":"desc":i},e.getCanSort=()=>{var t,n;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((n=o.options.enableSorting)!=null?n:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,n;return(t=(n=e.columnDef.enableMultiSort)!=null?n:o.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const n=(t=o.getState().sorting)==null?void 0:t.find(r=>r.id===e.id);return n?n.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,n;return(t=(n=o.getState().sorting)==null?void 0:n.findIndex(r=>r.id===e.id))!=null?t:-1},e.clearSorting=()=>{o.setSorting(t=>t!=null&&t.length?t.filter(n=>n.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return n=>{t&&(n.persist==null||n.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?o.options.isMultiSortEvent==null?void 0:o.options.isMultiSortEvent(n):!1))}}},createTable:e=>{e.setSorting=o=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(o),e.resetSorting=o=>{var t,n;e.setSorting(o?[]:(t=(n=e.initialState)==null?void 0:n.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},ct=[Ge,Ze,Ke,We,He,Ae,be,et,dt,Ue,tt,nt,ot,rt,Qe];function ft(e){var o,t;const n=[...ct,...(o=e._features)!=null?o:[]];let r={_features:n};const i=r._features.reduce((d,s)=>Object.assign(d,s.getDefaultOptions==null?void 0:s.getDefaultOptions(r)),{}),l=d=>r.options.mergeOptions?r.options.mergeOptions(i,d):{...i,...d};let a={...{},...(t=e.initialState)!=null?t:{}};r._features.forEach(d=>{var s;a=(s=d.getInitialState==null?void 0:d.getInitialState(a))!=null?s:a});const g=[];let c=!1;const m={_features:n,options:{...i,...e},initialState:a,_queue:d=>{g.push(d),c||(c=!0,Promise.resolve().then(()=>{for(;g.length;)g.shift()();c=!1}).catch(s=>setTimeout(()=>{throw s})))},reset:()=>{r.setState(r.initialState)},setOptions:d=>{const s=y(d,r.options);r.options=l(s)},getState:()=>r.options.state,setState:d=>{r.options.onStateChange==null||r.options.onStateChange(d)},_getRowId:(d,s,f)=>{var p;return(p=r.options.getRowId==null?void 0:r.options.getRowId(d,s,f))!=null?p:`${f?[f.id,s].join("."):s}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(d,s)=>{let f=(s?r.getPrePaginationRowModel():r.getRowModel()).rowsById[d];if(!f&&(f=r.getCoreRowModel().rowsById[d],!f))throw new Error;return f},_getDefaultColumnDef:S(()=>[r.options.defaultColumn],d=>{var s;return d=(s=d)!=null?s:{},{header:f=>{const p=f.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:f=>{var p,R;return(p=(R=f.renderValue())==null||R.toString==null?void 0:R.toString())!=null?p:null},...r._features.reduce((f,p)=>Object.assign(f,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...d}},C(e,"debugColumns")),_getColumnDefs:()=>r.options.columns,getAllColumns:S(()=>[r._getColumnDefs()],d=>{const s=function(f,p,R){return R===void 0&&(R=0),f.map(h=>{const _=Ee(r,h,R,p),v=h;return _.columns=v.columns?s(v.columns,_,R+1):[],_})};return s(d)},C(e,"debugColumns")),getAllFlatColumns:S(()=>[r.getAllColumns()],d=>d.flatMap(s=>s.getFlatColumns()),C(e,"debugColumns")),_getAllFlatColumnsById:S(()=>[r.getAllFlatColumns()],d=>d.reduce((s,f)=>(s[f.id]=f,s),{}),C(e,"debugColumns")),getAllLeafColumns:S(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(d,s)=>{let f=d.flatMap(p=>p.getLeafColumns());return s(f)},C(e,"debugColumns")),getColumn:d=>r._getAllFlatColumnsById()[d]};Object.assign(r,m);for(let d=0;dS(()=>[e.options.data],o=>{const t={rows:[],flatRows:[],rowsById:{}},n=function(r,i,l){i===void 0&&(i=0);const u=[];for(let g=0;ge._autoResetPageIndex()))}function mt(e,o,t){return t.options.filterFromLeafRows?St(e,o,t):Ct(e,o,t)}function St(e,o,t){var n;const r=[],i={},l=(n=t.options.maxLeafRowFilterDepth)!=null?n:100,u=function(a,g){g===void 0&&(g=0);const c=[];for(let d=0;dS(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(o,t,n)=>{if(!o.rows.length||!(t!=null&&t.length)&&!n){for(let d=0;d{var s;const f=e.getColumn(d.id);if(!f)return;const p=f.getFilterFn();p&&r.push({id:d.id,filterFn:p,resolvedValue:(s=p.resolveFilterValue==null?void 0:p.resolveFilterValue(d.value))!=null?s:d.value})});const l=(t??[]).map(d=>d.id),u=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter(d=>d.getCanGlobalFilter());n&&u&&a.length&&(l.push("__global__"),a.forEach(d=>{var s;i.push({id:d.id,filterFn:u,resolvedValue:(s=u.resolveFilterValue==null?void 0:u.resolveFilterValue(n))!=null?s:n})}));let g,c;for(let d=0;d{s.columnFiltersMeta[p]=R})}if(i.length){for(let f=0;f{s.columnFiltersMeta[p]=R})){s.columnFilters.__global__=!0;break}}s.columnFilters.__global__!==!0&&(s.columnFilters.__global__=!1)}}const m=d=>{for(let s=0;se._autoResetPageIndex()))}function ht(){return e=>S(()=>[e.getState().sorting,e.getPreSortedRowModel()],(o,t)=>{if(!t.rows.length||!(o!=null&&o.length))return t;const n=e.getState().sorting,r=[],i=n.filter(a=>{var g;return(g=e.getColumn(a.id))==null?void 0:g.getCanSort()}),l={};i.forEach(a=>{const g=e.getColumn(a.id);g&&(l[a.id]={sortUndefined:g.columnDef.sortUndefined,invertSorting:g.columnDef.invertSorting,sortingFn:g.getSortingFn()})});const u=a=>{const g=a.map(c=>({...c}));return g.sort((c,m)=>{for(let s=0;s{var m;r.push(c),(m=c.subRows)!=null&&m.length&&(c.subRows=u(c.subRows))}),g};return{rows:u(t.rows),flatRows:r,rowsById:t.rowsById}},C(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** + * react-table + * + * Copyright (c) TanStack + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function ge(e,o){return e?wt(e)?I.createElement(e,o):e:null}function wt(e){return vt(e)||typeof e=="function"||_t(e)}function vt(e){return typeof e=="function"&&(()=>{const o=Object.getPrototypeOf(e);return o.prototype&&o.prototype.isReactComponent})()}function _t(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Ft(e){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=I.useState(()=>({current:ft(o)})),[n,r]=I.useState(()=>t.current.initialState);return t.current.setOptions(i=>({...i,...e,state:{...n,...e.state},onStateChange:l=>{r(l),e.onStateChange==null||e.onStateChange(l)}})),t.current}const Z=24;function Et({headline:e,data:o=[[],[]],action:t}){var h,_;const n=I.useRef(null),r=I.useMemo(()=>o[0].map(({name:v,type:F})=>({accessorKey:v,meta:{type:F}})),[o[0]]),[i,l]=I.useState([]),[u,a]=I.useState(""),g=Ft({data:o[1],columns:r,state:{sorting:i,globalFilter:u},onGlobalFilterChange:a,onSortingChange:l,getCoreRowModel:pt(),getSortedRowModel:ht(),getFilteredRowModel:Rt()}),c=o[0].length+1,{rows:m}=g.getRowModel(),d=$e({getScrollElement:()=>n.current,estimateSize:()=>Z,count:m.length,overscan:10}),s=d.getVirtualItems(),f=d.getTotalSize(),p=s.length>0?((h=s==null?void 0:s[0])==null?void 0:h.start)??0:0,R=s.length>0?f-(((_=s==null?void 0:s[s.length-1])==null?void 0:_.end)??0):0;return I.useEffect(()=>{a(""),l([])},[o]),w.jsxs("div",{className:"w-full h-full flex flex-col",children:[w.jsx(xt,{headline:e,filter:u,setFilter:a}),t,w.jsx("div",{ref:n,className:"w-full h-full overflow-auto hover:scrollbar scrollbar--horizontal scrollbar--vertical",children:w.jsxs("table",{cellPadding:0,cellSpacing:0,className:"w-full slashed-zero tabular-nums text-neutral-700 dark:text-neutral-300 text-xs font-medium whitespace-nowrap text-left",children:[le(r)&&w.jsx("thead",{className:"sticky top-0",children:g.getHeaderGroups().map(v=>w.jsxs("tr",{className:"bg-neutral-10 backdrop-blur-lg",style:{height:`${Z}px`},children:[w.jsx("th",{className:"pl-2 pr-4 pt-1 text-sm pb-1 border-r-2 last:border-r-0 border-light dark:border-dark",children:"Row #"}),v.headers.map(F=>w.jsx("th",{className:"pl-2 pr-4 pt-1 text-sm pb-1 border-r-2 last:border-r-0 border-light dark:border-dark",children:F.isPlaceholder?w.jsx(w.Fragment,{}):w.jsxs("div",{className:X(F.column.getCanSort()?"flex cursor-pointer select-none":"",["int","float"].includes(F.column.columnDef.meta.type)&&"justify-end"),onClick:F.column.getToggleSortingHandler(),children:[F.column.getCanSort()&&w.jsx(Ve,{className:"mr-1 w-4"}),ge(F.column.columnDef.header,F.getContext()),{asc:w.jsx(Pe,{className:"ml-1 w-4"}),desc:w.jsx(Me,{className:"ml-1 w-4"})}[F.column.getIsSorted()]??null]})},F.id))]},v.id))}),w.jsxs("tbody",{children:[p>0&&w.jsx("tr",{children:w.jsx("td",{style:{height:`${p}px`}})}),le(s)?s.map(v=>{const F=m[v.index];return w.jsxs("tr",{className:"even:bg-neutral-5 hover:text-neutral-900 hover:bg-neutral-20 dark:hover:text-neutral-100",style:{maxHeight:`${v.size}px`},children:[w.jsx("td",{style:{maxHeight:`${v.size}px`},className:"pl-2 pr-4 text-sm border-r-2 last:border-r-0 border-light dark:border-dark",children:F.index+1}),F.getVisibleCells().map(x=>w.jsx("td",{style:{maxHeight:`${v.size}px`},className:X("p-4 py-1 border-r-2 last:border-r-0 border-light dark:border-dark",["int","float"].includes(x.column.columnDef.meta.type)&&"text-right"),children:ge(x.column.columnDef.cell,x.getContext())},x.id))]},F.id)}):w.jsx(Vt,{columns:c>0?c:void 0}),R>0&&w.jsx("tr",{children:w.jsx("td",{style:{height:`${R}px`}})})]})]})}),w.jsx($t,{count:m.length})]})}function xt({headline:e,filter:o,setFilter:t}){return w.jsxs("div",{className:"flex items-center text-neutral-600 dark:text-neutral-300 text-xs font-medium py-1",children:[Fe(e)&&w.jsx("h4",{className:"w-full font-bold",children:e}),w.jsx("div",{className:"flex justify-end items-center",children:w.jsx(se,{className:"!m-0 mb-2",size:xe.sm,children:({className:n})=>w.jsx(se.Textfield,{type:"search",className:X(n,"w-full"),value:o,placeholder:"Filter Rows",onInput:r=>{t(r.target.value)}})})})]})}function $t({count:e}){return w.jsx("div",{className:"text-neutral-700 dark:text-neutral-300 text-xs font-medium py-2",children:w.jsxs("p",{children:["Total Rows: ",e]})})}function Vt({rows:e=7,columns:o=5}){return w.jsx(w.Fragment,{children:Array(e).fill(void 0).map((t,n)=>w.jsx("tr",{className:"odd:bg-neutral-10",style:{height:`${Z}px`},children:Array(o).fill(void 0).map((r,i)=>w.jsx("td",{className:"p-4 py-1 border-r-2 last:border-r-0 border-light dark:border-dark"},i))},n))})}function Gt(e){if(de(e))return[[],[]];const o=e.toArray(),t=Array.from(o).map(Mt);return[e.schema.fields.map(r=>({name:r.name,type:Pt(r.type.toString())})),t]}function Mt(e=[]){return Array.from(e).reduce((o,[t,n])=>Object.assign(o,{[t]:de(n)?void 0:String(n)}),{})}function Pt(e){return e==="Int32"||e==="Int64"?"int":e==="Float64"?"float":"text"}export{$t as F,Vt as G,Et as T,Gt as g}; diff --git a/web/client/dist/assets/index-C-dJH7yZ.js b/web/client/dist/assets/index-C-dJH7yZ.js new file mode 100644 index 0000000000..f5217c88dc --- /dev/null +++ b/web/client/dist/assets/index-C-dJH7yZ.js @@ -0,0 +1,4 @@ +import{r as w}from"./index-Dj0i1-CA.js";import{r as I}from"./floating-ui.react-dom-CjE-JNW1.js";function v(r,l,e){let s=e.initialDeps??[],t;function n(){var i,o,h,c;let a;e.key&&((i=e.debug)!=null&&i.call(e))&&(a=Date.now());const u=r();if(!(u.length!==s.length||u.some((f,g)=>s[g]!==f)))return t;s=u;let m;if(e.key&&((o=e.debug)!=null&&o.call(e))&&(m=Date.now()),t=l(...u),e.key&&((h=e.debug)!=null&&h.call(e))){const f=Math.round((Date.now()-a)*100)/100,g=Math.round((Date.now()-m)*100)/100,x=g/16,b=(p,C)=>{for(p=String(p);p.length{s=i},n}function S(r,l){if(r===void 0)throw new Error("Unexpected undefined");return r}const R=(r,l)=>Math.abs(r-l)<1.01,_=(r,l,e)=>{let s;return function(...t){r.clearTimeout(s),s=r.setTimeout(()=>l.apply(this,t),e)}},y=r=>{const{offsetWidth:l,offsetHeight:e}=r;return{width:l,height:e}},F=r=>r,A=r=>{const l=Math.max(r.startIndex-r.overscan,0),e=Math.min(r.endIndex+r.overscan,r.count-1),s=[];for(let t=l;t<=e;t++)s.push(t);return s},T=(r,l)=>{const e=r.scrollElement;if(!e)return;const s=r.targetWindow;if(!s)return;const t=i=>{const{width:o,height:h}=i;l({width:Math.round(o),height:Math.round(h)})};if(t(y(e)),!s.ResizeObserver)return()=>{};const n=new s.ResizeObserver(i=>{const o=()=>{const h=i[0];if(h!=null&&h.borderBoxSize){const c=h.borderBoxSize[0];if(c){t({width:c.inlineSize,height:c.blockSize});return}}t(y(e))};r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},M={passive:!0},E=typeof window>"u"?!0:"onscrollend"in window,k=(r,l)=>{const e=r.scrollElement;if(!e)return;const s=r.targetWindow;if(!s)return;let t=0;const n=r.options.useScrollendEvent&&E?()=>{}:_(s,()=>{l(t,!1)},r.options.isScrollingResetDelay),i=a=>()=>{const{horizontal:u,isRtl:d}=r.options;t=u?e.scrollLeft*(d&&-1||1):e.scrollTop,n(),l(t,a)},o=i(!0),h=i(!1);h(),e.addEventListener("scroll",o,M);const c=r.options.useScrollendEvent&&E;return c&&e.addEventListener("scrollend",h,M),()=>{e.removeEventListener("scroll",o),c&&e.removeEventListener("scrollend",h)}},D=(r,l,e)=>{if(l!=null&&l.borderBoxSize){const s=l.borderBoxSize[0];if(s)return Math.round(s[e.options.horizontal?"inlineSize":"blockSize"])}return r[e.options.horizontal?"offsetWidth":"offsetHeight"]},W=(r,{adjustments:l=0,behavior:e},s)=>{var t,n;const i=r+l;(n=(t=s.scrollElement)==null?void 0:t.scrollTo)==null||n.call(t,{[s.options.horizontal?"left":"top"]:i,behavior:e})};class j{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const s=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(t=>{t.forEach(n=>{const i=()=>{this._measureElement(n.target,n)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var t;(t=s())==null||t.disconnect(),e=null},observe:t=>{var n;return(n=s())==null?void 0:n.observe(t,{box:"border-box"})},unobserve:t=>{var n;return(n=s())==null?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([s,t])=>{typeof t>"u"&&delete e[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:F,rangeExtractor:A,onChange:()=>{},measureElement:D,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var s,t;(t=(s=this.options).onChange)==null||t.call(s,this,e)},this.maybeNotify=v(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(t=>{this.observer.observe(t)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t=>{this.scrollRect=t,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(t,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,s)=>{const t=new Map,n=new Map;for(let i=s-1;i>=0;i--){const o=e[i];if(t.has(o.lane))continue;const h=n.get(o.lane);if(h==null||o.end>h.end?n.set(o.lane,o):o.endi.end===o.end?i.index-o.index:i.end-o.end)[0]:void 0},this.getMeasurementOptions=v(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,s,t,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i}),{key:!1}),this.getMeasurements=v(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i},o)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(a=>{this.itemSizeCache.set(a.key,a.size)}));const h=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,h);for(let a=h;athis.options.debug}),this.calculateRange=v(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,s,t,n)=>this.range=e.length>0&&s>0?L({measurements:e,outerSize:s,scrollOffset:t,lanes:n}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=v(()=>{let e=null,s=null;const t=this.calculateRange();return t&&(e=t.startIndex,s=t.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,s]},(e,s,t,n,i)=>n===null||i===null?[]:e({startIndex:n,endIndex:i,overscan:s,count:t}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const s=this.options.indexAttribute,t=e.getAttribute(s);return t?parseInt(t,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(e,s)=>{const t=this.indexFromElement(e),n=this.measurementsCache[t];if(!n)return;const i=n.key,o=this.elementsCache.get(i);o!==e&&(o&&this.observer.unobserve(o),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(t,this.options.measureElement(e,s,this))},this.resizeItem=(e,s)=>{const t=this.measurementsCache[e];if(!t)return;const n=this.itemSizeCache.get(t.key)??t.size,i=s-n;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,i,this):t.start{if(!e){this.elementsCache.forEach((s,t)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=v(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,s)=>{const t=[];for(let n=0,i=e.length;nthis.options.debug}),this.getVirtualItemForOffset=e=>{const s=this.getMeasurements();if(s.length!==0)return S(s[O(0,s.length-1,t=>S(s[t]).start,e)])},this.getOffsetForAlignment=(e,s,t=0)=>{const n=this.getSize(),i=this.getScrollOffset();s==="auto"&&(s=e>=i+n?"end":"start"),s==="center"?e+=(t-n)/2:s==="end"&&(e-=n);const o=this.getTotalSize()+this.options.scrollMargin-n;return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,s="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const t=this.measurementsCache[e];if(!t)return;const n=this.getSize(),i=this.getScrollOffset();if(s==="auto")if(t.end>=i+n-this.options.scrollPaddingEnd)s="end";else if(t.start<=i+this.options.scrollPaddingStart)s="start";else return[i,s];const o=s==="end"?t.end+this.options.scrollPaddingEnd:t.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,s,t.size),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:s="start",behavior:t}={})=>{t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,s),{adjustments:void 0,behavior:t})},this.scrollToIndex=(e,{align:s="auto",behavior:t}={})=>{t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let n=0;const i=10,o=c=>{if(!this.targetWindow)return;const a=this.getOffsetForIndex(e,c);if(!a){console.warn("Failed to get offset for index:",e);return}const[u,d]=a;this._scrollToOffset(u,{adjustments:void 0,behavior:t}),this.targetWindow.requestAnimationFrame(()=>{const m=this.getScrollOffset(),f=this.getOffsetForIndex(e,d);if(!f){console.warn("Failed to get offset for index:",e);return}R(f[0],m)||h(d)})},h=c=>{this.targetWindow&&(n++,no(c)):console.warn(`Failed to scroll to index ${e} after ${i} attempts.`))};o(s)},this.scrollBy=(e,{behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var e;const s=this.getMeasurements();let t;if(s.length===0)t=this.options.paddingStart;else if(this.options.lanes===1)t=((e=s[s.length-1])==null?void 0:e.end)??0;else{const n=Array(this.options.lanes).fill(null);let i=s.length-1;for(;i>=0&&n.some(o=>o===null);){const o=s[i];n[o.lane]===null&&(n[o.lane]=o.end),i--}t=Math.max(...n.filter(o=>o!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:s,behavior:t})=>{this.options.scrollToFn(e,{behavior:t,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(l)}}const O=(r,l,e,s)=>{for(;r<=l;){const t=(r+l)/2|0,n=e(t);if(ns)l=t-1;else return t}return r>0?r-1:0};function L({measurements:r,outerSize:l,scrollOffset:e,lanes:s}){const t=r.length-1,n=h=>r[h].start;if(r.length<=s)return{startIndex:0,endIndex:t};let i=O(0,t,n,e),o=i;if(s===1)for(;o1){const h=Array(s).fill(0);for(;oa=0&&c.some(a=>a>=e);){const a=r[i];c[a.lane]=a.start,i--}i=Math.max(0,i-i%s),o=Math.min(t,o+(s-1-o%s))}return{startIndex:i,endIndex:o}}const z=typeof document<"u"?w.useLayoutEffect:w.useEffect;function P(r){const l=w.useReducer(()=>({}),{})[1],e={...r,onChange:(t,n)=>{var i;n?I.flushSync(l):l(),(i=r.onChange)==null||i.call(r,t,n)}},[s]=w.useState(()=>new j(e));return s.setOptions(e),z(()=>s._didMount(),[]),z(()=>s._willUpdate()),s}function N(r){return P({observeElementRect:T,observeElementOffset:k,scrollToFn:W,...r})}export{N as u}; diff --git a/web/client/dist/assets/index-Dj0i1-CA.js b/web/client/dist/assets/index-Dj0i1-CA.js new file mode 100644 index 0000000000..bfc50ab45b --- /dev/null +++ b/web/client/dist/assets/index-Dj0i1-CA.js @@ -0,0 +1,58 @@ +(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.scrollbar--horizontal::-webkit-scrollbar{height:var(--scrollbar-size)}.scrollbar--vertical::-webkit-scrollbar{width:var(--scrollbar-size)}.scrollbar::-webkit-scrollbar-track{background:transparent}.scrollbar::-webkit-scrollbar-thumb{background:var(--scrollbar-backgroud);border-radius:var(--scrollbar-radius)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-2{top:-.5rem}.bottom-0{bottom:0}.bottom-10{bottom:2.5rem}.left-0{left:0}.left-2{left:.5rem}.left-\\[50\\%\\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-10{top:2.5rem}.top-6{top:1.5rem}.top-8{top:2rem}.isolate{isolation:isolate}.\\!z-10{z-index:10!important}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\\[1000\\]{z-index:1000}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.z-\\[4\\]{z-index:4}.z-\\[5\\]{z-index:5}.z-\\[6\\]{z-index:6}.\\!m-0{margin:0!important}.m-0{margin:0}.m-1{margin:.25rem}.m-2{margin:.5rem}.\\!mx-0{margin-left:0!important;margin-right:0!important}.\\!my-0{margin-top:0!important;margin-bottom:0!important}.mx-0{margin-left:0;margin-right:0}.mx-0\\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-1\\.5{margin-left:.375rem;margin-right:.375rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-0{margin-top:0;margin-bottom:0}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.\\!ml-0\\.5{margin-left:.125rem!important}.\\!mr-1{margin-right:.25rem!important}.-ml-2{margin-left:-.5rem}.-mr-2{margin-right:-.5rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.mt-9{margin-top:2.25rem}.mt-\\[0\\.125rem\\]{margin-top:.125rem}.mt-\\[6px\\]{margin-top:6px}.\\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-1{height:.25rem}.h-10{height:2.5rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-\\[14px\\]{height:14px}.h-\\[16rem\\]{height:16rem}.h-\\[1px\\]{height:1px}.h-\\[25px\\]{height:25px}.h-\\[25rem\\]{height:25rem}.h-full{height:100%}.max-h-60{max-height:15rem}.max-h-8{max-height:2rem}.max-h-80{max-height:20rem}.max-h-\\[1rem\\]{max-height:1rem}.max-h-\\[20vh\\]{max-height:20vh}.max-h-\\[2rem\\]{max-height:2rem}.max-h-\\[30vh\\]{max-height:30vh}.max-h-\\[40vh\\]{max-height:40vh}.max-h-\\[50vh\\]{max-height:50vh}.max-h-\\[80vh\\]{max-height:80vh}.min-h-8,.min-h-\\[2rem\\]{min-height:2rem}.min-h-full{min-height:100%}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-\\[20rem\\]{width:20rem}.w-\\[90vw\\]{width:90vw}.w-full{width:100%}.min-w-10{min-width:2.5rem}.min-w-16{min-width:4rem}.min-w-4{min-width:1rem}.min-w-6{min-width:1.5rem}.min-w-\\[10rem\\]{min-width:10rem}.min-w-\\[16rem\\]{min-width:16rem}.min-w-\\[1rem\\]{min-width:1rem}.min-w-\\[20rem\\]{min-width:20rem}.min-w-\\[6rem\\]{min-width:6rem}.min-w-\\[7rem\\]{min-width:7rem}.min-w-\\[8rem\\]{min-width:8rem}.max-w-4{max-width:1rem}.max-w-\\[100\\%\\]{max-width:100%}.max-w-\\[20rem\\]{max-width:20rem}.max-w-\\[40rem\\]{max-width:40rem}.max-w-\\[50rem\\]{max-width:50rem}.max-w-\\[50vw\\]{max-width:50vw}.max-w-\\[80rem\\]{max-width:80rem}.max-w-\\[90\\%\\]{max-width:90%}.max-w-full{max-width:100%}.max-w-none{max-width:none}.flex-shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.border-separate{border-collapse:separate}.-translate-x-\\[100\\%\\]{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[40\\%\\]{--tw-translate-y: -40%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-\\[50\\%\\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-7{--tw-translate-x: 1.75rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[-50\\%\\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[10px\\]{--tw-translate-x: 10px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-1{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.\\!cursor-grabbing{cursor:grabbing!important}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-4{gap:1rem}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.overflow-ellipsis,.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.\\!rounded-full{border-radius:9999px!important}.\\!rounded-lg{border-radius:.5rem!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[0\\.25rem\\]{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-xl{border-radius:.75rem}.rounded-b-lg{border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.rounded-b-md{border-bottom-right-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-t-\\[8px\\]{border-top-left-radius:8px;border-top-right-radius:8px}.rounded-t-md{border-top-left-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.\\!border-none{border-style:none!important}.border-none{border-style:none}.\\!border-neutral-20{border-color:var(--color-neutral-20)!important}.border-accent-500{border-color:var(--color-accent-500)}.border-brand-500{border-color:var(--color-brand-500)}.border-current{border-color:currentColor}.border-danger-500{border-color:var(--color-danger-500)}.border-divider{border-color:var(--color-divider)}.border-inherit{border-color:inherit}.border-light{border-color:var(--color-light)}.border-neutral-10{border-color:var(--color-neutral-10)}.border-neutral-100{border-color:var(--color-neutral-100)}.border-neutral-200{border-color:var(--color-neutral-200)}.border-neutral-300{border-color:var(--color-neutral-300)}.border-neutral-400{border-color:var(--color-neutral-400)}.border-neutral-500{border-color:var(--color-neutral-500)}.border-neutral-600{border-color:var(--color-neutral-600)}.border-primary-400{border-color:var(--color-primary-400)}.border-primary-500{border-color:var(--color-primary-500)}.border-secondary-100{border-color:var(--color-secondary-100)}.border-secondary-20{border-color:var(--color-secondary-20)}.border-secondary-30{border-color:var(--color-secondary-30)}.border-secondary-500{border-color:var(--color-secondary-500)}.border-success-500{border-color:var(--color-success-500)}.border-transparent{border-color:transparent}.border-warning-500{border-color:var(--color-warning-500)}.border-r-theme-darker{border-right-color:var(--color-theme-darker)}.\\!bg-danger-5{background-color:var(--color-danger-5)!important}.\\!bg-success-10{background-color:var(--color-success-10)!important}.\\!bg-theme{background-color:var(--color-theme)!important}.bg-accent-200{background-color:var(--color-accent-200)}.bg-accent-500{background-color:var(--color-accent-500)}.bg-brand-10{background-color:var(--color-brand-10)}.bg-brand-500{background-color:var(--color-brand-500)}.bg-current{background-color:currentColor}.bg-danger-10{background-color:var(--color-danger-10)}.bg-danger-5{background-color:var(--color-danger-5)}.bg-danger-500{background-color:var(--color-danger-500)}.bg-dark-lighter{background-color:var(--color-dark-lighter)}.bg-light{background-color:var(--color-light)}.bg-neutral-10{background-color:var(--color-neutral-10)}.bg-neutral-200{background-color:var(--color-neutral-200)}.bg-neutral-30{background-color:var(--color-neutral-30)}.bg-neutral-400{background-color:var(--color-neutral-400)}.bg-neutral-5{background-color:var(--color-neutral-5)}.bg-neutral-500{background-color:var(--color-neutral-500)}.bg-neutral-600{background-color:var(--color-neutral-600)}.bg-overlay{background-color:var(--color-overlay)}.bg-primary-10{background-color:var(--color-primary-10)}.bg-primary-5{background-color:var(--color-primary-5)}.bg-primary-500{background-color:var(--color-primary-500)}.bg-primary-900{background-color:var(--color-primary-900)}.bg-secondary-10{background-color:var(--color-secondary-10)}.bg-secondary-20{background-color:var(--color-secondary-20)}.bg-secondary-5{background-color:var(--color-secondary-5)}.bg-secondary-500{background-color:var(--color-secondary-500)}.bg-success-10{background-color:var(--color-success-10)}.bg-success-5{background-color:var(--color-success-5)}.bg-success-500{background-color:var(--color-success-500)}.bg-theme{background-color:var(--color-theme)}.bg-theme-lighter{background-color:var(--color-theme-lighter)}.bg-transparent{background-color:transparent}.bg-warning-10{background-color:var(--color-warning-10)}.bg-warning-5{background-color:var(--color-warning-5)}.bg-warning-500{background-color:var(--color-warning-500)}.bg-none{background-image:none}.fill-danger-500{fill:var(--color-danger-500)}.fill-neutral-500{fill:var(--color-neutral-500)}.fill-primary-500{fill:var(--color-primary-500)}.fill-prose{fill:var(--color-text)}.fill-secondary-500{fill:var(--color-secondary-500)}.fill-success-500{fill:var(--color-success-500)}.fill-theme-lighter{fill:var(--color-theme-lighter)}.fill-warning-500{fill:var(--color-warning-500)}.stroke-neutral-200{stroke:var(--color-neutral-200)}.\\!p-0{padding:0!important}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.\\!px-0{padding-left:0!important;padding-right:0!important}.\\!px-1{padding-left:.25rem!important;padding-right:.25rem!important}.\\!px-2{padding-left:.5rem!important;padding-right:.5rem!important}.\\!py-0\\.5{padding-top:.125rem!important;padding-bottom:.125rem!important}.\\!py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-\\[0\\.25rem\\]{padding-left:.25rem;padding-right:.25rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\\[0\\.125rem\\]{padding-top:.125rem;padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pl-0\\.5{padding-left:.125rem}.pl-1{padding-left:.25rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-6{padding-left:1.5rem}.pl-\\[25px\\]{padding-left:25px}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-\\[35px\\]{padding-right:35px}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-\\[3px\\]{padding-top:3px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:JetBrains Mono,monospace}.font-sans{font-family:Inter,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-6xl{font-size:3.75rem;line-height:1}.text-\\[0\\.5rem\\]{font-size:.5rem}.text-\\[0\\.65rem\\]{font-size:.65rem}.text-\\[0\\.6rem\\]{font-size:.6rem}.text-\\[10px\\]{font-size:10px}.text-\\[4rem\\]{font-size:4rem}.text-\\[9px\\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.slashed-zero{--tw-slashed-zero: slashed-zero;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-none{line-height:1}.\\!text-danger-500{color:var(--color-danger-500)!important}.\\!text-success-500{color:var(--color-success-500)!important}.text-accent-500{color:var(--color-accent-500)}.text-brand-500{color:var(--color-brand-500)}.text-danger-100{color:var(--color-danger-100)}.text-danger-500{color:var(--color-danger-500)}.text-danger-600{color:var(--color-danger-600)}.text-danger-700{color:var(--color-danger-700)}.text-inherit{color:inherit}.text-light{color:var(--color-light)}.text-neutral-100{color:var(--color-neutral-100)}.text-neutral-300{color:var(--color-neutral-300)}.text-neutral-400{color:var(--color-neutral-400)}.text-neutral-500{color:var(--color-neutral-500)}.text-neutral-600{color:var(--color-neutral-600)}.text-neutral-70{color:var(--color-neutral-70)}.text-neutral-700{color:var(--color-neutral-700)}.text-neutral-800{color:var(--color-neutral-800)}.text-neutral-900{color:var(--color-neutral-900)}.text-primary-100{color:var(--color-primary-100)}.text-primary-300{color:var(--color-primary-300)}.text-primary-500{color:var(--color-primary-500)}.text-primary-600{color:var(--color-primary-600)}.text-primary-900{color:var(--color-primary-900)}.text-prose{color:var(--color-text)}.text-secondary-10{color:var(--color-secondary-10)}.text-secondary-100{color:var(--color-secondary-100)}.text-secondary-400{color:var(--color-secondary-400)}.text-secondary-500{color:var(--color-secondary-500)}.text-secondary-600{color:var(--color-secondary-600)}.text-success-100{color:var(--color-success-100)}.text-success-500{color:var(--color-success-500)}.text-success-600{color:var(--color-success-600)}.text-theme-darker{color:var(--color-theme-darker)}.text-warning-100{color:var(--color-warning-100)}.text-warning-500{color:var(--color-warning-500)}.text-warning-600{color:var(--color-warning-600)}.text-warning-700{color:var(--color-warning-700)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.\\!shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-2{outline-width:2px}.\\!outline-primary-500{outline-color:var(--color-primary-500)!important}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-8{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(8px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-accent-50{--tw-ring-color: var(--color-accent-50)}.ring-brand-50{--tw-ring-color: var(--color-brand-50)}.ring-neutral-50{--tw-ring-color: var(--color-neutral-50)}.ring-primary-10{--tw-ring-color: var(--color-primary-10)}.ring-secondary-300{--tw-ring-color: var(--color-secondary-300)}.ring-opacity-5{--tw-ring-opacity: .05}.ring-opacity-60{--tw-ring-opacity: .6}.ring-offset-2{--tw-ring-offset-width: 2px}.ring-offset-secondary-100{--tw-ring-offset-color: var(--color-secondary-100)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[width\\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\\@container{container-type:inline-size}.hover\\:scrollbar:hover::-webkit-scrollbar-track{background:transparent}.hover\\:scrollbar:hover::-webkit-scrollbar-thumb{background:var(--scrollbar-backgroud);border-radius:var(--scrollbar-radius)}.placeholder\\:text-neutral-300::-moz-placeholder{color:var(--color-neutral-300)}.placeholder\\:text-neutral-300::placeholder{color:var(--color-neutral-300)}.first\\:border-0:first-child{border-width:0px}.last\\:m-0:last-child{margin:0}.last\\:mr-0:last-child{margin-right:0}.last\\:border-r-0:last-child{border-right-width:0px}.odd\\:bg-neutral-10:nth-child(odd){background-color:var(--color-neutral-10)}.even\\:bg-neutral-5:nth-child(2n){background-color:var(--color-neutral-5)}.hover\\:bg-accent-500:hover{background-color:var(--color-accent-500)}.hover\\:bg-danger-5:hover{background-color:var(--color-danger-5)}.hover\\:bg-danger-500:hover{background-color:var(--color-danger-500)}.hover\\:bg-danger-600:hover{background-color:var(--color-danger-600)}.hover\\:bg-neutral-20:hover{background-color:var(--color-neutral-20)}.hover\\:bg-neutral-300:hover{background-color:var(--color-neutral-300)}.hover\\:bg-neutral-5:hover{background-color:var(--color-neutral-5)}.hover\\:bg-primary-400:hover{background-color:var(--color-primary-400)}.hover\\:bg-primary-5:hover{background-color:var(--color-primary-5)}.hover\\:bg-secondary-600:hover{background-color:var(--color-secondary-600)}.hover\\:bg-success-5:hover{background-color:var(--color-success-5)}.hover\\:bg-success-600:hover{background-color:var(--color-success-600)}.hover\\:bg-theme-darker:hover{background-color:var(--color-theme-darker)}.hover\\:bg-transparent:hover{background-color:transparent}.hover\\:bg-warning-5:hover{background-color:var(--color-warning-5)}.hover\\:bg-warning-600:hover{background-color:var(--color-warning-600)}.hover\\:text-light:hover{color:var(--color-light)}.hover\\:text-neutral-900:hover{color:var(--color-neutral-900)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.focus\\:border-secondary-500:focus{border-color:var(--color-secondary-500)}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-4:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:border-accent-500:focus-visible{border-color:var(--color-accent-500)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-light:focus-visible{--tw-ring-color: var(--color-light)}.focus-visible\\:ring-opacity-75:focus-visible{--tw-ring-opacity: .75}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\\:ring-offset-brand-300:focus-visible{--tw-ring-offset-color: var(--color-brand-300)}.active\\:bg-danger-400:active{background-color:var(--color-danger-400)}.active\\:bg-neutral-10:active{background-color:var(--color-neutral-10)}.active\\:bg-neutral-200:active{background-color:var(--color-neutral-200)}.active\\:bg-neutral-300:active{background-color:var(--color-neutral-300)}.active\\:bg-primary-400:active{background-color:var(--color-primary-400)}.active\\:bg-secondary-400:active{background-color:var(--color-secondary-400)}.active\\:bg-success-400:active{background-color:var(--color-success-400)}.active\\:bg-warning-400:active{background-color:var(--color-warning-400)}.group:hover .group-hover\\:ml-2{margin-left:.5rem}.group:hover .group-hover\\:mr-0{margin-right:0}.group:hover .group-hover\\:inline-block{display:inline-block}.group:hover .group-hover\\:hidden{display:none}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[highlighted\\]\\:bg-brand-500[data-highlighted]{background-color:var(--color-brand-500)}.data-\\[highlighted\\]\\:text-brand-100[data-highlighted]{color:var(--color-brand-100)}.data-\\[highlighted\\]\\:outline-none[data-highlighted]{outline:2px solid transparent;outline-offset:2px}@container (min-width: 24rem){.\\@sm\\:min-w-\\[12rem\\]{min-width:12rem}}@container (min-width: 32rem){.\\@lg\\:block{display:block}.\\@lg\\:contents{display:contents}.\\@lg\\:hidden{display:none}}@container (min-width: 40rem){.\\@\\[40rem\\]\\:static{position:static}.\\@\\[40rem\\]\\:flex{display:flex}.\\@\\[40rem\\]\\:hidden{display:none}.\\@\\[40rem\\]\\:items-end{align-items:flex-end}.\\@\\[40rem\\]\\:justify-end{justify-content:flex-end}.\\@\\[40rem\\]\\:pr-0{padding-right:0}}.dark\\:border-accent-300:is([mode=dark] *){border-color:var(--color-accent-300)}.dark\\:border-dark:is([mode=dark] *){border-color:var(--color-dark)}.dark\\:border-dark-lighter:is([mode=dark] *){border-color:var(--color-dark-lighter)}.dark\\:border-neutral-300:is([mode=dark] *){border-color:var(--color-neutral-300)}.dark\\:border-neutral-600:is([mode=dark] *){border-color:var(--color-neutral-600)}.dark\\:border-neutral-700:is([mode=dark] *){border-color:var(--color-neutral-700)}.dark\\:border-neutral-800:is([mode=dark] *){border-color:var(--color-neutral-800)}.dark\\:border-primary-500:is([mode=dark] *){border-color:var(--color-primary-500)}.dark\\:border-r-theme-lighter:is([mode=dark] *){border-right-color:var(--color-theme-lighter)}.dark\\:bg-accent-300:is([mode=dark] *){background-color:var(--color-accent-300)}.dark\\:bg-danger-20:is([mode=dark] *){background-color:var(--color-danger-20)}.dark\\:bg-danger-500:is([mode=dark] *){background-color:var(--color-danger-500)}.dark\\:bg-dark:is([mode=dark] *){background-color:var(--color-dark)}.dark\\:bg-dark-lighter:is([mode=dark] *){background-color:var(--color-dark-lighter)}.dark\\:bg-neutral-20:is([mode=dark] *){background-color:var(--color-neutral-20)}.dark\\:bg-neutral-300:is([mode=dark] *){background-color:var(--color-neutral-300)}.dark\\:bg-neutral-400:is([mode=dark] *){background-color:var(--color-neutral-400)}.dark\\:bg-primary-10:is([mode=dark] *){background-color:var(--color-primary-10)}.dark\\:bg-primary-20:is([mode=dark] *){background-color:var(--color-primary-20)}.dark\\:bg-primary-300:is([mode=dark] *){background-color:var(--color-primary-300)}.dark\\:bg-primary-500:is([mode=dark] *){background-color:var(--color-primary-500)}.dark\\:bg-theme-lighter:is([mode=dark] *){background-color:var(--color-theme-lighter)}.dark\\:bg-warning-400:is([mode=dark] *){background-color:var(--color-warning-400)}.dark\\:stroke-neutral-800:is([mode=dark] *){stroke:var(--color-neutral-800)}.dark\\:text-accent-300:is([mode=dark] *){color:var(--color-accent-300)}.dark\\:text-danger-100:is([mode=dark] *){color:var(--color-danger-100)}.dark\\:text-danger-300:is([mode=dark] *){color:var(--color-danger-300)}.dark\\:text-danger-400:is([mode=dark] *){color:var(--color-danger-400)}.dark\\:text-dark-lighter:is([mode=dark] *){color:var(--color-dark-lighter)}.dark\\:text-light:is([mode=dark] *){color:var(--color-light)}.dark\\:text-neutral-100:is([mode=dark] *){color:var(--color-neutral-100)}.dark\\:text-neutral-200:is([mode=dark] *){color:var(--color-neutral-200)}.dark\\:text-neutral-300:is([mode=dark] *){color:var(--color-neutral-300)}.dark\\:text-neutral-400:is([mode=dark] *){color:var(--color-neutral-400)}.dark\\:text-neutral-500:is([mode=dark] *){color:var(--color-neutral-500)}.dark\\:text-neutral-600:is([mode=dark] *){color:var(--color-neutral-600)}.dark\\:text-neutral-800:is([mode=dark] *){color:var(--color-neutral-800)}.dark\\:text-primary-10:is([mode=dark] *){color:var(--color-primary-10)}.dark\\:text-primary-100:is([mode=dark] *){color:var(--color-primary-100)}.dark\\:text-primary-300:is([mode=dark] *){color:var(--color-primary-300)}.dark\\:text-primary-400:is([mode=dark] *){color:var(--color-primary-400)}.dark\\:text-primary-500:is([mode=dark] *){color:var(--color-primary-500)}.dark\\:text-primary-70:is([mode=dark] *){color:var(--color-primary-70)}.dark\\:text-secondary-300:is([mode=dark] *){color:var(--color-secondary-300)}.dark\\:text-secondary-400:is([mode=dark] *){color:var(--color-secondary-400)}.dark\\:text-success-300:is([mode=dark] *){color:var(--color-success-300)}.dark\\:text-success-400:is([mode=dark] *){color:var(--color-success-400)}.dark\\:text-success-500:is([mode=dark] *){color:var(--color-success-500)}.dark\\:text-theme-lighter:is([mode=dark] *){color:var(--color-theme-lighter)}.dark\\:text-warning-300:is([mode=dark] *){color:var(--color-warning-300)}.dark\\:text-warning-400:is([mode=dark] *){color:var(--color-warning-400)}.dark\\:text-warning-500:is([mode=dark] *){color:var(--color-warning-500)}.dark\\:text-warning-800:is([mode=dark] *){color:var(--color-warning-800)}.dark\\:ring-primary-50:is([mode=dark] *){--tw-ring-color: var(--color-primary-50)}.dark\\:placeholder\\:text-neutral-700:is([mode=dark] *)::-moz-placeholder{color:var(--color-neutral-700)}.dark\\:placeholder\\:text-neutral-700:is([mode=dark] *)::placeholder{color:var(--color-neutral-700)}.dark\\:hover\\:bg-neutral-10:hover:is([mode=dark] *){background-color:var(--color-neutral-10)}.dark\\:hover\\:bg-theme-lighter:hover:is([mode=dark] *){background-color:var(--color-theme-lighter)}.dark\\:hover\\:text-neutral-100:hover:is([mode=dark] *){color:var(--color-neutral-100)}@media (min-width: 640px){.sm\\:not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.sm\\:mr-1{margin-right:.25rem}.sm\\:inline{display:inline}.sm\\:w-auto{width:auto}.sm\\:items-baseline{align-items:baseline}.sm\\:justify-between{justify-content:space-between}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\\:ml-2{margin-left:.5rem}.md\\:mr-2{margin-right:.5rem}.md\\:w-\\[50\\%\\]{width:50%}.md\\:flex-nowrap{flex-wrap:nowrap}.md\\:text-\\[6rem\\]{font-size:6rem}}@media (min-width: 1024px){.lg\\:text-\\[9rem\\]{font-size:9rem}} +.gutter{background-color:var(--color-brand);background-repeat:no-repeat;background-position:50%;z-index:1}.gutter:hover{background-color:var(--color-brand)!important;outline:1px solid var(--color-brand)}.gutter.gutter-vertical{cursor:row-resize;background-color:var(--color-divider)}.gutter.gutter-horizontal{cursor:col-resize;background-color:var(--color-divider)}.split{box-sizing:border-box;overflow-y:auto;overflow-x:hidden} +.react-flow{direction:ltr}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:grab}.react-flow__node.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;background-color:#333}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:#ffffff80;padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{border-width:1px;border-style:solid;border-color:#bbb}.react-flow__node-default.selected,.react-flow__node-default:focus,.react-flow__node-default:focus-visible,.react-flow__node-input.selected,.react-flow__node-input:focus,.react-flow__node-input:focus-visible,.react-flow__node-output.selected,.react-flow__node-output:focus,.react-flow__node-output:focus-visible,.react-flow__node-group.selected,.react-flow__node-group:focus,.react-flow__node-group:focus-visible{outline:none;border:1px solid #555}.react-flow__nodesselection-rect,.react-flow__selection{background:#9696b41a;border:1px dotted rgba(155,155,155,.8)}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__node{z-index:10!important}.react-flow__handle{background-color:currentColor}.react-flow__node.react-flow__node-model:hover,.react-flow__node.react-flow__node-model:active{z-index:20!important}react-flow__attribution{background:transparent}.lineage__column-source b{font-weight:900;color:var(--color-primary)}.react-flow__edge{pointer-events:none!important;z-index:-1!important}.react-flow__background path{stroke:inherit}.ͼ1.cm-focused{outline:1px dotted #212121}.ͼ1{position:relative!important;box-sizing:border-box;display:flex!important;flex-direction:column}.ͼ1 .cm-scroller{display:flex!important;align-items:flex-start!important;font-family:monospace;line-height:1.4;height:100%;overflow-x:auto;position:relative;z-index:0;overflow-anchor:none}.ͼ1 .cm-content[contenteditable=true]{-webkit-user-modify:read-write-plaintext-only}.ͼ1 .cm-content{margin:0;flex-grow:2;flex-shrink:0;display:block;white-space:pre;word-wrap:normal;box-sizing:border-box;min-height:100%;padding:4px 0;outline:none}.ͼ1 .cm-lineWrapping{white-space:pre-wrap;white-space:break-spaces;word-break:break-word;overflow-wrap:anywhere;flex-shrink:1}.ͼ2 .cm-content{caret-color:#000}.ͼ3 .cm-content{caret-color:#fff}.ͼ1 .cm-line{display:block;padding:0 2px 0 6px}.ͼ1 .cm-layer>*{position:absolute}.ͼ1 .cm-layer{position:absolute;left:0;top:0;contain:size style}.ͼ2 .cm-selectionBackground{background:#d9d9d9}.ͼ3 .cm-selectionBackground{background:#222}.ͼ2.cm-focused>.cm-scroller>.cm-selectionLayer .cm-selectionBackground{background:#d7d4f0}.ͼ3.cm-focused>.cm-scroller>.cm-selectionLayer .cm-selectionBackground{background:#233}.ͼ1 .cm-cursorLayer{pointer-events:none}.ͼ1.cm-focused>.cm-scroller>.cm-cursorLayer{animation:steps(1) cm-blink 1.2s infinite}@keyframes cm-blink{50%{opacity:0}}@keyframes cm-blink2{50%{opacity:0}}.ͼ1 .cm-cursor,.ͼ1 .cm-dropCursor{border-left:1.2px solid black;margin-left:-.6px;pointer-events:none}.ͼ1 .cm-cursor{display:none}.ͼ3 .cm-cursor{border-left-color:#ddd}.ͼ1 .cm-dropCursor{position:absolute}.ͼ1.cm-focused>.cm-scroller>.cm-cursorLayer .cm-cursor{display:block}.ͼ1 .cm-iso{unicode-bidi:isolate}.ͼ1 .cm-announced{position:fixed;top:-10000px}@media print{.ͼ1 .cm-announced{display:none}}.ͼ2 .cm-activeLine{background-color:#cef4}.ͼ3 .cm-activeLine{background-color:#9ef3}.ͼ2 .cm-specialChar{color:red}.ͼ3 .cm-specialChar{color:#f78}.ͼ1 .cm-gutters{flex-shrink:0;display:flex;height:100%;box-sizing:border-box;inset-inline-start:0;z-index:200}.ͼ2 .cm-gutters{background-color:#f5f5f5;color:#6c6c6c;border-right:1px solid #ddd}.ͼ3 .cm-gutters{background-color:#333338;color:#ccc}.ͼ1 .cm-gutter{display:flex!important;flex-direction:column;flex-shrink:0;box-sizing:border-box;min-height:100%;overflow:hidden}.ͼ1 .cm-gutterElement{box-sizing:border-box}.ͼ1 .cm-lineNumbers .cm-gutterElement{padding:0 3px 0 5px;min-width:20px;text-align:right;white-space:nowrap}.ͼ2 .cm-activeLineGutter{background-color:#e2f2ff}.ͼ3 .cm-activeLineGutter{background-color:#222227}.ͼ1 .cm-panels{box-sizing:border-box;position:sticky;left:0;right:0;z-index:300}.ͼ2 .cm-panels{background-color:#f5f5f5;color:#000}.ͼ2 .cm-panels-top{border-bottom:1px solid #ddd}.ͼ2 .cm-panels-bottom{border-top:1px solid #ddd}.ͼ3 .cm-panels{background-color:#333338;color:#fff}.ͼ1 .cm-tab{display:inline-block;overflow:hidden;vertical-align:bottom}.ͼ1 .cm-widgetBuffer{vertical-align:text-top;height:1em;width:0;display:inline}.ͼ1 .cm-placeholder{color:#888;display:inline-block;vertical-align:top}.ͼ1 .cm-highlightSpace{background-image:radial-gradient(circle at 50% 55%,#aaa 20%,transparent 5%);background-position:center}.ͼ1 .cm-highlightTab{background-image:url('data:image/svg+xml,');background-size:auto 100%;background-position:right 90%;background-repeat:no-repeat}.ͼ1 .cm-trailingSpace{background-color:#f325}.ͼ1 .cm-button{vertical-align:middle;color:inherit;font-size:70%;padding:.2em 1em;border-radius:1px}.ͼ2 .cm-button:active{background-image:linear-gradient(#b4b4b4,#d0d3d6)}.ͼ2 .cm-button{background-image:linear-gradient(#eff1f5,#d9d9df);border:1px solid #888}.ͼ3 .cm-button:active{background-image:linear-gradient(#111,#333)}.ͼ3 .cm-button{background-image:linear-gradient(#393939,#111);border:1px solid #888}.ͼ1 .cm-textfield{vertical-align:middle;color:inherit;font-size:70%;border:1px solid silver;padding:.2em .5em}.ͼ2 .cm-textfield{background-color:#fff}.ͼ3 .cm-textfield{border:1px solid #555;background-color:inherit}.ͼ1 .cm-tooltip.cm-tooltip-autocomplete>ul>li,.ͼ1 .cm-tooltip.cm-tooltip-autocomplete>ul>completion-section{padding:1px 3px;line-height:1.2}.ͼ1 .cm-tooltip.cm-tooltip-autocomplete>ul>li{overflow-x:hidden;text-overflow:ellipsis;cursor:pointer}.ͼ1 .cm-tooltip.cm-tooltip-autocomplete>ul>completion-section{display:list-item;border-bottom:1px solid silver;padding-left:.5em;opacity:.7}.ͼ1 .cm-tooltip.cm-tooltip-autocomplete>ul{font-family:monospace;white-space:nowrap;overflow:hidden auto;max-width:700px;max-width:min(700px,95vw);min-width:250px;max-height:10em;height:100%;list-style:none;margin:0;padding:0}.ͼ2 .cm-tooltip-autocomplete ul li[aria-selected]{background:#17c;color:#fff}.ͼ2 .cm-tooltip-autocomplete-disabled ul li[aria-selected]{background:#777}.ͼ3 .cm-tooltip-autocomplete ul li[aria-selected]{background:#347;color:#fff}.ͼ3 .cm-tooltip-autocomplete-disabled ul li[aria-selected]{background:#444}.ͼ1 .cm-completionListIncompleteTop:before,.ͼ1 .cm-completionListIncompleteBottom:after{content:"···";opacity:.5;display:block;text-align:center}.ͼ1 .cm-tooltip.cm-completionInfo{position:absolute;padding:3px 9px;width:-moz-max-content;width:max-content;max-width:400px;box-sizing:border-box;white-space:pre-line}.ͼ1 .cm-completionInfo.cm-completionInfo-left{right:100%}.ͼ1 .cm-completionInfo.cm-completionInfo-right{left:100%}.ͼ1 .cm-completionInfo.cm-completionInfo-left-narrow{right:30px}.ͼ1 .cm-completionInfo.cm-completionInfo-right-narrow{left:30px}.ͼ2 .cm-snippetField{background-color:#0002}.ͼ3 .cm-snippetField{background-color:#fff2}.ͼ1 .cm-snippetFieldPosition{vertical-align:text-top;width:0;height:1.15em;display:inline-block;margin:0 -.7px -.7em;border-left:1.4px dotted #888}.ͼ1 .cm-completionMatchedText{text-decoration:underline}.ͼ1 .cm-completionDetail{margin-left:.5em;font-style:italic}.ͼ1 .cm-completionIcon{font-size:90%;width:.8em;display:inline-block;text-align:center;padding-right:.6em;opacity:.6;box-sizing:content-box}.ͼ1 .cm-completionIcon-function:after,.ͼ1 .cm-completionIcon-method:after{content:"ƒ"}.ͼ1 .cm-completionIcon-class:after{content:"○"}.ͼ1 .cm-completionIcon-interface:after{content:"◌"}.ͼ1 .cm-completionIcon-variable:after{content:"𝑥"}.ͼ1 .cm-completionIcon-constant:after{content:"𝐶"}.ͼ1 .cm-completionIcon-type:after{content:"𝑡"}.ͼ1 .cm-completionIcon-enum:after{content:"∪"}.ͼ1 .cm-completionIcon-property:after{content:"□"}.ͼ1 .cm-completionIcon-keyword:after{content:"🔑︎"}.ͼ1 .cm-completionIcon-namespace:after{content:"▢"}.ͼ1 .cm-completionIcon-text:after{content:"abc";font-size:50%;vertical-align:middle}.ͼ1 .cm-tooltip{z-index:500;box-sizing:border-box}.ͼ2 .cm-tooltip{border:1px solid #bbb;background-color:#f5f5f5}.ͼ2 .cm-tooltip-section:not(:first-child){border-top:1px solid #bbb}.ͼ3 .cm-tooltip{background-color:#333338;color:#fff}.ͼ1 .cm-tooltip-arrow:before,.ͼ1 .cm-tooltip-arrow:after{content:"";position:absolute;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent}.ͼ1 .cm-tooltip-above .cm-tooltip-arrow:before{border-top:7px solid #bbb}.ͼ1 .cm-tooltip-above .cm-tooltip-arrow:after{border-top:7px solid #f5f5f5;bottom:1px}.ͼ1 .cm-tooltip-above .cm-tooltip-arrow{bottom:-7px}.ͼ1 .cm-tooltip-below .cm-tooltip-arrow:before{border-bottom:7px solid #bbb}.ͼ1 .cm-tooltip-below .cm-tooltip-arrow:after{border-bottom:7px solid #f5f5f5;top:1px}.ͼ1 .cm-tooltip-below .cm-tooltip-arrow{top:-7px}.ͼ1 .cm-tooltip-arrow{height:7px;width:14px;position:absolute;z-index:-1;overflow:hidden}.ͼ3 .cm-tooltip .cm-tooltip-arrow:before{border-top-color:#333338;border-bottom-color:#333338}.ͼ3 .cm-tooltip .cm-tooltip-arrow:after{border-top-color:transparent;border-bottom-color:transparent}.ͼ1 .cm-selectionMatch{background-color:#99ff7780}.ͼ1 .cm-searchMatch .cm-selectionMatch{background-color:transparent}.ͼ1.cm-focused .cm-matchingBracket{background-color:#328c8252}.ͼ1.cm-focused .cm-nonmatchingBracket{background-color:#b554}.ͼ1 .cm-foldPlaceholder{background-color:#eee;border:1px solid #ddd;color:#888;border-radius:.2em;margin:0 1px;padding:0 1px;cursor:pointer}.ͼ1 .cm-foldGutter span{padding:0 1px;cursor:pointer}.ͼ63{color:#8e908c}.ͼ64{color:#c82829}.ͼ65{color:#f5871f}.ͼ66{color:#c99e00}.ͼ67{color:#718c00}.ͼ68{color:#3e999f}.ͼ69{color:#4271ae}.ͼ6a{color:#8959a8}.ͼ6b{color:#4d4d4c}.ͼ62{background-color:#fff;color:#4d4d4c}.ͼ62 .cm-content{caret-color:#aeafad}.ͼ62 .cm-cursor,.ͼ62 .cm-dropCursor{border-left-color:#aeafad}.ͼ62 .cm-content ::-moz-selection{background-color:#d6d6d6}.ͼ62.cm-focused .cm-selectionBackgroundm .cm-selectionBackground,.ͼ62 .cm-content ::selection{background-color:#d6d6d6}.ͼ62 .cm-activeLine{background-color:#efefef}.ͼ62 .cm-gutters{background-color:#fff;color:#4d4d4c80}.ͼ62 .cm-activeLineGutter{background-color:#efefef}.ͼ15{background-color:#fff}.ͼ5{color:#404740}.ͼ6{text-decoration:underline}.ͼ7{text-decoration:underline;font-weight:700}.ͼ8{font-style:italic}.ͼ9{font-weight:700}.ͼa{text-decoration:line-through}.ͼb{color:#708}.ͼc{color:#219}.ͼd{color:#164}.ͼe{color:#a11}.ͼf{color:#e40}.ͼg{color:#00f}.ͼh{color:#30a}.ͼi{color:#085}.ͼj{color:#167}.ͼk{color:#256}.ͼl{color:#00c}.ͼm{color:#940}.ͼn{color:red}.ͼ7b{height:100%;width:100%}.ͼ7b .cm-scroller{height:100%!important}.ͼ79{height:100%;width:100%}.ͼ79 .cm-scroller{height:100%!important}.ͼ77{height:100%;width:100%}.ͼ77 .cm-scroller{height:100%!important}.ͼ75{height:100%;width:100%}.ͼ75 .cm-scroller{height:100%!important}.ͼ73{height:100%;width:100%}.ͼ73 .cm-scroller{height:100%!important}.ͼ71{height:100%;width:100%}.ͼ71 .cm-scroller{height:100%!important}.ͼ4 .cm-line ::-moz-selection,.ͼ4 .cm-line::-moz-selection{background-color:transparent!important}.ͼ4 .cm-line ::selection,.ͼ4 .cm-line::selection{background-color:transparent!important}.ͼ4 .cm-line{caret-color:transparent!important}.ͼ4 .cm-content :focus::-moz-selection,.ͼ4 .cm-content :focus ::-moz-selection{background-color:Highlight!important}.ͼ4 .cm-content :focus::selection,.ͼ4 .cm-content :focus ::selection{background-color:Highlight!important}.ͼ4 .cm-content :focus{caret-color:initial!important}.ͼ4 .cm-content{caret-color:transparent!important}.cm-editor,.cm-editor .cm-content{background-color:var(--color-editor);color:var(--color-editor-text);font-weight:400;font-size:.85rem;width:100%}.cm-editor .cm-gutters{background-color:var(--color-editor);border:none;padding-left:.25rem;padding-right:.5rem}.cm-editor .cm-activeLineGutter,.cm-editor .cm-activeLine{color:var(--color-editor-active-line-text)}.cm-editor .cm-line::-moz-selection,.cm-editor .cm-line>*::-moz-selection{background-color:var(--color-brand-100)!important;color:var(--color-brand-700)!important}.cm-editor .cm-line::selection,.cm-editor .cm-line>*::selection{background-color:var(--color-brand-100)!important;color:var(--color-brand-700)!important}.cm-editor .cm-tooltip.cm-tooltip-autocomplete{margin-top:.25rem}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul{border-radius:.35rem;padding:.25rem;color:var(--color-text)}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li{padding:.25rem .5rem;cursor:pointer;border-radius:.3rem;border:1px solid transparent;font-weight:400;display:flex;align-items:center}.cm-editor .cm-tooltip-autocomplete>ul>li[aria-selected=true]{color:var(--color-text)}.cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li .cm-completionMatchedText{opacity:1;font-weight:700;text-decoration:none}.cm-editor .cm-tooltip-autocomplete .cm-completionIcon-column,.cm-editor .cm-tooltip-autocomplete .cm-completionIcon-model{margin-right:1.5rem}.cm-editor .cm-tooltip-autocomplete .cm-completionIcon:before{display:inline-block;padding:.125rem .25rem;border-radius:.25rem}.cm-editor .cm-tooltip-autocomplete .cm-completionIcon{display:none}.cm-editor .cm-tooltip-autocomplete .cm-completionIcon-column,.cm-editor .cm-tooltip-autocomplete .cm-completionIcon-model{display:block;opacity:1}.cm-editor .cm-tooltip-autocomplete .cm-completionIcon-column:before{content:"col";font-weight:700}.cm-editor .cm-tooltip-autocomplete .cm-completionIcon-model:before{content:"mdl";font-weight:700}.cm-editor .cm-scroller{font-family:inherit}.cm-editor .cm-scroller::-webkit-scrollbar,.cm-editor .cm-tooltip.cm-tooltip-autocomplete ul::-webkit-scrollbar{height:var(--scrollbar-size);width:var(--scrollbar-size)}.cm-editor .cm-scroller::-webkit-scrollbar-track,.cm-editor .cm-tooltip.cm-tooltip-autocomplete ul::-webkit-scrollbar-track{background:transparent}.cm-editor .cm-scroller::-webkit-scrollbar-thumb,.cm-editor .cm-tooltip.cm-tooltip-autocomplete ul::-webkit-scrollbar-thumb{background:var(--color-neutral-40);border-radius:var(--scrollbar-radius)}.cm-editor .cm-tooltip{border:none!important;outline:none!important;background:var(--color-theme)!important}.sqlmesh-expression{background:var(--color-secondary-10);box-shadow:inset 0 -1px 0 0 var(--color-secondary-500),inset 0 1px 0 0 var(--color-secondary-500)}.sqlmesh-model,.sqlmesh-model>span{display:inline-block;color:var(--color-primary-500);box-shadow:inset 0 -2px 0 0 transparent;font-weight:700}.sqlmesh-model.--is-action-mode,.sqlmesh-model.--is-action-mode>span{cursor:pointer;box-shadow:inset 0 -2px 0 0 var(--color-primary-300)}.sqlmesh-model.--is-action-mode:hover{opacity:.8}.sqlmesh-model.--is-active-model,.sqlmesh-model.--is-active-model:hover,.sqlmesh-model.--is-active-model>span,.sqlmesh-model.--is-active-model:hover>span{box-shadow:none;cursor:default;opacity:1}.sqlmesh-model__column.--is-original,.sqlmesh-model__column.--is-original>span,.sqlmesh-model__column.--is-alias,.sqlmesh-model__column.--is-alias>span{display:inline-block;color:var(--color-accent-300);font-weight:700}.sqlmesh-model__column.--is-active-model.--is-alias,.sqlmesh-model__column.--is-active-model.--is-alias>span{display:inline-block;color:var(--color-brand-300);font-weight:700;box-shadow:inset 0 -2px 0 0 transparent}.sqlmesh-model__column.--is-active-model.--is-alias.--is-action-mode,.sqlmesh-model__column.--is-active-model.--is-alias.--is-action-mode>span{cursor:pointer;box-shadow:inset 0 -2px 0 0 var(--color-brand-300)}.sqlmesh-model__column.--is-action-mode:hover{opacity:.8}[mode=dark] .cm-editor .cm-activeLineGutter,[mode=dark] .cm-editor .cm-activeLine{background-color:var(--color-neutral-30)}[mode=dark] .cm-editor .cm-tooltip-autocomplete .cm-completionIcon-model:before{color:var(--color-secondary-300);background:var(--color-secondary-20)}[mode=dark] .cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li .cm-completionMatchedText{color:var(--color-accent-200);background:var(--color-accent-50)}[mode=dark] .cm-editor .cm-tooltip-autocomplete .cm-completionIcon-column:before{color:var(--color-brand-500);background:var(--color-brand-10)}[mode=dark] .cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul{border:1px solid var(--color-neutral-50)!important;box-shadow:0 2px 3px 0 var(--color-neutral-20)}[mode=dark] .cm-editor .cm-tooltip-autocomplete>ul>li[aria-selected=true]{background:var(--color-neutral-30);border:1px solid var(--color-neutral-50)!important}[mode=light] .cm-editor .cm-activeLineGutter,[mode=light] .cm-editor .cm-activeLine{background-color:var(--color-neutral-10)}[mode=light] .cm-editor .cm-tooltip-autocomplete .cm-completionIcon-model:before{color:var(--color-secondary-500);background:var(--color-secondary-10)}[mode=light] .cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul>li .cm-completionMatchedText{color:var(--color-accent-500);background:var(--color-accent-5)}[mode=light] .cm-editor .cm-tooltip-autocomplete .cm-completionIcon-column:before{color:var(--color-brand-500);background:var(--color-brand-20)}[mode=light] .cm-editor .cm-tooltip.cm-tooltip-autocomplete>ul{border:1px solid var(--color-neutral-20)!important;box-shadow:0 2px 3px 0 var(--color-neutral-20)}[mode=light] .cm-editor .cm-tooltip-autocomplete>ul>li[aria-selected=true]{background:var(--color-neutral-5);border:1px solid var(--color-neutral-10)!important}`)),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})(); +var R1=Object.defineProperty;var ig=n=>{throw TypeError(n)};var M1=(n,e,t)=>e in n?R1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Ft=(n,e,t)=>M1(n,typeof e!="symbol"?e+"":e,t),Zf=(n,e,t)=>e.has(n)||ig("Cannot "+t);var b=(n,e,t)=>(Zf(n,e,"read from private field"),t?t.call(n):e.get(n)),pe=(n,e,t)=>e.has(n)?ig("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),X=(n,e,t,s)=>(Zf(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),Ue=(n,e,t)=>(Zf(n,e,"access private method"),t);var ic=(n,e,t,s)=>({set _(a){X(n,e,a,t)},get _(){return b(n,e,s)}});function L1(n,e){for(var t=0;ts[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var oO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var eh={exports:{}},dl={},th={exports:{}},$e={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var sg;function A1(){if(sg)return $e;sg=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function S(C){return C===null||typeof C!="object"?null:(C=v&&C[v]||C["@@iterator"],typeof C=="function"?C:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,A={};function T(C,j,he){this.props=C,this.context=j,this.refs=A,this.updater=he||E}T.prototype.isReactComponent={},T.prototype.setState=function(C,j){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,j,"setState")},T.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function B(){}B.prototype=T.prototype;function Z(C,j,he){this.props=C,this.context=j,this.refs=A,this.updater=he||E}var V=Z.prototype=new B;V.constructor=Z,k(V,T.prototype),V.isPureReactComponent=!0;var G=Array.isArray,te=Object.prototype.hasOwnProperty,M={current:null},Le={key:!0,ref:!0,__self:!0,__source:!0};function ve(C,j,he){var Ae,We={},Be=null,ct=null;if(j!=null)for(Ae in j.ref!==void 0&&(ct=j.ref),j.key!==void 0&&(Be=""+j.key),j)te.call(j,Ae)&&!Le.hasOwnProperty(Ae)&&(We[Ae]=j[Ae]);var et=arguments.length-2;if(et===1)We.children=he;else if(10}function Kv(n){return Array.isArray(n)&&n.length===0}function dO(n){return qv(n)&&Kv(Object.keys(n))}function fO(n){return qv(n)&&ud(Object.keys(n))}function qv(n){return typeof n=="object"&&yn(n)&&n.constructor===Object}function en(n){return n==null}function yn(n){return n!=null}function hO(n){if(!en(n))try{const e=new Date(n);return isNaN(e.getTime())?void 0:e}catch{return}}function pO(n,e="yyyy-mm-dd",t=!0){if(en(n))return"";const s=t?n.getUTCFullYear():n.getFullYear(),a=g(t?n.getUTCMonth()+1:n.getMonth()+1),u=g(t?n.getUTCDate():n.getDate()),d=g(t?n.getUTCHours():n.getHours()),f=g(t?n.getUTCMinutes():n.getMinutes()),p=g(t?n.getUTCSeconds():n.getSeconds());return{"mm/dd/yyyy":`${a}/${u}/${s}`,"yyyy-mm-dd":`${s}-${a}-${u}`,"yyyy-mm-dd hh-mm-ss":`${s}-${a}-${u} ${d}:${f}:${p}`}[e]??n.toDateString();function g(v){return v.toString().padStart(2,"0")}}function mO(n,e){return n.includes(e)}function yO(n,e,t=100){return en(n)||en(e)||e===0||isNaN(n)||isNaN(e)||isNaN(t)?0:n/e*t}function B1(n){if(!en(n))try{return n==="undefined"?void 0:JSON.parse(n??"")}catch{console.log("parsing error on",{value:n});return}}function gO(n,e=500,t=!1){let s;return function(...u){const d=t&&en(s);clearTimeout(s),s=setTimeout(()=>{s=void 0,fs(t)&&n(...u)},e),d&&n(...u)}}function vh(){const n=new Date().getTime().toString(36),e=Math.random().toString(36).substring(2,8);return n+e}function vO(...n){return n.filter(Boolean).join("__")}function wO(n,e){const t=(Date.now()%1e5).toString(16);return`${en(n)?"":`${n}_`}${t}${e??""}`.toLowerCase()}function SO(n,e=0,t=5,s="...",a){const u=n.length;return t=Math.abs(t),a=en(a)?t:Math.abs(a),e>u||t+a>=u?n:a===0?n.substring(0,t)+s:n.substring(0,t)+s+n.substring(u-a)}const nh=window.localStorage;function Yv(n,e){function t(){try{const u=nh.getItem(n);return B1(u)}catch(u){console.log(u)}}function s(u){try{const d=Object.assign({},t(),u);nh.setItem(n,JSON.stringify(d))}catch(d){console.log(d)}}function a(){nh.removeItem(n)}return[t,s,a]}const To={Light:"light",Dark:"dark"},U1={mode:To.Light},Gv=O.createContext(U1);function j1({children:n}){var d;const[e,t]=Yv("color-scheme"),s=((d=e())==null?void 0:d.mode)??(window.matchMedia("(prefers-color-scheme: dark)").matches?To.Dark:To.Light),[a,u]=O.useState(s);return O.useEffect(()=>{t({mode:a}),document.documentElement.setAttribute("mode",a)},[a]),U.jsx(Gv.Provider,{value:{mode:a,toggleColorScheme(){u(a===To.Light?To.Dark:To.Light)}},children:n})}function _O(){return O.useContext(Gv)}var sc={},rh={exports:{}},Cn={},ih={exports:{}},sh={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ug;function z1(){return ug||(ug=1,function(n){function e(K,ne){var Y=K.length;K.push(ne);e:for(;0>>1,j=K[C];if(0>>1;Ca(We,Y))Bea(ct,We)?(K[C]=ct,K[Be]=Y,C=Be):(K[C]=We,K[Ae]=Y,C=Ae);else if(Bea(ct,Y))K[C]=ct,K[Be]=Y,C=Be;else break e}}return ne}function a(K,ne){var Y=K.sortIndex-ne.sortIndex;return Y!==0?Y:K.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();n.unstable_now=function(){return d.now()-f}}var p=[],m=[],g=1,v=null,S=3,E=!1,k=!1,A=!1,T=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function V(K){for(var ne=t(m);ne!==null;){if(ne.callback===null)s(m);else if(ne.startTime<=K)s(m),ne.sortIndex=ne.expirationTime,e(p,ne);else break;ne=t(m)}}function G(K){if(A=!1,V(K),!k)if(t(p)!==null)k=!0,Ne(te);else{var ne=t(m);ne!==null&&ze(G,ne.startTime-K)}}function te(K,ne){k=!1,A&&(A=!1,B(ve),ve=-1),E=!0;var Y=S;try{for(V(ne),v=t(p);v!==null&&(!(v.expirationTime>ne)||K&&!mt());){var C=v.callback;if(typeof C=="function"){v.callback=null,S=v.priorityLevel;var j=C(v.expirationTime<=ne);ne=n.unstable_now(),typeof j=="function"?v.callback=j:v===t(p)&&s(p),V(ne)}else s(p);v=t(p)}if(v!==null)var he=!0;else{var Ae=t(m);Ae!==null&&ze(G,Ae.startTime-ne),he=!1}return he}finally{v=null,S=Y,E=!1}}var M=!1,Le=null,ve=-1,re=5,Fe=-1;function mt(){return!(n.unstable_now()-FeK||125C?(K.sortIndex=Y,e(m,K),t(p)===null&&K===t(m)&&(A?(B(ve),ve=-1):A=!0,ze(G,Y-C))):(K.sortIndex=j,e(p,K),k||E||(k=!0,Ne(te))),K},n.unstable_shouldYield=mt,n.unstable_wrapCallback=function(K){var ne=S;return function(){var Y=S;S=ne;try{return K.apply(this,arguments)}finally{S=Y}}}}(sh)),sh}var cg;function $1(){return cg||(cg=1,ih.exports=z1()),ih.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var dg;function V1(){if(dg)return Cn;dg=1;var n=Gh(),e=$1();function t(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function S(r){return p.call(v,r)?!0:p.call(g,r)?!1:m.test(r)?v[r]=!0:(g[r]=!0,!1)}function E(r,i,o,l){if(o!==null&&o.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,i,o,l){if(i===null||typeof i>"u"||E(r,i,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function A(r,i,o,l,c,h,y){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=r,this.type=i,this.sanitizeURL=h,this.removeEmptyString=y}var T={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){T[r]=new A(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];T[i]=new A(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){T[r]=new A(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){T[r]=new A(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){T[r]=new A(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){T[r]=new A(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){T[r]=new A(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){T[r]=new A(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){T[r]=new A(r,5,!1,r.toLowerCase(),null,!1,!1)});var B=/[\-:]([a-z])/g;function Z(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(B,Z);T[i]=new A(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(B,Z);T[i]=new A(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(B,Z);T[i]=new A(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){T[r]=new A(r,1,!1,r.toLowerCase(),null,!1,!1)}),T.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){T[r]=new A(r,1,!1,r.toLowerCase(),null,!0,!0)});function V(r,i,o,l){var c=T.hasOwnProperty(i)?T[i]:null;(c!==null?c.type!==0:l||!(2w||c[y]!==h[w]){var I=` +`+c[y].replace(" at new "," at ");return r.displayName&&I.includes("")&&(I=I.replace("",r.displayName)),I}while(1<=y&&0<=w);break}}}finally{he=!1,Error.prepareStackTrace=o}return(r=r?r.displayName||r.name:"")?j(r):""}function We(r){switch(r.tag){case 5:return j(r.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return r=Ae(r.type,!1),r;case 11:return r=Ae(r.type.render,!1),r;case 1:return r=Ae(r.type,!0),r;default:return""}}function Be(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Le:return"Fragment";case M:return"Portal";case re:return"Profiler";case ve:return"StrictMode";case yt:return"Suspense";case je:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case mt:return(r.displayName||"Context")+".Consumer";case Fe:return(r._context.displayName||"Context")+".Provider";case bt:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Ze:return i=r.displayName||null,i!==null?i:Be(r.type)||"Memo";case Ne:i=r._payload,r=r._init;try{return Be(r(i))}catch{}}return null}function ct(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Be(i);case 8:return i===ve?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function et(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function vt(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function tt(r){var i=vt(r)?"checked":"value",o=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),l=""+r[i];if(!r.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,h=o.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,h.call(this,y)}}),Object.defineProperty(r,i,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function ar(r){r._valueTracker||(r._valueTracker=tt(r))}function Ea(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var o=i.getValue(),l="";return r&&(l=vt(r)?r.checked?"true":"false":r.value),r=l,r!==o?(i.setValue(r),!0):!1}function oo(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function lr(r,i){var o=i.checked;return Y({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??r._wrapperState.initialChecked})}function Yl(r,i){var o=i.defaultValue==null?"":i.defaultValue,l=i.checked!=null?i.checked:i.defaultChecked;o=et(i.value!=null?i.value:o),r._wrapperState={initialChecked:l,initialValue:o,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Gl(r,i){i=i.checked,i!=null&&V(r,"checked",i,!1)}function ao(r,i){Gl(r,i);var o=et(i.value),l=i.type;if(o!=null)l==="number"?(o===0&&r.value===""||r.value!=o)&&(r.value=""+o):r.value!==""+o&&(r.value=""+o);else if(l==="submit"||l==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?xa(r,i.type,o):i.hasOwnProperty("defaultValue")&&xa(r,i.type,et(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function Jl(r,i,o){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var l=i.type;if(!(l!=="submit"&&l!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,o||i===r.value||(r.value=i),r.defaultValue=i}o=r.name,o!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,o!==""&&(r.name=o)}function xa(r,i,o){(i!=="number"||oo(r.ownerDocument)!==r)&&(o==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+o&&(r.defaultValue=""+o))}var ws=Array.isArray;function Ei(r,i,o,l){if(r=r.options,i){i={};for(var c=0;c"+i.valueOf().toString()+"",i=Ss.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function _s(r,i){if(i){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=i;return}}r.textContent=i}var Sn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xl=["Webkit","ms","Moz","O"];Object.keys(Sn).forEach(function(r){Xl.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Sn[i]=Sn[r]})});function Ca(r,i,o){return i==null||typeof i=="boolean"||i===""?"":o||typeof i!="number"||i===0||Sn.hasOwnProperty(r)&&Sn[r]?(""+i).trim():i+"px"}function Oa(r,i){r=r.style;for(var o in i)if(i.hasOwnProperty(o)){var l=o.indexOf("--")===0,c=Ca(o,i[o],l);o==="float"&&(o="cssFloat"),l?r.setProperty(o,c):r[o]=c}}var gd=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function co(r,i){if(i){if(gd[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(t(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(t(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(t(61))}if(i.style!=null&&typeof i.style!="object")throw Error(t(62))}}function Di(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var fo=null;function bs(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Fa=null,Jr=null,Ci=null;function Ra(r){if(r=Ga(r)){if(typeof Fa!="function")throw Error(t(280));var i=r.stateNode;i&&(i=wu(i),Fa(r.stateNode,r.type,i))}}function Is(r){Jr?Ci?Ci.push(r):Ci=[r]:Jr=r}function Es(){if(Jr){var r=Jr,i=Ci;if(Ci=Jr=null,Ra(r),i)for(r=0;r>>=0,r===0?32:31-(vd(r)/KS|0)|0}var tu=64,nu=4194304;function La(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function ru(r,i){var o=r.pendingLanes;if(o===0)return 0;var l=0,c=r.suspendedLanes,h=r.pingedLanes,y=o&268435455;if(y!==0){var w=y&~c;w!==0?l=La(w):(h&=y,h!==0&&(l=La(h)))}else y=o&~c,y!==0?l=La(y):h!==0&&(l=La(h));if(l===0)return 0;if(i!==0&&i!==l&&(i&c)===0&&(c=l&-l,h=i&-i,c>=h||c===16&&(h&4194240)!==0))return i;if((l&4)!==0&&(l|=o&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=l;0o;o++)i.push(r);return i}function Aa(r,i,o){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-_n(i),r[i]=o}function JS(r,i){var o=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var l=r.eventTimes;for(r=r.expirationTimes;0=za),Jp=" ",Xp=!1;function Zp(r,i){switch(r){case"keyup":return x_.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function em(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var yo=!1;function C_(r,i){switch(r){case"compositionend":return em(i);case"keypress":return i.which!==32?null:(Xp=!0,Jp);case"textInput":return r=i.data,r===Jp&&Xp?null:r;default:return null}}function O_(r,i){if(yo)return r==="compositionend"||!Ld&&Zp(r,i)?(r=Wp(),lu=Dd=ki=null,yo=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:o,offset:i-r};r=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=am(o)}}function um(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?um(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function cm(){for(var r=window,i=oo();i instanceof r.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)r=i.contentWindow;else break;i=oo(r.document)}return i}function Pd(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function T_(r){var i=cm(),o=r.focusedElem,l=r.selectionRange;if(i!==o&&o&&o.ownerDocument&&um(o.ownerDocument.documentElement,o)){if(l!==null&&Pd(o)){if(i=l.start,r=l.end,r===void 0&&(r=i),"selectionStart"in o)o.selectionStart=i,o.selectionEnd=Math.min(r,o.value.length);else if(r=(i=o.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var c=o.textContent.length,h=Math.min(l.start,c);l=l.end===void 0?h:Math.min(l.end,c),!r.extend&&h>l&&(c=l,l=h,h=c),c=lm(o,h);var y=lm(o,l);c&&y&&(r.rangeCount!==1||r.anchorNode!==c.node||r.anchorOffset!==c.offset||r.focusNode!==y.node||r.focusOffset!==y.offset)&&(i=i.createRange(),i.setStart(c.node,c.offset),r.removeAllRanges(),h>l?(r.addRange(i),r.extend(y.node,y.offset)):(i.setEnd(y.node,y.offset),r.addRange(i)))}}for(i=[],r=o;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,go=null,Nd=null,Wa=null,Td=!1;function dm(r,i,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Td||go==null||go!==oo(l)||(l=go,"selectionStart"in l&&Pd(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Wa&&Ha(Wa,l)||(Wa=l,l=yu(Nd,"onSelect"),0bo||(r.current=Yd[bo],Yd[bo]=null,bo--)}function wt(r,i){bo++,Yd[bo]=r.current,r.current=i}var Bi={},tn=Ti(Bi),bn=Ti(!1),Os=Bi;function Io(r,i){var o=r.type.contextTypes;if(!o)return Bi;var l=r.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===i)return l.__reactInternalMemoizedMaskedChildContext;var c={},h;for(h in o)c[h]=i[h];return l&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=c),c}function In(r){return r=r.childContextTypes,r!=null}function Su(){Et(bn),Et(tn)}function Dm(r,i,o){if(tn.current!==Bi)throw Error(t(168));wt(tn,i),wt(bn,o)}function Cm(r,i,o){var l=r.stateNode;if(i=i.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var c in l)if(!(c in i))throw Error(t(108,ct(r)||"Unknown",c));return Y({},o,l)}function _u(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Bi,Os=tn.current,wt(tn,r),wt(bn,bn.current),!0}function Om(r,i,o){var l=r.stateNode;if(!l)throw Error(t(169));o?(r=Cm(r,i,Os),l.__reactInternalMemoizedMergedChildContext=r,Et(bn),Et(tn),wt(tn,r)):Et(bn),wt(bn,o)}var ei=null,bu=!1,Gd=!1;function Fm(r){ei===null?ei=[r]:ei.push(r)}function Y_(r){bu=!0,Fm(r)}function Ui(){if(!Gd&&ei!==null){Gd=!0;var r=0,i=at;try{var o=ei;for(at=1;r>=y,c-=y,ti=1<<32-_n(i)+c|o<Re?(Jt=ge,ge=null):Jt=ge.sibling;var Xe=z(R,ge,L[Re],Q);if(Xe===null){ge===null&&(ge=Jt);break}r&&ge&&Xe.alternate===null&&i(R,ge),x=h(Xe,x,Re),ye===null?le=Xe:ye.sibling=Xe,ye=Xe,ge=Jt}if(Re===L.length)return o(R,ge),Ot&&Rs(R,Re),le;if(ge===null){for(;ReRe?(Jt=ge,ge=null):Jt=ge.sibling;var qi=z(R,ge,Xe.value,Q);if(qi===null){ge===null&&(ge=Jt);break}r&&ge&&qi.alternate===null&&i(R,ge),x=h(qi,x,Re),ye===null?le=qi:ye.sibling=qi,ye=qi,ge=Jt}if(Xe.done)return o(R,ge),Ot&&Rs(R,Re),le;if(ge===null){for(;!Xe.done;Re++,Xe=L.next())Xe=W(R,Xe.value,Q),Xe!==null&&(x=h(Xe,x,Re),ye===null?le=Xe:ye.sibling=Xe,ye=Xe);return Ot&&Rs(R,Re),le}for(ge=l(R,ge);!Xe.done;Re++,Xe=L.next())Xe=J(ge,R,Re,Xe.value,Q),Xe!==null&&(r&&Xe.alternate!==null&&ge.delete(Xe.key===null?Re:Xe.key),x=h(Xe,x,Re),ye===null?le=Xe:ye.sibling=Xe,ye=Xe);return r&&ge.forEach(function(F1){return i(R,F1)}),Ot&&Rs(R,Re),le}function Pt(R,x,L,Q){if(typeof L=="object"&&L!==null&&L.type===Le&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case te:e:{for(var le=L.key,ye=x;ye!==null;){if(ye.key===le){if(le=L.type,le===Le){if(ye.tag===7){o(R,ye.sibling),x=c(ye,L.props.children),x.return=R,R=x;break e}}else if(ye.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Ne&&Pm(le)===ye.type){o(R,ye.sibling),x=c(ye,L.props),x.ref=Ja(R,ye,L),x.return=R,R=x;break e}o(R,ye);break}else i(R,ye);ye=ye.sibling}L.type===Le?(x=Bs(L.props.children,R.mode,Q,L.key),x.return=R,R=x):(Q=Gu(L.type,L.key,L.props,null,R.mode,Q),Q.ref=Ja(R,x,L),Q.return=R,R=Q)}return y(R);case M:e:{for(ye=L.key;x!==null;){if(x.key===ye)if(x.tag===4&&x.stateNode.containerInfo===L.containerInfo&&x.stateNode.implementation===L.implementation){o(R,x.sibling),x=c(x,L.children||[]),x.return=R,R=x;break e}else{o(R,x);break}else i(R,x);x=x.sibling}x=qf(L,R.mode,Q),x.return=R,R=x}return y(R);case Ne:return ye=L._init,Pt(R,x,ye(L._payload),Q)}if(ws(L))return se(R,x,L,Q);if(ne(L))return oe(R,x,L,Q);Du(R,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,x!==null&&x.tag===6?(o(R,x.sibling),x=c(x,L),x.return=R,R=x):(o(R,x),x=Kf(L,R.mode,Q),x.return=R,R=x),y(R)):o(R,x)}return Pt}var Co=Nm(!0),Tm=Nm(!1),Cu=Ti(null),Ou=null,Oo=null,nf=null;function rf(){nf=Oo=Ou=null}function sf(r){var i=Cu.current;Et(Cu),r._currentValue=i}function of(r,i,o){for(;r!==null;){var l=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,l!==null&&(l.childLanes|=i)):l!==null&&(l.childLanes&i)!==i&&(l.childLanes|=i),r===o)break;r=r.return}}function Fo(r,i){Ou=r,nf=Oo=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(En=!0),r.firstContext=null)}function Qn(r){var i=r._currentValue;if(nf!==r)if(r={context:r,memoizedValue:i,next:null},Oo===null){if(Ou===null)throw Error(t(308));Oo=r,Ou.dependencies={lanes:0,firstContext:r}}else Oo=Oo.next=r;return i}var Ms=null;function af(r){Ms===null?Ms=[r]:Ms.push(r)}function Bm(r,i,o,l){var c=i.interleaved;return c===null?(o.next=o,af(i)):(o.next=c.next,c.next=o),i.interleaved=o,ri(r,l)}function ri(r,i){r.lanes|=i;var o=r.alternate;for(o!==null&&(o.lanes|=i),o=r,r=r.return;r!==null;)r.childLanes|=i,o=r.alternate,o!==null&&(o.childLanes|=i),o=r,r=r.return;return o.tag===3?o.stateNode:null}var ji=!1;function lf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Um(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function ii(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function zi(r,i,o){var l=r.updateQueue;if(l===null)return null;if(l=l.shared,(Ge&2)!==0){var c=l.pending;return c===null?i.next=i:(i.next=c.next,c.next=i),l.pending=i,ri(r,o)}return c=l.interleaved,c===null?(i.next=i,af(l)):(i.next=c.next,c.next=i),l.interleaved=i,ri(r,o)}function Fu(r,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194240)!==0)){var l=i.lanes;l&=r.pendingLanes,o|=l,i.lanes=o,_d(r,o)}}function jm(r,i){var o=r.updateQueue,l=r.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var c=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var y={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};h===null?c=h=y:h=h.next=y,o=o.next}while(o!==null);h===null?c=h=i:h=h.next=i}else c=h=i;o={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:l.shared,effects:l.effects},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=i:r.next=i,o.lastBaseUpdate=i}function Ru(r,i,o,l){var c=r.updateQueue;ji=!1;var h=c.firstBaseUpdate,y=c.lastBaseUpdate,w=c.shared.pending;if(w!==null){c.shared.pending=null;var I=w,P=I.next;I.next=null,y===null?h=P:y.next=P,y=I;var $=r.alternate;$!==null&&($=$.updateQueue,w=$.lastBaseUpdate,w!==y&&(w===null?$.firstBaseUpdate=P:w.next=P,$.lastBaseUpdate=I))}if(h!==null){var W=c.baseState;y=0,$=P=I=null,w=h;do{var z=w.lane,J=w.eventTime;if((l&z)===z){$!==null&&($=$.next={eventTime:J,lane:0,tag:w.tag,payload:w.payload,callback:w.callback,next:null});e:{var se=r,oe=w;switch(z=i,J=o,oe.tag){case 1:if(se=oe.payload,typeof se=="function"){W=se.call(J,W,z);break e}W=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=oe.payload,z=typeof se=="function"?se.call(J,W,z):se,z==null)break e;W=Y({},W,z);break e;case 2:ji=!0}}w.callback!==null&&w.lane!==0&&(r.flags|=64,z=c.effects,z===null?c.effects=[w]:z.push(w))}else J={eventTime:J,lane:z,tag:w.tag,payload:w.payload,callback:w.callback,next:null},$===null?(P=$=J,I=W):$=$.next=J,y|=z;if(w=w.next,w===null){if(w=c.shared.pending,w===null)break;z=w,w=z.next,z.next=null,c.lastBaseUpdate=z,c.shared.pending=null}}while(!0);if($===null&&(I=W),c.baseState=I,c.firstBaseUpdate=P,c.lastBaseUpdate=$,i=c.shared.interleaved,i!==null){c=i;do y|=c.lane,c=c.next;while(c!==i)}else h===null&&(c.shared.lanes=0);ks|=y,r.lanes=y,r.memoizedState=W}}function zm(r,i,o){if(r=i.effects,i.effects=null,r!==null)for(i=0;io?o:4,r(!0);var l=hf.transition;hf.transition={};try{r(!1),i()}finally{at=o,hf.transition=l}}function oy(){return Kn().memoizedState}function Z_(r,i,o){var l=Wi(r);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},ay(r))ly(i,o);else if(o=Bm(r,i,o,l),o!==null){var c=dn();gr(o,r,l,c),uy(o,i,l)}}function e1(r,i,o){var l=Wi(r),c={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(ay(r))ly(i,c);else{var h=r.alternate;if(r.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var y=i.lastRenderedState,w=h(y,o);if(c.hasEagerState=!0,c.eagerState=w,fr(w,y)){var I=i.interleaved;I===null?(c.next=c,af(i)):(c.next=I.next,I.next=c),i.interleaved=c;return}}catch{}finally{}o=Bm(r,i,c,l),o!==null&&(c=dn(),gr(o,r,l,c),uy(o,i,l))}}function ay(r){var i=r.alternate;return r===Mt||i!==null&&i===Mt}function ly(r,i){tl=Au=!0;var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}function uy(r,i,o){if((o&4194240)!==0){var l=i.lanes;l&=r.pendingLanes,o|=l,i.lanes=o,_d(r,o)}}var Nu={readContext:Qn,useCallback:nn,useContext:nn,useEffect:nn,useImperativeHandle:nn,useInsertionEffect:nn,useLayoutEffect:nn,useMemo:nn,useReducer:nn,useRef:nn,useState:nn,useDebugValue:nn,useDeferredValue:nn,useTransition:nn,useMutableSource:nn,useSyncExternalStore:nn,useId:nn,unstable_isNewReconciler:!1},t1={readContext:Qn,useCallback:function(r,i){return Lr().memoizedState=[r,i===void 0?null:i],r},useContext:Qn,useEffect:Xm,useImperativeHandle:function(r,i,o){return o=o!=null?o.concat([r]):null,ku(4194308,4,ty.bind(null,i,r),o)},useLayoutEffect:function(r,i){return ku(4194308,4,r,i)},useInsertionEffect:function(r,i){return ku(4,2,r,i)},useMemo:function(r,i){var o=Lr();return i=i===void 0?null:i,r=r(),o.memoizedState=[r,i],r},useReducer:function(r,i,o){var l=Lr();return i=o!==void 0?o(i):i,l.memoizedState=l.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},l.queue=r,r=r.dispatch=Z_.bind(null,Mt,r),[l.memoizedState,r]},useRef:function(r){var i=Lr();return r={current:r},i.memoizedState=r},useState:Gm,useDebugValue:Sf,useDeferredValue:function(r){return Lr().memoizedState=r},useTransition:function(){var r=Gm(!1),i=r[0];return r=X_.bind(null,r[1]),Lr().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,o){var l=Mt,c=Lr();if(Ot){if(o===void 0)throw Error(t(407));o=o()}else{if(o=i(),Gt===null)throw Error(t(349));(As&30)!==0||Wm(l,i,o)}c.memoizedState=o;var h={value:o,getSnapshot:i};return c.queue=h,Xm(Km.bind(null,l,h,r),[r]),l.flags|=2048,il(9,Qm.bind(null,l,h,o,i),void 0,null),o},useId:function(){var r=Lr(),i=Gt.identifierPrefix;if(Ot){var o=ni,l=ti;o=(l&~(1<<32-_n(l)-1)).toString(32)+o,i=":"+i+"R"+o,o=nl++,0<\/script>",r=r.removeChild(r.firstChild)):typeof l.is=="string"?r=y.createElement(o,{is:l.is}):(r=y.createElement(o),o==="select"&&(y=r,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):r=y.createElementNS(r,o),r[Rr]=i,r[Ya]=l,Fy(r,i,!1,!1),i.stateNode=r;e:{switch(y=Di(o,l),o){case"dialog":It("cancel",r),It("close",r),c=l;break;case"iframe":case"object":case"embed":It("load",r),c=l;break;case"video":case"audio":for(c=0;cko&&(i.flags|=128,l=!0,sl(h,!1),i.lanes=4194304)}else{if(!l)if(r=Mu(y),r!==null){if(i.flags|=128,l=!0,o=r.updateQueue,o!==null&&(i.updateQueue=o,i.flags|=4),sl(h,!0),h.tail===null&&h.tailMode==="hidden"&&!y.alternate&&!Ot)return rn(i),null}else 2*gt()-h.renderingStartTime>ko&&o!==1073741824&&(i.flags|=128,l=!0,sl(h,!1),i.lanes=4194304);h.isBackwards?(y.sibling=i.child,i.child=y):(o=h.last,o!==null?o.sibling=y:i.child=y,h.last=y)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=gt(),i.sibling=null,o=Rt.current,wt(Rt,l?o&1|2:o&1),i):(rn(i),null);case 22:case 23:return Hf(),l=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==l&&(i.flags|=8192),l&&(i.mode&1)!==0?(jn&1073741824)!==0&&(rn(i),i.subtreeFlags&6&&(i.flags|=8192)):rn(i),null;case 24:return null;case 25:return null}throw Error(t(156,i.tag))}function u1(r,i){switch(Xd(i),i.tag){case 1:return In(i.type)&&Su(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Ro(),Et(bn),Et(tn),ff(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return cf(i),null;case 13:if(Et(Rt),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(t(340));Do()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Et(Rt),null;case 4:return Ro(),null;case 10:return sf(i.type._context),null;case 22:case 23:return Hf(),null;case 24:return null;default:return null}}var ju=!1,sn=!1,c1=typeof WeakSet=="function"?WeakSet:Set,ee=null;function Lo(r,i){var o=r.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){At(r,i,l)}else o.current=null}function Lf(r,i,o){try{o()}catch(l){At(r,i,l)}}var Ly=!1;function d1(r,i){if(Vd=ou,r=cm(),Pd(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var c=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var y=0,w=-1,I=-1,P=0,$=0,W=r,z=null;t:for(;;){for(var J;W!==o||c!==0&&W.nodeType!==3||(w=y+c),W!==h||l!==0&&W.nodeType!==3||(I=y+l),W.nodeType===3&&(y+=W.nodeValue.length),(J=W.firstChild)!==null;)z=W,W=J;for(;;){if(W===r)break t;if(z===o&&++P===c&&(w=y),z===h&&++$===l&&(I=y),(J=W.nextSibling)!==null)break;W=z,z=W.parentNode}W=J}o=w===-1||I===-1?null:{start:w,end:I}}else o=null}o=o||{start:0,end:0}}else o=null;for(Hd={focusedElem:r,selectionRange:o},ou=!1,ee=i;ee!==null;)if(i=ee,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,ee=r;else for(;ee!==null;){i=ee;try{var se=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var oe=se.memoizedProps,Pt=se.memoizedState,R=i.stateNode,x=R.getSnapshotBeforeUpdate(i.elementType===i.type?oe:pr(i.type,oe),Pt);R.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var L=i.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Q){At(i,i.return,Q)}if(r=i.sibling,r!==null){r.return=i.return,ee=r;break}ee=i.return}return se=Ly,Ly=!1,se}function ol(r,i,o){var l=i.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&r)===r){var h=c.destroy;c.destroy=void 0,h!==void 0&&Lf(i,o,h)}c=c.next}while(c!==l)}}function zu(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var o=i=i.next;do{if((o.tag&r)===r){var l=o.create;o.destroy=l()}o=o.next}while(o!==i)}}function Af(r){var i=r.ref;if(i!==null){var o=r.stateNode;switch(r.tag){case 5:r=o;break;default:r=o}typeof i=="function"?i(r):i.current=r}}function Ay(r){var i=r.alternate;i!==null&&(r.alternate=null,Ay(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Rr],delete i[Ya],delete i[qd],delete i[K_],delete i[q_])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function ky(r){return r.tag===5||r.tag===3||r.tag===4}function Py(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||ky(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function kf(r,i,o){var l=r.tag;if(l===5||l===6)r=r.stateNode,i?o.nodeType===8?o.parentNode.insertBefore(r,i):o.insertBefore(r,i):(o.nodeType===8?(i=o.parentNode,i.insertBefore(r,o)):(i=o,i.appendChild(r)),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=vu));else if(l!==4&&(r=r.child,r!==null))for(kf(r,i,o),r=r.sibling;r!==null;)kf(r,i,o),r=r.sibling}function Pf(r,i,o){var l=r.tag;if(l===5||l===6)r=r.stateNode,i?o.insertBefore(r,i):o.appendChild(r);else if(l!==4&&(r=r.child,r!==null))for(Pf(r,i,o),r=r.sibling;r!==null;)Pf(r,i,o),r=r.sibling}var Xt=null,mr=!1;function $i(r,i,o){for(o=o.child;o!==null;)Ny(r,i,o),o=o.sibling}function Ny(r,i,o){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Fr,o)}catch{}switch(o.tag){case 5:sn||Lo(o,i);case 6:var l=Xt,c=mr;Xt=null,$i(r,i,o),Xt=l,mr=c,Xt!==null&&(mr?(r=Xt,o=o.stateNode,r.nodeType===8?r.parentNode.removeChild(o):r.removeChild(o)):Xt.removeChild(o.stateNode));break;case 18:Xt!==null&&(mr?(r=Xt,o=o.stateNode,r.nodeType===8?Kd(r.parentNode,o):r.nodeType===1&&Kd(r,o),Ba(r)):Kd(Xt,o.stateNode));break;case 4:l=Xt,c=mr,Xt=o.stateNode.containerInfo,mr=!0,$i(r,i,o),Xt=l,mr=c;break;case 0:case 11:case 14:case 15:if(!sn&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var h=c,y=h.destroy;h=h.tag,y!==void 0&&((h&2)!==0||(h&4)!==0)&&Lf(o,i,y),c=c.next}while(c!==l)}$i(r,i,o);break;case 1:if(!sn&&(Lo(o,i),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(w){At(o,i,w)}$i(r,i,o);break;case 21:$i(r,i,o);break;case 22:o.mode&1?(sn=(l=sn)||o.memoizedState!==null,$i(r,i,o),sn=l):$i(r,i,o);break;default:$i(r,i,o)}}function Ty(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var o=r.stateNode;o===null&&(o=r.stateNode=new c1),i.forEach(function(l){var c=S1.bind(null,r,l);o.has(l)||(o.add(l),l.then(c,c))})}}function yr(r,i){var o=i.deletions;if(o!==null)for(var l=0;lc&&(c=y),l&=~h}if(l=c,l=gt()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*h1(l/1960))-l,10r?16:r,Hi===null)var l=!1;else{if(r=Hi,Hi=null,Qu=0,(Ge&6)!==0)throw Error(t(331));var c=Ge;for(Ge|=4,ee=r.current;ee!==null;){var h=ee,y=h.child;if((ee.flags&16)!==0){var w=h.deletions;if(w!==null){for(var I=0;Igt()-Bf?Ns(r,0):Tf|=o),Dn(r,i)}function Gy(r,i){i===0&&((r.mode&1)===0?i=1:(i=nu,nu<<=1,(nu&130023424)===0&&(nu=4194304)));var o=dn();r=ri(r,i),r!==null&&(Aa(r,i,o),Dn(r,o))}function w1(r){var i=r.memoizedState,o=0;i!==null&&(o=i.retryLane),Gy(r,o)}function S1(r,i){var o=0;switch(r.tag){case 13:var l=r.stateNode,c=r.memoizedState;c!==null&&(o=c.retryLane);break;case 19:l=r.stateNode;break;default:throw Error(t(314))}l!==null&&l.delete(i),Gy(r,o)}var Jy;Jy=function(r,i,o){if(r!==null)if(r.memoizedProps!==i.pendingProps||bn.current)En=!0;else{if((r.lanes&o)===0&&(i.flags&128)===0)return En=!1,a1(r,i,o);En=(r.flags&131072)!==0}else En=!1,Ot&&(i.flags&1048576)!==0&&Rm(i,Eu,i.index);switch(i.lanes=0,i.tag){case 2:var l=i.type;Uu(r,i),r=i.pendingProps;var c=Io(i,tn.current);Fo(i,o),c=mf(null,i,l,r,c,o);var h=yf();return i.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,In(l)?(h=!0,_u(i)):h=!1,i.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,lf(i),c.updater=Tu,i.stateNode=c,c._reactInternals=i,bf(i,l,r,o),i=Df(null,i,l,!0,h,o)):(i.tag=0,Ot&&h&&Jd(i),cn(null,i,c,o),i=i.child),i;case 16:l=i.elementType;e:{switch(Uu(r,i),r=i.pendingProps,c=l._init,l=c(l._payload),i.type=l,c=i.tag=b1(l),r=pr(l,r),c){case 0:i=xf(null,i,l,r,o);break e;case 1:i=Iy(null,i,l,r,o);break e;case 11:i=vy(null,i,l,r,o);break e;case 14:i=wy(null,i,l,pr(l.type,r),o);break e}throw Error(t(306,l,""))}return i;case 0:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:pr(l,c),xf(r,i,l,c,o);case 1:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:pr(l,c),Iy(r,i,l,c,o);case 3:e:{if(Ey(i),r===null)throw Error(t(387));l=i.pendingProps,h=i.memoizedState,c=h.element,Um(r,i),Ru(i,l,null,o);var y=i.memoizedState;if(l=y.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){c=Mo(Error(t(423)),i),i=xy(r,i,l,o,c);break e}else if(l!==c){c=Mo(Error(t(424)),i),i=xy(r,i,l,o,c);break e}else for(Un=Ni(i.stateNode.containerInfo.firstChild),Bn=i,Ot=!0,hr=null,o=Tm(i,null,l,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Do(),l===c){i=si(r,i,o);break e}cn(r,i,l,o)}i=i.child}return i;case 5:return $m(i),r===null&&ef(i),l=i.type,c=i.pendingProps,h=r!==null?r.memoizedProps:null,y=c.children,Wd(l,c)?y=null:h!==null&&Wd(l,h)&&(i.flags|=32),by(r,i),cn(r,i,y,o),i.child;case 6:return r===null&&ef(i),null;case 13:return Dy(r,i,o);case 4:return uf(i,i.stateNode.containerInfo),l=i.pendingProps,r===null?i.child=Co(i,null,l,o):cn(r,i,l,o),i.child;case 11:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:pr(l,c),vy(r,i,l,c,o);case 7:return cn(r,i,i.pendingProps,o),i.child;case 8:return cn(r,i,i.pendingProps.children,o),i.child;case 12:return cn(r,i,i.pendingProps.children,o),i.child;case 10:e:{if(l=i.type._context,c=i.pendingProps,h=i.memoizedProps,y=c.value,wt(Cu,l._currentValue),l._currentValue=y,h!==null)if(fr(h.value,y)){if(h.children===c.children&&!bn.current){i=si(r,i,o);break e}}else for(h=i.child,h!==null&&(h.return=i);h!==null;){var w=h.dependencies;if(w!==null){y=h.child;for(var I=w.firstContext;I!==null;){if(I.context===l){if(h.tag===1){I=ii(-1,o&-o),I.tag=2;var P=h.updateQueue;if(P!==null){P=P.shared;var $=P.pending;$===null?I.next=I:(I.next=$.next,$.next=I),P.pending=I}}h.lanes|=o,I=h.alternate,I!==null&&(I.lanes|=o),of(h.return,o,i),w.lanes|=o;break}I=I.next}}else if(h.tag===10)y=h.type===i.type?null:h.child;else if(h.tag===18){if(y=h.return,y===null)throw Error(t(341));y.lanes|=o,w=y.alternate,w!==null&&(w.lanes|=o),of(y,o,i),y=h.sibling}else y=h.child;if(y!==null)y.return=h;else for(y=h;y!==null;){if(y===i){y=null;break}if(h=y.sibling,h!==null){h.return=y.return,y=h;break}y=y.return}h=y}cn(r,i,c.children,o),i=i.child}return i;case 9:return c=i.type,l=i.pendingProps.children,Fo(i,o),c=Qn(c),l=l(c),i.flags|=1,cn(r,i,l,o),i.child;case 14:return l=i.type,c=pr(l,i.pendingProps),c=pr(l.type,c),wy(r,i,l,c,o);case 15:return Sy(r,i,i.type,i.pendingProps,o);case 17:return l=i.type,c=i.pendingProps,c=i.elementType===l?c:pr(l,c),Uu(r,i),i.tag=1,In(l)?(r=!0,_u(i)):r=!1,Fo(i,o),dy(i,l,c),bf(i,l,c,o),Df(null,i,l,!0,r,o);case 19:return Oy(r,i,o);case 22:return _y(r,i,o)}throw Error(t(156,i.tag))};function Xy(r,i){return Oi(r,i)}function _1(r,i,o,l){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yn(r,i,o,l){return new _1(r,i,o,l)}function Qf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function b1(r){if(typeof r=="function")return Qf(r)?1:0;if(r!=null){if(r=r.$$typeof,r===bt)return 11;if(r===Ze)return 14}return 2}function Ki(r,i){var o=r.alternate;return o===null?(o=Yn(r.tag,i,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=i,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&14680064,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,i=r.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o}function Gu(r,i,o,l,c,h){var y=2;if(l=r,typeof r=="function")Qf(r)&&(y=1);else if(typeof r=="string")y=5;else e:switch(r){case Le:return Bs(o.children,c,h,i);case ve:y=8,c|=8;break;case re:return r=Yn(12,o,i,c|2),r.elementType=re,r.lanes=h,r;case yt:return r=Yn(13,o,i,c),r.elementType=yt,r.lanes=h,r;case je:return r=Yn(19,o,i,c),r.elementType=je,r.lanes=h,r;case ze:return Ju(o,c,h,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Fe:y=10;break e;case mt:y=9;break e;case bt:y=11;break e;case Ze:y=14;break e;case Ne:y=16,l=null;break e}throw Error(t(130,r==null?r:typeof r,""))}return i=Yn(y,o,i,c),i.elementType=r,i.type=l,i.lanes=h,i}function Bs(r,i,o,l){return r=Yn(7,r,l,i),r.lanes=o,r}function Ju(r,i,o,l){return r=Yn(22,r,l,i),r.elementType=ze,r.lanes=o,r.stateNode={isHidden:!1},r}function Kf(r,i,o){return r=Yn(6,r,null,i),r.lanes=o,r}function qf(r,i,o){return i=Yn(4,r.children!==null?r.children:[],r.key,i),i.lanes=o,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function I1(r,i,o,l,c){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sd(0),this.expirationTimes=Sd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sd(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Yf(r,i,o,l,c,h,y,w,I){return r=new I1(r,i,o,w,I),i===1?(i=1,h===!0&&(i|=8)):i=0,h=Yn(3,null,null,i),r.current=h,h.stateNode=r,h.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},lf(h),r}function E1(r,i,o){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),rh.exports=V1(),rh.exports}var hg;function W1(){if(hg)return sc;hg=1;var n=H1();return sc.createRoot=n.createRoot,sc.hydrateRoot=n.hydrateRoot,sc}var Q1=W1();const K1=Wv(Q1);var _a=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},eo=typeof window>"u"||"Deno"in globalThis;function pn(){}function q1(n,e){return typeof n=="function"?n(e):n}function wh(n){return typeof n=="number"&&n>=0&&n!==1/0}function Jv(n,e){return Math.max(n+(e||0)-Date.now(),0)}function hs(n,e){return typeof n=="function"?n(e):n}function Zn(n,e){return typeof n=="function"?n(e):n}function pg(n,e){const{type:t="all",exact:s,fetchStatus:a,predicate:u,queryKey:d,stale:f}=n;if(d){if(s){if(e.queryHash!==Jh(d,e.options))return!1}else if(!Fl(e.queryKey,d))return!1}if(t!=="all"){const p=e.isActive();if(t==="active"&&!p||t==="inactive"&&p)return!1}return!(typeof f=="boolean"&&e.isStale()!==f||a&&a!==e.state.fetchStatus||u&&!u(e))}function mg(n,e){const{exact:t,status:s,predicate:a,mutationKey:u}=n;if(u){if(!e.options.mutationKey)return!1;if(t){if(to(e.options.mutationKey)!==to(u))return!1}else if(!Fl(e.options.mutationKey,u))return!1}return!(s&&e.state.status!==s||a&&!a(e))}function Jh(n,e){return((e==null?void 0:e.queryKeyHashFn)||to)(n)}function to(n){return JSON.stringify(n,(e,t)=>Sh(t)?Object.keys(t).sort().reduce((s,a)=>(s[a]=t[a],s),{}):t)}function Fl(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>Fl(n[t],e[t])):!1}function Xv(n,e){if(n===e)return n;const t=yg(n)&&yg(e);if(t||Sh(n)&&Sh(e)){const s=t?n:Object.keys(n),a=s.length,u=t?e:Object.keys(e),d=u.length,f=t?[]:{},p=new Set(s);let m=0;for(let g=0;g{setTimeout(e,n)})}function _h(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?Xv(n,e):e}function G1(n,e,t=0){const s=[...n,e];return t&&s.length>t?s.slice(1):s}function J1(n,e,t=0){const s=[e,...n];return t&&s.length>t?s.slice(0,-1):s}var Xh=Symbol();function Zv(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===Xh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function e0(n,e){return typeof n=="function"?n(...e):!!n}var Hs,ns,ra,Pv,X1=(Pv=class extends _a{constructor(){super();pe(this,Hs);pe(this,ns);pe(this,ra);X(this,ra,e=>{if(!eo&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){b(this,ns)||this.setEventListener(b(this,ra))}onUnsubscribe(){var e;this.hasListeners()||((e=b(this,ns))==null||e.call(this),X(this,ns,void 0))}setEventListener(e){var t;X(this,ra,e),(t=b(this,ns))==null||t.call(this),X(this,ns,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){b(this,Hs)!==e&&(X(this,Hs,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof b(this,Hs)=="boolean"?b(this,Hs):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Hs=new WeakMap,ns=new WeakMap,ra=new WeakMap,Pv),Zh=new X1,ia,rs,sa,Nv,Z1=(Nv=class extends _a{constructor(){super();pe(this,ia,!0);pe(this,rs);pe(this,sa);X(this,sa,e=>{if(!eo&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}})}onSubscribe(){b(this,rs)||this.setEventListener(b(this,sa))}onUnsubscribe(){var e;this.hasListeners()||((e=b(this,rs))==null||e.call(this),X(this,rs,void 0))}setEventListener(e){var t;X(this,sa,e),(t=b(this,rs))==null||t.call(this),X(this,rs,e(this.setOnline.bind(this)))}setOnline(e){b(this,ia)!==e&&(X(this,ia,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return b(this,ia)}},ia=new WeakMap,rs=new WeakMap,sa=new WeakMap,Nv),Fc=new Z1;function bh(){let n,e;const t=new Promise((a,u)=>{n=a,e=u});t.status="pending",t.catch(()=>{});function s(a){Object.assign(t,a),delete t.resolve,delete t.reject}return t.resolve=a=>{s({status:"fulfilled",value:a}),n(a)},t.reject=a=>{s({status:"rejected",reason:a}),e(a)},t}function eb(n){return Math.min(1e3*2**n,3e4)}function t0(n){return(n??"online")==="online"?Fc.isOnline():!0}var n0=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function hc(n){return n instanceof n0}function r0(n){let e=!1,t=0,s=!1,a;const u=bh(),d=A=>{var T;s||(S(new n0(A)),(T=n.abort)==null||T.call(n))},f=()=>{e=!0},p=()=>{e=!1},m=()=>Zh.isFocused()&&(n.networkMode==="always"||Fc.isOnline())&&n.canRun(),g=()=>t0(n.networkMode)&&n.canRun(),v=A=>{var T;s||(s=!0,(T=n.onSuccess)==null||T.call(n,A),a==null||a(),u.resolve(A))},S=A=>{var T;s||(s=!0,(T=n.onError)==null||T.call(n,A),a==null||a(),u.reject(A))},E=()=>new Promise(A=>{var T;a=B=>{(s||m())&&A(B)},(T=n.onPause)==null||T.call(n)}).then(()=>{var A;a=void 0,s||(A=n.onContinue)==null||A.call(n)}),k=()=>{if(s)return;let A;const T=t===0?n.initialPromise:void 0;try{A=T??n.fn()}catch(B){A=Promise.reject(B)}Promise.resolve(A).then(v).catch(B=>{var M;if(s)return;const Z=n.retry??(eo?0:3),V=n.retryDelay??eb,G=typeof V=="function"?V(t,B):V,te=Z===!0||typeof Z=="number"&&tm()?void 0:E()).then(()=>{e?S(B):k()})})};return{promise:u,cancel:d,continue:()=>(a==null||a(),u),cancelRetry:f,continueRetry:p,canStart:g,start:()=>(g()?k():E().then(k),u)}}var tb=n=>setTimeout(n,0);function nb(){let n=[],e=0,t=f=>{f()},s=f=>{f()},a=tb;const u=f=>{e?n.push(f):a(()=>{t(f)})},d=()=>{const f=n;n=[],f.length&&a(()=>{s(()=>{f.forEach(p=>{t(p)})})})};return{batch:f=>{let p;e++;try{p=f()}finally{e--,e||d()}return p},batchCalls:f=>(...p)=>{u(()=>{f(...p)})},schedule:u,setNotifyFunction:f=>{t=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{a=f}}}var Ht=nb(),Ws,Tv,i0=(Tv=class{constructor(){pe(this,Ws)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wh(this.gcTime)&&X(this,Ws,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(eo?1/0:300*1e3))}clearGcTimeout(){b(this,Ws)&&(clearTimeout(b(this,Ws)),X(this,Ws,void 0))}},Ws=new WeakMap,Tv),oa,Qs,Jn,Ks,on,Bl,qs,wr,li,Bv,rb=(Bv=class extends i0{constructor(e){super();pe(this,wr);pe(this,oa);pe(this,Qs);pe(this,Jn);pe(this,Ks);pe(this,on);pe(this,Bl);pe(this,qs);X(this,qs,!1),X(this,Bl,e.defaultOptions),this.setOptions(e.options),this.observers=[],X(this,Ks,e.client),X(this,Jn,b(this,Ks).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,X(this,oa,ib(this.options)),this.state=e.state??b(this,oa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=b(this,on))==null?void 0:e.promise}setOptions(e){this.options={...b(this,Bl),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&b(this,Jn).remove(this)}setData(e,t){const s=_h(this.state.data,e,this.options);return Ue(this,wr,li).call(this,{data:s,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),s}setState(e,t){Ue(this,wr,li).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var s,a;const t=(s=b(this,on))==null?void 0:s.promise;return(a=b(this,on))==null||a.cancel(e),t?t.then(pn).catch(pn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(b(this,oa))}isActive(){return this.observers.some(e=>Zn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Xh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>hs(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Jv(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=b(this,on))==null||t.continue()}onOnline(){var t;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=b(this,on))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),b(this,Jn).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(b(this,on)&&(b(this,qs)?b(this,on).cancel({revert:!0}):b(this,on).cancelRetry()),this.scheduleGc()),b(this,Jn).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,wr,li).call(this,{type:"invalidate"})}fetch(e,t){var m,g,v;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(b(this,on))return b(this,on).continueRetry(),b(this,on).promise}if(e&&this.setOptions(e),!this.options.queryFn){const S=this.observers.find(E=>E.options.queryFn);S&&this.setOptions(S.options)}const s=new AbortController,a=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(X(this,qs,!0),s.signal)})},u=()=>{const S=Zv(this.options,t),k=(()=>{const A={client:b(this,Ks),queryKey:this.queryKey,meta:this.meta};return a(A),A})();return X(this,qs,!1),this.options.persister?this.options.persister(S,k,this):S(k)},f=(()=>{const S={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:b(this,Ks),state:this.state,fetchFn:u};return a(S),S})();(m=this.options.behavior)==null||m.onFetch(f,this),X(this,Qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=f.fetchOptions)==null?void 0:g.meta))&&Ue(this,wr,li).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta});const p=S=>{var E,k,A,T;hc(S)&&S.silent||Ue(this,wr,li).call(this,{type:"error",error:S}),hc(S)||((k=(E=b(this,Jn).config).onError)==null||k.call(E,S,this),(T=(A=b(this,Jn).config).onSettled)==null||T.call(A,this.state.data,S,this)),this.scheduleGc()};return X(this,on,r0({initialPromise:t==null?void 0:t.initialPromise,fn:f.fetchFn,abort:s.abort.bind(s),onSuccess:S=>{var E,k,A,T;if(S===void 0){p(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(S)}catch(B){p(B);return}(k=(E=b(this,Jn).config).onSuccess)==null||k.call(E,S,this),(T=(A=b(this,Jn).config).onSettled)==null||T.call(A,S,this.state.error,this),this.scheduleGc()},onError:p,onFail:(S,E)=>{Ue(this,wr,li).call(this,{type:"failed",failureCount:S,error:E})},onPause:()=>{Ue(this,wr,li).call(this,{type:"pause"})},onContinue:()=>{Ue(this,wr,li).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0})),b(this,on).start()}},oa=new WeakMap,Qs=new WeakMap,Jn=new WeakMap,Ks=new WeakMap,on=new WeakMap,Bl=new WeakMap,qs=new WeakMap,wr=new WeakSet,li=function(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...s0(s.data,this.options),fetchMeta:e.meta??null};case"success":return X(this,Qs,void 0),{...s,data:e.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return hc(a)&&a.revert&&b(this,Qs)?{...b(this,Qs),fetchStatus:"idle"}:{...s,error:a,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),Ht.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),b(this,Jn).notify({query:this,type:"updated",action:e})})},Bv);function s0(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:t0(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function ib(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,s=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var Ur,Uv,o0=(Uv=class extends _a{constructor(e={}){super();pe(this,Ur);this.config=e,X(this,Ur,new Map)}build(e,t,s){const a=t.queryKey,u=t.queryHash??Jh(a,t);let d=this.get(u);return d||(d=new rb({client:e,queryKey:a,queryHash:u,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(a)}),this.add(d)),d}add(e){b(this,Ur).has(e.queryHash)||(b(this,Ur).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=b(this,Ur).get(e.queryHash);t&&(e.destroy(),t===e&&b(this,Ur).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ht.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return b(this,Ur).get(e)}getAll(){return[...b(this,Ur).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>pg(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>pg(e,s)):t}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ur=new WeakMap,Uv),jr,fn,Ys,zr,Gi,jv,sb=(jv=class extends i0{constructor(e){super();pe(this,zr);pe(this,jr);pe(this,fn);pe(this,Ys);this.mutationId=e.mutationId,X(this,fn,e.mutationCache),X(this,jr,[]),this.state=e.state||a0(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){b(this,jr).includes(e)||(b(this,jr).push(e),this.clearGcTimeout(),b(this,fn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){X(this,jr,b(this,jr).filter(t=>t!==e)),this.scheduleGc(),b(this,fn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){b(this,jr).length||(this.state.status==="pending"?this.scheduleGc():b(this,fn).remove(this))}continue(){var e;return((e=b(this,Ys))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,d,f,p,m,g,v,S,E,k,A,T,B,Z,V,G,te,M,Le,ve;const t=()=>{Ue(this,zr,Gi).call(this,{type:"continue"})};X(this,Ys,r0({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(re,Fe)=>{Ue(this,zr,Gi).call(this,{type:"failed",failureCount:re,error:Fe})},onPause:()=>{Ue(this,zr,Gi).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>b(this,fn).canRun(this)}));const s=this.state.status==="pending",a=!b(this,Ys).canStart();try{if(s)t();else{Ue(this,zr,Gi).call(this,{type:"pending",variables:e,isPaused:a}),await((d=(u=b(this,fn).config).onMutate)==null?void 0:d.call(u,e,this));const Fe=await((p=(f=this.options).onMutate)==null?void 0:p.call(f,e));Fe!==this.state.context&&Ue(this,zr,Gi).call(this,{type:"pending",context:Fe,variables:e,isPaused:a})}const re=await b(this,Ys).start();return await((g=(m=b(this,fn).config).onSuccess)==null?void 0:g.call(m,re,e,this.state.context,this)),await((S=(v=this.options).onSuccess)==null?void 0:S.call(v,re,e,this.state.context)),await((k=(E=b(this,fn).config).onSettled)==null?void 0:k.call(E,re,null,this.state.variables,this.state.context,this)),await((T=(A=this.options).onSettled)==null?void 0:T.call(A,re,null,e,this.state.context)),Ue(this,zr,Gi).call(this,{type:"success",data:re}),re}catch(re){try{throw await((Z=(B=b(this,fn).config).onError)==null?void 0:Z.call(B,re,e,this.state.context,this)),await((G=(V=this.options).onError)==null?void 0:G.call(V,re,e,this.state.context)),await((M=(te=b(this,fn).config).onSettled)==null?void 0:M.call(te,void 0,re,this.state.variables,this.state.context,this)),await((ve=(Le=this.options).onSettled)==null?void 0:ve.call(Le,void 0,re,e,this.state.context)),re}finally{Ue(this,zr,Gi).call(this,{type:"error",error:re})}}finally{b(this,fn).runNext(this)}}},jr=new WeakMap,fn=new WeakMap,Ys=new WeakMap,zr=new WeakSet,Gi=function(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ht.batch(()=>{b(this,jr).forEach(s=>{s.onMutationUpdate(e)}),b(this,fn).notify({mutation:this,type:"updated",action:e})})},jv);function a0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var hi,Sr,Ul,zv,ob=(zv=class extends _a{constructor(e={}){super();pe(this,hi);pe(this,Sr);pe(this,Ul);this.config=e,X(this,hi,new Set),X(this,Sr,new Map),X(this,Ul,0)}build(e,t,s){const a=new sb({mutationCache:this,mutationId:++ic(this,Ul)._,options:e.defaultMutationOptions(t),state:s});return this.add(a),a}add(e){b(this,hi).add(e);const t=oc(e);if(typeof t=="string"){const s=b(this,Sr).get(t);s?s.push(e):b(this,Sr).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(b(this,hi).delete(e)){const t=oc(e);if(typeof t=="string"){const s=b(this,Sr).get(t);if(s)if(s.length>1){const a=s.indexOf(e);a!==-1&&s.splice(a,1)}else s[0]===e&&b(this,Sr).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=oc(e);if(typeof t=="string"){const s=b(this,Sr).get(t),a=s==null?void 0:s.find(u=>u.state.status==="pending");return!a||a===e}else return!0}runNext(e){var s;const t=oc(e);if(typeof t=="string"){const a=(s=b(this,Sr).get(t))==null?void 0:s.find(u=>u!==e&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{b(this,hi).forEach(e=>{this.notify({type:"removed",mutation:e})}),b(this,hi).clear(),b(this,Sr).clear()})}getAll(){return Array.from(b(this,hi))}find(e){const t={exact:!0,...e};return this.getAll().find(s=>mg(t,s))}findAll(e={}){return this.getAll().filter(t=>mg(e,t))}notify(e){Ht.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ht.batch(()=>Promise.all(e.map(t=>t.continue().catch(pn))))}},hi=new WeakMap,Sr=new WeakMap,Ul=new WeakMap,zv);function oc(n){var e;return(e=n.options.scope)==null?void 0:e.id}function vg(n){return{onFetch:(e,t)=>{var g,v,S,E,k;const s=e.options,a=(S=(v=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,u=((E=e.state.data)==null?void 0:E.pages)||[],d=((k=e.state.data)==null?void 0:k.pageParams)||[];let f={pages:[],pageParams:[]},p=0;const m=async()=>{let A=!1;const T=V=>{Object.defineProperty(V,"signal",{enumerable:!0,get:()=>(e.signal.aborted?A=!0:e.signal.addEventListener("abort",()=>{A=!0}),e.signal)})},B=Zv(e.options,e.fetchOptions),Z=async(V,G,te)=>{if(A)return Promise.reject();if(G==null&&V.pages.length)return Promise.resolve(V);const Le=(()=>{const mt={client:e.client,queryKey:e.queryKey,pageParam:G,direction:te?"backward":"forward",meta:e.options.meta};return T(mt),mt})(),ve=await B(Le),{maxPages:re}=e.options,Fe=te?J1:G1;return{pages:Fe(V.pages,ve,re),pageParams:Fe(V.pageParams,G,re)}};if(a&&u.length){const V=a==="backward",G=V?ab:wg,te={pages:u,pageParams:d},M=G(s,te);f=await Z(te,M,V)}else{const V=n??u.length;do{const G=p===0?d[0]??s.initialPageParam:wg(s,f);if(p>0&&G==null)break;f=await Z(f,G),p++}while(p{var A,T;return(T=(A=e.options).persister)==null?void 0:T.call(A,m,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=m}}}function wg(n,{pages:e,pageParams:t}){const s=e.length-1;return e.length>0?n.getNextPageParam(e[s],e,t[s],t):void 0}function ab(n,{pages:e,pageParams:t}){var s;return e.length>0?(s=n.getPreviousPageParam)==null?void 0:s.call(n,e[0],e,t[0],t):void 0}var kt,is,ss,aa,la,os,ua,ca,$v,lb=($v=class{constructor(n={}){pe(this,kt);pe(this,is);pe(this,ss);pe(this,aa);pe(this,la);pe(this,os);pe(this,ua);pe(this,ca);X(this,kt,n.queryCache||new o0),X(this,is,n.mutationCache||new ob),X(this,ss,n.defaultOptions||{}),X(this,aa,new Map),X(this,la,new Map),X(this,os,0)}mount(){ic(this,os)._++,b(this,os)===1&&(X(this,ua,Zh.subscribe(async n=>{n&&(await this.resumePausedMutations(),b(this,kt).onFocus())})),X(this,ca,Fc.subscribe(async n=>{n&&(await this.resumePausedMutations(),b(this,kt).onOnline())})))}unmount(){var n,e;ic(this,os)._--,b(this,os)===0&&((n=b(this,ua))==null||n.call(this),X(this,ua,void 0),(e=b(this,ca))==null||e.call(this),X(this,ca,void 0))}isFetching(n){return b(this,kt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return b(this,is).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=b(this,kt).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=b(this,kt).build(this,e),s=t.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(hs(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(n){return b(this,kt).findAll(n).map(({queryKey:e,state:t})=>{const s=t.data;return[e,s]})}setQueryData(n,e,t){const s=this.defaultQueryOptions({queryKey:n}),a=b(this,kt).get(s.queryHash),u=a==null?void 0:a.state.data,d=q1(e,u);if(d!==void 0)return b(this,kt).build(this,s).setData(d,{...t,manual:!0})}setQueriesData(n,e,t){return Ht.batch(()=>b(this,kt).findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=b(this,kt).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=b(this,kt);Ht.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=b(this,kt);return Ht.batch(()=>(t.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},s=Ht.batch(()=>b(this,kt).findAll(n).map(a=>a.cancel(t)));return Promise.all(s).then(pn).catch(pn)}invalidateQueries(n,e={}){return Ht.batch(()=>(b(this,kt).findAll(n).forEach(t=>{t.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},s=Ht.batch(()=>b(this,kt).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,t);return t.throwOnError||(u=u.catch(pn)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(s).then(pn)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=b(this,kt).build(this,e);return t.isStaleByTime(hs(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(pn).catch(pn)}fetchInfiniteQuery(n){return n.behavior=vg(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(pn).catch(pn)}ensureInfiniteQueryData(n){return n.behavior=vg(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Fc.isOnline()?b(this,is).resumePausedMutations():Promise.resolve()}getQueryCache(){return b(this,kt)}getMutationCache(){return b(this,is)}getDefaultOptions(){return b(this,ss)}setDefaultOptions(n){X(this,ss,n)}setQueryDefaults(n,e){b(this,aa).set(to(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...b(this,aa).values()],t={};return e.forEach(s=>{Fl(n,s.queryKey)&&Object.assign(t,s.defaultOptions)}),t}setMutationDefaults(n,e){b(this,la).set(to(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...b(this,la).values()],t={};return e.forEach(s=>{Fl(n,s.mutationKey)&&Object.assign(t,s.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...b(this,ss).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=Jh(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Xh&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...b(this,ss).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){b(this,kt).clear(),b(this,is).clear()}},kt=new WeakMap,is=new WeakMap,ss=new WeakMap,aa=new WeakMap,la=new WeakMap,os=new WeakMap,ua=new WeakMap,ca=new WeakMap,$v),Fn,Ke,jl,hn,Gs,da,as,ls,zl,fa,ha,Js,Xs,us,pa,st,gl,Ih,Eh,xh,Dh,Ch,Oh,Fh,l0,Vv,ub=(Vv=class extends _a{constructor(e,t){super();pe(this,st);pe(this,Fn);pe(this,Ke);pe(this,jl);pe(this,hn);pe(this,Gs);pe(this,da);pe(this,as);pe(this,ls);pe(this,zl);pe(this,fa);pe(this,ha);pe(this,Js);pe(this,Xs);pe(this,us);pe(this,pa,new Set);this.options=t,X(this,Fn,e),X(this,ls,null),X(this,as,bh()),this.options.experimental_prefetchInRender||b(this,as).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(b(this,Ke).addObserver(this),Sg(b(this,Ke),this.options)?Ue(this,st,gl).call(this):this.updateResult(),Ue(this,st,Dh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rh(b(this,Ke),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rh(b(this,Ke),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,st,Ch).call(this),Ue(this,st,Oh).call(this),b(this,Ke).removeObserver(this)}setOptions(e){const t=this.options,s=b(this,Ke);if(this.options=b(this,Fn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Zn(this.options.enabled,b(this,Ke))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,st,Fh).call(this),b(this,Ke).setOptions(this.options),t._defaulted&&!Oc(this.options,t)&&b(this,Fn).getQueryCache().notify({type:"observerOptionsUpdated",query:b(this,Ke),observer:this});const a=this.hasListeners();a&&_g(b(this,Ke),s,this.options,t)&&Ue(this,st,gl).call(this),this.updateResult(),a&&(b(this,Ke)!==s||Zn(this.options.enabled,b(this,Ke))!==Zn(t.enabled,b(this,Ke))||hs(this.options.staleTime,b(this,Ke))!==hs(t.staleTime,b(this,Ke)))&&Ue(this,st,Ih).call(this);const u=Ue(this,st,Eh).call(this);a&&(b(this,Ke)!==s||Zn(this.options.enabled,b(this,Ke))!==Zn(t.enabled,b(this,Ke))||u!==b(this,us))&&Ue(this,st,xh).call(this,u)}getOptimisticResult(e){const t=b(this,Fn).getQueryCache().build(b(this,Fn),e),s=this.createResult(t,e);return db(this,s)&&(X(this,hn,s),X(this,da,this.options),X(this,Gs,b(this,Ke).state)),s}getCurrentResult(){return b(this,hn)}trackResult(e,t){return new Proxy(e,{get:(s,a)=>(this.trackProp(a),t==null||t(a),Reflect.get(s,a))})}trackProp(e){b(this,pa).add(e)}getCurrentQuery(){return b(this,Ke)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=b(this,Fn).defaultQueryOptions(e),s=b(this,Fn).getQueryCache().build(b(this,Fn),t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return Ue(this,st,gl).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),b(this,hn)))}createResult(e,t){var re;const s=b(this,Ke),a=this.options,u=b(this,hn),d=b(this,Gs),f=b(this,da),m=e!==s?e.state:b(this,jl),{state:g}=e;let v={...g},S=!1,E;if(t._optimisticResults){const Fe=this.hasListeners(),mt=!Fe&&Sg(e,t),bt=Fe&&_g(e,s,t,a);(mt||bt)&&(v={...v,...s0(g.data,e.options)}),t._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:k,errorUpdatedAt:A,status:T}=v;E=v.data;let B=!1;if(t.placeholderData!==void 0&&E===void 0&&T==="pending"){let Fe;u!=null&&u.isPlaceholderData&&t.placeholderData===(f==null?void 0:f.placeholderData)?(Fe=u.data,B=!0):Fe=typeof t.placeholderData=="function"?t.placeholderData((re=b(this,ha))==null?void 0:re.state.data,b(this,ha)):t.placeholderData,Fe!==void 0&&(T="success",E=_h(u==null?void 0:u.data,Fe,t),S=!0)}if(t.select&&E!==void 0&&!B)if(u&&E===(d==null?void 0:d.data)&&t.select===b(this,zl))E=b(this,fa);else try{X(this,zl,t.select),E=t.select(E),E=_h(u==null?void 0:u.data,E,t),X(this,fa,E),X(this,ls,null)}catch(Fe){X(this,ls,Fe)}b(this,ls)&&(k=b(this,ls),E=b(this,fa),A=Date.now(),T="error");const Z=v.fetchStatus==="fetching",V=T==="pending",G=T==="error",te=V&&Z,M=E!==void 0,ve={status:T,fetchStatus:v.fetchStatus,isPending:V,isSuccess:T==="success",isError:G,isInitialLoading:te,isLoading:te,data:E,dataUpdatedAt:v.dataUpdatedAt,error:k,errorUpdatedAt:A,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:Z,isRefetching:Z&&!V,isLoadingError:G&&!M,isPaused:v.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:G&&M,isStale:ep(e,t),refetch:this.refetch,promise:b(this,as),isEnabled:Zn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const Fe=yt=>{ve.status==="error"?yt.reject(ve.error):ve.data!==void 0&&yt.resolve(ve.data)},mt=()=>{const yt=X(this,as,ve.promise=bh());Fe(yt)},bt=b(this,as);switch(bt.status){case"pending":e.queryHash===s.queryHash&&Fe(bt);break;case"fulfilled":(ve.status==="error"||ve.data!==bt.value)&&mt();break;case"rejected":(ve.status!=="error"||ve.error!==bt.reason)&&mt();break}}return ve}updateResult(){const e=b(this,hn),t=this.createResult(b(this,Ke),this.options);if(X(this,Gs,b(this,Ke).state),X(this,da,this.options),b(this,Gs).data!==void 0&&X(this,ha,b(this,Ke)),Oc(t,e))return;X(this,hn,t);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!b(this,pa).size)return!0;const d=new Set(u??b(this,pa));return this.options.throwOnError&&d.add("error"),Object.keys(b(this,hn)).some(f=>{const p=f;return b(this,hn)[p]!==e[p]&&d.has(p)})};Ue(this,st,l0).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,st,Dh).call(this)}},Fn=new WeakMap,Ke=new WeakMap,jl=new WeakMap,hn=new WeakMap,Gs=new WeakMap,da=new WeakMap,as=new WeakMap,ls=new WeakMap,zl=new WeakMap,fa=new WeakMap,ha=new WeakMap,Js=new WeakMap,Xs=new WeakMap,us=new WeakMap,pa=new WeakMap,st=new WeakSet,gl=function(e){Ue(this,st,Fh).call(this);let t=b(this,Ke).fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(pn)),t},Ih=function(){Ue(this,st,Ch).call(this);const e=hs(this.options.staleTime,b(this,Ke));if(eo||b(this,hn).isStale||!wh(e))return;const s=Jv(b(this,hn).dataUpdatedAt,e)+1;X(this,Js,setTimeout(()=>{b(this,hn).isStale||this.updateResult()},s))},Eh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(b(this,Ke)):this.options.refetchInterval)??!1},xh=function(e){Ue(this,st,Oh).call(this),X(this,us,e),!(eo||Zn(this.options.enabled,b(this,Ke))===!1||!wh(b(this,us))||b(this,us)===0)&&X(this,Xs,setInterval(()=>{(this.options.refetchIntervalInBackground||Zh.isFocused())&&Ue(this,st,gl).call(this)},b(this,us)))},Dh=function(){Ue(this,st,Ih).call(this),Ue(this,st,xh).call(this,Ue(this,st,Eh).call(this))},Ch=function(){b(this,Js)&&(clearTimeout(b(this,Js)),X(this,Js,void 0))},Oh=function(){b(this,Xs)&&(clearInterval(b(this,Xs)),X(this,Xs,void 0))},Fh=function(){const e=b(this,Fn).getQueryCache().build(b(this,Fn),this.options);if(e===b(this,Ke))return;const t=b(this,Ke);X(this,Ke,e),X(this,jl,e.state),this.hasListeners()&&(t==null||t.removeObserver(this),e.addObserver(this))},l0=function(e){Ht.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(b(this,hn))}),b(this,Fn).getQueryCache().notify({query:b(this,Ke),type:"observerResultsUpdated"})})},Vv);function cb(n,e){return Zn(e.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&e.retryOnMount===!1)}function Sg(n,e){return cb(n,e)||n.state.data!==void 0&&Rh(n,e,e.refetchOnMount)}function Rh(n,e,t){if(Zn(e.enabled,n)!==!1&&hs(e.staleTime,n)!=="static"){const s=typeof t=="function"?t(n):t;return s==="always"||s!==!1&&ep(n,e)}return!1}function _g(n,e,t,s){return(n!==e||Zn(s.enabled,n)===!1)&&(!t.suspense||n.state.status!=="error")&&ep(n,t)}function ep(n,e){return Zn(e.enabled,n)!==!1&&n.isStaleByTime(hs(e.staleTime,n))}function db(n,e){return!Oc(n.getCurrentResult(),e)}var cs,ds,Rn,pi,Si,pc,Mh,Hv,fb=(Hv=class extends _a{constructor(t,s){super();pe(this,Si);pe(this,cs);pe(this,ds);pe(this,Rn);pe(this,pi);X(this,cs,t),this.setOptions(s),this.bindMethods(),Ue(this,Si,pc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var a;const s=this.options;this.options=b(this,cs).defaultMutationOptions(t),Oc(this.options,s)||b(this,cs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:b(this,Rn),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&to(s.mutationKey)!==to(this.options.mutationKey)?this.reset():((a=b(this,Rn))==null?void 0:a.state.status)==="pending"&&b(this,Rn).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=b(this,Rn))==null||t.removeObserver(this)}onMutationUpdate(t){Ue(this,Si,pc).call(this),Ue(this,Si,Mh).call(this,t)}getCurrentResult(){return b(this,ds)}reset(){var t;(t=b(this,Rn))==null||t.removeObserver(this),X(this,Rn,void 0),Ue(this,Si,pc).call(this),Ue(this,Si,Mh).call(this)}mutate(t,s){var a;return X(this,pi,s),(a=b(this,Rn))==null||a.removeObserver(this),X(this,Rn,b(this,cs).getMutationCache().build(b(this,cs),this.options)),b(this,Rn).addObserver(this),b(this,Rn).execute(t)}},cs=new WeakMap,ds=new WeakMap,Rn=new WeakMap,pi=new WeakMap,Si=new WeakSet,pc=function(){var s;const t=((s=b(this,Rn))==null?void 0:s.state)??a0();X(this,ds,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Mh=function(t){Ht.batch(()=>{var s,a,u,d,f,p,m,g;if(b(this,pi)&&this.hasListeners()){const v=b(this,ds).variables,S=b(this,ds).context;(t==null?void 0:t.type)==="success"?((a=(s=b(this,pi)).onSuccess)==null||a.call(s,t.data,v,S),(d=(u=b(this,pi)).onSettled)==null||d.call(u,t.data,null,v,S)):(t==null?void 0:t.type)==="error"&&((p=(f=b(this,pi)).onError)==null||p.call(f,t.error,v,S),(g=(m=b(this,pi)).onSettled)==null||g.call(m,void 0,t.error,v,S))}this.listeners.forEach(v=>{v(b(this,ds))})})},Hv),u0=O.createContext(void 0),tp=n=>{const e=O.useContext(u0);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},hb=({client:n,children:e})=>(O.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),U.jsx(u0.Provider,{value:n,children:e})),c0=O.createContext(!1),pb=()=>O.useContext(c0);c0.Provider;function mb(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var yb=O.createContext(mb()),gb=()=>O.useContext(yb),vb=(n,e)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(e.isReset()||(n.retryOnMount=!1))},wb=n=>{O.useEffect(()=>{n.clearReset()},[n])},Sb=({result:n,errorResetBoundary:e,throwOnError:t,query:s,suspense:a})=>n.isError&&!e.isReset()&&!n.isFetching&&s&&(a&&n.data===void 0||e0(t,[n.error,s])),_b=n=>{if(n.suspense){const e=s=>s==="static"?s:Math.max(s??1e3,1e3),t=n.staleTime;n.staleTime=typeof t=="function"?(...s)=>e(t(...s)):e(t),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},bb=(n,e)=>n.isLoading&&n.isFetching&&!e,Ib=(n,e)=>(n==null?void 0:n.suspense)&&e.isPending,bg=(n,e,t)=>e.fetchOptimistic(n).catch(()=>{t.clearReset()});function Eb(n,e,t){var v,S,E,k,A;const s=pb(),a=gb(),u=tp(),d=u.defaultQueryOptions(n);(S=(v=u.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||S.call(v,d),d._optimisticResults=s?"isRestoring":"optimistic",_b(d),vb(d,a),wb(a);const f=!u.getQueryCache().get(d.queryHash),[p]=O.useState(()=>new e(u,d)),m=p.getOptimisticResult(d),g=!s&&n.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(T=>{const B=g?p.subscribe(Ht.batchCalls(T)):pn;return p.updateResult(),B},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),O.useEffect(()=>{p.setOptions(d)},[d,p]),Ib(d,m))throw bg(d,p,a);if(Sb({result:m,errorResetBoundary:a,throwOnError:d.throwOnError,query:u.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw m.error;if((k=(E=u.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||k.call(E,d,m),d.experimental_prefetchInRender&&!eo&&bb(m,s)){const T=f?bg(d,p,a):(A=u.getQueryCache().get(d.queryHash))==null?void 0:A.promise;T==null||T.catch(pn).finally(()=>{p.updateResult()})}return d.notifyOnChangeProps?m:p.trackResult(m)}function xb(n,e){return Eb(n,ub)}function Db(n,e){const t=tp(),[s]=O.useState(()=>new fb(t,n));O.useEffect(()=>{s.setOptions(n)},[s,n]);const a=O.useSyncExternalStore(O.useCallback(d=>s.subscribe(Ht.batchCalls(d)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),u=O.useCallback((d,f)=>{s.mutate(d,f).catch(pn)},[s]);if(a.error&&e0(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:u,mutateAsync:a.mutate}}const Cb=function(){const e=typeof document<"u"&&document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}(),Ob=function(n){return"/"+n},Ig={},vn=function(e,t,s){let a=Promise.resolve();if(t&&t.length>0){let d=function(m){return Promise.all(m.map(g=>Promise.resolve(g).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),p=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));a=d(t.map(m=>{if(m=Ob(m),m in Ig)return;Ig[m]=!0;const g=m.endsWith(".css"),v=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${v}`))return;const S=document.createElement("link");if(S.rel=g?"stylesheet":Cb,g||(S.as="script"),S.crossOrigin="",S.href=m,p&&S.setAttribute("nonce",p),document.head.appendChild(S),g)return new Promise((E,k)=>{S.addEventListener("load",E),S.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return a.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return e().catch(u)})};/** + * react-router v7.7.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */var d0=n=>{throw TypeError(n)},Fb=(n,e,t)=>e.has(n)||d0("Cannot "+t),oh=(n,e,t)=>(Fb(n,e,"read from private field"),t?t.call(n):e.get(n)),Rb=(n,e,t)=>e.has(n)?d0("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),Eg="popstate";function Mb(n={}){function e(s,a){let{pathname:u,search:d,hash:f}=s.location;return Rl("",{pathname:u,search:d,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function t(s,a){return typeof a=="string"?a:ps(a)}return Ab(e,t,null,n)}function Qe(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function jt(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Lb(){return Math.random().toString(36).substring(2,10)}function xg(n,e){return{usr:n.state,key:n.key,idx:e}}function Rl(n,e,t=null,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof e=="string"?gs(e):e,state:t,key:e&&e.key||s||Lb()}}function ps({pathname:n="/",search:e="",hash:t=""}){return e&&e!=="?"&&(n+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(n+=t.charAt(0)==="#"?t:"#"+t),n}function gs(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substring(t),n=n.substring(0,t));let s=n.indexOf("?");s>=0&&(e.search=n.substring(s),n=n.substring(0,s)),n&&(e.pathname=n)}return e}function Ab(n,e,t,s={}){let{window:a=document.defaultView,v5Compat:u=!1}=s,d=a.history,f="POP",p=null,m=g();m==null&&(m=0,d.replaceState({...d.state,idx:m},""));function g(){return(d.state||{idx:null}).idx}function v(){f="POP";let T=g(),B=T==null?null:T-m;m=T,p&&p({action:f,location:A.location,delta:B})}function S(T,B){f="PUSH";let Z=Rl(A.location,T,B);m=g()+1;let V=xg(Z,m),G=A.createHref(Z);try{d.pushState(V,"",G)}catch(te){if(te instanceof DOMException&&te.name==="DataCloneError")throw te;a.location.assign(G)}u&&p&&p({action:f,location:A.location,delta:1})}function E(T,B){f="REPLACE";let Z=Rl(A.location,T,B);m=g();let V=xg(Z,m),G=A.createHref(Z);d.replaceState(V,"",G),u&&p&&p({action:f,location:A.location,delta:0})}function k(T){return f0(T)}let A={get action(){return f},get location(){return n(a,d)},listen(T){if(p)throw new Error("A history only accepts one active listener");return a.addEventListener(Eg,v),p=T,()=>{a.removeEventListener(Eg,v),p=null}},createHref(T){return e(a,T)},createURL:k,encodeLocation(T){let B=k(T);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:S,replace:E,go(T){return d.go(T)}};return A}function f0(n,e=!1){let t="http://localhost";typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),Qe(t,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:ps(n);return s=s.replace(/ $/,"%20"),!e&&s.startsWith("//")&&(s=t+s),new URL(s,t)}var vl,Dg=class{constructor(n){if(Rb(this,vl,new Map),n)for(let[e,t]of n)this.set(e,t)}get(n){if(oh(this,vl).has(n))return oh(this,vl).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,e){oh(this,vl).set(n,e)}};vl=new WeakMap;var kb=new Set(["lazy","caseSensitive","path","id","index","children"]);function Pb(n){return kb.has(n)}var Nb=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function Tb(n){return Nb.has(n)}function Bb(n){return n.index===!0}function Ml(n,e,t=[],s={},a=!1){return n.map((u,d)=>{let f=[...t,String(d)],p=typeof u.id=="string"?u.id:f.join("-");if(Qe(u.index!==!0||!u.children,"Cannot specify children on an index route"),Qe(a||!s[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),Bb(u)){let m={...u,...e(u),id:p};return s[p]=m,m}else{let m={...u,...e(u),id:p,children:void 0};return s[p]=m,u.children&&(m.children=Ml(u.children,e,f,s,a)),m}})}function ts(n,e,t="/"){return mc(n,e,t,!1)}function mc(n,e,t,s){let a=typeof e=="string"?gs(e):e,u=ir(a.pathname||"/",t);if(u==null)return null;let d=h0(n);jb(d);let f=null;for(let p=0;f==null&&p{let p={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(Qe(p.relativePath.startsWith(s),`Absolute route path "${p.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(s.length));let m=Qr([s,p.relativePath]),g=t.concat(p);u.children&&u.children.length>0&&(Qe(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),h0(u.children,e,g,m)),!(u.path==null&&!u.index)&&e.push({path:m,score:Kb(m,u.index),routesMeta:g})};return n.forEach((u,d)=>{var f;if(u.path===""||!((f=u.path)!=null&&f.includes("?")))a(u,d);else for(let p of p0(u.path))a(u,d,p)}),e}function p0(n){let e=n.split("/");if(e.length===0)return[];let[t,...s]=e,a=t.endsWith("?"),u=t.replace(/\?$/,"");if(s.length===0)return a?[u,""]:[u];let d=p0(s.join("/")),f=[];return f.push(...d.map(p=>p===""?u:[u,p].join("/"))),a&&f.push(...d),f.map(p=>n.startsWith("/")&&p===""?"/":p)}function jb(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:qb(e.routesMeta.map(s=>s.childrenIndex),t.routesMeta.map(s=>s.childrenIndex)))}var zb=/^:[\w-]+$/,$b=3,Vb=2,Hb=1,Wb=10,Qb=-2,Cg=n=>n==="*";function Kb(n,e){let t=n.split("/"),s=t.length;return t.some(Cg)&&(s+=Qb),e&&(s+=Vb),t.filter(a=>!Cg(a)).reduce((a,u)=>a+(zb.test(u)?$b:u===""?Hb:Wb),s)}function qb(n,e){return n.length===e.length&&n.slice(0,-1).every((s,a)=>s===e[a])?n[n.length-1]-e[e.length-1]:0}function Yb(n,e,t=!1){let{routesMeta:s}=n,a={},u="/",d=[];for(let f=0;f{if(g==="*"){let k=f[S]||"";d=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const E=f[S];return v&&!E?m[g]=void 0:m[g]=(E||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:d,pattern:n}}function Gb(n,e=!1,t=!0){jt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let s=[],a="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,p)=>(s.push({paramName:f,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(s.push({paramName:"*"}),a+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?a+="\\/*$":n!==""&&n!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),s]}function Jb(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return jt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),n}}function ir(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,s=n.charAt(t);return s&&s!=="/"?null:n.slice(t)||"/"}function Xb({basename:n,pathname:e}){return e==="/"?n:Qr([n,e])}function Zb(n,e="/"){let{pathname:t,search:s="",hash:a=""}=typeof n=="string"?gs(n):n;return{pathname:t?t.startsWith("/")?t:eI(t,e):e,search:nI(s),hash:rI(a)}}function eI(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(a=>{a===".."?t.length>1&&t.pop():a!=="."&&t.push(a)}),t.length>1?t.join("/"):"/"}function ah(n,e,t,s){return`Cannot include a '${n}' character in a manually specified \`to.${e}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function m0(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function np(n){let e=m0(n);return e.map((t,s)=>s===e.length-1?t.pathname:t.pathnameBase)}function rp(n,e,t,s=!1){let a;typeof n=="string"?a=gs(n):(a={...n},Qe(!a.pathname||!a.pathname.includes("?"),ah("?","pathname","search",a)),Qe(!a.pathname||!a.pathname.includes("#"),ah("#","pathname","hash",a)),Qe(!a.search||!a.search.includes("#"),ah("#","search","hash",a)));let u=n===""||a.pathname==="",d=u?"/":a.pathname,f;if(d==null)f=t;else{let v=e.length-1;if(!s&&d.startsWith("..")){let S=d.split("/");for(;S[0]==="..";)S.shift(),v-=1;a.pathname=S.join("/")}f=v>=0?e[v]:"/"}let p=Zb(a,f),m=d&&d!=="/"&&d.endsWith("/"),g=(u||d===".")&&t.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}var Qr=n=>n.join("/").replace(/\/\/+/g,"/"),tI=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),nI=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,rI=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Mc=class{constructor(n,e,t,s=!1){this.status=n,this.statusText=e||"",this.internal=s,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function Ll(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}var y0=["POST","PUT","PATCH","DELETE"],iI=new Set(y0),sI=["GET",...y0],oI=new Set(sI),aI=new Set([301,302,303,307,308]),lI=new Set([307,308]),lh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},uI={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},fl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},cI=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ip=n=>cI.test(n),dI=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),g0="remix-router-transitions",v0=Symbol("ResetLoaderData");function fI(n){const e=n.window?n.window:typeof window<"u"?window:void 0,t=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u";Qe(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=n.hydrationRouteProperties||[],a=n.mapRouteProperties||dI,u={},d=Ml(n.routes,a,void 0,u),f,p=n.basename||"/",m=n.dataStrategy||gI,g={unstable_middleware:!1,...n.future},v=null,S=new Set,E=null,k=null,A=null,T=n.hydrationData!=null,B=ts(d,n.history.location,p),Z=!1,V=null,G;if(B==null&&!n.patchRoutesOnNavigation){let _=Xn(404,{pathname:n.history.location.pathname}),{matches:F,route:N}=Ug(d);G=!0,B=F,V={[N.id]:_}}else if(B&&!n.hydrationData&&Is(B,d,n.history.location.pathname).active&&(B=null),B)if(B.some(_=>_.route.lazy))G=!1;else if(!B.some(_=>_.route.loader))G=!0;else{let _=n.hydrationData?n.hydrationData.loaderData:null,F=n.hydrationData?n.hydrationData.errors:null;if(F){let N=B.findIndex(H=>F[H.route.id]!==void 0);G=B.slice(0,N+1).every(H=>!Ah(H.route,_,F))}else G=B.every(N=>!Ah(N.route,_,F))}else{G=!1,B=[];let _=Is(null,d,n.history.location.pathname);_.active&&_.matches&&(Z=!0,B=_.matches)}let te,M={historyAction:n.history.action,location:n.history.location,matches:B,initialized:G,navigation:lh,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||V,fetchers:new Map,blockers:new Map},Le="POP",ve=!1,re,Fe=!1,mt=new Map,bt=null,yt=!1,je=!1,Ze=new Set,Ne=new Map,ze=0,K=-1,ne=new Map,Y=new Set,C=new Map,j=new Map,he=new Set,Ae=new Map,We,Be=null;function ct(){if(v=n.history.listen(({action:_,location:F,delta:N})=>{if(We){We(),We=void 0;return}jt(Ae.size===0||N!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let H=fo({currentLocation:M.location,nextLocation:F,historyAction:_});if(H&&N!=null){let q=new Promise(ce=>{We=ce});n.history.go(N*-1),Di(H,{state:"blocked",location:F,proceed(){Di(H,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),q.then(()=>n.history.go(N))},reset(){let ce=new Map(M.blockers);ce.set(H,fl),tt({blockers:ce})}});return}return lr(_,F)}),t){OI(e,mt);let _=()=>FI(e,mt);e.addEventListener("pagehide",_),bt=()=>e.removeEventListener("pagehide",_)}return M.initialized||lr("POP",M.location,{initialHydration:!0}),te}function et(){v&&v(),bt&&bt(),S.clear(),re&&re.abort(),M.fetchers.forEach((_,F)=>uo(F)),M.blockers.forEach((_,F)=>co(F))}function vt(_){return S.add(_),()=>S.delete(_)}function tt(_,F={}){_.matches&&(_.matches=_.matches.map(q=>{let ce=u[q.route.id],ae=q.route;return ae.element!==ce.element||ae.errorElement!==ce.errorElement||ae.hydrateFallbackElement!==ce.hydrateFallbackElement?{...q,route:ce}:q})),M={...M,..._};let N=[],H=[];M.fetchers.forEach((q,ce)=>{q.state==="idle"&&(he.has(ce)?N.push(ce):H.push(ce))}),he.forEach(q=>{!M.fetchers.has(q)&&!Ne.has(q)&&N.push(q)}),[...S].forEach(q=>q(M,{deletedFetchers:N,viewTransitionOpts:F.viewTransitionOpts,flushSync:F.flushSync===!0})),N.forEach(q=>uo(q)),H.forEach(q=>M.fetchers.delete(q))}function ar(_,F,{flushSync:N}={}){var we,de;let H=M.actionData!=null&&M.navigation.formMethod!=null&&Ln(M.navigation.formMethod)&&M.navigation.state==="loading"&&((we=_.state)==null?void 0:we._isRedirect)!==!0,q;F.actionData?Object.keys(F.actionData).length>0?q=F.actionData:q=null:H?q=M.actionData:q=null;let ce=F.loaderData?Tg(M.loaderData,F.loaderData,F.matches||[],F.errors):M.loaderData,ae=M.blockers;ae.size>0&&(ae=new Map(ae),ae.forEach((Pe,Je)=>ae.set(Je,fl)));let ie=yt?!1:Ra(_,F.matches||M.matches),ue=ve===!0||M.navigation.formMethod!=null&&Ln(M.navigation.formMethod)&&((de=_.state)==null?void 0:de._isRedirect)!==!0;f&&(d=f,f=void 0),yt||Le==="POP"||(Le==="PUSH"?n.history.push(_,_.state):Le==="REPLACE"&&n.history.replace(_,_.state));let me;if(Le==="POP"){let Pe=mt.get(M.location.pathname);Pe&&Pe.has(_.pathname)?me={currentLocation:M.location,nextLocation:_}:mt.has(_.pathname)&&(me={currentLocation:_,nextLocation:M.location})}else if(Fe){let Pe=mt.get(M.location.pathname);Pe?Pe.add(_.pathname):(Pe=new Set([_.pathname]),mt.set(M.location.pathname,Pe)),me={currentLocation:M.location,nextLocation:_}}tt({...F,actionData:q,loaderData:ce,historyAction:Le,location:_,initialized:!0,navigation:lh,revalidation:"idle",restoreScrollPosition:ie,preventScrollReset:ue,blockers:ae},{viewTransitionOpts:me,flushSync:N===!0}),Le="POP",ve=!1,Fe=!1,yt=!1,je=!1,Be==null||Be.resolve(),Be=null}async function Ea(_,F){if(typeof _=="number"){n.history.go(_);return}let N=Lh(M.location,M.matches,p,_,F==null?void 0:F.fromRouteId,F==null?void 0:F.relative),{path:H,submission:q,error:ce}=Og(!1,N,F),ae=M.location,ie=Rl(M.location,H,F&&F.state);ie={...ie,...n.history.encodeLocation(ie)};let ue=F&&F.replace!=null?F.replace:void 0,me="PUSH";ue===!0?me="REPLACE":ue===!1||q!=null&&Ln(q.formMethod)&&q.formAction===M.location.pathname+M.location.search&&(me="REPLACE");let we=F&&"preventScrollReset"in F?F.preventScrollReset===!0:void 0,de=(F&&F.flushSync)===!0,Pe=fo({currentLocation:ae,nextLocation:ie,historyAction:me});if(Pe){Di(Pe,{state:"blocked",location:ie,proceed(){Di(Pe,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),Ea(_,F)},reset(){let Je=new Map(M.blockers);Je.set(Pe,fl),tt({blockers:Je})}});return}await lr(me,ie,{submission:q,pendingError:ce,preventScrollReset:we,replace:F&&F.replace,enableViewTransition:F&&F.viewTransition,flushSync:de})}function oo(){Be||(Be=RI()),lo(),tt({revalidation:"loading"});let _=Be.promise;return M.navigation.state==="submitting"?_:M.navigation.state==="idle"?(lr(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),_):(lr(Le||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:Fe===!0}),_)}async function lr(_,F,N){re&&re.abort(),re=null,Le=_,yt=(N&&N.startUninterruptedRevalidation)===!0,Ci(M.location,M.matches),ve=(N&&N.preventScrollReset)===!0,Fe=(N&&N.enableViewTransition)===!0;let H=f||d,q=N&&N.overrideNavigation,ce=N!=null&&N.initialHydration&&M.matches&&M.matches.length>0&&!Z?M.matches:ts(H,F,p),ae=(N&&N.flushSync)===!0;if(ce&&M.initialized&&!je&&II(M.location,F)&&!(N&&N.submission&&Ln(N.submission.formMethod))){ar(F,{matches:ce},{flushSync:ae});return}let ie=Is(ce,H,F.pathname);if(ie.active&&ie.matches&&(ce=ie.matches),!ce){let{error:Kt,notFoundMatches:Ct,route:dt}=bs(F.pathname);ar(F,{matches:Ct,loaderData:{},errors:{[dt.id]:Kt}},{flushSync:ae});return}re=new AbortController;let ue=Bo(n.history,F,re.signal,N&&N.submission),me=new Dg(n.unstable_getContext?await n.unstable_getContext():void 0),we;if(N&&N.pendingError)we=[js(ce).route.id,{type:"error",error:N.pendingError}];else if(N&&N.submission&&Ln(N.submission.formMethod)){let Kt=await Yl(ue,F,N.submission,ce,me,ie.active,N&&N.initialHydration===!0,{replace:N.replace,flushSync:ae});if(Kt.shortCircuited)return;if(Kt.pendingActionResult){let[Ct,dt]=Kt.pendingActionResult;if(zn(dt)&&Ll(dt.error)&&dt.error.status===404){re=null,ar(F,{matches:Kt.matches,loaderData:{},errors:{[Ct]:dt.error}});return}}ce=Kt.matches||ce,we=Kt.pendingActionResult,q=uh(F,N.submission),ae=!1,ie.active=!1,ue=Bo(n.history,ue.url,ue.signal)}let{shortCircuited:de,matches:Pe,loaderData:Je,errors:zt}=await Gl(ue,F,ce,me,ie.active,q,N&&N.submission,N&&N.fetcherSubmission,N&&N.replace,N&&N.initialHydration===!0,ae,we);de||(re=null,ar(F,{matches:Pe||ce,...Bg(we),loaderData:Je,errors:zt}))}async function Yl(_,F,N,H,q,ce,ae,ie={}){lo();let ue=DI(F,N);if(tt({navigation:ue},{flushSync:ie.flushSync===!0}),ce){let de=await Es(H,F.pathname,_.signal);if(de.type==="aborted")return{shortCircuited:!0};if(de.type==="error"){let Pe=js(de.partialMatches).route.id;return{matches:de.partialMatches,pendingActionResult:[Pe,{type:"error",error:de.error}]}}else if(de.matches)H=de.matches;else{let{notFoundMatches:Pe,error:Je,route:zt}=bs(F.pathname);return{matches:Pe,pendingActionResult:[zt.id,{type:"error",error:Je}]}}}let me,we=yc(H,F);if(!we.route.action&&!we.route.lazy)me={type:"error",error:Xn(405,{method:_.method,pathname:F.pathname,routeId:we.route.id})};else{let de=Jo(a,u,_,H,we,ae?[]:s,q),Pe=await xi(_,de,q,null);if(me=Pe[we.route.id],!me){for(let Je of H)if(Pe[Je.route.id]){me=Pe[Je.route.id];break}}if(_.signal.aborted)return{shortCircuited:!0}}if($s(me)){let de;return ie&&ie.replace!=null?de=ie.replace:de=kg(me.response.headers.get("Location"),new URL(_.url),p)===M.location.pathname+M.location.search,await ur(_,me,!0,{submission:N,replace:de}),{shortCircuited:!0}}if(zn(me)){let de=js(H,we.route.id);return(ie&&ie.replace)!==!0&&(Le="PUSH"),{matches:H,pendingActionResult:[de.route.id,me,we.route.id]}}return{matches:H,pendingActionResult:[we.route.id,me]}}async function Gl(_,F,N,H,q,ce,ae,ie,ue,me,we,de){let Pe=ce||uh(F,ae),Je=ae||ie||zg(Pe),zt=!yt&&!me;if(q){if(zt){let qt=ao(de);tt({navigation:Pe,...qt!==void 0?{actionData:qt}:{}},{flushSync:we})}let Ye=await Es(N,F.pathname,_.signal);if(Ye.type==="aborted")return{shortCircuited:!0};if(Ye.type==="error"){let qt=js(Ye.partialMatches).route.id;return{matches:Ye.partialMatches,loaderData:{},errors:{[qt]:Ye.error}}}else if(Ye.matches)N=Ye.matches;else{let{error:qt,notFoundMatches:Ds,route:Fr}=bs(F.pathname);return{matches:Ds,loaderData:{},errors:{[Fr.id]:qt}}}}let Kt=f||d,{dsMatches:Ct,revalidatingFetchers:dt}=Fg(_,H,a,u,n.history,M,N,Je,F,me?[]:s,me===!0,je,Ze,he,C,Y,Kt,p,n.patchRoutesOnNavigation!=null,de);if(K=++ze,!n.dataStrategy&&!Ct.some(Ye=>Ye.shouldLoad)&&dt.length===0){let Ye=Ca();return ar(F,{matches:N,loaderData:{},errors:de&&zn(de[1])?{[de[0]]:de[1].error}:null,...Bg(de),...Ye?{fetchers:new Map(M.fetchers)}:{}},{flushSync:we}),{shortCircuited:!0}}if(zt){let Ye={};if(!q){Ye.navigation=Pe;let qt=ao(de);qt!==void 0&&(Ye.actionData=qt)}dt.length>0&&(Ye.fetchers=Jl(dt)),tt(Ye,{flushSync:we})}dt.forEach(Ye=>{Sn(Ye.key),Ye.controller&&Ne.set(Ye.key,Ye.controller)});let Or=()=>dt.forEach(Ye=>Sn(Ye.key));re&&re.signal.addEventListener("abort",Or);let{loaderResults:Oi,fetcherResults:dr}=await Da(Ct,dt,_,H);if(_.signal.aborted)return{shortCircuited:!0};re&&re.signal.removeEventListener("abort",Or),dt.forEach(Ye=>Ne.delete(Ye.key));let Vn=ac(Oi);if(Vn)return await ur(_,Vn.result,!0,{replace:ue}),{shortCircuited:!0};if(Vn=ac(dr),Vn)return Y.add(Vn.key),await ur(_,Vn.result,!0,{replace:ue}),{shortCircuited:!0};let{loaderData:Ma,errors:gt}=Ng(M,N,Oi,de,dt,dr);me&&M.errors&&(gt={...M.errors,...gt});let Xr=Ca(),Fi=Oa(K),xs=Xr||Fi||dt.length>0;return{matches:N,loaderData:Ma,errors:gt,...xs?{fetchers:new Map(M.fetchers)}:{}}}function ao(_){if(_&&!zn(_[1]))return{[_[0]]:_[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function Jl(_){return _.forEach(F=>{let N=M.fetchers.get(F.key),H=hl(void 0,N?N.data:void 0);M.fetchers.set(F.key,H)}),new Map(M.fetchers)}async function xa(_,F,N,H){Sn(_);let q=(H&&H.flushSync)===!0,ce=f||d,ae=Lh(M.location,M.matches,p,N,F,H==null?void 0:H.relative),ie=ts(ce,ae,p),ue=Is(ie,ce,ae);if(ue.active&&ue.matches&&(ie=ue.matches),!ie){Nn(_,F,Xn(404,{pathname:ae}),{flushSync:q});return}let{path:me,submission:we,error:de}=Og(!0,ae,H);if(de){Nn(_,F,de,{flushSync:q});return}let Pe=new Dg(n.unstable_getContext?await n.unstable_getContext():void 0),Je=(H&&H.preventScrollReset)===!0;if(we&&Ln(we.formMethod)){await ws(_,F,me,ie,Pe,ue.active,q,Je,we);return}C.set(_,{routeId:F,path:me}),await Ei(_,F,me,ie,Pe,ue.active,q,Je,we)}async function ws(_,F,N,H,q,ce,ae,ie,ue){lo(),C.delete(_);let me=M.fetchers.get(_);cr(_,CI(ue,me),{flushSync:ae});let we=new AbortController,de=Bo(n.history,N,we.signal,ue);if(ce){let nt=await Es(H,new URL(de.url).pathname,de.signal,_);if(nt.type==="aborted")return;if(nt.type==="error"){Nn(_,F,nt.error,{flushSync:ae});return}else if(nt.matches)H=nt.matches;else{Nn(_,F,Xn(404,{pathname:N}),{flushSync:ae});return}}let Pe=yc(H,N);if(!Pe.route.action&&!Pe.route.lazy){let nt=Xn(405,{method:ue.formMethod,pathname:N,routeId:F});Nn(_,F,nt,{flushSync:ae});return}Ne.set(_,we);let Je=ze,zt=Jo(a,u,de,H,Pe,s,q),Ct=(await xi(de,zt,q,_))[Pe.route.id];if(de.signal.aborted){Ne.get(_)===we&&Ne.delete(_);return}if(he.has(_)){if($s(Ct)||zn(Ct)){cr(_,Ji(void 0));return}}else{if($s(Ct))if(Ne.delete(_),K>Je){cr(_,Ji(void 0));return}else return Y.add(_),cr(_,hl(ue)),ur(de,Ct,!1,{fetcherSubmission:ue,preventScrollReset:ie});if(zn(Ct)){Nn(_,F,Ct.error);return}}let dt=M.navigation.location||M.location,Or=Bo(n.history,dt,we.signal),Oi=f||d,dr=M.navigation.state!=="idle"?ts(Oi,M.navigation.location,p):M.matches;Qe(dr,"Didn't find any matches after fetcher action");let Vn=++ze;ne.set(_,Vn);let Ma=hl(ue,Ct.data);M.fetchers.set(_,Ma);let{dsMatches:gt,revalidatingFetchers:Xr}=Fg(Or,q,a,u,n.history,M,dr,ue,dt,s,!1,je,Ze,he,C,Y,Oi,p,n.patchRoutesOnNavigation!=null,[Pe.route.id,Ct]);Xr.filter(nt=>nt.key!==_).forEach(nt=>{let ho=nt.key,_n=M.fetchers.get(ho),vd=hl(void 0,_n?_n.data:void 0);M.fetchers.set(ho,vd),Sn(ho),nt.controller&&Ne.set(ho,nt.controller)}),tt({fetchers:new Map(M.fetchers)});let Fi=()=>Xr.forEach(nt=>Sn(nt.key));we.signal.addEventListener("abort",Fi);let{loaderResults:xs,fetcherResults:Ye}=await Da(gt,Xr,Or,q);if(we.signal.aborted)return;if(we.signal.removeEventListener("abort",Fi),ne.delete(_),Ne.delete(_),Xr.forEach(nt=>Ne.delete(nt.key)),M.fetchers.has(_)){let nt=Ji(Ct.data);M.fetchers.set(_,nt)}let qt=ac(xs);if(qt)return ur(Or,qt.result,!1,{preventScrollReset:ie});if(qt=ac(Ye),qt)return Y.add(qt.key),ur(Or,qt.result,!1,{preventScrollReset:ie});let{loaderData:Ds,errors:Fr}=Ng(M,dr,xs,void 0,Xr,Ye);Oa(Vn),M.navigation.state==="loading"&&Vn>K?(Qe(Le,"Expected pending action"),re&&re.abort(),ar(M.navigation.location,{matches:dr,loaderData:Ds,errors:Fr,fetchers:new Map(M.fetchers)})):(tt({errors:Fr,loaderData:Tg(M.loaderData,Ds,dr,Fr),fetchers:new Map(M.fetchers)}),je=!1)}async function Ei(_,F,N,H,q,ce,ae,ie,ue){let me=M.fetchers.get(_);cr(_,hl(ue,me?me.data:void 0),{flushSync:ae});let we=new AbortController,de=Bo(n.history,N,we.signal);if(ce){let dt=await Es(H,new URL(de.url).pathname,de.signal,_);if(dt.type==="aborted")return;if(dt.type==="error"){Nn(_,F,dt.error,{flushSync:ae});return}else if(dt.matches)H=dt.matches;else{Nn(_,F,Xn(404,{pathname:N}),{flushSync:ae});return}}let Pe=yc(H,N);Ne.set(_,we);let Je=ze,zt=Jo(a,u,de,H,Pe,s,q),Ct=(await xi(de,zt,q,_))[Pe.route.id];if(Ne.get(_)===we&&Ne.delete(_),!de.signal.aborted){if(he.has(_)){cr(_,Ji(void 0));return}if($s(Ct))if(K>Je){cr(_,Ji(void 0));return}else{Y.add(_),await ur(de,Ct,!1,{preventScrollReset:ie});return}if(zn(Ct)){Nn(_,F,Ct.error);return}cr(_,Ji(Ct.data))}}async function ur(_,F,N,{submission:H,fetcherSubmission:q,preventScrollReset:ce,replace:ae}={}){F.response.headers.has("X-Remix-Revalidate")&&(je=!0);let ie=F.response.headers.get("Location");Qe(ie,"Expected a Location header on the redirect Response"),ie=kg(ie,new URL(_.url),p);let ue=Rl(M.location,ie,{_isRedirect:!0});if(t){let zt=!1;if(F.response.headers.has("X-Remix-Reload-Document"))zt=!0;else if(ip(ie)){const Kt=f0(ie,!0);zt=Kt.origin!==e.location.origin||ir(Kt.pathname,p)==null}if(zt){ae?e.location.replace(ie):e.location.assign(ie);return}}re=null;let me=ae===!0||F.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:we,formAction:de,formEncType:Pe}=M.navigation;!H&&!q&&we&&de&&Pe&&(H=zg(M.navigation));let Je=H||q;if(lI.has(F.response.status)&&Je&&Ln(Je.formMethod))await lr(me,ue,{submission:{...Je,formAction:ie},preventScrollReset:ce||ve,enableViewTransition:N?Fe:void 0});else{let zt=uh(ue,H);await lr(me,ue,{overrideNavigation:zt,fetcherSubmission:q,preventScrollReset:ce||ve,enableViewTransition:N?Fe:void 0})}}async function xi(_,F,N,H){let q,ce={};try{q=await vI(m,_,F,H,N,!1)}catch(ae){return F.filter(ie=>ie.shouldLoad).forEach(ie=>{ce[ie.route.id]={type:"error",error:ae}}),ce}if(_.signal.aborted)return ce;for(let[ae,ie]of Object.entries(q))if(EI(ie)){let ue=ie.result;ce[ae]={type:"redirect",response:_I(ue,_,ae,F,p)}}else ce[ae]=await SI(ie);return ce}async function Da(_,F,N,H){let q=xi(N,_,H,null),ce=Promise.all(F.map(async ue=>{if(ue.matches&&ue.match&&ue.request&&ue.controller){let we=(await xi(ue.request,ue.matches,H,ue.key))[ue.match.route.id];return{[ue.key]:we}}else return Promise.resolve({[ue.key]:{type:"error",error:Xn(404,{pathname:ue.path})}})})),ae=await q,ie=(await ce).reduce((ue,me)=>Object.assign(ue,me),{});return{loaderResults:ae,fetcherResults:ie}}function lo(){je=!0,C.forEach((_,F)=>{Ne.has(F)&&Ze.add(F),Sn(F)})}function cr(_,F,N={}){M.fetchers.set(_,F),tt({fetchers:new Map(M.fetchers)},{flushSync:(N&&N.flushSync)===!0})}function Nn(_,F,N,H={}){let q=js(M.matches,F);uo(_),tt({errors:{[q.route.id]:N},fetchers:new Map(M.fetchers)},{flushSync:(H&&H.flushSync)===!0})}function Ss(_){return j.set(_,(j.get(_)||0)+1),he.has(_)&&he.delete(_),M.fetchers.get(_)||uI}function uo(_){let F=M.fetchers.get(_);Ne.has(_)&&!(F&&F.state==="loading"&&ne.has(_))&&Sn(_),C.delete(_),ne.delete(_),Y.delete(_),he.delete(_),Ze.delete(_),M.fetchers.delete(_)}function _s(_){let F=(j.get(_)||0)-1;F<=0?(j.delete(_),he.add(_)):j.set(_,F),tt({fetchers:new Map(M.fetchers)})}function Sn(_){let F=Ne.get(_);F&&(F.abort(),Ne.delete(_))}function Xl(_){for(let F of _){let N=Ss(F),H=Ji(N.data);M.fetchers.set(F,H)}}function Ca(){let _=[],F=!1;for(let N of Y){let H=M.fetchers.get(N);Qe(H,`Expected fetcher: ${N}`),H.state==="loading"&&(Y.delete(N),_.push(N),F=!0)}return Xl(_),F}function Oa(_){let F=[];for(let[N,H]of ne)if(H<_){let q=M.fetchers.get(N);Qe(q,`Expected fetcher: ${N}`),q.state==="loading"&&(Sn(N),ne.delete(N),F.push(N))}return Xl(F),F.length>0}function gd(_,F){let N=M.blockers.get(_)||fl;return Ae.get(_)!==F&&Ae.set(_,F),N}function co(_){M.blockers.delete(_),Ae.delete(_)}function Di(_,F){let N=M.blockers.get(_)||fl;Qe(N.state==="unblocked"&&F.state==="blocked"||N.state==="blocked"&&F.state==="blocked"||N.state==="blocked"&&F.state==="proceeding"||N.state==="blocked"&&F.state==="unblocked"||N.state==="proceeding"&&F.state==="unblocked",`Invalid blocker state transition: ${N.state} -> ${F.state}`);let H=new Map(M.blockers);H.set(_,F),tt({blockers:H})}function fo({currentLocation:_,nextLocation:F,historyAction:N}){if(Ae.size===0)return;Ae.size>1&&jt(!1,"A router only supports one blocker at a time");let H=Array.from(Ae.entries()),[q,ce]=H[H.length-1],ae=M.blockers.get(q);if(!(ae&&ae.state==="proceeding")&&ce({currentLocation:_,nextLocation:F,historyAction:N}))return q}function bs(_){let F=Xn(404,{pathname:_}),N=f||d,{matches:H,route:q}=Ug(N);return{notFoundMatches:H,route:q,error:F}}function Fa(_,F,N){if(E=_,A=F,k=N||null,!T&&M.navigation===lh){T=!0;let H=Ra(M.location,M.matches);H!=null&&tt({restoreScrollPosition:H})}return()=>{E=null,A=null,k=null}}function Jr(_,F){return k&&k(_,F.map(H=>Ub(H,M.loaderData)))||_.key}function Ci(_,F){if(E&&A){let N=Jr(_,F);E[N]=A()}}function Ra(_,F){if(E){let N=Jr(_,F),H=E[N];if(typeof H=="number")return H}return null}function Is(_,F,N){if(n.patchRoutesOnNavigation)if(_){if(Object.keys(_[0].params).length>0)return{active:!0,matches:mc(F,N,p,!0)}}else return{active:!0,matches:mc(F,N,p,!0)||[]};return{active:!1,matches:null}}async function Es(_,F,N,H){if(!n.patchRoutesOnNavigation)return{type:"success",matches:_};let q=_;for(;;){let ce=f==null,ae=f||d,ie=u;try{await n.patchRoutesOnNavigation({signal:N,path:F,matches:q,fetcherKey:H,patch:(we,de)=>{N.aborted||Rg(we,de,ae,ie,a,!1)}})}catch(we){return{type:"error",error:we,partialMatches:q}}finally{ce&&!N.aborted&&(d=[...d])}if(N.aborted)return{type:"aborted"};let ue=ts(ae,F,p);if(ue)return{type:"success",matches:ue};let me=mc(ae,F,p,!0);if(!me||q.length===me.length&&q.every((we,de)=>we.route.id===me[de].route.id))return{type:"success",matches:null};q=me}}function Zl(_){u={},f=Ml(_,a,void 0,u)}function eu(_,F,N=!1){let H=f==null;Rg(_,F,f||d,u,a,N),H&&(d=[...d],tt({}))}return te={get basename(){return p},get future(){return g},get state(){return M},get routes(){return d},get window(){return e},initialize:ct,subscribe:vt,enableScrollRestoration:Fa,navigate:Ea,fetch:xa,revalidate:oo,createHref:_=>n.history.createHref(_),encodeLocation:_=>n.history.encodeLocation(_),getFetcher:Ss,deleteFetcher:_s,dispose:et,getBlocker:gd,deleteBlocker:co,patchRoutes:eu,_internalFetchControllers:Ne,_internalSetRoutes:Zl,_internalSetStateDoNotUseOrYouWillBreakYourApp(_){tt(_)}},te}function hI(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Lh(n,e,t,s,a,u){let d,f;if(a){d=[];for(let m of e)if(d.push(m),m.route.id===a){f=m;break}}else d=e,f=e[e.length-1];let p=rp(s||".",np(d),ir(n.pathname,t)||n.pathname,u==="path");if(s==null&&(p.search=n.search,p.hash=n.hash),(s==null||s===""||s===".")&&f){let m=sp(p.search);if(f.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&m){let g=new URLSearchParams(p.search),v=g.getAll("index");g.delete("index"),v.filter(E=>E).forEach(E=>g.append("index",E));let S=g.toString();p.search=S?`?${S}`:""}}return t!=="/"&&(p.pathname=Xb({basename:t,pathname:p.pathname})),ps(p)}function Og(n,e,t){if(!t||!hI(t))return{path:e};if(t.formMethod&&!xI(t.formMethod))return{path:e,error:Xn(405,{method:t.formMethod})};let s=()=>({path:e,error:Xn(400,{type:"invalid-body"})}),u=(t.formMethod||"get").toUpperCase(),d=E0(e);if(t.body!==void 0){if(t.formEncType==="text/plain"){if(!Ln(u))return s();let v=typeof t.body=="string"?t.body:t.body instanceof FormData||t.body instanceof URLSearchParams?Array.from(t.body.entries()).reduce((S,[E,k])=>`${S}${E}=${k} +`,""):String(t.body);return{path:e,submission:{formMethod:u,formAction:d,formEncType:t.formEncType,formData:void 0,json:void 0,text:v}}}else if(t.formEncType==="application/json"){if(!Ln(u))return s();try{let v=typeof t.body=="string"?JSON.parse(t.body):t.body;return{path:e,submission:{formMethod:u,formAction:d,formEncType:t.formEncType,formData:void 0,json:v,text:void 0}}}catch{return s()}}}Qe(typeof FormData=="function","FormData is not available in this environment");let f,p;if(t.formData)f=Ph(t.formData),p=t.formData;else if(t.body instanceof FormData)f=Ph(t.body),p=t.body;else if(t.body instanceof URLSearchParams)f=t.body,p=Pg(f);else if(t.body==null)f=new URLSearchParams,p=new FormData;else try{f=new URLSearchParams(t.body),p=Pg(f)}catch{return s()}let m={formMethod:u,formAction:d,formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Ln(m.formMethod))return{path:e,submission:m};let g=gs(e);return n&&g.search&&sp(g.search)&&f.append("index",""),g.search=`?${f}`,{path:ps(g),submission:m}}function Fg(n,e,t,s,a,u,d,f,p,m,g,v,S,E,k,A,T,B,Z,V){var yt;let G=V?zn(V[1])?V[1].error:V[1].data:void 0,te=a.createURL(u.location),M=a.createURL(p),Le;if(g&&u.errors){let je=Object.keys(u.errors)[0];Le=d.findIndex(Ze=>Ze.route.id===je)}else if(V&&zn(V[1])){let je=V[0];Le=d.findIndex(Ze=>Ze.route.id===je)-1}let ve=V?V[1].statusCode:void 0,re=ve&&ve>=400,Fe={currentUrl:te,currentParams:((yt=u.matches[0])==null?void 0:yt.params)||{},nextUrl:M,nextParams:d[0].params,...f,actionResult:G,actionStatus:ve},mt=d.map((je,Ze)=>{let{route:Ne}=je,ze=null;if(Le!=null&&Ze>Le?ze=!1:Ne.lazy?ze=!0:Ne.loader==null?ze=!1:g?ze=Ah(Ne,u.loaderData,u.errors):pI(u.loaderData,u.matches[Ze],je)&&(ze=!0),ze!==null)return kh(t,s,n,je,m,e,ze);let K=re?!1:v||te.pathname+te.search===M.pathname+M.search||te.search!==M.search||mI(u.matches[Ze],je),ne={...Fe,defaultShouldRevalidate:K},Y=Lc(je,ne);return kh(t,s,n,je,m,e,Y,ne)}),bt=[];return k.forEach((je,Ze)=>{if(g||!d.some(he=>he.route.id===je.routeId)||E.has(Ze))return;let Ne=u.fetchers.get(Ze),ze=Ne&&Ne.state!=="idle"&&Ne.data===void 0,K=ts(T,je.path,B);if(!K){if(Z&&ze)return;bt.push({key:Ze,routeId:je.routeId,path:je.path,matches:null,match:null,request:null,controller:null});return}if(A.has(Ze))return;let ne=yc(K,je.path),Y=new AbortController,C=Bo(a,je.path,Y.signal),j=null;if(S.has(Ze))S.delete(Ze),j=Jo(t,s,C,K,ne,m,e);else if(ze)v&&(j=Jo(t,s,C,K,ne,m,e));else{let he={...Fe,defaultShouldRevalidate:re?!1:v};Lc(ne,he)&&(j=Jo(t,s,C,K,ne,m,e,he))}j&&bt.push({key:Ze,routeId:je.routeId,path:je.path,matches:j,match:ne,request:C,controller:Y})}),{dsMatches:mt,revalidatingFetchers:bt}}function Ah(n,e,t){if(n.lazy)return!0;if(!n.loader)return!1;let s=e!=null&&n.id in e,a=t!=null&&t[n.id]!==void 0;return!s&&a?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!s&&!a}function pI(n,e,t){let s=!e||t.route.id!==e.route.id,a=!n.hasOwnProperty(t.route.id);return s||a}function mI(n,e){let t=n.route.path;return n.pathname!==e.pathname||t!=null&&t.endsWith("*")&&n.params["*"]!==e.params["*"]}function Lc(n,e){if(n.route.shouldRevalidate){let t=n.route.shouldRevalidate(e);if(typeof t=="boolean")return t}return e.defaultShouldRevalidate}function Rg(n,e,t,s,a,u){let d;if(n){let m=s[n];Qe(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),d=m.children}else d=t;let f=[],p=[];if(e.forEach(m=>{let g=d.find(v=>w0(m,v));g?p.push({existingRoute:g,newRoute:m}):f.push(m)}),f.length>0){let m=Ml(f,a,[n||"_","patch",String((d==null?void 0:d.length)||"0")],s);d.push(...m)}if(u&&p.length>0)for(let m=0;m{var a;return(a=e.children)==null?void 0:a.some(u=>w0(t,u))}):!1}var Mg=new WeakMap,S0=({key:n,route:e,manifest:t,mapRouteProperties:s})=>{let a=t[e.id];if(Qe(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let u=a.lazy[n];if(!u)return;let d=Mg.get(a);d||(d={},Mg.set(a,d));let f=d[n];if(f)return f;let p=(async()=>{let m=Pb(n),v=a[n]!==void 0&&n!=="hasErrorBoundary";if(m)jt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),d[n]=Promise.resolve();else if(v)jt(!1,`Route "${a.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let S=await u();S!=null&&(Object.assign(a,{[n]:S}),Object.assign(a,s(a)))}typeof a.lazy=="object"&&(a.lazy[n]=void 0,Object.values(a.lazy).every(S=>S===void 0)&&(a.lazy=void 0))})();return d[n]=p,p},Lg=new WeakMap;function yI(n,e,t,s,a){let u=t[n.id];if(Qe(u,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let g=Lg.get(u);if(g)return{lazyRoutePromise:g,lazyHandlerPromise:g};let v=(async()=>{Qe(typeof n.lazy=="function","No lazy route function found");let S=await n.lazy(),E={};for(let k in S){let A=S[k];if(A===void 0)continue;let T=Tb(k),Z=u[k]!==void 0&&k!=="hasErrorBoundary";T?jt(!T,"Route property "+k+" is not a supported property to be returned from a lazy route function. This property will be ignored."):Z?jt(!Z,`Route "${u.id}" has a static property "${k}" defined but its lazy function is also returning a value for this property. The lazy route property "${k}" will be ignored.`):E[k]=A}Object.assign(u,E),Object.assign(u,{...s(u),lazy:void 0})})();return Lg.set(u,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let d=Object.keys(n.lazy),f=[],p;for(let g of d){if(a&&a.includes(g))continue;let v=S0({key:g,route:n,manifest:t,mapRouteProperties:s});v&&(f.push(v),g===e&&(p=v))}let m=f.length>0?Promise.all(f).then(()=>{}):void 0;return m==null||m.catch(()=>{}),p==null||p.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function Ag(n){let e=n.matches.filter(a=>a.shouldLoad),t={};return(await Promise.all(e.map(a=>a.resolve()))).forEach((a,u)=>{t[e[u].route.id]=a}),t}async function gI(n){return n.matches.some(e=>e.route.unstable_middleware)?_0(n,!1,()=>Ag(n),(e,t)=>({[t]:{type:"error",result:e}})):Ag(n)}async function _0(n,e,t,s){let{matches:a,request:u,params:d,context:f}=n,p={handlerResult:void 0};try{let m=a.flatMap(v=>v.route.unstable_middleware?v.route.unstable_middleware.map(S=>[v.route.id,S]):[]),g=await b0({request:u,params:d,context:f},m,e,p,t);return e?g:p.handlerResult}catch(m){if(!p.middlewareError)throw m;let g=await s(p.middlewareError.error,p.middlewareError.routeId);return p.handlerResult?Object.assign(p.handlerResult,g):g}}async function b0(n,e,t,s,a,u=0){let{request:d}=n;if(d.signal.aborted)throw d.signal.reason?d.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${d.method} ${d.url}`);let f=e[u];if(!f)return s.handlerResult=await a(),s.handlerResult;let[p,m]=f,g=!1,v,S=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");g=!0,await b0(n,e,t,s,a,u+1)};try{let E=await m({request:n.request,params:n.params,context:n.context},S);return g?E===void 0?v:E:S()}catch(E){throw s.middlewareError?s.middlewareError.error!==E&&(s.middlewareError={routeId:p,error:E}):s.middlewareError={routeId:p,error:E},E}}function I0(n,e,t,s,a){let u=S0({key:"unstable_middleware",route:s.route,manifest:e,mapRouteProperties:n}),d=yI(s.route,Ln(t.method)?"action":"loader",e,n,a);return{middleware:u,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function kh(n,e,t,s,a,u,d,f=null){let p=!1,m=I0(n,e,t,s,a);return{...s,_lazyPromises:m,shouldLoad:d,unstable_shouldRevalidateArgs:f,unstable_shouldCallHandler(g){return p=!0,f?typeof g=="boolean"?Lc(s,{...f,defaultShouldRevalidate:g}):Lc(s,f):d},resolve(g){return p||d||g&&!Ln(t.method)&&(s.route.lazy||s.route.loader)?wI({request:t,match:s,lazyHandlerPromise:m==null?void 0:m.handler,lazyRoutePromise:m==null?void 0:m.route,handlerOverride:g,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function Jo(n,e,t,s,a,u,d,f=null){return s.map(p=>p.route.id!==a.route.id?{...p,shouldLoad:!1,unstable_shouldRevalidateArgs:f,unstable_shouldCallHandler:()=>!1,_lazyPromises:I0(n,e,t,p,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:kh(n,e,t,p,u,d,!0,f))}async function vI(n,e,t,s,a,u){t.some(m=>{var g;return(g=m._lazyPromises)==null?void 0:g.middleware})&&await Promise.all(t.map(m=>{var g;return(g=m._lazyPromises)==null?void 0:g.middleware}));let d={request:e,params:t[0].params,context:a,matches:t},p=await n({...d,fetcherKey:s,unstable_runClientMiddleware:m=>{let g=d;return _0(g,!1,()=>m({...g,fetcherKey:s,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(v,S)=>({[S]:{type:"error",result:v}}))}});try{await Promise.all(t.flatMap(m=>{var g,v;return[(g=m._lazyPromises)==null?void 0:g.handler,(v=m._lazyPromises)==null?void 0:v.route]}))}catch{}return p}async function wI({request:n,match:e,lazyHandlerPromise:t,lazyRoutePromise:s,handlerOverride:a,scopedContext:u}){let d,f,p=Ln(n.method),m=p?"action":"loader",g=v=>{let S,E=new Promise((T,B)=>S=B);f=()=>S(),n.signal.addEventListener("abort",f);let k=T=>typeof v!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${e.route.id}]`)):v({request:n,params:e.params,context:u},...T!==void 0?[T]:[]),A=(async()=>{try{return{type:"data",result:await(a?a(B=>k(B)):k())}}catch(T){return{type:"error",result:T}}})();return Promise.race([A,E])};try{let v=p?e.route.action:e.route.loader;if(t||s)if(v){let S,[E]=await Promise.all([g(v).catch(k=>{S=k}),t,s]);if(S!==void 0)throw S;d=E}else{await t;let S=p?e.route.action:e.route.loader;if(S)[d]=await Promise.all([g(S),s]);else if(m==="action"){let E=new URL(n.url),k=E.pathname+E.search;throw Xn(405,{method:n.method,pathname:k,routeId:e.route.id})}else return{type:"data",result:void 0}}else if(v)d=await g(v);else{let S=new URL(n.url),E=S.pathname+S.search;throw Xn(404,{pathname:E})}}catch(v){return{type:"error",result:v}}finally{f&&n.signal.removeEventListener("abort",f)}return d}async function SI(n){var s,a,u,d,f,p;let{result:e,type:t}=n;if(x0(e)){let m;try{let g=e.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?e.body==null?m=null:m=await e.json():m=await e.text()}catch(g){return{type:"error",error:g}}return t==="error"?{type:"error",error:new Mc(e.status,e.statusText,m),statusCode:e.status,headers:e.headers}:{type:"data",data:m,statusCode:e.status,headers:e.headers}}return t==="error"?jg(e)?e.data instanceof Error?{type:"error",error:e.data,statusCode:(s=e.init)==null?void 0:s.status,headers:(a=e.init)!=null&&a.headers?new Headers(e.init.headers):void 0}:{type:"error",error:new Mc(((u=e.init)==null?void 0:u.status)||500,void 0,e.data),statusCode:Ll(e)?e.status:void 0,headers:(d=e.init)!=null&&d.headers?new Headers(e.init.headers):void 0}:{type:"error",error:e,statusCode:Ll(e)?e.status:void 0}:jg(e)?{type:"data",data:e.data,statusCode:(f=e.init)==null?void 0:f.status,headers:(p=e.init)!=null&&p.headers?new Headers(e.init.headers):void 0}:{type:"data",data:e}}function _I(n,e,t,s,a){let u=n.headers.get("Location");if(Qe(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!ip(u)){let d=s.slice(0,s.findIndex(f=>f.route.id===t)+1);u=Lh(new URL(e.url),d,a,u),n.headers.set("Location",u)}return n}function kg(n,e,t){if(ip(n)){let s=n,a=s.startsWith("//")?new URL(e.protocol+s):new URL(s),u=ir(a.pathname,t)!=null;if(a.origin===e.origin&&u)return a.pathname+a.search+a.hash}return n}function Bo(n,e,t,s){let a=n.createURL(E0(e)).toString(),u={signal:t};if(s&&Ln(s.formMethod)){let{formMethod:d,formEncType:f}=s;u.method=d.toUpperCase(),f==="application/json"?(u.headers=new Headers({"Content-Type":f}),u.body=JSON.stringify(s.json)):f==="text/plain"?u.body=s.text:f==="application/x-www-form-urlencoded"&&s.formData?u.body=Ph(s.formData):u.body=s.formData}return new Request(a,u)}function Ph(n){let e=new URLSearchParams;for(let[t,s]of n.entries())e.append(t,typeof s=="string"?s:s.name);return e}function Pg(n){let e=new FormData;for(let[t,s]of n.entries())e.append(t,s);return e}function bI(n,e,t,s=!1,a=!1){let u={},d=null,f,p=!1,m={},g=t&&zn(t[1])?t[1].error:void 0;return n.forEach(v=>{if(!(v.route.id in e))return;let S=v.route.id,E=e[S];if(Qe(!$s(E),"Cannot handle redirect results in processLoaderData"),zn(E)){let k=E.error;if(g!==void 0&&(k=g,g=void 0),d=d||{},a)d[S]=k;else{let A=js(n,S);d[A.route.id]==null&&(d[A.route.id]=k)}s||(u[S]=v0),p||(p=!0,f=Ll(E.error)?E.error.status:500),E.headers&&(m[S]=E.headers)}else u[S]=E.data,E.statusCode&&E.statusCode!==200&&!p&&(f=E.statusCode),E.headers&&(m[S]=E.headers)}),g!==void 0&&t&&(d={[t[0]]:g},t[2]&&(u[t[2]]=void 0)),{loaderData:u,errors:d,statusCode:f||200,loaderHeaders:m}}function Ng(n,e,t,s,a,u){let{loaderData:d,errors:f}=bI(e,t,s);return a.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:g,controller:v}=p,S=u[m];if(Qe(S,"Did not find corresponding fetcher result"),!(v&&v.signal.aborted))if(zn(S)){let E=js(n.matches,g==null?void 0:g.route.id);f&&f[E.route.id]||(f={...f,[E.route.id]:S.error}),n.fetchers.delete(m)}else if($s(S))Qe(!1,"Unhandled fetcher revalidation redirect");else{let E=Ji(S.data);n.fetchers.set(m,E)}}),{loaderData:d,errors:f}}function Tg(n,e,t,s){let a=Object.entries(e).filter(([,u])=>u!==v0).reduce((u,[d,f])=>(u[d]=f,u),{});for(let u of t){let d=u.route.id;if(!e.hasOwnProperty(d)&&n.hasOwnProperty(d)&&u.route.loader&&(a[d]=n[d]),s&&s.hasOwnProperty(d))break}return a}function Bg(n){return n?zn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function js(n,e){return(e?n.slice(0,n.findIndex(s=>s.route.id===e)+1):[...n]).reverse().find(s=>s.route.hasErrorBoundary===!0)||n[0]}function Ug(n){let e=n.length===1?n[0]:n.find(t=>t.index||!t.path||t.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function Xn(n,{pathname:e,routeId:t,method:s,type:a,message:u}={}){let d="Unknown Server Error",f="Unknown @remix-run/router error";return n===400?(d="Bad Request",s&&e&&t?f=`You made a ${s} request to "${e}" but did not provide a \`loader\` for route "${t}", so there is no way to handle the request.`:a==="invalid-body"&&(f="Unable to encode submission body")):n===403?(d="Forbidden",f=`Route "${t}" does not match URL "${e}"`):n===404?(d="Not Found",f=`No route matches URL "${e}"`):n===405&&(d="Method Not Allowed",s&&e&&t?f=`You made a ${s.toUpperCase()} request to "${e}" but did not provide an \`action\` for route "${t}", so there is no way to handle the request.`:s&&(f=`Invalid request method "${s.toUpperCase()}"`)),new Mc(n||500,d,new Error(f),!0)}function ac(n){let e=Object.entries(n);for(let t=e.length-1;t>=0;t--){let[s,a]=e[t];if($s(a))return{key:s,result:a}}}function E0(n){let e=typeof n=="string"?gs(n):n;return ps({...e,hash:""})}function II(n,e){return n.pathname!==e.pathname||n.search!==e.search?!1:n.hash===""?e.hash!=="":n.hash===e.hash?!0:e.hash!==""}function EI(n){return x0(n.result)&&aI.has(n.result.status)}function zn(n){return n.type==="error"}function $s(n){return(n&&n.type)==="redirect"}function jg(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function x0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function xI(n){return oI.has(n.toUpperCase())}function Ln(n){return iI.has(n.toUpperCase())}function sp(n){return new URLSearchParams(n).getAll("index").some(e=>e==="")}function yc(n,e){let t=typeof e=="string"?gs(e).search:e.search;if(n[n.length-1].route.index&&sp(t||""))return n[n.length-1];let s=m0(n);return s[s.length-1]}function zg(n){let{formMethod:e,formAction:t,formEncType:s,text:a,formData:u,json:d}=n;if(!(!e||!t||!s)){if(a!=null)return{formMethod:e,formAction:t,formEncType:s,formData:void 0,json:void 0,text:a};if(u!=null)return{formMethod:e,formAction:t,formEncType:s,formData:u,json:void 0,text:void 0};if(d!==void 0)return{formMethod:e,formAction:t,formEncType:s,formData:void 0,json:d,text:void 0}}}function uh(n,e){return e?{state:"loading",location:n,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function DI(n,e){return{state:"submitting",location:n,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function hl(n,e){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function CI(n,e){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:e?e.data:void 0}}function Ji(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function OI(n,e){try{let t=n.sessionStorage.getItem(g0);if(t){let s=JSON.parse(t);for(let[a,u]of Object.entries(s||{}))u&&Array.isArray(u)&&e.set(a,new Set(u||[]))}}catch{}}function FI(n,e){if(e.size>0){let t={};for(let[s,a]of e)t[s]=[...a];try{n.sessionStorage.setItem(g0,JSON.stringify(t))}catch(s){jt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function RI(){let n,e,t=new Promise((s,a)=>{n=async u=>{s(u);try{await t}catch{}},e=async u=>{a(u);try{await t}catch{}}});return{promise:t,resolve:n,reject:e}}var ro=O.createContext(null);ro.displayName="DataRouter";var $l=O.createContext(null);$l.displayName="DataRouterState";O.createContext(!1);var op=O.createContext({isTransitioning:!1});op.displayName="ViewTransition";var D0=O.createContext(new Map);D0.displayName="Fetchers";var MI=O.createContext(null);MI.displayName="Await";var Gr=O.createContext(null);Gr.displayName="Navigation";var cd=O.createContext(null);cd.displayName="Location";var Dr=O.createContext({outlet:null,matches:[],isDataRoute:!1});Dr.displayName="Route";var ap=O.createContext(null);ap.displayName="RouteError";function LI(n,{relative:e}={}){Qe(Vl(),"useHref() may be used only in the context of a component.");let{basename:t,navigator:s}=O.useContext(Gr),{hash:a,pathname:u,search:d}=Hl(n,{relative:e}),f=u;return t!=="/"&&(f=u==="/"?t:Qr([t,u])),s.createHref({pathname:f,search:d,hash:a})}function Vl(){return O.useContext(cd)!=null}function io(){return Qe(Vl(),"useLocation() may be used only in the context of a component."),O.useContext(cd).location}var C0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function O0(n){O.useContext(Gr).static||O.useLayoutEffect(n)}function AI(){let{isDataRoute:n}=O.useContext(Dr);return n?qI():kI()}function kI(){Qe(Vl(),"useNavigate() may be used only in the context of a component.");let n=O.useContext(ro),{basename:e,navigator:t}=O.useContext(Gr),{matches:s}=O.useContext(Dr),{pathname:a}=io(),u=JSON.stringify(np(s)),d=O.useRef(!1);return O0(()=>{d.current=!0}),O.useCallback((p,m={})=>{if(jt(d.current,C0),!d.current)return;if(typeof p=="number"){t.go(p);return}let g=rp(p,JSON.parse(u),a,m.relative==="path");n==null&&e!=="/"&&(g.pathname=g.pathname==="/"?e:Qr([e,g.pathname])),(m.replace?t.replace:t.push)(g,m.state,m)},[e,t,u,a,n])}var PI=O.createContext(null);function NI(n){let e=O.useContext(Dr).outlet;return e&&O.createElement(PI.Provider,{value:n},e)}function IO(){let{matches:n}=O.useContext(Dr),e=n[n.length-1];return e?e.params:{}}function Hl(n,{relative:e}={}){let{matches:t}=O.useContext(Dr),{pathname:s}=io(),a=JSON.stringify(np(t));return O.useMemo(()=>rp(n,JSON.parse(a),s,e==="path"),[n,a,s,e])}function TI(n,e,t,s){Qe(Vl(),"useRoutes() may be used only in the context of a component.");let{navigator:a}=O.useContext(Gr),{matches:u}=O.useContext(Dr),d=u[u.length-1],f=d?d.params:{},p=d?d.pathname:"/",m=d?d.pathnameBase:"/",g=d&&d.route;{let B=g&&g.path||"";F0(p,!g||B.endsWith("*")||B.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${p}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let v=io(),S;S=v;let E=S.pathname||"/",k=E;if(m!=="/"){let B=m.replace(/^\//,"").split("/");k="/"+E.replace(/^\//,"").split("/").slice(B.length).join("/")}let A=ts(n,{pathname:k});return jt(g||A!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),jt(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),$I(A&&A.map(B=>Object.assign({},B,{params:Object.assign({},f,B.params),pathname:Qr([m,a.encodeLocation?a.encodeLocation(B.pathname).pathname:B.pathname]),pathnameBase:B.pathnameBase==="/"?m:Qr([m,a.encodeLocation?a.encodeLocation(B.pathnameBase).pathname:B.pathnameBase])})),u,t,s)}function BI(){let n=KI(),e=Ll(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:s},u={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:u},"ErrorBoundary")," or"," ",O.createElement("code",{style:u},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},e),t?O.createElement("pre",{style:a},t):null,d)}var UI=O.createElement(BI,null),jI=class extends O.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,e){return e.location!==n.location||e.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:e.error,location:e.location,revalidation:n.revalidation||e.revalidation}}componentDidCatch(n,e){console.error("React Router caught the following error during render",n,e)}render(){return this.state.error!==void 0?O.createElement(Dr.Provider,{value:this.props.routeContext},O.createElement(ap.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function zI({routeContext:n,match:e,children:t}){let s=O.useContext(ro);return s&&s.static&&s.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=e.route.id),O.createElement(Dr.Provider,{value:n},t)}function $I(n,e=[],t=null,s=null){if(n==null){if(!t)return null;if(t.errors)n=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)n=t.matches;else return null}let a=n,u=t==null?void 0:t.errors;if(u!=null){let p=a.findIndex(m=>m.route.id&&(u==null?void 0:u[m.route.id])!==void 0);Qe(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),a=a.slice(0,Math.min(a.length,p+1))}let d=!1,f=-1;if(t)for(let p=0;p=0?a=a.slice(0,f+1):a=[a[0]];break}}}return a.reduceRight((p,m,g)=>{let v,S=!1,E=null,k=null;t&&(v=u&&m.route.id?u[m.route.id]:void 0,E=m.route.errorElement||UI,d&&(f<0&&g===0?(F0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,k=null):f===g&&(S=!0,k=m.route.hydrateFallbackElement||null)));let A=e.concat(a.slice(0,g+1)),T=()=>{let B;return v?B=E:S?B=k:m.route.Component?B=O.createElement(m.route.Component,null):m.route.element?B=m.route.element:B=p,O.createElement(zI,{match:m,routeContext:{outlet:p,matches:A,isDataRoute:t!=null},children:B})};return t&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?O.createElement(jI,{location:t.location,revalidation:t.revalidation,component:E,error:v,children:T(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):T()},null)}function lp(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function VI(n){let e=O.useContext(ro);return Qe(e,lp(n)),e}function HI(n){let e=O.useContext($l);return Qe(e,lp(n)),e}function WI(n){let e=O.useContext(Dr);return Qe(e,lp(n)),e}function up(n){let e=WI(n),t=e.matches[e.matches.length-1];return Qe(t.route.id,`${n} can only be used on routes that contain a unique "id"`),t.route.id}function QI(){return up("useRouteId")}function KI(){var s;let n=O.useContext(ap),e=HI("useRouteError"),t=up("useRouteError");return n!==void 0?n:(s=e.errors)==null?void 0:s[t]}function qI(){let{router:n}=VI("useNavigate"),e=up("useNavigate"),t=O.useRef(!1);return O0(()=>{t.current=!0}),O.useCallback(async(a,u={})=>{jt(t.current,C0),t.current&&(typeof a=="number"?n.navigate(a):await n.navigate(a,{fromRouteId:e,...u}))},[n,e])}var $g={};function F0(n,e,t){!e&&!$g[n]&&($g[n]=!0,jt(!1,t))}var Vg={};function Hg(n,e){!n&&!Vg[e]&&(Vg[e]=!0,console.warn(e))}function YI(n){let e={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&jt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:O.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&jt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:O.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&jt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:O.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),e}var GI=["HydrateFallback","hydrateFallbackElement"],JI=class{constructor(){this.status="pending",this.promise=new Promise((n,e)=>{this.resolve=t=>{this.status==="pending"&&(this.status="resolved",n(t))},this.reject=t=>{this.status==="pending"&&(this.status="rejected",e(t))}})}};function XI({router:n,flushSync:e}){let[t,s]=O.useState(n.state),[a,u]=O.useState(),[d,f]=O.useState({isTransitioning:!1}),[p,m]=O.useState(),[g,v]=O.useState(),[S,E]=O.useState(),k=O.useRef(new Map),A=O.useCallback((V,{deletedFetchers:G,flushSync:te,viewTransitionOpts:M})=>{V.fetchers.forEach((ve,re)=>{ve.data!==void 0&&k.current.set(re,ve.data)}),G.forEach(ve=>k.current.delete(ve)),Hg(te===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Le=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Hg(M==null||Le,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!M||!Le){e&&te?e(()=>s(V)):O.startTransition(()=>s(V));return}if(e&&te){e(()=>{g&&(p&&p.resolve(),g.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let ve=n.window.document.startViewTransition(()=>{e(()=>s(V))});ve.finished.finally(()=>{e(()=>{m(void 0),v(void 0),u(void 0),f({isTransitioning:!1})})}),e(()=>v(ve));return}g?(p&&p.resolve(),g.skipTransition(),E({state:V,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(u(V),f({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[n.window,e,g,p]);O.useLayoutEffect(()=>n.subscribe(A),[n,A]),O.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new JI)},[d]),O.useEffect(()=>{if(p&&a&&n.window){let V=a,G=p.promise,te=n.window.document.startViewTransition(async()=>{O.startTransition(()=>s(V)),await G});te.finished.finally(()=>{m(void 0),v(void 0),u(void 0),f({isTransitioning:!1})}),v(te)}},[a,p,n.window]),O.useEffect(()=>{p&&a&&t.location.key===a.location.key&&p.resolve()},[p,g,t.location,a]),O.useEffect(()=>{!d.isTransitioning&&S&&(u(S.state),f({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),E(void 0))},[d.isTransitioning,S]);let T=O.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:V=>n.navigate(V),push:(V,G,te)=>n.navigate(V,{state:G,preventScrollReset:te==null?void 0:te.preventScrollReset}),replace:(V,G,te)=>n.navigate(V,{replace:!0,state:G,preventScrollReset:te==null?void 0:te.preventScrollReset})}),[n]),B=n.basename||"/",Z=O.useMemo(()=>({router:n,navigator:T,static:!1,basename:B}),[n,T,B]);return O.createElement(O.Fragment,null,O.createElement(ro.Provider,{value:Z},O.createElement($l.Provider,{value:t},O.createElement(D0.Provider,{value:k.current},O.createElement(op.Provider,{value:d},O.createElement(tE,{basename:B,location:t.location,navigationType:t.historyAction,navigator:T},O.createElement(ZI,{routes:n.routes,future:n.future,state:t})))))),null)}var ZI=O.memo(eE);function eE({routes:n,future:e,state:t}){return TI(n,void 0,t,e)}function EO(n){return NI(n.context)}function tE({basename:n="/",children:e=null,location:t,navigationType:s="POP",navigator:a,static:u=!1}){Qe(!Vl(),"You cannot render a inside another . You should never have more than one in your app.");let d=n.replace(/^\/*/,"/"),f=O.useMemo(()=>({basename:d,navigator:a,static:u,future:{}}),[d,a,u]);typeof t=="string"&&(t=gs(t));let{pathname:p="/",search:m="",hash:g="",state:v=null,key:S="default"}=t,E=O.useMemo(()=>{let k=ir(p,d);return k==null?null:{location:{pathname:k,search:m,hash:g,state:v,key:S},navigationType:s}},[d,p,m,g,v,S,s]);return jt(E!=null,` is not able to match the URL "${p}${m}${g}" because it does not start with the basename, so the won't render anything.`),E==null?null:O.createElement(Gr.Provider,{value:f},O.createElement(cd.Provider,{children:e,value:E}))}var gc="get",vc="application/x-www-form-urlencoded";function dd(n){return n!=null&&typeof n.tagName=="string"}function nE(n){return dd(n)&&n.tagName.toLowerCase()==="button"}function rE(n){return dd(n)&&n.tagName.toLowerCase()==="form"}function iE(n){return dd(n)&&n.tagName.toLowerCase()==="input"}function sE(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function oE(n,e){return n.button===0&&(!e||e==="_self")&&!sE(n)}var lc=null;function aE(){if(lc===null)try{new FormData(document.createElement("form"),0),lc=!1}catch{lc=!0}return lc}var lE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ch(n){return n!=null&&!lE.has(n)?(jt(!1,`"${n}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${vc}"`),null):n}function uE(n,e){let t,s,a,u,d;if(rE(n)){let f=n.getAttribute("action");s=f?ir(f,e):null,t=n.getAttribute("method")||gc,a=ch(n.getAttribute("enctype"))||vc,u=new FormData(n)}else if(nE(n)||iE(n)&&(n.type==="submit"||n.type==="image")){let f=n.form;if(f==null)throw new Error('Cannot submit a